@finverse/sdk-typescript 0.0.40 → 0.0.43

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 (3) hide show
  1. package/dist/api.d.ts +168 -157
  2. package/dist/api.js +95 -86
  3. package/package.json +1 -1
package/dist/api.d.ts CHANGED
@@ -412,6 +412,69 @@ export interface CreateCustomerResponse {
412
412
  */
413
413
  webhook_uris?: Array<string>;
414
414
  }
415
+ /**
416
+ *
417
+ * @export
418
+ * @interface CreateMandateRequest
419
+ */
420
+ export interface CreateMandateRequest {
421
+ /**
422
+ *
423
+ * @type {MandateRecipient}
424
+ * @memberof CreateMandateRequest
425
+ */
426
+ recipient: MandateRecipient;
427
+ /**
428
+ *
429
+ * @type {CreateMandateSender}
430
+ * @memberof CreateMandateRequest
431
+ */
432
+ sender: CreateMandateSender;
433
+ /**
434
+ *
435
+ * @type {MandateDetails}
436
+ * @memberof CreateMandateRequest
437
+ */
438
+ mandate_details: MandateDetails;
439
+ }
440
+ /**
441
+ *
442
+ * @export
443
+ * @interface CreateMandateResponse
444
+ */
445
+ export interface CreateMandateResponse {
446
+ /**
447
+ * Finverse Mandate ID
448
+ * @type {string}
449
+ * @memberof CreateMandateResponse
450
+ */
451
+ mandate_id?: string;
452
+ }
453
+ /**
454
+ *
455
+ * @export
456
+ * @interface CreateMandateSender
457
+ */
458
+ export interface CreateMandateSender {
459
+ /**
460
+ *
461
+ * @type {string}
462
+ * @memberof CreateMandateSender
463
+ */
464
+ name?: string;
465
+ /**
466
+ * Customer App\'s user ID, representing the end-user making the payment.
467
+ * @type {string}
468
+ * @memberof CreateMandateSender
469
+ */
470
+ user_id: string;
471
+ /**
472
+ * Customer App\'s reference ID, representing the sender\'s account or billing reference number.
473
+ * @type {string}
474
+ * @memberof CreateMandateSender
475
+ */
476
+ sender_reference_id?: string;
477
+ }
415
478
  /**
416
479
  *
417
480
  * @export
@@ -829,84 +892,84 @@ export interface GetLoginIdentityHistoryResponse {
829
892
  /**
830
893
  *
831
894
  * @export
832
- * @interface GetMandateSender
833
- */
834
- export interface GetMandateSender {
835
- /**
836
- *
837
- * @type {string}
838
- * @memberof GetMandateSender
839
- */
840
- name?: string;
841
- /**
842
- * Customer App\'s user ID, representing the end-user making the payment.
843
- * @type {string}
844
- * @memberof GetMandateSender
845
- */
846
- user_id: string;
847
- /**
848
- * Customer App\'s reference ID, representing the sender\'s account or billing reference number.
849
- * @type {string}
850
- * @memberof GetMandateSender
851
- */
852
- sender_reference_id?: string;
853
- /**
854
- *
855
- * @type {PaymentAccount}
856
- * @memberof GetMandateSender
857
- */
858
- sender_account: PaymentAccount;
859
- }
860
- /**
861
- *
862
- * @export
863
- * @interface GetMandatesResponse
895
+ * @interface GetMandateResponse
864
896
  */
