@ahomevilla-hotel/node-sdk 1.1.8 → 1.2.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 +533 -2
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -791,6 +791,25 @@ export interface BranchesPaginationResultDto {
791
791
  */
792
792
  'meta': UsersPaginationResultDtoMeta;
793
793
  }
794
+ /**
795
+ *
796
+ * @export
797
+ * @interface CancelPaymentRequestDto
798
+ */
799
+ export interface CancelPaymentRequestDto {
800
+ /**
801
+ *
802
+ * @type {string}
803
+ * @memberof CancelPaymentRequestDto
804
+ */
805
+ 'paymentLinkId': string;
806
+ /**
807
+ *
808
+ * @type {string}
809
+ * @memberof CancelPaymentRequestDto
810
+ */
811
+ 'cancelReason': string;
812
+ }
794
813
  /**
795
814
  *
796
815
  * @export
@@ -816,6 +835,37 @@ export interface ChangePasswordDto {
816
835
  */
817
836
  'confirmPassword': string;
818
837
  }
838
+ /**
839
+ *
840
+ * @export
841
+ * @interface ConfirmPaymentWebhookDto
842
+ */
843
+ export interface ConfirmPaymentWebhookDto {
844
+ /**
845
+ *
846
+ * @type {string}
847
+ * @memberof ConfirmPaymentWebhookDto
848
+ */
849
+ 'code': string;
850
+ /**
851
+ *
852
+ * @type {string}
853
+ * @memberof ConfirmPaymentWebhookDto
854
+ */
855
+ 'desc': string;
856
+ /**
857
+ *
858
+ * @type {object}
859
+ * @memberof ConfirmPaymentWebhookDto
860
+ */
861
+ 'data': object;
862
+ /**
863
+ *
864
+ * @type {string}
865
+ * @memberof ConfirmPaymentWebhookDto
866
+ */
867
+ 'signature': string;
868
+ }
819
869
  /**
820
870
  *
821
871
  * @export
@@ -892,6 +942,18 @@ export interface CreateBookingAtHotelDto {
892
942
  * @memberof CreateBookingAtHotelDto
893
943
  */
894
944
  'end_time': string;
945
+ /**
946
+ * Name of the guest
947
+ * @type {string}
948
+ * @memberof CreateBookingAtHotelDto
949
+ */
950
+ 'name'?: string;
951
+ /**
952
+ * Phone number of the guest
953
+ * @type {string}
954
+ * @memberof CreateBookingAtHotelDto
955
+ */
956
+ 'phone'?: string;
895
957
  /**
896
958
  * Number of guests
897
959
  * @type {number}
@@ -986,6 +1048,18 @@ export interface CreateBookingOnlineDto {
986
1048
  * @memberof CreateBookingOnlineDto
987
1049
  */
988
1050
  'end_time': string;
