@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.
- package/dist/cjs/models/issue.cjs +0 -1
- package/dist/cjs/models/issue.cjs.map +1 -1
- package/dist/cjs/models/property.cjs +0 -1
- package/dist/cjs/models/property.cjs.map +1 -1
- package/dist/cjs/models/ticket.cjs +3 -5
- package/dist/cjs/models/ticket.cjs.map +1 -1
- package/dist/cjs/schemas/issue.cjs +0 -3
- package/dist/cjs/schemas/issue.cjs.map +1 -1
- package/dist/cjs/schemas/issue.d.cts +0 -3
- package/dist/cjs/schemas/property.cjs +0 -6
- package/dist/cjs/schemas/property.cjs.map +1 -1
- package/dist/cjs/schemas/property.d.cts +0 -6
- package/dist/cjs/schemas/ticket.cjs +33 -229
- package/dist/cjs/schemas/ticket.cjs.map +1 -1
- package/dist/cjs/schemas/ticket.d.cts +31 -238
- package/dist/cjs/schemas/user.cjs +0 -4
- package/dist/cjs/schemas/user.cjs.map +1 -1
- package/dist/cjs/schemas/user.d.cts +0 -4
- package/dist/cjs/validate.d.cts +9 -0
- package/dist/esm/models/issue.js +0 -1
- package/dist/esm/models/issue.js.map +1 -1
- package/dist/esm/models/property.js +0 -1
- package/dist/esm/models/property.js.map +1 -1
- package/dist/esm/models/ticket.js +3 -5
- package/dist/esm/models/ticket.js.map +1 -1
- package/dist/esm/schemas/issue.d.ts +0 -3
- package/dist/esm/schemas/issue.js +0 -3
- package/dist/esm/schemas/issue.js.map +1 -1
- package/dist/esm/schemas/property.d.ts +0 -6
- package/dist/esm/schemas/property.js +0 -6
- package/dist/esm/schemas/property.js.map +1 -1
- package/dist/esm/schemas/ticket.d.ts +31 -238
- package/dist/esm/schemas/ticket.js +33 -229
- package/dist/esm/schemas/ticket.js.map +1 -1
- package/dist/esm/schemas/user.d.ts +0 -4
- package/dist/esm/schemas/user.js +0 -4
- package/dist/esm/schemas/user.js.map +1 -1
- package/dist/esm/validate.d.ts +9 -0
- package/package.json +1 -1
|
@@ -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":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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;AAAA,MACf,SAAS;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,aAAa;AAAA,MACb,OAAO;AAAA,QACL,MAAM;A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M;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":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,QAAQ;AAAA,MACf,SAAS;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,MAAM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AAC;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":[]}
|
|
@@ -8,7 +8,7 @@ declare const ticketSchema: {
|
|
|
8
8
|
readonly title: "Ticket";
|
|
9
9
|
readonly description: "A ticket is a request from a user.";
|
|
10
10
|
readonly type: "object";
|
|
11
|
-
readonly required: readonly ["id", "conversation", "requester", "status", "tags", "createdAt", "updatedAt"];
|
|
11
|
+
readonly required: readonly ["id", "conversation", "requester", "openedBy", "assignedTo", "status", "priority", "tags", "createdAt", "updatedAt"];
|
|
12
12
|
readonly additionalProperties: false;
|
|
13
13
|
readonly properties: {
|
|
14
14
|
readonly id: {
|
|
@@ -34,7 +34,7 @@ declare const ticketSchema: {
|
|
|
34
34
|
readonly items: {
|
|
35
35
|
readonly type: "object";
|
|
36
36
|
readonly additionalProperties: false;
|
|
37
|
-
readonly required: readonly ["id", "discriminator", "timestamp", "body"];
|
|
37
|
+
readonly required: readonly ["id", "discriminator", "timestamp", "body", "author"];
|
|
38
38
|
readonly properties: {
|
|
39
39
|
readonly id: {
|
|
40
40
|
readonly type: "string";
|
|
@@ -46,60 +46,25 @@ declare const ticketSchema: {
|
|
|
46
46
|
readonly default: "message";
|
|
47
47
|
readonly description: "The discriminator of the message.";
|
|
48
48
|
};
|
|
49
|
-
readonly
|
|
50
|
-
readonly type: "
|
|
51
|
-
readonly
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated - use authorName instead.
|
|
71
|
-
*/
|
|
72
|
-
readonly userName: {
|
|
73
|
-
readonly type: "string";
|
|
74
|
-
readonly description: "@deprecated - use authorName instead. The name of the user who sent the message.";
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* @deprecated - use authorId instead.
|
|
78
|
-
*/
|
|
79
|
-
readonly vendorId: {
|
|
80
|
-
readonly type: "string";
|
|
81
|
-
readonly description: "@deprecated - use authorId instead. The ID of the vendor who sent the message.";
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated - use authorName instead.
|
|
85
|
-
*/
|
|
86
|
-
readonly vendorName: {
|
|
87
|
-
readonly type: "string";
|
|
88
|
-
readonly description: "@deprecated - use authorName instead. The name of the vendor who sent the message.";
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* @deprecated - use authorId instead.
|
|
92
|
-
*/
|
|
93
|
-
readonly systemId: {
|
|
94
|
-
readonly type: "string";
|
|
95
|
-
readonly description: "@deprecated - use authorId instead. The ID of the system who sent the message.";
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated - use authorName instead.
|
|
99
|
-
*/
|
|
100
|
-
readonly systemName: {
|
|
101
|
-
readonly type: "string";
|
|
102
|
-
readonly description: "@deprecated - use authorName instead. The name of the system who sent the message.";
|
|
49
|
+
readonly author: {
|
|
50
|
+
readonly type: "object";
|
|
51
|
+
readonly additionalProperties: false;
|
|
52
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly id: {
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
readonly description: "The ID of the author of the message.";
|
|
57
|
+
};
|
|
58
|
+
readonly discriminator: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly enum: readonly ["user", "vendor", "system"];
|
|
61
|
+
readonly description: "The discriminator of the author of the message.";
|
|
62
|
+
};
|
|
63
|
+
readonly name: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
readonly description: "The name of the author of the message.";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
103
68
|
};
|
|
104
69
|
readonly timestamp: {
|
|
105
70
|
readonly $ref: "definitions.json#/definitions/date";
|
|
@@ -177,6 +142,8 @@ declare const ticketSchema: {
|
|
|
177
142
|
};
|
|
178
143
|
readonly openedBy: {
|
|
179
144
|
readonly type: "object";
|
|
145
|
+
readonly additionalProperties: false;
|
|
146
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
180
147
|
readonly properties: {
|
|
181
148
|
readonly id: {
|
|
182
149
|
readonly type: "string";
|
|
@@ -188,38 +155,12 @@ declare const ticketSchema: {
|
|
|
188
155
|
readonly name: {
|
|
189
156
|
readonly type: "string";
|
|
190
157
|
};
|
|
191
|
-
/**
|
|
192
|
-
* @deprecated - use id instead.
|
|
193
|
-
*/
|
|
194
|
-
readonly userId: {
|
|
195
|
-
readonly type: "string";
|
|
196
|
-
readonly description: "@deprecated - use id instead. The ID of the user who opened the ticket.";
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* @deprecated - use name instead.
|
|
200
|
-
*/
|
|
201
|
-
readonly userName: {
|
|
202
|
-
readonly type: "string";
|
|
203
|
-
readonly description: "@deprecated - use name instead. The name of the user who opened the ticket.";
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* @deprecated - use id instead.
|
|
207
|
-
*/
|
|
208
|
-
readonly systemId: {
|
|
209
|
-
readonly type: "string";
|
|
210
|
-
readonly description: "@deprecated - use id instead. The ID of the system who opened the ticket.";
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* @deprecated - use name instead.
|
|
214
|
-
*/
|
|
215
|
-
readonly systemName: {
|
|
216
|
-
readonly type: "string";
|
|
217
|
-
readonly description: "@deprecated - use name instead. The name of the system who opened the ticket.";
|
|
218
|
-
};
|
|
219
158
|
};
|
|
220
159
|
};
|
|
221
160
|
readonly requester: {
|
|
222
161
|
readonly type: "object";
|
|
162
|
+
readonly additionalProperties: false;
|
|
163
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
223
164
|
readonly properties: {
|
|
224
165
|
readonly id: {
|
|
225
166
|
readonly type: "string";
|
|
@@ -244,98 +185,13 @@ declare const ticketSchema: {
|
|
|
244
185
|
}];
|
|
245
186
|
readonly description: "The photo of the requester.";
|
|
246
187
|
};
|
|
247
|
-
/**
|
|
248
|
-
* @deprecated - use id instead.
|
|
249
|
-
*/
|
|
250
|
-
readonly systemId: {
|
|
251
|
-
readonly type: "string";
|
|
252
|
-
readonly description: "@deprecated - use id instead. The ID of the system who requested the ticket.";
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* @deprecated - use name instead.
|
|
256
|
-
*/
|
|
257
|
-
readonly systemName: {
|
|
258
|
-
readonly type: "string";
|
|
259
|
-
readonly description: "@deprecated - use name instead. The name of the system who requested the ticket.";
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* @deprecated - use photo instead.
|
|
263
|
-
*/
|
|
264
|
-
readonly systemPhoto: {
|
|
265
|
-
readonly anyOf: readonly [{
|
|
266
|
-
readonly $ref: "mediaFile.json";
|
|
267
|
-
}, {
|
|
268
|
-
readonly type: "null";
|
|
269
|
-
}, {
|
|
270
|
-
readonly type: "string";
|
|
271
|
-
}];
|
|
272
|
-
readonly description: "@deprecated - use photo instead. The photo of the system who requested the ticket.";
|
|
273
|
-
};
|
|
274
|
-
/**
|
|
275
|
-
* @deprecated - use id instead.
|
|
276
|
-
*/
|
|
277
|
-
readonly userId: {
|
|
278
|
-
readonly type: "string";
|
|
279
|
-
readonly description: "@deprecated - use id instead. The ID of the user who requested the ticket.";
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* @deprecated - use name instead.
|
|
283
|
-
*/
|
|
284
|
-
readonly userName: {
|
|
285
|
-
readonly type: "string";
|
|
286
|
-
readonly description: "@deprecated - use name instead. The name of the user who requested the ticket.";
|
|
287
|
-
};
|
|
288
|
-
/**
|
|
289
|
-
* @deprecated - use photo instead.
|
|
290
|
-
*/
|
|
291
|
-
readonly userPhoto: {
|
|
292
|
-
readonly anyOf: readonly [{
|
|
293
|
-
readonly $ref: "mediaFile.json";
|
|
294
|
-
}, {
|
|
295
|
-
readonly type: "null";
|
|
296
|
-
}, {
|
|
297
|
-
readonly type: "string";
|
|
298
|
-
}];
|
|
299
|
-
readonly description: "@deprecated - use photo instead. The photo of the user who requested the ticket.";
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* @deprecated - use id instead.
|
|
303
|
-
*/
|
|
304
|
-
readonly deviceId: {
|
|
305
|
-
readonly type: "string";
|
|
306
|
-
};
|
|
307
|
-
/**
|
|
308
|
-
* @deprecated - This will be removed in a future version.
|
|
309
|
-
*/
|
|
310
|
-
readonly roomId: {
|
|
311
|
-
readonly type: "string";
|
|
312
|
-
readonly description: "@deprecated - This will be removed in a future version. The ID of the room who requested the ticket.";
|
|
313
|
-
};
|
|
314
|
-
/**
|
|
315
|
-
* @deprecated - This will be removed in a future version.
|
|
316
|
-
*/
|
|
317
|
-
readonly reservationId: {
|
|
318
|
-
readonly type: "string";
|
|
319
|
-
readonly description: "@deprecated - This will be removed in a future version. The ID of the reservation who requested the ticket.";
|
|
320
|
-
};
|
|
321
|
-
/**
|
|
322
|
-
* @deprecated - This will be removed in a future version.
|
|
323
|
-
*/
|
|
324
|
-
readonly spaceId: {
|
|
325
|
-
readonly type: "string";
|
|
326
|
-
readonly description: "@deprecated - This will be removed in a future version. The ID of the space who requested the ticket.";
|
|
327
|
-
};
|
|
328
|
-
/**
|
|
329
|
-
* @deprecated - This will be removed in a future version.
|
|
330
|
-
*/
|
|
331
|
-
readonly spaceName: {
|
|
332
|
-
readonly type: "string";
|
|
333
|
-
readonly description: "@deprecated - This will be removed in a future version. The name of the space who requested the ticket.";
|
|
334
|
-
};
|
|
335
188
|
};
|
|
336
189
|
};
|
|
337
190
|
readonly assignedTo: {
|
|
338
|
-
readonly type: "object";
|
|
191
|
+
readonly type: readonly ["object", "null"];
|
|
192
|
+
readonly default: null;
|
|
193
|
+
readonly additionalProperties: false;
|
|
194
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
339
195
|
readonly properties: {
|
|
340
196
|
readonly id: {
|
|
341
197
|
readonly type: "string";
|
|
@@ -360,59 +216,6 @@ declare const ticketSchema: {
|
|
|
360
216
|
}];
|
|
361
217
|
readonly description: "The photo of the assigned to.";
|
|
362
218
|
};
|
|
363
|
-
/**
|
|
364
|
-
* @deprecated - use id instead.
|
|
365
|
-
*/
|
|
366
|
-
readonly userId: {
|
|
367
|
-
readonly type: "string";
|
|
368
|
-
readonly description: "@deprecated - use id instead. The ID of the user who assigned the ticket.";
|
|
369
|
-
};
|
|
370
|
-
/**
|
|
371
|
-
* @deprecated - use name instead.
|
|
372
|
-
*/
|
|
373
|
-
readonly userName: {
|
|
374
|
-
readonly type: "string";
|
|
375
|
-
readonly description: "@deprecated - use name instead. The name of the user who assigned the ticket.";
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* @deprecated - use photo instead.
|
|
379
|
-
*/
|
|
380
|
-
readonly userPhoto: {
|
|
381
|
-
readonly anyOf: readonly [{
|
|
382
|
-
readonly $ref: "mediaFile.json";
|
|
383
|
-
}, {
|
|
384
|
-
readonly type: "null";
|
|
385
|
-
}, {
|
|
386
|
-
readonly type: "string";
|
|
387
|
-
}];
|
|
388
|
-
};
|
|
389
|
-
/**
|
|
390
|
-
* @deprecated - use id instead.
|
|
391
|
-
*/
|
|
392
|
-
readonly vendorId: {
|
|
393
|
-
readonly type: "string";
|
|
394
|
-
readonly description: "@deprecated - use id instead. The ID of the vendor who assigned the ticket.";
|
|
395
|
-
};
|
|
396
|
-
/**
|
|
397
|
-
* @deprecated - use name instead.
|
|
398
|
-
*/
|
|
399
|
-
readonly vendorName: {
|
|
400
|
-
readonly type: "string";
|
|
401
|
-
readonly description: "@deprecated - use name instead. The name of the vendor who assigned the ticket.";
|
|
402
|
-
};
|
|
403
|
-
/**
|
|
404
|
-
* @deprecated - use photo instead.
|
|
405
|
-
*/
|
|
406
|
-
readonly vendorPhoto: {
|
|
407
|
-
readonly anyOf: readonly [{
|
|
408
|
-
readonly $ref: "mediaFile.json";
|
|
409
|
-
}, {
|
|
410
|
-
readonly type: "null";
|
|
411
|
-
}, {
|
|
412
|
-
readonly type: "string";
|
|
413
|
-
}];
|
|
414
|
-
readonly description: "@deprecated - use photo instead. The photo of the vendor who assigned the ticket.";
|
|
415
|
-
};
|
|
416
219
|
};
|
|
417
220
|
};
|
|
418
221
|
readonly notify: {
|
|
@@ -467,7 +270,7 @@ declare const ticketSchema: {
|
|
|
467
270
|
};
|
|
468
271
|
readonly discriminator: {
|
|
469
272
|
readonly type: "string";
|
|
470
|
-
readonly enum: readonly ["space", "
|
|
273
|
+
readonly enum: readonly ["space", "property", "customText"];
|
|
471
274
|
};
|
|
472
275
|
readonly name: {
|
|
473
276
|
readonly type: "string";
|
|
@@ -481,7 +284,7 @@ declare const ticketSchema: {
|
|
|
481
284
|
};
|
|
482
285
|
readonly priority: {
|
|
483
286
|
readonly type: "string";
|
|
484
|
-
readonly enum: readonly ["low", "normal", "high"];
|
|
287
|
+
readonly enum: readonly ["low", "normal", "high", "critical"];
|
|
485
288
|
readonly default: "normal";
|
|
486
289
|
};
|
|
487
290
|
readonly tags: {
|
|
@@ -491,9 +294,6 @@ declare const ticketSchema: {
|
|
|
491
294
|
readonly type: "string";
|
|
492
295
|
};
|
|
493
296
|
};
|
|
494
|
-
readonly department: {
|
|
495
|
-
readonly type: "string";
|
|
496
|
-
};
|
|
497
297
|
readonly rating: {
|
|
498
298
|
readonly type: "number";
|
|
499
299
|
readonly minimum: 0;
|
|
@@ -502,13 +302,6 @@ declare const ticketSchema: {
|
|
|
502
302
|
readonly ratingComment: {
|
|
503
303
|
readonly type: "string";
|
|
504
304
|
};
|
|
505
|
-
/**
|
|
506
|
-
* @deprecated - This will be removed in a future version.
|
|
507
|
-
*/
|
|
508
|
-
readonly tipAmount: {
|
|
509
|
-
readonly type: "string";
|
|
510
|
-
readonly description: "@deprecated - This will be removed in a future version. The amount of the tip.";
|
|
511
|
-
};
|
|
512
305
|
readonly autoCloseAt: {
|
|
513
306
|
readonly $ref: "definitions.json#/definitions/date";
|
|
514
307
|
};
|
|
@@ -118,10 +118,6 @@ const userSchema = {
|
|
|
118
118
|
type: "boolean",
|
|
119
119
|
description: "Whether time tracking is enabled for this role."
|
|
120
120
|
},
|
|
121
|
-
department: {
|
|
122
|
-
type: "string",
|
|
123
|
-
description: "The department the user belongs to."
|
|
124
|
-
},
|
|
125
121
|
departmentIds: {
|
|
126
122
|
type: "array",
|
|
127
123
|
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"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ACA,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":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,M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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":[]}
|
|
@@ -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: {
|
package/dist/cjs/validate.d.cts
CHANGED
|
@@ -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/dist/esm/models/issue.js
CHANGED
|
@@ -13,7 +13,6 @@ class Issue extends Entity {
|
|
|
13
13
|
this.type = data.type;
|
|
14
14
|
this.name = data.name;
|
|
15
15
|
if (data.description !== void 0) this.description = data.description;
|
|
16
|
-
if (data.department !== void 0) this.department = data.department;
|
|
17
16
|
if (data.departmentId !== void 0) this.departmentId = data.departmentId;
|
|
18
17
|
if (data.autoAssign !== void 0) this.autoAssign = data.autoAssign;
|
|
19
18
|
if (data.notify !== void 0) this.notify = data.notify;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/models/issue.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateIssue as validate } from \"../validate.js\";\nimport { issueSchema, type IssueSchema } from \"../schemas/issue.js\";\n\n/**\n * Data type for Issue constructor - exported for backwards compatibility\n */\nexport type IssueData = IssueSchema;\n\n/**\n * An issue associated with ticketing and concierge.\n */\nexport interface Issue extends IssueSchema {}\nexport class Issue extends Entity {\n declare schema: typeof issueSchema;\n declare validator: typeof validate;\n\n constructor(data: IssueSchema) {\n super(data);\n this.id = data.id;\n this.type = data.type;\n this.name = data.name;\n if (data.description !== undefined) this.description = data.description;\n if (data.
|
|
1
|
+
{"version":3,"sources":["../../../.generated/models/issue.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateIssue as validate } from \"../validate.js\";\nimport { issueSchema, type IssueSchema } from \"../schemas/issue.js\";\n\n/**\n * Data type for Issue constructor - exported for backwards compatibility\n */\nexport type IssueData = IssueSchema;\n\n/**\n * An issue associated with ticketing and concierge.\n */\nexport interface Issue extends IssueSchema {}\nexport class Issue extends Entity {\n declare schema: typeof issueSchema;\n declare validator: typeof validate;\n\n constructor(data: IssueSchema) {\n super(data);\n this.id = data.id;\n this.type = data.type;\n this.name = data.name;\n if (data.description !== undefined) this.description = data.description;\n if (data.departmentId !== undefined) this.departmentId = data.departmentId;\n if (data.autoAssign !== undefined) this.autoAssign = data.autoAssign;\n if (data.notify !== undefined) this.notify = data.notify;\n if (data.systemKey !== undefined) this.systemKey = data.systemKey;\n if (data.autoCreateTicket !== undefined)\n this.autoCreateTicket = data.autoCreateTicket;\n if (data.excludedResources !== undefined)\n this.excludedResources = data.excludedResources;\n if (data.createdAt !== undefined) this.createdAt = data.createdAt;\n if (data.updatedAt !== undefined) this.updatedAt = data.updatedAt;\n if (data.deletedAt !== undefined) this.deletedAt = data.deletedAt;\n }\n}\n\nObject.defineProperty(Issue.prototype, \"schema\", {\n value: issueSchema,\n});\n\nObject.defineProperty(Issue.prototype, \"validator\", {\n get: function () {\n return validate;\n },\n});\n"],"mappings":";;AAEA,SAAS,cAAc;AACvB,SAAS,iBAAiB,gBAAgB;AAC1C,SAAS,mBAAqC;AAWvC,MAAM,cAAc,OAAO;AAAA,EAflC,OAekC;AAAA;AAAA;AAAA,EAIhC,YAAY,MAAmB;AAC7B,UAAM,IAAI;AACV,SAAK,KAAK,KAAK;AACf,SAAK,OAAO,KAAK;AACjB,SAAK,OAAO,KAAK;AACjB,QAAI,KAAK,gBAAgB,OAAW,MAAK,cAAc,KAAK;AAC5D,QAAI,KAAK,iBAAiB,OAAW,MAAK,eAAe,KAAK;AAC9D,QAAI,KAAK,eAAe,OAAW,MAAK,aAAa,KAAK;AAC1D,QAAI,KAAK,WAAW,OAAW,MAAK,SAAS,KAAK;AAClD,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,qBAAqB;AAC5B,WAAK,mBAAmB,KAAK;AAC/B,QAAI,KAAK,sBAAsB;AAC7B,WAAK,oBAAoB,KAAK;AAChC,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AAAA,EAC1D;AACF;AAEA,OAAO,eAAe,MAAM,WAAW,UAAU;AAAA,EAC/C,OAAO;AACT,CAAC;AAED,OAAO,eAAe,MAAM,WAAW,aAAa;AAAA,EAClD,KAAK,kCAAY;AACf,WAAO;AAAA,EACT,GAFK;AAGP,CAAC;","names":[]}
|
|
@@ -14,7 +14,6 @@ class Property extends Entity {
|
|
|
14
14
|
this.type = data.type;
|
|
15
15
|
this.discriminator = data.discriminator;
|
|
16
16
|
this.organization = data.organization;
|
|
17
|
-
if (data.departments !== void 0) this.departments = data.departments;
|
|
18
17
|
if (data.testModeEnabled !== void 0)
|
|
19
18
|
this.testModeEnabled = data.testModeEnabled;
|
|
20
19
|
if (data.testMode !== void 0) this.testMode = data.testMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/models/property.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateProperty as validate } from \"../validate.js\";\nimport { propertySchema, type PropertySchema } from \"../schemas/property.js\";\n\n/**\n * Data type for Property constructor - exported for backwards compatibility\n */\nexport type PropertyData = PropertySchema;\n\n/**\n * A property is a physical asset or building\n */\nexport interface Property extends PropertySchema {}\nexport class Property extends Entity {\n declare schema: typeof propertySchema;\n declare validator: typeof validate;\n\n constructor(data: PropertySchema) {\n super(data);\n this.id = data.id;\n this.name = data.name;\n this.type = data.type;\n this.discriminator = data.discriminator;\n this.organization = data.organization;\n if (data.
|
|
1
|
+
{"version":3,"sources":["../../../.generated/models/property.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nimport { Entity } from \"./entity.js\";\nimport { validateProperty as validate } from \"../validate.js\";\nimport { propertySchema, type PropertySchema } from \"../schemas/property.js\";\n\n/**\n * Data type for Property constructor - exported for backwards compatibility\n */\nexport type PropertyData = PropertySchema;\n\n/**\n * A property is a physical asset or building\n */\nexport interface Property extends PropertySchema {}\nexport class Property extends Entity {\n declare schema: typeof propertySchema;\n declare validator: typeof validate;\n\n constructor(data: PropertySchema) {\n super(data);\n this.id = data.id;\n this.name = data.name;\n this.type = data.type;\n this.discriminator = data.discriminator;\n this.organization = data.organization;\n if (data.testModeEnabled !== undefined)\n this.testModeEnabled = data.testModeEnabled;\n if (data.testMode !== undefined) this.testMode = data.testMode;\n this.timezone = data.timezone;\n if (data.smsNumber !== undefined) this.smsNumber = data.smsNumber;\n if (data.voiceNumber !== undefined) this.voiceNumber = data.voiceNumber;\n if (data.tags !== undefined) this.tags = data.tags;\n if (data.checkInTime !== undefined) this.checkInTime = data.checkInTime;\n if (data.checkOutTime !== undefined) this.checkOutTime = data.checkOutTime;\n if (data.address !== undefined) this.address = data.address;\n if (data.latitude !== undefined) this.latitude = data.latitude;\n if (data.longitude !== undefined) this.longitude = data.longitude;\n if (data.appFeatures !== undefined) this.appFeatures = data.appFeatures;\n if (data.notifications !== undefined)\n this.notifications = data.notifications;\n if (data.credentials !== undefined) this.credentials = data.credentials;\n }\n}\n\nObject.defineProperty(Property.prototype, \"schema\", {\n value: propertySchema,\n});\n\nObject.defineProperty(Property.prototype, \"validator\", {\n get: function () {\n return validate;\n },\n});\n"],"mappings":";;AAEA,SAAS,cAAc;AACvB,SAAS,oBAAoB,gBAAgB;AAC7C,SAAS,sBAA2C;AAW7C,MAAM,iBAAiB,OAAO;AAAA,EAfrC,OAeqC;AAAA;AAAA;AAAA,EAInC,YAAY,MAAsB;AAChC,UAAM,IAAI;AACV,SAAK,KAAK,KAAK;AACf,SAAK,OAAO,KAAK;AACjB,SAAK,OAAO,KAAK;AACjB,SAAK,gBAAgB,KAAK;AAC1B,SAAK,eAAe,KAAK;AACzB,QAAI,KAAK,oBAAoB;AAC3B,WAAK,kBAAkB,KAAK;AAC9B,QAAI,KAAK,aAAa,OAAW,MAAK,WAAW,KAAK;AACtD,SAAK,WAAW,KAAK;AACrB,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,gBAAgB,OAAW,MAAK,cAAc,KAAK;AAC5D,QAAI,KAAK,SAAS,OAAW,MAAK,OAAO,KAAK;AAC9C,QAAI,KAAK,gBAAgB,OAAW,MAAK,cAAc,KAAK;AAC5D,QAAI,KAAK,iBAAiB,OAAW,MAAK,eAAe,KAAK;AAC9D,QAAI,KAAK,YAAY,OAAW,MAAK,UAAU,KAAK;AACpD,QAAI,KAAK,aAAa,OAAW,MAAK,WAAW,KAAK;AACtD,QAAI,KAAK,cAAc,OAAW,MAAK,YAAY,KAAK;AACxD,QAAI,KAAK,gBAAgB,OAAW,MAAK,cAAc,KAAK;AAC5D,QAAI,KAAK,kBAAkB;AACzB,WAAK,gBAAgB,KAAK;AAC5B,QAAI,KAAK,gBAAgB,OAAW,MAAK,cAAc,KAAK;AAAA,EAC9D;AACF;AAEA,OAAO,eAAe,SAAS,WAAW,UAAU;AAAA,EAClD,OAAO;AACT,CAAC;AAED,OAAO,eAAe,SAAS,WAAW,aAAa;AAAA,EACrD,KAAK,kCAAY;AACf,WAAO;AAAA,EACT,GAFK;AAGP,CAAC;","names":[]}
|
|
@@ -15,21 +15,19 @@ class Ticket extends Entity {
|
|
|
15
15
|
if (data.issueId !== void 0) this.issueId = data.issueId;
|
|
16
16
|
this.conversation = data.conversation;
|
|
17
17
|
if (data.subject !== void 0) this.subject = data.subject;
|
|
18
|
-
|
|
18
|
+
this.openedBy = data.openedBy;
|
|
19
19
|
this.requester = data.requester;
|
|
20
|
-
|
|
20
|
+
this.assignedTo = data.assignedTo;
|
|
21
21
|
if (data.notify !== void 0) this.notify = data.notify;
|
|
22
22
|
if (data.collaborators !== void 0)
|
|
23
23
|
this.collaborators = data.collaborators;
|
|
24
24
|
if (data.location !== void 0) this.location = data.location;
|
|
25
25
|
this.status = data.status;
|
|
26
|
-
|
|
26
|
+
this.priority = data.priority;
|
|
27
27
|
this.tags = data.tags;
|
|
28
|
-
if (data.department !== void 0) this.department = data.department;
|
|
29
28
|
if (data.rating !== void 0) this.rating = data.rating;
|
|
30
29
|
if (data.ratingComment !== void 0)
|
|
31
30
|
this.ratingComment = data.ratingComment;
|
|
32
|
-
if (data.tipAmount !== void 0) this.tipAmount = data.tipAmount;
|
|
33
31
|
if (data.autoCloseAt !== void 0) this.autoCloseAt = data.autoCloseAt;
|
|
34
32
|
if (data.scheduleDate !== void 0) this.scheduleDate = data.scheduleDate;
|
|
35
33
|
this.createdAt = data.createdAt;
|