@finverse/sdk-typescript 0.0.82 → 0.0.84

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
@@ -815,6 +815,82 @@ export declare const CreatePaymentRequestTypeEnum: {
815
815
  readonly Single: "SINGLE";
816
816
  };
817
817
  export declare type CreatePaymentRequestTypeEnum = typeof CreatePaymentRequestTypeEnum[keyof typeof CreatePaymentRequestTypeEnum];
818
+ /**
819
+ *
820
+ * @export
821
+ * @interface CreateRecipientRequest
822
+ */
823
+ export interface CreateRecipientRequest {
824
+ /**
825
+ * Recipient\'s name/nickname (note: this does not need to match the actual accountholder name of the recipient\'s account)
826
+ * @type {string}
827
+ * @memberof CreateRecipientRequest
828
+ */
829
+ name: string;
830
+ /**
831
+ *
832
+ * @type {RecipientAccount}
833
+ * @memberof CreateRecipientRequest
834
+ */
835
+ recipient_account: RecipientAccount;
836
+ /**
837
+ * Customer App\'s internal ID for the recipient
838
+ * @type {string}
839
+ * @memberof CreateRecipientRequest
840
+ */
841
+ user_id?: string;
842
+ /**
843
+ * Additional attributes of the recipient in key:value format (e.g. employer_name: Apple Inc for a payroll case where recipient is an employee)
844
+ * @type {{ [key: string]: string; }}
845
+ * @memberof CreateRecipientRequest
846
+ */
847
+ metadata?: {
848
+ [key: string]: string;
849
+ };
850
+ }
851
+ /**
852
+ *
853
+ * @export
854
+ * @interface CreateRecipientResponse
855
+ */
856
+ export interface CreateRecipientResponse {
857
+ /**
858
+ * A unique identifier generated after creating recipient
859
+ * @type {string}
860
+ * @memberof CreateRecipientResponse
861
+ */
862
+ recipient_account_id?: string;
863
+ /**
864
+ * Recipient\'s name/nickname (note: this does not need to match the actual accountholder name of the recipient\'s account)
865
+ * @type {string}
866
+ * @memberof CreateRecipientResponse
867
+ */
868
+ name: string;
869
+ /**
870
+ *
871
+ * @type {RecipientAccount}
872
+ * @memberof CreateRecipientResponse
873
+ */
874
+ recipient_account: RecipientAccount;
875
+ /**
876
+ * Customer App\'s internal ID for the recipient
877
+ * @type {string}
878
+ * @memberof CreateRecipientResponse
879
+ */
880
+ user_id?: string;
881
+ /**
882
+ * Additional attributes of the recipient in key:value format (e.g. employer_name: Apple Inc for a payroll case where recipient is an employee)
883
+ * @type {object}
884
+ * @memberof CreateRecipientResponse
885
+ */
886
+ metadata?: object;
887
+ /**
888
+ * Timestamp in ISO format (YYYY-MM-DDTHH:MM:SS.SSSZ)
889
+ * @type {string}
890
+ * @memberof CreateRecipientResponse
891
+ */
892
+ last_update?: string;
893
+ }
818
894
  /**
819
895
  *
820
896
  * @export
@@ -1473,12 +1549,6 @@ export interface GetMandateSender {
1473
1549
  * @memberof GetMandateSender
1474
1550
  */
1475
1551
  sender_reference_id?: string;
1476
- /**
1477
- * Finverse Institution ID.
1478
- * @type {string}
1479
- * @memberof GetMandateSender
1480
- */
1481
- institution_id?: string;
1482
1552
  /**
1483
1553
  *
1484
1554
  * @type {PaymentAccount}
@@ -3242,6 +3312,12 @@ export interface PaymentAccount {
3242
3312
  * @memberof PaymentAccount
3243
3313
  */
3244
3314
  raw?: string;
3315
+ /**
3316
+ * Finverse Institution ID. Only returned if institution_id was included in the request.
3317
+ * @type {string}
3318
+ * @memberof PaymentAccount
3319
+ */
3320
+ institution_id?: string;
3245
3321
  }
3246
3322
  /**
3247
3323
  *
@@ -3685,6 +3761,71 @@ export interface ProductStatus {
3685
3761
  */
3686
3762
  last_successful_update?: string | null;
3687
3763
  }
