@ahomevilla-hotel/node-sdk 1.0.8 → 1.0.10

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.
Files changed (2) hide show
  1. package/api.ts +429 -36
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -35,6 +35,18 @@ export interface Amenity {
35
35
  * @memberof Amenity
36
36
  */
37
37
  'id': string;
38
+ /**
39
+ * Soft delete flag
40
+ * @type {boolean}
41
+ * @memberof Amenity
42
+ */
43
+ 'isDeleted': boolean;
44
+ /**
45
+ * Soft delete timestamp
46
+ * @type {string}
47
+ * @memberof Amenity
48
+ */
49
+ 'deletedAt': string | null;
38
50
  /**
39
51
  *
40
52
  * @type {string}
@@ -93,6 +105,18 @@ export interface Branch {
93
105
  * @memberof Branch
94
106
  */
95
107
  'id': string;
108
+ /**
109
+ * Soft delete flag
110
+ * @type {boolean}
111
+ * @memberof Branch
112
+ */
113
+ 'isDeleted': boolean;
114
+ /**
115
+ * Soft delete timestamp
116
+ * @type {string}
117
+ * @memberof Branch
118
+ */
119
+ 'deletedAt': string | null;
96
120
  /**
97
121
  *
98
122
  * @type {string}
@@ -105,6 +129,12 @@ export interface Branch {
105
129
  * @memberof Branch
106
130
  */
107
131
  'updatedAt': string;
132
+ /**
133
+ * ID of the province where this branch is located
134
+ * @type {string}
135
+ * @memberof Branch
136
+ */
137
+ 'provinceId': string;
108
138
  /**
109
139
  * Branch\'s thumbnail image
110
140
  * @type {Image}
@@ -123,6 +153,12 @@ export interface Branch {
123
153
  * @memberof Branch
124
154
  */
125
155
  'name': string;
156
+ /**
157
+ * Branch\'s slug
158
+ * @type {string}
159
+ * @memberof Branch
160
+ */
161
+ 'slug': string;
126
162
  /**
127
163
  * Branch\'s description
128
164
  * @type {string}
@@ -160,6 +196,25 @@ export interface Branch {
160
196
  */
161
197
  'rating': number;
162
198
  }
199
+ /**
200
+ *
201
+ * @export
202
+ * @interface BranchesInfinitePaginationResultDto
203
+ */
204
+ export interface BranchesInfinitePaginationResultDto {
205
+ /**
206
+ *
207
+ * @type {Array<Branch>}
208
+ * @memberof BranchesInfinitePaginationResultDto
209
+ */
210
+ 'data': Array<Branch>;
211
+ /**
212
+ *
213
+ * @type {boolean}
214
+ * @memberof BranchesInfinitePaginationResultDto
215
+ */
216
+ 'hasNextPage': boolean;
217
+ }
163
218
  /**
164
219
  *
165
220
  * @export
@@ -209,6 +264,12 @@ export interface CreateBranchDto {
209
264
  * @memberof CreateBranchDto
210
265
  */
211
266
  'name': string;
267
+ /**
268
+ * The branch\'s slug.
269
+ * @type {string}
270
+ * @memberof CreateBranchDto
271
+ */
272
+ 'slug': string;
212
273
  /**
213
274
  * The branch\'s description.
214
275
  * @type {string}
@@ -404,6 +465,12 @@ export interface FilterBranchesDto {
404
465
  * @memberof FilterBranchesDto
405
466
  */
406
467
  'provinceId'?: string;
468
+ /**
469
+ * Filter by province slug
470
+ * @type {string}
471
+ * @memberof FilterBranchesDto
472
+ */
473
+ 'provinceSlug'?: string;
407
474
  /**
408
475
  *
409
476
  * @type {Array<string>}
@@ -458,6 +525,18 @@ export interface HotelRoom {
458
525
  * @memberof HotelRoom
459
526
  */
460
527
  'id': string;
528
+ /**
529
+ * Soft delete flag
530
+ * @type {boolean}
531
+ * @memberof HotelRoom
532
+ */
533
+ 'isDeleted': boolean;
534
+ /**
535
+ * Soft delete timestamp
536
+ * @type {string}
537
+ * @memberof HotelRoom
538
+ */
539
+ 'deletedAt': string | null;
461
540
  /**
462
541
  *
463
542
  * @type {string}
@@ -692,6 +771,18 @@ export interface Province {
692
771
  * @memberof Province
693
772
  */
