@kohost/api-client 3.0.0-beta.99 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/cjs/Client/index.js +374 -67
  2. package/dist/cjs/Commands/CreateShortLinkCommand.js +2 -2
  3. package/dist/cjs/Commands/OCRDocumentCommand.js +2 -2
  4. package/dist/cjs/Commands/SetAlarmCommand.js +2 -2
  5. package/dist/cjs/Commands/SetCourtesyCommand.js +2 -2
  6. package/dist/cjs/Commands/SetDimmerCommand.js +2 -2
  7. package/dist/cjs/Commands/SetLockCommand.js +2 -2
  8. package/dist/cjs/Commands/SetSwitchCommand.js +2 -2
  9. package/dist/cjs/Commands/SetThermostatCommand.js +2 -2
  10. package/dist/cjs/Commands/SetWindowCoveringCommand.js +2 -2
  11. package/dist/cjs/Events/ReservationCheckInEvent.js +23 -0
  12. package/dist/cjs/Events/ReservationCheckOutEvent.js +23 -0
  13. package/dist/cjs/Events/index.js +6 -0
  14. package/dist/cjs/SocketIoClient/index.js +23 -4
  15. package/dist/cjs/schemas/AlarmSchema.d.ts +13 -2
  16. package/dist/cjs/schemas/CredentialSchema.d.ts +1 -1
  17. package/dist/cjs/schemas/DiscoveredDeviceSchema.d.ts +4 -0
  18. package/dist/cjs/schemas/MediaSourceSchema.d.ts +3 -1
  19. package/dist/cjs/schemas/OrganizationSchema.d.ts +30 -0
  20. package/dist/cjs/schemas/PropertySchema.d.ts +25 -34
  21. package/dist/cjs/schemas/ReservationSchema.d.ts +1 -0
  22. package/dist/cjs/schemas/RoomSchema.d.ts +18 -4
  23. package/dist/cjs/schemas/SceneSchema.d.ts +2 -1
  24. package/dist/cjs/schemas/UserSchema.d.ts +1 -0
  25. package/dist/cjs/schemas/WindowCoveringSchema.d.ts +2 -1
  26. package/dist/cjs/schemas/alarm.json +4 -4
  27. package/dist/cjs/schemas/credential.json +1 -0
  28. package/dist/cjs/schemas/discoveredDevice.json +4 -0
  29. package/dist/cjs/schemas/mediaSource.json +11 -1
  30. package/dist/cjs/schemas/organization.json +109 -0
  31. package/dist/cjs/schemas/property.json +38 -115
  32. package/dist/cjs/schemas/reservation.json +3 -0
  33. package/dist/cjs/schemas/scene.json +3 -0
  34. package/dist/cjs/schemas/windowCovering.json +8 -2
  35. package/dist/esm/Client.js +504 -193
  36. package/dist/esm/Client.js.map +4 -4
  37. package/dist/esm/Commands.js +18 -18
  38. package/dist/esm/Commands.js.map +2 -2
  39. package/dist/esm/Events.js +55 -1
  40. package/dist/esm/Events.js.map +3 -3
  41. package/dist/esm/Models.js +180 -121
  42. package/dist/esm/Models.js.map +2 -2
  43. package/dist/esm/SocketIoClient.js +26 -7
  44. package/dist/esm/SocketIoClient.js.map +2 -2
  45. package/dist/esm/defs.js +162 -131
  46. package/dist/esm/defs.js.map +4 -4
  47. package/dist/useCases/{LoginUser.js → CreateScene.js} +2 -2
  48. package/dist/useCases/DescribeAlarmConfig.js +32 -0
  49. package/dist/useCases/{DescribeMyProperty.js → DescribeMyOrganization.js} +2 -2
  50. package/dist/useCases/DescribeMyPasskeyRegistrations.js +32 -0
  51. package/dist/useCases/FinishRegisterPasskey.js +32 -0
  52. package/dist/useCases/{RequestLoginLink.js → ListMyProperties.js} +3 -3
  53. package/dist/useCases/{RequestPWAToken.js → LoginFinish.js} +3 -3
  54. package/dist/useCases/LoginStart.js +32 -0
  55. package/dist/useCases/{RequestMyKeyToken.js → RequestLoginToken.js} +3 -3
  56. package/dist/useCases/SetAlarm.js +32 -0
  57. package/dist/useCases/SetCustomScene.js +32 -0
  58. package/dist/useCases/StartRegisterPasskey.js +32 -0
  59. package/package.json +3 -4
