@kohost/api-client 3.0.0-beta.10 → 3.0.0-beta.12

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.
@@ -7586,6 +7586,9 @@ var require_switch = __commonJS({
7586
7586
  id: {
7587
7587
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/id"
7588
7588
  },
7589
+ name: {
7590
+ type: "string"
7591
+ },
7589
7592
  type: {
7590
7593
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
7591
7594
  },
@@ -8099,6 +8102,9 @@ var require_dimmer = __commonJS({
8099
8102
  id: {
8100
8103
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/id"
8101
8104
  },
8105
+ name: {
8106
+ type: "string"
8107
+ },
8102
8108
  type: {
8103
8109
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
8104
8110
  },
@@ -8478,6 +8484,9 @@ var require_windowCovering = __commonJS({
8478
8484
  id: {
8479
8485
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/id"
8480
8486
  },
8487
+ name: {
8488
+ type: "string"
8489
+ },
8481
8490
  type: {
8482
8491
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
8483
8492
  },
@@ -8973,6 +8982,9 @@ var require_courtesy = __commonJS({
8973
8982
  id: {
8974
8983
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/id"
8975
8984
  },
8985
+ name: {
8986
+ type: "string"
8987
+ },
8976
8988
  type: {
8977
8989
  $ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
8978
8990
  },
@@ -10544,14 +10556,40 @@ var require_reservation = __commonJS({
10544
10556
  type: "string"
10545
10557
  }
10546
10558
  },
10559
+ spaceType: {
10560
+ type: "string"
10561
+ },
10547
10562
  space: {
10548
10563
  type: "string"
10549
10564
  },
10550
10565
  status: {
10551
10566
  type: "string",
10552
- enum: ["reserved", "checkedIn", "checkedOut", "cancelled", "noShow", "enquired", "requested", "optional"],
10567
+ enum: [
10568
+ "reserved",
10569
+ "checkedIn",
10570
+ "checkedOut",
10571
+ "cancelled",
10572
+ "noShow",
10573
+ "enquired",
10574
+ "requested",
10575
+ "optional"
10576
+ ],
10553
10577
  description: " reserved - confirmed by both parties, before check-in\n checkedIn - checked in\n checkedOut - checked out\n cancelled - Cancelled\n noShow - No show\n enquired - Confirmed neither by the customer nor enterprise\n requested - Confirmed by the customer but not the enterprise (waitlist)\n optional - Confirmed by the enterprise but not the customer (holding)"
10554
10578
  },
10579
+ mobileCheckInStatus: {
10580
+ type: "string",
10581
+ enum: [
10582
+ "ready",
10583
+ "blocked",
10584
+ "preArrivalStepsRequired",
10585
+ "spaceNotAssigned",
10586
+ "spaceNotReady",
10587
+ "checkInTimeNotStarted"
10588
+ ]
10589
+ },
10590
+ mobileCheckInStatusMessage: {
10591
+ type: "string"
10592
+ },
10555
10593
  confirmationNumber: {
10556
10594
  type: "string"
10557
10595
  },
@@ -10572,6 +10610,24 @@ var require_reservation = __commonJS({
10572
10610
  type: "number",
10573
10611
  default: 0
10574
10612
  },
10613
+ revenue: {
10614
+ type: "array",
10615
+ items: {
10616
+ type: "object",
10617
+ properties: {
10618
+ date: {
10619
+ type: "string",
10620
+ format: "date"
10621
+ },
10622
+ amount: {
10623
+ type: "number"
10624
+ },
10625
+ type: {
10626
+ type: "string"
10627
+ }
10628
+ }
10629
+ }
10630
+ },
10575
10631
  rateSuppressed: {
10576
10632
  type: "boolean"
10577
10633
  },
@@ -10616,6 +10672,15 @@ var require_reservation2 = __commonJS({
10616
10672
  range(tz) {
10617
10673
  const start = new Date(this.checkInDateTime);
10618
10674
  const end = new Date(this.checkOutDateTime);
10675
+ if (start.getDate() === end.getDate() && start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear()) {
10676
+ return `${start.toLocaleString("default", {
10677
+ month: "short",
10678
+ timeZone: tz
10679
+ })} ${start.toLocaleString("default", {
10680
+ timeZone: tz,
10681
+ day: "numeric"
10682
+ })}`;
10683
+ }
10619
10684
  if (start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear()) {
10620
10685
  return `${start.toLocaleString("default", {
10621
10686
  month: "short",
@@ -10753,6 +10818,9 @@ var require_space = __commonJS({
10753
10818
  "other"
10754
10819
  ]
10755
10820
  },
10821
+ subType: {
10822
+ type: "string"
10823
+ },
10756
10824
  rooms: {
10757
10825
  type: "array",
10758
10826
  items: {
@@ -10884,9 +10952,6 @@ var require_space2 = __commonJS({
10884
10952
  get hasCourtesy() {
10885
10953
  return this.rooms.some((room) => room.hasCourtesy);
10886
10954
  }
10887
- get hasSceneController() {
10888
- return this.rooms.some((room) => room.hasSceneController);
10889
- }
10890
10955
  get hasCamera() {
10891
10956
  return this.rooms.some((room) => room.hasCamera);
10892
10957
  }
@@ -10930,6 +10995,69 @@ var require_space2 = __commonJS({
10930
10995
  }
10931
10996
  });
10932
10997
 
10998
+ // src/schemas/spaceType.json
10999
+ var require_spaceType = __commonJS({
11000
+ "src/schemas/spaceType.json"(exports, module) {
11001
+ module.exports = {
11002
+ $schema: "http://json-schema.org/draft-07/schema",
11003
+ $id: "https://api.kohost.app/schemas/v3/spaceType.json",
11004
+ title: "Space Type",
11005
+ type: "object",
11006
+ properties: {
11007
+ id: {
11008
+ $ref: "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
11009
+ },
11010
+ type: {
11011
+ type: "string"
11012
+ },
11013
+ name: {
11014
+ type: "string",
11015
+ minLength: 1
11016
+ },
11017
+ description: {
11018
+ type: "string"
11019
+ },
11020
+ imageUrl: {
11021
+ format: "uri",
11022
+ pattern: "^https?://"
11023
+ },
11024
+ systemData: {
11025
+ $ref: "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/systemData"
11026
+ }
11027
+ }
11028
+ };
11029
+ }
11030
+ });
11031
+
11032
+ // src/Models/spaceType.js
11033
+ var require_spaceType2 = __commonJS({
11034
+ "src/Models/spaceType.js"(exports, module) {
11035
+ var schemas = require_schema();
11036
+ var schema = require_spaceType();
11037
+ var Kohost = require_kohost();
11038
+ schemas.add(schema);
11039
+ var validator = schemas.compile(schema);
11040
+ var SpaceType = class extends Kohost {
11041
+ constructor(data) {
11042
+ super(data);
11043
+ }
11044
+ };
11045
+ __name(SpaceType, "SpaceType");
11046
+ Object.defineProperty(SpaceType.prototype, "schema", {
11047
+ value: schema
11048
+ });
11049
+ Object.defineProperty(SpaceType.prototype, "validator", {
11050
+ get: function() {
11051
+ return validator;
11052
+ }
11053
+ });
11054
+ Object.defineProperty(SpaceType, "validProperties", {
11055
+ value: Object.keys(schema.properties)
11056
+ });
11057
+ module.exports = SpaceType;
11058
+ }
11059
+ });
11060
+
10933
11061
  // src/schemas/ticket.json
10934
11062
  var require_ticket = __commonJS({
10935
11063
  "src/schemas/ticket.json"(exports, module) {
@@ -13803,6 +13931,7 @@ var require_Models = __commonJS({
13803
13931
  var Reservation = require_reservation2();
13804
13932
  var Application = require_application2();
13805
13933
  var Space = require_space2();
13934
+ var SpaceType = require_spaceType2();
13806
13935
  var Ticket = require_ticket2();
13807
13936
  var Scene = require_scene2();
13808
13937
  var Gateway = require_gateway2();
@@ -13834,6 +13963,7 @@ var require_Models = __commonJS({
13834
13963
  Room,
13835
13964
  Application,
13836
13965
  Space,
13966
+ SpaceType,
13837
13967
  Ticket,
13838
13968
  Scene,
13839
13969
  DiscoveredDevice,