This package has been deprecated

Author message:

this package has been deprecated

@aitmed/aitmed-grpc-sdk-test
TypeScript icon, indicating that this package has built-in type declarations

0.4.5 • Public • Published

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
    }
})

Dependencies (11)

Dev Dependencies (40)

Package Sidebar

Install

npm i @aitmed/aitmed-grpc-sdk-test

Weekly Downloads

39

Version

0.4.5

License

ISC

Unpacked Size

5.47 MB

Total Files

29

Last publish

Collaborators

  • atslotus
  • dazhoutong
  • yongjian.yu
  • chenchen.xu
  • pfftdammitchris2
  • pfftdammitchris
  • blairgao