@awarevue/api-types 1.0.63 → 1.0.64

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.
@@ -0,0 +1,312 @@
1
+ import { z } from 'zod';
2
+ export declare const QUERY_RECORDINGS_BY_TIME_RANGE = "cctv:recordings-by-time-range";
3
+ export declare const QUERY_MEDIA_SEARCH = "cctv:media-search";
4
+ export declare const QUERY_RTSP_DATA = "cctv:rtsp-data";
5
+ export declare const QUERY_PREVIEW_IMAGE = "cctv:preview-image";
6
+ export declare const QUERY_CAMERA_LATEST_FRAME = "cctv:latest-frame";
7
+ export declare const QUERY_SCENE_PREVIEW_CLIP = "cctv:scene-preview-clip";
8
+ export declare const QUERY_OBJECT_SNAPSHOT = "cctv:object-snapshot";
9
+ export declare const QUERY_OBJECT_THUMBNAIL = "cctv:object-thumbnail";
10
+ export declare const sRecordingsByTimeRangeArgs: z.ZodObject<{
11
+ timeFrom: z.ZodNumber;
12
+ timeTo: z.ZodNumber;
13
+ }, "strip", z.ZodTypeAny, {
14
+ timeFrom: number;
15
+ timeTo: number;
16
+ }, {
17
+ timeFrom: number;
18
+ timeTo: number;
19
+ }>;
20
+ export declare const sMediaSearchArgs: z.ZodObject<{
21
+ devices: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
22
+ limit: z.ZodOptional<z.ZodNumber>;
23
+ q: z.ZodOptional<z.ZodString>;
24
+ similarTo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
25
+ label: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
+ timeFrom: z.ZodOptional<z.ZodNumber>;
27
+ timeTo: z.ZodOptional<z.ZodNumber>;
28
+ sortBy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"time_asc">, z.ZodLiteral<"time_desc">]>>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ label?: string[] | undefined;
31
+ q?: string | undefined;
32
+ devices?: any[] | undefined;
33
+ limit?: number | undefined;
34
+ timeFrom?: number | undefined;
35
+ timeTo?: number | undefined;
36
+ similarTo?: string | undefined;
37
+ sortBy?: "time_asc" | "time_desc" | undefined;
38
+ }, {
39
+ label?: string[] | undefined;
40
+ q?: string | undefined;
41
+ devices?: any[] | undefined;
42
+ limit?: number | undefined;
43
+ timeFrom?: number | undefined;
44
+ timeTo?: number | undefined;
45
+ similarTo?: string | undefined;
46
+ sortBy?: "time_asc" | "time_desc" | undefined;
47
+ }>;
48
+ export declare const sRtspDataArgs: z.ZodNull;
49
+ export declare const sPreviewImageArgs: z.ZodObject<{
50
+ time: z.ZodNumber;
51
+ height: z.ZodNumber;
52
+ }, "strip", z.ZodTypeAny, {
53
+ time: number;
54
+ height: number;
55
+ }, {
56
+ time: number;
57
+ height: number;
58
+ }>;
59
+ export declare const sCameraLatestFrameArgs: z.ZodObject<{
60
+ width: z.ZodNumber;
61
+ height: z.ZodNumber;
62
+ }, "strip", z.ZodTypeAny, {
63
+ height: number;
64
+ width: number;
65
+ }, {
66
+ height: number;
67
+ width: number;
68
+ }>;
69
+ export declare const sScenePreviewClipArgs: z.ZodObject<{
70
+ providerAssignedRef: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ providerAssignedRef: string;
73
+ }, {
74
+ providerAssignedRef: string;
75
+ }>;
76
+ export declare const sObjectSnapshotArgs: z.ZodObject<{
77
+ providerAssignedRef: z.ZodString;
78
+ height: z.ZodOptional<z.ZodNumber>;
79
+ quality: z.ZodOptional<z.ZodNumber>;
80
+ crop: z.ZodBoolean;
81
+ boxes: z.ZodBoolean;
82
+ }, "strip", z.ZodTypeAny, {
83
+ providerAssignedRef: string;
84
+ crop: boolean;
85
+ boxes: boolean;
86
+ height?: number | undefined;
87
+ quality?: number | undefined;
88
+ }, {
89
+ providerAssignedRef: string;
90
+ crop: boolean;
91
+ boxes: boolean;
92
+ height?: number | undefined;
93
+ quality?: number | undefined;
94
+ }>;
95
+ export declare const sObjectThumbnailArgs: z.ZodObject<{
96
+ providerAssignedRef: z.ZodString;
97
+ }, "strip", z.ZodTypeAny, {
98
+ providerAssignedRef: string;
99
+ }, {
100
+ providerAssignedRef: string;
101
+ }>;
102
+ export declare const sRecordingsResponse: z.ZodArray<z.ZodAny, "many">;
103
+ export declare const sMediaSearchResponse: z.ZodArray<z.ZodAny, "many">;
104
+ export declare const sRtspDataResponse: z.ZodObject<{
105
+ cameraName: z.ZodString;
106
+ username: z.ZodString;
107
+ password: z.ZodString;
108
+ streams: z.ZodArray<z.ZodObject<{
109
+ resolution: z.ZodNullable<z.ZodString>;
110
+ rtspUrl: z.ZodString;
111
+ }, "strip", z.ZodTypeAny, {
112
+ resolution: string | null;
113
+ rtspUrl: string;
114
+ }, {
115
+ resolution: string | null;
116
+ rtspUrl: string;
117
+ }>, "many">;
118
+ }, "strip", z.ZodTypeAny, {
119
+ streams: {
120
+ resolution: string | null;
121
+ rtspUrl: string;
122
+ }[];
123
+ username: string;
124
+ password: string;
125
+ cameraName: string;
126
+ }, {
127
+ streams: {
128
+ resolution: string | null;
129
+ rtspUrl: string;
130
+ }[];
131
+ username: string;
132
+ password: string;
133
+ cameraName: string;
134
+ }>;
135
+ export declare const sPreviewImageResponse: z.ZodNever;
136
+ export declare const sCameraLatestFrameResponse: z.ZodNever;
137
+ export declare const sScenePreviewClipResponse: z.ZodNever;
138
+ export declare const sObjectSnapshotResponse: z.ZodNever;
139
+ export declare const sObjectThumbnailResponse: z.ZodNever;
140
+ export type RecordingsByTimeRangeArgs = z.infer<typeof sRecordingsByTimeRangeArgs>;
141
+ export type MediaSearchArgs = z.infer<typeof sMediaSearchArgs>;
142
+ export type RtspDataArgs = z.infer<typeof sRtspDataArgs>;
143
+ export type PreviewImageArgs = z.infer<typeof sPreviewImageArgs>;
144
+ export type CameraLatestFrameArgs = z.infer<typeof sCameraLatestFrameArgs>;
145
+ export type ScenePreviewClipArgs = z.infer<typeof sScenePreviewClipArgs>;
146
+ export type ObjectSnapshotArgs = z.infer<typeof sObjectSnapshotArgs>;
147
+ export type ObjectThumbnailArgs = z.infer<typeof sObjectThumbnailArgs>;
148
+ export type RecordingsResponse = z.infer<typeof sRecordingsResponse>;
149
+ export type MediaSearchResponse = z.infer<typeof sMediaSearchResponse>;
150
+ export type RtspDataResponse = z.infer<typeof sRtspDataResponse>;
151
+ export type PreviewImageResponse = z.infer<typeof sPreviewImageResponse>;
152
+ export type CameraLatestFrameResponse = z.infer<typeof sCameraLatestFrameResponse>;
153
+ export type ScenePreviewClipResponse = z.infer<typeof sScenePreviewClipResponse>;
154
+ export type ObjectSnapshotResponse = z.infer<typeof sObjectSnapshotResponse>;
155
+ export type ObjectThumbnailResponse = z.infer<typeof sObjectThumbnailResponse>;
156
+ export declare const requestSchemasByType: {
157
+ readonly "cctv:recordings-by-time-range": z.ZodObject<{
158
+ timeFrom: z.ZodNumber;
159
+ timeTo: z.ZodNumber;
160
+ }, "strip", z.ZodTypeAny, {
161
+ timeFrom: number;
162
+ timeTo: number;
163
+ }, {
164
+ timeFrom: number;
165
+ timeTo: number;
166
+ }>;
167
+ readonly "cctv:media-search": z.ZodObject<{
168
+ devices: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
169
+ limit: z.ZodOptional<z.ZodNumber>;
170
+ q: z.ZodOptional<z.ZodString>;
171
+ similarTo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
172
+ label: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
173
+ timeFrom: z.ZodOptional<z.ZodNumber>;
174
+ timeTo: z.ZodOptional<z.ZodNumber>;
175
+ sortBy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"time_asc">, z.ZodLiteral<"time_desc">]>>;
176
+ }, "strip", z.ZodTypeAny, {
177
+ label?: string[] | undefined;
178
+ q?: string | undefined;
179
+ devices?: any[] | undefined;
180
+ limit?: number | undefined;
181
+ timeFrom?: number | undefined;
182
+ timeTo?: number | undefined;
183
+ similarTo?: string | undefined;
184
+ sortBy?: "time_asc" | "time_desc" | undefined;
185
+ }, {
186
+ label?: string[] | undefined;
187
+ q?: string | undefined;
188
+ devices?: any[] | undefined;
189
+ limit?: number | undefined;
190
+ timeFrom?: number | undefined;
191
+ timeTo?: number | undefined;
192
+ similarTo?: string | undefined;
193
+ sortBy?: "time_asc" | "time_desc" | undefined;
194
+ }>;
195
+ readonly "cctv:rtsp-data": z.ZodNull;
196
+ readonly "cctv:preview-image": z.ZodObject<{
197
+ time: z.ZodNumber;
198
+ height: z.ZodNumber;
199
+ }, "strip", z.ZodTypeAny, {
200
+ time: number;
201
+ height: number;
202
+ }, {
203
+ time: number;
204
+ height: number;
205
+ }>;
206
+ readonly "cctv:latest-frame": z.ZodObject<{
207
+ width: z.ZodNumber;
208
+ height: z.ZodNumber;
209
+ }, "strip", z.ZodTypeAny, {
210
+ height: number;
211
+ width: number;
212
+ }, {
213
+ height: number;
214
+ width: number;
215
+ }>;
216
+ readonly "cctv:scene-preview-clip": z.ZodObject<{
217
+ providerAssignedRef: z.ZodString;
218
+ }, "strip", z.ZodTypeAny, {
219
+ providerAssignedRef: string;
220
+ }, {
221
+ providerAssignedRef: string;
222
+ }>;
223
+ readonly "cctv:object-snapshot": z.ZodObject<{
224
+ providerAssignedRef: z.ZodString;
225
+ height: z.ZodOptional<z.ZodNumber>;
226
+ quality: z.ZodOptional<z.ZodNumber>;
227
+ crop: z.ZodBoolean;
228
+ boxes: z.ZodBoolean;
229
+ }, "strip", z.ZodTypeAny, {
230
+ providerAssignedRef: string;
231
+ crop: boolean;
232
+ boxes: boolean;
233
+ height?: number | undefined;
234
+ quality?: number | undefined;
235
+ }, {
236
+ providerAssignedRef: string;
237
+ crop: boolean;
238
+ boxes: boolean;
239
+ height?: number | undefined;
240
+ quality?: number | undefined;
241
+ }>;
242
+ readonly "cctv:object-thumbnail": z.ZodObject<{
243
+ providerAssignedRef: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ providerAssignedRef: string;
246
+ }, {
247
+ providerAssignedRef: string;
248
+ }>;
249
+ };
250
+ export declare const responseSchemasByType: {
251
+ readonly "cctv:recordings-by-time-range": z.ZodArray<z.ZodAny, "many">;
252
+ readonly "cctv:media-search": z.ZodArray<z.ZodAny, "many">;
253
+ readonly "cctv:rtsp-data": z.ZodObject<{
254
+ cameraName: z.ZodString;
255
+ username: z.ZodString;
256
+ password: z.ZodString;
257
+ streams: z.ZodArray<z.ZodObject<{
258
+ resolution: z.ZodNullable<z.ZodString>;
259
+ rtspUrl: z.ZodString;
260
+ }, "strip", z.ZodTypeAny, {
261
+ resolution: string | null;
262
+ rtspUrl: string;
263
+ }, {
264
+ resolution: string | null;
265
+ rtspUrl: string;
266
+ }>, "many">;
267
+ }, "strip", z.ZodTypeAny, {
268
+ streams: {
269
+ resolution: string | null;
270
+ rtspUrl: string;
271
+ }[];
272
+ username: string;
273
+ password: string;
274
+ cameraName: string;
275
+ }, {
276
+ streams: {
277
+ resolution: string | null;
278
+ rtspUrl: string;
279
+ }[];
280
+ username: string;
281
+ password: string;
282
+ cameraName: string;
283
+ }>;
284
+ readonly "cctv:preview-image": z.ZodNever;
285
+ readonly "cctv:latest-frame": z.ZodNever;
286
+ readonly "cctv:scene-preview-clip": z.ZodNever;
287
+ readonly "cctv:object-snapshot": z.ZodNever;
288
+ readonly "cctv:object-thumbnail": z.ZodNever;
289
+ };
290
+ export type QueryRequestMap = {
291
+ [QUERY_RECORDINGS_BY_TIME_RANGE]: RecordingsByTimeRangeArgs;
292
+ [QUERY_MEDIA_SEARCH]: MediaSearchArgs;
293
+ [QUERY_RTSP_DATA]: RtspDataArgs;
294
+ [QUERY_PREVIEW_IMAGE]: PreviewImageArgs;
295
+ [QUERY_CAMERA_LATEST_FRAME]: CameraLatestFrameArgs;
296
+ [QUERY_SCENE_PREVIEW_CLIP]: ScenePreviewClipArgs;
297
+ [QUERY_OBJECT_SNAPSHOT]: ObjectSnapshotArgs;
298
+ [QUERY_OBJECT_THUMBNAIL]: ObjectThumbnailArgs;
299
+ };
300
+ export type QueryResponseMap = {
301
+ [QUERY_RECORDINGS_BY_TIME_RANGE]: RecordingsResponse;
302
+ [QUERY_MEDIA_SEARCH]: MediaSearchResponse;
303
+ [QUERY_RTSP_DATA]: RtspDataResponse;
304
+ [QUERY_PREVIEW_IMAGE]: PreviewImageResponse;
305
+ [QUERY_CAMERA_LATEST_FRAME]: CameraLatestFrameResponse;
306
+ [QUERY_SCENE_PREVIEW_CLIP]: ScenePreviewClipResponse;
307
+ [QUERY_OBJECT_SNAPSHOT]: ObjectSnapshotResponse;
308
+ [QUERY_OBJECT_THUMBNAIL]: ObjectThumbnailResponse;
309
+ };
310
+ export type QueryType = keyof QueryRequestMap;
311
+ export type RequestForQuery<T extends QueryType> = QueryRequestMap[T];
312
+ export type ResponseForQuery<T extends QueryType> = QueryResponseMap[T];
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.responseSchemasByType = exports.requestSchemasByType = exports.sObjectThumbnailResponse = exports.sObjectSnapshotResponse = exports.sScenePreviewClipResponse = exports.sCameraLatestFrameResponse = exports.sPreviewImageResponse = exports.sRtspDataResponse = exports.sMediaSearchResponse = exports.sRecordingsResponse = exports.sObjectThumbnailArgs = exports.sObjectSnapshotArgs = exports.sScenePreviewClipArgs = exports.sCameraLatestFrameArgs = exports.sPreviewImageArgs = exports.sRtspDataArgs = exports.sMediaSearchArgs = exports.sRecordingsByTimeRangeArgs = exports.QUERY_OBJECT_THUMBNAIL = exports.QUERY_OBJECT_SNAPSHOT = exports.QUERY_SCENE_PREVIEW_CLIP = exports.QUERY_CAMERA_LATEST_FRAME = exports.QUERY_PREVIEW_IMAGE = exports.QUERY_RTSP_DATA = exports.QUERY_MEDIA_SEARCH = exports.QUERY_RECORDINGS_BY_TIME_RANGE = void 0;
4
+ const api_1 = require("src/api");
5
+ const zod_1 = require("zod");
6
+ // Query constants
7
+ exports.QUERY_RECORDINGS_BY_TIME_RANGE = 'cctv:recordings-by-time-range';
8
+ exports.QUERY_MEDIA_SEARCH = 'cctv:media-search';
9
+ exports.QUERY_RTSP_DATA = 'cctv:rtsp-data';
10
+ exports.QUERY_PREVIEW_IMAGE = 'cctv:preview-image';
11
+ exports.QUERY_CAMERA_LATEST_FRAME = 'cctv:latest-frame';
12
+ exports.QUERY_SCENE_PREVIEW_CLIP = 'cctv:scene-preview-clip';
13
+ exports.QUERY_OBJECT_SNAPSHOT = 'cctv:object-snapshot';
14
+ exports.QUERY_OBJECT_THUMBNAIL = 'cctv:object-thumbnail';
15
+ // Zod schemas for request args
16
+ exports.sRecordingsByTimeRangeArgs = zod_1.z.object({
17
+ timeFrom: zod_1.z.number(),
18
+ timeTo: zod_1.z.number(),
19
+ });
20
+ exports.sMediaSearchArgs = zod_1.z
21
+ .object({
22
+ devices: zod_1.z.array(zod_1.z.any()).optional(),
23
+ limit: zod_1.z.number().nonnegative(),
24
+ q: zod_1.z.string(),
25
+ similarTo: zod_1.z.string().optional(),
26
+ label: zod_1.z.array(zod_1.z.string().nonempty()),
27
+ timeFrom: zod_1.z.number().nonnegative(),
28
+ timeTo: zod_1.z.number().nonnegative(),
29
+ sortBy: api_1.sSortOptions,
30
+ })
31
+ .partial();
32
+ exports.sRtspDataArgs = zod_1.z.null();
33
+ exports.sPreviewImageArgs = zod_1.z.object({
34
+ time: zod_1.z.number(),
35
+ height: zod_1.z.number(),
36
+ });
37
+ exports.sCameraLatestFrameArgs = zod_1.z.object({
38
+ width: zod_1.z.number(),
39
+ height: zod_1.z.number(),
40
+ });
41
+ exports.sScenePreviewClipArgs = zod_1.z.object({
42
+ providerAssignedRef: zod_1.z.string(),
43
+ });
44
+ exports.sObjectSnapshotArgs = zod_1.z.object({
45
+ providerAssignedRef: zod_1.z.string(),
46
+ height: zod_1.z.number().optional(),
47
+ quality: zod_1.z.number().optional(),
48
+ crop: zod_1.z.boolean(),
49
+ boxes: zod_1.z.boolean(),
50
+ });
51
+ exports.sObjectThumbnailArgs = zod_1.z.object({
52
+ providerAssignedRef: zod_1.z.string(),
53
+ });
54
+ // Zod schemas for responses
55
+ exports.sRecordingsResponse = zod_1.z.array(zod_1.z.any()); // RecordingSequence[] - using z.any() as RecordingSequence might be complex
56
+ exports.sMediaSearchResponse = zod_1.z.array(zod_1.z.any()); // MediaSearchMatchDto[] - using z.any() as MediaSearchMatchDto might be complex
57
+ exports.sRtspDataResponse = zod_1.z.object({
58
+ cameraName: zod_1.z.string(),
59
+ username: zod_1.z.string(),
60
+ password: zod_1.z.string(),
61
+ streams: zod_1.z.array(zod_1.z.object({
62
+ resolution: zod_1.z.string().nullable(),
63
+ rtspUrl: zod_1.z.string(),
64
+ })),
65
+ });
66
+ // File download responses are typed as never since they return file downloads
67
+ exports.sPreviewImageResponse = zod_1.z.never();
68
+ exports.sCameraLatestFrameResponse = zod_1.z.never();
69
+ exports.sScenePreviewClipResponse = zod_1.z.never();
70
+ exports.sObjectSnapshotResponse = zod_1.z.never();
71
+ exports.sObjectThumbnailResponse = zod_1.z.never();
72
+ // Dictionary of request schemas by query type
73
+ exports.requestSchemasByType = {
74
+ [exports.QUERY_RECORDINGS_BY_TIME_RANGE]: exports.sRecordingsByTimeRangeArgs,
75
+ [exports.QUERY_MEDIA_SEARCH]: exports.sMediaSearchArgs,
76
+ [exports.QUERY_RTSP_DATA]: exports.sRtspDataArgs,
77
+ [exports.QUERY_PREVIEW_IMAGE]: exports.sPreviewImageArgs,
78
+ [exports.QUERY_CAMERA_LATEST_FRAME]: exports.sCameraLatestFrameArgs,
79
+ [exports.QUERY_SCENE_PREVIEW_CLIP]: exports.sScenePreviewClipArgs,
80
+ [exports.QUERY_OBJECT_SNAPSHOT]: exports.sObjectSnapshotArgs,
81
+ [exports.QUERY_OBJECT_THUMBNAIL]: exports.sObjectThumbnailArgs,
82
+ };
83
+ // Dictionary of response schemas by query type
84
+ exports.responseSchemasByType = {
85
+ [exports.QUERY_RECORDINGS_BY_TIME_RANGE]: exports.sRecordingsResponse,
86
+ [exports.QUERY_MEDIA_SEARCH]: exports.sMediaSearchResponse,
87
+ [exports.QUERY_RTSP_DATA]: exports.sRtspDataResponse,
88
+ [exports.QUERY_PREVIEW_IMAGE]: exports.sPreviewImageResponse,
89
+ [exports.QUERY_CAMERA_LATEST_FRAME]: exports.sCameraLatestFrameResponse,
90
+ [exports.QUERY_SCENE_PREVIEW_CLIP]: exports.sScenePreviewClipResponse,
91
+ [exports.QUERY_OBJECT_SNAPSHOT]: exports.sObjectSnapshotResponse,
92
+ [exports.QUERY_OBJECT_THUMBNAIL]: exports.sObjectThumbnailResponse,
93
+ };
@@ -125,6 +125,7 @@ export declare const sGetExportLinkResponse: z.ZodObject<{
125
125
  }, {
126
126
  relativeUrl: string;
127
127
  }>;
