@kohost/api-client 4.15.4 → 4.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 (39) hide show
  1. package/dist/cjs/models/issue.cjs +0 -1
  2. package/dist/cjs/models/issue.cjs.map +1 -1
  3. package/dist/cjs/models/property.cjs +0 -1
  4. package/dist/cjs/models/property.cjs.map +1 -1
  5. package/dist/cjs/models/ticket.cjs +3 -5
  6. package/dist/cjs/models/ticket.cjs.map +1 -1
  7. package/dist/cjs/schemas/issue.cjs +0 -3
  8. package/dist/cjs/schemas/issue.cjs.map +1 -1
  9. package/dist/cjs/schemas/issue.d.cts +0 -3
  10. package/dist/cjs/schemas/property.cjs +0 -6
  11. package/dist/cjs/schemas/property.cjs.map +1 -1
  12. package/dist/cjs/schemas/property.d.cts +0 -6
  13. package/dist/cjs/schemas/ticket.cjs +33 -229
  14. package/dist/cjs/schemas/ticket.cjs.map +1 -1
  15. package/dist/cjs/schemas/ticket.d.cts +31 -238
  16. package/dist/cjs/schemas/user.cjs +0 -4
  17. package/dist/cjs/schemas/user.cjs.map +1 -1
  18. package/dist/cjs/schemas/user.d.cts +0 -4
  19. package/dist/cjs/validate.d.cts +9 -0
  20. package/dist/esm/models/issue.js +0 -1
  21. package/dist/esm/models/issue.js.map +1 -1
  22. package/dist/esm/models/property.js +0 -1
  23. package/dist/esm/models/property.js.map +1 -1
  24. package/dist/esm/models/ticket.js +3 -5
  25. package/dist/esm/models/ticket.js.map +1 -1
  26. package/dist/esm/schemas/issue.d.ts +0 -3
  27. package/dist/esm/schemas/issue.js +0 -3
  28. package/dist/esm/schemas/issue.js.map +1 -1
  29. package/dist/esm/schemas/property.d.ts +0 -6
  30. package/dist/esm/schemas/property.js +0 -6
  31. package/dist/esm/schemas/property.js.map +1 -1
  32. package/dist/esm/schemas/ticket.d.ts +31 -238
  33. package/dist/esm/schemas/ticket.js +33 -229
  34. package/dist/esm/schemas/ticket.js.map +1 -1
  35. package/dist/esm/schemas/user.d.ts +0 -4
  36. package/dist/esm/schemas/user.js +0 -4
  37. package/dist/esm/schemas/user.js.map +1 -1
  38. package/dist/esm/validate.d.ts +9 -0
  39. package/package.json +1 -1
