@kohost/api-client 3.0.0-beta.41 → 3.0.0-beta.43
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 +144 -12
- 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 +144 -12
- 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/cjs/Client.js
CHANGED
|
@@ -4755,6 +4755,158 @@ var require_AssignSpaceToReservation = __commonJS({
|
|
|
4755
4755
|
}
|
|
4756
4756
|
});
|
|
4757
4757
|
|
|
4758
|
+
// dist/useCases/DescribeReservationEarlyCheckInProducts.js
|
|
4759
|
+
var require_DescribeReservationEarlyCheckInProducts = __commonJS({
|
|
4760
|
+
"dist/useCases/DescribeReservationEarlyCheckInProducts.js"(exports2, module2) {
|
|
4761
|
+
module2.exports = /* @__PURE__ */ __name(function DescribeReservationEarlyCheckInProducts2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
4762
|
+
if (!requestData)
|
|
4763
|
+
requestData = {};
|
|
4764
|
+
const pathParams = [":id"];
|
|
4765
|
+
const { data, query, headers } = requestData;
|
|
4766
|
+
let url = "/reservations/:id/products/earlyCheckIn";
|
|
4767
|
+
if (pathParams && data) {
|
|
4768
|
+
for (const param of pathParams) {
|
|
4769
|
+
const paramName = param.replace(":", "");
|
|
4770
|
+
url = url.replace(param, data[paramName]);
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
4774
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
4775
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
4776
|
+
return Promise.reject(
|
|
4777
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
4778
|
+
);
|
|
4779
|
+
}
|
|
4780
|
+
const config = {
|
|
4781
|
+
method: "get",
|
|
4782
|
+
url,
|
|
4783
|
+
...httpConfigOptions
|
|
4784
|
+
};
|
|
4785
|
+
if (data)
|
|
4786
|
+
config.data = data;
|
|
4787
|
+
if (query)
|
|
4788
|
+
config.params = query;
|
|
4789
|
+
if (headers)
|
|
4790
|
+
config.headers = headers;
|
|
4791
|
+
return this._http.request(config);
|
|
4792
|
+
}, "DescribeReservationEarlyCheckInProducts");
|
|
4793
|
+
}
|
|
4794
|
+
});
|
|
4795
|
+
|
|
4796
|
+
// dist/useCases/PurchaseReservationEarlyCheckInProducts.js
|
|
4797
|
+
var require_PurchaseReservationEarlyCheckInProducts = __commonJS({
|
|
4798
|
+
"dist/useCases/PurchaseReservationEarlyCheckInProducts.js"(exports2, module2) {
|
|
4799
|
+
module2.exports = /* @__PURE__ */ __name(function PurchaseReservationEarlyCheckInProducts2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
4800
|
+
if (!requestData)
|
|
4801
|
+
requestData = {};
|
|
4802
|
+
const pathParams = [":id"];
|
|
4803
|
+
const { data, query, headers } = requestData;
|
|
4804
|
+
let url = "/reservations/:id/products/earlyCheckIn";
|
|
4805
|
+
if (pathParams && data) {
|
|
4806
|
+
for (const param of pathParams) {
|
|
4807
|
+
const paramName = param.replace(":", "");
|
|
4808
|
+
url = url.replace(param, data[paramName]);
|
|
4809
|
+
}
|
|
4810
|
+
}
|
|
4811
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
4812
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
4813
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
4814
|
+
return Promise.reject(
|
|
4815
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
4816
|
+
);
|
|
4817
|
+
}
|
|
4818
|
+
const config = {
|
|
4819
|
+
method: "post",
|
|
4820
|
+
url,
|
|
4821
|
+
...httpConfigOptions
|
|
4822
|
+
};
|
|
4823
|
+
if (data)
|
|
4824
|
+
config.data = data;
|
|
4825
|
+
if (query)
|
|
4826
|
+
config.params = query;
|
|
4827
|
+
if (headers)
|
|
4828
|
+
config.headers = headers;
|
|
4829
|
+
return this._http.request(config);
|
|
4830
|
+
}, "PurchaseReservationEarlyCheckInProducts");
|
|
4831
|
+
}
|
|
4832
|
+
});
|
|
4833
|
+
|
|
4834
|
+
// dist/useCases/DescribeReservationRoomUpgrades.js
|
|
4835
|
+
var require_DescribeReservationRoomUpgrades = __commonJS({
|
|
4836
|
+
"dist/useCases/DescribeReservationRoomUpgrades.js"(exports2, module2) {
|
|
4837
|
+
module2.exports = /* @__PURE__ */ __name(function DescribeReservationRoomUpgrades2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
4838
|
+
if (!requestData)
|
|
4839
|
+
requestData = {};
|
|
4840
|
+
const pathParams = [":id"];
|
|
4841
|
+
const { data, query, headers } = requestData;
|
|
4842
|
+
let url = "/reservations/:id/products/roomUpgrades";
|
|
4843
|
+
if (pathParams && data) {
|
|
4844
|
+
for (const param of pathParams) {
|
|
4845
|
+
const paramName = param.replace(":", "");
|
|
4846
|
+
url = url.replace(param, data[paramName]);
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
4850
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
4851
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
4852
|
+
return Promise.reject(
|
|
4853
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
4854
|
+
);
|
|
4855
|
+
}
|
|
4856
|
+
const config = {
|
|
4857
|
+
method: "get",
|
|
4858
|
+
url,
|
|
4859
|
+
...httpConfigOptions
|
|
4860
|
+
};
|
|
4861
|
+
if (data)
|
|
4862
|
+
config.data = data;
|
|
4863
|
+
if (query)
|
|
4864
|
+
config.params = query;
|
|
4865
|
+
if (headers)
|
|
4866
|
+
config.headers = headers;
|
|
4867
|
+
return this._http.request(config);
|
|
4868
|
+
}, "DescribeReservationRoomUpgrades");
|
|
4869
|
+
}
|
|
4870
|
+
});
|
|
4871
|
+
|
|
4872
|
+
// dist/useCases/PurchaseReservationRoomUpgrades.js
|
|
4873
|
+
var require_PurchaseReservationRoomUpgrades = __commonJS({
|
|
4874
|
+
"dist/useCases/PurchaseReservationRoomUpgrades.js"(exports2, module2) {
|
|
4875
|
+
module2.exports = /* @__PURE__ */ __name(function PurchaseReservationRoomUpgrades2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
4876
|
+
if (!requestData)
|
|
4877
|
+
requestData = {};
|
|
4878
|
+
const pathParams = [":id"];
|
|
4879
|
+
const { data, query, headers } = requestData;
|
|
4880
|
+
let url = "/reservations/:id/products/roomUpgrades";
|
|
4881
|
+
if (pathParams && data) {
|
|
4882
|
+
for (const param of pathParams) {
|
|
4883
|
+
const paramName = param.replace(":", "");
|
|
4884
|
+
url = url.replace(param, data[paramName]);
|
|
4885
|
+
}
|
|
4886
|
+
}
|
|
4887
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
4888
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
4889
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
4890
|
+
return Promise.reject(
|
|
4891
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
4892
|
+
);
|
|
4893
|
+
}
|
|
4894
|
+
const config = {
|
|
4895
|
+
method: "post",
|
|
4896
|
+
url,
|
|
4897
|
+
...httpConfigOptions
|
|
4898
|
+
};
|
|
4899
|
+
if (data)
|
|
4900
|
+
config.data = data;
|
|
4901
|
+
if (query)
|
|
4902
|
+
config.params = query;
|
|
4903
|
+
if (headers)
|
|
4904
|
+
config.headers = headers;
|
|
4905
|
+
return this._http.request(config);
|
|
4906
|
+
}, "PurchaseReservationRoomUpgrades");
|
|
4907
|
+
}
|
|
4908
|
+
});
|
|
4909
|
+
|
|
4758
4910
|
// dist/useCases/OCRDocument.js
|
|
4759
4911
|
var require_OCRDocument = __commonJS({
|
|
4760
4912
|
"dist/useCases/OCRDocument.js"(exports2, module2) {
|
|
@@ -5249,6 +5401,82 @@ var require_DeleteMediaFile = __commonJS({
|
|
|
5249
5401
|
}
|
|
5250
5402
|
});
|
|
5251
5403
|
|
|
5404
|
+
// dist/useCases/UploadImage.js
|
|
5405
|
+
var require_UploadImage = __commonJS({
|
|
5406
|
+
"dist/useCases/UploadImage.js"(exports2, module2) {
|
|
5407
|
+
module2.exports = /* @__PURE__ */ __name(function UploadImage2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
5408
|
+
if (!requestData)
|
|
5409
|
+
requestData = {};
|
|
5410
|
+
const pathParams = null;
|
|
5411
|
+
const { data, query, headers } = requestData;
|
|
5412
|
+
let url = "/mediaFiles/uploadImage";
|
|
5413
|
+
if (pathParams && data) {
|
|
5414
|
+
for (const param of pathParams) {
|
|
5415
|
+
const paramName = param.replace(":", "");
|
|
5416
|
+
url = url.replace(param, data[paramName]);
|
|
5417
|
+
}
|
|
5418
|
+
}
|
|
5419
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
5420
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
5421
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
5422
|
+
return Promise.reject(
|
|
5423
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
5424
|
+
);
|
|
5425
|
+
}
|
|
5426
|
+
const config = {
|
|
5427
|
+
method: "post",
|
|
5428
|
+
url,
|
|
5429
|
+
...httpConfigOptions
|
|
5430
|
+
};
|
|
5431
|
+
if (data)
|
|
5432
|
+
config.data = data;
|
|
5433
|
+
if (query)
|
|
5434
|
+
config.params = query;
|
|
5435
|
+
if (headers)
|
|
5436
|
+
config.headers = headers;
|
|
5437
|
+
return this._http.request(config);
|
|
5438
|
+
}, "UploadImage");
|
|
5439
|
+
}
|
|
5440
|
+
});
|
|
5441
|
+
|
|
5442
|
+
// dist/useCases/DescribeProduct.js
|
|
5443
|
+
var require_DescribeProduct = __commonJS({
|
|
5444
|
+
"dist/useCases/DescribeProduct.js"(exports2, module2) {
|
|
5445
|
+
module2.exports = /* @__PURE__ */ __name(function DescribeProduct2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
5446
|
+
if (!requestData)
|
|
5447
|
+
requestData = {};
|
|
5448
|
+
const pathParams = [":id"];
|
|
5449
|
+
const { data, query, headers } = requestData;
|
|
5450
|
+
let url = "/products/:id";
|
|
5451
|
+
if (pathParams && data) {
|
|
5452
|
+
for (const param of pathParams) {
|
|
5453
|
+
const paramName = param.replace(":", "");
|
|
5454
|
+
url = url.replace(param, data[paramName]);
|
|
5455
|
+
}
|
|
5456
|
+
}
|
|
5457
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
5458
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
5459
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
5460
|
+
return Promise.reject(
|
|
5461
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
5462
|
+
);
|
|
5463
|
+
}
|
|
5464
|
+
const config = {
|
|
5465
|
+
method: "get",
|
|
5466
|
+
url,
|
|
5467
|
+
...httpConfigOptions
|
|
5468
|
+
};
|
|
5469
|
+
if (data)
|
|
5470
|
+
config.data = data;
|
|
5471
|
+
if (query)
|
|
5472
|
+
config.params = query;
|
|
5473
|
+
if (headers)
|
|
5474
|
+
config.headers = headers;
|
|
5475
|
+
return this._http.request(config);
|
|
5476
|
+
}, "DescribeProduct");
|
|
5477
|
+
}
|
|
5478
|
+
});
|
|
5479
|
+
|
|
5252
5480
|
// src/Client/index.js
|
|
5253
5481
|
var LoginUser = require_LoginUser();
|
|
5254
5482
|
var RefreshToken = require_RefreshToken();
|
|
@@ -5375,6 +5603,10 @@ var SendPreArrivalEmail = require_SendPreArrivalEmail();
|
|
|
5375
5603
|
var BatchNotifyPreArrival = require_BatchNotifyPreArrival();
|
|
5376
5604
|
var BatchNotifyCheckIn = require_BatchNotifyCheckIn();
|
|
5377
5605
|
var AssignSpaceToReservation = require_AssignSpaceToReservation();
|
|
5606
|
+
var DescribeReservationEarlyCheckInProducts = require_DescribeReservationEarlyCheckInProducts();
|
|
5607
|
+
var PurchaseReservationEarlyCheckInProducts = require_PurchaseReservationEarlyCheckInProducts();
|
|
5608
|
+
var DescribeReservationRoomUpgrades = require_DescribeReservationRoomUpgrades();
|
|
5609
|
+
var PurchaseReservationRoomUpgrades = require_PurchaseReservationRoomUpgrades();
|
|
5378
5610
|
var OCRDocument = require_OCRDocument();
|
|
5379
5611
|
var CreateOrganization = require_CreateOrganization();
|
|
5380
5612
|
var AdminUpdateCustomer = require_AdminUpdateCustomer();
|
|
@@ -5388,6 +5620,8 @@ var DescribeProperty = require_DescribeProperty();
|
|
|
5388
5620
|
var EmailUserAccountSetup = require_EmailUserAccountSetup();
|
|
5389
5621
|
var CreateImageUploadEndpoint = require_CreateImageUploadEndpoint();
|
|
5390
5622
|
var DeleteMediaFile = require_DeleteMediaFile();
|
|
5623
|
+
var UploadImage = require_UploadImage();
|
|
5624
|
+
var DescribeProduct = require_DescribeProduct();
|
|
5391
5625
|
var { EventEmitter } = require("events");
|
|
5392
5626
|
var axios = require("axios");
|
|
5393
5627
|
var KohostApiClient = class extends EventEmitter {
|
|
@@ -5623,6 +5857,10 @@ KohostApiClient.prototype.SendPreArrivalEmail = SendPreArrivalEmail;
|
|
|
5623
5857
|
KohostApiClient.prototype.BatchNotifyPreArrival = BatchNotifyPreArrival;
|
|
5624
5858
|
KohostApiClient.prototype.BatchNotifyCheckIn = BatchNotifyCheckIn;
|
|
5625
5859
|
KohostApiClient.prototype.AssignSpaceToReservation = AssignSpaceToReservation;
|
|
5860
|
+
KohostApiClient.prototype.DescribeReservationEarlyCheckInProducts = DescribeReservationEarlyCheckInProducts;
|
|
5861
|
+
KohostApiClient.prototype.PurchaseReservationEarlyCheckInProducts = PurchaseReservationEarlyCheckInProducts;
|
|
5862
|
+
KohostApiClient.prototype.DescribeReservationRoomUpgrades = DescribeReservationRoomUpgrades;
|
|
5863
|
+
KohostApiClient.prototype.PurchaseReservationRoomUpgrades = PurchaseReservationRoomUpgrades;
|
|
5626
5864
|
KohostApiClient.prototype.OCRDocument = OCRDocument;
|
|
5627
5865
|
KohostApiClient.prototype.CreateOrganization = CreateOrganization;
|
|
5628
5866
|
KohostApiClient.prototype.AdminUpdateCustomer = AdminUpdateCustomer;
|
|
@@ -5636,4 +5874,6 @@ KohostApiClient.prototype.DescribeProperty = DescribeProperty;
|
|
|
5636
5874
|
KohostApiClient.prototype.EmailUserAccountSetup = EmailUserAccountSetup;
|
|
5637
5875
|
KohostApiClient.prototype.CreateImageUploadEndpoint = CreateImageUploadEndpoint;
|
|
5638
5876
|
KohostApiClient.prototype.DeleteMediaFile = DeleteMediaFile;
|
|
5877
|
+
KohostApiClient.prototype.UploadImage = UploadImage;
|
|
5878
|
+
KohostApiClient.prototype.DescribeProduct = DescribeProduct;
|
|
5639
5879
|
module.exports = KohostApiClient;
|
package/dist/cjs/Commands.js
CHANGED
|
@@ -301,7 +301,7 @@ var require_SendEmailCommand = __commonJS({
|
|
|
301
301
|
var Command = require_Command();
|
|
302
302
|
var RequestError = require_RequestError();
|
|
303
303
|
var SendEmailCommand2 = class extends Command {
|
|
304
|
-
constructor({ text, html, to, from, subject,
|
|
304
|
+
constructor({ text, html, to, from, subject, ...rest }) {
|
|
305
305
|
if (!to)
|
|
306
306
|
throw new RequestError("email to is required");
|
|
307
307
|
if (!from)
|
|
@@ -310,7 +310,7 @@ var require_SendEmailCommand = __commonJS({
|
|
|
310
310
|
throw new RequestError("email subject is required");
|
|
311
311
|
if (!text && !html)
|
|
312
312
|
throw new RequestError("email text or html is required");
|
|
313
|
-
super({ text, html, to, from, subject,
|
|
313
|
+
super({ text, html, to, from, subject, ...rest });
|
|
314
314
|
}
|
|
315
315
|
get name() {
|
|
316
316
|
return "SendEmail";
|
|
@@ -506,8 +506,8 @@ var require_DiscoverReservationsCommand = __commonJS({
|
|
|
506
506
|
constructor(options) {
|
|
507
507
|
if (!options)
|
|
508
508
|
throw new RequestError("options are required");
|
|
509
|
-
const { id, startDate, endDate, status } = options;
|
|
510
|
-
super({ id, startDate, endDate, status });
|
|
509
|
+
const { id, startDate, endDate, status, ...rest } = options;
|
|
510
|
+
super({ id, startDate, endDate, status, ...rest });
|
|
511
511
|
}
|
|
512
512
|
get name() {
|
|
513
513
|
return "DiscoverReservations";
|
|
@@ -521,6 +521,30 @@ var require_DiscoverReservationsCommand = __commonJS({
|
|
|
521
521
|
}
|
|
522
522
|
});
|
|
523
523
|
|
|
524
|
+
// src/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js
|
|
525
|
+
var require_DiscoverReservationRoomTypeUpsellOptionsCommand = __commonJS({
|
|
526
|
+
"src/Commands/DiscoverReservationRoomTypeUpsellOptionsCommand.js"(exports2, module2) {
|
|
527
|
+
var { RequestError } = require_Errors();
|
|
528
|
+
var Command = require_Command();
|
|
529
|
+
var DiscoverReservationRoomTypeUpsellOptionsCommand2 = class extends Command {
|
|
530
|
+
constructor(options) {
|
|
531
|
+
if (!options)
|
|
532
|
+
throw new RequestError("options are required");
|
|
533
|
+
const { id, ...rest } = options;
|
|
534
|
+
super({ id, ...rest });
|
|
535
|
+
}
|
|
536
|
+
get name() {
|
|
537
|
+
return "DiscoverReservationRoomTypeUpsellOptions";
|
|
538
|
+
}
|
|
539
|
+
get routingKey() {
|
|
540
|
+
return "reservation.discoverRoomUpsells";
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
__name(DiscoverReservationRoomTypeUpsellOptionsCommand2, "DiscoverReservationRoomTypeUpsellOptionsCommand");
|
|
544
|
+
module2.exports = DiscoverReservationRoomTypeUpsellOptionsCommand2;
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
|
|
524
548
|
// src/Commands/DiscoverRoomsCommand.js
|
|
525
549
|
var require_DiscoverRoomsCommand = __commonJS({
|
|
526
550
|
"src/Commands/DiscoverRoomsCommand.js"(exports2, module2) {
|
|
@@ -532,9 +556,18 @@ var require_DiscoverRoomsCommand = __commonJS({
|
|
|
532
556
|
startDate,
|
|
533
557
|
endDate,
|
|
534
558
|
serviceStatus,
|
|
535
|
-
housekeepingStatus
|
|
559
|
+
housekeepingStatus,
|
|
560
|
+
...rest
|
|
536
561
|
}) {
|
|
537
|
-
super({
|
|
562
|
+
super({
|
|
563
|
+
id,
|
|
564
|
+
types,
|
|
565
|
+
startDate,
|
|
566
|
+
endDate,
|
|
567
|
+
serviceStatus,
|
|
568
|
+
housekeepingStatus,
|
|
569
|
+
...rest
|
|
570
|
+
});
|
|
538
571
|
}
|
|
539
572
|
get name() {
|
|
540
573
|
return "DiscoverRooms";
|
|
@@ -607,10 +640,10 @@ var require_UpdateReservationCommand = __commonJS({
|
|
|
607
640
|
var Command = require_Command();
|
|
608
641
|
var RequestError = require_RequestError();
|
|
609
642
|
var UpdateReservationCommand2 = class extends Command {
|
|
610
|
-
constructor({ id,
|
|
643
|
+
constructor({ id, ...rest }) {
|
|
611
644
|
if (!id)
|
|
612
645
|
throw new RequestError("document type is required");
|
|
613
|
-
super({ id,
|
|
646
|
+
super({ id, ...rest });
|
|
614
647
|
}
|
|
615
648
|
get name() {
|
|
616
649
|
return "UpdateReservation";
|
|
@@ -734,6 +767,46 @@ var require_UploadImageCommand = __commonJS({
|
|
|
734
767
|
}
|
|
735
768
|
});
|
|
736
769
|
|
|
770
|
+
// src/Commands/GetProductsCommand.js
|
|
771
|
+
var require_GetProductsCommand = __commonJS({
|
|
772
|
+
"src/Commands/GetProductsCommand.js"(exports2, module2) {
|
|
773
|
+
var Command = require_Command();
|
|
774
|
+
var GetProductsCommand2 = class extends Command {
|
|
775
|
+
constructor({ id, externalSystemId, ...rest }) {
|
|
776
|
+
super({ id, externalSystemId, ...rest });
|
|
777
|
+
}
|
|
778
|
+
get name() {
|
|
779
|
+
return "GetProducts";
|
|
780
|
+
}
|
|
781
|
+
get routingKey() {
|
|
782
|
+
return `product.${this.data.id}.get`;
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
__name(GetProductsCommand2, "GetProductsCommand");
|
|
786
|
+
module2.exports = GetProductsCommand2;
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
// src/Commands/SellProductsCommand.js
|
|
791
|
+
var require_SellProductsCommand = __commonJS({
|
|
792
|
+
"src/Commands/SellProductsCommand.js"(exports2, module2) {
|
|
793
|
+
var Command = require_Command();
|
|
794
|
+
var SellProductsCommand2 = class extends Command {
|
|
795
|
+
constructor({ reservationId, userId, products, ...rest }) {
|
|
796
|
+
super({ reservationId, userId, products, ...rest });
|
|
797
|
+
}
|
|
798
|
+
get name() {
|
|
799
|
+
return "SellProducts";
|
|
800
|
+
}
|
|
801
|
+
get routingKey() {
|
|
802
|
+
return `product.${this.data.id}.sell`;
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
__name(SellProductsCommand2, "SellProductsCommand");
|
|
806
|
+
module2.exports = SellProductsCommand2;
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
|
|
737
810
|
// src/Commands/index.js
|
|
738
811
|
var SetAlarmCommand = require_SetAlarmCommand();
|
|
739
812
|
var SetDimmerCommand = require_SetDimmerCommand();
|
|
@@ -749,6 +822,7 @@ var CheckInReservationCommand = require_CheckInReservationCommand();
|
|
|
749
822
|
var SendEmailCommand = require_SendEmailCommand();
|
|
750
823
|
var SendSMSCommand = require_SendSMSCommand();
|
|
751
824
|
var DiscoverReservationsCommand = require_DiscoverReservationsCommand();
|
|
825
|
+
var DiscoverReservationRoomTypeUpsellOptionsCommand = require_DiscoverReservationRoomTypeUpsellOptionsCommand();
|
|
752
826
|
var DiscoverRoomsCommand = require_DiscoverRoomsCommand();
|
|
753
827
|
var DiscoverRoomTypesCommand = require_DiscoverRoomTypesCommand();
|
|
754
828
|
var CreateShortLinkCommand = require_CreateShortLinkCommand();
|
|
@@ -757,6 +831,8 @@ var UpdateUserCommand = require_UpdateUserCommand();
|
|
|
757
831
|
var GetMobileKeyCommand = require_GetMobileKeyCommand();
|
|
758
832
|
var CreateImageUploadEndpointCommand = require_CreateImageUploadEndpointCommand();
|
|
759
833
|
var UploadImageCommand = require_UploadImageCommand();
|
|
834
|
+
var GetProductsCommand = require_GetProductsCommand();
|
|
835
|
+
var SellProductsCommand = require_SellProductsCommand();
|
|
760
836
|
module.exports = {
|
|
761
837
|
SetAlarmCommand,
|
|
762
838
|
SetDimmerCommand,
|
|
@@ -772,6 +848,7 @@ module.exports = {
|
|
|
772
848
|
SendSMSCommand,
|
|
773
849
|
SendEmailCommand,
|
|
774
850
|
DiscoverReservationsCommand,
|
|
851
|
+
DiscoverReservationRoomTypeUpsellOptionsCommand,
|
|
775
852
|
DiscoverRoomsCommand,
|
|
776
853
|
DiscoverRoomTypesCommand,
|
|
777
854
|
CreateShortLinkCommand,
|
|
@@ -779,5 +856,7 @@ module.exports = {
|
|
|
779
856
|
UpdateUserCommand,
|
|
780
857
|
GetMobileKeyCommand,
|
|
781
858
|
CreateImageUploadEndpointCommand,
|
|
782
|
-
UploadImageCommand
|
|
859
|
+
UploadImageCommand,
|
|
860
|
+
GetProductsCommand,
|
|
861
|
+
SellProductsCommand
|
|
783
862
|
};
|
package/dist/cjs/Events.js
CHANGED
|
@@ -406,43 +406,24 @@ var require_SMSEvent = __commonJS({
|
|
|
406
406
|
}
|
|
407
407
|
});
|
|
408
408
|
|
|
409
|
-
// src/Events/
|
|
410
|
-
var
|
|
411
|
-
"src/Events/
|
|
409
|
+
// src/Events/EmailEvent.js
|
|
410
|
+
var require_EmailEvent = __commonJS({
|
|
411
|
+
"src/Events/EmailEvent.js"(exports2, module2) {
|
|
412
412
|
var Event = require_Event();
|
|
413
|
-
var
|
|
414
|
-
constructor(sms, context) {
|
|
415
|
-
super(sms, context);
|
|
416
|
-
}
|
|
417
|
-
get name() {
|
|
418
|
-
return "SMSSent";
|
|
419
|
-
}
|
|
420
|
-
get routingKey() {
|
|
421
|
-
return "comm.sms.sent";
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
__name(SMSSentEvent2, "SMSSentEvent");
|
|
425
|
-
module2.exports = SMSSentEvent2;
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
// src/Events/EmailSentEvent.js
|
|
430
|
-
var require_EmailSentEvent = __commonJS({
|
|
431
|
-
"src/Events/EmailSentEvent.js"(exports2, module2) {
|
|
432
|
-
var Event = require_Event();
|
|
433
|
-
var EmailSentEvent2 = class extends Event {
|
|
413
|
+
var EmailEvent2 = class extends Event {
|
|
434
414
|
constructor(email, context) {
|
|
435
415
|
super(email, context);
|
|
416
|
+
this.status = email.status;
|
|
436
417
|
}
|
|
437
418
|
get name() {
|
|
438
|
-
return "
|
|
419
|
+
return "EmailEvent";
|
|
439
420
|
}
|
|
440
421
|
get routingKey() {
|
|
441
|
-
return
|
|
422
|
+
return `comm.email.${this.status}`;
|
|
442
423
|
}
|
|
443
424
|
};
|
|
444
|
-
__name(
|
|
445
|
-
module2.exports =
|
|
425
|
+
__name(EmailEvent2, "EmailEvent");
|
|
426
|
+
module2.exports = EmailEvent2;
|
|
446
427
|
}
|
|
447
428
|
});
|
|
448
429
|
|
|
@@ -524,8 +505,7 @@ var SystemSpaceTypeUpdatedEvent = require_SystemSpaceTypeUpdatedEvent();
|
|
|
524
505
|
var SystemProductUpdatedEvent = require_SystemProductUpdatedEvent();
|
|
525
506
|
var SystemReservationUpdatedEvent = require_SystemReservationUpdatedEvent();
|
|
526
507
|
var SMSEvent = require_SMSEvent();
|
|
527
|
-
var
|
|
528
|
-
var EmailSentEvent = require_EmailSentEvent();
|
|
508
|
+
var EmailEvent = require_EmailEvent();
|
|
529
509
|
var ShortLinkCreatedEvent = require_ShortLinkCreatedEvent();
|
|
530
510
|
var ApplicationInUseEvent = require_ApplicationInUseEvent();
|
|
531
511
|
var ApplicationOutOfUseEvent = require_ApplicationOutOfUseEvent();
|
|
@@ -547,8 +527,7 @@ module.exports = {
|
|
|
547
527
|
SystemProductUpdatedEvent,
|
|
548
528
|
SystemReservationUpdatedEvent,
|
|
549
529
|
SMSEvent,
|
|
550
|
-
|
|
551
|
-
EmailSentEvent,
|
|
530
|
+
EmailEvent,
|
|
552
531
|
ShortLinkCreatedEvent,
|
|
553
532
|
ApplicationInUseEvent,
|
|
554
533
|
ApplicationOutOfUseEvent
|