@alwaysai/device-agent-schemas 0.0.8 → 1.0.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/constants.d.ts +2 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +1 -0
- package/lib/constants.js.map +1 -1
- package/lib/schemas/agent/app-install-status-schema.d.ts +3 -3
- package/lib/schemas/agent/app-install-status-schema.d.ts.map +1 -1
- package/lib/schemas/agent/app-install-status-schema.js +1 -1
- package/lib/schemas/agent/app-install-status-schema.js.map +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +11 -32
- package/lib/types.js.map +1 -1
- package/lib/types.test.js +20 -20
- package/lib/types.test.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -0
- package/src/schemas/agent/app-install-status-schema.ts +2 -2
- package/src/types.test.ts +20 -33
- package/src/types.ts +11 -37
package/lib/constants.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare const keyMirrors: {
|
|
|
32
32
|
live_updates: "live_updates";
|
|
33
33
|
};
|
|
34
34
|
appInstallStatus: {
|
|
35
|
+
requested: "requested";
|
|
35
36
|
in_progress: "in_progress";
|
|
36
37
|
failure: "failure";
|
|
37
38
|
success: "success";
|
|
@@ -49,6 +50,6 @@ export declare const appVersionControlValues: "install"[];
|
|
|
49
50
|
export declare type AppVersionControlValue = keyof typeof keyMirrors.appVersionControl;
|
|
50
51
|
export declare const liveUpdatesValues: "live_updates"[];
|
|
51
52
|
export declare type LiveUpdatesValue = keyof typeof keyMirrors.liveUpdates;
|
|
52
|
-
export declare const appInstallStatusValues: ("in_progress" | "failure" | "success")[];
|
|
53
|
+
export declare const appInstallStatusValues: ("requested" | "in_progress" | "failure" | "success")[];
|
|
53
54
|
export declare type AppInstallStatusValue = keyof typeof keyMirrors.appInstallStatus;
|
|
54
55
|
//# sourceMappingURL=constants.d.ts.map
|
package/lib/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,8BAA8B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,8BAA8B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AA4CrD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,0GAA6C,CAAC;AACjF,oBAAY,qBAAqB,GAAG,MAAM,OAAO,UAAU,CAAC,gBAAgB,CAAC;AAE7E,eAAO,MAAM,uBAAuB,uGAA8C,CAAC;AACnF,oBAAY,sBAAsB,GAAG,MAAM,OAAO,UAAU,CAAC,iBAAiB,CAAC;AAE/E,eAAO,MAAM,cAAc,qCAAqC,CAAC;AACjE,oBAAY,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC,QAAQ,CAAC;AAE7D,eAAO,MAAM,qBAAqB,kCAA4C,CAAC;AAC/E,oBAAY,oBAAoB,GAAG,MAAM,OAAO,UAAU,CAAC,eAAe,CAAC;AAE3E,eAAO,MAAM,uBAAuB,aAA8C,CAAC;AACnF,oBAAY,sBAAsB,GAAG,MAAM,OAAO,UAAU,CAAC,iBAAiB,CAAC;AAE/E,eAAO,MAAM,iBAAiB,kBAAwC,CAAC;AACvE,oBAAY,gBAAgB,GAAG,MAAM,OAAO,UAAU,CAAC,WAAW,CAAC;AAEnE,eAAO,MAAM,sBAAsB,yDAA6C,CAAC;AACjF,oBAAY,qBAAqB,GAAG,MAAM,OAAO,UAAU,CAAC,gBAAgB,CAAC"}
|
package/lib/constants.js
CHANGED
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAEvB,QAAA,kBAAkB,GAAG,2BAA2B,CAAC;AACjD,QAAA,iBAAiB,GAAG,2BAA2B,CAAC;AAChD,QAAA,sBAAsB,GAAG,cAAc,CAAC;AAErD,MAAM,oBAAoB,GAAG,IAAA,iBAAS,EAAC;IACrC,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,IAAI;IACxB,+BAA+B,EAAE,IAAI;CACtC,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAA,iBAAS,EAAC;IACtC,iBAAiB,EAAE,IAAI;IACvB,mBAAmB,EAAE,IAAI;IACzB,0BAA0B,EAAE,IAAI;IAChC,kBAAkB,EAAE,IAAI;CACzB,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,IAAA,iBAAS,EAAC;IAC7B,EAAE,EAAE,IAAI;IACR,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,IAAA,iBAAS,EAAC;IACpC,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAA,iBAAS,EAAC;IACtC,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,IAAA,iBAAS,EAAC;IAChC,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,IAAA,iBAAS,EAAC;IACrC,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG;IACx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,CAAC,MAAM,CAAC,kBAAU,CAAC,eAAe,CAAC,CAAC;AAGlE,QAAA,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,iBAAiB,CAAC,CAAC;AAGtE,QAAA,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,WAAW,CAAC,CAAC;AAG1D,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppInstallStatusValue, keyMirrors } from "../../constants";
|
|
2
2
|
export interface AppInstallStatusPacket {
|
|
3
3
|
status: AppInstallStatusValue;
|
|
4
|
-
|
|
4
|
+
message?: string;
|
|
5
5
|
appReleaseHash: string;
|
|
6
6
|
}
|
|
7
7
|
export interface AppInstallStatusMessage {
|
|
@@ -19,9 +19,9 @@ export declare const appInstallStatusSchema: {
|
|
|
19
19
|
type: string;
|
|
20
20
|
properties: {
|
|
21
21
|
status: {
|
|
22
|
-
enum: ("in_progress" | "failure" | "success")[];
|
|
22
|
+
enum: ("requested" | "in_progress" | "failure" | "success")[];
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
message: {
|
|
25
25
|
type: string;
|
|
26
26
|
};
|
|
27
27
|
appReleaseHash: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-install-status-schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/agent/app-install-status-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE5F,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,
|
|
1
|
+
{"version":3,"file":"app-install-status-schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/agent/app-install-status-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE5F,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,OAAO,UAAU,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;IACnE,gBAAgB,EAAE,sBAAsB,CAAC;CAC1C;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-install-status-schema.js","sourceRoot":"","sources":["../../../src/schemas/agent/app-install-status-schema.ts"],"names":[],"mappings":";;;AAAA,+CAA4F;AAY/E,QAAA,sBAAsB,GAAG;IACpC,GAAG,EAAE,4BAA4B;IACjC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,WAAW,EAAE;YACX,KAAK,EAAE,sBAAU,CAAC,gBAAgB,CAAC,kBAAkB;SACtD;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,kCAAsB;iBAC7B;gBACD,
|
|
1
|
+
{"version":3,"file":"app-install-status-schema.js","sourceRoot":"","sources":["../../../src/schemas/agent/app-install-status-schema.ts"],"names":[],"mappings":";;;AAAA,+CAA4F;AAY/E,QAAA,sBAAsB,GAAG;IACpC,GAAG,EAAE,4BAA4B;IACjC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,WAAW,EAAE;YACX,KAAK,EAAE,sBAAU,CAAC,gBAAgB,CAAC,kBAAkB;SACtD;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,kCAAsB;iBAC7B;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;iBACf;g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{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,eAAe,EAEhB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEtB,wBAAwB,EAGzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,wBAAwB,EAEzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,cAAc,EAAiB,MAAM,yCAAyC,CAAC;AAGxF,OAAO,EACL,uBAAuB,EAExB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,kCAAkC,EAEnC,MAAM,yCAAyC,CAAC;AAEjD,oBAAY,yBAAyB,GACjC,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,uBAAuB,GACvB,kCAAkC,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,oBAAY,oBAAoB,GAC5B,sBAAsB,GACtB,wBAAwB,GACxB,8BAA8B,GAC9B,wBAAwB,CAAC;AAE7B,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAqFD,eAAO,MAAM,0BAA0B,oDAAsC,CAAC;AAI9E,eAAO,MAAM,qBAAqB,+CAAuC,CAAC"}
|
package/lib/types.js
CHANGED
|
@@ -31,11 +31,7 @@ const agentMessageSchema = (0, utils_1.loadSchemaAsObject)({
|
|
|
31
31
|
type: 'string',
|
|
32
32
|
},
|
|
33
33
|
topic: {
|
|
34
|
-
oneOf: [
|
|
35
|
-
{ $ref: '#/$defs/applicationManagementTopic' },
|
|
36
|
-
{ $ref: '#/$defs/deviceManagementTopic' },
|
|
37
|
-
{ $ref: '#/$defs/installationStatusTopic' },
|
|
38
|
-
],
|
|
34
|
+
oneOf: [{ $ref: '#/$defs/toCloud' }, { $ref: '#/$defs/toClient' }],
|
|
39
35
|
},
|
|
40
36
|
payload: {
|
|
41
37
|
oneOf: [
|
|
@@ -50,25 +46,15 @@ const agentMessageSchema = (0, utils_1.loadSchemaAsObject)({
|
|
|
50
46
|
required: ['timestamp', 'deviceId', 'topic', 'payload'],
|
|
51
47
|
additionalProperties: false,
|
|
52
48
|
$defs: {
|
|
53
|
-
|
|
54
|
-
description: '
|
|
55
|
-
type: 'string',
|
|
56
|
-
pattern: `^destination/cloud/device/${constants_1.DEVICE_ID_PATTERN}/topic/application-management`,
|
|
57
|
-
},
|
|
58
|
-
deviceManagementTopic: {
|
|
59
|
-
description: 'The specific topic to which the message payload was published, for device management data.',
|
|
60
|
-
type: 'string',
|
|
61
|
-
pattern: `^destination/cloud/device/${constants_1.DEVICE_ID_PATTERN}/topic/device-management`,
|
|
62
|
-
},
|
|
63
|
-
installationStatusTopic: {
|
|
64
|
-
description: 'The specific topic to which the message payload was published, for installation status data.',
|
|
49
|
+
toCloud: {
|
|
50
|
+
description: 'Messages sent from the agent itself to cloud backend',
|
|
65
51
|
type: 'string',
|
|
66
|
-
pattern: `^
|
|
52
|
+
pattern: `^topic/to_cloud/aai-device/${constants_1.DEVICE_ID_PATTERN}`,
|
|
67
53
|
},
|
|
68
|
-
|
|
69
|
-
description: '
|
|
54
|
+
toClient: {
|
|
55
|
+
description: 'Messages sent from the agent itself to console client',
|
|
70
56
|
type: 'string',
|
|
71
|
-
pattern: `^
|
|
57
|
+
pattern: `^topic/to_client/aai-device/${constants_1.DEVICE_ID_PATTERN}`,
|
|
72
58
|
},
|
|
73
59
|
},
|
|
74
60
|
});
|
|
@@ -82,9 +68,7 @@ const clientMessageSchema = (0, utils_1.loadSchemaAsObject)({
|
|
|
82
68
|
type: 'string',
|
|
83
69
|
},
|
|
84
70
|
// * Should we add some sort of client ID here? *
|
|
85
|
-
topic: {
|
|
86
|
-
oneOf: [{ $ref: '#/$defs/commandTopic' }, { $ref: '#/$defs/cloudResponseTopic' }],
|
|
87
|
-
},
|
|
71
|
+
topic: { $ref: '#/$defs/message' },
|
|
88
72
|
payload: {
|
|
89
73
|
oneOf: [
|
|
90
74
|
application_action_schema_1.appStateControlSchema,
|
|
@@ -97,15 +81,10 @@ const clientMessageSchema = (0, utils_1.loadSchemaAsObject)({
|
|
|
97
81
|
required: ['timestamp', 'topic', 'payload'],
|
|
98
82
|
additionalProperties: false,
|
|
99
83
|
$defs: {
|
|
100
|
-
|
|
101
|
-
description: 'Topic on which
|
|
102
|
-
type: 'string',
|
|
103
|
-
pattern: `^destination/agent/device/${constants_1.DEVICE_ID_PATTERN}/topic/command`,
|
|
104
|
-
},
|
|
105
|
-
cloudResponseTopic: {
|
|
106
|
-
description: 'Topic on which responses from the cloud are published',
|
|
84
|
+
message: {
|
|
85
|
+
description: 'Topic on which messages are sent to device agent.',
|
|
107
86
|
type: 'string',
|
|
108
|
-
pattern: `^
|
|
87
|
+
pattern: `^topic/to_device/aai-device/${constants_1.DEVICE_ID_PATTERN}`,
|
|
109
88
|
},
|
|
110
89
|
},
|
|
111
90
|
});
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,6BAA0C;AAC1C,2DAAuD;AACvD,+EAG8C;AAC9C,uFAGkD;AAClD,0FAOoD;AACpD,4FAGqD;AACrD,qFAAwF;AACxF,2CAAgD;AAChD,mCAA6C;AAC7C,yFAGmD;AACnD,qFAGiD;AA6BjD,qEAAqE;AACrE,gFAAgF;AAChF,MAAM,GAAG,GAAG,IAAI,aAAG,CAAC;IAClB,OAAO,EAAE,CAAC,4BAAY,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAA,0BAAkB,EAAC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5,7 @@ const validAgentMessages = [
|
|
|
5
5
|
{
|
|
6
6
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
7
7
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
8
|
-
topic: '
|
|
8
|
+
topic: 'topic/to_cloud/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
9
9
|
payload: {
|
|
10
10
|
messageType: 'app_install_signed_urls_request',
|
|
11
11
|
signedUrlsRequest: {
|
|
@@ -17,7 +17,7 @@ const validAgentMessages = [
|
|
|
17
17
|
{
|
|
18
18
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
19
19
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
20
|
-
topic: '
|
|
20
|
+
topic: 'topic/to_client/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
21
21
|
payload: {
|
|
22
22
|
messageType: 'device_stats',
|
|
23
23
|
deviceStats: {
|
|
@@ -30,7 +30,7 @@ const validAgentMessages = [
|
|
|
30
30
|
{
|
|
31
31
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
32
32
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
33
|
-
topic: '
|
|
33
|
+
topic: 'topic/to_client/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
34
34
|
payload: {
|
|
35
35
|
messageType: 'app_logs',
|
|
36
36
|
appLogs: {
|
|
@@ -42,7 +42,7 @@ const validAgentMessages = [
|
|
|
42
42
|
{
|
|
43
43
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
44
44
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
45
|
-
topic: '
|
|
45
|
+
topic: 'topic/to_client/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
46
46
|
payload: {
|
|
47
47
|
messageType: 'app_state',
|
|
48
48
|
appState: [
|
|
@@ -64,7 +64,7 @@ const validAgentMessages = [
|
|
|
64
64
|
{
|
|
65
65
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
66
66
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
67
|
-
topic: '
|
|
67
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
68
68
|
payload: {
|
|
69
69
|
messageType: 'app_install_status',
|
|
70
70
|
appInstallStatus: {
|
|
@@ -76,12 +76,12 @@ const validAgentMessages = [
|
|
|
76
76
|
{
|
|
77
77
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
78
78
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
79
|
-
topic: '
|
|
79
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
80
80
|
payload: {
|
|
81
81
|
messageType: 'app_install_status',
|
|
82
82
|
appInstallStatus: {
|
|
83
83
|
status: 'failure',
|
|
84
|
-
|
|
84
|
+
message: 'Lost connection to device',
|
|
85
85
|
appReleaseHash: 'c36d58b6a5b5c09e5d46da8a5315f01c20f8c7ff0087b1e31e6e334a702ee8ba',
|
|
86
86
|
},
|
|
87
87
|
},
|
|
@@ -92,7 +92,7 @@ const invalidAgentMessages = [
|
|
|
92
92
|
{
|
|
93
93
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
94
94
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
95
|
-
topic: '
|
|
95
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
96
96
|
payload: {
|
|
97
97
|
messageType: 'device_stats',
|
|
98
98
|
deviceStats: {
|
|
@@ -107,7 +107,7 @@ const invalidAgentMessages = [
|
|
|
107
107
|
{
|
|
108
108
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
109
109
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
110
|
-
topic: '
|
|
110
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
111
111
|
payload: {
|
|
112
112
|
messageType: 'device_stats',
|
|
113
113
|
deviceStats: {
|
|
@@ -121,7 +121,7 @@ const invalidAgentMessages = [
|
|
|
121
121
|
{
|
|
122
122
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
123
123
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
124
|
-
topic: '
|
|
124
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
125
125
|
payload: {
|
|
126
126
|
messageType: 'app_state',
|
|
127
127
|
applicationState: {
|
|
@@ -134,7 +134,7 @@ const invalidAgentMessages = [
|
|
|
134
134
|
{
|
|
135
135
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
136
136
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
137
|
-
topic: '
|
|
137
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
138
138
|
payload: {
|
|
139
139
|
messageType: 'app_logs',
|
|
140
140
|
applicationLogs: {
|
|
@@ -146,7 +146,7 @@ const invalidAgentMessages = [
|
|
|
146
146
|
{
|
|
147
147
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
148
148
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
149
|
-
topic: '
|
|
149
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
150
150
|
payload: {
|
|
151
151
|
messageType: 'install_status',
|
|
152
152
|
installationStatus: {
|
|
@@ -159,7 +159,7 @@ const invalidAgentMessages = [
|
|
|
159
159
|
{
|
|
160
160
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
161
161
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
162
|
-
topic: '
|
|
162
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
163
163
|
payload: {
|
|
164
164
|
messageType: 'install_status',
|
|
165
165
|
installationStatus: {
|
|
@@ -171,7 +171,7 @@ const invalidAgentMessages = [
|
|
|
171
171
|
{
|
|
172
172
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
173
173
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
174
|
-
topic: '
|
|
174
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
175
175
|
payload: {
|
|
176
176
|
messageType: 'install_status',
|
|
177
177
|
installationStatus: {
|
|
@@ -184,7 +184,7 @@ const invalidAgentMessages = [
|
|
|
184
184
|
const validClientMessages = [
|
|
185
185
|
{
|
|
186
186
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
187
|
-
topic: '
|
|
187
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
188
188
|
payload: {
|
|
189
189
|
messageType: 'live_state_updates',
|
|
190
190
|
liveUpdatesToggles: {
|
|
@@ -195,7 +195,7 @@ const validClientMessages = [
|
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
198
|
-
topic: '
|
|
198
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
199
199
|
payload: {
|
|
200
200
|
messageType: 'app_state_control',
|
|
201
201
|
appStateControl: {
|
|
@@ -206,7 +206,7 @@ const validClientMessages = [
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
209
|
-
topic: '
|
|
209
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
210
210
|
payload: {
|
|
211
211
|
messageType: 'app_version_control',
|
|
212
212
|
appVersionControl: {
|
|
@@ -219,7 +219,7 @@ const validClientMessages = [
|
|
|
219
219
|
const invalidClientMessages = [
|
|
220
220
|
{
|
|
221
221
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
222
|
-
topic: '
|
|
222
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
223
223
|
payload: {
|
|
224
224
|
messageType: 'live_updates',
|
|
225
225
|
toggle: 56,
|
|
@@ -227,7 +227,7 @@ const invalidClientMessages = [
|
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
230
|
-
topic: '
|
|
230
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
231
231
|
payload: {
|
|
232
232
|
messageType: 'app_state_control',
|
|
233
233
|
appStateControl: {
|
|
@@ -238,7 +238,7 @@ const invalidClientMessages = [
|
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
241
|
-
topic: '
|
|
241
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
242
242
|
payload: {
|
|
243
243
|
messageType: 'app_version_control',
|
|
244
244
|
appVersionControl: {
|
package/lib/types.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.test.js","sourceRoot":"","sources":["../src/types.test.ts"],"names":[],"mappings":";;AAAA,mCAA4E;AAE5E,MAAM,kBAAkB,GAAG;IACzB;QACE,SAAS,EAAE,+BAA+B;QAC1C,QAAQ,EAAE,sCAAsC;QAChD,KAAK,
|
|
1
|
+
{"version":3,"file":"types.test.js","sourceRoot":"","sources":["../src/types.test.ts"],"names":[],"mappings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;QACnC,MAAM,CAAC,IAAA,6BAAqB,EAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACvC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrC,MAAM,CAAC,IAAA,6BAAqB,EAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AppInstallStatusValue, appInstallStatusValues, keyMirrors } from "../..
|
|
|
2
2
|
|
|
3
3
|
export interface AppInstallStatusPacket {
|
|
4
4
|
status: AppInstallStatusValue;
|
|
5
|
-
|
|
5
|
+
message?: string;
|
|
6
6
|
appReleaseHash: string;
|
|
7
7
|
}
|
|
8
8
|
export interface AppInstallStatusMessage {
|
|
@@ -23,7 +23,7 @@ export const appInstallStatusSchema = {
|
|
|
23
23
|
status: {
|
|
24
24
|
enum: appInstallStatusValues,
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
message: {
|
|
27
27
|
type: 'string',
|
|
28
28
|
},
|
|
29
29
|
appReleaseHash: {
|
package/src/types.test.ts
CHANGED
|
@@ -4,8 +4,7 @@ const validAgentMessages = [
|
|
|
4
4
|
{
|
|
5
5
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
6
6
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
7
|
-
topic:
|
|
8
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/device-management',
|
|
7
|
+
topic: 'topic/to_cloud/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
9
8
|
payload: {
|
|
10
9
|
messageType: 'app_install_signed_urls_request',
|
|
11
10
|
signedUrlsRequest: {
|
|
@@ -18,8 +17,7 @@ const validAgentMessages = [
|
|
|
18
17
|
{
|
|
19
18
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
20
19
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
21
|
-
topic:
|
|
22
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/device-management',
|
|
20
|
+
topic: 'topic/to_client/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
23
21
|
payload: {
|
|
24
22
|
messageType: 'device_stats',
|
|
25
23
|
deviceStats: {
|
|
@@ -32,8 +30,7 @@ const validAgentMessages = [
|
|
|
32
30
|
{
|
|
33
31
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
34
32
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
35
|
-
topic:
|
|
36
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/application-management',
|
|
33
|
+
topic: 'topic/to_client/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
37
34
|
payload: {
|
|
38
35
|
messageType: 'app_logs',
|
|
39
36
|
appLogs: {
|
|
@@ -45,8 +42,7 @@ const validAgentMessages = [
|
|
|
45
42
|
{
|
|
46
43
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
47
44
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
48
|
-
topic:
|
|
49
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/device-management',
|
|
45
|
+
topic: 'topic/to_client/aai-device/68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
50
46
|
payload: {
|
|
51
47
|
messageType: 'app_state',
|
|
52
48
|
appState: [
|
|
@@ -68,8 +64,7 @@ const validAgentMessages = [
|
|
|
68
64
|
{
|
|
69
65
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
70
66
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
71
|
-
topic:
|
|
72
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/installation-status',
|
|
67
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
73
68
|
payload: {
|
|
74
69
|
messageType: 'app_install_status',
|
|
75
70
|
appInstallStatus: {
|
|
@@ -82,13 +77,12 @@ const validAgentMessages = [
|
|
|
82
77
|
{
|
|
83
78
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
84
79
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
85
|
-
topic:
|
|
86
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/installation-status',
|
|
80
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
87
81
|
payload: {
|
|
88
82
|
messageType: 'app_install_status',
|
|
89
83
|
appInstallStatus: {
|
|
90
84
|
status: 'failure',
|
|
91
|
-
|
|
85
|
+
message: 'Lost connection to device',
|
|
92
86
|
appReleaseHash:
|
|
93
87
|
'c36d58b6a5b5c09e5d46da8a5315f01c20f8c7ff0087b1e31e6e334a702ee8ba',
|
|
94
88
|
},
|
|
@@ -101,8 +95,7 @@ const invalidAgentMessages = [
|
|
|
101
95
|
{
|
|
102
96
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
103
97
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
104
|
-
topic:
|
|
105
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/device-management',
|
|
98
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
106
99
|
payload: {
|
|
107
100
|
messageType: 'device_stats',
|
|
108
101
|
deviceStats: {
|
|
@@ -117,8 +110,7 @@ const invalidAgentMessages = [
|
|
|
117
110
|
{
|
|
118
111
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
119
112
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
120
|
-
topic:
|
|
121
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/device-management',
|
|
113
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
122
114
|
payload: {
|
|
123
115
|
messageType: 'device_stats',
|
|
124
116
|
deviceStats: {
|
|
@@ -132,8 +124,7 @@ const invalidAgentMessages = [
|
|
|
132
124
|
{
|
|
133
125
|
timestamp: 'Mon, 06 Jun 2022 20:21:46 GMT',
|
|
134
126
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
135
|
-
topic:
|
|
136
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/device-management',
|
|
127
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
137
128
|
payload: {
|
|
138
129
|
messageType: 'app_state',
|
|
139
130
|
applicationState: {
|
|
@@ -146,8 +137,7 @@ const invalidAgentMessages = [
|
|
|
146
137
|
{
|
|
147
138
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
148
139
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
149
|
-
topic:
|
|
150
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/application-management',
|
|
140
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
151
141
|
payload: {
|
|
152
142
|
messageType: 'app_logs',
|
|
153
143
|
applicationLogs: {
|
|
@@ -159,8 +149,7 @@ const invalidAgentMessages = [
|
|
|
159
149
|
{
|
|
160
150
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
161
151
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
162
|
-
topic:
|
|
163
|
-
'destination/clouddevice/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/installation-status',
|
|
152
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
164
153
|
payload: {
|
|
165
154
|
messageType: 'install_status',
|
|
166
155
|
installationStatus: {
|
|
@@ -174,8 +163,7 @@ const invalidAgentMessages = [
|
|
|
174
163
|
{
|
|
175
164
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
176
165
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
177
|
-
topic:
|
|
178
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/installation-status',
|
|
166
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
179
167
|
payload: {
|
|
180
168
|
messageType: 'install_status',
|
|
181
169
|
installationStatus: {
|
|
@@ -187,8 +175,7 @@ const invalidAgentMessages = [
|
|
|
187
175
|
{
|
|
188
176
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
189
177
|
deviceId: '68195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
190
|
-
topic:
|
|
191
|
-
'destination/cloud/device/68195e4f-045c-4a9e-ae50-b87ed4d611f7/topic/installation-status',
|
|
178
|
+
topic: 'topic/to_client/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
192
179
|
payload: {
|
|
193
180
|
messageType: 'install_status',
|
|
194
181
|
installationStatus: {
|
|
@@ -202,7 +189,7 @@ const invalidAgentMessages = [
|
|
|
202
189
|
const validClientMessages = [
|
|
203
190
|
{
|
|
204
191
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
205
|
-
topic: '
|
|
192
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
206
193
|
payload: {
|
|
207
194
|
messageType: 'live_state_updates',
|
|
208
195
|
liveUpdatesToggles: {
|
|
@@ -213,7 +200,7 @@ const validClientMessages = [
|
|
|
213
200
|
},
|
|
214
201
|
{
|
|
215
202
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
216
|
-
topic: '
|
|
203
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
217
204
|
payload: {
|
|
218
205
|
messageType: 'app_state_control',
|
|
219
206
|
appStateControl: {
|
|
@@ -224,7 +211,7 @@ const validClientMessages = [
|
|
|
224
211
|
},
|
|
225
212
|
{
|
|
226
213
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
227
|
-
topic: '
|
|
214
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
228
215
|
payload: {
|
|
229
216
|
messageType: 'app_version_control',
|
|
230
217
|
appVersionControl: {
|
|
@@ -239,7 +226,7 @@ const validClientMessages = [
|
|
|
239
226
|
const invalidClientMessages = [
|
|
240
227
|
{
|
|
241
228
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
242
|
-
topic: '
|
|
229
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
243
230
|
payload: {
|
|
244
231
|
messageType: 'live_updates',
|
|
245
232
|
toggle: 56,
|
|
@@ -247,7 +234,7 @@ const invalidClientMessages = [
|
|
|
247
234
|
},
|
|
248
235
|
{
|
|
249
236
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
250
|
-
topic: '
|
|
237
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
251
238
|
payload: {
|
|
252
239
|
messageType: 'app_state_control',
|
|
253
240
|
appStateControl: {
|
|
@@ -258,7 +245,7 @@ const invalidClientMessages = [
|
|
|
258
245
|
},
|
|
259
246
|
{
|
|
260
247
|
timestamp: 'Fri, 27 May 2022 03:47:15 GMT',
|
|
261
|
-
topic: '
|
|
248
|
+
topic: 'topic/to_device/aai-device/8195e4f-045c-4a9e-ae50-b87ed4d611f7',
|
|
262
249
|
payload: {
|
|
263
250
|
messageType: 'app_version_control',
|
|
264
251
|
appVersionControl: {
|
package/src/types.ts
CHANGED
|
@@ -80,11 +80,7 @@ const agentMessageSchema = loadSchemaAsObject({
|
|
|
80
80
|
type: 'string',
|
|
81
81
|
},
|
|
82
82
|
topic: {
|
|
83
|
-
oneOf: [
|
|
84
|
-
{ $ref: '#/$defs/applicationManagementTopic' },
|
|
85
|
-
{ $ref: '#/$defs/deviceManagementTopic' },
|
|
86
|
-
{ $ref: '#/$defs/installationStatusTopic' },
|
|
87
|
-
],
|
|
83
|
+
oneOf: [{ $ref: '#/$defs/toCloud' }, { $ref: '#/$defs/toClient' }],
|
|
88
84
|
},
|
|
89
85
|
payload: {
|
|
90
86
|
oneOf: [
|
|
@@ -99,29 +95,15 @@ const agentMessageSchema = loadSchemaAsObject({
|
|
|
99
95
|
required: ['timestamp', 'deviceId', 'topic', 'payload'],
|
|
100
96
|
additionalProperties: false,
|
|
101
97
|
$defs: {
|
|
102
|
-
|
|
103
|
-
description:
|
|
104
|
-
'The specific topic to which the message payload was published, for application management commands.',
|
|
105
|
-
type: 'string',
|
|
106
|
-
pattern: `^destination/cloud/device/${DEVICE_ID_PATTERN}/topic/application-management`,
|
|
107
|
-
},
|
|
108
|
-
deviceManagementTopic: {
|
|
109
|
-
description:
|
|
110
|
-
'The specific topic to which the message payload was published, for device management data.',
|
|
111
|
-
type: 'string',
|
|
112
|
-
pattern: `^destination/cloud/device/${DEVICE_ID_PATTERN}/topic/device-management`,
|
|
113
|
-
},
|
|
114
|
-
installationStatusTopic: {
|
|
115
|
-
description:
|
|
116
|
-
'The specific topic to which the message payload was published, for installation status data.',
|
|
98
|
+
toCloud: {
|
|
99
|
+
description: 'Messages sent from the agent itself to cloud backend',
|
|
117
100
|
type: 'string',
|
|
118
|
-
pattern: `^
|
|
101
|
+
pattern: `^topic/to_cloud/aai-device/${DEVICE_ID_PATTERN}`,
|
|
119
102
|
},
|
|
120
|
-
|
|
121
|
-
description:
|
|
122
|
-
'The specific topic to which the message payload was published, for request for cloud data.',
|
|
103
|
+
toClient: {
|
|
104
|
+
description: 'Messages sent from the agent itself to console client',
|
|
123
105
|
type: 'string',
|
|
124
|
-
pattern: `^
|
|
106
|
+
pattern: `^topic/to_client/aai-device/${DEVICE_ID_PATTERN}`,
|
|
125
107
|
},
|
|
126
108
|
},
|
|
127
109
|
});
|
|
@@ -137,9 +119,7 @@ const clientMessageSchema = loadSchemaAsObject({
|
|
|
137
119
|
type: 'string',
|
|
138
120
|
},
|
|
139
121
|
// * Should we add some sort of client ID here? *
|
|
140
|
-
topic: {
|
|
141
|
-
oneOf: [{ $ref: '#/$defs/commandTopic' }, { $ref: '#/$defs/cloudResponseTopic' }],
|
|
142
|
-
},
|
|
122
|
+
topic: { $ref: '#/$defs/message' },
|
|
143
123
|
payload: {
|
|
144
124
|
oneOf: [
|
|
145
125
|
appStateControlSchema,
|
|
@@ -152,16 +132,10 @@ const clientMessageSchema = loadSchemaAsObject({
|
|
|
152
132
|
required: ['timestamp', 'topic', 'payload'],
|
|
153
133
|
additionalProperties: false,
|
|
154
134
|
$defs: {
|
|
155
|
-
|
|
156
|
-
description:
|
|
157
|
-
'Topic on which commands are published for apps, the device, and the device agent.',
|
|
158
|
-
type: 'string',
|
|
159
|
-
pattern: `^destination/agent/device/${DEVICE_ID_PATTERN}/topic/command`,
|
|
160
|
-
},
|
|
161
|
-
cloudResponseTopic: {
|
|
162
|
-
description: 'Topic on which responses from the cloud are published',
|
|
135
|
+
message: {
|
|
136
|
+
description: 'Topic on which messages are sent to device agent.',
|
|
163
137
|
type: 'string',
|
|
164
|
-
pattern: `^
|
|
138
|
+
pattern: `^topic/to_device/aai-device/${DEVICE_ID_PATTERN}`,
|
|
165
139
|
},
|
|
166
140
|
},
|
|
167
141
|
});
|