@@ -8,7 +8,10 @@ const ticketSchema = {
8
8
  "id",
9
9
  "conversation",
10
10
  "requester",
11
+ "openedBy",
12
+ "assignedTo",
11
13
  "status",
14
+ "priority",
12
15
  "tags",
13
16
  "createdAt",
14
17
  "updatedAt"
@@ -38,7 +41,7 @@ const ticketSchema = {
38
41
  items: {
39
42
  type: "object",
40
43
  additionalProperties: false,
41
- required: ["id", "discriminator", "timestamp", "body"],
44
+ required: ["id", "discriminator", "timestamp", "body", "author"],
42
45
  properties: {
43
46
  id: {
44
47
  type: "string",
@@ -63,60 +66,25 @@ const ticketSchema = {
63
66
  default: "message",
64
67
  description: "The discriminator of the message."
65
68
  },
66
- authorId: {
67
- type: "string",
68
- description: "The ID of the author of the message."
69
- },
70
- authorName: {
71
- type: "string",
72
- description: "The name of the author of the message."
73
- },
74
- authorDiscriminator: {
75
- type: "string",
76
- enum: ["user", "vendor", "system"],
77
- description: "The discriminator of the author of the message."
78
- },
79
- /**
80
- * @deprecated - use authorId instead.
81
- */
82
- userId: {
83
- type: "string",
84
- description: "@deprecated - use authorId instead. The ID of the user who sent the message."
85
- },
86
- /**
87
- * @deprecated - use authorName instead.
88
- */
89
- userName: {
90
- type: "string",
91
- description: "@deprecated - use authorName instead. The name of the user who sent the message."
92
- },
93
- /**
94
- * @deprecated - use authorId instead.
95
- */
96
- vendorId: {
97
- type: "string",
98
- description: "@deprecated - use authorId instead. The ID of the vendor who sent the message."
99
- },
100
- /**
101
- * @deprecated - use authorName instead.
102
- */
103
- vendorName: {
104
- type: "string",
105
- description: "@deprecated - use authorName instead. The name of the vendor who sent the message."
106
- },
107
- /**
108
- * @deprecated - use authorId instead.
109
- */
110
- systemId: {
111
- type: "string",
112
- description: "@deprecated - use authorId instead. The ID of the system who sent the message."
113
- },
114
- /**
115
- * @deprecated - use authorName instead.
116
- */
117
- systemName: {
118
- type: "string",
119
- description: "@deprecated - use authorName instead. The name of the system who sent the message."
69
+ author: {
70
+ type: "object",
71
+ additionalProperties: false,
72
+ required: ["id", "discriminator", "name"],
73
+ properties: {
74
+ id: {
75
+ type: "string",
76
+ description: "The ID of the author of the message."
77
+ },
78
+ discriminator: {
79
+ type: "string",
80
+ enum: ["user", "vendor", "system"],
81
+ description: "The discriminator of the author of the message."
82
+ },
83
+ name: {
84
+ type: "string",
85
+ description: "The name of the author of the message."
86
+ }
87
+ }
120
88
  },
121
89
  timestamp: {
122
90
  $ref: "definitions.json#/definitions/date",
@@ -196,6 +164,8 @@ const ticketSchema = {
196
164
  },
197
165
  openedBy: {
198
166
  type: "object",
167
+ additionalProperties: false,
168
+ required: ["id", "discriminator", "name"],
199
169
  properties: {
200
170
  id: {
201
171
  type: "string"
@@ -206,39 +176,13 @@ const ticketSchema = {
206
176
  },
207
177
  name: {
208
178
  type: "string"
209
- },
210
- /**
211
- * @deprecated - use id instead.
212
- */
213
- userId: {
214
- type: "string",
215
- description: "@deprecated - use id instead. The ID of the user who opened the ticket."
216
- },
217
- /**
218
- * @deprecated - use name instead.
219
- */
220
- userName: {
221
- type: "string",
222
- description: "@deprecated - use name instead. The name of the user who opened the ticket."
223
- },
224
- /**
225
- * @deprecated - use id instead.
226
- */
227
- systemId: {
228
- type: "string",
229
- description: "@deprecated - use id instead. The ID of the system who opened the ticket."
230
- },
231
- /**
232
- * @deprecated - use name instead.
233
- */
234
- systemName: {
235
- type: "string",
236
- description: "@deprecated - use name instead. The name of the system who opened the ticket."
237
179
  }
238
180
  }
239
181
  },
240
182
  requester: {
241
183
  type: "object",
184
+ additionalProperties: false,
185
+ required: ["id", "discriminator", "name"],
242
186
  properties: {
243
187
  id: {
244
188
  type: "string",
@@ -260,95 +204,14 @@ const ticketSchema = {
260
204
  { type: "string" }
261
205
  ],
262
206
  description: "The photo of the requester."
263
- },
264
- /**
265
- * @deprecated - use id instead.
266
- */
267
- systemId: {
268
- type: "string",
269
- description: "@deprecated - use id instead. The ID of the system who requested the ticket."
270
- },
271
- /**
272
- * @deprecated - use name instead.
273
- */
274
- systemName: {
275
- type: "string",
276
- description: "@deprecated - use name instead. The name of the system who requested the ticket."
277
- },
278
- /**
279
- * @deprecated - use photo instead.
280
- */
281
- systemPhoto: {
282
- anyOf: [
283
- { $ref: "mediaFile.json" },
284
- { type: "null" },
285
- { type: "string" }
286
- ],
287
- description: "@deprecated - use photo instead. The photo of the system who requested the ticket."
288
- },
289
- /**
290
- * @deprecated - use id instead.
291
- */
292
- userId: {
293
- type: "string",
294
- description: "@deprecated - use id instead. The ID of the user who requested the ticket."
295
- },
296
- /**
297
- * @deprecated - use name instead.
298
- */
299
- userName: {
300
- type: "string",
301
- description: "@deprecated - use name instead. The name of the user who requested the ticket."
302
- },
303
- /**
304
- * @deprecated - use photo instead.
305
- */
306
- userPhoto: {
307
- anyOf: [
308
- { $ref: "mediaFile.json" },
309
- { type: "null" },
310
- { type: "string" }
311
- ],
312
- description: "@deprecated - use photo instead. The photo of the user who requested the ticket."
313
- },
314
- /**
315
- * @deprecated - use id instead.
316
- */
317
- deviceId: {
318
- type: "string"
319
- },
320
- /**
321
- * @deprecated - This will be removed in a future version.
322
- */
323
- roomId: {
324
- type: "string",
325
- description: "@deprecated - This will be removed in a future version. The ID of the room who requested the ticket."
326
- },
327
- /**
328
- * @deprecated - This will be removed in a future version.
329
- */
330
- reservationId: {
331
- type: "string",
332
- description: "@deprecated - This will be removed in a future version. The ID of the reservation who requested the ticket."
333
- },
334
- /**
335
- * @deprecated - This will be removed in a future version.
336
- */
337
- spaceId: {
338
- type: "string",
339
- description: "@deprecated - This will be removed in a future version. The ID of the space who requested the ticket."
340
- },
341
- /**
342
- * @deprecated - This will be removed in a future version.
343
- */
344
- spaceName: {
345
- type: "string",
346
- description: "@deprecated - This will be removed in a future version. The name of the space who requested the ticket."
347
207
  }
348
208
  }
349
209
  },
350
210
  assignedTo: {
351
- type: "object",
211
+ type: ["object", "null"],
212
+ default: null,
213
+ additionalProperties: false,
214
+ required: ["id", "discriminator", "name"],
352
215
  properties: {
353
216
  id: {
354
217
  type: "string",
@@ -370,55 +233,6 @@ const ticketSchema = {
370
233
  { type: "string" }
371
234
  ],
372
235
  description: "The photo of the assigned to."
373
- },
374
- /**
375
- * @deprecated - use id instead.
376
- */
377
- userId: {
378
- type: "string",
379
- description: "@deprecated - use id instead. The ID of the user who assigned the ticket."
380
- },
381
- /**
382
- * @deprecated - use name instead.
383
- */
384
- userName: {
385
- type: "string",
386
- description: "@deprecated - use name instead. The name of the user who assigned the ticket."
387
- },
388
- /**
389
- * @deprecated - use photo instead.
390
- */
391
- userPhoto: {
392
- anyOf: [
393
- { $ref: "mediaFile.json" },
394
- { type: "null" },
395
- { type: "string" }
396
- ]
397
- },
398
- /**
399
- * @deprecated - use id instead.
400
- */
401
- vendorId: {
402
- type: "string",
403
- description: "@deprecated - use id instead. The ID of the vendor who assigned the ticket."
404
- },
405
- /**
406
- * @deprecated - use name instead.
407
- */
408
- vendorName: {
409
- type: "string",
410
- description: "@deprecated - use name instead. The name of the vendor who assigned the ticket."
411
- },
412
- /**
413
- * @deprecated - use photo instead.
414
- */
415
- vendorPhoto: {
416
- anyOf: [
417
- { $ref: "mediaFile.json" },
418
- { type: "null" },
419
- { type: "string" }
420
- ],
421
- description: "@deprecated - use photo instead. The photo of the vendor who assigned the ticket."
422
236
  }
423
237
  }
424
238
  },
@@ -474,7 +288,7 @@ const ticketSchema = {
474
288
  },
475
289
  discriminator: {
476
290
  type: "string",
477
- enum: ["space", "room", "property", "customText"]
291
+ enum: ["space", "property", "customText"]
478
292
  },
479
293
  name: {
480
294
  type: "string"
@@ -488,7 +302,7 @@ const ticketSchema = {
488
302
  },
489
303
  priority: {
490
304
  type: "string",
491
- enum: ["low", "normal", "high"],
305
+ enum: ["low", "normal", "high", "critical"],
492
306
  default: "normal"
493
307
  },
494
308
  tags: {
@@ -498,9 +312,6 @@ const ticketSchema = {
498
312
  type: "string"
499
313
  }
500
314
  },
501
- department: {
502
- type: "string"
503
- },
504
315
  rating: {
505
316
  type: "number",
506
317
  minimum: 0,
@@ -509,13 +320,6 @@ const ticketSchema = {
509
320
  ratingComment: {
510
321
  type: "string"
511
322
  },
512
- /**
513
- * @deprecated - This will be removed in a future version.
514
- */
515
- tipAmount: {
516
- type: "string",
517
- description: "@deprecated - This will be removed in a future version. The amount of the tip."
518
- },
519
323
  autoCloseAt: {
520
324
  $ref: "definitions.json#/definitions/date"
521
325
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"status\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"tipped\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n authorId: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n authorName: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n authorDiscriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n /**\n * @deprecated - use authorId instead.\n */\n userId: {\n type: \"string\",\n description:\n \"@deprecated - use authorId instead. The ID of the user who sent the message.\",\n },\n /**\n * @deprecated - use authorName instead.\n */\n userName: {\n type: \"string\",\n description:\n \"@deprecated - use authorName instead. The name of the user who sent the message.\",\n },\n /**\n * @deprecated - use authorId instead.\n */\n vendorId: {\n type: \"string\",\n description:\n \"@deprecated - use authorId instead. The ID of the vendor who sent the message.\",\n },\n /**\n * @deprecated - use authorName instead.\n */\n vendorName: {\n type: \"string\",\n description:\n \"@deprecated - use authorName instead. The name of the vendor who sent the message.\",\n },\n /**\n * @deprecated - use authorId instead.\n */\n systemId: {\n type: \"string\",\n description:\n \"@deprecated - use authorId instead. The ID of the system who sent the message.\",\n },\n /**\n * @deprecated - use authorName instead.\n */\n systemName: {\n type: \"string\",\n description:\n \"@deprecated - use authorName instead. The name of the system who sent the message.\",\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n text: {\n type: \"string\",\n description: \"The mention text.\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n /**\n * @deprecated - use id instead.\n */\n userId: {\n type: \"string\",\n description:\n \"@deprecated - use id instead. The ID of the user who opened the ticket.\",\n },\n /**\n * @deprecated - use name instead.\n */\n userName: {\n type: \"string\",\n description:\n \"@deprecated - use name instead. The name of the user who opened the ticket.\",\n },\n\n /**\n * @deprecated - use id instead.\n */\n systemId: {\n type: \"string\",\n description:\n \"@deprecated - use id instead. The ID of the system who opened the ticket.\",\n },\n /**\n * @deprecated - use name instead.\n */\n systemName: {\n type: \"string\",\n description:\n \"@deprecated - use name instead. The name of the system who opened the ticket.\",\n },\n },\n },\n requester: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n /**\n * @deprecated - use id instead.\n */\n systemId: {\n type: \"string\",\n description:\n \"@deprecated - use id instead. The ID of the system who requested the ticket.\",\n },\n /**\n * @deprecated - use name instead.\n */\n systemName: {\n type: \"string\",\n description:\n \"@deprecated - use name instead. The name of the system who requested the ticket.\",\n },\n /**\n * @deprecated - use photo instead.\n */\n systemPhoto: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description:\n \"@deprecated - use photo instead. The photo of the system who requested the ticket.\",\n },\n /**\n * @deprecated - use id instead.\n */\n userId: {\n type: \"string\",\n description:\n \"@deprecated - use id instead. The ID of the user who requested the ticket.\",\n },\n /**\n * @deprecated - use name instead.\n */\n userName: {\n type: \"string\",\n description:\n \"@deprecated - use name instead. The name of the user who requested the ticket.\",\n },\n /**\n * @deprecated - use photo instead.\n */\n userPhoto: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description:\n \"@deprecated - use photo instead. The photo of the user who requested the ticket.\",\n },\n /**\n * @deprecated - use id instead.\n */\n deviceId: {\n type: \"string\",\n },\n /**\n * @deprecated - This will be removed in a future version.\n */\n roomId: {\n type: \"string\",\n description:\n \"@deprecated - This will be removed in a future version. The ID of the room who requested the ticket.\",\n },\n /**\n * @deprecated - This will be removed in a future version.\n */\n reservationId: {\n type: \"string\",\n description:\n \"@deprecated - This will be removed in a future version. The ID of the reservation who requested the ticket.\",\n },\n /**\n * @deprecated - This will be removed in a future version.\n */\n spaceId: {\n type: \"string\",\n description:\n \"@deprecated - This will be removed in a future version. The ID of the space who requested the ticket.\",\n },\n /**\n * @deprecated - This will be removed in a future version.\n */\n spaceName: {\n type: \"string\",\n description:\n \"@deprecated - This will be removed in a future version. The name of the space who requested the ticket.\",\n },\n },\n },\n assignedTo: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n /**\n * @deprecated - use id instead.\n */\n userId: {\n type: \"string\",\n description:\n \"@deprecated - use id instead. The ID of the user who assigned the ticket.\",\n },\n /**\n * @deprecated - use name instead.\n */\n userName: {\n type: \"string\",\n description:\n \"@deprecated - use name instead. The name of the user who assigned the ticket.\",\n },\n /**\n * @deprecated - use photo instead.\n */\n userPhoto: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n },\n /**\n * @deprecated - use id instead.\n */\n vendorId: {\n type: \"string\",\n description:\n \"@deprecated - use id instead. The ID of the vendor who assigned the ticket.\",\n },\n /**\n * @deprecated - use name instead.\n */\n vendorName: {\n type: \"string\",\n description:\n \"@deprecated - use name instead. The name of the vendor who assigned the ticket.\",\n },\n /**\n * @deprecated - use photo instead.\n */\n vendorPhoto: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description:\n \"@deprecated - use photo instead. The photo of the vendor who assigned the ticket.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"room\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\"],\n default: \"normal\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n department: {\n type: \"string\",\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n /**\n * @deprecated - This will be removed in a future version.\n */\n tipAmount: {\n type: \"string\",\n description:\n \"@deprecated - This will be removed in a future version. The amount of the tip.\",\n },\n autoCloseAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\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":"AAIO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,QAAQ;A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S;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA;AAAA;AAAA;AAAA,IAIA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"tipped\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n text: {\n type: \"string\",\n description: \"The mention text.\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n autoCloseAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\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":"AAIO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,M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,QAAQ;AAAA,MAC5C,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,MAAM,CAAC,OAAO,UAAU,QAAQ,UAAU;AAAA,MAC1C,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,OAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
@@ -92,10 +92,6 @@ declare const userSchema: {
92
92
  readonly type: "boolean";
93
93
  readonly description: "Whether time tracking is enabled for this role.";
94
94
  };
95
- readonly department: {
96
- readonly type: "string";
97
- readonly description: "The department the user belongs to.";
98
- };
99
95
  readonly departmentIds: {
100
96
  readonly type: "array";
101
97
  readonly items: {
@@ -95,10 +95,6 @@ const userSchema = {
95
95
  type: "boolean",
96
96
  description: "Whether time tracking is enabled for this role."
97
97
  },
98
- department: {
99
- type: "string",
100
- description: "The department the user belongs to."
101
- },
102
98
  departmentIds: {
103
99
  type: "array",
104
100
  items: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../.generated/schemas/user.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport { mediaFileSchema } from \"./mediaFile\";\nimport { policySchema } from \"./policy\";\n\nexport const userSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"user.json\",\n title: \"User\",\n type: \"object\",\n required: [\"id\", \"firstName\", \"lastName\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"user\",\n },\n firstName: {\n type: \"string\",\n },\n lastName: {\n type: \"string\",\n },\n phone: {\n type: \"string\",\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n phoneVerified: {\n type: \"boolean\",\n },\n email: {\n type: \"string\",\n format: \"email\",\n },\n emailVerified: {\n type: \"boolean\",\n },\n whatsapp: {\n type: \"string\",\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n whatsappVerified: {\n type: \"boolean\",\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n secretKey: {\n type: \"string\",\n },\n photo: {\n $ref: \"mediaFile.json#\",\n },\n jobTitle: {\n type: \"string\",\n },\n dob: {\n type: \"string\",\n },\n gender: {\n type: \"string\",\n enum: [\"male\", \"female\"],\n },\n nationality: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n permissions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n required: [\"organizationId\", \"propertyId\", \"role\"],\n properties: {\n organizationId: {\n type: \"string\",\n description:\n \"The ID of the organization the permission is applies to.\",\n },\n propertyId: {\n type: \"string\",\n description: \"The ID of the property the permission is applies to.\",\n },\n role: {\n type: \"string\",\n enum: [\n \"Guest\",\n \"User\",\n \"Agent\",\n \"Manager\",\n \"Maintenance\",\n \"Administrator\",\n \"SuperAdmin\",\n ],\n },\n timeTrackingEnabled: {\n type: \"boolean\",\n description: \"Whether time tracking is enabled for this role.\",\n },\n department: {\n type: \"string\",\n description: \"The department the user belongs to.\",\n },\n departmentIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description: \"The ID of the department the user belongs to.\",\n },\n policyIds: {\n type: \"array\",\n items: {\n type: \"string\",\n description: \"ID of a policy that is applied to this role.\",\n },\n },\n policies: {\n type: \"array\",\n items: {\n description:\n \"A policy object populated from the policyIds array.\",\n $ref: \"policy.json\",\n },\n },\n },\n additionalProperties: false,\n },\n },\n preferences: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"organizationId\", \"propertyId\"],\n properties: {\n organizationId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n notifications: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"discriminator\", \"enabled\"],\n properties: {\n discriminator: {\n type: \"string\",\n enum: [\"observerTicketCreated\", \"observerTicketResolved\"],\n },\n enabled: {\n type: \"boolean\",\n },\n },\n },\n },\n },\n },\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 location: {\n type: \"object\",\n required: [\"accuracy\", \"latitude\", \"longitude\", \"timestamp\"],\n additionalProperties: false,\n properties: {\n accuracy: {\n type: [\"number\", \"null\"],\n },\n latitude: {\n type: [\"number\", \"null\"],\n },\n longitude: {\n type: [\"number\", \"null\"],\n },\n timestamp: {\n type: [\"number\", \"null\"],\n },\n },\n },\n\n spaceName: {\n type: \"string\",\n },\n\n systems: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n properties: {\n systemId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n },\n required: [\"systemId\", \"propertyId\", \"driver\"],\n additionalProperties: false,\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 UserSchema = FromSchema<\n typeof userSchema,\n {\n references: [typeof defs, typeof mediaFileSchema, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\nexport const getters = {\n fullName() {\n return `${this.firstName} ${this.lastName}`;\n },\n roles() {\n const roles = new Set();\n if (this.permissions) {\n for (const permission of this.permissions) {\n roles.add(permission.role);\n }\n }\n return Array.from(roles);\n },\n isSuperAdmin() {\n return this.roles.includes(\"SuperAdmin\");\n },\n isAdmin() {\n return this.roles.includes(\"Admin\") || this.roles.includes(\"Administrator\");\n },\n isManager() {\n return this.roles.includes(\"Manager\");\n },\n isUser() {\n return this.roles.includes(\"User\");\n },\n};\n"],"mappings":"AAKO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,aAAa,UAAU;AAAA,EACxC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACV;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAA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;AAAA,UACA,YAAY;AAAA,YACV,MAAM;AAAA,UACR;AAAA,UACA,QAAQ;AAAA,YACN,MAAM;AAAA,UACR;AAAA,QACF;AAAA,QACA,UAAU,CAAC,YAAY,cAAc,QAAQ;AAAA,QAC7C,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAiBO,MAAM,UAAU;AAAA,EACrB,WAAW;AACT,WAAO,GAAG,KAAK,SAAS,IAAI,KAAK,QAAQ;AAAA,EAC3C;AAAA,EACA,QAAQ;AACN,UAAM,QAAQ,oBAAI,IAAI;AACtB,QAAI,KAAK,aAAa;AACpB,iBAAW,cAAc,KAAK,aAAa;AACzC,cAAM,IAAI,WAAW,IAAI;AAAA,MAC3B;AAAA,IACF;AACA,WAAO,MAAM,KAAK,KAAK;AAAA,EACzB;AAAA,EACA,eAAe;AACb,WAAO,KAAK,MAAM,SAAS,YAAY;AAAA,EACzC;AAAA,EACA,UAAU;AACR,WAAO,KAAK,MAAM,SAAS,OAAO,KAAK,KAAK,MAAM,SAAS,eAAe;AAAA,EAC5E;AAAA,EACA,YAAY;AACV,WAAO,KAAK,MAAM,SAAS,SAAS;AAAA,EACtC;AAAA,EACA,SAAS;AACP,WAAO,KAAK,MAAM,SAAS,MAAM;AAAA,EACnC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../.generated/schemas/user.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport { mediaFileSchema } from \"./mediaFile\";\nimport { policySchema } from \"./policy\";\n\nexport const userSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"user.json\",\n title: \"User\",\n type: \"object\",\n required: [\"id\", \"firstName\", \"lastName\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"user\",\n },\n firstName: {\n type: \"string\",\n },\n lastName: {\n type: \"string\",\n },\n phone: {\n type: \"string\",\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n phoneVerified: {\n type: \"boolean\",\n },\n email: {\n type: \"string\",\n format: \"email\",\n },\n emailVerified: {\n type: \"boolean\",\n },\n whatsapp: {\n type: \"string\",\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n whatsappVerified: {\n type: \"boolean\",\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n secretKey: {\n type: \"string\",\n },\n photo: {\n $ref: \"mediaFile.json#\",\n },\n jobTitle: {\n type: \"string\",\n },\n dob: {\n type: \"string\",\n },\n gender: {\n type: \"string\",\n enum: [\"male\", \"female\"],\n },\n nationality: {\n type: \"string\",\n minLength: 2,\n maxLength: 2,\n },\n permissions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n required: [\"organizationId\", \"propertyId\", \"role\"],\n properties: {\n organizationId: {\n type: \"string\",\n description:\n \"The ID of the organization the permission is applies to.\",\n },\n propertyId: {\n type: \"string\",\n description: \"The ID of the property the permission is applies to.\",\n },\n role: {\n type: \"string\",\n enum: [\n \"Guest\",\n \"User\",\n \"Agent\",\n \"Manager\",\n \"Maintenance\",\n \"Administrator\",\n \"SuperAdmin\",\n ],\n },\n timeTrackingEnabled: {\n type: \"boolean\",\n description: \"Whether time tracking is enabled for this role.\",\n },\n departmentIds: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n description: \"The ID of the department the user belongs to.\",\n },\n policyIds: {\n type: \"array\",\n items: {\n type: \"string\",\n description: \"ID of a policy that is applied to this role.\",\n },\n },\n policies: {\n type: \"array\",\n items: {\n description:\n \"A policy object populated from the policyIds array.\",\n $ref: \"policy.json\",\n },\n },\n },\n additionalProperties: false,\n },\n },\n preferences: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"organizationId\", \"propertyId\"],\n properties: {\n organizationId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n notifications: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"discriminator\", \"enabled\"],\n properties: {\n discriminator: {\n type: \"string\",\n enum: [\"observerTicketCreated\", \"observerTicketResolved\"],\n },\n enabled: {\n type: \"boolean\",\n },\n },\n },\n },\n },\n },\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 location: {\n type: \"object\",\n required: [\"accuracy\", \"latitude\", \"longitude\", \"timestamp\"],\n additionalProperties: false,\n properties: {\n accuracy: {\n type: [\"number\", \"null\"],\n },\n latitude: {\n type: [\"number\", \"null\"],\n },\n longitude: {\n type: [\"number\", \"null\"],\n },\n timestamp: {\n type: [\"number\", \"null\"],\n },\n },\n },\n\n spaceName: {\n type: \"string\",\n },\n\n systems: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n properties: {\n systemId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n },\n required: [\"systemId\", \"propertyId\", \"driver\"],\n additionalProperties: false,\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 UserSchema = FromSchema<\n typeof userSchema,\n {\n references: [typeof defs, typeof mediaFileSchema, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\nexport const getters = {\n fullName() {\n return `${this.firstName} ${this.lastName}`;\n },\n roles() {\n const roles = new Set();\n if (this.permissions) {\n for (const permission of this.permissions) {\n roles.add(permission.role);\n }\n }\n return Array.from(roles);\n },\n isSuperAdmin() {\n return this.roles.includes(\"SuperAdmin\");\n },\n isAdmin() {\n return this.roles.includes(\"Admin\") || this.roles.includes(\"Administrator\");\n },\n isManager() {\n return this.roles.includes(\"Manager\");\n },\n isUser() {\n return this.roles.includes(\"User\");\n },\n};\n"],"mappings":"AAKO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,aAAa,UAAU;AAAA,EACxC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACV;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM,CAAC,QAAQ,QAAQ;AAAA,IACzB;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,aAAa;AAAA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AA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAiBO,MAAM,UAAU;AAAA,EACrB,WAAW;AACT,WAAO,GAAG,KAAK,SAAS,IAAI,KAAK,QAAQ;AAAA,EAC3C;AAAA,EACA,QAAQ;AACN,UAAM,QAAQ,oBAAI,IAAI;AACtB,QAAI,KAAK,aAAa;AACpB,iBAAW,cAAc,KAAK,aAAa;AACzC,cAAM,IAAI,WAAW,IAAI;AAAA,MAC3B;AAAA,IACF;AACA,WAAO,MAAM,KAAK,KAAK;AAAA,EACzB;AAAA,EACA,eAAe;AACb,WAAO,KAAK,MAAM,SAAS,YAAY;AAAA,EACzC;AAAA,EACA,UAAU;AACR,WAAO,KAAK,MAAM,SAAS,OAAO,KAAK,KAAK,MAAM,SAAS,eAAe;AAAA,EAC5E;AAAA,EACA,YAAY;AACV,WAAO,KAAK,MAAM,SAAS,SAAS;AAAA,EACtC;AAAA,EACA,SAAS;AACP,WAAO,KAAK,MAAM,SAAS,MAAM;AAAA,EACnC;AACF;","names":[]}
@@ -635,6 +635,9 @@ declare const validateTicket: ajv.ValidateFunction<{
635
635
  status: any;
636
636
  conversation: any;
637
637
  requester: any;
638
+ openedBy: any;
639
+ assignedTo: any;
640
+ priority: any;
638
641
  } & {
639
642
  id: any;
640
643
  } & {
@@ -649,6 +652,12 @@ declare const validateTicket: ajv.ValidateFunction<{
649
652
  conversation: any;
650
653
  } & {
651
654
  requester: any;
655
+ } & {
656
+ openedBy: any;
657
+ } & {
658
+ assignedTo: any;
659
+ } & {
660
+ priority: any;
652
661
  }>;
653
662
  declare const validateTimeSheet: ajv.ValidateFunction<{
654
663
  id: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kohost/api-client",
3
- "version": "4.15.4",
3
+ "version": "4.17.0",
4
4
  "description": "API client, models, schemas, commands, and events for Kohost applications",
5
5
  "author": "Ian Rogers",
6
6
  "readme": "README.md",