endpoints-sdk-cli 2.2.0 → 2.3.2
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/README.md +11 -11
- package/lib/classes/Config.js +4 -4
- package/lib/classes/Repository.d.ts +1 -0
- package/lib/classes/Repository.js +9 -9
- package/lib/commands/add.js +2 -1
- package/lib/commands/install.js +8 -7
- package/lib/commands/update.js +7 -6
- package/lib/makeFiles.js +9 -8
- package/lib/templates/files/endpoints.js +5 -4
- package/lib/templates/files/index.js +1 -1
- package/lib/templates/files/indexFile.js +5 -4
- package/lib/templates/functions/endpoint.js +9 -7
- package/lib/templates/functions/index.js +2 -2
- package/lib/templates/functions/root.js +4 -3
- package/lib/templates/index.js +2 -2
- package/lib/utils/camelCase.js +3 -2
- package/lib/utils/format.js +3 -2
- package/lib/utils/unique.js +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/CHANGELOG.md +0 -2625
- package/lib/endpoints/m2m-core.d.ts +0 -4
- package/lib/endpoints/m2m-core.js +0 -7
- package/lib/endpoints/m2m-core.v1.d.ts +0 -527
- package/lib/endpoints/m2m-core.v1.js +0 -1084
- package/lib/endpoints/m2m-notifications.d.ts +0 -4
- package/lib/endpoints/m2m-notifications.js +0 -7
- package/lib/endpoints/m2m-notifications.v1.d.ts +0 -50
- package/lib/endpoints/m2m-notifications.v1.js +0 -133
- package/lib/endpoints/m2m-users.d.ts +0 -4
- package/lib/endpoints/m2m-users.js +0 -7
- package/lib/endpoints/m2m-users.v1.d.ts +0 -210
- package/lib/endpoints/m2m-users.v1.js +0 -529
|
@@ -1,1084 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.m2mCore_v1 = exports.revokeTemporalToken = exports.generateTemporalToken = exports.getInquiryReservationRelation = exports.registerInquiryReservationRelation = exports.registerAdditionalSales = exports.findSalesByReservationId = exports.saveMinpakuAndMonthlySales = exports.exportReservationDetails = exports.exportAchievement = exports.getLatestOccupancyCalendar = exports.applyAirbnbCalendar = exports.showAirbnbCalendar = exports.updateStayType = exports.reservationDetail = exports.assignFailedReservations = exports.importOperationType = exports.importListingReservations = exports.importListing = exports.getRoomCalendarByTemporalToken = exports.getReservationsAndProprietariesByRoomTypeId = exports.getRoomCalendar = exports.getRoomType = exports.updateOTAReservation = exports.editRoomTypeProprietary = exports.editRoomTypeManually = exports.deleteRoomTypeProprietary = exports.detachFromOTA = exports.associateToOTA = exports.createRoomTypeProprietary = exports.transferRoomTypeReservation = exports.createRoomTypeManually = exports.ownerCreate = exports.autoPricingPolicyDelete = exports.autoPricingPolicyUpdate = exports.autoPricingPolicyGet = exports.autoPricingPolicyList = exports.autoPricingPolicyCreate = exports.notificationReservationOta = exports.propertyListRooms = exports.propertyGet = exports.propertyList = exports.propertyEdit = exports.propertyCreate = exports.listingGetListingInfoForDepositManagement = exports.listingSetMatsuriListingInfo = exports.listingRenotifyReservations = exports.listingRenotify = exports.listingAutoPricingPricingWithoutSave = exports.listingAutoPricingPricing = exports.listingUpdateAutoPricingSetting = exports.listingGetAutoPricingSetting = exports.updateListing = exports.listingDetail = exports.listingSearchByName = exports.findListingsBySpan = exports.listCities = exports.listPrefectures = exports.healthCheck = exports.root = void 0;
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* A function that returns the URL part common to the endpoints.
|
|
7
|
-
*/
|
|
8
|
-
exports.root = () => {
|
|
9
|
-
let __root = "";
|
|
10
|
-
if (process.env.NODE_ENV === "local") {
|
|
11
|
-
__root = "http://localhost:8080";
|
|
12
|
-
}
|
|
13
|
-
if (process.env.NODE_ENV === "localDev") {
|
|
14
|
-
__root = "https://api-core.dev.m2msystems.cloud";
|
|
15
|
-
}
|
|
16
|
-
if (process.env.NODE_ENV === "development") {
|
|
17
|
-
__root = "https://api-core.dev.m2msystems.cloud";
|
|
18
|
-
}
|
|
19
|
-
if (process.env.NODE_ENV === "production") {
|
|
20
|
-
__root = "https://api-core.m2msystems.cloud";
|
|
21
|
-
}
|
|
22
|
-
return __root;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* ヘルスチェック
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
exports.healthCheck = () => {
|
|
29
|
-
const __root = exports.root();
|
|
30
|
-
const __queries = Object.entries({})
|
|
31
|
-
.filter(([_, value]) => {
|
|
32
|
-
return value !== undefined;
|
|
33
|
-
})
|
|
34
|
-
.map(([key, value]) => {
|
|
35
|
-
return `${key}=${value}`;
|
|
36
|
-
})
|
|
37
|
-
.join("&");
|
|
38
|
-
const __path = `${__root}/${`health_check`}`;
|
|
39
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* 都道府県の一覧を返す
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
exports.listPrefectures = () => {
|
|
46
|
-
const __root = exports.root();
|
|
47
|
-
const __queries = Object.entries({})
|
|
48
|
-
.filter(([_, value]) => {
|
|
49
|
-
return value !== undefined;
|
|
50
|
-
})
|
|
51
|
-
.map(([key, value]) => {
|
|
52
|
-
return `${key}=${value}`;
|
|
53
|
-
})
|
|
54
|
-
.join("&");
|
|
55
|
-
const __path = `${__root}/${`address/prefectures`}`;
|
|
56
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* 指定された都道府県の中の市町村区の一覧を返す
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
exports.listCities = ({ id }) => {
|
|
63
|
-
const __root = exports.root();
|
|
64
|
-
const __queries = Object.entries({})
|
|
65
|
-
.filter(([_, value]) => {
|
|
66
|
-
return value !== undefined;
|
|
67
|
-
})
|
|
68
|
-
.map(([key, value]) => {
|
|
69
|
-
return `${key}=${value}`;
|
|
70
|
-
})
|
|
71
|
-
.join("&");
|
|
72
|
-
const __path = `${__root}/${`address/prefectures/${id}/cities`}`;
|
|
73
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* 利用可能期間で検索する
|
|
77
|
-
*
|
|
78
|
-
*/
|
|
79
|
-
exports.findListingsBySpan = () => {
|
|
80
|
-
const __root = exports.root();
|
|
81
|
-
const __queries = Object.entries({})
|
|
82
|
-
.filter(([_, value]) => {
|
|
83
|
-
return value !== undefined;
|
|
84
|
-
})
|
|
85
|
-
.map(([key, value]) => {
|
|
86
|
-
return `${key}=${value}`;
|
|
87
|
-
})
|
|
88
|
-
.join("&");
|
|
89
|
-
const __path = `${__root}/${`listings/search`}`;
|
|
90
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* 物件名で検索する
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
|
-
exports.listingSearchByName = () => {
|
|
97
|
-
const __root = exports.root();
|
|
98
|
-
const __queries = Object.entries({})
|
|
99
|
-
.filter(([_, value]) => {
|
|
100
|
-
return value !== undefined;
|
|
101
|
-
})
|
|
102
|
-
.map(([key, value]) => {
|
|
103
|
-
return `${key}=${value}`;
|
|
104
|
-
})
|
|
105
|
-
.join("&");
|
|
106
|
-
const __path = `${__root}/${`listings/search_by_name`}`;
|
|
107
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* リスティング詳細の情報
|
|
111
|
-
*
|
|
112
|
-
*/
|
|
113
|
-
exports.listingDetail = ({ id }) => {
|
|
114
|
-
const __root = exports.root();
|
|
115
|
-
const __queries = Object.entries({})
|
|
116
|
-
.filter(([_, value]) => {
|
|
117
|
-
return value !== undefined;
|
|
118
|
-
})
|
|
119
|
-
.map(([key, value]) => {
|
|
120
|
-
return `${key}=${value}`;
|
|
121
|
-
})
|
|
122
|
-
.join("&");
|
|
123
|
-
const __path = `${__root}/${`listings/${id}`}`;
|
|
124
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* リスティングを更新する
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
exports.updateListing = ({ id }) => {
|
|
131
|
-
const __root = exports.root();
|
|
132
|
-
const __queries = Object.entries({})
|
|
133
|
-
.filter(([_, value]) => {
|
|
134
|
-
return value !== undefined;
|
|
135
|
-
})
|
|
136
|
-
.map(([key, value]) => {
|
|
137
|
-
return `${key}=${value}`;
|
|
138
|
-
})
|
|
139
|
-
.join("&");
|
|
140
|
-
const __path = `${__root}/${`listings/${id}`}`;
|
|
141
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* 物件個別に設定されたすべての自動価格設定関連情報を取得する
|
|
145
|
-
*
|
|
146
|
-
*/
|
|
147
|
-
exports.listingGetAutoPricingSetting = ({ id }) => {
|
|
148
|
-
const __root = exports.root();
|
|
149
|
-
const __queries = Object.entries({})
|
|
150
|
-
.filter(([_, value]) => {
|
|
151
|
-
return value !== undefined;
|
|
152
|
-
})
|
|
153
|
-
.map(([key, value]) => {
|
|
154
|
-
return `${key}=${value}`;
|
|
155
|
-
})
|
|
156
|
-
.join("&");
|
|
157
|
-
const __path = `${__root}/${`listings/${id}/auto_pricing_settings`}`;
|
|
158
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* 物件個別に設定されたすべての自動価格設定関連情報を更新する
|
|
162
|
-
*
|
|
163
|
-
*/
|
|
164
|
-
exports.listingUpdateAutoPricingSetting = ({ id }) => {
|
|
165
|
-
const __root = exports.root();
|
|
166
|
-
const __queries = Object.entries({})
|
|
167
|
-
.filter(([_, value]) => {
|
|
168
|
-
return value !== undefined;
|
|
169
|
-
})
|
|
170
|
-
.map(([key, value]) => {
|
|
171
|
-
return `${key}=${value}`;
|
|
172
|
-
})
|
|
173
|
-
.join("&");
|
|
174
|
-
const __path = `${__root}/${`listings/${id}/auto_pricing_settings`}`;
|
|
175
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* 自動価格設定により設定される価格のプレビューを取得する
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
exports.listingAutoPricingPricing = ({ id }) => {
|
|
182
|
-
const __root = exports.root();
|
|
183
|
-
const __queries = Object.entries({})
|
|
184
|
-
.filter(([_, value]) => {
|
|
185
|
-
return value !== undefined;
|
|
186
|
-
})
|
|
187
|
-
.map(([key, value]) => {
|
|
188
|
-
return `${key}=${value}`;
|
|
189
|
-
})
|
|
190
|
-
.join("&");
|
|
191
|
-
const __path = `${__root}/${`listings/${id}/auto_pricing_pricings`}`;
|
|
192
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* 自動価格設定により設定される価格のプレビューを、設定を保存せずに取得する
|
|
196
|
-
*
|
|
197
|
-
*/
|
|
198
|
-
exports.listingAutoPricingPricingWithoutSave = ({ id, }) => {
|
|
199
|
-
const __root = exports.root();
|
|
200
|
-
const __queries = Object.entries({})
|
|
201
|
-
.filter(([_, value]) => {
|
|
202
|
-
return value !== undefined;
|
|
203
|
-
})
|
|
204
|
-
.map(([key, value]) => {
|
|
205
|
-
return `${key}=${value}`;
|
|
206
|
-
})
|
|
207
|
-
.join("&");
|
|
208
|
-
const __path = `${__root}/${`listings/${id}/auto_pricing_pricings`}`;
|
|
209
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* リスティングイベントを再通知する
|
|
213
|
-
*
|
|
214
|
-
*/
|
|
215
|
-
exports.listingRenotify = ({ id }) => {
|
|
216
|
-
const __root = exports.root();
|
|
217
|
-
const __queries = Object.entries({})
|
|
218
|
-
.filter(([_, value]) => {
|
|
219
|
-
return value !== undefined;
|
|
220
|
-
})
|
|
221
|
-
.map(([key, value]) => {
|
|
222
|
-
return `${key}=${value}`;
|
|
223
|
-
})
|
|
224
|
-
.join("&");
|
|
225
|
-
const __path = `${__root}/${`listings/${id}/re_notify`}`;
|
|
226
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* 予約を再通知する
|
|
230
|
-
*
|
|
231
|
-
*/
|
|
232
|
-
exports.listingRenotifyReservations = ({ id }) => {
|
|
233
|
-
const __root = exports.root();
|
|
234
|
-
const __queries = Object.entries({})
|
|
235
|
-
.filter(([_, value]) => {
|
|
236
|
-
return value !== undefined;
|
|
237
|
-
})
|
|
238
|
-
.map(([key, value]) => {
|
|
239
|
-
return `${key}=${value}`;
|
|
240
|
-
})
|
|
241
|
-
.join("&");
|
|
242
|
-
const __path = `${__root}/${`listings/${id}/re_notify_reservations`}`;
|
|
243
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Matsuriのリスティング情報を設定する
|
|
247
|
-
*
|
|
248
|
-
*/
|
|
249
|
-
exports.listingSetMatsuriListingInfo = ({ id }) => {
|
|
250
|
-
const __root = exports.root();
|
|
251
|
-
const __queries = Object.entries({})
|
|
252
|
-
.filter(([_, value]) => {
|
|
253
|
-
return value !== undefined;
|
|
254
|
-
})
|
|
255
|
-
.map(([key, value]) => {
|
|
256
|
-
return `${key}=${value}`;
|
|
257
|
-
})
|
|
258
|
-
.join("&");
|
|
259
|
-
const __path = `${__root}/${`listings/${id}/matsuri_listing_info`}`;
|
|
260
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* 収支管理用のリスティング情報を取得する
|
|
264
|
-
*
|
|
265
|
-
*/
|
|
266
|
-
exports.listingGetListingInfoForDepositManagement = () => {
|
|
267
|
-
const __root = exports.root();
|
|
268
|
-
const __queries = Object.entries({})
|
|
269
|
-
.filter(([_, value]) => {
|
|
270
|
-
return value !== undefined;
|
|
271
|
-
})
|
|
272
|
-
.map(([key, value]) => {
|
|
273
|
-
return `${key}=${value}`;
|
|
274
|
-
})
|
|
275
|
-
.join("&");
|
|
276
|
-
const __path = `${__root}/${`listings/deposit_management`}`;
|
|
277
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* 施設を作成する
|
|
281
|
-
*
|
|
282
|
-
*/
|
|
283
|
-
exports.propertyCreate = () => {
|
|
284
|
-
const __root = exports.root();
|
|
285
|
-
const __queries = Object.entries({})
|
|
286
|
-
.filter(([_, value]) => {
|
|
287
|
-
return value !== undefined;
|
|
288
|
-
})
|
|
289
|
-
.map(([key, value]) => {
|
|
290
|
-
return `${key}=${value}`;
|
|
291
|
-
})
|
|
292
|
-
.join("&");
|
|
293
|
-
const __path = `${__root}/${`property`}`;
|
|
294
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
295
|
-
};
|
|
296
|
-
/**
|
|
297
|
-
* 施設を編集する
|
|
298
|
-
*
|
|
299
|
-
*/
|
|
300
|
-
exports.propertyEdit = ({ id }) => {
|
|
301
|
-
const __root = exports.root();
|
|
302
|
-
const __queries = Object.entries({})
|
|
303
|
-
.filter(([_, value]) => {
|
|
304
|
-
return value !== undefined;
|
|
305
|
-
})
|
|
306
|
-
.map(([key, value]) => {
|
|
307
|
-
return `${key}=${value}`;
|
|
308
|
-
})
|
|
309
|
-
.join("&");
|
|
310
|
-
const __path = `${__root}/${`property/${id}`}`;
|
|
311
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
312
|
-
};
|
|
313
|
-
/**
|
|
314
|
-
* 施設の一覧を取得する
|
|
315
|
-
*
|
|
316
|
-
*/
|
|
317
|
-
exports.propertyList = () => {
|
|
318
|
-
const __root = exports.root();
|
|
319
|
-
const __queries = Object.entries({})
|
|
320
|
-
.filter(([_, value]) => {
|
|
321
|
-
return value !== undefined;
|
|
322
|
-
})
|
|
323
|
-
.map(([key, value]) => {
|
|
324
|
-
return `${key}=${value}`;
|
|
325
|
-
})
|
|
326
|
-
.join("&");
|
|
327
|
-
const __path = `${__root}/${`property`}`;
|
|
328
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
329
|
-
};
|
|
330
|
-
/**
|
|
331
|
-
* 施設を取得する
|
|
332
|
-
*
|
|
333
|
-
*/
|
|
334
|
-
exports.propertyGet = ({ id }) => {
|
|
335
|
-
const __root = exports.root();
|
|
336
|
-
const __queries = Object.entries({})
|
|
337
|
-
.filter(([_, value]) => {
|
|
338
|
-
return value !== undefined;
|
|
339
|
-
})
|
|
340
|
-
.map(([key, value]) => {
|
|
341
|
-
return `${key}=${value}`;
|
|
342
|
-
})
|
|
343
|
-
.join("&");
|
|
344
|
-
const __path = `${__root}/${`property/${id}`}`;
|
|
345
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
346
|
-
};
|
|
347
|
-
/**
|
|
348
|
-
* 施設に紐づく部屋の一覧を取得する
|
|
349
|
-
*
|
|
350
|
-
*/
|
|
351
|
-
exports.propertyListRooms = ({ id }) => {
|
|
352
|
-
const __root = exports.root();
|
|
353
|
-
const __queries = Object.entries({})
|
|
354
|
-
.filter(([_, value]) => {
|
|
355
|
-
return value !== undefined;
|
|
356
|
-
})
|
|
357
|
-
.map(([key, value]) => {
|
|
358
|
-
return `${key}=${value}`;
|
|
359
|
-
})
|
|
360
|
-
.join("&");
|
|
361
|
-
const __path = `${__root}/${`property/${id}/rooms`}`;
|
|
362
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* OTAからの予約を通知する
|
|
366
|
-
*
|
|
367
|
-
*/
|
|
368
|
-
exports.notificationReservationOta = () => {
|
|
369
|
-
const __root = exports.root();
|
|
370
|
-
const __queries = Object.entries({})
|
|
371
|
-
.filter(([_, value]) => {
|
|
372
|
-
return value !== undefined;
|
|
373
|
-
})
|
|
374
|
-
.map(([key, value]) => {
|
|
375
|
-
return `${key}=${value}`;
|
|
376
|
-
})
|
|
377
|
-
.join("&");
|
|
378
|
-
const __path = `${__root}/${`notifications/reservations/ota`}`;
|
|
379
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
380
|
-
};
|
|
381
|
-
/**
|
|
382
|
-
* カスタム自動価格調整ポリシーを新規作成する
|
|
383
|
-
*
|
|
384
|
-
*/
|
|
385
|
-
exports.autoPricingPolicyCreate = () => {
|
|
386
|
-
const __root = exports.root();
|
|
387
|
-
const __queries = Object.entries({})
|
|
388
|
-
.filter(([_, value]) => {
|
|
389
|
-
return value !== undefined;
|
|
390
|
-
})
|
|
391
|
-
.map(([key, value]) => {
|
|
392
|
-
return `${key}=${value}`;
|
|
393
|
-
})
|
|
394
|
-
.join("&");
|
|
395
|
-
const __path = `${__root}/${`auto_pricing_policies`}`;
|
|
396
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
397
|
-
};
|
|
398
|
-
/**
|
|
399
|
-
* カスタム自動価格調整ポリシーの一覧を取得する
|
|
400
|
-
* @param {number} page 3
|
|
401
|
-
*/
|
|
402
|
-
exports.autoPricingPolicyList = ({ page }) => {
|
|
403
|
-
const __root = exports.root();
|
|
404
|
-
const __queries = Object.entries({ page })
|
|
405
|
-
.filter(([_, value]) => {
|
|
406
|
-
return value !== undefined;
|
|
407
|
-
})
|
|
408
|
-
.map(([key, value]) => {
|
|
409
|
-
return `${key}=${value}`;
|
|
410
|
-
})
|
|
411
|
-
.join("&");
|
|
412
|
-
const __path = `${__root}/${`auto_pricing_policies`}`;
|
|
413
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* 指定idの自動価格設定ポリシーを取得する
|
|
417
|
-
*
|
|
418
|
-
*/
|
|
419
|
-
exports.autoPricingPolicyGet = ({ id }) => {
|
|
420
|
-
const __root = exports.root();
|
|
421
|
-
const __queries = Object.entries({})
|
|
422
|
-
.filter(([_, value]) => {
|
|
423
|
-
return value !== undefined;
|
|
424
|
-
})
|
|
425
|
-
.map(([key, value]) => {
|
|
426
|
-
return `${key}=${value}`;
|
|
427
|
-
})
|
|
428
|
-
.join("&");
|
|
429
|
-
const __path = `${__root}/${`auto_pricing_policies/${id}`}`;
|
|
430
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
431
|
-
};
|
|
432
|
-
/**
|
|
433
|
-
* 指定idの自動価格設定ポリシーを更新する
|
|
434
|
-
*
|
|
435
|
-
*/
|
|
436
|
-
exports.autoPricingPolicyUpdate = ({ id }) => {
|
|
437
|
-
const __root = exports.root();
|
|
438
|
-
const __queries = Object.entries({})
|
|
439
|
-
.filter(([_, value]) => {
|
|
440
|
-
return value !== undefined;
|
|
441
|
-
})
|
|
442
|
-
.map(([key, value]) => {
|
|
443
|
-
return `${key}=${value}`;
|
|
444
|
-
})
|
|
445
|
-
.join("&");
|
|
446
|
-
const __path = `${__root}/${`auto_pricing_policies/${id}`}`;
|
|
447
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
448
|
-
};
|
|
449
|
-
/**
|
|
450
|
-
* 指定idのカスタム自動価格調整ポリシーを削除する
|
|
451
|
-
*
|
|
452
|
-
*/
|
|
453
|
-
exports.autoPricingPolicyDelete = ({ id }) => {
|
|
454
|
-
const __root = exports.root();
|
|
455
|
-
const __queries = Object.entries({})
|
|
456
|
-
.filter(([_, value]) => {
|
|
457
|
-
return value !== undefined;
|
|
458
|
-
})
|
|
459
|
-
.map(([key, value]) => {
|
|
460
|
-
return `${key}=${value}`;
|
|
461
|
-
})
|
|
462
|
-
.join("&");
|
|
463
|
-
const __path = `${__root}/${`auto_pricing_policies/${id}`}`;
|
|
464
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
465
|
-
};
|
|
466
|
-
/**
|
|
467
|
-
* リスティングのオーナーを作成する
|
|
468
|
-
*
|
|
469
|
-
*/
|
|
470
|
-
exports.ownerCreate = () => {
|
|
471
|
-
const __root = exports.root();
|
|
472
|
-
const __queries = Object.entries({})
|
|
473
|
-
.filter(([_, value]) => {
|
|
474
|
-
return value !== undefined;
|
|
475
|
-
})
|
|
476
|
-
.map(([key, value]) => {
|
|
477
|
-
return `${key}=${value}`;
|
|
478
|
-
})
|
|
479
|
-
.join("&");
|
|
480
|
-
const __path = `${__root}/${`owners`}`;
|
|
481
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
482
|
-
};
|
|
483
|
-
/**
|
|
484
|
-
* 部屋タイプに対して手動作成を作成する
|
|
485
|
-
*
|
|
486
|
-
*/
|
|
487
|
-
exports.createRoomTypeManually = ({ id }) => {
|
|
488
|
-
const __root = exports.root();
|
|
489
|
-
const __queries = Object.entries({})
|
|
490
|
-
.filter(([_, value]) => {
|
|
491
|
-
return value !== undefined;
|
|
492
|
-
})
|
|
493
|
-
.map(([key, value]) => {
|
|
494
|
-
return `${key}=${value}`;
|
|
495
|
-
})
|
|
496
|
-
.join("&");
|
|
497
|
-
const __path = `${__root}/${`roomTypes/${id}/reservation`}`;
|
|
498
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
499
|
-
};
|
|
500
|
-
/**
|
|
501
|
-
* 予約の移動を行う
|
|
502
|
-
*
|
|
503
|
-
*/
|
|
504
|
-
exports.transferRoomTypeReservation = ({ id }) => {
|
|
505
|
-
const __root = exports.root();
|
|
506
|
-
const __queries = Object.entries({})
|
|
507
|
-
.filter(([_, value]) => {
|
|
508
|
-
return value !== undefined;
|
|
509
|
-
})
|
|
510
|
-
.map(([key, value]) => {
|
|
511
|
-
return `${key}=${value}`;
|
|
512
|
-
})
|
|
513
|
-
.join("&");
|
|
514
|
-
const __path = `${__root}/${`roomTypes/${id}/reservation/transfer`}`;
|
|
515
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
516
|
-
};
|
|
517
|
-
/**
|
|
518
|
-
* 部屋タイプに対して専有を作成する
|
|
519
|
-
*
|
|
520
|
-
*/
|
|
521
|
-
exports.createRoomTypeProprietary = ({ id }) => {
|
|
522
|
-
const __root = exports.root();
|
|
523
|
-
const __queries = Object.entries({})
|
|
524
|
-
.filter(([_, value]) => {
|
|
525
|
-
return value !== undefined;
|
|
526
|
-
})
|
|
527
|
-
.map(([key, value]) => {
|
|
528
|
-
return `${key}=${value}`;
|
|
529
|
-
})
|
|
530
|
-
.join("&");
|
|
531
|
-
const __path = `${__root}/${`roomTypes/${id}/proprietary`}`;
|
|
532
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
533
|
-
};
|
|
534
|
-
/**
|
|
535
|
-
* 部屋タイプとOTA上の物件を紐付ける
|
|
536
|
-
*
|
|
537
|
-
*/
|
|
538
|
-
exports.associateToOTA = ({ id }) => {
|
|
539
|
-
const __root = exports.root();
|
|
540
|
-
const __queries = Object.entries({})
|
|
541
|
-
.filter(([_, value]) => {
|
|
542
|
-
return value !== undefined;
|
|
543
|
-
})
|
|
544
|
-
.map(([key, value]) => {
|
|
545
|
-
return `${key}=${value}`;
|
|
546
|
-
})
|
|
547
|
-
.join("&");
|
|
548
|
-
const __path = `${__root}/${`roomTypes/${id}/ota`}`;
|
|
549
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
550
|
-
};
|
|
551
|
-
/**
|
|
552
|
-
* 部屋タイプとOTA上の物件を紐付けを解除する
|
|
553
|
-
*
|
|
554
|
-
*/
|
|
555
|
-
exports.detachFromOTA = ({ id, otaType, otaId, }) => {
|
|
556
|
-
const __root = exports.root();
|
|
557
|
-
const __queries = Object.entries({})
|
|
558
|
-
.filter(([_, value]) => {
|
|
559
|
-
return value !== undefined;
|
|
560
|
-
})
|
|
561
|
-
.map(([key, value]) => {
|
|
562
|
-
return `${key}=${value}`;
|
|
563
|
-
})
|
|
564
|
-
.join("&");
|
|
565
|
-
const __path = `${__root}/${`roomTypes/${id}/ota/${otaType}/${otaId}`}`;
|
|
566
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
567
|
-
};
|
|
568
|
-
/**
|
|
569
|
-
* 専有を削除する
|
|
570
|
-
*
|
|
571
|
-
*/
|
|
572
|
-
exports.deleteRoomTypeProprietary = ({ id, proprietaryId, }) => {
|
|
573
|
-
const __root = exports.root();
|
|
574
|
-
const __queries = Object.entries({})
|
|
575
|
-
.filter(([_, value]) => {
|
|
576
|
-
return value !== undefined;
|
|
577
|
-
})
|
|
578
|
-
.map(([key, value]) => {
|
|
579
|
-
return `${key}=${value}`;
|
|
580
|
-
})
|
|
581
|
-
.join("&");
|
|
582
|
-
const __path = `${__root}/${`roomTypes/${id}/proprietary/${proprietaryId}`}`;
|
|
583
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
584
|
-
};
|
|
585
|
-
/**
|
|
586
|
-
* 部屋タイプに対して手動作成の更新を行う
|
|
587
|
-
*
|
|
588
|
-
*/
|
|
589
|
-
exports.editRoomTypeManually = ({ id }) => {
|
|
590
|
-
const __root = exports.root();
|
|
591
|
-
const __queries = Object.entries({})
|
|
592
|
-
.filter(([_, value]) => {
|
|
593
|
-
return value !== undefined;
|
|
594
|
-
})
|
|
595
|
-
.map(([key, value]) => {
|
|
596
|
-
return `${key}=${value}`;
|
|
597
|
-
})
|
|
598
|
-
.join("&");
|
|
599
|
-
const __path = `${__root}/${`roomTypes/${id}/reservation`}`;
|
|
600
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
601
|
-
};
|
|
602
|
-
/**
|
|
603
|
-
* 部屋タイプに対して専有の更新を行う
|
|
604
|
-
*
|
|
605
|
-
*/
|
|
606
|
-
exports.editRoomTypeProprietary = ({ id }) => {
|
|
607
|
-
const __root = exports.root();
|
|
608
|
-
const __queries = Object.entries({})
|
|
609
|
-
.filter(([_, value]) => {
|
|
610
|
-
return value !== undefined;
|
|
611
|
-
})
|
|
612
|
-
.map(([key, value]) => {
|
|
613
|
-
return `${key}=${value}`;
|
|
614
|
-
})
|
|
615
|
-
.join("&");
|
|
616
|
-
const __path = `${__root}/${`roomTypes/${id}/proprietary`}`;
|
|
617
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
618
|
-
};
|
|
619
|
-
/**
|
|
620
|
-
* OTA予約の固定状況,メモを更新する
|
|
621
|
-
*
|
|
622
|
-
*/
|
|
623
|
-
exports.updateOTAReservation = ({ id }) => {
|
|
624
|
-
const __root = exports.root();
|
|
625
|
-
const __queries = Object.entries({})
|
|
626
|
-
.filter(([_, value]) => {
|
|
627
|
-
return value !== undefined;
|
|
628
|
-
})
|
|
629
|
-
.map(([key, value]) => {
|
|
630
|
-
return `${key}=${value}`;
|
|
631
|
-
})
|
|
632
|
-
.join("&");
|
|
633
|
-
const __path = `${__root}/${`roomTypes/${id}/ota_reservation`}`;
|
|
634
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
635
|
-
};
|
|
636
|
-
/**
|
|
637
|
-
* 部屋タイプを取得する
|
|
638
|
-
*
|
|
639
|
-
*/
|
|
640
|
-
exports.getRoomType = ({ id }) => {
|
|
641
|
-
const __root = exports.root();
|
|
642
|
-
const __queries = Object.entries({})
|
|
643
|
-
.filter(([_, value]) => {
|
|
644
|
-
return value !== undefined;
|
|
645
|
-
})
|
|
646
|
-
.map(([key, value]) => {
|
|
647
|
-
return `${key}=${value}`;
|
|
648
|
-
})
|
|
649
|
-
.join("&");
|
|
650
|
-
const __path = `${__root}/${`roomTypes/${id}`}`;
|
|
651
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
652
|
-
};
|
|
653
|
-
/**
|
|
654
|
-
* 部屋のカレンダー情報を取得する
|
|
655
|
-
* @param {string} startDate 2020-01-01
|
|
656
|
-
* @param {string} endDate 2020-12-31
|
|
657
|
-
*/
|
|
658
|
-
exports.getRoomCalendar = ({ startDate, endDate, id, }) => {
|
|
659
|
-
const __root = exports.root();
|
|
660
|
-
const __queries = Object.entries({ startDate, endDate })
|
|
661
|
-
.filter(([_, value]) => {
|
|
662
|
-
return value !== undefined;
|
|
663
|
-
})
|
|
664
|
-
.map(([key, value]) => {
|
|
665
|
-
return `${key}=${value}`;
|
|
666
|
-
})
|
|
667
|
-
.join("&");
|
|
668
|
-
const __path = `${__root}/${`calendar/room/${id}`}`;
|
|
669
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
670
|
-
};
|
|
671
|
-
/**
|
|
672
|
-
* 部屋タイプに紐づく予約と専有を取得する
|
|
673
|
-
*
|
|
674
|
-
*/
|
|
675
|
-
exports.getReservationsAndProprietariesByRoomTypeId = ({ roomTypeId, }) => {
|
|
676
|
-
const __root = exports.root();
|
|
677
|
-
const __queries = Object.entries({})
|
|
678
|
-
.filter(([_, value]) => {
|
|
679
|
-
return value !== undefined;
|
|
680
|
-
})
|
|
681
|
-
.map(([key, value]) => {
|
|
682
|
-
return `${key}=${value}`;
|
|
683
|
-
})
|
|
684
|
-
.join("&");
|
|
685
|
-
const __path = `${__root}/${`calendar/room_type/${roomTypeId}`}`;
|
|
686
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
687
|
-
};
|
|
688
|
-
/**
|
|
689
|
-
* 一時発行トークンを使って外部ユーザーがカレンダーを閲覧できるようにする
|
|
690
|
-
* @param {number} page 0
|
|
691
|
-
* @param {number} itemNum 30
|
|
692
|
-
* @param {string} nameQuery hoge
|
|
693
|
-
* @param {string} startDate 2020-10-01
|
|
694
|
-
* @param {string} endDate 2020-11-30
|
|
695
|
-
* @param {string} tokenId foo
|
|
696
|
-
* @param {string} token bar
|
|
697
|
-
*/
|
|
698
|
-
exports.getRoomCalendarByTemporalToken = ({ page, itemNum, nameQuery, startDate, endDate, tokenId, token, }) => {
|
|
699
|
-
const __root = exports.root();
|
|
700
|
-
const __queries = Object.entries({
|
|
701
|
-
page,
|
|
702
|
-
itemNum,
|
|
703
|
-
nameQuery,
|
|
704
|
-
startDate,
|
|
705
|
-
endDate,
|
|
706
|
-
tokenId,
|
|
707
|
-
token,
|
|
708
|
-
})
|
|
709
|
-
.filter(([_, value]) => {
|
|
710
|
-
return value !== undefined;
|
|
711
|
-
})
|
|
712
|
-
.map(([key, value]) => {
|
|
713
|
-
return `${key}=${value}`;
|
|
714
|
-
})
|
|
715
|
-
.join("&");
|
|
716
|
-
const __path = `${__root}/${`calendar/external/calendar`}`;
|
|
717
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
718
|
-
};
|
|
719
|
-
/**
|
|
720
|
-
* リスティングをインポートする
|
|
721
|
-
*
|
|
722
|
-
*/
|
|
723
|
-
exports.importListing = () => {
|
|
724
|
-
const __root = exports.root();
|
|
725
|
-
const __queries = Object.entries({})
|
|
726
|
-
.filter(([_, value]) => {
|
|
727
|
-
return value !== undefined;
|
|
728
|
-
})
|
|
729
|
-
.map(([key, value]) => {
|
|
730
|
-
return `${key}=${value}`;
|
|
731
|
-
})
|
|
732
|
-
.join("&");
|
|
733
|
-
const __path = `${__root}/${`imports/listings`}`;
|
|
734
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
735
|
-
};
|
|
736
|
-
/**
|
|
737
|
-
* リスティングの予約をインポートする
|
|
738
|
-
*
|
|
739
|
-
*/
|
|
740
|
-
exports.importListingReservations = ({ id }) => {
|
|
741
|
-
const __root = exports.root();
|
|
742
|
-
const __queries = Object.entries({})
|
|
743
|
-
.filter(([_, value]) => {
|
|
744
|
-
return value !== undefined;
|
|
745
|
-
})
|
|
746
|
-
.map(([key, value]) => {
|
|
747
|
-
return `${key}=${value}`;
|
|
748
|
-
})
|
|
749
|
-
.join("&");
|
|
750
|
-
const __path = `${__root}/${`imports/listings/${id}/reservations`}`;
|
|
751
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
752
|
-
};
|
|
753
|
-
/**
|
|
754
|
-
* 部屋タイプに適切な運用形態が入るように修正するためのもの
|
|
755
|
-
*
|
|
756
|
-
*/
|
|
757
|
-
exports.importOperationType = () => {
|
|
758
|
-
const __root = exports.root();
|
|
759
|
-
const __queries = Object.entries({})
|
|
760
|
-
.filter(([_, value]) => {
|
|
761
|
-
return value !== undefined;
|
|
762
|
-
})
|
|
763
|
-
.map(([key, value]) => {
|
|
764
|
-
return `${key}=${value}`;
|
|
765
|
-
})
|
|
766
|
-
.join("&");
|
|
767
|
-
const __path = `${__root}/${`imports/operation_type`}`;
|
|
768
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
769
|
-
};
|
|
770
|
-
/**
|
|
771
|
-
* 割り当て失敗予約の一覧を取得する
|
|
772
|
-
*
|
|
773
|
-
*/
|
|
774
|
-
exports.assignFailedReservations = () => {
|
|
775
|
-
const __root = exports.root();
|
|
776
|
-
const __queries = Object.entries({})
|
|
777
|
-
.filter(([_, value]) => {
|
|
778
|
-
return value !== undefined;
|
|
779
|
-
})
|
|
780
|
-
.map(([key, value]) => {
|
|
781
|
-
return `${key}=${value}`;
|
|
782
|
-
})
|
|
783
|
-
.join("&");
|
|
784
|
-
const __path = `${__root}/${`reservations/assign_failed`}`;
|
|
785
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
786
|
-
};
|
|
787
|
-
/**
|
|
788
|
-
* 予約の詳細を取得する
|
|
789
|
-
*
|
|
790
|
-
*/
|
|
791
|
-
exports.reservationDetail = ({ id }) => {
|
|
792
|
-
const __root = exports.root();
|
|
793
|
-
const __queries = Object.entries({})
|
|
794
|
-
.filter(([_, value]) => {
|
|
795
|
-
return value !== undefined;
|
|
796
|
-
})
|
|
797
|
-
.map(([key, value]) => {
|
|
798
|
-
return `${key}=${value}`;
|
|
799
|
-
})
|
|
800
|
-
.join("&");
|
|
801
|
-
const __path = `${__root}/${`reservations/detail/${id}`}`;
|
|
802
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
803
|
-
};
|
|
804
|
-
/**
|
|
805
|
-
* stayTypeを更新する
|
|
806
|
-
*
|
|
807
|
-
*/
|
|
808
|
-
exports.updateStayType = ({ id }) => {
|
|
809
|
-
const __root = exports.root();
|
|
810
|
-
const __queries = Object.entries({})
|
|
811
|
-
.filter(([_, value]) => {
|
|
812
|
-
return value !== undefined;
|
|
813
|
-
})
|
|
814
|
-
.map(([key, value]) => {
|
|
815
|
-
return `${key}=${value}`;
|
|
816
|
-
})
|
|
817
|
-
.join("&");
|
|
818
|
-
const __path = `${__root}/${`reservations/stay_type/${id}`}`;
|
|
819
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
820
|
-
};
|
|
821
|
-
/**
|
|
822
|
-
* 自社のairbnbのカレンダーを表示
|
|
823
|
-
*
|
|
824
|
-
*/
|
|
825
|
-
exports.showAirbnbCalendar = () => {
|
|
826
|
-
const __root = exports.root();
|
|
827
|
-
const __queries = Object.entries({})
|
|
828
|
-
.filter(([_, value]) => {
|
|
829
|
-
return value !== undefined;
|
|
830
|
-
})
|
|
831
|
-
.map(([key, value]) => {
|
|
832
|
-
return `${key}=${value}`;
|
|
833
|
-
})
|
|
834
|
-
.join("&");
|
|
835
|
-
const __path = `${__root}/${`airbnb_calendars`}`;
|
|
836
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
837
|
-
};
|
|
838
|
-
/**
|
|
839
|
-
* 自社のairbnbのカレンダーを更新
|
|
840
|
-
*
|
|
841
|
-
*/
|
|
842
|
-
exports.applyAirbnbCalendar = () => {
|
|
843
|
-
const __root = exports.root();
|
|
844
|
-
const __queries = Object.entries({})
|
|
845
|
-
.filter(([_, value]) => {
|
|
846
|
-
return value !== undefined;
|
|
847
|
-
})
|
|
848
|
-
.map(([key, value]) => {
|
|
849
|
-
return `${key}=${value}`;
|
|
850
|
-
})
|
|
851
|
-
.join("&");
|
|
852
|
-
const __path = `${__root}/${`airbnb_calendars`}`;
|
|
853
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
854
|
-
};
|
|
855
|
-
/**
|
|
856
|
-
* 最新の部屋タイプの日毎の稼働状況を取得する
|
|
857
|
-
*
|
|
858
|
-
*/
|
|
859
|
-
exports.getLatestOccupancyCalendar = () => {
|
|
860
|
-
const __root = exports.root();
|
|
861
|
-
const __queries = Object.entries({})
|
|
862
|
-
.filter(([_, value]) => {
|
|
863
|
-
return value !== undefined;
|
|
864
|
-
})
|
|
865
|
-
.map(([key, value]) => {
|
|
866
|
-
return `${key}=${value}`;
|
|
867
|
-
})
|
|
868
|
-
.join("&");
|
|
869
|
-
const __path = `${__root}/${`listing_monitor/latest_occupancy_calendar`}`;
|
|
870
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
871
|
-
};
|
|
872
|
-
/**
|
|
873
|
-
* 実績を月単位で出力
|
|
874
|
-
*
|
|
875
|
-
*/
|
|
876
|
-
exports.exportAchievement = () => {
|
|
877
|
-
const __root = exports.root();
|
|
878
|
-
const __queries = Object.entries({})
|
|
879
|
-
.filter(([_, value]) => {
|
|
880
|
-
return value !== undefined;
|
|
881
|
-
})
|
|
882
|
-
.map(([key, value]) => {
|
|
883
|
-
return `${key}=${value}`;
|
|
884
|
-
})
|
|
885
|
-
.join("&");
|
|
886
|
-
const __path = `${__root}/${`achievement/export`}`;
|
|
887
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
888
|
-
};
|
|
889
|
-
/**
|
|
890
|
-
* 予約詳細を出力
|
|
891
|
-
*
|
|
892
|
-
*/
|
|
893
|
-
exports.exportReservationDetails = () => {
|
|
894
|
-
const __root = exports.root();
|
|
895
|
-
const __queries = Object.entries({})
|
|
896
|
-
.filter(([_, value]) => {
|
|
897
|
-
return value !== undefined;
|
|
898
|
-
})
|
|
899
|
-
.map(([key, value]) => {
|
|
900
|
-
return `${key}=${value}`;
|
|
901
|
-
})
|
|
902
|
-
.join("&");
|
|
903
|
-
const __path = `${__root}/${`achievement/reservation_details`}`;
|
|
904
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
905
|
-
};
|
|
906
|
-
/**
|
|
907
|
-
* 売上情報を登録する
|
|
908
|
-
*
|
|
909
|
-
*/
|
|
910
|
-
exports.saveMinpakuAndMonthlySales = () => {
|
|
911
|
-
const __root = exports.root();
|
|
912
|
-
const __queries = Object.entries({})
|
|
913
|
-
.filter(([_, value]) => {
|
|
914
|
-
return value !== undefined;
|
|
915
|
-
})
|
|
916
|
-
.map(([key, value]) => {
|
|
917
|
-
return `${key}=${value}`;
|
|
918
|
-
})
|
|
919
|
-
.join("&");
|
|
920
|
-
const __path = `${__root}/${`achievement/sales`}`;
|
|
921
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
922
|
-
};
|
|
923
|
-
/**
|
|
924
|
-
* 予約Idから売り上げを取得する
|
|
925
|
-
*
|
|
926
|
-
*/
|
|
927
|
-
exports.findSalesByReservationId = ({ reservationId, }) => {
|
|
928
|
-
const __root = exports.root();
|
|
929
|
-
const __queries = Object.entries({})
|
|
930
|
-
.filter(([_, value]) => {
|
|
931
|
-
return value !== undefined;
|
|
932
|
-
})
|
|
933
|
-
.map(([key, value]) => {
|
|
934
|
-
return `${key}=${value}`;
|
|
935
|
-
})
|
|
936
|
-
.join("&");
|
|
937
|
-
const __path = `${__root}/${`achievement/sales/${reservationId}`}`;
|
|
938
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
939
|
-
};
|
|
940
|
-
/**
|
|
941
|
-
* 追加売り上げを作成する
|
|
942
|
-
*
|
|
943
|
-
*/
|
|
944
|
-
exports.registerAdditionalSales = () => {
|
|
945
|
-
const __root = exports.root();
|
|
946
|
-
const __queries = Object.entries({})
|
|
947
|
-
.filter(([_, value]) => {
|
|
948
|
-
return value !== undefined;
|
|
949
|
-
})
|
|
950
|
-
.map(([key, value]) => {
|
|
951
|
-
return `${key}=${value}`;
|
|
952
|
-
})
|
|
953
|
-
.join("&");
|
|
954
|
-
const __path = `${__root}/${`achievement/additional_sales`}`;
|
|
955
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
956
|
-
};
|
|
957
|
-
/**
|
|
958
|
-
* 手動管理お問い合わせidと予約idの紐付けを行う
|
|
959
|
-
*
|
|
960
|
-
*/
|
|
961
|
-
exports.registerInquiryReservationRelation = () => {
|
|
962
|
-
const __root = exports.root();
|
|
963
|
-
const __queries = Object.entries({})
|
|
964
|
-
.filter(([_, value]) => {
|
|
965
|
-
return value !== undefined;
|
|
966
|
-
})
|
|
967
|
-
.map(([key, value]) => {
|
|
968
|
-
return `${key}=${value}`;
|
|
969
|
-
})
|
|
970
|
-
.join("&");
|
|
971
|
-
const __path = `${__root}/${`achievement/inquiry_reservation_relation`}`;
|
|
972
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
973
|
-
};
|
|
974
|
-
/**
|
|
975
|
-
* 手動管理お問い合わせidと予約idの紐付けを取得する
|
|
976
|
-
*
|
|
977
|
-
*/
|
|
978
|
-
exports.getInquiryReservationRelation = ({ reservationId, }) => {
|
|
979
|
-
const __root = exports.root();
|
|
980
|
-
const __queries = Object.entries({})
|
|
981
|
-
.filter(([_, value]) => {
|
|
982
|
-
return value !== undefined;
|
|
983
|
-
})
|
|
984
|
-
.map(([key, value]) => {
|
|
985
|
-
return `${key}=${value}`;
|
|
986
|
-
})
|
|
987
|
-
.join("&");
|
|
988
|
-
const __path = `${__root}/${`achievement/inquiry_reservation_relation/${reservationId}`}`;
|
|
989
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
990
|
-
};
|
|
991
|
-
/**
|
|
992
|
-
* 一時発行トークンを発行する
|
|
993
|
-
*
|
|
994
|
-
*/
|
|
995
|
-
exports.generateTemporalToken = () => {
|
|
996
|
-
const __root = exports.root();
|
|
997
|
-
const __queries = Object.entries({})
|
|
998
|
-
.filter(([_, value]) => {
|
|
999
|
-
return value !== undefined;
|
|
1000
|
-
})
|
|
1001
|
-
.map(([key, value]) => {
|
|
1002
|
-
return `${key}=${value}`;
|
|
1003
|
-
})
|
|
1004
|
-
.join("&");
|
|
1005
|
-
const __path = `${__root}/${`temporal_token`}`;
|
|
1006
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
1007
|
-
};
|
|
1008
|
-
/**
|
|
1009
|
-
* 一時発行トークンを破棄する
|
|
1010
|
-
*
|
|
1011
|
-
*/
|
|
1012
|
-
exports.revokeTemporalToken = ({ tokenId }) => {
|
|
1013
|
-
const __root = exports.root();
|
|
1014
|
-
const __queries = Object.entries({})
|
|
1015
|
-
.filter(([_, value]) => {
|
|
1016
|
-
return value !== undefined;
|
|
1017
|
-
})
|
|
1018
|
-
.map(([key, value]) => {
|
|
1019
|
-
return `${key}=${value}`;
|
|
1020
|
-
})
|
|
1021
|
-
.join("&");
|
|
1022
|
-
const __path = `${__root}/${`temporal_token/${tokenId}`}`;
|
|
1023
|
-
return __queries ? `${__path}?${__queries}` : __path;
|
|
1024
|
-
};
|
|
1025
|
-
exports.m2mCore_v1 = {
|
|
1026
|
-
healthCheck: exports.healthCheck,
|
|
1027
|
-
listPrefectures: exports.listPrefectures,
|
|
1028
|
-
listCities: exports.listCities,
|
|
1029
|
-
findListingsBySpan: exports.findListingsBySpan,
|
|
1030
|
-
listingSearchByName: exports.listingSearchByName,
|
|
1031
|
-
listingDetail: exports.listingDetail,
|
|
1032
|
-
updateListing: exports.updateListing,
|
|
1033
|
-
listingGetAutoPricingSetting: exports.listingGetAutoPricingSetting,
|
|
1034
|
-
listingUpdateAutoPricingSetting: exports.listingUpdateAutoPricingSetting,
|
|
1035
|
-
listingAutoPricingPricing: exports.listingAutoPricingPricing,
|
|
1036
|
-
listingAutoPricingPricingWithoutSave: exports.listingAutoPricingPricingWithoutSave,
|
|
1037
|
-
listingRenotify: exports.listingRenotify,
|
|
1038
|
-
listingRenotifyReservations: exports.listingRenotifyReservations,
|
|
1039
|
-
listingSetMatsuriListingInfo: exports.listingSetMatsuriListingInfo,
|
|
1040
|
-
listingGetListingInfoForDepositManagement: exports.listingGetListingInfoForDepositManagement,
|
|
1041
|
-
propertyCreate: exports.propertyCreate,
|
|
1042
|
-
propertyEdit: exports.propertyEdit,
|
|
1043
|
-
propertyList: exports.propertyList,
|
|
1044
|
-
propertyGet: exports.propertyGet,
|
|
1045
|
-
propertyListRooms: exports.propertyListRooms,
|
|
1046
|
-
notificationReservationOta: exports.notificationReservationOta,
|
|
1047
|
-
autoPricingPolicyCreate: exports.autoPricingPolicyCreate,
|
|
1048
|
-
autoPricingPolicyList: exports.autoPricingPolicyList,
|
|
1049
|
-
autoPricingPolicyGet: exports.autoPricingPolicyGet,
|
|
1050
|
-
autoPricingPolicyUpdate: exports.autoPricingPolicyUpdate,
|
|
1051
|
-
autoPricingPolicyDelete: exports.autoPricingPolicyDelete,
|
|
1052
|
-
ownerCreate: exports.ownerCreate,
|
|
1053
|
-
createRoomTypeManually: exports.createRoomTypeManually,
|
|
1054
|
-
transferRoomTypeReservation: exports.transferRoomTypeReservation,
|
|
1055
|
-
createRoomTypeProprietary: exports.createRoomTypeProprietary,
|
|
1056
|
-
associateToOTA: exports.associateToOTA,
|
|
1057
|
-
detachFromOTA: exports.detachFromOTA,
|
|
1058
|
-
deleteRoomTypeProprietary: exports.deleteRoomTypeProprietary,
|
|
1059
|
-
editRoomTypeManually: exports.editRoomTypeManually,
|
|
1060
|
-
editRoomTypeProprietary: exports.editRoomTypeProprietary,
|
|
1061
|
-
updateOTAReservation: exports.updateOTAReservation,
|
|
1062
|
-
getRoomType: exports.getRoomType,
|
|
1063
|
-
getRoomCalendar: exports.getRoomCalendar,
|
|
1064
|
-
getReservationsAndProprietariesByRoomTypeId: exports.getReservationsAndProprietariesByRoomTypeId,
|
|
1065
|
-
getRoomCalendarByTemporalToken: exports.getRoomCalendarByTemporalToken,
|
|
1066
|
-
importListing: exports.importListing,
|
|
1067
|
-
importListingReservations: exports.importListingReservations,
|
|
1068
|
-
importOperationType: exports.importOperationType,
|
|
1069
|
-
assignFailedReservations: exports.assignFailedReservations,
|
|
1070
|
-
reservationDetail: exports.reservationDetail,
|
|
1071
|
-
updateStayType: exports.updateStayType,
|
|
1072
|
-
showAirbnbCalendar: exports.showAirbnbCalendar,
|
|
1073
|
-
applyAirbnbCalendar: exports.applyAirbnbCalendar,
|
|
1074
|
-
getLatestOccupancyCalendar: exports.getLatestOccupancyCalendar,
|
|
1075
|
-
exportAchievement: exports.exportAchievement,
|
|
1076
|
-
exportReservationDetails: exports.exportReservationDetails,
|
|
1077
|
-
saveMinpakuAndMonthlySales: exports.saveMinpakuAndMonthlySales,
|
|
1078
|
-
findSalesByReservationId: exports.findSalesByReservationId,
|
|
1079
|
-
registerAdditionalSales: exports.registerAdditionalSales,
|
|
1080
|
-
registerInquiryReservationRelation: exports.registerInquiryReservationRelation,
|
|
1081
|
-
getInquiryReservationRelation: exports.getInquiryReservationRelation,
|
|
1082
|
-
generateTemporalToken: exports.generateTemporalToken,
|
|
1083
|
-
revokeTemporalToken: exports.revokeTemporalToken,
|
|
1084
|
-
};
|