@awarevue/api-types 2.0.1 → 2.0.3

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.
@@ -1623,7 +1623,6 @@ export declare const responseSchemasByType: {
1623
1623
  id: import("zod").ZodString;
1624
1624
  status: import("zod").ZodString;
1625
1625
  size: import("zod").ZodOptional<import("zod").ZodString>;
1626
- exportId: import("zod").ZodOptional<import("zod").ZodString>;
1627
1626
  expires: import("zod").ZodOptional<import("zod").ZodNumber>;
1628
1627
  }, "strip", import("zod").ZodTypeAny, {
1629
1628
  name: string;
@@ -1632,7 +1631,6 @@ export declare const responseSchemasByType: {
1632
1631
  id: string;
1633
1632
  status: string;
1634
1633
  size?: string | undefined;
1635
- exportId?: string | undefined;
1636
1634
  expires?: number | undefined;
1637
1635
  }, {
1638
1636
  name: string;
@@ -1641,7 +1639,6 @@ export declare const responseSchemasByType: {
1641
1639
  id: string;
1642
1640
  status: string;
1643
1641
  size?: string | undefined;
1644
- exportId?: string | undefined;
1645
1642
  expires?: number | undefined;
1646
1643
  }>, "many">;
1647
1644
  readonly "cctv:recordings-by-time-range": import("zod").ZodArray<import("zod").ZodObject<{
@@ -1,4 +1,24 @@
1
1
  import { z } from 'zod';
2
+ export declare const sCreateExportRequest: z.ZodObject<{
3
+ deviceId: z.ZodString;
4
+ timeFrom: z.ZodNumber;
5
+ timeTo: z.ZodNumber;
6
+ }, "strip", z.ZodTypeAny, {
7
+ deviceId: string;
8
+ timeFrom: number;
9
+ timeTo: number;
10
+ }, {
11
+ deviceId: string;
12
+ timeFrom: number;
13
+ timeTo: number;
14
+ }>;
15
+ export declare const sCreateExportResponse: z.ZodObject<{
16
+ exportId: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ exportId: string;
19
+ }, {
20
+ exportId: string;
21
+ }>;
2
22
  export declare const sRecordingSequence: z.ZodObject<{
3
23
  start: z.ZodNumber;
4
24
  end: z.ZodNumber;
@@ -160,6 +180,8 @@ export declare const sGetLatestFrameRequest: z.ZodObject<{
160
180
  width: number;
161
181
  deviceId: string;
162
182
  }>;
183
+ export type CreateExportRequest = z.infer<typeof sCreateExportRequest>;
184
+ export type CreateExportResponse = z.infer<typeof sCreateExportResponse>;
163
185
  export type RecordingSequence = z.infer<typeof sRecordingSequence>;
164
186
  export type GetRecordingsRequest = z.infer<typeof sGetRecordingsRequest>;
165
187
  export type GetRecordingsResponse = z.infer<typeof sGetRecordingsResponse>;
package/dist/api/media.js CHANGED
@@ -1,8 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sGetLatestFrameRequest = exports.sMediaSearchQueryDto = exports.sSortOptions = exports.sGetObjectThumbnailRequest = exports.sGetObjectSnapshotRequest = exports.sGetScenePreviewClipRequest = exports.sGetPreviewImageRequest = exports.sGetRecordingsResponse = exports.sGetRecordingsRequest = exports.sRecordingSequence = void 0;
3
+ exports.sGetLatestFrameRequest = exports.sMediaSearchQueryDto = exports.sSortOptions = exports.sGetObjectThumbnailRequest = exports.sGetObjectSnapshotRequest = exports.sGetScenePreviewClipRequest = exports.sGetPreviewImageRequest = exports.sGetRecordingsResponse = exports.sGetRecordingsRequest = exports.sRecordingSequence = exports.sCreateExportResponse = exports.sCreateExportRequest = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const query_1 = require("./query");
6
+ exports.sCreateExportRequest = zod_1.z.object({
7
+ deviceId: zod_1.z.string().nonempty(),
8
+ timeFrom: zod_1.z.number().nonnegative(),
9
+ timeTo: zod_1.z.number().nonnegative(),
10
+ });
11
+ exports.sCreateExportResponse = zod_1.z.object({
12
+ exportId: zod_1.z.string().nonempty(),
13
+ });
6
14
  exports.sRecordingSequence = zod_1.z.object({
7
15
  start: zod_1.z.number().nonnegative(),
8
16
  end: zod_1.z.number().nonnegative(),
@@ -785,6 +785,31 @@ export type GetExportLinkArgs = z.infer<typeof sGetExportLinkArgs>;
785
785
  export type GetExportLinkResponse = z.infer<typeof sGetExportLinkResponse>;
786
786
  export declare const QUERY_GET_EXPORTS = "cctv:get-exports";
787
787
  export declare const sGetExportsArgs: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
788
+ export declare const sExportItem: z.ZodObject<{
789
+ name: z.ZodString;
790
+ endTime: z.ZodNumber;
791
+ startTime: z.ZodNumber;
792
+ id: z.ZodString;
793
+ status: z.ZodString;
794
+ size: z.ZodOptional<z.ZodString>;
795
+ expires: z.ZodOptional<z.ZodNumber>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ name: string;
798
+ endTime: number;
799
+ startTime: number;
800
+ id: string;
801
+ status: string;
802
+ size?: string | undefined;
803
+ expires?: number | undefined;
804
+ }, {
805
+ name: string;
806
+ endTime: number;
807
+ startTime: number;
808
+ id: string;
809
+ status: string;
810
+ size?: string | undefined;
811
+ expires?: number | undefined;
812
+ }>;
788
813
  export declare const sGetExportsResponse: z.ZodArray<z.ZodObject<{
789
814
  name: z.ZodString;
790
815
  endTime: z.ZodNumber;
@@ -792,7 +817,6 @@ export declare const sGetExportsResponse: z.ZodArray<z.ZodObject<{
792
817
  id: z.ZodString;
793
818
  status: z.ZodString;
794
819
  size: z.ZodOptional<z.ZodString>;
795
- exportId: z.ZodOptional<z.ZodString>;
796
820
  expires: z.ZodOptional<z.ZodNumber>;
797
821
  }, "strip", z.ZodTypeAny, {
798
822
  name: string;
@@ -801,7 +825,6 @@ export declare const sGetExportsResponse: z.ZodArray<z.ZodObject<{
801
825
  id: string;
802
826
  status: string;
803
827
  size?: string | undefined;
804
- exportId?: string | undefined;
805
828
  expires?: number | undefined;
806
829
  }, {
807
830
  name: string;
@@ -810,10 +833,10 @@ export declare const sGetExportsResponse: z.ZodArray<z.ZodObject<{
810
833
  id: string;
811
834
  status: string;
812
835
  size?: string | undefined;
813
- exportId?: string | undefined;
814
836
  expires?: number | undefined;
815
837
  }>, "many">;
816
838
  export type GetExportsArgs = z.infer<typeof sGetExportsArgs>;
839
+ export type ExportItem = z.infer<typeof sExportItem>;
817
840
  export type GetExportsResponse = z.infer<typeof sGetExportsResponse>;
818
841
  export declare const nvrExporterRequestSchemas: {
819
842
  readonly "cctv:get-export-link": z.ZodObject<{
@@ -840,7 +863,6 @@ export declare const nvrExporterResponseSchemas: {
840
863
  id: z.ZodString;
841
864
  status: z.ZodString;
842
865
  size: z.ZodOptional<z.ZodString>;
843
- exportId: z.ZodOptional<z.ZodString>;
844
866
  expires: z.ZodOptional<z.ZodNumber>;
845
867
  }, "strip", z.ZodTypeAny, {
846
868
  name: string;
@@ -849,7 +871,6 @@ export declare const nvrExporterResponseSchemas: {
849
871
  id: string;
850
872
  status: string;
851
873
  size?: string | undefined;
852
- exportId?: string | undefined;
853
874
  expires?: number | undefined;
854
875
  }, {
855
876
  name: string;
@@ -858,7 +879,6 @@ export declare const nvrExporterResponseSchemas: {
858
879
  id: string;
859
880
  status: string;
860
881
  size?: string | undefined;
861
- exportId?: string | undefined;
862
882
  expires?: number | undefined;
863
883
  }>, "many">;
864
884
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nvrExporterResponseSchemas = exports.nvrExporterRequestSchemas = exports.sGetExportsResponse = exports.sGetExportsArgs = exports.QUERY_GET_EXPORTS = exports.sGetExportLinkResponse = exports.sGetExportLinkArgs = exports.QUERY_GET_EXPORT_LINK = exports.nvrExporterEventSchemasByKind = exports.sExportDeleted = exports.sExportStarted = exports.sDeleteExportCommand = exports.sStartExportCommand = exports.sExporterStateDto = exports.sExporterSpecs = exports.NVR_EXPORTER = void 0;
3
+ exports.nvrExporterResponseSchemas = exports.nvrExporterRequestSchemas = exports.sGetExportsResponse = exports.sExportItem = exports.sGetExportsArgs = exports.QUERY_GET_EXPORTS = exports.sGetExportLinkResponse = exports.sGetExportLinkArgs = exports.QUERY_GET_EXPORT_LINK = exports.nvrExporterEventSchemasByKind = exports.sExportDeleted = exports.sExportStarted = exports.sDeleteExportCommand = exports.sStartExportCommand = exports.sExporterStateDto = exports.sExporterSpecs = exports.NVR_EXPORTER = void 0;
4
4
  const primitives_1 = require("../primitives");
5
5
  const zod_1 = require("zod");
6
6
  exports.NVR_EXPORTER = 'nvr-exporter';
@@ -55,16 +55,16 @@ exports.sGetExportLinkResponse = zod_1.z.object({
55
55
  // -- Get Exports
56
56
  exports.QUERY_GET_EXPORTS = 'cctv:get-exports';
57
57
  exports.sGetExportsArgs = zod_1.z.object({});
58
- exports.sGetExportsResponse = zod_1.z.array(zod_1.z.object({
58
+ exports.sExportItem = zod_1.z.object({
59
59
  name: zod_1.z.string().nonempty(),
60
60
  endTime: zod_1.z.number().int().nonnegative(),
61
61
  startTime: zod_1.z.number().int().nonnegative(),
62
62
  id: zod_1.z.string().nonempty(),
63
63
  status: zod_1.z.string().nonempty(),
64
64
  size: zod_1.z.string().nonempty().optional(),
65
- exportId: zod_1.z.string().nonempty().optional(),
66
65
  expires: zod_1.z.number().int().nonnegative().optional(),
67
- }));
66
+ });
67
+ exports.sGetExportsResponse = zod_1.z.array(exports.sExportItem);
68
68
  // Dictionary of request schemas by query type
69
69
  exports.nvrExporterRequestSchemas = {
70
70
  [exports.QUERY_GET_EXPORT_LINK]: exports.sGetExportLinkArgs,
package/dist/index.d.ts CHANGED
@@ -35,4 +35,3 @@ export * from './bookmarks';
35
35
  export * from './objects';
36
36
  export * from './primitives';
37
37
  export * from './api-keys';
38
- export * from './export';
package/dist/index.js CHANGED
@@ -51,4 +51,3 @@ __exportStar(require("./bookmarks"), exports);
51
51
  __exportStar(require("./objects"), exports);
52
52
  __exportStar(require("./primitives"), exports);
53
53
  __exportStar(require("./api-keys"), exports);
54
- __exportStar(require("./export"), exports);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
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": "2.0.1",
3
+ "version": "2.0.3",
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/dist/export.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const sExport: z.ZodObject<{
3
- id: z.ZodString;
4
- name: z.ZodString;
5
- startTime: z.ZodNumber;
6
- endTime: z.ZodNumber;
7
- status: z.ZodString;
8
- exportId: z.ZodOptional<z.ZodString>;
9
- expires: z.ZodOptional<z.ZodNumber>;
10
- size: z.ZodOptional<z.ZodString>;
11
- }, "strip", z.ZodTypeAny, {
12
- name: string;
13
- endTime: number;
14
- startTime: number;
15
- id: string;
16
- status: string;
17
- size?: string | undefined;
18
- exportId?: string | undefined;
19
- expires?: number | undefined;
20
- }, {
21
- name: string;
22
- endTime: number;
23
- startTime: number;
24
- id: string;
25
- status: string;
26
- size?: string | undefined;
27
- exportId?: string | undefined;
28
- expires?: number | undefined;
29
- }>;
30
- export type Export = z.infer<typeof sExport>;
package/dist/export.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sExport = void 0;
4
- const zod_1 = require("zod");
5
- exports.sExport = zod_1.z.object({
6
- id: zod_1.z.string().nonempty(),
7
- name: zod_1.z.string().nonempty(),
8
- startTime: zod_1.z.number().min(0),
9
- endTime: zod_1.z.number().min(0),
10
- status: zod_1.z.string().nonempty(),
11
- exportId: zod_1.z.string().optional(),
12
- expires: zod_1.z.number().optional(),
13
- size: zod_1.z.string().optional(),
14
- });