@digipair/skill-smoobu 0.19.2 → 0.19.4
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/index.cjs.js +32 -7
- package/index.esm.js +32 -7
- package/package.json +1 -1
- package/schema.json +225 -0
package/index.cjs.js
CHANGED
|
@@ -23510,14 +23510,14 @@ function indent(str, spaces) {
|
|
|
23510
23510
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23511
23511
|
// match is required
|
|
23512
23512
|
if (!match) {
|
|
23513
|
-
return i = i1,
|
|
23513
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
23514
23514
|
v: nextMatch1
|
|
23515
23515
|
};
|
|
23516
23516
|
}
|
|
23517
23517
|
var token = match.token, offset = match.offset;
|
|
23518
23518
|
i1 += offset;
|
|
23519
23519
|
if (token === " ") {
|
|
23520
|
-
return i = i1,
|
|
23520
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23521
23521
|
}
|
|
23522
23522
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23523
23523
|
token
|
|
@@ -23536,7 +23536,7 @@ function indent(str, spaces) {
|
|
|
23536
23536
|
if (contextKeys.some(function(el) {
|
|
23537
23537
|
return el.startsWith(name);
|
|
23538
23538
|
})) {
|
|
23539
|
-
return i = i1,
|
|
23539
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23540
23540
|
}
|
|
23541
23541
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23542
23542
|
return el === name;
|
|
@@ -23555,9 +23555,9 @@ function indent(str, spaces) {
|
|
|
23555
23555
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23556
23556
|
return el.startsWith(name);
|
|
23557
23557
|
})) {
|
|
23558
|
-
return i = i1,
|
|
23558
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23559
23559
|
}
|
|
23560
|
-
return i = i1,
|
|
23560
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
23561
23561
|
v: nextMatch1
|
|
23562
23562
|
};
|
|
23563
23563
|
};
|
|
@@ -27490,8 +27490,33 @@ let SmoobuService = class SmoobuService {
|
|
|
27490
27490
|
const { reservationId } = params;
|
|
27491
27491
|
return await this.call(`/reservations/${reservationId}`, 'GET');
|
|
27492
27492
|
}
|
|
27493
|
-
async getAllReservations(
|
|
27494
|
-
|
|
27493
|
+
async getAllReservations(params, _pinsSettingsList, _context) {
|
|
27494
|
+
const { created_from, created_to, from, to, modifiedFrom, modifiedTo, arrivalFrom, arrivalTo, departureFrom, departureTo, showCancellation, excludeBlocked, page, pageSize, apartmentId, includeRelated, includePriceElements } = params;
|
|
27495
|
+
const queryParams = new URLSearchParams();
|
|
27496
|
+
if (created_from) queryParams.append('created_from', created_from);
|
|
27497
|
+
if (created_to) queryParams.append('created_to', created_to);
|
|
27498
|
+
if (from) queryParams.append('from', from);
|
|
27499
|
+
if (to) queryParams.append('to', to);
|
|
27500
|
+
if (modifiedFrom) queryParams.append('modifiedFrom', modifiedFrom);
|
|
27501
|
+
if (modifiedTo) queryParams.append('modifiedTo', modifiedTo);
|
|
27502
|
+
if (arrivalFrom) queryParams.append('arrivalFrom', arrivalFrom);
|
|
27503
|
+
if (arrivalTo) queryParams.append('arrivalTo', arrivalTo);
|
|
27504
|
+
if (departureFrom) queryParams.append('departureFrom', departureFrom);
|
|
27505
|
+
if (departureTo) queryParams.append('departureTo', departureTo);
|
|
27506
|
+
if (showCancellation) queryParams.append('showCancellation', showCancellation);
|
|
27507
|
+
if (excludeBlocked) queryParams.append('excludeBlocked', excludeBlocked);
|
|
27508
|
+
if (page) queryParams.append('page', page);
|
|
27509
|
+
if (pageSize) queryParams.append('pageSize', pageSize);
|
|
27510
|
+
if (apartmentId) queryParams.append('apartmentId', apartmentId);
|
|
27511
|
+
if (includeRelated) queryParams.append('includeRelated', includeRelated);
|
|
27512
|
+
if (includePriceElements) queryParams.append('includePriceElements', includePriceElements);
|
|
27513
|
+
return await this.call(`/reservations?${queryParams.toString()}`, 'GET');
|
|
27514
|
+
}
|
|
27515
|
+
async sendMessage(params, _pinsSettingsList, _context) {
|
|
27516
|
+
const { reservationId, message } = params;
|
|
27517
|
+
return await this.call(`/reservations/${reservationId}/messages/send-message-to-guest`, 'POST', JSON.stringify({
|
|
27518
|
+
messageBody: message
|
|
27519
|
+
}));
|
|
27495
27520
|
}
|
|
27496
27521
|
async event(params, _pinsSettingsList, context) {
|
|
27497
27522
|
const { updateRates = [], newReservation = [], cancelReservation = [], updateReservation = [] } = params;
|
package/index.esm.js
CHANGED
|
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
|
|
|
23488
23488
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23489
23489
|
// match is required
|
|
23490
23490
|
if (!match) {
|
|
23491
|
-
return
|
|
23491
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23492
23492
|
v: nextMatch1
|
|
23493
23493
|
};
|
|
23494
23494
|
}
|
|
23495
23495
|
var token = match.token, offset = match.offset;
|
|
23496
23496
|
i1 += offset;
|
|
23497
23497
|
if (token === " ") {
|
|
23498
|
-
return
|
|
23498
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23499
23499
|
}
|
|
23500
23500
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23501
23501
|
token
|
|
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
|
|
|
23514
23514
|
if (contextKeys.some(function(el) {
|
|
23515
23515
|
return el.startsWith(name);
|
|
23516
23516
|
})) {
|
|
23517
|
-
return
|
|
23517
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23518
23518
|
}
|
|
23519
23519
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23520
23520
|
return el === name;
|
|
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
|
|
|
23533
23533
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23534
23534
|
return el.startsWith(name);
|
|
23535
23535
|
})) {
|
|
23536
|
-
return
|
|
23536
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23537
23537
|
}
|
|
23538
|
-
return
|
|
23538
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23539
23539
|
v: nextMatch1
|
|
23540
23540
|
};
|
|
23541
23541
|
};
|
|
@@ -27468,8 +27468,33 @@ let SmoobuService = class SmoobuService {
|
|
|
27468
27468
|
const { reservationId } = params;
|
|
27469
27469
|
return await this.call(`/reservations/${reservationId}`, 'GET');
|
|
27470
27470
|
}
|
|
27471
|
-
async getAllReservations(
|
|
27472
|
-
|
|
27471
|
+
async getAllReservations(params, _pinsSettingsList, _context) {
|
|
27472
|
+
const { created_from, created_to, from, to, modifiedFrom, modifiedTo, arrivalFrom, arrivalTo, departureFrom, departureTo, showCancellation, excludeBlocked, page, pageSize, apartmentId, includeRelated, includePriceElements } = params;
|
|
27473
|
+
const queryParams = new URLSearchParams();
|
|
27474
|
+
if (created_from) queryParams.append('created_from', created_from);
|
|
27475
|
+
if (created_to) queryParams.append('created_to', created_to);
|
|
27476
|
+
if (from) queryParams.append('from', from);
|
|
27477
|
+
if (to) queryParams.append('to', to);
|
|
27478
|
+
if (modifiedFrom) queryParams.append('modifiedFrom', modifiedFrom);
|
|
27479
|
+
if (modifiedTo) queryParams.append('modifiedTo', modifiedTo);
|
|
27480
|
+
if (arrivalFrom) queryParams.append('arrivalFrom', arrivalFrom);
|
|
27481
|
+
if (arrivalTo) queryParams.append('arrivalTo', arrivalTo);
|
|
27482
|
+
if (departureFrom) queryParams.append('departureFrom', departureFrom);
|
|
27483
|
+
if (departureTo) queryParams.append('departureTo', departureTo);
|
|
27484
|
+
if (showCancellation) queryParams.append('showCancellation', showCancellation);
|
|
27485
|
+
if (excludeBlocked) queryParams.append('excludeBlocked', excludeBlocked);
|
|
27486
|
+
if (page) queryParams.append('page', page);
|
|
27487
|
+
if (pageSize) queryParams.append('pageSize', pageSize);
|
|
27488
|
+
if (apartmentId) queryParams.append('apartmentId', apartmentId);
|
|
27489
|
+
if (includeRelated) queryParams.append('includeRelated', includeRelated);
|
|
27490
|
+
if (includePriceElements) queryParams.append('includePriceElements', includePriceElements);
|
|
27491
|
+
return await this.call(`/reservations?${queryParams.toString()}`, 'GET');
|
|
27492
|
+
}
|
|
27493
|
+
async sendMessage(params, _pinsSettingsList, _context) {
|
|
27494
|
+
const { reservationId, message } = params;
|
|
27495
|
+
return await this.call(`/reservations/${reservationId}/messages/send-message-to-guest`, 'POST', JSON.stringify({
|
|
27496
|
+
messageBody: message
|
|
27497
|
+
}));
|
|
27473
27498
|
}
|
|
27474
27499
|
async event(params, _pinsSettingsList, context) {
|
|
27475
27500
|
const { updateRates = [], newReservation = [], cancelReservation = [], updateReservation = [] } = params;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -43,6 +43,231 @@
|
|
|
43
43
|
],
|
|
44
44
|
"x-events": []
|
|
45
45
|
}
|
|
46
|
+
},
|
|
47
|
+
"/sendMessage": {
|
|
48
|
+
"post": {
|
|
49
|
+
"tags": ["service"],
|
|
50
|
+
"summary": "Envoi d'un message via Smoobu",
|
|
51
|
+
"parameters": [
|
|
52
|
+
{
|
|
53
|
+
"name": "reservationId",
|
|
54
|
+
"summary": "Identifiant de la réservation",
|
|
55
|
+
"required": true,
|
|
56
|
+
"description": "Identifiant de la réservation Smoobu",
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "message",
|
|
63
|
+
"summary": "Message",
|
|
64
|
+
"required": true,
|
|
65
|
+
"description": "Message à envoyer",
|
|
66
|
+
"schema": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "SMOOBU_API_KEY",
|
|
72
|
+
"summary": "Clé d'API",
|
|
73
|
+
"required": false,
|
|
74
|
+
"description": "Clé d'API Smoobu",
|
|
75
|
+
"schema": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "SMOOBU_API_ENDPOINT",
|
|
81
|
+
"summary": "Endpoint de l'API",
|
|
82
|
+
"required": false,
|
|
83
|
+
"description": "Endpoint de l'API Smoobu",
|
|
84
|
+
"schema": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"x-events": []
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"/getAllReservations": {
|
|
93
|
+
"post": {
|
|
94
|
+
"tags": ["service"],
|
|
95
|
+
"summary": "Liste des réservations Smoobu",
|
|
96
|
+
"parameters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "created_from",
|
|
99
|
+
"summary": "Créé depuis",
|
|
100
|
+
"required": false,
|
|
101
|
+
"description": "Date de création depuis",
|
|
102
|
+
"schema": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "created_to",
|
|
108
|
+
"summary": "Créé jusqu'à",
|
|
109
|
+
"required": false,
|
|
110
|
+
"description": "Date de création jusqu'à",
|
|
111
|
+
"schema": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "from",
|
|
117
|
+
"summary": "Début",
|
|
118
|
+
"required": false,
|
|
119
|
+
"description": "Date de début",
|
|
120
|
+
"schema": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "to",
|
|
126
|
+
"summary": "Fin",
|
|
127
|
+
"required": false,
|
|
128
|
+
"description": "Date de fin",
|
|
129
|
+
"schema": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "modifiedFrom",
|
|
135
|
+
"summary": "Modifié depuis",
|
|
136
|
+
"required": false,
|
|
137
|
+
"description": "Date de modification depuis",
|
|
138
|
+
"schema": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "modifiedTo",
|
|
144
|
+
"summary": "Modifié jusqu'à",
|
|
145
|
+
"required": false,
|
|
146
|
+
"description": "Date de modification jusqu'à",
|
|
147
|
+
"schema": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "arrivalFrom",
|
|
153
|
+
"summary": "Arrivée depuis",
|
|
154
|
+
"required": false,
|
|
155
|
+
"description": "Date d'arrivée depuis",
|
|
156
|
+
"schema": {
|
|
157
|
+
"type": "string"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "arrivalTo",
|
|
162
|
+
"summary": "Arrivée jusqu'à",
|
|
163
|
+
"required": false,
|
|
164
|
+
"description": "Date d'arrivée jusqu'à",
|
|
165
|
+
"schema": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "departureFrom",
|
|
171
|
+
"summary": "Départ depuis",
|
|
172
|
+
"required": false,
|
|
173
|
+
"description": "Date de départ depuis",
|
|
174
|
+
"schema": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "departureTo",
|
|
180
|
+
"summary": "Départ jusqu'à",
|
|
181
|
+
"required": false,
|
|
182
|
+
"description": "Date de départ jusqu'à",
|
|
183
|
+
"schema": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "showCancellation",
|
|
189
|
+
"summary": "Afficher les annulations",
|
|
190
|
+
"required": false,
|
|
191
|
+
"description": "Afficher les annulations",
|
|
192
|
+
"schema": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "excludeBlocked",
|
|
198
|
+
"summary": "Exclure les bloqués",
|
|
199
|
+
"required": false,
|
|
200
|
+
"description": "Exclure les bloqués",
|
|
201
|
+
"schema": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "page",
|
|
207
|
+
"summary": "Page",
|
|
208
|
+
"required": false,
|
|
209
|
+
"description": "Page",
|
|
210
|
+
"schema": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "pageSize",
|
|
216
|
+
"summary": "Taille de la page",
|
|
217
|
+
"required": false,
|
|
218
|
+
"description": "Taille de la page",
|
|
219
|
+
"schema": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "apartmentId",
|
|
225
|
+
"summary": "Identifiant de l'appartement",
|
|
226
|
+
"required": false,
|
|
227
|
+
"description": "Identifiant de l'appartement",
|
|
228
|
+
"schema": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "includeRelated",
|
|
234
|
+
"summary": "Inclure les détails",
|
|
235
|
+
"required": false,
|
|
236
|
+
"description": "Inclure les détails",
|
|
237
|
+
"schema": {
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "includePriceElements",
|
|
243
|
+
"summary": "Inclure les éléments de prix",
|
|
244
|
+
"required": false,
|
|
245
|
+
"description": "Inclure les éléments de prix",
|
|
246
|
+
"schema": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "SMOOBU_API_KEY",
|
|
252
|
+
"summary": "Clé d'API",
|
|
253
|
+
"required": false,
|
|
254
|
+
"description": "Clé d'API Smoobu",
|
|
255
|
+
"schema": {
|
|
256
|
+
"type": "string"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "SMOOBU_API_ENDPOINT",
|
|
261
|
+
"summary": "Endpoint de l'API",
|
|
262
|
+
"required": false,
|
|
263
|
+
"description": "Endpoint de l'API Smoobu",
|
|
264
|
+
"schema": {
|
|
265
|
+
"type": "string"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"x-events": []
|
|
270
|
+
}
|
|
46
271
|
}
|
|
47
272
|
},
|
|
48
273
|
"components": {
|