@squidcloud/local-backend 1.0.148 → 1.0.151
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/common/src/ai-assistant.types.d.ts +50 -50
- package/dist/common/src/ai-assistant.types.js +2 -2
- package/dist/common/src/ai-chatbot.context.d.ts +13 -13
- package/dist/common/src/ai-chatbot.context.js +19 -19
- package/dist/common/src/ai-chatbot.schemas.d.ts +18 -18
- package/dist/common/src/ai-chatbot.schemas.js +21 -21
- package/dist/common/src/ai-chatbot.types.d.ts +125 -123
- package/dist/common/src/ai-chatbot.types.js +18 -18
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api-call.context.js +16 -16
- package/dist/common/src/api.types.d.ts +22 -22
- package/dist/common/src/api.types.js +2 -2
- package/dist/common/src/application.schemas.d.ts +1648 -1648
- package/dist/common/src/application.schemas.js +948 -948
- package/dist/common/src/application.types.d.ts +193 -193
- package/dist/common/src/application.types.js +89 -89
- package/dist/common/src/application.types.js.map +1 -1
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.schemas.js +11 -11
- package/dist/common/src/backend-function.types.d.ts +4 -4
- package/dist/common/src/backend-function.types.js +2 -2
- package/dist/common/src/backend-run.types.d.ts +54 -54
- package/dist/common/src/backend-run.types.js +92 -95
- package/dist/common/src/backend-run.types.js.map +1 -1
- package/dist/common/src/bundle-api.types.d.ts +65 -69
- package/dist/common/src/bundle-api.types.js +2 -2
- package/dist/common/src/bundle-data.types.d.ts +69 -74
- package/dist/common/src/bundle-data.types.js +2 -2
- package/dist/common/src/communication.types.d.ts +20 -19
- package/dist/common/src/communication.types.js +41 -40
- package/dist/common/src/communication.types.js.map +1 -1
- package/dist/common/src/context.types.d.ts +24 -24
- package/dist/common/src/context.types.js +2 -2
- package/dist/common/src/distributed-lock.context.d.ts +4 -4
- package/dist/common/src/distributed-lock.context.js +9 -9
- package/dist/common/src/document.types.d.ts +32 -32
- package/dist/common/src/document.types.js +50 -50
- package/dist/common/src/graphql.context.d.ts +14 -14
- package/dist/common/src/graphql.context.js +12 -12
- package/dist/common/src/graphql.types.d.ts +11 -11
- package/dist/common/src/graphql.types.js +34 -34
- package/dist/common/src/heartbeat.types.d.ts +4 -4
- package/dist/common/src/heartbeat.types.js +16 -16
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/http-status.enum.js +54 -54
- package/dist/common/src/http-status.enum.js.map +1 -1
- package/dist/common/src/index.d.ts +54 -57
- package/dist/common/src/index.js +70 -73
- package/dist/common/src/index.js.map +1 -1
- package/dist/common/src/integrations/ai_chatbot.types.d.ts +31 -31
- package/dist/common/src/integrations/ai_chatbot.types.js +2 -2
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/api.types.js +2 -2
- package/dist/common/src/integrations/auth.types.d.ts +39 -39
- package/dist/common/src/integrations/auth.types.js +2 -2
- package/dist/common/src/integrations/database.types.d.ts +274 -274
- package/dist/common/src/integrations/database.types.js +2 -2
- package/dist/common/src/integrations/index.d.ts +134 -134
- package/dist/common/src/integrations/index.js +119 -119
- package/dist/common/src/integrations/index.js.map +1 -1
- package/dist/common/src/integrations/observability.types.d.ts +23 -23
- package/dist/common/src/integrations/observability.types.js +23 -23
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/logger.types.js +11 -11
- package/dist/common/src/logger.types.js.map +1 -1
- package/dist/common/src/metrics.types.d.ts +73 -73
- package/dist/common/src/metrics.types.js +11 -11
- package/dist/common/src/mutation.context.d.ts +13 -13
- package/dist/common/src/mutation.context.js +26 -26
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.schemas.js +114 -114
- package/dist/common/src/mutation.types.d.ts +63 -63
- package/dist/common/src/mutation.types.js +142 -142
- package/dist/common/src/native-query.context.d.ts +7 -7
- package/dist/common/src/native-query.context.js +11 -11
- package/dist/common/src/native-query.types.d.ts +16 -16
- package/dist/common/src/native-query.types.js +2 -2
- package/dist/common/src/query/base-query-builder.d.ts +38 -38
- package/dist/common/src/query/base-query-builder.js +39 -39
- package/dist/common/src/query/index.d.ts +4 -4
- package/dist/common/src/query/index.js +20 -20
- package/dist/common/src/query/pagination.d.ts +46 -46
- package/dist/common/src/query/pagination.js +211 -211
- package/dist/common/src/query/query-context.d.ts +47 -47
- package/dist/common/src/query/query-context.js +159 -159
- package/dist/common/src/query/serialized-query.types.d.ts +24 -24
- package/dist/common/src/query/serialized-query.types.js +2 -2
- package/dist/common/src/query.types.d.ts +86 -86
- package/dist/common/src/query.types.js +97 -97
- package/dist/common/src/regions.d.ts +21 -21
- package/dist/common/src/regions.js +46 -46
- package/dist/common/src/schema/schema.types.d.ts +30 -30
- package/dist/common/src/schema/schema.types.js +173 -173
- package/dist/common/src/secret.schemas.d.ts +4 -4
- package/dist/common/src/secret.schemas.js +17 -17
- package/dist/common/src/secret.types.d.ts +68 -68
- package/dist/common/src/secret.types.js +5 -5
- package/dist/common/src/security.types.d.ts +3 -3
- package/dist/common/src/security.types.js +2 -2
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.schemas.js +57 -57
- package/dist/common/src/socket.types.d.ts +126 -126
- package/dist/common/src/socket.types.js +9 -9
- package/dist/common/src/socket.types.js.map +1 -1
- package/dist/common/src/time-units.d.ts +11 -11
- package/dist/common/src/time-units.js +14 -14
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/trigger.types.js +2 -2
- package/dist/common/src/types.d.ts +21 -21
- package/dist/common/src/types.js +2 -2
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/array.js +54 -54
- package/dist/common/src/utils/assert.d.ts +3 -3
- package/dist/common/src/utils/assert.js +14 -14
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/error.js +10 -10
- package/dist/common/src/utils/global.utils.d.ts +11 -11
- package/dist/common/src/utils/global.utils.js +50 -50
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/http.js +51 -51
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/id.js +21 -21
- package/dist/common/src/utils/lock.manager.d.ts +9 -9
- package/dist/common/src/utils/lock.manager.js +39 -39
- package/dist/common/src/utils/object.d.ts +5 -5
- package/dist/common/src/utils/object.js +75 -75
- package/dist/common/src/utils/serialization.d.ts +5 -5
- package/dist/common/src/utils/serialization.js +73 -73
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/transforms.js +104 -104
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/url.js +15 -15
- package/dist/common/src/utils/validation.d.ts +17 -17
- package/dist/common/src/utils/validation.js +199 -199
- package/dist/common/src/webhook-response.d.ts +6 -6
- package/dist/common/src/webhook-response.js +2 -2
- package/dist/common/src/websocket.impl.d.ts +21 -21
- package/dist/common/src/websocket.impl.js +79 -79
- package/dist/internal-common/src/code-executor.types.d.ts +13 -13
- package/dist/internal-common/src/code-executor.types.js +2 -2
- package/dist/internal-common/src/local-dev.types.d.ts +35 -35
- package/dist/internal-common/src/local-dev.types.js +2 -2
- package/dist/local-backend/package.json +48 -48
- package/dist/local-backend/src/index.d.ts +4 -4
- package/dist/local-backend/src/index.js +26 -26
- package/dist/local-backend/src/local-backend-socket.service.d.ts +18 -18
- package/dist/local-backend/src/local-backend-socket.service.js +107 -108
- package/dist/local-backend/src/local-backend-socket.service.js.map +1 -1
- package/dist/local-backend/src/local-backend.app.d.ts +2 -2
- package/dist/local-backend/src/local-backend.app.js +19 -19
- package/dist/local-backend/src/local-backend.controller.d.ts +8 -8
- package/dist/local-backend/src/local-backend.controller.js +48 -49
- package/dist/local-backend/src/local-backend.controller.js.map +1 -1
- package/dist/local-backend/src/local-backend.module.d.ts +8 -8
- package/dist/local-backend/src/local-backend.module.js +51 -53
- package/dist/local-backend/src/local-backend.module.js.map +1 -1
- package/dist/local-backend/src/local-backend.service.d.ts +15 -15
- package/dist/local-backend/src/local-backend.service.js +173 -176
- package/dist/local-backend/src/local-backend.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/common/src/named-query.context.d.ts +0 -4
- package/dist/common/src/named-query.context.js +0 -10
- package/dist/common/src/named-query.context.js.map +0 -1
- package/dist/common/src/named-query.schemas.d.ts +0 -3
- package/dist/common/src/named-query.schemas.js +0 -14
- package/dist/common/src/named-query.schemas.js.map +0 -1
- package/dist/common/src/named-query.types.d.ts +0 -8
- package/dist/common/src/named-query.types.js +0 -3
- package/dist/common/src/named-query.types.js.map +0 -1
- package/dist/internal-common/src/utils/logger-utils.d.ts +0 -3
- package/dist/internal-common/src/utils/logger-utils.js +0 -29
- package/dist/internal-common/src/utils/logger-utils.js.map +0 -1
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceKeyInRecord = exports.replaceKeyInMap = exports.deleteInPath = exports.setInPath = exports.getInPath = void 0;
|
|
4
|
-
const _ = require("lodash");
|
|
5
|
-
const assertic_1 = require("assertic");
|
|
6
|
-
function getInPath(obj, path, delimiter = '.') {
|
|
7
|
-
const splitPath = path.split(delimiter);
|
|
8
|
-
let value = undefined;
|
|
9
|
-
let currentObj = obj;
|
|
10
|
-
while (currentObj && splitPath.length) {
|
|
11
|
-
const key = (0, assertic_1.truthy)(splitPath.shift());
|
|
12
|
-
if (!(currentObj instanceof Object) || !(key in currentObj)) {
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
|
-
value = currentObj[key];
|
|
16
|
-
currentObj = value;
|
|
17
|
-
}
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
20
|
-
exports.getInPath = getInPath;
|
|
21
|
-
function isJsObject(obj) {
|
|
22
|
-
if (typeof obj !== 'object')
|
|
23
|
-
return false;
|
|
24
|
-
return Reflect.getPrototypeOf(obj) === Object.prototype;
|
|
25
|
-
}
|
|
26
|
-
function setInPath(obj, path, value, delimiter = '.') {
|
|
27
|
-
var _a;
|
|
28
|
-
const splitPath = path.split(delimiter);
|
|
29
|
-
let currentObj = obj;
|
|
30
|
-
while (splitPath.length) {
|
|
31
|
-
const key = (0, assertic_1.truthy)(splitPath.shift());
|
|
32
|
-
if (splitPath.length) {
|
|
33
|
-
const newCurrentObj = isJsObject(currentObj[key]) ? (_a = _.clone(currentObj[key])) !== null && _a !== void 0 ? _a : {} : {};
|
|
34
|
-
currentObj[key] = newCurrentObj;
|
|
35
|
-
currentObj = newCurrentObj;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
currentObj[key] = value;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.setInPath = setInPath;
|
|
43
|
-
function deleteInPath(obj, path, delimiter = '.') {
|
|
44
|
-
var _a;
|
|
45
|
-
const splitPath = path.split(delimiter);
|
|
46
|
-
let currentObj = obj;
|
|
47
|
-
while (splitPath.length) {
|
|
48
|
-
const key = (0, assertic_1.truthy)(splitPath.shift());
|
|
49
|
-
if (splitPath.length) {
|
|
50
|
-
const newCurrentObj = isJsObject(currentObj[key]) ? (_a = _.clone(currentObj[key])) !== null && _a !== void 0 ? _a : {} : {};
|
|
51
|
-
currentObj[key] = newCurrentObj;
|
|
52
|
-
currentObj = newCurrentObj;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
delete currentObj[key];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.deleteInPath = deleteInPath;
|
|
60
|
-
function replaceKeyInMap(map, a, b) {
|
|
61
|
-
if (map.has(a)) {
|
|
62
|
-
const value = map.get(a);
|
|
63
|
-
map.delete(a);
|
|
64
|
-
map.set(b, value);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.replaceKeyInMap = replaceKeyInMap;
|
|
68
|
-
function replaceKeyInRecord(record, a, b) {
|
|
69
|
-
const value = record[a];
|
|
70
|
-
if (typeof value !== 'undefined') {
|
|
71
|
-
record[b] = value;
|
|
72
|
-
delete record[a];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.replaceKeyInRecord = replaceKeyInRecord;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replaceKeyInRecord = exports.replaceKeyInMap = exports.deleteInPath = exports.setInPath = exports.getInPath = void 0;
|
|
4
|
+
const _ = require("lodash");
|
|
5
|
+
const assertic_1 = require("assertic");
|
|
6
|
+
function getInPath(obj, path, delimiter = '.') {
|
|
7
|
+
const splitPath = path.split(delimiter);
|
|
8
|
+
let value = undefined;
|
|
9
|
+
let currentObj = obj;
|
|
10
|
+
while (currentObj && splitPath.length) {
|
|
11
|
+
const key = (0, assertic_1.truthy)(splitPath.shift());
|
|
12
|
+
if (!(currentObj instanceof Object) || !(key in currentObj)) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
value = currentObj[key];
|
|
16
|
+
currentObj = value;
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
exports.getInPath = getInPath;
|
|
21
|
+
function isJsObject(obj) {
|
|
22
|
+
if (typeof obj !== 'object')
|
|
23
|
+
return false;
|
|
24
|
+
return Reflect.getPrototypeOf(obj) === Object.prototype;
|
|
25
|
+
}
|
|
26
|
+
function setInPath(obj, path, value, delimiter = '.') {
|
|
27
|
+
var _a;
|
|
28
|
+
const splitPath = path.split(delimiter);
|
|
29
|
+
let currentObj = obj;
|
|
30
|
+
while (splitPath.length) {
|
|
31
|
+
const key = (0, assertic_1.truthy)(splitPath.shift());
|
|
32
|
+
if (splitPath.length) {
|
|
33
|
+
const newCurrentObj = isJsObject(currentObj[key]) ? (_a = _.clone(currentObj[key])) !== null && _a !== void 0 ? _a : {} : {};
|
|
34
|
+
currentObj[key] = newCurrentObj;
|
|
35
|
+
currentObj = newCurrentObj;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
currentObj[key] = value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.setInPath = setInPath;
|
|
43
|
+
function deleteInPath(obj, path, delimiter = '.') {
|
|
44
|
+
var _a;
|
|
45
|
+
const splitPath = path.split(delimiter);
|
|
46
|
+
let currentObj = obj;
|
|
47
|
+
while (splitPath.length) {
|
|
48
|
+
const key = (0, assertic_1.truthy)(splitPath.shift());
|
|
49
|
+
if (splitPath.length) {
|
|
50
|
+
const newCurrentObj = isJsObject(currentObj[key]) ? (_a = _.clone(currentObj[key])) !== null && _a !== void 0 ? _a : {} : {};
|
|
51
|
+
currentObj[key] = newCurrentObj;
|
|
52
|
+
currentObj = newCurrentObj;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
delete currentObj[key];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.deleteInPath = deleteInPath;
|
|
60
|
+
function replaceKeyInMap(map, a, b) {
|
|
61
|
+
if (map.has(a)) {
|
|
62
|
+
const value = map.get(a);
|
|
63
|
+
map.delete(a);
|
|
64
|
+
map.set(b, value);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.replaceKeyInMap = replaceKeyInMap;
|
|
68
|
+
function replaceKeyInRecord(record, a, b) {
|
|
69
|
+
const value = record[a];
|
|
70
|
+
if (typeof value !== 'undefined') {
|
|
71
|
+
record[b] = value;
|
|
72
|
+
delete record[a];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.replaceKeyInRecord = replaceKeyInRecord;
|
|
76
76
|
//# sourceMappingURL=object.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function normalizeJsonAsString(json: any): string;
|
|
2
|
-
export declare function serializeObj(obj: unknown): string;
|
|
3
|
-
export declare function deserializeObj<T = any>(str: string): T;
|
|
4
|
-
export declare function encodeValueForMapping(value: any): string;
|
|
5
|
-
export declare function decodeValueForMapping(encodedString: string): any;
|
|
1
|
+
export declare function normalizeJsonAsString(json: any): string;
|
|
2
|
+
export declare function serializeObj(obj: unknown): string;
|
|
3
|
+
export declare function deserializeObj<T = any>(str: string): T;
|
|
4
|
+
export declare function encodeValueForMapping(value: any): string;
|
|
5
|
+
export declare function decodeValueForMapping(encodedString: string): any;
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeValueForMapping = exports.encodeValueForMapping = exports.deserializeObj = exports.serializeObj = exports.normalizeJsonAsString = void 0;
|
|
4
|
-
const _ = require("lodash");
|
|
5
|
-
function sortKeys(json) {
|
|
6
|
-
if (Array.isArray(json)) {
|
|
7
|
-
return json.map(o => sortKeys(o));
|
|
8
|
-
}
|
|
9
|
-
if (typeof json !== 'object' || json === null || json instanceof Date) {
|
|
10
|
-
return json;
|
|
11
|
-
}
|
|
12
|
-
const keys = Object.keys(json);
|
|
13
|
-
const result = {};
|
|
14
|
-
keys.sort().forEach(key => {
|
|
15
|
-
result[key] = sortKeys(json[key]);
|
|
16
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
function normalizeJsonAsString(json) {
|
|
20
|
-
return serializeObj(sortKeys(json));
|
|
21
|
-
}
|
|
22
|
-
exports.normalizeJsonAsString = normalizeJsonAsString;
|
|
23
|
-
function serializeObj(obj) {
|
|
24
|
-
if (obj === undefined)
|
|
25
|
-
return null;
|
|
26
|
-
const objWithReplacedDates = _.cloneDeepWith(obj, value => {
|
|
27
|
-
return _.isDate(value) ? { $date: value.toISOString() } : undefined;
|
|
28
|
-
});
|
|
29
|
-
return JSON.stringify(objWithReplacedDates);
|
|
30
|
-
}
|
|
31
|
-
exports.serializeObj = serializeObj;
|
|
32
|
-
function deserializeObj(str) {
|
|
33
|
-
const deserializedObj = JSON.parse(str);
|
|
34
|
-
return _.cloneDeepWith(deserializedObj, value => {
|
|
35
|
-
return _.isObject(value) && _.has(value, '$date') && Object.keys(value).length === 1
|
|
36
|
-
? new Date(value['$date'])
|
|
37
|
-
: undefined;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
exports.deserializeObj = deserializeObj;
|
|
41
|
-
function encodeValueForMapping(value) {
|
|
42
|
-
if (value === undefined)
|
|
43
|
-
throw new Error('INVALID_ENCODE_VALUE');
|
|
44
|
-
const serializedValue = serializeObj(value);
|
|
45
|
-
if (typeof Buffer !== 'undefined') {
|
|
46
|
-
return Buffer.from(serializedValue, 'utf8').toString('base64');
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
const bytes = new TextEncoder().encode(serializedValue);
|
|
50
|
-
let binary = '';
|
|
51
|
-
for (let i = 0; i < bytes.length; i++) {
|
|
52
|
-
binary += String.fromCharCode(bytes[i]);
|
|
53
|
-
}
|
|
54
|
-
return btoa(binary);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.encodeValueForMapping = encodeValueForMapping;
|
|
58
|
-
function decodeValueForMapping(encodedString) {
|
|
59
|
-
let decodedValue;
|
|
60
|
-
if (typeof Buffer !== 'undefined') {
|
|
61
|
-
decodedValue = Buffer.from(encodedString, 'base64').toString('utf8');
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
const binary = atob(encodedString);
|
|
65
|
-
const bytes = new Uint8Array(binary.length);
|
|
66
|
-
for (let i = 0; i < bytes.length; i++) {
|
|
67
|
-
bytes[i] = binary.charCodeAt(i);
|
|
68
|
-
}
|
|
69
|
-
decodedValue = new TextDecoder().decode(bytes);
|
|
70
|
-
}
|
|
71
|
-
return deserializeObj(decodedValue);
|
|
72
|
-
}
|
|
73
|
-
exports.decodeValueForMapping = decodeValueForMapping;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeValueForMapping = exports.encodeValueForMapping = exports.deserializeObj = exports.serializeObj = exports.normalizeJsonAsString = void 0;
|
|
4
|
+
const _ = require("lodash");
|
|
5
|
+
function sortKeys(json) {
|
|
6
|
+
if (Array.isArray(json)) {
|
|
7
|
+
return json.map(o => sortKeys(o));
|
|
8
|
+
}
|
|
9
|
+
if (typeof json !== 'object' || json === null || json instanceof Date) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
const keys = Object.keys(json);
|
|
13
|
+
const result = {};
|
|
14
|
+
keys.sort().forEach(key => {
|
|
15
|
+
result[key] = sortKeys(json[key]);
|
|
16
|
+
});
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
function normalizeJsonAsString(json) {
|
|
20
|
+
return serializeObj(sortKeys(json));
|
|
21
|
+
}
|
|
22
|
+
exports.normalizeJsonAsString = normalizeJsonAsString;
|
|
23
|
+
function serializeObj(obj) {
|
|
24
|
+
if (obj === undefined)
|
|
25
|
+
return null;
|
|
26
|
+
const objWithReplacedDates = _.cloneDeepWith(obj, value => {
|
|
27
|
+
return _.isDate(value) ? { $date: value.toISOString() } : undefined;
|
|
28
|
+
});
|
|
29
|
+
return JSON.stringify(objWithReplacedDates);
|
|
30
|
+
}
|
|
31
|
+
exports.serializeObj = serializeObj;
|
|
32
|
+
function deserializeObj(str) {
|
|
33
|
+
const deserializedObj = JSON.parse(str);
|
|
34
|
+
return _.cloneDeepWith(deserializedObj, value => {
|
|
35
|
+
return _.isObject(value) && _.has(value, '$date') && Object.keys(value).length === 1
|
|
36
|
+
? new Date(value['$date'])
|
|
37
|
+
: undefined;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.deserializeObj = deserializeObj;
|
|
41
|
+
function encodeValueForMapping(value) {
|
|
42
|
+
if (value === undefined)
|
|
43
|
+
throw new Error('INVALID_ENCODE_VALUE');
|
|
44
|
+
const serializedValue = serializeObj(value);
|
|
45
|
+
if (typeof Buffer !== 'undefined') {
|
|
46
|
+
return Buffer.from(serializedValue, 'utf8').toString('base64');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const bytes = new TextEncoder().encode(serializedValue);
|
|
50
|
+
let binary = '';
|
|
51
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
52
|
+
binary += String.fromCharCode(bytes[i]);
|
|
53
|
+
}
|
|
54
|
+
return btoa(binary);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.encodeValueForMapping = encodeValueForMapping;
|
|
58
|
+
function decodeValueForMapping(encodedString) {
|
|
59
|
+
let decodedValue;
|
|
60
|
+
if (typeof Buffer !== 'undefined') {
|
|
61
|
+
decodedValue = Buffer.from(encodedString, 'base64').toString('utf8');
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
const binary = atob(encodedString);
|
|
65
|
+
const bytes = new Uint8Array(binary.length);
|
|
66
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
67
|
+
bytes[i] = binary.charCodeAt(i);
|
|
68
|
+
}
|
|
69
|
+
decodedValue = new TextDecoder().decode(bytes);
|
|
70
|
+
}
|
|
71
|
+
return deserializeObj(decodedValue);
|
|
72
|
+
}
|
|
73
|
+
exports.decodeValueForMapping = decodeValueForMapping;
|
|
74
74
|
//# sourceMappingURL=serialization.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export declare function unchanged(any: any): any;
|
|
2
|
-
export declare function booleanToInt(boolean: boolean): number;
|
|
3
|
-
export declare function intToBoolean(int: number): boolean;
|
|
4
|
-
export declare function stringToNumber(string: string): number;
|
|
5
|
-
export declare function numberToString(number: number): string;
|
|
6
|
-
export declare function bufferToString(buffer: ArrayBuffer): string;
|
|
7
|
-
export declare function stringToBuffer(string: string): ArrayBuffer;
|
|
8
|
-
export declare function stringToJSON(string: string): JSON;
|
|
9
|
-
export declare function JSONToString(json: JSON): string;
|
|
10
|
-
export declare function moneyStringToNumber(money: string): number;
|
|
11
|
-
export declare function daysPastEpochToDate(days: number): Date;
|
|
12
|
-
export declare function msToDate(ms: number): Date;
|
|
13
|
-
export declare function isoStringToDate(string: string): Date;
|
|
14
|
-
export declare function base64ToString(string: string): string;
|
|
15
|
-
export declare function base64ToBinary(string: string): string;
|
|
16
|
-
export declare function kafkaConnectStringToInterval(string: string): Record<string, number>;
|
|
17
|
-
export declare function msPastMidnightToTimeString(ms: number): string;
|
|
18
|
-
export declare function dateToTimeString(date: Date): string;
|
|
1
|
+
export declare function unchanged(any: any): any;
|
|
2
|
+
export declare function booleanToInt(boolean: boolean): number;
|
|
3
|
+
export declare function intToBoolean(int: number): boolean;
|
|
4
|
+
export declare function stringToNumber(string: string): number;
|
|
5
|
+
export declare function numberToString(number: number): string;
|
|
6
|
+
export declare function bufferToString(buffer: ArrayBuffer): string;
|
|
7
|
+
export declare function stringToBuffer(string: string): ArrayBuffer;
|
|
8
|
+
export declare function stringToJSON(string: string): JSON;
|
|
9
|
+
export declare function JSONToString(json: JSON): string;
|
|
10
|
+
export declare function moneyStringToNumber(money: string): number;
|
|
11
|
+
export declare function daysPastEpochToDate(days: number): Date;
|
|
12
|
+
export declare function msToDate(ms: number): Date;
|
|
13
|
+
export declare function isoStringToDate(string: string): Date;
|
|
14
|
+
export declare function base64ToString(string: string): string;
|
|
15
|
+
export declare function base64ToBinary(string: string): string;
|
|
16
|
+
export declare function kafkaConnectStringToInterval(string: string): Record<string, number>;
|
|
17
|
+
export declare function msPastMidnightToTimeString(ms: number): string;
|
|
18
|
+
export declare function dateToTimeString(date: Date): string;
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dateToTimeString = exports.msPastMidnightToTimeString = exports.kafkaConnectStringToInterval = exports.base64ToBinary = exports.base64ToString = exports.isoStringToDate = exports.msToDate = exports.daysPastEpochToDate = exports.moneyStringToNumber = exports.JSONToString = exports.stringToJSON = exports.stringToBuffer = exports.bufferToString = exports.numberToString = exports.stringToNumber = exports.intToBoolean = exports.booleanToInt = exports.unchanged = void 0;
|
|
4
|
-
const date_fns_1 = require("date-fns");
|
|
5
|
-
function unchanged(any) {
|
|
6
|
-
return any;
|
|
7
|
-
}
|
|
8
|
-
exports.unchanged = unchanged;
|
|
9
|
-
function booleanToInt(boolean) {
|
|
10
|
-
return boolean ? 1 : 0;
|
|
11
|
-
}
|
|
12
|
-
exports.booleanToInt = booleanToInt;
|
|
13
|
-
function intToBoolean(int) {
|
|
14
|
-
return !!int;
|
|
15
|
-
}
|
|
16
|
-
exports.intToBoolean = intToBoolean;
|
|
17
|
-
function stringToNumber(string) {
|
|
18
|
-
return Number(string);
|
|
19
|
-
}
|
|
20
|
-
exports.stringToNumber = stringToNumber;
|
|
21
|
-
function numberToString(number) {
|
|
22
|
-
return number + '';
|
|
23
|
-
}
|
|
24
|
-
exports.numberToString = numberToString;
|
|
25
|
-
function bufferToString(buffer) {
|
|
26
|
-
return buffer.toString();
|
|
27
|
-
}
|
|
28
|
-
exports.bufferToString = bufferToString;
|
|
29
|
-
function stringToBuffer(string) {
|
|
30
|
-
return Buffer.from(string);
|
|
31
|
-
}
|
|
32
|
-
exports.stringToBuffer = stringToBuffer;
|
|
33
|
-
function stringToJSON(string) {
|
|
34
|
-
return JSON.parse(string);
|
|
35
|
-
}
|
|
36
|
-
exports.stringToJSON = stringToJSON;
|
|
37
|
-
function JSONToString(json) {
|
|
38
|
-
return JSON.stringify(json);
|
|
39
|
-
}
|
|
40
|
-
exports.JSONToString = JSONToString;
|
|
41
|
-
function moneyStringToNumber(money) {
|
|
42
|
-
return Number(money.replace(/[^0-9.]+/g, ''));
|
|
43
|
-
}
|
|
44
|
-
exports.moneyStringToNumber = moneyStringToNumber;
|
|
45
|
-
function daysPastEpochToDate(days) {
|
|
46
|
-
return new Date(days * 8.64e7);
|
|
47
|
-
}
|
|
48
|
-
exports.daysPastEpochToDate = daysPastEpochToDate;
|
|
49
|
-
function msToDate(ms) {
|
|
50
|
-
return new Date(ms);
|
|
51
|
-
}
|
|
52
|
-
exports.msToDate = msToDate;
|
|
53
|
-
function isoStringToDate(string) {
|
|
54
|
-
const formats = ['yyyy-MM-dd HH:mm:ss.S', "yyyy-MM-dd'T'HH:mm:ss.SSSX", "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"];
|
|
55
|
-
for (const format of formats) {
|
|
56
|
-
try {
|
|
57
|
-
const date = (0, date_fns_1.parse)(string, format, new Date());
|
|
58
|
-
if (!isNaN(date.getTime())) {
|
|
59
|
-
return date;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
throw new Error(`No known date/time format matched the input string: ${string}`);
|
|
66
|
-
}
|
|
67
|
-
exports.isoStringToDate = isoStringToDate;
|
|
68
|
-
function base64ToString(string) {
|
|
69
|
-
return atob(string);
|
|
70
|
-
}
|
|
71
|
-
exports.base64ToString = base64ToString;
|
|
72
|
-
function base64ToBinary(string) {
|
|
73
|
-
const base64String = atob(string);
|
|
74
|
-
let binaryString = '';
|
|
75
|
-
for (let i = 0; i < base64String.length; i++) {
|
|
76
|
-
binaryString += base64String[i].charCodeAt(0).toString(2);
|
|
77
|
-
}
|
|
78
|
-
return binaryString;
|
|
79
|
-
}
|
|
80
|
-
exports.base64ToBinary = base64ToBinary;
|
|
81
|
-
function kafkaConnectStringToInterval(string) {
|
|
82
|
-
const match = string.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);
|
|
83
|
-
if (!match)
|
|
84
|
-
throw new Error(`Interval string is not properly formatted: ${string}`);
|
|
85
|
-
const years = parseInt(match[1]) || 0;
|
|
86
|
-
const months = parseInt(match[2]) || 0;
|
|
87
|
-
const days = parseInt(match[3]) || 0;
|
|
88
|
-
const hours = parseInt(match[4]) || 0;
|
|
89
|
-
const minutes = parseInt(match[5]) || 0;
|
|
90
|
-
const seconds = parseInt(match[6]) || 0;
|
|
91
|
-
return { years, months, days, hours, minutes, seconds };
|
|
92
|
-
}
|
|
93
|
-
exports.kafkaConnectStringToInterval = kafkaConnectStringToInterval;
|
|
94
|
-
function msPastMidnightToTimeString(ms) {
|
|
95
|
-
return dateToTimeString(new Date(ms));
|
|
96
|
-
}
|
|
97
|
-
exports.msPastMidnightToTimeString = msPastMidnightToTimeString;
|
|
98
|
-
function dateToTimeString(date) {
|
|
99
|
-
const hours = (date.getUTCHours() + '').padStart(2, '0');
|
|
100
|
-
const minutes = (date.getUTCMinutes() + '').padStart(2, '0');
|
|
101
|
-
const seconds = (date.getUTCSeconds() + '').padStart(2, '0');
|
|
102
|
-
return `${hours}:${minutes}:${seconds}`;
|
|
103
|
-
}
|
|
104
|
-
exports.dateToTimeString = dateToTimeString;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dateToTimeString = exports.msPastMidnightToTimeString = exports.kafkaConnectStringToInterval = exports.base64ToBinary = exports.base64ToString = exports.isoStringToDate = exports.msToDate = exports.daysPastEpochToDate = exports.moneyStringToNumber = exports.JSONToString = exports.stringToJSON = exports.stringToBuffer = exports.bufferToString = exports.numberToString = exports.stringToNumber = exports.intToBoolean = exports.booleanToInt = exports.unchanged = void 0;
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
function unchanged(any) {
|
|
6
|
+
return any;
|
|
7
|
+
}
|
|
8
|
+
exports.unchanged = unchanged;
|
|
9
|
+
function booleanToInt(boolean) {
|
|
10
|
+
return boolean ? 1 : 0;
|
|
11
|
+
}
|
|
12
|
+
exports.booleanToInt = booleanToInt;
|
|
13
|
+
function intToBoolean(int) {
|
|
14
|
+
return !!int;
|
|
15
|
+
}
|
|
16
|
+
exports.intToBoolean = intToBoolean;
|
|
17
|
+
function stringToNumber(string) {
|
|
18
|
+
return Number(string);
|
|
19
|
+
}
|
|
20
|
+
exports.stringToNumber = stringToNumber;
|
|
21
|
+
function numberToString(number) {
|
|
22
|
+
return number + '';
|
|
23
|
+
}
|
|
24
|
+
exports.numberToString = numberToString;
|
|
25
|
+
function bufferToString(buffer) {
|
|
26
|
+
return buffer.toString();
|
|
27
|
+
}
|
|
28
|
+
exports.bufferToString = bufferToString;
|
|
29
|
+
function stringToBuffer(string) {
|
|
30
|
+
return Buffer.from(string);
|
|
31
|
+
}
|
|
32
|
+
exports.stringToBuffer = stringToBuffer;
|
|
33
|
+
function stringToJSON(string) {
|
|
34
|
+
return JSON.parse(string);
|
|
35
|
+
}
|
|
36
|
+
exports.stringToJSON = stringToJSON;
|
|
37
|
+
function JSONToString(json) {
|
|
38
|
+
return JSON.stringify(json);
|
|
39
|
+
}
|
|
40
|
+
exports.JSONToString = JSONToString;
|
|
41
|
+
function moneyStringToNumber(money) {
|
|
42
|
+
return Number(money.replace(/[^0-9.]+/g, ''));
|
|
43
|
+
}
|
|
44
|
+
exports.moneyStringToNumber = moneyStringToNumber;
|
|
45
|
+
function daysPastEpochToDate(days) {
|
|
46
|
+
return new Date(days * 8.64e7);
|
|
47
|
+
}
|
|
48
|
+
exports.daysPastEpochToDate = daysPastEpochToDate;
|
|
49
|
+
function msToDate(ms) {
|
|
50
|
+
return new Date(ms);
|
|
51
|
+
}
|
|
52
|
+
exports.msToDate = msToDate;
|
|
53
|
+
function isoStringToDate(string) {
|
|
54
|
+
const formats = ['yyyy-MM-dd HH:mm:ss.S', "yyyy-MM-dd'T'HH:mm:ss.SSSX", "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"];
|
|
55
|
+
for (const format of formats) {
|
|
56
|
+
try {
|
|
57
|
+
const date = (0, date_fns_1.parse)(string, format, new Date());
|
|
58
|
+
if (!isNaN(date.getTime())) {
|
|
59
|
+
return date;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
throw new Error(`No known date/time format matched the input string: ${string}`);
|
|
66
|
+
}
|
|
67
|
+
exports.isoStringToDate = isoStringToDate;
|
|
68
|
+
function base64ToString(string) {
|
|
69
|
+
return atob(string);
|
|
70
|
+
}
|
|
71
|
+
exports.base64ToString = base64ToString;
|
|
72
|
+
function base64ToBinary(string) {
|
|
73
|
+
const base64String = atob(string);
|
|
74
|
+
let binaryString = '';
|
|
75
|
+
for (let i = 0; i < base64String.length; i++) {
|
|
76
|
+
binaryString += base64String[i].charCodeAt(0).toString(2);
|
|
77
|
+
}
|
|
78
|
+
return binaryString;
|
|
79
|
+
}
|
|
80
|
+
exports.base64ToBinary = base64ToBinary;
|
|
81
|
+
function kafkaConnectStringToInterval(string) {
|
|
82
|
+
const match = string.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);
|
|
83
|
+
if (!match)
|
|
84
|
+
throw new Error(`Interval string is not properly formatted: ${string}`);
|
|
85
|
+
const years = parseInt(match[1]) || 0;
|
|
86
|
+
const months = parseInt(match[2]) || 0;
|
|
87
|
+
const days = parseInt(match[3]) || 0;
|
|
88
|
+
const hours = parseInt(match[4]) || 0;
|
|
89
|
+
const minutes = parseInt(match[5]) || 0;
|
|
90
|
+
const seconds = parseInt(match[6]) || 0;
|
|
91
|
+
return { years, months, days, hours, minutes, seconds };
|
|
92
|
+
}
|
|
93
|
+
exports.kafkaConnectStringToInterval = kafkaConnectStringToInterval;
|
|
94
|
+
function msPastMidnightToTimeString(ms) {
|
|
95
|
+
return dateToTimeString(new Date(ms));
|
|
96
|
+
}
|
|
97
|
+
exports.msPastMidnightToTimeString = msPastMidnightToTimeString;
|
|
98
|
+
function dateToTimeString(date) {
|
|
99
|
+
const hours = (date.getUTCHours() + '').padStart(2, '0');
|
|
100
|
+
const minutes = (date.getUTCMinutes() + '').padStart(2, '0');
|
|
101
|
+
const seconds = (date.getUTCSeconds() + '').padStart(2, '0');
|
|
102
|
+
return `${hours}:${minutes}:${seconds}`;
|
|
103
|
+
}
|
|
104
|
+
exports.dateToTimeString = dateToTimeString;
|
|
105
105
|
//# sourceMappingURL=transforms.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function appendQueryParams(url: string, queryParams: Record<string, any>): string;
|
|
1
|
+
export declare function appendQueryParams(url: string, queryParams: Record<string, any>): string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendQueryParams = void 0;
|
|
4
|
-
function appendQueryParams(url, queryParams) {
|
|
5
|
-
const urlObj = new URL(url);
|
|
6
|
-
const searchParams = new URLSearchParams(urlObj.search);
|
|
7
|
-
for (const key in queryParams) {
|
|
8
|
-
if (queryParams.hasOwnProperty(key)) {
|
|
9
|
-
searchParams.set(key, queryParams[key]);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
urlObj.search = searchParams.toString();
|
|
13
|
-
return urlObj.toString();
|
|
14
|
-
}
|
|
15
|
-
exports.appendQueryParams = appendQueryParams;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appendQueryParams = void 0;
|
|
4
|
+
function appendQueryParams(url, queryParams) {
|
|
5
|
+
const urlObj = new URL(url);
|
|
6
|
+
const searchParams = new URLSearchParams(urlObj.search);
|
|
7
|
+
for (const key in queryParams) {
|
|
8
|
+
if (queryParams.hasOwnProperty(key)) {
|
|
9
|
+
searchParams.set(key, queryParams[key]);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
urlObj.search = searchParams.toString();
|
|
13
|
+
return urlObj.toString();
|
|
14
|
+
}
|
|
15
|
+
exports.appendQueryParams = appendQueryParams;
|
|
16
16
|
//# sourceMappingURL=url.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { OpenIdProvider } from '../application.types';
|
|
2
|
-
import { HttpStatus } from '../http-status.enum';
|
|
3
|
-
export type StatusCode = HttpStatus.BAD_REQUEST | HttpStatus.NOT_FOUND | HttpStatus.FORBIDDEN | HttpStatus.UNAUTHORIZED | HttpStatus.CONFLICT;
|
|
4
|
-
export declare class ValidationError extends Error {
|
|
5
|
-
readonly statusCode: StatusCode;
|
|
6
|
-
readonly details?: any;
|
|
7
|
-
constructor(error: string, statusCode: StatusCode, details?: Record<string, any>);
|
|
8
|
-
}
|
|
9
|
-
export declare function validateFieldSort(fieldSort: any): void;
|
|
10
|
-
export declare function validateOpenIdProvider(openIdProvider: OpenIdProvider | undefined): OpenIdProvider;
|
|
11
|
-
export declare function validateOpenIdProviderType(providerType: any): void;
|
|
12
|
-
export declare function validateMutations(mutations: any): void;
|
|
13
|
-
export declare function validateQueryLimit(limit: any): void;
|
|
14
|
-
export declare function isNotEmpty(value: string | undefined | null): value is string;
|
|
15
|
-
export type JavascriptTypeName = 'undefined' | 'object' | 'boolean' | 'number' | 'bigint' | 'string' | 'symbol' | 'function';
|
|
16
|
-
export declare function isRightType(value: unknown, type: JavascriptTypeName): boolean;
|
|
17
|
-
export declare function hasOnlyKeys(obj: object, keys: string[]): boolean;
|
|
1
|
+
import { OpenIdProvider } from '../application.types';
|
|
2
|
+
import { HttpStatus } from '../http-status.enum';
|
|
3
|
+
export type StatusCode = HttpStatus.BAD_REQUEST | HttpStatus.NOT_FOUND | HttpStatus.FORBIDDEN | HttpStatus.UNAUTHORIZED | HttpStatus.CONFLICT;
|
|
4
|
+
export declare class ValidationError extends Error {
|
|
5
|
+
readonly statusCode: StatusCode;
|
|
6
|
+
readonly details?: any;
|
|
7
|
+
constructor(error: string, statusCode: StatusCode, details?: Record<string, any>);
|
|
8
|
+
}
|
|
9
|
+
export declare function validateFieldSort(fieldSort: any): void;
|
|
10
|
+
export declare function validateOpenIdProvider(openIdProvider: OpenIdProvider | undefined): OpenIdProvider;
|
|
11
|
+
export declare function validateOpenIdProviderType(providerType: any): void;
|
|
12
|
+
export declare function validateMutations(mutations: any): void;
|
|
13
|
+
export declare function validateQueryLimit(limit: any): void;
|
|
14
|
+
export declare function isNotEmpty(value: string | undefined | null): value is string;
|
|
15
|
+
export type JavascriptTypeName = 'undefined' | 'object' | 'boolean' | 'number' | 'bigint' | 'string' | 'symbol' | 'function';
|
|
16
|
+
export declare function isRightType(value: unknown, type: JavascriptTypeName): boolean;
|
|
17
|
+
export declare function hasOnlyKeys(obj: object, keys: string[]): boolean;
|