1051
+ /**
1052
+ * Name of the guest
1053
+ * @type {string}
1054
+ * @memberof CreateBookingOnlineDto
1055
+ */
1056
+ 'name'?: string;
1057
+ /**
1058
+ * Phone number of the guest
1059
+ * @type {string}
1060
+ * @memberof CreateBookingOnlineDto
1061
+ */
1062
+ 'phone'?: string;
989
1063
  /**
990
1064
  * Number of guests
991
1065
  * @type {number}
@@ -1174,6 +1248,73 @@ export const CreateHotelRoomDtoStatusEnum = {
1174
1248
 
1175
1249
  export type CreateHotelRoomDtoStatusEnum = typeof CreateHotelRoomDtoStatusEnum[keyof typeof CreateHotelRoomDtoStatusEnum];
1176
1250
 
1251
+ /**
1252
+ *
1253
+ * @export
1254
+ * @interface CreatePaymentRequestDto
1255
+ */
1256
+ export interface CreatePaymentRequestDto {
1257
+ /**
1258
+ *
1259
+ * @type {number}
1260
+ * @memberof CreatePaymentRequestDto
1261
+ */
1262
+ 'orderCode': number;
1263
+ /**
1264
+ *
1265
+ * @type {number}
1266
+ * @memberof CreatePaymentRequestDto
1267
+ */
1268
+ 'amount': number;
1269
+ /**
1270
+ *
1271
+ * @type {string}
1272
+ * @memberof CreatePaymentRequestDto
1273
+ */
1274
+ 'description': string;
1275
+ /**
1276
+ *
1277
+ * @type {string}
1278
+ * @memberof CreatePaymentRequestDto
1279
+ */
1280
+ 'cancelUrl': string;
1281
+ /**
1282
+ *
1283
+ * @type {string}
1284
+ * @memberof CreatePaymentRequestDto
1285
+ */
1286
+ 'returnUrl': string;
1287
+ /**
1288
+ *
1289
+ * @type {string}
1290
+ * @memberof CreatePaymentRequestDto
1291
+ */
1292
+ 'buyerName'?: string;
1293
+ /**
1294
+ *
1295
+ * @type {string}
1296
+ * @memberof CreatePaymentRequestDto
1297
+ */
1298
+ 'buyerEmail'?: string;
1299
+ /**
1300
+ *
1301
+ * @type {string}
1302
+ * @memberof CreatePaymentRequestDto
1303
+ */
1304
+ 'buyerPhone'?: string;
1305
+ /**
1306
+ *
1307
+ * @type {string}
1308
+ * @memberof CreatePaymentRequestDto
1309
+ */
1310
+ 'buyerAddress'?: string;
1311
+ /**
1312
+ *
1313
+ * @type {Array<RoomDetail>}
1314
+ * @memberof CreatePaymentRequestDto
1315
+ */
1316
+ 'items'?: Array<RoomDetail>;
1317
+ }
1177
1318
  /**
1178
1319
  *
1179
1320
  * @export
@@ -1784,13 +1925,13 @@ export interface FilterRoomDetailDto {
1784
1925
  */
1785
1926
  'maxPrice'?: object;
1786
1927
  /**
1787
- * Filter by start date
1928
+ * Filter by start date (DD-MM-YYYY)
1788
1929
  * @type {string}
1789
1930
  * @memberof FilterRoomDetailDto
1790
1931
  */
1791
1932
  'startDate'?: string;
1792
1933
  /**
1793
- * Filter by end date
1934
+ * Filter by end date (DD-MM-YYYY)
1794
1935
  * @type {string}
1795
1936
  * @memberof FilterRoomDetailDto
1796
1937
  */
@@ -5814,6 +5955,40 @@ export class AuthApi extends BaseAPI {
5814
5955
  */
5815
5956
  export const BookingApiAxiosParamCreator = function (configuration?: Configuration) {
5816
5957
  return {
5958
+ /**
5959
+ *
5960
+ * @summary Cancel a booking
5961
+ * @param {string} bookingId
5962
+ * @param {*} [options] Override http request option.
5963
+ * @throws {RequiredError}
5964
+ */
5965
+ bookingControllerCancelBooking: async (bookingId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5966
+ // verify required parameter 'bookingId' is not null or undefined
5967
+ assertParamExists('bookingControllerCancelBooking', 'bookingId', bookingId)
5968
+ const localVarPath = `/api/booking/cancel/{bookingId}`
5969
+ .replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
5970
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5971
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5972
+ let baseOptions;
5973
+ if (configuration) {
5974
+ baseOptions = configuration.baseOptions;
5975
+ }
5976
+
5977
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
5978
+ const localVarHeaderParameter = {} as any;
5979
+ const localVarQueryParameter = {} as any;
5980
+
5981
+
5982
+
5983
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5984
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5985
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5986
+
5987
+ return {
5988
+ url: toPathString(localVarUrlObj),
5989
+ options: localVarRequestOptions,
5990
+ };
5991
+ },
5817
5992
  /**
5818
5993
  *
5819
5994
  * @summary Create a new booking directly at the hotel
@@ -6061,6 +6236,19 @@ export const BookingApiAxiosParamCreator = function (configuration?: Configurati
6061
6236
  export const BookingApiFp = function(configuration?: Configuration) {
6062
6237
  const localVarAxiosParamCreator = BookingApiAxiosParamCreator(configuration)
6063
6238
  return {
6239
+ /**
6240
+ *
6241
+ * @summary Cancel a booking
6242
+ * @param {string} bookingId
6243
+ * @param {*} [options] Override http request option.
6244
+ * @throws {RequiredError}
6245
+ */
6246
+ async bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Booking>> {
6247
+ const localVarAxiosArgs = await localVarAxiosParamCreator.bookingControllerCancelBooking(bookingId, options);
6248
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
6249
+ const localVarOperationServerBasePath = operationServerMap['BookingApi.bookingControllerCancelBooking']?.[localVarOperationServerIndex]?.url;
6250
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6251
+ },
6064
6252
  /**
6065
6253
  *
6066
6254
  * @summary Create a new booking directly at the hotel
@@ -6154,6 +6342,16 @@ export const BookingApiFp = function(configuration?: Configuration) {
6154
6342
  export const BookingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
6155
6343
  const localVarFp = BookingApiFp(configuration)
6156
6344
  return {
6345
+ /**
6346
+ *
6347
+ * @summary Cancel a booking
6348
+ * @param {string} bookingId
6349
+ * @param {*} [options] Override http request option.
6350
+ * @throws {RequiredError}
6351
+ */
6352
+ bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig): AxiosPromise<Booking> {
6353
+ return localVarFp.bookingControllerCancelBooking(bookingId, options).then((request) => request(axios, basePath));
6354
+ },
6157
6355
  /**
6158
6356
  *
6159
6357
  * @summary Create a new booking directly at the hotel
@@ -6229,6 +6427,18 @@ export const BookingApiFactory = function (configuration?: Configuration, basePa
6229
6427
  * @extends {BaseAPI}
6230
6428
  */
6231
6429
  export class BookingApi extends BaseAPI {
6430
+ /**
6431
+ *
6432
+ * @summary Cancel a booking
6433
+ * @param {string} bookingId
6434
+ * @param {*} [options] Override http request option.
6435
+ * @throws {RequiredError}
6436
+ * @memberof BookingApi
6437
+ */
6438
+ public bookingControllerCancelBooking(bookingId: string, options?: RawAxiosRequestConfig) {
6439
+ return BookingApiFp(this.configuration).bookingControllerCancelBooking(bookingId, options).then((request) => request(this.axios, this.basePath));
6440
+ }
6441
+
6232
6442
  /**
6233
6443
  *
6234
6444
  * @summary Create a new booking directly at the hotel
@@ -7547,6 +7757,327 @@ export class POEditorApi extends BaseAPI {
7547
7757
 
7548
7758
 
7549
7759
 
7760
+ /**
7761
+ * PayOSApi - axios parameter creator
7762
+ * @export
7763
+ */
7764
+ export const PayOSApiAxiosParamCreator = function (configuration?: Configuration) {
7765
+ return {
7766
+ /**
7767
+ *
7768
+ * @summary Cancel a payment link
7769
+ * @param {CancelPaymentRequestDto} cancelPaymentRequestDto
7770
+ * @param {*} [options] Override http request option.
7771
+ * @throws {RequiredError}
7772
+ */
7773
+ payosControllerCancelPayment: async (cancelPaymentRequestDto: CancelPaymentRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7774
+ // verify required parameter 'cancelPaymentRequestDto' is not null or undefined
7775
+ assertParamExists('payosControllerCancelPayment', 'cancelPaymentRequestDto', cancelPaymentRequestDto)
7776
+ const localVarPath = `/api/payos/cancel-payment`;
7777
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7778
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7779
+ let baseOptions;
7780
+ if (configuration) {
7781
+ baseOptions = configuration.baseOptions;
7782
+ }
7783
+
7784
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7785
+ const localVarHeaderParameter = {} as any;
7786
+ const localVarQueryParameter = {} as any;
7787
+
7788
+
7789
+
7790
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7791
+
7792
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7793
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7794
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7795
+ localVarRequestOptions.data = serializeDataIfNeeded(cancelPaymentRequestDto, localVarRequestOptions, configuration)
7796
+
7797
+ return {
7798
+ url: toPathString(localVarUrlObj),
7799
+ options: localVarRequestOptions,
7800
+ };
7801
+ },
7802
+ /**
7803
+ *
7804
+ * @summary Create a new payment request
7805
+ * @param {CreatePaymentRequestDto} createPaymentRequestDto
7806
+ * @param {*} [options] Override http request option.
7807
+ * @throws {RequiredError}
7808
+ */
7809
+ payosControllerCreatePaymentRequest: async (createPaymentRequestDto: CreatePaymentRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7810
+ // verify required parameter 'createPaymentRequestDto' is not null or undefined
7811
+ assertParamExists('payosControllerCreatePaymentRequest', 'createPaymentRequestDto', createPaymentRequestDto)
7812
+ const localVarPath = `/api/payos/payment-request`;
7813
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7814
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7815
+ let baseOptions;
7816
+ if (configuration) {
7817
+ baseOptions = configuration.baseOptions;
7818
+ }
7819
+
7820
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7821
+ const localVarHeaderParameter = {} as any;
7822
+ const localVarQueryParameter = {} as any;
7823
+
7824
+
7825
+
7826
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7827
+
7828
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7829
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7830
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7831
+ localVarRequestOptions.data = serializeDataIfNeeded(createPaymentRequestDto, localVarRequestOptions, configuration)
7832
+
7833
+ return {
7834
+ url: toPathString(localVarUrlObj),
7835
+ options: localVarRequestOptions,
7836
+ };
7837
+ },
7838
+ /**
7839
+ *
7840
+ * @summary Get payment status
7841
+ * @param {string} paymentLinkId
7842
+ * @param {*} [options] Override http request option.
7843
+ * @throws {RequiredError}
7844
+ */
7845
+ payosControllerGetPaymentStatus: async (paymentLinkId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7846
+ // verify required parameter 'paymentLinkId' is not null or undefined
7847
+ assertParamExists('payosControllerGetPaymentStatus', 'paymentLinkId', paymentLinkId)
7848
+ const localVarPath = `/api/payos/payment-status/{paymentLinkId}`
7849
+ .replace(`{${"paymentLinkId"}}`, encodeURIComponent(String(paymentLinkId)));
7850
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7851
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7852
+ let baseOptions;
7853
+ if (configuration) {
7854
+ baseOptions = configuration.baseOptions;
7855
+ }
7856
+
7857
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
7858
+ const localVarHeaderParameter = {} as any;
7859
+ const localVarQueryParameter = {} as any;
7860
+
7861
+
7862
+
7863
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7864
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7865
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7866
+
7867
+ return {
7868
+ url: toPathString(localVarUrlObj),
7869
+ options: localVarRequestOptions,
7870
+ };
7871
+ },
7872
+ /**
7873
+ *
7874
+ * @summary Handle payment confirmation webhook
7875
+ * @param {ConfirmPaymentWebhookDto} confirmPaymentWebhookDto
7876
+ * @param {*} [options] Override http request option.
7877
+ * @throws {RequiredError}
7878
+ */
7879
+ payosControllerHandleWebhook: async (confirmPaymentWebhookDto: ConfirmPaymentWebhookDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7880
+ // verify required parameter 'confirmPaymentWebhookDto' is not null or undefined
7881
+ assertParamExists('payosControllerHandleWebhook', 'confirmPaymentWebhookDto', confirmPaymentWebhookDto)
7882
+ const localVarPath = `/api/payos/webhook`;
7883
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7884
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7885
+ let baseOptions;
7886
+ if (configuration) {
7887
+ baseOptions = configuration.baseOptions;
7888
+ }
7889
+
7890
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7891
+ const localVarHeaderParameter = {} as any;
7892
+ const localVarQueryParameter = {} as any;
7893
+
7894
+
7895
+
7896
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7897
+
7898
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7899
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7900
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7901
+ localVarRequestOptions.data = serializeDataIfNeeded(confirmPaymentWebhookDto, localVarRequestOptions, configuration)
7902
+
7903
+ return {
7904
+ url: toPathString(localVarUrlObj),
7905
+ options: localVarRequestOptions,
7906
+ };
7907
+ },
7908
+ }
7909
+ };
7910
+
7911
+ /**
7912
+ * PayOSApi - functional programming interface
7913
+ * @export
7914
+ */
7915
+ export const PayOSApiFp = function(configuration?: Configuration) {
7916
+ const localVarAxiosParamCreator = PayOSApiAxiosParamCreator(configuration)
7917
+ return {
7918
+ /**
7919
+ *
7920
+ * @summary Cancel a payment link
7921
+ * @param {CancelPaymentRequestDto} cancelPaymentRequestDto
7922
+ * @param {*} [options] Override http request option.
7923
+ * @throws {RequiredError}
7924
+ */
7925
+ async payosControllerCancelPayment(cancelPaymentRequestDto: CancelPaymentRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
7926
+ const localVarAxiosArgs = await localVarAxiosParamCreator.payosControllerCancelPayment(cancelPaymentRequestDto, options);
7927
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7928
+ const localVarOperationServerBasePath = operationServerMap['PayOSApi.payosControllerCancelPayment']?.[localVarOperationServerIndex]?.url;
7929
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7930
+ },
7931
+ /**
7932
+ *
7933
+ * @summary Create a new payment request
7934
+ * @param {CreatePaymentRequestDto} createPaymentRequestDto
7935
+ * @param {*} [options] Override http request option.
7936
+ * @throws {RequiredError}
7937
+ */
7938
+ async payosControllerCreatePaymentRequest(createPaymentRequestDto: CreatePaymentRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
7939
+ const localVarAxiosArgs = await localVarAxiosParamCreator.payosControllerCreatePaymentRequest(createPaymentRequestDto, options);
7940
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7941
+ const localVarOperationServerBasePath = operationServerMap['PayOSApi.payosControllerCreatePaymentRequest']?.[localVarOperationServerIndex]?.url;
7942
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7943
+ },
7944
+ /**
7945
+ *
7946
+ * @summary Get payment status
7947
+ * @param {string} paymentLinkId
7948
+ * @param {*} [options] Override http request option.
7949
+ * @throws {RequiredError}
7950
+ */
7951
+ async payosControllerGetPaymentStatus(paymentLinkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
7952
+ const localVarAxiosArgs = await localVarAxiosParamCreator.payosControllerGetPaymentStatus(paymentLinkId, options);
7953
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7954
+ const localVarOperationServerBasePath = operationServerMap['PayOSApi.payosControllerGetPaymentStatus']?.[localVarOperationServerIndex]?.url;
7955
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7956
+ },
7957
+ /**
7958
+ *
7959
+ * @summary Handle payment confirmation webhook
7960
+ * @param {ConfirmPaymentWebhookDto} confirmPaymentWebhookDto
7961
+ * @param {*} [options] Override http request option.
7962
+ * @throws {RequiredError}
7963
+ */
7964
+ async payosControllerHandleWebhook(confirmPaymentWebhookDto: ConfirmPaymentWebhookDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
7965
+ const localVarAxiosArgs = await localVarAxiosParamCreator.payosControllerHandleWebhook(confirmPaymentWebhookDto, options);
7966
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7967
+ const localVarOperationServerBasePath = operationServerMap['PayOSApi.payosControllerHandleWebhook']?.[localVarOperationServerIndex]?.url;
7968
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7969
+ },
7970
+ }
7971
+ };
7972
+
7973
+ /**
7974
+ * PayOSApi - factory interface
7975
+ * @export
7976
+ */
7977
+ export const PayOSApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
7978
+ const localVarFp = PayOSApiFp(configuration)
7979
+ return {
7980
+ /**
7981
+ *
7982
+ * @summary Cancel a payment link
7983
+ * @param {CancelPaymentRequestDto} cancelPaymentRequestDto
7984
+ * @param {*} [options] Override http request option.
7985
+ * @throws {RequiredError}
7986
+ */
7987
+ payosControllerCancelPayment(cancelPaymentRequestDto: CancelPaymentRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<object> {
7988
+ return localVarFp.payosControllerCancelPayment(cancelPaymentRequestDto, options).then((request) => request(axios, basePath));
7989
+ },
7990
+ /**
7991
+ *
7992
+ * @summary Create a new payment request
7993
+ * @param {CreatePaymentRequestDto} createPaymentRequestDto
7994
+ * @param {*} [options] Override http request option.
7995
+ * @throws {RequiredError}
7996
+ */
7997
+ payosControllerCreatePaymentRequest(createPaymentRequestDto: CreatePaymentRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<object> {
7998
+ return localVarFp.payosControllerCreatePaymentRequest(createPaymentRequestDto, options).then((request) => request(axios, basePath));
7999
+ },
8000
+ /**
8001
+ *
8002
+ * @summary Get payment status
8003
+ * @param {string} paymentLinkId
8004
+ * @param {*} [options] Override http request option.
8005
+ * @throws {RequiredError}
8006
+ */
8007
+ payosControllerGetPaymentStatus(paymentLinkId: string, options?: RawAxiosRequestConfig): AxiosPromise<object> {
8008
+ return localVarFp.payosControllerGetPaymentStatus(paymentLinkId, options).then((request) => request(axios, basePath));
8009
+ },
8010
+ /**
8011
+ *
8012
+ * @summary Handle payment confirmation webhook
8013
+ * @param {ConfirmPaymentWebhookDto} confirmPaymentWebhookDto
8014
+ * @param {*} [options] Override http request option.
8015
+ * @throws {RequiredError}
8016
+ */
8017
+ payosControllerHandleWebhook(confirmPaymentWebhookDto: ConfirmPaymentWebhookDto, options?: RawAxiosRequestConfig): AxiosPromise<boolean> {
8018
+ return localVarFp.payosControllerHandleWebhook(confirmPaymentWebhookDto, options).then((request) => request(axios, basePath));
8019
+ },
8020
+ };
8021
+ };
8022
+
8023
+ /**
8024
+ * PayOSApi - object-oriented interface
8025
+ * @export
8026
+ * @class PayOSApi
8027
+ * @extends {BaseAPI}
8028
+ */
8029
+ export class PayOSApi extends BaseAPI {
8030
+ /**
8031
+ *
8032
+ * @summary Cancel a payment link
8033
+ * @param {CancelPaymentRequestDto} cancelPaymentRequestDto
8034
+ * @param {*} [options] Override http request option.
8035
+ * @throws {RequiredError}
8036
+ * @memberof PayOSApi
8037
+ */
8038
+ public payosControllerCancelPayment(cancelPaymentRequestDto: CancelPaymentRequestDto, options?: RawAxiosRequestConfig) {
8039
+ return PayOSApiFp(this.configuration).payosControllerCancelPayment(cancelPaymentRequestDto, options).then((request) => request(this.axios, this.basePath));
8040
+ }
8041
+
8042
+ /**
8043
+ *
8044
+ * @summary Create a new payment request
8045
+ * @param {CreatePaymentRequestDto} createPaymentRequestDto
8046
+ * @param {*} [options] Override http request option.
8047
+ * @throws {RequiredError}
8048
+ * @memberof PayOSApi
8049
+ */
8050
+ public payosControllerCreatePaymentRequest(createPaymentRequestDto: CreatePaymentRequestDto, options?: RawAxiosRequestConfig) {
8051
+ return PayOSApiFp(this.configuration).payosControllerCreatePaymentRequest(createPaymentRequestDto, options).then((request) => request(this.axios, this.basePath));
8052
+ }
8053
+
8054
+ /**
8055
+ *
8056
+ * @summary Get payment status
8057
+ * @param {string} paymentLinkId
8058
+ * @param {*} [options] Override http request option.
8059
+ * @throws {RequiredError}
8060
+ * @memberof PayOSApi
8061
+ */
8062
+ public payosControllerGetPaymentStatus(paymentLinkId: string, options?: RawAxiosRequestConfig) {
8063
+ return PayOSApiFp(this.configuration).payosControllerGetPaymentStatus(paymentLinkId, options).then((request) => request(this.axios, this.basePath));
8064
+ }
8065
+
8066
+ /**
8067
+ *
8068
+ * @summary Handle payment confirmation webhook
8069
+ * @param {ConfirmPaymentWebhookDto} confirmPaymentWebhookDto
8070
+ * @param {*} [options] Override http request option.
8071
+ * @throws {RequiredError}
8072
+ * @memberof PayOSApi
8073
+ */
8074
+ public payosControllerHandleWebhook(confirmPaymentWebhookDto: ConfirmPaymentWebhookDto, options?: RawAxiosRequestConfig) {
8075
+ return PayOSApiFp(this.configuration).payosControllerHandleWebhook(confirmPaymentWebhookDto, options).then((request) => request(this.axios, this.basePath));
8076
+ }
8077
+ }
8078
+
8079
+
8080
+
7550
8081
  /**
7551
8082
  * ProvincesApi - axios parameter creator
7552
8083
  * @export
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openapi-client",
11
11
  "openapi-generator"
12
12
  ],
13
- "version": "1.1.8",
13
+ "version": "1.2.0",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"