@kohost/api-client 3.0.0-beta.6 → 3.0.0-beta.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/README.md +71 -0
  2. package/dist/cjs/AMQPClient/index.js +291 -0
  3. package/dist/cjs/{Client.js → Client/index.js} +2074 -962
  4. package/dist/cjs/Commands/CheckInReservationCommand.js +19 -0
  5. package/dist/cjs/Commands/Command.js +34 -0
  6. package/dist/cjs/Commands/CreateImageUploadEndpointCommand.js +17 -0
  7. package/dist/cjs/Commands/CreateShortLinkCommand.js +20 -0
  8. package/dist/cjs/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js +20 -0
  9. package/dist/cjs/Commands/DiscoverReservationsCommand.js +20 -0
  10. package/dist/cjs/Commands/DiscoverRoomTypesCommand.js +19 -0
  11. package/dist/cjs/Commands/DiscoverRoomsCommand.js +37 -0
  12. package/dist/cjs/Commands/DiscoverUsersCommand.js +19 -0
  13. package/dist/cjs/Commands/GetMobileKeyCommand.js +24 -0
  14. package/dist/cjs/Commands/GetProductsCommand.js +17 -0
  15. package/dist/cjs/Commands/OCRDocumentCommand.js +15 -0
  16. package/dist/cjs/Commands/SellProductsCommand.js +17 -0
  17. package/dist/cjs/Commands/SendEmailCommand.js +24 -0
  18. package/dist/cjs/Commands/SendSMSCommand.js +21 -0
  19. package/dist/cjs/Commands/SetAlarmCommand.js +17 -0
  20. package/dist/cjs/Commands/SetCourtesyCommand.js +17 -0
  21. package/dist/cjs/Commands/SetDimmerCommand.js +17 -0
  22. package/dist/cjs/Commands/SetLockCommand.js +17 -0
  23. package/dist/cjs/Commands/SetMediaCommand.js +17 -0
  24. package/dist/cjs/Commands/SetSceneCommand.js +17 -0
  25. package/dist/cjs/Commands/SetSwitchCommand.js +17 -0
  26. package/dist/cjs/Commands/SetThermostatCommand.js +17 -0
  27. package/dist/cjs/Commands/SetWindowCoveringCommand.js +17 -0
  28. package/dist/cjs/Commands/UpdateReservationCommand.js +19 -0
  29. package/dist/cjs/Commands/UpdateUserCommand.js +41 -0
  30. package/dist/cjs/Commands/UploadImageCommand.js +17 -0
  31. package/dist/cjs/Commands/index.js +55 -0
  32. package/dist/cjs/Errors/AppError.js +8 -0
  33. package/dist/cjs/Errors/AuthenticationError.js +9 -0
  34. package/dist/cjs/Errors/AuthorizationError.js +9 -0
  35. package/dist/cjs/Errors/ConflictError.js +9 -0
  36. package/dist/cjs/Errors/DeviceCommError.js +9 -0
  37. package/dist/cjs/Errors/LoginError.js +9 -0
  38. package/dist/cjs/Errors/NotFoundError.js +9 -0
  39. package/dist/cjs/Errors/RequestError.js +9 -0
  40. package/dist/cjs/Errors/SystemCommError.js +9 -0
  41. package/dist/cjs/Errors/TokenExpiredError.js +9 -0
  42. package/dist/cjs/Errors/UnprocessableRequestError.js +9 -0
  43. package/dist/cjs/Errors/ValidationError.js +9 -0
  44. package/dist/cjs/Errors/index.js +16 -0
  45. package/dist/cjs/Events/ApplicationInUseEvent.js +17 -0
  46. package/dist/cjs/Events/ApplicationOutOfUseEvent.js +17 -0
  47. package/dist/cjs/Events/EmailEvent.js +18 -0
  48. package/dist/cjs/Events/Event.js +55 -0
  49. package/dist/cjs/Events/SMSEvent.js +18 -0
  50. package/dist/cjs/Events/SMSSentEvent.js +17 -0
  51. package/dist/cjs/Events/SceneSetEvent.js +17 -0
  52. package/dist/cjs/Events/ShortLinkCreatedEvent.js +17 -0
  53. package/dist/cjs/Events/SystemAlarmUpdatedEvent.js +17 -0
  54. package/dist/cjs/Events/SystemCameraUpdatedEvent.js +17 -0
  55. package/dist/cjs/Events/SystemCategoryUpdatedEvent.js +17 -0
  56. package/dist/cjs/Events/SystemCourtesyUpdatedEvent.js +17 -0
  57. package/dist/cjs/Events/SystemDimmerUpdatedEvent.js +17 -0
  58. package/dist/cjs/Events/SystemGatewayUpdatedEvent.js +17 -0
  59. package/dist/cjs/Events/SystemLockUpdatedEvent.js +17 -0
  60. package/dist/cjs/Events/SystemMediaSourceUpdatedEvent.js +17 -0
  61. package/dist/cjs/Events/SystemMotionSensorUpdatedEvent.js +17 -0
  62. package/dist/cjs/Events/SystemProductUpdatedEvent.js +17 -0
  63. package/dist/cjs/Events/SystemReservationUpdatedEvent.js +17 -0
  64. package/dist/cjs/Events/SystemSceneControllerUpdatedEvent.js +17 -0
  65. package/dist/cjs/Events/SystemSpaceUpdatedEvent.js +17 -0
  66. package/dist/cjs/Events/SystemSwitchUpdatedEvent.js +17 -0
  67. package/dist/cjs/Events/SystemThermostatUpdatedEvent.js +17 -0
  68. package/dist/cjs/Events/SystemUserUpdatedEvent.js +17 -0
  69. package/dist/cjs/Events/SystemWindowCoveringUpdatedEvent.js +17 -0
  70. package/dist/cjs/Events/index.js +54 -0
  71. package/dist/cjs/Models/Alarm.js +35 -0
  72. package/dist/cjs/Models/Camera.js +35 -0
  73. package/dist/cjs/Models/Category.js +36 -0
  74. package/dist/cjs/Models/Courtesy.js +39 -0
  75. package/dist/cjs/Models/Credential.js +35 -0
  76. package/dist/cjs/Models/Dimmer.js +61 -0
  77. package/dist/cjs/Models/DiscoveredDevice.js +36 -0
  78. package/dist/cjs/Models/EmailMessage.js +35 -0
  79. package/dist/cjs/Models/EnergyReport.js +35 -0
  80. package/dist/cjs/Models/EnergyReportShard.js +35 -0
  81. package/dist/cjs/Models/Gateway.js +35 -0
  82. package/dist/cjs/Models/Identification.js +38 -0
  83. package/dist/cjs/Models/Kohost.js +96 -0
  84. package/dist/cjs/Models/Lock.js +39 -0
  85. package/dist/cjs/Models/MediaFile.js +48 -0
  86. package/dist/cjs/Models/MediaSource.js +35 -0
  87. package/dist/cjs/Models/MotionSensor.js +35 -0
  88. package/dist/cjs/Models/Notification.js +34 -0
  89. package/dist/cjs/Models/Order.js +97 -0
  90. package/dist/cjs/Models/Organization.js +34 -0
  91. package/dist/cjs/Models/Product.js +35 -0
  92. package/dist/cjs/Models/Property.js +34 -0
  93. package/dist/cjs/Models/Reservation.js +114 -0
  94. package/dist/cjs/Models/Room.js +218 -0
  95. package/dist/cjs/Models/Scene.js +169 -0
  96. package/dist/cjs/Models/ShortLink.js +35 -0
  97. package/dist/cjs/Models/SmsMessage.js +35 -0
  98. package/dist/cjs/Models/Space.js +97 -0
  99. package/dist/cjs/Models/Switch.js +39 -0
  100. package/dist/cjs/Models/SystemUser.js +55 -0
  101. package/dist/cjs/Models/Thermostat.js +86 -0
  102. package/dist/cjs/Models/Ticket.js +112 -0
  103. package/dist/cjs/Models/User.js +115 -0
  104. package/dist/cjs/Models/WindowCovering.js +55 -0
  105. package/dist/cjs/Models/index.js +72 -0
  106. package/dist/cjs/SocketIoClient/index.js +74 -0
  107. package/dist/cjs/defs/deviceTypes.js +15 -0
  108. package/dist/cjs/defs/formalDeviceTypes.js +6 -0
  109. package/dist/cjs/defs/index.js +11 -0
  110. package/dist/cjs/{index.cjs.js → index.js} +7 -1
  111. package/dist/cjs/schemas/AlarmSchema.d.ts +153 -0
  112. package/dist/cjs/schemas/CameraSchema.d.ts +145 -0
  113. package/dist/cjs/schemas/CategorySchema.d.ts +84 -0
  114. package/dist/cjs/schemas/CourtesySchema.d.ts +143 -0
  115. package/dist/cjs/schemas/CredentialSchema.d.ts +24 -0
  116. package/dist/cjs/schemas/DefinitionsSchema.d.ts +10 -0
  117. package/dist/cjs/schemas/DimmerSchema.d.ts +143 -0
  118. package/dist/cjs/schemas/DiscoveredDeviceSchema.d.ts +39 -0
  119. package/dist/cjs/schemas/EmailMessageSchema.d.ts +52 -0
  120. package/dist/cjs/schemas/EnergyReportSchema.d.ts +57 -0
  121. package/dist/cjs/schemas/EnergyReportShardSchema.d.ts +61 -0
  122. package/dist/cjs/schemas/GatewaySchema.d.ts +140 -0
  123. package/dist/cjs/schemas/IdentificationSchema.d.ts +48 -0
  124. package/dist/cjs/schemas/LockSchema.d.ts +143 -0
  125. package/dist/cjs/schemas/MediaFileSchema.d.ts +46 -0
  126. package/dist/cjs/schemas/MediaSourceSchema.d.ts +240 -0
  127. package/dist/cjs/schemas/MotionSensorSchema.d.ts +139 -0
  128. package/dist/cjs/schemas/NotificationSchema.d.ts +57 -0
  129. package/dist/cjs/schemas/OrderSchema.d.ts +91 -0
  130. package/dist/cjs/schemas/OrganizationSchema.d.ts +33 -0
  131. package/dist/cjs/schemas/PaymentSchema.d.ts +36 -0
  132. package/dist/cjs/schemas/ProductSchema.d.ts +68 -0
  133. package/dist/cjs/schemas/PropertySchema.d.ts +120 -0
  134. package/dist/cjs/schemas/ReservationSchema.d.ts +105 -0
  135. package/dist/cjs/schemas/RoomSchema.d.ts +1065 -0
  136. package/dist/cjs/schemas/SceneSchema.d.ts +57 -0
  137. package/dist/cjs/schemas/ShortLinkSchema.d.ts +23 -0
  138. package/dist/cjs/schemas/SmsMessageSchema.d.ts +43 -0
  139. package/dist/cjs/schemas/SpaceSchema.d.ts +61 -0
  140. package/dist/cjs/schemas/SwitchSchema.d.ts +143 -0
  141. package/dist/cjs/schemas/SystemUserSchema.d.ts +187 -0
  142. package/dist/cjs/schemas/ThermostatSchema.d.ts +173 -0
  143. package/dist/cjs/schemas/TicketSchema.d.ts +91 -0
  144. package/dist/cjs/schemas/UserSchema.d.ts +269 -0
  145. package/dist/cjs/schemas/WindowCoveringSchema.d.ts +142 -0
  146. package/dist/cjs/schemas/alarm.json +89 -0
  147. package/dist/cjs/schemas/camera.json +50 -0
  148. package/dist/cjs/schemas/category.json +42 -0
  149. package/dist/cjs/schemas/courtesy.json +49 -0
  150. package/dist/cjs/schemas/credential.json +37 -0
  151. package/dist/cjs/schemas/definitions.json +194 -0
  152. package/dist/cjs/schemas/dimmer.json +46 -0
  153. package/dist/cjs/schemas/discoveredDevice.json +31 -0
  154. package/dist/cjs/schemas/emailMessage.json +71 -0
  155. package/dist/cjs/schemas/energyReport.json +86 -0
  156. package/dist/cjs/schemas/energyReportShard.json +75 -0
  157. package/dist/cjs/schemas/gateway.json +35 -0
  158. package/dist/cjs/schemas/identification.json +61 -0
  159. package/dist/cjs/schemas/lock.json +45 -0
  160. package/dist/cjs/schemas/mediaFile.json +70 -0
  161. package/dist/cjs/schemas/mediaSource.json +187 -0
  162. package/dist/cjs/schemas/motionSensor.json +32 -0
  163. package/dist/cjs/schemas/notification.json +29 -0
  164. package/dist/cjs/schemas/order.json +182 -0
  165. package/dist/cjs/schemas/organization.json +36 -0
  166. package/dist/cjs/schemas/payment.json +47 -0
  167. package/dist/cjs/schemas/product.json +41 -0
  168. package/dist/cjs/schemas/property.json +309 -0
  169. package/dist/cjs/schemas/reservation.json +141 -0
  170. package/dist/cjs/schemas/room.json +98 -0
  171. package/dist/cjs/schemas/scene.json +121 -0
  172. package/dist/cjs/schemas/shortLink.json +30 -0
  173. package/dist/cjs/schemas/smsMessage.json +61 -0
  174. package/dist/cjs/schemas/space.json +124 -0
  175. package/dist/cjs/schemas/switch.json +45 -0
  176. package/dist/cjs/schemas/systemUser.json +95 -0
  177. package/dist/cjs/schemas/thermostat.json +153 -0
  178. package/dist/cjs/schemas/ticket.json +141 -0
  179. package/dist/cjs/schemas/user.json +152 -0
  180. package/dist/cjs/schemas/windowCovering.json +43 -0
  181. package/dist/cjs/utils/errorFactory.js +8 -0
  182. package/dist/cjs/utils/eventFactory.js +10 -0
  183. package/dist/cjs/utils/getDeviceTypes.js +7 -0
  184. package/dist/cjs/utils/getFormalDeviceType.js +5 -0
  185. package/dist/cjs/utils/index.js +11 -0
  186. package/dist/cjs/utils/schema.js +25 -0
  187. package/dist/esm/Client.js +2423 -1175
  188. package/dist/esm/Client.js.map +4 -4
  189. package/dist/esm/Commands.js +498 -73
  190. package/dist/esm/Commands.js.map +3 -3
  191. package/dist/esm/Errors.js +53 -0
  192. package/dist/esm/Errors.js.map +3 -3
  193. package/dist/esm/Events.js +314 -63
  194. package/dist/esm/Events.js.map +3 -3
  195. package/dist/esm/Models.js +3872 -1179
  196. package/dist/esm/Models.js.map +4 -4
  197. package/dist/esm/SocketIoClient.js +4748 -0
  198. package/dist/esm/SocketIoClient.js.map +7 -0
  199. package/dist/esm/defs.js +407 -279
  200. package/dist/esm/defs.js.map +4 -4
  201. package/dist/esm/index.js +17 -10
  202. package/dist/esm/utils.js +763 -85
  203. package/dist/esm/utils.js.map +3 -3
  204. package/dist/useCases/{AdminUpdateProperty.js → AdminUpdateCustomer.js} +2 -2
  205. package/dist/useCases/AssignSpaceToReservation.js +32 -0
  206. package/dist/useCases/BatchNotifyCheckIn.js +32 -0
  207. package/dist/useCases/CreateImageUploadEndpoint.js +32 -0
  208. package/dist/useCases/{CreateSource.js → CreateMediaSource.js} +2 -2
  209. package/dist/useCases/{AdminListCustomers.js → CreateOrganization.js} +3 -3
  210. package/dist/useCases/{AdminCreateProperty.js → CreateProperty.js} +2 -2
  211. package/dist/useCases/CreateSpaceType.js +32 -0
  212. package/dist/useCases/DeleteMediaFile.js +32 -0
  213. package/dist/useCases/{DeleteSource.js → DeleteMediaSource.js} +2 -2
  214. package/dist/useCases/DeleteSpaceType.js +32 -0
  215. package/dist/useCases/DescribeLockCredential.js +32 -0
  216. package/dist/useCases/{DescribeIntegration.js → DescribeMediaSource.js} +3 -3
  217. package/dist/useCases/DescribeMyAccessCredentials.js +32 -0
  218. package/dist/useCases/{AdminDescribeProperty.js → DescribeOrganization.js} +2 -2
  219. package/dist/useCases/DescribeProduct.js +32 -0
  220. package/dist/useCases/{ListIntegrations.js → DescribeProperty.js} +3 -3
  221. package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +32 -0
  222. package/dist/useCases/DescribeReservationRoomUpgrades.js +32 -0
  223. package/dist/useCases/{DeleteIntegration.js → DescribeSpaceType.js} +2 -2
  224. package/dist/useCases/ListMediaSources.js +32 -0
  225. package/dist/useCases/{LoginGateway.js → ListMyOrders.js} +3 -3
  226. package/dist/useCases/{AdminListProperties.js → ListMyTickets.js} +2 -2
  227. package/dist/useCases/ListOrders.js +32 -0
  228. package/dist/useCases/{UpdateIntegration.js → ListOrganizations.js} +4 -4
  229. package/dist/useCases/ListProperties.js +32 -0
  230. package/dist/useCases/ListScenes.js +32 -0
  231. package/dist/useCases/ListSpaceTypes.js +32 -0
  232. package/dist/useCases/ListTeam.js +32 -0
  233. package/dist/useCases/ListUserOrders.js +32 -0
  234. package/dist/useCases/ListUserSpaces.js +32 -0
  235. package/dist/useCases/LogoutUser.js +32 -0
  236. package/dist/useCases/PurchaseReservationEarlyCheckInProducts.js +32 -0
  237. package/dist/useCases/{CreateIntegrationDeviceMapEntry.js → PurchaseReservationRoomUpgrades.js} +2 -2
  238. package/dist/useCases/RequestLoginLink.js +1 -1
  239. package/dist/useCases/{CreateIntegration.js → RequestMyKeyToken.js} +2 -2
  240. package/dist/useCases/RequestPWAToken.js +32 -0
  241. package/dist/useCases/SendCheckInSMS.js +32 -0
  242. package/dist/useCases/{SetSource.js → SetDimmer.js} +2 -2
  243. package/dist/useCases/{DescribeSource.js → SetMediaSource.js} +3 -3
  244. package/dist/useCases/{UpdateSource.js → SetRoomScene.js} +3 -3
  245. package/dist/useCases/SetSpaceScene.js +32 -0
  246. package/dist/useCases/UpdateMediaSource.js +32 -0
  247. package/dist/useCases/UpdateProperty.js +32 -0
  248. package/dist/useCases/UpdateSpaceType.js +32 -0
  249. package/dist/useCases/{ListSources.js → UploadImage.js} +4 -4
  250. package/package.json +36 -10
  251. package/dist/cjs/Commands.js +0 -568
  252. package/dist/cjs/Errors.js +0 -174
  253. package/dist/cjs/Events.js +0 -375
  254. package/dist/cjs/Models.js +0 -3582
  255. package/dist/cjs/defs.js +0 -175
  256. package/dist/cjs/utils.js +0 -246
