@kohost/api-client 6.5.0 → 7.1.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/httpClient.d.ts +8 -12
- package/dist/index-BnWbLEt_.d.ts +22 -0
- package/dist/{index-CwkLEwUB.d.ts → index-DJzBywIl.d.ts} +13 -21
- package/dist/index.d.ts +11 -11
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/deviceNotifications.d.ts +19 -0
- package/dist/lib/deviceNotifications.js +35 -0
- package/dist/lib/deviceNotifications.js.map +1 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +23 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/policy-resolvers.d.ts +12 -0
- package/dist/lib/policy-resolvers.js +75 -0
- package/dist/lib/policy-resolvers.js.map +1 -0
- package/dist/lib/systemCategories.d.ts +10 -0
- package/dist/lib/systemCategories.js +61 -0
- package/dist/lib/systemCategories.js.map +1 -0
- package/dist/models/alarm.js +1 -0
- package/dist/models/alarm.js.map +1 -1
- package/dist/models/announcement.js +1 -0
- package/dist/models/announcement.js.map +1 -1
- package/dist/models/automation.js +1 -0
- package/dist/models/automation.js.map +1 -1
- package/dist/models/camera.js +1 -0
- package/dist/models/camera.js.map +1 -1
- package/dist/models/category.js +1 -0
- package/dist/models/category.js.map +1 -1
- package/dist/models/courtesy.js +1 -0
- package/dist/models/courtesy.js.map +1 -1
- package/dist/models/credential.js +1 -0
- package/dist/models/credential.js.map +1 -1
- package/dist/models/dimmer.js +1 -0
- package/dist/models/dimmer.js.map +1 -1
- package/dist/models/emailMessage.js +1 -0
- package/dist/models/emailMessage.js.map +1 -1
- package/dist/models/energyReport.js +1 -0
- package/dist/models/energyReport.js.map +1 -1
- package/dist/models/gateway.js +1 -0
- package/dist/models/gateway.js.map +1 -1
- package/dist/models/issue.d.ts +1 -1
- package/dist/models/issue.js +2 -7
- package/dist/models/issue.js.map +1 -1
- package/dist/models/lock.js +1 -0
- package/dist/models/lock.js.map +1 -1
- package/dist/models/log.js +1 -0
- package/dist/models/log.js.map +1 -1
- package/dist/models/mediaFile.js +1 -0
- package/dist/models/mediaFile.js.map +1 -1
- package/dist/models/mediaSource.js +1 -0
- package/dist/models/mediaSource.js.map +1 -1
- package/dist/models/motionSensor.js +1 -0
- package/dist/models/motionSensor.js.map +1 -1
- package/dist/models/notification.js +1 -0
- package/dist/models/notification.js.map +1 -1
- package/dist/models/order.js +1 -0
- package/dist/models/order.js.map +1 -1
- package/dist/models/organization.js +1 -2
- package/dist/models/organization.js.map +1 -1
- package/dist/models/payment.js +1 -0
- package/dist/models/payment.js.map +1 -1
- package/dist/models/policy.js +1 -0
- package/dist/models/policy.js.map +1 -1
- package/dist/models/product.js +1 -0
- package/dist/models/product.js.map +1 -1
- package/dist/models/property.js +1 -1
- package/dist/models/property.js.map +1 -1
- package/dist/models/reservation.js +1 -0
- package/dist/models/reservation.js.map +1 -1
- package/dist/models/shortLink.js +1 -0
- package/dist/models/shortLink.js.map +1 -1
- package/dist/models/smsMessage.js +1 -0
- package/dist/models/smsMessage.js.map +1 -1
- package/dist/models/space.js +1 -0
- package/dist/models/space.js.map +1 -1
- package/dist/models/switch.js +1 -0
- package/dist/models/switch.js.map +1 -1
- package/dist/models/thermostat.js +1 -0
- package/dist/models/thermostat.js.map +1 -1
- package/dist/models/ticket.js +4 -0
- package/dist/models/ticket.js.map +1 -1
- package/dist/models/timeSheet.js +1 -0
- package/dist/models/timeSheet.js.map +1 -1
- package/dist/models/user.js +0 -1
- package/dist/models/user.js.map +1 -1
- package/dist/models/vendor.js +2 -0
- package/dist/models/vendor.js.map +1 -1
- package/dist/models/windowCovering.js +1 -0
- package/dist/models/windowCovering.js.map +1 -1
- package/dist/schemas/alarm.d.ts +4 -0
- package/dist/schemas/alarm.js +4 -0
- package/dist/schemas/alarm.js.map +1 -1
- package/dist/schemas/announcement.d.ts +4 -0
- package/dist/schemas/announcement.js +4 -0
- package/dist/schemas/announcement.js.map +1 -1
- package/dist/schemas/automation.d.ts +4 -0
- package/dist/schemas/automation.js +4 -0
- package/dist/schemas/automation.js.map +1 -1
- package/dist/schemas/camera.d.ts +4 -0
- package/dist/schemas/camera.js +4 -0
- package/dist/schemas/camera.js.map +1 -1
- package/dist/schemas/category.d.ts +4 -0
- package/dist/schemas/category.js +4 -0
- package/dist/schemas/category.js.map +1 -1
- package/dist/schemas/courtesy.d.ts +4 -0
- package/dist/schemas/courtesy.js +4 -0
- package/dist/schemas/courtesy.js.map +1 -1
- package/dist/schemas/credential.d.ts +4 -1
- package/dist/schemas/credential.js +5 -1
- package/dist/schemas/credential.js.map +1 -1
- package/dist/schemas/definitions.d.ts +1 -1
- package/dist/schemas/definitions.js +6 -1
- package/dist/schemas/definitions.js.map +1 -1
- package/dist/schemas/dimmer.d.ts +4 -0
- package/dist/schemas/dimmer.js +4 -0
- package/dist/schemas/dimmer.js.map +1 -1
- package/dist/schemas/emailMessage.d.ts +4 -0
- package/dist/schemas/emailMessage.js +4 -0
- package/dist/schemas/emailMessage.js.map +1 -1
- package/dist/schemas/energyReport.d.ts +4 -0
- package/dist/schemas/energyReport.js +4 -0
- package/dist/schemas/energyReport.js.map +1 -1
- package/dist/schemas/gateway.d.ts +4 -0
- package/dist/schemas/gateway.js +4 -0
- package/dist/schemas/gateway.js.map +1 -1
- package/dist/schemas/issue.d.ts +126 -43
- package/dist/schemas/issue.js +88 -44
- package/dist/schemas/issue.js.map +1 -1
- package/dist/schemas/lock.d.ts +4 -0
- package/dist/schemas/lock.js +4 -0
- package/dist/schemas/lock.js.map +1 -1
- package/dist/schemas/log.d.ts +4 -0
- package/dist/schemas/log.js +4 -0
- package/dist/schemas/log.js.map +1 -1
- package/dist/schemas/mediaFile.d.ts +4 -0
- package/dist/schemas/mediaFile.js +4 -0
- package/dist/schemas/mediaFile.js.map +1 -1
- package/dist/schemas/mediaSource.d.ts +4 -0
- package/dist/schemas/mediaSource.js +4 -0
- package/dist/schemas/mediaSource.js.map +1 -1
- package/dist/schemas/motionSensor.d.ts +4 -0
- package/dist/schemas/motionSensor.js +4 -0
- package/dist/schemas/motionSensor.js.map +1 -1
- package/dist/schemas/notification.d.ts +4 -0
- package/dist/schemas/notification.js +4 -0
- package/dist/schemas/notification.js.map +1 -1
- package/dist/schemas/order.d.ts +4 -0
- package/dist/schemas/order.js +4 -0
- package/dist/schemas/order.js.map +1 -1
- package/dist/schemas/organization.d.ts +45 -13
- package/dist/schemas/organization.js +46 -10
- package/dist/schemas/organization.js.map +1 -1
- package/dist/schemas/payment.d.ts +4 -0
- package/dist/schemas/payment.js +4 -0
- package/dist/schemas/payment.js.map +1 -1
- package/dist/schemas/policy.d.ts +4 -0
- package/dist/schemas/policy.js +4 -0
- package/dist/schemas/policy.js.map +1 -1
- package/dist/schemas/product.d.ts +4 -0
- package/dist/schemas/product.js +4 -0
- package/dist/schemas/product.js.map +1 -1
- package/dist/schemas/property.d.ts +13 -11
- package/dist/schemas/property.js +13 -11
- package/dist/schemas/property.js.map +1 -1
- package/dist/schemas/reservation.d.ts +4 -0
- package/dist/schemas/reservation.js +4 -0
- package/dist/schemas/reservation.js.map +1 -1
- package/dist/schemas/shortLink.d.ts +4 -0
- package/dist/schemas/shortLink.js +4 -0
- package/dist/schemas/shortLink.js.map +1 -1
- package/dist/schemas/smsMessage.d.ts +4 -0
- package/dist/schemas/smsMessage.js +4 -0
- package/dist/schemas/smsMessage.js.map +1 -1
- package/dist/schemas/space.d.ts +4 -0
- package/dist/schemas/space.js +4 -0
- package/dist/schemas/space.js.map +1 -1
- package/dist/schemas/switch.d.ts +4 -0
- package/dist/schemas/switch.js +4 -0
- package/dist/schemas/switch.js.map +1 -1
- package/dist/schemas/thermostat.d.ts +4 -0
- package/dist/schemas/thermostat.js +4 -0
- package/dist/schemas/thermostat.js.map +1 -1
- package/dist/schemas/ticket.d.ts +14 -0
- package/dist/schemas/ticket.js +14 -0
- package/dist/schemas/ticket.js.map +1 -1
- package/dist/schemas/timeSheet.d.ts +4 -0
- package/dist/schemas/timeSheet.js +4 -0
- package/dist/schemas/timeSheet.js.map +1 -1
- package/dist/schemas/user.d.ts +0 -3
- package/dist/schemas/user.js +0 -3
- package/dist/schemas/user.js.map +1 -1
- package/dist/schemas/vendor.d.ts +12 -0
- package/dist/schemas/vendor.js +12 -0
- package/dist/schemas/vendor.js.map +1 -1
- package/dist/schemas/windowCovering.d.ts +4 -0
- package/dist/schemas/windowCovering.js +4 -0
- package/dist/schemas/windowCovering.js.map +1 -1
- package/dist/useCases/createApiKey.d.ts +38 -0
- package/dist/useCases/{sendSMS.js → createApiKey.js} +9 -9
- package/dist/useCases/createApiKey.js.map +1 -0
- package/dist/useCases/{describeIntegration.d.ts → getApiKey.d.ts} +10 -10
- package/dist/useCases/{listAnnouncements.js → getApiKey.js} +9 -9
- package/dist/useCases/getApiKey.js.map +1 -0
- package/dist/useCases/index.d.ts +6 -10
- package/dist/useCases/index.js +12 -20
- package/dist/useCases/index.js.map +1 -1
- package/dist/useCases/{deleteAnnouncement.d.ts → revokeApiKey.d.ts} +10 -10
- package/dist/useCases/{deleteAnnouncement.js → revokeApiKey.js} +9 -9
- package/dist/useCases/revokeApiKey.js.map +1 -0
- package/dist/useCases/{updateAnnouncement.d.ts → rotateApiKey.d.ts} +10 -10
- package/dist/useCases/{updateIntegration.js → rotateApiKey.js} +9 -9
- package/dist/useCases/rotateApiKey.js.map +1 -0
- package/dist/useCases/{updateIntegration.d.ts → updateOrganizationFeatures.d.ts} +6 -6
- package/dist/useCases/{updateAnnouncement.js → updateOrganizationFeatures.js} +8 -8
- package/dist/useCases/updateOrganizationFeatures.js.map +1 -0
- package/dist/useCases/{updatePropertySettings.d.ts → updatePropertyFeatures.d.ts} +6 -6
- package/dist/useCases/{updatePropertySettings.js → updatePropertyFeatures.js} +8 -8
- package/dist/useCases/{updatePropertySettings.js.map → updatePropertyFeatures.js.map} +1 -1
- package/dist/validate.d.ts +160 -160
- package/package.json +26 -18
- package/dist/useCases/createAnnouncement.d.ts +0 -29
- package/dist/useCases/createAnnouncement.js +0 -50
- package/dist/useCases/createAnnouncement.js.map +0 -1
- package/dist/useCases/createIntegration.d.ts +0 -29
- package/dist/useCases/createIntegration.js +0 -50
- package/dist/useCases/createIntegration.js.map +0 -1
- package/dist/useCases/deleteAnnouncement.js.map +0 -1
- package/dist/useCases/describeAnnouncement.d.ts +0 -38
- package/dist/useCases/describeAnnouncement.js +0 -50
- package/dist/useCases/describeAnnouncement.js.map +0 -1
- package/dist/useCases/describeIntegration.js +0 -50
- package/dist/useCases/describeIntegration.js.map +0 -1
- package/dist/useCases/listAnnouncements.d.ts +0 -29
- package/dist/useCases/listAnnouncements.js.map +0 -1
- package/dist/useCases/sendSMS.d.ts +0 -29
- package/dist/useCases/sendSMS.js.map +0 -1
- package/dist/useCases/updateAnnouncement.js.map +0 -1
- package/dist/useCases/updateIntegration.js.map +0 -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 \"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 parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\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 \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"nudged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description: \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n text: {\n type: \"string\",\n description: \"The mention text.\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n autoCloseAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAIO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAA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A,IACF;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU,CAAC,iBAAiB,MAAM;AAAA,MAClC,sBAAsB;AAAA,MACtB,YAAY;AAAA,QACV,IAAI;AAAA,UACF,MAAM;AAAA,QACR;AAAA,QACA,eAAe;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,SAAS,YAAY,YAAY;AAAA,QAC1C;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM,CAAC,QAAQ,WAAW,UAAU,QAAQ;AAAA,MAC5C,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,MAAM,CAAC,OAAO,UAAU,QAAQ,UAAU;AAAA,MAC1C,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,OAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
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 propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\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 parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\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 \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"nudged\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description: \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\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 priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\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 lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type TicketSchema = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAIO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CA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AA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM,CAAC,QAAQ,WAAW,UAAU,QAAQ;AAAA,MAC5C,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,MAAM,CAAC,OAAO,UAAU,QAAQ,UAAU;AAAA,MAC1C,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,aACE;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,OAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -11,6 +11,10 @@ declare const timeSheetSchema: {
|
|
|
11
11
|
readonly id: {
|
|
12
12
|
readonly $ref: "definitions.json#/definitions/id";
|
|
13
13
|
};
|
|
14
|
+
readonly propertyId: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.";
|
|
17
|
+
};
|
|
14
18
|
readonly type: {
|
|
15
19
|
readonly type: "string";
|
|
16
20
|
readonly default: "timeSheet";
|
|
@@ -8,6 +8,10 @@ const timeSheetSchema = {
|
|
|
8
8
|
id: {
|
|
9
9
|
$ref: "definitions.json#/definitions/id"
|
|
10
10
|
},
|
|
11
|
+
propertyId: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "ID of the property this entity belongs to. Optional \u2014 used as a per-document filter inside the org-scoped database."
|
|
14
|
+
},
|
|
11
15
|
type: {
|
|
12
16
|
type: "string",
|
|
13
17
|
default: "timeSheet",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../.generated/schemas/timeSheet.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const timeSheetSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"timeSheet.json\",\n title: \"Time Sheet\",\n type: \"object\",\n required: [\"id\", \"type\", \"userId\", \"day\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"timeSheet\",\n enum: [\"timeSheet\"],\n },\n userId: {\n $ref: \"definitions.json#/definitions/id\",\n },\n day: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n locked: {\n type: \"boolean\",\n default: false,\n description: \"If true, the time sheet is locked and cannot be modified\",\n },\n timeEntries: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"working\", \"driving\", \"meeting\", \"break\"],\n },\n start: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n end: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n comment: {\n type: \"string\",\n },\n ticketId: {\n type: \"string\",\n },\n },\n required: [\"start\", \"discriminator\"],\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 TimeSheetSchema = FromSchema<\n typeof timeSheetSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAGO,MAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,UAAU,KAAK;AAAA,EACxC,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,WAAW;AAAA,IACpB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,IACf;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,eAAe;AAAA,YACb,MAAM;AAAA,YACN,MAAM,CAAC,WAAW,WAAW,WAAW,OAAO;AAAA,UACjD;AAAA,UACA,OAAO;AAAA,YACL,MAAM,CAAC,UAAU,QAAQ;AAAA,YACzB,QAAQ;AAAA,UACV;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,QAAQ;AAAA,YACzB,QAAQ;AAAA,UACV;AAAA,UACA,SAAS;AAAA,YACP,MAAM;AAAA,UACR;AAAA,UACA,UAAU;AAAA,YACR,MAAM;AAAA,UACR;AAAA,QACF;AAAA,QACA,UAAU,CAAC,SAAS,eAAe;AAAA,QACnC,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../.generated/schemas/timeSheet.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const timeSheetSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"timeSheet.json\",\n title: \"Time Sheet\",\n type: \"object\",\n required: [\"id\", \"type\", \"userId\", \"day\"],\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n default: \"timeSheet\",\n enum: [\"timeSheet\"],\n },\n userId: {\n $ref: \"definitions.json#/definitions/id\",\n },\n day: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n locked: {\n type: \"boolean\",\n default: false,\n description: \"If true, the time sheet is locked and cannot be modified\",\n },\n timeEntries: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"working\", \"driving\", \"meeting\", \"break\"],\n },\n start: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n end: {\n type: [\"string\", \"object\"],\n format: \"date-time\",\n },\n comment: {\n type: \"string\",\n },\n ticketId: {\n type: \"string\",\n },\n },\n required: [\"start\", \"discriminator\"],\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 TimeSheetSchema = FromSchema<\n typeof timeSheetSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAGO,MAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,UAAU,KAAK;AAAA,EACxC,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,WAAW;AAAA,IACpB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM,CAAC,UAAU,QAAQ;AAAA,MACzB,QAAQ;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,IACf;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS,CAAC;AAAA,MACV,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,IAAI;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA,eAAe;AAAA,YACb,MAAM;AAAA,YACN,MAAM,CAAC,WAAW,WAAW,WAAW,OAAO;AAAA,UACjD;AAAA,UACA,OAAO;AAAA,YACL,MAAM,CAAC,UAAU,QAAQ;AAAA,YACzB,QAAQ;AAAA,UACV;AAAA,UACA,KAAK;AAAA,YACH,MAAM,CAAC,UAAU,QAAQ;AAAA,YACzB,QAAQ;AAAA,UACV;AAAA,UACA,SAAS;AAAA,YACP,MAAM;AAAA,UACR;AAAA,UACA,UAAU;AAAA,YACR,MAAM;AAAA,UACR;AAAA,QACF;AAAA,QACA,UAAU,CAAC,SAAS,eAAe;AAAA,QACnC,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
package/dist/schemas/user.d.ts
CHANGED
package/dist/schemas/user.js
CHANGED
package/dist/schemas/user.js.map
CHANGED
|
@@ -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 \"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 systems: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n properties: {\n systemId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n },\n required: [\"systemId\", \"propertyId\", \"driver\"],\n additionalProperties: false,\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type UserSchema = FromSchema<\n typeof userSchema,\n {\n references: [typeof defs, typeof mediaFileSchema, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\nexport const getters = {\n fullName() {\n return `${this.firstName} ${this.lastName}`;\n },\n roles() {\n const roles = new Set();\n if (this.permissions) {\n for (const permission of this.permissions) {\n roles.add(permission.role);\n }\n }\n return Array.from(roles);\n },\n isSuperAdmin() {\n return this.roles.includes(\"SuperAdmin\");\n },\n isAdmin() {\n return this.roles.includes(\"Admin\") || this.roles.includes(\"Administrator\");\n },\n isManager() {\n return this.roles.includes(\"Manager\");\n },\n isUser() {\n return this.roles.includes(\"User\");\n },\n};\n"],"mappings":"AAKO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,aAAa,UAAU;AAAA,EACxC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAA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/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 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 \"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 systems: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n properties: {\n systemId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n driver: {\n type: \"string\",\n },\n },\n required: [\"systemId\", \"propertyId\", \"driver\"],\n additionalProperties: false,\n },\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\nexport type UserSchema = FromSchema<\n typeof userSchema,\n {\n references: [typeof defs, typeof mediaFileSchema, typeof policySchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\nexport const getters = {\n fullName() {\n return `${this.firstName} ${this.lastName}`;\n },\n roles() {\n const roles = new Set();\n if (this.permissions) {\n for (const permission of this.permissions) {\n roles.add(permission.role);\n }\n }\n return Array.from(roles);\n },\n isSuperAdmin() {\n return this.roles.includes(\"SuperAdmin\");\n },\n isAdmin() {\n return this.roles.includes(\"Admin\") || this.roles.includes(\"Administrator\");\n },\n isManager() {\n return this.roles.includes(\"Manager\");\n },\n isUser() {\n return this.roles.includes(\"User\");\n },\n};\n"],"mappings":"AAKO,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,aAAa,UAAU;AAAA,EACxC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACV;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MAC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AA,MACxB;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAiBO,MAAM,UAAU;AAAA,EACrB,WAAW;AACT,WAAO,GAAG,KAAK,SAAS,IAAI,KAAK,QAAQ;AAAA,EAC3C;AAAA,EACA,QAAQ;AACN,UAAM,QAAQ,oBAAI,IAAI;AACtB,QAAI,KAAK,aAAa;AACpB,iBAAW,cAAc,KAAK,aAAa;AACzC,cAAM,IAAI,WAAW,IAAI;AAAA,MAC3B;AAAA,IACF;AACA,WAAO,MAAM,KAAK,KAAK;AAAA,EACzB;AAAA,EACA,eAAe;AACb,WAAO,KAAK,MAAM,SAAS,YAAY;AAAA,EACzC;AAAA,EACA,UAAU;AACR,WAAO,KAAK,MAAM,SAAS,OAAO,KAAK,KAAK,MAAM,SAAS,eAAe;AAAA,EAC5E;AAAA,EACA,YAAY;AACV,WAAO,KAAK,MAAM,SAAS,SAAS;AAAA,EACtC;AAAA,EACA,SAAS;AACP,WAAO,KAAK,MAAM,SAAS,MAAM;AAAA,EACnC;AACF;","names":[]}
|
package/dist/schemas/vendor.d.ts
CHANGED
|
@@ -29,12 +29,24 @@ declare const vendorSchema: {
|
|
|
29
29
|
readonly type: readonly ["string", "null"];
|
|
30
30
|
readonly format: "email";
|
|
31
31
|
};
|
|
32
|
+
readonly notes: {
|
|
33
|
+
readonly type: readonly ["string", "null"];
|
|
34
|
+
readonly maxLength: 1000;
|
|
35
|
+
};
|
|
32
36
|
readonly address: {
|
|
33
37
|
readonly $ref: "definitions.json#/definitions/address";
|
|
34
38
|
};
|
|
35
39
|
readonly photo: {
|
|
36
40
|
readonly $ref: "mediaFile.json#";
|
|
37
41
|
};
|
|
42
|
+
readonly properties: {
|
|
43
|
+
readonly type: "array";
|
|
44
|
+
readonly description: "List of propertyIds where this vendor is enabled. Vendors are org-scoped; this controls per-property availability for assignment/listing.";
|
|
45
|
+
readonly default: readonly [];
|
|
46
|
+
readonly items: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
38
50
|
readonly createdAt: {
|
|
39
51
|
readonly $ref: "definitions.json#/definitions/date";
|
|
40
52
|
};
|
package/dist/schemas/vendor.js
CHANGED
|
@@ -25,12 +25,24 @@ const vendorSchema = {
|
|
|
25
25
|
type: ["string", "null"],
|
|
26
26
|
format: "email"
|
|
27
27
|
},
|
|
28
|
+
notes: {
|
|
29
|
+
type: ["string", "null"],
|
|
30
|
+
maxLength: 1e3
|
|
31
|
+
},
|
|
28
32
|
address: {
|
|
29
33
|
$ref: "definitions.json#/definitions/address"
|
|
30
34
|
},
|
|
31
35
|
photo: {
|
|
32
36
|
$ref: "mediaFile.json#"
|
|
33
37
|
},
|
|
38
|
+
properties: {
|
|
39
|
+
type: "array",
|
|
40
|
+
description: "List of propertyIds where this vendor is enabled. Vendors are org-scoped; this controls per-property availability for assignment/listing.",
|
|
41
|
+
default: [],
|
|
42
|
+
items: {
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
34
46
|
createdAt: {
|
|
35
47
|
$ref: "definitions.json#/definitions/date"
|
|
36
48
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../.generated/schemas/vendor.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport { mediaFileSchema } from \"./mediaFile\";\n\nexport const vendorSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"vendor.json\",\n title: \"Vendor\",\n type: \"object\",\n required: [\"id\", \"name\", \"email\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"vendor\",\n enum: [\"vendor\"],\n },\n name: {\n type: \"string\",\n },\n phone: {\n type: [\"string\", \"null\"],\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n email: {\n type: [\"string\", \"null\"],\n format: \"email\",\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n photo: {\n $ref: \"mediaFile.json#\",\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 VendorSchema = FromSchema<\n typeof vendorSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAIO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,OAAO;AAAA,EAChC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,QAAQ;AAAA,IACjB;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,QAAQ;AAAA,IACV;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../.generated/schemas/vendor.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport { mediaFileSchema } from \"./mediaFile\";\n\nexport const vendorSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"vendor.json\",\n title: \"Vendor\",\n type: \"object\",\n required: [\"id\", \"name\", \"email\"],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n type: {\n type: \"string\",\n default: \"vendor\",\n enum: [\"vendor\"],\n },\n name: {\n type: \"string\",\n },\n phone: {\n type: [\"string\", \"null\"],\n pattern: \"^\\\\+[0-9]{1,14}$\",\n },\n email: {\n type: [\"string\", \"null\"],\n format: \"email\",\n },\n notes: {\n type: [\"string\", \"null\"],\n maxLength: 1000,\n },\n address: {\n $ref: \"definitions.json#/definitions/address\",\n },\n photo: {\n $ref: \"mediaFile.json#\",\n },\n properties: {\n type: \"array\",\n description:\n \"List of propertyIds where this vendor is enabled. Vendors are org-scoped; this controls per-property availability for assignment/listing.\",\n default: [],\n items: {\n type: \"string\",\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 VendorSchema = FromSchema<\n typeof vendorSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAIO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU,CAAC,MAAM,QAAQ,OAAO;AAAA,EAChC,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,CAAC,QAAQ;AAAA,IACjB;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,QAAQ;AAAA,IACV;AAAA,IACA,OAAO;AAAA,MACL,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aACE;AAAA,MACF,SAAS,CAAC;AAAA,MACV,OAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -13,6 +13,10 @@ declare const windowCoveringSchema: {
|
|
|
13
13
|
readonly id: {
|
|
14
14
|
readonly $ref: "definitions.json#/definitions/id";
|
|
15
15
|
};
|
|
16
|
+
readonly propertyId: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly description: "ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.";
|
|
19
|
+
};
|
|
16
20
|
readonly name: {
|
|
17
21
|
readonly type: "string";
|
|
18
22
|
};
|
|
@@ -10,6 +10,10 @@ const windowCoveringSchema = {
|
|
|
10
10
|
id: {
|
|
11
11
|
$ref: "definitions.json#/definitions/id"
|
|
12
12
|
},
|
|
13
|
+
propertyId: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "ID of the property this entity belongs to. Optional \u2014 used as a per-document filter inside the org-scoped database."
|
|
16
|
+
},
|
|
13
17
|
name: {
|
|
14
18
|
type: "string"
|
|
15
19
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../.generated/schemas/windowCovering.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const windowCoveringSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"windowCovering.json\",\n title: \"Window Covering\",\n description: \"Any smart window covering\",\n required: [\"id\", \"type\", \"position\", \"driver\"],\n additionalProperties: false,\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\"windowCovering\"],\n default: \"windowCovering\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"basic\", \"variable\"],\n default: \"variable\",\n },\n supportedNotifications: {\n $ref: \"definitions.json#/definitions/supportedNotifications\",\n },\n alerts: {\n $ref: \"definitions.json#/definitions/alerts\"\n },\n notification: {\n $ref: \"definitions.json#/definitions/notification\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n },\n offline: {\n type: \"boolean\",\n },\n position: {\n type: [\"number\", \"null\"],\n minimum: 0,\n maximum: 100,\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n watts: {\n $ref: \"definitions.json#/definitions/watts\",\n },\n icon: {\n type: \"string\",\n },\n manufacturer: {\n type: \"string\",\n },\n modelNumber: {\n type: \"string\",\n },\n serialNumber: {\n type: \"string\",\n },\n firmwareVersion: {\n type: \"string\",\n },\n },\n} as const;\n\nexport type WindowCoveringSchema = FromSchema<\n typeof windowCoveringSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAGO,MAAM,uBAAuB;AAAA,EAClC,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU,CAAC,MAAM,QAAQ,YAAY,QAAQ;AAAA,EAC7C,sBAAsB;AAAA,EACtB,MAAM;AAAA,EACN,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,gBAAgB;AAAA,MACvB,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,MAAM,CAAC,SAAS,UAAU;AAAA,MAC1B,SAAS;AAAA,IACX;AAAA,IACA,wBAAwB;AAAA,MACtB,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../.generated/schemas/windowCovering.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const windowCoveringSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"windowCovering.json\",\n title: \"Window Covering\",\n description: \"Any smart window covering\",\n required: [\"id\", \"type\", \"position\", \"driver\"],\n additionalProperties: false,\n type: \"object\",\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description: \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\"windowCovering\"],\n default: \"windowCovering\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"basic\", \"variable\"],\n default: \"variable\",\n },\n supportedNotifications: {\n $ref: \"definitions.json#/definitions/supportedNotifications\",\n },\n alerts: {\n $ref: \"definitions.json#/definitions/alerts\"\n },\n notification: {\n $ref: \"definitions.json#/definitions/notification\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n },\n offline: {\n type: \"boolean\",\n },\n position: {\n type: [\"number\", \"null\"],\n minimum: 0,\n maximum: 100,\n },\n systemId: {\n $ref: \"definitions.json#/definitions/systemId\",\n },\n watts: {\n $ref: \"definitions.json#/definitions/watts\",\n },\n icon: {\n type: \"string\",\n },\n manufacturer: {\n type: \"string\",\n },\n modelNumber: {\n type: \"string\",\n },\n serialNumber: {\n type: \"string\",\n },\n firmwareVersion: {\n type: \"string\",\n },\n },\n} as const;\n\nexport type WindowCoveringSchema = FromSchema<\n typeof windowCoveringSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAGO,MAAM,uBAAuB;AAAA,EAClC,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU,CAAC,MAAM,QAAQ,YAAY,QAAQ;AAAA,EAC7C,sBAAsB;AAAA,EACtB,MAAM;AAAA,EACN,YAAY;AAAA,IACV,IAAI;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,MAAM,CAAC,gBAAgB;AAAA,MACvB,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,MAAM,CAAC,SAAS,UAAU;AAAA,MAC1B,SAAS;AAAA,IACX;AAAA,IACA,wBAAwB;AAAA,MACtB,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM,CAAC,UAAU,MAAM;AAAA,MACvB,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,IACA,iBAAiB;AAAA,MACf,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface CreateApiKeyCommandConfig {
|
|
2
|
+
data?: {
|
|
3
|
+
userId: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
} | null;
|
|
6
|
+
headers?: Record<string, string> | null;
|
|
7
|
+
query?: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
interface CreateApiKeyCommandRequestConfig {
|
|
10
|
+
method: "post";
|
|
11
|
+
url: string;
|
|
12
|
+
data: {
|
|
13
|
+
userId: 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 CreateApiKeyCommand {
|
|
24
|
+
url: string;
|
|
25
|
+
data: {
|
|
26
|
+
userId: string;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
} | null;
|
|
29
|
+
query: Record<string, unknown> | null;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
31
|
+
config: CreateApiKeyCommandRequestConfig;
|
|
32
|
+
static params: readonly ["userId"];
|
|
33
|
+
static url: string;
|
|
34
|
+
static method: "post";
|
|
35
|
+
constructor(commandConfig: CreateApiKeyCommandConfig, options?: Record<string, unknown>);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { CreateApiKeyCommand, type CreateApiKeyCommandConfig, type CreateApiKeyCommandRequestConfig };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
class
|
|
3
|
+
class CreateApiKeyCommand {
|
|
4
4
|
static {
|
|
5
|
-
__name(this, "
|
|
5
|
+
__name(this, "CreateApiKeyCommand");
|
|
6
6
|
}
|
|
7
7
|
url;
|
|
8
8
|
data;
|
|
9
9
|
query;
|
|
10
10
|
headers;
|
|
11
11
|
config;
|
|
12
|
-
static params = [];
|
|
13
|
-
static url = "/
|
|
12
|
+
static params = ["userId"];
|
|
13
|
+
static url = "/users/:userId/apiKey";
|
|
14
14
|
static method = "post";
|
|
15
15
|
constructor(commandConfig, options = {}) {
|
|
16
|
-
const pathParams =
|
|
16
|
+
const pathParams = CreateApiKeyCommand.params;
|
|
17
17
|
let { data, query, headers } = commandConfig ?? {};
|
|
18
18
|
if (typeof data === "undefined") data = null;
|
|
19
19
|
if (typeof query === "undefined") query = null;
|
|
20
20
|
if (typeof headers === "undefined") headers = null;
|
|
21
|
-
let url =
|
|
21
|
+
let url = CreateApiKeyCommand.url;
|
|
22
22
|
if (pathParams && data) {
|
|
23
23
|
for (const param of pathParams) {
|
|
24
24
|
const urlParam = ":" + param;
|
|
@@ -35,7 +35,7 @@ class SendSMSCommand {
|
|
|
35
35
|
this.query = query;
|
|
36
36
|
this.headers = headers;
|
|
37
37
|
this.config = {
|
|
38
|
-
method:
|
|
38
|
+
method: CreateApiKeyCommand.method,
|
|
39
39
|
url,
|
|
40
40
|
data,
|
|
41
41
|
params: query,
|
|
@@ -45,6 +45,6 @@ class SendSMSCommand {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
CreateApiKeyCommand
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=createApiKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../.generated/useCases/createApiKey.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface CreateApiKeyCommandConfig {\n data?: { userId: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface CreateApiKeyCommandRequestConfig {\n method: \"post\";\n url: string;\n data: { userId: 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 CreateApiKeyCommand {\n url: string;\n data: { userId: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: CreateApiKeyCommandRequestConfig;\n\n static params = [\"userId\"] as const;\n static url = \"/users/:userId/apiKey\";\n static method = \"post\" as const;\n\n constructor(\n commandConfig: CreateApiKeyCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = CreateApiKeyCommand.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 = CreateApiKeyCommand.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: CreateApiKeyCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;AAoBO,MAAM,oBAAoB;AAAA,EApBjC,OAoBiC;AAAA;AAAA;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC,QAAQ;AAAA,EACzB,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":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface GetApiKeyCommandConfig {
|
|
2
2
|
data?: {
|
|
3
|
-
|
|
3
|
+
userId: string;
|
|
4
4
|
[key: string]: unknown;
|
|
5
5
|
} | null;
|
|
6
6
|
headers?: Record<string, string> | null;
|
|
7
7
|
query?: Record<string, unknown> | null;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
9
|
+
interface GetApiKeyCommandRequestConfig {
|
|
10
10
|
method: "get";
|
|
11
11
|
url: string;
|
|
12
12
|
data: {
|
|
13
|
-
|
|
13
|
+
userId: string;
|
|
14
14
|
[key: string]: unknown;
|
|
15
15
|
} | null;
|
|
16
16
|
params: Record<string, unknown> | null;
|
|
@@ -20,19 +20,19 @@ interface DescribeIntegrationCommandRequestConfig {
|
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
declare class
|
|
23
|
+
declare class GetApiKeyCommand {
|
|
24
24
|
url: string;
|
|
25
25
|
data: {
|
|
26
|
-
|
|
26
|
+
userId: string;
|
|
27
27
|
[key: string]: unknown;
|
|
28
28
|
} | null;
|
|
29
29
|
query: Record<string, unknown> | null;
|
|
30
30
|
headers: Record<string, string> | null;
|
|
31
|
-
config:
|
|
32
|
-
static params: readonly ["
|
|
31
|
+
config: GetApiKeyCommandRequestConfig;
|
|
32
|
+
static params: readonly ["userId"];
|
|
33
33
|
static url: string;
|
|
34
34
|
static method: "get";
|
|
35
|
-
constructor(commandConfig:
|
|
35
|
+
constructor(commandConfig: GetApiKeyCommandConfig, options?: Record<string, unknown>);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export {
|
|
38
|
+
export { GetApiKeyCommand, type GetApiKeyCommandConfig, type GetApiKeyCommandRequestConfig };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
class
|
|
3
|
+
class GetApiKeyCommand {
|
|
4
4
|
static {
|
|
5
|
-
__name(this, "
|
|
5
|
+
__name(this, "GetApiKeyCommand");
|
|
6
6
|
}
|
|
7
7
|
url;
|
|
8
8
|
data;
|
|
9
9
|
query;
|
|
10
10
|
headers;
|
|
11
11
|
config;
|
|
12
|
-
static params = [];
|
|
13
|
-
static url = "/
|
|
12
|
+
static params = ["userId"];
|
|
13
|
+
static url = "/users/:userId/apiKey";
|
|
14
14
|
static method = "get";
|
|
15
15
|
constructor(commandConfig, options = {}) {
|
|
16
|
-
const pathParams =
|
|
16
|
+
const pathParams = GetApiKeyCommand.params;
|
|
17
17
|
let { data, query, headers } = commandConfig ?? {};
|
|
18
18
|
if (typeof data === "undefined") data = null;
|
|
19
19
|
if (typeof query === "undefined") query = null;
|
|
20
20
|
if (typeof headers === "undefined") headers = null;
|
|
21
|
-
let url =
|
|
21
|
+
let url = GetApiKeyCommand.url;
|
|
22
22
|
if (pathParams && data) {
|
|
23
23
|
for (const param of pathParams) {
|
|
24
24
|
const urlParam = ":" + param;
|
|
@@ -35,7 +35,7 @@ class ListAnnouncementsCommand {
|
|
|
35
35
|
this.query = query;
|
|
36
36
|
this.headers = headers;
|
|
37
37
|
this.config = {
|
|
38
|
-
method:
|
|
38
|
+
method: GetApiKeyCommand.method,
|
|
39
39
|
url,
|
|
40
40
|
data,
|
|
41
41
|
params: query,
|
|
@@ -45,6 +45,6 @@ class ListAnnouncementsCommand {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
GetApiKeyCommand
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=getApiKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../.generated/useCases/getApiKey.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface GetApiKeyCommandConfig {\n data?: { userId: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface GetApiKeyCommandRequestConfig {\n method: \"get\";\n url: string;\n data: { userId: 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 GetApiKeyCommand {\n url: string;\n data: { userId: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: GetApiKeyCommandRequestConfig;\n\n static params = [\"userId\"] as const;\n static url = \"/users/:userId/apiKey\";\n static method = \"get\" as const;\n\n constructor(\n commandConfig: GetApiKeyCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = GetApiKeyCommand.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 = GetApiKeyCommand.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: GetApiKeyCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;AAoBO,MAAM,iBAAiB;AAAA,EApB9B,OAoB8B;AAAA;AAAA;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC,QAAQ;AAAA,EACzB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,iBAAiB;AAEpC,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,iBAAiB;AAEnC,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,iBAAiB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
package/dist/useCases/index.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export { ListUsersCommand } from './listUsers.js';
|
|
|
11
11
|
export { UpdateSelfCommand } from './updateSelf.js';
|
|
12
12
|
export { UpdateUserCommand } from './updateUser.js';
|
|
13
13
|
export { DeleteUserCommand } from './deleteUser.js';
|
|
14
|
+
export { CreateApiKeyCommand } from './createApiKey.js';
|
|
15
|
+
export { GetApiKeyCommand } from './getApiKey.js';
|
|
16
|
+
export { RotateApiKeyCommand } from './rotateApiKey.js';
|
|
17
|
+
export { RevokeApiKeyCommand } from './revokeApiKey.js';
|
|
14
18
|
export { SendVerificationCodeCommand } from './sendVerificationCode.js';
|
|
15
19
|
export { CheckVerificationCodeCommand } from './checkVerificationCode.js';
|
|
16
20
|
export { ListUserSpacesCommand } from './listUserSpaces.js';
|
|
@@ -72,12 +76,10 @@ export { DescribeDiscoveredDeviceCommand } from './describeDiscoveredDevice.js';
|
|
|
72
76
|
export { UpsertDiscoveredDeviceCommand } from './upsertDiscoveredDevice.js';
|
|
73
77
|
export { CreateDiscoveredDeviceAssociationCommand } from './createDiscoveredDeviceAssociation.js';
|
|
74
78
|
export { ListIntegrationsCommand } from './listIntegrations.js';
|
|
75
|
-
export { DescribeIntegrationCommand } from './describeIntegration.js';
|
|
76
|
-
export { CreateIntegrationCommand } from './createIntegration.js';
|
|
77
|
-
export { UpdateIntegrationCommand } from './updateIntegration.js';
|
|
78
79
|
export { DescribeMyOrganizationCommand } from './describeMyOrganization.js';
|
|
79
80
|
export { CreateOrganizationCommand } from './createOrganization.js';
|
|
80
81
|
export { UpdateOrganizationCommand } from './updateOrganization.js';
|
|
82
|
+
export { UpdateOrganizationFeaturesCommand } from './updateOrganizationFeatures.js';
|
|
81
83
|
export { DeleteOrganizationCommand } from './deleteOrganization.js';
|
|
82
84
|
export { DescribeOrganizationCommand } from './describeOrganization.js';
|
|
83
85
|
export { ListOrganizationsCommand } from './listOrganizations.js';
|
|
@@ -88,16 +90,11 @@ export { CreatePropertyCommand } from './createProperty.js';
|
|
|
88
90
|
export { DeletePropertyCommand } from './deleteProperty.js';
|
|
89
91
|
export { UpdatePropertyCommand } from './updateProperty.js';
|
|
90
92
|
export { DescribePropertyCommand } from './describeProperty.js';
|
|
91
|
-
export {
|
|
93
|
+
export { UpdatePropertyFeaturesCommand } from './updatePropertyFeatures.js';
|
|
92
94
|
export { EmailUserAccountSetupCommand } from './emailUserAccountSetup.js';
|
|
93
95
|
export { CreateImageUploadEndpointCommand } from './createImageUploadEndpoint.js';
|
|
94
96
|
export { DeleteMediaFileCommand } from './deleteMediaFile.js';
|
|
95
97
|
export { UploadImageCommand } from './uploadImage.js';
|
|
96
|
-
export { CreateAnnouncementCommand } from './createAnnouncement.js';
|
|
97
|
-
export { UpdateAnnouncementCommand } from './updateAnnouncement.js';
|
|
98
|
-
export { DescribeAnnouncementCommand } from './describeAnnouncement.js';
|
|
99
|
-
export { DeleteAnnouncementCommand } from './deleteAnnouncement.js';
|
|
100
|
-
export { ListAnnouncementsCommand } from './listAnnouncements.js';
|
|
101
98
|
export { DescribeTimeSheetStatsCommand } from './describeTimeSheetStats.js';
|
|
102
99
|
export { ListMyTimeSheetsCommand } from './listMyTimeSheets.js';
|
|
103
100
|
export { DescribeTimeSheetCommand } from './describeTimeSheet.js';
|
|
@@ -130,7 +127,6 @@ export { DeleteAutomationCommand } from './deleteAutomation.js';
|
|
|
130
127
|
export { CreateDefaultAutomationsCommand } from './createDefaultAutomations.js';
|
|
131
128
|
export { RunAutomationCommand } from './runAutomation.js';
|
|
132
129
|
export { SendNotificationCommand } from './sendNotification.js';
|
|
133
|
-
export { SendSMSCommand } from './sendSMS.js';
|
|
134
130
|
export { ListSessionsCommand } from './listSessions.js';
|
|
135
131
|
export { DescribeSessionCommand } from './describeSession.js';
|
|
136
132
|
export { DeleteSessionCommand } from './deleteSession.js';
|