@kohost/api-client 3.9.12 → 4.0.5
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/appError-v8-O4juF.d.cts +7 -0
- package/dist/appError-v8-O4juF.d.ts +7 -0
- package/dist/chunk-5I2BBUZP.js +36 -0
- package/dist/chunk-5I2BBUZP.js.map +1 -0
- package/dist/chunk-FU4IK6I4.js +17 -0
- package/dist/chunk-FU4IK6I4.js.map +1 -0
- package/dist/{cjs/defs/amqpExchanges.js → chunk-KNSZIQXT.js} +32 -14
- package/dist/chunk-KNSZIQXT.js.map +1 -0
- package/dist/chunk-SHLRCTB4.js +506 -0
- package/dist/chunk-SHLRCTB4.js.map +1 -0
- package/dist/chunk-SLDNFNED.js +36559 -0
- package/dist/chunk-SLDNFNED.js.map +1 -0
- package/dist/chunk-SORMAXAX.js +150 -0
- package/dist/chunk-SORMAXAX.js.map +1 -0
- package/dist/chunk-UZQ2AWUY.js +74 -0
- package/dist/chunk-UZQ2AWUY.js.map +1 -0
- package/dist/client.cjs +320 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +81 -0
- package/dist/client.d.ts +81 -0
- package/dist/client.js +238 -0
- package/dist/client.js.map +1 -0
- package/dist/commands.cjs +528 -0
- package/dist/commands.cjs.map +1 -0
- package/dist/commands.d.cts +268 -0
- package/dist/commands.d.ts +268 -0
- package/dist/commands.js +466 -0
- package/dist/commands.js.map +1 -0
- package/dist/defs.cjs +83 -0
- package/dist/defs.cjs.map +1 -0
- package/dist/defs.d.cts +62 -0
- package/dist/defs.d.ts +62 -0
- package/dist/defs.js +10 -0
- package/dist/defs.js.map +1 -0
- package/dist/errors.cjs +194 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +47 -0
- package/dist/errors.d.ts +47 -0
- package/dist/errors.js +32 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.cjs +530 -0
- package/dist/events.cjs.map +1 -0
- package/dist/events.d.cts +230 -0
- package/dist/events.d.ts +230 -0
- package/dist/events.js +67 -0
- package/dist/events.js.map +1 -0
- package/dist/index.cjs +52710 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +30955 -0
- package/dist/index.d.ts +30955 -0
- package/dist/index.js +52672 -0
- package/dist/index.js.map +1 -0
- package/dist/models.cjs +36603 -0
- package/dist/models.cjs.map +1 -0
- package/dist/models.d.cts +88 -0
- package/dist/models.d.ts +88 -0
- package/dist/models.js +89 -0
- package/dist/models.js.map +1 -0
- package/dist/socketIoClient.cjs +121 -0
- package/dist/socketIoClient.cjs.map +1 -0
- package/dist/socketIoClient.d.cts +43 -0
- package/dist/socketIoClient.d.ts +43 -0
- package/dist/{cjs/SocketIoClient/index.js → socketIoClient.js} +38 -31
- package/dist/socketIoClient.js.map +1 -0
- package/dist/useCases.cjs +14296 -0
- package/dist/useCases.cjs.map +1 -0
- package/dist/useCases.d.cts +21004 -0
- package/dist/useCases.d.ts +21004 -0
- package/dist/useCases.js +14214 -0
- package/dist/useCases.js.map +1 -0
- package/dist/utils.cjs +37330 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +9 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +195 -0
- package/dist/utils.js.map +1 -0
- package/dist/windowCovering-C3dsx-cW.d.cts +8328 -0
- package/dist/windowCovering-C3dsx-cW.d.ts +8328 -0
- package/package.json +67 -17
- package/dist/cjs/AMQPClient/index.js +0 -239
- package/dist/cjs/Client/index.js +0 -7831
- package/dist/cjs/Commands/CheckInReservation.js +0 -15
- package/dist/cjs/Commands/CheckOutReservation.js +0 -16
- package/dist/cjs/Commands/Command.js +0 -32
- package/dist/cjs/Commands/CreateImageUploadEndpoint.js +0 -13
- package/dist/cjs/Commands/CreateShortLink.js +0 -16
- package/dist/cjs/Commands/GetCategories.js +0 -13
- package/dist/cjs/Commands/GetMobileKey.js +0 -20
- package/dist/cjs/Commands/GetProducts.js +0 -13
- package/dist/cjs/Commands/GetReservationSpaceCategoryAvailabilities.js +0 -16
- package/dist/cjs/Commands/GetReservations.js +0 -16
- package/dist/cjs/Commands/GetRooms.js +0 -31
- package/dist/cjs/Commands/GetUsers.js +0 -13
- package/dist/cjs/Commands/OCRDocument.js +0 -15
- package/dist/cjs/Commands/SellProducts.js +0 -13
- package/dist/cjs/Commands/SendEmail.js +0 -20
- package/dist/cjs/Commands/SendSMS.js +0 -18
- package/dist/cjs/Commands/SetAlarm.js +0 -13
- package/dist/cjs/Commands/SetCourtesy.js +0 -13
- package/dist/cjs/Commands/SetDimmer.js +0 -13
- package/dist/cjs/Commands/SetLock.js +0 -13
- package/dist/cjs/Commands/SetMedia.js +0 -13
- package/dist/cjs/Commands/SetScene.js +0 -13
- package/dist/cjs/Commands/SetSwitch.js +0 -13
- package/dist/cjs/Commands/SetThermostat.js +0 -13
- package/dist/cjs/Commands/SetWindowCovering.js +0 -13
- package/dist/cjs/Commands/UpdateReservation.js +0 -15
- package/dist/cjs/Commands/UpdateUser.js +0 -37
- package/dist/cjs/Commands/UploadImage.js +0 -13
- package/dist/cjs/Commands/index.js +0 -59
- package/dist/cjs/Errors/AppError.js +0 -9
- package/dist/cjs/Errors/AuthenticationError.js +0 -10
- package/dist/cjs/Errors/AuthorizationError.js +0 -10
- package/dist/cjs/Errors/ConflictError.js +0 -10
- package/dist/cjs/Errors/DeviceCommError.js +0 -10
- package/dist/cjs/Errors/LoginError.js +0 -10
- package/dist/cjs/Errors/NotFoundError.js +0 -10
- package/dist/cjs/Errors/RequestError.js +0 -10
- package/dist/cjs/Errors/SystemCommError.js +0 -10
- package/dist/cjs/Errors/TokenExpiredError.js +0 -10
- package/dist/cjs/Errors/UnprocessableRequestError.js +0 -10
- package/dist/cjs/Errors/ValidationError.js +0 -10
- package/dist/cjs/Errors/index.js +0 -16
- package/dist/cjs/Events/ApplicationInUse.js +0 -22
- package/dist/cjs/Events/ApplicationOutOfUse.js +0 -22
- package/dist/cjs/Events/EmailEvent.js +0 -17
- package/dist/cjs/Events/Event.js +0 -44
- package/dist/cjs/Events/ReservationCheckedIn.js +0 -22
- package/dist/cjs/Events/ReservationCheckedOut.js +0 -22
- package/dist/cjs/Events/ReservationSpaceChanged.js +0 -22
- package/dist/cjs/Events/SMSEvent.js +0 -17
- package/dist/cjs/Events/SceneSet.js +0 -17
- package/dist/cjs/Events/ShortLinkCreated.js +0 -17
- package/dist/cjs/Events/SystemAlarmUpdated.js +0 -17
- package/dist/cjs/Events/SystemCameraUpdated.js +0 -17
- package/dist/cjs/Events/SystemCategoryUpdated.js +0 -17
- package/dist/cjs/Events/SystemCourtesyUpdated.js +0 -17
- package/dist/cjs/Events/SystemCredentialUpdated.js +0 -17
- package/dist/cjs/Events/SystemDimmerUpdated.js +0 -17
- package/dist/cjs/Events/SystemEntityDeleted.js +0 -17
- package/dist/cjs/Events/SystemGatewayUpdated.js +0 -17
- package/dist/cjs/Events/SystemLockUpdated.js +0 -17
- package/dist/cjs/Events/SystemMediaSourceUpdated.js +0 -17
- package/dist/cjs/Events/SystemMotionSensorUpdated.js +0 -17
- package/dist/cjs/Events/SystemOrganizationUpdated.js +0 -17
- package/dist/cjs/Events/SystemProductUpdated.js +0 -17
- package/dist/cjs/Events/SystemPropertyUpdated.js +0 -17
- package/dist/cjs/Events/SystemReservationUpdated.js +0 -17
- package/dist/cjs/Events/SystemSpaceUpdated.js +0 -17
- package/dist/cjs/Events/SystemSwitchUpdated.js +0 -17
- package/dist/cjs/Events/SystemThermostatUpdated.js +0 -17
- package/dist/cjs/Events/SystemUserUpdated.js +0 -17
- package/dist/cjs/Events/SystemWindowCoveringUpdated.js +0 -17
- package/dist/cjs/Events/index.js +0 -71
- package/dist/cjs/Models/Alarm.js +0 -35
- package/dist/cjs/Models/Announcement.js +0 -34
- package/dist/cjs/Models/Camera.js +0 -35
- package/dist/cjs/Models/Category.js +0 -36
- package/dist/cjs/Models/Courtesy.js +0 -39
- package/dist/cjs/Models/Credential.js +0 -35
- package/dist/cjs/Models/DeviceRouter.js +0 -36
- package/dist/cjs/Models/Dimmer.js +0 -61
- package/dist/cjs/Models/DiscoveredDevice.js +0 -36
- package/dist/cjs/Models/EmailMessage.js +0 -35
- package/dist/cjs/Models/EnergyReport.js +0 -35
- package/dist/cjs/Models/EnergyReportShard.js +0 -35
- package/dist/cjs/Models/Entity.js +0 -96
- package/dist/cjs/Models/Gateway.js +0 -35
- package/dist/cjs/Models/Identification.js +0 -38
- package/dist/cjs/Models/Issue.js +0 -35
- package/dist/cjs/Models/Lock.js +0 -39
- package/dist/cjs/Models/Log.js +0 -35
- package/dist/cjs/Models/MediaFile.js +0 -48
- package/dist/cjs/Models/MediaSource.js +0 -35
- package/dist/cjs/Models/MotionSensor.js +0 -35
- package/dist/cjs/Models/Order.js +0 -100
- package/dist/cjs/Models/Organization.js +0 -34
- package/dist/cjs/Models/Policy.js +0 -34
- package/dist/cjs/Models/Product.js +0 -35
- package/dist/cjs/Models/Property.js +0 -34
- package/dist/cjs/Models/Reservation.js +0 -114
- package/dist/cjs/Models/Room.js +0 -217
- package/dist/cjs/Models/Scene.js +0 -169
- package/dist/cjs/Models/ShortLink.js +0 -35
- package/dist/cjs/Models/SmsMessage.js +0 -35
- package/dist/cjs/Models/Space.js +0 -97
- package/dist/cjs/Models/Switch.js +0 -39
- package/dist/cjs/Models/SystemUser.js +0 -55
- package/dist/cjs/Models/Thermostat.js +0 -86
- package/dist/cjs/Models/Ticket.js +0 -55
- package/dist/cjs/Models/TimeSheet.js +0 -60
- package/dist/cjs/Models/User.js +0 -130
- package/dist/cjs/Models/Vendor.js +0 -35
- package/dist/cjs/Models/WindowCovering.js +0 -55
- package/dist/cjs/Models/index.js +0 -85
- package/dist/cjs/defs/deviceTypes.js +0 -15
- package/dist/cjs/defs/formalDeviceTypes.js +0 -6
- package/dist/cjs/defs/index.js +0 -11
- package/dist/cjs/index.js +0 -23
- package/dist/cjs/schemas/alarm.json +0 -85
- package/dist/cjs/schemas/announcement.json +0 -47
- package/dist/cjs/schemas/camera.json +0 -105
- package/dist/cjs/schemas/category.json +0 -42
- package/dist/cjs/schemas/courtesy.json +0 -48
- package/dist/cjs/schemas/credential.json +0 -54
- package/dist/cjs/schemas/definitions.json +0 -245
- package/dist/cjs/schemas/deviceRouter.json +0 -29
- package/dist/cjs/schemas/dimmer.json +0 -42
- package/dist/cjs/schemas/discoveredDevice.json +0 -44
- package/dist/cjs/schemas/emailMessage.json +0 -72
- package/dist/cjs/schemas/energyReport.json +0 -86
- package/dist/cjs/schemas/energyReportShard.json +0 -75
- package/dist/cjs/schemas/gateway.json +0 -34
- package/dist/cjs/schemas/identification.json +0 -61
- package/dist/cjs/schemas/issue.json +0 -54
- package/dist/cjs/schemas/lock.json +0 -57
- package/dist/cjs/schemas/log.json +0 -94
- package/dist/cjs/schemas/mediaFile.json +0 -75
- package/dist/cjs/schemas/mediaSource.json +0 -246
- package/dist/cjs/schemas/motionSensor.json +0 -32
- package/dist/cjs/schemas/order.json +0 -190
- package/dist/cjs/schemas/organization.json +0 -159
- package/dist/cjs/schemas/payment.json +0 -47
- package/dist/cjs/schemas/policy.json +0 -62
- package/dist/cjs/schemas/product.json +0 -45
- package/dist/cjs/schemas/property.json +0 -430
- package/dist/cjs/schemas/reservation.json +0 -146
- package/dist/cjs/schemas/room.json +0 -103
- package/dist/cjs/schemas/scene.json +0 -146
- package/dist/cjs/schemas/shortLink.json +0 -31
- package/dist/cjs/schemas/smsMessage.json +0 -62
- package/dist/cjs/schemas/space.json +0 -155
- package/dist/cjs/schemas/switch.json +0 -49
- package/dist/cjs/schemas/systemUser.json +0 -106
- package/dist/cjs/schemas/thermostat.json +0 -149
- package/dist/cjs/schemas/ticket.json +0 -229
- package/dist/cjs/schemas/timeSheet.json +0 -61
- package/dist/cjs/schemas/user.json +0 -189
- package/dist/cjs/schemas/vendor.json +0 -40
- package/dist/cjs/schemas/windowCovering.json +0 -48
- package/dist/cjs/utils/entityFactory.js +0 -86
- package/dist/cjs/utils/errorFactory.js +0 -32
- package/dist/cjs/utils/eventFactory.js +0 -10
- package/dist/cjs/utils/getDeviceTypes.js +0 -7
- package/dist/cjs/utils/getFormalDeviceType.js +0 -5
- package/dist/cjs/utils/index.js +0 -13
- package/dist/cjs/utils/schema.js +0 -25
- package/dist/esm/Client.js +0 -10692
- package/dist/esm/Client.js.map +0 -7
- package/dist/esm/Commands.js +0 -985
- package/dist/esm/Commands.js.map +0 -7
- package/dist/esm/Errors.js +0 -245
- package/dist/esm/Errors.js.map +0 -7
- package/dist/esm/Events.js +0 -741
- package/dist/esm/Events.js.map +0 -7
- package/dist/esm/Models.js +0 -14074
- package/dist/esm/Models.js.map +0 -7
- package/dist/esm/SocketIoClient.js +0 -5010
- package/dist/esm/SocketIoClient.js.map +0 -7
- package/dist/esm/defs.js +0 -3070
- package/dist/esm/defs.js.map +0 -7
- package/dist/esm/index.js +0 -18
- package/dist/esm/utils.js +0 -14263
- package/dist/esm/utils.js.map +0 -7
- package/dist/types/AMQPClient/index.d.ts +0 -128
- package/dist/types/AMQPClient/index.d.ts.map +0 -1
- package/dist/types/Client/index.d.ts +0 -58
- package/dist/types/Client/index.d.ts.map +0 -1
- package/dist/types/Commands/CheckInReservation.d.ts +0 -10
- package/dist/types/Commands/CheckInReservation.d.ts.map +0 -1
- package/dist/types/Commands/CheckOutReservation.d.ts +0 -11
- package/dist/types/Commands/CheckOutReservation.d.ts.map +0 -1
- package/dist/types/Commands/Command.d.ts +0 -12
- package/dist/types/Commands/Command.d.ts.map +0 -1
- package/dist/types/Commands/CreateImageUploadEndpoint.d.ts +0 -11
- package/dist/types/Commands/CreateImageUploadEndpoint.d.ts.map +0 -1
- package/dist/types/Commands/CreateShortLink.d.ts +0 -11
- package/dist/types/Commands/CreateShortLink.d.ts.map +0 -1
- package/dist/types/Commands/GetCategories.d.ts +0 -10
- package/dist/types/Commands/GetCategories.d.ts.map +0 -1
- package/dist/types/Commands/GetMobileKey.d.ts +0 -14
- package/dist/types/Commands/GetMobileKey.d.ts.map +0 -1
- package/dist/types/Commands/GetProducts.d.ts +0 -11
- package/dist/types/Commands/GetProducts.d.ts.map +0 -1
- package/dist/types/Commands/GetReservationSpaceCategoryAvailabilities.d.ts +0 -6
- package/dist/types/Commands/GetReservationSpaceCategoryAvailabilities.d.ts.map +0 -1
- package/dist/types/Commands/GetReservations.d.ts +0 -6
- package/dist/types/Commands/GetReservations.d.ts.map +0 -1
- package/dist/types/Commands/GetRooms.d.ts +0 -16
- package/dist/types/Commands/GetRooms.d.ts.map +0 -1
- package/dist/types/Commands/GetUsers.d.ts +0 -10
- package/dist/types/Commands/GetUsers.d.ts.map +0 -1
- package/dist/types/Commands/OCRDocument.d.ts +0 -11
- package/dist/types/Commands/OCRDocument.d.ts.map +0 -1
- package/dist/types/Commands/SellProducts.d.ts +0 -12
- package/dist/types/Commands/SellProducts.d.ts.map +0 -1
- package/dist/types/Commands/SendEmail.d.ts +0 -14
- package/dist/types/Commands/SendEmail.d.ts.map +0 -1
- package/dist/types/Commands/SendSMS.d.ts +0 -14
- package/dist/types/Commands/SendSMS.d.ts.map +0 -1
- package/dist/types/Commands/SetAlarm.d.ts +0 -13
- package/dist/types/Commands/SetAlarm.d.ts.map +0 -1
- package/dist/types/Commands/SetCourtesy.d.ts +0 -11
- package/dist/types/Commands/SetCourtesy.d.ts.map +0 -1
- package/dist/types/Commands/SetDimmer.d.ts +0 -11
- package/dist/types/Commands/SetDimmer.d.ts.map +0 -1
- package/dist/types/Commands/SetLock.d.ts +0 -11
- package/dist/types/Commands/SetLock.d.ts.map +0 -1
- package/dist/types/Commands/SetMedia.d.ts +0 -11
- package/dist/types/Commands/SetMedia.d.ts.map +0 -1
- package/dist/types/Commands/SetScene.d.ts +0 -11
- package/dist/types/Commands/SetScene.d.ts.map +0 -1
- package/dist/types/Commands/SetSwitch.d.ts +0 -11
- package/dist/types/Commands/SetSwitch.d.ts.map +0 -1
- package/dist/types/Commands/SetThermostat.d.ts +0 -13
- package/dist/types/Commands/SetThermostat.d.ts.map +0 -1
- package/dist/types/Commands/SetWindowCovering.d.ts +0 -11
- package/dist/types/Commands/SetWindowCovering.d.ts.map +0 -1
- package/dist/types/Commands/UpdateReservation.d.ts +0 -10
- package/dist/types/Commands/UpdateReservation.d.ts.map +0 -1
- package/dist/types/Commands/UpdateUser.d.ts +0 -18
- package/dist/types/Commands/UpdateUser.d.ts.map +0 -1
- package/dist/types/Commands/UploadImage.d.ts +0 -12
- package/dist/types/Commands/UploadImage.d.ts.map +0 -1
- package/dist/types/Commands/index.d.ts +0 -30
- package/dist/types/Commands/index.d.ts.map +0 -1
- package/dist/types/Errors/AppError.d.ts +0 -7
- package/dist/types/Errors/AppError.d.ts.map +0 -1
- package/dist/types/Errors/AuthenticationError.d.ts +0 -6
- package/dist/types/Errors/AuthenticationError.d.ts.map +0 -1
- package/dist/types/Errors/AuthorizationError.d.ts +0 -6
- package/dist/types/Errors/AuthorizationError.d.ts.map +0 -1
- package/dist/types/Errors/ConflictError.d.ts +0 -6
- package/dist/types/Errors/ConflictError.d.ts.map +0 -1
- package/dist/types/Errors/DeviceCommError.d.ts +0 -6
- package/dist/types/Errors/DeviceCommError.d.ts.map +0 -1
- package/dist/types/Errors/LoginError.d.ts +0 -6
- package/dist/types/Errors/LoginError.d.ts.map +0 -1
- package/dist/types/Errors/NotFoundError.d.ts +0 -6
- package/dist/types/Errors/NotFoundError.d.ts.map +0 -1
- package/dist/types/Errors/RequestError.d.ts +0 -6
- package/dist/types/Errors/RequestError.d.ts.map +0 -1
- package/dist/types/Errors/SystemCommError.d.ts +0 -6
- package/dist/types/Errors/SystemCommError.d.ts.map +0 -1
- package/dist/types/Errors/TokenExpiredError.d.ts +0 -6
- package/dist/types/Errors/TokenExpiredError.d.ts.map +0 -1
- package/dist/types/Errors/UnprocessableRequestError.d.ts +0 -6
- package/dist/types/Errors/UnprocessableRequestError.d.ts.map +0 -1
- package/dist/types/Errors/ValidationError.d.ts +0 -6
- package/dist/types/Errors/ValidationError.d.ts.map +0 -1
- package/dist/types/Errors/index.d.ts +0 -37
- package/dist/types/Errors/index.d.ts.map +0 -1
- package/dist/types/Events/ApplicationInUse.d.ts +0 -7
- package/dist/types/Events/ApplicationInUse.d.ts.map +0 -1
- package/dist/types/Events/ApplicationOutOfUse.d.ts +0 -7
- package/dist/types/Events/ApplicationOutOfUse.d.ts.map +0 -1
- package/dist/types/Events/EmailEvent.d.ts +0 -7
- package/dist/types/Events/EmailEvent.d.ts.map +0 -1
- package/dist/types/Events/Event.d.ts +0 -48
- package/dist/types/Events/Event.d.ts.map +0 -1
- package/dist/types/Events/ReservationCheckedIn.d.ts +0 -7
- package/dist/types/Events/ReservationCheckedIn.d.ts.map +0 -1
- package/dist/types/Events/ReservationCheckedOut.d.ts +0 -7
- package/dist/types/Events/ReservationCheckedOut.d.ts.map +0 -1
- package/dist/types/Events/ReservationSpaceChanged.d.ts +0 -7
- package/dist/types/Events/ReservationSpaceChanged.d.ts.map +0 -1
- package/dist/types/Events/SMSEvent.d.ts +0 -7
- package/dist/types/Events/SMSEvent.d.ts.map +0 -1
- package/dist/types/Events/SceneSet.d.ts +0 -7
- package/dist/types/Events/SceneSet.d.ts.map +0 -1
- package/dist/types/Events/ShortLinkCreated.d.ts +0 -7
- package/dist/types/Events/ShortLinkCreated.d.ts.map +0 -1
- package/dist/types/Events/SystemAlarmUpdated.d.ts +0 -7
- package/dist/types/Events/SystemAlarmUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemCameraUpdated.d.ts +0 -7
- package/dist/types/Events/SystemCameraUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemCategoryUpdated.d.ts +0 -7
- package/dist/types/Events/SystemCategoryUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemCourtesyUpdated.d.ts +0 -7
- package/dist/types/Events/SystemCourtesyUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemCredentialUpdated.d.ts +0 -7
- package/dist/types/Events/SystemCredentialUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemDimmerUpdated.d.ts +0 -7
- package/dist/types/Events/SystemDimmerUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemEntityDeleted.d.ts +0 -7
- package/dist/types/Events/SystemEntityDeleted.d.ts.map +0 -1
- package/dist/types/Events/SystemGatewayUpdated.d.ts +0 -7
- package/dist/types/Events/SystemGatewayUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemLockUpdated.d.ts +0 -7
- package/dist/types/Events/SystemLockUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemMediaSourceUpdated.d.ts +0 -7
- package/dist/types/Events/SystemMediaSourceUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemMotionSensorUpdated.d.ts +0 -7
- package/dist/types/Events/SystemMotionSensorUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemOrganizationUpdated.d.ts +0 -7
- package/dist/types/Events/SystemOrganizationUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemProductUpdated.d.ts +0 -7
- package/dist/types/Events/SystemProductUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemPropertyUpdated.d.ts +0 -7
- package/dist/types/Events/SystemPropertyUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemReservationUpdated.d.ts +0 -7
- package/dist/types/Events/SystemReservationUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemSpaceUpdated.d.ts +0 -7
- package/dist/types/Events/SystemSpaceUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemSwitchUpdated.d.ts +0 -7
- package/dist/types/Events/SystemSwitchUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemThermostatUpdated.d.ts +0 -7
- package/dist/types/Events/SystemThermostatUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemUserUpdated.d.ts +0 -7
- package/dist/types/Events/SystemUserUpdated.d.ts.map +0 -1
- package/dist/types/Events/SystemWindowCoveringUpdated.d.ts +0 -7
- package/dist/types/Events/SystemWindowCoveringUpdated.d.ts.map +0 -1
- package/dist/types/Events/index.d.ts +0 -32
- package/dist/types/Events/index.d.ts.map +0 -1
- package/dist/types/Models/Alarm.d.ts +0 -17
- package/dist/types/Models/Alarm.d.ts.map +0 -1
- package/dist/types/Models/Announcement.d.ts +0 -17
- package/dist/types/Models/Announcement.d.ts.map +0 -1
- package/dist/types/Models/Camera.d.ts +0 -17
- package/dist/types/Models/Camera.d.ts.map +0 -1
- package/dist/types/Models/Category.d.ts +0 -17
- package/dist/types/Models/Category.d.ts.map +0 -1
- package/dist/types/Models/Courtesy.d.ts +0 -18
- package/dist/types/Models/Courtesy.d.ts.map +0 -1
- package/dist/types/Models/Credential.d.ts +0 -17
- package/dist/types/Models/Credential.d.ts.map +0 -1
- package/dist/types/Models/DeviceRouter.d.ts +0 -17
- package/dist/types/Models/DeviceRouter.d.ts.map +0 -1
- package/dist/types/Models/Dimmer.d.ts +0 -23
- package/dist/types/Models/Dimmer.d.ts.map +0 -1
- package/dist/types/Models/DiscoveredDevice.d.ts +0 -17
- package/dist/types/Models/DiscoveredDevice.d.ts.map +0 -1
- package/dist/types/Models/EmailMessage.d.ts +0 -17
- package/dist/types/Models/EmailMessage.d.ts.map +0 -1
- package/dist/types/Models/EnergyReport.d.ts +0 -17
- package/dist/types/Models/EnergyReport.d.ts.map +0 -1
- package/dist/types/Models/EnergyReportShard.d.ts +0 -17
- package/dist/types/Models/EnergyReportShard.d.ts.map +0 -1
- package/dist/types/Models/Entity.d.ts +0 -12
- package/dist/types/Models/Entity.d.ts.map +0 -1
- package/dist/types/Models/Gateway.d.ts +0 -17
- package/dist/types/Models/Gateway.d.ts.map +0 -1
- package/dist/types/Models/Identification.d.ts +0 -18
- package/dist/types/Models/Identification.d.ts.map +0 -1
- package/dist/types/Models/Issue.d.ts +0 -17
- package/dist/types/Models/Issue.d.ts.map +0 -1
- package/dist/types/Models/Lock.d.ts +0 -18
- package/dist/types/Models/Lock.d.ts.map +0 -1
- package/dist/types/Models/Log.d.ts +0 -17
- package/dist/types/Models/Log.d.ts.map +0 -1
- package/dist/types/Models/MediaFile.d.ts +0 -18
- package/dist/types/Models/MediaFile.d.ts.map +0 -1
- package/dist/types/Models/MediaSource.d.ts +0 -17
- package/dist/types/Models/MediaSource.d.ts.map +0 -1
- package/dist/types/Models/MotionSensor.d.ts +0 -17
- package/dist/types/Models/MotionSensor.d.ts.map +0 -1
- package/dist/types/Models/Order.d.ts +0 -24
- package/dist/types/Models/Order.d.ts.map +0 -1
- package/dist/types/Models/Organization.d.ts +0 -17
- package/dist/types/Models/Organization.d.ts.map +0 -1
- package/dist/types/Models/Policy.d.ts +0 -17
- package/dist/types/Models/Policy.d.ts.map +0 -1
- package/dist/types/Models/Product.d.ts +0 -17
- package/dist/types/Models/Product.d.ts.map +0 -1
- package/dist/types/Models/Property.d.ts +0 -17
- package/dist/types/Models/Property.d.ts.map +0 -1
- package/dist/types/Models/Reservation.d.ts +0 -23
- package/dist/types/Models/Reservation.d.ts.map +0 -1
- package/dist/types/Models/Room.d.ts +0 -32
- package/dist/types/Models/Room.d.ts.map +0 -1
- package/dist/types/Models/Scene.d.ts +0 -24
- package/dist/types/Models/Scene.d.ts.map +0 -1
- package/dist/types/Models/ShortLink.d.ts +0 -17
- package/dist/types/Models/ShortLink.d.ts.map +0 -1
- package/dist/types/Models/SmsMessage.d.ts +0 -17
- package/dist/types/Models/SmsMessage.d.ts.map +0 -1
- package/dist/types/Models/Space.d.ts +0 -27
- package/dist/types/Models/Space.d.ts.map +0 -1
- package/dist/types/Models/Switch.d.ts +0 -18
- package/dist/types/Models/Switch.d.ts.map +0 -1
- package/dist/types/Models/SystemUser.d.ts +0 -20
- package/dist/types/Models/SystemUser.d.ts.map +0 -1
- package/dist/types/Models/Thermostat.d.ts +0 -22
- package/dist/types/Models/Thermostat.d.ts.map +0 -1
- package/dist/types/Models/Ticket.d.ts +0 -18
- package/dist/types/Models/Ticket.d.ts.map +0 -1
- package/dist/types/Models/TimeSheet.d.ts +0 -18
- package/dist/types/Models/TimeSheet.d.ts.map +0 -1
- package/dist/types/Models/User.d.ts +0 -27
- package/dist/types/Models/User.d.ts.map +0 -1
- package/dist/types/Models/Vendor.d.ts +0 -17
- package/dist/types/Models/Vendor.d.ts.map +0 -1
- package/dist/types/Models/WindowCovering.d.ts +0 -18
- package/dist/types/Models/WindowCovering.d.ts.map +0 -1
- package/dist/types/Models/index.d.ts +0 -42
- package/dist/types/Models/index.d.ts.map +0 -1
- package/dist/types/SocketIoClient/index.d.ts +0 -36
- package/dist/types/SocketIoClient/index.d.ts.map +0 -1
- package/dist/types/defs/amqpExchanges.d.ts +0 -58
- package/dist/types/defs/amqpExchanges.d.ts.map +0 -1
- package/dist/types/defs/deviceTypes.d.ts +0 -3
- package/dist/types/defs/deviceTypes.d.ts.map +0 -1
- package/dist/types/defs/formalDeviceTypes.d.ts +0 -3
- package/dist/types/defs/formalDeviceTypes.d.ts.map +0 -1
- package/dist/types/defs/index.d.ts +0 -5
- package/dist/types/defs/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -11
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/schemas/AlarmSchema.d.ts +0 -210
- package/dist/types/schemas/AnnouncementSchema.d.ts +0 -65
- package/dist/types/schemas/CameraSchema.d.ts +0 -205
- package/dist/types/schemas/CategorySchema.d.ts +0 -105
- package/dist/types/schemas/CourtesySchema.d.ts +0 -185
- package/dist/types/schemas/CredentialSchema.d.ts +0 -73
- package/dist/types/schemas/DefinitionsSchema.d.ts +0 -10
- package/dist/types/schemas/DeviceRouterSchema.d.ts +0 -23
- package/dist/types/schemas/DimmerSchema.d.ts +0 -184
- package/dist/types/schemas/DiscoveredDeviceSchema.d.ts +0 -48
- package/dist/types/schemas/EmailMessageSchema.d.ts +0 -49
- package/dist/types/schemas/EnergyReportSchema.d.ts +0 -57
- package/dist/types/schemas/EnergyReportShardSchema.d.ts +0 -61
- package/dist/types/schemas/GatewaySchema.d.ts +0 -182
- package/dist/types/schemas/IdentificationSchema.d.ts +0 -45
- package/dist/types/schemas/IssueSchema.d.ts +0 -27
- package/dist/types/schemas/LockSchema.d.ts +0 -190
- package/dist/types/schemas/LogSchema.d.ts +0 -46
- package/dist/types/schemas/MediaFileSchema.d.ts +0 -47
- package/dist/types/schemas/MediaSourceSchema.d.ts +0 -301
- package/dist/types/schemas/MotionSensorSchema.d.ts +0 -180
- package/dist/types/schemas/OrderSchema.d.ts +0 -96
- package/dist/types/schemas/OrganizationSchema.d.ts +0 -68
- package/dist/types/schemas/PaymentSchema.d.ts +0 -33
- package/dist/types/schemas/PolicySchema.d.ts +0 -25
- package/dist/types/schemas/ProductSchema.d.ts +0 -111
- package/dist/types/schemas/PropertySchema.d.ts +0 -227
- package/dist/types/schemas/ReservationSchema.d.ts +0 -143
- package/dist/types/schemas/RoomSchema.d.ts +0 -1422
- package/dist/types/schemas/SceneSchema.d.ts +0 -68
- package/dist/types/schemas/ShortLinkSchema.d.ts +0 -20
- package/dist/types/schemas/SmsMessageSchema.d.ts +0 -40
- package/dist/types/schemas/SpaceSchema.d.ts +0 -116
- package/dist/types/schemas/SwitchSchema.d.ts +0 -185
- package/dist/types/schemas/SystemUserSchema.d.ts +0 -213
- package/dist/types/schemas/ThermostatSchema.d.ts +0 -215
- package/dist/types/schemas/TicketSchema.d.ts +0 -100
- package/dist/types/schemas/TimeSheetSchema.d.ts +0 -38
- package/dist/types/schemas/UserSchema.d.ts +0 -334
- package/dist/types/schemas/VendorSchema.d.ts +0 -80
- package/dist/types/schemas/WindowCoveringSchema.d.ts +0 -185
- package/dist/types/utils/entityFactory.d.ts +0 -4
- package/dist/types/utils/entityFactory.d.ts.map +0 -1
- package/dist/types/utils/errorFactory.d.ts +0 -5
- package/dist/types/utils/errorFactory.d.ts.map +0 -1
- package/dist/types/utils/eventFactory.d.ts +0 -3
- package/dist/types/utils/eventFactory.d.ts.map +0 -1
- package/dist/types/utils/getDeviceTypes.d.ts +0 -3
- package/dist/types/utils/getDeviceTypes.d.ts.map +0 -1
- package/dist/types/utils/getFormalDeviceType.d.ts +0 -3
- package/dist/types/utils/getFormalDeviceType.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -7
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/schema.d.ts +0 -3
- package/dist/types/utils/schema.d.ts.map +0 -1
- package/dist/useCases/AssignSpaceToReservation.js +0 -28
- package/dist/useCases/AutoAssociateDiscoveredDevices.js +0 -28
- package/dist/useCases/AutoCloseTickets.js +0 -28
- package/dist/useCases/BatchNotifyCheckIn.js +0 -28
- package/dist/useCases/BatchNotifyCheckOut.js +0 -28
- package/dist/useCases/BatchNotifyMissedCheckOut.js +0 -28
- package/dist/useCases/BatchNotifyPreArrival.js +0 -28
- package/dist/useCases/BulkUpdateIssue.js +0 -28
- package/dist/useCases/CheckInReservation.js +0 -28
- package/dist/useCases/CheckOutReservation.js +0 -28
- package/dist/useCases/CheckVerificationCode.js +0 -28
- package/dist/useCases/CreateAlarm.js +0 -28
- package/dist/useCases/CreateAnnouncement.js +0 -28
- package/dist/useCases/CreateCamera.js +0 -28
- package/dist/useCases/CreateCateory.js +0 -28
- package/dist/useCases/CreateCourtesy.js +0 -28
- package/dist/useCases/CreateDefaultScenes.js +0 -28
- package/dist/useCases/CreateDimmer.js +0 -28
- package/dist/useCases/CreateDiscoveredDevice.js +0 -28
- package/dist/useCases/CreateDiscoveredDeviceAssociation.js +0 -28
- package/dist/useCases/CreateDiscoveredDeviceAssociationMap.js +0 -28
- package/dist/useCases/CreateImageUploadEndpoint.js +0 -28
- package/dist/useCases/CreateIssue.js +0 -28
- package/dist/useCases/CreateLock.js +0 -28
- package/dist/useCases/CreateMediaSource.js +0 -28
- package/dist/useCases/CreateOrganization.js +0 -28
- package/dist/useCases/CreatePolicy.js +0 -28
- package/dist/useCases/CreateProperty.js +0 -28
- package/dist/useCases/CreateReservation.js +0 -28
- package/dist/useCases/CreateRoom.js +0 -28
- package/dist/useCases/CreateRoomInSpace.js +0 -28
- package/dist/useCases/CreateScene.js +0 -28
- package/dist/useCases/CreateSpace.js +0 -28
- package/dist/useCases/CreateSwitch.js +0 -28
- package/dist/useCases/CreateThermostat.js +0 -28
- package/dist/useCases/CreateTicket.js +0 -28
- package/dist/useCases/CreateTicketMessage.js +0 -28
- package/dist/useCases/CreateTimeSheet.js +0 -28
- package/dist/useCases/CreateTimeSheetTimeEntry.js +0 -28
- package/dist/useCases/CreateUser.js +0 -28
- package/dist/useCases/CreateUserMobileKey.js +0 -28
- package/dist/useCases/CreateVendor.js +0 -28
- package/dist/useCases/CreateWindowCovering.js +0 -28
- package/dist/useCases/DeleteAlarm.js +0 -28
- package/dist/useCases/DeleteAnnouncement.js +0 -28
- package/dist/useCases/DeleteCamera.js +0 -28
- package/dist/useCases/DeleteCategory.js +0 -28
- package/dist/useCases/DeleteCourtesy.js +0 -28
- package/dist/useCases/DeleteDimmer.js +0 -28
- package/dist/useCases/DeleteDiscoveredDevice.js +0 -28
- package/dist/useCases/DeleteIssue.js +0 -28
- package/dist/useCases/DeleteLock.js +0 -28
- package/dist/useCases/DeleteMediaFile.js +0 -28
- package/dist/useCases/DeleteMediaSource.js +0 -28
- package/dist/useCases/DeletePolicy.js +0 -28
- package/dist/useCases/DeleteReservation.js +0 -28
- package/dist/useCases/DeleteRoom.js +0 -28
- package/dist/useCases/DeleteSpace.js +0 -28
- package/dist/useCases/DeleteSwitch.js +0 -28
- package/dist/useCases/DeleteThermostat.js +0 -28
- package/dist/useCases/DeleteTicket.js +0 -28
- package/dist/useCases/DeleteTimeSheet.js +0 -28
- package/dist/useCases/DeleteTimeSheetTimeEntry.js +0 -28
- package/dist/useCases/DeleteUser.js +0 -28
- package/dist/useCases/DeleteUserCredential.js +0 -28
- package/dist/useCases/DeleteVendor.js +0 -28
- package/dist/useCases/DeleteWindowCovering.js +0 -28
- package/dist/useCases/DescribeAlarm.js +0 -28
- package/dist/useCases/DescribeAlarmConfig.js +0 -28
- package/dist/useCases/DescribeAnnouncement.js +0 -28
- package/dist/useCases/DescribeCamera.js +0 -28
- package/dist/useCases/DescribeCategory.js +0 -28
- package/dist/useCases/DescribeCourtesy.js +0 -28
- package/dist/useCases/DescribeDimmer.js +0 -28
- package/dist/useCases/DescribeDiscoveredDevice.js +0 -28
- package/dist/useCases/DescribeIssue.js +0 -28
- package/dist/useCases/DescribeLock.js +0 -28
- package/dist/useCases/DescribeLockCredential.js +0 -28
- package/dist/useCases/DescribeMediaSource.js +0 -28
- package/dist/useCases/DescribeMyAuth.js +0 -28
- package/dist/useCases/DescribeMyMobileKeyApp.js +0 -28
- package/dist/useCases/DescribeMyOrganization.js +0 -28
- package/dist/useCases/DescribeMyPasskeyRegistrations.js +0 -28
- package/dist/useCases/DescribeOrganization.js +0 -28
- package/dist/useCases/DescribePolicy.js +0 -28
- package/dist/useCases/DescribeProduct.js +0 -28
- package/dist/useCases/DescribeProperty.js +0 -28
- package/dist/useCases/DescribeReservation.js +0 -28
- package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +0 -28
- package/dist/useCases/DescribeReservationLateCheckOutProducts.js +0 -28
- package/dist/useCases/DescribeReservationPetProducts.js +0 -28
- package/dist/useCases/DescribeReservationPromos.js +0 -28
- package/dist/useCases/DescribeReservationRoomUpgrades.js +0 -28
- package/dist/useCases/DescribeRoom.js +0 -28
- package/dist/useCases/DescribeSOS.js +0 -28
- package/dist/useCases/DescribeSelf.js +0 -28
- package/dist/useCases/DescribeSpace.js +0 -28
- package/dist/useCases/DescribeSwitch.js +0 -28
- package/dist/useCases/DescribeThermostat.js +0 -28
- package/dist/useCases/DescribeTicket.js +0 -28
- package/dist/useCases/DescribeTicketStats.js +0 -28
- package/dist/useCases/DescribeTimeSheet.js +0 -28
- package/dist/useCases/DescribeTimeSheetStats.js +0 -28
- package/dist/useCases/DescribeUser.js +0 -28
- package/dist/useCases/DescribeVendor.js +0 -28
- package/dist/useCases/DescribeWindowCovering.js +0 -28
- package/dist/useCases/DiscoverReservations.js +0 -28
- package/dist/useCases/EmailUserAccountSetup.js +0 -28
- package/dist/useCases/FinishRegisterPasskey.js +0 -28
- package/dist/useCases/ListAlarms.js +0 -28
- package/dist/useCases/ListAnnouncements.js +0 -28
- package/dist/useCases/ListCameras.js +0 -28
- package/dist/useCases/ListCategories.js +0 -28
- package/dist/useCases/ListCourtesy.js +0 -28
- package/dist/useCases/ListDimmers.js +0 -28
- package/dist/useCases/ListDiscoveredDevices.js +0 -28
- package/dist/useCases/ListIssues.js +0 -28
- package/dist/useCases/ListLocks.js +0 -28
- package/dist/useCases/ListMediaSources.js +0 -28
- package/dist/useCases/ListMyOrders.js +0 -28
- package/dist/useCases/ListMyProperties.js +0 -28
- package/dist/useCases/ListMyReservations.js +0 -28
- package/dist/useCases/ListMySpaces.js +0 -28
- package/dist/useCases/ListMyTickets.js +0 -28
- package/dist/useCases/ListMyTimeSheets.js +0 -28
- package/dist/useCases/ListOrders.js +0 -28
- package/dist/useCases/ListOrganizations.js +0 -28
- package/dist/useCases/ListPolicies.js +0 -28
- package/dist/useCases/ListProducts.js +0 -28
- package/dist/useCases/ListProperties.js +0 -28
- package/dist/useCases/ListReservations.js +0 -28
- package/dist/useCases/ListRooms.js +0 -28
- package/dist/useCases/ListRoomsInSpace.js +0 -28
- package/dist/useCases/ListScenes.js +0 -28
- package/dist/useCases/ListSpaces.js +0 -28
- package/dist/useCases/ListSwitches.js +0 -28
- package/dist/useCases/ListTeam.js +0 -28
- package/dist/useCases/ListThermostats.js +0 -28
- package/dist/useCases/ListTickets.js +0 -28
- package/dist/useCases/ListTimeSheets.js +0 -28
- package/dist/useCases/ListUserMobileKeys.js +0 -28
- package/dist/useCases/ListUserOrders.js +0 -28
- package/dist/useCases/ListUserReservations.js +0 -28
- package/dist/useCases/ListUserSpaces.js +0 -28
- package/dist/useCases/ListUsers.js +0 -28
- package/dist/useCases/ListVendors.js +0 -28
- package/dist/useCases/ListWindowCoverings.js +0 -28
- package/dist/useCases/LoginFinish.js +0 -28
- package/dist/useCases/LoginStart.js +0 -28
- package/dist/useCases/LogoutSelf.js +0 -28
- package/dist/useCases/LogoutUser.js +0 -28
- package/dist/useCases/MatchUserIdentification.js +0 -28
- package/dist/useCases/OCRDocument.js +0 -28
- package/dist/useCases/PurchaseReservationEarlyCheckInProducts.js +0 -28
- package/dist/useCases/PurchaseReservationLateCheckOutProducts.js +0 -28
- package/dist/useCases/PurchaseReservationPetProducts.js +0 -28
- package/dist/useCases/PurchaseReservationPromos.js +0 -28
- package/dist/useCases/PurchaseReservationRoomUpgrades.js +0 -28
- package/dist/useCases/RefreshToken.js +0 -28
- package/dist/useCases/RequestLoginToken.js +0 -28
- package/dist/useCases/SendCheckInSMS.js +0 -28
- package/dist/useCases/SendCheckOutSMS.js +0 -28
- package/dist/useCases/SendPreArrivalEmail.js +0 -28
- package/dist/useCases/SendPreArrivalSMS.js +0 -28
- package/dist/useCases/SendRoomControlSMS.js +0 -28
- package/dist/useCases/SendVerificationCode.js +0 -28
- package/dist/useCases/SetAlarm.js +0 -28
- package/dist/useCases/SetCamera.js +0 -28
- package/dist/useCases/SetCourtesy.js +0 -28
- package/dist/useCases/SetDimmer.js +0 -28
- package/dist/useCases/SetLock.js +0 -28
- package/dist/useCases/SetMediaSource.js +0 -28
- package/dist/useCases/SetRoomScene.js +0 -28
- package/dist/useCases/SetScene.js +0 -28
- package/dist/useCases/SetSpaceScene.js +0 -28
- package/dist/useCases/SetSwitch.js +0 -28
- package/dist/useCases/SetThermostat.js +0 -28
- package/dist/useCases/SetWindowCovering.js +0 -28
- package/dist/useCases/StartRegisterPasskey.js +0 -28
- package/dist/useCases/StartSOS.js +0 -28
- package/dist/useCases/StopSOS.js +0 -28
- package/dist/useCases/TipUser.js +0 -28
- package/dist/useCases/UpdateAlarm.js +0 -28
- package/dist/useCases/UpdateAnnouncement.js +0 -28
- package/dist/useCases/UpdateCamera.js +0 -28
- package/dist/useCases/UpdateCategory.js +0 -28
- package/dist/useCases/UpdateCourtesy.js +0 -28
- package/dist/useCases/UpdateDimmer.js +0 -28
- package/dist/useCases/UpdateDiscoveredDevice.js +0 -28
- package/dist/useCases/UpdateIssue.js +0 -28
- package/dist/useCases/UpdateLock.js +0 -28
- package/dist/useCases/UpdateMediaSource.js +0 -28
- package/dist/useCases/UpdateMessageReadStatus.js +0 -28
- package/dist/useCases/UpdateOrganization.js +0 -28
- package/dist/useCases/UpdatePolicy.js +0 -28
- package/dist/useCases/UpdateProperty.js +0 -28
- package/dist/useCases/UpdatePropertySettings.js +0 -28
- package/dist/useCases/UpdateReservation.js +0 -28
- package/dist/useCases/UpdateReservationExpectedArrivalTime.js +0 -28
- package/dist/useCases/UpdateRoom.js +0 -28
- package/dist/useCases/UpdateSelf.js +0 -28
- package/dist/useCases/UpdateSpace.js +0 -28
- package/dist/useCases/UpdateSwitch.js +0 -28
- package/dist/useCases/UpdateThermostat.js +0 -28
- package/dist/useCases/UpdateTicket.js +0 -28
- package/dist/useCases/UpdateTicketStatus.js +0 -28
- package/dist/useCases/UpdateTimeSheet.js +0 -28
- package/dist/useCases/UpdateTimeSheetTimeEntry.js +0 -28
- package/dist/useCases/UpdateUser.js +0 -28
- package/dist/useCases/UpdateVendor.js +0 -28
- package/dist/useCases/UpdateWindowCovering.js +0 -28
- package/dist/useCases/UploadImage.js +0 -28
- package/dist/useCases/UpsertDiscoveredDevice.js +0 -28
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { RefreshTokenCommand, AssignSpaceToReservationCommand, AutoAssociateDiscoveredDevicesCommand, AutoCloseTicketsCommand, BatchNotifyCheckInCommand, BatchNotifyCheckOutCommand, BatchNotifyMissedCheckOutCommand, BatchNotifyPreArrivalCommand, BulkUpdateIssueCommand, CheckInReservationCommand, CheckOutReservationCommand, CheckVerificationCodeCommand, CreateAlarmCommand, CreateAnnouncementCommand, CreateCameraCommand, CreateCateoryCommand, CreateCourtesyCommand, CreateDefaultScenesCommand, CreateDimmerCommand, CreateDiscoveredDeviceCommand, CreateDiscoveredDeviceAssociationCommand, CreateDiscoveredDeviceAssociationMapCommand, CreateImageUploadEndpointCommand, CreateIssueCommand, CreateLockCommand, CreateMediaSourceCommand, CreateOrganizationCommand, CreatePolicyCommand, CreatePropertyCommand, CreateReservationCommand, CreateRoomCommand, CreateRoomInSpaceCommand, CreateSceneCommand, CreateSpaceCommand, CreateSwitchCommand, CreateThermostatCommand, CreateTicketCommand, CreateTicketMessageCommand, CreateTimeSheetCommand, CreateTimeSheetTimeEntryCommand, CreateUserCommand, CreateUserMobileKeyCommand, CreateVendorCommand, CreateWindowCoveringCommand, DeleteAlarmCommand, DeleteAnnouncementCommand, DeleteCameraCommand, DeleteCategoryCommand, DeleteCourtesyCommand, DeleteDimmerCommand, DeleteDiscoveredDeviceCommand, DeleteIssueCommand, DeleteLockCommand, DeleteMediaFileCommand, DeleteMediaSourceCommand, DeletePolicyCommand, DeleteReservationCommand, DeleteRoomCommand, DeleteSpaceCommand, DeleteSwitchCommand, DeleteThermostatCommand, DeleteTicketCommand, DeleteTimeSheetCommand, DeleteTimeSheetTimeEntryCommand, DeleteUserCommand, DeleteUserCredentialCommand, DeleteVendorCommand, DeleteWindowCoveringCommand, DescribeAlarmCommand, DescribeAlarmConfigCommand, DescribeAnnouncementCommand, DescribeCameraCommand, DescribeCategoryCommand, DescribeCourtesyCommand, DescribeDimmerCommand, DescribeDiscoveredDeviceCommand, DescribeIssueCommand, DescribeLockCommand, DescribeLockCredentialCommand, DescribeMediaSourceCommand, DescribeMyAuthCommand, DescribeMyMobileKeyAppCommand, DescribeMyOrganizationCommand, DescribeMyPasskeyRegistrationsCommand, DescribeOrganizationCommand, DescribePolicyCommand, DescribeProductCommand, DescribePropertyCommand, DescribeReservationCommand, DescribeReservationEarlyCheckInProductsCommand, DescribeReservationLateCheckOutProductsCommand, DescribeReservationPetProductsCommand, DescribeReservationPromosCommand, DescribeReservationRoomUpgradesCommand, DescribeRoomCommand, DescribeSOSCommand, DescribeSelfCommand, DescribeSpaceCommand, DescribeSwitchCommand, DescribeThermostatCommand, DescribeTicketCommand, DescribeTicketStatsCommand, DescribeTimeSheetCommand, DescribeTimeSheetStatsCommand, DescribeUserCommand, DescribeVendorCommand, DescribeWindowCoveringCommand, DiscoverReservationsCommand, EmailUserAccountSetupCommand, FinishRegisterPasskeyCommand, ListAlarmsCommand, ListAnnouncementsCommand, ListCamerasCommand, ListCategoriesCommand, ListCourtesyCommand, ListDimmersCommand, ListDiscoveredDevicesCommand, ListIssuesCommand, ListLocksCommand, ListMediaSourcesCommand, ListMyOrdersCommand, ListMyPropertiesCommand, ListMyReservationsCommand, ListMySpacesCommand, ListMyTicketsCommand, ListMyTimeSheetsCommand, ListOrdersCommand, ListOrganizationsCommand, ListPoliciesCommand, ListProductsCommand, ListPropertiesCommand, ListReservationsCommand, ListRoomsCommand, ListRoomsInSpaceCommand, ListScenesCommand, ListSpacesCommand, ListSwitchesCommand, ListTeamCommand, ListThermostatsCommand, ListTicketsCommand, ListTimeSheetsCommand, ListUserMobileKeysCommand, ListUserOrdersCommand, ListUserReservationsCommand, ListUserSpacesCommand, ListUsersCommand, ListVendorsCommand, ListWindowCoveringsCommand, LoginFinishCommand, LoginStartCommand, LogoutSelfCommand, LogoutUserCommand, MatchUserIdentificationCommand, OCRDocumentCommand, PurchaseReservationEarlyCheckInProductsCommand, PurchaseReservationLateCheckOutProductsCommand, PurchaseReservationPetProductsCommand, PurchaseReservationPromosCommand, PurchaseReservationRoomUpgradesCommand, RequestLoginTokenCommand, SendCheckInSMSCommand, SendCheckOutSMSCommand, SendPreArrivalEmailCommand, SendPreArrivalSMSCommand, SendRoomControlSMSCommand, SendVerificationCodeCommand, SetAlarmCommand, SetCameraCommand, SetCourtesyCommand, SetDimmerCommand, SetLockCommand, SetMediaSourceCommand, SetRoomSceneCommand, SetSceneCommand, SetSpaceSceneCommand, SetSwitchCommand, SetThermostatCommand, SetWindowCoveringCommand, StartRegisterPasskeyCommand, StartSOSCommand, StopSOSCommand, TipUserCommand, UpdateAlarmCommand, UpdateAnnouncementCommand, UpdateCameraCommand, UpdateCategoryCommand, UpdateCourtesyCommand, UpdateDimmerCommand, UpdateDiscoveredDeviceCommand, UpdateIssueCommand, UpdateLockCommand, UpdateMediaSourceCommand, UpdateMessageReadStatusCommand, UpdateOrganizationCommand, UpdatePolicyCommand, UpdatePropertyCommand, UpdatePropertySettingsCommand, UpdateReservationCommand, UpdateReservationExpectedArrivalTimeCommand, UpdateRoomCommand, UpdateSelfCommand, UpdateSpaceCommand, UpdateSwitchCommand, UpdateThermostatCommand, UpdateTicketCommand, UpdateTicketStatusCommand, UpdateTimeSheetCommand, UpdateTimeSheetTimeEntryCommand, UpdateUserCommand, UpdateVendorCommand, UpdateWindowCoveringCommand, UploadImageCommand, UpsertDiscoveredDeviceCommand } from './useCases.cjs';
|
|
2
|
+
|
|
3
|
+
declare class KohostHTTPClient {
|
|
4
|
+
static get defs(): {
|
|
5
|
+
apiKeyHeader: string;
|
|
6
|
+
propertyHeader: string;
|
|
7
|
+
organizationHeader: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
@param {Object} options - The options to create the client
|
|
11
|
+
@param {String} options.organizationId - The organization ID
|
|
12
|
+
@param {String} options.propertyId - The property ID
|
|
13
|
+
@param {String | URL} options.url - The base URL for the API endpint
|
|
14
|
+
@param {String} options.apiKey - The API key to use for requests
|
|
15
|
+
@param {Headers} options.headers - Additional headers to send with each request
|
|
16
|
+
@param {Function} options.onSuccess - A callback to handle successful responses
|
|
17
|
+
@param {Function} options.onError - A callback to handle errors
|
|
18
|
+
*/
|
|
19
|
+
constructor(options?: {
|
|
20
|
+
organizationId: string;
|
|
21
|
+
propertyId: string;
|
|
22
|
+
url: string | URL;
|
|
23
|
+
apiKey: string;
|
|
24
|
+
headers: Headers;
|
|
25
|
+
onSuccess: Function;
|
|
26
|
+
onError: Function;
|
|
27
|
+
});
|
|
28
|
+
options: {
|
|
29
|
+
organizationId: string;
|
|
30
|
+
propertyId: string;
|
|
31
|
+
url: string | URL;
|
|
32
|
+
apiKey: string;
|
|
33
|
+
headers: Headers;
|
|
34
|
+
onSuccess: Function;
|
|
35
|
+
onError: Function;
|
|
36
|
+
};
|
|
37
|
+
isAuthTokenRenewalActive: boolean;
|
|
38
|
+
baseUrl: URL;
|
|
39
|
+
headers: Headers;
|
|
40
|
+
/**
|
|
41
|
+
* @param {string} propertyId
|
|
42
|
+
* @returns {void}
|
|
43
|
+
* @memberof KohostApiClient
|
|
44
|
+
* @example
|
|
45
|
+
* client.propertyId = "1234";
|
|
46
|
+
*/
|
|
47
|
+
set propertyId(propertyId: string);
|
|
48
|
+
get propertyId(): string;
|
|
49
|
+
/**
|
|
50
|
+
* @param {string} orgId
|
|
51
|
+
* @returns {void}
|
|
52
|
+
* @memberof KohostApiClient
|
|
53
|
+
* @example
|
|
54
|
+
* client.organizationId = "1234";
|
|
55
|
+
*/
|
|
56
|
+
set organizationId(orgId: string);
|
|
57
|
+
get organizationId(): string;
|
|
58
|
+
callbacks: {};
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @param {"LoginRequired" | "PhoneVerificationRequired"} event
|
|
62
|
+
* @param {Function} callback
|
|
63
|
+
*/
|
|
64
|
+
on(event: "LoginRequired" | "PhoneVerificationRequired", callback: Function): void;
|
|
65
|
+
emit(event: any, ...args: any[]): void;
|
|
66
|
+
/**
|
|
67
|
+
* @typedef {keyof typeof import('./useCases')} CommandName
|
|
68
|
+
* @typedef {import('./useCases')[CommandName]} Command
|
|
69
|
+
*
|
|
70
|
+
* @param {Command} command
|
|
71
|
+
*/
|
|
72
|
+
send(command: typeof RefreshTokenCommand | typeof AssignSpaceToReservationCommand | typeof AutoAssociateDiscoveredDevicesCommand | typeof AutoCloseTicketsCommand | typeof BatchNotifyCheckInCommand | typeof BatchNotifyCheckOutCommand | typeof BatchNotifyMissedCheckOutCommand | typeof BatchNotifyPreArrivalCommand | typeof BulkUpdateIssueCommand | typeof CheckInReservationCommand | typeof CheckOutReservationCommand | typeof CheckVerificationCodeCommand | typeof CreateAlarmCommand | typeof CreateAnnouncementCommand | typeof CreateCameraCommand | typeof CreateCateoryCommand | typeof CreateCourtesyCommand | typeof CreateDefaultScenesCommand | typeof CreateDimmerCommand | typeof CreateDiscoveredDeviceCommand | typeof CreateDiscoveredDeviceAssociationCommand | typeof CreateDiscoveredDeviceAssociationMapCommand | typeof CreateImageUploadEndpointCommand | typeof CreateIssueCommand | typeof CreateLockCommand | typeof CreateMediaSourceCommand | typeof CreateOrganizationCommand | typeof CreatePolicyCommand | typeof CreatePropertyCommand | typeof CreateReservationCommand | typeof CreateRoomCommand | typeof CreateRoomInSpaceCommand | typeof CreateSceneCommand | typeof CreateSpaceCommand | typeof CreateSwitchCommand | typeof CreateThermostatCommand | typeof CreateTicketCommand | typeof CreateTicketMessageCommand | typeof CreateTimeSheetCommand | typeof CreateTimeSheetTimeEntryCommand | typeof CreateUserCommand | typeof CreateUserMobileKeyCommand | typeof CreateVendorCommand | typeof CreateWindowCoveringCommand | typeof DeleteAlarmCommand | typeof DeleteAnnouncementCommand | typeof DeleteCameraCommand | typeof DeleteCategoryCommand | typeof DeleteCourtesyCommand | typeof DeleteDimmerCommand | typeof DeleteDiscoveredDeviceCommand | typeof DeleteIssueCommand | typeof DeleteLockCommand | typeof DeleteMediaFileCommand | typeof DeleteMediaSourceCommand | typeof DeletePolicyCommand | typeof DeleteReservationCommand | typeof DeleteRoomCommand | typeof DeleteSpaceCommand | typeof DeleteSwitchCommand | typeof DeleteThermostatCommand | typeof DeleteTicketCommand | typeof DeleteTimeSheetCommand | typeof DeleteTimeSheetTimeEntryCommand | typeof DeleteUserCommand | typeof DeleteUserCredentialCommand | typeof DeleteVendorCommand | typeof DeleteWindowCoveringCommand | typeof DescribeAlarmCommand | typeof DescribeAlarmConfigCommand | typeof DescribeAnnouncementCommand | typeof DescribeCameraCommand | typeof DescribeCategoryCommand | typeof DescribeCourtesyCommand | typeof DescribeDimmerCommand | typeof DescribeDiscoveredDeviceCommand | typeof DescribeIssueCommand | typeof DescribeLockCommand | typeof DescribeLockCredentialCommand | typeof DescribeMediaSourceCommand | typeof DescribeMyAuthCommand | typeof DescribeMyMobileKeyAppCommand | typeof DescribeMyOrganizationCommand | typeof DescribeMyPasskeyRegistrationsCommand | typeof DescribeOrganizationCommand | typeof DescribePolicyCommand | typeof DescribeProductCommand | typeof DescribePropertyCommand | typeof DescribeReservationCommand | typeof DescribeReservationEarlyCheckInProductsCommand | typeof DescribeReservationLateCheckOutProductsCommand | typeof DescribeReservationPetProductsCommand | typeof DescribeReservationPromosCommand | typeof DescribeReservationRoomUpgradesCommand | typeof DescribeRoomCommand | typeof DescribeSOSCommand | typeof DescribeSelfCommand | typeof DescribeSpaceCommand | typeof DescribeSwitchCommand | typeof DescribeThermostatCommand | typeof DescribeTicketCommand | typeof DescribeTicketStatsCommand | typeof DescribeTimeSheetCommand | typeof DescribeTimeSheetStatsCommand | typeof DescribeUserCommand | typeof DescribeVendorCommand | typeof DescribeWindowCoveringCommand | typeof DiscoverReservationsCommand | typeof EmailUserAccountSetupCommand | typeof FinishRegisterPasskeyCommand | typeof ListAlarmsCommand | typeof ListAnnouncementsCommand | typeof ListCamerasCommand | typeof ListCategoriesCommand | typeof ListCourtesyCommand | typeof ListDimmersCommand | typeof ListDiscoveredDevicesCommand | typeof ListIssuesCommand | typeof ListLocksCommand | typeof ListMediaSourcesCommand | typeof ListMyOrdersCommand | typeof ListMyPropertiesCommand | typeof ListMyReservationsCommand | typeof ListMySpacesCommand | typeof ListMyTicketsCommand | typeof ListMyTimeSheetsCommand | typeof ListOrdersCommand | typeof ListOrganizationsCommand | typeof ListPoliciesCommand | typeof ListProductsCommand | typeof ListPropertiesCommand | typeof ListReservationsCommand | typeof ListRoomsCommand | typeof ListRoomsInSpaceCommand | typeof ListScenesCommand | typeof ListSpacesCommand | typeof ListSwitchesCommand | typeof ListTeamCommand | typeof ListThermostatsCommand | typeof ListTicketsCommand | typeof ListTimeSheetsCommand | typeof ListUserMobileKeysCommand | typeof ListUserOrdersCommand | typeof ListUserReservationsCommand | typeof ListUserSpacesCommand | typeof ListUsersCommand | typeof ListVendorsCommand | typeof ListWindowCoveringsCommand | typeof LoginFinishCommand | typeof LoginStartCommand | typeof LogoutSelfCommand | typeof LogoutUserCommand | typeof MatchUserIdentificationCommand | typeof OCRDocumentCommand | typeof PurchaseReservationEarlyCheckInProductsCommand | typeof PurchaseReservationLateCheckOutProductsCommand | typeof PurchaseReservationPetProductsCommand | typeof PurchaseReservationPromosCommand | typeof PurchaseReservationRoomUpgradesCommand | typeof RequestLoginTokenCommand | typeof SendCheckInSMSCommand | typeof SendCheckOutSMSCommand | typeof SendPreArrivalEmailCommand | typeof SendPreArrivalSMSCommand | typeof SendRoomControlSMSCommand | typeof SendVerificationCodeCommand | typeof SetAlarmCommand | typeof SetCameraCommand | typeof SetCourtesyCommand | typeof SetDimmerCommand | typeof SetLockCommand | typeof SetMediaSourceCommand | typeof SetRoomSceneCommand | typeof SetSceneCommand | typeof SetSpaceSceneCommand | typeof SetSwitchCommand | typeof SetThermostatCommand | typeof SetWindowCoveringCommand | typeof StartRegisterPasskeyCommand | typeof StartSOSCommand | typeof StopSOSCommand | typeof TipUserCommand | typeof UpdateAlarmCommand | typeof UpdateAnnouncementCommand | typeof UpdateCameraCommand | typeof UpdateCategoryCommand | typeof UpdateCourtesyCommand | typeof UpdateDimmerCommand | typeof UpdateDiscoveredDeviceCommand | typeof UpdateIssueCommand | typeof UpdateLockCommand | typeof UpdateMediaSourceCommand | typeof UpdateMessageReadStatusCommand | typeof UpdateOrganizationCommand | typeof UpdatePolicyCommand | typeof UpdatePropertyCommand | typeof UpdatePropertySettingsCommand | typeof UpdateReservationCommand | typeof UpdateReservationExpectedArrivalTimeCommand | typeof UpdateRoomCommand | typeof UpdateSelfCommand | typeof UpdateSpaceCommand | typeof UpdateSwitchCommand | typeof UpdateThermostatCommand | typeof UpdateTicketCommand | typeof UpdateTicketStatusCommand | typeof UpdateTimeSheetCommand | typeof UpdateTimeSheetTimeEntryCommand | typeof UpdateUserCommand | typeof UpdateVendorCommand | typeof UpdateWindowCoveringCommand | typeof UploadImageCommand | typeof UpsertDiscoveredDeviceCommand): any;
|
|
73
|
+
/**
|
|
74
|
+
* @param {Command} config
|
|
75
|
+
* @returns {Request}
|
|
76
|
+
*/
|
|
77
|
+
createRequest(config: typeof RefreshTokenCommand | typeof AssignSpaceToReservationCommand | typeof AutoAssociateDiscoveredDevicesCommand | typeof AutoCloseTicketsCommand | typeof BatchNotifyCheckInCommand | typeof BatchNotifyCheckOutCommand | typeof BatchNotifyMissedCheckOutCommand | typeof BatchNotifyPreArrivalCommand | typeof BulkUpdateIssueCommand | typeof CheckInReservationCommand | typeof CheckOutReservationCommand | typeof CheckVerificationCodeCommand | typeof CreateAlarmCommand | typeof CreateAnnouncementCommand | typeof CreateCameraCommand | typeof CreateCateoryCommand | typeof CreateCourtesyCommand | typeof CreateDefaultScenesCommand | typeof CreateDimmerCommand | typeof CreateDiscoveredDeviceCommand | typeof CreateDiscoveredDeviceAssociationCommand | typeof CreateDiscoveredDeviceAssociationMapCommand | typeof CreateImageUploadEndpointCommand | typeof CreateIssueCommand | typeof CreateLockCommand | typeof CreateMediaSourceCommand | typeof CreateOrganizationCommand | typeof CreatePolicyCommand | typeof CreatePropertyCommand | typeof CreateReservationCommand | typeof CreateRoomCommand | typeof CreateRoomInSpaceCommand | typeof CreateSceneCommand | typeof CreateSpaceCommand | typeof CreateSwitchCommand | typeof CreateThermostatCommand | typeof CreateTicketCommand | typeof CreateTicketMessageCommand | typeof CreateTimeSheetCommand | typeof CreateTimeSheetTimeEntryCommand | typeof CreateUserCommand | typeof CreateUserMobileKeyCommand | typeof CreateVendorCommand | typeof CreateWindowCoveringCommand | typeof DeleteAlarmCommand | typeof DeleteAnnouncementCommand | typeof DeleteCameraCommand | typeof DeleteCategoryCommand | typeof DeleteCourtesyCommand | typeof DeleteDimmerCommand | typeof DeleteDiscoveredDeviceCommand | typeof DeleteIssueCommand | typeof DeleteLockCommand | typeof DeleteMediaFileCommand | typeof DeleteMediaSourceCommand | typeof DeletePolicyCommand | typeof DeleteReservationCommand | typeof DeleteRoomCommand | typeof DeleteSpaceCommand | typeof DeleteSwitchCommand | typeof DeleteThermostatCommand | typeof DeleteTicketCommand | typeof DeleteTimeSheetCommand | typeof DeleteTimeSheetTimeEntryCommand | typeof DeleteUserCommand | typeof DeleteUserCredentialCommand | typeof DeleteVendorCommand | typeof DeleteWindowCoveringCommand | typeof DescribeAlarmCommand | typeof DescribeAlarmConfigCommand | typeof DescribeAnnouncementCommand | typeof DescribeCameraCommand | typeof DescribeCategoryCommand | typeof DescribeCourtesyCommand | typeof DescribeDimmerCommand | typeof DescribeDiscoveredDeviceCommand | typeof DescribeIssueCommand | typeof DescribeLockCommand | typeof DescribeLockCredentialCommand | typeof DescribeMediaSourceCommand | typeof DescribeMyAuthCommand | typeof DescribeMyMobileKeyAppCommand | typeof DescribeMyOrganizationCommand | typeof DescribeMyPasskeyRegistrationsCommand | typeof DescribeOrganizationCommand | typeof DescribePolicyCommand | typeof DescribeProductCommand | typeof DescribePropertyCommand | typeof DescribeReservationCommand | typeof DescribeReservationEarlyCheckInProductsCommand | typeof DescribeReservationLateCheckOutProductsCommand | typeof DescribeReservationPetProductsCommand | typeof DescribeReservationPromosCommand | typeof DescribeReservationRoomUpgradesCommand | typeof DescribeRoomCommand | typeof DescribeSOSCommand | typeof DescribeSelfCommand | typeof DescribeSpaceCommand | typeof DescribeSwitchCommand | typeof DescribeThermostatCommand | typeof DescribeTicketCommand | typeof DescribeTicketStatsCommand | typeof DescribeTimeSheetCommand | typeof DescribeTimeSheetStatsCommand | typeof DescribeUserCommand | typeof DescribeVendorCommand | typeof DescribeWindowCoveringCommand | typeof DiscoverReservationsCommand | typeof EmailUserAccountSetupCommand | typeof FinishRegisterPasskeyCommand | typeof ListAlarmsCommand | typeof ListAnnouncementsCommand | typeof ListCamerasCommand | typeof ListCategoriesCommand | typeof ListCourtesyCommand | typeof ListDimmersCommand | typeof ListDiscoveredDevicesCommand | typeof ListIssuesCommand | typeof ListLocksCommand | typeof ListMediaSourcesCommand | typeof ListMyOrdersCommand | typeof ListMyPropertiesCommand | typeof ListMyReservationsCommand | typeof ListMySpacesCommand | typeof ListMyTicketsCommand | typeof ListMyTimeSheetsCommand | typeof ListOrdersCommand | typeof ListOrganizationsCommand | typeof ListPoliciesCommand | typeof ListProductsCommand | typeof ListPropertiesCommand | typeof ListReservationsCommand | typeof ListRoomsCommand | typeof ListRoomsInSpaceCommand | typeof ListScenesCommand | typeof ListSpacesCommand | typeof ListSwitchesCommand | typeof ListTeamCommand | typeof ListThermostatsCommand | typeof ListTicketsCommand | typeof ListTimeSheetsCommand | typeof ListUserMobileKeysCommand | typeof ListUserOrdersCommand | typeof ListUserReservationsCommand | typeof ListUserSpacesCommand | typeof ListUsersCommand | typeof ListVendorsCommand | typeof ListWindowCoveringsCommand | typeof LoginFinishCommand | typeof LoginStartCommand | typeof LogoutSelfCommand | typeof LogoutUserCommand | typeof MatchUserIdentificationCommand | typeof OCRDocumentCommand | typeof PurchaseReservationEarlyCheckInProductsCommand | typeof PurchaseReservationLateCheckOutProductsCommand | typeof PurchaseReservationPetProductsCommand | typeof PurchaseReservationPromosCommand | typeof PurchaseReservationRoomUpgradesCommand | typeof RequestLoginTokenCommand | typeof SendCheckInSMSCommand | typeof SendCheckOutSMSCommand | typeof SendPreArrivalEmailCommand | typeof SendPreArrivalSMSCommand | typeof SendRoomControlSMSCommand | typeof SendVerificationCodeCommand | typeof SetAlarmCommand | typeof SetCameraCommand | typeof SetCourtesyCommand | typeof SetDimmerCommand | typeof SetLockCommand | typeof SetMediaSourceCommand | typeof SetRoomSceneCommand | typeof SetSceneCommand | typeof SetSpaceSceneCommand | typeof SetSwitchCommand | typeof SetThermostatCommand | typeof SetWindowCoveringCommand | typeof StartRegisterPasskeyCommand | typeof StartSOSCommand | typeof StopSOSCommand | typeof TipUserCommand | typeof UpdateAlarmCommand | typeof UpdateAnnouncementCommand | typeof UpdateCameraCommand | typeof UpdateCategoryCommand | typeof UpdateCourtesyCommand | typeof UpdateDimmerCommand | typeof UpdateDiscoveredDeviceCommand | typeof UpdateIssueCommand | typeof UpdateLockCommand | typeof UpdateMediaSourceCommand | typeof UpdateMessageReadStatusCommand | typeof UpdateOrganizationCommand | typeof UpdatePolicyCommand | typeof UpdatePropertyCommand | typeof UpdatePropertySettingsCommand | typeof UpdateReservationCommand | typeof UpdateReservationExpectedArrivalTimeCommand | typeof UpdateRoomCommand | typeof UpdateSelfCommand | typeof UpdateSpaceCommand | typeof UpdateSwitchCommand | typeof UpdateThermostatCommand | typeof UpdateTicketCommand | typeof UpdateTicketStatusCommand | typeof UpdateTimeSheetCommand | typeof UpdateTimeSheetTimeEntryCommand | typeof UpdateUserCommand | typeof UpdateVendorCommand | typeof UpdateWindowCoveringCommand | typeof UploadImageCommand | typeof UpsertDiscoveredDeviceCommand): Request;
|
|
78
|
+
#private;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { KohostHTTPClient };
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { RefreshTokenCommand, AssignSpaceToReservationCommand, AutoAssociateDiscoveredDevicesCommand, AutoCloseTicketsCommand, BatchNotifyCheckInCommand, BatchNotifyCheckOutCommand, BatchNotifyMissedCheckOutCommand, BatchNotifyPreArrivalCommand, BulkUpdateIssueCommand, CheckInReservationCommand, CheckOutReservationCommand, CheckVerificationCodeCommand, CreateAlarmCommand, CreateAnnouncementCommand, CreateCameraCommand, CreateCateoryCommand, CreateCourtesyCommand, CreateDefaultScenesCommand, CreateDimmerCommand, CreateDiscoveredDeviceCommand, CreateDiscoveredDeviceAssociationCommand, CreateDiscoveredDeviceAssociationMapCommand, CreateImageUploadEndpointCommand, CreateIssueCommand, CreateLockCommand, CreateMediaSourceCommand, CreateOrganizationCommand, CreatePolicyCommand, CreatePropertyCommand, CreateReservationCommand, CreateRoomCommand, CreateRoomInSpaceCommand, CreateSceneCommand, CreateSpaceCommand, CreateSwitchCommand, CreateThermostatCommand, CreateTicketCommand, CreateTicketMessageCommand, CreateTimeSheetCommand, CreateTimeSheetTimeEntryCommand, CreateUserCommand, CreateUserMobileKeyCommand, CreateVendorCommand, CreateWindowCoveringCommand, DeleteAlarmCommand, DeleteAnnouncementCommand, DeleteCameraCommand, DeleteCategoryCommand, DeleteCourtesyCommand, DeleteDimmerCommand, DeleteDiscoveredDeviceCommand, DeleteIssueCommand, DeleteLockCommand, DeleteMediaFileCommand, DeleteMediaSourceCommand, DeletePolicyCommand, DeleteReservationCommand, DeleteRoomCommand, DeleteSpaceCommand, DeleteSwitchCommand, DeleteThermostatCommand, DeleteTicketCommand, DeleteTimeSheetCommand, DeleteTimeSheetTimeEntryCommand, DeleteUserCommand, DeleteUserCredentialCommand, DeleteVendorCommand, DeleteWindowCoveringCommand, DescribeAlarmCommand, DescribeAlarmConfigCommand, DescribeAnnouncementCommand, DescribeCameraCommand, DescribeCategoryCommand, DescribeCourtesyCommand, DescribeDimmerCommand, DescribeDiscoveredDeviceCommand, DescribeIssueCommand, DescribeLockCommand, DescribeLockCredentialCommand, DescribeMediaSourceCommand, DescribeMyAuthCommand, DescribeMyMobileKeyAppCommand, DescribeMyOrganizationCommand, DescribeMyPasskeyRegistrationsCommand, DescribeOrganizationCommand, DescribePolicyCommand, DescribeProductCommand, DescribePropertyCommand, DescribeReservationCommand, DescribeReservationEarlyCheckInProductsCommand, DescribeReservationLateCheckOutProductsCommand, DescribeReservationPetProductsCommand, DescribeReservationPromosCommand, DescribeReservationRoomUpgradesCommand, DescribeRoomCommand, DescribeSOSCommand, DescribeSelfCommand, DescribeSpaceCommand, DescribeSwitchCommand, DescribeThermostatCommand, DescribeTicketCommand, DescribeTicketStatsCommand, DescribeTimeSheetCommand, DescribeTimeSheetStatsCommand, DescribeUserCommand, DescribeVendorCommand, DescribeWindowCoveringCommand, DiscoverReservationsCommand, EmailUserAccountSetupCommand, FinishRegisterPasskeyCommand, ListAlarmsCommand, ListAnnouncementsCommand, ListCamerasCommand, ListCategoriesCommand, ListCourtesyCommand, ListDimmersCommand, ListDiscoveredDevicesCommand, ListIssuesCommand, ListLocksCommand, ListMediaSourcesCommand, ListMyOrdersCommand, ListMyPropertiesCommand, ListMyReservationsCommand, ListMySpacesCommand, ListMyTicketsCommand, ListMyTimeSheetsCommand, ListOrdersCommand, ListOrganizationsCommand, ListPoliciesCommand, ListProductsCommand, ListPropertiesCommand, ListReservationsCommand, ListRoomsCommand, ListRoomsInSpaceCommand, ListScenesCommand, ListSpacesCommand, ListSwitchesCommand, ListTeamCommand, ListThermostatsCommand, ListTicketsCommand, ListTimeSheetsCommand, ListUserMobileKeysCommand, ListUserOrdersCommand, ListUserReservationsCommand, ListUserSpacesCommand, ListUsersCommand, ListVendorsCommand, ListWindowCoveringsCommand, LoginFinishCommand, LoginStartCommand, LogoutSelfCommand, LogoutUserCommand, MatchUserIdentificationCommand, OCRDocumentCommand, PurchaseReservationEarlyCheckInProductsCommand, PurchaseReservationLateCheckOutProductsCommand, PurchaseReservationPetProductsCommand, PurchaseReservationPromosCommand, PurchaseReservationRoomUpgradesCommand, RequestLoginTokenCommand, SendCheckInSMSCommand, SendCheckOutSMSCommand, SendPreArrivalEmailCommand, SendPreArrivalSMSCommand, SendRoomControlSMSCommand, SendVerificationCodeCommand, SetAlarmCommand, SetCameraCommand, SetCourtesyCommand, SetDimmerCommand, SetLockCommand, SetMediaSourceCommand, SetRoomSceneCommand, SetSceneCommand, SetSpaceSceneCommand, SetSwitchCommand, SetThermostatCommand, SetWindowCoveringCommand, StartRegisterPasskeyCommand, StartSOSCommand, StopSOSCommand, TipUserCommand, UpdateAlarmCommand, UpdateAnnouncementCommand, UpdateCameraCommand, UpdateCategoryCommand, UpdateCourtesyCommand, UpdateDimmerCommand, UpdateDiscoveredDeviceCommand, UpdateIssueCommand, UpdateLockCommand, UpdateMediaSourceCommand, UpdateMessageReadStatusCommand, UpdateOrganizationCommand, UpdatePolicyCommand, UpdatePropertyCommand, UpdatePropertySettingsCommand, UpdateReservationCommand, UpdateReservationExpectedArrivalTimeCommand, UpdateRoomCommand, UpdateSelfCommand, UpdateSpaceCommand, UpdateSwitchCommand, UpdateThermostatCommand, UpdateTicketCommand, UpdateTicketStatusCommand, UpdateTimeSheetCommand, UpdateTimeSheetTimeEntryCommand, UpdateUserCommand, UpdateVendorCommand, UpdateWindowCoveringCommand, UploadImageCommand, UpsertDiscoveredDeviceCommand } from './useCases.js';
|
|
2
|
+
|
|
3
|
+
declare class KohostHTTPClient {
|
|
4
|
+
static get defs(): {
|
|
5
|
+
apiKeyHeader: string;
|
|
6
|
+
propertyHeader: string;
|
|
7
|
+
organizationHeader: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
@param {Object} options - The options to create the client
|
|
11
|
+
@param {String} options.organizationId - The organization ID
|
|
12
|
+
@param {String} options.propertyId - The property ID
|
|
13
|
+
@param {String | URL} options.url - The base URL for the API endpint
|
|
14
|
+
@param {String} options.apiKey - The API key to use for requests
|
|
15
|
+
@param {Headers} options.headers - Additional headers to send with each request
|
|
16
|
+
@param {Function} options.onSuccess - A callback to handle successful responses
|
|
17
|
+
@param {Function} options.onError - A callback to handle errors
|
|
18
|
+
*/
|
|
19
|
+
constructor(options?: {
|
|
20
|
+
organizationId: string;
|
|
21
|
+
propertyId: string;
|
|
22
|
+
url: string | URL;
|
|
23
|
+
apiKey: string;
|
|
24
|
+
headers: Headers;
|
|
25
|
+
onSuccess: Function;
|
|
26
|
+
onError: Function;
|
|
27
|
+
});
|
|
28
|
+
options: {
|
|
29
|
+
organizationId: string;
|
|
30
|
+
propertyId: string;
|
|
31
|
+
url: string | URL;
|
|
32
|
+
apiKey: string;
|
|
33
|
+
headers: Headers;
|
|
34
|
+
onSuccess: Function;
|
|
35
|
+
onError: Function;
|
|
36
|
+
};
|
|
37
|
+
isAuthTokenRenewalActive: boolean;
|
|
38
|
+
baseUrl: URL;
|
|
39
|
+
headers: Headers;
|
|
40
|
+
/**
|
|
41
|
+
* @param {string} propertyId
|
|
42
|
+
* @returns {void}
|
|
43
|
+
* @memberof KohostApiClient
|
|
44
|
+
* @example
|
|
45
|
+
* client.propertyId = "1234";
|
|
46
|
+
*/
|
|
47
|
+
set propertyId(propertyId: string);
|
|
48
|
+
get propertyId(): string;
|
|
49
|
+
/**
|
|
50
|
+
* @param {string} orgId
|
|
51
|
+
* @returns {void}
|
|
52
|
+
* @memberof KohostApiClient
|
|
53
|
+
* @example
|
|
54
|
+
* client.organizationId = "1234";
|
|
55
|
+
*/
|
|
56
|
+
set organizationId(orgId: string);
|
|
57
|
+
get organizationId(): string;
|
|
58
|
+
callbacks: {};
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @param {"LoginRequired" | "PhoneVerificationRequired"} event
|
|
62
|
+
* @param {Function} callback
|
|
63
|
+
*/
|
|
64
|
+
on(event: "LoginRequired" | "PhoneVerificationRequired", callback: Function): void;
|
|
65
|
+
emit(event: any, ...args: any[]): void;
|
|
66
|
+
/**
|
|
67
|
+
* @typedef {keyof typeof import('./useCases')} CommandName
|
|
68
|
+
* @typedef {import('./useCases')[CommandName]} Command
|
|
69
|
+
*
|
|
70
|
+
* @param {Command} command
|
|
71
|
+
*/
|
|
72
|
+
send(command: typeof RefreshTokenCommand | typeof AssignSpaceToReservationCommand | typeof AutoAssociateDiscoveredDevicesCommand | typeof AutoCloseTicketsCommand | typeof BatchNotifyCheckInCommand | typeof BatchNotifyCheckOutCommand | typeof BatchNotifyMissedCheckOutCommand | typeof BatchNotifyPreArrivalCommand | typeof BulkUpdateIssueCommand | typeof CheckInReservationCommand | typeof CheckOutReservationCommand | typeof CheckVerificationCodeCommand | typeof CreateAlarmCommand | typeof CreateAnnouncementCommand | typeof CreateCameraCommand | typeof CreateCateoryCommand | typeof CreateCourtesyCommand | typeof CreateDefaultScenesCommand | typeof CreateDimmerCommand | typeof CreateDiscoveredDeviceCommand | typeof CreateDiscoveredDeviceAssociationCommand | typeof CreateDiscoveredDeviceAssociationMapCommand | typeof CreateImageUploadEndpointCommand | typeof CreateIssueCommand | typeof CreateLockCommand | typeof CreateMediaSourceCommand | typeof CreateOrganizationCommand | typeof CreatePolicyCommand | typeof CreatePropertyCommand | typeof CreateReservationCommand | typeof CreateRoomCommand | typeof CreateRoomInSpaceCommand | typeof CreateSceneCommand | typeof CreateSpaceCommand | typeof CreateSwitchCommand | typeof CreateThermostatCommand | typeof CreateTicketCommand | typeof CreateTicketMessageCommand | typeof CreateTimeSheetCommand | typeof CreateTimeSheetTimeEntryCommand | typeof CreateUserCommand | typeof CreateUserMobileKeyCommand | typeof CreateVendorCommand | typeof CreateWindowCoveringCommand | typeof DeleteAlarmCommand | typeof DeleteAnnouncementCommand | typeof DeleteCameraCommand | typeof DeleteCategoryCommand | typeof DeleteCourtesyCommand | typeof DeleteDimmerCommand | typeof DeleteDiscoveredDeviceCommand | typeof DeleteIssueCommand | typeof DeleteLockCommand | typeof DeleteMediaFileCommand | typeof DeleteMediaSourceCommand | typeof DeletePolicyCommand | typeof DeleteReservationCommand | typeof DeleteRoomCommand | typeof DeleteSpaceCommand | typeof DeleteSwitchCommand | typeof DeleteThermostatCommand | typeof DeleteTicketCommand | typeof DeleteTimeSheetCommand | typeof DeleteTimeSheetTimeEntryCommand | typeof DeleteUserCommand | typeof DeleteUserCredentialCommand | typeof DeleteVendorCommand | typeof DeleteWindowCoveringCommand | typeof DescribeAlarmCommand | typeof DescribeAlarmConfigCommand | typeof DescribeAnnouncementCommand | typeof DescribeCameraCommand | typeof DescribeCategoryCommand | typeof DescribeCourtesyCommand | typeof DescribeDimmerCommand | typeof DescribeDiscoveredDeviceCommand | typeof DescribeIssueCommand | typeof DescribeLockCommand | typeof DescribeLockCredentialCommand | typeof DescribeMediaSourceCommand | typeof DescribeMyAuthCommand | typeof DescribeMyMobileKeyAppCommand | typeof DescribeMyOrganizationCommand | typeof DescribeMyPasskeyRegistrationsCommand | typeof DescribeOrganizationCommand | typeof DescribePolicyCommand | typeof DescribeProductCommand | typeof DescribePropertyCommand | typeof DescribeReservationCommand | typeof DescribeReservationEarlyCheckInProductsCommand | typeof DescribeReservationLateCheckOutProductsCommand | typeof DescribeReservationPetProductsCommand | typeof DescribeReservationPromosCommand | typeof DescribeReservationRoomUpgradesCommand | typeof DescribeRoomCommand | typeof DescribeSOSCommand | typeof DescribeSelfCommand | typeof DescribeSpaceCommand | typeof DescribeSwitchCommand | typeof DescribeThermostatCommand | typeof DescribeTicketCommand | typeof DescribeTicketStatsCommand | typeof DescribeTimeSheetCommand | typeof DescribeTimeSheetStatsCommand | typeof DescribeUserCommand | typeof DescribeVendorCommand | typeof DescribeWindowCoveringCommand | typeof DiscoverReservationsCommand | typeof EmailUserAccountSetupCommand | typeof FinishRegisterPasskeyCommand | typeof ListAlarmsCommand | typeof ListAnnouncementsCommand | typeof ListCamerasCommand | typeof ListCategoriesCommand | typeof ListCourtesyCommand | typeof ListDimmersCommand | typeof ListDiscoveredDevicesCommand | typeof ListIssuesCommand | typeof ListLocksCommand | typeof ListMediaSourcesCommand | typeof ListMyOrdersCommand | typeof ListMyPropertiesCommand | typeof ListMyReservationsCommand | typeof ListMySpacesCommand | typeof ListMyTicketsCommand | typeof ListMyTimeSheetsCommand | typeof ListOrdersCommand | typeof ListOrganizationsCommand | typeof ListPoliciesCommand | typeof ListProductsCommand | typeof ListPropertiesCommand | typeof ListReservationsCommand | typeof ListRoomsCommand | typeof ListRoomsInSpaceCommand | typeof ListScenesCommand | typeof ListSpacesCommand | typeof ListSwitchesCommand | typeof ListTeamCommand | typeof ListThermostatsCommand | typeof ListTicketsCommand | typeof ListTimeSheetsCommand | typeof ListUserMobileKeysCommand | typeof ListUserOrdersCommand | typeof ListUserReservationsCommand | typeof ListUserSpacesCommand | typeof ListUsersCommand | typeof ListVendorsCommand | typeof ListWindowCoveringsCommand | typeof LoginFinishCommand | typeof LoginStartCommand | typeof LogoutSelfCommand | typeof LogoutUserCommand | typeof MatchUserIdentificationCommand | typeof OCRDocumentCommand | typeof PurchaseReservationEarlyCheckInProductsCommand | typeof PurchaseReservationLateCheckOutProductsCommand | typeof PurchaseReservationPetProductsCommand | typeof PurchaseReservationPromosCommand | typeof PurchaseReservationRoomUpgradesCommand | typeof RequestLoginTokenCommand | typeof SendCheckInSMSCommand | typeof SendCheckOutSMSCommand | typeof SendPreArrivalEmailCommand | typeof SendPreArrivalSMSCommand | typeof SendRoomControlSMSCommand | typeof SendVerificationCodeCommand | typeof SetAlarmCommand | typeof SetCameraCommand | typeof SetCourtesyCommand | typeof SetDimmerCommand | typeof SetLockCommand | typeof SetMediaSourceCommand | typeof SetRoomSceneCommand | typeof SetSceneCommand | typeof SetSpaceSceneCommand | typeof SetSwitchCommand | typeof SetThermostatCommand | typeof SetWindowCoveringCommand | typeof StartRegisterPasskeyCommand | typeof StartSOSCommand | typeof StopSOSCommand | typeof TipUserCommand | typeof UpdateAlarmCommand | typeof UpdateAnnouncementCommand | typeof UpdateCameraCommand | typeof UpdateCategoryCommand | typeof UpdateCourtesyCommand | typeof UpdateDimmerCommand | typeof UpdateDiscoveredDeviceCommand | typeof UpdateIssueCommand | typeof UpdateLockCommand | typeof UpdateMediaSourceCommand | typeof UpdateMessageReadStatusCommand | typeof UpdateOrganizationCommand | typeof UpdatePolicyCommand | typeof UpdatePropertyCommand | typeof UpdatePropertySettingsCommand | typeof UpdateReservationCommand | typeof UpdateReservationExpectedArrivalTimeCommand | typeof UpdateRoomCommand | typeof UpdateSelfCommand | typeof UpdateSpaceCommand | typeof UpdateSwitchCommand | typeof UpdateThermostatCommand | typeof UpdateTicketCommand | typeof UpdateTicketStatusCommand | typeof UpdateTimeSheetCommand | typeof UpdateTimeSheetTimeEntryCommand | typeof UpdateUserCommand | typeof UpdateVendorCommand | typeof UpdateWindowCoveringCommand | typeof UploadImageCommand | typeof UpsertDiscoveredDeviceCommand): any;
|
|
73
|
+
/**
|
|
74
|
+
* @param {Command} config
|
|
75
|
+
* @returns {Request}
|
|
76
|
+
*/
|
|
77
|
+
createRequest(config: typeof RefreshTokenCommand | typeof AssignSpaceToReservationCommand | typeof AutoAssociateDiscoveredDevicesCommand | typeof AutoCloseTicketsCommand | typeof BatchNotifyCheckInCommand | typeof BatchNotifyCheckOutCommand | typeof BatchNotifyMissedCheckOutCommand | typeof BatchNotifyPreArrivalCommand | typeof BulkUpdateIssueCommand | typeof CheckInReservationCommand | typeof CheckOutReservationCommand | typeof CheckVerificationCodeCommand | typeof CreateAlarmCommand | typeof CreateAnnouncementCommand | typeof CreateCameraCommand | typeof CreateCateoryCommand | typeof CreateCourtesyCommand | typeof CreateDefaultScenesCommand | typeof CreateDimmerCommand | typeof CreateDiscoveredDeviceCommand | typeof CreateDiscoveredDeviceAssociationCommand | typeof CreateDiscoveredDeviceAssociationMapCommand | typeof CreateImageUploadEndpointCommand | typeof CreateIssueCommand | typeof CreateLockCommand | typeof CreateMediaSourceCommand | typeof CreateOrganizationCommand | typeof CreatePolicyCommand | typeof CreatePropertyCommand | typeof CreateReservationCommand | typeof CreateRoomCommand | typeof CreateRoomInSpaceCommand | typeof CreateSceneCommand | typeof CreateSpaceCommand | typeof CreateSwitchCommand | typeof CreateThermostatCommand | typeof CreateTicketCommand | typeof CreateTicketMessageCommand | typeof CreateTimeSheetCommand | typeof CreateTimeSheetTimeEntryCommand | typeof CreateUserCommand | typeof CreateUserMobileKeyCommand | typeof CreateVendorCommand | typeof CreateWindowCoveringCommand | typeof DeleteAlarmCommand | typeof DeleteAnnouncementCommand | typeof DeleteCameraCommand | typeof DeleteCategoryCommand | typeof DeleteCourtesyCommand | typeof DeleteDimmerCommand | typeof DeleteDiscoveredDeviceCommand | typeof DeleteIssueCommand | typeof DeleteLockCommand | typeof DeleteMediaFileCommand | typeof DeleteMediaSourceCommand | typeof DeletePolicyCommand | typeof DeleteReservationCommand | typeof DeleteRoomCommand | typeof DeleteSpaceCommand | typeof DeleteSwitchCommand | typeof DeleteThermostatCommand | typeof DeleteTicketCommand | typeof DeleteTimeSheetCommand | typeof DeleteTimeSheetTimeEntryCommand | typeof DeleteUserCommand | typeof DeleteUserCredentialCommand | typeof DeleteVendorCommand | typeof DeleteWindowCoveringCommand | typeof DescribeAlarmCommand | typeof DescribeAlarmConfigCommand | typeof DescribeAnnouncementCommand | typeof DescribeCameraCommand | typeof DescribeCategoryCommand | typeof DescribeCourtesyCommand | typeof DescribeDimmerCommand | typeof DescribeDiscoveredDeviceCommand | typeof DescribeIssueCommand | typeof DescribeLockCommand | typeof DescribeLockCredentialCommand | typeof DescribeMediaSourceCommand | typeof DescribeMyAuthCommand | typeof DescribeMyMobileKeyAppCommand | typeof DescribeMyOrganizationCommand | typeof DescribeMyPasskeyRegistrationsCommand | typeof DescribeOrganizationCommand | typeof DescribePolicyCommand | typeof DescribeProductCommand | typeof DescribePropertyCommand | typeof DescribeReservationCommand | typeof DescribeReservationEarlyCheckInProductsCommand | typeof DescribeReservationLateCheckOutProductsCommand | typeof DescribeReservationPetProductsCommand | typeof DescribeReservationPromosCommand | typeof DescribeReservationRoomUpgradesCommand | typeof DescribeRoomCommand | typeof DescribeSOSCommand | typeof DescribeSelfCommand | typeof DescribeSpaceCommand | typeof DescribeSwitchCommand | typeof DescribeThermostatCommand | typeof DescribeTicketCommand | typeof DescribeTicketStatsCommand | typeof DescribeTimeSheetCommand | typeof DescribeTimeSheetStatsCommand | typeof DescribeUserCommand | typeof DescribeVendorCommand | typeof DescribeWindowCoveringCommand | typeof DiscoverReservationsCommand | typeof EmailUserAccountSetupCommand | typeof FinishRegisterPasskeyCommand | typeof ListAlarmsCommand | typeof ListAnnouncementsCommand | typeof ListCamerasCommand | typeof ListCategoriesCommand | typeof ListCourtesyCommand | typeof ListDimmersCommand | typeof ListDiscoveredDevicesCommand | typeof ListIssuesCommand | typeof ListLocksCommand | typeof ListMediaSourcesCommand | typeof ListMyOrdersCommand | typeof ListMyPropertiesCommand | typeof ListMyReservationsCommand | typeof ListMySpacesCommand | typeof ListMyTicketsCommand | typeof ListMyTimeSheetsCommand | typeof ListOrdersCommand | typeof ListOrganizationsCommand | typeof ListPoliciesCommand | typeof ListProductsCommand | typeof ListPropertiesCommand | typeof ListReservationsCommand | typeof ListRoomsCommand | typeof ListRoomsInSpaceCommand | typeof ListScenesCommand | typeof ListSpacesCommand | typeof ListSwitchesCommand | typeof ListTeamCommand | typeof ListThermostatsCommand | typeof ListTicketsCommand | typeof ListTimeSheetsCommand | typeof ListUserMobileKeysCommand | typeof ListUserOrdersCommand | typeof ListUserReservationsCommand | typeof ListUserSpacesCommand | typeof ListUsersCommand | typeof ListVendorsCommand | typeof ListWindowCoveringsCommand | typeof LoginFinishCommand | typeof LoginStartCommand | typeof LogoutSelfCommand | typeof LogoutUserCommand | typeof MatchUserIdentificationCommand | typeof OCRDocumentCommand | typeof PurchaseReservationEarlyCheckInProductsCommand | typeof PurchaseReservationLateCheckOutProductsCommand | typeof PurchaseReservationPetProductsCommand | typeof PurchaseReservationPromosCommand | typeof PurchaseReservationRoomUpgradesCommand | typeof RequestLoginTokenCommand | typeof SendCheckInSMSCommand | typeof SendCheckOutSMSCommand | typeof SendPreArrivalEmailCommand | typeof SendPreArrivalSMSCommand | typeof SendRoomControlSMSCommand | typeof SendVerificationCodeCommand | typeof SetAlarmCommand | typeof SetCameraCommand | typeof SetCourtesyCommand | typeof SetDimmerCommand | typeof SetLockCommand | typeof SetMediaSourceCommand | typeof SetRoomSceneCommand | typeof SetSceneCommand | typeof SetSpaceSceneCommand | typeof SetSwitchCommand | typeof SetThermostatCommand | typeof SetWindowCoveringCommand | typeof StartRegisterPasskeyCommand | typeof StartSOSCommand | typeof StopSOSCommand | typeof TipUserCommand | typeof UpdateAlarmCommand | typeof UpdateAnnouncementCommand | typeof UpdateCameraCommand | typeof UpdateCategoryCommand | typeof UpdateCourtesyCommand | typeof UpdateDimmerCommand | typeof UpdateDiscoveredDeviceCommand | typeof UpdateIssueCommand | typeof UpdateLockCommand | typeof UpdateMediaSourceCommand | typeof UpdateMessageReadStatusCommand | typeof UpdateOrganizationCommand | typeof UpdatePolicyCommand | typeof UpdatePropertyCommand | typeof UpdatePropertySettingsCommand | typeof UpdateReservationCommand | typeof UpdateReservationExpectedArrivalTimeCommand | typeof UpdateRoomCommand | typeof UpdateSelfCommand | typeof UpdateSpaceCommand | typeof UpdateSwitchCommand | typeof UpdateThermostatCommand | typeof UpdateTicketCommand | typeof UpdateTicketStatusCommand | typeof UpdateTimeSheetCommand | typeof UpdateTimeSheetTimeEntryCommand | typeof UpdateUserCommand | typeof UpdateVendorCommand | typeof UpdateWindowCoveringCommand | typeof UploadImageCommand | typeof UpsertDiscoveredDeviceCommand): Request;
|
|
78
|
+
#private;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { KohostHTTPClient };
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RefreshTokenCommand
|
|
3
|
+
} from "./chunk-UZQ2AWUY.js";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "./chunk-FU4IK6I4.js";
|
|
7
|
+
|
|
8
|
+
// src/httpClient.js
|
|
9
|
+
var KohostHTTPClient = class _KohostHTTPClient {
|
|
10
|
+
static {
|
|
11
|
+
__name(this, "KohostHTTPClient");
|
|
12
|
+
}
|
|
13
|
+
#onSuccess;
|
|
14
|
+
#onError;
|
|
15
|
+
/**
|
|
16
|
+
@param {Object} options - The options to create the client
|
|
17
|
+
@param {String} options.organizationId - The organization ID
|
|
18
|
+
@param {String} options.propertyId - The property ID
|
|
19
|
+
@param {String | URL} options.url - The base URL for the API endpint
|
|
20
|
+
@param {String} options.apiKey - The API key to use for requests
|
|
21
|
+
@param {Headers} options.headers - Additional headers to send with each request
|
|
22
|
+
@param {Function} options.onSuccess - A callback to handle successful responses
|
|
23
|
+
@param {Function} options.onError - A callback to handle errors
|
|
24
|
+
*/
|
|
25
|
+
constructor(options = {
|
|
26
|
+
url: "",
|
|
27
|
+
propertyId: "",
|
|
28
|
+
organizationId: "",
|
|
29
|
+
apiKey: "",
|
|
30
|
+
headers: new Headers({}),
|
|
31
|
+
onSuccess: /* @__PURE__ */ __name((response) => response, "onSuccess"),
|
|
32
|
+
onError: /* @__PURE__ */ __name((error) => error, "onError")
|
|
33
|
+
}) {
|
|
34
|
+
if (!options.url) throw new Error("options.url is required");
|
|
35
|
+
this.options = options;
|
|
36
|
+
this.isAuthTokenRenewalActive = false;
|
|
37
|
+
this.baseUrl = new URL(options.url);
|
|
38
|
+
this.headers = new Headers({
|
|
39
|
+
"Content-Type": "application/json",
|
|
40
|
+
Accept: "application/json",
|
|
41
|
+
...options.headers
|
|
42
|
+
});
|
|
43
|
+
if (options.apiKey) {
|
|
44
|
+
this.headers.set(_KohostHTTPClient.defs.apiKeyHeader, options.apiKey);
|
|
45
|
+
}
|
|
46
|
+
if (options.propertyId) {
|
|
47
|
+
this.propertyId = options.propertyId;
|
|
48
|
+
}
|
|
49
|
+
if (options.organizationId) {
|
|
50
|
+
this.organizationId = options.organizationId;
|
|
51
|
+
}
|
|
52
|
+
this.#onSuccess = options.onSuccess ? options.onSuccess : (response) => response;
|
|
53
|
+
this.#onError = options.onError ? options.onError : (error) => error;
|
|
54
|
+
this.callbacks = {};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @param {"LoginRequired" | "PhoneVerificationRequired"} event
|
|
59
|
+
* @param {Function} callback
|
|
60
|
+
*/
|
|
61
|
+
on(event, callback) {
|
|
62
|
+
if (typeof callback !== "function") {
|
|
63
|
+
throw new Error("Callback must be a function");
|
|
64
|
+
}
|
|
65
|
+
if (!this.callbacks[event]) {
|
|
66
|
+
this.callbacks[event] = [];
|
|
67
|
+
}
|
|
68
|
+
this.callbacks[event].push(callback);
|
|
69
|
+
}
|
|
70
|
+
emit(event, ...args) {
|
|
71
|
+
if (this.callbacks[event]) {
|
|
72
|
+
this.callbacks[event].forEach((callback) => callback(...args));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @param {string} orgId
|
|
77
|
+
* @returns {void}
|
|
78
|
+
* @memberof KohostApiClient
|
|
79
|
+
* @example
|
|
80
|
+
* client.organizationId = "1234";
|
|
81
|
+
*/
|
|
82
|
+
set organizationId(orgId) {
|
|
83
|
+
const key = _KohostHTTPClient.defs.organizationHeader;
|
|
84
|
+
this.headers.set(key, orgId);
|
|
85
|
+
}
|
|
86
|
+
get organizationId() {
|
|
87
|
+
const key = _KohostHTTPClient.defs.organizationHeader;
|
|
88
|
+
return this.headers.get(key);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @param {string} propertyId
|
|
92
|
+
* @returns {void}
|
|
93
|
+
* @memberof KohostApiClient
|
|
94
|
+
* @example
|
|
95
|
+
* client.propertyId = "1234";
|
|
96
|
+
*/
|
|
97
|
+
set propertyId(propertyId) {
|
|
98
|
+
const key = _KohostHTTPClient.defs.propertyHeader;
|
|
99
|
+
this.headers.set(key, propertyId);
|
|
100
|
+
}
|
|
101
|
+
get propertyId() {
|
|
102
|
+
const key = _KohostHTTPClient.defs.propertyHeader;
|
|
103
|
+
return this.headers.get(key);
|
|
104
|
+
}
|
|
105
|
+
static get defs() {
|
|
106
|
+
return {
|
|
107
|
+
apiKeyHeader: "X-Api-Key",
|
|
108
|
+
propertyHeader: "X-Property-Id",
|
|
109
|
+
organizationHeader: "X-Organization-Id"
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @typedef {keyof typeof import('./useCases')} CommandName
|
|
114
|
+
* @typedef {import('./useCases')[CommandName]} Command
|
|
115
|
+
*
|
|
116
|
+
* @param {Command} command
|
|
117
|
+
*/
|
|
118
|
+
async send(command) {
|
|
119
|
+
const commandConfig = command.config;
|
|
120
|
+
const request = this.createRequest(commandConfig);
|
|
121
|
+
const response = await fetch(request);
|
|
122
|
+
const isJsonResponse = response.headers.get("Content-Type")?.includes("application/json") || false;
|
|
123
|
+
const responseData = isJsonResponse ? await response.json() : response.body;
|
|
124
|
+
if (!response.ok) {
|
|
125
|
+
let error = responseData?.error || new Error(response.statusText);
|
|
126
|
+
const status = response.status;
|
|
127
|
+
const errorType = responseData.error?.type;
|
|
128
|
+
const errorMessage = responseData?.error?.message;
|
|
129
|
+
try {
|
|
130
|
+
const expectedError = status >= 400 && status < 500;
|
|
131
|
+
const newTokensNeeded = expectedError && errorType === "TokenExpiredError";
|
|
132
|
+
if (expectedError && errorMessage === "Phone Verification is required") {
|
|
133
|
+
this.#onPhoneVerificationRequired();
|
|
134
|
+
return Promise.reject(error);
|
|
135
|
+
}
|
|
136
|
+
if (expectedError && errorMessage === "Login Required") {
|
|
137
|
+
this.#onLoginRequired();
|
|
138
|
+
return Promise.reject(error);
|
|
139
|
+
}
|
|
140
|
+
if (expectedError && errorMessage === "No auth header or cookie provided") {
|
|
141
|
+
this.#onLoginRequired();
|
|
142
|
+
return Promise.reject(error);
|
|
143
|
+
}
|
|
144
|
+
if (expectedError && newTokensNeeded) {
|
|
145
|
+
while (!this.isAuthTokenRenewalActive) {
|
|
146
|
+
this.isAuthTokenRenewalActive = true;
|
|
147
|
+
return this.send(
|
|
148
|
+
new RefreshTokenCommand({
|
|
149
|
+
data: commandConfig.data,
|
|
150
|
+
query: commandConfig.params,
|
|
151
|
+
headers: commandConfig.headers
|
|
152
|
+
})
|
|
153
|
+
).then(() => {
|
|
154
|
+
this.isAuthTokenRenewalActive = false;
|
|
155
|
+
return fetch(request.clone());
|
|
156
|
+
}).catch((err) => {
|
|
157
|
+
this.isAuthTokenRenewalActive = false;
|
|
158
|
+
return Promise.reject(err);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} catch (error2) {
|
|
163
|
+
console.error(error2);
|
|
164
|
+
}
|
|
165
|
+
error = this.#onError(error);
|
|
166
|
+
return Promise.reject(error);
|
|
167
|
+
}
|
|
168
|
+
return this.#onSuccess(responseData);
|
|
169
|
+
}
|
|
170
|
+
#onLoginRequired() {
|
|
171
|
+
this.emit("LoginRequired");
|
|
172
|
+
}
|
|
173
|
+
#onPhoneVerificationRequired() {
|
|
174
|
+
this.emit("PhoneVerificationRequired");
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @param {Command} config
|
|
178
|
+
* @returns {Request}
|
|
179
|
+
*/
|
|
180
|
+
createRequest(config) {
|
|
181
|
+
if (typeof config.headers !== "object") {
|
|
182
|
+
config.headers = {};
|
|
183
|
+
}
|
|
184
|
+
let apiPath = config.url;
|
|
185
|
+
if (apiPath.startsWith("/")) {
|
|
186
|
+
apiPath = `.${apiPath}`;
|
|
187
|
+
}
|
|
188
|
+
const url = new URL(apiPath, this.baseUrl);
|
|
189
|
+
const method = config.method.toUpperCase() || "GET";
|
|
190
|
+
if (config.params && typeof config.params === "object") {
|
|
191
|
+
Object.entries(config.params).forEach(([key, value]) => {
|
|
192
|
+
if (Array.isArray(value)) {
|
|
193
|
+
value.forEach((item) => {
|
|
194
|
+
if (typeof item === "object" && item !== null) {
|
|
195
|
+
Object.entries(item).forEach(([itemKey, itemValue]) => {
|
|
196
|
+
url.searchParams.append(`${key}[][${itemKey}]`, itemValue);
|
|
197
|
+
});
|
|
198
|
+
} else {
|
|
199
|
+
url.searchParams.append(`${key}[]`, item);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
} else if (value === null || value === void 0) {
|
|
203
|
+
url.searchParams.append(key, "");
|
|
204
|
+
} else if (typeof value === "object") {
|
|
205
|
+
Object.entries(value).forEach(([nestedKey, nestedValue]) => {
|
|
206
|
+
if (Array.isArray(nestedValue)) {
|
|
207
|
+
nestedValue.forEach((item) => {
|
|
208
|
+
url.searchParams.append(`${key}[${nestedKey}][]`, item);
|
|
209
|
+
});
|
|
210
|
+
} else {
|
|
211
|
+
url.searchParams.append(`${key}[${nestedKey}]`, nestedValue);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
} else {
|
|
215
|
+
url.searchParams.append(key, value);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
const headers = new Headers(this.headers);
|
|
220
|
+
if (config.headers) {
|
|
221
|
+
Object.keys(config.headers).forEach((key) => {
|
|
222
|
+
headers.set(key, config.headers[key]);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
const body = ["POST", "PUT", "PATCH"].includes(method) ? headers.get("Content-Type") === "application/json" ? JSON.stringify(config.data) : config.data : void 0;
|
|
226
|
+
const request = new Request(url, {
|
|
227
|
+
method,
|
|
228
|
+
headers,
|
|
229
|
+
credentials: "include",
|
|
230
|
+
body
|
|
231
|
+
});
|
|
232
|
+
return request;
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
export {
|
|
236
|
+
KohostHTTPClient
|
|
237
|
+
};
|
|
238
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/httpClient.js"],"sourcesContent":["import { RefreshTokenCommand } from \"./useCases/refreshToken\";\n\nexport class KohostHTTPClient {\n #onSuccess;\n #onError;\n\n /** \n @param {Object} options - The options to create the client\n @param {String} options.organizationId - The organization ID\n @param {String} options.propertyId - The property ID\n @param {String | URL} options.url - The base URL for the API endpint\n @param {String} options.apiKey - The API key to use for requests\n @param {Headers} options.headers - Additional headers to send with each request\n @param {Function} options.onSuccess - A callback to handle successful responses\n @param {Function} options.onError - A callback to handle errors\n */\n constructor(\n options = {\n url: \"\",\n propertyId: \"\",\n organizationId: \"\",\n apiKey: \"\",\n headers: new Headers({}),\n onSuccess: (response) => response,\n onError: (error) => error,\n },\n ) {\n if (!options.url) throw new Error(\"options.url is required\");\n this.options = options;\n\n this.isAuthTokenRenewalActive = false;\n\n this.baseUrl = new URL(options.url);\n this.headers = new Headers({\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n ...options.headers,\n });\n\n if (options.apiKey) {\n this.headers.set(KohostHTTPClient.defs.apiKeyHeader, options.apiKey);\n }\n\n if (options.propertyId) {\n this.propertyId = options.propertyId;\n }\n\n if (options.organizationId) {\n this.organizationId = options.organizationId;\n }\n\n this.#onSuccess = options.onSuccess\n ? options.onSuccess\n : (response) => response;\n\n this.#onError = options.onError ? options.onError : (error) => error;\n\n this.callbacks = {};\n }\n\n /**\n *\n * @param {\"LoginRequired\" | \"PhoneVerificationRequired\"} event\n * @param {Function} callback\n */\n on(event, callback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Callback must be a function\");\n }\n if (!this.callbacks[event]) {\n this.callbacks[event] = [];\n }\n this.callbacks[event].push(callback);\n }\n\n emit(event, ...args) {\n if (this.callbacks[event]) {\n this.callbacks[event].forEach((callback) => callback(...args));\n }\n }\n\n /**\n * @param {string} orgId\n * @returns {void}\n * @memberof KohostApiClient\n * @example\n * client.organizationId = \"1234\";\n */\n set organizationId(orgId) {\n const key = KohostHTTPClient.defs.organizationHeader;\n this.headers.set(key, orgId);\n }\n\n get organizationId() {\n const key = KohostHTTPClient.defs.organizationHeader;\n return this.headers.get(key);\n }\n\n /**\n * @param {string} propertyId\n * @returns {void}\n * @memberof KohostApiClient\n * @example\n * client.propertyId = \"1234\";\n */\n\n set propertyId(propertyId) {\n const key = KohostHTTPClient.defs.propertyHeader;\n this.headers.set(key, propertyId);\n }\n\n get propertyId() {\n const key = KohostHTTPClient.defs.propertyHeader;\n return this.headers.get(key);\n }\n\n static get defs() {\n return {\n apiKeyHeader: \"X-Api-Key\",\n propertyHeader: \"X-Property-Id\",\n organizationHeader: \"X-Organization-Id\",\n };\n }\n\n /**\n * @typedef {keyof typeof import('./useCases')} CommandName\n * @typedef {import('./useCases')[CommandName]} Command\n *\n * @param {Command} command\n */\n async send(command) {\n const commandConfig = command.config;\n const request = this.createRequest(commandConfig);\n const response = await fetch(request);\n\n const isJsonResponse =\n response.headers.get(\"Content-Type\")?.includes(\"application/json\") ||\n false;\n\n const responseData = isJsonResponse ? await response.json() : response.body;\n\n if (!response.ok) {\n let error = responseData?.error || new Error(response.statusText);\n\n const status = response.status;\n const errorType = responseData.error?.type;\n const errorMessage = responseData?.error?.message;\n\n try {\n const expectedError = status >= 400 && status < 500;\n const newTokensNeeded =\n expectedError && errorType === \"TokenExpiredError\";\n\n if (\n expectedError &&\n errorMessage === \"Phone Verification is required\"\n ) {\n this.#onPhoneVerificationRequired();\n return Promise.reject(error);\n }\n\n if (expectedError && errorMessage === \"Login Required\") {\n this.#onLoginRequired();\n return Promise.reject(error);\n }\n\n if (\n expectedError &&\n errorMessage === \"No auth header or cookie provided\"\n ) {\n this.#onLoginRequired();\n return Promise.reject(error);\n }\n\n if (expectedError && newTokensNeeded) {\n while (!this.isAuthTokenRenewalActive) {\n this.isAuthTokenRenewalActive = true;\n return this.send(\n new RefreshTokenCommand({\n data: commandConfig.data,\n query: commandConfig.params,\n headers: commandConfig.headers,\n }),\n )\n .then(() => {\n // retry the original request with the new token\n this.isAuthTokenRenewalActive = false;\n return fetch(request.clone());\n })\n .catch((err) => {\n this.isAuthTokenRenewalActive = false;\n return Promise.reject(err);\n });\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n error = this.#onError(error);\n\n return Promise.reject(error);\n }\n\n return this.#onSuccess(responseData);\n }\n\n #onLoginRequired() {\n this.emit(\"LoginRequired\");\n }\n\n #onPhoneVerificationRequired() {\n this.emit(\"PhoneVerificationRequired\");\n }\n\n /**\n * @param {Command} config\n * @returns {Request}\n */\n createRequest(config) {\n if (typeof config.headers !== \"object\") {\n config.headers = {};\n }\n\n let apiPath = config.url;\n\n if (apiPath.startsWith(\"/\")) {\n apiPath = `.${apiPath}`;\n }\n const url = new URL(apiPath, this.baseUrl);\n const method = config.method.toUpperCase() || \"GET\";\n\n // Add parameters to URL if they exist\n if (config.params && typeof config.params === \"object\") {\n Object.entries(config.params).forEach(([key, value]) => {\n // Handle array values\n if (Array.isArray(value)) {\n value.forEach((item) => {\n if (typeof item === \"object\" && item !== null) {\n Object.entries(item).forEach(([itemKey, itemValue]) => {\n url.searchParams.append(`${key}[][${itemKey}]`, itemValue);\n });\n } else {\n url.searchParams.append(`${key}[]`, item);\n }\n });\n }\n // Handle null/undefined\n else if (value === null || value === undefined) {\n url.searchParams.append(key, \"\");\n }\n // Handle nested objects\n else if (typeof value === \"object\") {\n Object.entries(value).forEach(([nestedKey, nestedValue]) => {\n if (Array.isArray(nestedValue)) {\n nestedValue.forEach((item) => {\n url.searchParams.append(`${key}[${nestedKey}][]`, item);\n });\n } else {\n url.searchParams.append(`${key}[${nestedKey}]`, nestedValue);\n }\n });\n }\n // Handle primitive values\n else {\n url.searchParams.append(key, value);\n }\n });\n }\n\n const headers = new Headers(this.headers);\n // Add any additional headers\n if (config.headers) {\n Object.keys(config.headers).forEach((key) => {\n headers.set(key, config.headers[key]);\n });\n }\n\n const body = [\"POST\", \"PUT\", \"PATCH\"].includes(method)\n ? headers.get(\"Content-Type\") === \"application/json\"\n ? JSON.stringify(config.data)\n : config.data\n : undefined;\n\n const request = new Request(url, {\n method: method,\n headers: headers,\n credentials: \"include\",\n body: body,\n });\n\n return request;\n }\n}\n"],"mappings":"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","names":["error"]}
|