# crm-prototypes

> - Package name: crm-prototypes - Install:

Latest version **1.1.3** (published 2024-01-02) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install crm-prototypes
pnpm add crm-prototypes
yarn add crm-prototypes
bun add crm-prototypes
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2024-01-02 |
| First published | 2023-12-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 261.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | htvan, hoaian412003 |

## Links

- npm: https://www.npmjs.com/package/crm-prototypes
- npm.io page: https://npm.io/package/crm-prototypes

## Dependencies (2)

- [protobufjs](https://npm.io/package/protobufjs.md) ^7.2.5
- [typescript](https://npm.io/package/typescript.md) ^5.3.2

## Recent versions

- 1.1.3 (latest) — 2024-01-02
- 1.1.2 — 2023-12-13
- 1.1.1 — 2023-12-13
- 1.1.0 — 2023-12-12
- 1.0.9 — 2023-12-06
- 1.0.8 — 2023-12-06
- 1.0.7 — 2023-12-06
- 1.0.6 — 2023-12-04
- 1.0.5 — 2023-12-04
- 1.0.4 — 2023-12-04
- 1.0.3 — 2023-12-04
- 1.0.2 — 2023-12-04
- 1.0.1 — 2023-12-04
- 1.0.0 — 2023-12-02

## README

## Prototypes for workflow

- Package name: crm-prototypes
- Install:

```bash
yarn add crm-prototypes
```

#### Build protobuf to ts:

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

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

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

#### Service

##### GRPC Config:

```typescript
// 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

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

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

---
_Source: https://npm.io/package/crm-prototypes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