865
- export interface GetMandatesResponse {
897
+ export interface GetMandateResponse {
866
898
  /**
867
899
  * Timestamp in ISO format (YYYY-MM-DDTHH:MM:SS.SSSZ)
868
900
  * @type {string}
869
- * @memberof GetMandatesResponse
901
+ * @memberof GetMandateResponse
870
902
  */
871
903
  last_update: string;
872
904
  /**
873
905
  * Finverse Mandate ID (ULID)
874
906
  * @type {string}
875
- * @memberof GetMandatesResponse
907
+ * @memberof GetMandateResponse
876
908
  */
877
909
  mandate_id: string;
878
910
  /**
879
911
  * Mandate status
880
912
  * @type {string}
881
- * @memberof GetMandatesResponse
913
+ * @memberof GetMandateResponse
882
914
  */
883
- mandate_status: GetMandatesResponseMandateStatusEnum;
915
+ mandate_status: GetMandateResponseMandateStatusEnum;
884
916
  /**
885
917
  *
886
918
  * @type {MandateRecipient}
887
- * @memberof GetMandatesResponse
919
+ * @memberof GetMandateResponse
888
920
  */
889
921
  recipient: MandateRecipient;
890
922
  /**
891
923
  *
892
924
  * @type {GetMandateSender}
893
- * @memberof GetMandatesResponse
925
+ * @memberof GetMandateResponse
894
926
  */
895
927
  sender: GetMandateSender;
896
928
  /**
897
929
  *
898
930
  * @type {MandateDetails}
899
- * @memberof GetMandatesResponse
931
+ * @memberof GetMandateResponse
900
932
  */
901
933
  mandate_details: MandateDetails;
902
934
  }
903
- export declare const GetMandatesResponseMandateStatusEnum: {
935
+ export declare const GetMandateResponseMandateStatusEnum: {
904
936
  readonly Created: "CREATED";
905
937
  readonly Used: "USED";
906
938
  readonly Submitted: "SUBMITTED";
907
939
  readonly Error: "ERROR";
908
940
  };
909
- export declare type GetMandatesResponseMandateStatusEnum = typeof GetMandatesResponseMandateStatusEnum[keyof typeof GetMandatesResponseMandateStatusEnum];
941
+ export declare type GetMandateResponseMandateStatusEnum = typeof GetMandateResponseMandateStatusEnum[keyof typeof GetMandateResponseMandateStatusEnum];
942
+ /**
943
+ *
944
+ * @export
945
+ * @interface GetMandateSender
946
+ */
947
+ export interface GetMandateSender {
948
+ /**
949
+ *
950
+ * @type {string}
951
+ * @memberof GetMandateSender
952
+ */
953
+ name?: string;
954
+ /**
955
+ * Customer App\'s user ID, representing the end-user making the payment.
956
+ * @type {string}
957
+ * @memberof GetMandateSender
958
+ */
959
+ user_id: string;
960
+ /**
961
+ * Customer App\'s reference ID, representing the sender\'s account or billing reference number.
962
+ * @type {string}
963
+ * @memberof GetMandateSender
964
+ */
965
+ sender_reference_id?: string;
966
+ /**
967
+ *
968
+ * @type {PaymentAccount}
969
+ * @memberof GetMandateSender
970
+ */
971
+ sender_account: PaymentAccount;
972
+ }
910
973
  /**
911
974
  *
912
975
  * @export
@@ -944,6 +1007,12 @@ export interface GetPaymentResponse {
944
1007
  * @memberof GetPaymentResponse
945
1008
  */
946
1009
  type?: GetPaymentResponseTypeEnum;
1010
+ /**
1011
+ * Timestamp in ISO format (YYYY-MM-DDTHH:MM:SS.SSSZ)
1012
+ * @type {string}
1013
+ * @memberof GetPaymentResponse
1014
+ */
1015
+ last_update?: string;
947
1016
  /**
948
1017
  * Possible values - CREATED, AUTHORIZED, SUBMITTED, EXECUTED, FAILED, REJECTED, CANCELLED.
949
1018
  * @type {string}
@@ -2516,69 +2585,6 @@ export declare const PaymentScheduleFrequencyEnum: {
2516
2585
  readonly Yearly: "YEARLY";
2517
2586
  };
2518
2587
  export declare type PaymentScheduleFrequencyEnum = typeof PaymentScheduleFrequencyEnum[keyof typeof PaymentScheduleFrequencyEnum];
2519
- /**
2520
- *
2521
- * @export
2522
- * @interface PostMandateSender
2523
- */
2524
- export interface PostMandateSender {
2525
- /**
2526
- *
2527
- * @type {string}
2528
- * @memberof PostMandateSender
2529
- */
2530
- name?: string;
2531
- /**
2532
- * Customer App\'s user ID, representing the end-user making the payment.
2533
- * @type {string}
2534
- * @memberof PostMandateSender
2535
- */
2536
- user_id: string;
2537
- /**
2538
- * Customer App\'s reference ID, representing the sender\'s account or billing reference number.
2539
- * @type {string}
2540
- * @memberof PostMandateSender
2541
- */
2542
- sender_reference_id?: string;
2543
- }
2544
- /**
2545
- *
2546
- * @export
2547
- * @interface PostMandatesRequest
2548
- */
2549
- export interface PostMandatesRequest {
2550
- /**
2551
- *
2552
- * @type {MandateRecipient}
2553
- * @memberof PostMandatesRequest
2554
- */
2555
- recipient: MandateRecipient;
2556
- /**
2557
- *
2558
- * @type {PostMandateSender}
2559
- * @memberof PostMandatesRequest
2560
- */
2561
- sender: PostMandateSender;
2562
- /**
2563
- *
2564
- * @type {MandateDetails}
2565
- * @memberof PostMandatesRequest
2566
- */
2567
- mandate_details: MandateDetails;
2568
- }
2569
- /**
2570
- *
2571
- * @export
2572
- * @interface PostMandatesResponse
2573
- */
2574
- export interface PostMandatesResponse {
2575
- /**
2576
- * Finverse Mandate ID
2577
- * @type {string}
2578
- * @memberof PostMandatesResponse
2579
- */
2580
- mandate_id?: string;
2581
- }
2582
2588
  /**
2583
2589
  *
2584
2590
  * @export
@@ -3025,13 +3031,21 @@ export declare type TransactionLimitsPeriodEnum = typeof TransactionLimitsPeriod
3025
3031
  * @export
3026
3032
  */
3027
3033
  export declare const CustomerApiAxiosParamCreator: (configuration?: Configuration) => {
3034
+ /**
3035
+ * CREATE Mandate
3036
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
3037
+ * @param {*} [options] Override http request option.
3038
+ * @throws {RequiredError}
3039
+ */
3040
+ createMandate: (createMandateRequest: CreateMandateRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3028
3041
  /**
3029
3042
  * Create new Payment
3030
3043
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3044
+ * @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.
3031
3045
  * @param {*} [options] Override http request option.
3032
3046
  * @throws {RequiredError}
3033
3047
  */
3034
- createPayment: (createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3048
+ createPayment: (createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3035
3049
  /**
3036
3050
  * Create a new payment instruction to be used when linking to perform new payment
3037
3051
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3068,12 +3082,12 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
3068
3082
  */
3069
3083
  getLoginIdentityHistory: (loginIdentityId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3070
3084
  /**
3071
- * Get Mandates details by mandate_id
3085
+ * Get Mandate details by mandate_id
3072
3086
  * @param {string} mandateId mandate id
3073
3087
  * @param {*} [options] Override http request option.
3074
3088
  * @throws {RequiredError}
3075
3089
  */
3076
- getMandates: (mandateId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3090
+ getMandate: (mandateId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3077
3091
  /**
3078
3092
  * Get Payment details by payment_id
3079
3093
  * @param {string} paymentId payment id
@@ -3098,13 +3112,6 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
3098
3112
  * @throws {RequiredError}
3099
3113
  */
3100
3114
  listInstitutions: (country?: string, countries?: Array<string>, productsSupported?: string, institutionType?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3101
- /**
3102
- * CREATE Mandates
3103
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
3104
- * @param {*} [options] Override http request option.
3105
- * @throws {RequiredError}
3106
- */
3107
- postMandates: (postMandatesRequest: PostMandatesRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3108
3115
  /**
3109
3116
  * Refresh an access token
3110
3117
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -3118,13 +3125,21 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
3118
3125
  * @export
3119
3126
  */
3120
3127
  export declare const CustomerApiFp: (configuration?: Configuration) => {
3128
+ /**
3129
+ * CREATE Mandate
3130
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
3131
+ * @param {*} [options] Override http request option.
3132
+ * @throws {RequiredError}
3133
+ */
3134
+ createMandate(createMandateRequest: CreateMandateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateMandateResponse>>;
3121
3135
  /**
3122
3136
  * Create new Payment
3123
3137
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3138
+ * @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.
3124
3139
  * @param {*} [options] Override http request option.
3125
3140
  * @throws {RequiredError}
3126
3141
  */
3127
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentResponse>>;
3142
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentResponse>>;
3128
3143
  /**
3129
3144
  * Create a new payment instruction to be used when linking to perform new payment
3130
3145
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3161,12 +3176,12 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
3161
3176
  */
3162
3177
  getLoginIdentityHistory(loginIdentityId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLoginIdentityHistoryResponse>>;
3163
3178
  /**
3164
- * Get Mandates details by mandate_id
3179
+ * Get Mandate details by mandate_id
3165
3180
  * @param {string} mandateId mandate id
3166
3181
  * @param {*} [options] Override http request option.
3167
3182
  * @throws {RequiredError}
3168
3183
  */
3169
- getMandates(mandateId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMandatesResponse>>;
3184
+ getMandate(mandateId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMandateResponse>>;
3170
3185
  /**
3171
3186
  * Get Payment details by payment_id
3172
3187
  * @param {string} paymentId payment id
@@ -3191,13 +3206,6 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
3191
3206
  * @throws {RequiredError}
3192
3207
  */
3193
3208
  listInstitutions(country?: string, countries?: Array<string>, productsSupported?: string, institutionType?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Institution>>>;
3194
- /**
3195
- * CREATE Mandates
3196
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
3197
- * @param {*} [options] Override http request option.
3198
- * @throws {RequiredError}
3199
- */
3200
- postMandates(postMandatesRequest: PostMandatesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostMandatesResponse>>;
3201
3209
  /**
3202
3210
  * Refresh an access token
3203
3211
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -3211,13 +3219,21 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
3211
3219
  * @export
3212
3220
  */
3213
3221
  export declare const CustomerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
3222
+ /**
3223
+ * CREATE Mandate
3224
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
3225
+ * @param {*} [options] Override http request option.
3226
+ * @throws {RequiredError}
3227
+ */
3228
+ createMandate(createMandateRequest: CreateMandateRequest, options?: any): AxiosPromise<CreateMandateResponse>;
3214
3229
  /**
3215
3230
  * Create new Payment
3216
3231
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3232
+ * @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.
3217
3233
  * @param {*} [options] Override http request option.
3218
3234
  * @throws {RequiredError}
3219
3235
  */
3220
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: any): AxiosPromise<CreatePaymentResponse>;
3236
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: any): AxiosPromise<CreatePaymentResponse>;
3221
3237
  /**
3222
3238
  * Create a new payment instruction to be used when linking to perform new payment
3223
3239
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3254,12 +3270,12 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
3254
3270
  */
3255
3271
  getLoginIdentityHistory(loginIdentityId: string, options?: any): AxiosPromise<GetLoginIdentityHistoryResponse>;
3256
3272
  /**
3257
- * Get Mandates details by mandate_id
3273
+ * Get Mandate details by mandate_id
3258
3274
  * @param {string} mandateId mandate id
3259
3275
  * @param {*} [options] Override http request option.
3260
3276
  * @throws {RequiredError}
3261
3277
  */
3262
- getMandates(mandateId: string, options?: any): AxiosPromise<GetMandatesResponse>;
3278
+ getMandate(mandateId: string, options?: any): AxiosPromise<GetMandateResponse>;
3263
3279
  /**
3264
3280
  * Get Payment details by payment_id
3265
3281
  * @param {string} paymentId payment id
@@ -3284,13 +3300,6 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
3284
3300
  * @throws {RequiredError}
3285
3301
  */
3286
3302
  listInstitutions(country?: string, countries?: Array<string>, productsSupported?: string, institutionType?: string, options?: any): AxiosPromise<Array<Institution>>;
3287
- /**
3288
- * CREATE Mandates
3289
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
3290
- * @param {*} [options] Override http request option.
3291
- * @throws {RequiredError}
3292
- */
3293
- postMandates(postMandatesRequest: PostMandatesRequest, options?: any): AxiosPromise<PostMandatesResponse>;
3294
3303
  /**
3295
3304
  * Refresh an access token
3296
3305
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -3305,14 +3314,23 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
3305
3314
  * @interface CustomerApi
3306
3315
  */
3307
3316
  export interface CustomerApiInterface {
3317
+ /**
3318
+ * CREATE Mandate
3319
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
3320
+ * @param {*} [options] Override http request option.
3321
+ * @throws {RequiredError}
3322
+ * @memberof CustomerApiInterface
3323
+ */
3324
+ createMandate(createMandateRequest: CreateMandateRequest, options?: AxiosRequestConfig): AxiosPromise<CreateMandateResponse>;
3308
3325
  /**
3309
3326
  * Create new Payment
3310
3327
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3328
+ * @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.
3311
3329
  * @param {*} [options] Override http request option.
3312
3330
  * @throws {RequiredError}
3313
3331
  * @memberof CustomerApiInterface
3314
3332
  */
3315
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentResponse>;
3333
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentResponse>;
3316
3334
  /**
3317
3335
  * Create a new payment instruction to be used when linking to perform new payment
3318
3336
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3354,13 +3372,13 @@ export interface CustomerApiInterface {
3354
3372
  */
3355
3373
  getLoginIdentityHistory(loginIdentityId: string, options?: AxiosRequestConfig): AxiosPromise<GetLoginIdentityHistoryResponse>;
3356
3374
  /**
3357
- * Get Mandates details by mandate_id
3375
+ * Get Mandate details by mandate_id
3358
3376
  * @param {string} mandateId mandate id
3359
3377
  * @param {*} [options] Override http request option.
3360
3378
  * @throws {RequiredError}
3361
3379
  * @memberof CustomerApiInterface
3362
3380
  */
3363
- getMandates(mandateId: string, options?: AxiosRequestConfig): AxiosPromise<GetMandatesResponse>;
3381
+ getMandate(mandateId: string, options?: AxiosRequestConfig): AxiosPromise<GetMandateResponse>;
3364
3382
  /**
3365
3383
  * Get Payment details by payment_id
3366
3384
  * @param {string} paymentId payment id
@@ -3388,14 +3406,6 @@ export interface CustomerApiInterface {
3388
3406
  * @memberof CustomerApiInterface
3389
3407
  */
3390
3408
  listInstitutions(country?: string, countries?: Array<string>, productsSupported?: string, institutionType?: string, options?: AxiosRequestConfig): AxiosPromise<Array<Institution>>;
3391
- /**
3392
- * CREATE Mandates
3393
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
3394
- * @param {*} [options] Override http request option.
3395
- * @throws {RequiredError}
3396
- * @memberof CustomerApiInterface
3397
- */
3398
- postMandates(postMandatesRequest: PostMandatesRequest, options?: AxiosRequestConfig): AxiosPromise<PostMandatesResponse>;
3399
3409
  /**
3400
3410
  * Refresh an access token
3401
3411
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -3412,14 +3422,23 @@ export interface CustomerApiInterface {
3412
3422
  * @extends {BaseAPI}
3413
3423
  */
3414
3424
  export declare class CustomerApi extends BaseAPI implements CustomerApiInterface {
3425
+ /**
3426
+ * CREATE Mandate
3427
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
3428
+ * @param {*} [options] Override http request option.
3429
+ * @throws {RequiredError}
3430
+ * @memberof CustomerApi
3431
+ */
3432
+ createMandate(createMandateRequest: CreateMandateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateMandateResponse>>;
3415
3433
  /**
3416
3434
  * Create new Payment
3417
3435
  * @param {CreatePaymentRequest} createPaymentRequest request body for creating payment
3436
+ * @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.
3418
3437
  * @param {*} [options] Override http request option.
3419
3438
  * @throws {RequiredError}
3420
3439
  * @memberof CustomerApi
3421
3440
  */
3422
- createPayment(createPaymentRequest: CreatePaymentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentResponse>>;
3441
+ createPayment(createPaymentRequest: CreatePaymentRequest, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentResponse>>;
3423
3442
  /**
3424
3443
  * Create a new payment instruction to be used when linking to perform new payment
3425
3444
  * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
@@ -3461,13 +3480,13 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
3461
3480
  */
3462
3481
  getLoginIdentityHistory(loginIdentityId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetLoginIdentityHistoryResponse>>;
3463
3482
  /**
3464
- * Get Mandates details by mandate_id
3483
+ * Get Mandate details by mandate_id
3465
3484
  * @param {string} mandateId mandate id
3466
3485
  * @param {*} [options] Override http request option.
3467
3486
  * @throws {RequiredError}
3468
3487
  * @memberof CustomerApi
3469
3488
  */
3470
- getMandates(mandateId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMandatesResponse>>;
3489
+ getMandate(mandateId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMandateResponse>>;
3471
3490
  /**
3472
3491
  * Get Payment details by payment_id
3473
3492
  * @param {string} paymentId payment id
@@ -3495,14 +3514,6 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
3495
3514
  * @memberof CustomerApi
3496
3515
  */
3497
3516
  listInstitutions(country?: string, countries?: Array<string>, productsSupported?: string, institutionType?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Institution[]>>;
3498
- /**
3499
- * CREATE Mandates
3500
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
3501
- * @param {*} [options] Override http request option.
3502
- * @throws {RequiredError}
3503
- * @memberof CustomerApi
3504
- */
3505
- postMandates(postMandatesRequest: PostMandatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PostMandatesResponse>>;
3506
3517
  /**
3507
3518
  * Refresh an access token
3508
3519
  * @param {RefreshRequest} refreshRequest The refresh token
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.LoginIdentityApi = exports.LoginIdentityApiFactory = exports.LoginIdentityApiFp = exports.LoginIdentityApiAxiosParamCreator = exports.LinkApi = exports.LinkApiFactory = exports.LinkApiFp = exports.LinkApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.TransactionLimitsPeriodEnum = exports.PaymentScheduleFrequencyEnum = exports.PaymentInstructionTypeEnum = exports.LinkTokenRequestAutomaticDataRefreshEnum = exports.LinkTokenRequestUiModeEnum = exports.GetPaymentResponseStatusEnum = exports.GetPaymentResponseTypeEnum = exports.GetMandatesResponseMandateStatusEnum = exports.CustomerPaymentInstructionTypeEnum = exports.CreatePaymentRequestTypeEnum = void 0;
25
+ exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.LoginIdentityApi = exports.LoginIdentityApiFactory = exports.LoginIdentityApiFp = exports.LoginIdentityApiAxiosParamCreator = exports.LinkApi = exports.LinkApiFactory = exports.LinkApiFp = exports.LinkApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.TransactionLimitsPeriodEnum = exports.PaymentScheduleFrequencyEnum = exports.PaymentInstructionTypeEnum = exports.LinkTokenRequestAutomaticDataRefreshEnum = exports.LinkTokenRequestUiModeEnum = exports.GetPaymentResponseStatusEnum = exports.GetPaymentResponseTypeEnum = exports.GetMandateResponseMandateStatusEnum = exports.CustomerPaymentInstructionTypeEnum = exports.CreatePaymentRequestTypeEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -36,7 +36,7 @@ exports.CreatePaymentRequestTypeEnum = {
36
36
  exports.CustomerPaymentInstructionTypeEnum = {
37
37
  DebitAuthorization: 'DEBIT_AUTHORIZATION',
38
38
  };
39
- exports.GetMandatesResponseMandateStatusEnum = {
39
+ exports.GetMandateResponseMandateStatusEnum = {
40
40
  Created: 'CREATED',
41
41
  Used: 'USED',
42
42
  Submitted: 'SUBMITTED',
@@ -89,13 +89,46 @@ exports.TransactionLimitsPeriodEnum = {
89
89
  */
90
90
  exports.CustomerApiAxiosParamCreator = function (configuration) {
91
91
  return {
92
+ /**
93
+ * CREATE Mandate
94
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ createMandate: (createMandateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
99
+ // verify required parameter 'createMandateRequest' is not null or undefined
100
+ common_1.assertParamExists('createMandate', 'createMandateRequest', createMandateRequest);
101
+ const localVarPath = `/mandates`;
102
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
103
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
104
+ let baseOptions;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ }
108
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
109
+ const localVarHeaderParameter = {};
110
+ const localVarQueryParameter = {};
111
+ // authentication Oauth2 required
112
+ // oauth required
113
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
114
+ localVarHeaderParameter['Content-Type'] = 'application/json';
115
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
116
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
117
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
118
+ localVarRequestOptions.data = common_1.serializeDataIfNeeded(createMandateRequest, localVarRequestOptions, configuration);
119
+ return {
120
+ url: common_1.toPathString(localVarUrlObj),
121
+ options: localVarRequestOptions,
122
+ };
123
+ }),
92
124
  /**
93
125
  * Create new Payment
94
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.
95
128
  * @param {*} [options] Override http request option.
96
129
  * @throws {RequiredError}
97
130
  */
98
- createPayment: (createPaymentRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
131
+ createPayment: (createPaymentRequest, idempotencyKey, options = {}) => __awaiter(this, void 0, void 0, function* () {
99
132
  // verify required parameter 'createPaymentRequest' is not null or undefined
100
133
  common_1.assertParamExists('createPayment', 'createPaymentRequest', createPaymentRequest);
101
134
  const localVarPath = `/payments`;
@@ -111,6 +144,9 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
111
144
  // authentication Oauth2 required
112
145
  // oauth required
113
146
  yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
147
+ if (idempotencyKey !== undefined && idempotencyKey !== null) {
148
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
149
+ }
114
150
  localVarHeaderParameter['Content-Type'] = 'application/json';
115
151
  common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
116
152
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -276,14 +312,14 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
276
312
  };
277
313
  }),
278
314
  /**
279
- * Get Mandates details by mandate_id
315
+ * Get Mandate details by mandate_id
280
316
  * @param {string} mandateId mandate id
281
317
  * @param {*} [options] Override http request option.
282
318
  * @throws {RequiredError}
283
319
  */
284
- getMandates: (mandateId, options = {}) => __awaiter(this, void 0, void 0, function* () {
320
+ getMandate: (mandateId, options = {}) => __awaiter(this, void 0, void 0, function* () {
285
321
  // verify required parameter 'mandateId' is not null or undefined
286
- common_1.assertParamExists('getMandates', 'mandateId', mandateId);
322
+ common_1.assertParamExists('getMandate', 'mandateId', mandateId);
287
323
  const localVarPath = `/mandates/{mandateId}`.replace(`{${'mandateId'}}`, encodeURIComponent(String(mandateId)));
288
324
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
289
325
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -408,38 +444,6 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
408
444
  options: localVarRequestOptions,
409
445
  };
410
446
  }),
411
- /**
412
- * CREATE Mandates
413
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
414
- * @param {*} [options] Override http request option.
415
- * @throws {RequiredError}
416
- */
417
- postMandates: (postMandatesRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
418
- // verify required parameter 'postMandatesRequest' is not null or undefined
419
- common_1.assertParamExists('postMandates', 'postMandatesRequest', postMandatesRequest);
420
- const localVarPath = `/mandates`;
421
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
422
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
423
- let baseOptions;
424
- if (configuration) {
425
- baseOptions = configuration.baseOptions;
426
- }
427
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
428
- const localVarHeaderParameter = {};
429
- const localVarQueryParameter = {};
430
- // authentication Oauth2 required
431
- // oauth required
432
- yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
433
- localVarHeaderParameter['Content-Type'] = 'application/json';
434
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
435
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
436
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
437
- localVarRequestOptions.data = common_1.serializeDataIfNeeded(postMandatesRequest, localVarRequestOptions, configuration);
438
- return {
439
- url: common_1.toPathString(localVarUrlObj),
440
- options: localVarRequestOptions,
441
- };
442
- }),
443
447
  /**
444
448
  * Refresh an access token
445
449
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -481,15 +485,28 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
481
485
  exports.CustomerApiFp = function (configuration) {
482
486
  const localVarAxiosParamCreator = exports.CustomerApiAxiosParamCreator(configuration);
483
487
  return {
488
+ /**
489
+ * CREATE Mandate
490
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
491
+ * @param {*} [options] Override http request option.
492
+ * @throws {RequiredError}
493
+ */
494
+ createMandate(createMandateRequest, options) {
495
+ return __awaiter(this, void 0, void 0, function* () {
496
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createMandate(createMandateRequest, options);
497
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
498
+ });
499
+ },
484
500
  /**
485
501
  * Create new Payment
486
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.
487
504
  * @param {*} [options] Override http request option.
488
505
  * @throws {RequiredError}
489
506
  */
490
- createPayment(createPaymentRequest, options) {
507
+ createPayment(createPaymentRequest, idempotencyKey, options) {
491
508
  return __awaiter(this, void 0, void 0, function* () {
492
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createPayment(createPaymentRequest, options);
509
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPayment(createPaymentRequest, idempotencyKey, options);
493
510
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
494
511
  });
495
512
  },
@@ -554,14 +571,14 @@ exports.CustomerApiFp = function (configuration) {
554
571
  });
555
572
  },
556
573
  /**
557
- * Get Mandates details by mandate_id
574
+ * Get Mandate details by mandate_id
558
575
  * @param {string} mandateId mandate id
559
576
  * @param {*} [options] Override http request option.
560
577
  * @throws {RequiredError}
561
578
  */
562
- getMandates(mandateId, options) {
579
+ getMandate(mandateId, options) {
563
580
  return __awaiter(this, void 0, void 0, function* () {
564
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getMandates(mandateId, options);
581
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMandate(mandateId, options);
565
582
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
566
583
  });
567
584
  },
@@ -604,18 +621,6 @@ exports.CustomerApiFp = function (configuration) {
604
621
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
605
622
  });
606
623
  },
607
- /**
608
- * CREATE Mandates
609
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
610
- * @param {*} [options] Override http request option.
611
- * @throws {RequiredError}
612
- */
613
- postMandates(postMandatesRequest, options) {
614
- return __awaiter(this, void 0, void 0, function* () {
615
- const localVarAxiosArgs = yield localVarAxiosParamCreator.postMandates(postMandatesRequest, options);
616
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
617
- });
618
- },
619
624
  /**
620
625
  * Refresh an access token
621
626
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -637,14 +642,26 @@ exports.CustomerApiFp = function (configuration) {
637
642
  exports.CustomerApiFactory = function (configuration, basePath, axios) {
638
643
  const localVarFp = exports.CustomerApiFp(configuration);
639
644
  return {
645
+ /**
646
+ * CREATE Mandate
647
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
648
+ * @param {*} [options] Override http request option.
649
+ * @throws {RequiredError}
650
+ */
651
+ createMandate(createMandateRequest, options) {
652
+ return localVarFp.createMandate(createMandateRequest, options).then((request) => request(axios, basePath));
653
+ },
640
654
  /**
641
655
  * Create new Payment
642
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.
643
658
  * @param {*} [options] Override http request option.
644
659
  * @throws {RequiredError}
645
660
  */
646
- createPayment(createPaymentRequest, options) {
647
- 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));
648
665
  },
649
666
  /**
650
667
  * Create a new payment instruction to be used when linking to perform new payment
@@ -694,13 +711,13 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
694
711
  return localVarFp.getLoginIdentityHistory(loginIdentityId, options).then((request) => request(axios, basePath));
695
712
  },
696
713
  /**
697
- * Get Mandates details by mandate_id
714
+ * Get Mandate details by mandate_id
698
715
  * @param {string} mandateId mandate id
699
716
  * @param {*} [options] Override http request option.
700
717
  * @throws {RequiredError}
701
718
  */
702
- getMandates(mandateId, options) {
703
- return localVarFp.getMandates(mandateId, options).then((request) => request(axios, basePath));
719
+ getMandate(mandateId, options) {
720
+ return localVarFp.getMandate(mandateId, options).then((request) => request(axios, basePath));
704
721
  },
705
722
  /**
706
723
  * Get Payment details by payment_id
@@ -736,15 +753,6 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
736
753
  .listInstitutions(country, countries, productsSupported, institutionType, options)
737
754
  .then((request) => request(axios, basePath));
738
755
  },
739
- /**
740
- * CREATE Mandates
741
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
742
- * @param {*} [options] Override http request option.
743
- * @throws {RequiredError}
744
- */
745
- postMandates(postMandatesRequest, options) {
746
- return localVarFp.postMandates(postMandatesRequest, options).then((request) => request(axios, basePath));
747
- },
748
756
  /**
749
757
  * Refresh an access token
750
758
  * @param {RefreshRequest} refreshRequest The refresh token
@@ -763,16 +771,29 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
763
771
  * @extends {BaseAPI}
764
772
  */
765
773
  class CustomerApi extends base_1.BaseAPI {
774
+ /**
775
+ * CREATE Mandate
776
+ * @param {CreateMandateRequest} createMandateRequest request body for creating mandate
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ * @memberof CustomerApi
780
+ */
781
+ createMandate(createMandateRequest, options) {
782
+ return exports.CustomerApiFp(this.configuration)
783
+ .createMandate(createMandateRequest, options)
784
+ .then((request) => request(this.axios, this.basePath));
785
+ }
766
786
  /**
767
787
  * Create new Payment
768
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.
769
790
  * @param {*} [options] Override http request option.
770
791
  * @throws {RequiredError}
771
792
  * @memberof CustomerApi
772
793
  */
773
- createPayment(createPaymentRequest, options) {
794
+ createPayment(createPaymentRequest, idempotencyKey, options) {
774
795
  return exports.CustomerApiFp(this.configuration)
775
- .createPayment(createPaymentRequest, options)
796
+ .createPayment(createPaymentRequest, idempotencyKey, options)
776
797
  .then((request) => request(this.axios, this.basePath));
777
798
  }
778
799
  /**
@@ -836,15 +857,15 @@ class CustomerApi extends base_1.BaseAPI {
836
857
  .then((request) => request(this.axios, this.basePath));
837
858
  }
838
859
  /**
839
- * Get Mandates details by mandate_id
860
+ * Get Mandate details by mandate_id
840
861
  * @param {string} mandateId mandate id
841
862
  * @param {*} [options] Override http request option.
842
863
  * @throws {RequiredError}
843
864
  * @memberof CustomerApi
844
865
  */
845
- getMandates(mandateId, options) {
866
+ getMandate(mandateId, options) {
846
867
  return exports.CustomerApiFp(this.configuration)
847
- .getMandates(mandateId, options)
868
+ .getMandate(mandateId, options)
848
869
  .then((request) => request(this.axios, this.basePath));
849
870
  }
850
871
  /**
@@ -886,18 +907,6 @@ class CustomerApi extends base_1.BaseAPI {
886
907
  .listInstitutions(country, countries, productsSupported, institutionType, options)
887
908
  .then((request) => request(this.axios, this.basePath));
888
909
  }
889
- /**
890
- * CREATE Mandates
891
- * @param {PostMandatesRequest} postMandatesRequest request body for creating mandate
892
- * @param {*} [options] Override http request option.
893
- * @throws {RequiredError}
894
- * @memberof CustomerApi
895
- */
896
- postMandates(postMandatesRequest, options) {
897
- return exports.CustomerApiFp(this.configuration)
898
- .postMandates(postMandatesRequest, options)
899
- .then((request) => request(this.axios, this.basePath));
900
- }
901
910
  /**
902
911
  * Refresh an access token
903
912
  * @param {RefreshRequest} refreshRequest The refresh token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finverse/sdk-typescript",
3
- "version": "0.0.40",
3
+ "version": "0.0.43",
4
4
  "description": "OpenAPI client for @finverse/sdk-typescript",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [