@ahomevilla-hotel/node-sdk 1.0.9 → 1.0.11
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/api.ts +164 -19
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -129,6 +129,12 @@ export interface Branch {
|
|
|
129
129
|
* @memberof Branch
|
|
130
130
|
*/
|
|
131
131
|
'updatedAt': string;
|
|
132
|
+
/**
|
|
133
|
+
* ID of the province where this branch is located
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof Branch
|
|
136
|
+
*/
|
|
137
|
+
'provinceId': string;
|
|
132
138
|
/**
|
|
133
139
|
* Branch\'s thumbnail image
|
|
134
140
|
* @type {Image}
|
|
@@ -147,6 +153,12 @@ export interface Branch {
|
|
|
147
153
|
* @memberof Branch
|
|
148
154
|
*/
|
|
149
155
|
'name': string;
|
|
156
|
+
/**
|
|
157
|
+
* Branch\'s slug
|
|
158
|
+
* @type {string}
|
|
159
|
+
* @memberof Branch
|
|
160
|
+
*/
|
|
161
|
+
'slug': string;
|
|
150
162
|
/**
|
|
151
163
|
* Branch\'s description
|
|
152
164
|
* @type {string}
|
|
@@ -184,6 +196,115 @@ export interface Branch {
|
|
|
184
196
|
*/
|
|
185
197
|
'rating': number;
|
|
186
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
*
|
|
201
|
+
* @export
|
|
202
|
+
* @interface BranchDetail
|
|
203
|
+
*/
|
|
204
|
+
export interface BranchDetail {
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @type {string}
|
|
208
|
+
* @memberof BranchDetail
|
|
209
|
+
*/
|
|
210
|
+
'id': string;
|
|
211
|
+
/**
|
|
212
|
+
* Soft delete flag
|
|
213
|
+
* @type {boolean}
|
|
214
|
+
* @memberof BranchDetail
|
|
215
|
+
*/
|
|
216
|
+
'isDeleted': boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Soft delete timestamp
|
|
219
|
+
* @type {string}
|
|
220
|
+
* @memberof BranchDetail
|
|
221
|
+
*/
|
|
222
|
+
'deletedAt': string | null;
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* @type {string}
|
|
226
|
+
* @memberof BranchDetail
|
|
227
|
+
*/
|
|
228
|
+
'createdAt': string;
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @type {string}
|
|
232
|
+
* @memberof BranchDetail
|
|
233
|
+
*/
|
|
234
|
+
'updatedAt': string;
|
|
235
|
+
/**
|
|
236
|
+
* ID of the province where this branch is located
|
|
237
|
+
* @type {string}
|
|
238
|
+
* @memberof BranchDetail
|
|
239
|
+
*/
|
|
240
|
+
'provinceId': string;
|
|
241
|
+
/**
|
|
242
|
+
* Branch\'s thumbnail image
|
|
243
|
+
* @type {Image}
|
|
244
|
+
* @memberof BranchDetail
|
|
245
|
+
*/
|
|
246
|
+
'thumbnail': Image;
|
|
247
|
+
/**
|
|
248
|
+
* Branch\'s image gallery
|
|
249
|
+
* @type {Array<Image>}
|
|
250
|
+
* @memberof BranchDetail
|
|
251
|
+
*/
|
|
252
|
+
'images': Array<Image>;
|
|
253
|
+
/**
|
|
254
|
+
* Branch\'s name
|
|
255
|
+
* @type {string}
|
|
256
|
+
* @memberof BranchDetail
|
|
257
|
+
*/
|
|
258
|
+
'name': string;
|
|
259
|
+
/**
|
|
260
|
+
* Branch\'s slug
|
|
261
|
+
* @type {string}
|
|
262
|
+
* @memberof BranchDetail
|
|
263
|
+
*/
|
|
264
|
+
'slug': string;
|
|
265
|
+
/**
|
|
266
|
+
* Branch\'s description
|
|
267
|
+
* @type {string}
|
|
268
|
+
* @memberof BranchDetail
|
|
269
|
+
*/
|
|
270
|
+
'description': string;
|
|
271
|
+
/**
|
|
272
|
+
* Branch\'s contact phone number
|
|
273
|
+
* @type {string}
|
|
274
|
+
* @memberof BranchDetail
|
|
275
|
+
*/
|
|
276
|
+
'phone': string;
|
|
277
|
+
/**
|
|
278
|
+
* Branch\'s active status
|
|
279
|
+
* @type {boolean}
|
|
280
|
+
* @memberof BranchDetail
|
|
281
|
+
*/
|
|
282
|
+
'is_active': boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Branch\'s physical address
|
|
285
|
+
* @type {string}
|
|
286
|
+
* @memberof BranchDetail
|
|
287
|
+
*/
|
|
288
|
+
'address': string;
|
|
289
|
+
/**
|
|
290
|
+
* Branch\'s geographical location
|
|
291
|
+
* @type {object}
|
|
292
|
+
* @memberof BranchDetail
|
|
293
|
+
*/
|
|
294
|
+
'location': object;
|
|
295
|
+
/**
|
|
296
|
+
* Branch\'s rating
|
|
297
|
+
* @type {number}
|
|
298
|
+
* @memberof BranchDetail
|
|
299
|
+
*/
|
|
300
|
+
'rating': number;
|
|
301
|
+
/**
|
|
302
|
+
* List of rooms available in the branch
|
|
303
|
+
* @type {Array<HotelRoom>}
|
|
304
|
+
* @memberof BranchDetail
|
|
305
|
+
*/
|
|
306
|
+
'rooms': Array<HotelRoom>;
|
|
307
|
+
}
|
|
187
308
|
/**
|
|
188
309
|
*
|
|
189
310
|
* @export
|
|
@@ -252,6 +373,12 @@ export interface CreateBranchDto {
|
|
|
252
373
|
* @memberof CreateBranchDto
|
|
253
374
|
*/
|
|
254
375
|
'name': string;
|
|
376
|
+
/**
|
|
377
|
+
* The branch\'s slug.
|
|
378
|
+
* @type {string}
|
|
379
|
+
* @memberof CreateBranchDto
|
|
380
|
+
*/
|
|
381
|
+
'slug': string;
|
|
255
382
|
/**
|
|
256
383
|
* The branch\'s description.
|
|
257
384
|
* @type {string}
|
|
@@ -447,6 +574,12 @@ export interface FilterBranchesDto {
|
|
|
447
574
|
* @memberof FilterBranchesDto
|
|
448
575
|
*/
|
|
449
576
|
'provinceId'?: string;
|
|
577
|
+
/**
|
|
578
|
+
* Filter by province slug
|
|
579
|
+
* @type {string}
|
|
580
|
+
* @memberof FilterBranchesDto
|
|
581
|
+
*/
|
|
582
|
+
'provinceSlug'?: string;
|
|
450
583
|
/**
|
|
451
584
|
*
|
|
452
585
|
* @type {Array<string>}
|
|
@@ -1314,6 +1447,12 @@ export interface UpdateBranchDto {
|
|
|
1314
1447
|
* @memberof UpdateBranchDto
|
|
1315
1448
|
*/
|
|
1316
1449
|
'name'?: string;
|
|
1450
|
+
/**
|
|
1451
|
+
* The branch\'s slug.
|
|
1452
|
+
* @type {string}
|
|
1453
|
+
* @memberof UpdateBranchDto
|
|
1454
|
+
*/
|
|
1455
|
+
'slug'?: string;
|
|
1317
1456
|
/**
|
|
1318
1457
|
* The branch\'s description.
|
|
1319
1458
|
* @type {string}
|
|
@@ -1350,6 +1489,12 @@ export interface UpdateBranchDto {
|
|
|
1350
1489
|
* @memberof UpdateBranchDto
|
|
1351
1490
|
*/
|
|
1352
1491
|
'rating'?: number;
|
|
1492
|
+
/**
|
|
1493
|
+
* Amenities available in the branch
|
|
1494
|
+
* @type {Array<Amenity>}
|
|
1495
|
+
* @memberof UpdateBranchDto
|
|
1496
|
+
*/
|
|
1497
|
+
'amenities': Array<Amenity>;
|
|
1353
1498
|
}
|
|
1354
1499
|
/**
|
|
1355
1500
|
*
|
|
@@ -3320,16 +3465,16 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
3320
3465
|
},
|
|
3321
3466
|
/**
|
|
3322
3467
|
*
|
|
3323
|
-
* @summary Get branch by ID
|
|
3324
|
-
* @param {string}
|
|
3468
|
+
* @summary Get branch by ID or slug
|
|
3469
|
+
* @param {string} idOrSlug
|
|
3325
3470
|
* @param {*} [options] Override http request option.
|
|
3326
3471
|
* @throws {RequiredError}
|
|
3327
3472
|
*/
|
|
3328
|
-
branchControllerFindOne: async (
|
|
3329
|
-
// verify required parameter '
|
|
3330
|
-
assertParamExists('branchControllerFindOne', '
|
|
3331
|
-
const localVarPath = `/api/branches/{
|
|
3332
|
-
.replace(`{${"
|
|
3473
|
+
branchControllerFindOne: async (idOrSlug: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3474
|
+
// verify required parameter 'idOrSlug' is not null or undefined
|
|
3475
|
+
assertParamExists('branchControllerFindOne', 'idOrSlug', idOrSlug)
|
|
3476
|
+
const localVarPath = `/api/branches/{idOrSlug}`
|
|
3477
|
+
.replace(`{${"idOrSlug"}}`, encodeURIComponent(String(idOrSlug)));
|
|
3333
3478
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3334
3479
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3335
3480
|
let baseOptions;
|
|
@@ -3529,13 +3674,13 @@ export const BranchesApiFp = function(configuration?: Configuration) {
|
|
|
3529
3674
|
},
|
|
3530
3675
|
/**
|
|
3531
3676
|
*
|
|
3532
|
-
* @summary Get branch by ID
|
|
3533
|
-
* @param {string}
|
|
3677
|
+
* @summary Get branch by ID or slug
|
|
3678
|
+
* @param {string} idOrSlug
|
|
3534
3679
|
* @param {*} [options] Override http request option.
|
|
3535
3680
|
* @throws {RequiredError}
|
|
3536
3681
|
*/
|
|
3537
|
-
async branchControllerFindOne(
|
|
3538
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerFindOne(
|
|
3682
|
+
async branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BranchDetail>> {
|
|
3683
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerFindOne(idOrSlug, options);
|
|
3539
3684
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3540
3685
|
const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerFindOne']?.[localVarOperationServerIndex]?.url;
|
|
3541
3686
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -3637,13 +3782,13 @@ export const BranchesApiFactory = function (configuration?: Configuration, baseP
|
|
|
3637
3782
|
},
|
|
3638
3783
|
/**
|
|
3639
3784
|
*
|
|
3640
|
-
* @summary Get branch by ID
|
|
3641
|
-
* @param {string}
|
|
3785
|
+
* @summary Get branch by ID or slug
|
|
3786
|
+
* @param {string} idOrSlug
|
|
3642
3787
|
* @param {*} [options] Override http request option.
|
|
3643
3788
|
* @throws {RequiredError}
|
|
3644
3789
|
*/
|
|
3645
|
-
branchControllerFindOne(
|
|
3646
|
-
return localVarFp.branchControllerFindOne(
|
|
3790
|
+
branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig): AxiosPromise<BranchDetail> {
|
|
3791
|
+
return localVarFp.branchControllerFindOne(idOrSlug, options).then((request) => request(axios, basePath));
|
|
3647
3792
|
},
|
|
3648
3793
|
/**
|
|
3649
3794
|
*
|
|
@@ -3741,14 +3886,14 @@ export class BranchesApi extends BaseAPI {
|
|
|
3741
3886
|
|
|
3742
3887
|
/**
|
|
3743
3888
|
*
|
|
3744
|
-
* @summary Get branch by ID
|
|
3745
|
-
* @param {string}
|
|
3889
|
+
* @summary Get branch by ID or slug
|
|
3890
|
+
* @param {string} idOrSlug
|
|
3746
3891
|
* @param {*} [options] Override http request option.
|
|
3747
3892
|
* @throws {RequiredError}
|
|
3748
3893
|
* @memberof BranchesApi
|
|
3749
3894
|
*/
|
|
3750
|
-
public branchControllerFindOne(
|
|
3751
|
-
return BranchesApiFp(this.configuration).branchControllerFindOne(
|
|
3895
|
+
public branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig) {
|
|
3896
|
+
return BranchesApiFp(this.configuration).branchControllerFindOne(idOrSlug, options).then((request) => request(this.axios, this.basePath));
|
|
3752
3897
|
}
|
|
3753
3898
|
|
|
3754
3899
|
/**
|