@ahomevilla-hotel/node-sdk 1.2.0 → 1.3.1
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 +853 -14
- 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
|
|
@@ -2037,6 +2087,52 @@ export const FilterUserDtoRolesEnum = {
|
|
|
2037
2087
|
|
|
2038
2088
|
export type FilterUserDtoRolesEnum = typeof FilterUserDtoRolesEnum[keyof typeof FilterUserDtoRolesEnum];
|
|
2039
2089
|
|
|
2090
|
+
/**
|
|
2091
|
+
*
|
|
2092
|
+
* @export
|
|
2093
|
+
* @interface GetAnalyticsQueryDto
|
|
2094
|
+
*/
|
|
2095
|
+
export interface GetAnalyticsQueryDto {
|
|
2096
|
+
/**
|
|
2097
|
+
* Branch ID to get analytics for
|
|
2098
|
+
* @type {string}
|
|
2099
|
+
* @memberof GetAnalyticsQueryDto
|
|
2100
|
+
*/
|
|
2101
|
+
'branchId'?: string;
|
|
2102
|
+
/**
|
|
2103
|
+
* Start date for analytics (YYYY-MM-DD)
|
|
2104
|
+
* @type {string}
|
|
2105
|
+
* @memberof GetAnalyticsQueryDto
|
|
2106
|
+
*/
|
|
2107
|
+
'startDate'?: string;
|
|
2108
|
+
/**
|
|
2109
|
+
* End date for analytics (YYYY-MM-DD)
|
|
2110
|
+
* @type {string}
|
|
2111
|
+
* @memberof GetAnalyticsQueryDto
|
|
2112
|
+
*/
|
|
2113
|
+
'endDate'?: string;
|
|
2114
|
+
/**
|
|
2115
|
+
* Period type for analytics
|
|
2116
|
+
* @type {string}
|
|
2117
|
+
* @memberof GetAnalyticsQueryDto
|
|
2118
|
+
*/
|
|
2119
|
+
'periodType'?: GetAnalyticsQueryDtoPeriodTypeEnum;
|
|
2120
|
+
/**
|
|
2121
|
+
* Number of months to analyze
|
|
2122
|
+
* @type {number}
|
|
2123
|
+
* @memberof GetAnalyticsQueryDto
|
|
2124
|
+
*/
|
|
2125
|
+
'months'?: number;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
export const GetAnalyticsQueryDtoPeriodTypeEnum = {
|
|
2129
|
+
Daily: 'DAILY',
|
|
2130
|
+
Monthly: 'MONTHLY',
|
|
2131
|
+
Yearly: 'YEARLY'
|
|
2132
|
+
} as const;
|
|
2133
|
+
|
|
2134
|
+
export type GetAnalyticsQueryDtoPeriodTypeEnum = typeof GetAnalyticsQueryDtoPeriodTypeEnum[keyof typeof GetAnalyticsQueryDtoPeriodTypeEnum];
|
|
2135
|
+
|
|
2040
2136
|
/**
|
|
2041
2137
|
*
|
|
2042
2138
|
* @export
|
|
@@ -2370,6 +2466,37 @@ export interface NearBy {
|
|
|
2370
2466
|
*/
|
|
2371
2467
|
'distance': string;
|
|
2372
2468
|
}
|
|
2469
|
+
/**
|
|
2470
|
+
*
|
|
2471
|
+
* @export
|
|
2472
|
+
* @interface OccupancyRateResponseDto
|
|
2473
|
+
*/
|
|
2474
|
+
export interface OccupancyRateResponseDto {
|
|
2475
|
+
/**
|
|
2476
|
+
*
|
|
2477
|
+
* @type {number}
|
|
2478
|
+
* @memberof OccupancyRateResponseDto
|
|
2479
|
+
*/
|
|
2480
|
+
'rate': number;
|
|
2481
|
+
/**
|
|
2482
|
+
*
|
|
2483
|
+
* @type {number}
|
|
2484
|
+
* @memberof OccupancyRateResponseDto
|
|
2485
|
+
*/
|
|
2486
|
+
'totalRooms': number;
|
|
2487
|
+
/**
|
|
2488
|
+
*
|
|
2489
|
+
* @type {number}
|
|
2490
|
+
* @memberof OccupancyRateResponseDto
|
|
2491
|
+
*/
|
|
2492
|
+
'occupiedRooms': number;
|
|
2493
|
+
/**
|
|
2494
|
+
*
|
|
2495
|
+
* @type {object}
|
|
2496
|
+
* @memberof OccupancyRateResponseDto
|
|
2497
|
+
*/
|
|
2498
|
+
'byRoomType': object;
|
|
2499
|
+
}
|
|
2373
2500
|
/**
|
|
2374
2501
|
*
|
|
2375
2502
|
* @export
|
|
@@ -2859,6 +2986,71 @@ export interface ResponseStatus {
|
|
|
2859
2986
|
*/
|
|
2860
2987
|
'message': string;
|
|
2861
2988
|
}
|
|
2989
|
+
/**
|
|
2990
|
+
*
|
|
2991
|
+
* @export
|
|
2992
|
+
* @interface RevenueByRoomTypeDto
|
|
2993
|
+
*/
|
|
2994
|
+
export interface RevenueByRoomTypeDto {
|
|
2995
|
+
/**
|
|
2996
|
+
*
|
|
2997
|
+
* @type {string}
|
|
2998
|
+
* @memberof RevenueByRoomTypeDto
|
|
2999
|
+
*/
|
|
3000
|
+
'roomType': RevenueByRoomTypeDtoRoomTypeEnum;
|
|
3001
|
+
/**
|
|
3002
|
+
*
|
|
3003
|
+
* @type {number}
|
|
3004
|
+
* @memberof RevenueByRoomTypeDto
|
|
3005
|
+
*/
|
|
3006
|
+
'revenue': number;
|
|
3007
|
+
/**
|
|
3008
|
+
*
|
|
3009
|
+
* @type {number}
|
|
3010
|
+
* @memberof RevenueByRoomTypeDto
|
|
3011
|
+
*/
|
|
3012
|
+
'bookingsCount': number;
|
|
3013
|
+
/**
|
|
3014
|
+
*
|
|
3015
|
+
* @type {number}
|
|
3016
|
+
* @memberof RevenueByRoomTypeDto
|
|
3017
|
+
*/
|
|
3018
|
+
'percentageOfTotal': number;
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
export const RevenueByRoomTypeDtoRoomTypeEnum = {
|
|
3022
|
+
Standard: 'STANDARD',
|
|
3023
|
+
Superior: 'SUPERIOR',
|
|
3024
|
+
Deluxe: 'DELUXE'
|
|
3025
|
+
} as const;
|
|
3026
|
+
|
|
3027
|
+
export type RevenueByRoomTypeDtoRoomTypeEnum = typeof RevenueByRoomTypeDtoRoomTypeEnum[keyof typeof RevenueByRoomTypeDtoRoomTypeEnum];
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
*
|
|
3031
|
+
* @export
|
|
3032
|
+
* @interface RevenueTimelineDto
|
|
3033
|
+
*/
|
|
3034
|
+
export interface RevenueTimelineDto {
|
|
3035
|
+
/**
|
|
3036
|
+
*
|
|
3037
|
+
* @type {object}
|
|
3038
|
+
* @memberof RevenueTimelineDto
|
|
3039
|
+
*/
|
|
3040
|
+
'monthlyRevenue': object;
|
|
3041
|
+
/**
|
|
3042
|
+
*
|
|
3043
|
+
* @type {Array<RevenueByRoomTypeDto>}
|
|
3044
|
+
* @memberof RevenueTimelineDto
|
|
3045
|
+
*/
|
|
3046
|
+
'byRoomType': Array<RevenueByRoomTypeDto>;
|
|
3047
|
+
/**
|
|
3048
|
+
*
|
|
3049
|
+
* @type {number}
|
|
3050
|
+
* @memberof RevenueTimelineDto
|
|
3051
|
+
*/
|
|
3052
|
+
'totalRevenue': number;
|
|
3053
|
+
}
|
|
2862
3054
|
/**
|
|
2863
3055
|
*
|
|
2864
3056
|
* @export
|
|
@@ -3102,6 +3294,64 @@ export interface RoomDetailPaginationResultDto {
|
|
|
3102
3294
|
*/
|
|
3103
3295
|
'meta': UsersPaginationResultDtoMeta;
|
|
3104
3296
|
}
|
|
3297
|
+
/**
|
|
3298
|
+
*
|
|
3299
|
+
* @export
|
|
3300
|
+
* @interface RoomPerformanceDto
|
|
3301
|
+
*/
|
|
3302
|
+
export interface RoomPerformanceDto {
|
|
3303
|
+
/**
|
|
3304
|
+
*
|
|
3305
|
+
* @type {string}
|
|
3306
|
+
* @memberof RoomPerformanceDto
|
|
3307
|
+
*/
|
|
3308
|
+
'id': string;
|
|
3309
|
+
/**
|
|
3310
|
+
*
|
|
3311
|
+
* @type {string}
|
|
3312
|
+
* @memberof RoomPerformanceDto
|
|
3313
|
+
*/
|
|
3314
|
+
'name': string;
|
|
3315
|
+
/**
|
|
3316
|
+
*
|
|
3317
|
+
* @type {string}
|
|
3318
|
+
* @memberof RoomPerformanceDto
|
|
3319
|
+
*/
|
|
3320
|
+
'room_type': RoomPerformanceDtoRoomTypeEnum;
|
|
3321
|
+
/**
|
|
3322
|
+
*
|
|
3323
|
+
* @type {number}
|
|
3324
|
+
* @memberof RoomPerformanceDto
|
|
3325
|
+
*/
|
|
3326
|
+
'bookings_count': number;
|
|
3327
|
+
/**
|
|
3328
|
+
*
|
|
3329
|
+
* @type {number}
|
|
3330
|
+
* @memberof RoomPerformanceDto
|
|
3331
|
+
*/
|
|
3332
|
+
'total_revenue': number;
|
|
3333
|
+
/**
|
|
3334
|
+
*
|
|
3335
|
+
* @type {number}
|
|
3336
|
+
* @memberof RoomPerformanceDto
|
|
3337
|
+
*/
|
|
3338
|
+
'average_occupancy': number;
|
|
3339
|
+
/**
|
|
3340
|
+
*
|
|
3341
|
+
* @type {number}
|
|
3342
|
+
* @memberof RoomPerformanceDto
|
|
3343
|
+
*/
|
|
3344
|
+
'cancellation_rate': number;
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
export const RoomPerformanceDtoRoomTypeEnum = {
|
|
3348
|
+
Standard: 'STANDARD',
|
|
3349
|
+
Superior: 'SUPERIOR',
|
|
3350
|
+
Deluxe: 'DELUXE'
|
|
3351
|
+
} as const;
|
|
3352
|
+
|
|
3353
|
+
export type RoomPerformanceDtoRoomTypeEnum = typeof RoomPerformanceDtoRoomTypeEnum[keyof typeof RoomPerformanceDtoRoomTypeEnum];
|
|
3354
|
+
|
|
3105
3355
|
/**
|
|
3106
3356
|
*
|
|
3107
3357
|
* @export
|
|
@@ -3528,6 +3778,32 @@ export const UpdateAmenityDtoTypeEnum = {
|
|
|
3528
3778
|
|
|
3529
3779
|
export type UpdateAmenityDtoTypeEnum = typeof UpdateAmenityDtoTypeEnum[keyof typeof UpdateAmenityDtoTypeEnum];
|
|
3530
3780
|
|
|
3781
|
+
/**
|
|
3782
|
+
*
|
|
3783
|
+
* @export
|
|
3784
|
+
* @interface UpdateBookingStatusDto
|
|
3785
|
+
*/
|
|
3786
|
+
export interface UpdateBookingStatusDto {
|
|
3787
|
+
/**
|
|
3788
|
+
* Booking status
|
|
3789
|
+
* @type {string}
|
|
3790
|
+
* @memberof UpdateBookingStatusDto
|
|
3791
|
+
*/
|
|
3792
|
+
'status': UpdateBookingStatusDtoStatusEnum;
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3795
|
+
export const UpdateBookingStatusDtoStatusEnum = {
|
|
3796
|
+
Pending: 'PENDING',
|
|
3797
|
+
WaitingForCheckIn: 'WAITING_FOR_CHECK_IN',
|
|
3798
|
+
CheckedIn: 'CHECKED_IN',
|
|
3799
|
+
Cancelled: 'CANCELLED',
|
|
3800
|
+
Completed: 'COMPLETED',
|
|
3801
|
+
Refunded: 'REFUNDED',
|
|
3802
|
+
Rejected: 'REJECTED'
|
|
3803
|
+
} as const;
|
|
3804
|
+
|
|
3805
|
+
export type UpdateBookingStatusDtoStatusEnum = typeof UpdateBookingStatusDtoStatusEnum[keyof typeof UpdateBookingStatusDtoStatusEnum];
|
|
3806
|
+
|
|
3531
3807
|
/**
|
|
3532
3808
|
*
|
|
3533
3809
|
* @export
|
|
@@ -4848,6 +5124,489 @@ export class AmenitiesApi extends BaseAPI {
|
|
|
4848
5124
|
|
|
4849
5125
|
|
|
4850
5126
|
|
|
5127
|
+
/**
|
|
5128
|
+
* AnalyticsApi - axios parameter creator
|
|
5129
|
+
* @export
|
|
5130
|
+
*/
|
|
5131
|
+
export const AnalyticsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
5132
|
+
return {
|
|
5133
|
+
/**
|
|
5134
|
+
*
|
|
5135
|
+
* @summary Get analytics summary for a branch
|
|
5136
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5137
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5138
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5139
|
+
* @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
|
|
5140
|
+
* @param {number} [months] Number of months to analyze
|
|
5141
|
+
* @param {*} [options] Override http request option.
|
|
5142
|
+
* @throws {RequiredError}
|
|
5143
|
+
*/
|
|
5144
|
+
analyticsControllerGetAnalyticsSummary: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5145
|
+
const localVarPath = `/api/analytics/summary`;
|
|
5146
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5147
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5148
|
+
let baseOptions;
|
|
5149
|
+
if (configuration) {
|
|
5150
|
+
baseOptions = configuration.baseOptions;
|
|
5151
|
+
}
|
|
5152
|
+
|
|
5153
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5154
|
+
const localVarHeaderParameter = {} as any;
|
|
5155
|
+
const localVarQueryParameter = {} as any;
|
|
5156
|
+
|
|
5157
|
+
if (branchId !== undefined) {
|
|
5158
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
5159
|
+
}
|
|
5160
|
+
|
|
5161
|
+
if (startDate !== undefined) {
|
|
5162
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
5163
|
+
}
|
|
5164
|
+
|
|
5165
|
+
if (endDate !== undefined) {
|
|
5166
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
5167
|
+
}
|
|
5168
|
+
|
|
5169
|
+
if (periodType !== undefined) {
|
|
5170
|
+
localVarQueryParameter['periodType'] = periodType;
|
|
5171
|
+
}
|
|
5172
|
+
|
|
5173
|
+
if (months !== undefined) {
|
|
5174
|
+
localVarQueryParameter['months'] = months;
|
|
5175
|
+
}
|
|
5176
|
+
|
|
5177
|
+
|
|
5178
|
+
|
|
5179
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5180
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5181
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5182
|
+
|
|
5183
|
+
return {
|
|
5184
|
+
url: toPathString(localVarUrlObj),
|
|
5185
|
+
options: localVarRequestOptions,
|
|
5186
|
+
};
|
|
5187
|
+
},
|
|
5188
|
+
/**
|
|
5189
|
+
*
|
|
5190
|
+
* @summary Get occupancy rate analytics
|
|
5191
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5192
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5193
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5194
|
+
* @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
|
|
5195
|
+
* @param {number} [months] Number of months to analyze
|
|
5196
|
+
* @param {*} [options] Override http request option.
|
|
5197
|
+
* @throws {RequiredError}
|
|
5198
|
+
*/
|
|
5199
|
+
analyticsControllerGetOccupancyRate: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5200
|
+
const localVarPath = `/api/analytics/occupancy`;
|
|
5201
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5202
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5203
|
+
let baseOptions;
|
|
5204
|
+
if (configuration) {
|
|
5205
|
+
baseOptions = configuration.baseOptions;
|
|
5206
|
+
}
|
|
5207
|
+
|
|
5208
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5209
|
+
const localVarHeaderParameter = {} as any;
|
|
5210
|
+
const localVarQueryParameter = {} as any;
|
|
5211
|
+
|
|
5212
|
+
if (branchId !== undefined) {
|
|
5213
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
5214
|
+
}
|
|
5215
|
+
|
|
5216
|
+
if (startDate !== undefined) {
|
|
5217
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
5218
|
+
}
|
|
5219
|
+
|
|
5220
|
+
if (endDate !== undefined) {
|
|
5221
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
5222
|
+
}
|
|
5223
|
+
|
|
5224
|
+
if (periodType !== undefined) {
|
|
5225
|
+
localVarQueryParameter['periodType'] = periodType;
|
|
5226
|
+
}
|
|
5227
|
+
|
|
5228
|
+
if (months !== undefined) {
|
|
5229
|
+
localVarQueryParameter['months'] = months;
|
|
5230
|
+
}
|
|
5231
|
+
|
|
5232
|
+
|
|
5233
|
+
|
|
5234
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5235
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5236
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5237
|
+
|
|
5238
|
+
return {
|
|
5239
|
+
url: toPathString(localVarUrlObj),
|
|
5240
|
+
options: localVarRequestOptions,
|
|
5241
|
+
};
|
|
5242
|
+
},
|
|
5243
|
+
/**
|
|
5244
|
+
*
|
|
5245
|
+
* @summary Get revenue analytics
|
|
5246
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5247
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5248
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5249
|
+
* @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
|
|
5250
|
+
* @param {number} [months] Number of months to analyze
|
|
5251
|
+
* @param {*} [options] Override http request option.
|
|
5252
|
+
* @throws {RequiredError}
|
|
5253
|
+
*/
|
|
5254
|
+
analyticsControllerGetRevenueAnalytics: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5255
|
+
const localVarPath = `/api/analytics/revenue`;
|
|
5256
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5257
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5258
|
+
let baseOptions;
|
|
5259
|
+
if (configuration) {
|
|
5260
|
+
baseOptions = configuration.baseOptions;
|
|
5261
|
+
}
|
|
5262
|
+
|
|
5263
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5264
|
+
const localVarHeaderParameter = {} as any;
|
|
5265
|
+
const localVarQueryParameter = {} as any;
|
|
5266
|
+
|
|
5267
|
+
if (branchId !== undefined) {
|
|
5268
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
5269
|
+
}
|
|
5270
|
+
|
|
5271
|
+
if (startDate !== undefined) {
|
|
5272
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
5273
|
+
}
|
|
5274
|
+
|
|
5275
|
+
if (endDate !== undefined) {
|
|
5276
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
5277
|
+
}
|
|
5278
|
+
|
|
5279
|
+
if (periodType !== undefined) {
|
|
5280
|
+
localVarQueryParameter['periodType'] = periodType;
|
|
5281
|
+
}
|
|
5282
|
+
|
|
5283
|
+
if (months !== undefined) {
|
|
5284
|
+
localVarQueryParameter['months'] = months;
|
|
5285
|
+
}
|
|
5286
|
+
|
|
5287
|
+
|
|
5288
|
+
|
|
5289
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5290
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5291
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5292
|
+
|
|
5293
|
+
return {
|
|
5294
|
+
url: toPathString(localVarUrlObj),
|
|
5295
|
+
options: localVarRequestOptions,
|
|
5296
|
+
};
|
|
5297
|
+
},
|
|
5298
|
+
/**
|
|
5299
|
+
*
|
|
5300
|
+
* @summary Get room performance analytics
|
|
5301
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5302
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5303
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5304
|
+
* @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
|
|
5305
|
+
* @param {number} [months] Number of months to analyze
|
|
5306
|
+
* @param {*} [options] Override http request option.
|
|
5307
|
+
* @throws {RequiredError}
|
|
5308
|
+
*/
|
|
5309
|
+
analyticsControllerGetRoomPerformance: async (branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5310
|
+
const localVarPath = `/api/analytics/room-performance`;
|
|
5311
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5312
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5313
|
+
let baseOptions;
|
|
5314
|
+
if (configuration) {
|
|
5315
|
+
baseOptions = configuration.baseOptions;
|
|
5316
|
+
}
|
|
5317
|
+
|
|
5318
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5319
|
+
const localVarHeaderParameter = {} as any;
|
|
5320
|
+
const localVarQueryParameter = {} as any;
|
|
5321
|
+
|
|
5322
|
+
if (branchId !== undefined) {
|
|
5323
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
5324
|
+
}
|
|
5325
|
+
|
|
5326
|
+
if (startDate !== undefined) {
|
|
5327
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
|
+
if (endDate !== undefined) {
|
|
5331
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
5332
|
+
}
|
|
5333
|
+
|
|
5334
|
+
if (periodType !== undefined) {
|
|
5335
|
+
localVarQueryParameter['periodType'] = periodType;
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5338
|
+
if (months !== undefined) {
|
|
5339
|
+
localVarQueryParameter['months'] = months;
|
|
5340
|
+
}
|
|
5341
|
+
|
|
5342
|
+
|
|
5343
|
+
|
|
5344
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5345
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5346
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5347
|
+
|
|
5348
|
+
return {
|
|
5349
|
+
url: toPathString(localVarUrlObj),
|
|
5350
|
+
options: localVarRequestOptions,
|
|
5351
|
+
};
|
|
5352
|
+
},
|
|
5353
|
+
}
|
|
5354
|
+
};
|
|
5355
|
+
|
|
5356
|
+
/**
|
|
5357
|
+
* AnalyticsApi - functional programming interface
|
|
5358
|
+
* @export
|
|
5359
|
+
*/
|
|
5360
|
+
export const AnalyticsApiFp = function(configuration?: Configuration) {
|
|
5361
|
+
const localVarAxiosParamCreator = AnalyticsApiAxiosParamCreator(configuration)
|
|
5362
|
+
return {
|
|
5363
|
+
/**
|
|
5364
|
+
*
|
|
5365
|
+
* @summary Get analytics summary for a branch
|
|
5366
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5367
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5368
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5369
|
+
* @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
|
|
5370
|
+
* @param {number} [months] Number of months to analyze
|
|
5371
|
+
* @param {*} [options] Override http request option.
|
|
5372
|
+
* @throws {RequiredError}
|
|
5373
|
+
*/
|
|
5374
|
+
async analyticsControllerGetAnalyticsSummary(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AnalyticsSummaryDto>> {
|
|
5375
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetAnalyticsSummary(branchId, startDate, endDate, periodType, months, options);
|
|
5376
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5377
|
+
const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetAnalyticsSummary']?.[localVarOperationServerIndex]?.url;
|
|
5378
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5379
|
+
},
|
|
5380
|
+
/**
|
|
5381
|
+
*
|
|
5382
|
+
* @summary Get occupancy rate analytics
|
|
5383
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5384
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5385
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5386
|
+
* @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
|
|
5387
|
+
* @param {number} [months] Number of months to analyze
|
|
5388
|
+
* @param {*} [options] Override http request option.
|
|
5389
|
+
* @throws {RequiredError}
|
|
5390
|
+
*/
|
|
5391
|
+
async analyticsControllerGetOccupancyRate(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OccupancyRateResponseDto>> {
|
|
5392
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetOccupancyRate(branchId, startDate, endDate, periodType, months, options);
|
|
5393
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5394
|
+
const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetOccupancyRate']?.[localVarOperationServerIndex]?.url;
|
|
5395
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5396
|
+
},
|
|
5397
|
+
/**
|
|
5398
|
+
*
|
|
5399
|
+
* @summary Get revenue analytics
|
|
5400
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5401
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5402
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5403
|
+
* @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
|
|
5404
|
+
* @param {number} [months] Number of months to analyze
|
|
5405
|
+
* @param {*} [options] Override http request option.
|
|
5406
|
+
* @throws {RequiredError}
|
|
5407
|
+
*/
|
|
5408
|
+
async analyticsControllerGetRevenueAnalytics(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RevenueTimelineDto>> {
|
|
5409
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetRevenueAnalytics(branchId, startDate, endDate, periodType, months, options);
|
|
5410
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5411
|
+
const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetRevenueAnalytics']?.[localVarOperationServerIndex]?.url;
|
|
5412
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5413
|
+
},
|
|
5414
|
+
/**
|
|
5415
|
+
*
|
|
5416
|
+
* @summary Get room performance analytics
|
|
5417
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5418
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5419
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5420
|
+
* @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
|
|
5421
|
+
* @param {number} [months] Number of months to analyze
|
|
5422
|
+
* @param {*} [options] Override http request option.
|
|
5423
|
+
* @throws {RequiredError}
|
|
5424
|
+
*/
|
|
5425
|
+
async analyticsControllerGetRoomPerformance(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RoomPerformanceDto>>> {
|
|
5426
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsControllerGetRoomPerformance(branchId, startDate, endDate, periodType, months, options);
|
|
5427
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5428
|
+
const localVarOperationServerBasePath = operationServerMap['AnalyticsApi.analyticsControllerGetRoomPerformance']?.[localVarOperationServerIndex]?.url;
|
|
5429
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5430
|
+
},
|
|
5431
|
+
}
|
|
5432
|
+
};
|
|
5433
|
+
|
|
5434
|
+
/**
|
|
5435
|
+
* AnalyticsApi - factory interface
|
|
5436
|
+
* @export
|
|
5437
|
+
*/
|
|
5438
|
+
export const AnalyticsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
5439
|
+
const localVarFp = AnalyticsApiFp(configuration)
|
|
5440
|
+
return {
|
|
5441
|
+
/**
|
|
5442
|
+
*
|
|
5443
|
+
* @summary Get analytics summary for a branch
|
|
5444
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5445
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5446
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5447
|
+
* @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
|
|
5448
|
+
* @param {number} [months] Number of months to analyze
|
|
5449
|
+
* @param {*} [options] Override http request option.
|
|
5450
|
+
* @throws {RequiredError}
|
|
5451
|
+
*/
|
|
5452
|
+
analyticsControllerGetAnalyticsSummary(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<AnalyticsSummaryDto> {
|
|
5453
|
+
return localVarFp.analyticsControllerGetAnalyticsSummary(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
|
|
5454
|
+
},
|
|
5455
|
+
/**
|
|
5456
|
+
*
|
|
5457
|
+
* @summary Get occupancy rate analytics
|
|
5458
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5459
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5460
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5461
|
+
* @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
|
|
5462
|
+
* @param {number} [months] Number of months to analyze
|
|
5463
|
+
* @param {*} [options] Override http request option.
|
|
5464
|
+
* @throws {RequiredError}
|
|
5465
|
+
*/
|
|
5466
|
+
analyticsControllerGetOccupancyRate(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<OccupancyRateResponseDto> {
|
|
5467
|
+
return localVarFp.analyticsControllerGetOccupancyRate(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
|
|
5468
|
+
},
|
|
5469
|
+
/**
|
|
5470
|
+
*
|
|
5471
|
+
* @summary Get revenue analytics
|
|
5472
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5473
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5474
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5475
|
+
* @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
|
|
5476
|
+
* @param {number} [months] Number of months to analyze
|
|
5477
|
+
* @param {*} [options] Override http request option.
|
|
5478
|
+
* @throws {RequiredError}
|
|
5479
|
+
*/
|
|
5480
|
+
analyticsControllerGetRevenueAnalytics(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<RevenueTimelineDto> {
|
|
5481
|
+
return localVarFp.analyticsControllerGetRevenueAnalytics(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
|
|
5482
|
+
},
|
|
5483
|
+
/**
|
|
5484
|
+
*
|
|
5485
|
+
* @summary Get room performance analytics
|
|
5486
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5487
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5488
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5489
|
+
* @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
|
|
5490
|
+
* @param {number} [months] Number of months to analyze
|
|
5491
|
+
* @param {*} [options] Override http request option.
|
|
5492
|
+
* @throws {RequiredError}
|
|
5493
|
+
*/
|
|
5494
|
+
analyticsControllerGetRoomPerformance(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<RoomPerformanceDto>> {
|
|
5495
|
+
return localVarFp.analyticsControllerGetRoomPerformance(branchId, startDate, endDate, periodType, months, options).then((request) => request(axios, basePath));
|
|
5496
|
+
},
|
|
5497
|
+
};
|
|
5498
|
+
};
|
|
5499
|
+
|
|
5500
|
+
/**
|
|
5501
|
+
* AnalyticsApi - object-oriented interface
|
|
5502
|
+
* @export
|
|
5503
|
+
* @class AnalyticsApi
|
|
5504
|
+
* @extends {BaseAPI}
|
|
5505
|
+
*/
|
|
5506
|
+
export class AnalyticsApi extends BaseAPI {
|
|
5507
|
+
/**
|
|
5508
|
+
*
|
|
5509
|
+
* @summary Get analytics summary for a branch
|
|
5510
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5511
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5512
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5513
|
+
* @param {AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum} [periodType] Period type for analytics
|
|
5514
|
+
* @param {number} [months] Number of months to analyze
|
|
5515
|
+
* @param {*} [options] Override http request option.
|
|
5516
|
+
* @throws {RequiredError}
|
|
5517
|
+
* @memberof AnalyticsApi
|
|
5518
|
+
*/
|
|
5519
|
+
public analyticsControllerGetAnalyticsSummary(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
|
|
5520
|
+
return AnalyticsApiFp(this.configuration).analyticsControllerGetAnalyticsSummary(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
|
|
5521
|
+
}
|
|
5522
|
+
|
|
5523
|
+
/**
|
|
5524
|
+
*
|
|
5525
|
+
* @summary Get occupancy rate analytics
|
|
5526
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5527
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5528
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5529
|
+
* @param {AnalyticsControllerGetOccupancyRatePeriodTypeEnum} [periodType] Period type for analytics
|
|
5530
|
+
* @param {number} [months] Number of months to analyze
|
|
5531
|
+
* @param {*} [options] Override http request option.
|
|
5532
|
+
* @throws {RequiredError}
|
|
5533
|
+
* @memberof AnalyticsApi
|
|
5534
|
+
*/
|
|
5535
|
+
public analyticsControllerGetOccupancyRate(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetOccupancyRatePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
|
|
5536
|
+
return AnalyticsApiFp(this.configuration).analyticsControllerGetOccupancyRate(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5539
|
+
/**
|
|
5540
|
+
*
|
|
5541
|
+
* @summary Get revenue analytics
|
|
5542
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5543
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5544
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5545
|
+
* @param {AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum} [periodType] Period type for analytics
|
|
5546
|
+
* @param {number} [months] Number of months to analyze
|
|
5547
|
+
* @param {*} [options] Override http request option.
|
|
5548
|
+
* @throws {RequiredError}
|
|
5549
|
+
* @memberof AnalyticsApi
|
|
5550
|
+
*/
|
|
5551
|
+
public analyticsControllerGetRevenueAnalytics(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
|
|
5552
|
+
return AnalyticsApiFp(this.configuration).analyticsControllerGetRevenueAnalytics(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
/**
|
|
5556
|
+
*
|
|
5557
|
+
* @summary Get room performance analytics
|
|
5558
|
+
* @param {string} [branchId] Branch ID to get analytics for
|
|
5559
|
+
* @param {string} [startDate] Start date for analytics (YYYY-MM-DD)
|
|
5560
|
+
* @param {string} [endDate] End date for analytics (YYYY-MM-DD)
|
|
5561
|
+
* @param {AnalyticsControllerGetRoomPerformancePeriodTypeEnum} [periodType] Period type for analytics
|
|
5562
|
+
* @param {number} [months] Number of months to analyze
|
|
5563
|
+
* @param {*} [options] Override http request option.
|
|
5564
|
+
* @throws {RequiredError}
|
|
5565
|
+
* @memberof AnalyticsApi
|
|
5566
|
+
*/
|
|
5567
|
+
public analyticsControllerGetRoomPerformance(branchId?: string, startDate?: string, endDate?: string, periodType?: AnalyticsControllerGetRoomPerformancePeriodTypeEnum, months?: number, options?: RawAxiosRequestConfig) {
|
|
5568
|
+
return AnalyticsApiFp(this.configuration).analyticsControllerGetRoomPerformance(branchId, startDate, endDate, periodType, months, options).then((request) => request(this.axios, this.basePath));
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
/**
|
|
5573
|
+
* @export
|
|
5574
|
+
*/
|
|
5575
|
+
export const AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum = {
|
|
5576
|
+
Daily: 'DAILY',
|
|
5577
|
+
Monthly: 'MONTHLY',
|
|
5578
|
+
Yearly: 'YEARLY'
|
|
5579
|
+
} as const;
|
|
5580
|
+
export type AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum = typeof AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum[keyof typeof AnalyticsControllerGetAnalyticsSummaryPeriodTypeEnum];
|
|
5581
|
+
/**
|
|
5582
|
+
* @export
|
|
5583
|
+
*/
|
|
5584
|
+
export const AnalyticsControllerGetOccupancyRatePeriodTypeEnum = {
|
|
5585
|
+
Daily: 'DAILY',
|
|
5586
|
+
Monthly: 'MONTHLY',
|
|
5587
|
+
Yearly: 'YEARLY'
|
|
5588
|
+
} as const;
|
|
5589
|
+
export type AnalyticsControllerGetOccupancyRatePeriodTypeEnum = typeof AnalyticsControllerGetOccupancyRatePeriodTypeEnum[keyof typeof AnalyticsControllerGetOccupancyRatePeriodTypeEnum];
|
|
5590
|
+
/**
|
|
5591
|
+
* @export
|
|
5592
|
+
*/
|
|
5593
|
+
export const AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum = {
|
|
5594
|
+
Daily: 'DAILY',
|
|
5595
|
+
Monthly: 'MONTHLY',
|
|
5596
|
+
Yearly: 'YEARLY'
|
|
5597
|
+
} as const;
|
|
5598
|
+
export type AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum = typeof AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum[keyof typeof AnalyticsControllerGetRevenueAnalyticsPeriodTypeEnum];
|
|
5599
|
+
/**
|
|
5600
|
+
* @export
|
|
5601
|
+
*/
|
|
5602
|
+
export const AnalyticsControllerGetRoomPerformancePeriodTypeEnum = {
|
|
5603
|
+
Daily: 'DAILY',
|
|
5604
|
+
Monthly: 'MONTHLY',
|
|
5605
|
+
Yearly: 'YEARLY'
|
|
5606
|
+
} as const;
|
|
5607
|
+
export type AnalyticsControllerGetRoomPerformancePeriodTypeEnum = typeof AnalyticsControllerGetRoomPerformancePeriodTypeEnum[keyof typeof AnalyticsControllerGetRoomPerformancePeriodTypeEnum];
|
|
5608
|
+
|
|
5609
|
+
|
|
4851
5610
|
/**
|
|
4852
5611
|
* AppApi - axios parameter creator
|
|
4853
5612
|
* @export
|
|
@@ -5959,12 +6718,15 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
5959
6718
|
*
|
|
5960
6719
|
* @summary Cancel a booking
|
|
5961
6720
|
* @param {string} bookingId
|
|
6721
|
+
* @param {CancelBookingDto} cancelBookingDto
|
|
5962
6722
|
* @param {*} [options] Override http request option.
|
|
5963
6723
|
* @throws {RequiredError}
|
|
5964
6724
|
*/
|
|
5965
|
-
bookingControllerCancelBooking: async (bookingId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6725
|
+
bookingControllerCancelBooking: async (bookingId: string, cancelBookingDto: CancelBookingDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5966
6726
|
// verify required parameter 'bookingId' is not null or undefined
|
|
5967
6727
|
assertParamExists('bookingControllerCancelBooking', 'bookingId', bookingId)
|
|
6728
|
+
// verify required parameter 'cancelBookingDto' is not null or undefined
|
|
6729
|
+
assertParamExists('bookingControllerCancelBooking', 'cancelBookingDto', cancelBookingDto)
|
|
5968
6730
|
const localVarPath = `/api/booking/cancel/{bookingId}`
|
|
5969
6731
|
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
5970
6732
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -5980,9 +6742,12 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
5980
6742
|
|
|
5981
6743
|
|
|
5982
6744
|
|
|
6745
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
6746
|
+
|
|
5983
6747
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5984
6748
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5985
6749
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
6750
|
+
localVarRequestOptions.data = serializeDataIfNeeded(cancelBookingDto, localVarRequestOptions, configuration)
|
|
5986
6751
|
|
|
5987
6752
|
return {
|
|
5988
6753
|
url: toPathString(localVarUrlObj),
|
|
@@ -6183,6 +6948,36 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6183
6948
|
|
|
6184
6949
|
|
|
6185
6950
|
|
|
6951
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6952
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6953
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
6954
|
+
|
|
6955
|
+
return {
|
|
6956
|
+
url: toPathString(localVarUrlObj),
|
|
6957
|
+
options: localVarRequestOptions,
|
|
6958
|
+
};
|
|
6959
|
+
},
|
|
6960
|
+
/**
|
|
6961
|
+
*
|
|
6962
|
+
* @summary Handle payment webhook from PayOS
|
|
6963
|
+
* @param {*} [options] Override http request option.
|
|
6964
|
+
* @throws {RequiredError}
|
|
6965
|
+
*/
|
|
6966
|
+
bookingControllerHandlePaymentWebhook: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6967
|
+
const localVarPath = `/api/booking/webhook/payment`;
|
|
6968
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6969
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6970
|
+
let baseOptions;
|
|
6971
|
+
if (configuration) {
|
|
6972
|
+
baseOptions = configuration.baseOptions;
|
|
6973
|
+
}
|
|
6974
|
+
|
|
6975
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
6976
|
+
const localVarHeaderParameter = {} as any;
|
|
6977
|
+
const localVarQueryParameter = {} as any;
|
|
6978
|
+
|
|
6979
|
+
|
|
6980
|
+
|
|
6186
6981
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6187
6982
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6188
6983
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -6196,12 +6991,15 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6196
6991
|
*
|
|
6197
6992
|
* @summary Update booking status
|
|
6198
6993
|
* @param {string} bookingId
|
|
6994
|
+
* @param {UpdateBookingStatusDto} updateBookingStatusDto
|
|
6199
6995
|
* @param {*} [options] Override http request option.
|
|
6200
6996
|
* @throws {RequiredError}
|
|
6201
6997
|
*/
|
|
6202
|
-
bookingControllerUpdateBookingStatus: async (bookingId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6998
|
+
bookingControllerUpdateBookingStatus: async (bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6203
6999
|
// verify required parameter 'bookingId' is not null or undefined
|
|
6204
7000
|
assertParamExists('bookingControllerUpdateBookingStatus', 'bookingId', bookingId)
|
|
7001
|
+
// verify required parameter 'updateBookingStatusDto' is not null or undefined
|
|
7002
|
+
assertParamExists('bookingControllerUpdateBookingStatus', 'updateBookingStatusDto', updateBookingStatusDto)
|
|
6205
7003
|
const localVarPath = `/api/booking/update-status/{bookingId}`
|
|
6206
7004
|
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
6207
7005
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -6217,9 +7015,12 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6217
7015
|
|
|
6218
7016
|
|
|
6219
7017
|
|
|
7018
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
7019
|
+
|
|
6220
7020
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6221
7021
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6222
7022
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
7023
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateBookingStatusDto, localVarRequestOptions, configuration)
|
|
6223
7024
|
|
|
6224
7025
|
return {
|
|
6225
7026
|
url: toPathString(localVarUrlObj),
|
|
@@ -6240,11 +7041,12 @@ export const BookingApiFp = function(configuration?: Configuration) {
|
|
|
6240
7041
|
*
|
|
6241
7042
|
* @summary Cancel a booking
|
|
6242
7043
|
* @param {string} bookingId
|
|
7044
|
+
* @param {CancelBookingDto} cancelBookingDto
|
|
6243
7045
|
* @param {*} [options] Override http request option.
|
|
6244
7046
|
* @throws {RequiredError}
|
|
6245
7047
|
*/
|
|
6246
|
-
async bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
|
|
6247
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerCancelBooking(bookingId, options);
|
|
7048
|
+
async bookingControllerCancelBooking(bookingId: string, cancelBookingDto: CancelBookingDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
|
|
7049
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerCancelBooking(bookingId, cancelBookingDto, options);
|
|
6248
7050
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6249
7051
|
const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerCancelBooking']?.[localVarOperationServerIndex]?.url;
|
|
6250
7052
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -6319,15 +7121,28 @@ export const BookingApiFp = function(configuration?: Configuration) {
|
|
|
6319
7121
|
const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerGetMyBookings']?.[localVarOperationServerIndex]?.url;
|
|
6320
7122
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6321
7123
|
},
|
|
7124
|
+
/**
|
|
7125
|
+
*
|
|
7126
|
+
* @summary Handle payment webhook from PayOS
|
|
7127
|
+
* @param {*} [options] Override http request option.
|
|
7128
|
+
* @throws {RequiredError}
|
|
7129
|
+
*/
|
|
7130
|
+
async bookingControllerHandlePaymentWebhook(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
7131
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerHandlePaymentWebhook(options);
|
|
7132
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
7133
|
+
const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerHandlePaymentWebhook']?.[localVarOperationServerIndex]?.url;
|
|
7134
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
7135
|
+
},
|
|
6322
7136
|
/**
|
|
6323
7137
|
*
|
|
6324
7138
|
* @summary Update booking status
|
|
6325
7139
|
* @param {string} bookingId
|
|
7140
|
+
* @param {UpdateBookingStatusDto} updateBookingStatusDto
|
|
6326
7141
|
* @param {*} [options] Override http request option.
|
|
6327
7142
|
* @throws {RequiredError}
|
|
6328
7143
|
*/
|
|
6329
|
-
async bookingControllerUpdateBookingStatus(bookingId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
|
|
6330
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerUpdateBookingStatus(bookingId, options);
|
|
7144
|
+
async bookingControllerUpdateBookingStatus(bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
|
|
7145
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerUpdateBookingStatus(bookingId, updateBookingStatusDto, options);
|
|
6331
7146
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6332
7147
|
const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerUpdateBookingStatus']?.[localVarOperationServerIndex]?.url;
|
|
6333
7148
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -6346,11 +7161,12 @@ export const BookingApiFactory = function (configuration?: Configuration, basePa
|
|
|
6346
7161
|
*
|
|
6347
7162
|
* @summary Cancel a booking
|
|
6348
7163
|
* @param {string} bookingId
|
|
7164
|
+
* @param {CancelBookingDto} cancelBookingDto
|
|
6349
7165
|
* @param {*} [options] Override http request option.
|
|
6350
7166
|
* @throws {RequiredError}
|
|
6351
7167
|
*/
|
|
6352
|
-
bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
|
|
6353
|
-
return localVarFp.bookingControllerCancelBooking(bookingId, options).then((request) => request(axios, basePath));
|
|
7168
|
+
bookingControllerCancelBooking(bookingId: string, cancelBookingDto: CancelBookingDto, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
|
|
7169
|
+
return localVarFp.bookingControllerCancelBooking(bookingId, cancelBookingDto, options).then((request) => request(axios, basePath));
|
|
6354
7170
|
},
|
|
6355
7171
|
/**
|
|
6356
7172
|
*
|
|
@@ -6407,15 +7223,25 @@ export const BookingApiFactory = function (configuration?: Configuration, basePa
|
|
|
6407
7223
|
bookingControllerGetMyBookings(page?: number, pageSize?: number, filters?: FilterMyBookingsDto, options?: RawAxiosRequestConfig): AxiosPromise<BookingsPaginationResultDto> {
|
|
6408
7224
|
return localVarFp.bookingControllerGetMyBookings(page, pageSize, filters, options).then((request) => request(axios, basePath));
|
|
6409
7225
|
},
|
|
7226
|
+
/**
|
|
7227
|
+
*
|
|
7228
|
+
* @summary Handle payment webhook from PayOS
|
|
7229
|
+
* @param {*} [options] Override http request option.
|
|
7230
|
+
* @throws {RequiredError}
|
|
7231
|
+
*/
|
|
7232
|
+
bookingControllerHandlePaymentWebhook(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
7233
|
+
return localVarFp.bookingControllerHandlePaymentWebhook(options).then((request) => request(axios, basePath));
|
|
7234
|
+
},
|
|
6410
7235
|
/**
|
|
6411
7236
|
*
|
|
6412
7237
|
* @summary Update booking status
|
|
6413
7238
|
* @param {string} bookingId
|
|
7239
|
+
* @param {UpdateBookingStatusDto} updateBookingStatusDto
|
|
6414
7240
|
* @param {*} [options] Override http request option.
|
|
6415
7241
|
* @throws {RequiredError}
|
|
6416
7242
|
*/
|
|
6417
|
-
bookingControllerUpdateBookingStatus(bookingId: string, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
|
|
6418
|
-
return localVarFp.bookingControllerUpdateBookingStatus(bookingId, options).then((request) => request(axios, basePath));
|
|
7243
|
+
bookingControllerUpdateBookingStatus(bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
|
|
7244
|
+
return localVarFp.bookingControllerUpdateBookingStatus(bookingId, updateBookingStatusDto, options).then((request) => request(axios, basePath));
|
|
6419
7245
|
},
|
|
6420
7246
|
};
|
|
6421
7247
|
};
|
|
@@ -6431,12 +7257,13 @@ export class BookingApi extends BaseAPI {
|
|
|
6431
7257
|
*
|
|
6432
7258
|
* @summary Cancel a booking
|
|
6433
7259
|
* @param {string} bookingId
|
|
7260
|
+
* @param {CancelBookingDto} cancelBookingDto
|
|
6434
7261
|
* @param {*} [options] Override http request option.
|
|
6435
7262
|
* @throws {RequiredError}
|
|
6436
7263
|
* @memberof BookingApi
|
|
6437
7264
|
*/
|
|
6438
|
-
public bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig) {
|
|
6439
|
-
return BookingApiFp(this.configuration).bookingControllerCancelBooking(bookingId, options).then((request) => request(this.axios, this.basePath));
|
|
7265
|
+
public bookingControllerCancelBooking(bookingId: string, cancelBookingDto: CancelBookingDto, options?: RawAxiosRequestConfig) {
|
|
7266
|
+
return BookingApiFp(this.configuration).bookingControllerCancelBooking(bookingId, cancelBookingDto, options).then((request) => request(this.axios, this.basePath));
|
|
6440
7267
|
}
|
|
6441
7268
|
|
|
6442
7269
|
/**
|
|
@@ -6504,16 +7331,28 @@ export class BookingApi extends BaseAPI {
|
|
|
6504
7331
|
return BookingApiFp(this.configuration).bookingControllerGetMyBookings(page, pageSize, filters, options).then((request) => request(this.axios, this.basePath));
|
|
6505
7332
|
}
|
|
6506
7333
|
|
|
7334
|
+
/**
|
|
7335
|
+
*
|
|
7336
|
+
* @summary Handle payment webhook from PayOS
|
|
7337
|
+
* @param {*} [options] Override http request option.
|
|
7338
|
+
* @throws {RequiredError}
|
|
7339
|
+
* @memberof BookingApi
|
|
7340
|
+
*/
|
|
7341
|
+
public bookingControllerHandlePaymentWebhook(options?: RawAxiosRequestConfig) {
|
|
7342
|
+
return BookingApiFp(this.configuration).bookingControllerHandlePaymentWebhook(options).then((request) => request(this.axios, this.basePath));
|
|
7343
|
+
}
|
|
7344
|
+
|
|
6507
7345
|
/**
|
|
6508
7346
|
*
|
|
6509
7347
|
* @summary Update booking status
|
|
6510
7348
|
* @param {string} bookingId
|
|
7349
|
+
* @param {UpdateBookingStatusDto} updateBookingStatusDto
|
|
6511
7350
|
* @param {*} [options] Override http request option.
|
|
6512
7351
|
* @throws {RequiredError}
|
|
6513
7352
|
* @memberof BookingApi
|
|
6514
7353
|
*/
|
|
6515
|
-
public bookingControllerUpdateBookingStatus(bookingId: string, options?: RawAxiosRequestConfig) {
|
|
6516
|
-
return BookingApiFp(this.configuration).bookingControllerUpdateBookingStatus(bookingId, options).then((request) => request(this.axios, this.basePath));
|
|
7354
|
+
public bookingControllerUpdateBookingStatus(bookingId: string, updateBookingStatusDto: UpdateBookingStatusDto, options?: RawAxiosRequestConfig) {
|
|
7355
|
+
return BookingApiFp(this.configuration).bookingControllerUpdateBookingStatus(bookingId, updateBookingStatusDto, options).then((request) => request(this.axios, this.basePath));
|
|
6517
7356
|
}
|
|
6518
7357
|
}
|
|
6519
7358
|
|