@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.
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +17 -0
- package/dist/constants/telegram.constants.d.ts +5 -0
- package/dist/constants/telegram.constants.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/proto/index.d.ts +1 -0
- package/dist/proto/index.js +1 -0
- package/dist/proto/loader-options.d.ts +9 -0
- package/dist/proto/loader-options.js +12 -0
- package/package.json +3 -3
|
@@ -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,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
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);
|
package/dist/proto/index.d.ts
CHANGED
package/dist/proto/index.js
CHANGED
|
@@ -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.
|
|
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": [
|