694
773
  'id': string;
774
+ /**
775
+ * Soft delete flag
776
+ * @type {boolean}
777
+ * @memberof Province
778
+ */
779
+ 'isDeleted': boolean;
780
+ /**
781
+ * Soft delete timestamp
782
+ * @type {string}
783
+ * @memberof Province
784
+ */
785
+ 'deletedAt': string | null;
695
786
  /**
696
787
  *
697
788
  * @type {string}
@@ -1008,6 +1099,18 @@ export interface RoomDetail {
1008
1099
  * @memberof RoomDetail
1009
1100
  */
1010
1101
  'id': string;
1102
+ /**
1103
+ * Soft delete flag
1104
+ * @type {boolean}
1105
+ * @memberof RoomDetail
1106
+ */
1107
+ 'isDeleted': boolean;
1108
+ /**
1109
+ * Soft delete timestamp
1110
+ * @type {string}
1111
+ * @memberof RoomDetail
1112
+ */
1113
+ 'deletedAt': string | null;
1011
1114
  /**
1012
1115
  *
1013
1116
  * @type {string}
@@ -1235,6 +1338,12 @@ export interface UpdateBranchDto {
1235
1338
  * @memberof UpdateBranchDto
1236
1339
  */
1237
1340
  'name'?: string;
1341
+ /**
1342
+ * The branch\'s slug.
1343
+ * @type {string}
1344
+ * @memberof UpdateBranchDto
1345
+ */
1346
+ 'slug'?: string;
1238
1347
  /**
1239
1348
  * The branch\'s description.
1240
1349
  * @type {string}
@@ -1271,6 +1380,12 @@ export interface UpdateBranchDto {
1271
1380
  * @memberof UpdateBranchDto
1272
1381
  */
1273
1382
  'rating'?: number;
1383
+ /**
1384
+ * Amenities available in the branch
1385
+ * @type {Array<Amenity>}
1386
+ * @memberof UpdateBranchDto
1387
+ */
1388
+ 'amenities': Array<Amenity>;
1274
1389
  }
1275
1390
  /**
1276
1391
  *
@@ -1381,6 +1496,18 @@ export interface User {
1381
1496
  * @memberof User
1382
1497
  */
1383
1498
  'id': string;
1499
+ /**
1500
+ * Soft delete flag
1501
+ * @type {boolean}
1502
+ * @memberof User
1503
+ */
1504
+ 'isDeleted': boolean;
1505
+ /**
1506
+ * Soft delete timestamp
1507
+ * @type {string}
1508
+ * @memberof User
1509
+ */
1510
+ 'deletedAt': string | null;
1384
1511
  /**
1385
1512
  *
1386
1513
  * @type {string}
@@ -1693,12 +1820,12 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
1693
1820
  *
1694
1821
  * @param {number} [page]
1695
1822
  * @param {number} [pageSize]
1696
- * @param {string} [filters] JSON string
1697
- * @param {string} [sort] JSON string
1823
+ * @param {object} [filters]
1824
+ * @param {Array<string>} [sort]
1698
1825
  * @param {*} [options] Override http request option.
1699
1826
  * @throws {RequiredError}
1700
1827
  */
