@kohost/api-client 3.0.0-beta.41 → 3.0.0-beta.42
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/cjs/Client.js +240 -0
- package/dist/cjs/Commands.js +88 -9
- package/dist/cjs/Events.js +11 -32
- package/dist/cjs/Models.js +146 -11
- package/dist/cjs/utils.js +4 -1
- package/dist/esm/Client.js +240 -0
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Commands.js +88 -9
- package/dist/esm/Commands.js.map +3 -3
- package/dist/esm/Events.js +11 -32
- package/dist/esm/Events.js.map +3 -3
- package/dist/esm/Models.js +146 -11
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/SocketIoClient.js +261 -86
- package/dist/esm/SocketIoClient.js.map +4 -4
- package/dist/esm/utils.js +4 -1
- package/dist/esm/utils.js.map +2 -2
- package/dist/useCases/DescribeProduct.js +32 -0
- package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +32 -0
- package/dist/useCases/DescribeReservationRoomUpgrades.js +32 -0
- package/dist/useCases/PurchaseReservationEarlyCheckInProducts.js +32 -0
- package/dist/useCases/PurchaseReservationRoomUpgrades.js +32 -0
- package/dist/useCases/UploadImage.js +32 -0
- package/package.json +1 -1
package/dist/esm/Models.js
CHANGED
|
@@ -7478,6 +7478,7 @@ var require_common = __commonJS({
|
|
|
7478
7478
|
"lg",
|
|
7479
7479
|
"lirc",
|
|
7480
7480
|
"mews",
|
|
7481
|
+
"paxton",
|
|
7481
7482
|
"pelican-wireless",
|
|
7482
7483
|
"rebrandly",
|
|
7483
7484
|
"salto",
|
|
@@ -7485,7 +7486,9 @@ var require_common = __commonJS({
|
|
|
7485
7486
|
"se",
|
|
7486
7487
|
"sendgrid",
|
|
7487
7488
|
"stay-n-touch",
|
|
7488
|
-
"twilio"
|
|
7489
|
+
"twilio",
|
|
7490
|
+
"cloudflare-images",
|
|
7491
|
+
"cloudflare-stream"
|
|
7489
7492
|
]
|
|
7490
7493
|
}
|
|
7491
7494
|
}
|
|
@@ -8268,6 +8271,9 @@ var require_lock = __commonJS({
|
|
|
8268
8271
|
type: {
|
|
8269
8272
|
$ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/type"
|
|
8270
8273
|
},
|
|
8274
|
+
offline: {
|
|
8275
|
+
type: "boolean"
|
|
8276
|
+
},
|
|
8271
8277
|
supportedNotifications: {
|
|
8272
8278
|
$ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
|
|
8273
8279
|
},
|
|
@@ -9316,6 +9322,9 @@ var require_camera = __commonJS({
|
|
|
9316
9322
|
}
|
|
9317
9323
|
}
|
|
9318
9324
|
},
|
|
9325
|
+
previewImage: {
|
|
9326
|
+
type: "string"
|
|
9327
|
+
},
|
|
9319
9328
|
systemData: {
|
|
9320
9329
|
$ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/systemData"
|
|
9321
9330
|
},
|
|
@@ -9450,6 +9459,9 @@ var require_mediaSource = __commonJS({
|
|
|
9450
9459
|
"uncontrolledDevice"
|
|
9451
9460
|
]
|
|
9452
9461
|
},
|
|
9462
|
+
name: {
|
|
9463
|
+
$ref: "https://api.kohost.io/schemas/v3/definitions/device.json#/definitions/name"
|
|
9464
|
+
},
|
|
9453
9465
|
driver: {
|
|
9454
9466
|
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/driver"
|
|
9455
9467
|
},
|
|
@@ -10907,13 +10919,14 @@ var require_reservation = __commonJS({
|
|
|
10907
10919
|
properties: {
|
|
10908
10920
|
date: {
|
|
10909
10921
|
type: "string",
|
|
10910
|
-
format: "date"
|
|
10922
|
+
format: "date-time"
|
|
10911
10923
|
},
|
|
10912
10924
|
amount: {
|
|
10913
10925
|
type: "number"
|
|
10914
10926
|
},
|
|
10915
10927
|
type: {
|
|
10916
|
-
type: "string"
|
|
10928
|
+
type: "string",
|
|
10929
|
+
enum: ["service", "product"]
|
|
10917
10930
|
}
|
|
10918
10931
|
}
|
|
10919
10932
|
}
|
|
@@ -13739,7 +13752,7 @@ var require_product = __commonJS({
|
|
|
13739
13752
|
$id: "https://api.kohost.io/schemas/v3/product.json",
|
|
13740
13753
|
title: "Product",
|
|
13741
13754
|
type: "object",
|
|
13742
|
-
required: ["name", "price", "
|
|
13755
|
+
required: ["name", "price", "driver"],
|
|
13743
13756
|
properties: {
|
|
13744
13757
|
id: {
|
|
13745
13758
|
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
|
|
@@ -13759,15 +13772,12 @@ var require_product = __commonJS({
|
|
|
13759
13772
|
price: {
|
|
13760
13773
|
type: "number"
|
|
13761
13774
|
},
|
|
13762
|
-
currency: {
|
|
13763
|
-
type: "string",
|
|
13764
|
-
description: "ISO 4217 format",
|
|
13765
|
-
minLength: 3,
|
|
13766
|
-
maxLength: 3
|
|
13767
|
-
},
|
|
13768
13775
|
image: {
|
|
13769
13776
|
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/file"
|
|
13770
13777
|
},
|
|
13778
|
+
category: {
|
|
13779
|
+
type: "string"
|
|
13780
|
+
},
|
|
13771
13781
|
imageUrl: {
|
|
13772
13782
|
format: "uri",
|
|
13773
13783
|
pattern: "^https?://"
|
|
@@ -14287,6 +14297,9 @@ var require_smsMessage = __commonJS({
|
|
|
14287
14297
|
driver: {
|
|
14288
14298
|
type: "string"
|
|
14289
14299
|
},
|
|
14300
|
+
appData: {
|
|
14301
|
+
type: "object"
|
|
14302
|
+
},
|
|
14290
14303
|
createdAt: {
|
|
14291
14304
|
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
|
|
14292
14305
|
},
|
|
@@ -14330,6 +14343,112 @@ var require_smsMessage2 = __commonJS({
|
|
|
14330
14343
|
}
|
|
14331
14344
|
});
|
|
14332
14345
|
|
|
14346
|
+
// src/schemas/emailMessage.json
|
|
14347
|
+
var require_emailMessage = __commonJS({
|
|
14348
|
+
"src/schemas/emailMessage.json"(exports, module) {
|
|
14349
|
+
module.exports = {
|
|
14350
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
14351
|
+
$id: "https://api.kohost.io/schemas/v3/emailMessage.json",
|
|
14352
|
+
title: "Email Message",
|
|
14353
|
+
type: "object",
|
|
14354
|
+
required: ["to", "from", "status", "subject"],
|
|
14355
|
+
properties: {
|
|
14356
|
+
id: {
|
|
14357
|
+
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/id"
|
|
14358
|
+
},
|
|
14359
|
+
type: {
|
|
14360
|
+
type: "string",
|
|
14361
|
+
default: "emailMessage"
|
|
14362
|
+
},
|
|
14363
|
+
to: {
|
|
14364
|
+
type: "string",
|
|
14365
|
+
pattern: "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"
|
|
14366
|
+
},
|
|
14367
|
+
from: {
|
|
14368
|
+
type: "string",
|
|
14369
|
+
pattern: ".*<[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+>.*",
|
|
14370
|
+
description: "Must be in the format of 'Sender <email@example.com>"
|
|
14371
|
+
},
|
|
14372
|
+
subject: {
|
|
14373
|
+
type: "string"
|
|
14374
|
+
},
|
|
14375
|
+
status: {
|
|
14376
|
+
type: "string",
|
|
14377
|
+
enum: [
|
|
14378
|
+
"queued",
|
|
14379
|
+
"sending",
|
|
14380
|
+
"sent",
|
|
14381
|
+
"deferred",
|
|
14382
|
+
"delivered",
|
|
14383
|
+
"undelivered",
|
|
14384
|
+
"bounced",
|
|
14385
|
+
"blocked",
|
|
14386
|
+
"receiving",
|
|
14387
|
+
"received",
|
|
14388
|
+
"opened",
|
|
14389
|
+
"clicked",
|
|
14390
|
+
"unsubscribed",
|
|
14391
|
+
"spamReport"
|
|
14392
|
+
]
|
|
14393
|
+
},
|
|
14394
|
+
statusMessage: {
|
|
14395
|
+
type: "string"
|
|
14396
|
+
},
|
|
14397
|
+
html: {
|
|
14398
|
+
type: "string"
|
|
14399
|
+
},
|
|
14400
|
+
text: {
|
|
14401
|
+
type: "string"
|
|
14402
|
+
},
|
|
14403
|
+
driver: {
|
|
14404
|
+
type: "string"
|
|
14405
|
+
},
|
|
14406
|
+
appData: {
|
|
14407
|
+
type: "object"
|
|
14408
|
+
},
|
|
14409
|
+
createdAt: {
|
|
14410
|
+
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
|
|
14411
|
+
},
|
|
14412
|
+
updatedAt: {
|
|
14413
|
+
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/date"
|
|
14414
|
+
},
|
|
14415
|
+
systemData: {
|
|
14416
|
+
$ref: "https://api.kohost.io/schemas/v3/definitions/common.json#/definitions/systemData"
|
|
14417
|
+
}
|
|
14418
|
+
}
|
|
14419
|
+
};
|
|
14420
|
+
}
|
|
14421
|
+
});
|
|
14422
|
+
|
|
14423
|
+
// src/Models/emailMessage.js
|
|
14424
|
+
var require_emailMessage2 = __commonJS({
|
|
14425
|
+
"src/Models/emailMessage.js"(exports, module) {
|
|
14426
|
+
var schemas = require_schema();
|
|
14427
|
+
var schema = require_emailMessage();
|
|
14428
|
+
var Kohost = require_kohost();
|
|
14429
|
+
schemas.add(schema);
|
|
14430
|
+
var validator = schemas.compile(schema);
|
|
14431
|
+
var EmailMessage = class extends Kohost {
|
|
14432
|
+
constructor(data) {
|
|
14433
|
+
super(data);
|
|
14434
|
+
}
|
|
14435
|
+
};
|
|
14436
|
+
__name(EmailMessage, "EmailMessage");
|
|
14437
|
+
Object.defineProperty(EmailMessage.prototype, "schema", {
|
|
14438
|
+
value: schema
|
|
14439
|
+
});
|
|
14440
|
+
Object.defineProperty(EmailMessage.prototype, "validator", {
|
|
14441
|
+
get: function() {
|
|
14442
|
+
return validator;
|
|
14443
|
+
}
|
|
14444
|
+
});
|
|
14445
|
+
Object.defineProperty(EmailMessage, "validProperties", {
|
|
14446
|
+
value: Object.keys(schema.properties)
|
|
14447
|
+
});
|
|
14448
|
+
module.exports = EmailMessage;
|
|
14449
|
+
}
|
|
14450
|
+
});
|
|
14451
|
+
|
|
14333
14452
|
// src/schemas/property.json
|
|
14334
14453
|
var require_property = __commonJS({
|
|
14335
14454
|
"src/schemas/property.json"(exports, module) {
|
|
@@ -14499,7 +14618,21 @@ var require_property = __commonJS({
|
|
|
14499
14618
|
type: "object",
|
|
14500
14619
|
properties: {
|
|
14501
14620
|
RoomControl: {},
|
|
14502
|
-
CheckIn: {
|
|
14621
|
+
CheckIn: {
|
|
14622
|
+
properties: {
|
|
14623
|
+
payment: {},
|
|
14624
|
+
identification: {},
|
|
14625
|
+
earlyCheckIn: {
|
|
14626
|
+
properties: {
|
|
14627
|
+
dynamic: {
|
|
14628
|
+
type: "boolean",
|
|
14629
|
+
default: false
|
|
14630
|
+
}
|
|
14631
|
+
}
|
|
14632
|
+
},
|
|
14633
|
+
roomUpgrades: {}
|
|
14634
|
+
}
|
|
14635
|
+
},
|
|
14503
14636
|
CheckOut: {},
|
|
14504
14637
|
Concierge: {},
|
|
14505
14638
|
DigitalKey: {
|
|
@@ -14686,6 +14819,7 @@ var require_Models = __commonJS({
|
|
|
14686
14819
|
var EnergyReportShard = require_energyReportShard2();
|
|
14687
14820
|
var EnergyReport = require_energyReport2();
|
|
14688
14821
|
var SMSMessage = require_smsMessage2();
|
|
14822
|
+
var EmailMessage = require_emailMessage2();
|
|
14689
14823
|
var Property = require_property2();
|
|
14690
14824
|
var Organization = require_organization2();
|
|
14691
14825
|
module.exports = {
|
|
@@ -14718,6 +14852,7 @@ var require_Models = __commonJS({
|
|
|
14718
14852
|
EnergyReportShard,
|
|
14719
14853
|
EnergyReport,
|
|
14720
14854
|
SMSMessage,
|
|
14855
|
+
EmailMessage,
|
|
14721
14856
|
MediaFile
|
|
14722
14857
|
};
|
|
14723
14858
|
}
|