@ahomevilla-hotel/node-sdk 1.2.0 → 1.3.0

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 +807 -14
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -159,6 +159,43 @@ export const AmenityTypeEnum = {
159
159
 
160
160
  export type AmenityTypeEnum = typeof AmenityTypeEnum[keyof typeof AmenityTypeEnum];
161
161
 
162
+ /**
163
+ *
164
+ * @export
165
+ * @interface AnalyticsSummaryDto
166
+ */
167
+ export interface AnalyticsSummaryDto {
168
+ /**
169
+ *
170
+ * @type {RevenueTimelineDto}
171
+ * @memberof AnalyticsSummaryDto
172
+ */
173
+ 'revenue': RevenueTimelineDto;
174
+ /**
175
+ * Average occupancy rate percentage
176
+ * @type {number}
177
+ * @memberof AnalyticsSummaryDto
178
+ */
179
+ 'occupancyRate': number;
180
+ /**
181
+ * Overall cancellation rate percentage
182
+ * @type {number}
183
+ * @memberof AnalyticsSummaryDto
184
+ */
185
+ 'cancellationRate': number;
186
+ /**
187
+ * Performance metrics by room type
188
+ * @type {Array<RoomPerformanceDto>}
189
+ * @memberof AnalyticsSummaryDto
190
+ */
191
+ 'roomPerformance': Array<RoomPerformanceDto>;
192
+ /**
193
+ * Additional booking statistics
194
+ * @type {object}
195
+ * @memberof AnalyticsSummaryDto
196
+ */
197
+ 'bookingStats'?: object;
198
+ }
162
199
  /**
163
200
  *
164
201
  * @export
@@ -791,6 +828,19 @@ export interface BranchesPaginationResultDto {
791
828
  */
792
829
  'meta': UsersPaginationResultDtoMeta;
793
830
  }
831
+ /**
832
+ *
833
+ * @export
834
+ * @interface CancelBookingDto
835
+ */
836
+ export interface CancelBookingDto {
837
+ /**
838
+ * Reason for canceling the booking
839
+ * @type {string}
840
+ * @memberof CancelBookingDto
841
+ */
842
+ 'cancel_reason': string;
843
+ }
794
844
  /**
795
845
  *
796
846
  * @export
@@ -2370,6 +2420,37 @@ export interface NearBy {
2370
2420
  */
2371
2421
  'distance': string;
2372
2422
  }
2423
+ /**
2424
+ *
2425
+ * @export
2426
+ * @interface OccupancyRateResponseDto
2427
+ */
2428
+ export interface OccupancyRateResponseDto {
2429
+ /**
2430
+ *
2431
+ * @type {number}
2432
+ * @memberof OccupancyRateResponseDto
2433
+ */
2434
+ 'rate': number;
2435
+ /**
2436
+ *
2437
+ * @type {number}
2438
+ * @memberof OccupancyRateResponseDto
2439
+ */
2440
+ 'totalRooms': number;
2441
+ /**
2442
+ *
2443
+ * @type {number}
2444
+ * @memberof OccupancyRateResponseDto
2445
+ */
2446
+ 'occupiedRooms': number;
2447
+ /**
2448
+ *
2449
+ * @type {object}
2450
+ * @memberof OccupancyRateResponseDto
2451
+ */
2452
+ 'byRoomType': object;
2453
+ }
2373
2454
  /**
2374
2455
  *
2375
2456
  * @export
@@ -2859,6 +2940,71 @@ export interface ResponseStatus {
2859
2940
  */
2860
2941
  'message': string;
2861
2942
  }
2943
+ /**
2944
+ *
2945
+ * @export
2946
+ * @interface RevenueByRoomTypeDto
2947
+ */
2948
+ export interface RevenueByRoomTypeDto {
2949
+ /**
2950
+ *
2951
+ * @type {string}
2952
+ * @memberof RevenueByRoomTypeDto
2953
+ */
2954
+ 'roomType': RevenueByRoomTypeDtoRoomTypeEnum;
2955
+ /**
2956
+ *
2957
+ * @type {number}
2958
+ * @memberof RevenueByRoomTypeDto
2959
+ */
2960
+ 'revenue': number;
2961
+ /**
2962
+ *
2963
+ * @type {number}
2964
+ * @memberof RevenueByRoomTypeDto
2965
+ */
2966
+ 'bookingsCount': number;
2967
+ /**
2968
+ *
2969
+ * @type {number}
2970
+ * @memberof RevenueByRoomTypeDto
2971
+ */
2972
+ 'percentageOfTotal': number;
2973
+ }
2974
+
2975
+ export const RevenueByRoomTypeDtoRoomTypeEnum = {
2976
+ Standard: 'STANDARD',
2977
+ Superior: 'SUPERIOR',
2978
+ Deluxe: 'DELUXE'
2979
+ } as const;
2980
+
2981
+ export type RevenueByRoomTypeDtoRoomTypeEnum = typeof RevenueByRoomTypeDtoRoomTypeEnum[keyof typeof RevenueByRoomTypeDtoRoomTypeEnum];
2982
+
2983
+ /**
2984
+ *
2985
+ * @export
2986
+ * @interface RevenueTimelineDto
2987
+ */
2988
+ export interface RevenueTimelineDto {
2989
+ /**
2990
+ *
2991
+ * @type {object}
2992
+ * @memberof RevenueTimelineDto
2993
+ */
2994
+ 'monthlyRevenue': object;
2995
+ /**
2996
+ *
2997
+ * @type {Array<RevenueByRoomTypeDto>}
2998
+ * @memberof RevenueTimelineDto
2999
+ */
3000
+ 'byRoomType': Array<RevenueByRoomTypeDto>;
3001
+ /**
3002
+ *
3003
+ * @type {number}
3004
+ * @memberof RevenueTimelineDto
3005
+ */
3006
+ 'totalRevenue': number;
3007
+ }
2862
3008
  /**
2863
3009
  *
2864
3010
  * @export
@@ -3102,6 +3248,64 @@ export interface RoomDetailPaginationResultDto {
3102
3248
  */