@@ -7819,6 +7819,9 @@ var require_reservation = __commonJS({
7819
7819
  unit: {
7820
7820
  type: "string",
7821
7821
  enum: ["night", "stay", "hour"]
7822
+ },
7823
+ isUpgrade: {
7824
+ type: "boolean"
7822
7825
  }
7823
7826
  }
7824
7827
  }
@@ -8577,9 +8580,6 @@ var require_alarm = __commonJS({
8577
8580
  securityMode: {
8578
8581
  type: ["string", "null"],
8579
8582
  enum: ["arming", "disarming", "armed", "disarmed", "alarm", null]
8580
- },
8581
- readyToArm: {
8582
- type: ["boolean", "null"]
8583
8583
  }
8584
8584
  },
8585
8585
  additionalProperties: false
@@ -8598,7 +8598,7 @@ var require_alarm = __commonJS({
8598
8598
  type: "string"
8599
8599
  },
8600
8600
  secure: {
8601
- type: "boolean"
8601
+ type: ["boolean", "null"]
8602
8602
  },
8603
8603
  bypassed: {
8604
8604
  type: ["boolean", "null"]
@@ -8609,6 +8609,9 @@ var require_alarm = __commonJS({
8609
8609
  },
8610
8610
  watts: {
8611
8611
  $ref: "definitions.json#/definitions/watts"
8612
+ },
8613
+ address: {
8614
+ $ref: "definitions.json#/definitions/address"
8612
8615
  }
8613
8616
  },
8614
8617
  required: ["id", "type", "areas", "zones", "driver"]
@@ -9106,7 +9109,13 @@ var require_windowCovering = __commonJS({
9106
9109
  type: "string"
9107
9110
  },
9108
9111
  type: {
9109
- $ref: "definitions.json#/definitions/type"
9112
+ $ref: "definitions.json#/definitions/type",
9113
+ default: "windowCovering"
9114
+ },
9115
+ discriminator: {
9116
+ type: "string",
9117
+ enum: ["basic", "variable"],
9118
+ default: "variable"
9110
9119
  },
9111
9120
  supportedNotifications: {
9112
9121
  $ref: "definitions.json#/definitions/supportedNotifications"
@@ -9121,7 +9130,7 @@ var require_windowCovering = __commonJS({
9121
9130
  type: "boolean"
9122
9131
  },
9123
9132
  position: {
9124
- type: "number",
9133
+ type: ["number", "null"],
9125
9134
  minimum: 0,
9126
9135
  maximum: 100
9127
9136
  },
@@ -10103,12 +10112,16 @@ var require_mediaSource = __commonJS({
10103
10112
  title: "Media Source",
10104
10113
  description: "Any media source",
10105
10114
  type: "object",
10106
- required: ["id", "type", "audio", "video", "driver"],
10115
+ required: ["id", "type", "discriminator", "audio", "video", "driver"],
10107
10116
  properties: {
10108
10117
  id: {
10109
10118
  $ref: "definitions.json#/definitions/id"
10110
10119
  },
10111
10120
  type: {
10121
+ type: "string",
10122
+ default: "mediaSource"
10123
+ },
10124
+ discriminator: {
10112
10125
  type: "string",
10113
10126
  enum: [
10114
10127
  "tv",
@@ -10119,6 +10132,12 @@ var require_mediaSource = __commonJS({
10119
10132
  "uncontrolledDevice"
10120
10133
  ]
10121
10134
  },
10135
+ remote: {
10136
+ type: "string",
10137
+ enum: [
10138
+ "MR22GA"
10139
+ ]
10140
+ },
10122
10141
  name: {
10123
10142
  $ref: "definitions.json#/definitions/name"
10124
10143
  },
@@ -10444,6 +10463,9 @@ var require_scene = __commonJS({
10444
10463
  name: {
10445
10464
  type: "string"
10446
10465
  },
10466
+ description: {
10467
+ type: "string"
10468
+ },
10447
10469
  devices: {
10448
10470
  type: "object",
10449
10471
  properties: {
@@ -11942,6 +11964,10 @@ var require_discoveredDevice = __commonJS({
11942
11964
  organization: {
11943
11965
  type: ["string", "null"],
11944
11966
  description: "Reference (id) to the organization that owns this device"
11967
+ },
11968
+ property: {
11969
+ type: ["string", "null"],
11970
+ description: "Reference (id) to the property that this device belongs to"
11945
11971
  }
11946
11972
  }
11947
11973
  };
@@ -12084,6 +12110,7 @@ var require_credential = __commonJS({
12084
12110
  "mobileKey",
12085
12111
  "pin",
12086
12112
  "publicKey",
12113
+ "passkeyChallenge",
12087
12114
  "id"
12088
12115
  ]
12089
12116
  },
@@ -12787,7 +12814,7 @@ var require_property = __commonJS({
12787
12814
  title: "Property",
12788
12815
  type: "object",
12789
12816
  description: "A property is a physical asset or building",
12790
- required: ["id", "name", "type", "hostname", "organization"],
12817
+ required: ["id", "name", "type", "organization"],
12791
12818
  properties: {
12792
12819
  id: {
12793
12820
  $ref: "definitions.json#/definitions/id"
@@ -12803,6 +12830,10 @@ var require_property = __commonJS({
12803
12830
  type: "string",
12804
12831
  enum: ["hospitality", "education", "commercial"]
12805
12832
  },
12833
+ organization: {
12834
+ type: ["string", "null"],
12835
+ description: "Reference (id) to the organization that owns this property"
12836
+ },
12806
12837
  testModeEnabled: {
12807
12838
  type: "boolean"
12808
12839
  },
@@ -12824,13 +12855,6 @@ var require_property = __commonJS({
12824
12855
  smsNumber: {
12825
12856
  type: "string"
12826
12857
  },
12827
- hostname: {
12828
- type: ["string", "null"]
12829
- },
12830
- organization: {
12831
- type: ["string", "null"],
12832
- description: "Reference (id) to the organization that owns this property"
12833
- },
12834
12858
  checkInTime: {
12835
12859
  type: "string"
12836
12860
  },
@@ -12846,111 +12870,6 @@ var require_property = __commonJS({
12846
12870
  longitude: {
12847
12871
  type: "number"
12848
12872
  },
12849
- appManifest: {
12850
- type: "object",
12851
- properties: {
12852
- name: {
12853
- type: "string"
12854
- },
12855
- short_name: {
12856
- type: "string"
12857
- },
12858
- scope: {
12859
- type: "string"
12860
- },
12861
- start_url: {
12862
- type: "string"
12863
- },
12864
- themeColor: {
12865
- type: "string"
12866
- },
12867
- backgroundColor: {
12868
- type: "string"
12869
- },
12870
- display: {
12871
- type: "string",
12872
- enum: ["fullscreen", "standalone", "minimal-ui", "browser"],
12873
- default: "fullscreen"
12874
- },
12875
- orientation: {
12876
- type: "string",
12877
- enum: ["portrait", "landscape"],
12878
- default: "portrait"
12879
- },
12880
- splash: {
12881
- type: "object",
12882
- properties: {
12883
- src: {
12884
- type: "string"
12885
- },
12886
- type: {
12887
- type: "string"
12888
- },
12889
- sizes: {
12890
- type: "string"
12891
- }
12892
- }
12893
- },
12894
- icons: {
12895
- type: "array",
12896
- items: {
12897
- type: "object",
12898
- properties: {
12899
- src: {
12900
- type: "string"
12901
- },
12902
- sizes: {
12903
- type: "string"
12904
- },
12905
- type: {
12906
- type: "string"
12907
- }
12908
- }
12909
- }
12910
- },
12911
- logo: {
12912
- type: "object",
12913
- properties: {
12914
- src: {
12915
- type: "string"
12916
- },
12917
- type: {
12918
- type: "string"
12919
- },
12920
- sizes: {
12921
- type: "string"
12922
- }
12923
- }
12924
- }
12925
- },
12926
- default: {
12927
- name: "Kohost",
12928
- short_name: "Kohost",
12929
- start_url: "/",
12930
- scope: "/",
12931
- display: "fullscreen",
12932
- orientation: "portrait",
12933
- theme_color: "#1d1f22",
12934
- background_color: "#1d1f22",
12935
- icons: [
12936
- {
12937
- src: "https://cdn.kohost.app/defaultIcon.png",
12938
- sizes: "512x512",
12939
- type: "image/png"
12940
- }
12941
- ],
12942
- splash: {
12943
- src: "https://cdn.kohost.app/defaultSplash.jpg",
12944
- sizes: "1500x800",
12945
- type: "image/jpg"
12946
- },
12947
- logo: {
12948
- src: "https://cdn.kohost.app/defaultLogo.png",
12949
- sizes: "300x75",
12950
- type: "image/png"
12951
- }
12952
- }
12953
- },
12954
12873
  appFeatures: {
12955
12874
  type: "object",
12956
12875
  properties: {
@@ -12967,6 +12886,32 @@ var require_property = __commonJS({
12967
12886
  }
12968
12887
  }
12969
12888
  }
12889
+ },
12890
+ alarmConfig: {
12891
+ type: "object",
12892
+ patternProperties: {
12893
+ "^[a-zA-Z0-9]+$": {
12894
+ type: "object",
12895
+ properties: {
12896
+ zoneLockMap: {
12897
+ type: "object",
12898
+ description: "Maps zone numbers to lock ids",
12899
+ additionalProperties: { type: "string" }
12900
+ }
12901
+ }
12902
+ }
12903
+ },
12904
+ examples: [
12905
+ {
12906
+ wZz7hucY: {
12907
+ zoneLockMap: {
12908
+ "1": "wc87hucc",
12909
+ "2": "bc86hzxc",
12910
+ "3": "zv5ah5jv"
12911
+ }
12912
+ }
12913
+ }
12914
+ ]
12970
12915
  }
12971
12916
  },
12972
12917
  additionalProperties: false
@@ -13070,7 +13015,13 @@ var require_property = __commonJS({
13070
13015
  }
13071
13016
  }
13072
13017
  },
13073
- Elevator: {}
13018
+ Elevator: {},
13019
+ Experiences: {},
13020
+ Dining: {},
13021
+ Rentals: {},
13022
+ Shop: {},
13023
+ Spa: {},
13024
+ Valet: {}
13074
13025
  },
13075
13026
  additionalProperties: false,
13076
13027
  default: {
@@ -13198,6 +13149,114 @@ var require_organization = __commonJS({
13198
13149
  type: "string"
13199
13150
  }
13200
13151
  },
13152
+ hostname: {
13153
+ type: ["string", "null"]
13154
+ },
13155
+ appManifest: {
13156
+ type: "object",
13157
+ properties: {
13158
+ name: {
13159
+ type: "string"
13160
+ },
13161
+ short_name: {
13162
+ type: "string"
13163
+ },
13164
+ scope: {
13165
+ type: "string"
13166
+ },
13167
+ start_url: {
13168
+ type: "string"
13169
+ },
13170
+ themeColor: {
13171
+ type: "string"
13172
+ },
13173
+ backgroundColor: {
13174
+ type: "string"
13175
+ },
13176
+ display: {
13177
+ type: "string",
13178
+ enum: ["fullscreen", "standalone", "minimal-ui", "browser"],
13179
+ default: "fullscreen"
13180
+ },
13181
+ orientation: {
13182
+ type: "string",
13183
+ enum: ["portrait", "landscape"],
13184
+ default: "portrait"
13185
+ },
13186
+ splash: {
13187
+ type: "object",
13188
+ properties: {
13189
+ src: {
13190
+ type: "string"
13191
+ },
13192
+ type: {
13193
+ type: "string"
13194
+ },
13195
+ sizes: {
13196
+ type: "string"
13197
+ }
13198
+ }
13199
+ },
13200
+ icons: {
13201
+ type: "array",
13202
+ items: {
13203
+ type: "object",
13204
+ properties: {
13205
+ src: {
13206
+ type: "string"
13207
+ },
13208
+ sizes: {
13209
+ type: "string"
13210
+ },
13211
+ type: {
13212
+ type: "string"
13213
+ }
13214
+ }
13215
+ }
13216
+ },
13217
+ logo: {
13218
+ type: "object",
13219
+ properties: {
13220
+ src: {
13221
+ type: "string"
13222
+ },
13223
+ type: {
13224
+ type: "string"
13225
+ },
13226
+ sizes: {
13227
+ type: "string"
13228
+ }
13229
+ }
13230
+ }
13231
+ },
13232
+ default: {
13233
+ name: "Kohost",
13234
+ short_name: "Kohost",
13235
+ start_url: "/",
13236
+ scope: "/",
13237
+ display: "fullscreen",
13238
+ orientation: "portrait",
13239
+ theme_color: "#1d1f22",
13240
+ background_color: "#1d1f22",
13241
+ icons: [
13242
+ {
13243
+ src: "https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/9c85047f-ccba-4b1c-3070-5463fbe93b00/w=512",
13244
+ sizes: "512x512",
13245
+ type: "image/png"
13246
+ }
13247
+ ],
13248
+ splash: {
13249
+ src: "https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/034fb112-5326-4d37-373e-d1cc2a4d0400/w=1500",
13250
+ sizes: "1500x800",
13251
+ type: "image/jpg"
13252
+ },
13253
+ logo: {
13254
+ src: "https://images.kohost.io/cdn-cgi/imagedelivery/vcVX2aBwdFSYr66spcFKaA/1e54c54d-3bac-4745-f46f-c2f98036af00/h=75",
13255
+ sizes: "300x75",
13256
+ type: "image/png"
13257
+ }
13258
+ }
13259
+ },
13201
13260
  credentials: {
13202
13261
  type: "object",
13203
13262
  additionalProperties: true