1701
- amenitiesControllerFindAll: async (page?: number, pageSize?: number, filters?: string, sort?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1828
+ amenitiesControllerFindAll: async (page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1702
1829
  const localVarPath = `/api/amenities`;
1703
1830
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1704
1831
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1720,10 +1847,12 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
1720
1847
  }
1721
1848
 
1722
1849
  if (filters !== undefined) {
1723
- localVarQueryParameter['filters'] = filters;
1850
+ for (const [key, value] of Object.entries(filters)) {
1851
+ localVarQueryParameter[key] = value;
1852
+ }
1724
1853
  }
1725
1854
 
1726
- if (sort !== undefined) {
1855
+ if (sort) {
1727
1856
  localVarQueryParameter['sort'] = sort;
1728
1857
  }
1729
1858
 
@@ -1885,12 +2014,12 @@ export const AmenitiesApiFp = function(configuration?: Configuration) {
1885
2014
  *
1886
2015
  * @param {number} [page]
1887
2016
  * @param {number} [pageSize]
1888
- * @param {string} [filters] JSON string
1889
- * @param {string} [sort] JSON string
2017
+ * @param {object} [filters]
2018
+ * @param {Array<string>} [sort]
1890
2019
  * @param {*} [options] Override http request option.
1891
2020
  * @throws {RequiredError}
1892
2021
  */
1893
- async amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2022
+ async amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1894
2023
  const localVarAxiosArgs = await localVarAxiosParamCreator.amenitiesControllerFindAll(page, pageSize, filters, sort, options);
1895
2024
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1896
2025
  const localVarOperationServerBasePath = operationServerMap['AmenitiesApi.amenitiesControllerFindAll']?.[localVarOperationServerIndex]?.url;
@@ -1961,12 +2090,12 @@ export const AmenitiesApiFactory = function (configuration?: Configuration, base
1961
2090
  *
1962
2091
  * @param {number} [page]
1963
2092
  * @param {number} [pageSize]
1964
- * @param {string} [filters] JSON string
1965
- * @param {string} [sort] JSON string
2093
+ * @param {object} [filters]
2094
+ * @param {Array<string>} [sort]
1966
2095
  * @param {*} [options] Override http request option.
1967
2096
  * @throws {RequiredError}
1968
2097
  */
1969
- amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2098
+ amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1970
2099
  return localVarFp.amenitiesControllerFindAll(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
1971
2100
  },
1972
2101
  /**
@@ -2027,13 +2156,13 @@ export class AmenitiesApi extends BaseAPI {
2027
2156
  *
2028
2157
  * @param {number} [page]
2029
2158
  * @param {number} [pageSize]
2030
- * @param {string} [filters] JSON string
2031
- * @param {string} [sort] JSON string
2159
+ * @param {object} [filters]
2160
+ * @param {Array<string>} [sort]
2032
2161
  * @param {*} [options] Override http request option.
2033
2162
  * @throws {RequiredError}
2034
2163
  * @memberof AmenitiesApi
2035
2164
  */
2036
- public amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig) {
2165
+ public amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig) {
2037
2166
  return AmenitiesApiFp(this.configuration).amenitiesControllerFindAll(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
2038
2167
  }
2039
2168
 
@@ -3069,7 +3198,7 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3069
3198
  branchControllerCreate: async (createBranchDto: CreateBranchDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3070
3199
  // verify required parameter 'createBranchDto' is not null or undefined
3071
3200
  assertParamExists('branchControllerCreate', 'createBranchDto', createBranchDto)
3072
- const localVarPath = `/api/branch`;
3201
+ const localVarPath = `/api/branches`;
3073
3202
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3074
3203
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3075
3204
  let baseOptions;
@@ -3095,6 +3224,36 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3095
3224
  options: localVarRequestOptions,
3096
3225
  };
3097
3226
  },
3227
+ /**
3228
+ *
3229
+ * @summary Get all soft-deleted branches
3230
+ * @param {*} [options] Override http request option.
3231
+ * @throws {RequiredError}
3232
+ */
3233
+ branchControllerFindDeleted: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3234
+ const localVarPath = `/api/branches/deleted`;
3235
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3236
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3237
+ let baseOptions;
3238
+ if (configuration) {
3239
+ baseOptions = configuration.baseOptions;
3240
+ }
3241
+
3242
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3243
+ const localVarHeaderParameter = {} as any;
3244
+ const localVarQueryParameter = {} as any;
3245
+
3246
+
3247
+
3248
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3249
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3250
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3251
+
3252
+ return {
3253
+ url: toPathString(localVarUrlObj),
3254
+ options: localVarRequestOptions,
3255
+ };
3256
+ },
3098
3257
  /**
3099
3258
  *
3100
3259
  * @summary Get all branches with pagination and filters
@@ -3106,7 +3265,7 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3106
3265
  * @throws {RequiredError}
3107
3266
  */
3108
3267
  branchControllerFindMany: async (page?: number, pageSize?: number, filters?: string, sort?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3109
- const localVarPath = `/api/branch`;
3268
+ const localVarPath = `/api/branches`;
3110
3269
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3111
3270
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3112
3271
  let baseOptions;
@@ -3156,7 +3315,7 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3156
3315
  * @throws {RequiredError}
3157
3316
  */
3158
3317
  branchControllerFindManyInfinite: async (page?: number, pageSize?: number, filters?: string, sort?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3159
- const localVarPath = `/api/branch/infinite`;
3318
+ const localVarPath = `/api/branches/infinite`;
3160
3319
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3161
3320
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3162
3321
  let baseOptions;
@@ -3205,7 +3364,7 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3205
3364
  branchControllerFindOne: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3206
3365
  // verify required parameter 'id' is not null or undefined
3207
3366
  assertParamExists('branchControllerFindOne', 'id', id)
3208
- const localVarPath = `/api/branch/{id}`
3367
+ const localVarPath = `/api/branches/{id}`
3209
3368
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3210
3369
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3211
3370
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3239,7 +3398,7 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3239
3398
  branchControllerRemove: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3240
3399
  // verify required parameter 'id' is not null or undefined
3241
3400
  assertParamExists('branchControllerRemove', 'id', id)
3242
- const localVarPath = `/api/branch/{id}`
3401
+ const localVarPath = `/api/branches/{id}`
3243
3402
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3244
3403
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3245
3404
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3254,6 +3413,40 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3254
3413
 
3255
3414
 
3256
3415
 
3416
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3417
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3418
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3419
+
3420
+ return {
3421
+ url: toPathString(localVarUrlObj),
3422
+ options: localVarRequestOptions,
3423
+ };
3424
+ },
3425
+ /**
3426
+ *
3427
+ * @summary Restore a soft-deleted branch
3428
+ * @param {string} id
3429
+ * @param {*} [options] Override http request option.
3430
+ * @throws {RequiredError}
3431
+ */
3432
+ branchControllerRestore: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3433
+ // verify required parameter 'id' is not null or undefined
3434
+ assertParamExists('branchControllerRestore', 'id', id)
3435
+ const localVarPath = `/api/branches/{id}/restore`
3436
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3437
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3438
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3439
+ let baseOptions;
3440
+ if (configuration) {
3441
+ baseOptions = configuration.baseOptions;
3442
+ }
3443
+
3444
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
3445
+ const localVarHeaderParameter = {} as any;
3446
+ const localVarQueryParameter = {} as any;
3447
+
3448
+
3449
+
3257
3450
  setSearchParams(localVarUrlObj, localVarQueryParameter);
3258
3451
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3259
3452
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -3276,7 +3469,7 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3276
3469
  assertParamExists('branchControllerUpdate', 'id', id)
3277
3470
  // verify required parameter 'updateBranchDto' is not null or undefined
3278
3471
  assertParamExists('branchControllerUpdate', 'updateBranchDto', updateBranchDto)
3279
- const localVarPath = `/api/branch/{id}`
3472
+ const localVarPath = `/api/branches/{id}`
3280
3473
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3281
3474
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3282
3475
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3326,6 +3519,18 @@ export const BranchesApiFp = function(configuration?: Configuration) {
3326
3519
  const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerCreate']?.[localVarOperationServerIndex]?.url;
3327
3520
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3328
3521
  },
3522
+ /**
3523
+ *
3524
+ * @summary Get all soft-deleted branches
3525
+ * @param {*} [options] Override http request option.
3526
+ * @throws {RequiredError}
3527
+ */
3528
+ async branchControllerFindDeleted(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Branch>>> {
3529
+ const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerFindDeleted(options);
3530
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3531
+ const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerFindDeleted']?.[localVarOperationServerIndex]?.url;
3532
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3533
+ },
3329
3534
  /**
3330
3535
  *
3331
3536
  * @summary Get all branches with pagination and filters
@@ -3352,7 +3557,7 @@ export const BranchesApiFp = function(configuration?: Configuration) {
3352
3557
  * @param {*} [options] Override http request option.
3353
3558
  * @throws {RequiredError}
3354
3559
  */
3355
- async branchControllerFindManyInfinite(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Branch>>> {
3560
+ async branchControllerFindManyInfinite(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BranchesInfinitePaginationResultDto>> {
3356
3561
  const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerFindManyInfinite(page, pageSize, filters, sort, options);
3357
3562
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3358
3563
  const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerFindManyInfinite']?.[localVarOperationServerIndex]?.url;
@@ -3384,6 +3589,19 @@ export const BranchesApiFp = function(configuration?: Configuration) {
3384
3589
  const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerRemove']?.[localVarOperationServerIndex]?.url;
3385
3590
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3386
3591
  },
3592
+ /**
3593
+ *
3594
+ * @summary Restore a soft-deleted branch
3595
+ * @param {string} id
3596
+ * @param {*} [options] Override http request option.
3597
+ * @throws {RequiredError}
3598
+ */
3599
+ async branchControllerRestore(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
3600
+ const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerRestore(id, options);
3601
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3602
+ const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerRestore']?.[localVarOperationServerIndex]?.url;
3603
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3604
+ },
3387
3605
  /**
3388
3606
  *
3389
3607
  * @summary Update a branch
@@ -3418,6 +3636,15 @@ export const BranchesApiFactory = function (configuration?: Configuration, baseP
3418
3636
  branchControllerCreate(createBranchDto: CreateBranchDto, options?: RawAxiosRequestConfig): AxiosPromise<Branch> {
3419
3637
  return localVarFp.branchControllerCreate(createBranchDto, options).then((request) => request(axios, basePath));
3420
3638
  },
3639
+ /**
3640
+ *
3641
+ * @summary Get all soft-deleted branches
3642
+ * @param {*} [options] Override http request option.
3643
+ * @throws {RequiredError}
3644
+ */
3645
+ branchControllerFindDeleted(options?: RawAxiosRequestConfig): AxiosPromise<Array<Branch>> {
3646
+ return localVarFp.branchControllerFindDeleted(options).then((request) => request(axios, basePath));
3647
+ },
3421
3648
  /**
3422
3649
  *
3423
3650
  * @summary Get all branches with pagination and filters
@@ -3441,7 +3668,7 @@ export const BranchesApiFactory = function (configuration?: Configuration, baseP
3441
3668
  * @param {*} [options] Override http request option.
3442
3669
  * @throws {RequiredError}
3443
3670
  */
3444
- branchControllerFindManyInfinite(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Branch>> {
3671
+ branchControllerFindManyInfinite(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<BranchesInfinitePaginationResultDto> {
3445
3672
  return localVarFp.branchControllerFindManyInfinite(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
3446
3673
  },
3447
3674
  /**
@@ -3464,6 +3691,16 @@ export const BranchesApiFactory = function (configuration?: Configuration, baseP
3464
3691
  branchControllerRemove(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3465
3692
  return localVarFp.branchControllerRemove(id, options).then((request) => request(axios, basePath));
3466
3693
  },
3694
+ /**
3695
+ *
3696
+ * @summary Restore a soft-deleted branch
3697
+ * @param {string} id
3698
+ * @param {*} [options] Override http request option.
3699
+ * @throws {RequiredError}
3700
+ */
3701
+ branchControllerRestore(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3702
+ return localVarFp.branchControllerRestore(id, options).then((request) => request(axios, basePath));
3703
+ },
3467
3704
  /**
3468
3705
  *
3469
3706
  * @summary Update a branch
@@ -3497,6 +3734,17 @@ export class BranchesApi extends BaseAPI {
3497
3734
  return BranchesApiFp(this.configuration).branchControllerCreate(createBranchDto, options).then((request) => request(this.axios, this.basePath));
3498
3735
  }
3499
3736
 
3737
+ /**
3738
+ *
3739
+ * @summary Get all soft-deleted branches
3740
+ * @param {*} [options] Override http request option.
3741
+ * @throws {RequiredError}
3742
+ * @memberof BranchesApi
3743
+ */
3744
+ public branchControllerFindDeleted(options?: RawAxiosRequestConfig) {
3745
+ return BranchesApiFp(this.configuration).branchControllerFindDeleted(options).then((request) => request(this.axios, this.basePath));
3746
+ }
3747
+
3500
3748
  /**
3501
3749
  *
3502
3750
  * @summary Get all branches with pagination and filters
@@ -3551,6 +3799,18 @@ export class BranchesApi extends BaseAPI {
3551
3799
  return BranchesApiFp(this.configuration).branchControllerRemove(id, options).then((request) => request(this.axios, this.basePath));
3552
3800
  }
3553
3801
 
3802
+ /**
3803
+ *
3804
+ * @summary Restore a soft-deleted branch
3805
+ * @param {string} id
3806
+ * @param {*} [options] Override http request option.
3807
+ * @throws {RequiredError}
3808
+ * @memberof BranchesApi
3809
+ */
3810
+ public branchControllerRestore(id: string, options?: RawAxiosRequestConfig) {
3811
+ return BranchesApiFp(this.configuration).branchControllerRestore(id, options).then((request) => request(this.axios, this.basePath));
3812
+ }
3813
+
3554
3814
  /**
3555
3815
  *
3556
3816
  * @summary Update a branch
@@ -3885,6 +4145,36 @@ export const ProvincesApiAxiosParamCreator = function (configuration?: Configura
3885
4145
  options: localVarRequestOptions,
3886
4146
  };
3887
4147
  },
4148
+ /**
4149
+ *
4150
+ * @summary Get all soft-deleted provinces
4151
+ * @param {*} [options] Override http request option.
4152
+ * @throws {RequiredError}
4153
+ */
4154
+ provincesControllerFindDeleted: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4155
+ const localVarPath = `/api/provinces/deleted`;
4156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4158
+ let baseOptions;
4159
+ if (configuration) {
4160
+ baseOptions = configuration.baseOptions;
4161
+ }
4162
+
4163
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
4164
+ const localVarHeaderParameter = {} as any;
4165
+ const localVarQueryParameter = {} as any;
4166
+
4167
+
4168
+
4169
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4171
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4172
+
4173
+ return {
4174
+ url: toPathString(localVarUrlObj),
4175
+ options: localVarRequestOptions,
4176
+ };
4177
+ },
3888
4178
  /**
3889
4179
  *
3890
4180
  * @summary Get all provinces with pagination and filters
@@ -3994,6 +4284,40 @@ export const ProvincesApiAxiosParamCreator = function (configuration?: Configura
3994
4284
 
3995
4285
 
3996
4286
 
4287
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4289
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4290
+
4291
+ return {
4292
+ url: toPathString(localVarUrlObj),
4293
+ options: localVarRequestOptions,
4294
+ };
4295
+ },
4296
+ /**
4297
+ *
4298
+ * @summary Restore a soft-deleted province
4299
+ * @param {string} id
4300
+ * @param {*} [options] Override http request option.
4301
+ * @throws {RequiredError}
4302
+ */
4303
+ provincesControllerRestore: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4304
+ // verify required parameter 'id' is not null or undefined
4305
+ assertParamExists('provincesControllerRestore', 'id', id)
4306
+ const localVarPath = `/api/provinces/{id}/restore`
4307
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4308
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4309
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4310
+ let baseOptions;
4311
+ if (configuration) {
4312
+ baseOptions = configuration.baseOptions;
4313
+ }
4314
+
4315
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
4316
+ const localVarHeaderParameter = {} as any;
4317
+ const localVarQueryParameter = {} as any;
4318
+
4319
+
4320
+
3997
4321
  setSearchParams(localVarUrlObj, localVarQueryParameter);
3998
4322
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3999
4323
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -4066,6 +4390,18 @@ export const ProvincesApiFp = function(configuration?: Configuration) {
4066
4390
  const localVarOperationServerBasePath = operationServerMap['ProvincesApi.provincesControllerCreate']?.[localVarOperationServerIndex]?.url;
4067
4391
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4068
4392
  },
4393
+ /**
4394
+ *
4395
+ * @summary Get all soft-deleted provinces
4396
+ * @param {*} [options] Override http request option.
4397
+ * @throws {RequiredError}
4398
+ */
4399
+ async provincesControllerFindDeleted(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Province>>> {
4400
+ const localVarAxiosArgs = await localVarAxiosParamCreator.provincesControllerFindDeleted(options);
4401
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4402
+ const localVarOperationServerBasePath = operationServerMap['ProvincesApi.provincesControllerFindDeleted']?.[localVarOperationServerIndex]?.url;
4403
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4404
+ },
4069
4405
  /**
4070
4406
  *
4071
4407
  * @summary Get all provinces with pagination and filters
@@ -4108,6 +4444,19 @@ export const ProvincesApiFp = function(configuration?: Configuration) {
4108
4444
  const localVarOperationServerBasePath = operationServerMap['ProvincesApi.provincesControllerRemove']?.[localVarOperationServerIndex]?.url;
4109
4445
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4110
4446
  },
4447
+ /**
4448
+ *
4449
+ * @summary Restore a soft-deleted province
4450
+ * @param {string} id
4451
+ * @param {*} [options] Override http request option.
4452
+ * @throws {RequiredError}
4453
+ */
4454
+ async provincesControllerRestore(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
4455
+ const localVarAxiosArgs = await localVarAxiosParamCreator.provincesControllerRestore(id, options);
4456
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4457
+ const localVarOperationServerBasePath = operationServerMap['ProvincesApi.provincesControllerRestore']?.[localVarOperationServerIndex]?.url;
4458
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4459
+ },
4111
4460
  /**
4112
4461
  *
4113
4462
  * @summary Update a province
@@ -4142,6 +4491,15 @@ export const ProvincesApiFactory = function (configuration?: Configuration, base
4142
4491
  provincesControllerCreate(createProvinceDto: CreateProvinceDto, options?: RawAxiosRequestConfig): AxiosPromise<Province> {
4143
4492
  return localVarFp.provincesControllerCreate(createProvinceDto, options).then((request) => request(axios, basePath));
4144
4493
  },
4494
+ /**
4495
+ *
4496
+ * @summary Get all soft-deleted provinces
4497
+ * @param {*} [options] Override http request option.
4498
+ * @throws {RequiredError}
4499
+ */
4500
+ provincesControllerFindDeleted(options?: RawAxiosRequestConfig): AxiosPromise<Array<Province>> {
4501
+ return localVarFp.provincesControllerFindDeleted(options).then((request) => request(axios, basePath));
4502
+ },
4145
4503
  /**
4146
4504
  *
4147
4505
  * @summary Get all provinces with pagination and filters
@@ -4175,6 +4533,16 @@ export const ProvincesApiFactory = function (configuration?: Configuration, base
4175
4533
  provincesControllerRemove(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
4176
4534
  return localVarFp.provincesControllerRemove(id, options).then((request) => request(axios, basePath));
4177
4535
  },
4536
+ /**
4537
+ *
4538
+ * @summary Restore a soft-deleted province
4539
+ * @param {string} id
4540
+ * @param {*} [options] Override http request option.
4541
+ * @throws {RequiredError}
4542
+ */
4543
+ provincesControllerRestore(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
4544
+ return localVarFp.provincesControllerRestore(id, options).then((request) => request(axios, basePath));
4545
+ },
4178
4546
  /**
4179
4547
  *
4180
4548
  * @summary Update a province
@@ -4208,6 +4576,17 @@ export class ProvincesApi extends BaseAPI {
4208
4576
  return ProvincesApiFp(this.configuration).provincesControllerCreate(createProvinceDto, options).then((request) => request(this.axios, this.basePath));
4209
4577
  }
4210
4578
 
4579
+ /**
4580
+ *
4581
+ * @summary Get all soft-deleted provinces
4582
+ * @param {*} [options] Override http request option.
4583
+ * @throws {RequiredError}
4584
+ * @memberof ProvincesApi
4585
+ */
4586
+ public provincesControllerFindDeleted(options?: RawAxiosRequestConfig) {
4587
+ return ProvincesApiFp(this.configuration).provincesControllerFindDeleted(options).then((request) => request(this.axios, this.basePath));
4588
+ }
4589
+
4211
4590
  /**
4212
4591
  *
4213
4592
  * @summary Get all provinces with pagination and filters
@@ -4247,6 +4626,18 @@ export class ProvincesApi extends BaseAPI {
4247
4626
  return ProvincesApiFp(this.configuration).provincesControllerRemove(id, options).then((request) => request(this.axios, this.basePath));
4248
4627
  }
4249
4628
 
4629
+ /**
4630
+ *
4631
+ * @summary Restore a soft-deleted province
4632
+ * @param {string} id
4633
+ * @param {*} [options] Override http request option.
4634
+ * @throws {RequiredError}
4635
+ * @memberof ProvincesApi
4636
+ */
4637
+ public provincesControllerRestore(id: string, options?: RawAxiosRequestConfig) {
4638
+ return ProvincesApiFp(this.configuration).provincesControllerRestore(id, options).then((request) => request(this.axios, this.basePath));
4639
+ }
4640
+
4250
4641
  /**
4251
4642
  *
4252
4643
  * @summary Update a province
@@ -4310,12 +4701,12 @@ export const RoomDetailsApiAxiosParamCreator = function (configuration?: Configu
4310
4701
  * @summary Get all room details with pagination and filters
4311
4702
  * @param {number} [page]
4312
4703
  * @param {number} [pageSize]
4313
- * @param {string} [filters] JSON string
4314
- * @param {string} [sort] JSON string
4704
+ * @param {object} [filters]
4705
+ * @param {Array<string>} [sort]
4315
4706
  * @param {*} [options] Override http request option.
4316
4707
  * @throws {RequiredError}
4317
4708
  */
4318
- roomDetailControllerFindMany: async (page?: number, pageSize?: number, filters?: string, sort?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4709
+ roomDetailControllerFindMany: async (page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4319
4710
  const localVarPath = `/api/room-details`;
4320
4711
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4321
4712
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4337,10 +4728,12 @@ export const RoomDetailsApiAxiosParamCreator = function (configuration?: Configu
4337
4728
  }
4338
4729
 
4339
4730
  if (filters !== undefined) {
4340
- localVarQueryParameter['filters'] = filters;
4731
+ for (const [key, value] of Object.entries(filters)) {
4732
+ localVarQueryParameter[key] = value;
4733
+ }
4341
4734
  }
4342
4735
 
4343
- if (sort !== undefined) {
4736
+ if (sort) {
4344
4737
  localVarQueryParameter['sort'] = sort;
4345
4738
  }
4346
4739
 
@@ -4491,12 +4884,12 @@ export const RoomDetailsApiFp = function(configuration?: Configuration) {
4491
4884
  * @summary Get all room details with pagination and filters
4492
4885
  * @param {number} [page]
4493
4886
  * @param {number} [pageSize]
4494
- * @param {string} [filters] JSON string
4495
- * @param {string} [sort] JSON string
4887
+ * @param {object} [filters]
4888
+ * @param {Array<string>} [sort]
4496
4889
  * @param {*} [options] Override http request option.
4497
4890
  * @throws {RequiredError}
4498
4891
  */
4499
- async roomDetailControllerFindMany(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RoomDetailPaginationResultDto>> {
4892
+ async roomDetailControllerFindMany(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RoomDetailPaginationResultDto>> {
4500
4893
  const localVarAxiosArgs = await localVarAxiosParamCreator.roomDetailControllerFindMany(page, pageSize, filters, sort, options);
4501
4894
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4502
4895
  const localVarOperationServerBasePath = operationServerMap['RoomDetailsApi.roomDetailControllerFindMany']?.[localVarOperationServerIndex]?.url;
@@ -4567,12 +4960,12 @@ export const RoomDetailsApiFactory = function (configuration?: Configuration, ba
4567
4960
  * @summary Get all room details with pagination and filters
4568
4961
  * @param {number} [page]
4569
4962
  * @param {number} [pageSize]
4570
- * @param {string} [filters] JSON string
4571
- * @param {string} [sort] JSON string
4963
+ * @param {object} [filters]
4964
+ * @param {Array<string>} [sort]
4572
4965
  * @param {*} [options] Override http request option.
4573
4966
  * @throws {RequiredError}
4574
4967
  */
4575
- roomDetailControllerFindMany(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<RoomDetailPaginationResultDto> {
4968
+ roomDetailControllerFindMany(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<RoomDetailPaginationResultDto> {
4576
4969
  return localVarFp.roomDetailControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
4577
4970
  },
4578
4971
  /**
@@ -4633,13 +5026,13 @@ export class RoomDetailsApi extends BaseAPI {
4633
5026
  * @summary Get all room details with pagination and filters
4634
5027
  * @param {number} [page]
4635
5028
  * @param {number} [pageSize]
4636
- * @param {string} [filters] JSON string
4637
- * @param {string} [sort] JSON string
5029
+ * @param {object} [filters]
5030
+ * @param {Array<string>} [sort]
4638
5031
  * @param {*} [options] Override http request option.
4639
5032
  * @throws {RequiredError}
4640
5033
  * @memberof RoomDetailsApi
4641
5034
  */
4642
- public roomDetailControllerFindMany(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig) {
5035
+ public roomDetailControllerFindMany(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig) {
4643
5036
  return RoomDetailsApiFp(this.configuration).roomDetailControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
4644
5037
  }
4645
5038
 
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openapi-client",
11
11
  "openapi-generator"
12
12
  ],
13
- "version": "1.0.8",
13
+ "version": "1.0.10",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"