@ahomevilla-hotel/node-sdk 1.1.1 → 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 +165 -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 = {
|
|
@@ -3783,6 +3783,25 @@ export interface VerifyEmailDto {
|
|
|
3783
3783
|
*/
|
|
3784
3784
|
'code': string;
|
|
3785
3785
|
}
|
|
3786
|
+
/**
|
|
3787
|
+
*
|
|
3788
|
+
* @export
|
|
3789
|
+
* @interface VerifyEmailOTP
|
|
3790
|
+
*/
|
|
3791
|
+
export interface VerifyEmailOTP {
|
|
3792
|
+
/**
|
|
3793
|
+
* Email
|
|
3794
|
+
* @type {string}
|
|
3795
|
+
* @memberof VerifyEmailOTP
|
|
3796
|
+
*/
|
|
3797
|
+
'email': string;
|
|
3798
|
+
/**
|
|
3799
|
+
* Verification code
|
|
3800
|
+
* @type {string}
|
|
3801
|
+
* @memberof VerifyEmailOTP
|
|
3802
|
+
*/
|
|
3803
|
+
'code': string;
|
|
3804
|
+
}
|
|
3786
3805
|
|
|
3787
3806
|
/**
|
|
3788
3807
|
* AmenitiesApi - axios parameter creator
|
|
@@ -8671,6 +8690,40 @@ export const RoomsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
8671
8690
|
|
|
8672
8691
|
|
|
8673
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
|
+
|
|
8674
8727
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8675
8728
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8676
8729
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -8873,6 +8926,19 @@ export const RoomsApiFp = function(configuration?: Configuration) {
|
|
|
8873
8926
|
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindMany']?.[localVarOperationServerIndex]?.url;
|
|
8874
8927
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8875
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
|
+
},
|
|
8876
8942
|
/**
|
|
8877
8943
|
*
|
|
8878
8944
|
* @summary Get a room by id
|
|
@@ -8968,6 +9034,16 @@ export const RoomsApiFactory = function (configuration?: Configuration, basePath
|
|
|
8968
9034
|
roomControllerFindMany(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<HotelRoomPaginationResultDto> {
|
|
8969
9035
|
return localVarFp.roomControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
|
|
8970
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
|
+
},
|
|
8971
9047
|
/**
|
|
8972
9048
|
*
|
|
8973
9049
|
* @summary Get a room by id
|
|
@@ -9057,6 +9133,18 @@ export class RoomsApi extends BaseAPI {
|
|
|
9057
9133
|
return RoomsApiFp(this.configuration).roomControllerFindMany(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
|
|
9058
9134
|
}
|
|
9059
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
|
+
|
|
9060
9148
|
/**
|
|
9061
9149
|
*
|
|
9062
9150
|
* @summary Get a room by id
|
|
@@ -9275,6 +9363,42 @@ export const VerificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
9275
9363
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9276
9364
|
localVarRequestOptions.data = serializeDataIfNeeded(verifyCodeDto, localVarRequestOptions, configuration)
|
|
9277
9365
|
|
|
9366
|
+
return {
|
|
9367
|
+
url: toPathString(localVarUrlObj),
|
|
9368
|
+
options: localVarRequestOptions,
|
|
9369
|
+
};
|
|
9370
|
+
},
|
|
9371
|
+
/**
|
|
9372
|
+
*
|
|
9373
|
+
* @summary Verify an email OTP
|
|
9374
|
+
* @param {VerifyEmailOTP} verifyEmailOTP
|
|
9375
|
+
* @param {*} [options] Override http request option.
|
|
9376
|
+
* @throws {RequiredError}
|
|
9377
|
+
*/
|
|
9378
|
+
verificationControllerVerifyEmailOTP: async (verifyEmailOTP: VerifyEmailOTP, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9379
|
+
// verify required parameter 'verifyEmailOTP' is not null or undefined
|
|
9380
|
+
assertParamExists('verificationControllerVerifyEmailOTP', 'verifyEmailOTP', verifyEmailOTP)
|
|
9381
|
+
const localVarPath = `/api/verification/verify-email-otp`;
|
|
9382
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9383
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9384
|
+
let baseOptions;
|
|
9385
|
+
if (configuration) {
|
|
9386
|
+
baseOptions = configuration.baseOptions;
|
|
9387
|
+
}
|
|
9388
|
+
|
|
9389
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
9390
|
+
const localVarHeaderParameter = {} as any;
|
|
9391
|
+
const localVarQueryParameter = {} as any;
|
|
9392
|
+
|
|
9393
|
+
|
|
9394
|
+
|
|
9395
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9396
|
+
|
|
9397
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9398
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9399
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9400
|
+
localVarRequestOptions.data = serializeDataIfNeeded(verifyEmailOTP, localVarRequestOptions, configuration)
|
|
9401
|
+
|
|
9278
9402
|
return {
|
|
9279
9403
|
url: toPathString(localVarUrlObj),
|
|
9280
9404
|
options: localVarRequestOptions,
|
|
@@ -9303,6 +9427,19 @@ export const VerificationApiFp = function(configuration?: Configuration) {
|
|
|
9303
9427
|
const localVarOperationServerBasePath = operationServerMap['VerificationApi.verificationControllerVerifyCode']?.[localVarOperationServerIndex]?.url;
|
|
9304
9428
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9305
9429
|
},
|
|
9430
|
+
/**
|
|
9431
|
+
*
|
|
9432
|
+
* @summary Verify an email OTP
|
|
9433
|
+
* @param {VerifyEmailOTP} verifyEmailOTP
|
|
9434
|
+
* @param {*} [options] Override http request option.
|
|
9435
|
+
* @throws {RequiredError}
|
|
9436
|
+
*/
|
|
9437
|
+
async verificationControllerVerifyEmailOTP(verifyEmailOTP: VerifyEmailOTP, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyCodeResponseDto>> {
|
|
9438
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.verificationControllerVerifyEmailOTP(verifyEmailOTP, options);
|
|
9439
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9440
|
+
const localVarOperationServerBasePath = operationServerMap['VerificationApi.verificationControllerVerifyEmailOTP']?.[localVarOperationServerIndex]?.url;
|
|
9441
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9442
|
+
},
|
|
9306
9443
|
}
|
|
9307
9444
|
};
|
|
9308
9445
|
|
|
@@ -9323,6 +9460,16 @@ export const VerificationApiFactory = function (configuration?: Configuration, b
|
|
|
9323
9460
|
verificationControllerVerifyCode(verifyCodeDto: VerifyCodeDto, options?: RawAxiosRequestConfig): AxiosPromise<VerifyCodeResponseDto> {
|
|
9324
9461
|
return localVarFp.verificationControllerVerifyCode(verifyCodeDto, options).then((request) => request(axios, basePath));
|
|
9325
9462
|
},
|
|
9463
|
+
/**
|
|
9464
|
+
*
|
|
9465
|
+
* @summary Verify an email OTP
|
|
9466
|
+
* @param {VerifyEmailOTP} verifyEmailOTP
|
|
9467
|
+
* @param {*} [options] Override http request option.
|
|
9468
|
+
* @throws {RequiredError}
|
|
9469
|
+
*/
|
|
9470
|
+
verificationControllerVerifyEmailOTP(verifyEmailOTP: VerifyEmailOTP, options?: RawAxiosRequestConfig): AxiosPromise<VerifyCodeResponseDto> {
|
|
9471
|
+
return localVarFp.verificationControllerVerifyEmailOTP(verifyEmailOTP, options).then((request) => request(axios, basePath));
|
|
9472
|
+
},
|
|
9326
9473
|
};
|
|
9327
9474
|
};
|
|
9328
9475
|
|
|
@@ -9344,6 +9491,18 @@ export class VerificationApi extends BaseAPI {
|
|
|
9344
9491
|
public verificationControllerVerifyCode(verifyCodeDto: VerifyCodeDto, options?: RawAxiosRequestConfig) {
|
|
9345
9492
|
return VerificationApiFp(this.configuration).verificationControllerVerifyCode(verifyCodeDto, options).then((request) => request(this.axios, this.basePath));
|
|
9346
9493
|
}
|
|
9494
|
+
|
|
9495
|
+
/**
|
|
9496
|
+
*
|
|
9497
|
+
* @summary Verify an email OTP
|
|
9498
|
+
* @param {VerifyEmailOTP} verifyEmailOTP
|
|
9499
|
+
* @param {*} [options] Override http request option.
|
|
9500
|
+
* @throws {RequiredError}
|
|
9501
|
+
* @memberof VerificationApi
|
|
9502
|
+
*/
|
|
9503
|
+
public verificationControllerVerifyEmailOTP(verifyEmailOTP: VerifyEmailOTP, options?: RawAxiosRequestConfig) {
|
|
9504
|
+
return VerificationApiFp(this.configuration).verificationControllerVerifyEmailOTP(verifyEmailOTP, options).then((request) => request(this.axios, this.basePath));
|
|
9505
|
+
}
|
|
9347
9506
|
}
|
|
9348
9507
|
|
|
9349
9508
|
|