@ahomevilla-hotel/node-sdk 1.0.12 → 1.0.13

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 +351 -114
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -23,6 +23,25 @@ import type { RequestArgs } from './base';
23
23
  // @ts-ignore
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
25
 
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface AmenitiesPaginationResultDto
30
+ */
31
+ export interface AmenitiesPaginationResultDto {
32
+ /**
33
+ *
34
+ * @type {Array<Amenity>}
35
+ * @memberof AmenitiesPaginationResultDto
36
+ */
37
+ 'data': Array<Amenity>;
38
+ /**
39
+ *
40
+ * @type {UsersPaginationResultDtoMeta}
41
+ * @memberof AmenitiesPaginationResultDto
42
+ */
43
+ 'meta': UsersPaginationResultDtoMeta;
44
+ }
26
45
  /**
27
46
  *
28
47
  * @export
@@ -355,6 +374,46 @@ export interface BranchesPaginationResultDto {
355
374
  */
356
375
  'meta': UsersPaginationResultDtoMeta;
357
376
  }
377
+ /**
378
+ *
379
+ * @export
380
+ * @interface CreateAmenityDto
381
+ */
382
+ export interface CreateAmenityDto {
383
+ /**
384
+ * The name of the amenity
385
+ * @type {string}
386
+ * @memberof CreateAmenityDto
387
+ */
388
+ 'name': string;
389
+ /**
390
+ * URL-friendly version of the name (lowercase, hyphenated)
391
+ * @type {string}
392
+ * @memberof CreateAmenityDto
393
+ */
394
+ 'slug': string;
395
+ /**
396
+ * Type of amenity (ROOM, PROPERTY, or SERVICE)
397
+ * @type {string}
398
+ * @memberof CreateAmenityDto
399
+ */
400
+ 'type': CreateAmenityDtoTypeEnum;
401
+ /**
402
+ * Icon image details
403
+ * @type {Image}
404
+ * @memberof CreateAmenityDto
405
+ */
406
+ 'icon': Image;
407
+ }
408
+
409
+ export const CreateAmenityDtoTypeEnum = {
410
+ Room: 'ROOM',
411
+ Property: 'PROPERTY',
412
+ Service: 'SERVICE'
413
+ } as const;
414
+
415
+ export type CreateAmenityDtoTypeEnum = typeof CreateAmenityDtoTypeEnum[keyof typeof CreateAmenityDtoTypeEnum];
416
+
358
417
  /**
359
418
  *
360
419
  * @export
@@ -556,6 +615,34 @@ export interface CreateUserDto {
556
615
  */
557
616
  'name': string;
558
617
  }
618
+ /**
619
+ *
620
+ * @export
621
+ * @interface FilterAmenityDto
622
+ */
623
+ export interface FilterAmenityDto {
624
+ /**
625
+ *
626
+ * @type {string}
627
+ * @memberof FilterAmenityDto
628
+ */
629
+ 'types'?: FilterAmenityDtoTypesEnum;
630
+ /**
631
+ *
632
+ * @type {string}
633
+ * @memberof FilterAmenityDto
634
+ */
635
+ 'search'?: string;
636
+ }
637
+
638
+ export const FilterAmenityDtoTypesEnum = {
639
+ Room: 'ROOM',
640
+ Property: 'PROPERTY',
641
+ Service: 'SERVICE'
642
+ } as const;
643
+
644
+ export type FilterAmenityDtoTypesEnum = typeof FilterAmenityDtoTypesEnum[keyof typeof FilterAmenityDtoTypesEnum];
645
+
559
646
  /**
560
647
  *
561
648
  * @export
@@ -1348,6 +1435,33 @@ export interface SessionResponseDto {
1348
1435
  */
1349
1436
  'sessions': Array<string>;
1350
1437
  }
