@awarevue/api-types 1.0.99 → 1.0.101

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.
@@ -85,14 +85,14 @@ export declare const sUiWidgetHint: z.ZodObject<{
85
85
  }, "strip", z.ZodTypeAny, {
86
86
  path: string;
87
87
  kind: "widget";
88
- password?: boolean | undefined;
89
88
  spanColumns?: number | undefined;
89
+ password?: boolean | undefined;
90
90
  placeHolder?: string | undefined;
91
91
  }, {
92
92
  path: string;
93
93
  kind: "widget";
94
- password?: boolean | undefined;
95
94
  spanColumns?: number | undefined;
95
+ password?: boolean | undefined;
96
96
  placeHolder?: string | undefined;
97
97
  }>;
98
98
  export declare const sUiHint: z.ZodUnion<[z.ZodObject<{
@@ -116,14 +116,14 @@ export declare const sUiHint: z.ZodUnion<[z.ZodObject<{
116
116
  }, "strip", z.ZodTypeAny, {
117
117
  path: string;
118
118
  kind: "widget";
119
- password?: boolean | undefined;
120
119
  spanColumns?: number | undefined;
120
+ password?: boolean | undefined;
121
121
  placeHolder?: string | undefined;
122
122
  }, {
123
123
  path: string;
124
124
  kind: "widget";
125
- password?: boolean | undefined;
126
125
  spanColumns?: number | undefined;
126
+ password?: boolean | undefined;
127
127
  placeHolder?: string | undefined;
128
128
  }>]>;
129
129
  export declare const sProviderSpecs: z.ZodObject<{
@@ -151,14 +151,14 @@ export declare const sProviderSpecs: z.ZodObject<{
151
151
  }, "strip", z.ZodTypeAny, {
152
152
  path: string;
153
153
  kind: "widget";
154
- password?: boolean | undefined;
155
154
  spanColumns?: number | undefined;
155
+ password?: boolean | undefined;
156
156
  placeHolder?: string | undefined;
157
157
  }, {
158
158
  path: string;
159
159
  kind: "widget";
160
- password?: boolean | undefined;
161
160
  spanColumns?: number | undefined;
161
+ password?: boolean | undefined;
162
162
  placeHolder?: string | undefined;
163
163
  }>]>, "many">>;
164
164
  }, "strip", z.ZodTypeAny, {
@@ -172,8 +172,8 @@ export declare const sProviderSpecs: z.ZodObject<{
172
172
  } | {
173
173
  path: string;
174
174
  kind: "widget";
175
- password?: boolean | undefined;
176
175
  spanColumns?: number | undefined;
176
+ password?: boolean | undefined;
177
177
  placeHolder?: string | undefined;
178
178
  })[] | undefined;
179
179
  }, {
@@ -187,8 +187,8 @@ export declare const sProviderSpecs: z.ZodObject<{
187
187
  } | {
188
188
  path: string;
189
189
  kind: "widget";
190
- password?: boolean | undefined;
191
190
  spanColumns?: number | undefined;
191
+ password?: boolean | undefined;
192
192
  placeHolder?: string | undefined;
193
193
  })[] | undefined;
194
194
  }>;
@@ -274,14 +274,14 @@ export declare const sRegisterRq: z.ZodObject<{
274
274
  }, "strip", z.ZodTypeAny, {
275
275
  path: string;
276
276
  kind: "widget";
277
- password?: boolean | undefined;
278
277
  spanColumns?: number | undefined;
278
+ password?: boolean | undefined;
279
279
  placeHolder?: string | undefined;
280
280
  }, {
281
281
  path: string;
282
282
  kind: "widget";
283
- password?: boolean | undefined;
284
283
  spanColumns?: number | undefined;
284
+ password?: boolean | undefined;
285
285
  placeHolder?: string | undefined;
286
286
  }>]>, "many">>;
287
287
  }, "strip", z.ZodTypeAny, {
@@ -295,8 +295,8 @@ export declare const sRegisterRq: z.ZodObject<{
295
295
  } | {
296
296
  path: string;
297
297
  kind: "widget";
298
- password?: boolean | undefined;
299
298
  spanColumns?: number | undefined;
299
+ password?: boolean | undefined;
300
300
  placeHolder?: string | undefined;
301
301
  })[] | undefined;
