@ahomevilla-hotel/node-sdk 1.1.2 → 1.1.4
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 +185 -7
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -1792,7 +1792,19 @@ export interface HotelRoom {
|
|
|
1792
1792
|
* @type {RoomDetail}
|
|
1793
1793
|
* @memberof HotelRoom
|
|
1794
1794
|
*/
|
|
1795
|
-
'detail'
|
|
1795
|
+
'detail'?: RoomDetail;
|
|
1796
|
+
/**
|
|
1797
|
+
* List of bookings
|
|
1798
|
+
* @type {Array<Booking>}
|
|
1799
|
+
* @memberof HotelRoom
|
|
1800
|
+
*/
|
|
1801
|
+
'bookings'?: Array<Booking>;
|
|
1802
|
+
/**
|
|
1803
|
+
*
|
|
1804
|
+
* @type {HotelRoomCount}
|
|
1805
|
+
* @memberof HotelRoom
|
|
1806
|
+
*/
|
|
1807
|
+
'_count'?: HotelRoomCount;
|
|
1796
1808
|
}
|
|
1797
1809
|
|
|
1798
1810
|
export const HotelRoomStatusEnum = {
|
|
@@ -1804,6 +1816,19 @@ export const HotelRoomStatusEnum = {
|
|
|
1804
1816
|
|
|
1805
1817
|
export type HotelRoomStatusEnum = typeof HotelRoomStatusEnum[keyof typeof HotelRoomStatusEnum];
|
|
1806
1818
|
|
|
1819
|
+
/**
|
|
1820
|
+
* Count of bookings
|
|
1821
|
+
* @export
|
|
1822
|
+
* @interface HotelRoomCount
|
|
1823
|
+
*/
|
|
1824
|
+
export interface HotelRoomCount {
|
|
1825
|
+
/**
|
|
1826
|
+
*
|
|
1827
|
+
* @type {number}
|
|
1828
|
+
* @memberof HotelRoomCount
|
|
1829
|
+
*/
|
|
1830
|
+
'bookings'?: number;
|
|
1831
|
+
}
|
|
1807
1832
|
/**
|
|
1808
1833
|
*
|
|
1809
1834
|
* @export
|
|
@@ -1861,6 +1886,19 @@ export interface ImageUploadResponseDto {
|
|
|
1861
1886
|
*/
|
|
1862
1887
|
'publicId': string;
|
|
1863
1888
|
}
|
|
1889
|
+
/**
|
|
1890
|
+
*
|
|
1891
|
+
* @export
|
|
1892
|
+
* @interface ImmediateDeleteRoomsDto
|
|
1893
|
+
*/
|
|
1894
|
+
export interface ImmediateDeleteRoomsDto {
|
|
1895
|
+
/**
|
|
1896
|
+
* List of room ids to delete
|
|
1897
|
+
* @type {Array<string>}
|
|
1898
|
+
* @memberof ImmediateDeleteRoomsDto
|
|
1899
|
+
*/
|
|
1900
|
+
'ids': Array<string>;
|
|
1901
|
+
}
|
|
1864
1902
|
/**
|
|
1865
1903
|
*
|
|
1866
1904
|
* @export
|
|
@@ -2652,6 +2690,12 @@ export interface RoomDetail {
|
|
|
2652
2690
|
* @memberof RoomDetail
|
|
2653
2691
|
*/
|
|
2654
2692
|
'roomPriceHistories'?: Array<RoomPriceHistory>;
|
|
2693
|
+
/**
|
|
2694
|
+
* Whether this room is available for booking
|
|
2695
|
+
* @type {boolean}
|
|
2696
|
+
* @memberof RoomDetail
|
|
2697
|
+
*/
|
|
2698
|
+
'is_available': boolean;
|
|
2655
2699
|
}
|
|
2656
2700
|
|
|
2657
2701
|
export const RoomDetailRoomTypeEnum = {
|
|
@@ -3237,12 +3281,6 @@ export interface UpdateHotelRoomDto {
|
|
|
3237
3281
|
* @memberof UpdateHotelRoomDto
|
|
3238
3282
|
*/
|
|
3239
3283
|
'status'?: UpdateHotelRoomDtoStatusEnum;
|
|
3240
|
-
/**
|
|
3241
|
-
* ID of the room detail
|
|
3242
|
-
* @type {string}
|
|
3243
|
-
* @memberof UpdateHotelRoomDto
|
|
3244
|
-
*/
|
|
3245
|
-
'detailId'?: string;
|
|
3246
3284
|
}
|
|
3247
3285
|
|
|
3248
3286
|
export const UpdateHotelRoomDtoStatusEnum = {
|
|
@@ -8690,6 +8728,40 @@ export const RoomsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
8690
8728
|
|
|
8691
8729
|
|
|
8692
8730
|
|
|
8731
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8732
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8733
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
8734
|
+
|
|
8735
|
+
return {
|
|
8736
|
+
url: toPathString(localVarUrlObj),
|
|
8737
|
+
options: localVarRequestOptions,
|
|
8738
|
+
};
|
|
8739
|
+
},
|
|
8740
|
+
/**
|
|
8741
|
+
*
|
|
8742
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
8743
|
+
* @param {string} branchId
|
|
8744
|
+
* @param {*} [options] Override http request option.
|
|
8745
|
+
* @throws {RequiredError}
|
|
8746
|
+
*/
|
|
8747
|
+
roomControllerFindManyByBranchId: async (branchId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
8748
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
8749
|
+
assertParamExists('roomControllerFindManyByBranchId', 'branchId', branchId)
|
|
8750
|
+
const localVarPath = `/api/rooms/in-branch/{branchId}`
|
|
8751
|
+
.replace(`{${"branchId"}}`, encodeURIComponent(String(branchId)));
|
|
8752
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8753
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8754
|
+
let baseOptions;
|
|
8755
|
+
if (configuration) {
|
|
8756
|
+
baseOptions = configuration.baseOptions;
|
|
8757
|
+
}
|
|
8758
|
+
|
|
8759
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
8760
|
+
const localVarHeaderParameter = {} as any;
|
|
8761
|
+
const localVarQueryParameter = {} as any;
|
|
8762
|
+
|
|
8763
|
+
|
|
8764
|
+
|
|
8693
8765
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8694
8766
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8695
8767
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -8733,6 +8805,42 @@ export const RoomsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
8733
8805
|
options: localVarRequestOptions,
|
|
8734
8806
|
};
|
|
8735
8807
|
},
|
|
8808
|
+
/**
|
|
8809
|
+
*
|
|
8810
|
+
* @summary ADMIN - Delete rooms permanently
|
|
8811
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
8812
|
+
* @param {*} [options] Override http request option.
|
|
8813
|
+
* @throws {RequiredError}
|
|
8814
|
+
*/
|
|
8815
|
+
roomControllerPermanentDelete: async (immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
8816
|
+
// verify required parameter 'immediateDeleteRoomsDto' is not null or undefined
|
|
8817
|
+
assertParamExists('roomControllerPermanentDelete', 'immediateDeleteRoomsDto', immediateDeleteRoomsDto)
|
|
8818
|
+
const localVarPath = `/api/rooms/permanent-delete`;
|
|
8819
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8820
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8821
|
+
let baseOptions;
|
|
8822
|
+
if (configuration) {
|
|
8823
|
+
baseOptions = configuration.baseOptions;
|
|
8824
|
+
}
|
|
8825
|
+
|
|
8826
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
8827
|
+
const localVarHeaderParameter = {} as any;
|
|
8828
|
+
const localVarQueryParameter = {} as any;
|
|
8829
|
+
|
|
8830
|
+
|
|
8831
|
+
|
|
8832
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
8833
|
+
|
|
8834
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8835
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8836
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
8837
|
+
localVarRequestOptions.data = serializeDataIfNeeded(immediateDeleteRoomsDto, localVarRequestOptions, configuration)
|
|
8838
|
+
|
|
8839
|
+
return {
|
|
8840
|
+
url: toPathString(localVarUrlObj),
|
|
8841
|
+
options: localVarRequestOptions,
|
|
8842
|
+
};
|
|
8843
|
+
},
|
|
8736
8844
|
/**
|
|
8737
8845
|
*
|
|
8738
8846
|
* @summary Soft delete a room
|
|
@@ -8892,6 +9000,19 @@ export const RoomsApiFp = function(configuration?: Configuration) {
|
|
|
8892
9000
|
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindMany']?.[localVarOperationServerIndex]?.url;
|
|
8893
9001
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8894
9002
|
},
|
|
9003
|
+
/**
|
|
9004
|
+
*
|
|
9005
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
9006
|
+
* @param {string} branchId
|
|
9007
|
+
* @param {*} [options] Override http request option.
|
|
9008
|
+
* @throws {RequiredError}
|
|
9009
|
+
*/
|
|
9010
|
+
async roomControllerFindManyByBranchId(branchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HotelRoom>>> {
|
|
9011
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.roomControllerFindManyByBranchId(branchId, options);
|
|
9012
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9013
|
+
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindManyByBranchId']?.[localVarOperationServerIndex]?.url;
|
|
9014
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9015
|
+
},
|
|
8895
9016
|
/**
|
|
8896
9017
|
*
|
|
8897
9018
|
* @summary Get a room by id
|
|
@@ -8905,6 +9026,19 @@ export const RoomsApiFp = function(configuration?: Configuration) {
|
|
|
8905
9026
|
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindOne']?.[localVarOperationServerIndex]?.url;
|
|
8906
9027
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8907
9028
|
},
|
|
9029
|
+
/**
|
|
9030
|
+
*
|
|
9031
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9032
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9033
|
+
* @param {*} [options] Override http request option.
|
|
9034
|
+
* @throws {RequiredError}
|
|
9035
|
+
*/
|
|
9036
|
+
async roomControllerPermanentDelete(immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
9037
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.roomControllerPermanentDelete(immediateDeleteRoomsDto, options);
|
|
9038
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9039
|
+
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerPermanentDelete']?.[localVarOperationServerIndex]?.url;
|
|
9040
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9041
|
+
},
|
|
8908
9042
|
/**
|
|
8909
9043
|
*
|
|
8910
9044
|
* @summary Soft delete a room
|
|
@@ -8987,6 +9121,16 @@ export const RoomsApiFactory = function (configuration?: Configuration, basePath
|
|
|
8987
9121
|
roomControllerFindMany(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<HotelRoomPaginationResultDto> {
|
|
8988
9122
|
return localVarFp.roomControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
|
|
8989
9123
|
},
|
|
9124
|
+
/**
|
|
9125
|
+
*
|
|
9126
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
9127
|
+
* @param {string} branchId
|
|
9128
|
+
* @param {*} [options] Override http request option.
|
|
9129
|
+
* @throws {RequiredError}
|
|
9130
|
+
*/
|
|
9131
|
+
roomControllerFindManyByBranchId(branchId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<HotelRoom>> {
|
|
9132
|
+
return localVarFp.roomControllerFindManyByBranchId(branchId, options).then((request) => request(axios, basePath));
|
|
9133
|
+
},
|
|
8990
9134
|
/**
|
|
8991
9135
|
*
|
|
8992
9136
|
* @summary Get a room by id
|
|
@@ -8997,6 +9141,16 @@ export const RoomsApiFactory = function (configuration?: Configuration, basePath
|
|
|
8997
9141
|
roomControllerFindOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<HotelRoom> {
|
|
8998
9142
|
return localVarFp.roomControllerFindOne(id, options).then((request) => request(axios, basePath));
|
|
8999
9143
|
},
|
|
9144
|
+
/**
|
|
9145
|
+
*
|
|
9146
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9147
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9148
|
+
* @param {*} [options] Override http request option.
|
|
9149
|
+
* @throws {RequiredError}
|
|
9150
|
+
*/
|
|
9151
|
+
roomControllerPermanentDelete(immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
9152
|
+
return localVarFp.roomControllerPermanentDelete(immediateDeleteRoomsDto, options).then((request) => request(axios, basePath));
|
|
9153
|
+
},
|
|
9000
9154
|
/**
|
|
9001
9155
|
*
|
|
9002
9156
|
* @summary Soft delete a room
|
|
@@ -9076,6 +9230,18 @@ export class RoomsApi extends BaseAPI {
|
|
|
9076
9230
|
return RoomsApiFp(this.configuration).roomControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
|
|
9077
9231
|
}
|
|
9078
9232
|
|
|
9233
|
+
/**
|
|
9234
|
+
*
|
|
9235
|
+
* @summary ADMIN - STAFF Get all rooms by branch ID
|
|
9236
|
+
* @param {string} branchId
|
|
9237
|
+
* @param {*} [options] Override http request option.
|
|
9238
|
+
* @throws {RequiredError}
|
|
9239
|
+
* @memberof RoomsApi
|
|
9240
|
+
*/
|
|
9241
|
+
public roomControllerFindManyByBranchId(branchId: string, options?: RawAxiosRequestConfig) {
|
|
9242
|
+
return RoomsApiFp(this.configuration).roomControllerFindManyByBranchId(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
9243
|
+
}
|
|
9244
|
+
|
|
9079
9245
|
/**
|
|
9080
9246
|
*
|
|
9081
9247
|
* @summary Get a room by id
|
|
@@ -9088,6 +9254,18 @@ export class RoomsApi extends BaseAPI {
|
|
|
9088
9254
|
return RoomsApiFp(this.configuration).roomControllerFindOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
9089
9255
|
}
|
|
9090
9256
|
|
|
9257
|
+
/**
|
|
9258
|
+
*
|
|
9259
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9260
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9261
|
+
* @param {*} [options] Override http request option.
|
|
9262
|
+
* @throws {RequiredError}
|
|
9263
|
+
* @memberof RoomsApi
|
|
9264
|
+
*/
|
|
9265
|
+
public roomControllerPermanentDelete(immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options?: RawAxiosRequestConfig) {
|
|
9266
|
+
return RoomsApiFp(this.configuration).roomControllerPermanentDelete(immediateDeleteRoomsDto, options).then((request) => request(this.axios, this.basePath));
|
|
9267
|
+
}
|
|
9268
|
+
|
|
9091
9269
|
/**
|
|
9092
9270
|
*
|
|
9093
9271
|
* @summary Soft delete a room
|