@@ -0,0 +1,139 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type SupportedNotifications = (
9
+ | "button 1"
10
+ | "button 2"
11
+ | "button 3"
12
+ | "button 4"
13
+ | "button 5"
14
+ | "idle"
15
+ | "powerHasBeedApplied"
16
+ | "acMainsDisconnected"
17
+ | "acMainsReconnected"
18
+ | "replaceBatterySoon"
19
+ | "replaceBatteryNow"
20
+ | "hardwareFailure"
21
+ | "softwareFailure"
22
+ | "hardwareFailureWithCode"
23
+ | "softwareFailureWithCode"
24
+ | "motionDetection"
25
+ | "airFilterNeedsCleaned"
26
+ | "smokeDetected"
27
+ | "outsideSafeTemperatureRange"
28
+ | "outsideSafeHumidityRange"
29
+ )[];
30
+ export type Notification = {
31
+ name?:
32
+ | "button 1"
33
+ | "button 2"
34
+ | "button 3"
35
+ | "button 4"
36
+ | "button 5"
37
+ | "idle"
38
+ | "powerHasBeedApplied"
39
+ | "acMainsDisconnected"
40
+ | "acMainsReconnected"
41
+ | "replaceBatterySoon"
42
+ | "replaceBatteryNow"
43
+ | "hardwareFailure"
44
+ | "softwareFailure"
45
+ | "hardwareFailureWithCode"
46
+ | "softwareFailureWithCode"
47
+ | "motionDetection"
48
+ | "airFilterNeedsCleaned"
49
+ | "smokeDetected"
50
+ | "outsideSafeTemperatureRange"
51
+ | "outsideSafeHumidityRange";
52
+ timestamp?: number;
53
+ description?: string;
54
+ [k: string]: unknown;
55
+ } & ({
56
+ name?:
57
+ | "button 1"
58
+ | "button 2"
59
+ | "button 3"
60
+ | "button 4"
61
+ | "button 5"
62
+ | "idle"
63
+ | "powerHasBeedApplied"
64
+ | "acMainsDisconnected"
65
+ | "acMainsReconnected"
66
+ | "replaceBatterySoon"
67
+ | "replaceBatteryNow"
68
+ | "hardwareFailure"
69
+ | "softwareFailure"
70
+ | "hardwareFailureWithCode"
71
+ | "softwareFailureWithCode"
72
+ | "motionDetection"
73
+ | "airFilterNeedsCleaned"
74
+ | "smokeDetected"
75
+ | "outsideSafeTemperatureRange"
76
+ | "outsideSafeHumidityRange";
77
+ timestamp?: number;
78
+ description?: string;
79
+ [k: string]: unknown;
80
+ } | null);
81
+
82
+ /**
83
+ * Any smart motion sensor
84
+ */
85
+ export interface MotionSensor {
86
+ id: string;
87
+ type:
88
+ | "alarm"
89
+ | "dimmer"
90
+ | "switch"
91
+ | "motionSensor"
92
+ | "windowCovering"
93
+ | "camera"
94
+ | "mediaSource"
95
+ | "thermostat"
96
+ | "lock"
97
+ | "courtesy"
98
+ | "gateway"
99
+ | "tv"
100
+ | "dvr"
101
+ | "appleTv"
102
+ | "discPlayer"
103
+ | "mediaPlayer"
104
+ | "uncontrolledDevice";
105
+ driver:
106
+ | "aws-kinesis"
107
+ | "butler"
108
+ | "crestron"
109
+ | "dmp"
110
+ | "dormakaba"
111
+ | "dsc"
112
+ | "ecobee"
113
+ | "igor"
114
+ | "inncom"
115
+ | "kohost-k7"
116
+ | "kohost-pms"
117
+ | "lg"
118
+ | "lirc"
119
+ | "mews"
120
+ | "paxton"
121
+ | "pelican-wireless"
122
+ | "rebrandly"
123
+ | "salto"
124
+ | "salto-irn"
125
+ | "se"
126
+ | "sendgrid"
127
+ | "stay-n-touch"
128
+ | "twilio"
129
+ | "cloudflare-images"
130
+ | "cloudflare-stream"
131
+ | "insperia-privacy";
132
+ systemData: SystemData;
133
+ supportedNotifications?: SupportedNotifications;
134
+ notification?: Notification;
135
+ watts?: number;
136
+ }
137
+ export interface SystemData {
138
+ [k: string]: unknown;
139
+ }
@@ -0,0 +1,57 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type Date =
9
+ | string
10
+ | {
11
+ [k: string]: unknown;
12
+ };
13
+
14
+ /**
15
+ * Notification sent to users
16
+ */
17
+ export interface NotificationJson {
18
+ id?: string;
19
+ title: string;
20
+ body: string;
21
+ image?: MediaFile;
22
+ tag?: string;
23
+ createdAt?: Date;
24
+ }
25
+ /**
26
+ * Any media file
27
+ */
28
+ export interface MediaFile {
29
+ id?: string;
30
+ type: string;
31
+ name?: string;
32
+ fileHash?: string;
33
+ mimeType?:
34
+ | "image/*"
35
+ | "image/jpeg"
36
+ | "image/png"
37
+ | "image/gif"
38
+ | "image/webp"
39
+ | "image/avif"
40
+ | "image/svg+xml"
41
+ | "application/pdf";
42
+ data?: string;
43
+ url?: string;
44
+ width?: number;
45
+ height?: number;
46
+ /**
47
+ * Size in bytes
48
+ */
49
+ size?: number;
50
+ uploadUrl?: string;
51
+ uploadUrlExpires?: Date;
52
+ createdBy?: string;
53
+ systemData?: SystemData;
54
+ }
55
+ export interface SystemData {
56
+ [k: string]: unknown;
57
+ }
@@ -0,0 +1,91 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type Date =
9
+ | string
10
+ | {
11
+ [k: string]: unknown;
12
+ };
13
+
14
+ /**
15
+ * A purchase order for products or services.
16
+ */
17
+ export interface Order {
18
+ id?: string;
19
+ type: string;
20
+ orderNumber?: string;
21
+ status:
22
+ | "draft"
23
+ | "pendingPayment"
24
+ | "processing"
25
+ | "outForDelivery"
26
+ | "completed"
27
+ | "paymentFailed"
28
+ | "cancelled"
29
+ | "refunded";
30
+ /**
31
+ * User id of purchaser
32
+ */
33
+ user?: string;
34
+ date?: Date;
35
+ items?: {
36
+ additionalProperties?: never;
37
+ name: string;
38
+ sku?: string;
39
+ quantity?: number;
40
+ price: number;
41
+ taxClass?: string;
42
+ deliveryClass?: string;
43
+ [k: string]: unknown;
44
+ }[];
45
+ taxes?: {
46
+ additionalProperties?: never;
47
+ name: string;
48
+ class?: string;
49
+ rateType?: "percentage" | "flat";
50
+ rate: number;
51
+ total?: number;
52
+ [k: string]: unknown;
53
+ }[];
54
+ fees?: {
55
+ additionalProperties?: never;
56
+ name: string;
57
+ price: number;
58
+ [k: string]: unknown;
59
+ }[];
60
+ delivery?: {
61
+ additionalProperties?: never;
62
+ name: string;
63
+ class?: string;
64
+ rateType?: "percentage" | "flat";
65
+ rate: number;
66
+ total?: number;
67
+ [k: string]: unknown;
68
+ }[];
69
+ payments?: {
70
+ method?:
71
+ | "folio"
72
+ | "invoice"
73
+ | "amex"
74
+ | "visa"
75
+ | "masterCard"
76
+ | "maestro"
77
+ | "discover"
78
+ | "diners"
79
+ | "jcb"
80
+ | "applePay"
81
+ | "alipay"
82
+ | "chinaUnionPay"
83
+ | "vpay";
84
+ name?: string;
85
+ date?: Date;
86
+ amount?: number;
87
+ transactionReference?: string;
88
+ [k: string]: unknown;
89
+ }[];
90
+ [k: string]: unknown;
91
+ }
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type CreatedAt =
9
+ | string
10
+ | {
11
+ [k: string]: unknown;
12
+ };
13
+ export type UpdatedAt =
14
+ | string
15
+ | {
16
+ [k: string]: unknown;
17
+ };
18
+
19
+ /**
20
+ * An organization is a group or entity that subscribes to Kohost software.
21
+ */
22
+ export interface Organization {
23
+ id?: string;
24
+ accountNumber: number;
25
+ name: string;
26
+ properties?: string[];
27
+ credentials?: {
28
+ [k: string]: unknown;
29
+ };
30
+ createdAt?: CreatedAt;
31
+ updatedAt?: UpdatedAt;
32
+ [k: string]: unknown;
33
+ }
@@ -0,0 +1,36 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export interface Payment {
9
+ id?: string;
10
+ type:
11
+ | "amex"
12
+ | "visa"
13
+ | "masterCard"
14
+ | "maestro"
15
+ | "discover"
16
+ | "diners"
17
+ | "jcb"
18
+ | "applePay"
19
+ | "alipay"
20
+ | "chinaUnionPay"
21
+ | "vpay";
22
+ enabled?: boolean;
23
+ storageData?: string | null;
24
+ maskedNumber: {
25
+ [k: string]: unknown;
26
+ };
27
+ issued?: string | null;
28
+ expires: {
29
+ [k: string]: unknown;
30
+ };
31
+ systemData?: SystemData;
32
+ [k: string]: unknown;
33
+ }
34
+ export interface SystemData {
35
+ [k: string]: unknown;
36
+ }
@@ -0,0 +1,68 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export interface Product {
9
+ id?: string;
10
+ type?: string;
11
+ name: string;
12
+ driver:
13
+ | "aws-kinesis"
14
+ | "butler"
15
+ | "crestron"
16
+ | "dmp"
17
+ | "dormakaba"
18
+ | "dsc"
19
+ | "ecobee"
20
+ | "igor"
21
+ | "inncom"
22
+ | "kohost-k7"
23
+ | "kohost-pms"
24
+ | "lg"
25
+ | "lirc"
26
+ | "mews"
27
+ | "paxton"
28
+ | "pelican-wireless"
29
+ | "rebrandly"
30
+ | "salto"
31
+ | "salto-irn"
32
+ | "se"
33
+ | "sendgrid"
34
+ | "stay-n-touch"
35
+ | "twilio"
36
+ | "cloudflare-images"
37
+ | "cloudflare-stream"
38
+ | "insperia-privacy";
39
+ description?: {
40
+ [k: string]: unknown;
41
+ };
42
+ price: number;
43
+ image?: File;
44
+ category?: string;
45
+ imageUrl?: {
46
+ [k: string]: unknown;
47
+ };
48
+ systemData?: SystemData;
49
+ [k: string]: unknown;
50
+ }
51
+ export interface File {
52
+ /**
53
+ * Name of the file.
54
+ */
55
+ name: string;
56
+ /**
57
+ * MIME type of the file (e.g. application/pdf).
58
+ */
59
+ type: string;
60
+ /**
61
+ * Base64-encoded data of the file.
62
+ */
63
+ data: string;
64
+ [k: string]: unknown;
65
+ }
66
+ export interface SystemData {
67
+ [k: string]: unknown;
68
+ }
@@ -0,0 +1,120 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * A property is a physical asset or building
10
+ */
11
+ export interface Property {
12
+ id: string;
13
+ name: string;
14
+ type: "hospitality" | "education" | "commercial";
15
+ timezone?: string;
16
+ smsNumber?: string;
17
+ hostname: string;
18
+ /**
19
+ * Reference (id) to the organization that owns this property
20
+ */
21
+ organization: string;
22
+ address?: {
23
+ street?: string;
24
+ city?: string;
25
+ state?: string;
26
+ zip?: string;
27
+ country?: string;
28
+ [k: string]: unknown;
29
+ };
30
+ latitude?: number;
31
+ longitude?: number;
32
+ appManifest?: {
33
+ name?: string;
34
+ short_name?: string;
35
+ scope?: string;
36
+ start_url?: string;
37
+ themeColor?: string;
38
+ backgroundColor?: string;
39
+ display?: "fullscreen" | "standalone" | "minimal-ui" | "browser";
40
+ orientation?: "portrait" | "landscape";
41
+ splash?: {
42
+ src?: string;
43
+ type?: string;
44
+ sizes?: string;
45
+ [k: string]: unknown;
46
+ };
47
+ icons?: {
48
+ src?: string;
49
+ sizes?: string;
50
+ type?: string;
51
+ [k: string]: unknown;
52
+ }[];
53
+ logo?: {
54
+ src?: string;
55
+ type?: string;
56
+ sizes?: string;
57
+ [k: string]: unknown;
58
+ };
59
+ [k: string]: unknown;
60
+ };
61
+ appFeatures?: {
62
+ RoomControl?: {
63
+ commonAreas?: {
64
+ spaces?: string[];
65
+ [k: string]: unknown;
66
+ };
67
+ };
68
+ CheckIn?: {
69
+ payment?: unknown;
70
+ identification?: unknown;
71
+ earlyCheckIn?: {
72
+ dynamic: boolean;
73
+ checkInTime: string;
74
+ checkOutTime: string;
75
+ [k: string]: unknown;
76
+ };
77
+ roomUpgrades?: unknown;
78
+ [k: string]: unknown;
79
+ };
80
+ CheckOut?: unknown;
81
+ Concierge?: unknown;
82
+ DigitalKey?: {
83
+ system?: "salto";
84
+ systemOnline?: boolean;
85
+ enableApp?: boolean;
86
+ branding?: {
87
+ logo?: string;
88
+ /**
89
+ * @minItems 2
90
+ * @maxItems 2
91
+ */
92
+ gradient?: [string, string];
93
+ /**
94
+ * @minItems 2
95
+ * @maxItems 3
96
+ */
97
+ highlightedGradient?: [string, string] | [string, string, string];
98
+ [k: string]: unknown;
99
+ };
100
+ [k: string]: unknown;
101
+ };
102
+ Elevator?: unknown;
103
+ };
104
+ notifications?: {
105
+ email?: {
106
+ enabled?: boolean;
107
+ };
108
+ sms?: {
109
+ enabled?: boolean;
110
+ };
111
+ push?: {
112
+ enabled?: boolean;
113
+ };
114
+ };
115
+ credentials?: {
116
+ [k: string]: unknown;
117
+ };
118
+ additionalProperties?: never;
119
+ [k: string]: unknown;
120
+ }
@@ -0,0 +1,105 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type UpdatedAt =
9
+ | string
10
+ | {
11
+ [k: string]: unknown;
12
+ };
13
+
14
+ export interface Reservation {
15
+ id?: string;
16
+ driver?:
17
+ | "aws-kinesis"
18
+ | "butler"
19
+ | "crestron"
20
+ | "dmp"
21
+ | "dormakaba"
22
+ | "dsc"
23
+ | "ecobee"
24
+ | "igor"
25
+ | "inncom"
26
+ | "kohost-k7"
27
+ | "kohost-pms"
28
+ | "lg"
29
+ | "lirc"
30
+ | "mews"
31
+ | "paxton"
32
+ | "pelican-wireless"
33
+ | "rebrandly"
34
+ | "salto"
35
+ | "salto-irn"
36
+ | "se"
37
+ | "sendgrid"
38
+ | "stay-n-touch"
39
+ | "twilio"
40
+ | "cloudflare-images"
41
+ | "cloudflare-stream"
42
+ | "insperia-privacy";
43
+ primaryGuest?: string;
44
+ type: string;
45
+ sharedGuests?: string[];
46
+ spaceCategory?: string;
47
+ space?: string;
48
+ /**
49
+ * reserved - confirmed by both parties, before check-in
50
+ * checkedIn - checked in
51
+ * checkedOut - checked out
52
+ * cancelled - Cancelled
53
+ * noShow - No show
54
+ * enquired - Confirmed neither by the customer nor enterprise
55
+ * requested - Confirmed by the customer but not the enterprise (waitlist)
56
+ * optional - Confirmed by the enterprise but not the customer (holding)
57
+ */
58
+ status: "reserved" | "checkedIn" | "checkedOut" | "cancelled" | "noShow" | "enquired" | "requested" | "optional";
59
+ mobileCheckInStatus?:
60
+ | "ready"
61
+ | "blocked"
62
+ | "preArrivalStepsRequired"
63
+ | "spaceNotAssigned"
64
+ | "spaceNotReady"
65
+ | "checkInTimeNotStarted";
66
+ mobileCheckInStatusMessage?: string;
67
+ confirmationNumber?: string;
68
+ checkInDateTime:
69
+ | string
70
+ | {
71
+ [k: string]: unknown;
72
+ };
73
+ checkOutDateTime:
74
+ | string
75
+ | {
76
+ [k: string]: unknown;
77
+ };
78
+ adultCount?: number;
79
+ childCount?: number;
80
+ spaceCategoryAvailabilites?: {
81
+ id?: string;
82
+ price?: number;
83
+ unit?: "night" | "stay" | "hour";
84
+ [k: string]: unknown;
85
+ }[];
86
+ revenue?: {
87
+ date?: string;
88
+ amount?: number;
89
+ type?: "service" | "product";
90
+ [k: string]: unknown;
91
+ }[];
92
+ rateSuppressed?: boolean;
93
+ payment?: string;
94
+ company?: string;
95
+ travelAgent?: string;
96
+ systemData?: SystemData;
97
+ metadata?: {
98
+ [k: string]: unknown;
99
+ };
100
+ updatedAt?: UpdatedAt;
101
+ [k: string]: unknown;
102
+ }
103
+ export interface SystemData {
104
+ [k: string]: unknown;
105
+ }