Socket
Socket
Sign inDemoInstall

@aitmed/aitmed-grpc-sdk-test

Package Overview
Dependencies
267
Maintainers
6
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aitmed/aitmed-grpc-sdk-test

This package is the first-layer sdk that provides APIs communicating with the server via gRPC as well as some basic types, errors and enums.


Version published
Weekly downloads
38
increased by1800%
Maintainers
6
Install size
18.7 MB
Created
Weekly downloads
 

Readme

Source

AiTmed gRPC SDK

common Module

common module contains several necessary systems:

  1. Code system ('common.codes'): enums
  2. Error system ('common.error'): customized error, error codes
  3. Type system ('common.types'): Type definitions

Usage

import { common } from 'aitmed-grpc-sdk'

// types
let a: common.types.JSONString = ""

// Error
const error = common.error
const f = () => {
    throw new error.AitError("This is a test.")
}

// Codes
const etypes = common.codes.EtypeCode
const CreateUserEtype = etypes.CREATE_USER

grpc Module

grpc includes APIs to establish gRPC connections/API calls.

Usage

import { gprc } from 'aitmed-grpc-sdk'

// call v1beta1 createEdge()
import { common } from 'aitmed-grpc-sdk'
const EdgeType = common.types.Edge

let myEdge: common.types.Edge | null = null
grpc.v1beta1.createEdge(common.codes.EtypeCode.CREATE_USER, 'v1beta1', '', '', (edge, err) => {
    if (err) {
        console.log(err.getMessage())
    } else if (edge) {
        myEdge = edge
    }
})

FAQs

Last updated on 12 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc