@kohost/api-client 7.16.0 → 7.17.0

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.
Files changed (59) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/commands/getGroups.d.ts +8 -0
  3. package/dist/commands/getGroups.js +17 -0
  4. package/dist/commands/getGroups.js.map +1 -0
  5. package/dist/commands/index.d.ts +1 -0
  6. package/dist/commands/index.js +3 -1
  7. package/dist/commands/index.js.map +1 -1
  8. package/dist/httpClient.js.map +1 -1
  9. package/dist/lib/emergencyContacts.d.ts +10 -0
  10. package/dist/lib/index.d.ts +1 -0
  11. package/dist/lib/index.js +3 -1
  12. package/dist/lib/index.js.map +1 -1
  13. package/dist/lib/sis.d.ts +108 -0
  14. package/dist/lib/sis.js +11 -0
  15. package/dist/lib/sis.js.map +1 -0
  16. package/dist/models/entity.js.map +1 -1
  17. package/dist/models/group.js +1 -0
  18. package/dist/models/group.js.map +1 -1
  19. package/dist/models/system.js +1 -0
  20. package/dist/models/system.js.map +1 -1
  21. package/dist/models/systemUser.js +1 -1
  22. package/dist/models/systemUser.js.map +1 -1
  23. package/dist/schemas/announcement.d.ts +16 -1
  24. package/dist/schemas/announcement.js +16 -1
  25. package/dist/schemas/announcement.js.map +1 -1
  26. package/dist/schemas/definitions.d.ts +96 -3
  27. package/dist/schemas/definitions.js +58 -3
  28. package/dist/schemas/definitions.js.map +1 -1
  29. package/dist/schemas/group.d.ts +4 -0
  30. package/dist/schemas/group.js +4 -0
  31. package/dist/schemas/group.js.map +1 -1
  32. package/dist/schemas/system.d.ts +4 -0
  33. package/dist/schemas/system.js +4 -0
  34. package/dist/schemas/system.js.map +1 -1
  35. package/dist/schemas/systemUser.d.ts +2 -3
  36. package/dist/schemas/systemUser.js +1 -4
  37. package/dist/schemas/systemUser.js.map +1 -1
  38. package/dist/schemas/ticket.d.ts +33 -5
  39. package/dist/schemas/ticket.js +35 -10
  40. package/dist/schemas/ticket.js.map +1 -1
  41. package/dist/useCases/describeSISSync.d.ts +27 -0
  42. package/dist/useCases/describeSISSync.js +47 -0
  43. package/dist/useCases/describeSISSync.js.map +1 -0
  44. package/dist/useCases/index.d.ts +5 -0
  45. package/dist/useCases/index.js +11 -1
  46. package/dist/useCases/index.js.map +1 -1
  47. package/dist/useCases/listSISHouseholds.d.ts +27 -0
  48. package/dist/useCases/listSISHouseholds.js +47 -0
  49. package/dist/useCases/listSISHouseholds.js.map +1 -0
  50. package/dist/useCases/listSISPeople.d.ts +27 -0
  51. package/dist/useCases/listSISPeople.js +47 -0
  52. package/dist/useCases/listSISPeople.js.map +1 -0
  53. package/dist/useCases/previewAnnouncement.d.ts +27 -0
  54. package/dist/useCases/previewAnnouncement.js +47 -0
  55. package/dist/useCases/previewAnnouncement.js.map +1 -0
  56. package/dist/useCases/syncSISRoster.d.ts +27 -0
  57. package/dist/useCases/syncSISRoster.js +47 -0
  58. package/dist/useCases/syncSISRoster.js.map +1 -0
  59. package/package.json +5 -5
@@ -11,11 +11,14 @@ export type PlatformRoleName = (typeof PLATFORM_ROLE_NAMES)[number];
11
11
  /**
12
12
  * The people outside the platform a broadcast may name, sourced from the SIS
13
13
  * roster. `students` is every system user the SIS marks as a Student;
14
- * `parents` is everybody else on the roster — every emergency-contact
14
+ * `staff` is everybody synced with nothing but the Staff role (faculty and
15
+ * staff); `parents` is everybody else on the roster — every emergency-contact
15
16
  * relationship the source system carries, whatever it calls it.
16
17
  */
17
- export declare const EXTERNAL_AUDIENCE_GROUPS: readonly ["students", "parents"];
18
+ export declare const EXTERNAL_AUDIENCE_GROUPS: readonly ["students", "parents", "staff"];
18
19
  export type ExternalAudienceGroup = (typeof EXTERNAL_AUDIENCE_GROUPS)[number];
20
+ export declare const SMS_OPT_OUT_REASONS: readonly ["stop", "vendor"];
21
+ export declare const EMAIL_OPT_OUT_REASONS: readonly ["unsubscribe", "spamReport", "bounce"];
19
22
  declare const defs: {
20
23
  readonly $schema: "http://json-schema.org/draft-07/schema";
21
24
  readonly $id: "definitions.json";
@@ -208,6 +211,61 @@ declare const defs: {
208
211
  readonly type: "integer";
209
212
  readonly minimum: 0;
210
213
  };
214
+ readonly optedOut: {
215
+ readonly type: "integer";
216
+ readonly minimum: 0;
217
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
218
+ };
219
+ };
220
+ };
221
+ readonly consent: {
222
+ readonly type: "object";
223
+ readonly additionalProperties: false;
224
+ readonly properties: {
225
+ readonly sms: {
226
+ readonly type: "object";
227
+ readonly additionalProperties: false;
228
+ readonly required: readonly ["optedOutAt"];
229
+ readonly properties: {
230
+ readonly optedOutAt: {
231
+ readonly anyOf: readonly [{
232
+ readonly type: readonly ["string", "object"];
233
+ readonly format: "date-time";
234
+ }, {
235
+ readonly type: "null";
236
+ }];
237
+ readonly description: "When the person opted out of this channel; null while they are reachable.";
238
+ };
239
+ readonly reason: {
240
+ readonly type: "string";
241
+ readonly enum: readonly ["stop", "vendor"];
242
+ };
243
+ readonly lastOptOutNoticeAt: {
244
+ readonly type: readonly ["string", "object"];
245
+ readonly format: "date-time";
246
+ };
247
+ };
248
+ };
249
+ readonly email: {
250
+ readonly type: "object";
251
+ readonly additionalProperties: false;
252
+ readonly required: readonly ["optedOutAt"];
253
+ readonly properties: {
254
+ readonly optedOutAt: {
255
+ readonly anyOf: readonly [{
256
+ readonly type: readonly ["string", "object"];
257
+ readonly format: "date-time";
258
+ }, {
259
+ readonly type: "null";
260
+ }];
261
+ readonly description: "When the person opted out of this channel; null while they are reachable.";
262
+ };
263
+ readonly reason: {
264
+ readonly type: "string";
265
+ readonly enum: readonly ["unsubscribe", "spamReport", "bounce"];
266
+ };
267
+ };
268
+ };
211
269
  };
212
270
  };
213
271
  readonly audience: {
@@ -248,7 +306,7 @@ declare const defs: {
248
306
  readonly description: "Which groups of the external SIS roster were included. Human-triggered sends only; an Automation can never set it.";
249
307
  readonly items: {
250
308
  readonly type: "string";
251
- readonly enum: readonly ["students", "parents"];
309
+ readonly enum: readonly ["students", "parents", "staff"];
252
310
  };
253
311
  };
254
312
  readonly emergencyContacts: {
@@ -284,6 +342,11 @@ declare const defs: {
284
342
  readonly type: "integer";
285
343
  readonly minimum: 0;
286
344
  };
345
+ readonly optedOut: {
346
+ readonly type: "integer";
347
+ readonly minimum: 0;
348
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
349
+ };
287
350
  };
288
351
  };
289
352
  readonly external: {
@@ -303,6 +366,11 @@ declare const defs: {
303
366
  readonly type: "integer";
304
367
  readonly minimum: 0;
305
368
  };
369
+ readonly optedOut: {
370
+ readonly type: "integer";
371
+ readonly minimum: 0;
372
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
373
+ };
306
374
  readonly byChannel: {
307
375
  readonly type: "object";
308
376
  readonly additionalProperties: false;
@@ -325,6 +393,11 @@ declare const defs: {
325
393
  readonly type: "integer";
326
394
  readonly minimum: 0;
327
395
  };
396
+ readonly optedOut: {
397
+ readonly type: "integer";
398
+ readonly minimum: 0;
399
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
400
+ };
328
401
  };
329
402
  };
330
403
  readonly email: {
@@ -344,6 +417,11 @@ declare const defs: {
344
417
  readonly type: "integer";
345
418
  readonly minimum: 0;
346
419
  };
420
+ readonly optedOut: {
421
+ readonly type: "integer";
422
+ readonly minimum: 0;
423
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
424
+ };
347
425
  };
348
426
  };
349
427
  };
@@ -368,6 +446,11 @@ declare const defs: {
368
446
  readonly type: "integer";
369
447
  readonly minimum: 0;
370
448
  };
449
+ readonly optedOut: {
450
+ readonly type: "integer";
451
+ readonly minimum: 0;
452
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
453
+ };
371
454
  readonly byChannel: {
372
455
  readonly type: "object";
373
456
  readonly additionalProperties: false;
@@ -390,6 +473,11 @@ declare const defs: {
390
473
  readonly type: "integer";
391
474
  readonly minimum: 0;
392
475
  };
476
+ readonly optedOut: {
477
+ readonly type: "integer";
478
+ readonly minimum: 0;
479
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
480
+ };
393
481
  };
394
482
  };
395
483
  readonly email: {
@@ -409,6 +497,11 @@ declare const defs: {
409
497
  readonly type: "integer";
410
498
  readonly minimum: 0;
411
499
  };
500
+ readonly optedOut: {
501
+ readonly type: "integer";
502
+ readonly minimum: 0;
503
+ readonly description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.";
504
+ };
412
505
  };
413
506
  };
414
507
  };
@@ -31,10 +31,15 @@ const PLATFORM_ROLE_NAMES = [
31
31
  /**
32
32
  * The people outside the platform a broadcast may name, sourced from the SIS
33
33
  * roster. `students` is every system user the SIS marks as a Student;
34
- * `parents` is everybody else on the roster — every emergency-contact
34
+ * `staff` is everybody synced with nothing but the Staff role (faculty and
35
+ * staff); `parents` is everybody else on the roster — every emergency-contact
35
36
  * relationship the source system carries, whatever it calls it.
36
37
  */
37
- const EXTERNAL_AUDIENCE_GROUPS = ["students", "parents"];
38
+ const EXTERNAL_AUDIENCE_GROUPS = [
39
+ "students",
40
+ "parents",
41
+ "staff"
42
+ ];
38
43
  const deliveryCountsNode = {
39
44
  type: "object",
40
45
  additionalProperties: false,
@@ -55,9 +60,28 @@ const deliveryCountsNode = {
55
60
  failed: {
56
61
  type: "integer",
57
62
  minimum: 0
63
+ },
64
+ optedOut: {
65
+ type: "integer",
66
+ minimum: 0,
67
+ description: "Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking."
58
68
  }
59
69
  }
60
70
  };
71
+ const SMS_OPT_OUT_REASONS = ["stop", "vendor"];
72
+ const EMAIL_OPT_OUT_REASONS = [
73
+ "unsubscribe",
74
+ "spamReport",
75
+ "bounce"
76
+ ];
77
+ const dateNode = {
78
+ type: ["string", "object"],
79
+ format: "date-time"
80
+ };
81
+ const optedOutAtNode = {
82
+ anyOf: [dateNode, { type: "null" }],
83
+ description: "When the person opted out of this channel; null while they are reachable."
84
+ };
61
85
  const defs = {
62
86
  $schema: "http://json-schema.org/draft-07/schema",
63
87
  $id: "definitions.json",
@@ -347,6 +371,37 @@ const defs = {
347
371
  enum: NOTIFICATION_CHANNELS
348
372
  },
349
373
  deliveryCounts: deliveryCountsNode,
374
+ consent: {
375
+ type: "object",
376
+ additionalProperties: false,
377
+ properties: {
378
+ sms: {
379
+ type: "object",
380
+ additionalProperties: false,
381
+ required: ["optedOutAt"],
382
+ properties: {
383
+ optedOutAt: optedOutAtNode,
384
+ reason: {
385
+ type: "string",
386
+ enum: SMS_OPT_OUT_REASONS
387
+ },
388
+ lastOptOutNoticeAt: dateNode
389
+ }
390
+ },
391
+ email: {
392
+ type: "object",
393
+ additionalProperties: false,
394
+ required: ["optedOutAt"],
395
+ properties: {
396
+ optedOutAt: optedOutAtNode,
397
+ reason: {
398
+ type: "string",
399
+ enum: EMAIL_OPT_OUT_REASONS
400
+ }
401
+ }
402
+ }
403
+ }
404
+ },
350
405
  audience: {
351
406
  type: "object",
352
407
  additionalProperties: false,
@@ -449,6 +504,6 @@ const defs = {
449
504
  }
450
505
  };
451
506
  //#endregion
452
- export { EXTERNAL_AUDIENCE_GROUPS, NOTIFICATION_CHANNELS, PLATFORM_ROLE_NAMES, TICKET_NOTIFICATION_EVENTS, defs as default, defs as definitionsSchema };
507
+ export { EMAIL_OPT_OUT_REASONS, EXTERNAL_AUDIENCE_GROUPS, NOTIFICATION_CHANNELS, PLATFORM_ROLE_NAMES, SMS_OPT_OUT_REASONS, TICKET_NOTIFICATION_EVENTS, defs as default, defs as definitionsSchema };
453
508
 
454
509
  //# sourceMappingURL=definitions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n \"approvalRequested\",\n \"approvalDecided\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\n/**\n * The platform roles an Audience may be selected by. The legacy `Guest` role a\n * permission entry may still carry is deliberately absent: nothing targets it.\n */\nexport const PLATFORM_ROLE_NAMES = [\n \"SuperAdmin\",\n \"Administrator\",\n \"Manager\",\n \"Agent\",\n \"User\",\n] as const;\n\nexport type PlatformRoleName = (typeof PLATFORM_ROLE_NAMES)[number];\n\n/**\n * The people outside the platform a broadcast may name, sourced from the SIS\n * roster. `students` is every system user the SIS marks as a Student;\n * `parents` is everybody else on the roster — every emergency-contact\n * relationship the source system carries, whatever it calls it.\n */\nexport const EXTERNAL_AUDIENCE_GROUPS = [\"students\", \"parents\"] as const;\n\nexport type ExternalAudienceGroup = (typeof EXTERNAL_AUDIENCE_GROUPS)[number];\n\nconst deliveryCountsNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n recipients: { type: \"integer\", minimum: 0 },\n sent: { type: \"integer\", minimum: 0 },\n failed: { type: \"integer\", minimum: 0 },\n },\n} as const;\n\nconst defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"hanwha\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"honeywell-total-connect\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"unifi-access\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBattery\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n deliveryCounts: deliveryCountsNode,\n audience: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Who a people-facing broadcast was directed at, as the sender expressed it, plus the snapshot it resolved to. One shape for Announcements, SOS broadcasts and Automation notifications.\",\n properties: {\n to: {\n type: \"object\",\n additionalProperties: false,\n description:\n 'The User selector, one kind at a time. Absent or empty selects nobody; everyone is only ever the explicit `id: [\"*\"]` wildcard.',\n properties: {\n id: {\n type: \"array\",\n description:\n \"Named User ids, or the single wildcard `*` meaning everyone in scope.\",\n items: { type: \"string\" },\n },\n roles: {\n type: \"array\",\n items: { type: \"string\", enum: PLATFORM_ROLE_NAMES },\n },\n departmentIds: {\n type: \"array\",\n items: { type: \"string\" },\n },\n },\n },\n external: {\n type: \"array\",\n uniqueItems: true,\n description:\n \"Which groups of the external SIS roster were included. Human-triggered sends only; an Automation can never set it.\",\n items: { type: \"string\", enum: EXTERNAL_AUDIENCE_GROUPS },\n },\n emergencyContacts: {\n type: \"boolean\",\n description:\n 'Deprecated: superseded by `external`. A stored `true` reads as `external: [\"parents\"]`.',\n },\n users: {\n type: \"array\",\n description:\n \"Snapshot of the User ids the selector resolved to at send time.\",\n items: { type: \"string\" },\n },\n delivery: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Send-time delivery counts per audience. Absent for an audience that was not sent to.\",\n properties: {\n internal: deliveryCountsNode,\n external: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n emergencyContacts: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n description: \"Deprecated: superseded by `external`.\",\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;;;;;AAQ5D,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;AACF;;;;;;;AAUA,MAAa,2BAA2B,CAAC,YAAY,SAAS;AAI9D,MAAM,qBAAqB;CACzB,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAc;EAAQ;CAAQ;CACzC,YAAY;EACV,YAAY;GAAE,MAAM;GAAW,SAAS;EAAE;EAC1C,MAAM;GAAE,MAAM;GAAW,SAAS;EAAE;EACpC,QAAQ;GAAE,MAAM;GAAW,SAAS;EAAE;CACxC;AACF;AAEA,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;EACA,gBAAgB;EAChB,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,aACE;GACF,YAAY;IACV,IAAI;KACF,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,IAAI;OACF,MAAM;OACN,aACE;OACF,OAAO,EAAE,MAAM,SAAS;MAC1B;MACA,OAAO;OACL,MAAM;OACN,OAAO;QAAE,MAAM;QAAU,MAAM;OAAoB;MACrD;MACA,eAAe;OACb,MAAM;OACN,OAAO,EAAE,MAAM,SAAS;MAC1B;KACF;IACF;IACA,UAAU;KACR,MAAM;KACN,aAAa;KACb,aACE;KACF,OAAO;MAAE,MAAM;MAAU,MAAM;KAAyB;IAC1D;IACA,mBAAmB;KACjB,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aACE;KACF,OAAO,EAAE,MAAM,SAAS;IAC1B;IACA,UAAU;KACR,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,UAAU;MACV,UAAU;OACR,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;MACA,mBAAmB;OACjB,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,aAAa;OACb,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;KACF;IACF;GACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"definitions.js","names":[],"sources":["../../.generated/schemas/definitions.ts"],"sourcesContent":["export const TICKET_NOTIFICATION_EVENTS = [\n \"ticketCreated\",\n \"ticketAssignedToMe\",\n \"addedAsCollaborator\",\n \"mentionedInTicket\",\n \"messageOnMyTicket\",\n \"ticketResolved\",\n \"ticketCreatedAsObserver\",\n \"messageAsObserver\",\n \"ticketResolvedAsObserver\",\n \"approvalRequested\",\n \"approvalDecided\",\n] as const;\n\nexport type TicketNotificationEvent =\n (typeof TICKET_NOTIFICATION_EVENTS)[number];\n\nexport const NOTIFICATION_CHANNELS = [\"email\", \"sms\", \"push\"] as const;\n\nexport type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];\n\n/**\n * The platform roles an Audience may be selected by. The legacy `Guest` role a\n * permission entry may still carry is deliberately absent: nothing targets it.\n */\nexport const PLATFORM_ROLE_NAMES = [\n \"SuperAdmin\",\n \"Administrator\",\n \"Manager\",\n \"Agent\",\n \"User\",\n] as const;\n\nexport type PlatformRoleName = (typeof PLATFORM_ROLE_NAMES)[number];\n\n/**\n * The people outside the platform a broadcast may name, sourced from the SIS\n * roster. `students` is every system user the SIS marks as a Student;\n * `staff` is everybody synced with nothing but the Staff role (faculty and\n * staff); `parents` is everybody else on the roster — every emergency-contact\n * relationship the source system carries, whatever it calls it.\n */\nexport const EXTERNAL_AUDIENCE_GROUPS = [\n \"students\",\n \"parents\",\n \"staff\",\n] as const;\n\nexport type ExternalAudienceGroup = (typeof EXTERNAL_AUDIENCE_GROUPS)[number];\n\nconst deliveryCountsNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n recipients: { type: \"integer\", minimum: 0 },\n sent: { type: \"integer\", minimum: 0 },\n failed: { type: \"integer\", minimum: 0 },\n optedOut: {\n type: \"integer\",\n minimum: 0,\n description:\n \"Recipients skipped because they opted out of this channel. Counted apart from `failed`; absent on sends recorded before opt-out tracking.\",\n },\n },\n} as const;\n\nexport const SMS_OPT_OUT_REASONS = [\"stop\", \"vendor\"] as const;\nexport const EMAIL_OPT_OUT_REASONS = [\n \"unsubscribe\",\n \"spamReport\",\n \"bounce\",\n] as const;\n\nconst dateNode = { type: [\"string\", \"object\"], format: \"date-time\" } as const;\n\nconst optedOutAtNode = {\n anyOf: [dateNode, { type: \"null\" }],\n description:\n \"When the person opted out of this channel; null while they are reachable.\",\n} as const;\n\n/**\n * Per-channel opt-out state for a person reached over external messaging.\n * Written by inbound STOP/START and vendor suppression events; read before\n * every external send. A channel is opted out exactly when `optedOutAt` holds\n * a date. Lives on SystemUser today; the same\n * node could later sit in a User's per-Organization preferences entry.\n */\nconst consentNode = {\n type: \"object\",\n additionalProperties: false,\n properties: {\n sms: {\n type: \"object\",\n additionalProperties: false,\n required: [\"optedOutAt\"],\n properties: {\n optedOutAt: optedOutAtNode,\n reason: { type: \"string\", enum: SMS_OPT_OUT_REASONS },\n lastOptOutNoticeAt: dateNode,\n },\n },\n email: {\n type: \"object\",\n additionalProperties: false,\n required: [\"optedOutAt\"],\n properties: {\n optedOutAt: optedOutAtNode,\n reason: { type: \"string\", enum: EMAIL_OPT_OUT_REASONS },\n },\n },\n },\n} as const;\n\nconst defs = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"definitions.json\",\n title: \"Definitions\",\n definitions: {\n id: {\n type: \"string\",\n description: \"Identifier of the object.\",\n },\n systemId: {\n type: \"string\",\n description: \"Identifier of the object, directly related to the system.\",\n },\n systemData: {\n type: \"object\",\n },\n metadata: {\n type: \"object\",\n default: {},\n },\n date: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n file: {\n type: \"object\",\n required: [\"name\", \"type\", \"data\"],\n properties: {\n name: {\n type: \"string\",\n description: \"Name of the file.\",\n },\n type: {\n type: \"string\",\n description: \"MIME type of the file (e.g. application/pdf).\",\n },\n data: {\n type: \"string\",\n description: \"Base64-encoded data of the file.\",\n },\n },\n },\n address: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n line1: {\n type: \"string\",\n },\n line2: {\n type: \"string\",\n },\n line3: {\n type: \"string\",\n },\n city: {\n type: \"string\",\n },\n state: {\n type: \"string\",\n },\n postalCode: {\n type: \"string\",\n },\n countryCode: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n },\n },\n driver: {\n type: \"string\",\n description: \"Driver used to communicate with the object.\",\n enum: [\n \"adlink\",\n \"apex-american-audio\",\n \"avigilon-alta\",\n \"aws-kinesis\",\n \"bacnet\",\n \"benq\",\n \"butler\",\n \"comelit\",\n \"cool-automation\",\n \"crestron\",\n \"dell\",\n \"digital-watchdog\",\n \"distech\",\n \"dmp\",\n \"doorbird\",\n \"dormakaba\",\n \"dsc\",\n \"dsc-itv2\",\n \"earbridge\",\n \"ecobee\",\n \"epson\",\n \"geovision-rs\",\n \"geovision-as-manager\",\n \"hanwha\",\n \"honeywell-vista\",\n \"honeywell-resideo\",\n \"honeywell-total-connect\",\n \"igor\",\n \"inncom\",\n \"isapi\",\n \"kohost-k7\",\n \"kohost\",\n \"lapi\",\n \"lg\",\n \"lg-webos\",\n \"linortek\",\n \"lirc\",\n \"mews\",\n \"mht\",\n \"mobile-mule\",\n \"mock\",\n \"modbus\",\n \"napco\",\n \"newline\",\n \"obix\",\n \"one-roster\",\n \"onvif\",\n \"orchid-fusion\",\n \"paxton\",\n \"pdk\",\n \"pelican-wireless\",\n \"power-shades\",\n \"rachio\",\n \"rebrandly\",\n \"relay\",\n \"reolink\",\n \"rtsp\",\n \"salto\",\n \"salto-irn\",\n \"samsung\",\n \"se\",\n \"sendgrid\",\n \"singlewire\",\n \"smartboard\",\n \"sonifi\",\n \"stay-n-touch\",\n \"storable\",\n \"twilio\",\n \"unifi\",\n \"unifi-access\",\n \"valcom\",\n \"veracross\",\n \"verkada\",\n \"vivotek\",\n \"vizio\",\n \"wisenet\",\n \"zkteco\",\n \"cloudflare-images\",\n \"cloudflare-stream\",\n \"insperia-privacy\",\n ],\n },\n type: {\n type: \"string\",\n enum: [\n \"alarm\",\n \"camera\",\n \"courtesy\",\n \"dimmer\",\n \"gateway\",\n \"lock\",\n \"mediaSource\",\n \"motionSensor\",\n \"switch\",\n \"thermostat\",\n \"windowCovering\",\n ],\n },\n name: {\n type: \"string\",\n },\n alerts: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"status\", \"message\"],\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\n \"Battery\",\n \"Button\",\n \"Communication\",\n \"Config\",\n \"Cost\",\n \"Door Ajar\",\n \"Equipment\",\n \"Maintenance\",\n \"Motion\",\n \"Registration\",\n \"Temperature\",\n ],\n },\n status: {\n type: \"string\",\n enum: [\"Active\", \"Resolved\"],\n },\n message: {\n type: \"string\",\n },\n },\n },\n },\n supportedNotifications: {\n type: \"array\",\n uniqueItems: true,\n items: {\n enum: [\n \"button 1\",\n \"button 2\",\n \"button 3\",\n \"button 4\",\n \"button 5\",\n \"idle\",\n \"powerHasBeedApplied\",\n \"acMainsDisconnected\",\n \"acMainsReconnected\",\n \"replaceBattery\",\n \"replaceBatterySoon\",\n \"replaceBatteryNow\",\n \"batteryOk\",\n \"hardwareFailure\",\n \"softwareFailure\",\n \"hardwareFailureWithCode\",\n \"softwareFailureWithCode\",\n \"motionDetection\",\n \"airFilterNeedsCleaned\",\n \"airFilterNeedsReplaced\",\n \"smokeDetected\",\n \"outsideSafeTemperatureRange\",\n \"outsideSafeHumidityRange\",\n \"scheduleMaintenance\",\n \"doorAjar\",\n \"communicationFailure\",\n \"communicationOk\",\n \"burglarAlarm\",\n \"fireAlarm\",\n \"powerTrouble\",\n \"monitoringTrouble\",\n \"bellTrouble\",\n \"configIssue\",\n ],\n },\n },\n notification: {\n type: [\"object\", \"null\"],\n properties: {\n name: {\n type: \"string\",\n $ref: \"#/definitions/supportedNotifications/items\",\n },\n timestamp: {\n type: \"number\",\n minimum: 1655907956593,\n },\n description: {\n type: \"string\",\n },\n },\n },\n batteryLevel: {\n type: \"number\",\n minimum: 0,\n maximum: 100,\n },\n watts: {\n type: \"number\",\n minimum: 0,\n },\n revenue: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n date: {\n type: \"string\",\n format: \"date-time\",\n },\n price: {\n type: \"number\",\n },\n tax: {\n type: [\"number\", \"null\"],\n },\n },\n },\n },\n ticketNotificationEvent: {\n type: \"string\",\n enum: TICKET_NOTIFICATION_EVENTS,\n },\n notificationChannel: {\n type: \"string\",\n enum: NOTIFICATION_CHANNELS,\n },\n deliveryCounts: deliveryCountsNode,\n consent: consentNode,\n audience: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Who a people-facing broadcast was directed at, as the sender expressed it, plus the snapshot it resolved to. One shape for Announcements, SOS broadcasts and Automation notifications.\",\n properties: {\n to: {\n type: \"object\",\n additionalProperties: false,\n description:\n 'The User selector, one kind at a time. Absent or empty selects nobody; everyone is only ever the explicit `id: [\"*\"]` wildcard.',\n properties: {\n id: {\n type: \"array\",\n description:\n \"Named User ids, or the single wildcard `*` meaning everyone in scope.\",\n items: { type: \"string\" },\n },\n roles: {\n type: \"array\",\n items: { type: \"string\", enum: PLATFORM_ROLE_NAMES },\n },\n departmentIds: {\n type: \"array\",\n items: { type: \"string\" },\n },\n },\n },\n external: {\n type: \"array\",\n uniqueItems: true,\n description:\n \"Which groups of the external SIS roster were included. Human-triggered sends only; an Automation can never set it.\",\n items: { type: \"string\", enum: EXTERNAL_AUDIENCE_GROUPS },\n },\n emergencyContacts: {\n type: \"boolean\",\n description:\n 'Deprecated: superseded by `external`. A stored `true` reads as `external: [\"parents\"]`.',\n },\n users: {\n type: \"array\",\n description:\n \"Snapshot of the User ids the selector resolved to at send time.\",\n items: { type: \"string\" },\n },\n delivery: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Send-time delivery counts per audience. Absent for an audience that was not sent to.\",\n properties: {\n internal: deliveryCountsNode,\n external: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n emergencyContacts: {\n type: \"object\",\n additionalProperties: false,\n required: [\"recipients\", \"sent\", \"failed\"],\n description: \"Deprecated: superseded by `external`.\",\n properties: {\n ...deliveryCountsNode.properties,\n byChannel: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"Per-channel counts, present only for the channels attempted.\",\n properties: {\n sms: deliveryCountsNode,\n email: deliveryCountsNode,\n },\n },\n },\n },\n },\n },\n },\n },\n },\n} as const;\n\nexport type ISODateString = ReturnType<Date[\"toISOString\"]>;\n\nexport { defs as definitionsSchema };\nexport default defs;\n"],"mappings":";AAAA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAKA,MAAa,wBAAwB;CAAC;CAAS;CAAO;AAAM;;;;;AAQ5D,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;AACF;;;;;;;;AAWA,MAAa,2BAA2B;CACtC;CACA;CACA;AACF;AAIA,MAAM,qBAAqB;CACzB,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAc;EAAQ;CAAQ;CACzC,YAAY;EACV,YAAY;GAAE,MAAM;GAAW,SAAS;EAAE;EAC1C,MAAM;GAAE,MAAM;GAAW,SAAS;EAAE;EACpC,QAAQ;GAAE,MAAM;GAAW,SAAS;EAAE;EACtC,UAAU;GACR,MAAM;GACN,SAAS;GACT,aACE;EACJ;CACF;AACF;AAEA,MAAa,sBAAsB,CAAC,QAAQ,QAAQ;AACpD,MAAa,wBAAwB;CACnC;CACA;CACA;AACF;AAEA,MAAM,WAAW;CAAE,MAAM,CAAC,UAAU,QAAQ;CAAG,QAAQ;AAAY;AAEnE,MAAM,iBAAiB;CACrB,OAAO,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC;CAClC,aACE;AACJ;AAmCA,MAAM,OAAO;CACX,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;EACX,IAAI;GACF,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;EACf;EACA,YAAY,EACV,MAAM,SACR;EACA,UAAU;GACR,MAAM;GACN,SAAS,CAAC;EACZ;EACA,MAAM;GACJ,MAAM,CAAC,UAAU,QAAQ;GACzB,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,UAAU;IAAC;IAAQ;IAAQ;GAAM;GACjC,YAAY;IACV,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,MAAM;KACJ,MAAM;KACN,aAAa;IACf;GACF;EACF;EACA,SAAS;GACP,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,IAAI,EACF,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,MAAM,EACJ,MAAM,SACR;IACA,OAAO,EACL,MAAM,SACR;IACA,YAAY,EACV,MAAM,SACR;IACA,aAAa;KACX,MAAM;KACN,WAAW;KACX,WAAW;IACb;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,sBAAsB;IACtB,UAAU;KAAC;KAAQ;KAAU;IAAS;IACtC,YAAY;KACV,IAAI,EACF,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;KACF;KACA,QAAQ;MACN,MAAM;MACN,MAAM,CAAC,UAAU,UAAU;KAC7B;KACA,SAAS,EACP,MAAM,SACR;IACF;GACF;EACF;EACA,wBAAwB;GACtB,MAAM;GACN,aAAa;GACb,OAAO,EACL,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,EACF;EACF;EACA,cAAc;GACZ,MAAM,CAAC,UAAU,MAAM;GACvB,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM;IACR;IACA,WAAW;KACT,MAAM;KACN,SAAS;IACX;IACA,aAAa,EACX,MAAM,SACR;GACF;EACF;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,QAAQ;KACV;KACA,OAAO,EACL,MAAM,SACR;KACA,KAAK,EACH,MAAM,CAAC,UAAU,MAAM,EACzB;IACF;GACF;EACF;EACA,yBAAyB;GACvB,MAAM;GACN,MAAM;EACR;EACA,qBAAqB;GACnB,MAAM;GACN,MAAM;EACR;EACA,gBAAgB;EAChB,SAAS;GApVX,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,KAAK;KACH,MAAM;KACN,sBAAsB;KACtB,UAAU,CAAC,YAAY;KACvB,YAAY;MACV,YAAY;MACZ,QAAQ;OAAE,MAAM;OAAU,MAAM;MAAoB;MACpD,oBAAoB;KACtB;IACF;IACA,OAAO;KACL,MAAM;KACN,sBAAsB;KACtB,UAAU,CAAC,YAAY;KACvB,YAAY;MACV,YAAY;MACZ,QAAQ;OAAE,MAAM;OAAU,MAAM;MAAsB;KACxD;IACF;GACF;EA8TqB;EACnB,UAAU;GACR,MAAM;GACN,sBAAsB;GACtB,aACE;GACF,YAAY;IACV,IAAI;KACF,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,IAAI;OACF,MAAM;OACN,aACE;OACF,OAAO,EAAE,MAAM,SAAS;MAC1B;MACA,OAAO;OACL,MAAM;OACN,OAAO;QAAE,MAAM;QAAU,MAAM;OAAoB;MACrD;MACA,eAAe;OACb,MAAM;OACN,OAAO,EAAE,MAAM,SAAS;MAC1B;KACF;IACF;IACA,UAAU;KACR,MAAM;KACN,aAAa;KACb,aACE;KACF,OAAO;MAAE,MAAM;MAAU,MAAM;KAAyB;IAC1D;IACA,mBAAmB;KACjB,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aACE;KACF,OAAO,EAAE,MAAM,SAAS;IAC1B;IACA,UAAU;KACR,MAAM;KACN,sBAAsB;KACtB,aACE;KACF,YAAY;MACV,UAAU;MACV,UAAU;OACR,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;MACA,mBAAmB;OACjB,MAAM;OACN,sBAAsB;OACtB,UAAU;QAAC;QAAc;QAAQ;OAAQ;OACzC,aAAa;OACb,YAAY;QACV,GAAG,mBAAmB;QACtB,WAAW;SACT,MAAM;SACN,sBAAsB;SACtB,aACE;SACF,YAAY;UACV,KAAK;UACL,OAAO;SACT;QACF;OACF;MACF;KACF;IACF;GACF;EACF;CACF;AACF"}
@@ -18,6 +18,10 @@ export declare const groupSchema: {
18
18
  readonly driver: {
19
19
  readonly $ref: "definitions.json#/definitions/driver";
20
20
  };
21
+ readonly propertyId: {
22
+ readonly type: "string";
23
+ readonly description: "ID of the Property this synced group belongs to. Used as a per-document filter inside the org-scoped database.";
24
+ };
21
25
  readonly type: {
22
26
  readonly type: "string";
23
27
  readonly enum: readonly ["group"];
@@ -15,6 +15,10 @@ const groupSchema = {
15
15
  id: { $ref: "definitions.json#/definitions/id" },
16
16
  systemId: { $ref: "definitions.json#/definitions/systemId" },
17
17
  driver: { $ref: "definitions.json#/definitions/driver" },
18
+ propertyId: {
19
+ type: "string",
20
+ description: "ID of the Property this synced group belongs to. Used as a per-document filter inside the org-scoped database."
21
+ },
18
22
  type: {
19
23
  type: "string",
20
24
  enum: ["group"],
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","names":[],"sources":["../../.generated/schemas/group.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const groupSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"group.json\",\n title: \"Group\",\n description: \"A named collection of members.\",\n type: \"object\",\n required: [\"id\", \"type\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n },\n type: {\n type: \"string\",\n enum: [\"group\"],\n default: \"group\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"social\",\n \"department\",\n ],\n },\n name: {\n type: \"string\",\n },\n members: {\n type: \"array\",\n items: {\n type: \"object\",\n required: [\"id\", \"type\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n description: \"The type of the member resource.\",\n },\n role: {\n type: \"string\",\n description: \"The role of the member within this group.\",\n },\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type GroupSchema = FromSchema<\n typeof groupSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,cAAc;CACzB,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;CACb,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;CAAe;CACxC,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,UAAU,EACR,MAAM,yCACR;EACA,QAAQ,EACN,MAAM,uCACR;EACA,MAAM;GACJ,MAAM;GACN,MAAM,CAAC,OAAO;GACd,SAAS;EACX;EACA,eAAe;GACb,MAAM;GACN,MAAM,CACJ,UACA,YACF;EACF;EACA,MAAM,EACJ,MAAM,SACR;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,UAAU,CAAC,MAAM,MAAM;IACvB,sBAAsB;IACtB,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;IACF;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
1
+ {"version":3,"file":"group.js","names":[],"sources":["../../.generated/schemas/group.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const groupSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"group.json\",\n title: \"Group\",\n description: \"A named collection of members.\",\n type: \"object\",\n required: [\"id\", \"type\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n },\n propertyId: {\n type: \"string\",\n description:\n \"ID of the Property this synced group belongs to. Used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"group\"],\n default: \"group\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"social\", \"department\"],\n },\n name: {\n type: \"string\",\n },\n members: {\n type: \"array\",\n items: {\n type: \"object\",\n required: [\"id\", \"type\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n description: \"The type of the member resource.\",\n },\n role: {\n type: \"string\",\n description: \"The role of the member within this group.\",\n },\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type GroupSchema = FromSchema<\n typeof groupSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,cAAc;CACzB,SAAS;CACT,KAAK;CACL,OAAO;CACP,aAAa;CACb,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;CAAe;CACxC,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,UAAU,EACR,MAAM,yCACR;EACA,QAAQ,EACN,MAAM,uCACR;EACA,YAAY;GACV,MAAM;GACN,aACE;EACJ;EACA,MAAM;GACJ,MAAM;GACN,MAAM,CAAC,OAAO;GACd,SAAS;EACX;EACA,eAAe;GACb,MAAM;GACN,MAAM,CAAC,UAAU,YAAY;EAC/B;EACA,MAAM,EACJ,MAAM,SACR;EACA,SAAS;GACP,MAAM;GACN,OAAO;IACL,MAAM;IACN,UAAU,CAAC,MAAM,MAAM;IACvB,sBAAsB;IACtB,YAAY;KACV,IAAI,EACF,MAAM,mCACR;KACA,MAAM,EACJ,MAAM,SACR;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;IACF;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
@@ -119,6 +119,10 @@ export declare const systemSchema: {
119
119
  };
120
120
  };
121
121
  };
122
+ readonly syncedAt: {
123
+ readonly $ref: "definitions.json#/definitions/date";
124
+ readonly description: "When the system's roster (people and households) was last synced into the platform.";
125
+ };
122
126
  readonly createdAt: {
123
127
  readonly $ref: "definitions.json#/definitions/date";
124
128
  };
@@ -114,6 +114,10 @@ const systemSchema = {
114
114
  }
115
115
  }
116
116
  },
117
+ syncedAt: {
118
+ $ref: "definitions.json#/definitions/date",
119
+ description: "When the system's roster (people and households) was last synced into the platform."
120
+ },
117
121
  createdAt: { $ref: "definitions.json#/definitions/date" },
118
122
  updatedAt: { $ref: "definitions.json#/definitions/date" },
119
123
  deletedAt: { $ref: "definitions.json#/definitions/date" }
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","names":[],"sources":["../../.generated/schemas/system.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const systemSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"system.json\",\n title: \"System\",\n type: \"object\",\n required: [\"id\", \"type\", \"driver\", \"entities\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"system\",\n enum: [\"system\"],\n },\n name: {\n type: \"string\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n example: \"salto\",\n description: \"The driver value that implements the system\",\n },\n organizationId: {\n type: \"string\",\n description: \"The id of the organization that uses the system\",\n },\n propertyId: {\n type: \"string\",\n description: \"The id of the property that uses the system\",\n },\n entities: {\n type: \"array\",\n description: \"The entities produced by the system\",\n default: [],\n items: {\n type: \"object\",\n required: [\"systemId\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The id of the entity\",\n },\n systemId: {\n type: \"string\",\n description: \"The id of the entity as known by the system\",\n },\n type: {\n type: \"string\",\n description: \"The type of the entity\",\n },\n discriminator: {\n type: \"string\",\n description: \"The discriminator of the entity\",\n },\n propertyIds: {\n type: \"array\",\n description:\n \"The ids of the properties where the entity is located\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n driverApiVersion: {\n type: \"string\",\n description: \"The version of the driver API used by the system\",\n },\n logo: {\n $ref: \"mediaFile.json#\",\n },\n config: {\n type: \"object\",\n additionalProperties: true,\n description: \"The runtime configuration of the system\",\n },\n contactInfo: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n websiteUrl: {\n type: \"string\",\n description: \"The website URL of the system\",\n },\n email: {\n type: \"string\",\n description: \"The email address of the system\",\n },\n phone: {\n type: \"string\",\n description: \"The phone number of the system\",\n },\n itunesAppId: {\n type: \"string\",\n example: \"807316865\",\n },\n googleAppId: {\n type: \"string\",\n example: \"tw.com.geovision.gvaccesscontrol\",\n },\n },\n },\n health: {\n type: \"object\",\n properties: {\n offline: {\n type: \"boolean\",\n description: \"Whether the system is offline\",\n },\n lastHeartbeatAt: {\n type: \"string\",\n description:\n \"The date and time of the last communication with the system\",\n format: \"date-time\",\n },\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type SystemSchema = FromSchema<\n typeof systemSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAU;CAAU;CAC7C,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,QAAQ;EACjB;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,gBAAgB;GACd,MAAM;GACN,aAAa;EACf;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS,CAAC;GACV,OAAO;IACL,MAAM;IACN,UAAU,CAAC,UAAU;IACrB,YAAY;KACV,IAAI;MACF,MAAM;MACN,aAAa;KACf;KACA,UAAU;MACR,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,eAAe;MACb,MAAM;MACN,aAAa;KACf;KACA,aAAa;MACX,MAAM;MACN,aACE;MACF,OAAO,EACL,MAAM,SACR;KACF;IACF;GACF;EACF;EACA,kBAAkB;GAChB,MAAM;GACN,aAAa;EACf;EACA,MAAM,EACJ,MAAM,kBACR;EACA,QAAQ;GACN,MAAM;GACN,sBAAsB;GACtB,aAAa;EACf;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,YAAY;KACV,MAAM;KACN,aAAa;IACf;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,aAAa;KACX,MAAM;KACN,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,SAAS;IACX;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,YAAY;IACV,SAAS;KACP,MAAM;KACN,aAAa;IACf;IACA,iBAAiB;KACf,MAAM;KACN,aACE;KACF,QAAQ;IACV;GACF;EACF;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
1
+ {"version":3,"file":"system.js","names":[],"sources":["../../.generated/schemas/system.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const systemSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"system.json\",\n title: \"System\",\n type: \"object\",\n required: [\"id\", \"type\", \"driver\", \"entities\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"system\",\n enum: [\"system\"],\n },\n name: {\n type: \"string\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n example: \"salto\",\n description: \"The driver value that implements the system\",\n },\n organizationId: {\n type: \"string\",\n description: \"The id of the organization that uses the system\",\n },\n propertyId: {\n type: \"string\",\n description: \"The id of the property that uses the system\",\n },\n entities: {\n type: \"array\",\n description: \"The entities produced by the system\",\n default: [],\n items: {\n type: \"object\",\n required: [\"systemId\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The id of the entity\",\n },\n systemId: {\n type: \"string\",\n description: \"The id of the entity as known by the system\",\n },\n type: {\n type: \"string\",\n description: \"The type of the entity\",\n },\n discriminator: {\n type: \"string\",\n description: \"The discriminator of the entity\",\n },\n propertyIds: {\n type: \"array\",\n description:\n \"The ids of the properties where the entity is located\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n driverApiVersion: {\n type: \"string\",\n description: \"The version of the driver API used by the system\",\n },\n logo: {\n $ref: \"mediaFile.json#\",\n },\n config: {\n type: \"object\",\n additionalProperties: true,\n description: \"The runtime configuration of the system\",\n },\n contactInfo: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n websiteUrl: {\n type: \"string\",\n description: \"The website URL of the system\",\n },\n email: {\n type: \"string\",\n description: \"The email address of the system\",\n },\n phone: {\n type: \"string\",\n description: \"The phone number of the system\",\n },\n itunesAppId: {\n type: \"string\",\n example: \"807316865\",\n },\n googleAppId: {\n type: \"string\",\n example: \"tw.com.geovision.gvaccesscontrol\",\n },\n },\n },\n health: {\n type: \"object\",\n properties: {\n offline: {\n type: \"boolean\",\n description: \"Whether the system is offline\",\n },\n lastHeartbeatAt: {\n type: \"string\",\n description:\n \"The date and time of the last communication with the system\",\n format: \"date-time\",\n },\n },\n },\n syncedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"When the system's roster (people and households) was last synced into the platform.\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type SystemSchema = FromSchema<\n typeof systemSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,SAAS;CACT,KAAK;CACL,OAAO;CACP,MAAM;CACN,UAAU;EAAC;EAAM;EAAQ;EAAU;CAAU;CAC7C,sBAAsB;CACtB,YAAY;EACV,IAAI,EACF,MAAM,SACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,QAAQ;EACjB;EACA,MAAM,EACJ,MAAM,SACR;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,gBAAgB;GACd,MAAM;GACN,aAAa;EACf;EACA,YAAY;GACV,MAAM;GACN,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS,CAAC;GACV,OAAO;IACL,MAAM;IACN,UAAU,CAAC,UAAU;IACrB,YAAY;KACV,IAAI;MACF,MAAM;MACN,aAAa;KACf;KACA,UAAU;MACR,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,eAAe;MACb,MAAM;MACN,aAAa;KACf;KACA,aAAa;MACX,MAAM;MACN,aACE;MACF,OAAO,EACL,MAAM,SACR;KACF;IACF;GACF;EACF;EACA,kBAAkB;GAChB,MAAM;GACN,aAAa;EACf;EACA,MAAM,EACJ,MAAM,kBACR;EACA,QAAQ;GACN,MAAM;GACN,sBAAsB;GACtB,aAAa;EACf;EACA,aAAa;GACX,MAAM;GACN,sBAAsB;GACtB,YAAY;IACV,YAAY;KACV,MAAM;KACN,aAAa;IACf;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,aAAa;KACX,MAAM;KACN,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,SAAS;IACX;GACF;EACF;EACA,QAAQ;GACN,MAAM;GACN,YAAY;IACV,SAAS;KACP,MAAM;KACN,aAAa;IACf;IACA,iBAAiB;KACf,MAAM;KACN,aACE;KACF,QAAQ;IACV;GACF;EACF;EACA,UAAU;GACR,MAAM;GACN,aACE;EACJ;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
@@ -101,9 +101,8 @@ export declare const systemUserSchema: {
101
101
  readonly type: "string";
102
102
  readonly description: "ID of the Property this synced user belongs to. Used as a per-document filter inside the org-scoped database.";
103
103
  };
104
- readonly syncedAt: {
105
- readonly $ref: "definitions.json#/definitions/date";
106
- readonly description: "When this user was last written through from its source system.";
104
+ readonly consent: {
105
+ readonly $ref: "definitions.json#/definitions/consent";
107
106
  };
108
107
  };
109
108
  };
@@ -92,10 +92,7 @@ const systemUserSchema = {
92
92
  type: "string",
93
93
  description: "ID of the Property this synced user belongs to. Used as a per-document filter inside the org-scoped database."
94
94
  },
95
- syncedAt: {
96
- $ref: "definitions.json#/definitions/date",
97
- description: "When this user was last written through from its source system."
98
- }
95
+ consent: { $ref: "definitions.json#/definitions/consent" }
99
96
  }
100
97
  };
101
98
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"systemUser.js","names":[],"sources":["../../.generated/schemas/systemUser.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const systemUserSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"systemUser.json\",\n title: \"System User\",\n description:\n \"A system user is a user that originated from an external 3rd party system.\",\n type: \"object\",\n required: [\"id\", \"firstName\", \"lastName\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"systemUser\",\n enum: [\"systemUser\"],\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n },\n firstName: {\n type: \"string\",\n },\n lastName: {\n type: \"string\",\n },\n phone: {\n type: [\"string\", \"null\"],\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n email: {\n type: [\"string\", \"null\"],\n format: \"email\",\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n photo: {\n type: \"string\",\n },\n jobTitle: {\n type: \"string\",\n },\n dob: {\n type: \"string\",\n },\n gender: {\n type: [\"string\", \"null\"],\n enum: [\"male\", \"female\", null],\n },\n roles: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"Administrator\",\n \"Caretaker\",\n \"Colleague\",\n \"Friend\",\n \"Guardian\",\n \"Guest\",\n \"Maintenance\",\n \"Manager\",\n \"Neighbor\",\n \"Parent\",\n \"Relative\",\n \"Staff\",\n \"Student\",\n \"SuperAdmin\",\n \"User\",\n ],\n },\n },\n nationality: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n notes: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n files: {\n type: \"array\",\n items: {\n $ref: \"mediaFile.json#\",\n },\n },\n identifications: {\n type: \"array\",\n items: {\n $ref: \"identification.json#\",\n },\n },\n payments: {\n type: \"array\",\n items: {\n $ref: \"payment.json#\",\n },\n },\n revenue: {\n $ref: \"definitions.json#/definitions/revenue\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n propertyId: {\n type: \"string\",\n description:\n \"ID of the Property this synced user belongs to. Used as a per-document filter inside the org-scoped database.\",\n },\n syncedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"When this user was last written through from its source system.\",\n },\n },\n} as const;\n\nexport type SystemUserSchema = FromSchema<\n typeof systemUserSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,mBAAmB;CAC9B,SAAS;CACT,KAAK;CACL,OAAO;CACP,aACE;CACF,MAAM;CACN,UAAU;EAAC;EAAM;EAAa;CAAU;CACxC,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,YAAY;EACrB;EACA,QAAQ,EACN,MAAM,uCACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,OAAO;GACL,MAAM,CAAC,UAAU,MAAM;GACvB,SAAS;EACX;EACA,OAAO;GACL,MAAM,CAAC,UAAU,MAAM;GACvB,QAAQ;EACV;EACA,SAAS,EACP,MAAM,wCACR;EACA,OAAO,EACL,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,KAAK,EACH,MAAM,SACR;EACA,QAAQ;GACN,MAAM,CAAC,UAAU,MAAM;GACvB,MAAM;IAAC;IAAQ;IAAU;GAAI;EAC/B;EACA,OAAO;GACL,MAAM;GACN,OAAO;IACL,MAAM;IACN,MAAM;KACJ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF;GACF;EACF;EACA,aAAa;GACX,MAAM;GACN,WAAW;GACX,WAAW;EACb;EACA,OAAO;GACL,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,OAAO;GACL,MAAM;GACN,OAAO,EACL,MAAM,kBACR;EACF;EACA,iBAAiB;GACf,MAAM;GACN,OAAO,EACL,MAAM,uBACR;EACF;EACA,UAAU;GACR,MAAM;GACN,OAAO,EACL,MAAM,gBACR;EACF;EACA,SAAS,EACP,MAAM,wCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,yCACR;EACA,YAAY;GACV,MAAM;GACN,aACE;EACJ;EACA,UAAU;GACR,MAAM;GACN,aACE;EACJ;CACF;AACF"}
1
+ {"version":3,"file":"systemUser.js","names":[],"sources":["../../.generated/schemas/systemUser.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const systemUserSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"systemUser.json\",\n title: \"System User\",\n description:\n \"A system user is a user that originated from an external 3rd party system.\",\n type: \"object\",\n required: [\"id\", \"firstName\", \"lastName\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"systemUser\",\n enum: [\"systemUser\"],\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n },\n firstName: {\n type: \"string\",\n },\n lastName: {\n type: \"string\",\n },\n phone: {\n type: [\"string\", \"null\"],\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n email: {\n type: [\"string\", \"null\"],\n format: \"email\",\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n photo: {\n type: \"string\",\n },\n jobTitle: {\n type: \"string\",\n },\n dob: {\n type: \"string\",\n },\n gender: {\n type: [\"string\", \"null\"],\n enum: [\"male\", \"female\", null],\n },\n roles: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"Administrator\",\n \"Caretaker\",\n \"Colleague\",\n \"Friend\",\n \"Guardian\",\n \"Guest\",\n \"Maintenance\",\n \"Manager\",\n \"Neighbor\",\n \"Parent\",\n \"Relative\",\n \"Staff\",\n \"Student\",\n \"SuperAdmin\",\n \"User\",\n ],\n },\n },\n nationality: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n notes: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n files: {\n type: \"array\",\n items: {\n $ref: \"mediaFile.json#\",\n },\n },\n identifications: {\n type: \"array\",\n items: {\n $ref: \"identification.json#\",\n },\n },\n payments: {\n type: \"array\",\n items: {\n $ref: \"payment.json#\",\n },\n },\n revenue: {\n $ref: \"definitions.json#/definitions/revenue\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n propertyId: {\n type: \"string\",\n description:\n \"ID of the Property this synced user belongs to. Used as a per-document filter inside the org-scoped database.\",\n },\n consent: {\n $ref: \"definitions.json#/definitions/consent\",\n },\n },\n} as const;\n\nexport type SystemUserSchema = FromSchema<\n typeof systemUserSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":";AAGA,MAAa,mBAAmB;CAC9B,SAAS;CACT,KAAK;CACL,OAAO;CACP,aACE;CACF,MAAM;CACN,UAAU;EAAC;EAAM;EAAa;CAAU;CACxC,YAAY;EACV,IAAI,EACF,MAAM,mCACR;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,MAAM,CAAC,YAAY;EACrB;EACA,QAAQ,EACN,MAAM,uCACR;EACA,WAAW,EACT,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,OAAO;GACL,MAAM,CAAC,UAAU,MAAM;GACvB,SAAS;EACX;EACA,OAAO;GACL,MAAM,CAAC,UAAU,MAAM;GACvB,QAAQ;EACV;EACA,SAAS,EACP,MAAM,wCACR;EACA,OAAO,EACL,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,KAAK,EACH,MAAM,SACR;EACA,QAAQ;GACN,MAAM,CAAC,UAAU,MAAM;GACvB,MAAM;IAAC;IAAQ;IAAU;GAAI;EAC/B;EACA,OAAO;GACL,MAAM;GACN,OAAO;IACL,MAAM;IACN,MAAM;KACJ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF;GACF;EACF;EACA,aAAa;GACX,MAAM;GACN,WAAW;GACX,WAAW;EACb;EACA,OAAO;GACL,MAAM;GACN,OAAO,EACL,MAAM,SACR;EACF;EACA,OAAO;GACL,MAAM;GACN,OAAO,EACL,MAAM,kBACR;EACF;EACA,iBAAiB;GACf,MAAM;GACN,OAAO,EACL,MAAM,uBACR;EACF;EACA,UAAU;GACR,MAAM;GACN,OAAO,EACL,MAAM,gBACR;EACF;EACA,SAAS,EACP,MAAM,wCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,yCACR;EACA,YAAY;GACV,MAAM;GACN,aACE;EACJ;EACA,SAAS,EACP,MAAM,wCACR;CACF;AACF"}
@@ -630,7 +630,7 @@ export declare const ticketSchema: {
630
630
  readonly items: {
631
631
  readonly type: "object";
632
632
  readonly additionalProperties: false;
633
- readonly required: readonly ["id", "performer", "date"];
633
+ readonly required: readonly ["id", "performer"];
634
634
  readonly properties: {
635
635
  readonly id: {
636
636
  readonly type: "string";
@@ -658,9 +658,16 @@ export declare const ticketSchema: {
658
658
  };
659
659
  };
660
660
  readonly date: {
661
- readonly type: "string";
661
+ readonly type: readonly ["string", "null"];
662
662
  readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
663
- readonly description: "The calendar date of the visit as YYYY-MM-DD, read in the property's timezone.";
663
+ readonly default: null;
664
+ readonly description: string;
665
+ };
666
+ readonly blockedUntil: {
667
+ readonly type: readonly ["string", "null"];
668
+ readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
669
+ readonly default: null;
670
+ readonly description: string;
664
671
  };
665
672
  readonly time: {
666
673
  readonly type: readonly ["string", "null"];
@@ -888,6 +895,12 @@ export declare const ticketSchema: {
888
895
  readonly default: null;
889
896
  readonly description: string;
890
897
  };
898
+ readonly expectedOn: {
899
+ readonly type: readonly ["string", "null"];
900
+ readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
901
+ readonly default: null;
902
+ readonly description: string;
903
+ };
891
904
  readonly billingReview: {
892
905
  readonly type: "array";
893
906
  readonly default: readonly [];
@@ -962,10 +975,25 @@ export declare const ticketSchema: {
962
975
  readonly description: "ISO 4217 currency code of the entry's amounts.";
963
976
  };
964
977
  readonly price: {
965
- readonly type: "integer";
978
+ readonly type: readonly ["integer", "null"];
966
979
  readonly minimum: 0;
967
980
  readonly description: string;
968
981
  };
982
+ readonly createdAt: {
983
+ readonly $ref: "definitions.json#/definitions/date";
984
+ readonly description: string;
985
+ };
986
+ readonly createdBy: {
987
+ readonly type: readonly ["string", "null"];
988
+ readonly default: null;
989
+ readonly description: string;
990
+ };
991
+ readonly expectedOn: {
992
+ readonly type: readonly ["string", "null"];
993
+ readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
994
+ readonly default: null;
995
+ readonly description: string;
996
+ };
969
997
  readonly voided: {
970
998
  readonly type: "boolean";
971
999
  readonly default: false;
@@ -1052,7 +1080,7 @@ export declare const ticketSchema: {
1052
1080
  readonly description: "The Stages the ticket carries, in the fixed chip order. Derived at read time from the ticket's own facts, never stored and never set by clients, and absent for every viewer outside Kohost's facilities staff. A ticket may carry several at once; `closed` and `pending` tickets carry none.";
1053
1081
  readonly items: {
1054
1082
  readonly type: "string";
1055
- readonly enum: readonly ["awaitingClientApproval", "awaitingClientResponse", "awaitingVendorQuote", "vendorScheduled", "confirmCosts", "resolveReady"];
1083
+ readonly enum: readonly ["awaitingClientApproval", "awaitingClientResponse", "awaitingVendorQuote", "awaitingScheduling", "vendorScheduled", "confirmCosts", "resolveReady"];
1056
1084
  };
1057
1085
  };
1058
1086
  readonly approvalState: {