@alwaysai/device-agent-schemas 2.0.3 → 2.1.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/lib/app-action-schema.d.ts +14 -14
- package/lib/app-action-schema.d.ts.map +1 -1
- package/lib/app-logs-schema.d.ts +2 -2
- package/lib/app-logs-schema.d.ts.map +1 -1
- package/lib/app-state-schema.d.ts +2 -2
- package/lib/app-state-schema.d.ts.map +1 -1
- package/lib/constants.d.ts +16 -10
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +10 -6
- package/lib/constants.js.map +1 -1
- package/lib/constants.test.js +10 -7
- package/lib/constants.test.js.map +1 -1
- package/lib/device-agent-action-schema.d.ts +2 -2
- package/lib/device-agent-action-schema.d.ts.map +1 -1
- package/lib/device-stats-schema.d.ts +2 -2
- package/lib/device-stats-schema.d.ts.map +1 -1
- package/lib/device-stats-schema.js +1 -1
- package/lib/device-stats-schema.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -6
- package/lib/index.js.map +1 -1
- package/lib/schemas/{app-install-cloud-response-schema.json → app-install-response-schema.json} +4 -4
- package/lib/schemas/{models-install-cloud-response-schema.json → models-install-response-schema.json} +4 -4
- package/lib/schemas/status-response-schema.json +6 -13
- package/lib/schemas/{client-message-schema.json → to-client-message-schema.json} +5 -24
- package/lib/schemas/to-cloud-message-schema.json +56 -0
- package/lib/schemas/{device-agent-message-schema.json → to-device-agent-message-schema.json} +10 -10
- package/lib/signed-urls-request-schema.d.ts +2 -2
- package/lib/signed-urls-request-schema.d.ts.map +1 -1
- package/lib/status-response-schema.d.ts +2 -2
- package/lib/status-response-schema.d.ts.map +1 -1
- package/lib/types.d.ts +21 -12
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +18 -16
- package/lib/types.js.map +1 -1
- package/lib/types.test.js +139 -68
- package/lib/types.test.js.map +1 -1
- package/package.json +1 -1
- package/src/app-action-schema.ts +15 -15
- package/src/app-logs-schema.ts +2 -2
- package/src/app-state-schema.ts +2 -2
- package/src/constants.test.ts +11 -7
- package/src/constants.ts +19 -11
- package/src/device-agent-action-schema.ts +2 -2
- package/src/device-stats-schema.ts +3 -3
- package/src/index.ts +41 -31
- package/src/schemas/{app-install-cloud-response-schema.json → app-install-response-schema.json} +4 -4
- package/src/schemas/{models-install-cloud-response-schema.json → models-install-response-schema.json} +4 -4
- package/src/schemas/status-response-schema.json +6 -13
- package/src/schemas/{client-message-schema.json → to-client-message-schema.json} +5 -24
- package/src/schemas/to-cloud-message-schema.json +56 -0
- package/src/schemas/{device-agent-message-schema.json → to-device-agent-message-schema.json} +10 -10
- package/src/signed-urls-request-schema.ts +2 -2
- package/src/status-response-schema.ts +2 -2
- package/src/types.test.ts +160 -75
- package/src/types.ts +50 -35
package/lib/schemas/{device-agent-message-schema.json → to-device-agent-message-schema.json}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://alwaysai.co/device-agent-message-schema.json",
|
|
2
|
+
"$id": "https://alwaysai.co/to-device-agent-message-schema.json",
|
|
3
3
|
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
4
|
-
"title": "
|
|
4
|
+
"title": "to_device_agent_message",
|
|
5
5
|
"description": "A schema that describes the message payload structure for messages sent from clients to device agent",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"enum": [
|
|
15
15
|
"app_state_control",
|
|
16
16
|
"app_version_control",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"app_install_response",
|
|
18
|
+
"models_install_response",
|
|
19
19
|
"live_state_updates"
|
|
20
20
|
]
|
|
21
21
|
},
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"oneOf": [
|
|
27
27
|
{ "$ref": "https://alwaysai.co/app-state-control-schema.json" },
|
|
28
28
|
{ "$ref": "https://alwaysai.co/app-version-control-schema.json" },
|
|
29
|
-
{ "$ref": "https://alwaysai.co/app-install-
|
|
30
|
-
{ "$ref": "https://alwaysai.co/models-install-
|
|
29
|
+
{ "$ref": "https://alwaysai.co/app-install-response-schema.json" },
|
|
30
|
+
{ "$ref": "https://alwaysai.co/models-install-response-schema.json" },
|
|
31
31
|
{ "$ref": "https://alwaysai.co/live-updates-toggle-schema.json" }
|
|
32
32
|
]
|
|
33
33
|
}
|
|
@@ -60,24 +60,24 @@
|
|
|
60
60
|
{
|
|
61
61
|
"if": {
|
|
62
62
|
"properties": {
|
|
63
|
-
"messageType": { "const": "
|
|
63
|
+
"messageType": { "const": "app_install_response" }
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"then": {
|
|
67
67
|
"properties": {
|
|
68
|
-
"payload": { "$ref": "https://alwaysai.co/app-install-
|
|
68
|
+
"payload": { "$ref": "https://alwaysai.co/app-install-response-schema.json" }
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"if": {
|
|
74
74
|
"properties": {
|
|
75
|
-
"messageType": { "const": "
|
|
75
|
+
"messageType": { "const": "models_install_response" }
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"then": {
|
|
79
79
|
"properties": {
|
|
80
|
-
"payload": { "$ref": "https://alwaysai.co/models-install-
|
|
80
|
+
"payload": { "$ref": "https://alwaysai.co/models-install-response-schema.json" }
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SignedUrlsRequestMessageType } from './constants';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseToClientMessage } from './types';
|
|
3
3
|
declare type ModelsObject = {
|
|
4
4
|
[modelId: string]: number;
|
|
5
5
|
};
|
|
@@ -13,7 +13,7 @@ export interface SignedUrlsRequestPayload {
|
|
|
13
13
|
models: ModelsObject;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
export interface SignedUrlsRequestMessage extends
|
|
16
|
+
export interface SignedUrlsRequestMessage extends BaseToClientMessage {
|
|
17
17
|
messageType: SignedUrlsRequestMessageType;
|
|
18
18
|
payload: SignedUrlsRequestPayload;
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signed-urls-request-schema.d.ts","sourceRoot":"","sources":["../src/signed-urls-request-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"signed-urls-request-schema.d.ts","sourceRoot":"","sources":["../src/signed-urls-request-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAK,YAAY,GAAG;IAClB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,iBAAiB,CAAC,EAAE;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,qBAAqB,CAAC,EAAE;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,YAAY,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,WAAW,EAAE,4BAA4B,CAAC;IAC1C,OAAO,EAAE,wBAAwB,CAAC;CACnC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StatusResponseMessageType, StatusResponseValue } from './constants';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseToClientMessage } from './types';
|
|
3
3
|
export interface StatusResponsePayload {
|
|
4
4
|
status: StatusResponseValue;
|
|
5
5
|
message?: string;
|
|
6
6
|
}
|
|
7
|
-
export interface StatusResponseMessage extends
|
|
7
|
+
export interface StatusResponseMessage extends BaseToClientMessage {
|
|
8
8
|
messageType: StatusResponseMessageType;
|
|
9
9
|
payload: StatusResponsePayload;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-response-schema.d.ts","sourceRoot":"","sources":["../src/status-response-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"status-response-schema.d.ts","sourceRoot":"","sources":["../src/status-response-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,WAAW,EAAE,yBAAyB,CAAC;IACvC,OAAO,EAAE,qBAAqB,CAAC;CAChC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import { AppLogsMessage, AppLogsPayload } from './app-logs-schema';
|
|
2
|
-
import {
|
|
2
|
+
import { AppInstallResponseMessage, AppInstallResponsePayload, AppStateControlMessage, AppStateControlPayload, AppVersionControlInstallPayload, AppVersionControlMessage, AppVersionControlUninstallPayload, ModelsInstallResponseMessage, ModelsInstallResponsePayload } from './app-action-schema';
|
|
3
3
|
import { LiveStateUpdatesToggleMessage, LiveStateUpdatesTogglePayload } from './device-agent-action-schema';
|
|
4
4
|
import { StatusResponseMessage, StatusResponsePayload } from './status-response-schema';
|
|
5
5
|
import { AppStateMessage, AppStatePayload } from './app-state-schema';
|
|
6
6
|
import { SignedUrlsRequestMessage, SignedUrlsRequestPayload } from './signed-urls-request-schema';
|
|
7
7
|
import { DeviceStatsMessage, DeviceStatsPayload } from './device-stats-schema';
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export interface
|
|
8
|
+
export declare const getToClientTopic: (deviceUuid: string, deviceType?: string) => string;
|
|
9
|
+
export declare const getToCloudTopic: (deviceUuid: string, deviceType?: string) => string;
|
|
10
|
+
export declare const getToDeviceTopic: (deviceUuid: string, deviceType?: string) => string;
|
|
11
|
+
export interface BaseToClientMessage {
|
|
12
12
|
deviceId: string;
|
|
13
13
|
timestamp: string;
|
|
14
14
|
topic?: string;
|
|
15
15
|
txId: string;
|
|
16
16
|
}
|
|
17
|
-
export declare type
|
|
18
|
-
export declare type
|
|
19
|
-
export declare const
|
|
20
|
-
export interface
|
|
17
|
+
export declare type ToClientMessage = AppLogsMessage | StatusResponseMessage | AppStateMessage | DeviceStatsMessage;
|
|
18
|
+
export declare type ToClientMessagePayload = AppLogsPayload | AppStatePayload | DeviceStatsPayload | StatusResponsePayload;
|
|
19
|
+
export declare const validateToClientMessage: import("ajv/dist/types").ValidateFunction<BaseToClientMessage>;
|
|
20
|
+
export interface BaseToCloudMessage {
|
|
21
|
+
deviceId: string;
|
|
22
|
+
timestamp: string;
|
|
23
|
+
topic?: string;
|
|
24
|
+
txId: string;
|
|
25
|
+
}
|
|
26
|
+
export declare type ToCloudMessage = SignedUrlsRequestMessage;
|
|
27
|
+
export declare type ToCloudMessagePayload = SignedUrlsRequestPayload;
|
|
28
|
+
export declare const validateToCloudMessage: import("ajv/dist/types").ValidateFunction<BaseToCloudMessage>;
|
|
29
|
+
export interface BaseToDeviceAgentMessage {
|
|
21
30
|
timestamp: string;
|
|
22
31
|
topic?: string;
|
|
23
32
|
txId: string;
|
|
24
33
|
}
|
|
25
|
-
export declare type
|
|
26
|
-
export declare type
|
|
27
|
-
export declare const
|
|
34
|
+
export declare type ToDeviceAgentMessage = AppStateControlMessage | AppVersionControlMessage | LiveStateUpdatesToggleMessage | StatusResponseMessage | AppInstallResponseMessage | ModelsInstallResponseMessage;
|
|
35
|
+
export declare type ToDeviceAgentMessagePayload = AppStateControlPayload | AppVersionControlInstallPayload | AppVersionControlUninstallPayload | LiveStateUpdatesTogglePayload | StatusResponsePayload | AppInstallResponsePayload | ModelsInstallResponsePayload;
|
|
36
|
+
export declare const validateToDeviceAgentMessage: import("ajv/dist/types").ValidateFunction<ToDeviceAgentMessage>;
|
|
28
37
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,iCAAiC,EACjC,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAS/E,eAAO,MAAM,gBAAgB,eAAgB,MAAM,eAAc,MAAM,WACjB,CAAC;AAEvD,eAAO,MAAM,eAAe,eAAgB,MAAM,eAAc,MAAM,WACjB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,eAAgB,MAAM,eAAc,MAAM,WACjB,CAAC;AAMvD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,eAAe,GACvB,cAAc,GACd,qBAAqB,GACrB,eAAe,GACf,kBAAkB,CAAC;AAEvB,oBAAY,sBAAsB,GAC9B,cAAc,GACd,eAAe,GACf,kBAAkB,GAClB,qBAAqB,CAAC;AAO1B,eAAO,MAAM,uBAAuB,gEACqB,CAAC;AAM1D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,cAAc,GAAG,wBAAwB,CAAC;AAEtD,oBAAY,qBAAqB,GAAG,wBAAwB,CAAC;AAG7D,eAAO,MAAM,sBAAsB,+DACoB,CAAC;AAMxD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,oBAAoB,GAC5B,sBAAsB,GACtB,wBAAwB,GACxB,6BAA6B,GAC7B,qBAAqB,GACrB,yBAAyB,GACzB,4BAA4B,CAAC;AAEjC,oBAAY,2BAA2B,GACnC,sBAAsB,GACtB,+BAA+B,GAC/B,iCAAiC,GACjC,6BAA6B,GAC7B,qBAAqB,GACrB,yBAAyB,GACzB,4BAA4B,CAAC;AAWjC,eAAO,MAAM,4BAA4B,iEAExC,CAAC"}
|
package/lib/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateToDeviceAgentMessage = exports.validateToCloudMessage = exports.validateToClientMessage = exports.getToDeviceTopic = exports.getToCloudTopic = exports.getToClientTopic = void 0;
|
|
4
4
|
const _2019_1 = require("ajv/dist/2019");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
const commonSchema = require("./schemas/common-schema.json");
|
|
@@ -9,15 +9,16 @@ const appStateSchema = require("./schemas/app-state-schema.json");
|
|
|
9
9
|
const appLogsSchema = require("./schemas/app-logs-schema.json");
|
|
10
10
|
const statusResponseSchema = require("./schemas/status-response-schema.json");
|
|
11
11
|
const signedUrlsRequestSchema = require("./schemas/signed-urls-request-schema.json");
|
|
12
|
-
const
|
|
12
|
+
const toDeviceAgentMessageSchema = require("./schemas/to-device-agent-message-schema.json");
|
|
13
13
|
const modelsInstallPayloadSchema = require("./schemas/models-install-payload-schema.json");
|
|
14
14
|
const appInstallSchema = require("./schemas/app-install-schema.json");
|
|
15
15
|
const appUninstallSchema = require("./schemas/app-uninstall-schema.json");
|
|
16
|
-
const
|
|
16
|
+
const toClientMessageSchema = require("./schemas/to-client-message-schema.json");
|
|
17
|
+
const toCloudMessageSchema = require("./schemas/to-cloud-message-schema.json");
|
|
17
18
|
const appStateControlSchema = require("./schemas/app-state-control-schema.json");
|
|
18
19
|
const appVersionControlSchema = require("./schemas/app-version-control-schema.json");
|
|
19
|
-
const
|
|
20
|
-
const
|
|
20
|
+
const appInstallResponseSchema = require("./schemas/app-install-response-schema.json");
|
|
21
|
+
const modelsInstallResponseSchema = require("./schemas/models-install-response-schema.json");
|
|
21
22
|
const liveUpdatesTogglesSchema = require("./schemas/live-updates-toggle-schema.json");
|
|
22
23
|
// Note: the other schemas do not need to be added, because they will
|
|
23
24
|
// automatically be added in the compile step due to $ref usage (and $id lookup)
|
|
@@ -25,26 +26,27 @@ const ajv = new _2019_1.default({
|
|
|
25
26
|
allErrors: true,
|
|
26
27
|
schemas: [commonSchema],
|
|
27
28
|
});
|
|
28
|
-
const
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
31
|
-
exports.
|
|
32
|
-
const
|
|
33
|
-
exports.
|
|
29
|
+
const getToClientTopic = (deviceUuid, deviceType = constants_1.DEVICE_TYPE) => `${constants_1.CLIENT_TOPIC_PREFIX}/${deviceType}/${deviceUuid}`;
|
|
30
|
+
exports.getToClientTopic = getToClientTopic;
|
|
31
|
+
const getToCloudTopic = (deviceUuid, deviceType = constants_1.DEVICE_TYPE) => `${constants_1.CLOUD_TOPIC_PREFIX}/${deviceType}/${deviceUuid}`;
|
|
32
|
+
exports.getToCloudTopic = getToCloudTopic;
|
|
33
|
+
const getToDeviceTopic = (deviceUuid, deviceType = constants_1.DEVICE_TYPE) => `${constants_1.DEVICE_TOPIC_PREFIX}/${deviceType}/${deviceUuid}`;
|
|
34
|
+
exports.getToDeviceTopic = getToDeviceTopic;
|
|
34
35
|
ajv.addSchema(deviceStatsSchema, 'device-stats-schema.json');
|
|
35
36
|
ajv.addSchema(appStateSchema, 'app-state-schema.json');
|
|
36
37
|
ajv.addSchema(appLogsSchema, 'app-logs-schema.json');
|
|
37
38
|
ajv.addSchema(statusResponseSchema, 'status-response-schema.json');
|
|
39
|
+
ajv.addSchema(toClientMessageSchema, 'to-client-message-schema.json');
|
|
40
|
+
exports.validateToClientMessage = ajv.compile(toClientMessageSchema);
|
|
38
41
|
ajv.addSchema(signedUrlsRequestSchema, 'signed-urls-request-schema.json');
|
|
39
|
-
ajv.
|
|
40
|
-
exports.validateClientMessage = ajv.compile(clientMessageSchema);
|
|
42
|
+
exports.validateToCloudMessage = ajv.compile(toCloudMessageSchema);
|
|
41
43
|
ajv.addSchema(modelsInstallPayloadSchema, 'models-install-payload-schema.json');
|
|
42
44
|
ajv.addSchema(appInstallSchema, 'app-install-schema.json');
|
|
43
45
|
ajv.addSchema(appUninstallSchema, 'app-uninstall-schema.json');
|
|
44
46
|
ajv.addSchema(appStateControlSchema, 'app-state-control-schema.json');
|
|
45
47
|
ajv.addSchema(appVersionControlSchema, 'app-version-control-schema.json');
|
|
46
|
-
ajv.addSchema(
|
|
47
|
-
ajv.addSchema(
|
|
48
|
+
ajv.addSchema(appInstallResponseSchema, 'app-install-response-schema.json');
|
|
49
|
+
ajv.addSchema(modelsInstallResponseSchema, 'models-install-response-schema.json');
|
|
48
50
|
ajv.addSchema(liveUpdatesTogglesSchema, 'live-updates-toggle-schema.json');
|
|
49
|
-
exports.
|
|
51
|
+
exports.validateToDeviceAgentMessage = ajv.compile(toDeviceAgentMessageSchema);
|
|
50
52
|
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,2CAKqB;AACrB,6DAA6D;AAC7D,wEAAwE;AACxE,kEAAkE;AAClE,gEAAgE;AAChE,8EAA8E;AAC9E,qFAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,2CAKqB;AACrB,6DAA6D;AAC7D,wEAAwE;AACxE,kEAAkE;AAClE,gEAAgE;AAChE,8EAA8E;AAC9E,qFAAqF;AACrF,4FAA4F;AAC5F,2FAA2F;AAC3F,sEAAsE;AACtE,0EAA0E;AAC1E,iFAAiF;AACjF,+EAA+E;AAC/E,iFAAiF;AACjF,qFAAqF;AACrF,uFAAuF;AACvF,6FAA6F;AAC7F,sFAAsF;AAyBtF,qEAAqE;AACrE,gFAAgF;AAChF,MAAM,GAAG,GAAG,IAAI,eAAO,CAAC;IACtB,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,CAAC,YAAY,CAAC;CACxB,CAAC,CAAC;AAEI,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAE,aAAqB,uBAAW,EAAE,EAAE,CACvF,GAAG,+BAAmB,IAAI,UAAU,IAAI,UAAU,EAAE,CAAC;AAD1C,QAAA,gBAAgB,oBAC0B;AAEhD,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,aAAqB,uBAAW,EAAE,EAAE,CACtF,GAAG,8BAAkB,IAAI,UAAU,IAAI,UAAU,EAAE,CAAC;AADzC,QAAA,eAAe,mBAC0B;AAE/C,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAE,aAAqB,uBAAW,EAAE,EAAE,CACvF,GAAG,+BAAmB,IAAI,UAAU,IAAI,UAAU,EAAE,CAAC;AAD1C,QAAA,gBAAgB,oBAC0B;AAyBvD,GAAG,CAAC,SAAS,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;AAC7D,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC;AACvD,GAAG,CAAC,SAAS,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;AACrD,GAAG,CAAC,SAAS,CAAC,oBAAoB,EAAE,6BAA6B,CAAC,CAAC;AACnE,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,+BAA+B,CAAC,CAAC;AACzD,QAAA,uBAAuB,GAClC,GAAG,CAAC,OAAO,CAAsB,qBAAqB,CAAC,CAAC;AAiB1D,GAAG,CAAC,SAAS,CAAC,uBAAuB,EAAE,iCAAiC,CAAC,CAAC;AAC7D,QAAA,sBAAsB,GACjC,GAAG,CAAC,OAAO,CAAqB,oBAAoB,CAAC,CAAC;AA6BxD,GAAG,CAAC,SAAS,CAAC,0BAA0B,EAAE,oCAAoC,CAAC,CAAC;AAChF,GAAG,CAAC,SAAS,CAAC,gBAAgB,EAAE,yBAAyB,CAAC,CAAC;AAC3D,GAAG,CAAC,SAAS,CAAC,kBAAkB,EAAE,2BAA2B,CAAC,CAAC;AAC/D,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,+BAA+B,CAAC,CAAC;AACtE,GAAG,CAAC,SAAS,CAAC,uBAAuB,EAAE,iCAAiC,CAAC,CAAC;AAC1E,GAAG,CAAC,SAAS,CAAC,wBAAwB,EAAE,kCAAkC,CAAC,CAAC;AAC5E,GAAG,CAAC,SAAS,CAAC,2BAA2B,EAAE,qCAAqC,CAAC,CAAC;AAClF,GAAG,CAAC,SAAS,CAAC,wBAAwB,EAAE,iCAAiC,CAAC,CAAC;AAE9D,QAAA,4BAA4B,GAAG,GAAG,CAAC,OAAO,CACrD,0BAA0B,CAC3B,CAAC"}
|