3764
+ /**
3765
+ *
3766
+ * @export
3767
+ * @interface RecipientAccount
3768
+ */
3769
+ export interface RecipientAccount {
3770
+ /**
3771
+ * Accountholder name of the recipient\'s account
3772
+ * @type {string}
3773
+ * @memberof RecipientAccount
3774
+ */
3775
+ accountholder_name: string;
3776
+ /**
3777
+ *
3778
+ * @type {RecipientAccountNumber}
3779
+ * @memberof RecipientAccount
3780
+ */
3781
+ account_number?: RecipientAccountNumber;
3782
+ /**
3783
+ * Type of recipient account.
3784
+ * @type {string}
3785
+ * @memberof RecipientAccount
3786
+ */
3787
+ account_type: RecipientAccountAccountTypeEnum;
3788
+ /**
3789
+ * List of currencies supported by the recipient account
3790
+ * @type {Array<string>}
3791
+ * @memberof RecipientAccount
3792
+ */
3793
+ currencies: Array<string>;
3794
+ /**
3795
+ * Finverse Institution ID for the recipient’s institution.
3796
+ * @type {string}
3797
+ * @memberof RecipientAccount
3798
+ */
3799
+ institution_id: string;
3800
+ }
3801
+ export declare const RecipientAccountAccountTypeEnum: {
3802
+ readonly ExternalAccount: "EXTERNAL_ACCOUNT";
3803
+ };
3804
+ export declare type RecipientAccountAccountTypeEnum = typeof RecipientAccountAccountTypeEnum[keyof typeof RecipientAccountAccountTypeEnum];
3805
+ /**
3806
+ *
3807
+ * @export
3808
+ * @interface RecipientAccountNumber
3809
+ */
3810
+ export interface RecipientAccountNumber {
3811
+ /**
3812
+ * Type of account number. Possible values: LOCAL, IBAN
3813
+ * @type {string}
3814
+ * @memberof RecipientAccountNumber
3815
+ */
3816
+ type: RecipientAccountNumberTypeEnum;
3817
+ /**
3818
+ * Account number value
3819
+ * @type {string}
3820
+ * @memberof RecipientAccountNumber
3821
+ */
3822
+ number: string;
3823
+ }
3824
+ export declare const RecipientAccountNumberTypeEnum: {
3825
+ readonly Local: "LOCAL";
3826
+ readonly Iban: "IBAN";
3827
+ };
3828
+ export declare type RecipientAccountNumberTypeEnum = typeof RecipientAccountNumberTypeEnum[keyof typeof RecipientAccountNumberTypeEnum];
3688
3829
  /**
3689
3830
  *
3690
3831
  * @export
@@ -4338,6 +4479,13 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
4338
4479
  * @throws {RequiredError}
4339
4480
  */
