@finverse/sdk-typescript 0.0.41 → 0.0.42

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/dist/api.d.ts CHANGED
@@ -3035,10 +3035,11 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
3035
3035
  /**
3036
3036
  * Create new Payment
3037
3037
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3038
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
3038
3039
  * @param {*} [options] Override http request option.
3039
3040
  * @throws {RequiredError}
3040
3041
  */
3041
- createPayment: (createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3042
+ createPayment: (createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3042
3043
  /**
3043
3044
  * Create a new payment instruction to be used when linking to perform new payment
3044
3045
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3128,10 +3129,11 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
3128
3129
  /**
3129
3130
  * Create new Payment
3130
3131
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3132
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
3131
3133
  * @param {*} [options] Override http request option.
3132
3134
  * @throws {RequiredError}
3133
3135
  */
3134
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentResponse>>;
3136
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentResponse>>;
3135
3137
  /**
3136
3138
  * Create a new payment instruction to be used when linking to perform new payment
3137
3139
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3221,10 +3223,11 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
3221
3223
  /**
3222
3224
  * Create new Payment
3223
3225
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3226
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
3224
3227
  * @param {*} [options] Override http request option.
3225
3228
  * @throws {RequiredError}
3226
3229
  */
3227
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: any): AxiosPromise<CreatePaymentResponse>;
3230
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: any): AxiosPromise<CreatePaymentResponse>;
3228
3231
  /**
3229
3232
  * Create a new payment instruction to be used when linking to perform new payment
3230
3233
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3316,11 +3319,12 @@ export interface CustomerApiInterface {
3316
3319
  /**
3317
3320
  * Create new Payment
3318
3321
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3322
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
3319
3323
  * @param {*} [options] Override http request option.
3320
3324
  * @throws {RequiredError}
3321
3325
  * @memberof CustomerApiInterface
3322
3326
  */
3323
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentResponse>;
3327
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentResponse>;
3324
3328
  /**
3325
3329
  * Create a new payment instruction to be used when linking to perform new payment
3326
3330
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3423,11 +3427,12 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
3423
3427
  /**
3424
3428
  * Create new Payment
3425
3429
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3430
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
3426
3431
  * @param {*} [options] Override http request option.
3427
3432
  * @throws {RequiredError}
3428
3433
  * @memberof CustomerApi
3429
3434
  */
3430
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentResponse>>;
3435
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentResponse>>;
3431
3436
  /**
3432
3437
  * Create a new payment instruction to be used when linking to perform new payment
3433
3438
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
package/dist/api.js CHANGED
@@ -124,10 +124,11 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
124
124
  /**
125
125
  * Create new Payment
126
126
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
127
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
127
128
  * @param {*} [options] Override http request option.
128
129
  * @throws {RequiredError}
129
130
  */
130
- createPayment: (createPaymentRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
131
+ createPayment: (createPaymentRequest, idempotencyKey, options = {}) => __awaiter(this, void 0, void 0, function* () {
131
132
  // verify required parameter 'createPaymentRequest' is not null or undefined
132
133
  common_1.assertParamExists('createPayment', 'createPaymentRequest', createPaymentRequest);
133
134
  const localVarPath = `/payments`;
@@ -143,6 +144,9 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
143
144
  // authentication Oauth2 required
144
145
  // oauth required
145
146
  yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
147
+ if (idempotencyKey !== undefined && idempotencyKey !== null) {
148
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
149
+ }
146
150
  localVarHeaderParameter['Content-Type'] = 'application/json';
147
151
  common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
148
152
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -496,12 +500,13 @@ exports.CustomerApiFp = function (configuration) {
496
500
  /**
497
501
  * Create new Payment
498
502
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
503
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
499
504
  * @param {*} [options] Override http request option.
500
505
  * @throws {RequiredError}
501
506
  */
502
- createPayment(createPaymentRequest, options) {
507
+ createPayment(createPaymentRequest, idempotencyKey, options) {
503
508
  return __awaiter(this, void 0, void 0, function* () {
504
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createPayment(createPaymentRequest, options);
509
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPayment(createPaymentRequest, idempotencyKey, options);
505
510
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
506
511
  });
507
512
  },
@@ -649,11 +654,14 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
649
654
  /**
650
655
  * Create new Payment
651
656
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
657
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
652
658
  * @param {*} [options] Override http request option.
653
659
  * @throws {RequiredError}
654
660
  */
655
- createPayment(createPaymentRequest, options) {
656
- return localVarFp.createPayment(createPaymentRequest, options).then((request) => request(axios, basePath));
661
+ createPayment(createPaymentRequest, idempotencyKey, options) {
662
+ return localVarFp
663
+ .createPayment(createPaymentRequest, idempotencyKey, options)
664
+ .then((request) => request(axios, basePath));
657
665
  },
658
666
  /**
659
667
  * Create a new payment instruction to be used when linking to perform new payment
@@ -778,13 +786,14 @@ class CustomerApi extends base_1.BaseAPI {
778
786
  /**
779
787
  * Create new Payment
780
788
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
789
+ * @param {string} [idempotencyKey] A random key provided by the customer, per unique payment. If missing we will generate a random one. The purpose for the Idempotency key is to allow safe retrying without the operation being performed multiple times.
781
790
  * @param {*} [options] Override http request option.
782
791
  * @throws {RequiredError}
783
792
  * @memberof CustomerApi
784
793
  */
785
- createPayment(createPaymentRequest, options) {
794
+ createPayment(createPaymentRequest, idempotencyKey, options) {
786
795
  return exports.CustomerApiFp(this.configuration)
787
- .createPayment(createPaymentRequest, options)
796
+ .createPayment(createPaymentRequest, idempotencyKey, options)
788
797
  .then((request) => request(this.axios, this.basePath));
789
798
  }
790
799
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finverse/sdk-typescript",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "OpenAPI client for @finverse/sdk-typescript",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [