@ahomevilla-hotel/node-sdk 1.1.2 → 1.1.3
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 +75 -6
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -2652,6 +2652,12 @@ export interface RoomDetail {
|
|
|
2652
2652
|
* @memberof RoomDetail
|
|
2653
2653
|
*/
|
|
2654
2654
|
'roomPriceHistories'?: Array<RoomPriceHistory>;
|
|
2655
|
+
/**
|
|
2656
|
+
* Whether this room is available for booking
|
|
2657
|
+
* @type {boolean}
|
|
2658
|
+
* @memberof RoomDetail
|
|
2659
|
+
*/
|
|
2660
|
+
'is_available': boolean;
|
|
2655
2661
|
}
|
|
2656
2662
|
|
|
2657
2663
|
export const RoomDetailRoomTypeEnum = {
|
|
@@ -3237,12 +3243,6 @@ export interface UpdateHotelRoomDto {
|
|
|
3237
3243
|
* @memberof UpdateHotelRoomDto
|
|
3238
3244
|
*/
|
|
3239
3245
|
'status'?: UpdateHotelRoomDtoStatusEnum;
|
|
3240
|
-
/**
|
|
3241
|
-
* ID of the room detail
|
|
3242
|
-
* @type {string}
|
|
3243
|
-
* @memberof UpdateHotelRoomDto
|
|
3244
|
-
*/
|
|
3245
|
-
'detailId'?: string;
|
|
3246
3246
|
}
|
|
3247
3247
|
|
|
3248
3248
|
export const UpdateHotelRoomDtoStatusEnum = {
|
|
@@ -8690,6 +8690,40 @@ export const RoomsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
8690
8690
|
|
|
8691
8691
|
|
|
8692
8692
|
|
|
8693
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8694
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8695
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
8696
|
+
|
|
8697
|
+
return {
|
|
8698
|
+
url: toPathString(localVarUrlObj),
|
|
8699
|
+
options: localVarRequestOptions,
|
|
8700
|
+
};
|
|
8701
|
+
},
|
|
8702
|
+
/**
|
|
8703
|
+
*
|
|
8704
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
8705
|
+
* @param {string} branchId
|
|
8706
|
+
* @param {*} [options] Override http request option.
|
|
8707
|
+
* @throws {RequiredError}
|
|
8708
|
+
*/
|
|
8709
|
+
roomControllerFindManyByBranchId: async (branchId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
8710
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
8711
|
+
assertParamExists('roomControllerFindManyByBranchId', 'branchId', branchId)
|
|
8712
|
+
const localVarPath = `/api/rooms/{branchId}`
|
|
8713
|
+
.replace(`{${"branchId"}}`, encodeURIComponent(String(branchId)));
|
|
8714
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8715
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8716
|
+
let baseOptions;
|
|
8717
|
+
if (configuration) {
|
|
8718
|
+
baseOptions = configuration.baseOptions;
|
|
8719
|
+
}
|
|
8720
|
+
|
|
8721
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
8722
|
+
const localVarHeaderParameter = {} as any;
|
|
8723
|
+
const localVarQueryParameter = {} as any;
|
|
8724
|
+
|
|
8725
|
+
|
|
8726
|
+
|
|
8693
8727
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8694
8728
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8695
8729
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -8892,6 +8926,19 @@ export const RoomsApiFp = function(configuration?: Configuration) {
|
|
|
8892
8926
|
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindMany']?.[localVarOperationServerIndex]?.url;
|
|
8893
8927
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8894
8928
|
},
|
|
8929
|
+
/**
|
|
8930
|
+
*
|
|
8931
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
8932
|
+
* @param {string} branchId
|
|
8933
|
+
* @param {*} [options] Override http request option.
|
|
8934
|
+
* @throws {RequiredError}
|
|
8935
|
+
*/
|
|
8936
|
+
async roomControllerFindManyByBranchId(branchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HotelRoom>>> {
|
|
8937
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.roomControllerFindManyByBranchId(branchId, options);
|
|
8938
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
8939
|
+
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindManyByBranchId']?.[localVarOperationServerIndex]?.url;
|
|
8940
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8941
|
+
},
|
|
8895
8942
|
/**
|
|
8896
8943
|
*
|
|
8897
8944
|
* @summary Get a room by id
|
|
@@ -8987,6 +9034,16 @@ export const RoomsApiFactory = function (configuration?: Configuration, basePath
|
|
|
8987
9034
|
roomControllerFindMany(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<HotelRoomPaginationResultDto> {
|
|
8988
9035
|
return localVarFp.roomControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
|
|
8989
9036
|
},
|
|
9037
|
+
/**
|
|
9038
|
+
*
|
|
9039
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
9040
|
+
* @param {string} branchId
|
|
9041
|
+
* @param {*} [options] Override http request option.
|
|
9042
|
+
* @throws {RequiredError}
|
|
9043
|
+
*/
|
|
9044
|
+
roomControllerFindManyByBranchId(branchId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<HotelRoom>> {
|
|
9045
|
+
return localVarFp.roomControllerFindManyByBranchId(branchId, options).then((request) => request(axios, basePath));
|
|
9046
|
+
},
|
|
8990
9047
|
/**
|
|
8991
9048
|
*
|
|
8992
9049
|
* @summary Get a room by id
|
|
@@ -9076,6 +9133,18 @@ export class RoomsApi extends BaseAPI {
|
|
|
9076
9133
|
return RoomsApiFp(this.configuration).roomControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
|
|
9077
9134
|
}
|
|
9078
9135
|
|
|
9136
|
+
/**
|
|
9137
|
+
*
|
|
9138
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
9139
|
+
* @param {string} branchId
|
|
9140
|
+
* @param {*} [options] Override http request option.
|
|
9141
|
+
* @throws {RequiredError}
|
|
9142
|
+
* @memberof RoomsApi
|
|
9143
|
+
*/
|
|
9144
|
+
public roomControllerFindManyByBranchId(branchId: string, options?: RawAxiosRequestConfig) {
|
|
9145
|
+
return RoomsApiFp(this.configuration).roomControllerFindManyByBranchId(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
9146
|
+
}
|
|
9147
|
+
|
|
9079
9148
|
/**
|
|
9080
9149
|
*
|
|
9081
9150
|
* @summary Get a room by id
|