4340
4481
  createPaymentInstruction: (paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
4482
+ /**
4483
+ * Create Recipients
4484
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
4485
+ * @param {*} [options] Override http request option.
4486
+ * @throws {RequiredError}
4487
+ */
4488
+ createRecipient: (createRecipientRequest: CreateRecipientRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
4341
4489
  /**
4342
4490
  * generate a link token that can be used to create link
4343
4491
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -4460,6 +4608,13 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
4460
4608
  * @throws {RequiredError}
4461
4609
  */
4462
4610
  createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentInstructionResponse>>;
4611
+ /**
4612
+ * Create Recipients
4613
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
4614
+ * @param {*} [options] Override http request option.
4615
+ * @throws {RequiredError}
4616
+ */
4617
+ createRecipient(createRecipientRequest: CreateRecipientRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRecipientResponse>>;
4463
4618
  /**
4464
4619
  * generate a link token that can be used to create link
4465
4620
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -4582,6 +4737,13 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
4582
4737
  * @throws {RequiredError}
4583
4738
  */
4584
4739
  createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: any): AxiosPromise<CreatePaymentInstructionResponse>;
4740
+ /**
4741
+ * Create Recipients
4742
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
4743
+ * @param {*} [options] Override http request option.
4744
+ * @throws {RequiredError}
4745
+ */
4746
+ createRecipient(createRecipientRequest: CreateRecipientRequest, options?: any): AxiosPromise<CreateRecipientResponse>;
4585
4747
  /**
4586
4748
  * generate a link token that can be used to create link
4587
4749
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -4708,6 +4870,14 @@ export interface CustomerApiInterface {
4708
4870
  * @memberof CustomerApiInterface
4709
4871
  */
4710
4872
  createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentInstructionResponse>;
4873
+ /**
4874
+ * Create Recipients
4875
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
4876
+ * @param {*} [options] Override http request option.
4877
+ * @throws {RequiredError}
4878
+ * @memberof CustomerApiInterface
4879
+ */
4880
+ createRecipient(createRecipientRequest: CreateRecipientRequest, options?: AxiosRequestConfig): AxiosPromise<CreateRecipientResponse>;
4711
4881
  /**
4712
4882
  * generate a link token that can be used to create link
4713
4883
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -4848,6 +5018,14 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
4848
5018
  * @memberof CustomerApi
4849
5019
  */
4850
5020
  createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentInstructionResponse>>;
5021
+ /**
5022
+ * Create Recipients
5023
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
5024
+ * @param {*} [options] Override http request option.
5025
+ * @throws {RequiredError}
5026
+ * @memberof CustomerApi
5027
+ */
5028
+ createRecipient(createRecipientRequest: CreateRecipientRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateRecipientResponse>>;
4851
5029
  /**
4852
5030
  * generate a link token that can be used to create link
4853
5031
  * @param {LinkTokenRequest} linkTokenRequest token request
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.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.TransactionLimitsPeriodEnum = exports.SubmitAuthChecklistResponseMandateStatusEnum = exports.SenderDetailDetailsTypeEnum = exports.PaymentScheduleFrequencyEnum = exports.PaymentResponseStatusEnum = exports.PaymentResponseTypeEnum = exports.PaymentInstructionTypeEnum = exports.PaymentInfoPaymentsSupportedEnum = exports.MandateAuthLinkCustomizationsUiModeEnum = exports.LoginMethodStatusEnum = exports.LinkTokenRequestAutomaticDataRefreshEnum = exports.LinkTokenRequestUiModeEnum = exports.InstitutionStatusEnum = exports.InstitutionUserTypeEnum = exports.InstitutionProductsSupportedEnum = exports.InstitutionInstitutionTypeEnum = exports.InstitutionTagsEnum = exports.GetMandateSenderSenderTypeEnum = exports.GetMandateResponseStatusEnum = exports.GetMandateAuthResponseSenderTypeEnum = exports.GetMandateAuthResponseMandateStatusEnum = exports.GetMandateAuthLinkResponseTokenTypeEnum = exports.GetBalanceHistoryResponseSourceEnum = exports.FvErrorModelTypeEnum = exports.CustomerPaymentInstructionTypeEnum = exports.CreatePaymentRequestTypeEnum = exports.CreateMandateSenderSenderTypeEnum = exports.CreateMandateResponseStatusEnum = exports.BadRequestModelV2ErrorTypeEnum = exports.AuthChecklistOptionsSubmittedByEnum = exports.AuthChecklistOptionsNameEnum = exports.AuthChecklistFactorRequiredEnum = exports.AuthChecklistFactorTypeEnum = exports.AccountTypeSubtypeEnum = exports.AccountTypeTypeEnum = 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.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.TransactionLimitsPeriodEnum = exports.SubmitAuthChecklistResponseMandateStatusEnum = exports.SenderDetailDetailsTypeEnum = exports.RecipientAccountNumberTypeEnum = exports.RecipientAccountAccountTypeEnum = exports.PaymentScheduleFrequencyEnum = exports.PaymentResponseStatusEnum = exports.PaymentResponseTypeEnum = exports.PaymentInstructionTypeEnum = exports.PaymentInfoPaymentsSupportedEnum = exports.MandateAuthLinkCustomizationsUiModeEnum = exports.LoginMethodStatusEnum = exports.LinkTokenRequestAutomaticDataRefreshEnum = exports.LinkTokenRequestUiModeEnum = exports.InstitutionStatusEnum = exports.InstitutionUserTypeEnum = exports.InstitutionProductsSupportedEnum = exports.InstitutionInstitutionTypeEnum = exports.InstitutionTagsEnum = exports.GetMandateSenderSenderTypeEnum = exports.GetMandateResponseStatusEnum = exports.GetMandateAuthResponseSenderTypeEnum = exports.GetMandateAuthResponseMandateStatusEnum = exports.GetMandateAuthLinkResponseTokenTypeEnum = exports.GetBalanceHistoryResponseSourceEnum = exports.FvErrorModelTypeEnum = exports.CustomerPaymentInstructionTypeEnum = exports.CreatePaymentRequestTypeEnum = exports.CreateMandateSenderSenderTypeEnum = exports.CreateMandateResponseStatusEnum = exports.BadRequestModelV2ErrorTypeEnum = exports.AuthChecklistOptionsSubmittedByEnum = exports.AuthChecklistOptionsNameEnum = exports.AuthChecklistFactorRequiredEnum = exports.AuthChecklistFactorTypeEnum = exports.AccountTypeSubtypeEnum = exports.AccountTypeTypeEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -204,6 +204,13 @@ exports.PaymentScheduleFrequencyEnum = {
204
204
  Quarterly: 'QUARTERLY',
205
205
  Yearly: 'YEARLY',
206
206
  };
207
+ exports.RecipientAccountAccountTypeEnum = {
208
+ ExternalAccount: 'EXTERNAL_ACCOUNT',
209
+ };
210
+ exports.RecipientAccountNumberTypeEnum = {
211
+ Local: 'LOCAL',
212
+ Iban: 'IBAN',
213
+ };
207
214
  exports.SenderDetailDetailsTypeEnum = {
208
215
  HkId: 'HK_ID',
209
216
  Passport: 'PASSPORT',
@@ -333,6 +340,38 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
333
340
  options: localVarRequestOptions,
334
341
  };
335
342
  }),
343
+ /**
344
+ * Create Recipients
345
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ createRecipient: (createRecipientRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
350
+ // verify required parameter 'createRecipientRequest' is not null or undefined
351
+ common_1.assertParamExists('createRecipient', 'createRecipientRequest', createRecipientRequest);
352
+ const localVarPath = `/recipients`;
353
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
354
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
355
+ let baseOptions;
356
+ if (configuration) {
357
+ baseOptions = configuration.baseOptions;
358
+ }
359
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
360
+ const localVarHeaderParameter = {};
361
+ const localVarQueryParameter = {};
362
+ // authentication Oauth2 required
363
+ // oauth required
364
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
365
+ localVarHeaderParameter['Content-Type'] = 'application/json';
366
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
367
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
368
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
369
+ localVarRequestOptions.data = common_1.serializeDataIfNeeded(createRecipientRequest, localVarRequestOptions, configuration);
370
+ return {
371
+ url: common_1.toPathString(localVarUrlObj),
372
+ options: localVarRequestOptions,
373
+ };
374
+ }),
336
375
  /**
337
376
  * generate a link token that can be used to create link
338
377
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -790,6 +829,18 @@ exports.CustomerApiFp = function (configuration) {
790
829
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
791
830
  });
792
831
  },
832
+ /**
833
+ * Create Recipients
834
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ createRecipient(createRecipientRequest, options) {
839
+ return __awaiter(this, void 0, void 0, function* () {
840
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createRecipient(createRecipientRequest, options);
841
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
842
+ });
843
+ },
793
844
  /**
794
845
  * generate a link token that can be used to create link
795
846
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -992,6 +1043,15 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
992
1043
  .createPaymentInstruction(paymentInstruction, options)
993
1044
  .then((request) => request(axios, basePath));
994
1045
  },
1046
+ /**
1047
+ * Create Recipients
1048
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ */
1052
+ createRecipient(createRecipientRequest, options) {
1053
+ return localVarFp.createRecipient(createRecipientRequest, options).then((request) => request(axios, basePath));
1054
+ },
995
1055
  /**
996
1056
  * generate a link token that can be used to create link
997
1057
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -1166,6 +1226,18 @@ class CustomerApi extends base_1.BaseAPI {
1166
1226
  .createPaymentInstruction(paymentInstruction, options)
1167
1227
  .then((request) => request(this.axios, this.basePath));
1168
1228
  }
1229
+ /**
1230
+ * Create Recipients
1231
+ * @param {CreateRecipientRequest} createRecipientRequest request body for creating recipient
1232
+ * @param {*} [options] Override http request option.
1233
+ * @throws {RequiredError}
1234
+ * @memberof CustomerApi
1235
+ */
1236
+ createRecipient(createRecipientRequest, options) {
1237
+ return exports.CustomerApiFp(this.configuration)
1238
+ .createRecipient(createRecipientRequest, options)
1239
+ .then((request) => request(this.axios, this.basePath));
1240
+ }
1169
1241
  /**
1170
1242
  * generate a link token that can be used to create link
1171
1243
  * @param {LinkTokenRequest} linkTokenRequest token request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finverse/sdk-typescript",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "description": "OpenAPI client for @finverse/sdk-typescript",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/chai": "^4.3.4",
25
- "@types/mocha": "^10.0.0",
25
+ "@types/mocha": "^10.0.1",
26
26
  "@types/node": "^12.11.5",
27
27
  "axios-mock-adapter": "^1.21.2",
28
28
  "chai": "^4.3.7",