@kohost/api-client 4.15.3 → 4.16.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/httpClient.d.cts +12 -2
- package/dist/cjs/{index-C0VQ2ffR.d.cts → index-BjziDwt4.d.cts} +21 -1
- package/dist/cjs/index.d.cts +11 -1
- 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 +0 -1
- package/dist/cjs/models/ticket.cjs.map +1 -1
- package/dist/cjs/schemas/issue.cjs +1 -4
- package/dist/cjs/schemas/issue.cjs.map +1 -1
- package/dist/cjs/schemas/issue.d.cts +1 -4
- 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 +0 -3
- package/dist/cjs/schemas/ticket.cjs.map +1 -1
- package/dist/cjs/schemas/ticket.d.cts +0 -3
- package/dist/cjs/schemas/user.cjs +5 -6
- package/dist/cjs/schemas/user.cjs.map +1 -1
- package/dist/cjs/schemas/user.d.cts +5 -6
- package/dist/cjs/useCases/createDepartment.cjs +72 -0
- package/dist/cjs/useCases/createDepartment.cjs.map +1 -0
- package/dist/cjs/useCases/createDepartment.d.cts +29 -0
- package/dist/cjs/useCases/createServer.cjs +72 -0
- package/dist/cjs/useCases/createServer.cjs.map +1 -0
- package/dist/cjs/useCases/createServer.d.cts +29 -0
- package/dist/cjs/useCases/deleteDepartment.cjs +72 -0
- package/dist/cjs/useCases/deleteDepartment.cjs.map +1 -0
- package/dist/cjs/useCases/deleteDepartment.d.cts +38 -0
- package/dist/cjs/useCases/deleteServer.cjs +72 -0
- package/dist/cjs/useCases/deleteServer.cjs.map +1 -0
- package/dist/cjs/useCases/deleteServer.d.cts +38 -0
- package/dist/cjs/useCases/describeDepartment.cjs +72 -0
- package/dist/cjs/useCases/describeDepartment.cjs.map +1 -0
- package/dist/cjs/useCases/describeDepartment.d.cts +38 -0
- package/dist/cjs/useCases/describeServer.cjs +72 -0
- package/dist/cjs/useCases/describeServer.cjs.map +1 -0
- package/dist/cjs/useCases/describeServer.d.cts +38 -0
- package/dist/cjs/useCases/index.cjs +30 -0
- package/dist/cjs/useCases/index.cjs.map +1 -1
- package/dist/cjs/useCases/index.d.cts +10 -0
- package/dist/cjs/useCases/listDepartments.cjs +72 -0
- package/dist/cjs/useCases/listDepartments.cjs.map +1 -0
- package/dist/cjs/useCases/listDepartments.d.cts +29 -0
- package/dist/cjs/useCases/listServers.cjs +72 -0
- package/dist/cjs/useCases/listServers.cjs.map +1 -0
- package/dist/cjs/useCases/listServers.d.cts +29 -0
- package/dist/cjs/useCases/updateDepartment.cjs +72 -0
- package/dist/cjs/useCases/updateDepartment.cjs.map +1 -0
- package/dist/cjs/useCases/updateDepartment.d.cts +38 -0
- package/dist/cjs/useCases/updateServer.cjs +72 -0
- package/dist/cjs/useCases/updateServer.cjs.map +1 -0
- package/dist/cjs/useCases/updateServer.d.cts +38 -0
- package/dist/cjs/validate.d.cts +0 -3
- package/dist/esm/httpClient.d.ts +12 -2
- package/dist/esm/{index-_-hKRXg6.d.ts → index-CY1L0nkI.d.ts} +21 -1
- package/dist/esm/index.d.ts +11 -1
- 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 +0 -1
- package/dist/esm/models/ticket.js.map +1 -1
- package/dist/esm/schemas/issue.d.ts +1 -4
- package/dist/esm/schemas/issue.js +1 -4
- 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 +0 -3
- package/dist/esm/schemas/ticket.js +0 -3
- package/dist/esm/schemas/ticket.js.map +1 -1
- package/dist/esm/schemas/user.d.ts +5 -6
- package/dist/esm/schemas/user.js +5 -6
- package/dist/esm/schemas/user.js.map +1 -1
- package/dist/esm/useCases/createDepartment.d.ts +29 -0
- package/dist/esm/useCases/createDepartment.js +50 -0
- package/dist/esm/useCases/createDepartment.js.map +1 -0
- package/dist/esm/useCases/createServer.d.ts +29 -0
- package/dist/esm/useCases/createServer.js +50 -0
- package/dist/esm/useCases/createServer.js.map +1 -0
- package/dist/esm/useCases/deleteDepartment.d.ts +38 -0
- package/dist/esm/useCases/deleteDepartment.js +50 -0
- package/dist/esm/useCases/deleteDepartment.js.map +1 -0
- package/dist/esm/useCases/deleteServer.d.ts +38 -0
- package/dist/esm/useCases/deleteServer.js +50 -0
- package/dist/esm/useCases/deleteServer.js.map +1 -0
- package/dist/esm/useCases/describeDepartment.d.ts +38 -0
- package/dist/esm/useCases/describeDepartment.js +50 -0
- package/dist/esm/useCases/describeDepartment.js.map +1 -0
- package/dist/esm/useCases/describeServer.d.ts +38 -0
- package/dist/esm/useCases/describeServer.js +50 -0
- package/dist/esm/useCases/describeServer.js.map +1 -0
- package/dist/esm/useCases/index.d.ts +10 -0
- package/dist/esm/useCases/index.js +20 -0
- package/dist/esm/useCases/index.js.map +1 -1
- package/dist/esm/useCases/listDepartments.d.ts +29 -0
- package/dist/esm/useCases/listDepartments.js +50 -0
- package/dist/esm/useCases/listDepartments.js.map +1 -0
- package/dist/esm/useCases/listServers.d.ts +29 -0
- package/dist/esm/useCases/listServers.js +50 -0
- package/dist/esm/useCases/listServers.js.map +1 -0
- package/dist/esm/useCases/updateDepartment.d.ts +38 -0
- package/dist/esm/useCases/updateDepartment.js +50 -0
- package/dist/esm/useCases/updateDepartment.js.map +1 -0
- package/dist/esm/useCases/updateServer.d.ts +38 -0
- package/dist/esm/useCases/updateServer.js +50 -0
- package/dist/esm/useCases/updateServer.js.map +1 -0
- package/dist/esm/validate.d.ts +0 -3
- 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,QAC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,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 \"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 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,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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":[]}
|
|
@@ -118,12 +118,11 @@ const userSchema = {
|
|
|
118
118
|
type: "boolean",
|
|
119
119
|
description: "Whether time tracking is enabled for this role."
|
|
120
120
|
},
|
|
121
|
-
|
|
122
|
-
type: "
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
type: "string",
|
|
121
|
+
departmentIds: {
|
|
122
|
+
type: "array",
|
|
123
|
+
items: {
|
|
124
|
+
type: "string"
|
|
125
|
+
},
|
|
127
126
|
description: "The ID of the department the user belongs to."
|
|
128
127
|
},
|
|
129
128
|
policyIds: {
|
|
@@ -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 departmentId: {\n type: \"string\",\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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,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,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,aAAa,UAAU;AAAA,EACxC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;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M,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,12 +92,11 @@ declare const userSchema: {
|
|
|
92
92
|
readonly type: "boolean";
|
|
93
93
|
readonly description: "Whether time tracking is enabled for this role.";
|
|
94
94
|
};
|
|
95
|
-
readonly
|
|
96
|
-
readonly type: "
|
|
97
|
-
readonly
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
readonly type: "string";
|
|
95
|
+
readonly departmentIds: {
|
|
96
|
+
readonly type: "array";
|
|
97
|
+
readonly items: {
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
};
|
|
101
100
|
readonly description: "The ID of the department the user belongs to.";
|
|
102
101
|
};
|
|
103
102
|
readonly policyIds: {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var createDepartment_exports = {};
|
|
20
|
+
__export(createDepartment_exports, {
|
|
21
|
+
CreateDepartmentCommand: () => CreateDepartmentCommand
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(createDepartment_exports);
|
|
24
|
+
class CreateDepartmentCommand {
|
|
25
|
+
static {
|
|
26
|
+
__name(this, "CreateDepartmentCommand");
|
|
27
|
+
}
|
|
28
|
+
url;
|
|
29
|
+
data;
|
|
30
|
+
query;
|
|
31
|
+
headers;
|
|
32
|
+
config;
|
|
33
|
+
static params = [];
|
|
34
|
+
static url = "/departments";
|
|
35
|
+
static method = "post";
|
|
36
|
+
constructor(commandConfig, options = {}) {
|
|
37
|
+
const pathParams = CreateDepartmentCommand.params;
|
|
38
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
+
if (typeof data === "undefined") data = null;
|
|
40
|
+
if (typeof query === "undefined") query = null;
|
|
41
|
+
if (typeof headers === "undefined") headers = null;
|
|
42
|
+
let url = CreateDepartmentCommand.url;
|
|
43
|
+
if (pathParams && data) {
|
|
44
|
+
for (const param of pathParams) {
|
|
45
|
+
const urlParam = ":" + param;
|
|
46
|
+
url = url.replace(urlParam, data[param]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
+
if (missingParams) {
|
|
51
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
+
}
|
|
54
|
+
this.url = url;
|
|
55
|
+
this.data = data;
|
|
56
|
+
this.query = query;
|
|
57
|
+
this.headers = headers;
|
|
58
|
+
this.config = {
|
|
59
|
+
method: CreateDepartmentCommand.method,
|
|
60
|
+
url,
|
|
61
|
+
data,
|
|
62
|
+
params: query,
|
|
63
|
+
headers,
|
|
64
|
+
...options
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
CreateDepartmentCommand
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=createDepartment.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../.generated/useCases/createDepartment.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface CreateDepartmentCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface CreateDepartmentCommandRequestConfig {\n method: \"post\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class CreateDepartmentCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: CreateDepartmentCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/departments\";\n static method = \"post\" as const;\n\n constructor(\n commandConfig: CreateDepartmentCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = CreateDepartmentCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = CreateDepartmentCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: CreateDepartmentCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,wBAAwB;AAAA,EApBrC,OAoBqC;AAAA;AAAA;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC;AAAA,EACjB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,wBAAwB;AAE3C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,wBAAwB;AAE1C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,wBAAwB;AAAA,MAChC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface CreateDepartmentCommandConfig {
|
|
2
|
+
data?: Record<string, unknown> | null;
|
|
3
|
+
headers?: Record<string, string> | null;
|
|
4
|
+
query?: Record<string, unknown> | null;
|
|
5
|
+
}
|
|
6
|
+
interface CreateDepartmentCommandRequestConfig {
|
|
7
|
+
method: "post";
|
|
8
|
+
url: string;
|
|
9
|
+
data: Record<string, unknown> | null;
|
|
10
|
+
params: Record<string, unknown> | null;
|
|
11
|
+
headers: Record<string, string> | null;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
declare class CreateDepartmentCommand {
|
|
18
|
+
url: string;
|
|
19
|
+
data: Record<string, unknown> | null;
|
|
20
|
+
query: Record<string, unknown> | null;
|
|
21
|
+
headers: Record<string, string> | null;
|
|
22
|
+
config: CreateDepartmentCommandRequestConfig;
|
|
23
|
+
static params: readonly [];
|
|
24
|
+
static url: string;
|
|
25
|
+
static method: "post";
|
|
26
|
+
constructor(commandConfig: CreateDepartmentCommandConfig, options?: Record<string, unknown>);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { CreateDepartmentCommand, type CreateDepartmentCommandConfig, type CreateDepartmentCommandRequestConfig };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var createServer_exports = {};
|
|
20
|
+
__export(createServer_exports, {
|
|
21
|
+
CreateServerCommand: () => CreateServerCommand
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(createServer_exports);
|
|
24
|
+
class CreateServerCommand {
|
|
25
|
+
static {
|
|
26
|
+
__name(this, "CreateServerCommand");
|
|
27
|
+
}
|
|
28
|
+
url;
|
|
29
|
+
data;
|
|
30
|
+
query;
|
|
31
|
+
headers;
|
|
32
|
+
config;
|
|
33
|
+
static params = [];
|
|
34
|
+
static url = "/servers";
|
|
35
|
+
static method = "post";
|
|
36
|
+
constructor(commandConfig, options = {}) {
|
|
37
|
+
const pathParams = CreateServerCommand.params;
|
|
38
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
+
if (typeof data === "undefined") data = null;
|
|
40
|
+
if (typeof query === "undefined") query = null;
|
|
41
|
+
if (typeof headers === "undefined") headers = null;
|
|
42
|
+
let url = CreateServerCommand.url;
|
|
43
|
+
if (pathParams && data) {
|
|
44
|
+
for (const param of pathParams) {
|
|
45
|
+
const urlParam = ":" + param;
|
|
46
|
+
url = url.replace(urlParam, data[param]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
+
if (missingParams) {
|
|
51
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
+
}
|
|
54
|
+
this.url = url;
|
|
55
|
+
this.data = data;
|
|
56
|
+
this.query = query;
|
|
57
|
+
this.headers = headers;
|
|
58
|
+
this.config = {
|
|
59
|
+
method: CreateServerCommand.method,
|
|
60
|
+
url,
|
|
61
|
+
data,
|
|
62
|
+
params: query,
|
|
63
|
+
headers,
|
|
64
|
+
...options
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
CreateServerCommand
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=createServer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../.generated/useCases/createServer.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface CreateServerCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface CreateServerCommandRequestConfig {\n method: \"post\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class CreateServerCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: CreateServerCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/servers\";\n static method = \"post\" as const;\n\n constructor(\n commandConfig: CreateServerCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = CreateServerCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = CreateServerCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: CreateServerCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,oBAAoB;AAAA,EApBjC,OAoBiC;AAAA;AAAA;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC;AAAA,EACjB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,oBAAoB;AAEvC,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,oBAAoB;AAEtC,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,oBAAoB;AAAA,MAC5B;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface CreateServerCommandConfig {
|
|
2
|
+
data?: Record<string, unknown> | null;
|
|
3
|
+
headers?: Record<string, string> | null;
|
|
4
|
+
query?: Record<string, unknown> | null;
|
|
5
|
+
}
|
|
6
|
+
interface CreateServerCommandRequestConfig {
|
|
7
|
+
method: "post";
|
|
8
|
+
url: string;
|
|
9
|
+
data: Record<string, unknown> | null;
|
|
10
|
+
params: Record<string, unknown> | null;
|
|
11
|
+
headers: Record<string, string> | null;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
declare class CreateServerCommand {
|
|
18
|
+
url: string;
|
|
19
|
+
data: Record<string, unknown> | null;
|
|
20
|
+
query: Record<string, unknown> | null;
|
|
21
|
+
headers: Record<string, string> | null;
|
|
22
|
+
config: CreateServerCommandRequestConfig;
|
|
23
|
+
static params: readonly [];
|
|
24
|
+
static url: string;
|
|
25
|
+
static method: "post";
|
|
26
|
+
constructor(commandConfig: CreateServerCommandConfig, options?: Record<string, unknown>);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { CreateServerCommand, type CreateServerCommandConfig, type CreateServerCommandRequestConfig };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var deleteDepartment_exports = {};
|
|
20
|
+
__export(deleteDepartment_exports, {
|
|
21
|
+
DeleteDepartmentCommand: () => DeleteDepartmentCommand
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(deleteDepartment_exports);
|
|
24
|
+
class DeleteDepartmentCommand {
|
|
25
|
+
static {
|
|
26
|
+
__name(this, "DeleteDepartmentCommand");
|
|
27
|
+
}
|
|
28
|
+
url;
|
|
29
|
+
data;
|
|
30
|
+
query;
|
|
31
|
+
headers;
|
|
32
|
+
config;
|
|
33
|
+
static params = ["id"];
|
|
34
|
+
static url = "/departments/:id";
|
|
35
|
+
static method = "delete";
|
|
36
|
+
constructor(commandConfig, options = {}) {
|
|
37
|
+
const pathParams = DeleteDepartmentCommand.params;
|
|
38
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
+
if (typeof data === "undefined") data = null;
|
|
40
|
+
if (typeof query === "undefined") query = null;
|
|
41
|
+
if (typeof headers === "undefined") headers = null;
|
|
42
|
+
let url = DeleteDepartmentCommand.url;
|
|
43
|
+
if (pathParams && data) {
|
|
44
|
+
for (const param of pathParams) {
|
|
45
|
+
const urlParam = ":" + param;
|
|
46
|
+
url = url.replace(urlParam, data[param]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
+
if (missingParams) {
|
|
51
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
+
}
|
|
54
|
+
this.url = url;
|
|
55
|
+
this.data = data;
|
|
56
|
+
this.query = query;
|
|
57
|
+
this.headers = headers;
|
|
58
|
+
this.config = {
|
|
59
|
+
method: DeleteDepartmentCommand.method,
|
|
60
|
+
url,
|
|
61
|
+
data,
|
|
62
|
+
params: query,
|
|
63
|
+
headers,
|
|
64
|
+
...options
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
DeleteDepartmentCommand
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=deleteDepartment.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../.generated/useCases/deleteDepartment.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface DeleteDepartmentCommandConfig {\n data?: { id: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface DeleteDepartmentCommandRequestConfig {\n method: \"delete\";\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class DeleteDepartmentCommand {\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: DeleteDepartmentCommandRequestConfig;\n\n static params = [\"id\"] as const;\n static url = \"/departments/:id\";\n static method = \"delete\" as const;\n\n constructor(\n commandConfig: DeleteDepartmentCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = DeleteDepartmentCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = DeleteDepartmentCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: DeleteDepartmentCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,wBAAwB;AAAA,EApBrC,OAoBqC;AAAA;AAAA;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC,IAAI;AAAA,EACrB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,wBAAwB;AAE3C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,wBAAwB;AAE1C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,wBAAwB;AAAA,MAChC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface DeleteDepartmentCommandConfig {
|
|
2
|
+
data?: {
|
|
3
|
+
id: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
} | null;
|
|
6
|
+
headers?: Record<string, string> | null;
|
|
7
|
+
query?: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
interface DeleteDepartmentCommandRequestConfig {
|
|
10
|
+
method: "delete";
|
|
11
|
+
url: string;
|
|
12
|
+
data: {
|
|
13
|
+
id: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} | null;
|
|
16
|
+
params: Record<string, unknown> | null;
|
|
17
|
+
headers: Record<string, string> | null;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
declare class DeleteDepartmentCommand {
|
|
24
|
+
url: string;
|
|
25
|
+
data: {
|
|
26
|
+
id: string;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
} | null;
|
|
29
|
+
query: Record<string, unknown> | null;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
31
|
+
config: DeleteDepartmentCommandRequestConfig;
|
|
32
|
+
static params: readonly ["id"];
|
|
33
|
+
static url: string;
|
|
34
|
+
static method: "delete";
|
|
35
|
+
constructor(commandConfig: DeleteDepartmentCommandConfig, options?: Record<string, unknown>);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { DeleteDepartmentCommand, type DeleteDepartmentCommandConfig, type DeleteDepartmentCommandRequestConfig };
|