@kohost/api-client 3.0.0-beta.89 → 3.0.0-beta.90
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/index.js +240 -0
- package/dist/cjs/Models/Announcement.js +34 -0
- package/dist/cjs/Models/index.js +2 -2
- package/dist/cjs/schemas/{NotificationSchema.d.ts → AnnouncementSchema.d.ts} +10 -5
- package/dist/cjs/schemas/announcement.json +36 -0
- package/dist/esm/Client.js +240 -0
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Models.js +37 -30
- package/dist/esm/Models.js.map +3 -3
- package/dist/useCases/CreateAnnouncement.js +32 -0
- package/dist/useCases/DeleteAnnouncement.js +32 -0
- package/dist/useCases/DescribeAnnouncement.js +32 -0
- package/dist/useCases/ListAnnouncements.js +32 -0
- package/dist/useCases/SendCheckOutSMS.js +32 -0
- package/dist/useCases/UpdateAnnouncement.js +32 -0
- package/package.json +1 -1
- package/dist/cjs/Models/Notification.js +0 -34
- package/dist/cjs/schemas/notification.json +0 -29
package/dist/cjs/Client/index.js
CHANGED
|
@@ -4907,6 +4907,44 @@ var require_SendRoomControlSMS = __commonJS({
|
|
|
4907
4907
|
}
|
|
4908
4908
|
});
|
|
4909
4909
|
|
|
4910
|
+
// dist/useCases/SendCheckOutSMS.js
|
|
4911
|
+
var require_SendCheckOutSMS = __commonJS({
|
|
4912
|
+
"dist/useCases/SendCheckOutSMS.js"(exports2, module2) {
|
|
4913
|
+
module2.exports = /* @__PURE__ */ __name(function SendCheckOutSMS2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
4914
|
+
if (!requestData)
|
|
4915
|
+
requestData = {};
|
|
4916
|
+
const pathParams = [":id"];
|
|
4917
|
+
const { data, query, headers } = requestData;
|
|
4918
|
+
let url = "/reservations/:id/sendCheckOutSMS";
|
|
4919
|
+
if (pathParams && data) {
|
|
4920
|
+
for (const param of pathParams) {
|
|
4921
|
+
const paramName = param.replace(":", "");
|
|
4922
|
+
url = url.replace(param, data[paramName]);
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
4926
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
4927
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
4928
|
+
return Promise.reject(
|
|
4929
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
4930
|
+
);
|
|
4931
|
+
}
|
|
4932
|
+
const config = {
|
|
4933
|
+
method: "post",
|
|
4934
|
+
url,
|
|
4935
|
+
...httpConfigOptions
|
|
4936
|
+
};
|
|
4937
|
+
if (data)
|
|
4938
|
+
config.data = data;
|
|
4939
|
+
if (query)
|
|
4940
|
+
config.params = query;
|
|
4941
|
+
if (headers)
|
|
4942
|
+
config.headers = headers;
|
|
4943
|
+
return this._http.request(config);
|
|
4944
|
+
}, "SendCheckOutSMS");
|
|
4945
|
+
}
|
|
4946
|
+
});
|
|
4947
|
+
|
|
4910
4948
|
// dist/useCases/BatchNotifyPreArrival.js
|
|
4911
4949
|
var require_BatchNotifyPreArrival = __commonJS({
|
|
4912
4950
|
"dist/useCases/BatchNotifyPreArrival.js"(exports2, module2) {
|
|
@@ -6009,6 +6047,196 @@ var require_ListMyOrders = __commonJS({
|
|
|
6009
6047
|
}
|
|
6010
6048
|
});
|
|
6011
6049
|
|
|
6050
|
+
// dist/useCases/CreateAnnouncement.js
|
|
6051
|
+
var require_CreateAnnouncement = __commonJS({
|
|
6052
|
+
"dist/useCases/CreateAnnouncement.js"(exports2, module2) {
|
|
6053
|
+
module2.exports = /* @__PURE__ */ __name(function CreateAnnouncement2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6054
|
+
if (!requestData)
|
|
6055
|
+
requestData = {};
|
|
6056
|
+
const pathParams = null;
|
|
6057
|
+
const { data, query, headers } = requestData;
|
|
6058
|
+
let url = "/announcements";
|
|
6059
|
+
if (pathParams && data) {
|
|
6060
|
+
for (const param of pathParams) {
|
|
6061
|
+
const paramName = param.replace(":", "");
|
|
6062
|
+
url = url.replace(param, data[paramName]);
|
|
6063
|
+
}
|
|
6064
|
+
}
|
|
6065
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6066
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6067
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6068
|
+
return Promise.reject(
|
|
6069
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6070
|
+
);
|
|
6071
|
+
}
|
|
6072
|
+
const config = {
|
|
6073
|
+
method: "post",
|
|
6074
|
+
url,
|
|
6075
|
+
...httpConfigOptions
|
|
6076
|
+
};
|
|
6077
|
+
if (data)
|
|
6078
|
+
config.data = data;
|
|
6079
|
+
if (query)
|
|
6080
|
+
config.params = query;
|
|
6081
|
+
if (headers)
|
|
6082
|
+
config.headers = headers;
|
|
6083
|
+
return this._http.request(config);
|
|
6084
|
+
}, "CreateAnnouncement");
|
|
6085
|
+
}
|
|
6086
|
+
});
|
|
6087
|
+
|
|
6088
|
+
// dist/useCases/UpdateAnnouncement.js
|
|
6089
|
+
var require_UpdateAnnouncement = __commonJS({
|
|
6090
|
+
"dist/useCases/UpdateAnnouncement.js"(exports2, module2) {
|
|
6091
|
+
module2.exports = /* @__PURE__ */ __name(function UpdateAnnouncement2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6092
|
+
if (!requestData)
|
|
6093
|
+
requestData = {};
|
|
6094
|
+
const pathParams = [":id"];
|
|
6095
|
+
const { data, query, headers } = requestData;
|
|
6096
|
+
let url = "/announcements/:id";
|
|
6097
|
+
if (pathParams && data) {
|
|
6098
|
+
for (const param of pathParams) {
|
|
6099
|
+
const paramName = param.replace(":", "");
|
|
6100
|
+
url = url.replace(param, data[paramName]);
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6104
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6105
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6106
|
+
return Promise.reject(
|
|
6107
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6108
|
+
);
|
|
6109
|
+
}
|
|
6110
|
+
const config = {
|
|
6111
|
+
method: "put",
|
|
6112
|
+
url,
|
|
6113
|
+
...httpConfigOptions
|
|
6114
|
+
};
|
|
6115
|
+
if (data)
|
|
6116
|
+
config.data = data;
|
|
6117
|
+
if (query)
|
|
6118
|
+
config.params = query;
|
|
6119
|
+
if (headers)
|
|
6120
|
+
config.headers = headers;
|
|
6121
|
+
return this._http.request(config);
|
|
6122
|
+
}, "UpdateAnnouncement");
|
|
6123
|
+
}
|
|
6124
|
+
});
|
|
6125
|
+
|
|
6126
|
+
// dist/useCases/DescribeAnnouncement.js
|
|
6127
|
+
var require_DescribeAnnouncement = __commonJS({
|
|
6128
|
+
"dist/useCases/DescribeAnnouncement.js"(exports2, module2) {
|
|
6129
|
+
module2.exports = /* @__PURE__ */ __name(function DescribeAnnouncement2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6130
|
+
if (!requestData)
|
|
6131
|
+
requestData = {};
|
|
6132
|
+
const pathParams = [":id"];
|
|
6133
|
+
const { data, query, headers } = requestData;
|
|
6134
|
+
let url = "/announcements/:id";
|
|
6135
|
+
if (pathParams && data) {
|
|
6136
|
+
for (const param of pathParams) {
|
|
6137
|
+
const paramName = param.replace(":", "");
|
|
6138
|
+
url = url.replace(param, data[paramName]);
|
|
6139
|
+
}
|
|
6140
|
+
}
|
|
6141
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6142
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6143
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6144
|
+
return Promise.reject(
|
|
6145
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6146
|
+
);
|
|
6147
|
+
}
|
|
6148
|
+
const config = {
|
|
6149
|
+
method: "get",
|
|
6150
|
+
url,
|
|
6151
|
+
...httpConfigOptions
|
|
6152
|
+
};
|
|
6153
|
+
if (data)
|
|
6154
|
+
config.data = data;
|
|
6155
|
+
if (query)
|
|
6156
|
+
config.params = query;
|
|
6157
|
+
if (headers)
|
|
6158
|
+
config.headers = headers;
|
|
6159
|
+
return this._http.request(config);
|
|
6160
|
+
}, "DescribeAnnouncement");
|
|
6161
|
+
}
|
|
6162
|
+
});
|
|
6163
|
+
|
|
6164
|
+
// dist/useCases/DeleteAnnouncement.js
|
|
6165
|
+
var require_DeleteAnnouncement = __commonJS({
|
|
6166
|
+
"dist/useCases/DeleteAnnouncement.js"(exports2, module2) {
|
|
6167
|
+
module2.exports = /* @__PURE__ */ __name(function DeleteAnnouncement2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6168
|
+
if (!requestData)
|
|
6169
|
+
requestData = {};
|
|
6170
|
+
const pathParams = [":id"];
|
|
6171
|
+
const { data, query, headers } = requestData;
|
|
6172
|
+
let url = "/announcements/:id";
|
|
6173
|
+
if (pathParams && data) {
|
|
6174
|
+
for (const param of pathParams) {
|
|
6175
|
+
const paramName = param.replace(":", "");
|
|
6176
|
+
url = url.replace(param, data[paramName]);
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6180
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6181
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6182
|
+
return Promise.reject(
|
|
6183
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6184
|
+
);
|
|
6185
|
+
}
|
|
6186
|
+
const config = {
|
|
6187
|
+
method: "delete",
|
|
6188
|
+
url,
|
|
6189
|
+
...httpConfigOptions
|
|
6190
|
+
};
|
|
6191
|
+
if (data)
|
|
6192
|
+
config.data = data;
|
|
6193
|
+
if (query)
|
|
6194
|
+
config.params = query;
|
|
6195
|
+
if (headers)
|
|
6196
|
+
config.headers = headers;
|
|
6197
|
+
return this._http.request(config);
|
|
6198
|
+
}, "DeleteAnnouncement");
|
|
6199
|
+
}
|
|
6200
|
+
});
|
|
6201
|
+
|
|
6202
|
+
// dist/useCases/ListAnnouncements.js
|
|
6203
|
+
var require_ListAnnouncements = __commonJS({
|
|
6204
|
+
"dist/useCases/ListAnnouncements.js"(exports2, module2) {
|
|
6205
|
+
module2.exports = /* @__PURE__ */ __name(function ListAnnouncements2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6206
|
+
if (!requestData)
|
|
6207
|
+
requestData = {};
|
|
6208
|
+
const pathParams = null;
|
|
6209
|
+
const { data, query, headers } = requestData;
|
|
6210
|
+
let url = "/announcements";
|
|
6211
|
+
if (pathParams && data) {
|
|
6212
|
+
for (const param of pathParams) {
|
|
6213
|
+
const paramName = param.replace(":", "");
|
|
6214
|
+
url = url.replace(param, data[paramName]);
|
|
6215
|
+
}
|
|
6216
|
+
}
|
|
6217
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6218
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6219
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6220
|
+
return Promise.reject(
|
|
6221
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6222
|
+
);
|
|
6223
|
+
}
|
|
6224
|
+
const config = {
|
|
6225
|
+
method: "get",
|
|
6226
|
+
url,
|
|
6227
|
+
...httpConfigOptions
|
|
6228
|
+
};
|
|
6229
|
+
if (data)
|
|
6230
|
+
config.data = data;
|
|
6231
|
+
if (query)
|
|
6232
|
+
config.params = query;
|
|
6233
|
+
if (headers)
|
|
6234
|
+
config.headers = headers;
|
|
6235
|
+
return this._http.request(config);
|
|
6236
|
+
}, "ListAnnouncements");
|
|
6237
|
+
}
|
|
6238
|
+
});
|
|
6239
|
+
|
|
6012
6240
|
// src/Client/index.js
|
|
6013
6241
|
var LoginUser = require_LoginUser();
|
|
6014
6242
|
var RefreshToken = require_RefreshToken();
|
|
@@ -6139,6 +6367,7 @@ var SendCheckInSMS = require_SendCheckInSMS();
|
|
|
6139
6367
|
var SendPreArrivalSMS = require_SendPreArrivalSMS();
|
|
6140
6368
|
var SendPreArrivalEmail = require_SendPreArrivalEmail();
|
|
6141
6369
|
var SendRoomControlSMS = require_SendRoomControlSMS();
|
|
6370
|
+
var SendCheckOutSMS = require_SendCheckOutSMS();
|
|
6142
6371
|
var BatchNotifyPreArrival = require_BatchNotifyPreArrival();
|
|
6143
6372
|
var BatchNotifyCheckIn = require_BatchNotifyCheckIn();
|
|
6144
6373
|
var BatchNotifyCheckOut = require_BatchNotifyCheckOut();
|
|
@@ -6168,6 +6397,11 @@ var UploadImage = require_UploadImage();
|
|
|
6168
6397
|
var DescribeProduct = require_DescribeProduct();
|
|
6169
6398
|
var ListOrders = require_ListOrders();
|
|
6170
6399
|
var ListMyOrders = require_ListMyOrders();
|
|
6400
|
+
var CreateAnnouncement = require_CreateAnnouncement();
|
|
6401
|
+
var UpdateAnnouncement = require_UpdateAnnouncement();
|
|
6402
|
+
var DescribeAnnouncement = require_DescribeAnnouncement();
|
|
6403
|
+
var DeleteAnnouncement = require_DeleteAnnouncement();
|
|
6404
|
+
var ListAnnouncements = require_ListAnnouncements();
|
|
6171
6405
|
var { EventEmitter } = require("events");
|
|
6172
6406
|
var axios = require("axios");
|
|
6173
6407
|
var KohostApiClient = class _KohostApiClient extends EventEmitter {
|
|
@@ -6409,6 +6643,7 @@ KohostApiClient.prototype.SendCheckInSMS = SendCheckInSMS;
|
|
|
6409
6643
|
KohostApiClient.prototype.SendPreArrivalSMS = SendPreArrivalSMS;
|
|
6410
6644
|
KohostApiClient.prototype.SendPreArrivalEmail = SendPreArrivalEmail;
|
|
6411
6645
|
KohostApiClient.prototype.SendRoomControlSMS = SendRoomControlSMS;
|
|
6646
|
+
KohostApiClient.prototype.SendCheckOutSMS = SendCheckOutSMS;
|
|
6412
6647
|
KohostApiClient.prototype.BatchNotifyPreArrival = BatchNotifyPreArrival;
|
|
6413
6648
|
KohostApiClient.prototype.BatchNotifyCheckIn = BatchNotifyCheckIn;
|
|
6414
6649
|
KohostApiClient.prototype.BatchNotifyCheckOut = BatchNotifyCheckOut;
|
|
@@ -6438,4 +6673,9 @@ KohostApiClient.prototype.UploadImage = UploadImage;
|
|
|
6438
6673
|
KohostApiClient.prototype.DescribeProduct = DescribeProduct;
|
|
6439
6674
|
KohostApiClient.prototype.ListOrders = ListOrders;
|
|
6440
6675
|
KohostApiClient.prototype.ListMyOrders = ListMyOrders;
|
|
6676
|
+
KohostApiClient.prototype.CreateAnnouncement = CreateAnnouncement;
|
|
6677
|
+
KohostApiClient.prototype.UpdateAnnouncement = UpdateAnnouncement;
|
|
6678
|
+
KohostApiClient.prototype.DescribeAnnouncement = DescribeAnnouncement;
|
|
6679
|
+
KohostApiClient.prototype.DeleteAnnouncement = DeleteAnnouncement;
|
|
6680
|
+
KohostApiClient.prototype.ListAnnouncements = ListAnnouncements;
|
|
6441
6681
|
module.exports = KohostApiClient;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const schemas = require("../utils/schema");
|
|
2
|
+
const schema = require("../schemas/announcement.json");
|
|
3
|
+
const Kohost = require("./Kohost");
|
|
4
|
+
|
|
5
|
+
schemas.add(schema);
|
|
6
|
+
const validator = schemas.compile(schema);
|
|
7
|
+
|
|
8
|
+
class Announcement extends Kohost {
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {import("../schemas/AnnouncementSchema").Announcement} AnnouncementType
|
|
11
|
+
* Create a Announcement instance.
|
|
12
|
+
* @constructor
|
|
13
|
+
* @param {AnnouncementType} property - The property object of type Announcement.
|
|
14
|
+
*/
|
|
15
|
+
constructor(announcement) {
|
|
16
|
+
super(announcement);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
Object.defineProperty(Announcement.prototype, "schema", {
|
|
21
|
+
value: schema,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
Object.defineProperty(Announcement.prototype, "validator", {
|
|
25
|
+
get: function () {
|
|
26
|
+
return validator;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
Object.defineProperty(Announcement, "validProperties", {
|
|
31
|
+
value: Object.keys(schema.properties),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
module.exports = Announcement;
|
package/dist/cjs/Models/index.js
CHANGED
|
@@ -30,7 +30,7 @@ const EnergyReportShard = require("./EnergyReportShard");
|
|
|
30
30
|
const EnergyReport = require("./EnergyReport");
|
|
31
31
|
const SMSMessage = require("./SmsMessage");
|
|
32
32
|
const EmailMessage = require("./EmailMessage");
|
|
33
|
-
const
|
|
33
|
+
const Announcement = require("./Announcement");
|
|
34
34
|
|
|
35
35
|
const Property = require("./Property");
|
|
36
36
|
const Organization = require("./Organization");
|
|
@@ -68,5 +68,5 @@ module.exports = {
|
|
|
68
68
|
SMSMessage,
|
|
69
69
|
EmailMessage,
|
|
70
70
|
Order,
|
|
71
|
-
|
|
71
|
+
Announcement,
|
|
72
72
|
};
|
|
@@ -12,15 +12,20 @@ export type Date =
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Announcement message sent to users
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
17
|
+
export interface Announcement {
|
|
18
18
|
id?: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @minItems 1
|
|
21
|
+
*/
|
|
22
|
+
users?: [string, ...string[]];
|
|
23
|
+
body?: string;
|
|
24
|
+
media?: MediaFile;
|
|
25
|
+
sentBy?: string;
|
|
22
26
|
tag?: string;
|
|
23
27
|
createdAt?: Date;
|
|
28
|
+
updatedAt?: Date;
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
26
31
|
* Any media file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "announcement.json",
|
|
4
|
+
"title": "Announcement",
|
|
5
|
+
"description": "Announcement message sent to users",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "$ref": "definitions.json#/definitions/id" },
|
|
9
|
+
"users": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"minItems": 1
|
|
15
|
+
},
|
|
16
|
+
"body": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"media": {
|
|
20
|
+
"$ref": "mediaFile.json"
|
|
21
|
+
},
|
|
22
|
+
"sentBy": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"tag": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"createdAt": {
|
|
29
|
+
"$ref": "definitions.json#/definitions/date"
|
|
30
|
+
},
|
|
31
|
+
"updatedAt": {
|
|
32
|
+
"$ref": "definitions.json#/definitions/date"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
package/dist/esm/Client.js
CHANGED
|
@@ -4907,6 +4907,44 @@ var require_SendRoomControlSMS = __commonJS({
|
|
|
4907
4907
|
}
|
|
4908
4908
|
});
|
|
4909
4909
|
|
|
4910
|
+
// dist/useCases/SendCheckOutSMS.js
|
|
4911
|
+
var require_SendCheckOutSMS = __commonJS({
|
|
4912
|
+
"dist/useCases/SendCheckOutSMS.js"(exports, module) {
|
|
4913
|
+
module.exports = /* @__PURE__ */ __name(function SendCheckOutSMS(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
4914
|
+
if (!requestData)
|
|
4915
|
+
requestData = {};
|
|
4916
|
+
const pathParams = [":id"];
|
|
4917
|
+
const { data, query, headers } = requestData;
|
|
4918
|
+
let url = "/reservations/:id/sendCheckOutSMS";
|
|
4919
|
+
if (pathParams && data) {
|
|
4920
|
+
for (const param of pathParams) {
|
|
4921
|
+
const paramName = param.replace(":", "");
|
|
4922
|
+
url = url.replace(param, data[paramName]);
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
4926
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
4927
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
4928
|
+
return Promise.reject(
|
|
4929
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
4930
|
+
);
|
|
4931
|
+
}
|
|
4932
|
+
const config = {
|
|
4933
|
+
method: "post",
|
|
4934
|
+
url,
|
|
4935
|
+
...httpConfigOptions
|
|
4936
|
+
};
|
|
4937
|
+
if (data)
|
|
4938
|
+
config.data = data;
|
|
4939
|
+
if (query)
|
|
4940
|
+
config.params = query;
|
|
4941
|
+
if (headers)
|
|
4942
|
+
config.headers = headers;
|
|
4943
|
+
return this._http.request(config);
|
|
4944
|
+
}, "SendCheckOutSMS");
|
|
4945
|
+
}
|
|
4946
|
+
});
|
|
4947
|
+
|
|
4910
4948
|
// dist/useCases/BatchNotifyPreArrival.js
|
|
4911
4949
|
var require_BatchNotifyPreArrival = __commonJS({
|
|
4912
4950
|
"dist/useCases/BatchNotifyPreArrival.js"(exports, module) {
|
|
@@ -6009,6 +6047,196 @@ var require_ListMyOrders = __commonJS({
|
|
|
6009
6047
|
}
|
|
6010
6048
|
});
|
|
6011
6049
|
|
|
6050
|
+
// dist/useCases/CreateAnnouncement.js
|
|
6051
|
+
var require_CreateAnnouncement = __commonJS({
|
|
6052
|
+
"dist/useCases/CreateAnnouncement.js"(exports, module) {
|
|
6053
|
+
module.exports = /* @__PURE__ */ __name(function CreateAnnouncement(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6054
|
+
if (!requestData)
|
|
6055
|
+
requestData = {};
|
|
6056
|
+
const pathParams = null;
|
|
6057
|
+
const { data, query, headers } = requestData;
|
|
6058
|
+
let url = "/announcements";
|
|
6059
|
+
if (pathParams && data) {
|
|
6060
|
+
for (const param of pathParams) {
|
|
6061
|
+
const paramName = param.replace(":", "");
|
|
6062
|
+
url = url.replace(param, data[paramName]);
|
|
6063
|
+
}
|
|
6064
|
+
}
|
|
6065
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6066
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6067
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6068
|
+
return Promise.reject(
|
|
6069
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6070
|
+
);
|
|
6071
|
+
}
|
|
6072
|
+
const config = {
|
|
6073
|
+
method: "post",
|
|
6074
|
+
url,
|
|
6075
|
+
...httpConfigOptions
|
|
6076
|
+
};
|
|
6077
|
+
if (data)
|
|
6078
|
+
config.data = data;
|
|
6079
|
+
if (query)
|
|
6080
|
+
config.params = query;
|
|
6081
|
+
if (headers)
|
|
6082
|
+
config.headers = headers;
|
|
6083
|
+
return this._http.request(config);
|
|
6084
|
+
}, "CreateAnnouncement");
|
|
6085
|
+
}
|
|
6086
|
+
});
|
|
6087
|
+
|
|
6088
|
+
// dist/useCases/UpdateAnnouncement.js
|
|
6089
|
+
var require_UpdateAnnouncement = __commonJS({
|
|
6090
|
+
"dist/useCases/UpdateAnnouncement.js"(exports, module) {
|
|
6091
|
+
module.exports = /* @__PURE__ */ __name(function UpdateAnnouncement(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6092
|
+
if (!requestData)
|
|
6093
|
+
requestData = {};
|
|
6094
|
+
const pathParams = [":id"];
|
|
6095
|
+
const { data, query, headers } = requestData;
|
|
6096
|
+
let url = "/announcements/:id";
|
|
6097
|
+
if (pathParams && data) {
|
|
6098
|
+
for (const param of pathParams) {
|
|
6099
|
+
const paramName = param.replace(":", "");
|
|
6100
|
+
url = url.replace(param, data[paramName]);
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6104
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6105
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6106
|
+
return Promise.reject(
|
|
6107
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6108
|
+
);
|
|
6109
|
+
}
|
|
6110
|
+
const config = {
|
|
6111
|
+
method: "put",
|
|
6112
|
+
url,
|
|
6113
|
+
...httpConfigOptions
|
|
6114
|
+
};
|
|
6115
|
+
if (data)
|
|
6116
|
+
config.data = data;
|
|
6117
|
+
if (query)
|
|
6118
|
+
config.params = query;
|
|
6119
|
+
if (headers)
|
|
6120
|
+
config.headers = headers;
|
|
6121
|
+
return this._http.request(config);
|
|
6122
|
+
}, "UpdateAnnouncement");
|
|
6123
|
+
}
|
|
6124
|
+
});
|
|
6125
|
+
|
|
6126
|
+
// dist/useCases/DescribeAnnouncement.js
|
|
6127
|
+
var require_DescribeAnnouncement = __commonJS({
|
|
6128
|
+
"dist/useCases/DescribeAnnouncement.js"(exports, module) {
|
|
6129
|
+
module.exports = /* @__PURE__ */ __name(function DescribeAnnouncement(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6130
|
+
if (!requestData)
|
|
6131
|
+
requestData = {};
|
|
6132
|
+
const pathParams = [":id"];
|
|
6133
|
+
const { data, query, headers } = requestData;
|
|
6134
|
+
let url = "/announcements/:id";
|
|
6135
|
+
if (pathParams && data) {
|
|
6136
|
+
for (const param of pathParams) {
|
|
6137
|
+
const paramName = param.replace(":", "");
|
|
6138
|
+
url = url.replace(param, data[paramName]);
|
|
6139
|
+
}
|
|
6140
|
+
}
|
|
6141
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6142
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6143
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6144
|
+
return Promise.reject(
|
|
6145
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6146
|
+
);
|
|
6147
|
+
}
|
|
6148
|
+
const config = {
|
|
6149
|
+
method: "get",
|
|
6150
|
+
url,
|
|
6151
|
+
...httpConfigOptions
|
|
6152
|
+
};
|
|
6153
|
+
if (data)
|
|
6154
|
+
config.data = data;
|
|
6155
|
+
if (query)
|
|
6156
|
+
config.params = query;
|
|
6157
|
+
if (headers)
|
|
6158
|
+
config.headers = headers;
|
|
6159
|
+
return this._http.request(config);
|
|
6160
|
+
}, "DescribeAnnouncement");
|
|
6161
|
+
}
|
|
6162
|
+
});
|
|
6163
|
+
|
|
6164
|
+
// dist/useCases/DeleteAnnouncement.js
|
|
6165
|
+
var require_DeleteAnnouncement = __commonJS({
|
|
6166
|
+
"dist/useCases/DeleteAnnouncement.js"(exports, module) {
|
|
6167
|
+
module.exports = /* @__PURE__ */ __name(function DeleteAnnouncement(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6168
|
+
if (!requestData)
|
|
6169
|
+
requestData = {};
|
|
6170
|
+
const pathParams = [":id"];
|
|
6171
|
+
const { data, query, headers } = requestData;
|
|
6172
|
+
let url = "/announcements/:id";
|
|
6173
|
+
if (pathParams && data) {
|
|
6174
|
+
for (const param of pathParams) {
|
|
6175
|
+
const paramName = param.replace(":", "");
|
|
6176
|
+
url = url.replace(param, data[paramName]);
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6180
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6181
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6182
|
+
return Promise.reject(
|
|
6183
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6184
|
+
);
|
|
6185
|
+
}
|
|
6186
|
+
const config = {
|
|
6187
|
+
method: "delete",
|
|
6188
|
+
url,
|
|
6189
|
+
...httpConfigOptions
|
|
6190
|
+
};
|
|
6191
|
+
if (data)
|
|
6192
|
+
config.data = data;
|
|
6193
|
+
if (query)
|
|
6194
|
+
config.params = query;
|
|
6195
|
+
if (headers)
|
|
6196
|
+
config.headers = headers;
|
|
6197
|
+
return this._http.request(config);
|
|
6198
|
+
}, "DeleteAnnouncement");
|
|
6199
|
+
}
|
|
6200
|
+
});
|
|
6201
|
+
|
|
6202
|
+
// dist/useCases/ListAnnouncements.js
|
|
6203
|
+
var require_ListAnnouncements = __commonJS({
|
|
6204
|
+
"dist/useCases/ListAnnouncements.js"(exports, module) {
|
|
6205
|
+
module.exports = /* @__PURE__ */ __name(function ListAnnouncements(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
|
|
6206
|
+
if (!requestData)
|
|
6207
|
+
requestData = {};
|
|
6208
|
+
const pathParams = null;
|
|
6209
|
+
const { data, query, headers } = requestData;
|
|
6210
|
+
let url = "/announcements";
|
|
6211
|
+
if (pathParams && data) {
|
|
6212
|
+
for (const param of pathParams) {
|
|
6213
|
+
const paramName = param.replace(":", "");
|
|
6214
|
+
url = url.replace(param, data[paramName]);
|
|
6215
|
+
}
|
|
6216
|
+
}
|
|
6217
|
+
if (url.match(/:[a-zA-Z0-9]+/g)) {
|
|
6218
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
6219
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
6220
|
+
return Promise.reject(
|
|
6221
|
+
new Error("Missing parameters: " + missing.join(", "))
|
|
6222
|
+
);
|
|
6223
|
+
}
|
|
6224
|
+
const config = {
|
|
6225
|
+
method: "get",
|
|
6226
|
+
url,
|
|
6227
|
+
...httpConfigOptions
|
|
6228
|
+
};
|
|
6229
|
+
if (data)
|
|
6230
|
+
config.data = data;
|
|
6231
|
+
if (query)
|
|
6232
|
+
config.params = query;
|
|
6233
|
+
if (headers)
|
|
6234
|
+
config.headers = headers;
|
|
6235
|
+
return this._http.request(config);
|
|
6236
|
+
}, "ListAnnouncements");
|
|
6237
|
+
}
|
|
6238
|
+
});
|
|
6239
|
+
|
|
6012
6240
|
// node_modules/events/events.js
|
|
6013
6241
|
var require_events = __commonJS({
|
|
6014
6242
|
"node_modules/events/events.js"(exports, module) {
|
|
@@ -8625,6 +8853,7 @@ var require_Client = __commonJS({
|
|
|
8625
8853
|
var SendPreArrivalSMS = require_SendPreArrivalSMS();
|
|
8626
8854
|
var SendPreArrivalEmail = require_SendPreArrivalEmail();
|
|
8627
8855
|
var SendRoomControlSMS = require_SendRoomControlSMS();
|
|
8856
|
+
var SendCheckOutSMS = require_SendCheckOutSMS();
|
|
8628
8857
|
var BatchNotifyPreArrival = require_BatchNotifyPreArrival();
|
|
8629
8858
|
var BatchNotifyCheckIn = require_BatchNotifyCheckIn();
|
|
8630
8859
|
var BatchNotifyCheckOut = require_BatchNotifyCheckOut();
|
|
@@ -8654,6 +8883,11 @@ var require_Client = __commonJS({
|
|
|
8654
8883
|
var DescribeProduct = require_DescribeProduct();
|
|
8655
8884
|
var ListOrders = require_ListOrders();
|
|
8656
8885
|
var ListMyOrders = require_ListMyOrders();
|
|
8886
|
+
var CreateAnnouncement = require_CreateAnnouncement();
|
|
8887
|
+
var UpdateAnnouncement = require_UpdateAnnouncement();
|
|
8888
|
+
var DescribeAnnouncement = require_DescribeAnnouncement();
|
|
8889
|
+
var DeleteAnnouncement = require_DeleteAnnouncement();
|
|
8890
|
+
var ListAnnouncements = require_ListAnnouncements();
|
|
8657
8891
|
var { EventEmitter } = require_events();
|
|
8658
8892
|
var axios = require_axios();
|
|
8659
8893
|
var KohostApiClient = class _KohostApiClient extends EventEmitter {
|
|
@@ -8895,6 +9129,7 @@ var require_Client = __commonJS({
|
|
|
8895
9129
|
KohostApiClient.prototype.SendPreArrivalSMS = SendPreArrivalSMS;
|
|
8896
9130
|
KohostApiClient.prototype.SendPreArrivalEmail = SendPreArrivalEmail;
|
|
8897
9131
|
KohostApiClient.prototype.SendRoomControlSMS = SendRoomControlSMS;
|
|
9132
|
+
KohostApiClient.prototype.SendCheckOutSMS = SendCheckOutSMS;
|
|
8898
9133
|
KohostApiClient.prototype.BatchNotifyPreArrival = BatchNotifyPreArrival;
|
|
8899
9134
|
KohostApiClient.prototype.BatchNotifyCheckIn = BatchNotifyCheckIn;
|
|
8900
9135
|
KohostApiClient.prototype.BatchNotifyCheckOut = BatchNotifyCheckOut;
|
|
@@ -8924,6 +9159,11 @@ var require_Client = __commonJS({
|
|
|
8924
9159
|
KohostApiClient.prototype.DescribeProduct = DescribeProduct;
|
|
8925
9160
|
KohostApiClient.prototype.ListOrders = ListOrders;
|
|
8926
9161
|
KohostApiClient.prototype.ListMyOrders = ListMyOrders;
|
|
9162
|
+
KohostApiClient.prototype.CreateAnnouncement = CreateAnnouncement;
|
|
9163
|
+
KohostApiClient.prototype.UpdateAnnouncement = UpdateAnnouncement;
|
|
9164
|
+
KohostApiClient.prototype.DescribeAnnouncement = DescribeAnnouncement;
|
|
9165
|
+
KohostApiClient.prototype.DeleteAnnouncement = DeleteAnnouncement;
|
|
9166
|
+
KohostApiClient.prototype.ListAnnouncements = ListAnnouncements;
|
|
8927
9167
|
module.exports = KohostApiClient;
|
|
8928
9168
|
}
|
|
8929
9169
|
});
|