@kohost/api-client 3.0.0-beta.40 → 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 +408 -8
- package/dist/cjs/Commands.js +134 -11
- package/dist/cjs/Events.js +24 -22
- package/dist/cjs/Models.js +384 -17
- package/dist/cjs/utils.js +8 -1
- package/dist/esm/Client.js +421 -13
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Commands.js +134 -11
- package/dist/esm/Commands.js.map +3 -3
- package/dist/esm/Events.js +24 -22
- package/dist/esm/Events.js.map +3 -3
- package/dist/esm/Models.js +384 -17
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/SocketIoClient.js +277 -89
- package/dist/esm/SocketIoClient.js.map +4 -4
- package/dist/esm/defs.js +13 -5
- package/dist/esm/defs.js.map +2 -2
- package/dist/esm/utils.js +8 -1
- package/dist/esm/utils.js.map +2 -2
- package/dist/useCases/CreateImageUploadEndpoint.js +32 -0
- package/dist/useCases/DeleteMediaFile.js +32 -0
- package/dist/useCases/{GetMobileKey.js → DescribeLockCredential.js} +2 -2
- package/dist/useCases/DescribeMyAccessCredentials.js +32 -0
- package/dist/useCases/DescribeProduct.js +32 -0
- package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +32 -0
- package/dist/useCases/DescribeReservationRoomUpgrades.js +32 -0
- package/dist/useCases/ListUserSpaces.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/Client.js
CHANGED
|
@@ -613,6 +613,44 @@ var require_ListUserReservations = __commonJS({
|
|
|
613
613
|
}
|
|
614
614
|
});
|
|
615
615
|
|
|
616
|
+
// dist/useCases/ListUserSpaces.js
|
|
617
|
+
var require_ListUserSpaces = __commonJS({
|
|
618
|
+
"dist/useCases/ListUserSpaces.js"(exports, module) {
|
|
619
|
+
module.exports = /* @__PURE__ */ __name(function ListUserSpaces(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
620
|
+
if (!requestData)
|
|
621
|
+
requestData = {};
|
|
622
|
+
const pathParams = [":id"];
|
|
623
|
+
const { data, query, headers } = requestData;
|
|
624
|
+
let url = "/users/:id/spaces";
|
|
625
|
+
if (pathParams && data) {
|
|
626
|
+
for (const param of pathParams) {
|
|
627
|
+
const paramName = param.replace(":", "");
|
|
628
|
+
url = url.replace(param, data[paramName]);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
632
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
633
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
634
|
+
return Promise.reject(
|
|
635
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
const config = {
|
|
639
|
+
method: "get",
|
|
640
|
+
url,
|
|
641
|
+
...httpConfigOptions
|
|
642
|
+
};
|
|
643
|
+
if (data)
|
|
644
|
+
config.data = data;
|
|
645
|
+
if (query)
|
|
646
|
+
config.params = query;
|
|
647
|
+
if (headers)
|
|
648
|
+
config.headers = headers;
|
|
649
|
+
return this._http.request(config);
|
|
650
|
+
}, "ListUserSpaces");
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
|
|
616
654
|
// dist/useCases/ListTeam.js
|
|
617
655
|
var require_ListTeam = __commonJS({
|
|
618
656
|
"dist/useCases/ListTeam.js"(exports, module) {
|
|
@@ -651,6 +689,44 @@ var require_ListTeam = __commonJS({
|
|
|
651
689
|
}
|
|
652
690
|
});
|
|
653
691
|
|
|
692
|
+
// dist/useCases/DescribeMyAccessCredentials.js
|
|
693
|
+
var require_DescribeMyAccessCredentials = __commonJS({
|
|
694
|
+
"dist/useCases/DescribeMyAccessCredentials.js"(exports, module) {
|
|
695
|
+
module.exports = /* @__PURE__ */ __name(function DescribeMyAccessCredentials(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
696
|
+
if (!requestData)
|
|
697
|
+
requestData = {};
|
|
698
|
+
const pathParams = null;
|
|
699
|
+
const { data, query, headers } = requestData;
|
|
700
|
+
let url = "/users/me/accessCredentials";
|
|
701
|
+
if (pathParams && data) {
|
|
702
|
+
for (const param of pathParams) {
|
|
703
|
+
const paramName = param.replace(":", "");
|
|
704
|
+
url = url.replace(param, data[paramName]);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
708
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
709
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
710
|
+
return Promise.reject(
|
|
711
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
const config = {
|
|
715
|
+
method: "get",
|
|
716
|
+
url,
|
|
717
|
+
...httpConfigOptions
|
|
718
|
+
};
|
|
719
|
+
if (data)
|
|
720
|
+
config.data = data;
|
|
721
|
+
if (query)
|
|
722
|
+
config.params = query;
|
|
723
|
+
if (headers)
|
|
724
|
+
config.headers = headers;
|
|
725
|
+
return this._http.request(config);
|
|
726
|
+
}, "DescribeMyAccessCredentials");
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
|
|
654
730
|
// dist/useCases/ListSpaces.js
|
|
655
731
|
var require_ListSpaces = __commonJS({
|
|
656
732
|
"dist/useCases/ListSpaces.js"(exports, module) {
|
|
@@ -2437,15 +2513,15 @@ var require_DescribeLock = __commonJS({
|
|
|
2437
2513
|
}
|
|
2438
2514
|
});
|
|
2439
2515
|
|
|
2440
|
-
// dist/useCases/
|
|
2441
|
-
var
|
|
2442
|
-
"dist/useCases/
|
|
2443
|
-
module.exports = /* @__PURE__ */ __name(function
|
|
2516
|
+
// dist/useCases/DescribeLockCredential.js
|
|
2517
|
+
var require_DescribeLockCredential = __commonJS({
|
|
2518
|
+
"dist/useCases/DescribeLockCredential.js"(exports, module) {
|
|
2519
|
+
module.exports = /* @__PURE__ */ __name(function DescribeLockCredential(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
2444
2520
|
if (!requestData)
|
|
2445
2521
|
requestData = {};
|
|
2446
2522
|
const pathParams = [":roomId", ":id"];
|
|
2447
2523
|
const { data, query, headers } = requestData;
|
|
2448
|
-
let url = "/rooms/:roomId/locks/:id/
|
|
2524
|
+
let url = "/rooms/:roomId/locks/:id/credential";
|
|
2449
2525
|
if (pathParams && data) {
|
|
2450
2526
|
for (const param of pathParams) {
|
|
2451
2527
|
const paramName = param.replace(":", "");
|
|
@@ -2471,7 +2547,7 @@ var require_GetMobileKey = __commonJS({
|
|
|
2471
2547
|
if (headers)
|
|
2472
2548
|
config.headers = headers;
|
|
2473
2549
|
return this._http.request(config);
|
|
2474
|
-
}, "
|
|
2550
|
+
}, "DescribeLockCredential");
|
|
2475
2551
|
}
|
|
2476
2552
|
});
|
|
2477
2553
|
|
|
@@ -4679,6 +4755,158 @@ var require_AssignSpaceToReservation = __commonJS({
|
|
|
4679
4755
|
}
|
|
4680
4756
|
});
|
|
4681
4757
|
|
|
4758
|
+
// dist/useCases/DescribeReservationEarlyCheckInProducts.js
|
|
4759
|
+
var require_DescribeReservationEarlyCheckInProducts = __commonJS({
|
|
4760
|
+
"dist/useCases/DescribeReservationEarlyCheckInProducts.js"(exports, module) {
|
|
4761
|
+
module.exports = /* @__PURE__ */ __name(function DescribeReservationEarlyCheckInProducts(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"(exports, module) {
|
|
4799
|
+
module.exports = /* @__PURE__ */ __name(function PurchaseReservationEarlyCheckInProducts(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"(exports, module) {
|
|
4837
|
+
module.exports = /* @__PURE__ */ __name(function DescribeReservationRoomUpgrades(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"(exports, module) {
|
|
4875
|
+
module.exports = /* @__PURE__ */ __name(function PurchaseReservationRoomUpgrades(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
|
+
|
|
4682
4910
|
// dist/useCases/OCRDocument.js
|
|
4683
4911
|
var require_OCRDocument = __commonJS({
|
|
4684
4912
|
"dist/useCases/OCRDocument.js"(exports, module) {
|
|
@@ -5097,6 +5325,158 @@ var require_EmailUserAccountSetup = __commonJS({
|
|
|
5097
5325
|
}
|
|
5098
5326
|
});
|
|
5099
5327
|
|
|
5328
|
+
// dist/useCases/CreateImageUploadEndpoint.js
|
|
5329
|
+
var require_CreateImageUploadEndpoint = __commonJS({
|
|
5330
|
+
"dist/useCases/CreateImageUploadEndpoint.js"(exports, module) {
|
|
5331
|
+
module.exports = /* @__PURE__ */ __name(function CreateImageUploadEndpoint(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
5332
|
+
if (!requestData)
|
|
5333
|
+
requestData = {};
|
|
5334
|
+
const pathParams = null;
|
|
5335
|
+
const { data, query, headers } = requestData;
|
|
5336
|
+
let url = "/mediaFiles/imageUploadEndpoint";
|
|
5337
|
+
if (pathParams && data) {
|
|
5338
|
+
for (const param of pathParams) {
|
|
5339
|
+
const paramName = param.replace(":", "");
|
|
5340
|
+
url = url.replace(param, data[paramName]);
|
|
5341
|
+
}
|
|
5342
|
+
}
|
|
5343
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
5344
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
5345
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
5346
|
+
return Promise.reject(
|
|
5347
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
5348
|
+
);
|
|
5349
|
+
}
|
|
5350
|
+
const config = {
|
|
5351
|
+
method: "post",
|
|
5352
|
+
url,
|
|
5353
|
+
...httpConfigOptions
|
|
5354
|
+
};
|
|
5355
|
+
if (data)
|
|
5356
|
+
config.data = data;
|
|
5357
|
+
if (query)
|
|
5358
|
+
config.params = query;
|
|
5359
|
+
if (headers)
|
|
5360
|
+
config.headers = headers;
|
|
5361
|
+
return this._http.request(config);
|
|
5362
|
+
}, "CreateImageUploadEndpoint");
|
|
5363
|
+
}
|
|
5364
|
+
});
|
|
5365
|
+
|
|
5366
|
+
// dist/useCases/DeleteMediaFile.js
|
|
5367
|
+
var require_DeleteMediaFile = __commonJS({
|
|
5368
|
+
"dist/useCases/DeleteMediaFile.js"(exports, module) {
|
|
5369
|
+
module.exports = /* @__PURE__ */ __name(function DeleteMediaFile(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
5370
|
+
if (!requestData)
|
|
5371
|
+
requestData = {};
|
|
5372
|
+
const pathParams = [":id"];
|
|
5373
|
+
const { data, query, headers } = requestData;
|
|
5374
|
+
let url = "/mediaFiles/:id";
|
|
5375
|
+
if (pathParams && data) {
|
|
5376
|
+
for (const param of pathParams) {
|
|
5377
|
+
const paramName = param.replace(":", "");
|
|
5378
|
+
url = url.replace(param, data[paramName]);
|
|
5379
|
+
}
|
|
5380
|
+
}
|
|
5381
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
5382
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
5383
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
5384
|
+
return Promise.reject(
|
|
5385
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
5386
|
+
);
|
|
5387
|
+
}
|
|
5388
|
+
const config = {
|
|
5389
|
+
method: "delete",
|
|
5390
|
+
url,
|
|
5391
|
+
...httpConfigOptions
|
|
5392
|
+
};
|
|
5393
|
+
if (data)
|
|
5394
|
+
config.data = data;
|
|
5395
|
+
if (query)
|
|
5396
|
+
config.params = query;
|
|
5397
|
+
if (headers)
|
|
5398
|
+
config.headers = headers;
|
|
5399
|
+
return this._http.request(config);
|
|
5400
|
+
}, "DeleteMediaFile");
|
|
5401
|
+
}
|
|
5402
|
+
});
|
|
5403
|
+
|
|
5404
|
+
// dist/useCases/UploadImage.js
|
|
5405
|
+
var require_UploadImage = __commonJS({
|
|
5406
|
+
"dist/useCases/UploadImage.js"(exports, module) {
|
|
5407
|
+
module.exports = /* @__PURE__ */ __name(function UploadImage(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"(exports, module) {
|
|
5445
|
+
module.exports = /* @__PURE__ */ __name(function DescribeProduct(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
|
+
|
|
5100
5480
|
// node_modules/events/events.js
|
|
5101
5481
|
var require_events = __commonJS({
|
|
5102
5482
|
"node_modules/events/events.js"(exports, module) {
|
|
@@ -5802,6 +6182,8 @@ var require_axios = __commonJS({
|
|
|
5802
6182
|
}, "visit");
|
|
5803
6183
|
return visit(obj, 0);
|
|
5804
6184
|
}, "toJSONObject");
|
|
6185
|
+
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
6186
|
+
var isThenable = /* @__PURE__ */ __name((thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch), "isThenable");
|
|
5805
6187
|
var utils = {
|
|
5806
6188
|
isArray,
|
|
5807
6189
|
isArrayBuffer,
|
|
@@ -5852,7 +6234,9 @@ var require_axios = __commonJS({
|
|
|
5852
6234
|
ALPHABET,
|
|
5853
6235
|
generateString,
|
|
5854
6236
|
isSpecCompliantForm,
|
|
5855
|
-
toJSONObject
|
|
6237
|
+
toJSONObject,
|
|
6238
|
+
isAsyncFn,
|
|
6239
|
+
isThenable
|
|
5856
6240
|
};
|
|
5857
6241
|
function AxiosError(message, code, config, request, response) {
|
|
5858
6242
|
Error.call(this);
|
|
@@ -6852,8 +7236,12 @@ var require_axios = __commonJS({
|
|
|
6852
7236
|
}
|
|
6853
7237
|
}
|
|
6854
7238
|
__name(done, "done");
|
|
6855
|
-
if (utils.isFormData(requestData)
|
|
6856
|
-
|
|
7239
|
+
if (utils.isFormData(requestData)) {
|
|
7240
|
+
if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
|
|
7241
|
+
requestHeaders.setContentType(false);
|
|
7242
|
+
} else {
|
|
7243
|
+
requestHeaders.setContentType("multipart/form-data;", false);
|
|
7244
|
+
}
|
|
6857
7245
|
}
|
|
6858
7246
|
let request = new XMLHttpRequest();
|
|
6859
7247
|
if (config.auth) {
|
|
@@ -7137,7 +7525,7 @@ var require_axios = __commonJS({
|
|
|
7137
7525
|
validateStatus: mergeDirectKeys,
|
|
7138
7526
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
7139
7527
|
};
|
|
7140
|
-
utils.forEach(Object.keys(
|
|
7528
|
+
utils.forEach(Object.keys(Object.assign({}, config1, config2)), /* @__PURE__ */ __name(function computeConfigValue(prop) {
|
|
7141
7529
|
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
7142
7530
|
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
7143
7531
|
utils.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
@@ -7145,7 +7533,7 @@ var require_axios = __commonJS({
|
|
|
7145
7533
|
return config;
|
|
7146
7534
|
}
|
|
7147
7535
|
__name(mergeConfig, "mergeConfig");
|
|
7148
|
-
var VERSION = "1.
|
|
7536
|
+
var VERSION = "1.4.0";
|
|
7149
7537
|
var validators$1 = {};
|
|
7150
7538
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
7151
7539
|
validators$1[type] = /* @__PURE__ */ __name(function validator2(thing) {
|
|
@@ -7569,7 +7957,9 @@ var require_Client = __commonJS({
|
|
|
7569
7957
|
var CheckVerificationCode = require_CheckVerificationCode();
|
|
7570
7958
|
var MatchUserIdentification = require_MatchUserIdentification();
|
|
7571
7959
|
var ListUserReservations = require_ListUserReservations();
|
|
7960
|
+
var ListUserSpaces = require_ListUserSpaces();
|
|
7572
7961
|
var ListTeam = require_ListTeam();
|
|
7962
|
+
var DescribeMyAccessCredentials = require_DescribeMyAccessCredentials();
|
|
7573
7963
|
var ListSpaces = require_ListSpaces();
|
|
7574
7964
|
var ListMySpaces = require_ListMySpaces();
|
|
7575
7965
|
var ListRoomsInSpace = require_ListRoomsInSpace();
|
|
@@ -7617,7 +8007,7 @@ var require_Client = __commonJS({
|
|
|
7617
8007
|
var UpdateLock = require_UpdateLock();
|
|
7618
8008
|
var DeleteLock = require_DeleteLock();
|
|
7619
8009
|
var DescribeLock = require_DescribeLock();
|
|
7620
|
-
var
|
|
8010
|
+
var DescribeLockCredential = require_DescribeLockCredential();
|
|
7621
8011
|
var CreateSwitch = require_CreateSwitch();
|
|
7622
8012
|
var ListSwitches = require_ListSwitches();
|
|
7623
8013
|
var UpdateSwitch = require_UpdateSwitch();
|
|
@@ -7676,6 +8066,10 @@ var require_Client = __commonJS({
|
|
|
7676
8066
|
var BatchNotifyPreArrival = require_BatchNotifyPreArrival();
|
|
7677
8067
|
var BatchNotifyCheckIn = require_BatchNotifyCheckIn();
|
|
7678
8068
|
var AssignSpaceToReservation = require_AssignSpaceToReservation();
|
|
8069
|
+
var DescribeReservationEarlyCheckInProducts = require_DescribeReservationEarlyCheckInProducts();
|
|
8070
|
+
var PurchaseReservationEarlyCheckInProducts = require_PurchaseReservationEarlyCheckInProducts();
|
|
8071
|
+
var DescribeReservationRoomUpgrades = require_DescribeReservationRoomUpgrades();
|
|
8072
|
+
var PurchaseReservationRoomUpgrades = require_PurchaseReservationRoomUpgrades();
|
|
7679
8073
|
var OCRDocument = require_OCRDocument();
|
|
7680
8074
|
var CreateOrganization = require_CreateOrganization();
|
|
7681
8075
|
var AdminUpdateCustomer = require_AdminUpdateCustomer();
|
|
@@ -7687,6 +8081,10 @@ var require_Client = __commonJS({
|
|
|
7687
8081
|
var UpdateProperty = require_UpdateProperty();
|
|
7688
8082
|
var DescribeProperty = require_DescribeProperty();
|
|
7689
8083
|
var EmailUserAccountSetup = require_EmailUserAccountSetup();
|
|
8084
|
+
var CreateImageUploadEndpoint = require_CreateImageUploadEndpoint();
|
|
8085
|
+
var DeleteMediaFile = require_DeleteMediaFile();
|
|
8086
|
+
var UploadImage = require_UploadImage();
|
|
8087
|
+
var DescribeProduct = require_DescribeProduct();
|
|
7690
8088
|
var { EventEmitter } = require_events();
|
|
7691
8089
|
var axios = require_axios();
|
|
7692
8090
|
var KohostApiClient = class extends EventEmitter {
|
|
@@ -7813,7 +8211,9 @@ var require_Client = __commonJS({
|
|
|
7813
8211
|
KohostApiClient.prototype.CheckVerificationCode = CheckVerificationCode;
|
|
7814
8212
|
KohostApiClient.prototype.MatchUserIdentification = MatchUserIdentification;
|
|
7815
8213
|
KohostApiClient.prototype.ListUserReservations = ListUserReservations;
|
|
8214
|
+
KohostApiClient.prototype.ListUserSpaces = ListUserSpaces;
|
|
7816
8215
|
KohostApiClient.prototype.ListTeam = ListTeam;
|
|
8216
|
+
KohostApiClient.prototype.DescribeMyAccessCredentials = DescribeMyAccessCredentials;
|
|
7817
8217
|
KohostApiClient.prototype.ListSpaces = ListSpaces;
|
|
7818
8218
|
KohostApiClient.prototype.ListMySpaces = ListMySpaces;
|
|
7819
8219
|
KohostApiClient.prototype.ListRoomsInSpace = ListRoomsInSpace;
|
|
@@ -7861,7 +8261,7 @@ var require_Client = __commonJS({
|
|
|
7861
8261
|
KohostApiClient.prototype.UpdateLock = UpdateLock;
|
|
7862
8262
|
KohostApiClient.prototype.DeleteLock = DeleteLock;
|
|
7863
8263
|
KohostApiClient.prototype.DescribeLock = DescribeLock;
|
|
7864
|
-
KohostApiClient.prototype.
|
|
8264
|
+
KohostApiClient.prototype.DescribeLockCredential = DescribeLockCredential;
|
|
7865
8265
|
KohostApiClient.prototype.CreateSwitch = CreateSwitch;
|
|
7866
8266
|
KohostApiClient.prototype.ListSwitches = ListSwitches;
|
|
7867
8267
|
KohostApiClient.prototype.UpdateSwitch = UpdateSwitch;
|
|
@@ -7920,6 +8320,10 @@ var require_Client = __commonJS({
|
|
|
7920
8320
|
KohostApiClient.prototype.BatchNotifyPreArrival = BatchNotifyPreArrival;
|
|
7921
8321
|
KohostApiClient.prototype.BatchNotifyCheckIn = BatchNotifyCheckIn;
|
|
7922
8322
|
KohostApiClient.prototype.AssignSpaceToReservation = AssignSpaceToReservation;
|
|
8323
|
+
KohostApiClient.prototype.DescribeReservationEarlyCheckInProducts = DescribeReservationEarlyCheckInProducts;
|
|
8324
|
+
KohostApiClient.prototype.PurchaseReservationEarlyCheckInProducts = PurchaseReservationEarlyCheckInProducts;
|
|
8325
|
+
KohostApiClient.prototype.DescribeReservationRoomUpgrades = DescribeReservationRoomUpgrades;
|
|
8326
|
+
KohostApiClient.prototype.PurchaseReservationRoomUpgrades = PurchaseReservationRoomUpgrades;
|
|
7923
8327
|
KohostApiClient.prototype.OCRDocument = OCRDocument;
|
|
7924
8328
|
KohostApiClient.prototype.CreateOrganization = CreateOrganization;
|
|
7925
8329
|
KohostApiClient.prototype.AdminUpdateCustomer = AdminUpdateCustomer;
|
|
@@ -7931,6 +8335,10 @@ var require_Client = __commonJS({
|
|
|
7931
8335
|
KohostApiClient.prototype.UpdateProperty = UpdateProperty;
|
|
7932
8336
|
KohostApiClient.prototype.DescribeProperty = DescribeProperty;
|
|
7933
8337
|
KohostApiClient.prototype.EmailUserAccountSetup = EmailUserAccountSetup;
|
|
8338
|
+
KohostApiClient.prototype.CreateImageUploadEndpoint = CreateImageUploadEndpoint;
|
|
8339
|
+
KohostApiClient.prototype.DeleteMediaFile = DeleteMediaFile;
|
|
8340
|
+
KohostApiClient.prototype.UploadImage = UploadImage;
|
|
8341
|
+
KohostApiClient.prototype.DescribeProduct = DescribeProduct;
|
|
7934
8342
|
module.exports = KohostApiClient;
|
|
7935
8343
|
}
|
|
7936
8344
|
});
|