endpoints-sdk-cli 2.1.3 → 2.3.1

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