3103
3249
  'meta': UsersPaginationResultDtoMeta;
3104
3250
  }
3251
+ /**
3252
+ *
3253
+ * @export
3254
+ * @interface RoomPerformanceDto
3255
+ */
3256
+ export interface RoomPerformanceDto {
3257
+ /**
3258
+ *
3259
+ * @type {string}
3260
+ * @memberof RoomPerformanceDto
3261
+ */
3262
+ 'id': string;
3263
+ /**
3264
+ *
3265
+ * @type {string}
3266
+ * @memberof RoomPerformanceDto
3267
+ */
3268
+ 'name': string;
3269
+ /**
3270
+ *
3271
+ * @type {string}
3272
+ * @memberof RoomPerformanceDto
3273
+ */
3274
+ 'room_type': RoomPerformanceDtoRoomTypeEnum;
3275
+ /**
3276
+ *
3277
+ * @type {number}
3278
+ * @memberof RoomPerformanceDto
3279
+ */
3280
+ 'bookings_count': number;
3281
+ /**
3282
+ *
3283
+ * @type {number}
3284
+ * @memberof RoomPerformanceDto
3285
+ */
3286
+ 'total_revenue': number;
3287
+ /**
3288
+ *
3289
+ * @type {number}
3290
+ * @memberof RoomPerformanceDto
3291
+ */
3292
+ 'average_occupancy': number;
3293
+ /**
3294
+ *
3295
+ * @type {number}
3296
+ * @memberof RoomPerformanceDto
3297
+ */
3298
+ 'cancellation_rate': number;
3299
+ }
3300
+
3301
+ export const RoomPerformanceDtoRoomTypeEnum = {
3302
+ Standard: 'STANDARD',
3303
+ Superior: 'SUPERIOR',
3304
+ Deluxe: 'DELUXE'
3305
+ } as const;
3306
+
3307
+ export type RoomPerformanceDtoRoomTypeEnum = typeof RoomPerformanceDtoRoomTypeEnum[keyof typeof RoomPerformanceDtoRoomTypeEnum];
3308
+
3105
3309
  /**
3106
3310
  *
3107
3311
  * @export
@@ -3528,6 +3732,32 @@ export const UpdateAmenityDtoTypeEnum = {
3528
3732
 
3529
3733
  export type UpdateAmenityDtoTypeEnum = typeof UpdateAmenityDtoTypeEnum[keyof typeof UpdateAmenityDtoTypeEnum];
3530
3734
 
3735
+ /**
3736
+ *
3737
+ * @export
3738
+ * @interface UpdateBookingStatusDto
3739
+ */
3740
+ export interface UpdateBookingStatusDto {
3741
+ /**
3742
+ * Booking status
3743
+ * @type {string}
3744
+ * @memberof UpdateBookingStatusDto
3745
+ */
3746
+ 'status': UpdateBookingStatusDtoStatusEnum;
3747
+ }
3748
+
3749
+ export const UpdateBookingStatusDtoStatusEnum = {
3750
+ Pending: 'PENDING',
3751
+ WaitingForCheckIn: 'WAITING_FOR_CHECK_IN',
3752
+ CheckedIn: 'CHECKED_IN',
3753
+ Cancelled: 'CANCELLED',
3754
+ Completed: 'COMPLETED',
3755
+ Refunded: 'REFUNDED',
3756
+ Rejected: 'REJECTED'
3757
+ } as const;
3758
+
3759
+ export type UpdateBookingStatusDtoStatusEnum = typeof UpdateBookingStatusDtoStatusEnum[keyof typeof UpdateBookingStatusDtoStatusEnum];
3760
+
3531
3761
  /**
3532
3762
  *
3533
3763
  * @export
@@ -4848,6 +5078,489 @@ export class AmenitiesApi extends BaseAPI {
4848
5078
 
4849
5079
 
4850
5080
 
5081
+ /**
5082
+ * AnalyticsApi - axios parameter creator
5083
+ * @export
5084
+ */
5085
+ export const AnalyticsApiAxiosParamCreator = function (configuration?: Configuration) {
5086
+ return {
5087
+ /**
5088
+ *
5089
+ * @summary Get analytics summary for a branch
5090
+ * @param {string} [branchId] Branch ID to get analytics for
5091
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5092
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5093
+ * @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
5094
+ * @param {number} [months] Number of months to analyze
5095
+ * @param {*} [options] Override http request option.
5096
+ * @throws {RequiredError}
5097
+ */
5098
+ analyticsControllerGetAnalyticsSummary: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5099
+ const localVarPath = `/api/analytics/summary`;
5100
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5101
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5102
+ let baseOptions;
5103
+ if (configuration) {
5104
+ baseOptions = configuration.baseOptions;
5105
+ }
5106
+
5107
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5108
+ const localVarHeaderParameter = {} as any;
5109
+ const localVarQueryParameter = {} as any;
5110
+
5111
+ if (branchId !== undefined) {
5112
+ localVarQueryParameter['branchId'] = branchId;
5113
+ }
5114
+
5115
+ if (startDate !== undefined) {
5116
+ localVarQueryParameter['startDate'] = startDate;
5117
+ }
5118
+
5119
+ if (endDate !== undefined) {
5120
+ localVarQueryParameter['endDate'] = endDate;
5121
+ }
5122
+
5123
+ if (periodType !== undefined) {
5124
+ localVarQueryParameter['periodType'] = periodType;
5125
+ }
5126
+
5127
+ if (months !== undefined) {
5128
+ localVarQueryParameter['months'] = months;
5129
+ }
5130
+
5131
+
5132
+
5133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5135
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5136
+
5137
+ return {
5138
+ url: toPathString(localVarUrlObj),
5139
+ options: localVarRequestOptions,
5140
+ };
5141
+ },
5142
+ /**
5143
+ *
5144
+ * @summary Get occupancy rate analytics
5145
+ * @param {string} [branchId] Branch ID to get analytics for
5146
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5147
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5148
+ * @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
5149
+ * @param {number} [months] Number of months to analyze
5150
+ * @param {*} [options] Override http request option.
5151
+ * @throws {RequiredError}
5152
+ */
5153
+ analyticsControllerGetOccupancyRate: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5154
+ const localVarPath = `/api/analytics/occupancy`;
5155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5156
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5157
+ let baseOptions;
5158
+ if (configuration) {
5159
+ baseOptions = configuration.baseOptions;
5160
+ }
5161
+
5162
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5163
+ const localVarHeaderParameter = {} as any;
5164
+ const localVarQueryParameter = {} as any;
5165
+
5166
+ if (branchId !== undefined) {
5167
+ localVarQueryParameter['branchId'] = branchId;
5168
+ }
5169
+
5170
+ if (startDate !== undefined) {
5171
+ localVarQueryParameter['startDate'] = startDate;
5172
+ }
5173
+
5174
+ if (endDate !== undefined) {
5175
+ localVarQueryParameter['endDate'] = endDate;
5176
+ }
5177
+
5178
+ if (periodType !== undefined) {
5179
+ localVarQueryParameter['periodType'] = periodType;
5180
+ }
5181
+
5182
+ if (months !== undefined) {
5183
+ localVarQueryParameter['months'] = months;
5184
+ }
5185
+
5186
+
5187
+
5188
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5189
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5190
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5191
+
5192
+ return {
5193
+ url: toPathString(localVarUrlObj),
5194
+ options: localVarRequestOptions,
5195
+ };
5196
+ },
5197
+ /**
5198
+ *
5199
+ * @summary Get revenue analytics
5200
+ * @param {string} [branchId] Branch ID to get analytics for
5201
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5202
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5203
+ * @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
5204
+ * @param {number} [months] Number of months to analyze
5205
+ * @param {*} [options] Override http request option.
5206
+ * @throws {RequiredError}
5207
+ */
5208
+ analyticsControllerGetRevenueAnalytics: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5209
+ const localVarPath = `/api/analytics/revenue`;
5210
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5211
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5212
+ let baseOptions;
5213
+ if (configuration) {
5214
+ baseOptions = configuration.baseOptions;
5215
+ }
5216
+
5217
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5218
+ const localVarHeaderParameter = {} as any;
5219
+ const localVarQueryParameter = {} as any;
5220
+
5221
+ if (branchId !== undefined) {
5222
+ localVarQueryParameter['branchId'] = branchId;
5223
+ }
5224
+
5225
+ if (startDate !== undefined) {
5226
+ localVarQueryParameter['startDate'] = startDate;
5227
+ }
5228
+
5229
+ if (endDate !== undefined) {
5230
+ localVarQueryParameter['endDate'] = endDate;
5231
+ }
5232
+
5233
+ if (periodType !== undefined) {
5234
+ localVarQueryParameter['periodType'] = periodType;
5235
+ }
5236
+
5237
+ if (months !== undefined) {
5238
+ localVarQueryParameter['months'] = months;
5239
+ }
5240
+
5241
+
5242
+
5243
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5244
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5245
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5246
+
5247
+ return {
5248
+ url: toPathString(localVarUrlObj),
5249
+ options: localVarRequestOptions,
5250
+ };
5251
+ },
5252
+ /**
5253
+ *
5254
+ * @summary Get room performance analytics
5255
+ * @param {string} [branchId] Branch ID to get analytics for
5256
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5257
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5258
+ * @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
5259
+ * @param {number} [months] Number of months to analyze
5260
+ * @param {*} [options] Override http request option.
5261
+ * @throws {RequiredError}
5262
+ */
5263
+ analyticsControllerGetRoomPerformance: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5264
+ const localVarPath = `/api/analytics/room-performance`;
5265
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5266
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5267
+ let baseOptions;
5268
+ if (configuration) {
5269
+ baseOptions = configuration.baseOptions;
5270
+ }
5271
+
5272
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5273
+ const localVarHeaderParameter = {} as any;
5274
+ const localVarQueryParameter = {} as any;
5275
+
5276
+ if (branchId !== undefined) {
5277
+ localVarQueryParameter['branchId'] = branchId;
5278
+ }
5279
+
5280
+ if (startDate !== undefined) {
5281
+ localVarQueryParameter['startDate'] = startDate;
5282
+ }
5283
+
5284
+ if (endDate !== undefined) {
5285
+ localVarQueryParameter['endDate'] = endDate;
5286
+ }
5287
+
5288
+ if (periodType !== undefined) {
5289
+ localVarQueryParameter['periodType'] = periodType;
5290
+ }
5291
+
5292
+ if (months !== undefined) {
5293
+ localVarQueryParameter['months'] = months;
5294
+ }
5295
+
5296
+
5297
+
5298
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5299
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5300
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5301
+
5302
+ return {
5303
+ url: toPathString(localVarUrlObj),
5304
+ options: localVarRequestOptions,
5305
+ };
5306
+ },
5307
+ }
5308
+ };
5309
+
5310
+ /**
5311
+ * AnalyticsApi - functional programming interface
5312
+ * @export
5313
+ */
5314
+ export const AnalyticsApiFp = function(configuration?: Configuration) {
5315
+ const localVarAxiosParamCreator = AnalyticsApiAxiosParamCreator(configuration)
5316
+ return {
5317
+ /**
5318
+ *
5319
+ * @summary Get analytics summary for a branch
5320
+ * @param {string} [branchId] Branch ID to get analytics for
5321
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5322
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5323
+ * @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
5324
+ * @param {number} [months] Number of months to analyze
5325
+ * @param {*} [options] Override http request option.
5326
+ * @throws {RequiredError}
5327
+ */
5328
+ async analyticsControllerGetAnalyticsSummary(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AnalyticsSummaryDto>> {
5329
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetAnalyticsSummary(branchId, startDate, endDate, periodType, months, options);
5330
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5331
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetAnalyticsSummary']?.[localVarOperationServerIndex]?.url;
5332
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5333
+ },
5334
+ /**
5335
+ *
5336
+ * @summary Get occupancy rate analytics
5337
+ * @param {string} [branchId] Branch ID to get analytics for
5338
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5339
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5340
+ * @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
5341
+ * @param {number} [months] Number of months to analyze
5342
+ * @param {*} [options] Override http request option.
5343
+ * @throws {RequiredError}
5344
+ */
5345
+ async analyticsControllerGetOccupancyRate(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OccupancyRateResponseDto>> {
5346
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetOccupancyRate(branchId, startDate, endDate, periodType, months, options);
5347
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5348
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetOccupancyRate']?.[localVarOperationServerIndex]?.url;
5349
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5350
+ },
5351
+ /**
5352
+ *
5353
+ * @summary Get revenue analytics
5354
+ * @param {string} [branchId] Branch ID to get analytics for
5355
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5356
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5357
+ * @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
5358
+ * @param {number} [months] Number of months to analyze
5359
+ * @param {*} [options] Override http request option.
5360
+ * @throws {RequiredError}
5361
+ */
5362
+ async analyticsControllerGetRevenueAnalytics(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RevenueTimelineDto>> {
5363
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetRevenueAnalytics(branchId, startDate, endDate, periodType, months, options);
5364
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5365
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetRevenueAnalytics']?.[localVarOperationServerIndex]?.url;
5366
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5367
+ },
5368
+ /**
5369
+ *
5370
+ * @summary Get room performance analytics
5371
+ * @param {string} [branchId] Branch ID to get analytics for
5372
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5373
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5374
+ * @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
5375
+ * @param {number} [months] Number of months to analyze
5376
+ * @param {*} [options] Override http request option.
5377
+ * @throws {RequiredError}
5378
+ */
5379
+ async analyticsControllerGetRoomPerformance(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RoomPerformanceDto>>> {
5380
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetRoomPerformance(branchId, startDate, endDate, periodType, months, options);
5381
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5382
+ const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetRoomPerformance']?.[localVarOperationServerIndex]?.url;
5383
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5384
+ },
5385
+ }
5386
+ };
5387
+
5388
+ /**
5389
+ * AnalyticsApi - factory interface
5390
+ * @export
5391
+ */
5392
+ export const AnalyticsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5393
+ const localVarFp = AnalyticsApiFp(configuration)
5394
+ return {
5395
+ /**
5396
+ *
5397
+ * @summary Get analytics summary for a branch
5398
+ * @param {string} [branchId] Branch ID to get analytics for
5399
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5400
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5401
+ * @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
5402
+ * @param {number} [months] Number of months to analyze
5403
+ * @param {*} [options] Override http request option.
5404
+ * @throws {RequiredError}
5405
+ */
5406
+ analyticsControllerGetAnalyticsSummary(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<AnalyticsSummaryDto> {
5407
+ return localVarFp.analyticsControllerGetAnalyticsSummary(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
5408
+ },
5409
+ /**
5410
+ *
5411
+ * @summary Get occupancy rate analytics
5412
+ * @param {string} [branchId] Branch ID to get analytics for
5413
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5414
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5415
+ * @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
5416
+ * @param {number} [months] Number of months to analyze
5417
+ * @param {*} [options] Override http request option.
5418
+ * @throws {RequiredError}
5419
+ */
5420
+ analyticsControllerGetOccupancyRate(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<OccupancyRateResponseDto> {
5421
+ return localVarFp.analyticsControllerGetOccupancyRate(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
5422
+ },
5423
+ /**
5424
+ *
5425
+ * @summary Get revenue analytics
5426
+ * @param {string} [branchId] Branch ID to get analytics for
5427
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5428
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5429
+ * @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
5430
+ * @param {number} [months] Number of months to analyze
5431
+ * @param {*} [options] Override http request option.
5432
+ * @throws {RequiredError}
5433
+ */
5434
+ analyticsControllerGetRevenueAnalytics(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<RevenueTimelineDto> {
5435
+ return localVarFp.analyticsControllerGetRevenueAnalytics(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
5436
+ },
5437
+ /**
5438
+ *
5439
+ * @summary Get room performance analytics
5440
+ * @param {string} [branchId] Branch ID to get analytics for
5441
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5442
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5443
+ * @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
5444
+ * @param {number} [months] Number of months to analyze
5445
+ * @param {*} [options] Override http request option.
5446
+ * @throws {RequiredError}
5447
+ */
5448
+ analyticsControllerGetRoomPerformance(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<RoomPerformanceDto>> {
5449
+ return localVarFp.analyticsControllerGetRoomPerformance(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
5450
+ },
5451
+ };
5452
+ };
5453
+
5454
+ /**
5455
+ * AnalyticsApi - object-oriented interface
5456
+ * @export
5457
+ * @class AnalyticsApi
5458
+ * @extends {BaseAPI}
5459
+ */
5460
+ export class AnalyticsApi extends BaseAPI {
5461
+ /**
5462
+ *
5463
+ * @summary Get analytics summary for a branch
5464
+ * @param {string} [branchId] Branch ID to get analytics for
5465
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5466
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5467
+ * @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
5468
+ * @param {number} [months] Number of months to analyze
5469
+ * @param {*} [options] Override http request option.
5470
+ * @throws {RequiredError}
5471
+ * @memberof AnalyticsApi
5472
+ */
5473
+ public analyticsControllerGetAnalyticsSummary(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
5474
+ return AnalyticsApiFp(this.configuration).analyticsControllerGetAnalyticsSummary(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
5475
+ }
5476
+
5477
+ /**
5478
+ *
5479
+ * @summary Get occupancy rate analytics
5480
+ * @param {string} [branchId] Branch ID to get analytics for
5481
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5482
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5483
+ * @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
5484
+ * @param {number} [months] Number of months to analyze
5485
+ * @param {*} [options] Override http request option.
5486
+ * @throws {RequiredError}
5487
+ * @memberof AnalyticsApi
5488
+ */
5489
+ public analyticsControllerGetOccupancyRate(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
5490
+ return AnalyticsApiFp(this.configuration).analyticsControllerGetOccupancyRate(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
5491
+ }
5492
+
5493
+ /**
5494
+ *
5495
+ * @summary Get revenue analytics
5496
+ * @param {string} [branchId] Branch ID to get analytics for
5497
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5498
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5499
+ * @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
5500
+ * @param {number} [months] Number of months to analyze
5501
+ * @param {*} [options] Override http request option.
5502
+ * @throws {RequiredError}
5503
+ * @memberof AnalyticsApi
5504
+ */
5505
+ public analyticsControllerGetRevenueAnalytics(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
5506
+ return AnalyticsApiFp(this.configuration).analyticsControllerGetRevenueAnalytics(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
5507
+ }
5508
+
5509
+ /**
5510
+ *
5511
+ * @summary Get room performance analytics
5512
+ * @param {string} [branchId] Branch ID to get analytics for
5513
+ * @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
5514
+ * @param {string} [endDate] End date for analytics (YYYY-MM-DD)
5515
+ * @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
5516
+ * @param {number} [months] Number of months to analyze
5517
+ * @param {*} [options] Override http request option.
5518
+ * @throws {RequiredError}
5519
+ * @memberof AnalyticsApi
5520
+ */
5521
+ public analyticsControllerGetRoomPerformance(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
5522
+ return AnalyticsApiFp(this.configuration).analyticsControllerGetRoomPerformance(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
5523
+ }
5524
+ }
5525
+
5526
+ /**
5527
+ * @export
5528
+ */
5529
+ export const AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum = {
5530
+ Daily: 'DAILY',
5531
+ Monthly: 'MONTHLY',
5532
+ Yearly: 'YEARLY'
5533
+ } as const;
5534
+ export type AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum = typeof AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum[keyof typeof AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum];
5535
+ /**
5536
+ * @export
5537
+ */
5538
+ export const AnalyticsControllerGetOccupancyRatePeriodTypeEnum = {
5539
+ Daily: 'DAILY',
5540
+ Monthly: 'MONTHLY',
5541
+ Yearly: 'YEARLY'
5542
+ } as const;
5543
+ export type AnalyticsControllerGetOccupancyRatePeriodTypeEnum = typeof AnalyticsControllerGetOccupancyRatePeriodTypeEnum[keyof typeof AnalyticsControllerGetOccupancyRatePeriodTypeEnum];
5544
+ /**
5545
+ * @export
5546
+ */
5547
+ export const AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum = {
5548
+ Daily: 'DAILY',
5549
+ Monthly: 'MONTHLY',
5550
+ Yearly: 'YEARLY'
5551
+ } as const;
5552
+ export type AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum = typeof AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum[keyof typeof AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum];
5553
+ /**
5554
+ * @export
5555
+ */
5556
+ export const AnalyticsControllerGetRoomPerformancePeriodTypeEnum = {
5557
+ Daily: 'DAILY',
5558
+ Monthly: 'MONTHLY',
5559
+ Yearly: 'YEARLY'
5560
+ } as const;
5561
+ export type AnalyticsControllerGetRoomPerformancePeriodTypeEnum = typeof AnalyticsControllerGetRoomPerformancePeriodTypeEnum[keyof typeof AnalyticsControllerGetRoomPerformancePeriodTypeEnum];
5562
+
5563
+
4851
5564
  /**
4852
5565
  * AppApi - axios parameter creator
4853
5566
  * @export
@@ -5959,12 +6672,15 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
5959
6672
  *
5960
6673
  * @summary Cancel a booking
5961
6674
  * @param {string} bookingId
6675
+ * @param {CancelBookingDto} cancelBookingDto
5962
6676
  * @param {*} [options] Override http request option.
5963
6677
  * @throws {RequiredError}
5964
6678
  */
5965
- bookingControllerCancelBooking: async (bookingId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6679
+ bookingControllerCancelBooking: async (bookingId: string, cancelBookingDto: CancelBookingDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5966
6680
  // verify required parameter 'bookingId' is not null or undefined
5967
6681
  assertParamExists('bookingControllerCancelBooking', 'bookingId', bookingId)
6682
+ // verify required parameter 'cancelBookingDto' is not null or undefined
6683
+ assertParamExists('bookingControllerCancelBooking', 'cancelBookingDto', cancelBookingDto)
5968
6684
  const localVarPath = `/api/booking/cancel/{bookingId}`
5969
6685
  .replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
5970
6686
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -5980,9 +6696,12 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
5980
6696
 
5981
6697
 
5982
6698
 
6699
+ localVarHeaderParameter['Content-Type'] = 'application/json';
6700
+
5983
6701
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5984
6702
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5985
6703
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6704
+ localVarRequestOptions.data = serializeDataIfNeeded(cancelBookingDto, localVarRequestOptions, configuration)
5986
6705
 
5987
6706
  return {
5988
6707
  url: toPathString(localVarUrlObj),
@@ -6183,6 +6902,36 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
6183
6902
 
6184
6903
 
6185
6904
 
6905
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
6906
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6907
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6908
+
6909
+ return {
6910
+ url: toPathString(localVarUrlObj),
6911
+ options: localVarRequestOptions,
6912
+ };
6913
+ },
6914
+ /**
6915
+ *
6916
+ * @summary Handle payment webhook from PayOS
6917
+ * @param {*} [options] Override http request option.
6918
+ * @throws {RequiredError}
6919
+ */
6920
+ bookingControllerHandlePaymentWebhook: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6921
+ const localVarPath = `/api/booking/webhook/payment`;
6922
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
6923
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
6924
+ let baseOptions;
6925
+ if (configuration) {
6926
+ baseOptions = configuration.baseOptions;
6927
+ }
6928
+
6929
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
6930
+ const localVarHeaderParameter = {} as any;
6931
+ const localVarQueryParameter = {} as any;
6932
+
6933
+
6934
+
6186
6935
  setSearchParams(localVarUrlObj, localVarQueryParameter);
6187
6936
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6188
6937
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -6196,12 +6945,15 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
6196
6945
  *
6197
6946
  * @summary Update booking status
6198
6947
  * @param {string} bookingId
6948
+ * @param {UpdateBookingStatusDto} updateBookingStatusDto
6199
6949
  * @param {*} [options] Override http request option.
6200
6950
  * @throws {RequiredError}
6201
6951
  */
6202
- bookingControllerUpdateBookingStatus: async (bookingId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6952
+ bookingControllerUpdateBookingStatus: async (bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6203
6953
  // verify required parameter 'bookingId' is not null or undefined
6204
6954
  assertParamExists('bookingControllerUpdateBookingStatus', 'bookingId', bookingId)
6955
+ // verify required parameter 'updateBookingStatusDto' is not null or undefined
6956
+ assertParamExists('bookingControllerUpdateBookingStatus', 'updateBookingStatusDto', updateBookingStatusDto)
6205
6957
  const localVarPath = `/api/booking/update-status/{bookingId}`
6206
6958
  .replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
6207
6959
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -6217,9 +6969,12 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
6217
6969
 
6218
6970
 
6219
6971
 
6972
+ localVarHeaderParameter['Content-Type'] = 'application/json';
6973
+
6220
6974
  setSearchParams(localVarUrlObj, localVarQueryParameter);
6221
6975
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6222
6976
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6977
+ localVarRequestOptions.data = serializeDataIfNeeded(updateBookingStatusDto, localVarRequestOptions, configuration)
6223
6978
 
6224
6979
  return {
6225
6980
  url: toPathString(localVarUrlObj),
@@ -6240,11 +6995,12 @@ export const BookingApiFp = function(configuration?: Configuration) {
6240
6995
  *
6241
6996
  * @summary Cancel a booking
6242
6997
  * @param {string} bookingId
6998
+ * @param {CancelBookingDto} cancelBookingDto
6243
6999
  * @param {*} [options] Override http request option.
6244
7000
  * @throws {RequiredError}
6245
7001
  */
6246
- async bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
6247
- const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerCancelBooking(bookingId, options);
7002
+ async bookingControllerCancelBooking(bookingId: string, cancelBookingDto: CancelBookingDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
7003
+ const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerCancelBooking(bookingId, cancelBookingDto, options);
6248
7004
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
6249
7005
  const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerCancelBooking']?.[localVarOperationServerIndex]?.url;
6250
7006
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -6319,15 +7075,28 @@ export const BookingApiFp = function(configuration?: Configuration) {
6319
7075
  const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerGetMyBookings']?.[localVarOperationServerIndex]?.url;
6320
7076
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6321
7077
  },
7078
+ /**
7079
+ *
7080
+ * @summary Handle payment webhook from PayOS
7081
+ * @param {*} [options] Override http request option.
7082
+ * @throws {RequiredError}
7083
+ */
7084
+ async bookingControllerHandlePaymentWebhook(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
7085
+ const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerHandlePaymentWebhook(options);
7086
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7087
+ const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerHandlePaymentWebhook']?.[localVarOperationServerIndex]?.url;
7088
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7089
+ },
6322
7090
  /**
6323
7091
  *
6324
7092
  * @summary Update booking status
6325
7093
  * @param {string} bookingId
7094
+ * @param {UpdateBookingStatusDto} updateBookingStatusDto
6326
7095
  * @param {*} [options] Override http request option.
6327
7096
  * @throws {RequiredError}
6328
7097
  */
6329
- async bookingControllerUpdateBookingStatus(bookingId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
6330
- const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerUpdateBookingStatus(bookingId, options);
7098
+ async bookingControllerUpdateBookingStatus(bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
7099
+ const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerUpdateBookingStatus(bookingId, updateBookingStatusDto, options);
6331
7100
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
6332
7101
  const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerUpdateBookingStatus']?.[localVarOperationServerIndex]?.url;
6333
7102
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -6346,11 +7115,12 @@ export const BookingApiFactory = function (configuration?: Configuration, basePa
6346
7115
  *
6347
7116
  * @summary Cancel a booking
6348
7117
  * @param {string} bookingId
7118
+ * @param {CancelBookingDto} cancelBookingDto
6349
7119
  * @param {*} [options] Override http request option.
6350
7120
  * @throws {RequiredError}
6351
7121
  */
6352
- bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
6353
- return localVarFp.bookingControllerCancelBooking(bookingId, options).then((request) => request(axios, basePath));
7122
+ bookingControllerCancelBooking(bookingId: string, cancelBookingDto: CancelBookingDto, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
7123
+ return localVarFp.bookingControllerCancelBooking(bookingId, cancelBookingDto, options).then((request) => request(axios, basePath));
6354
7124
  },
6355
7125
  /**
6356
7126
  *
@@ -6407,15 +7177,25 @@ export const BookingApiFactory = function (configuration?: Configuration, basePa
6407
7177
  bookingControllerGetMyBookings(page?: number, pageSize?: number, filters?: FilterMyBookingsDto, options?: RawAxiosRequestConfig): AxiosPromise<BookingsPaginationResultDto> {
6408
7178
  return localVarFp.bookingControllerGetMyBookings(page, pageSize, filters, options).then((request) => request(axios, basePath));
6409
7179
  },
7180
+ /**
7181
+ *
7182
+ * @summary Handle payment webhook from PayOS
7183
+ * @param {*} [options] Override http request option.
7184
+ * @throws {RequiredError}
7185
+ */
7186
+ bookingControllerHandlePaymentWebhook(options?: RawAxiosRequestConfig): AxiosPromise<void> {
7187
+ return localVarFp.bookingControllerHandlePaymentWebhook(options).then((request) => request(axios, basePath));
7188
+ },
6410
7189
  /**
6411
7190
  *
6412
7191
  * @summary Update booking status
6413
7192
  * @param {string} bookingId
7193
+ * @param {UpdateBookingStatusDto} updateBookingStatusDto
6414
7194
  * @param {*} [options] Override http request option.
6415
7195
  * @throws {RequiredError}
6416
7196
  */
6417
- bookingControllerUpdateBookingStatus(bookingId: string, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
6418
- return localVarFp.bookingControllerUpdateBookingStatus(bookingId, options).then((request) => request(axios, basePath));
7197
+ bookingControllerUpdateBookingStatus(bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
7198
+ return localVarFp.bookingControllerUpdateBookingStatus(bookingId, updateBookingStatusDto, options).then((request) => request(axios, basePath));
6419
7199
  },
6420
7200
  };
6421
7201
  };
@@ -6431,12 +7211,13 @@ export class BookingApi extends BaseAPI {
6431
7211
  *
6432
7212
  * @summary Cancel a booking
6433
7213
  * @param {string} bookingId
7214
+ * @param {CancelBookingDto} cancelBookingDto
6434
7215
  * @param {*} [options] Override http request option.
6435
7216
  * @throws {RequiredError}
6436
7217
  * @memberof BookingApi
6437
7218
  */
6438
- public bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig) {
6439
- return BookingApiFp(this.configuration).bookingControllerCancelBooking(bookingId, options).then((request) => request(this.axios, this.basePath));
7219
+ public bookingControllerCancelBooking(bookingId: string, cancelBookingDto: CancelBookingDto, options?: RawAxiosRequestConfig) {
7220
+ return BookingApiFp(this.configuration).bookingControllerCancelBooking(bookingId, cancelBookingDto, options).then((request) => request(this.axios, this.basePath));
6440
7221
  }
6441
7222
 
6442
7223
  /**
@@ -6504,16 +7285,28 @@ export class BookingApi extends BaseAPI {
6504
7285
  return BookingApiFp(this.configuration).bookingControllerGetMyBookings(page, pageSize, filters, options).then((request) => request(this.axios, this.basePath));
6505
7286
  }
6506
7287
 
7288
+ /**
7289
+ *
7290
+ * @summary Handle payment webhook from PayOS
7291
+ * @param {*} [options] Override http request option.
7292
+ * @throws {RequiredError}
7293
+ * @memberof BookingApi
7294
+ */
7295
+ public bookingControllerHandlePaymentWebhook(options?: RawAxiosRequestConfig) {
7296
+ return BookingApiFp(this.configuration).bookingControllerHandlePaymentWebhook(options).then((request) => request(this.axios, this.basePath));
7297
+ }
7298
+
6507
7299
  /**
6508
7300
  *
6509
7301
  * @summary Update booking status
6510
7302
  * @param {string} bookingId
7303
+ * @param {UpdateBookingStatusDto} updateBookingStatusDto
6511
7304
  * @param {*} [options] Override http request option.
6512
7305
  * @throws {RequiredError}
6513
7306
  * @memberof BookingApi
6514
7307
  */
6515
- public bookingControllerUpdateBookingStatus(bookingId: string, options?: RawAxiosRequestConfig) {
6516
- return BookingApiFp(this.configuration).bookingControllerUpdateBookingStatus(bookingId, options).then((request) => request(this.axios, this.basePath));
7308
+ public bookingControllerUpdateBookingStatus(bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options?: RawAxiosRequestConfig) {
7309
+ return BookingApiFp(this.configuration).bookingControllerUpdateBookingStatus(bookingId, updateBookingStatusDto, options).then((request) => request(this.axios, this.basePath));
6517
7310
  }
6518
7311
  }
6519
7312
 
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openapi-client",
11
11
  "openapi-generator"
12
12
  ],
13
- "version": "1.2.0",
13
+ "version": "1.3.0",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"