@awarevue/api-types 2.0.20 → 2.0.22
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.
|
@@ -47,6 +47,8 @@ export declare const sResponsePayload: <TKind, T extends z.ZodRawShape>(kind: z.
|
|
|
47
47
|
requestId: z.ZodString;
|
|
48
48
|
kind: z.ZodLiteral<TKind>;
|
|
49
49
|
}>[k_1]; } : never>, z.ZodObject<T, z.UnknownKeysParam, z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_3 ? { [k_2 in keyof T_3]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k_2]; } : never, z.baseObjectInputType<T> extends infer T_4 ? { [k_3 in keyof T_4]: z.baseObjectInputType<T>[k_3]; } : never>>;
|
|
50
|
+
export declare const sAgentErrorCode: z.ZodEnum<["NOT_SUPPORTED", "TIMEOUT"]>;
|
|
51
|
+
export type AgentErrorCode = z.infer<typeof sAgentErrorCode>;
|
|
50
52
|
export declare const sErrorPayload: z.ZodIntersection<z.ZodObject<{
|
|
51
53
|
requestId: z.ZodString;
|
|
52
54
|
kind: z.ZodLiteral<"error-rs">;
|
|
@@ -58,10 +60,13 @@ export declare const sErrorPayload: z.ZodIntersection<z.ZodObject<{
|
|
|
58
60
|
requestId: string;
|
|
59
61
|
}>, z.ZodObject<{
|
|
60
62
|
error: z.ZodString;
|
|
63
|
+
code: z.ZodOptional<z.ZodEnum<["NOT_SUPPORTED", "TIMEOUT"]>>;
|
|
61
64
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
62
65
|
error: string;
|
|
66
|
+
code?: "NOT_SUPPORTED" | "TIMEOUT" | undefined;
|
|
63
67
|
}, {
|
|
64
68
|
error: string;
|
|
69
|
+
code?: "NOT_SUPPORTED" | "TIMEOUT" | undefined;
|
|
65
70
|
}>>;
|
|
66
71
|
export declare const sUiOrderHint: z.ZodObject<{
|
|
67
72
|
kind: z.ZodLiteral<"order">;
|
|
@@ -7919,14 +7924,14 @@ export declare const sChangeIssue: z.ZodObject<{
|
|
|
7919
7924
|
message: z.ZodOptional<z.ZodString>;
|
|
7920
7925
|
}, "strip", z.ZodTypeAny, {
|
|
7921
7926
|
index?: number | undefined;
|
|
7922
|
-
code?: "
|
|
7927
|
+
code?: "NOT_SUPPORTED" | "BAD_REFERENCE" | "NOT_FOUND" | "NOT_UNIQUE" | "INVALID" | undefined;
|
|
7923
7928
|
message?: string | undefined;
|
|
7924
7929
|
path?: string | undefined;
|
|
7925
7930
|
objectId?: string | undefined;
|
|
7926
7931
|
objectKind?: "person" | "zone" | "accessRule" | "schedule" | "device" | undefined;
|
|
7927
7932
|
}, {
|
|
7928
7933
|
index?: number | undefined;
|
|
7929
|
-
code?: "
|
|
7934
|
+
code?: "NOT_SUPPORTED" | "BAD_REFERENCE" | "NOT_FOUND" | "NOT_UNIQUE" | "INVALID" | undefined;
|
|
7930
7935
|
message?: string | undefined;
|
|
7931
7936
|
path?: string | undefined;
|
|
7932
7937
|
objectId?: string | undefined;
|
|
@@ -7951,14 +7956,14 @@ export declare const sValidateChangeRs: z.ZodIntersection<z.ZodObject<{
|
|
|
7951
7956
|
message: z.ZodOptional<z.ZodString>;
|
|
7952
7957
|
}, "strip", z.ZodTypeAny, {
|
|
7953
7958
|
index?: number | undefined;
|
|
7954
|
-
code?: "
|
|
7959
|
+
code?: "NOT_SUPPORTED" | "BAD_REFERENCE" | "NOT_FOUND" | "NOT_UNIQUE" | "INVALID" | undefined;
|
|
7955
7960
|
message?: string | undefined;
|
|
7956
7961
|
path?: string | undefined;
|
|
7957
7962
|
objectId?: string | undefined;
|
|
7958
7963
|
objectKind?: "person" | "zone" | "accessRule" | "schedule" | "device" | undefined;
|
|
7959
7964
|
}, {
|
|
7960
7965
|
index?: number | undefined;
|
|
7961
|
-
code?: "
|
|
7966
|
+
code?: "NOT_SUPPORTED" | "BAD_REFERENCE" | "NOT_FOUND" | "NOT_UNIQUE" | "INVALID" | undefined;
|
|
7962
7967
|
message?: string | undefined;
|
|
7963
7968
|
path?: string | undefined;
|
|
7964
7969
|
objectId?: string | undefined;
|
|
@@ -7967,7 +7972,7 @@ export declare const sValidateChangeRs: z.ZodIntersection<z.ZodObject<{
|
|
|
7967
7972
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
7968
7973
|
issues: {
|
|
7969
7974
|
index?: number | undefined;
|
|
7970
|
-
code?: "
|
|
7975
|
+
code?: "NOT_SUPPORTED" | "BAD_REFERENCE" | "NOT_FOUND" | "NOT_UNIQUE" | "INVALID" | undefined;
|
|
7971
7976
|
message?: string | undefined;
|
|
7972
7977
|
path?: string | undefined;
|
|
7973
7978
|
objectId?: string | undefined;
|
|
@@ -7976,7 +7981,7 @@ export declare const sValidateChangeRs: z.ZodIntersection<z.ZodObject<{
|
|
|
7976
7981
|
}, {
|
|
7977
7982
|
issues: {
|
|
7978
7983
|
index?: number | undefined;
|
|
7979
|
-
code?: "
|
|
7984
|
+
code?: "NOT_SUPPORTED" | "BAD_REFERENCE" | "NOT_FOUND" | "NOT_UNIQUE" | "INVALID" | undefined;
|
|
7980
7985
|
message?: string | undefined;
|
|
7981
7986
|
path?: string | undefined;
|
|
7982
7987
|
objectId?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.sAbortChange = exports.sApplyChangeProgress = exports.sApplyChangeRs = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sChangeIssueCode = exports.sValidateChangeRq = exports.sRefMap = exports.sDeviceMap = exports.sAccessMutation = exports.sObjectDelete = exports.sObjectMerge = exports.sGetAvailableDevicesRs = exports.sGetAvailableDevicesRq = exports.sPushEventRs = exports.sPushEventRq = exports.sPushStateUpdateRs = exports.sPushStateUpdateRq = exports.sPushFile = exports.sQueryRs = exports.sQueryRq = exports.sRunCommandRs = exports.sRunCommandRq = exports.sStopServiceRs = exports.sStopServiceRq = exports.sStartServiceRs = exports.sStartServiceRq = exports.sValidateProviderConfigRs = exports.sConfigurationIssue = exports.sValidateProviderConfigRq = exports.sUnregister = exports.sRegisterRs = exports.sRegisterRq = exports.sAccessControlCapabilityReport = exports.sTokenSpecs = exports.sAccessObjectKind = exports.sProviderSpecs = exports.sUiHint = exports.sUiWidgetHint = exports.sUiOrderHint = exports.sErrorPayload = exports.sResponsePayload = exports.sMessageWithPayload = exports.sMessageHeader = void 0;
|
|
3
|
+
exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.sAbortChange = exports.sApplyChangeProgress = exports.sApplyChangeRs = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sChangeIssueCode = exports.sValidateChangeRq = exports.sRefMap = exports.sDeviceMap = exports.sAccessMutation = exports.sObjectDelete = exports.sObjectMerge = exports.sGetAvailableDevicesRs = exports.sGetAvailableDevicesRq = exports.sPushEventRs = exports.sPushEventRq = exports.sPushStateUpdateRs = exports.sPushStateUpdateRq = exports.sPushFile = exports.sQueryRs = exports.sQueryRq = exports.sRunCommandRs = exports.sRunCommandRq = exports.sStopServiceRs = exports.sStopServiceRq = exports.sStartServiceRs = exports.sStartServiceRq = exports.sValidateProviderConfigRs = exports.sConfigurationIssue = exports.sValidateProviderConfigRq = exports.sUnregister = exports.sRegisterRs = exports.sRegisterRq = exports.sAccessControlCapabilityReport = exports.sTokenSpecs = exports.sAccessObjectKind = exports.sProviderSpecs = exports.sUiHint = exports.sUiWidgetHint = exports.sUiOrderHint = exports.sErrorPayload = exports.sAgentErrorCode = exports.sResponsePayload = exports.sMessageWithPayload = exports.sMessageHeader = void 0;
|
|
4
4
|
const device_import_1 = require("../device-import");
|
|
5
5
|
const credential_1 = require("../access-control/credential");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -22,8 +22,10 @@ const sResponsePayload = (kind, sPayload) =>
|
|
|
22
22
|
// success branch
|
|
23
23
|
zod_1.z.object({ requestId: zod_1.z.string().nonempty(), kind }).and(sPayload);
|
|
24
24
|
exports.sResponsePayload = sResponsePayload;
|
|
25
|
+
exports.sAgentErrorCode = zod_1.z.enum(['NOT_SUPPORTED', 'TIMEOUT']);
|
|
25
26
|
exports.sErrorPayload = (0, exports.sResponsePayload)(zod_1.z.literal('error-rs'), zod_1.z.object({
|
|
26
27
|
error: zod_1.z.string().nonempty().describe('Error message if request failed'),
|
|
28
|
+
code: exports.sAgentErrorCode.optional().describe('Optional error code'),
|
|
27
29
|
}));
|
|
28
30
|
// REGISTER
|
|
29
31
|
exports.sUiOrderHint = zod_1.z.object({
|
package/dist/package.json
CHANGED
package/dist/queries/all.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ import { CameraQueryRequestMap, CameraQueryResponseMap } from './camera';
|
|
|
3
3
|
import { NvrAnalyticsQueryRequestMap, NvrAnalyticsQueryResponseMap } from './nvr-analytics-server';
|
|
4
4
|
import { NvrExporterQueryRequestMap, NvrExporterQueryResponseMap } from './nvr-exporter';
|
|
5
5
|
import { NvrRecorderQueryRequestMap, NvrRecorderQueryResponseMap } from './nvr-recorder';
|
|
6
|
-
export declare const sEventCapsQueryArgs: {}
|
|
7
|
-
export type EventCapsQueryArgs = typeof sEventCapsQueryArgs
|
|
6
|
+
export declare const sEventCapsQueryArgs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
7
|
+
export type EventCapsQueryArgs = z.infer<typeof sEventCapsQueryArgs>;
|
|
8
8
|
export declare const QUERY_EVENT_CAPS = "device:event-caps";
|
|
9
9
|
export declare const sEventCapsQueryResponse: z.ZodArray<z.ZodString, "many">;
|
|
10
10
|
export type EventCapsQueryResponse = z.infer<typeof sEventCapsQueryResponse>;
|
|
11
11
|
export declare const requestSchemasByType: {
|
|
12
|
-
readonly "device:event-caps": {}
|
|
12
|
+
readonly "device:event-caps": z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
13
13
|
readonly "cctv:rtsp-data": z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
14
14
|
readonly "cctv:media-search": z.ZodObject<{
|
|
15
15
|
devices: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
|
package/dist/queries/all.js
CHANGED
|
@@ -7,7 +7,7 @@ const nvr_analytics_server_1 = require("./nvr-analytics-server");
|
|
|
7
7
|
const nvr_exporter_1 = require("./nvr-exporter");
|
|
8
8
|
const nvr_recorder_1 = require("./nvr-recorder");
|
|
9
9
|
// queries that apply to all devices
|
|
10
|
-
exports.sEventCapsQueryArgs = {};
|
|
10
|
+
exports.sEventCapsQueryArgs = zod_1.z.object({});
|
|
11
11
|
exports.QUERY_EVENT_CAPS = 'device:event-caps';
|
|
12
12
|
exports.sEventCapsQueryResponse = zod_1.z.array(zod_1.z.string());
|
|
13
13
|
// Dictionary of request schemas by query type
|
package/dist/world-objects.js
CHANGED