302
302
  }, {
@@ -310,8 +310,8 @@ export declare const sRegisterRq: z.ZodObject<{
310
310
  } | {
311
311
  path: string;
312
312
  kind: "widget";
313
- password?: boolean | undefined;
314
313
  spanColumns?: number | undefined;
314
+ password?: boolean | undefined;
315
315
  placeHolder?: string | undefined;
316
316
  })[] | undefined;
317
317
  }>>;
@@ -366,8 +366,8 @@ export declare const sRegisterRq: z.ZodObject<{
366
366
  } | {
367
367
  path: string;
368
368
  kind: "widget";
369
- password?: boolean | undefined;
370
369
  spanColumns?: number | undefined;
370
+ password?: boolean | undefined;
371
371
  placeHolder?: string | undefined;
372
372
  })[] | undefined;
373
373
  }>;
@@ -394,8 +394,8 @@ export declare const sRegisterRq: z.ZodObject<{
394
394
  } | {
395
395
  path: string;
396
396
  kind: "widget";
397
- password?: boolean | undefined;
398
397
  spanColumns?: number | undefined;
398
+ password?: boolean | undefined;
399
399
  placeHolder?: string | undefined;
400
400
  })[] | undefined;
401
401
  }>;
@@ -114,14 +114,14 @@ export declare const sBookmarkSearchCriteria: z.ZodObject<{
114
114
  timeTo: z.ZodNumber;
115
115
  }, "strip", z.ZodTypeAny, {
116
116
  deviceId: string[];
117
- createdBy: string[];
118
117
  timeFrom: number;
119
118
  timeTo: number;
119
+ createdBy: string[];
120
120
  }, {
121
121
  deviceId: string[];
122
- createdBy: string[];
123
122
  timeFrom: number;
124
123
  timeTo: number;
124
+ createdBy: string[];
125
125
  }>;
126
126
  export type BookmarkProps = z.infer<typeof sBookmarkProps>;
127
127
  export type CreateBookmarkRq = z.infer<typeof sCreateBookmarkRq>;
@@ -1,16 +1,7 @@
1
- import { AccessRuleDto, PersonDto, PersonPresenceDto, ScheduleDto, ZoneDto } from '../access-control';
2
1
  import { z } from 'zod';
3
- import { DeviceDto } from './any-device';
4
- import { AutomationRuleDto } from '../automation';
5
- import { DeviceGroupDto } from '../device-group';
6
- import { MacroDto } from '../macros';
7
- import { LayoutDto } from '../layout';
8
- import { ViewDto } from '../view';
9
- import { RoleDto, UserDto } from '../user';
10
2
  import { ModuleConfig, ModuleConfigMetadata } from '../module-config';
11
3
  import { AccessControlCapabilityReport } from '../agent-communication';
12
- import { SecurityLevelDto } from '../security-level';
13
- import { BookmarkDto } from '../bookmarks';
4
+ import { ObjectKinds } from 'src/objects';
14
5
  export declare const SERVER = "server";
