@ahomevilla-hotel/node-sdk 1.0.10 → 1.0.12
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 +141 -20
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -135,6 +135,12 @@ export interface Branch {
|
|
|
135
135
|
* @memberof Branch
|
|
136
136
|
*/
|
|
137
137
|
'provinceId': string;
|
|
138
|
+
/**
|
|
139
|
+
* Province where this branch is located
|
|
140
|
+
* @type {Province}
|
|
141
|
+
* @memberof Branch
|
|
142
|
+
*/
|
|
143
|
+
'province'?: Province;
|
|
138
144
|
/**
|
|
139
145
|
* Branch\'s thumbnail image
|
|
140
146
|
* @type {Image}
|
|
@@ -196,6 +202,121 @@ export interface Branch {
|
|
|
196
202
|
*/
|
|
197
203
|
'rating': number;
|
|
198
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @export
|
|
208
|
+
* @interface BranchDetail
|
|
209
|
+
*/
|
|
210
|
+
export interface BranchDetail {
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* @type {string}
|
|
214
|
+
* @memberof BranchDetail
|
|
215
|
+
*/
|
|
216
|
+
'id': string;
|
|
217
|
+
/**
|
|
218
|
+
* Soft delete flag
|
|
219
|
+
* @type {boolean}
|
|
220
|
+
* @memberof BranchDetail
|
|
221
|
+
*/
|
|
222
|
+
'isDeleted': boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Soft delete timestamp
|
|
225
|
+
* @type {string}
|
|
226
|
+
* @memberof BranchDetail
|
|
227
|
+
*/
|
|
228
|
+
'deletedAt': string | null;
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @type {string}
|
|
232
|
+
* @memberof BranchDetail
|
|
233
|
+
*/
|
|
234
|
+
'createdAt': string;
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
* @type {string}
|
|
238
|
+
* @memberof BranchDetail
|
|
239
|
+
*/
|
|
240
|
+
'updatedAt': string;
|
|
241
|
+
/**
|
|
242
|
+
* ID of the province where this branch is located
|
|
243
|
+
* @type {string}
|
|
244
|
+
* @memberof BranchDetail
|
|
245
|
+
*/
|
|
246
|
+
'provinceId': string;
|
|
247
|
+
/**
|
|
248
|
+
* Province where this branch is located
|
|
249
|
+
* @type {Province}
|
|
250
|
+
* @memberof BranchDetail
|
|
251
|
+
*/
|
|
252
|
+
'province'?: Province;
|
|
253
|
+
/**
|
|
254
|
+
* Branch\'s thumbnail image
|
|
255
|
+
* @type {Image}
|
|
256
|
+
* @memberof BranchDetail
|
|
257
|
+
*/
|
|
258
|
+
'thumbnail': Image;
|
|
259
|
+
/**
|
|
260
|
+
* Branch\'s image gallery
|
|
261
|
+
* @type {Array<Image>}
|
|
262
|
+
* @memberof BranchDetail
|
|
263
|
+
*/
|
|
264
|
+
'images': Array<Image>;
|
|
265
|
+
/**
|
|
266
|
+
* Branch\'s name
|
|
267
|
+
* @type {string}
|
|
268
|
+
* @memberof BranchDetail
|
|
269
|
+
*/
|
|
270
|
+
'name': string;
|
|
271
|
+
/**
|
|
272
|
+
* Branch\'s slug
|
|
273
|
+
* @type {string}
|
|
274
|
+
* @memberof BranchDetail
|
|
275
|
+
*/
|
|
276
|
+
'slug': string;
|
|
277
|
+
/**
|
|
278
|
+
* Branch\'s description
|
|
279
|
+
* @type {string}
|
|
280
|
+
* @memberof BranchDetail
|
|
281
|
+
*/
|
|
282
|
+
'description': string;
|
|
283
|
+
/**
|
|
284
|
+
* Branch\'s contact phone number
|
|
285
|
+
* @type {string}
|
|
286
|
+
* @memberof BranchDetail
|
|
287
|
+
*/
|
|
288
|
+
'phone': string;
|
|
289
|
+
/**
|
|
290
|
+
* Branch\'s active status
|
|
291
|
+
* @type {boolean}
|
|
292
|
+
* @memberof BranchDetail
|
|
293
|
+
*/
|
|
294
|
+
'is_active': boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Branch\'s physical address
|
|
297
|
+
* @type {string}
|
|
298
|
+
* @memberof BranchDetail
|
|
299
|
+
*/
|
|
300
|
+
'address': string;
|
|
301
|
+
/**
|
|
302
|
+
* Branch\'s geographical location
|
|
303
|
+
* @type {object}
|
|
304
|
+
* @memberof BranchDetail
|
|
305
|
+
*/
|
|
306
|
+
'location': object;
|
|
307
|
+
/**
|
|
308
|
+
* Branch\'s rating
|
|
309
|
+
* @type {number}
|
|
310
|
+
* @memberof BranchDetail
|
|
311
|
+
*/
|
|
312
|
+
'rating': number;
|
|
313
|
+
/**
|
|
314
|
+
* List of rooms available in the branch
|
|
315
|
+
* @type {Array<HotelRoom>}
|
|
316
|
+
* @memberof BranchDetail
|
|
317
|
+
*/
|
|
318
|
+
'rooms': Array<HotelRoom>;
|
|
319
|
+
}
|
|
199
320
|
/**
|
|
200
321
|
*
|
|
201
322
|
* @export
|
|
@@ -818,7 +939,7 @@ export interface Province {
|
|
|
818
939
|
* @type {ProvinceCount}
|
|
819
940
|
* @memberof Province
|
|
820
941
|
*/
|
|
821
|
-
'_count'
|
|
942
|
+
'_count'?: ProvinceCount;
|
|
822
943
|
}
|
|
823
944
|
/**
|
|
824
945
|
* Count of branches in the province
|
|
@@ -3356,16 +3477,16 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
3356
3477
|
},
|
|
3357
3478
|
/**
|
|
3358
3479
|
*
|
|
3359
|
-
* @summary Get branch by ID
|
|
3360
|
-
* @param {string}
|
|
3480
|
+
* @summary Get branch by ID or slug
|
|
3481
|
+
* @param {string} idOrSlug
|
|
3361
3482
|
* @param {*} [options] Override http request option.
|
|
3362
3483
|
* @throws {RequiredError}
|
|
3363
3484
|
*/
|
|
3364
|
-
branchControllerFindOne: async (
|
|
3365
|
-
// verify required parameter '
|
|
3366
|
-
assertParamExists('branchControllerFindOne', '
|
|
3367
|
-
const localVarPath = `/api/branches/{
|
|
3368
|
-
.replace(`{${"
|
|
3485
|
+
branchControllerFindOne: async (idOrSlug: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3486
|
+
// verify required parameter 'idOrSlug' is not null or undefined
|
|
3487
|
+
assertParamExists('branchControllerFindOne', 'idOrSlug', idOrSlug)
|
|
3488
|
+
const localVarPath = `/api/branches/{idOrSlug}`
|
|
3489
|
+
.replace(`{${"idOrSlug"}}`, encodeURIComponent(String(idOrSlug)));
|
|
3369
3490
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3370
3491
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3371
3492
|
let baseOptions;
|
|
@@ -3565,13 +3686,13 @@ export const BranchesApiFp = function(configuration?: Configuration) {
|
|
|
3565
3686
|
},
|
|
3566
3687
|
/**
|
|
3567
3688
|
*
|
|
3568
|
-
* @summary Get branch by ID
|
|
3569
|
-
* @param {string}
|
|
3689
|
+
* @summary Get branch by ID or slug
|
|
3690
|
+
* @param {string} idOrSlug
|
|
3570
3691
|
* @param {*} [options] Override http request option.
|
|
3571
3692
|
* @throws {RequiredError}
|
|
3572
3693
|
*/
|
|
3573
|
-
async branchControllerFindOne(
|
|
3574
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerFindOne(
|
|
3694
|
+
async branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BranchDetail>> {
|
|
3695
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerFindOne(idOrSlug, options);
|
|
3575
3696
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3576
3697
|
const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerFindOne']?.[localVarOperationServerIndex]?.url;
|
|
3577
3698
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -3673,13 +3794,13 @@ export const BranchesApiFactory = function (configuration?: Configuration, baseP
|
|
|
3673
3794
|
},
|
|
3674
3795
|
/**
|
|
3675
3796
|
*
|
|
3676
|
-
* @summary Get branch by ID
|
|
3677
|
-
* @param {string}
|
|
3797
|
+
* @summary Get branch by ID or slug
|
|
3798
|
+
* @param {string} idOrSlug
|
|
3678
3799
|
* @param {*} [options] Override http request option.
|
|
3679
3800
|
* @throws {RequiredError}
|
|
3680
3801
|
*/
|
|
3681
|
-
branchControllerFindOne(
|
|
3682
|
-
return localVarFp.branchControllerFindOne(
|
|
3802
|
+
branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig): AxiosPromise<BranchDetail> {
|
|
3803
|
+
return localVarFp.branchControllerFindOne(idOrSlug, options).then((request) => request(axios, basePath));
|
|
3683
3804
|
},
|
|
3684
3805
|
/**
|
|
3685
3806
|
*
|
|
@@ -3777,14 +3898,14 @@ export class BranchesApi extends BaseAPI {
|
|
|
3777
3898
|
|
|
3778
3899
|
/**
|
|
3779
3900
|
*
|
|
3780
|
-
* @summary Get branch by ID
|
|
3781
|
-
* @param {string}
|
|
3901
|
+
* @summary Get branch by ID or slug
|
|
3902
|
+
* @param {string} idOrSlug
|
|
3782
3903
|
* @param {*} [options] Override http request option.
|
|
3783
3904
|
* @throws {RequiredError}
|
|
3784
3905
|
* @memberof BranchesApi
|
|
3785
3906
|
*/
|
|
3786
|
-
public branchControllerFindOne(
|
|
3787
|
-
return BranchesApiFp(this.configuration).branchControllerFindOne(
|
|
3907
|
+
public branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig) {
|
|
3908
|
+
return BranchesApiFp(this.configuration).branchControllerFindOne(idOrSlug, options).then((request) => request(this.axios, this.basePath));
|
|
3788
3909
|
}
|
|
3789
3910
|
|
|
3790
3911
|
/**
|