1438
+ /**
1439
+ *
1440
+ * @export
1441
+ * @interface SortAmenityDto
1442
+ */
1443
+ export interface SortAmenityDto {
1444
+ /**
1445
+ * Key of Entity to sort
1446
+ * @type {string}
1447
+ * @memberof SortAmenityDto
1448
+ */
1449
+ 'orderBy': string;
1450
+ /**
1451
+ * Order of sorting
1452
+ * @type {string}
1453
+ * @memberof SortAmenityDto
1454
+ */
1455
+ 'order': SortAmenityDtoOrderEnum;
1456
+ }
1457
+
1458
+ export const SortAmenityDtoOrderEnum = {
1459
+ Asc: 'asc',
1460
+ Desc: 'desc'
1461
+ } as const;
1462
+
1463
+ export type SortAmenityDtoOrderEnum = typeof SortAmenityDtoOrderEnum[keyof typeof SortAmenityDtoOrderEnum];
1464
+
1351
1465
  /**
1352
1466
  *
1353
1467
  * @export
@@ -1429,6 +1543,46 @@ export const SortUserDtoOrderEnum = {
1429
1543
 
1430
1544
  export type SortUserDtoOrderEnum = typeof SortUserDtoOrderEnum[keyof typeof SortUserDtoOrderEnum];
1431
1545
 
1546
+ /**
1547
+ *
1548
+ * @export
1549
+ * @interface UpdateAmenityDto
1550
+ */
1551
+ export interface UpdateAmenityDto {
1552
+ /**
1553
+ * The name of the amenity
1554
+ * @type {string}
1555
+ * @memberof UpdateAmenityDto
1556
+ */
1557
+ 'name'?: string;
1558
+ /**
1559
+ * URL-friendly version of the name (lowercase, hyphenated)
1560
+ * @type {string}
1561
+ * @memberof UpdateAmenityDto
1562
+ */
1563
+ 'slug'?: string;
1564
+ /**
1565
+ * Type of amenity (ROOM, PROPERTY, or SERVICE)
1566
+ * @type {string}
1567
+ * @memberof UpdateAmenityDto
1568
+ */
1569
+ 'type'?: UpdateAmenityDtoTypeEnum;
1570
+ /**
1571
+ * Icon image details
1572
+ * @type {Image}
1573
+ * @memberof UpdateAmenityDto
1574
+ */
1575
+ 'icon'?: Image;
1576
+ }
1577
+
1578
+ export const UpdateAmenityDtoTypeEnum = {
1579
+ Room: 'ROOM',
1580
+ Property: 'PROPERTY',
1581
+ Service: 'SERVICE'
1582
+ } as const;
1583
+
1584
+ export type UpdateAmenityDtoTypeEnum = typeof UpdateAmenityDtoTypeEnum[keyof typeof UpdateAmenityDtoTypeEnum];
1585
+
1432
1586
  /**
1433
1587
  *
1434
1588
  * @export
@@ -1886,14 +2040,14 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
1886
2040
  return {
1887
2041
  /**
1888
2042
  *
1889
- * @param {string} [name]
1890
- * @param {string} [slug]
1891
- * @param {AmenitiesControllerCreateTypeEnum} [type]
1892
- * @param {File} [icon]
2043
+ * @summary Create new amenity
2044
+ * @param {CreateAmenityDto} createAmenityDto
1893
2045
  * @param {*} [options] Override http request option.
1894
2046
  * @throws {RequiredError}
1895
2047
  */
