@awarevue/api-types 2.0.147 → 2.0.149

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.
@@ -71,7 +71,7 @@ export type AccessPathActivated = z.infer<typeof sAccessPathActivated>;
71
71
  export declare const sTimeZoneChanged: z.ZodObject<{
72
72
  kind: z.ZodLiteral<"time-zone-changed">;
73
73
  timeZone: z.ZodString;
74
- previousTimeZone: z.ZodNullable<z.ZodString>;
74
+ previousTimeZone: z.ZodString;
75
75
  userId: z.ZodOptional<z.ZodString>;
76
76
  }, z.core.$strip>;
77
77
  export type TimeZoneChanged = z.infer<typeof sTimeZoneChanged>;
@@ -35,6 +35,6 @@ exports.sAccessPathActivated = zod_1.z.object({
35
35
  exports.sTimeZoneChanged = zod_1.z.object({
36
36
  kind: zod_1.z.literal('time-zone-changed'),
37
37
  timeZone: zod_1.z.string(), // new IANA zone, e.g. 'Africa/Cairo' or 'Etc/GMT-3'
38
- previousTimeZone: zod_1.z.string().nullable(), // null the first time it is set
38
+ previousTimeZone: zod_1.z.string(),
39
39
  userId: zod_1.z.string().optional(), // matches the other server events
40
40
  });
@@ -9,6 +9,8 @@ export interface EventSearchQueryDto {
9
9
  offset?: number;
10
10
  limit?: number;
11
11
  alarmTriggersOnly?: boolean;
12
+ timeZone?: string;
13
+ timeZoneAsWas?: boolean;
12
14
  }
13
15
  export type EventSearchItemDto<TEvent extends AnyDeviceEvent = AnyDeviceEvent> = {
14
16
  id: string;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ export declare const sCreateFilterPresetRequest: z.ZodObject<{
3
+ target: z.ZodEnum<{
4
+ "event-history": "event-history";
5
+ }>;
6
+ type: z.ZodEnum<{
7
+ user: "user";
8
+ global: "global";
9
+ }>;
10
+ name: z.ZodString;
11
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
12
+ }, z.core.$strip>;
13
+ export type CreateFilterPresetRequest = z.infer<typeof sCreateFilterPresetRequest>;
14
+ export declare const sUpdateFilterPresetRequest: z.ZodObject<{
15
+ name: z.ZodOptional<z.ZodString>;
16
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17
+ }, z.core.$strip>;
18
+ export type UpdateFilterPresetRequest = z.infer<typeof sUpdateFilterPresetRequest>;
19
+ export declare const sFilterPresetQuery: z.ZodObject<{
20
+ target: z.ZodOptional<z.ZodEnum<{
21
+ "event-history": "event-history";
22
+ }>>;
23
+ }, z.core.$strip>;
24
+ export type FilterPresetQuery = z.infer<typeof sFilterPresetQuery>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sFilterPresetQuery = exports.sUpdateFilterPresetRequest = exports.sCreateFilterPresetRequest = void 0;
4
+ const zod_1 = require("zod");
5
+ const filter_preset_1 = require("../../objects/filter-preset");
6
+ const sFilterPresetName = zod_1.z.string().trim().min(1).max(128);
7
+ // Built-in presets are managed by the server and cannot be created through the API
8
+ exports.sCreateFilterPresetRequest = zod_1.z.object({
9
+ target: filter_preset_1.sFilterPresetTarget,
10
+ type: zod_1.z.enum(['global', 'user']),
11
+ name: sFilterPresetName,
12
+ values: filter_preset_1.sFilterPresetValues,
13
+ });
14
+ // Target and type cannot change after creation
15
+ exports.sUpdateFilterPresetRequest = zod_1.z
16
+ .object({
17
+ name: sFilterPresetName,
18
+ values: filter_preset_1.sFilterPresetValues,
19
+ })
20
+ .partial();
21
+ exports.sFilterPresetQuery = zod_1.z.object({
22
+ target: filter_preset_1.sFilterPresetTarget.optional(),
23
+ });
@@ -36,3 +36,4 @@ export * from './device';
36
36
  export * from './camera';
37
37
  export * from './trackables';
38
38
  export * from './time-zone';
39
+ export * from './filter-preset';
@@ -52,3 +52,4 @@ __exportStar(require("./device"), exports);
52
52
  __exportStar(require("./camera"), exports);
53
53
  __exportStar(require("./trackables"), exports);
54
54
  __exportStar(require("./time-zone"), exports);
55
+ __exportStar(require("./filter-preset"), exports);
@@ -17,5 +17,5 @@ export type ServerState = {
17
17
  accessControlProviders: Record<string, AccessControlProviderState>;
18
18
  citadelMode: boolean;
19
19
  deviceChanges: ConfigState;
20
- timeZone: string | null;
20
+ timeZone: string;
21
21
  };
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const sFilterPresetTarget: z.ZodEnum<{
3
+ "event-history": "event-history";
4
+ }>;
5
+ export type FilterPresetTarget = z.infer<typeof sFilterPresetTarget>;
6
+ export declare const sFilterPresetType: z.ZodEnum<{
7
+ user: "user";
8
+ "built-in": "built-in";
9
+ global: "global";
10
+ }>;
11
+ export type FilterPresetType = z.infer<typeof sFilterPresetType>;
12
+ export declare const sFilterPresetValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
13
+ export type FilterPresetValues = z.infer<typeof sFilterPresetValues>;
14
+ export declare const sFilterPresetDto: z.ZodObject<{
15
+ id: z.ZodUUID;
16
+ systemCode: z.ZodNullable<z.ZodString>;
17
+ target: z.ZodEnum<{
18
+ "event-history": "event-history";
19
+ }>;
20
+ type: z.ZodEnum<{
21
+ user: "user";
22
+ "built-in": "built-in";
23
+ global: "global";
24
+ }>;
25
+ name: z.ZodString;
26
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
27
+ createdBy: z.ZodNullable<z.ZodUUID>;
28
+ createdOn: z.ZodString;
29
+ lastModifiedOn: z.ZodString;
30
+ }, z.core.$strip>;
31
+ export type FilterPresetDto = z.infer<typeof sFilterPresetDto>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sFilterPresetDto = exports.sFilterPresetValues = exports.sFilterPresetType = exports.sFilterPresetTarget = void 0;
4
+ const zod_1 = require("zod");
5
+ // The page whose filter a preset applies to
6
+ exports.sFilterPresetTarget = zod_1.z.enum(['event-history']);
7
+ // built-in = shipped with the server and read-only, global = shared with all users,
8
+ // user = visible to its creator only
9
+ exports.sFilterPresetType = zod_1.z.enum(['built-in', 'global', 'user']);
10
+ // Filter values as the client defines them for the target; the server stores them as-is
11
+ exports.sFilterPresetValues = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
12
+ exports.sFilterPresetDto = zod_1.z.object({
13
+ id: zod_1.z.uuid(),
14
+ systemCode: zod_1.z.string().nullable(), // Stable identifier of a built-in preset, null otherwise
15
+ target: exports.sFilterPresetTarget,
16
+ type: exports.sFilterPresetType,
17
+ name: zod_1.z.string(),
18
+ values: exports.sFilterPresetValues,
19
+ createdBy: zod_1.z.uuid().nullable(), // null for built-in presets
20
+ createdOn: zod_1.z.string(),
21
+ lastModifiedOn: zod_1.z.string(),
22
+ });
@@ -28,3 +28,4 @@ export * from './device';
28
28
  export * from './module-config';
29
29
  export * from './trackable';
30
30
  export * from './trackable-retention-policy';
31
+ export * from './filter-preset';
@@ -44,3 +44,4 @@ __exportStar(require("./device"), exports);
44
44
  __exportStar(require("./module-config"), exports);
45
45
  __exportStar(require("./trackable"), exports);
46
46
  __exportStar(require("./trackable-retention-policy"), exports);
47
+ __exportStar(require("./filter-preset"), exports);
package/dist/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
6
6
  },
7
- "version": "2.0.147",
7
+ "version": "2.0.149",
8
8
  "description": "Common types between backend, agent(s) and frontend(s)",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
6
6
  },
7
- "version": "2.0.147",
7
+ "version": "2.0.149",
8
8
  "description": "Common types between backend, agent(s) and frontend(s)",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",