128
+ export declare const sSortOptions: z.ZodUnion<[z.ZodLiteral<"time_asc">, z.ZodLiteral<"time_desc">]>;
128
129
  export declare const sMediaSearchQueryDto: z.ZodObject<{
129
130
  limit: z.ZodOptional<z.ZodNumber>;
130
131
  q: z.ZodOptional<z.ZodString>;
package/dist/api/media.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sGetLatestFrameRequest = exports.sMediaSearchQueryDto = exports.sGetExportLinkResponse = exports.sGetObjectThumbnailRequest = exports.sGetObjectSnapshotRequest = exports.sGetScenePreviewClipRequest = exports.sGetPreviewImageRequest = exports.sGetRecordingsResponse = exports.sGetRecordingsRequest = exports.sRecordingSequence = void 0;
3
+ exports.sGetLatestFrameRequest = exports.sMediaSearchQueryDto = exports.sSortOptions = exports.sGetExportLinkResponse = exports.sGetObjectThumbnailRequest = exports.sGetObjectSnapshotRequest = exports.sGetScenePreviewClipRequest = exports.sGetPreviewImageRequest = exports.sGetRecordingsResponse = exports.sGetRecordingsRequest = exports.sRecordingSequence = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const query_1 = require("./query");
6
6
  exports.sRecordingSequence = zod_1.z.object({
@@ -39,7 +39,10 @@ exports.sGetObjectThumbnailRequest = zod_1.z.object({
39
39
  exports.sGetExportLinkResponse = zod_1.z.object({
40
40
  relativeUrl: zod_1.z.string().nonempty(),
41
41
  });
42
- const sSortOptions = zod_1.z.union([zod_1.z.literal('time_asc'), zod_1.z.literal('time_desc')]);
42
+ exports.sSortOptions = zod_1.z.union([
43
+ zod_1.z.literal('time_asc'),
44
+ zod_1.z.literal('time_desc'),
45
+ ]);
43
46
  exports.sMediaSearchQueryDto = zod_1.z
44
47
  .object({
45
48
  limit: zod_1.z.number().nonnegative(),
@@ -49,7 +52,7 @@ exports.sMediaSearchQueryDto = zod_1.z
49
52
  label: zod_1.z.array(zod_1.z.string().nonempty()),
50
53
  timeFrom: zod_1.z.number().nonnegative(),
51
54
  timeTo: zod_1.z.number().nonnegative(),
52
- sortBy: sSortOptions,
55
+ sortBy: exports.sSortOptions,
53
56
  })
54
57
  .partial();
55
58
  exports.sGetLatestFrameRequest = zod_1.z.object({
@@ -83,8 +83,12 @@ export declare const sAutomationRuleProps: z.ZodObject<{
83
83
  runIf?: string | undefined;
84
84
  }>;
85
85
  enabled: z.ZodBoolean;
86
+ exclusivityGroup: z.ZodNullable<z.ZodString>;
87
+ score: z.ZodNullable<z.ZodNumber>;
88
+ module: z.ZodNullable<z.ZodString>;
86
89
  }, "strip", z.ZodTypeAny, {
87
90
  code: string | null;
91
+ module: string | null;
88
92
  body: {
89
93
  onEvent: string;
90
94
  commands: {
@@ -96,9 +100,12 @@ export declare const sAutomationRuleProps: z.ZodObject<{
96
100
  };
97
101
  displayName: string;
98
102
  enabled: boolean;
103
+ exclusivityGroup: string | null;
104
+ score: number | null;
99
105
  description?: string | undefined;
100
106
  }, {
101
107
  code: string | null;
108
+ module: string | null;
102
109
  body: {
103
110
  onEvent: string;
104
111
  commands: {
@@ -110,6 +117,8 @@ export declare const sAutomationRuleProps: z.ZodObject<{
110
117
  };
111
118
  displayName: string;
112
119
  enabled: boolean;
120
+ exclusivityGroup: string | null;
121
+ score: number | null;
113
122
  description?: string | undefined;
114
123
  }>;
115
124
  export declare const sAddAutomationRuleRequest: z.ZodObject<{
@@ -150,8 +159,12 @@ export declare const sAddAutomationRuleRequest: z.ZodObject<{
150
159
  runIf?: string | undefined;
151
160
  }>;
152
161
  enabled: z.ZodBoolean;
162
+ exclusivityGroup: z.ZodNullable<z.ZodString>;
163
+ score: z.ZodNullable<z.ZodNumber>;
164
+ module: z.ZodNullable<z.ZodString>;
153
165
  }, "strip", z.ZodTypeAny, {
154
166
  code: string | null;
167
+ module: string | null;
155
168
  body: {
156
169
  onEvent: string;
157
170
  commands: {
@@ -163,9 +176,12 @@ export declare const sAddAutomationRuleRequest: z.ZodObject<{
163
176
  };
164
177
  displayName: string;
165
178
  enabled: boolean;
179
+ exclusivityGroup: string | null;
180
+ score: number | null;
166
181
  description?: string | undefined;
167
182
  }, {
168
183
  code: string | null;
184
+ module: string | null;
169
185
  body: {
170
186
  onEvent: string;
171
187
  commands: {
@@ -177,6 +193,8 @@ export declare const sAddAutomationRuleRequest: z.ZodObject<{
177
193
  };
178
194
  displayName: string;
179
195
  enabled: boolean;
196
+ exclusivityGroup: string | null;
197
+ score: number | null;
180
198
  description?: string | undefined;
181
199
  }>;
182
200
  export declare const sUpdateAutomationRule: z.ZodObject<{
@@ -217,11 +235,15 @@ export declare const sUpdateAutomationRule: z.ZodObject<{
217
235
  runIf?: string | undefined;
218
236
  }>>;
219
237
  enabled: z.ZodOptional<z.ZodBoolean>;
238
+ exclusivityGroup: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
240
+ module: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
241
  } & {
221
242
  id: z.ZodString;
222
243
  }, "strip", z.ZodTypeAny, {
223
244
  id: string;
224
245
  code?: string | null | undefined;
246
+ module?: string | null | undefined;
225
247
  body?: {
226
248
  onEvent: string;
227
249
  commands: {
@@ -234,9 +256,12 @@ export declare const sUpdateAutomationRule: z.ZodObject<{
234
256
  description?: string | undefined;
235
257
  displayName?: string | undefined;
236
258
  enabled?: boolean | undefined;
259
+ exclusivityGroup?: string | null | undefined;
260
+ score?: number | null | undefined;
237
261
  }, {
238
262
  id: string;
239
263
  code?: string | null | undefined;
264
+ module?: string | null | undefined;
240
265
  body?: {
241
266
  onEvent: string;
242
267
  commands: {
@@ -249,10 +274,13 @@ export declare const sUpdateAutomationRule: z.ZodObject<{
249
274
  description?: string | undefined;
250
275
  displayName?: string | undefined;
251
276
  enabled?: boolean | undefined;
277
+ exclusivityGroup?: string | null | undefined;
278
+ score?: number | null | undefined;
252
279
  }>;
253
280
  export declare const sAutomationRuleDto: z.ZodObject<{
254
281
  displayName: z.ZodString;
255
282
  description: z.ZodOptional<z.ZodString>;
283
+ code: z.ZodNullable<z.ZodString>;
256
284
  body: z.ZodObject<{
257
285
  onEvent: z.ZodString;
258
286
  runIf: z.ZodOptional<z.ZodString>;
@@ -287,12 +315,11 @@ export declare const sAutomationRuleDto: z.ZodObject<{
287
315
  runIf?: string | undefined;
288
316
  }>;
289
317
  enabled: z.ZodBoolean;
290
- } & {
291
- id: z.ZodString;
292
318
  exclusivityGroup: z.ZodNullable<z.ZodString>;
293
319
  score: z.ZodNullable<z.ZodNumber>;
294
320
  module: z.ZodNullable<z.ZodString>;
295
- code: z.ZodNullable<z.ZodString>;
321
+ } & {
322
+ id: z.ZodString;
296
323
  createdOn: z.ZodString;
297
324
  lastModifiedOn: z.ZodString;
298
325
  }, "strip", z.ZodTypeAny, {
@@ -34,13 +34,6 @@ exports.sAutomationRuleProps = zod_1.z.object({
34
34
  code: zod_1.z.string().nullable().describe('The code of the automation rule'),
35
35
  body: exports.sAutomationRuleBody.describe('The body of the automation rule'),
36
36
  enabled: zod_1.z.boolean().describe('Whether the automation rule is enabled'),
37
- });
38
- exports.sAddAutomationRuleRequest = exports.sAutomationRuleProps;
39
- exports.sUpdateAutomationRule = exports.sAutomationRuleProps.partial().merge(zod_1.z.object({
40
- id: zod_1.z.string().describe('The ID of the automation rule'),
41
- }));
42
- exports.sAutomationRuleDto = exports.sAutomationRuleProps.merge(zod_1.z.object({
43
- id: zod_1.z.string().describe('The ID of the automation rule'),
44
37
  exclusivityGroup: zod_1.z
45
38
  .string()
46
39
  .nullable()
@@ -50,7 +43,13 @@ exports.sAutomationRuleDto = exports.sAutomationRuleProps.merge(zod_1.z.object({
50
43
  .string()
51
44
  .nullable()
52
45
  .describe('The module the automation rule belongs to'),
53
- code: zod_1.z.string().nullable().describe('The code of the automation rule'),
46
+ });
47
+ exports.sAddAutomationRuleRequest = exports.sAutomationRuleProps;
48
+ exports.sUpdateAutomationRule = exports.sAutomationRuleProps.partial().merge(zod_1.z.object({
49
+ id: zod_1.z.string().describe('The ID of the automation rule'),
50
+ }));
51
+ exports.sAutomationRuleDto = exports.sAutomationRuleProps.merge(zod_1.z.object({
52
+ id: zod_1.z.string().describe('The ID of the automation rule'),
54
53
  createdOn: zod_1.z.string().describe('The date the automation rule was created'),
55
54
  lastModifiedOn: zod_1.z
56
55
  .string()
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",