15
6
  export interface RunMacro {
16
7
  command: 'server.run-macro';
@@ -62,26 +53,6 @@ export declare const sAgentStopped: z.ZodObject<{
62
53
  }>;
63
54
  export type AgentStarted = z.infer<typeof sAgentStarted>;
64
55
  export type AgentStopped = z.infer<typeof sAgentStopped>;
65
- export declare const sObjectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone", "personPresence", "deviceGroup", "view", "layout", "automationRule", "macro", "role", "user", "securityLevel", "bookmark"]>;
66
- export type ObjectKind = z.infer<typeof sObjectKind>;
67
- export type ObjectKinds = {
68
- layout: LayoutDto;
69
- view: ViewDto;
70
- accessRule: AccessRuleDto;
71
- schedule: ScheduleDto;
72
- person: PersonDto;
73
- device: DeviceDto;
74
- zone: ZoneDto;
75
- personPresence: PersonPresenceDto;
76
- automationRule: AutomationRuleDto;
77
- deviceGroup: DeviceGroupDto;
78
- macro: MacroDto;
79
- role: RoleDto;
80
- user: UserDto;
81
- securityLevel: SecurityLevelDto;
82
- bookmark: BookmarkDto;
83
- };
84
- export declare const objectKinds: readonly ObjectKind[];
85
56
  export type ObjectCreated = {
86
57
  [K in keyof ObjectKinds]: {
87
58
  originator: string;
@@ -117,4 +88,3 @@ export type ObjectDeleted = {
117
88
  };
118
89
  }[keyof ObjectKinds];
119
90
  export type ServerEvent = ObjectCreated | ObjectUpdated | ObjectDeleted | AgentStarted | AgentStopped;
120
- export declare const objectLabels: Record<string, string>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.objectLabels = exports.objectKinds = exports.sObjectKind = exports.sAgentStopped = exports.sAgentStarted = exports.SERVER = void 0;
3
+ exports.sAgentStopped = exports.sAgentStarted = exports.SERVER = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.SERVER = 'server';
6
6
  // EVENTS
@@ -14,38 +14,3 @@ exports.sAgentStopped = zod_1.z.object({
14
14
  agent: zod_1.z.string(),
15
15
  providers: zod_1.z.array(zod_1.z.string()),
16
16
  });
17
- exports.sObjectKind = zod_1.z.enum([
18
- 'accessRule',
19
- 'schedule',
20
- 'person',
21
- 'device',
22
- 'zone',
23
- 'personPresence',
24
- 'deviceGroup',
25
- 'view',
26
- 'layout',
27
- 'automationRule',
28
- 'macro',
29
- 'role',
30
- 'user',
31
- 'securityLevel',
32
- 'bookmark',
33
- ]);
34
- exports.objectKinds = exports.sObjectKind.options;
35
- exports.objectLabels = {
36
- accessRule: 'Access Rule',
37
- schedule: 'Schedule',
38
- person: 'Person',
39
- device: 'Device',
40
- deviceGroup: 'Device Group',
41
- zone: 'Zone',
42
- layout: 'Layout',
43
- view: 'View',
44
- role: 'Role',
45
- user: 'User',
46
- personPresence: 'Person Presence',
47
- automationRule: 'Automation Rule',
48
- macro: 'Macro',
49
- securityLevel: 'Security Level',
50
- bookmark: 'Bookmark',
51
- };
@@ -16,9 +16,14 @@ export interface DeviceCommandTriggered {
16
16
  command: string;
17
17
  args: object;
18
18
  }
19
- export interface MotionDetectedEvent {
20
- kind: 'motion-detected';
21
- }
19
+ export declare const sMotionDetected: z.ZodObject<{
20
+ kind: z.ZodLiteral<"motion-detected">;
21
+ }, "strip", z.ZodTypeAny, {
22
+ kind: "motion-detected";
23
+ }, {
24
+ kind: "motion-detected";
25
+ }>;
26
+ export type MotionDetectedEvent = z.infer<typeof sMotionDetected>;
22
27
  export interface DeviceConnectedEvent {
23
28
  kind: 'device-connected';
24
29
  clientId?: number;
@@ -48,6 +53,13 @@ type EventHeader = z.infer<typeof sEventHeader>;
48
53
  export type DeviceEvent<TEvent extends AnyDeviceEvent = AnyDeviceEvent> = EventHeader & TEvent;
49
54
  export declare const eventKindLabels: Record<DeviceEvent['kind'], string>;
50
55
  export declare const eventSchemaByKind: {
56
+ 'motion-detected': z.ZodObject<{
57
+ kind: z.ZodLiteral<"motion-detected">;
58
+ }, "strip", z.ZodTypeAny, {
59
+ kind: "motion-detected";
60
+ }, {
61
+ kind: "motion-detected";
62
+ }>;
51
63
  'reader-auth': z.ZodObject<{
52
64
  kind: z.ZodLiteral<"reader-auth">;
53
65
  token: z.ZodNullable<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDeviceEvent = exports.eventsByDeviceType = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = void 0;
3
+ exports.isDeviceEvent = exports.eventsByDeviceType = exports.eventSchemaByKind = exports.eventKindLabels = exports.sEventHeader = exports.sMotionDetected = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const alarm_1 = require("./device/alarm");
6
6
  const camera_1 = require("./device/camera");
@@ -10,6 +10,9 @@ const io_board_1 = require("./device/io-board");
10
10
  const panic_button_1 = require("./device/panic-button");
11
11
  const presence_tracker_1 = require("./device/presence-tracker");
12
12
  const index_1 = require("./device/reader/index");
13
+ exports.sMotionDetected = zod_1.z.object({
14
+ kind: zod_1.z.literal('motion-detected'),
15
+ });
13
16
  exports.sEventHeader = zod_1.z.object({
14
17
  id: zod_1.z.string().nonempty(),
15
18
  timestamp: zod_1.z.number().int().positive(),
@@ -69,6 +72,7 @@ exports.eventSchemaByKind = {
69
72
  ...panic_button_1.panicButtonEventSchemaByKind,
70
73
  ...presence_tracker_1.presenceTrackerEventSchemaByKind,
71
74
  ...index_1.readerEventSchemaByKind,
75
+ 'motion-detected': exports.sMotionDetected,
72
76
  };
73
77
  exports.eventsByDeviceType = {
74
78
  camera: [
package/dist/index.d.ts CHANGED
@@ -32,3 +32,4 @@ export * from './security-level';
32
32
  export * from './token-conversion';
33
33
  export * from './world-objects';
34
34
  export * from './bookmarks';
35
+ export * from './objects';
package/dist/index.js CHANGED
@@ -48,3 +48,4 @@ __exportStar(require("./security-level"), exports);
48
48
  __exportStar(require("./token-conversion"), exports);
49
49
  __exportStar(require("./world-objects"), exports);
50
50
  __exportStar(require("./bookmarks"), exports);
51
+ __exportStar(require("./objects"), exports);
@@ -1,5 +1,6 @@
1
- import { DeviceDto, ObjectKinds } from '../../device';
1
+ import { DeviceDto } from '../../device';
2
2
  import { PersonDto, ScheduleDto, ZoneDto } from '../../access-control';
3
+ import { ObjectKinds } from '../../objects';
3
4
  export type SyncContext = {
4
5
  objectVersion: number;
5
6
  objectKind: keyof AccessObjects;
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ import { AccessRuleDto, ScheduleDto, PersonDto, ZoneDto, PersonPresenceDto, CreatePersonRequest, CreateScheduleRequest, CreateZoneRequest, CreateAccessRuleRequest } from './access-control';
3
+ import { AutomationRuleDto, AutomationRuleProps } from './automation';
4
+ import { BookmarkDto } from './bookmarks';
5
+ import { DeviceDto } from './device';
6
+ import { DeviceGroupDto } from './device-group';
7
+ import { LayoutDto } from './layout';
8
+ import { MacroDto } from './macros';
9
+ import { SecurityLevelDto } from './security-level';
10
+ import { RoleDto, UserDto } from './user';
11
+ import { ViewDto } from './view';
12
+ export declare const sObjectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone", "personPresence", "deviceGroup", "view", "layout", "automationRule", "macro", "role", "user", "securityLevel", "bookmark"]>;
13
+ export type ObjectKind = z.infer<typeof sObjectKind>;
14
+ export type ObjectKinds = {
15
+ layout: LayoutDto;
16
+ view: ViewDto;
17
+ accessRule: AccessRuleDto;
18
+ schedule: ScheduleDto;
19
+ person: PersonDto;
20
+ device: DeviceDto;
21
+ zone: ZoneDto;
22
+ personPresence: PersonPresenceDto;
23
+ automationRule: AutomationRuleDto;
24
+ deviceGroup: DeviceGroupDto;
25
+ macro: MacroDto;
26
+ role: RoleDto;
27
+ user: UserDto;
28
+ securityLevel: SecurityLevelDto;
29
+ bookmark: BookmarkDto;
30
+ };
31
+ export type ObjectDto = ObjectKinds;
32
+ export type ObjectProps = {
33
+ person: CreatePersonRequest;
34
+ schedule: CreateScheduleRequest;
35
+ zone: CreateZoneRequest;
36
+ accessRule: CreateAccessRuleRequest;
37
+ automationRule: AutomationRuleProps;
38
+ };
39
+ export declare const objectLabels: Record<string, string>;
40
+ export declare const objectKinds: readonly ObjectKind[];
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.objectKinds = exports.objectLabels = exports.sObjectKind = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.sObjectKind = zod_1.z.enum([
6
+ 'accessRule',
7
+ 'schedule',
8
+ 'person',
9
+ 'device',
10
+ 'zone',
11
+ 'personPresence',
12
+ 'deviceGroup',
13
+ 'view',
14
+ 'layout',
15
+ 'automationRule',
16
+ 'macro',
17
+ 'role',
18
+ 'user',
19
+ 'securityLevel',
20
+ 'bookmark',
21
+ ]);
22
+ exports.objectLabels = {
23
+ accessRule: 'Access Rule',
24
+ schedule: 'Schedule',
25
+ person: 'Person',
26
+ device: 'Device',
27
+ deviceGroup: 'Device Group',
28
+ zone: 'Zone',
29
+ layout: 'Layout',
30
+ view: 'View',
31
+ role: 'Role',
32
+ user: 'User',
33
+ personPresence: 'Person Presence',
34
+ automationRule: 'Automation Rule',
35
+ macro: 'Macro',
36
+ securityLevel: 'Security Level',
37
+ bookmark: 'Bookmark',
38
+ };
39
+ exports.objectKinds = exports.sObjectKind.options;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.99",
3
+ "version": "1.0.101",
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/view.d.ts CHANGED
@@ -310,7 +310,6 @@ export declare const sAddViewRequest: z.ZodObject<{
310
310
  }>;
311
311
  }, "strip", z.ZodTypeAny, {
312
312
  name: string;
313
- isPublic: boolean;
314
313
  config: {
315
314
  columns: number;
316
315
  rows: number;
@@ -334,11 +333,11 @@ export declare const sAddViewRequest: z.ZodObject<{
334
333
  })[];
335
334
  hotspotArea?: string | undefined;
336
335
  };
336
+ isPublic: boolean;
337
337
  order?: number | undefined;
338
338
  isDefault?: boolean | undefined;
339
339
  }, {
340
340
  name: string;
341
- isPublic: boolean;
342
341
  config: {
343
342
  columns: number;
344
343
  rows: number;
@@ -362,6 +361,7 @@ export declare const sAddViewRequest: z.ZodObject<{
362
361
  })[];
363
362
  hotspotArea?: string | undefined;
364
363
  };
364
+ isPublic: boolean;
365
365
  order?: number | undefined;
366
366
  isDefault?: boolean | undefined;
367
367
  }>;
@@ -473,7 +473,6 @@ export declare const sUpdateViewRequest: z.ZodObject<{
473
473
  name?: string | undefined;
474
474
  order?: number | undefined;
475
475
  isDefault?: boolean | undefined;
476
- isPublic?: boolean | undefined;
477
476
  config?: {
478
477
  columns: number;
479
478
  rows: number;
@@ -497,11 +496,11 @@ export declare const sUpdateViewRequest: z.ZodObject<{
497
496
  })[];
498
497
  hotspotArea?: string | undefined;
499
498
  } | undefined;
499
+ isPublic?: boolean | undefined;
500
500
  }, {
501
501
  name?: string | undefined;
502
502
  order?: number | undefined;
503
503
  isDefault?: boolean | undefined;
504
- isPublic?: boolean | undefined;
505
504
  config?: {
506
505
  columns: number;
507
506
  rows: number;
@@ -525,6 +524,7 @@ export declare const sUpdateViewRequest: z.ZodObject<{
525
524
  })[];
526
525
  hotspotArea?: string | undefined;
527
526
  } | undefined;
527
+ isPublic?: boolean | undefined;
528
528
  }>;
529
529
  export type ViewConfig = z.infer<typeof sViewConfig>;
530
530
  export declare const sViewInfo: z.ZodIntersection<z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.99",
3
+ "version": "1.0.101",
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",