@awarevue/api-types 1.0.89 → 1.0.91

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.
@@ -34,6 +34,34 @@ export type ServerState = {
34
34
  accessControlProviders: Record<string, AccessControlProviderState>;
35
35
  citadelMode: boolean;
36
36
  };
37
+ export declare const sAgentStarted: z.ZodObject<{
38
+ kind: z.ZodLiteral<"agent-started">;
39
+ agent: z.ZodString;
40
+ providers: z.ZodArray<z.ZodString, "many">;
41
+ }, "strip", z.ZodTypeAny, {
42
+ kind: "agent-started";
43
+ agent: string;
44
+ providers: string[];
45
+ }, {
46
+ kind: "agent-started";
47
+ agent: string;
48
+ providers: string[];
49
+ }>;
50
+ export declare const sAgentStopped: z.ZodObject<{
51
+ kind: z.ZodLiteral<"agent-stopped">;
52
+ agent: z.ZodString;
53
+ providers: z.ZodArray<z.ZodString, "many">;
54
+ }, "strip", z.ZodTypeAny, {
55
+ kind: "agent-stopped";
56
+ agent: string;
57
+ providers: string[];
58
+ }, {
59
+ kind: "agent-stopped";
60
+ agent: string;
61
+ providers: string[];
62
+ }>;
63
+ export type AgentStarted = z.infer<typeof sAgentStarted>;
64
+ export type AgentStopped = z.infer<typeof sAgentStopped>;
37
65
  export declare const sObjectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone", "personPresence", "deviceGroup", "view", "layout", "automationRule", "macro", "role", "user", "securityLevel", "bookmark"]>;
38
66
  export type ObjectKind = z.infer<typeof sObjectKind>;
39
67
  export type ObjectKinds = {
@@ -88,5 +116,5 @@ export type ObjectDeleted = {
88
116
  userId?: string;
89
117
  };
90
118
  }[keyof ObjectKinds];
91
- export type ServerEvent = ObjectCreated | ObjectUpdated | ObjectDeleted;
119
+ export type ServerEvent = ObjectCreated | ObjectUpdated | ObjectDeleted | AgentStarted | AgentStopped;
92
120
  export declare const objectLabels: Record<string, string>;
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.objectLabels = exports.objectKinds = exports.sObjectKind = exports.SERVER = void 0;
3
+ exports.objectLabels = exports.objectKinds = exports.sObjectKind = exports.sAgentStopped = exports.sAgentStarted = exports.SERVER = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.SERVER = 'server';
6
6
  // EVENTS
7
+ exports.sAgentStarted = zod_1.z.object({
8
+ kind: zod_1.z.literal('agent-started'),
9
+ agent: zod_1.z.string(),
10
+ providers: zod_1.z.array(zod_1.z.string()),
11
+ });
12
+ exports.sAgentStopped = zod_1.z.object({
13
+ kind: zod_1.z.literal('agent-stopped'),
14
+ agent: zod_1.z.string(),
15
+ providers: zod_1.z.array(zod_1.z.string()),
16
+ });
7
17
  exports.sObjectKind = zod_1.z.enum([
8
18
  'accessRule',
9
19
  'schedule',
@@ -58,6 +58,8 @@ exports.eventKindLabels = {
58
58
  'scene-updated': 'Scene Updated',
59
59
  'scene-ended': 'Scene Ended',
60
60
  'io-board-input-changed': 'IO Board Input Changed',
61
+ 'agent-started': 'Agent Started',
62
+ 'agent-stopped': 'Agent Stopped',
61
63
  };
62
64
  exports.eventSchemaByKind = {
63
65
  ...alarm_1.alarmEventSchemasByKind,
@@ -3,34 +3,43 @@ import { DeviceType } from './device/any-device';
3
3
  export declare const sIoSlot: z.ZodObject<{
4
4
  deviceId: z.ZodString;
5
5
  slot: z.ZodString;
6
+ inverted: z.ZodOptional<z.ZodBoolean>;
6
7
  }, "strip", z.ZodTypeAny, {
7
8
  slot: string;
8
9
  deviceId: string;
10
+ inverted?: boolean | undefined;
9
11
  }, {
10
12
  slot: string;
11
13
  deviceId: string;
14
+ inverted?: boolean | undefined;
12
15
  }>;
13
16
  export type IoSlot = z.infer<typeof sIoSlot>;
14
17
  export declare const sInputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
15
18
  deviceId: z.ZodString;
16
19
  slot: z.ZodString;
20
+ inverted: z.ZodOptional<z.ZodBoolean>;
17
21
  }, "strip", z.ZodTypeAny, {
18
22
  slot: string;
19
23
  deviceId: string;
24
+ inverted?: boolean | undefined;
20
25
  }, {
21
26
  slot: string;
22
27
  deviceId: string;
28
+ inverted?: boolean | undefined;
23
29
  }>>;
24
30
  export type InputBindings = z.infer<typeof sInputBindings>;
25
31
  export declare const sOutputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
26
32
  deviceId: z.ZodString;
27
33
  slot: z.ZodString;
34
+ inverted: z.ZodOptional<z.ZodBoolean>;
28
35
  }, "strip", z.ZodTypeAny, {
29
36
  slot: string;
30
37
  deviceId: string;
38
+ inverted?: boolean | undefined;
31
39
  }, {
32
40
  slot: string;
33
41
  deviceId: string;
42
+ inverted?: boolean | undefined;
34
43
  }>>;
35
44
  export type OutputBindings = z.infer<typeof sOutputBindings>;
36
45
  export interface DeviceFactoryProviderMetadata {
@@ -64,40 +73,50 @@ export declare const sUpdateCustomDeviceRequest: z.ZodObject<{
64
73
  inputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
65
74
  deviceId: z.ZodString;
66
75
  slot: z.ZodString;
76
+ inverted: z.ZodOptional<z.ZodBoolean>;
67
77
  }, "strip", z.ZodTypeAny, {
68
78
  slot: string;
69
79
  deviceId: string;
80
+ inverted?: boolean | undefined;
70
81
  }, {
71
82
  slot: string;
72
83
  deviceId: string;
84
+ inverted?: boolean | undefined;
73
85
  }>>;
74
86
  outputBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
75
87
  deviceId: z.ZodString;
76
88
  slot: z.ZodString;
89
+ inverted: z.ZodOptional<z.ZodBoolean>;
77
90
  }, "strip", z.ZodTypeAny, {
78
91
  slot: string;
79
92
  deviceId: string;
93
+ inverted?: boolean | undefined;
80
94
  }, {
81
95
  slot: string;
82
96
  deviceId: string;
97
+ inverted?: boolean | undefined;
83
98
  }>>;
84
99
  }, "strip", z.ZodTypeAny, {
85
100
  inputBindings: Record<string, {
86
101
  slot: string;
87
102
  deviceId: string;
103
+ inverted?: boolean | undefined;
88
104
  }>;
89
105
  outputBindings: Record<string, {
90
106
  slot: string;
91
107
  deviceId: string;
108
+ inverted?: boolean | undefined;
92
109
  }>;
93
110
  }, {
94
111
  inputBindings: Record<string, {
95
112
  slot: string;
96
113
  deviceId: string;
114
+ inverted?: boolean | undefined;
97
115
  }>;
98
116
  outputBindings: Record<string, {
99
117
  slot: string;
100
118
  deviceId: string;
119
+ inverted?: boolean | undefined;
101
120
  }>;
102
121
  }>;
103
122
  export type UpdateCustomDeviceRequest = {
@@ -8,6 +8,7 @@ const zod_1 = __importDefault(require("zod"));
8
8
  exports.sIoSlot = zod_1.default.object({
9
9
  deviceId: zod_1.default.string().nonempty(),
10
10
  slot: zod_1.default.string().nonempty(),
11
+ inverted: zod_1.default.boolean().optional(),
11
12
  });
12
13
  exports.sInputBindings = zod_1.default.record(exports.sIoSlot);
13
14
  exports.sOutputBindings = zod_1.default.record(exports.sIoSlot);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
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.89",
3
+ "version": "1.0.91",
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",