1896
- amenitiesControllerCreate: async (name?: string, slug?: string, type?: AmenitiesControllerCreateTypeEnum, icon?: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2048
+ amenitiesControllerCreate: async (createAmenityDto: CreateAmenityDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2049
+ // verify required parameter 'createAmenityDto' is not null or undefined
2050
+ assertParamExists('amenitiesControllerCreate', 'createAmenityDto', createAmenityDto)
1897
2051
  const localVarPath = `/api/amenities`;
1898
2052
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1899
2053
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1905,32 +2059,15 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
1905
2059
  const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1906
2060
  const localVarHeaderParameter = {} as any;
1907
2061
  const localVarQueryParameter = {} as any;
1908
- const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1909
2062
 
1910
2063
 
1911
- if (name !== undefined) {
1912
- localVarFormParams.append('name', name as any);
1913
- }
1914
-
1915
- if (slug !== undefined) {
1916
- localVarFormParams.append('slug', slug as any);
1917
- }
1918
-
1919
- if (type !== undefined) {
1920
- localVarFormParams.append('type', type as any);
1921
- }
1922
-
1923
- if (icon !== undefined) {
1924
- localVarFormParams.append('icon', icon as any);
1925
- }
1926
-
1927
-
1928
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1929
2064
 
2065
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2066
+
1930
2067
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1931
2068
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1932
2069
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1933
- localVarRequestOptions.data = localVarFormParams;
2070
+ localVarRequestOptions.data = serializeDataIfNeeded(createAmenityDto, localVarRequestOptions, configuration)
1934
2071
 
1935
2072
  return {
1936
2073
  url: toPathString(localVarUrlObj),
@@ -1939,14 +2076,15 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
1939
2076
  },
1940
2077
  /**
1941
2078
  *
2079
+ * @summary Get all amenities
1942
2080
  * @param {number} [page]
1943
2081
  * @param {number} [pageSize]
1944
- * @param {object} [filters]
1945
- * @param {Array<string>} [sort]
2082
+ * @param {string} [filters] JSON string of FilterAmenityDto
2083
+ * @param {string} [sort] JSON string of SortAmenityDto
1946
2084
  * @param {*} [options] Override http request option.
1947
2085
  * @throws {RequiredError}
1948
2086
  */
1949
- amenitiesControllerFindAll: async (page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2087
+ amenitiesControllerFindAll: async (page?: number, pageSize?: number, filters?: string, sort?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1950
2088
  const localVarPath = `/api/amenities`;
1951
2089
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1952
2090
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1968,12 +2106,10 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
1968
2106
  }
1969
2107
 
1970
2108
  if (filters !== undefined) {
1971
- for (const [key, value] of Object.entries(filters)) {
1972
- localVarQueryParameter[key] = value;
1973
- }
2109
+ localVarQueryParameter['filters'] = filters;
1974
2110
  }
1975
2111
 
1976
- if (sort) {
2112
+ if (sort !== undefined) {
1977
2113
  localVarQueryParameter['sort'] = sort;
1978
2114
  }
1979
2115
 
@@ -2056,16 +2192,17 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
2056
2192
  },
2057
2193
  /**
2058
2194
  *
2195
+ * @summary Update amenity
2059
2196
  * @param {string} id
2060
- * @param {string} [name] The name of the amenity
2061
- * @param {string} [slug] URL-friendly version of the name (lowercase, hyphenated)
2062
- * @param {AmenitiesControllerUpdateTypeEnum} [type] Type of amenity (ROOM, PROPERTY, or SERVICE)
2197
+ * @param {UpdateAmenityDto} updateAmenityDto
2063
2198
  * @param {*} [options] Override http request option.
2064
2199
  * @throws {RequiredError}
2065
2200
  */
2066
- amenitiesControllerUpdate: async (id: string, name?: string, slug?: string, type?: AmenitiesControllerUpdateTypeEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2201
+ amenitiesControllerUpdate: async (id: string, updateAmenityDto: UpdateAmenityDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2067
2202
  // verify required parameter 'id' is not null or undefined
2068
2203
  assertParamExists('amenitiesControllerUpdate', 'id', id)
2204
+ // verify required parameter 'updateAmenityDto' is not null or undefined
2205
+ assertParamExists('amenitiesControllerUpdate', 'updateAmenityDto', updateAmenityDto)
2069
2206
  const localVarPath = `/api/amenities/{id}`
2070
2207
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2071
2208
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -2078,28 +2215,15 @@ export const AmenitiesApiAxiosParamCreator = function (configuration?: Configura
2078
2215
  const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
2079
2216
  const localVarHeaderParameter = {} as any;
2080
2217
  const localVarQueryParameter = {} as any;
2081
- const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
2082
2218
 
2083
2219
 
2084
- if (name !== undefined) {
2085
- localVarFormParams.append('name', name as any);
2086
- }
2087
-
2088
- if (slug !== undefined) {
2089
- localVarFormParams.append('slug', slug as any);
2090
- }
2091
-
2092
- if (type !== undefined) {
2093
- localVarFormParams.append('type', type as any);
2094
- }
2095
-
2096
-
2097
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
2098
2220
 
2221
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2222
+
2099
2223
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2100
2224
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2101
2225
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2102
- localVarRequestOptions.data = localVarFormParams;
2226
+ localVarRequestOptions.data = serializeDataIfNeeded(updateAmenityDto, localVarRequestOptions, configuration)
2103
2227
 
2104
2228
  return {
2105
2229
  url: toPathString(localVarUrlObj),
@@ -2118,29 +2242,28 @@ export const AmenitiesApiFp = function(configuration?: Configuration) {
2118
2242
  return {
2119
2243
  /**
2120
2244
  *
2121
- * @param {string} [name]
2122
- * @param {string} [slug]
2123
- * @param {AmenitiesControllerCreateTypeEnum} [type]
2124
- * @param {File} [icon]
2245
+ * @summary Create new amenity
2246
+ * @param {CreateAmenityDto} createAmenityDto
2125
2247
  * @param {*} [options] Override http request option.
2126
2248
  * @throws {RequiredError}
2127
2249
  */
2128
- async amenitiesControllerCreate(name?: string, slug?: string, type?: AmenitiesControllerCreateTypeEnum, icon?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2129
- const localVarAxiosArgs = await localVarAxiosParamCreator.amenitiesControllerCreate(name, slug, type, icon, options);
2250
+ async amenitiesControllerCreate(createAmenityDto: CreateAmenityDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Amenity>> {
2251
+ const localVarAxiosArgs = await localVarAxiosParamCreator.amenitiesControllerCreate(createAmenityDto, options);
2130
2252
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2131
2253
  const localVarOperationServerBasePath = operationServerMap['AmenitiesApi.amenitiesControllerCreate']?.[localVarOperationServerIndex]?.url;
2132
2254
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2133
2255
  },
2134
2256
  /**
2135
2257
  *
2258
+ * @summary Get all amenities
2136
2259
  * @param {number} [page]
2137
2260
  * @param {number} [pageSize]
2138
- * @param {object} [filters]
2139
- * @param {Array<string>} [sort]
2261
+ * @param {string} [filters] JSON string of FilterAmenityDto
2262
+ * @param {string} [sort] JSON string of SortAmenityDto
2140
2263
  * @param {*} [options] Override http request option.
2141
2264
  * @throws {RequiredError}
2142
2265
  */
2143
- async amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2266
+ async amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AmenitiesPaginationResultDto>> {
2144
2267
  const localVarAxiosArgs = await localVarAxiosParamCreator.amenitiesControllerFindAll(page, pageSize, filters, sort, options);
2145
2268
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2146
2269
  const localVarOperationServerBasePath = operationServerMap['AmenitiesApi.amenitiesControllerFindAll']?.[localVarOperationServerIndex]?.url;
@@ -2172,15 +2295,14 @@ export const AmenitiesApiFp = function(configuration?: Configuration) {
2172
2295
  },
2173
2296
  /**
2174
2297
  *
2298
+ * @summary Update amenity
2175
2299
  * @param {string} id
2176
- * @param {string} [name] The name of the amenity
2177
- * @param {string} [slug] URL-friendly version of the name (lowercase, hyphenated)
2178
- * @param {AmenitiesControllerUpdateTypeEnum} [type] Type of amenity (ROOM, PROPERTY, or SERVICE)
2300
+ * @param {UpdateAmenityDto} updateAmenityDto
2179
2301
  * @param {*} [options] Override http request option.
2180
2302
  * @throws {RequiredError}
2181
2303
  */
2182
- async amenitiesControllerUpdate(id: string, name?: string, slug?: string, type?: AmenitiesControllerUpdateTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2183
- const localVarAxiosArgs = await localVarAxiosParamCreator.amenitiesControllerUpdate(id, name, slug, type, options);
2304
+ async amenitiesControllerUpdate(id: string, updateAmenityDto: UpdateAmenityDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Amenity>> {
2305
+ const localVarAxiosArgs = await localVarAxiosParamCreator.amenitiesControllerUpdate(id, updateAmenityDto, options);
2184
2306
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2185
2307
  const localVarOperationServerBasePath = operationServerMap['AmenitiesApi.amenitiesControllerUpdate']?.[localVarOperationServerIndex]?.url;
2186
2308
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -2197,26 +2319,25 @@ export const AmenitiesApiFactory = function (configuration?: Configuration, base
2197
2319
  return {
2198
2320
  /**
2199
2321
  *
2200
- * @param {string} [name]
2201
- * @param {string} [slug]
2202
- * @param {AmenitiesControllerCreateTypeEnum} [type]
2203
- * @param {File} [icon]
2322
+ * @summary Create new amenity
2323
+ * @param {CreateAmenityDto} createAmenityDto
2204
2324
  * @param {*} [options] Override http request option.
2205
2325
  * @throws {RequiredError}
2206
2326
  */
2207
- amenitiesControllerCreate(name?: string, slug?: string, type?: AmenitiesControllerCreateTypeEnum, icon?: File, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2208
- return localVarFp.amenitiesControllerCreate(name, slug, type, icon, options).then((request) => request(axios, basePath));
2327
+ amenitiesControllerCreate(createAmenityDto: CreateAmenityDto, options?: RawAxiosRequestConfig): AxiosPromise<Amenity> {
2328
+ return localVarFp.amenitiesControllerCreate(createAmenityDto, options).then((request) => request(axios, basePath));
2209
2329
  },
2210
2330
  /**
2211
2331
  *
2332
+ * @summary Get all amenities
2212
2333
  * @param {number} [page]
2213
2334
  * @param {number} [pageSize]
2214
- * @param {object} [filters]
2215
- * @param {Array<string>} [sort]
2335
+ * @param {string} [filters] JSON string of FilterAmenityDto
2336
+ * @param {string} [sort] JSON string of SortAmenityDto
2216
2337
  * @param {*} [options] Override http request option.
2217
2338
  * @throws {RequiredError}
2218
2339
  */
2219
- amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2340
+ amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<AmenitiesPaginationResultDto> {
2220
2341
  return localVarFp.amenitiesControllerFindAll(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
2221
2342
  },
2222
2343
  /**
@@ -2239,15 +2360,14 @@ export const AmenitiesApiFactory = function (configuration?: Configuration, base
2239
2360
  },
2240
2361
  /**
2241
2362
  *
2363
+ * @summary Update amenity
2242
2364
  * @param {string} id
2243
- * @param {string} [name] The name of the amenity
2244
- * @param {string} [slug] URL-friendly version of the name (lowercase, hyphenated)
2245
- * @param {AmenitiesControllerUpdateTypeEnum} [type] Type of amenity (ROOM, PROPERTY, or SERVICE)
2365
+ * @param {UpdateAmenityDto} updateAmenityDto
2246
2366
  * @param {*} [options] Override http request option.
2247
2367
  * @throws {RequiredError}
2248
2368
  */
2249
- amenitiesControllerUpdate(id: string, name?: string, slug?: string, type?: AmenitiesControllerUpdateTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2250
- return localVarFp.amenitiesControllerUpdate(id, name, slug, type, options).then((request) => request(axios, basePath));
2369
+ amenitiesControllerUpdate(id: string, updateAmenityDto: UpdateAmenityDto, options?: RawAxiosRequestConfig): AxiosPromise<Amenity> {
2370
+ return localVarFp.amenitiesControllerUpdate(id, updateAmenityDto, options).then((request) => request(axios, basePath));
2251
2371
  },
2252
2372
  };
2253
2373
  };
@@ -2261,29 +2381,28 @@ export const AmenitiesApiFactory = function (configuration?: Configuration, base
2261
2381
  export class AmenitiesApi extends BaseAPI {
2262
2382
  /**
2263
2383
  *
2264
- * @param {string} [name]
2265
- * @param {string} [slug]
2266
- * @param {AmenitiesControllerCreateTypeEnum} [type]
2267
- * @param {File} [icon]
2384
+ * @summary Create new amenity
2385
+ * @param {CreateAmenityDto} createAmenityDto
2268
2386
  * @param {*} [options] Override http request option.
2269
2387
  * @throws {RequiredError}
2270
2388
  * @memberof AmenitiesApi
2271
2389
  */
2272
- public amenitiesControllerCreate(name?: string, slug?: string, type?: AmenitiesControllerCreateTypeEnum, icon?: File, options?: RawAxiosRequestConfig) {
2273
- return AmenitiesApiFp(this.configuration).amenitiesControllerCreate(name, slug, type, icon, options).then((request) => request(this.axios, this.basePath));
2390
+ public amenitiesControllerCreate(createAmenityDto: CreateAmenityDto, options?: RawAxiosRequestConfig) {
2391
+ return AmenitiesApiFp(this.configuration).amenitiesControllerCreate(createAmenityDto, options).then((request) => request(this.axios, this.basePath));
2274
2392
  }
2275
2393
 
2276
2394
  /**
2277
2395
  *
2396
+ * @summary Get all amenities
2278
2397
  * @param {number} [page]
2279
2398
  * @param {number} [pageSize]
2280
- * @param {object} [filters]
2281
- * @param {Array<string>} [sort]
2399
+ * @param {string} [filters] JSON string of FilterAmenityDto
2400
+ * @param {string} [sort] JSON string of SortAmenityDto
2282
2401
  * @param {*} [options] Override http request option.
2283
2402
  * @throws {RequiredError}
2284
2403
  * @memberof AmenitiesApi
2285
2404
  */
2286
- public amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: object, sort?: Array<string>, options?: RawAxiosRequestConfig) {
2405
+ public amenitiesControllerFindAll(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig) {
2287
2406
  return AmenitiesApiFp(this.configuration).amenitiesControllerFindAll(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
2288
2407
  }
2289
2408
 
@@ -2311,37 +2430,18 @@ export class AmenitiesApi extends BaseAPI {
2311
2430
 
2312
2431
  /**
2313
2432
  *
2433
+ * @summary Update amenity
2314
2434
  * @param {string} id
2315
- * @param {string} [name] The name of the amenity
2316
- * @param {string} [slug] URL-friendly version of the name (lowercase, hyphenated)
2317
- * @param {AmenitiesControllerUpdateTypeEnum} [type] Type of amenity (ROOM, PROPERTY, or SERVICE)
2435
+ * @param {UpdateAmenityDto} updateAmenityDto
2318
2436
  * @param {*} [options] Override http request option.
2319
2437
  * @throws {RequiredError}
2320
2438
  * @memberof AmenitiesApi
2321
2439
  */
2322
- public amenitiesControllerUpdate(id: string, name?: string, slug?: string, type?: AmenitiesControllerUpdateTypeEnum, options?: RawAxiosRequestConfig) {
2323
- return AmenitiesApiFp(this.configuration).amenitiesControllerUpdate(id, name, slug, type, options).then((request) => request(this.axios, this.basePath));
2440
+ public amenitiesControllerUpdate(id: string, updateAmenityDto: UpdateAmenityDto, options?: RawAxiosRequestConfig) {
2441
+ return AmenitiesApiFp(this.configuration).amenitiesControllerUpdate(id, updateAmenityDto, options).then((request) => request(this.axios, this.basePath));
2324
2442
  }
2325
2443
  }
2326
2444
 
2327
- /**
2328
- * @export
2329
- */
2330
- export const AmenitiesControllerCreateTypeEnum = {
2331
- Room: 'ROOM',
2332
- Property: 'PROPERTY',
2333
- Service: 'SERVICE'
2334
- } as const;
2335
- export type AmenitiesControllerCreateTypeEnum = typeof AmenitiesControllerCreateTypeEnum[keyof typeof AmenitiesControllerCreateTypeEnum];
2336
- /**
2337
- * @export
2338
- */
2339
- export const AmenitiesControllerUpdateTypeEnum = {
2340
- Room: 'ROOM',
2341
- Property: 'PROPERTY',
2342
- Service: 'SERVICE'
2343
- } as const;
2344
- export type AmenitiesControllerUpdateTypeEnum = typeof AmenitiesControllerUpdateTypeEnum[keyof typeof AmenitiesControllerUpdateTypeEnum];
2345
2445
 
2346
2446
 
2347
2447
  /**
@@ -3509,6 +3609,42 @@ export const BranchesApiAxiosParamCreator = function (configuration?: Configurat
3509
3609
  options: localVarRequestOptions,
3510
3610
  };
3511
3611
  },
3612
+ /**
3613
+ *
3614
+ * @summary Get latest branches
3615
+ * @param {number} body
3616
+ * @param {*} [options] Override http request option.
3617
+ * @throws {RequiredError}
3618
+ */
3619
+ branchControllerGetLatestBranches: async (body: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3620
+ // verify required parameter 'body' is not null or undefined
3621
+ assertParamExists('branchControllerGetLatestBranches', 'body', body)
3622
+ const localVarPath = `/api/branches/latest`;
3623
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3624
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3625
+ let baseOptions;
3626
+ if (configuration) {
3627
+ baseOptions = configuration.baseOptions;
3628
+ }
3629
+
3630
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3631
+ const localVarHeaderParameter = {} as any;
3632
+ const localVarQueryParameter = {} as any;
3633
+
3634
+
3635
+
3636
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3637
+
3638
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3639
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3640
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3641
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
3642
+
3643
+ return {
3644
+ url: toPathString(localVarUrlObj),
3645
+ options: localVarRequestOptions,
3646
+ };
3647
+ },
3512
3648
  /**
3513
3649
  *
3514
3650
  * @summary Delete a branch
@@ -3697,6 +3833,19 @@ export const BranchesApiFp = function(configuration?: Configuration) {
3697
3833
  const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerFindOne']?.[localVarOperationServerIndex]?.url;
3698
3834
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3699
3835
  },
3836
+ /**
3837
+ *
3838
+ * @summary Get latest branches
3839
+ * @param {number} body
3840
+ * @param {*} [options] Override http request option.
3841
+ * @throws {RequiredError}
3842
+ */
3843
+ async branchControllerGetLatestBranches(body: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Branch>>> {
3844
+ const localVarAxiosArgs = await localVarAxiosParamCreator.branchControllerGetLatestBranches(body, options);
3845
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3846
+ const localVarOperationServerBasePath = operationServerMap['BranchesApi.branchControllerGetLatestBranches']?.[localVarOperationServerIndex]?.url;
3847
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3848
+ },
3700
3849
  /**
3701
3850
  *
3702
3851
  * @summary Delete a branch
@@ -3802,6 +3951,16 @@ export const BranchesApiFactory = function (configuration?: Configuration, baseP
3802
3951
  branchControllerFindOne(idOrSlug: string, options?: RawAxiosRequestConfig): AxiosPromise<BranchDetail> {
3803
3952
  return localVarFp.branchControllerFindOne(idOrSlug, options).then((request) => request(axios, basePath));
3804
3953
  },
3954
+ /**
3955
+ *
3956
+ * @summary Get latest branches
3957
+ * @param {number} body
3958
+ * @param {*} [options] Override http request option.
3959
+ * @throws {RequiredError}
3960
+ */
3961
+ branchControllerGetLatestBranches(body: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<Branch>> {
3962
+ return localVarFp.branchControllerGetLatestBranches(body, options).then((request) => request(axios, basePath));
3963
+ },
3805
3964
  /**
3806
3965
  *
3807
3966
  * @summary Delete a branch
@@ -3908,6 +4067,18 @@ export class BranchesApi extends BaseAPI {
3908
4067
  return BranchesApiFp(this.configuration).branchControllerFindOne(idOrSlug, options).then((request) => request(this.axios, this.basePath));
3909
4068
  }
3910
4069
 
4070
+ /**
4071
+ *
4072
+ * @summary Get latest branches
4073
+ * @param {number} body
4074
+ * @param {*} [options] Override http request option.
4075
+ * @throws {RequiredError}
4076
+ * @memberof BranchesApi
4077
+ */
4078
+ public branchControllerGetLatestBranches(body: number, options?: RawAxiosRequestConfig) {
4079
+ return BranchesApiFp(this.configuration).branchControllerGetLatestBranches(body, options).then((request) => request(this.axios, this.basePath));
4080
+ }
4081
+
3911
4082
  /**
3912
4083
  *
3913
4084
  * @summary Delete a branch
@@ -4100,6 +4271,37 @@ export const ImagesApiAxiosParamCreator = function (configuration?: Configuratio
4100
4271
  },
4101
4272
  /**
4102
4273
  *
4274
+ * @summary Upload amenity icon
4275
+ * @param {*} [options] Override http request option.
4276
+ * @throws {RequiredError}
4277
+ */
4278
+ imagesControllerUploadIcon: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4279
+ const localVarPath = `/api/images/icon`;
4280
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4281
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4282
+ let baseOptions;
4283
+ if (configuration) {
4284
+ baseOptions = configuration.baseOptions;
4285
+ }
4286
+
4287
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
4288
+ const localVarHeaderParameter = {} as any;
4289
+ const localVarQueryParameter = {} as any;
4290
+
4291
+
4292
+
4293
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4295
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4296
+
4297
+ return {
4298
+ url: toPathString(localVarUrlObj),
4299
+ options: localVarRequestOptions,
4300
+ };
4301
+ },
4302
+ /**
4303
+ *
4304
+ * @summary Upload multiple image
4103
4305
  * @param {*} [options] Override http request option.
4104
4306
  * @throws {RequiredError}
4105
4307
  */
@@ -4152,10 +4354,23 @@ export const ImagesApiFp = function(configuration?: Configuration) {
4152
4354
  },
4153
4355
  /**
4154
4356
  *
4357
+ * @summary Upload amenity icon
4155
4358
  * @param {*} [options] Override http request option.
4156
4359
  * @throws {RequiredError}
4157
4360
  */
4158
- async imagesControllerUploadImages(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
4361
+ async imagesControllerUploadIcon(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImageUploadResponseDto>> {
4362
+ const localVarAxiosArgs = await localVarAxiosParamCreator.imagesControllerUploadIcon(options);
4363
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4364
+ const localVarOperationServerBasePath = operationServerMap['ImagesApi.imagesControllerUploadIcon']?.[localVarOperationServerIndex]?.url;
4365
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4366
+ },
4367
+ /**
4368
+ *
4369
+ * @summary Upload multiple image
4370
+ * @param {*} [options] Override http request option.
4371
+ * @throws {RequiredError}
4372
+ */
4373
+ async imagesControllerUploadImages(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ImageUploadResponseDto>>> {
4159
4374
  const localVarAxiosArgs = await localVarAxiosParamCreator.imagesControllerUploadImages(options);
4160
4375
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4161
4376
  const localVarOperationServerBasePath = operationServerMap['ImagesApi.imagesControllerUploadImages']?.[localVarOperationServerIndex]?.url;
@@ -4183,10 +4398,20 @@ export const ImagesApiFactory = function (configuration?: Configuration, basePat
4183
4398
  },
4184
4399
  /**
4185
4400
  *
4401
+ * @summary Upload amenity icon
4402
+ * @param {*} [options] Override http request option.
4403
+ * @throws {RequiredError}
4404
+ */
4405
+ imagesControllerUploadIcon(options?: RawAxiosRequestConfig): AxiosPromise<ImageUploadResponseDto> {
4406
+ return localVarFp.imagesControllerUploadIcon(options).then((request) => request(axios, basePath));
4407
+ },
4408
+ /**
4409
+ *
4410
+ * @summary Upload multiple image
4186
4411
  * @param {*} [options] Override http request option.
4187
4412
  * @throws {RequiredError}
4188
4413
  */
4189
- imagesControllerUploadImages(options?: RawAxiosRequestConfig): AxiosPromise<void> {
4414
+ imagesControllerUploadImages(options?: RawAxiosRequestConfig): AxiosPromise<Array<ImageUploadResponseDto>> {
4190
4415
  return localVarFp.imagesControllerUploadImages(options).then((request) => request(axios, basePath));
4191
4416
  },
4192
4417
  };
@@ -4213,6 +4438,18 @@ export class ImagesApi extends BaseAPI {
4213
4438
 
4214
4439
  /**
4215
4440
  *
4441
+ * @summary Upload amenity icon
4442
+ * @param {*} [options] Override http request option.
4443
+ * @throws {RequiredError}
4444
+ * @memberof ImagesApi
4445
+ */
4446
+ public imagesControllerUploadIcon(options?: RawAxiosRequestConfig) {
4447
+ return ImagesApiFp(this.configuration).imagesControllerUploadIcon(options).then((request) => request(this.axios, this.basePath));
4448
+ }
4449
+
4450
+ /**
4451
+ *
4452
+ * @summary Upload multiple image
4216
4453
  * @param {*} [options] Override http request option.
4217
4454
  * @throws {RequiredError}
4218
4455
  * @memberof ImagesApi
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openapi-client",
11
11
  "openapi-generator"
12
12
  ],
13
- "version": "1.0.12",
13
+ "version": "1.0.13",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"