@awarevue/api-types 2.0.136 → 2.0.137

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.
@@ -95,6 +95,143 @@ export declare const sUpdateDeviceRequest: z.ZodObject<{
95
95
  }, z.core.$catchall<z.ZodUnknown>>>>;
96
96
  enabled: z.ZodOptional<z.ZodBoolean>;
97
97
  }, z.core.$strip>;
98
+ /**
99
+ * A set of device changes applied as one changeset: PUT /devices/changes.
100
+ * Validated, planned and committed as one; 202 with the changeset while it
101
+ * is being applied, 409 if any touched device is held by a pending one.
102
+ */
103
+ export declare const sApplyDeviceChangesRequest: z.ZodObject<{
104
+ added: z.ZodArray<z.ZodObject<{
105
+ name: z.ZodString;
106
+ foreignRef: z.ZodString;
107
+ notes: z.ZodNullable<z.ZodString>;
108
+ provider: z.ZodString;
109
+ providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
110
+ tags: z.ZodArray<z.ZodString>;
111
+ relations: z.ZodArray<z.ZodObject<{
112
+ id: z.ZodString;
113
+ kind: z.ZodEnum<{
114
+ attachedTo: "attachedTo";
115
+ parent: "parent";
116
+ child: "child";
117
+ holds: "holds";
118
+ isHeldBy: "isHeldBy";
119
+ observes: "observes";
120
+ isObservedBy: "isObservedBy";
121
+ sendsInputTo: "sendsInputTo";
122
+ receivesInputFrom: "receivesInputFrom";
123
+ sendsOutputTo: "sendsOutputTo";
124
+ receivesOutputFrom: "receivesOutputFrom";
125
+ unlocks: "unlocks";
126
+ isUnlockedBy: "isUnlockedBy";
127
+ controls: "controls";
128
+ isControlledBy: "isControlledBy";
129
+ records: "records";
130
+ isRecordedBy: "isRecordedBy";
131
+ reads: "reads";
132
+ isReadBy: "isReadBy";
133
+ isIngestedBy: "isIngestedBy";
134
+ ingests: "ingests";
135
+ }>;
136
+ }, z.core.$catchall<z.ZodUnknown>>>;
137
+ type: z.ZodEnum<{
138
+ camera: "camera";
139
+ door: "door";
140
+ "io-board": "io-board";
141
+ "camera-lift": "camera-lift";
142
+ "motion-sensor": "motion-sensor";
143
+ "panic-button": "panic-button";
144
+ "intercom-operator": "intercom-operator";
145
+ "intercom-terminal": "intercom-terminal";
146
+ pbx: "pbx";
147
+ server: "server";
148
+ alarm: "alarm";
149
+ "position-tracker": "position-tracker";
150
+ "device-gateway": "device-gateway";
151
+ "presence-tracker": "presence-tracker";
152
+ display: "display";
153
+ "nvr-recorder": "nvr-recorder";
154
+ "nvr-exporter": "nvr-exporter";
155
+ "nvr-analytics-server": "nvr-analytics-server";
156
+ system: "system";
157
+ reader: "reader";
158
+ "generic-sensor": "generic-sensor";
159
+ }>;
160
+ specs: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
161
+ displaySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
162
+ }, z.core.$strip>>;
163
+ updated: z.ZodArray<z.ZodObject<{
164
+ id: z.ZodString;
165
+ name: z.ZodOptional<z.ZodString>;
166
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ providerMetadata: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
168
+ displaySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
169
+ specs: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
170
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
+ relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
172
+ id: z.ZodString;
173
+ kind: z.ZodEnum<{
174
+ attachedTo: "attachedTo";
175
+ parent: "parent";
176
+ child: "child";
177
+ holds: "holds";
178
+ isHeldBy: "isHeldBy";
179
+ observes: "observes";
180
+ isObservedBy: "isObservedBy";
181
+ sendsInputTo: "sendsInputTo";
182
+ receivesInputFrom: "receivesInputFrom";
183
+ sendsOutputTo: "sendsOutputTo";
184
+ receivesOutputFrom: "receivesOutputFrom";
185
+ unlocks: "unlocks";
186
+ isUnlockedBy: "isUnlockedBy";
187
+ controls: "controls";
188
+ isControlledBy: "isControlledBy";
189
+ records: "records";
190
+ isRecordedBy: "isRecordedBy";
191
+ reads: "reads";
192
+ isReadBy: "isReadBy";
193
+ isIngestedBy: "isIngestedBy";
194
+ ingests: "ingests";
195
+ }>;
196
+ }, z.core.$catchall<z.ZodUnknown>>>>;
197
+ enabled: z.ZodOptional<z.ZodBoolean>;
198
+ }, z.core.$strip>>;
199
+ removed: z.ZodArray<z.ZodString>;
200
+ relations: z.ZodArray<z.ZodObject<{
201
+ relation: z.ZodObject<{
202
+ leftId: z.ZodString;
203
+ rightId: z.ZodString;
204
+ kind: z.ZodEnum<{
205
+ attachedTo: "attachedTo";
206
+ parent: "parent";
207
+ child: "child";
208
+ holds: "holds";
209
+ isHeldBy: "isHeldBy";
210
+ observes: "observes";
211
+ isObservedBy: "isObservedBy";
212
+ sendsInputTo: "sendsInputTo";
213
+ receivesInputFrom: "receivesInputFrom";
214
+ sendsOutputTo: "sendsOutputTo";
215
+ receivesOutputFrom: "receivesOutputFrom";
216
+ unlocks: "unlocks";
217
+ isUnlockedBy: "isUnlockedBy";
218
+ controls: "controls";
219
+ isControlledBy: "isControlledBy";
220
+ records: "records";
221
+ isRecordedBy: "isRecordedBy";
222
+ reads: "reads";
223
+ isReadBy: "isReadBy";
224
+ isIngestedBy: "isIngestedBy";
225
+ ingests: "ingests";
226
+ }>;
227
+ }, z.core.$catchall<z.ZodUnknown>>;
228
+ action: z.ZodEnum<{
229
+ added: "added";
230
+ updated: "updated";
231
+ removed: "removed";
232
+ }>;
233
+ }, z.core.$strip>>;
234
+ }, z.core.$strip>;
98
235
  export declare const sOverrideDeviceSpecsRequest: z.ZodObject<{
99
236
  id: z.ZodString;
100
237
  specs: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
@@ -158,6 +295,7 @@ export declare const sSetUnsetRelationRequest: z.ZodObject<{
158
295
  }, z.core.$catchall<z.ZodUnknown>>;
159
296
  export type AddDeviceRequest = z.infer<typeof sAddDeviceRequest>;
160
297
  export type UpdateDeviceRequest = z.infer<typeof sUpdateDeviceRequest>;
298
+ export type ApplyDeviceChangesRequest = z.infer<typeof sApplyDeviceChangesRequest>;
161
299
  export type OverrideDeviceSpecsRequest = z.infer<typeof sOverrideDeviceSpecsRequest>;
162
300
  export type AddDevicePresetRequest = z.infer<typeof sAddDevicePresetRequest>;
163
301
  export type UpdateDevicePresetRequest = z.infer<typeof sUpdateDevicePresetRequest>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sPendingDeviceWrite = exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = void 0;
3
+ exports.sPendingDeviceWrite = exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sApplyDeviceChangesRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const objects_1 = require("../../objects");
6
6
  exports.sAddDeviceRequest = zod_1.z.object({
@@ -26,6 +26,19 @@ exports.sUpdateDeviceRequest = zod_1.z.object({
26
26
  relations: zod_1.z.array(objects_1.sDeviceRelationSide).optional(),
27
27
  enabled: zod_1.z.boolean().optional(),
28
28
  });
29
+ /**
30
+ * A set of device changes applied as one changeset: PUT /devices/changes.
31
+ * Validated, planned and committed as one; 202 with the changeset while it
32
+ * is being applied, 409 if any touched device is held by a pending one.
33
+ */
34
+ exports.sApplyDeviceChangesRequest = zod_1.z.object({
35
+ /** No id: the server assigns one. */
36
+ added: zod_1.z.array(exports.sAddDeviceRequest),
37
+ updated: zod_1.z.array(exports.sUpdateDeviceRequest),
38
+ removed: zod_1.z.array(zod_1.z.string().nonempty()),
39
+ /** Both ends by device id. */
40
+ relations: zod_1.z.array(objects_1.sRelationDeltaDto),
41
+ });
29
42
  exports.sOverrideDeviceSpecsRequest = zod_1.z.object({
30
43
  id: zod_1.z.string(),
31
44
  specs: zod_1.z.object({}).catchall(zod_1.z.unknown()),
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.136",
7
+ "version": "2.0.137",
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.136",
7
+ "version": "2.0.137",
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",