1.1.3 • Published 4 months ago

crm-prototypes v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

Prototypes for workflow

  • Package name: crm-prototypes
  • Install:
yarn add crm-prototypes

Build protobuf to ts:

# Clearly
source run.sh
# Easier
./run.sh
# Don't have permission?
chmod +x run.sh

Formatter common type for dev and format response, observable ..

import Response from "crm-prototypes"; // Example

Service

GRPC Config:
// Server
app.connectMicroservice<MicroserviceOptions>({
  transport: Transport.GRPC,
  options: {
    url: process.env.NODE_ENV !== "local" ? "0.0.0.0:50051" : "localhost:5000",
    package: ["<package_name>"],
    protoPath: ["node_modules/crm-prototypes/interfaces/<package_name>.proto"],
    maxReceiveMessageLength: 1024 * 1024 * 1024,
    maxSendMessageLength: 1024 * 1024 * 1024,
  },
});
// Client
@Client({
    transport: Transport.GRPC,
    options: {
      url: process.env.<GRPC_ENV>,
      package: '<package_name>',
      protoPath: 'node_modules/crm-prototypes/interfaces/<package_name>.proto',
      maxReceiveMessageLength: 1024 * 1024 * 1024,
      maxSendMessageLength: 1024 * 1024 * 1024,
    },
  })
private client: ClientGrpc;

Type script

// Define package
export * as Storage from "./gen/ts/interfaces/storage";

import Storage from "crm-prototypes"; // replace with your define
// Example type:
Storage.IStorageController;
1.1.3

4 months ago

1.1.1

5 months ago

1.1.2

5 months ago

1.1.0

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago