@candesk/contracts 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export * from './telegram.constants';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./telegram.constants"), exports);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * How long a Telegram login waits to be finished in the bot: auth-service keeps
3
+ * the login session, gateway the poll cookie and bot-service the chat session.
4
+ */
5
+ export declare const TELEGRAM_SESSION_TTL_SECONDS: number;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TELEGRAM_SESSION_TTL_SECONDS = void 0;
4
+ /**
5
+ * How long a Telegram login waits to be finished in the bot: auth-service keeps
6
+ * the login session, gateway the poll cookie and bot-service the chat session.
7
+ */
8
+ exports.TELEGRAM_SESSION_TTL_SECONDS = 5 * 60;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export * from './constants';
1
2
  export * from './proto';
2
3
  export * from './events';
package/dist/index.js CHANGED
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constants"), exports);
17
18
  __exportStar(require("./proto"), exports);
18
19
  __exportStar(require("./events"), exports);
@@ -1 +1,2 @@
1
+ export * from './loader-options';
1
2
  export * from './paths';
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./loader-options"), exports);
17
18
  __exportStar(require("./paths"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * proto-loader options for every gRPC server and client. Runtime values must match
3
+ * the generated types: enums stay numeric, int64 comes as a string (`forceLong=string`).
4
+ */
5
+ export declare const PROTO_LOADER_OPTIONS: {
6
+ readonly longs: StringConstructor;
7
+ readonly defaults: true;
8
+ readonly oneofs: true;
9
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PROTO_LOADER_OPTIONS = void 0;
4
+ /**
5
+ * proto-loader options for every gRPC server and client. Runtime values must match
6
+ * the generated types: enums stay numeric, int64 comes as a string (`forceLong=string`).
7
+ */
8
+ exports.PROTO_LOADER_OPTIONS = {
9
+ longs: String,
10
+ defaults: true,
11
+ oneofs: true
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Protobuf contracts for Candesk microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "scripts": {
22
22
  "build": "tsc -p tsconfig.build.json",
23
23
  "generate": "yarn generate:types && yarn generate:nest",
24
- "generate:types": "node -e \"require('fs').mkdirSync('src/gen',{recursive:true})\" && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen --ts_proto_opt=onlyTypes=true,package=omit,lowerCaseServiceMethods=true",
25
- "generate:nest": "node -e \"require('fs').mkdirSync('src/nest',{recursive:true})\" && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/nest --ts_proto_opt=nestJs=true,package=omit",
24
+ "generate:types": "node -e \"require('fs').mkdirSync('src/gen',{recursive:true})\" && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen --ts_proto_opt=onlyTypes=true,package=omit,lowerCaseServiceMethods=true,forceLong=string",
25
+ "generate:nest": "node -e \"require('fs').mkdirSync('src/nest',{recursive:true})\" && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/nest --ts_proto_opt=nestJs=true,package=omit,forceLong=string",
26
26
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\""
27
27
  },
28
28
  "files": [