@mbanq/core-sdk-js 0.32.0 → 0.33.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.
@@ -14739,14 +14739,17 @@ declare const ResponseSchema: z.ZodObject<{
14739
14739
  id: z.ZodNumber;
14740
14740
  clientId: z.ZodNumber;
14741
14741
  resourceId: z.ZodNumber;
14742
+ officeId: z.ZodNumber;
14742
14743
  }, "strip", z.ZodTypeAny, {
14743
14744
  id: number;
14744
14745
  clientId: number;
14745
14746
  resourceId: number;
14747
+ officeId: number;
14746
14748
  }, {
14747
14749
  id: number;
14748
14750
  clientId: number;
14749
14751
  resourceId: number;
14752
+ officeId: number;
14750
14753
  }>;
14751
14754
  declare const AcquiredCardsListSchema: z.ZodArray<z.ZodObject<{
14752
14755
  id: z.ZodNumber;
@@ -14861,6 +14864,7 @@ declare const AddAcquiredCardRequestSchema: z.ZodObject<{
14861
14864
  cardData: string;
14862
14865
  }>;
14863
14866
  type AddAcquiredCardRequest = z.infer<typeof AddAcquiredCardRequestSchema>;
14867
+ type AddAcquiredCardResponse = z.infer<typeof ResponseSchema>;
14864
14868
  declare const BlockAcquiredCardRequestSchema: z.ZodObject<{
14865
14869
  reason: z.ZodString;
14866
14870
  }, "strip", z.ZodTypeAny, {
@@ -14879,6 +14883,20 @@ declare const UnblockAcquiredCardRequestSchema: z.ZodObject<{
14879
14883
  type UnblockAcquiredCardRequest = z.infer<typeof UnblockAcquiredCardRequestSchema>;
14880
14884
  type DeleteAcquiredCardRequest = z.infer<typeof AcquiredCardsRequestSchema>;
14881
14885
  type DeleteAcquiredCardResponse = z.infer<typeof ResponseSchema>;
14886
+ declare const AcquiredCardPublicKeySchema: z.ZodObject<{
14887
+ keyID: z.ZodString;
14888
+ key: z.ZodString;
14889
+ expiration: z.ZodString;
14890
+ }, "strip", z.ZodTypeAny, {
14891
+ keyID: string;
14892
+ key: string;
14893
+ expiration: string;
14894
+ }, {
14895
+ keyID: string;
14896
+ key: string;
14897
+ expiration: string;
14898
+ }>;
14899
+ type AcquiredCardPublicKeyResponse = z.infer<typeof AcquiredCardPublicKeySchema>;
14882
14900
 
14883
14901
  declare const AddChargeToAccountRequestSchema: z.ZodObject<{
14884
14902
  chargeId: z.ZodNumber;
@@ -22577,12 +22595,7 @@ declare const GetAcquiredCardById: (params: AcquiredCardRequest) => Command<Acqu
22577
22595
  declare const AddAcquiredCard: (clientId: number, params: AddAcquiredCardRequest) => Command<{
22578
22596
  clientId: number;
22579
22597
  params: AddAcquiredCardRequest;
22580
- }, {
22581
- id: number;
22582
- officeId: number;
22583
- clientId: number;
22584
- resourceId: number;
22585
- }>;
22598
+ }, AddAcquiredCardResponse>;
22586
22599
  /**
22587
22600
  * Blocks the addition of acquired cards from external sources for a client
22588
22601
  *
@@ -22634,6 +22647,22 @@ declare const UnblockAcquiredCardAddition: (clientId: number, params: UnblockAcq
22634
22647
  * ```
22635
22648
  */
22636
22649
  declare const DeleteAcquiredCard: (params: DeleteAcquiredCardRequest) => Command<DeleteAcquiredCardRequest, DeleteAcquiredCardResponse>;
22650
+ /**
22651
+ * Gets the public key for acquired card encryption
22652
+ *
22653
+ * Retrieves the public key used for encrypting acquired card data. This key is typically
22654
+ * used to encrypt sensitive card information before adding it to the system, ensuring
22655
+ * secure data transmission and storage.
22656
+ *
22657
+ * @returns Command object that executes the API request and returns the public key
22658
+ *
22659
+ * @example
22660
+ * ```typescript
22661
+ * const command = GetAcquiredCardPublicKey();
22662
+ * const publicKey = await client.request(command);
22663
+ * ```
22664
+ */
22665
+ declare const GetAcquiredCardPublicKey: () => Command<undefined, AcquiredCardPublicKeyResponse>;
22637
22666
 
22638
22667
  /**
22639
22668
  * Retrieves detailed information about a specific subscriber.
@@ -23374,4 +23403,4 @@ declare const PayAccountCharge: (accountId: number, chargeId: number, params: Pa
23374
23403
  params: PayAccountChargeRequest;
23375
23404
  }, PayAccountChargeResponse>;
23376
23405
 
23377
- export { ActivateCard, ActivatePhysicalCard, AddAcquiredCard, AddCardToMobileWallet, AddChargeToAccount, AddChargeToLoanAccount, ApproveLoan, ApproveRejectClientDocument, BlockAccount, BlockAcquiredCardAddition, CalculateLoanSchedule, ChangeCardType, CloseAccount, CreateAccountProduct, CreateAndActivateAccount, CreateCard, CreateCardProduct, CreateClient, CreateClientAddress, CreateClientIdentifier, CreateFixedDepositAccount, CreateLoan, CreatePayment, CreatePrepaidCard, CreateRecipient, CreateTransfer, CustomCreate, CustomGet, CustomUpdate, DeactivatePrepaidCard, DeleteAccount, DeleteAcquiredCard, DeleteClient, DeleteClientDocument, DeleteFixedDepositAccount, DeletePayment, DeleteRecipient, DeleteSelfServiceUser, DisburseLoan, DisburseLoanToLinkedAccount, DownloadAccountStatement, EnableDisableConfiguration, EnableSelfServiceAccess, GenerateAccountStatement, GetAccount, GetAccountDocumentsDetails, GetAccountProductById, GetAccountsOfClient, GetAcquiredCardById, GetAcquiredCards, GetAllAccountProducts, GetBankDetailsFromRoutingCode, GetCardAuthorizationById, GetCardAuthorizations, GetCardById, GetCardImageUrl, GetCardProduct, GetCardSettlementById, GetCardSettlements, GetCards, GetChargesByAccountId, GetChargesByLoanAccountId, GetClient, GetClientAddress, GetClientClassification, GetClients, GetCompletedTransactions, GetConfigurationByName, GetConfigurations, GetFixedDepositAccount, GetLoanById, GetLoanPreclosureTemplate, GetLoanSearchTemplate, GetLoanTransactionDetails, GetLoanWriteoffTemplate, GetPayment, GetPayments, GetPendingTransactions, GetPermittedDocumentTypes, GetPrepaidCardById, GetPrepaidCardsByAccountId, GetRecentTransactions, GetRecipient, GetRecipients, GetSearchData, GetStatusOfVerifyClient, GetSubscriber, GetTransactionById, GetTransfer, GetTransfers, GetUserDetail, GraphQL, HoldAmount, ListCardProduct, ListClientDocument, MakeRepayment, OrderPhysicalCard, PayAccountCharge, PreCloseLoan, RenewCard, ReplaceCard, ScheduleAccountClosure, SetClientAddressStatus, SetPIN, SuspendCard, SwitchClientClassification, TerminateCard, UnblockAcquiredCardAddition, UndoChargeToAccount, UpdateAccount, UpdateAccountProduct, UpdateCardFeature, UpdateCardLimit, UpdateCardProduct, UpdateClient, UpdateClientAddress, UpdateClientIdentifier, UpdateFixedDepositAccount, UpdatePayment, UpdateRecipientGQL as UpdateRecipient, UpdateSelfServiceUser, UploadClientIdentifierDocument, VerifyWithActivateClients, WaiveChargeFromAccount, WriteLoanOff };
23406
+ export { ActivateCard, ActivatePhysicalCard, AddAcquiredCard, AddCardToMobileWallet, AddChargeToAccount, AddChargeToLoanAccount, ApproveLoan, ApproveRejectClientDocument, BlockAccount, BlockAcquiredCardAddition, CalculateLoanSchedule, ChangeCardType, CloseAccount, CreateAccountProduct, CreateAndActivateAccount, CreateCard, CreateCardProduct, CreateClient, CreateClientAddress, CreateClientIdentifier, CreateFixedDepositAccount, CreateLoan, CreatePayment, CreatePrepaidCard, CreateRecipient, CreateTransfer, CustomCreate, CustomGet, CustomUpdate, DeactivatePrepaidCard, DeleteAccount, DeleteAcquiredCard, DeleteClient, DeleteClientDocument, DeleteFixedDepositAccount, DeletePayment, DeleteRecipient, DeleteSelfServiceUser, DisburseLoan, DisburseLoanToLinkedAccount, DownloadAccountStatement, EnableDisableConfiguration, EnableSelfServiceAccess, GenerateAccountStatement, GetAccount, GetAccountDocumentsDetails, GetAccountProductById, GetAccountsOfClient, GetAcquiredCardById, GetAcquiredCardPublicKey, GetAcquiredCards, GetAllAccountProducts, GetBankDetailsFromRoutingCode, GetCardAuthorizationById, GetCardAuthorizations, GetCardById, GetCardImageUrl, GetCardProduct, GetCardSettlementById, GetCardSettlements, GetCards, GetChargesByAccountId, GetChargesByLoanAccountId, GetClient, GetClientAddress, GetClientClassification, GetClients, GetCompletedTransactions, GetConfigurationByName, GetConfigurations, GetFixedDepositAccount, GetLoanById, GetLoanPreclosureTemplate, GetLoanSearchTemplate, GetLoanTransactionDetails, GetLoanWriteoffTemplate, GetPayment, GetPayments, GetPendingTransactions, GetPermittedDocumentTypes, GetPrepaidCardById, GetPrepaidCardsByAccountId, GetRecentTransactions, GetRecipient, GetRecipients, GetSearchData, GetStatusOfVerifyClient, GetSubscriber, GetTransactionById, GetTransfer, GetTransfers, GetUserDetail, GraphQL, HoldAmount, ListCardProduct, ListClientDocument, MakeRepayment, OrderPhysicalCard, PayAccountCharge, PreCloseLoan, RenewCard, ReplaceCard, ScheduleAccountClosure, SetClientAddressStatus, SetPIN, SuspendCard, SwitchClientClassification, TerminateCard, UnblockAcquiredCardAddition, UndoChargeToAccount, UpdateAccount, UpdateAccountProduct, UpdateCardFeature, UpdateCardLimit, UpdateCardProduct, UpdateClient, UpdateClientAddress, UpdateClientIdentifier, UpdateFixedDepositAccount, UpdatePayment, UpdateRecipientGQL as UpdateRecipient, UpdateSelfServiceUser, UploadClientIdentifierDocument, VerifyWithActivateClients, WaiveChargeFromAccount, WriteLoanOff };
@@ -14739,14 +14739,17 @@ declare const ResponseSchema: z.ZodObject<{
14739
14739
  id: z.ZodNumber;
14740
14740
  clientId: z.ZodNumber;
14741
14741
  resourceId: z.ZodNumber;
14742
+ officeId: z.ZodNumber;
14742
14743
  }, "strip", z.ZodTypeAny, {
14743
14744
  id: number;
14744
14745
  clientId: number;
14745
14746
  resourceId: number;
14747
+ officeId: number;
14746
14748
  }, {
14747
14749
  id: number;
14748
14750
  clientId: number;
14749
14751
  resourceId: number;
14752
+ officeId: number;
14750
14753
  }>;
14751
14754
  declare const AcquiredCardsListSchema: z.ZodArray<z.ZodObject<{
14752
14755
  id: z.ZodNumber;
@@ -14861,6 +14864,7 @@ declare const AddAcquiredCardRequestSchema: z.ZodObject<{
14861
14864
  cardData: string;
14862
14865
  }>;
14863
14866
  type AddAcquiredCardRequest = z.infer<typeof AddAcquiredCardRequestSchema>;
14867
+ type AddAcquiredCardResponse = z.infer<typeof ResponseSchema>;
14864
14868
  declare const BlockAcquiredCardRequestSchema: z.ZodObject<{
14865
14869
  reason: z.ZodString;
14866
14870
  }, "strip", z.ZodTypeAny, {
@@ -14879,6 +14883,20 @@ declare const UnblockAcquiredCardRequestSchema: z.ZodObject<{
14879
14883
  type UnblockAcquiredCardRequest = z.infer<typeof UnblockAcquiredCardRequestSchema>;
14880
14884
  type DeleteAcquiredCardRequest = z.infer<typeof AcquiredCardsRequestSchema>;
14881
14885
  type DeleteAcquiredCardResponse = z.infer<typeof ResponseSchema>;
14886
+ declare const AcquiredCardPublicKeySchema: z.ZodObject<{
14887
+ keyID: z.ZodString;
14888
+ key: z.ZodString;
14889
+ expiration: z.ZodString;
14890
+ }, "strip", z.ZodTypeAny, {
14891
+ keyID: string;
14892
+ key: string;
14893
+ expiration: string;
14894
+ }, {
14895
+ keyID: string;
14896
+ key: string;
14897
+ expiration: string;
14898
+ }>;
14899
+ type AcquiredCardPublicKeyResponse = z.infer<typeof AcquiredCardPublicKeySchema>;
14882
14900
 
14883
14901
  declare const AddChargeToAccountRequestSchema: z.ZodObject<{
14884
14902
  chargeId: z.ZodNumber;
@@ -22577,12 +22595,7 @@ declare const GetAcquiredCardById: (params: AcquiredCardRequest) => Command<Acqu
22577
22595
  declare const AddAcquiredCard: (clientId: number, params: AddAcquiredCardRequest) => Command<{
22578
22596
  clientId: number;
22579
22597
  params: AddAcquiredCardRequest;
22580
- }, {
22581
- id: number;
22582
- officeId: number;
22583
- clientId: number;
22584
- resourceId: number;
22585
- }>;
22598
+ }, AddAcquiredCardResponse>;
22586
22599
  /**
22587
22600
  * Blocks the addition of acquired cards from external sources for a client
22588
22601
  *
@@ -22634,6 +22647,22 @@ declare const UnblockAcquiredCardAddition: (clientId: number, params: UnblockAcq
22634
22647
  * ```
22635
22648
  */
22636
22649
  declare const DeleteAcquiredCard: (params: DeleteAcquiredCardRequest) => Command<DeleteAcquiredCardRequest, DeleteAcquiredCardResponse>;
22650
+ /**
22651
+ * Gets the public key for acquired card encryption
22652
+ *
22653
+ * Retrieves the public key used for encrypting acquired card data. This key is typically
22654
+ * used to encrypt sensitive card information before adding it to the system, ensuring
22655
+ * secure data transmission and storage.
22656
+ *
22657
+ * @returns Command object that executes the API request and returns the public key
22658
+ *
22659
+ * @example
22660
+ * ```typescript
22661
+ * const command = GetAcquiredCardPublicKey();
22662
+ * const publicKey = await client.request(command);
22663
+ * ```
22664
+ */
22665
+ declare const GetAcquiredCardPublicKey: () => Command<undefined, AcquiredCardPublicKeyResponse>;
22637
22666
 
22638
22667
  /**
22639
22668
  * Retrieves detailed information about a specific subscriber.
@@ -23374,4 +23403,4 @@ declare const PayAccountCharge: (accountId: number, chargeId: number, params: Pa
23374
23403
  params: PayAccountChargeRequest;
23375
23404
  }, PayAccountChargeResponse>;
23376
23405
 
23377
- export { ActivateCard, ActivatePhysicalCard, AddAcquiredCard, AddCardToMobileWallet, AddChargeToAccount, AddChargeToLoanAccount, ApproveLoan, ApproveRejectClientDocument, BlockAccount, BlockAcquiredCardAddition, CalculateLoanSchedule, ChangeCardType, CloseAccount, CreateAccountProduct, CreateAndActivateAccount, CreateCard, CreateCardProduct, CreateClient, CreateClientAddress, CreateClientIdentifier, CreateFixedDepositAccount, CreateLoan, CreatePayment, CreatePrepaidCard, CreateRecipient, CreateTransfer, CustomCreate, CustomGet, CustomUpdate, DeactivatePrepaidCard, DeleteAccount, DeleteAcquiredCard, DeleteClient, DeleteClientDocument, DeleteFixedDepositAccount, DeletePayment, DeleteRecipient, DeleteSelfServiceUser, DisburseLoan, DisburseLoanToLinkedAccount, DownloadAccountStatement, EnableDisableConfiguration, EnableSelfServiceAccess, GenerateAccountStatement, GetAccount, GetAccountDocumentsDetails, GetAccountProductById, GetAccountsOfClient, GetAcquiredCardById, GetAcquiredCards, GetAllAccountProducts, GetBankDetailsFromRoutingCode, GetCardAuthorizationById, GetCardAuthorizations, GetCardById, GetCardImageUrl, GetCardProduct, GetCardSettlementById, GetCardSettlements, GetCards, GetChargesByAccountId, GetChargesByLoanAccountId, GetClient, GetClientAddress, GetClientClassification, GetClients, GetCompletedTransactions, GetConfigurationByName, GetConfigurations, GetFixedDepositAccount, GetLoanById, GetLoanPreclosureTemplate, GetLoanSearchTemplate, GetLoanTransactionDetails, GetLoanWriteoffTemplate, GetPayment, GetPayments, GetPendingTransactions, GetPermittedDocumentTypes, GetPrepaidCardById, GetPrepaidCardsByAccountId, GetRecentTransactions, GetRecipient, GetRecipients, GetSearchData, GetStatusOfVerifyClient, GetSubscriber, GetTransactionById, GetTransfer, GetTransfers, GetUserDetail, GraphQL, HoldAmount, ListCardProduct, ListClientDocument, MakeRepayment, OrderPhysicalCard, PayAccountCharge, PreCloseLoan, RenewCard, ReplaceCard, ScheduleAccountClosure, SetClientAddressStatus, SetPIN, SuspendCard, SwitchClientClassification, TerminateCard, UnblockAcquiredCardAddition, UndoChargeToAccount, UpdateAccount, UpdateAccountProduct, UpdateCardFeature, UpdateCardLimit, UpdateCardProduct, UpdateClient, UpdateClientAddress, UpdateClientIdentifier, UpdateFixedDepositAccount, UpdatePayment, UpdateRecipientGQL as UpdateRecipient, UpdateSelfServiceUser, UploadClientIdentifierDocument, VerifyWithActivateClients, WaiveChargeFromAccount, WriteLoanOff };
23406
+ export { ActivateCard, ActivatePhysicalCard, AddAcquiredCard, AddCardToMobileWallet, AddChargeToAccount, AddChargeToLoanAccount, ApproveLoan, ApproveRejectClientDocument, BlockAccount, BlockAcquiredCardAddition, CalculateLoanSchedule, ChangeCardType, CloseAccount, CreateAccountProduct, CreateAndActivateAccount, CreateCard, CreateCardProduct, CreateClient, CreateClientAddress, CreateClientIdentifier, CreateFixedDepositAccount, CreateLoan, CreatePayment, CreatePrepaidCard, CreateRecipient, CreateTransfer, CustomCreate, CustomGet, CustomUpdate, DeactivatePrepaidCard, DeleteAccount, DeleteAcquiredCard, DeleteClient, DeleteClientDocument, DeleteFixedDepositAccount, DeletePayment, DeleteRecipient, DeleteSelfServiceUser, DisburseLoan, DisburseLoanToLinkedAccount, DownloadAccountStatement, EnableDisableConfiguration, EnableSelfServiceAccess, GenerateAccountStatement, GetAccount, GetAccountDocumentsDetails, GetAccountProductById, GetAccountsOfClient, GetAcquiredCardById, GetAcquiredCardPublicKey, GetAcquiredCards, GetAllAccountProducts, GetBankDetailsFromRoutingCode, GetCardAuthorizationById, GetCardAuthorizations, GetCardById, GetCardImageUrl, GetCardProduct, GetCardSettlementById, GetCardSettlements, GetCards, GetChargesByAccountId, GetChargesByLoanAccountId, GetClient, GetClientAddress, GetClientClassification, GetClients, GetCompletedTransactions, GetConfigurationByName, GetConfigurations, GetFixedDepositAccount, GetLoanById, GetLoanPreclosureTemplate, GetLoanSearchTemplate, GetLoanTransactionDetails, GetLoanWriteoffTemplate, GetPayment, GetPayments, GetPendingTransactions, GetPermittedDocumentTypes, GetPrepaidCardById, GetPrepaidCardsByAccountId, GetRecentTransactions, GetRecipient, GetRecipients, GetSearchData, GetStatusOfVerifyClient, GetSubscriber, GetTransactionById, GetTransfer, GetTransfers, GetUserDetail, GraphQL, HoldAmount, ListCardProduct, ListClientDocument, MakeRepayment, OrderPhysicalCard, PayAccountCharge, PreCloseLoan, RenewCard, ReplaceCard, ScheduleAccountClosure, SetClientAddressStatus, SetPIN, SuspendCard, SwitchClientClassification, TerminateCard, UnblockAcquiredCardAddition, UndoChargeToAccount, UpdateAccount, UpdateAccountProduct, UpdateCardFeature, UpdateCardLimit, UpdateCardProduct, UpdateClient, UpdateClientAddress, UpdateClientIdentifier, UpdateFixedDepositAccount, UpdatePayment, UpdateRecipientGQL as UpdateRecipient, UpdateSelfServiceUser, UploadClientIdentifierDocument, VerifyWithActivateClients, WaiveChargeFromAccount, WriteLoanOff };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkHJ5MOWXHjs = require('../chunk-HJ5MOWXH.js');var _chunk6M772WIBjs = require('../chunk-6M772WIB.js');var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);var b=_zod.z.object({id:_zod.z.number(),controls:_zod.z.array(_zod.z.string()),type:_zod.z.string(),value:_zod.z.number(),timePeriod:_zod.z.number(),timeUnit:_zod.z.string(),territorialLimits:_zod.z.array(_zod.z.any()),category:_zod.z.string().optional(),categoryId:_zod.z.number().optional(),version:_zod.z.number().optional()}),q=_zod.z.object({id:_zod.z.number(),username:_zod.z.string(),officeId:_zod.z.number(),officeName:_zod.z.string(),firstname:_zod.z.string(),lastname:_zod.z.string(),email:_zod.z.string(),isEmailVerified:_zod.z.boolean(),isSelfServiceUser:_zod.z.boolean()}),Q=_zod.z.object({date:_zod.z.array(_zod.z.number()),time:_zod.z.object({hour:_zod.z.number(),minute:_zod.z.number(),second:_zod.z.number(),nano:_zod.z.number()})}),H=_zod.z.object({id:_zod.z.number(),accountId:_zod.z.number(),productId:_zod.z.number(),virtual:_zod.z.boolean(),productName:_zod.z.string(),network:_zod.z.string(),cardType:_zod.z.string(),digitalFirst:_zod.z.boolean(),cardProcessorName:_zod.z.string(),token:_zod.z.string(),embossedNames:_zod.z.array(_zod.z.string()),primaryAccountNumber:_zod.z.string(),expiresOn:_zod.z.array(_zod.z.number()),status:_zod.z.string(),fulfillmentStatus:_zod.z.string(),onlinePaymentEnabled:_zod.z.boolean(),posPaymentEnabled:_zod.z.boolean(),physicalCardActivated:_zod.z.boolean(),contactlessPaymentEnabled:_zod.z.boolean(),atmWithdrawalsEnabled:_zod.z.boolean(),internationalPaymentsEnabled:_zod.z.boolean(),velocityRules:_zod.z.array(b),registeredOn:_zod.z.array(_zod.z.number()),activatedAt:Q.optional(),updatedStatusBy:q.optional(),updatedStatusAt:_zod.z.string().optional(),bid:_zod.z.number(),replacedDamageCount:_zod.z.number(),user:q.optional(),businessCardIDEnabled:_zod.z.boolean(),mergedVelocityRules:_zod.z.array(b),maximumAllowedVelocityRules:_zod.z.array(b),cardNumber:_zod.z.number(),printAccountNickname:_zod.z.boolean()}),ia=_zod.z.array(H),ca=_zod.z.object({productId:_zod.z.number(),savingsAccountId:_zod.z.number().optional(),userId:_zod.z.number().optional(),savingsProductId:_zod.z.number().optional(),clientId:_zod.z.number()}).refine(e=>{let n=e.savingsAccountId!==void 0,o=e.savingsProductId!==void 0;return!(n&&o||!n&&!o||o&&e.clientId===void 0)}),da=_zod.z.object({productId:_zod.z.number(),creditAccountId:_zod.z.number(),userId:_zod.z.number().optional()}),ua=_zod.z.object({id:_zod.z.number(),cardToken:_zod.z.string(),clientId:_zod.z.number(),resourceId:_zod.z.number(),resourceIdentifier:_zod.z.string(),data:_zod.z.object({shippingAddressId:_zod.z.number()})}),P=_zod.z.object({walletProvider:_zod.z.enum(["APPLE_PAY","GOOGLE_PAY"]),certificate1:_zod.z.string().optional(),certificate2:_zod.z.string().optional(),nonce:_zod.z.string().optional(),deviceID:_zod.z.string().optional(),walletAccountID:_zod.z.string().optional()}).refine(e=>e.walletProvider==="GOOGLE_PAY"?e.deviceID!==void 0&&e.walletAccountID!==void 0&&e.certificate1===void 0&&e.certificate2===void 0&&e.nonce===void 0:e.walletProvider==="APPLE_PAY"?e.certificate1!==void 0&&e.certificate2!==void 0&&e.nonce!==void 0&&e.deviceID===void 0&&e.walletAccountID===void 0:!0,{message:"Invalid combination of parameters for the selected wallet provider"}),ma=_zod.z.object({id:_zod.z.number(),clientId:_zod.z.number(),resourceId:_zod.z.number(),data:_zod.z.object({activationData:_zod.z.string(),encryptedCardData:_zod.z.string(),ephemeralPublicKey:_zod.z.string()})}),pa=_zod.z.object({posPaymentEnabled:_zod.z.boolean().optional(),onlinePaymentEnabled:_zod.z.boolean().optional(),atmWithdrawalsEnabled:_zod.z.boolean().optional(),internationalPaymentsEnabled:_zod.z.boolean().optional(),blockedCountries:_zod.z.array(_zod.z.string()).optional()}),la=_zod.z.object({resourceId:_zod.z.number(),clientId:_zod.z.number(),id:_zod.z.number(),changes:_zod.z.object({posPaymentEnabled:_zod.z.boolean(),onlinePaymentEnabled:_zod.z.boolean(),contactlessPaymentEnabled:_zod.z.boolean(),atmWithdrawalsEnabled:_zod.z.boolean(),internationalPaymentsEnabled:_zod.z.boolean(),blockedCountries:_zod.z.array(_zod.z.string())})}),w=_zod.z.object({single:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional(),daily:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional(),weekly:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional(),monthly:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional()}),Ca=_zod.z.object({purchase:_zod.z.array(w).optional(),atm:_zod.z.array(w).optional()}),fa=_zod.z.object({resourceId:_zod.z.number(),clientId:_zod.z.number(),id:_zod.z.number(),changes:_zod.z.object({velocityRules:_zod.z.array(_zod.z.object({controls:_zod.z.array(_zod.z.string()),type:_zod.z.string(),value:_zod.z.number(),timePeriod:_zod.z.number(),timeUnit:_zod.z.string()}))})}),Y=_zod.z.object({mcc:_zod.z.string(),merchantId:_zod.z.string(),description:_zod.z.string(),postalcode:_zod.z.string(),country:_zod.z.string()}),J=_zod.z.object({aav:_zod.z.string(),arqc:_zod.z.string(),avsResult:_zod.z.string(),cvv1:_zod.z.string(),cvv2:_zod.z.string(),cvv3:_zod.z.string(),offlinePin:_zod.z.string(),pin:_zod.z.string()}),Z=_zod.z.object({entryType:_zod.z.string(),cardHolderPresent:_zod.z.string(),recurring:_zod.z.string(),validationResults:J}),X=_zod.z.object({zip:_zod.z.string(),address:_zod.z.string()}),G=_zod.z.object({id:_zod.z.number(),internalId:_zod.z.string(),externalAuthId:_zod.z.string(),externalOriginalAuthId:_zod.z.string(),authType:_zod.z.string(),transactionType:_zod.z.string(),currency:_zod.z.string(),amount:_zod.z.number(),returnBalance:_zod.z.boolean(),merchant:Y,expiryDate:_zod.z.array(_zod.z.number()),executionCode:_zod.z.string(),executionMessage:_zod.z.string(),status:_zod.z.string(),createdAt:_zod.z.string(),clearedAmount:_zod.z.number(),international:_zod.z.boolean(),incremental:_zod.z.boolean(),transaction:Z,flag:_zod.z.string(),avsData:X,settledAmount:_zod.z.number(),availableBalance:_zod.z.number(),accountBalance:_zod.z.number(),errorDetails:_zod.z.record(_zod.z.array(_zod.z.string())).optional()}),ee=_zod.z.enum(["ALL","ACTIVE","COMPLETED","REJECTED","EXPIRED","RELEASED","REVERSED"]),ha=_zod.z.object({cardToken:_zod.z.string(),status:ee.optional(),offset:_zod.z.number().optional(),limit:_zod.z.number().optional(),orderBy:_zod.z.string().optional(),sortOrder:_zod.z.enum(["asc","desc"]).optional(),isActiveCardAuthorizations:_zod.z.boolean().optional()}),ya=_zod.z.object({totalFilteredRecords:_zod.z.number(),pageItems:_zod.z.array(G)}),te=_zod.z.enum(["notes","media"]),ga=_zod.z.object({cardToken:_zod.z.string(),authorizationId:_zod.z.number(),associations:te.optional()}),ne=_zod.z.object({cashBackAmount:_zod.z.number(),exchangeRate:_zod.z.number(),feeAmount:_zod.z.number(),localCurrency:_zod.z.string(),localCurrencyAmount:_zod.z.number(),localSurchargeAmt:_zod.z.number()}),ae=_zod.z.object({accountToken:_zod.z.string(),cardToken:_zod.z.string()}),oe=_zod.z.object({id:_zod.z.number(),accountId:_zod.z.number(),productId:_zod.z.number(),virtual:_zod.z.boolean(),network:_zod.z.string(),cardType:_zod.z.string(),digitalFirst:_zod.z.boolean(),token:_zod.z.string(),embossedNames:_zod.z.array(_zod.z.string()),primaryAccountNumber:_zod.z.string(),expiresOn:_zod.z.array(_zod.z.number()),status:_zod.z.string(),fulfillmentStatus:_zod.z.string(),onlinePaymentEnabled:_zod.z.boolean(),posPaymentEnabled:_zod.z.boolean(),physicalCardActivated:_zod.z.boolean(),contactlessPaymentEnabled:_zod.z.boolean(),atmWithdrawalsEnabled:_zod.z.boolean(),internationalPaymentsEnabled:_zod.z.boolean(),registeredOn:_zod.z.array(_zod.z.number()),activatedAt:_zod.z.object({date:_zod.z.array(_zod.z.number()),time:_zod.z.object({hour:_zod.z.number(),minute:_zod.z.number(),second:_zod.z.number(),nano:_zod.z.number()})}).optional(),businessCardIDEnabled:_zod.z.boolean()}),E=_zod.z.object({is_emv:_zod.z.boolean()}),re=_zod.z.object({id:_zod.z.string(),emv:E,mcc:_zod.z.number(),mti:_zod.z.string(),account:_zod.z.object({cad:_zod.z.number(),pan:_zod.z.string(),prn:_zod.z.string(),xid:_zod.z.number(),card_status:_zod.z.string(),account_status:_zod.z.string(),expiration_date:_zod.z.string(),merchant_supplied_expiration_date:_zod.z.string()}),amounts:_zod.z.object({currency:_zod.z.string(),fee_amount:_zod.z.string(),trans_amount:_zod.z.string(),amt_til_limit:_zod.z.string(),exchange_rate:_zod.z.string(),local_currency:_zod.z.string(),available_funds:_zod.z.string(),cashback_amount:_zod.z.string(),upcharge_amount:_zod.z.string(),billing_currency:_zod.z.string(),local_currency_amount:_zod.z.string(),billing_currency_amount:_zod.z.string()}),auth_id:_zod.z.string(),network:_zod.z.string(),version:_zod.z.string(),avs_data:_zod.z.object({zip:_zod.z.string(),address:_zod.z.string()}),merchant:_zod.z.object({acquirer_id:_zod.z.string(),merchant_id:_zod.z.string(),terminal_id:_zod.z.string(),merchant_state:_zod.z.string(),merchant_country:_zod.z.string(),merchant_description:_zod.z.string(),merchant_postal_code:_zod.z.string()}),auth_type:_zod.z.string(),ecommerce:_zod.z.object({raw_eci:_zod.z.string(),is_ecommerce:_zod.z.boolean(),merchant_asserts_authenticated:_zod.z.boolean(),merchant_asserts_data_protection:_zod.z.boolean(),merchant_asserts_authentication_attempted:_zod.z.boolean()}),risk_code:_zod.z.string(),timestamp:_zod.z.string(),entry_type:_zod.z.string(),risk_score:_zod.z.string(),subnetwork:_zod.z.string(),original_id:_zod.z.string(),transaction:_zod.z.object({recurring:_zod.z.string(),cardholder_present:_zod.z.string(),transaction_initiator_code:_zod.z.string()}),international:_zod.z.boolean(),response_code:_zod.z.string(),transaction_type:_zod.z.string(),partial_supported:_zod.z.boolean(),validation_results:_zod.z.object({aav:_zod.z.string(),pin:_zod.z.string(),arqc:_zod.z.string(),cvv1:_zod.z.string(),cvv2:_zod.z.string(),cvv3:_zod.z.string(),avs_result:_zod.z.string(),offline_pin:_zod.z.string()}),digital_payment_data:_zod.z.record(_zod.z.any()),pin_entry_capability:_zod.z.string(),response_code_objects:_zod.z.record(_zod.z.array(_zod.z.string())),eligible_for_balance_return:_zod.z.boolean()}),ba=G.extend({externalCardId:_zod.z.string().optional(),gatewayToken:_zod.z.string().optional(),account:ae.optional(),amountDetails:ne.optional(),isEcommerce:_zod.z.boolean().optional(),releasedAt:_zod.z.string().optional(),card:oe.optional(),pinCapability:_zod.z.string().optional(),riskScore:_zod.z.string().optional(),emv:E.optional(),media:_zod.z.record(_zod.z.any()).optional(),rawAuthorizationDetails:re.optional(),network:_zod.z.string().optional()}),se=_zod.z.object({merchant_number:_zod.z.string(),merchantId:_zod.z.string(),merchant_location:_zod.z.string(),mcc:_zod.z.string(),description:_zod.z.string()}),ie=_zod.z.object({clientId:_zod.z.number(),firstName:_zod.z.string(),lastName:_zod.z.string(),accountNumber:_zod.z.string(),id:_zod.z.number(),type:_zod.z.string(),internalClearingId:_zod.z.string(),internalAuthId:_zod.z.string(),externalClearingId:_zod.z.string(),externalAuthId:_zod.z.string(),externalOriginalAuthId:_zod.z.string(),externalCardId:_zod.z.string(),cardToken:_zod.z.string(),merchant:se,amount:_zod.z.number(),network:_zod.z.string(),currency:_zod.z.string(),requestedAt:_zod.z.string(),createdAt:_zod.z.string(),status:_zod.z.string(),batchDate:_zod.z.string(),batchIdentifier:_zod.z.string(),mcSequenceNumber:_zod.z.number(),mcSequenceCount:_zod.z.number(),completedInternalClearingId:_zod.z.number(),interchangeFeeAmount:_zod.z.number()}),ce=_zod.z.enum(["COMPLETED","REJECTED","PENDING"]),Ra=_zod.z.object({startDate:_zod.z.string().optional(),endDate:_zod.z.string().optional(),dateFormat:_zod.z.string().optional(),offset:_zod.z.number().optional(),limit:_zod.z.number().optional(),status:ce.optional(),internalClearingId:_zod.z.string().optional(),orderBy:_zod.z.string().optional(),sortOrder:_zod.z.enum(["asc","desc"]).optional(),isCardSettlementOnly:_zod.z.boolean().optional()}),xa=_zod.z.object({totalFilteredRecords:_zod.z.number(),pageItems:_zod.z.array(ie)}),Aa=_zod.z.object({settlementId:_zod.z.number()}),de=_zod.z.object({id:_zod.z.number(),lastDigits:_zod.z.string(),expiryDate:_zod.z.string(),network:_zod.z.string(),pushEnabled:_zod.z.boolean(),pullEnabled:_zod.z.boolean(),isRegulated:_zod.z.boolean(),avsVerified:_zod.z.boolean(),pushFundAvailability:_zod.z.string(),countryCode:_zod.z.string(),currencyCode:_zod.z.string(),cardType:_zod.z.string(),fullName:_zod.z.string(),referenceId:_zod.z.string(),externalId:_zod.z.string(),deleted:_zod.z.boolean(),status:_zod.z.string(),financialInstitution:_zod.z.string(),createdAt:_zod.z.string(),updatedAt:_zod.z.string()}),Sa=_zod.z.array(de);var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);var _uuid = require('uuid');var _https = require('https'); var L = _interopRequireWildcard(_https);var pe=e=>e&&(e.startsWith("Bearer ")?e:`Bearer ${e}`),c=async e=>{let o=()=>`RequestUUID=${_uuid.v4.call(void 0, )}`,s=_axios2.default.create({timeout:_optionalChain([e, 'access', _2 => _2.axiosConfig, 'optionalAccess', _3 => _3.timeout])||29e3,baseURL:e.baseUrl,headers:{"Content-Type":"application/json; charset=utf-8","JWT-Token":_optionalChain([e, 'optionalAccess', _4 => _4.jwtToken])||void 0,Authorization:e.bearerToken?pe(e.bearerToken):void 0,"trace-id":o(),tenantId:e.tenantId},httpsAgent:new L.Agent({rejectUnauthorized:!0,keepAlive:_optionalChain([e, 'access', _5 => _5.axiosConfig, 'optionalAccess', _6 => _6.keepAlive])})});return e.logger&&e.logger(s),s};var le=e=>{let n=`/v1/clients/${e}/cards`;return{input:{clientId:e},metadata:{commandName:"GetCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ce= exports.GetCardById =e=>{let n=`/v1/cards/${e}`;return{input:{cardId:e},metadata:{commandName:"GetCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},fe= exports.GetCardImageUrl =e=>{let n=`/v1/cards/${e}/imageUrl`;return{input:{cardId:e},metadata:{commandName:"GetCardImageUrl",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},he= exports.GetCardAuthorizations =e=>{let n=new URLSearchParams;e.status&&n.append("status",e.status),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isActiveCardAuthorizations!==void 0&&n.append("isActiveCardAuthorizations",e.isActiveCardAuthorizations.toString());let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizations",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},ye= exports.CreateCard =e=>{let n="/v1/cards";return{input:{params:e},metadata:{commandName:"CreateCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},ge= exports.ChangeCardType =(e,n)=>{let o=`/v1/cards/${e}?command=CHANGE_TYPE`;return{input:{cardId:e,params:n},metadata:{commandName:"ChangeCardType",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},be= exports.ActivatePhysicalCard =e=>{let n=`/v1/cards/${e}?command=ACTIVATE_PHYSICAL`;return{input:{cardId:e},metadata:{commandName:"ActivatePhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Re= exports.OrderPhysicalCard =e=>{let n=`/v1/cards/${e}?command=FULFILL`;return{input:{cardId:e},metadata:{commandName:"OrderPhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},xe= exports.SetPIN =e=>{let n=`/v1/cards/${e}?command=REQUEST_CHANGE_PIN_URL`;return{input:{cardId:e},metadata:{commandName:"SetPIN",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ae= exports.AddCardToMobileWallet =(e,n)=>{let o=`/v1/cards/${e}/provision`;return{input:{cardId:e,params:n},metadata:{commandName:"AddCardToMobileWallet",path:o,method:"POST"},execute:async s=>{P.parse(n);let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Se= exports.UpdateCardFeature =(e,n)=>{let o=`/v1/cards/${e}`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardFeature",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Ie= exports.UpdateCardLimit =(e,n)=>{let o=`/v1/cards/${e}/velocityrules`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardLimit",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},ve= exports.GetCardAuthorizationById =e=>{let n=new URLSearchParams;e.associations&&n.append("associations",e.associations);let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization/${e.authorizationId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizationById",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},De= exports.GetCardSettlements =e=>{let n=new URLSearchParams;e.startDate&&n.append("startDate",e.startDate),e.endDate&&n.append("endDate",e.endDate),e.dateFormat&&n.append("dateFormat",e.dateFormat),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.status&&n.append("status",e.status),e.internalClearingId&&n.append("internalClearingId",e.internalClearingId),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isCardSettlementOnly!==void 0&&n.append("isCardSettlementOnly",e.isCardSettlementOnly.toString());let o=n.toString(),s=`/v1/cardSettlements${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardSettlements",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Te= exports.GetCardSettlementById =e=>{let n=`/v1/cardSettlements/${e.settlementId}`;return{input:{params:e},metadata:{commandName:"GetCardSettlementById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},R=(e,n)=>{let o=`/v1/cards/${e}?command=${n}`;return{input:{cardId:e,command:n},metadata:{commandName:"UpdateCardStatus",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},qe= exports.TerminateCard =e=>R(e,"TERMINATE"),we= exports.SuspendCard =e=>R(e,"SUSPEND"),Pe= exports.ActivateCard =e=>R(e,"ACTIVATE");var Ge=(e,n)=>{let o=`/v1/cards/${e}?command=REPLACE`;return{input:{cardId:e,reason:n},metadata:{commandName:"ReplaceCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{replaceReason:n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Ee= exports.RenewCard =(e,n)=>{let o=`/v1/cards/${e}?command=RENEW`;return{input:{cardId:e,productId:n},metadata:{commandName:"RenewCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{productId:n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var Le=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards`;return{input:{primaryAccountId:e,params:n},metadata:{commandName:"CreatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Ue= exports.GetPrepaidCardsByAccountId =(e,n)=>{let o=new URLSearchParams;n&&o.append("status",n);let s=o.toString(),r=`/v1/savingsaccounts/${e}/prepaidcards${s?`?${s}`:""}`;return{input:{primaryAccountId:e,status:n},metadata:{commandName:"GetPrepaidCardsByAccountId",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},Ne= exports.GetPrepaidCardById =(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"GetPrepaidCardById",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Oe= exports.DeactivatePrepaidCard =(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"DeactivatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var $e={documentTypeId:_zod2.default.string(),documentKey:_zod2.default.string(),status:_zod2.default.string(),description:_zod2.default.string().optional(),issuedBy:_zod2.default.string().optional(),locale:_zod2.default.string().optional(),dateFormat:_zod2.default.string().optional(),expiryDate:_zod2.default.string().optional(),nationality:_zod2.default.number().optional(),issuedDate:_zod2.default.string().optional()},ke=_zod2.default.object($e).catchall(_zod2.default.any()),Be={id:_zod2.default.number(),officeId:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number(),changes:_zod2.default.record(_zod2.default.string(),_zod2.default.any()),isScheduledTransfer:_zod2.default.boolean(),isSkipNotification:_zod2.default.boolean()},ze={id:_zod2.default.number(),clientId:_zod2.default.number(),documentType:_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string(),isMasked:_zod2.default.boolean().optional()}),documentKey:_zod2.default.union([_zod2.default.string(),_zod2.default.number()]),status:_zod2.default.string(),description:_zod2.default.string().optional(),issuedBy:_zod2.default.string().optional(),expiryDate:_zod2.default.union([_zod2.default.string(),_zod2.default.array(_zod2.default.number())]).optional(),nationality:_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string()}).optional(),issuedDate:_zod2.default.string().optional(),documentStatus:_zod2.default.string().optional()},oo=_zod2.default.object(Be).catchall(_zod2.default.any()),Fe=_zod2.default.object(ze).catchall(_zod2.default.any()),ro=_zod2.default.array(Fe),x=e=>ke.parse(e);var je=_zod2.default.object({name:_zod2.default.string(),file:_zod2.default.union([_zod2.default.instanceof(Buffer),_zod2.default.instanceof(Blob),_zod2.default.instanceof(File)]),type:_zod2.default.string().optional(),description:_zod2.default.string().optional()}),so=_zod2.default.object({id:_zod2.default.string(),resourceIdentifier:_zod2.default.string(),uuid:_zod2.default.string()}),U=e=>je.parse(e),io=_zod2.default.object({officeId:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number()}),co=_zod2.default.object({clientId:_zod2.default.number(),resourceId:_zod2.default.number()});var _e=e=>{let n=`/v1/clients/${e}/identifiers/template`;return{input:{clientId:e},metadata:{commandName:"GetPermittedDocumentTypes",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ve= exports.ListClientDocument =e=>{let n=new URLSearchParams;e.unmaskValue!==void 0&&n.append("unmaskValue",e.unmaskValue.toString()),e.fields&&n.append("fields",e.fields);let o=n.toString(),s=`/v1/clients/${e.clientId}/identifiers${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"ListClientDocument",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Me= exports.CreateClientIdentifier =(e,n)=>{x(n);let o=`/v1/clients/${e}/identifiers`;return{input:{clientId:e,input:n},metadata:{commandName:"CreateClientIdentifier",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},We= exports.UpdateClientIdentifier =(e,n,o)=>{x(o);let s=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n,updates:o},metadata:{commandName:"UpdateClientIdentifier",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o})).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Ke= exports.UploadClientIdentifierDocument =(e,n,o)=>{U(o);let s=`/v1/client_identifiers/${n}/documents`;return{input:{clientId:e,identifierId:n,data:o},metadata:{commandName:"UploadClientIdentifierDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r),{name:u,file:p,type:l,description:C}=o,f=new FormData;f.append("name",u),C&&f.append("description",C),l&&f.append("type",l);let y,g;p instanceof File?(y=p,g=p.name):p instanceof Blob?(y=p,g=u):(y=new Blob([p],{type:"application/octet-stream"}),g=u),f.append("file",y,g);try{return(await i.post(s,f,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(I){_chunk6M772WIBjs.c.call(void 0, I)}}}},Qe= exports.DeleteClientDocument =(e,n)=>{let o=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n},metadata:{commandName:"DeleteClientDocument",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},He= exports.ApproveRejectClientDocument =(e,n,o)=>{let s=`/v1/clients/${e}/identifiers/${n}?command=${o}`;return{input:{clientId:e,identifierId:n,command:o},metadata:{commandName:"ApproveRejectClientDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}};var N=_zod2.default.object({id:_zod2.default.number(),code:_zod2.default.string(),value:_zod2.default.string()}),O=_zod2.default.object({id:_zod2.default.number(),code:_zod2.default.string(),value:_zod2.default.string()}),$=_zod2.default.object({active:_zod2.default.boolean(),mandatory:_zod2.default.boolean(),systemDefined:_zod2.default.boolean()}),k=_zod2.default.object({id:_zod2.default.number()}),B=_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string().optional()}),z=_zod2.default.object({active:_zod2.default.boolean()}),F=_zod2.default.object({submittedOnDate:_zod2.default.array(_zod2.default.number()),submittedByUsername:_zod2.default.string().optional(),submittedByFirstname:_zod2.default.string().optional(),submittedByLastname:_zod2.default.string().optional(),activatedOnDate:_zod2.default.array(_zod2.default.number()).optional(),activatedByUsername:_zod2.default.string().optional(),activatedByFirstname:_zod2.default.string().optional(),activatedByLastname:_zod2.default.string().optional()}),Ye=_zod2.default.object({}).catchall(_zod2.default.any()),Je=_zod2.default.object({}).catchall(_zod2.default.any()),Ze=_zod2.default.object({}).catchall(_zod2.default.any()),j=_zod2.default.object({constitution:Ye,mainBusinessLine:Je,countryOfIncorporation:Ze}).catchall(_zod2.default.any()),_=_zod2.default.object({isExternalCardDebitDisable:_zod2.default.boolean(),isExternalCardCreditDisable:_zod2.default.boolean(),isAchDebitOutgoingDisable:_zod2.default.boolean(),isAchCreditOutgoingDisable:_zod2.default.boolean(),isAchDebitIncomingDisable:_zod2.default.boolean(),isAchCreditIncomingDisable:_zod2.default.boolean(),isInternalCreditDisable:_zod2.default.boolean(),isInternalDebitDisable:_zod2.default.boolean(),isWireCreditOutgoingDisable:_zod2.default.boolean(),isWireCreditIncomingDisable:_zod2.default.boolean(),isSwiftCreditOutgoingDisable:_zod2.default.boolean(),isSwiftCreditIncomingDisable:_zod2.default.boolean(),isFxpayCreditOutgoingDisable:_zod2.default.boolean(),isAllocateToSubAccountDisable:_zod2.default.boolean(),isInternalCreditOwnDisable:_zod2.default.boolean(),type:_zod2.default.string(),resourceId:_zod2.default.number(),id:_zod2.default.number()}).catchall(_zod2.default.any()),V=_zod2.default.object({}).catchall(_zod2.default.any()),M=_zod2.default.object({id:_zod2.default.number(),accountNo:_zod2.default.string(),status:O,subStatus:$,active:_zod2.default.boolean(),activationDate:_zod2.default.array(_zod2.default.number()).optional(),firstname:_zod2.default.string(),lastname:_zod2.default.string(),displayName:_zod2.default.string(),mobileNo:_zod2.default.string(),emailAddress:_zod2.default.string(),dateOfBirth:_zod2.default.array(_zod2.default.number()),gender:k,clientTypes:_zod2.default.array(_zod2.default.any()),clientClassification:B,occupation:z,isStaff:_zod2.default.boolean(),skipAvs:_zod2.default.boolean(),officeId:_zod2.default.number(),officeName:_zod2.default.string(),imageId:_zod2.default.string().optional(),imagePresent:_zod2.default.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:_zod2.default.string(),updatedAt:_zod2.default.string(),isBlockExternalCardsAddition:_zod2.default.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:_zod2.default.array(_zod2.default.number()).optional(),mobileCountryCode:_zod2.default.string(),clientKycStatus:V,ofLoanCycle:_zod2.default.number(),ofLoanActive:_zod2.default.number(),activeDepositAccount:_zod2.default.number(),onBoardingStatus:_zod2.default.string().optional()}).catchall(_zod2.default.any()),Xe=_zod2.default.object({riskScore:_zod2.default.number(),rating:_zod2.default.string()}).catchall(_zod2.default.any()),et=_zod2.default.object({street:_zod2.default.string(),city:_zod2.default.string(),state:_zod2.default.string(),zipCode:_zod2.default.string()}).catchall(_zod2.default.any()),tt=_zod2.default.object({type:_zod2.default.string(),value:_zod2.default.string()}).catchall(_zod2.default.any()),nt={firstname:_zod2.default.string(),middlename:_zod2.default.string().optional(),lastname:_zod2.default.string(),fullname:_zod2.default.string().optional(),dob:_zod2.default.string(),genderId:_zod2.default.number(),locale:_zod2.default.string(),officeId:_zod2.default.number(),mobileCountryCode:_zod2.default.string(),mobileNo:_zod2.default.string(),emailAddress:_zod2.default.string().email(),legalFormId:_zod2.default.number(),externalId:_zod2.default.string().optional(),isOptedForMLALStatus:_zod2.default.boolean().optional(),currentMLALStatus:_zod2.default.string().optional(),isStaff:_zod2.default.boolean().optional(),staffId:_zod2.default.number().optional(),clientClassificationId:_zod2.default.number().optional(),savingsProductId:_zod2.default.number().optional(),active:_zod2.default.boolean().optional(),dateFormat:_zod2.default.string(),activationDate:_zod2.default.string().optional(),submittedOnDate:_zod2.default.string(),dateOfBirth:_zod2.default.string()},Io=_zod2.default.object(nt).catchall(_zod2.default.any()),at={clientId:_zod2.default.number(),status:_zod2.default.string()},vo=_zod2.default.object(at).catchall(_zod2.default.any()),ot={firstname:_zod2.default.string().optional(),middlename:_zod2.default.string().optional(),fullname:_zod2.default.string().optional(),genderId:_zod2.default.number().optional(),lastname:_zod2.default.string().optional(),occupationId:_zod2.default.number().optional(),mobileCountryCode:_zod2.default.string().optional(),mobileNo:_zod2.default.string().optional(),emailAddress:_zod2.default.string().email().optional(),externalId:_zod2.default.string().optional(),clientClassificationId:_zod2.default.number().optional(),dateOfBirth:_zod2.default.string().optional(),dateFormat:_zod2.default.string().optional()},Do=_zod2.default.object(ot).catchall(_zod2.default.any()),rt={documentTypeId:_zod2.default.string(),documentKey:_zod2.default.string(),status:_zod2.default.string(),description:_zod2.default.string().optional(),issuedBy:_zod2.default.string().optional(),locale:_zod2.default.string().optional(),dateFormat:_zod2.default.string().optional(),expiryDate:_zod2.default.string().optional(),nationality:_zod2.default.number().optional(),issuedDate:_zod2.default.string().optional()},To=_zod2.default.object(rt).catchall(_zod2.default.any()),st={id:_zod2.default.number(),officeId:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number(),changes:_zod2.default.record(_zod2.default.string(),_zod2.default.any()),isScheduledTransfer:_zod2.default.boolean(),isSkipNotification:_zod2.default.boolean()},qo=_zod2.default.object(st).catchall(_zod2.default.any()),it={developerMessage:_zod2.default.string(),defaultUserMessage:_zod2.default.string(),userMessageGlobalisationCode:_zod2.default.string(),parameterName:_zod2.default.string().optional(),value:_zod2.default.any().nullable(),args:_zod2.default.array(_zod2.default.object({value:_zod2.default.any()})).optional()},ct=_zod2.default.object(it),dt={developerMessage:_zod2.default.string(),httpStatusCode:_zod2.default.string(),defaultUserMessage:_zod2.default.string(),userMessageGlobalisationCode:_zod2.default.string(),errors:_zod2.default.array(ct).optional()},wo=_zod2.default.object(dt).catchall(_zod2.default.any()),ut={tenantId:_zod2.default.string().optional(),offset:_zod2.default.number().optional(),limit:_zod2.default.number().optional(),orderBy:_zod2.default.string().optional(),sortOrder:_zod2.default.string().optional(),officeId:_zod2.default.number().optional(),displayName:_zod2.default.string().optional(),firstname:_zod2.default.string().optional(),lastname:_zod2.default.string().optional(),externalId:_zod2.default.string().optional(),orphansOnly:_zod2.default.boolean().optional(),clientStatus:_zod2.default.string().optional(),mobileNo:_zod2.default.string().optional(),createdStartDate:_zod2.default.string().optional(),creationEndDate:_zod2.default.string().optional(),activatedStartDate:_zod2.default.string().optional(),activatedEndDate:_zod2.default.string().optional(),closedStartDate:_zod2.default.string().optional(),closedEndDate:_zod2.default.string().optional()},Po=_zod2.default.object(ut),Go={id:_zod2.default.number(),accountNo:_zod2.default.string(),status:O,subStatus:$,active:_zod2.default.boolean(),activationDate:_zod2.default.array(_zod2.default.number()).optional(),firstname:_zod2.default.string(),lastname:_zod2.default.string(),displayName:_zod2.default.string(),mobileNo:_zod2.default.string(),emailAddress:_zod2.default.string(),dateOfBirth:_zod2.default.array(_zod2.default.number()),gender:k,clientTypes:_zod2.default.array(_zod2.default.any()),clientClassification:B,occupation:z,isStaff:_zod2.default.boolean(),skipAvs:_zod2.default.boolean(),officeId:_zod2.default.number(),officeName:_zod2.default.string(),imageId:_zod2.default.string().optional(),imagePresent:_zod2.default.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:_zod2.default.string(),updatedAt:_zod2.default.string(),isBlockExternalCardsAddition:_zod2.default.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:_zod2.default.array(_zod2.default.number()).optional(),mobileCountryCode:_zod2.default.string(),clientKycStatus:V,ofLoanCycle:_zod2.default.number(),ofLoanActive:_zod2.default.number(),activeDepositAccount:_zod2.default.number(),onBoardingStatus:_zod2.default.string().optional()},mt={totalFilteredRecords:_zod2.default.number(),pageItems:_zod2.default.array(M)},Eo=_zod2.default.object(mt).catchall(_zod2.default.any()),pt={clientData:M.optional(),riskRatingData:Xe.optional(),clientAddressData:et.optional(),clientIdentifierData:tt.optional()},Lo=_zod2.default.object(pt);var Uo=_zod2.default.enum(["offset","limit","orderBy","sortOrder","officeId","displayName","firstname","lastname","externalId","orphansOnly","clientStatus","mobileNo","createdStartDate","creationEndDate","activatedStartDate","activatedEndDate","closedStartDate","closedEndDate"]),No=_zod2.default.enum(["displayName","accountNo","officeId","officeName"]),Oo=_zod2.default.enum(["ASC","DESC"]),$o=_zod2.default.enum(["ACTIVE","PENDING","INACTIVE"]);var ko=_zod2.default.object({clientId:_zod2.default.string(),kycVerificationType:_zod2.default.enum(["FULL","PARTIAL"]).default("FULL").optional(),note:_zod2.default.string().optional(),locale:_zod2.default.string().default("en").optional(),dateFormat:_zod2.default.string().default("dd MMMM yyyy").optional(),activationDate:_zod2.default.string().optional(),isActivatedByManualReview:_zod2.default.boolean().default(!1).optional(),manualReviewActivationComments:_zod2.default.string().optional(),skipVerify:_zod2.default.boolean().default(!1),skipActivate:_zod2.default.boolean().default(!1),autoActivate:_zod2.default.boolean().default(!0)}).refine(e=>!(e.skipVerify&&e.skipActivate),{message:"Cannot skip both verification and activation - at least one action must be performed",path:["skipVerify","skipActivate"]}).refine(e=>!(!e.skipVerify&&!e.kycVerificationType),{message:"kycVerificationType is required when skipVerify is false",path:["kycVerificationType"]}).refine(e=>!(!e.skipActivate&&!e.locale),{message:"locale is required when skipActivate is false",path:["locale"]}).refine(e=>!(!e.skipActivate&&!e.dateFormat),{message:"dateFormat is required when skipActivate is false",path:["dateFormat"]}).refine(e=>!(!e.skipActivate&&!e.activationDate),{message:"activationDate is required when skipActivate is false",path:["activationDate"]}),Bo=_zod2.default.object({id:_zod2.default.number(),clientId:_zod2.default.number(),officeId:_zod2.default.number(),resourceId:_zod2.default.number(),data:_zod2.default.object({clientVerificationStatus:_zod2.default.enum(["PENDING","IN_PROGRESS","APPROVED","REJECTED"]),clientKycStatus:_zod2.default.string()})}),lt=_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string(),isMasked:_zod2.default.boolean()}),Ct=_zod2.default.object({id:_zod2.default.number(),value:_zod2.default.string()}),ft=_zod2.default.object({id:_zod2.default.number(),clientId:_zod2.default.number(),documentType:lt,documentKey:_zod2.default.string(),issuedDate:_zod2.default.array(_zod2.default.number()).optional(),expiryDate:_zod2.default.array(_zod2.default.number()).optional(),description:_zod2.default.string().optional(),status:_zod2.default.string(),issuedBy:_zod2.default.string().optional(),verificationStatus:Ct.optional()}),ht=_zod2.default.object({id:_zod2.default.number(),value:_zod2.default.string()}),zo=_zod2.default.object({id:_zod2.default.number(),accountNo:_zod2.default.union([_zod2.default.string(),_zod2.default.number()]),displayName:_zod2.default.string(),legalForm:_zod2.default.object({code:_zod2.default.string(),value:_zod2.default.number()}),verificationStatus:ht,identifiers:_zod2.default.array(ft).optional(),ofLoanCycle:_zod2.default.number(),mobileCountryCode:_zod2.default.string(),ofLoanActive:_zod2.default.number(),activeDepositAccount:_zod2.default.number()}).catchall(_zod2.default.any()),Fo=_zod2.default.object({closureReasonId:_zod2.default.string(),locale:_zod2.default.string().optional(),closerDate:_zod2.default.string(),dateFormat:_zod2.default.string()}).refine(e=>!(e.closerDate==null&&e.dateFormat===void 0)),jo=_zod2.default.object({id:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number()});var yt=e=>{let n=new URLSearchParams;e.staffInSelectedOfficeOnly&&n.append("staffInSelectedOfficeOnly","true"),e.checkIdentitiesExpiration&&n.append("checkIdentitiesExpiration","true"),e.clientAccountAssociate&&n.append("clientAccountAssociate","true");let o=n.toString(),s=`/v1/clients/${e.clientId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetClient",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{let u={},p=await i.get(s);if(u.clientData=p,e.riskRating){let l=await i.get(`/v1/clients/${e.clientId}/riskrating`);u.riskRatingData=l}if(e.clientAddress){let l=await i.get(`/v1/client/${e.clientId}/addresses`);u.clientAddressData=l}if(e.clientIdentifier){let l=await i.get(`/v1/clients/${e.clientId}/identifiers?unmaskValue=true`);u.clientIdentifierData=l}return u}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},gt= exports.UpdateClient =(e,n)=>{let o=`/v1/clients/${e}`;return{input:{clientId:e,updates:n},metadata:{commandName:"UpdateClient",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,{...n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},bt= exports.CreateClient =e=>{let n="/v1/clients";return{input:{clientData:e},metadata:{commandName:"CreateClient",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Rt= exports.GetClients =e=>{let n="/v1/clients";return{input:{params:e},metadata:{commandName:"GetClients",path:n,method:"GET"},execute:async o=>{let s=await c(o),r=[],i=e.limit||200,u=e.offset||0,p=0,l={...e,limit:i,offset:u};try{if(e.limit===0){do{let C=await s.get(n,{params:l}),{totalFilteredRecords:f,pageItems:y}=C.data;r.push(...y),p=f,u+=i}while(u<p);return{totalFilteredRecords:p,pageItems:r}}else return(await s.get(n,{params:l})).data}catch(C){_chunk6M772WIBjs.c.call(void 0, C)}}}},xt= exports.DeleteClient =e=>{let n=`/v1/clients/${e}`;return{input:{clientId:e},metadata:{commandName:"DeleteClient",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},At= exports.VerifyWithActivateClients =e=>{let n=`/v1/clients/${e.clientId}`;return{input:{param:e},metadata:{commandName:"VerifyWithActivateClients",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{let r;if(!e.skipVerify){let i={kycVerificationType:e.kycVerificationType,note:e.note};r=await s.post(n,i)}if(!e.skipActivate&&(r&&r.data.data.clientKycStatus==="APPROVED"&&e.autoActivate||!r)){let i={locale:e.locale,dateFormat:e.dateFormat,activationDate:e.activationDate,isActivatedByManualReview:e.isActivatedByManualReview,manualReviewActivationComments:e.manualReviewActivationComments},u=await s.post(n,i),p=u.data;return r&&(p={...u.data,data:{...r.data.data}}),p}if(!r)throw _chunk6M772WIBjs.a.call(void 0, {message:"Verification was skipped but no alternative action was taken",code:"VERIFICATION_SKIPPED"});return r.data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},St= exports.GetStatusOfVerifyClient =e=>{let n=`/v1/clients/${e}/verificationstatus`;return{input:{clientId:e},metadata:{commandName:"GetStatusOfVerifyClient",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var _momenttimezone = require('moment-timezone'); var _momenttimezone2 = _interopRequireDefault(_momenttimezone);var W=(e=new Date,n=!1,o=_nullishCoalesce(process.env.TIMEZONE, () => ("Europe/Berlin")))=>_momenttimezone2.default.call(void 0, e.getTime()).tz(o).utc(!n);var vt=e=>{let n="/v1/transfers";return{input:{transfer:e},metadata:{commandName:"CreateTransfer",path:n,method:"POST"},execute:async o=>{_chunkHJ5MOWXHjs.p.parse(e);let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Dt= exports.GetTransfer =e=>{let n=`/v1/transfers/${e}`;return{input:{id:e},metadata:{commandName:"GetTransfer",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Tt= exports.GetTransfers =e=>{let n="/v1/transfers",o={paymentType:e.paymentType||"ACH",status:e.transferStatus||"EXECUTION_SCHEDULED",toExecuteDate:e.executedAt||W().toISOString(!0).slice(0,10),locale:"en",dateFormat:"yyyy-MM-dd",associateClientData:!0,originatedBy:"us",accountType:e.accountType};return{input:{params:e},metadata:{commandName:"GetTransfers",path:n,method:"GET"},execute:async s=>{let r=await c(s),i=[],u=e.queryLimit||200,p=0,l=0,C={...o,limit:u,offset:p};try{do{let f=await r.get(n,{params:C}),{totalFilteredRecords:y,pageItems:g}=f.data;i.push(...g),l=y,p+=u}while(p<l);return i}catch(f){_chunk6M772WIBjs.c.call(void 0, f)}}}};var qt=e=>{let n="/v1/payments";return{input:{payment:e},metadata:{commandName:"CreatePayment",path:n,method:"POST"},execute:async o=>{try{_chunkHJ5MOWXHjs.G.call(void 0, e)}catch(r){throw r instanceof _zod.z.ZodError?_chunk6M772WIBjs.a.call(void 0, {message:`Invalid payment data: ${r.errors.map(i=>i.message).join(", ")}`,code:"invalid_payment_input"}):r}let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},wt= exports.GetPayment =e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"GetPayment",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Pt= exports.UpdatePayment =(e,n)=>{let o=`/v1/payments/${e}`;return{input:{id:e,payment:n},metadata:{commandName:"UpdatePayment",path:o,method:"PUT"},execute:async s=>{try{_chunkHJ5MOWXHjs.H.call(void 0, n)}catch(i){throw i instanceof _zod.z.ZodError?_chunk6M772WIBjs.a.call(void 0, {message:`Invalid payment update data: ${i.errors.map(u=>u.message).join(", ")}`,code:"invalid_payment_update_input"}):i}let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Gt= exports.GetPayments =e=>{let n="/v1/payments";return{input:{params:e},metadata:{commandName:"GetPayments",path:n,method:"GET"},execute:async o=>{let s=await c(o),r={locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC",limit:20,offset:0},i=u=>{let l=["fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","fromReturnDate","toReturnDate"].some(f=>u[f]!==void 0),C={...u};return l&&C.dateFormat===void 0&&(C.dateFormat="yyyy-MM-dd"),C};try{let u=i(e),p={...r,...u,limit:u.limit!==void 0&&u.limit!==0?u.limit:20,offset:u.offset!==void 0?u.offset:0};return(await s.get(n,{params:p})).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Et= exports.DeletePayment =e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"DeletePayment",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{await s.delete(n)}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var Lt=e=>({input:{accountId:e},metadata:{commandName:"GetAccount",path:`/v1/savingsaccounts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsaccounts/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Ut= exports.UpdateAccount =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"UpdateAccount",path:`/v1/savingsaccounts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsaccounts/${e}`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Nt= exports.DeleteAccount =e=>({input:{accountId:e},metadata:{commandName:"DeleteAccount",path:`/v1/savingsaccounts/${e}`,method:"DELETE"},execute:async n=>{let o=await c(n);try{return(await o.delete(`/v1/savingsaccounts/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Ot= exports.GetAccountsOfClient =(e,n)=>({input:{clientId:e,params:n},metadata:{commandName:"ListAccountsOfClient",path:`/v1/clients/${e}/accounts`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/clients/${e}/accounts`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),$t= exports.CreateAndActivateAccount =e=>({input:{params:e},metadata:{commandName:"CreateAndActivateAccount",path:"/v1/savingsaccounts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsaccounts?command=submit,approve,activate",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),kt= exports.CloseAccount =(e,n)=>({input:{savingsAccountId:e,requestData:n},metadata:{commandName:"CloseAccount",path:`/v1/savingsaccounts/${e}?command=close`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=close`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Bt= exports.ScheduleAccountClosure =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"ScheduleAccountClosure",path:`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),zt= exports.BlockAccount =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"BlockAccount",path:`/v1/savingsaccounts/${e}?command=block`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=block`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Ft= exports.HoldAmount =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"HoldAmount",path:`/v1/savingsaccounts/${e}?command=hold`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=hold`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var jt=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetPendingTransactions",path:`/v1/savingsaccounts/${e}/pendingTransaction`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/pendingTransaction`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),_t= exports.GetCompletedTransactions =(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetCompletedTransactions",path:`/v1/savingsaccounts/${e}/transactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/transactions`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Vt= exports.GetRecentTransactions =(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetRecentTransactions",path:`/v1/savingsaccounts/${e}/unifiedtransactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/unifiedtransactions`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Mt= exports.GetTransactionById =(e,n,o)=>({input:{savingsAccountId:e,transactionId:n,params:o},metadata:{commandName:"GetTransactionById",path:`/v1/savingsaccounts/${e}/transactions/${n}`,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(`/v1/savingsaccounts/${e}/transactions/${n}`,{params:o})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}),Wt= exports.GetBankDetailsFromRoutingCode =(e,n)=>({input:{routingNumber:e,params:n},metadata:{commandName:"GetBankDetailsFromRoutingCode",path:`/v1/bankdetails/routing/${e}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/bankdetails/routing/${e}`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var Kt=e=>({input:{params:e},metadata:{commandName:"CreateAccountProduct",path:"/v1/savingsproducts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsproducts",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Qt= exports.UpdateAccountProduct =(e,n)=>({input:{productId:e,params:n},metadata:{commandName:"UpdateAccountProduct",path:`/v1/savingsproducts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsproducts/${e}`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Ht= exports.GetAllAccountProducts =()=>({input:{},metadata:{commandName:"GetAllAccountProducts",path:"/v1/savingsproducts",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/savingsproducts")).data}catch(o){_chunk6M772WIBjs.c.call(void 0, o)}}}),Yt= exports.GetAccountProductById =e=>({input:{productId:e},metadata:{commandName:"GetAccountProductById",path:`/v1/savingsproducts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsproducts/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}});var Jt=e=>({input:{requestData:e},metadata:{commandName:"GenerateAccountStatement",path:"/v1/generatestatements",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/generatestatements",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Zt= exports.DownloadAccountStatement =(e,n)=>({input:{savingsAccountId:e,documentId:n},metadata:{commandName:"DownloadAccountStatement",path:`/v1/savings/${e}/documents/${n}/attachment`,method:"GET"},execute:async o=>{let s=await c(o);try{let r=await s.get(`/v1/savings/${e}/documents/${n}/attachment`,{responseType:"blob"}),i=r.headers["content-disposition"],u;if(i){let l=i.match(/filename="?(.+?)"?$/i);l&&(u=l[1])}let p=r.headers["content-type"];return{data:r.data,fileName:u,contentType:p}}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Xt= exports.GetAccountDocumentsDetails =(e,n)=>({input:{savingsAccountId:e,queryParams:n},metadata:{commandName:"GetAccountDocumentsDetails",path:`/v1/savings/${e}/documents`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savings/${e}/documents`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var _graphql = require('graphql');var en=`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkHJ5MOWXHjs = require('../chunk-HJ5MOWXH.js');var _chunk6M772WIBjs = require('../chunk-6M772WIB.js');var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);var b=_zod.z.object({id:_zod.z.number(),controls:_zod.z.array(_zod.z.string()),type:_zod.z.string(),value:_zod.z.number(),timePeriod:_zod.z.number(),timeUnit:_zod.z.string(),territorialLimits:_zod.z.array(_zod.z.any()),category:_zod.z.string().optional(),categoryId:_zod.z.number().optional(),version:_zod.z.number().optional()}),q=_zod.z.object({id:_zod.z.number(),username:_zod.z.string(),officeId:_zod.z.number(),officeName:_zod.z.string(),firstname:_zod.z.string(),lastname:_zod.z.string(),email:_zod.z.string(),isEmailVerified:_zod.z.boolean(),isSelfServiceUser:_zod.z.boolean()}),Q=_zod.z.object({date:_zod.z.array(_zod.z.number()),time:_zod.z.object({hour:_zod.z.number(),minute:_zod.z.number(),second:_zod.z.number(),nano:_zod.z.number()})}),H=_zod.z.object({id:_zod.z.number(),accountId:_zod.z.number(),productId:_zod.z.number(),virtual:_zod.z.boolean(),productName:_zod.z.string(),network:_zod.z.string(),cardType:_zod.z.string(),digitalFirst:_zod.z.boolean(),cardProcessorName:_zod.z.string(),token:_zod.z.string(),embossedNames:_zod.z.array(_zod.z.string()),primaryAccountNumber:_zod.z.string(),expiresOn:_zod.z.array(_zod.z.number()),status:_zod.z.string(),fulfillmentStatus:_zod.z.string(),onlinePaymentEnabled:_zod.z.boolean(),posPaymentEnabled:_zod.z.boolean(),physicalCardActivated:_zod.z.boolean(),contactlessPaymentEnabled:_zod.z.boolean(),atmWithdrawalsEnabled:_zod.z.boolean(),internationalPaymentsEnabled:_zod.z.boolean(),velocityRules:_zod.z.array(b),registeredOn:_zod.z.array(_zod.z.number()),activatedAt:Q.optional(),updatedStatusBy:q.optional(),updatedStatusAt:_zod.z.string().optional(),bid:_zod.z.number(),replacedDamageCount:_zod.z.number(),user:q.optional(),businessCardIDEnabled:_zod.z.boolean(),mergedVelocityRules:_zod.z.array(b),maximumAllowedVelocityRules:_zod.z.array(b),cardNumber:_zod.z.number(),printAccountNickname:_zod.z.boolean()}),ca=_zod.z.array(H),da=_zod.z.object({productId:_zod.z.number(),savingsAccountId:_zod.z.number().optional(),userId:_zod.z.number().optional(),savingsProductId:_zod.z.number().optional(),clientId:_zod.z.number()}).refine(e=>{let n=e.savingsAccountId!==void 0,o=e.savingsProductId!==void 0;return!(n&&o||!n&&!o||o&&e.clientId===void 0)}),ua=_zod.z.object({productId:_zod.z.number(),creditAccountId:_zod.z.number(),userId:_zod.z.number().optional()}),ma=_zod.z.object({id:_zod.z.number(),cardToken:_zod.z.string(),clientId:_zod.z.number(),resourceId:_zod.z.number(),resourceIdentifier:_zod.z.string(),data:_zod.z.object({shippingAddressId:_zod.z.number()})}),w=_zod.z.object({walletProvider:_zod.z.enum(["APPLE_PAY","GOOGLE_PAY"]),certificate1:_zod.z.string().optional(),certificate2:_zod.z.string().optional(),nonce:_zod.z.string().optional(),deviceID:_zod.z.string().optional(),walletAccountID:_zod.z.string().optional()}).refine(e=>e.walletProvider==="GOOGLE_PAY"?e.deviceID!==void 0&&e.walletAccountID!==void 0&&e.certificate1===void 0&&e.certificate2===void 0&&e.nonce===void 0:e.walletProvider==="APPLE_PAY"?e.certificate1!==void 0&&e.certificate2!==void 0&&e.nonce!==void 0&&e.deviceID===void 0&&e.walletAccountID===void 0:!0,{message:"Invalid combination of parameters for the selected wallet provider"}),pa=_zod.z.object({id:_zod.z.number(),clientId:_zod.z.number(),resourceId:_zod.z.number(),data:_zod.z.object({activationData:_zod.z.string(),encryptedCardData:_zod.z.string(),ephemeralPublicKey:_zod.z.string()})}),la=_zod.z.object({posPaymentEnabled:_zod.z.boolean().optional(),onlinePaymentEnabled:_zod.z.boolean().optional(),atmWithdrawalsEnabled:_zod.z.boolean().optional(),internationalPaymentsEnabled:_zod.z.boolean().optional(),blockedCountries:_zod.z.array(_zod.z.string()).optional()}),Ca=_zod.z.object({resourceId:_zod.z.number(),clientId:_zod.z.number(),id:_zod.z.number(),changes:_zod.z.object({posPaymentEnabled:_zod.z.boolean(),onlinePaymentEnabled:_zod.z.boolean(),contactlessPaymentEnabled:_zod.z.boolean(),atmWithdrawalsEnabled:_zod.z.boolean(),internationalPaymentsEnabled:_zod.z.boolean(),blockedCountries:_zod.z.array(_zod.z.string())})}),P=_zod.z.object({single:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional(),daily:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional(),weekly:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional(),monthly:_zod.z.object({transactionAmount:_zod.z.number(),numberOfTransactions:_zod.z.number()}).optional()}),fa=_zod.z.object({purchase:_zod.z.array(P).optional(),atm:_zod.z.array(P).optional()}),ha=_zod.z.object({resourceId:_zod.z.number(),clientId:_zod.z.number(),id:_zod.z.number(),changes:_zod.z.object({velocityRules:_zod.z.array(_zod.z.object({controls:_zod.z.array(_zod.z.string()),type:_zod.z.string(),value:_zod.z.number(),timePeriod:_zod.z.number(),timeUnit:_zod.z.string()}))})}),Y=_zod.z.object({mcc:_zod.z.string(),merchantId:_zod.z.string(),description:_zod.z.string(),postalcode:_zod.z.string(),country:_zod.z.string()}),J=_zod.z.object({aav:_zod.z.string(),arqc:_zod.z.string(),avsResult:_zod.z.string(),cvv1:_zod.z.string(),cvv2:_zod.z.string(),cvv3:_zod.z.string(),offlinePin:_zod.z.string(),pin:_zod.z.string()}),Z=_zod.z.object({entryType:_zod.z.string(),cardHolderPresent:_zod.z.string(),recurring:_zod.z.string(),validationResults:J}),X=_zod.z.object({zip:_zod.z.string(),address:_zod.z.string()}),G=_zod.z.object({id:_zod.z.number(),internalId:_zod.z.string(),externalAuthId:_zod.z.string(),externalOriginalAuthId:_zod.z.string(),authType:_zod.z.string(),transactionType:_zod.z.string(),currency:_zod.z.string(),amount:_zod.z.number(),returnBalance:_zod.z.boolean(),merchant:Y,expiryDate:_zod.z.array(_zod.z.number()),executionCode:_zod.z.string(),executionMessage:_zod.z.string(),status:_zod.z.string(),createdAt:_zod.z.string(),clearedAmount:_zod.z.number(),international:_zod.z.boolean(),incremental:_zod.z.boolean(),transaction:Z,flag:_zod.z.string(),avsData:X,settledAmount:_zod.z.number(),availableBalance:_zod.z.number(),accountBalance:_zod.z.number(),errorDetails:_zod.z.record(_zod.z.array(_zod.z.string())).optional()}),ee=_zod.z.enum(["ALL","ACTIVE","COMPLETED","REJECTED","EXPIRED","RELEASED","REVERSED"]),ya=_zod.z.object({cardToken:_zod.z.string(),status:ee.optional(),offset:_zod.z.number().optional(),limit:_zod.z.number().optional(),orderBy:_zod.z.string().optional(),sortOrder:_zod.z.enum(["asc","desc"]).optional(),isActiveCardAuthorizations:_zod.z.boolean().optional()}),ga=_zod.z.object({totalFilteredRecords:_zod.z.number(),pageItems:_zod.z.array(G)}),te=_zod.z.enum(["notes","media"]),ba=_zod.z.object({cardToken:_zod.z.string(),authorizationId:_zod.z.number(),associations:te.optional()}),ne=_zod.z.object({cashBackAmount:_zod.z.number(),exchangeRate:_zod.z.number(),feeAmount:_zod.z.number(),localCurrency:_zod.z.string(),localCurrencyAmount:_zod.z.number(),localSurchargeAmt:_zod.z.number()}),ae=_zod.z.object({accountToken:_zod.z.string(),cardToken:_zod.z.string()}),oe=_zod.z.object({id:_zod.z.number(),accountId:_zod.z.number(),productId:_zod.z.number(),virtual:_zod.z.boolean(),network:_zod.z.string(),cardType:_zod.z.string(),digitalFirst:_zod.z.boolean(),token:_zod.z.string(),embossedNames:_zod.z.array(_zod.z.string()),primaryAccountNumber:_zod.z.string(),expiresOn:_zod.z.array(_zod.z.number()),status:_zod.z.string(),fulfillmentStatus:_zod.z.string(),onlinePaymentEnabled:_zod.z.boolean(),posPaymentEnabled:_zod.z.boolean(),physicalCardActivated:_zod.z.boolean(),contactlessPaymentEnabled:_zod.z.boolean(),atmWithdrawalsEnabled:_zod.z.boolean(),internationalPaymentsEnabled:_zod.z.boolean(),registeredOn:_zod.z.array(_zod.z.number()),activatedAt:_zod.z.object({date:_zod.z.array(_zod.z.number()),time:_zod.z.object({hour:_zod.z.number(),minute:_zod.z.number(),second:_zod.z.number(),nano:_zod.z.number()})}).optional(),businessCardIDEnabled:_zod.z.boolean()}),E=_zod.z.object({is_emv:_zod.z.boolean()}),re=_zod.z.object({id:_zod.z.string(),emv:E,mcc:_zod.z.number(),mti:_zod.z.string(),account:_zod.z.object({cad:_zod.z.number(),pan:_zod.z.string(),prn:_zod.z.string(),xid:_zod.z.number(),card_status:_zod.z.string(),account_status:_zod.z.string(),expiration_date:_zod.z.string(),merchant_supplied_expiration_date:_zod.z.string()}),amounts:_zod.z.object({currency:_zod.z.string(),fee_amount:_zod.z.string(),trans_amount:_zod.z.string(),amt_til_limit:_zod.z.string(),exchange_rate:_zod.z.string(),local_currency:_zod.z.string(),available_funds:_zod.z.string(),cashback_amount:_zod.z.string(),upcharge_amount:_zod.z.string(),billing_currency:_zod.z.string(),local_currency_amount:_zod.z.string(),billing_currency_amount:_zod.z.string()}),auth_id:_zod.z.string(),network:_zod.z.string(),version:_zod.z.string(),avs_data:_zod.z.object({zip:_zod.z.string(),address:_zod.z.string()}),merchant:_zod.z.object({acquirer_id:_zod.z.string(),merchant_id:_zod.z.string(),terminal_id:_zod.z.string(),merchant_state:_zod.z.string(),merchant_country:_zod.z.string(),merchant_description:_zod.z.string(),merchant_postal_code:_zod.z.string()}),auth_type:_zod.z.string(),ecommerce:_zod.z.object({raw_eci:_zod.z.string(),is_ecommerce:_zod.z.boolean(),merchant_asserts_authenticated:_zod.z.boolean(),merchant_asserts_data_protection:_zod.z.boolean(),merchant_asserts_authentication_attempted:_zod.z.boolean()}),risk_code:_zod.z.string(),timestamp:_zod.z.string(),entry_type:_zod.z.string(),risk_score:_zod.z.string(),subnetwork:_zod.z.string(),original_id:_zod.z.string(),transaction:_zod.z.object({recurring:_zod.z.string(),cardholder_present:_zod.z.string(),transaction_initiator_code:_zod.z.string()}),international:_zod.z.boolean(),response_code:_zod.z.string(),transaction_type:_zod.z.string(),partial_supported:_zod.z.boolean(),validation_results:_zod.z.object({aav:_zod.z.string(),pin:_zod.z.string(),arqc:_zod.z.string(),cvv1:_zod.z.string(),cvv2:_zod.z.string(),cvv3:_zod.z.string(),avs_result:_zod.z.string(),offline_pin:_zod.z.string()}),digital_payment_data:_zod.z.record(_zod.z.any()),pin_entry_capability:_zod.z.string(),response_code_objects:_zod.z.record(_zod.z.array(_zod.z.string())),eligible_for_balance_return:_zod.z.boolean()}),Ra=G.extend({externalCardId:_zod.z.string().optional(),gatewayToken:_zod.z.string().optional(),account:ae.optional(),amountDetails:ne.optional(),isEcommerce:_zod.z.boolean().optional(),releasedAt:_zod.z.string().optional(),card:oe.optional(),pinCapability:_zod.z.string().optional(),riskScore:_zod.z.string().optional(),emv:E.optional(),media:_zod.z.record(_zod.z.any()).optional(),rawAuthorizationDetails:re.optional(),network:_zod.z.string().optional()}),se=_zod.z.object({merchant_number:_zod.z.string(),merchantId:_zod.z.string(),merchant_location:_zod.z.string(),mcc:_zod.z.string(),description:_zod.z.string()}),ie=_zod.z.object({clientId:_zod.z.number(),firstName:_zod.z.string(),lastName:_zod.z.string(),accountNumber:_zod.z.string(),id:_zod.z.number(),type:_zod.z.string(),internalClearingId:_zod.z.string(),internalAuthId:_zod.z.string(),externalClearingId:_zod.z.string(),externalAuthId:_zod.z.string(),externalOriginalAuthId:_zod.z.string(),externalCardId:_zod.z.string(),cardToken:_zod.z.string(),merchant:se,amount:_zod.z.number(),network:_zod.z.string(),currency:_zod.z.string(),requestedAt:_zod.z.string(),createdAt:_zod.z.string(),status:_zod.z.string(),batchDate:_zod.z.string(),batchIdentifier:_zod.z.string(),mcSequenceNumber:_zod.z.number(),mcSequenceCount:_zod.z.number(),completedInternalClearingId:_zod.z.number(),interchangeFeeAmount:_zod.z.number()}),ce=_zod.z.enum(["COMPLETED","REJECTED","PENDING"]),xa=_zod.z.object({startDate:_zod.z.string().optional(),endDate:_zod.z.string().optional(),dateFormat:_zod.z.string().optional(),offset:_zod.z.number().optional(),limit:_zod.z.number().optional(),status:ce.optional(),internalClearingId:_zod.z.string().optional(),orderBy:_zod.z.string().optional(),sortOrder:_zod.z.enum(["asc","desc"]).optional(),isCardSettlementOnly:_zod.z.boolean().optional()}),Aa=_zod.z.object({totalFilteredRecords:_zod.z.number(),pageItems:_zod.z.array(ie)}),Sa=_zod.z.object({settlementId:_zod.z.number()}),de=_zod.z.object({id:_zod.z.number(),lastDigits:_zod.z.string(),expiryDate:_zod.z.string(),network:_zod.z.string(),pushEnabled:_zod.z.boolean(),pullEnabled:_zod.z.boolean(),isRegulated:_zod.z.boolean(),avsVerified:_zod.z.boolean(),pushFundAvailability:_zod.z.string(),countryCode:_zod.z.string(),currencyCode:_zod.z.string(),cardType:_zod.z.string(),fullName:_zod.z.string(),referenceId:_zod.z.string(),externalId:_zod.z.string(),deleted:_zod.z.boolean(),status:_zod.z.string(),financialInstitution:_zod.z.string(),createdAt:_zod.z.string(),updatedAt:_zod.z.string()}),Ia=_zod.z.array(de);var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);var _uuid = require('uuid');var _https = require('https'); var L = _interopRequireWildcard(_https);var pe=e=>e&&(e.startsWith("Bearer ")?e:`Bearer ${e}`),c=async e=>{let o=()=>`RequestUUID=${_uuid.v4.call(void 0, )}`,s=_axios2.default.create({timeout:_optionalChain([e, 'access', _2 => _2.axiosConfig, 'optionalAccess', _3 => _3.timeout])||29e3,baseURL:e.baseUrl,headers:{"Content-Type":"application/json; charset=utf-8","JWT-Token":_optionalChain([e, 'optionalAccess', _4 => _4.jwtToken])||void 0,Authorization:e.bearerToken?pe(e.bearerToken):void 0,"trace-id":o(),tenantId:e.tenantId},httpsAgent:new L.Agent({rejectUnauthorized:!0,keepAlive:_optionalChain([e, 'access', _5 => _5.axiosConfig, 'optionalAccess', _6 => _6.keepAlive])})});return e.logger&&e.logger(s),s};var le=e=>{let n=`/v1/clients/${e}/cards`;return{input:{clientId:e},metadata:{commandName:"GetCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ce= exports.GetCardById =e=>{let n=`/v1/cards/${e}`;return{input:{cardId:e},metadata:{commandName:"GetCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},fe= exports.GetCardImageUrl =e=>{let n=`/v1/cards/${e}/imageUrl`;return{input:{cardId:e},metadata:{commandName:"GetCardImageUrl",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},he= exports.GetCardAuthorizations =e=>{let n=new URLSearchParams;e.status&&n.append("status",e.status),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isActiveCardAuthorizations!==void 0&&n.append("isActiveCardAuthorizations",e.isActiveCardAuthorizations.toString());let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizations",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},ye= exports.CreateCard =e=>{let n="/v1/cards";return{input:{params:e},metadata:{commandName:"CreateCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},ge= exports.ChangeCardType =(e,n)=>{let o=`/v1/cards/${e}?command=CHANGE_TYPE`;return{input:{cardId:e,params:n},metadata:{commandName:"ChangeCardType",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},be= exports.ActivatePhysicalCard =e=>{let n=`/v1/cards/${e}?command=ACTIVATE_PHYSICAL`;return{input:{cardId:e},metadata:{commandName:"ActivatePhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Re= exports.OrderPhysicalCard =e=>{let n=`/v1/cards/${e}?command=FULFILL`;return{input:{cardId:e},metadata:{commandName:"OrderPhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},xe= exports.SetPIN =e=>{let n=`/v1/cards/${e}?command=REQUEST_CHANGE_PIN_URL`;return{input:{cardId:e},metadata:{commandName:"SetPIN",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ae= exports.AddCardToMobileWallet =(e,n)=>{let o=`/v1/cards/${e}/provision`;return{input:{cardId:e,params:n},metadata:{commandName:"AddCardToMobileWallet",path:o,method:"POST"},execute:async s=>{w.parse(n);let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Se= exports.UpdateCardFeature =(e,n)=>{let o=`/v1/cards/${e}`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardFeature",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Ie= exports.UpdateCardLimit =(e,n)=>{let o=`/v1/cards/${e}/velocityrules`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardLimit",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},ve= exports.GetCardAuthorizationById =e=>{let n=new URLSearchParams;e.associations&&n.append("associations",e.associations);let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization/${e.authorizationId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizationById",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},De= exports.GetCardSettlements =e=>{let n=new URLSearchParams;e.startDate&&n.append("startDate",e.startDate),e.endDate&&n.append("endDate",e.endDate),e.dateFormat&&n.append("dateFormat",e.dateFormat),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.status&&n.append("status",e.status),e.internalClearingId&&n.append("internalClearingId",e.internalClearingId),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isCardSettlementOnly!==void 0&&n.append("isCardSettlementOnly",e.isCardSettlementOnly.toString());let o=n.toString(),s=`/v1/cardSettlements${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardSettlements",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Te= exports.GetCardSettlementById =e=>{let n=`/v1/cardSettlements/${e.settlementId}`;return{input:{params:e},metadata:{commandName:"GetCardSettlementById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},R=(e,n)=>{let o=`/v1/cards/${e}?command=${n}`;return{input:{cardId:e,command:n},metadata:{commandName:"UpdateCardStatus",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},qe= exports.TerminateCard =e=>R(e,"TERMINATE"),Pe= exports.SuspendCard =e=>R(e,"SUSPEND"),we= exports.ActivateCard =e=>R(e,"ACTIVATE");var Ge=(e,n)=>{let o=`/v1/cards/${e}?command=REPLACE`;return{input:{cardId:e,reason:n},metadata:{commandName:"ReplaceCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{replaceReason:n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Ee= exports.RenewCard =(e,n)=>{let o=`/v1/cards/${e}?command=RENEW`;return{input:{cardId:e,productId:n},metadata:{commandName:"RenewCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{productId:n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var Le=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards`;return{input:{primaryAccountId:e,params:n},metadata:{commandName:"CreatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Ue= exports.GetPrepaidCardsByAccountId =(e,n)=>{let o=new URLSearchParams;n&&o.append("status",n);let s=o.toString(),r=`/v1/savingsaccounts/${e}/prepaidcards${s?`?${s}`:""}`;return{input:{primaryAccountId:e,status:n},metadata:{commandName:"GetPrepaidCardsByAccountId",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},Ne= exports.GetPrepaidCardById =(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"GetPrepaidCardById",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Oe= exports.DeactivatePrepaidCard =(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"DeactivatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var ke={documentTypeId:_zod2.default.string(),documentKey:_zod2.default.string(),status:_zod2.default.string(),description:_zod2.default.string().optional(),issuedBy:_zod2.default.string().optional(),locale:_zod2.default.string().optional(),dateFormat:_zod2.default.string().optional(),expiryDate:_zod2.default.string().optional(),nationality:_zod2.default.number().optional(),issuedDate:_zod2.default.string().optional()},$e=_zod2.default.object(ke).catchall(_zod2.default.any()),Be={id:_zod2.default.number(),officeId:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number(),changes:_zod2.default.record(_zod2.default.string(),_zod2.default.any()),isScheduledTransfer:_zod2.default.boolean(),isSkipNotification:_zod2.default.boolean()},ze={id:_zod2.default.number(),clientId:_zod2.default.number(),documentType:_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string(),isMasked:_zod2.default.boolean().optional()}),documentKey:_zod2.default.union([_zod2.default.string(),_zod2.default.number()]),status:_zod2.default.string(),description:_zod2.default.string().optional(),issuedBy:_zod2.default.string().optional(),expiryDate:_zod2.default.union([_zod2.default.string(),_zod2.default.array(_zod2.default.number())]).optional(),nationality:_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string()}).optional(),issuedDate:_zod2.default.string().optional(),documentStatus:_zod2.default.string().optional()},ro=_zod2.default.object(Be).catchall(_zod2.default.any()),Fe=_zod2.default.object(ze).catchall(_zod2.default.any()),so=_zod2.default.array(Fe),x=e=>$e.parse(e);var je=_zod2.default.object({name:_zod2.default.string(),file:_zod2.default.union([_zod2.default.instanceof(Buffer),_zod2.default.instanceof(Blob),_zod2.default.instanceof(File)]),type:_zod2.default.string().optional(),description:_zod2.default.string().optional()}),io=_zod2.default.object({id:_zod2.default.string(),resourceIdentifier:_zod2.default.string(),uuid:_zod2.default.string()}),U=e=>je.parse(e),co=_zod2.default.object({officeId:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number()}),uo=_zod2.default.object({clientId:_zod2.default.number(),resourceId:_zod2.default.number()});var _e=e=>{let n=`/v1/clients/${e}/identifiers/template`;return{input:{clientId:e},metadata:{commandName:"GetPermittedDocumentTypes",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ve= exports.ListClientDocument =e=>{let n=new URLSearchParams;e.unmaskValue!==void 0&&n.append("unmaskValue",e.unmaskValue.toString()),e.fields&&n.append("fields",e.fields);let o=n.toString(),s=`/v1/clients/${e.clientId}/identifiers${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"ListClientDocument",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Me= exports.CreateClientIdentifier =(e,n)=>{x(n);let o=`/v1/clients/${e}/identifiers`;return{input:{clientId:e,input:n},metadata:{commandName:"CreateClientIdentifier",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},We= exports.UpdateClientIdentifier =(e,n,o)=>{x(o);let s=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n,updates:o},metadata:{commandName:"UpdateClientIdentifier",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o})).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Ke= exports.UploadClientIdentifierDocument =(e,n,o)=>{U(o);let s=`/v1/client_identifiers/${n}/documents`;return{input:{clientId:e,identifierId:n,data:o},metadata:{commandName:"UploadClientIdentifierDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r),{name:u,file:p,type:l,description:C}=o,f=new FormData;f.append("name",u),C&&f.append("description",C),l&&f.append("type",l);let y,g;p instanceof File?(y=p,g=p.name):p instanceof Blob?(y=p,g=u):(y=new Blob([p],{type:"application/octet-stream"}),g=u),f.append("file",y,g);try{return(await i.post(s,f,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(I){_chunk6M772WIBjs.c.call(void 0, I)}}}},Qe= exports.DeleteClientDocument =(e,n)=>{let o=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n},metadata:{commandName:"DeleteClientDocument",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},He= exports.ApproveRejectClientDocument =(e,n,o)=>{let s=`/v1/clients/${e}/identifiers/${n}?command=${o}`;return{input:{clientId:e,identifierId:n,command:o},metadata:{commandName:"ApproveRejectClientDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}};var N=_zod2.default.object({id:_zod2.default.number(),code:_zod2.default.string(),value:_zod2.default.string()}),O=_zod2.default.object({id:_zod2.default.number(),code:_zod2.default.string(),value:_zod2.default.string()}),k=_zod2.default.object({active:_zod2.default.boolean(),mandatory:_zod2.default.boolean(),systemDefined:_zod2.default.boolean()}),$=_zod2.default.object({id:_zod2.default.number()}),B=_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string().optional()}),z=_zod2.default.object({active:_zod2.default.boolean()}),F=_zod2.default.object({submittedOnDate:_zod2.default.array(_zod2.default.number()),submittedByUsername:_zod2.default.string().optional(),submittedByFirstname:_zod2.default.string().optional(),submittedByLastname:_zod2.default.string().optional(),activatedOnDate:_zod2.default.array(_zod2.default.number()).optional(),activatedByUsername:_zod2.default.string().optional(),activatedByFirstname:_zod2.default.string().optional(),activatedByLastname:_zod2.default.string().optional()}),Ye=_zod2.default.object({}).catchall(_zod2.default.any()),Je=_zod2.default.object({}).catchall(_zod2.default.any()),Ze=_zod2.default.object({}).catchall(_zod2.default.any()),j=_zod2.default.object({constitution:Ye,mainBusinessLine:Je,countryOfIncorporation:Ze}).catchall(_zod2.default.any()),_=_zod2.default.object({isExternalCardDebitDisable:_zod2.default.boolean(),isExternalCardCreditDisable:_zod2.default.boolean(),isAchDebitOutgoingDisable:_zod2.default.boolean(),isAchCreditOutgoingDisable:_zod2.default.boolean(),isAchDebitIncomingDisable:_zod2.default.boolean(),isAchCreditIncomingDisable:_zod2.default.boolean(),isInternalCreditDisable:_zod2.default.boolean(),isInternalDebitDisable:_zod2.default.boolean(),isWireCreditOutgoingDisable:_zod2.default.boolean(),isWireCreditIncomingDisable:_zod2.default.boolean(),isSwiftCreditOutgoingDisable:_zod2.default.boolean(),isSwiftCreditIncomingDisable:_zod2.default.boolean(),isFxpayCreditOutgoingDisable:_zod2.default.boolean(),isAllocateToSubAccountDisable:_zod2.default.boolean(),isInternalCreditOwnDisable:_zod2.default.boolean(),type:_zod2.default.string(),resourceId:_zod2.default.number(),id:_zod2.default.number()}).catchall(_zod2.default.any()),V=_zod2.default.object({}).catchall(_zod2.default.any()),M=_zod2.default.object({id:_zod2.default.number(),accountNo:_zod2.default.string(),status:O,subStatus:k,active:_zod2.default.boolean(),activationDate:_zod2.default.array(_zod2.default.number()).optional(),firstname:_zod2.default.string(),lastname:_zod2.default.string(),displayName:_zod2.default.string(),mobileNo:_zod2.default.string(),emailAddress:_zod2.default.string(),dateOfBirth:_zod2.default.array(_zod2.default.number()),gender:$,clientTypes:_zod2.default.array(_zod2.default.any()),clientClassification:B,occupation:z,isStaff:_zod2.default.boolean(),skipAvs:_zod2.default.boolean(),officeId:_zod2.default.number(),officeName:_zod2.default.string(),imageId:_zod2.default.string().optional(),imagePresent:_zod2.default.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:_zod2.default.string(),updatedAt:_zod2.default.string(),isBlockExternalCardsAddition:_zod2.default.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:_zod2.default.array(_zod2.default.number()).optional(),mobileCountryCode:_zod2.default.string(),clientKycStatus:V,ofLoanCycle:_zod2.default.number(),ofLoanActive:_zod2.default.number(),activeDepositAccount:_zod2.default.number(),onBoardingStatus:_zod2.default.string().optional()}).catchall(_zod2.default.any()),Xe=_zod2.default.object({riskScore:_zod2.default.number(),rating:_zod2.default.string()}).catchall(_zod2.default.any()),et=_zod2.default.object({street:_zod2.default.string(),city:_zod2.default.string(),state:_zod2.default.string(),zipCode:_zod2.default.string()}).catchall(_zod2.default.any()),tt=_zod2.default.object({type:_zod2.default.string(),value:_zod2.default.string()}).catchall(_zod2.default.any()),nt={firstname:_zod2.default.string(),middlename:_zod2.default.string().optional(),lastname:_zod2.default.string(),fullname:_zod2.default.string().optional(),dob:_zod2.default.string(),genderId:_zod2.default.number(),locale:_zod2.default.string(),officeId:_zod2.default.number(),mobileCountryCode:_zod2.default.string(),mobileNo:_zod2.default.string(),emailAddress:_zod2.default.string().email(),legalFormId:_zod2.default.number(),externalId:_zod2.default.string().optional(),isOptedForMLALStatus:_zod2.default.boolean().optional(),currentMLALStatus:_zod2.default.string().optional(),isStaff:_zod2.default.boolean().optional(),staffId:_zod2.default.number().optional(),clientClassificationId:_zod2.default.number().optional(),savingsProductId:_zod2.default.number().optional(),active:_zod2.default.boolean().optional(),dateFormat:_zod2.default.string(),activationDate:_zod2.default.string().optional(),submittedOnDate:_zod2.default.string(),dateOfBirth:_zod2.default.string()},vo=_zod2.default.object(nt).catchall(_zod2.default.any()),at={clientId:_zod2.default.number(),status:_zod2.default.string()},Do=_zod2.default.object(at).catchall(_zod2.default.any()),ot={firstname:_zod2.default.string().optional(),middlename:_zod2.default.string().optional(),fullname:_zod2.default.string().optional(),genderId:_zod2.default.number().optional(),lastname:_zod2.default.string().optional(),occupationId:_zod2.default.number().optional(),mobileCountryCode:_zod2.default.string().optional(),mobileNo:_zod2.default.string().optional(),emailAddress:_zod2.default.string().email().optional(),externalId:_zod2.default.string().optional(),clientClassificationId:_zod2.default.number().optional(),dateOfBirth:_zod2.default.string().optional(),dateFormat:_zod2.default.string().optional()},To=_zod2.default.object(ot).catchall(_zod2.default.any()),rt={documentTypeId:_zod2.default.string(),documentKey:_zod2.default.string(),status:_zod2.default.string(),description:_zod2.default.string().optional(),issuedBy:_zod2.default.string().optional(),locale:_zod2.default.string().optional(),dateFormat:_zod2.default.string().optional(),expiryDate:_zod2.default.string().optional(),nationality:_zod2.default.number().optional(),issuedDate:_zod2.default.string().optional()},qo=_zod2.default.object(rt).catchall(_zod2.default.any()),st={id:_zod2.default.number(),officeId:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number(),changes:_zod2.default.record(_zod2.default.string(),_zod2.default.any()),isScheduledTransfer:_zod2.default.boolean(),isSkipNotification:_zod2.default.boolean()},Po=_zod2.default.object(st).catchall(_zod2.default.any()),it={developerMessage:_zod2.default.string(),defaultUserMessage:_zod2.default.string(),userMessageGlobalisationCode:_zod2.default.string(),parameterName:_zod2.default.string().optional(),value:_zod2.default.any().nullable(),args:_zod2.default.array(_zod2.default.object({value:_zod2.default.any()})).optional()},ct=_zod2.default.object(it),dt={developerMessage:_zod2.default.string(),httpStatusCode:_zod2.default.string(),defaultUserMessage:_zod2.default.string(),userMessageGlobalisationCode:_zod2.default.string(),errors:_zod2.default.array(ct).optional()},wo=_zod2.default.object(dt).catchall(_zod2.default.any()),ut={tenantId:_zod2.default.string().optional(),offset:_zod2.default.number().optional(),limit:_zod2.default.number().optional(),orderBy:_zod2.default.string().optional(),sortOrder:_zod2.default.string().optional(),officeId:_zod2.default.number().optional(),displayName:_zod2.default.string().optional(),firstname:_zod2.default.string().optional(),lastname:_zod2.default.string().optional(),externalId:_zod2.default.string().optional(),orphansOnly:_zod2.default.boolean().optional(),clientStatus:_zod2.default.string().optional(),mobileNo:_zod2.default.string().optional(),createdStartDate:_zod2.default.string().optional(),creationEndDate:_zod2.default.string().optional(),activatedStartDate:_zod2.default.string().optional(),activatedEndDate:_zod2.default.string().optional(),closedStartDate:_zod2.default.string().optional(),closedEndDate:_zod2.default.string().optional()},Go=_zod2.default.object(ut),Eo={id:_zod2.default.number(),accountNo:_zod2.default.string(),status:O,subStatus:k,active:_zod2.default.boolean(),activationDate:_zod2.default.array(_zod2.default.number()).optional(),firstname:_zod2.default.string(),lastname:_zod2.default.string(),displayName:_zod2.default.string(),mobileNo:_zod2.default.string(),emailAddress:_zod2.default.string(),dateOfBirth:_zod2.default.array(_zod2.default.number()),gender:$,clientTypes:_zod2.default.array(_zod2.default.any()),clientClassification:B,occupation:z,isStaff:_zod2.default.boolean(),skipAvs:_zod2.default.boolean(),officeId:_zod2.default.number(),officeName:_zod2.default.string(),imageId:_zod2.default.string().optional(),imagePresent:_zod2.default.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:_zod2.default.string(),updatedAt:_zod2.default.string(),isBlockExternalCardsAddition:_zod2.default.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:_zod2.default.array(_zod2.default.number()).optional(),mobileCountryCode:_zod2.default.string(),clientKycStatus:V,ofLoanCycle:_zod2.default.number(),ofLoanActive:_zod2.default.number(),activeDepositAccount:_zod2.default.number(),onBoardingStatus:_zod2.default.string().optional()},mt={totalFilteredRecords:_zod2.default.number(),pageItems:_zod2.default.array(M)},Lo=_zod2.default.object(mt).catchall(_zod2.default.any()),pt={clientData:M.optional(),riskRatingData:Xe.optional(),clientAddressData:et.optional(),clientIdentifierData:tt.optional()},Uo=_zod2.default.object(pt);var No=_zod2.default.enum(["offset","limit","orderBy","sortOrder","officeId","displayName","firstname","lastname","externalId","orphansOnly","clientStatus","mobileNo","createdStartDate","creationEndDate","activatedStartDate","activatedEndDate","closedStartDate","closedEndDate"]),Oo=_zod2.default.enum(["displayName","accountNo","officeId","officeName"]),ko=_zod2.default.enum(["ASC","DESC"]),$o=_zod2.default.enum(["ACTIVE","PENDING","INACTIVE"]);var Bo=_zod2.default.object({clientId:_zod2.default.string(),kycVerificationType:_zod2.default.enum(["FULL","PARTIAL"]).default("FULL").optional(),note:_zod2.default.string().optional(),locale:_zod2.default.string().default("en").optional(),dateFormat:_zod2.default.string().default("dd MMMM yyyy").optional(),activationDate:_zod2.default.string().optional(),isActivatedByManualReview:_zod2.default.boolean().default(!1).optional(),manualReviewActivationComments:_zod2.default.string().optional(),skipVerify:_zod2.default.boolean().default(!1),skipActivate:_zod2.default.boolean().default(!1),autoActivate:_zod2.default.boolean().default(!0)}).refine(e=>!(e.skipVerify&&e.skipActivate),{message:"Cannot skip both verification and activation - at least one action must be performed",path:["skipVerify","skipActivate"]}).refine(e=>!(!e.skipVerify&&!e.kycVerificationType),{message:"kycVerificationType is required when skipVerify is false",path:["kycVerificationType"]}).refine(e=>!(!e.skipActivate&&!e.locale),{message:"locale is required when skipActivate is false",path:["locale"]}).refine(e=>!(!e.skipActivate&&!e.dateFormat),{message:"dateFormat is required when skipActivate is false",path:["dateFormat"]}).refine(e=>!(!e.skipActivate&&!e.activationDate),{message:"activationDate is required when skipActivate is false",path:["activationDate"]}),zo=_zod2.default.object({id:_zod2.default.number(),clientId:_zod2.default.number(),officeId:_zod2.default.number(),resourceId:_zod2.default.number(),data:_zod2.default.object({clientVerificationStatus:_zod2.default.enum(["PENDING","IN_PROGRESS","APPROVED","REJECTED"]),clientKycStatus:_zod2.default.string()})}),lt=_zod2.default.object({id:_zod2.default.number(),name:_zod2.default.string(),isMasked:_zod2.default.boolean()}),Ct=_zod2.default.object({id:_zod2.default.number(),value:_zod2.default.string()}),ft=_zod2.default.object({id:_zod2.default.number(),clientId:_zod2.default.number(),documentType:lt,documentKey:_zod2.default.string(),issuedDate:_zod2.default.array(_zod2.default.number()).optional(),expiryDate:_zod2.default.array(_zod2.default.number()).optional(),description:_zod2.default.string().optional(),status:_zod2.default.string(),issuedBy:_zod2.default.string().optional(),verificationStatus:Ct.optional()}),ht=_zod2.default.object({id:_zod2.default.number(),value:_zod2.default.string()}),Fo=_zod2.default.object({id:_zod2.default.number(),accountNo:_zod2.default.union([_zod2.default.string(),_zod2.default.number()]),displayName:_zod2.default.string(),legalForm:_zod2.default.object({code:_zod2.default.string(),value:_zod2.default.number()}),verificationStatus:ht,identifiers:_zod2.default.array(ft).optional(),ofLoanCycle:_zod2.default.number(),mobileCountryCode:_zod2.default.string(),ofLoanActive:_zod2.default.number(),activeDepositAccount:_zod2.default.number()}).catchall(_zod2.default.any()),jo=_zod2.default.object({closureReasonId:_zod2.default.string(),locale:_zod2.default.string().optional(),closerDate:_zod2.default.string(),dateFormat:_zod2.default.string()}).refine(e=>!(e.closerDate==null&&e.dateFormat===void 0)),_o=_zod2.default.object({id:_zod2.default.number(),clientId:_zod2.default.number(),resourceId:_zod2.default.number()});var yt=e=>{let n=new URLSearchParams;e.staffInSelectedOfficeOnly&&n.append("staffInSelectedOfficeOnly","true"),e.checkIdentitiesExpiration&&n.append("checkIdentitiesExpiration","true"),e.clientAccountAssociate&&n.append("clientAccountAssociate","true");let o=n.toString(),s=`/v1/clients/${e.clientId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetClient",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{let u={},p=await i.get(s);if(u.clientData=p,e.riskRating){let l=await i.get(`/v1/clients/${e.clientId}/riskrating`);u.riskRatingData=l}if(e.clientAddress){let l=await i.get(`/v1/client/${e.clientId}/addresses`);u.clientAddressData=l}if(e.clientIdentifier){let l=await i.get(`/v1/clients/${e.clientId}/identifiers?unmaskValue=true`);u.clientIdentifierData=l}return u}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},gt= exports.UpdateClient =(e,n)=>{let o=`/v1/clients/${e}`;return{input:{clientId:e,updates:n},metadata:{commandName:"UpdateClient",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,{...n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},bt= exports.CreateClient =e=>{let n="/v1/clients";return{input:{clientData:e},metadata:{commandName:"CreateClient",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Rt= exports.GetClients =e=>{let n="/v1/clients";return{input:{params:e},metadata:{commandName:"GetClients",path:n,method:"GET"},execute:async o=>{let s=await c(o),r=[],i=e.limit||200,u=e.offset||0,p=0,l={...e,limit:i,offset:u};try{if(e.limit===0){do{let C=await s.get(n,{params:l}),{totalFilteredRecords:f,pageItems:y}=C.data;r.push(...y),p=f,u+=i}while(u<p);return{totalFilteredRecords:p,pageItems:r}}else return(await s.get(n,{params:l})).data}catch(C){_chunk6M772WIBjs.c.call(void 0, C)}}}},xt= exports.DeleteClient =e=>{let n=`/v1/clients/${e}`;return{input:{clientId:e},metadata:{commandName:"DeleteClient",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},At= exports.VerifyWithActivateClients =e=>{let n=`/v1/clients/${e.clientId}`;return{input:{param:e},metadata:{commandName:"VerifyWithActivateClients",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{let r;if(!e.skipVerify){let i={kycVerificationType:e.kycVerificationType,note:e.note};r=await s.post(n,i)}if(!e.skipActivate&&(r&&r.data.data.clientKycStatus==="APPROVED"&&e.autoActivate||!r)){let i={locale:e.locale,dateFormat:e.dateFormat,activationDate:e.activationDate,isActivatedByManualReview:e.isActivatedByManualReview,manualReviewActivationComments:e.manualReviewActivationComments},u=await s.post(n,i),p=u.data;return r&&(p={...u.data,data:{...r.data.data}}),p}if(!r)throw _chunk6M772WIBjs.a.call(void 0, {message:"Verification was skipped but no alternative action was taken",code:"VERIFICATION_SKIPPED"});return r.data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},St= exports.GetStatusOfVerifyClient =e=>{let n=`/v1/clients/${e}/verificationstatus`;return{input:{clientId:e},metadata:{commandName:"GetStatusOfVerifyClient",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var _momenttimezone = require('moment-timezone'); var _momenttimezone2 = _interopRequireDefault(_momenttimezone);var W=(e=new Date,n=!1,o=_nullishCoalesce(process.env.TIMEZONE, () => ("Europe/Berlin")))=>_momenttimezone2.default.call(void 0, e.getTime()).tz(o).utc(!n);var vt=e=>{let n="/v1/transfers";return{input:{transfer:e},metadata:{commandName:"CreateTransfer",path:n,method:"POST"},execute:async o=>{_chunkHJ5MOWXHjs.p.parse(e);let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Dt= exports.GetTransfer =e=>{let n=`/v1/transfers/${e}`;return{input:{id:e},metadata:{commandName:"GetTransfer",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Tt= exports.GetTransfers =e=>{let n="/v1/transfers",o={paymentType:e.paymentType||"ACH",status:e.transferStatus||"EXECUTION_SCHEDULED",toExecuteDate:e.executedAt||W().toISOString(!0).slice(0,10),locale:"en",dateFormat:"yyyy-MM-dd",associateClientData:!0,originatedBy:"us",accountType:e.accountType};return{input:{params:e},metadata:{commandName:"GetTransfers",path:n,method:"GET"},execute:async s=>{let r=await c(s),i=[],u=e.queryLimit||200,p=0,l=0,C={...o,limit:u,offset:p};try{do{let f=await r.get(n,{params:C}),{totalFilteredRecords:y,pageItems:g}=f.data;i.push(...g),l=y,p+=u}while(p<l);return i}catch(f){_chunk6M772WIBjs.c.call(void 0, f)}}}};var qt=e=>{let n="/v1/payments";return{input:{payment:e},metadata:{commandName:"CreatePayment",path:n,method:"POST"},execute:async o=>{try{_chunkHJ5MOWXHjs.G.call(void 0, e)}catch(r){throw r instanceof _zod.z.ZodError?_chunk6M772WIBjs.a.call(void 0, {message:`Invalid payment data: ${r.errors.map(i=>i.message).join(", ")}`,code:"invalid_payment_input"}):r}let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Pt= exports.GetPayment =e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"GetPayment",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},wt= exports.UpdatePayment =(e,n)=>{let o=`/v1/payments/${e}`;return{input:{id:e,payment:n},metadata:{commandName:"UpdatePayment",path:o,method:"PUT"},execute:async s=>{try{_chunkHJ5MOWXHjs.H.call(void 0, n)}catch(i){throw i instanceof _zod.z.ZodError?_chunk6M772WIBjs.a.call(void 0, {message:`Invalid payment update data: ${i.errors.map(u=>u.message).join(", ")}`,code:"invalid_payment_update_input"}):i}let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Gt= exports.GetPayments =e=>{let n="/v1/payments";return{input:{params:e},metadata:{commandName:"GetPayments",path:n,method:"GET"},execute:async o=>{let s=await c(o),r={locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC",limit:20,offset:0},i=u=>{let l=["fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","fromReturnDate","toReturnDate"].some(f=>u[f]!==void 0),C={...u};return l&&C.dateFormat===void 0&&(C.dateFormat="yyyy-MM-dd"),C};try{let u=i(e),p={...r,...u,limit:u.limit!==void 0&&u.limit!==0?u.limit:20,offset:u.offset!==void 0?u.offset:0};return(await s.get(n,{params:p})).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Et= exports.DeletePayment =e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"DeletePayment",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{await s.delete(n)}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var Lt=e=>({input:{accountId:e},metadata:{commandName:"GetAccount",path:`/v1/savingsaccounts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsaccounts/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Ut= exports.UpdateAccount =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"UpdateAccount",path:`/v1/savingsaccounts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsaccounts/${e}`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Nt= exports.DeleteAccount =e=>({input:{accountId:e},metadata:{commandName:"DeleteAccount",path:`/v1/savingsaccounts/${e}`,method:"DELETE"},execute:async n=>{let o=await c(n);try{return(await o.delete(`/v1/savingsaccounts/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Ot= exports.GetAccountsOfClient =(e,n)=>({input:{clientId:e,params:n},metadata:{commandName:"ListAccountsOfClient",path:`/v1/clients/${e}/accounts`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/clients/${e}/accounts`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),kt= exports.CreateAndActivateAccount =e=>({input:{params:e},metadata:{commandName:"CreateAndActivateAccount",path:"/v1/savingsaccounts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsaccounts?command=submit,approve,activate",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),$t= exports.CloseAccount =(e,n)=>({input:{savingsAccountId:e,requestData:n},metadata:{commandName:"CloseAccount",path:`/v1/savingsaccounts/${e}?command=close`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=close`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Bt= exports.ScheduleAccountClosure =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"ScheduleAccountClosure",path:`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),zt= exports.BlockAccount =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"BlockAccount",path:`/v1/savingsaccounts/${e}?command=block`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=block`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Ft= exports.HoldAmount =(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"HoldAmount",path:`/v1/savingsaccounts/${e}?command=hold`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=hold`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var jt=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetPendingTransactions",path:`/v1/savingsaccounts/${e}/pendingTransaction`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/pendingTransaction`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),_t= exports.GetCompletedTransactions =(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetCompletedTransactions",path:`/v1/savingsaccounts/${e}/transactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/transactions`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Vt= exports.GetRecentTransactions =(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetRecentTransactions",path:`/v1/savingsaccounts/${e}/unifiedtransactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/unifiedtransactions`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Mt= exports.GetTransactionById =(e,n,o)=>({input:{savingsAccountId:e,transactionId:n,params:o},metadata:{commandName:"GetTransactionById",path:`/v1/savingsaccounts/${e}/transactions/${n}`,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(`/v1/savingsaccounts/${e}/transactions/${n}`,{params:o})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}),Wt= exports.GetBankDetailsFromRoutingCode =(e,n)=>({input:{routingNumber:e,params:n},metadata:{commandName:"GetBankDetailsFromRoutingCode",path:`/v1/bankdetails/routing/${e}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/bankdetails/routing/${e}`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var Kt=e=>({input:{params:e},metadata:{commandName:"CreateAccountProduct",path:"/v1/savingsproducts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsproducts",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Qt= exports.UpdateAccountProduct =(e,n)=>({input:{productId:e,params:n},metadata:{commandName:"UpdateAccountProduct",path:`/v1/savingsproducts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsproducts/${e}`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Ht= exports.GetAllAccountProducts =()=>({input:{},metadata:{commandName:"GetAllAccountProducts",path:"/v1/savingsproducts",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/savingsproducts")).data}catch(o){_chunk6M772WIBjs.c.call(void 0, o)}}}),Yt= exports.GetAccountProductById =e=>({input:{productId:e},metadata:{commandName:"GetAccountProductById",path:`/v1/savingsproducts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsproducts/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}});var Jt=e=>({input:{requestData:e},metadata:{commandName:"GenerateAccountStatement",path:"/v1/generatestatements",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/generatestatements",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Zt= exports.DownloadAccountStatement =(e,n)=>({input:{savingsAccountId:e,documentId:n},metadata:{commandName:"DownloadAccountStatement",path:`/v1/savings/${e}/documents/${n}/attachment`,method:"GET"},execute:async o=>{let s=await c(o);try{let r=await s.get(`/v1/savings/${e}/documents/${n}/attachment`,{responseType:"blob"}),i=r.headers["content-disposition"],u;if(i){let l=i.match(/filename="?(.+?)"?$/i);l&&(u=l[1])}let p=r.headers["content-type"];return{data:r.data,fileName:u,contentType:p}}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Xt= exports.GetAccountDocumentsDetails =(e,n)=>({input:{savingsAccountId:e,queryParams:n},metadata:{commandName:"GetAccountDocumentsDetails",path:`/v1/savings/${e}/documents`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savings/${e}/documents`,{params:n})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var _graphql = require('graphql');var en=`
2
2
  mutation updateRecipient($id: ID!, $input: UpdateRecipientInput!) {
3
3
  updateRecipient(id: $id, input: $input) {
4
4
  id
@@ -29,4 +29,4 @@
29
29
  }
30
30
  }
31
31
  }
32
- `,tn= exports.UpdateRecipient =e=>{let n=A({command:en,variables:{id:e.id,input:e.input},operationName:"updateRecipient",tenantId:e.tenantId});return{input:e,metadata:{commandName:"UpdateRecipientGQL",path:"/graphql",method:"POST"},execute:n.execute}};var A=e=>({input:e,metadata:{commandName:e.operationName||"GraphQL",path:"/graphql",method:"POST"},execute:async n=>{e.tenantId&&(n.tenantId=e.tenantId);let o=await c(n),s=n.graphqlPath||"/graphql";try{let r=typeof e.command=="string"?e.command:_graphql.print.call(void 0, e.command),{data:i}=await o.post(s,{query:r,variables:e.variables,operationName:e.operationName});if(_optionalChain([i, 'access', _7 => _7.errors, 'optionalAccess', _8 => _8.length]))throw _chunk6M772WIBjs.a.call(void 0, {message:i.errors[0].message,code:"graphql_error",originalError:i.errors[0]});if(!i.data)throw _chunk6M772WIBjs.a.call(void 0, {message:"No data returned from GraphQL query",code:"graphql_no_data"});return i.data}catch(r){throw r.name==="CommandError"?r:_chunk6M772WIBjs.a.call(void 0, {message:r.message,code:"graphql_request_failed",originalError:r})}}});var an=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomUpdate",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n,{...e.updates},{params:e.params})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},on= exports.CustomCreate =e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomCreate",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e.data,{params:e.params})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},rn= exports.CustomGet =e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomGet",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n,{params:e.params})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var sn=(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,id:n},metadata:{commandName:"GetRecipient",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},cn= exports.CreateRecipient =(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,recipient:n},metadata:{commandName:"CreateRecipient",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},dn= exports.DeleteRecipient =(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,recipientId:n},metadata:{commandName:"DeleteRecipient",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},un= exports.GetRecipients =(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,params:n},metadata:{commandName:"GetRecipients",path:o,method:"GET"},execute:async s=>{let r=await c(s);(!n.limit||n.limit<=0)&&(n.limit=20),n.name||(n.name="");try{return(await r.get(o,{params:n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var mn=()=>{let e="/v1/userdetails";return{input:{},metadata:{commandName:"GetUserDetail",path:e,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}},pn= exports.EnableSelfServiceAccess =e=>{let n="/v1/users";return{input:{requestData:e},metadata:{commandName:"EnableSelfServiceAccess",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},ln= exports.UpdateSelfServiceUser =e=>{let{userId:n,...o}=e,s=`/v1/users/${n}`;return{input:{requestData:e},metadata:{commandName:"UpdateSelfServiceUser",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o,isSelfServiceUser:!0})).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Cn= exports.DeleteSelfServiceUser =e=>{let n=`/v1/users/${e}`;return{input:{userId:e},metadata:{commandName:"DeleteSelfServiceUser",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var fn=(e={})=>{let n="/v1/cardproducts",o=new URLSearchParams;o.append("limit",_optionalChain([e, 'optionalAccess', _9 => _9.limit, 'optionalAccess', _10 => _10.toString, 'call', _11 => _11()])||"0"),o.append("offset",_optionalChain([e, 'optionalAccess', _12 => _12.offset, 'optionalAccess', _13 => _13.toString, 'call', _14 => _14()])||"0");let s=o.toString(),r=`${n}?${s}`;return{input:{params:e},metadata:{commandName:"ListCardProduct",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},hn= exports.GetCardProduct =e=>{let n=`/v1/cardproducts/${e}`;return{input:{cardProductId:e},metadata:{commandName:"GetCardProduct",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},yn= exports.CreateCardProduct =e=>{let n="/v1/cardproducts";return{input:{params:e},metadata:{commandName:"CreateCardProduct",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},gn= exports.UpdateCardProduct =(e,n)=>{let o=`/v1/cardproducts/${e}`;return{input:{cardProductId:e,params:n},metadata:{commandName:"UpdateCardProduct",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var S=(e,n)=>{let o=new URLSearchParams;return o.append("type",n.toString()),`${e}?${o.toString()}`},bn= exports.GetClientAddress =e=>{let n=`/v1/client/${e}/addresses`;return{input:{clientId:e},metadata:{commandName:"GetClientAddress",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Rn= exports.CreateClientAddress =(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"CreateClientAddress",path:r,method:"POST"},execute:async i=>{let u=await c(i);try{return(await u.post(r,o)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},xn= exports.UpdateClientAddress =(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"UpdateClientAddress",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},An= exports.SetClientAddressStatus =(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"SetClientAddressStatus",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}};var Sn=e=>{let n=`/v1/clients/${e}/classifications`;return{input:{clientId:e},metadata:{commandName:"GetClientClassification",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},In= exports.SwitchClientClassification =(e,n)=>{let o=`/v1/clients/${e}?command=switchclassification`;return{input:{clientId:e,params:n},metadata:{commandName:"SwitchClientClassification",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var vn=()=>({input:{},metadata:{commandName:"GetConfigurations",path:"/v1/configurations",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/configurations")).data}catch(o){_chunk6M772WIBjs.c.call(void 0, o)}}}),Dn= exports.GetConfigurationByName =e=>({input:{configName:e},metadata:{commandName:"GetConfigurationByName",path:`/v1/configurations/name/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/configurations/name/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Tn= exports.EnableDisableConfiguration =(e,n)=>({input:{configId:e,requestData:n},metadata:{commandName:"EnableDisableConfiguration",path:`/v1/configurations/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/configurations/${e}`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var qn=e=>({input:{params:e},metadata:{commandName:"CreateFixedDepositAccount",path:"/v1/fixeddepositaccounts",method:"POST"},async execute(n){try{return(await(await c(n)).post("/v1/fixeddepositaccounts?command=submit,approve,activate",e)).data}catch(o){throw _chunk6M772WIBjs.c.call(void 0, o)}}}),wn= exports.GetFixedDepositAccount =e=>({input:{accountId:e},metadata:{commandName:"GetFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"GET"},async execute(n){try{return(await(await c(n)).get(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw _chunk6M772WIBjs.c.call(void 0, o)}}}),Pn= exports.UpdateFixedDepositAccount =(e,n)=>({input:{accountId:e,params:n},metadata:{commandName:"UpdateFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"PUT"},async execute(o){try{return(await(await c(o)).put(`/v1/fixeddepositaccounts/${e}`,n)).data}catch(s){throw _chunk6M772WIBjs.c.call(void 0, s)}}}),Gn= exports.DeleteFixedDepositAccount =e=>({input:{accountId:e},metadata:{commandName:"DeleteFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"DELETE"},async execute(n){try{return(await(await c(n)).delete(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw _chunk6M772WIBjs.c.call(void 0, o)}}});var En=e=>{let n=`/v1/clients/${e}/externalCards`;return{input:{clientId:e},metadata:{commandName:"GetAcquiredCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ln= exports.GetAcquiredCardById =e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"GetAcquiredCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Un= exports.AddAcquiredCard =(e,n)=>{let o=`/v1/clients/${e}/externalCards`;return{input:{clientId:e,params:n},metadata:{commandName:"AddAcquiredCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Nn= exports.BlockAcquiredCardAddition =(e,n)=>{let o=`/v1/clients/${e}?command=blockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"BlockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},On= exports.UnblockAcquiredCardAddition =(e,n)=>{let o=`/v1/clients/${e}?command=unblockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"UnblockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},$n= exports.DeleteAcquiredCard =e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"DeleteAcquiredCard",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var kn=e=>({input:{subscriberId:e},metadata:{commandName:"GetSubscriber",path:`/v1/subscribers/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/subscribers/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}});var Bn=e=>({input:{requestData:e},metadata:{commandName:"CreateLoan",path:"/v1/loans",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),zn= exports.ApproveLoan =(e,n)=>({input:{loanIdForApprove:e,requestData:n},metadata:{commandName:"ApproveLoan",path:`/v1/loans/${e}?command=approve`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=approve`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Fn= exports.GetLoanById =(e,n,o)=>({input:{loanId:e,associations:n,exclude:o},metadata:{commandName:"GetLoanById",path:`/v1/loans/${e}`,method:"GET"},execute:async s=>{let r=await c(s);try{let i={};return n&&(i.associations=n),o&&(i.exclude=o),(await r.get(`/v1/loans/${e}`,Object.keys(i).length>0?{params:i}:void 0)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}),jn= exports.DisburseLoanToLinkedAccount =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"DisburseLoanToLinkedAccount",path:`/v1/loans/${e}?command=disburseToSavings`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburseToSavings`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),_n= exports.DisburseLoan =(e,n)=>({input:{loanIdForDisburse:e,requestData:n},metadata:{commandName:"DisburseLoan",path:`/v1/loans/${e}?command=disburse`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburse`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Vn= exports.CalculateLoanSchedule =e=>({input:{requestData:e},metadata:{commandName:"CalculateLoanSchedule",path:"/v1/loans?command=calculateLoanSchedule",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans?command=calculateLoanSchedule",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Mn= exports.MakeRepayment =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"MakeRepayment",path:`/v1/loans/${e}/transactions?command=repayment`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}/transactions?command=repayment`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Wn= exports.GetLoanPreclosureTemplate =(e,n)=>{let o=new URLSearchParams;o.append("command","preclosure"),_optionalChain([n, 'optionalAccess', _15 => _15.transactionDate])&&o.append("transactionDate",n.transactionDate),_optionalChain([n, 'optionalAccess', _16 => _16.locale])&&o.append("locale",n.locale),_optionalChain([n, 'optionalAccess', _17 => _17.dateFormat])&&o.append("dateFormat",n.dateFormat);let s=o.toString(),r=`/v1/loans/${e}/transactions/template?${s}`;return{input:{loanId:e,params:n},metadata:{commandName:"GetLoanPreclosureTemplate",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},Kn= exports.PreCloseLoan =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"PreCloseLoan",path:`/v1/loans/${e}?command=preclosure`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=preclosure`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Qn= exports.GetLoanTransactionDetails =(e,n)=>({input:{loanId:e,transactionId:n},metadata:{commandName:"GetLoanTransactionDetails",path:`/v1/loans/${e}/transactions/${n}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/loans/${e}/transactions/${n}`)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Hn= exports.GetLoanWriteoffTemplate =e=>({input:{loanId:e},metadata:{commandName:"GetLoanWriteoffTemplate",path:`/v1/loans/${e}/transactions/template?command=writeoff`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/loans/${e}/transactions/template?command=writeoff`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Yn= exports.WriteLoanOff =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"WriteLoanOff",path:`/v1/loans/${e}?command=writeoff`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=writeoff`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Jn= exports.GetLoanSearchTemplate =()=>({input:{},metadata:{commandName:"GetLoanSearchTemplate",path:"/v1/search/template",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/search/template")).data}catch(o){_chunk6M772WIBjs.c.call(void 0, o)}}}),Zn= exports.GetSearchData =(e,n)=>({input:{query:e,requestData:n},metadata:{commandName:"GetSearchData",path:"/v1/search",method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get("/v1/search",{params:{query:e,...n}})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var Xn=(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges`;return{input:{accountId:e,params:n},metadata:{commandName:"AddChargeToAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},ea= exports.GetChargesByAccountId =e=>{let n=`/v1/savingsaccounts/${e}?associations=charges`;return{input:{accountIdForAccountCharges:e},metadata:{commandName:"GetChargesByAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},ta= exports.AddChargeToLoanAccount =(e,n)=>{let o=`/v1/loans/${e}/charges`;return{input:{loanAccountId:e,params:n},metadata:{commandName:"AddChargeToLoanAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},na= exports.GetChargesByLoanAccountId =e=>{let n=`/v1/loans/${e}/charges`;return{input:{loanIdForCharge:e},metadata:{commandName:"GetChargesByLoanAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},aa= exports.WaiveChargeFromAccount =(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges/${n}?command=waive`;return{input:{accountId:e,chargeId:n},metadata:{commandName:"WaiveChargeFromAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},oa= exports.UndoChargeToAccount =(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/transactions/${n}?command=undo`;return{input:{accountId:e,transactionId:n,params:o},metadata:{commandName:"UndoChargeToAccount",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},ra= exports.PayAccountCharge =(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/charges/${n}?command=paycharge`;return{input:{accountId:e,chargeId:n,params:o},metadata:{commandName:"PayAccountCharge",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}};exports.ActivateCard = Pe; exports.ActivatePhysicalCard = be; exports.AddAcquiredCard = Un; exports.AddCardToMobileWallet = Ae; exports.AddChargeToAccount = Xn; exports.AddChargeToLoanAccount = ta; exports.ApproveLoan = zn; exports.ApproveRejectClientDocument = He; exports.BlockAccount = zt; exports.BlockAcquiredCardAddition = Nn; exports.CalculateLoanSchedule = Vn; exports.ChangeCardType = ge; exports.CloseAccount = kt; exports.CreateAccountProduct = Kt; exports.CreateAndActivateAccount = $t; exports.CreateCard = ye; exports.CreateCardProduct = yn; exports.CreateClient = bt; exports.CreateClientAddress = Rn; exports.CreateClientIdentifier = Me; exports.CreateFixedDepositAccount = qn; exports.CreateLoan = Bn; exports.CreatePayment = qt; exports.CreatePrepaidCard = Le; exports.CreateRecipient = cn; exports.CreateTransfer = vt; exports.CustomCreate = on; exports.CustomGet = rn; exports.CustomUpdate = an; exports.DeactivatePrepaidCard = Oe; exports.DeleteAccount = Nt; exports.DeleteAcquiredCard = $n; exports.DeleteClient = xt; exports.DeleteClientDocument = Qe; exports.DeleteFixedDepositAccount = Gn; exports.DeletePayment = Et; exports.DeleteRecipient = dn; exports.DeleteSelfServiceUser = Cn; exports.DisburseLoan = _n; exports.DisburseLoanToLinkedAccount = jn; exports.DownloadAccountStatement = Zt; exports.EnableDisableConfiguration = Tn; exports.EnableSelfServiceAccess = pn; exports.GenerateAccountStatement = Jt; exports.GetAccount = Lt; exports.GetAccountDocumentsDetails = Xt; exports.GetAccountProductById = Yt; exports.GetAccountsOfClient = Ot; exports.GetAcquiredCardById = Ln; exports.GetAcquiredCards = En; exports.GetAllAccountProducts = Ht; exports.GetBankDetailsFromRoutingCode = Wt; exports.GetCardAuthorizationById = ve; exports.GetCardAuthorizations = he; exports.GetCardById = Ce; exports.GetCardImageUrl = fe; exports.GetCardProduct = hn; exports.GetCardSettlementById = Te; exports.GetCardSettlements = De; exports.GetCards = le; exports.GetChargesByAccountId = ea; exports.GetChargesByLoanAccountId = na; exports.GetClient = yt; exports.GetClientAddress = bn; exports.GetClientClassification = Sn; exports.GetClients = Rt; exports.GetCompletedTransactions = _t; exports.GetConfigurationByName = Dn; exports.GetConfigurations = vn; exports.GetFixedDepositAccount = wn; exports.GetLoanById = Fn; exports.GetLoanPreclosureTemplate = Wn; exports.GetLoanSearchTemplate = Jn; exports.GetLoanTransactionDetails = Qn; exports.GetLoanWriteoffTemplate = Hn; exports.GetPayment = wt; exports.GetPayments = Gt; exports.GetPendingTransactions = jt; exports.GetPermittedDocumentTypes = _e; exports.GetPrepaidCardById = Ne; exports.GetPrepaidCardsByAccountId = Ue; exports.GetRecentTransactions = Vt; exports.GetRecipient = sn; exports.GetRecipients = un; exports.GetSearchData = Zn; exports.GetStatusOfVerifyClient = St; exports.GetSubscriber = kn; exports.GetTransactionById = Mt; exports.GetTransfer = Dt; exports.GetTransfers = Tt; exports.GetUserDetail = mn; exports.GraphQL = A; exports.HoldAmount = Ft; exports.ListCardProduct = fn; exports.ListClientDocument = Ve; exports.MakeRepayment = Mn; exports.OrderPhysicalCard = Re; exports.PayAccountCharge = ra; exports.PreCloseLoan = Kn; exports.RenewCard = Ee; exports.ReplaceCard = Ge; exports.ScheduleAccountClosure = Bt; exports.SetClientAddressStatus = An; exports.SetPIN = xe; exports.SuspendCard = we; exports.SwitchClientClassification = In; exports.TerminateCard = qe; exports.UnblockAcquiredCardAddition = On; exports.UndoChargeToAccount = oa; exports.UpdateAccount = Ut; exports.UpdateAccountProduct = Qt; exports.UpdateCardFeature = Se; exports.UpdateCardLimit = Ie; exports.UpdateCardProduct = gn; exports.UpdateClient = gt; exports.UpdateClientAddress = xn; exports.UpdateClientIdentifier = We; exports.UpdateFixedDepositAccount = Pn; exports.UpdatePayment = Pt; exports.UpdateRecipient = tn; exports.UpdateSelfServiceUser = ln; exports.UploadClientIdentifierDocument = Ke; exports.VerifyWithActivateClients = At; exports.WaiveChargeFromAccount = aa; exports.WriteLoanOff = Yn;
32
+ `,tn= exports.UpdateRecipient =e=>{let n=A({command:en,variables:{id:e.id,input:e.input},operationName:"updateRecipient",tenantId:e.tenantId});return{input:e,metadata:{commandName:"UpdateRecipientGQL",path:"/graphql",method:"POST"},execute:n.execute}};var A=e=>({input:e,metadata:{commandName:e.operationName||"GraphQL",path:"/graphql",method:"POST"},execute:async n=>{e.tenantId&&(n.tenantId=e.tenantId);let o=await c(n),s=n.graphqlPath||"/graphql";try{let r=typeof e.command=="string"?e.command:_graphql.print.call(void 0, e.command),{data:i}=await o.post(s,{query:r,variables:e.variables,operationName:e.operationName});if(_optionalChain([i, 'access', _7 => _7.errors, 'optionalAccess', _8 => _8.length]))throw _chunk6M772WIBjs.a.call(void 0, {message:i.errors[0].message,code:"graphql_error",originalError:i.errors[0]});if(!i.data)throw _chunk6M772WIBjs.a.call(void 0, {message:"No data returned from GraphQL query",code:"graphql_no_data"});return i.data}catch(r){throw r.name==="CommandError"?r:_chunk6M772WIBjs.a.call(void 0, {message:r.message,code:"graphql_request_failed",originalError:r})}}});var an=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomUpdate",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n,{...e.updates},{params:e.params})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},on= exports.CustomCreate =e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomCreate",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e.data,{params:e.params})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},rn= exports.CustomGet =e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomGet",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n,{params:e.params})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var sn=(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,id:n},metadata:{commandName:"GetRecipient",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},cn= exports.CreateRecipient =(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,recipient:n},metadata:{commandName:"CreateRecipient",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},dn= exports.DeleteRecipient =(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,recipientId:n},metadata:{commandName:"DeleteRecipient",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},un= exports.GetRecipients =(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,params:n},metadata:{commandName:"GetRecipients",path:o,method:"GET"},execute:async s=>{let r=await c(s);(!n.limit||n.limit<=0)&&(n.limit=20),n.name||(n.name="");try{return(await r.get(o,{params:n})).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var mn=()=>{let e="/v1/userdetails";return{input:{},metadata:{commandName:"GetUserDetail",path:e,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}},pn= exports.EnableSelfServiceAccess =e=>{let n="/v1/users";return{input:{requestData:e},metadata:{commandName:"EnableSelfServiceAccess",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},ln= exports.UpdateSelfServiceUser =e=>{let{userId:n,...o}=e,s=`/v1/users/${n}`;return{input:{requestData:e},metadata:{commandName:"UpdateSelfServiceUser",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o,isSelfServiceUser:!0})).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},Cn= exports.DeleteSelfServiceUser =e=>{let n=`/v1/users/${e}`;return{input:{userId:e},metadata:{commandName:"DeleteSelfServiceUser",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}};var fn=(e={})=>{let n="/v1/cardproducts",o=new URLSearchParams;o.append("limit",_optionalChain([e, 'optionalAccess', _9 => _9.limit, 'optionalAccess', _10 => _10.toString, 'call', _11 => _11()])||"0"),o.append("offset",_optionalChain([e, 'optionalAccess', _12 => _12.offset, 'optionalAccess', _13 => _13.toString, 'call', _14 => _14()])||"0");let s=o.toString(),r=`${n}?${s}`;return{input:{params:e},metadata:{commandName:"ListCardProduct",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},hn= exports.GetCardProduct =e=>{let n=`/v1/cardproducts/${e}`;return{input:{cardProductId:e},metadata:{commandName:"GetCardProduct",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},yn= exports.CreateCardProduct =e=>{let n="/v1/cardproducts";return{input:{params:e},metadata:{commandName:"CreateCardProduct",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},gn= exports.UpdateCardProduct =(e,n)=>{let o=`/v1/cardproducts/${e}`;return{input:{cardProductId:e,params:n},metadata:{commandName:"UpdateCardProduct",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var S=(e,n)=>{let o=new URLSearchParams;return o.append("type",n.toString()),`${e}?${o.toString()}`},bn= exports.GetClientAddress =e=>{let n=`/v1/client/${e}/addresses`;return{input:{clientId:e},metadata:{commandName:"GetClientAddress",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Rn= exports.CreateClientAddress =(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"CreateClientAddress",path:r,method:"POST"},execute:async i=>{let u=await c(i);try{return(await u.post(r,o)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},xn= exports.UpdateClientAddress =(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"UpdateClientAddress",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},An= exports.SetClientAddressStatus =(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"SetClientAddressStatus",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}};var Sn=e=>{let n=`/v1/clients/${e}/classifications`;return{input:{clientId:e},metadata:{commandName:"GetClientClassification",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},In= exports.SwitchClientClassification =(e,n)=>{let o=`/v1/clients/${e}?command=switchclassification`;return{input:{clientId:e,params:n},metadata:{commandName:"SwitchClientClassification",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}};var vn=()=>({input:{},metadata:{commandName:"GetConfigurations",path:"/v1/configurations",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/configurations")).data}catch(o){_chunk6M772WIBjs.c.call(void 0, o)}}}),Dn= exports.GetConfigurationByName =e=>({input:{configName:e},metadata:{commandName:"GetConfigurationByName",path:`/v1/configurations/name/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/configurations/name/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Tn= exports.EnableDisableConfiguration =(e,n)=>({input:{configId:e,requestData:n},metadata:{commandName:"EnableDisableConfiguration",path:`/v1/configurations/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/configurations/${e}`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var qn=e=>({input:{params:e},metadata:{commandName:"CreateFixedDepositAccount",path:"/v1/fixeddepositaccounts",method:"POST"},async execute(n){try{return(await(await c(n)).post("/v1/fixeddepositaccounts?command=submit,approve,activate",e)).data}catch(o){throw _chunk6M772WIBjs.c.call(void 0, o)}}}),Pn= exports.GetFixedDepositAccount =e=>({input:{accountId:e},metadata:{commandName:"GetFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"GET"},async execute(n){try{return(await(await c(n)).get(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw _chunk6M772WIBjs.c.call(void 0, o)}}}),wn= exports.UpdateFixedDepositAccount =(e,n)=>({input:{accountId:e,params:n},metadata:{commandName:"UpdateFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"PUT"},async execute(o){try{return(await(await c(o)).put(`/v1/fixeddepositaccounts/${e}`,n)).data}catch(s){throw _chunk6M772WIBjs.c.call(void 0, s)}}}),Gn= exports.DeleteFixedDepositAccount =e=>({input:{accountId:e},metadata:{commandName:"DeleteFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"DELETE"},async execute(n){try{return(await(await c(n)).delete(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw _chunk6M772WIBjs.c.call(void 0, o)}}});var En=e=>{let n=`/v1/clients/${e}/externalCards`;return{input:{clientId:e},metadata:{commandName:"GetAcquiredCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Ln= exports.GetAcquiredCardById =e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"GetAcquiredCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},Un= exports.AddAcquiredCard =(e,n)=>{let o=`/v1/clients/${e}/externalCards`;return{input:{clientId:e,params:n},metadata:{commandName:"AddAcquiredCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},Nn= exports.BlockAcquiredCardAddition =(e,n)=>{let o=`/v1/clients/${e}?command=blockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"BlockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},On= exports.UnblockAcquiredCardAddition =(e,n)=>{let o=`/v1/clients/${e}?command=unblockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"UnblockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},kn= exports.DeleteAcquiredCard =e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"DeleteAcquiredCard",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},$n= exports.GetAcquiredCardPublicKey =()=>{let e="/v1/externalCards/key";return{input:void 0,metadata:{commandName:"GetAcquiredCardPublicKey",path:e,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}};var Bn=e=>({input:{subscriberId:e},metadata:{commandName:"GetSubscriber",path:`/v1/subscribers/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/subscribers/${e}`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}});var zn=e=>({input:{requestData:e},metadata:{commandName:"CreateLoan",path:"/v1/loans",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Fn= exports.ApproveLoan =(e,n)=>({input:{loanIdForApprove:e,requestData:n},metadata:{commandName:"ApproveLoan",path:`/v1/loans/${e}?command=approve`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=approve`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),jn= exports.GetLoanById =(e,n,o)=>({input:{loanId:e,associations:n,exclude:o},metadata:{commandName:"GetLoanById",path:`/v1/loans/${e}`,method:"GET"},execute:async s=>{let r=await c(s);try{let i={};return n&&(i.associations=n),o&&(i.exclude=o),(await r.get(`/v1/loans/${e}`,Object.keys(i).length>0?{params:i}:void 0)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}),_n= exports.DisburseLoanToLinkedAccount =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"DisburseLoanToLinkedAccount",path:`/v1/loans/${e}?command=disburseToSavings`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburseToSavings`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Vn= exports.DisburseLoan =(e,n)=>({input:{loanIdForDisburse:e,requestData:n},metadata:{commandName:"DisburseLoan",path:`/v1/loans/${e}?command=disburse`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburse`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Mn= exports.CalculateLoanSchedule =e=>({input:{requestData:e},metadata:{commandName:"CalculateLoanSchedule",path:"/v1/loans?command=calculateLoanSchedule",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans?command=calculateLoanSchedule",e)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Wn= exports.MakeRepayment =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"MakeRepayment",path:`/v1/loans/${e}/transactions?command=repayment`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}/transactions?command=repayment`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Kn= exports.GetLoanPreclosureTemplate =(e,n)=>{let o=new URLSearchParams;o.append("command","preclosure"),_optionalChain([n, 'optionalAccess', _15 => _15.transactionDate])&&o.append("transactionDate",n.transactionDate),_optionalChain([n, 'optionalAccess', _16 => _16.locale])&&o.append("locale",n.locale),_optionalChain([n, 'optionalAccess', _17 => _17.dateFormat])&&o.append("dateFormat",n.dateFormat);let s=o.toString(),r=`/v1/loans/${e}/transactions/template?${s}`;return{input:{loanId:e,params:n},metadata:{commandName:"GetLoanPreclosureTemplate",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){_chunk6M772WIBjs.c.call(void 0, p)}}}},Qn= exports.PreCloseLoan =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"PreCloseLoan",path:`/v1/loans/${e}?command=preclosure`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=preclosure`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Hn= exports.GetLoanTransactionDetails =(e,n)=>({input:{loanId:e,transactionId:n},metadata:{commandName:"GetLoanTransactionDetails",path:`/v1/loans/${e}/transactions/${n}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/loans/${e}/transactions/${n}`)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Yn= exports.GetLoanWriteoffTemplate =e=>({input:{loanId:e},metadata:{commandName:"GetLoanWriteoffTemplate",path:`/v1/loans/${e}/transactions/template?command=writeoff`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/loans/${e}/transactions/template?command=writeoff`)).data}catch(s){_chunk6M772WIBjs.c.call(void 0, s)}}}),Jn= exports.WriteLoanOff =(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"WriteLoanOff",path:`/v1/loans/${e}?command=writeoff`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=writeoff`,n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}),Zn= exports.GetLoanSearchTemplate =()=>({input:{},metadata:{commandName:"GetLoanSearchTemplate",path:"/v1/search/template",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/search/template")).data}catch(o){_chunk6M772WIBjs.c.call(void 0, o)}}}),Xn= exports.GetSearchData =(e,n)=>({input:{query:e,requestData:n},metadata:{commandName:"GetSearchData",path:"/v1/search",method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get("/v1/search",{params:{query:e,...n}})).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}});var ea=(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges`;return{input:{accountId:e,params:n},metadata:{commandName:"AddChargeToAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},ta= exports.GetChargesByAccountId =e=>{let n=`/v1/savingsaccounts/${e}?associations=charges`;return{input:{accountIdForAccountCharges:e},metadata:{commandName:"GetChargesByAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},na= exports.AddChargeToLoanAccount =(e,n)=>{let o=`/v1/loans/${e}/charges`;return{input:{loanAccountId:e,params:n},metadata:{commandName:"AddChargeToLoanAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},aa= exports.GetChargesByLoanAccountId =e=>{let n=`/v1/loans/${e}/charges`;return{input:{loanIdForCharge:e},metadata:{commandName:"GetChargesByLoanAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){_chunk6M772WIBjs.c.call(void 0, r)}}}},oa= exports.WaiveChargeFromAccount =(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges/${n}?command=waive`;return{input:{accountId:e,chargeId:n},metadata:{commandName:"WaiveChargeFromAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){_chunk6M772WIBjs.c.call(void 0, i)}}}},ra= exports.UndoChargeToAccount =(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/transactions/${n}?command=undo`;return{input:{accountId:e,transactionId:n,params:o},metadata:{commandName:"UndoChargeToAccount",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}},sa= exports.PayAccountCharge =(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/charges/${n}?command=paycharge`;return{input:{accountId:e,chargeId:n,params:o},metadata:{commandName:"PayAccountCharge",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){_chunk6M772WIBjs.c.call(void 0, u)}}}};exports.ActivateCard = we; exports.ActivatePhysicalCard = be; exports.AddAcquiredCard = Un; exports.AddCardToMobileWallet = Ae; exports.AddChargeToAccount = ea; exports.AddChargeToLoanAccount = na; exports.ApproveLoan = Fn; exports.ApproveRejectClientDocument = He; exports.BlockAccount = zt; exports.BlockAcquiredCardAddition = Nn; exports.CalculateLoanSchedule = Mn; exports.ChangeCardType = ge; exports.CloseAccount = $t; exports.CreateAccountProduct = Kt; exports.CreateAndActivateAccount = kt; exports.CreateCard = ye; exports.CreateCardProduct = yn; exports.CreateClient = bt; exports.CreateClientAddress = Rn; exports.CreateClientIdentifier = Me; exports.CreateFixedDepositAccount = qn; exports.CreateLoan = zn; exports.CreatePayment = qt; exports.CreatePrepaidCard = Le; exports.CreateRecipient = cn; exports.CreateTransfer = vt; exports.CustomCreate = on; exports.CustomGet = rn; exports.CustomUpdate = an; exports.DeactivatePrepaidCard = Oe; exports.DeleteAccount = Nt; exports.DeleteAcquiredCard = kn; exports.DeleteClient = xt; exports.DeleteClientDocument = Qe; exports.DeleteFixedDepositAccount = Gn; exports.DeletePayment = Et; exports.DeleteRecipient = dn; exports.DeleteSelfServiceUser = Cn; exports.DisburseLoan = Vn; exports.DisburseLoanToLinkedAccount = _n; exports.DownloadAccountStatement = Zt; exports.EnableDisableConfiguration = Tn; exports.EnableSelfServiceAccess = pn; exports.GenerateAccountStatement = Jt; exports.GetAccount = Lt; exports.GetAccountDocumentsDetails = Xt; exports.GetAccountProductById = Yt; exports.GetAccountsOfClient = Ot; exports.GetAcquiredCardById = Ln; exports.GetAcquiredCardPublicKey = $n; exports.GetAcquiredCards = En; exports.GetAllAccountProducts = Ht; exports.GetBankDetailsFromRoutingCode = Wt; exports.GetCardAuthorizationById = ve; exports.GetCardAuthorizations = he; exports.GetCardById = Ce; exports.GetCardImageUrl = fe; exports.GetCardProduct = hn; exports.GetCardSettlementById = Te; exports.GetCardSettlements = De; exports.GetCards = le; exports.GetChargesByAccountId = ta; exports.GetChargesByLoanAccountId = aa; exports.GetClient = yt; exports.GetClientAddress = bn; exports.GetClientClassification = Sn; exports.GetClients = Rt; exports.GetCompletedTransactions = _t; exports.GetConfigurationByName = Dn; exports.GetConfigurations = vn; exports.GetFixedDepositAccount = Pn; exports.GetLoanById = jn; exports.GetLoanPreclosureTemplate = Kn; exports.GetLoanSearchTemplate = Zn; exports.GetLoanTransactionDetails = Hn; exports.GetLoanWriteoffTemplate = Yn; exports.GetPayment = Pt; exports.GetPayments = Gt; exports.GetPendingTransactions = jt; exports.GetPermittedDocumentTypes = _e; exports.GetPrepaidCardById = Ne; exports.GetPrepaidCardsByAccountId = Ue; exports.GetRecentTransactions = Vt; exports.GetRecipient = sn; exports.GetRecipients = un; exports.GetSearchData = Xn; exports.GetStatusOfVerifyClient = St; exports.GetSubscriber = Bn; exports.GetTransactionById = Mt; exports.GetTransfer = Dt; exports.GetTransfers = Tt; exports.GetUserDetail = mn; exports.GraphQL = A; exports.HoldAmount = Ft; exports.ListCardProduct = fn; exports.ListClientDocument = Ve; exports.MakeRepayment = Wn; exports.OrderPhysicalCard = Re; exports.PayAccountCharge = sa; exports.PreCloseLoan = Qn; exports.RenewCard = Ee; exports.ReplaceCard = Ge; exports.ScheduleAccountClosure = Bt; exports.SetClientAddressStatus = An; exports.SetPIN = xe; exports.SuspendCard = Pe; exports.SwitchClientClassification = In; exports.TerminateCard = qe; exports.UnblockAcquiredCardAddition = On; exports.UndoChargeToAccount = ra; exports.UpdateAccount = Ut; exports.UpdateAccountProduct = Qt; exports.UpdateCardFeature = Se; exports.UpdateCardLimit = Ie; exports.UpdateCardProduct = gn; exports.UpdateClient = gt; exports.UpdateClientAddress = xn; exports.UpdateClientIdentifier = We; exports.UpdateFixedDepositAccount = wn; exports.UpdatePayment = wt; exports.UpdateRecipient = tn; exports.UpdateSelfServiceUser = ln; exports.UploadClientIdentifierDocument = Ke; exports.VerifyWithActivateClients = At; exports.WaiveChargeFromAccount = oa; exports.WriteLoanOff = Jn;
@@ -1,4 +1,4 @@
1
- import{G as D,H as T,p as v}from"../chunk-AKKSZ4BX.mjs";import{a as h,c as d}from"../chunk-2PLZ534I.mjs";import{z as t}from"zod";var b=t.object({id:t.number(),controls:t.array(t.string()),type:t.string(),value:t.number(),timePeriod:t.number(),timeUnit:t.string(),territorialLimits:t.array(t.any()),category:t.string().optional(),categoryId:t.number().optional(),version:t.number().optional()}),q=t.object({id:t.number(),username:t.string(),officeId:t.number(),officeName:t.string(),firstname:t.string(),lastname:t.string(),email:t.string(),isEmailVerified:t.boolean(),isSelfServiceUser:t.boolean()}),Q=t.object({date:t.array(t.number()),time:t.object({hour:t.number(),minute:t.number(),second:t.number(),nano:t.number()})}),H=t.object({id:t.number(),accountId:t.number(),productId:t.number(),virtual:t.boolean(),productName:t.string(),network:t.string(),cardType:t.string(),digitalFirst:t.boolean(),cardProcessorName:t.string(),token:t.string(),embossedNames:t.array(t.string()),primaryAccountNumber:t.string(),expiresOn:t.array(t.number()),status:t.string(),fulfillmentStatus:t.string(),onlinePaymentEnabled:t.boolean(),posPaymentEnabled:t.boolean(),physicalCardActivated:t.boolean(),contactlessPaymentEnabled:t.boolean(),atmWithdrawalsEnabled:t.boolean(),internationalPaymentsEnabled:t.boolean(),velocityRules:t.array(b),registeredOn:t.array(t.number()),activatedAt:Q.optional(),updatedStatusBy:q.optional(),updatedStatusAt:t.string().optional(),bid:t.number(),replacedDamageCount:t.number(),user:q.optional(),businessCardIDEnabled:t.boolean(),mergedVelocityRules:t.array(b),maximumAllowedVelocityRules:t.array(b),cardNumber:t.number(),printAccountNickname:t.boolean()}),ia=t.array(H),ca=t.object({productId:t.number(),savingsAccountId:t.number().optional(),userId:t.number().optional(),savingsProductId:t.number().optional(),clientId:t.number()}).refine(e=>{let n=e.savingsAccountId!==void 0,o=e.savingsProductId!==void 0;return!(n&&o||!n&&!o||o&&e.clientId===void 0)}),da=t.object({productId:t.number(),creditAccountId:t.number(),userId:t.number().optional()}),ua=t.object({id:t.number(),cardToken:t.string(),clientId:t.number(),resourceId:t.number(),resourceIdentifier:t.string(),data:t.object({shippingAddressId:t.number()})}),P=t.object({walletProvider:t.enum(["APPLE_PAY","GOOGLE_PAY"]),certificate1:t.string().optional(),certificate2:t.string().optional(),nonce:t.string().optional(),deviceID:t.string().optional(),walletAccountID:t.string().optional()}).refine(e=>e.walletProvider==="GOOGLE_PAY"?e.deviceID!==void 0&&e.walletAccountID!==void 0&&e.certificate1===void 0&&e.certificate2===void 0&&e.nonce===void 0:e.walletProvider==="APPLE_PAY"?e.certificate1!==void 0&&e.certificate2!==void 0&&e.nonce!==void 0&&e.deviceID===void 0&&e.walletAccountID===void 0:!0,{message:"Invalid combination of parameters for the selected wallet provider"}),ma=t.object({id:t.number(),clientId:t.number(),resourceId:t.number(),data:t.object({activationData:t.string(),encryptedCardData:t.string(),ephemeralPublicKey:t.string()})}),pa=t.object({posPaymentEnabled:t.boolean().optional(),onlinePaymentEnabled:t.boolean().optional(),atmWithdrawalsEnabled:t.boolean().optional(),internationalPaymentsEnabled:t.boolean().optional(),blockedCountries:t.array(t.string()).optional()}),la=t.object({resourceId:t.number(),clientId:t.number(),id:t.number(),changes:t.object({posPaymentEnabled:t.boolean(),onlinePaymentEnabled:t.boolean(),contactlessPaymentEnabled:t.boolean(),atmWithdrawalsEnabled:t.boolean(),internationalPaymentsEnabled:t.boolean(),blockedCountries:t.array(t.string())})}),w=t.object({single:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional(),daily:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional(),weekly:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional(),monthly:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional()}),Ca=t.object({purchase:t.array(w).optional(),atm:t.array(w).optional()}),fa=t.object({resourceId:t.number(),clientId:t.number(),id:t.number(),changes:t.object({velocityRules:t.array(t.object({controls:t.array(t.string()),type:t.string(),value:t.number(),timePeriod:t.number(),timeUnit:t.string()}))})}),Y=t.object({mcc:t.string(),merchantId:t.string(),description:t.string(),postalcode:t.string(),country:t.string()}),J=t.object({aav:t.string(),arqc:t.string(),avsResult:t.string(),cvv1:t.string(),cvv2:t.string(),cvv3:t.string(),offlinePin:t.string(),pin:t.string()}),Z=t.object({entryType:t.string(),cardHolderPresent:t.string(),recurring:t.string(),validationResults:J}),X=t.object({zip:t.string(),address:t.string()}),G=t.object({id:t.number(),internalId:t.string(),externalAuthId:t.string(),externalOriginalAuthId:t.string(),authType:t.string(),transactionType:t.string(),currency:t.string(),amount:t.number(),returnBalance:t.boolean(),merchant:Y,expiryDate:t.array(t.number()),executionCode:t.string(),executionMessage:t.string(),status:t.string(),createdAt:t.string(),clearedAmount:t.number(),international:t.boolean(),incremental:t.boolean(),transaction:Z,flag:t.string(),avsData:X,settledAmount:t.number(),availableBalance:t.number(),accountBalance:t.number(),errorDetails:t.record(t.array(t.string())).optional()}),ee=t.enum(["ALL","ACTIVE","COMPLETED","REJECTED","EXPIRED","RELEASED","REVERSED"]),ha=t.object({cardToken:t.string(),status:ee.optional(),offset:t.number().optional(),limit:t.number().optional(),orderBy:t.string().optional(),sortOrder:t.enum(["asc","desc"]).optional(),isActiveCardAuthorizations:t.boolean().optional()}),ya=t.object({totalFilteredRecords:t.number(),pageItems:t.array(G)}),te=t.enum(["notes","media"]),ga=t.object({cardToken:t.string(),authorizationId:t.number(),associations:te.optional()}),ne=t.object({cashBackAmount:t.number(),exchangeRate:t.number(),feeAmount:t.number(),localCurrency:t.string(),localCurrencyAmount:t.number(),localSurchargeAmt:t.number()}),ae=t.object({accountToken:t.string(),cardToken:t.string()}),oe=t.object({id:t.number(),accountId:t.number(),productId:t.number(),virtual:t.boolean(),network:t.string(),cardType:t.string(),digitalFirst:t.boolean(),token:t.string(),embossedNames:t.array(t.string()),primaryAccountNumber:t.string(),expiresOn:t.array(t.number()),status:t.string(),fulfillmentStatus:t.string(),onlinePaymentEnabled:t.boolean(),posPaymentEnabled:t.boolean(),physicalCardActivated:t.boolean(),contactlessPaymentEnabled:t.boolean(),atmWithdrawalsEnabled:t.boolean(),internationalPaymentsEnabled:t.boolean(),registeredOn:t.array(t.number()),activatedAt:t.object({date:t.array(t.number()),time:t.object({hour:t.number(),minute:t.number(),second:t.number(),nano:t.number()})}).optional(),businessCardIDEnabled:t.boolean()}),E=t.object({is_emv:t.boolean()}),re=t.object({id:t.string(),emv:E,mcc:t.number(),mti:t.string(),account:t.object({cad:t.number(),pan:t.string(),prn:t.string(),xid:t.number(),card_status:t.string(),account_status:t.string(),expiration_date:t.string(),merchant_supplied_expiration_date:t.string()}),amounts:t.object({currency:t.string(),fee_amount:t.string(),trans_amount:t.string(),amt_til_limit:t.string(),exchange_rate:t.string(),local_currency:t.string(),available_funds:t.string(),cashback_amount:t.string(),upcharge_amount:t.string(),billing_currency:t.string(),local_currency_amount:t.string(),billing_currency_amount:t.string()}),auth_id:t.string(),network:t.string(),version:t.string(),avs_data:t.object({zip:t.string(),address:t.string()}),merchant:t.object({acquirer_id:t.string(),merchant_id:t.string(),terminal_id:t.string(),merchant_state:t.string(),merchant_country:t.string(),merchant_description:t.string(),merchant_postal_code:t.string()}),auth_type:t.string(),ecommerce:t.object({raw_eci:t.string(),is_ecommerce:t.boolean(),merchant_asserts_authenticated:t.boolean(),merchant_asserts_data_protection:t.boolean(),merchant_asserts_authentication_attempted:t.boolean()}),risk_code:t.string(),timestamp:t.string(),entry_type:t.string(),risk_score:t.string(),subnetwork:t.string(),original_id:t.string(),transaction:t.object({recurring:t.string(),cardholder_present:t.string(),transaction_initiator_code:t.string()}),international:t.boolean(),response_code:t.string(),transaction_type:t.string(),partial_supported:t.boolean(),validation_results:t.object({aav:t.string(),pin:t.string(),arqc:t.string(),cvv1:t.string(),cvv2:t.string(),cvv3:t.string(),avs_result:t.string(),offline_pin:t.string()}),digital_payment_data:t.record(t.any()),pin_entry_capability:t.string(),response_code_objects:t.record(t.array(t.string())),eligible_for_balance_return:t.boolean()}),ba=G.extend({externalCardId:t.string().optional(),gatewayToken:t.string().optional(),account:ae.optional(),amountDetails:ne.optional(),isEcommerce:t.boolean().optional(),releasedAt:t.string().optional(),card:oe.optional(),pinCapability:t.string().optional(),riskScore:t.string().optional(),emv:E.optional(),media:t.record(t.any()).optional(),rawAuthorizationDetails:re.optional(),network:t.string().optional()}),se=t.object({merchant_number:t.string(),merchantId:t.string(),merchant_location:t.string(),mcc:t.string(),description:t.string()}),ie=t.object({clientId:t.number(),firstName:t.string(),lastName:t.string(),accountNumber:t.string(),id:t.number(),type:t.string(),internalClearingId:t.string(),internalAuthId:t.string(),externalClearingId:t.string(),externalAuthId:t.string(),externalOriginalAuthId:t.string(),externalCardId:t.string(),cardToken:t.string(),merchant:se,amount:t.number(),network:t.string(),currency:t.string(),requestedAt:t.string(),createdAt:t.string(),status:t.string(),batchDate:t.string(),batchIdentifier:t.string(),mcSequenceNumber:t.number(),mcSequenceCount:t.number(),completedInternalClearingId:t.number(),interchangeFeeAmount:t.number()}),ce=t.enum(["COMPLETED","REJECTED","PENDING"]),Ra=t.object({startDate:t.string().optional(),endDate:t.string().optional(),dateFormat:t.string().optional(),offset:t.number().optional(),limit:t.number().optional(),status:ce.optional(),internalClearingId:t.string().optional(),orderBy:t.string().optional(),sortOrder:t.enum(["asc","desc"]).optional(),isCardSettlementOnly:t.boolean().optional()}),xa=t.object({totalFilteredRecords:t.number(),pageItems:t.array(ie)}),Aa=t.object({settlementId:t.number()}),de=t.object({id:t.number(),lastDigits:t.string(),expiryDate:t.string(),network:t.string(),pushEnabled:t.boolean(),pullEnabled:t.boolean(),isRegulated:t.boolean(),avsVerified:t.boolean(),pushFundAvailability:t.string(),countryCode:t.string(),currencyCode:t.string(),cardType:t.string(),fullName:t.string(),referenceId:t.string(),externalId:t.string(),deleted:t.boolean(),status:t.string(),financialInstitution:t.string(),createdAt:t.string(),updatedAt:t.string()}),Sa=t.array(de);import ue from"axios";import{v4 as me}from"uuid";import*as L from"https";var pe=e=>e&&(e.startsWith("Bearer ")?e:`Bearer ${e}`),c=async e=>{let o=()=>`RequestUUID=${me()}`,s=ue.create({timeout:e.axiosConfig?.timeout||29e3,baseURL:e.baseUrl,headers:{"Content-Type":"application/json; charset=utf-8","JWT-Token":e?.jwtToken||void 0,Authorization:e.bearerToken?pe(e.bearerToken):void 0,"trace-id":o(),tenantId:e.tenantId},httpsAgent:new L.Agent({rejectUnauthorized:!0,keepAlive:e.axiosConfig?.keepAlive})});return e.logger&&e.logger(s),s};var le=e=>{let n=`/v1/clients/${e}/cards`;return{input:{clientId:e},metadata:{commandName:"GetCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Ce=e=>{let n=`/v1/cards/${e}`;return{input:{cardId:e},metadata:{commandName:"GetCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},fe=e=>{let n=`/v1/cards/${e}/imageUrl`;return{input:{cardId:e},metadata:{commandName:"GetCardImageUrl",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},he=e=>{let n=new URLSearchParams;e.status&&n.append("status",e.status),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isActiveCardAuthorizations!==void 0&&n.append("isActiveCardAuthorizations",e.isActiveCardAuthorizations.toString());let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizations",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},ye=e=>{let n="/v1/cards";return{input:{params:e},metadata:{commandName:"CreateCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},ge=(e,n)=>{let o=`/v1/cards/${e}?command=CHANGE_TYPE`;return{input:{cardId:e,params:n},metadata:{commandName:"ChangeCardType",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},be=e=>{let n=`/v1/cards/${e}?command=ACTIVATE_PHYSICAL`;return{input:{cardId:e},metadata:{commandName:"ActivatePhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){d(r)}}}},Re=e=>{let n=`/v1/cards/${e}?command=FULFILL`;return{input:{cardId:e},metadata:{commandName:"OrderPhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){d(r)}}}},xe=e=>{let n=`/v1/cards/${e}?command=REQUEST_CHANGE_PIN_URL`;return{input:{cardId:e},metadata:{commandName:"SetPIN",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n)).data}catch(r){d(r)}}}},Ae=(e,n)=>{let o=`/v1/cards/${e}/provision`;return{input:{cardId:e,params:n},metadata:{commandName:"AddCardToMobileWallet",path:o,method:"POST"},execute:async s=>{P.parse(n);let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},Se=(e,n)=>{let o=`/v1/cards/${e}`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardFeature",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}},Ie=(e,n)=>{let o=`/v1/cards/${e}/velocityrules`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardLimit",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}},ve=e=>{let n=new URLSearchParams;e.associations&&n.append("associations",e.associations);let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization/${e.authorizationId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizationById",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},De=e=>{let n=new URLSearchParams;e.startDate&&n.append("startDate",e.startDate),e.endDate&&n.append("endDate",e.endDate),e.dateFormat&&n.append("dateFormat",e.dateFormat),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.status&&n.append("status",e.status),e.internalClearingId&&n.append("internalClearingId",e.internalClearingId),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isCardSettlementOnly!==void 0&&n.append("isCardSettlementOnly",e.isCardSettlementOnly.toString());let o=n.toString(),s=`/v1/cardSettlements${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardSettlements",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},Te=e=>{let n=`/v1/cardSettlements/${e.settlementId}`;return{input:{params:e},metadata:{commandName:"GetCardSettlementById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},R=(e,n)=>{let o=`/v1/cards/${e}?command=${n}`;return{input:{cardId:e,command:n},metadata:{commandName:"UpdateCardStatus",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){d(i)}}}},qe=e=>R(e,"TERMINATE"),we=e=>R(e,"SUSPEND"),Pe=e=>R(e,"ACTIVATE");var Ge=(e,n)=>{let o=`/v1/cards/${e}?command=REPLACE`;return{input:{cardId:e,reason:n},metadata:{commandName:"ReplaceCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{replaceReason:n})).data}catch(i){d(i)}}}},Ee=(e,n)=>{let o=`/v1/cards/${e}?command=RENEW`;return{input:{cardId:e,productId:n},metadata:{commandName:"RenewCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{productId:n})).data}catch(i){d(i)}}}};var Le=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards`;return{input:{primaryAccountId:e,params:n},metadata:{commandName:"CreatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},Ue=(e,n)=>{let o=new URLSearchParams;n&&o.append("status",n);let s=o.toString(),r=`/v1/savingsaccounts/${e}/prepaidcards${s?`?${s}`:""}`;return{input:{primaryAccountId:e,status:n},metadata:{commandName:"GetPrepaidCardsByAccountId",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){d(p)}}}},Ne=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"GetPrepaidCardById",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){d(i)}}}},Oe=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"DeactivatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){d(i)}}}};import m from"zod";var $e={documentTypeId:m.string(),documentKey:m.string(),status:m.string(),description:m.string().optional(),issuedBy:m.string().optional(),locale:m.string().optional(),dateFormat:m.string().optional(),expiryDate:m.string().optional(),nationality:m.number().optional(),issuedDate:m.string().optional()},ke=m.object($e).catchall(m.any()),Be={id:m.number(),officeId:m.number(),clientId:m.number(),resourceId:m.number(),changes:m.record(m.string(),m.any()),isScheduledTransfer:m.boolean(),isSkipNotification:m.boolean()},ze={id:m.number(),clientId:m.number(),documentType:m.object({id:m.number(),name:m.string(),isMasked:m.boolean().optional()}),documentKey:m.union([m.string(),m.number()]),status:m.string(),description:m.string().optional(),issuedBy:m.string().optional(),expiryDate:m.union([m.string(),m.array(m.number())]).optional(),nationality:m.object({id:m.number(),name:m.string()}).optional(),issuedDate:m.string().optional(),documentStatus:m.string().optional()},oo=m.object(Be).catchall(m.any()),Fe=m.object(ze).catchall(m.any()),ro=m.array(Fe),x=e=>ke.parse(e);var je=m.object({name:m.string(),file:m.union([m.instanceof(Buffer),m.instanceof(Blob),m.instanceof(File)]),type:m.string().optional(),description:m.string().optional()}),so=m.object({id:m.string(),resourceIdentifier:m.string(),uuid:m.string()}),U=e=>je.parse(e),io=m.object({officeId:m.number(),clientId:m.number(),resourceId:m.number()}),co=m.object({clientId:m.number(),resourceId:m.number()});var _e=e=>{let n=`/v1/clients/${e}/identifiers/template`;return{input:{clientId:e},metadata:{commandName:"GetPermittedDocumentTypes",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Ve=e=>{let n=new URLSearchParams;e.unmaskValue!==void 0&&n.append("unmaskValue",e.unmaskValue.toString()),e.fields&&n.append("fields",e.fields);let o=n.toString(),s=`/v1/clients/${e.clientId}/identifiers${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"ListClientDocument",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},Me=(e,n)=>{x(n);let o=`/v1/clients/${e}/identifiers`;return{input:{clientId:e,input:n},metadata:{commandName:"CreateClientIdentifier",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},We=(e,n,o)=>{x(o);let s=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n,updates:o},metadata:{commandName:"UpdateClientIdentifier",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o})).data}catch(u){d(u)}}}},Ke=(e,n,o)=>{U(o);let s=`/v1/client_identifiers/${n}/documents`;return{input:{clientId:e,identifierId:n,data:o},metadata:{commandName:"UploadClientIdentifierDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r),{name:u,file:p,type:l,description:C}=o,f=new FormData;f.append("name",u),C&&f.append("description",C),l&&f.append("type",l);let y,g;p instanceof File?(y=p,g=p.name):p instanceof Blob?(y=p,g=u):(y=new Blob([p],{type:"application/octet-stream"}),g=u),f.append("file",y,g);try{return(await i.post(s,f,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(I){d(I)}}}},Qe=(e,n)=>{let o=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n},metadata:{commandName:"DeleteClientDocument",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){d(i)}}}},He=(e,n,o)=>{let s=`/v1/clients/${e}/identifiers/${n}?command=${o}`;return{input:{clientId:e,identifierId:n,command:o},metadata:{commandName:"ApproveRejectClientDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s)).data}catch(u){d(u)}}}};import a from"zod";var N=a.object({id:a.number(),code:a.string(),value:a.string()}),O=a.object({id:a.number(),code:a.string(),value:a.string()}),$=a.object({active:a.boolean(),mandatory:a.boolean(),systemDefined:a.boolean()}),k=a.object({id:a.number()}),B=a.object({id:a.number(),name:a.string().optional()}),z=a.object({active:a.boolean()}),F=a.object({submittedOnDate:a.array(a.number()),submittedByUsername:a.string().optional(),submittedByFirstname:a.string().optional(),submittedByLastname:a.string().optional(),activatedOnDate:a.array(a.number()).optional(),activatedByUsername:a.string().optional(),activatedByFirstname:a.string().optional(),activatedByLastname:a.string().optional()}),Ye=a.object({}).catchall(a.any()),Je=a.object({}).catchall(a.any()),Ze=a.object({}).catchall(a.any()),j=a.object({constitution:Ye,mainBusinessLine:Je,countryOfIncorporation:Ze}).catchall(a.any()),_=a.object({isExternalCardDebitDisable:a.boolean(),isExternalCardCreditDisable:a.boolean(),isAchDebitOutgoingDisable:a.boolean(),isAchCreditOutgoingDisable:a.boolean(),isAchDebitIncomingDisable:a.boolean(),isAchCreditIncomingDisable:a.boolean(),isInternalCreditDisable:a.boolean(),isInternalDebitDisable:a.boolean(),isWireCreditOutgoingDisable:a.boolean(),isWireCreditIncomingDisable:a.boolean(),isSwiftCreditOutgoingDisable:a.boolean(),isSwiftCreditIncomingDisable:a.boolean(),isFxpayCreditOutgoingDisable:a.boolean(),isAllocateToSubAccountDisable:a.boolean(),isInternalCreditOwnDisable:a.boolean(),type:a.string(),resourceId:a.number(),id:a.number()}).catchall(a.any()),V=a.object({}).catchall(a.any()),M=a.object({id:a.number(),accountNo:a.string(),status:O,subStatus:$,active:a.boolean(),activationDate:a.array(a.number()).optional(),firstname:a.string(),lastname:a.string(),displayName:a.string(),mobileNo:a.string(),emailAddress:a.string(),dateOfBirth:a.array(a.number()),gender:k,clientTypes:a.array(a.any()),clientClassification:B,occupation:z,isStaff:a.boolean(),skipAvs:a.boolean(),officeId:a.number(),officeName:a.string(),imageId:a.string().optional(),imagePresent:a.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:a.string(),updatedAt:a.string(),isBlockExternalCardsAddition:a.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:a.array(a.number()).optional(),mobileCountryCode:a.string(),clientKycStatus:V,ofLoanCycle:a.number(),ofLoanActive:a.number(),activeDepositAccount:a.number(),onBoardingStatus:a.string().optional()}).catchall(a.any()),Xe=a.object({riskScore:a.number(),rating:a.string()}).catchall(a.any()),et=a.object({street:a.string(),city:a.string(),state:a.string(),zipCode:a.string()}).catchall(a.any()),tt=a.object({type:a.string(),value:a.string()}).catchall(a.any()),nt={firstname:a.string(),middlename:a.string().optional(),lastname:a.string(),fullname:a.string().optional(),dob:a.string(),genderId:a.number(),locale:a.string(),officeId:a.number(),mobileCountryCode:a.string(),mobileNo:a.string(),emailAddress:a.string().email(),legalFormId:a.number(),externalId:a.string().optional(),isOptedForMLALStatus:a.boolean().optional(),currentMLALStatus:a.string().optional(),isStaff:a.boolean().optional(),staffId:a.number().optional(),clientClassificationId:a.number().optional(),savingsProductId:a.number().optional(),active:a.boolean().optional(),dateFormat:a.string(),activationDate:a.string().optional(),submittedOnDate:a.string(),dateOfBirth:a.string()},Io=a.object(nt).catchall(a.any()),at={clientId:a.number(),status:a.string()},vo=a.object(at).catchall(a.any()),ot={firstname:a.string().optional(),middlename:a.string().optional(),fullname:a.string().optional(),genderId:a.number().optional(),lastname:a.string().optional(),occupationId:a.number().optional(),mobileCountryCode:a.string().optional(),mobileNo:a.string().optional(),emailAddress:a.string().email().optional(),externalId:a.string().optional(),clientClassificationId:a.number().optional(),dateOfBirth:a.string().optional(),dateFormat:a.string().optional()},Do=a.object(ot).catchall(a.any()),rt={documentTypeId:a.string(),documentKey:a.string(),status:a.string(),description:a.string().optional(),issuedBy:a.string().optional(),locale:a.string().optional(),dateFormat:a.string().optional(),expiryDate:a.string().optional(),nationality:a.number().optional(),issuedDate:a.string().optional()},To=a.object(rt).catchall(a.any()),st={id:a.number(),officeId:a.number(),clientId:a.number(),resourceId:a.number(),changes:a.record(a.string(),a.any()),isScheduledTransfer:a.boolean(),isSkipNotification:a.boolean()},qo=a.object(st).catchall(a.any()),it={developerMessage:a.string(),defaultUserMessage:a.string(),userMessageGlobalisationCode:a.string(),parameterName:a.string().optional(),value:a.any().nullable(),args:a.array(a.object({value:a.any()})).optional()},ct=a.object(it),dt={developerMessage:a.string(),httpStatusCode:a.string(),defaultUserMessage:a.string(),userMessageGlobalisationCode:a.string(),errors:a.array(ct).optional()},wo=a.object(dt).catchall(a.any()),ut={tenantId:a.string().optional(),offset:a.number().optional(),limit:a.number().optional(),orderBy:a.string().optional(),sortOrder:a.string().optional(),officeId:a.number().optional(),displayName:a.string().optional(),firstname:a.string().optional(),lastname:a.string().optional(),externalId:a.string().optional(),orphansOnly:a.boolean().optional(),clientStatus:a.string().optional(),mobileNo:a.string().optional(),createdStartDate:a.string().optional(),creationEndDate:a.string().optional(),activatedStartDate:a.string().optional(),activatedEndDate:a.string().optional(),closedStartDate:a.string().optional(),closedEndDate:a.string().optional()},Po=a.object(ut),Go={id:a.number(),accountNo:a.string(),status:O,subStatus:$,active:a.boolean(),activationDate:a.array(a.number()).optional(),firstname:a.string(),lastname:a.string(),displayName:a.string(),mobileNo:a.string(),emailAddress:a.string(),dateOfBirth:a.array(a.number()),gender:k,clientTypes:a.array(a.any()),clientClassification:B,occupation:z,isStaff:a.boolean(),skipAvs:a.boolean(),officeId:a.number(),officeName:a.string(),imageId:a.string().optional(),imagePresent:a.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:a.string(),updatedAt:a.string(),isBlockExternalCardsAddition:a.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:a.array(a.number()).optional(),mobileCountryCode:a.string(),clientKycStatus:V,ofLoanCycle:a.number(),ofLoanActive:a.number(),activeDepositAccount:a.number(),onBoardingStatus:a.string().optional()},mt={totalFilteredRecords:a.number(),pageItems:a.array(M)},Eo=a.object(mt).catchall(a.any()),pt={clientData:M.optional(),riskRatingData:Xe.optional(),clientAddressData:et.optional(),clientIdentifierData:tt.optional()},Lo=a.object(pt);var Uo=a.enum(["offset","limit","orderBy","sortOrder","officeId","displayName","firstname","lastname","externalId","orphansOnly","clientStatus","mobileNo","createdStartDate","creationEndDate","activatedStartDate","activatedEndDate","closedStartDate","closedEndDate"]),No=a.enum(["displayName","accountNo","officeId","officeName"]),Oo=a.enum(["ASC","DESC"]),$o=a.enum(["ACTIVE","PENDING","INACTIVE"]);var ko=a.object({clientId:a.string(),kycVerificationType:a.enum(["FULL","PARTIAL"]).default("FULL").optional(),note:a.string().optional(),locale:a.string().default("en").optional(),dateFormat:a.string().default("dd MMMM yyyy").optional(),activationDate:a.string().optional(),isActivatedByManualReview:a.boolean().default(!1).optional(),manualReviewActivationComments:a.string().optional(),skipVerify:a.boolean().default(!1),skipActivate:a.boolean().default(!1),autoActivate:a.boolean().default(!0)}).refine(e=>!(e.skipVerify&&e.skipActivate),{message:"Cannot skip both verification and activation - at least one action must be performed",path:["skipVerify","skipActivate"]}).refine(e=>!(!e.skipVerify&&!e.kycVerificationType),{message:"kycVerificationType is required when skipVerify is false",path:["kycVerificationType"]}).refine(e=>!(!e.skipActivate&&!e.locale),{message:"locale is required when skipActivate is false",path:["locale"]}).refine(e=>!(!e.skipActivate&&!e.dateFormat),{message:"dateFormat is required when skipActivate is false",path:["dateFormat"]}).refine(e=>!(!e.skipActivate&&!e.activationDate),{message:"activationDate is required when skipActivate is false",path:["activationDate"]}),Bo=a.object({id:a.number(),clientId:a.number(),officeId:a.number(),resourceId:a.number(),data:a.object({clientVerificationStatus:a.enum(["PENDING","IN_PROGRESS","APPROVED","REJECTED"]),clientKycStatus:a.string()})}),lt=a.object({id:a.number(),name:a.string(),isMasked:a.boolean()}),Ct=a.object({id:a.number(),value:a.string()}),ft=a.object({id:a.number(),clientId:a.number(),documentType:lt,documentKey:a.string(),issuedDate:a.array(a.number()).optional(),expiryDate:a.array(a.number()).optional(),description:a.string().optional(),status:a.string(),issuedBy:a.string().optional(),verificationStatus:Ct.optional()}),ht=a.object({id:a.number(),value:a.string()}),zo=a.object({id:a.number(),accountNo:a.union([a.string(),a.number()]),displayName:a.string(),legalForm:a.object({code:a.string(),value:a.number()}),verificationStatus:ht,identifiers:a.array(ft).optional(),ofLoanCycle:a.number(),mobileCountryCode:a.string(),ofLoanActive:a.number(),activeDepositAccount:a.number()}).catchall(a.any()),Fo=a.object({closureReasonId:a.string(),locale:a.string().optional(),closerDate:a.string(),dateFormat:a.string()}).refine(e=>!(e.closerDate==null&&e.dateFormat===void 0)),jo=a.object({id:a.number(),clientId:a.number(),resourceId:a.number()});var yt=e=>{let n=new URLSearchParams;e.staffInSelectedOfficeOnly&&n.append("staffInSelectedOfficeOnly","true"),e.checkIdentitiesExpiration&&n.append("checkIdentitiesExpiration","true"),e.clientAccountAssociate&&n.append("clientAccountAssociate","true");let o=n.toString(),s=`/v1/clients/${e.clientId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetClient",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{let u={},p=await i.get(s);if(u.clientData=p,e.riskRating){let l=await i.get(`/v1/clients/${e.clientId}/riskrating`);u.riskRatingData=l}if(e.clientAddress){let l=await i.get(`/v1/client/${e.clientId}/addresses`);u.clientAddressData=l}if(e.clientIdentifier){let l=await i.get(`/v1/clients/${e.clientId}/identifiers?unmaskValue=true`);u.clientIdentifierData=l}return u}catch(u){d(u)}}}},gt=(e,n)=>{let o=`/v1/clients/${e}`;return{input:{clientId:e,updates:n},metadata:{commandName:"UpdateClient",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,{...n})).data}catch(i){d(i)}}}},bt=e=>{let n="/v1/clients";return{input:{clientData:e},metadata:{commandName:"CreateClient",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},Rt=e=>{let n="/v1/clients";return{input:{params:e},metadata:{commandName:"GetClients",path:n,method:"GET"},execute:async o=>{let s=await c(o),r=[],i=e.limit||200,u=e.offset||0,p=0,l={...e,limit:i,offset:u};try{if(e.limit===0){do{let C=await s.get(n,{params:l}),{totalFilteredRecords:f,pageItems:y}=C.data;r.push(...y),p=f,u+=i}while(u<p);return{totalFilteredRecords:p,pageItems:r}}else return(await s.get(n,{params:l})).data}catch(C){d(C)}}}},xt=e=>{let n=`/v1/clients/${e}`;return{input:{clientId:e},metadata:{commandName:"DeleteClient",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){d(r)}}}},At=e=>{let n=`/v1/clients/${e.clientId}`;return{input:{param:e},metadata:{commandName:"VerifyWithActivateClients",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{let r;if(!e.skipVerify){let i={kycVerificationType:e.kycVerificationType,note:e.note};r=await s.post(n,i)}if(!e.skipActivate&&(r&&r.data.data.clientKycStatus==="APPROVED"&&e.autoActivate||!r)){let i={locale:e.locale,dateFormat:e.dateFormat,activationDate:e.activationDate,isActivatedByManualReview:e.isActivatedByManualReview,manualReviewActivationComments:e.manualReviewActivationComments},u=await s.post(n,i),p=u.data;return r&&(p={...u.data,data:{...r.data.data}}),p}if(!r)throw h({message:"Verification was skipped but no alternative action was taken",code:"VERIFICATION_SKIPPED"});return r.data}catch(r){d(r)}}}},St=e=>{let n=`/v1/clients/${e}/verificationstatus`;return{input:{clientId:e},metadata:{commandName:"GetStatusOfVerifyClient",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}};import dr from"axios";import It from"moment-timezone";var W=(e=new Date,n=!1,o=process.env.TIMEZONE??"Europe/Berlin")=>It(e.getTime()).tz(o).utc(!n);var vt=e=>{let n="/v1/transfers";return{input:{transfer:e},metadata:{commandName:"CreateTransfer",path:n,method:"POST"},execute:async o=>{v.parse(e);let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},Dt=e=>{let n=`/v1/transfers/${e}`;return{input:{id:e},metadata:{commandName:"GetTransfer",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Tt=e=>{let n="/v1/transfers",o={paymentType:e.paymentType||"ACH",status:e.transferStatus||"EXECUTION_SCHEDULED",toExecuteDate:e.executedAt||W().toISOString(!0).slice(0,10),locale:"en",dateFormat:"yyyy-MM-dd",associateClientData:!0,originatedBy:"us",accountType:e.accountType};return{input:{params:e},metadata:{commandName:"GetTransfers",path:n,method:"GET"},execute:async s=>{let r=await c(s),i=[],u=e.queryLimit||200,p=0,l=0,C={...o,limit:u,offset:p};try{do{let f=await r.get(n,{params:C}),{totalFilteredRecords:y,pageItems:g}=f.data;i.push(...g),l=y,p+=u}while(p<l);return i}catch(f){d(f)}}}};import{z as K}from"zod";var qt=e=>{let n="/v1/payments";return{input:{payment:e},metadata:{commandName:"CreatePayment",path:n,method:"POST"},execute:async o=>{try{D(e)}catch(r){throw r instanceof K.ZodError?h({message:`Invalid payment data: ${r.errors.map(i=>i.message).join(", ")}`,code:"invalid_payment_input"}):r}let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},wt=e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"GetPayment",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Pt=(e,n)=>{let o=`/v1/payments/${e}`;return{input:{id:e,payment:n},metadata:{commandName:"UpdatePayment",path:o,method:"PUT"},execute:async s=>{try{T(n)}catch(i){throw i instanceof K.ZodError?h({message:`Invalid payment update data: ${i.errors.map(u=>u.message).join(", ")}`,code:"invalid_payment_update_input"}):i}let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}},Gt=e=>{let n="/v1/payments";return{input:{params:e},metadata:{commandName:"GetPayments",path:n,method:"GET"},execute:async o=>{let s=await c(o),r={locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC",limit:20,offset:0},i=u=>{let l=["fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","fromReturnDate","toReturnDate"].some(f=>u[f]!==void 0),C={...u};return l&&C.dateFormat===void 0&&(C.dateFormat="yyyy-MM-dd"),C};try{let u=i(e),p={...r,...u,limit:u.limit!==void 0&&u.limit!==0?u.limit:20,offset:u.offset!==void 0?u.offset:0};return(await s.get(n,{params:p})).data}catch(u){d(u)}}}},Et=e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"DeletePayment",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{await s.delete(n)}catch(r){d(r)}}}};var Lt=e=>({input:{accountId:e},metadata:{commandName:"GetAccount",path:`/v1/savingsaccounts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsaccounts/${e}`)).data}catch(s){d(s)}}}),Ut=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"UpdateAccount",path:`/v1/savingsaccounts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsaccounts/${e}`,n)).data}catch(r){d(r)}}}),Nt=e=>({input:{accountId:e},metadata:{commandName:"DeleteAccount",path:`/v1/savingsaccounts/${e}`,method:"DELETE"},execute:async n=>{let o=await c(n);try{return(await o.delete(`/v1/savingsaccounts/${e}`)).data}catch(s){d(s)}}}),Ot=(e,n)=>({input:{clientId:e,params:n},metadata:{commandName:"ListAccountsOfClient",path:`/v1/clients/${e}/accounts`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/clients/${e}/accounts`,{params:n})).data}catch(r){d(r)}}}),$t=e=>({input:{params:e},metadata:{commandName:"CreateAndActivateAccount",path:"/v1/savingsaccounts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsaccounts?command=submit,approve,activate",e)).data}catch(s){d(s)}}}),kt=(e,n)=>({input:{savingsAccountId:e,requestData:n},metadata:{commandName:"CloseAccount",path:`/v1/savingsaccounts/${e}?command=close`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=close`,n)).data}catch(r){d(r)}}}),Bt=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"ScheduleAccountClosure",path:`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,n)).data}catch(r){d(r)}}}),zt=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"BlockAccount",path:`/v1/savingsaccounts/${e}?command=block`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=block`,n)).data}catch(r){d(r)}}}),Ft=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"HoldAmount",path:`/v1/savingsaccounts/${e}?command=hold`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=hold`,n)).data}catch(r){d(r)}}});var jt=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetPendingTransactions",path:`/v1/savingsaccounts/${e}/pendingTransaction`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/pendingTransaction`,{params:n})).data}catch(r){d(r)}}}),_t=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetCompletedTransactions",path:`/v1/savingsaccounts/${e}/transactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/transactions`,{params:n})).data}catch(r){d(r)}}}),Vt=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetRecentTransactions",path:`/v1/savingsaccounts/${e}/unifiedtransactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/unifiedtransactions`,{params:n})).data}catch(r){d(r)}}}),Mt=(e,n,o)=>({input:{savingsAccountId:e,transactionId:n,params:o},metadata:{commandName:"GetTransactionById",path:`/v1/savingsaccounts/${e}/transactions/${n}`,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(`/v1/savingsaccounts/${e}/transactions/${n}`,{params:o})).data}catch(i){d(i)}}}),Wt=(e,n)=>({input:{routingNumber:e,params:n},metadata:{commandName:"GetBankDetailsFromRoutingCode",path:`/v1/bankdetails/routing/${e}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/bankdetails/routing/${e}`,{params:n})).data}catch(r){d(r)}}});var Kt=e=>({input:{params:e},metadata:{commandName:"CreateAccountProduct",path:"/v1/savingsproducts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsproducts",e)).data}catch(s){d(s)}}}),Qt=(e,n)=>({input:{productId:e,params:n},metadata:{commandName:"UpdateAccountProduct",path:`/v1/savingsproducts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsproducts/${e}`,n)).data}catch(r){d(r)}}}),Ht=()=>({input:{},metadata:{commandName:"GetAllAccountProducts",path:"/v1/savingsproducts",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/savingsproducts")).data}catch(o){d(o)}}}),Yt=e=>({input:{productId:e},metadata:{commandName:"GetAccountProductById",path:`/v1/savingsproducts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsproducts/${e}`)).data}catch(s){d(s)}}});var Jt=e=>({input:{requestData:e},metadata:{commandName:"GenerateAccountStatement",path:"/v1/generatestatements",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/generatestatements",e)).data}catch(s){d(s)}}}),Zt=(e,n)=>({input:{savingsAccountId:e,documentId:n},metadata:{commandName:"DownloadAccountStatement",path:`/v1/savings/${e}/documents/${n}/attachment`,method:"GET"},execute:async o=>{let s=await c(o);try{let r=await s.get(`/v1/savings/${e}/documents/${n}/attachment`,{responseType:"blob"}),i=r.headers["content-disposition"],u;if(i){let l=i.match(/filename="?(.+?)"?$/i);l&&(u=l[1])}let p=r.headers["content-type"];return{data:r.data,fileName:u,contentType:p}}catch(r){d(r)}}}),Xt=(e,n)=>({input:{savingsAccountId:e,queryParams:n},metadata:{commandName:"GetAccountDocumentsDetails",path:`/v1/savings/${e}/documents`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savings/${e}/documents`,{params:n})).data}catch(r){d(r)}}});import{print as nn}from"graphql";var en=`
1
+ import{G as D,H as T,p as v}from"../chunk-AKKSZ4BX.mjs";import{a as h,c as d}from"../chunk-2PLZ534I.mjs";import{z as t}from"zod";var b=t.object({id:t.number(),controls:t.array(t.string()),type:t.string(),value:t.number(),timePeriod:t.number(),timeUnit:t.string(),territorialLimits:t.array(t.any()),category:t.string().optional(),categoryId:t.number().optional(),version:t.number().optional()}),q=t.object({id:t.number(),username:t.string(),officeId:t.number(),officeName:t.string(),firstname:t.string(),lastname:t.string(),email:t.string(),isEmailVerified:t.boolean(),isSelfServiceUser:t.boolean()}),Q=t.object({date:t.array(t.number()),time:t.object({hour:t.number(),minute:t.number(),second:t.number(),nano:t.number()})}),H=t.object({id:t.number(),accountId:t.number(),productId:t.number(),virtual:t.boolean(),productName:t.string(),network:t.string(),cardType:t.string(),digitalFirst:t.boolean(),cardProcessorName:t.string(),token:t.string(),embossedNames:t.array(t.string()),primaryAccountNumber:t.string(),expiresOn:t.array(t.number()),status:t.string(),fulfillmentStatus:t.string(),onlinePaymentEnabled:t.boolean(),posPaymentEnabled:t.boolean(),physicalCardActivated:t.boolean(),contactlessPaymentEnabled:t.boolean(),atmWithdrawalsEnabled:t.boolean(),internationalPaymentsEnabled:t.boolean(),velocityRules:t.array(b),registeredOn:t.array(t.number()),activatedAt:Q.optional(),updatedStatusBy:q.optional(),updatedStatusAt:t.string().optional(),bid:t.number(),replacedDamageCount:t.number(),user:q.optional(),businessCardIDEnabled:t.boolean(),mergedVelocityRules:t.array(b),maximumAllowedVelocityRules:t.array(b),cardNumber:t.number(),printAccountNickname:t.boolean()}),ca=t.array(H),da=t.object({productId:t.number(),savingsAccountId:t.number().optional(),userId:t.number().optional(),savingsProductId:t.number().optional(),clientId:t.number()}).refine(e=>{let n=e.savingsAccountId!==void 0,o=e.savingsProductId!==void 0;return!(n&&o||!n&&!o||o&&e.clientId===void 0)}),ua=t.object({productId:t.number(),creditAccountId:t.number(),userId:t.number().optional()}),ma=t.object({id:t.number(),cardToken:t.string(),clientId:t.number(),resourceId:t.number(),resourceIdentifier:t.string(),data:t.object({shippingAddressId:t.number()})}),w=t.object({walletProvider:t.enum(["APPLE_PAY","GOOGLE_PAY"]),certificate1:t.string().optional(),certificate2:t.string().optional(),nonce:t.string().optional(),deviceID:t.string().optional(),walletAccountID:t.string().optional()}).refine(e=>e.walletProvider==="GOOGLE_PAY"?e.deviceID!==void 0&&e.walletAccountID!==void 0&&e.certificate1===void 0&&e.certificate2===void 0&&e.nonce===void 0:e.walletProvider==="APPLE_PAY"?e.certificate1!==void 0&&e.certificate2!==void 0&&e.nonce!==void 0&&e.deviceID===void 0&&e.walletAccountID===void 0:!0,{message:"Invalid combination of parameters for the selected wallet provider"}),pa=t.object({id:t.number(),clientId:t.number(),resourceId:t.number(),data:t.object({activationData:t.string(),encryptedCardData:t.string(),ephemeralPublicKey:t.string()})}),la=t.object({posPaymentEnabled:t.boolean().optional(),onlinePaymentEnabled:t.boolean().optional(),atmWithdrawalsEnabled:t.boolean().optional(),internationalPaymentsEnabled:t.boolean().optional(),blockedCountries:t.array(t.string()).optional()}),Ca=t.object({resourceId:t.number(),clientId:t.number(),id:t.number(),changes:t.object({posPaymentEnabled:t.boolean(),onlinePaymentEnabled:t.boolean(),contactlessPaymentEnabled:t.boolean(),atmWithdrawalsEnabled:t.boolean(),internationalPaymentsEnabled:t.boolean(),blockedCountries:t.array(t.string())})}),P=t.object({single:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional(),daily:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional(),weekly:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional(),monthly:t.object({transactionAmount:t.number(),numberOfTransactions:t.number()}).optional()}),fa=t.object({purchase:t.array(P).optional(),atm:t.array(P).optional()}),ha=t.object({resourceId:t.number(),clientId:t.number(),id:t.number(),changes:t.object({velocityRules:t.array(t.object({controls:t.array(t.string()),type:t.string(),value:t.number(),timePeriod:t.number(),timeUnit:t.string()}))})}),Y=t.object({mcc:t.string(),merchantId:t.string(),description:t.string(),postalcode:t.string(),country:t.string()}),J=t.object({aav:t.string(),arqc:t.string(),avsResult:t.string(),cvv1:t.string(),cvv2:t.string(),cvv3:t.string(),offlinePin:t.string(),pin:t.string()}),Z=t.object({entryType:t.string(),cardHolderPresent:t.string(),recurring:t.string(),validationResults:J}),X=t.object({zip:t.string(),address:t.string()}),G=t.object({id:t.number(),internalId:t.string(),externalAuthId:t.string(),externalOriginalAuthId:t.string(),authType:t.string(),transactionType:t.string(),currency:t.string(),amount:t.number(),returnBalance:t.boolean(),merchant:Y,expiryDate:t.array(t.number()),executionCode:t.string(),executionMessage:t.string(),status:t.string(),createdAt:t.string(),clearedAmount:t.number(),international:t.boolean(),incremental:t.boolean(),transaction:Z,flag:t.string(),avsData:X,settledAmount:t.number(),availableBalance:t.number(),accountBalance:t.number(),errorDetails:t.record(t.array(t.string())).optional()}),ee=t.enum(["ALL","ACTIVE","COMPLETED","REJECTED","EXPIRED","RELEASED","REVERSED"]),ya=t.object({cardToken:t.string(),status:ee.optional(),offset:t.number().optional(),limit:t.number().optional(),orderBy:t.string().optional(),sortOrder:t.enum(["asc","desc"]).optional(),isActiveCardAuthorizations:t.boolean().optional()}),ga=t.object({totalFilteredRecords:t.number(),pageItems:t.array(G)}),te=t.enum(["notes","media"]),ba=t.object({cardToken:t.string(),authorizationId:t.number(),associations:te.optional()}),ne=t.object({cashBackAmount:t.number(),exchangeRate:t.number(),feeAmount:t.number(),localCurrency:t.string(),localCurrencyAmount:t.number(),localSurchargeAmt:t.number()}),ae=t.object({accountToken:t.string(),cardToken:t.string()}),oe=t.object({id:t.number(),accountId:t.number(),productId:t.number(),virtual:t.boolean(),network:t.string(),cardType:t.string(),digitalFirst:t.boolean(),token:t.string(),embossedNames:t.array(t.string()),primaryAccountNumber:t.string(),expiresOn:t.array(t.number()),status:t.string(),fulfillmentStatus:t.string(),onlinePaymentEnabled:t.boolean(),posPaymentEnabled:t.boolean(),physicalCardActivated:t.boolean(),contactlessPaymentEnabled:t.boolean(),atmWithdrawalsEnabled:t.boolean(),internationalPaymentsEnabled:t.boolean(),registeredOn:t.array(t.number()),activatedAt:t.object({date:t.array(t.number()),time:t.object({hour:t.number(),minute:t.number(),second:t.number(),nano:t.number()})}).optional(),businessCardIDEnabled:t.boolean()}),E=t.object({is_emv:t.boolean()}),re=t.object({id:t.string(),emv:E,mcc:t.number(),mti:t.string(),account:t.object({cad:t.number(),pan:t.string(),prn:t.string(),xid:t.number(),card_status:t.string(),account_status:t.string(),expiration_date:t.string(),merchant_supplied_expiration_date:t.string()}),amounts:t.object({currency:t.string(),fee_amount:t.string(),trans_amount:t.string(),amt_til_limit:t.string(),exchange_rate:t.string(),local_currency:t.string(),available_funds:t.string(),cashback_amount:t.string(),upcharge_amount:t.string(),billing_currency:t.string(),local_currency_amount:t.string(),billing_currency_amount:t.string()}),auth_id:t.string(),network:t.string(),version:t.string(),avs_data:t.object({zip:t.string(),address:t.string()}),merchant:t.object({acquirer_id:t.string(),merchant_id:t.string(),terminal_id:t.string(),merchant_state:t.string(),merchant_country:t.string(),merchant_description:t.string(),merchant_postal_code:t.string()}),auth_type:t.string(),ecommerce:t.object({raw_eci:t.string(),is_ecommerce:t.boolean(),merchant_asserts_authenticated:t.boolean(),merchant_asserts_data_protection:t.boolean(),merchant_asserts_authentication_attempted:t.boolean()}),risk_code:t.string(),timestamp:t.string(),entry_type:t.string(),risk_score:t.string(),subnetwork:t.string(),original_id:t.string(),transaction:t.object({recurring:t.string(),cardholder_present:t.string(),transaction_initiator_code:t.string()}),international:t.boolean(),response_code:t.string(),transaction_type:t.string(),partial_supported:t.boolean(),validation_results:t.object({aav:t.string(),pin:t.string(),arqc:t.string(),cvv1:t.string(),cvv2:t.string(),cvv3:t.string(),avs_result:t.string(),offline_pin:t.string()}),digital_payment_data:t.record(t.any()),pin_entry_capability:t.string(),response_code_objects:t.record(t.array(t.string())),eligible_for_balance_return:t.boolean()}),Ra=G.extend({externalCardId:t.string().optional(),gatewayToken:t.string().optional(),account:ae.optional(),amountDetails:ne.optional(),isEcommerce:t.boolean().optional(),releasedAt:t.string().optional(),card:oe.optional(),pinCapability:t.string().optional(),riskScore:t.string().optional(),emv:E.optional(),media:t.record(t.any()).optional(),rawAuthorizationDetails:re.optional(),network:t.string().optional()}),se=t.object({merchant_number:t.string(),merchantId:t.string(),merchant_location:t.string(),mcc:t.string(),description:t.string()}),ie=t.object({clientId:t.number(),firstName:t.string(),lastName:t.string(),accountNumber:t.string(),id:t.number(),type:t.string(),internalClearingId:t.string(),internalAuthId:t.string(),externalClearingId:t.string(),externalAuthId:t.string(),externalOriginalAuthId:t.string(),externalCardId:t.string(),cardToken:t.string(),merchant:se,amount:t.number(),network:t.string(),currency:t.string(),requestedAt:t.string(),createdAt:t.string(),status:t.string(),batchDate:t.string(),batchIdentifier:t.string(),mcSequenceNumber:t.number(),mcSequenceCount:t.number(),completedInternalClearingId:t.number(),interchangeFeeAmount:t.number()}),ce=t.enum(["COMPLETED","REJECTED","PENDING"]),xa=t.object({startDate:t.string().optional(),endDate:t.string().optional(),dateFormat:t.string().optional(),offset:t.number().optional(),limit:t.number().optional(),status:ce.optional(),internalClearingId:t.string().optional(),orderBy:t.string().optional(),sortOrder:t.enum(["asc","desc"]).optional(),isCardSettlementOnly:t.boolean().optional()}),Aa=t.object({totalFilteredRecords:t.number(),pageItems:t.array(ie)}),Sa=t.object({settlementId:t.number()}),de=t.object({id:t.number(),lastDigits:t.string(),expiryDate:t.string(),network:t.string(),pushEnabled:t.boolean(),pullEnabled:t.boolean(),isRegulated:t.boolean(),avsVerified:t.boolean(),pushFundAvailability:t.string(),countryCode:t.string(),currencyCode:t.string(),cardType:t.string(),fullName:t.string(),referenceId:t.string(),externalId:t.string(),deleted:t.boolean(),status:t.string(),financialInstitution:t.string(),createdAt:t.string(),updatedAt:t.string()}),Ia=t.array(de);import ue from"axios";import{v4 as me}from"uuid";import*as L from"https";var pe=e=>e&&(e.startsWith("Bearer ")?e:`Bearer ${e}`),c=async e=>{let o=()=>`RequestUUID=${me()}`,s=ue.create({timeout:e.axiosConfig?.timeout||29e3,baseURL:e.baseUrl,headers:{"Content-Type":"application/json; charset=utf-8","JWT-Token":e?.jwtToken||void 0,Authorization:e.bearerToken?pe(e.bearerToken):void 0,"trace-id":o(),tenantId:e.tenantId},httpsAgent:new L.Agent({rejectUnauthorized:!0,keepAlive:e.axiosConfig?.keepAlive})});return e.logger&&e.logger(s),s};var le=e=>{let n=`/v1/clients/${e}/cards`;return{input:{clientId:e},metadata:{commandName:"GetCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Ce=e=>{let n=`/v1/cards/${e}`;return{input:{cardId:e},metadata:{commandName:"GetCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},fe=e=>{let n=`/v1/cards/${e}/imageUrl`;return{input:{cardId:e},metadata:{commandName:"GetCardImageUrl",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},he=e=>{let n=new URLSearchParams;e.status&&n.append("status",e.status),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isActiveCardAuthorizations!==void 0&&n.append("isActiveCardAuthorizations",e.isActiveCardAuthorizations.toString());let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizations",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},ye=e=>{let n="/v1/cards";return{input:{params:e},metadata:{commandName:"CreateCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},ge=(e,n)=>{let o=`/v1/cards/${e}?command=CHANGE_TYPE`;return{input:{cardId:e,params:n},metadata:{commandName:"ChangeCardType",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},be=e=>{let n=`/v1/cards/${e}?command=ACTIVATE_PHYSICAL`;return{input:{cardId:e},metadata:{commandName:"ActivatePhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){d(r)}}}},Re=e=>{let n=`/v1/cards/${e}?command=FULFILL`;return{input:{cardId:e},metadata:{commandName:"OrderPhysicalCard",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n)).data}catch(r){d(r)}}}},xe=e=>{let n=`/v1/cards/${e}?command=REQUEST_CHANGE_PIN_URL`;return{input:{cardId:e},metadata:{commandName:"SetPIN",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n)).data}catch(r){d(r)}}}},Ae=(e,n)=>{let o=`/v1/cards/${e}/provision`;return{input:{cardId:e,params:n},metadata:{commandName:"AddCardToMobileWallet",path:o,method:"POST"},execute:async s=>{w.parse(n);let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},Se=(e,n)=>{let o=`/v1/cards/${e}`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardFeature",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}},Ie=(e,n)=>{let o=`/v1/cards/${e}/velocityrules`;return{input:{cardId:e,params:n},metadata:{commandName:"UpdateCardLimit",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}},ve=e=>{let n=new URLSearchParams;e.associations&&n.append("associations",e.associations);let o=n.toString(),s=`/v1/cards/${e.cardToken}/authorization/${e.authorizationId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardAuthorizationById",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},De=e=>{let n=new URLSearchParams;e.startDate&&n.append("startDate",e.startDate),e.endDate&&n.append("endDate",e.endDate),e.dateFormat&&n.append("dateFormat",e.dateFormat),e.offset!==void 0&&n.append("offset",e.offset.toString()),e.limit!==void 0&&n.append("limit",e.limit.toString()),e.status&&n.append("status",e.status),e.internalClearingId&&n.append("internalClearingId",e.internalClearingId),e.orderBy&&n.append("orderBy",e.orderBy),e.sortOrder&&n.append("sortOrder",e.sortOrder),e.isCardSettlementOnly!==void 0&&n.append("isCardSettlementOnly",e.isCardSettlementOnly.toString());let o=n.toString(),s=`/v1/cardSettlements${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetCardSettlements",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},Te=e=>{let n=`/v1/cardSettlements/${e.settlementId}`;return{input:{params:e},metadata:{commandName:"GetCardSettlementById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},R=(e,n)=>{let o=`/v1/cards/${e}?command=${n}`;return{input:{cardId:e,command:n},metadata:{commandName:"UpdateCardStatus",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){d(i)}}}},qe=e=>R(e,"TERMINATE"),Pe=e=>R(e,"SUSPEND"),we=e=>R(e,"ACTIVATE");var Ge=(e,n)=>{let o=`/v1/cards/${e}?command=REPLACE`;return{input:{cardId:e,reason:n},metadata:{commandName:"ReplaceCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{replaceReason:n})).data}catch(i){d(i)}}}},Ee=(e,n)=>{let o=`/v1/cards/${e}?command=RENEW`;return{input:{cardId:e,productId:n},metadata:{commandName:"RenewCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,{productId:n})).data}catch(i){d(i)}}}};var Le=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards`;return{input:{primaryAccountId:e,params:n},metadata:{commandName:"CreatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},Ue=(e,n)=>{let o=new URLSearchParams;n&&o.append("status",n);let s=o.toString(),r=`/v1/savingsaccounts/${e}/prepaidcards${s?`?${s}`:""}`;return{input:{primaryAccountId:e,status:n},metadata:{commandName:"GetPrepaidCardsByAccountId",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){d(p)}}}},Ne=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"GetPrepaidCardById",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){d(i)}}}},Oe=(e,n)=>{let o=`/v1/savingsaccounts/${e}/prepaidcards/${n}`;return{input:{primaryAccountId:e,prepaidCardId:n},metadata:{commandName:"DeactivatePrepaidCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){d(i)}}}};import m from"zod";var ke={documentTypeId:m.string(),documentKey:m.string(),status:m.string(),description:m.string().optional(),issuedBy:m.string().optional(),locale:m.string().optional(),dateFormat:m.string().optional(),expiryDate:m.string().optional(),nationality:m.number().optional(),issuedDate:m.string().optional()},$e=m.object(ke).catchall(m.any()),Be={id:m.number(),officeId:m.number(),clientId:m.number(),resourceId:m.number(),changes:m.record(m.string(),m.any()),isScheduledTransfer:m.boolean(),isSkipNotification:m.boolean()},ze={id:m.number(),clientId:m.number(),documentType:m.object({id:m.number(),name:m.string(),isMasked:m.boolean().optional()}),documentKey:m.union([m.string(),m.number()]),status:m.string(),description:m.string().optional(),issuedBy:m.string().optional(),expiryDate:m.union([m.string(),m.array(m.number())]).optional(),nationality:m.object({id:m.number(),name:m.string()}).optional(),issuedDate:m.string().optional(),documentStatus:m.string().optional()},ro=m.object(Be).catchall(m.any()),Fe=m.object(ze).catchall(m.any()),so=m.array(Fe),x=e=>$e.parse(e);var je=m.object({name:m.string(),file:m.union([m.instanceof(Buffer),m.instanceof(Blob),m.instanceof(File)]),type:m.string().optional(),description:m.string().optional()}),io=m.object({id:m.string(),resourceIdentifier:m.string(),uuid:m.string()}),U=e=>je.parse(e),co=m.object({officeId:m.number(),clientId:m.number(),resourceId:m.number()}),uo=m.object({clientId:m.number(),resourceId:m.number()});var _e=e=>{let n=`/v1/clients/${e}/identifiers/template`;return{input:{clientId:e},metadata:{commandName:"GetPermittedDocumentTypes",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Ve=e=>{let n=new URLSearchParams;e.unmaskValue!==void 0&&n.append("unmaskValue",e.unmaskValue.toString()),e.fields&&n.append("fields",e.fields);let o=n.toString(),s=`/v1/clients/${e.clientId}/identifiers${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"ListClientDocument",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{return(await i.get(s)).data}catch(u){d(u)}}}},Me=(e,n)=>{x(n);let o=`/v1/clients/${e}/identifiers`;return{input:{clientId:e,input:n},metadata:{commandName:"CreateClientIdentifier",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},We=(e,n,o)=>{x(o);let s=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n,updates:o},metadata:{commandName:"UpdateClientIdentifier",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o})).data}catch(u){d(u)}}}},Ke=(e,n,o)=>{U(o);let s=`/v1/client_identifiers/${n}/documents`;return{input:{clientId:e,identifierId:n,data:o},metadata:{commandName:"UploadClientIdentifierDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r),{name:u,file:p,type:l,description:C}=o,f=new FormData;f.append("name",u),C&&f.append("description",C),l&&f.append("type",l);let y,g;p instanceof File?(y=p,g=p.name):p instanceof Blob?(y=p,g=u):(y=new Blob([p],{type:"application/octet-stream"}),g=u),f.append("file",y,g);try{return(await i.post(s,f,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(I){d(I)}}}},Qe=(e,n)=>{let o=`/v1/clients/${e}/identifiers/${n}`;return{input:{clientId:e,identifierId:n},metadata:{commandName:"DeleteClientDocument",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){d(i)}}}},He=(e,n,o)=>{let s=`/v1/clients/${e}/identifiers/${n}?command=${o}`;return{input:{clientId:e,identifierId:n,command:o},metadata:{commandName:"ApproveRejectClientDocument",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s)).data}catch(u){d(u)}}}};import a from"zod";var N=a.object({id:a.number(),code:a.string(),value:a.string()}),O=a.object({id:a.number(),code:a.string(),value:a.string()}),k=a.object({active:a.boolean(),mandatory:a.boolean(),systemDefined:a.boolean()}),$=a.object({id:a.number()}),B=a.object({id:a.number(),name:a.string().optional()}),z=a.object({active:a.boolean()}),F=a.object({submittedOnDate:a.array(a.number()),submittedByUsername:a.string().optional(),submittedByFirstname:a.string().optional(),submittedByLastname:a.string().optional(),activatedOnDate:a.array(a.number()).optional(),activatedByUsername:a.string().optional(),activatedByFirstname:a.string().optional(),activatedByLastname:a.string().optional()}),Ye=a.object({}).catchall(a.any()),Je=a.object({}).catchall(a.any()),Ze=a.object({}).catchall(a.any()),j=a.object({constitution:Ye,mainBusinessLine:Je,countryOfIncorporation:Ze}).catchall(a.any()),_=a.object({isExternalCardDebitDisable:a.boolean(),isExternalCardCreditDisable:a.boolean(),isAchDebitOutgoingDisable:a.boolean(),isAchCreditOutgoingDisable:a.boolean(),isAchDebitIncomingDisable:a.boolean(),isAchCreditIncomingDisable:a.boolean(),isInternalCreditDisable:a.boolean(),isInternalDebitDisable:a.boolean(),isWireCreditOutgoingDisable:a.boolean(),isWireCreditIncomingDisable:a.boolean(),isSwiftCreditOutgoingDisable:a.boolean(),isSwiftCreditIncomingDisable:a.boolean(),isFxpayCreditOutgoingDisable:a.boolean(),isAllocateToSubAccountDisable:a.boolean(),isInternalCreditOwnDisable:a.boolean(),type:a.string(),resourceId:a.number(),id:a.number()}).catchall(a.any()),V=a.object({}).catchall(a.any()),M=a.object({id:a.number(),accountNo:a.string(),status:O,subStatus:k,active:a.boolean(),activationDate:a.array(a.number()).optional(),firstname:a.string(),lastname:a.string(),displayName:a.string(),mobileNo:a.string(),emailAddress:a.string(),dateOfBirth:a.array(a.number()),gender:$,clientTypes:a.array(a.any()),clientClassification:B,occupation:z,isStaff:a.boolean(),skipAvs:a.boolean(),officeId:a.number(),officeName:a.string(),imageId:a.string().optional(),imagePresent:a.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:a.string(),updatedAt:a.string(),isBlockExternalCardsAddition:a.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:a.array(a.number()).optional(),mobileCountryCode:a.string(),clientKycStatus:V,ofLoanCycle:a.number(),ofLoanActive:a.number(),activeDepositAccount:a.number(),onBoardingStatus:a.string().optional()}).catchall(a.any()),Xe=a.object({riskScore:a.number(),rating:a.string()}).catchall(a.any()),et=a.object({street:a.string(),city:a.string(),state:a.string(),zipCode:a.string()}).catchall(a.any()),tt=a.object({type:a.string(),value:a.string()}).catchall(a.any()),nt={firstname:a.string(),middlename:a.string().optional(),lastname:a.string(),fullname:a.string().optional(),dob:a.string(),genderId:a.number(),locale:a.string(),officeId:a.number(),mobileCountryCode:a.string(),mobileNo:a.string(),emailAddress:a.string().email(),legalFormId:a.number(),externalId:a.string().optional(),isOptedForMLALStatus:a.boolean().optional(),currentMLALStatus:a.string().optional(),isStaff:a.boolean().optional(),staffId:a.number().optional(),clientClassificationId:a.number().optional(),savingsProductId:a.number().optional(),active:a.boolean().optional(),dateFormat:a.string(),activationDate:a.string().optional(),submittedOnDate:a.string(),dateOfBirth:a.string()},vo=a.object(nt).catchall(a.any()),at={clientId:a.number(),status:a.string()},Do=a.object(at).catchall(a.any()),ot={firstname:a.string().optional(),middlename:a.string().optional(),fullname:a.string().optional(),genderId:a.number().optional(),lastname:a.string().optional(),occupationId:a.number().optional(),mobileCountryCode:a.string().optional(),mobileNo:a.string().optional(),emailAddress:a.string().email().optional(),externalId:a.string().optional(),clientClassificationId:a.number().optional(),dateOfBirth:a.string().optional(),dateFormat:a.string().optional()},To=a.object(ot).catchall(a.any()),rt={documentTypeId:a.string(),documentKey:a.string(),status:a.string(),description:a.string().optional(),issuedBy:a.string().optional(),locale:a.string().optional(),dateFormat:a.string().optional(),expiryDate:a.string().optional(),nationality:a.number().optional(),issuedDate:a.string().optional()},qo=a.object(rt).catchall(a.any()),st={id:a.number(),officeId:a.number(),clientId:a.number(),resourceId:a.number(),changes:a.record(a.string(),a.any()),isScheduledTransfer:a.boolean(),isSkipNotification:a.boolean()},Po=a.object(st).catchall(a.any()),it={developerMessage:a.string(),defaultUserMessage:a.string(),userMessageGlobalisationCode:a.string(),parameterName:a.string().optional(),value:a.any().nullable(),args:a.array(a.object({value:a.any()})).optional()},ct=a.object(it),dt={developerMessage:a.string(),httpStatusCode:a.string(),defaultUserMessage:a.string(),userMessageGlobalisationCode:a.string(),errors:a.array(ct).optional()},wo=a.object(dt).catchall(a.any()),ut={tenantId:a.string().optional(),offset:a.number().optional(),limit:a.number().optional(),orderBy:a.string().optional(),sortOrder:a.string().optional(),officeId:a.number().optional(),displayName:a.string().optional(),firstname:a.string().optional(),lastname:a.string().optional(),externalId:a.string().optional(),orphansOnly:a.boolean().optional(),clientStatus:a.string().optional(),mobileNo:a.string().optional(),createdStartDate:a.string().optional(),creationEndDate:a.string().optional(),activatedStartDate:a.string().optional(),activatedEndDate:a.string().optional(),closedStartDate:a.string().optional(),closedEndDate:a.string().optional()},Go=a.object(ut),Eo={id:a.number(),accountNo:a.string(),status:O,subStatus:k,active:a.boolean(),activationDate:a.array(a.number()).optional(),firstname:a.string(),lastname:a.string(),displayName:a.string(),mobileNo:a.string(),emailAddress:a.string(),dateOfBirth:a.array(a.number()),gender:$,clientTypes:a.array(a.any()),clientClassification:B,occupation:z,isStaff:a.boolean(),skipAvs:a.boolean(),officeId:a.number(),officeName:a.string(),imageId:a.string().optional(),imagePresent:a.boolean().optional(),timeline:F,legalForm:N,clientVerificationStatus:a.string(),updatedAt:a.string(),isBlockExternalCardsAddition:a.boolean(),clientNonPersonDetails:j,clientTransferOptionData:_,authorizations:a.array(a.number()).optional(),mobileCountryCode:a.string(),clientKycStatus:V,ofLoanCycle:a.number(),ofLoanActive:a.number(),activeDepositAccount:a.number(),onBoardingStatus:a.string().optional()},mt={totalFilteredRecords:a.number(),pageItems:a.array(M)},Lo=a.object(mt).catchall(a.any()),pt={clientData:M.optional(),riskRatingData:Xe.optional(),clientAddressData:et.optional(),clientIdentifierData:tt.optional()},Uo=a.object(pt);var No=a.enum(["offset","limit","orderBy","sortOrder","officeId","displayName","firstname","lastname","externalId","orphansOnly","clientStatus","mobileNo","createdStartDate","creationEndDate","activatedStartDate","activatedEndDate","closedStartDate","closedEndDate"]),Oo=a.enum(["displayName","accountNo","officeId","officeName"]),ko=a.enum(["ASC","DESC"]),$o=a.enum(["ACTIVE","PENDING","INACTIVE"]);var Bo=a.object({clientId:a.string(),kycVerificationType:a.enum(["FULL","PARTIAL"]).default("FULL").optional(),note:a.string().optional(),locale:a.string().default("en").optional(),dateFormat:a.string().default("dd MMMM yyyy").optional(),activationDate:a.string().optional(),isActivatedByManualReview:a.boolean().default(!1).optional(),manualReviewActivationComments:a.string().optional(),skipVerify:a.boolean().default(!1),skipActivate:a.boolean().default(!1),autoActivate:a.boolean().default(!0)}).refine(e=>!(e.skipVerify&&e.skipActivate),{message:"Cannot skip both verification and activation - at least one action must be performed",path:["skipVerify","skipActivate"]}).refine(e=>!(!e.skipVerify&&!e.kycVerificationType),{message:"kycVerificationType is required when skipVerify is false",path:["kycVerificationType"]}).refine(e=>!(!e.skipActivate&&!e.locale),{message:"locale is required when skipActivate is false",path:["locale"]}).refine(e=>!(!e.skipActivate&&!e.dateFormat),{message:"dateFormat is required when skipActivate is false",path:["dateFormat"]}).refine(e=>!(!e.skipActivate&&!e.activationDate),{message:"activationDate is required when skipActivate is false",path:["activationDate"]}),zo=a.object({id:a.number(),clientId:a.number(),officeId:a.number(),resourceId:a.number(),data:a.object({clientVerificationStatus:a.enum(["PENDING","IN_PROGRESS","APPROVED","REJECTED"]),clientKycStatus:a.string()})}),lt=a.object({id:a.number(),name:a.string(),isMasked:a.boolean()}),Ct=a.object({id:a.number(),value:a.string()}),ft=a.object({id:a.number(),clientId:a.number(),documentType:lt,documentKey:a.string(),issuedDate:a.array(a.number()).optional(),expiryDate:a.array(a.number()).optional(),description:a.string().optional(),status:a.string(),issuedBy:a.string().optional(),verificationStatus:Ct.optional()}),ht=a.object({id:a.number(),value:a.string()}),Fo=a.object({id:a.number(),accountNo:a.union([a.string(),a.number()]),displayName:a.string(),legalForm:a.object({code:a.string(),value:a.number()}),verificationStatus:ht,identifiers:a.array(ft).optional(),ofLoanCycle:a.number(),mobileCountryCode:a.string(),ofLoanActive:a.number(),activeDepositAccount:a.number()}).catchall(a.any()),jo=a.object({closureReasonId:a.string(),locale:a.string().optional(),closerDate:a.string(),dateFormat:a.string()}).refine(e=>!(e.closerDate==null&&e.dateFormat===void 0)),_o=a.object({id:a.number(),clientId:a.number(),resourceId:a.number()});var yt=e=>{let n=new URLSearchParams;e.staffInSelectedOfficeOnly&&n.append("staffInSelectedOfficeOnly","true"),e.checkIdentitiesExpiration&&n.append("checkIdentitiesExpiration","true"),e.clientAccountAssociate&&n.append("clientAccountAssociate","true");let o=n.toString(),s=`/v1/clients/${e.clientId}${o?`?${o}`:""}`;return{input:{params:e},metadata:{commandName:"GetClient",path:s,method:"GET"},execute:async r=>{let i=await c(r);try{let u={},p=await i.get(s);if(u.clientData=p,e.riskRating){let l=await i.get(`/v1/clients/${e.clientId}/riskrating`);u.riskRatingData=l}if(e.clientAddress){let l=await i.get(`/v1/client/${e.clientId}/addresses`);u.clientAddressData=l}if(e.clientIdentifier){let l=await i.get(`/v1/clients/${e.clientId}/identifiers?unmaskValue=true`);u.clientIdentifierData=l}return u}catch(u){d(u)}}}},gt=(e,n)=>{let o=`/v1/clients/${e}`;return{input:{clientId:e,updates:n},metadata:{commandName:"UpdateClient",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,{...n})).data}catch(i){d(i)}}}},bt=e=>{let n="/v1/clients";return{input:{clientData:e},metadata:{commandName:"CreateClient",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},Rt=e=>{let n="/v1/clients";return{input:{params:e},metadata:{commandName:"GetClients",path:n,method:"GET"},execute:async o=>{let s=await c(o),r=[],i=e.limit||200,u=e.offset||0,p=0,l={...e,limit:i,offset:u};try{if(e.limit===0){do{let C=await s.get(n,{params:l}),{totalFilteredRecords:f,pageItems:y}=C.data;r.push(...y),p=f,u+=i}while(u<p);return{totalFilteredRecords:p,pageItems:r}}else return(await s.get(n,{params:l})).data}catch(C){d(C)}}}},xt=e=>{let n=`/v1/clients/${e}`;return{input:{clientId:e},metadata:{commandName:"DeleteClient",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){d(r)}}}},At=e=>{let n=`/v1/clients/${e.clientId}`;return{input:{param:e},metadata:{commandName:"VerifyWithActivateClients",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{let r;if(!e.skipVerify){let i={kycVerificationType:e.kycVerificationType,note:e.note};r=await s.post(n,i)}if(!e.skipActivate&&(r&&r.data.data.clientKycStatus==="APPROVED"&&e.autoActivate||!r)){let i={locale:e.locale,dateFormat:e.dateFormat,activationDate:e.activationDate,isActivatedByManualReview:e.isActivatedByManualReview,manualReviewActivationComments:e.manualReviewActivationComments},u=await s.post(n,i),p=u.data;return r&&(p={...u.data,data:{...r.data.data}}),p}if(!r)throw h({message:"Verification was skipped but no alternative action was taken",code:"VERIFICATION_SKIPPED"});return r.data}catch(r){d(r)}}}},St=e=>{let n=`/v1/clients/${e}/verificationstatus`;return{input:{clientId:e},metadata:{commandName:"GetStatusOfVerifyClient",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}};import ur from"axios";import It from"moment-timezone";var W=(e=new Date,n=!1,o=process.env.TIMEZONE??"Europe/Berlin")=>It(e.getTime()).tz(o).utc(!n);var vt=e=>{let n="/v1/transfers";return{input:{transfer:e},metadata:{commandName:"CreateTransfer",path:n,method:"POST"},execute:async o=>{v.parse(e);let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},Dt=e=>{let n=`/v1/transfers/${e}`;return{input:{id:e},metadata:{commandName:"GetTransfer",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Tt=e=>{let n="/v1/transfers",o={paymentType:e.paymentType||"ACH",status:e.transferStatus||"EXECUTION_SCHEDULED",toExecuteDate:e.executedAt||W().toISOString(!0).slice(0,10),locale:"en",dateFormat:"yyyy-MM-dd",associateClientData:!0,originatedBy:"us",accountType:e.accountType};return{input:{params:e},metadata:{commandName:"GetTransfers",path:n,method:"GET"},execute:async s=>{let r=await c(s),i=[],u=e.queryLimit||200,p=0,l=0,C={...o,limit:u,offset:p};try{do{let f=await r.get(n,{params:C}),{totalFilteredRecords:y,pageItems:g}=f.data;i.push(...g),l=y,p+=u}while(p<l);return i}catch(f){d(f)}}}};import{z as K}from"zod";var qt=e=>{let n="/v1/payments";return{input:{payment:e},metadata:{commandName:"CreatePayment",path:n,method:"POST"},execute:async o=>{try{D(e)}catch(r){throw r instanceof K.ZodError?h({message:`Invalid payment data: ${r.errors.map(i=>i.message).join(", ")}`,code:"invalid_payment_input"}):r}let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},Pt=e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"GetPayment",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},wt=(e,n)=>{let o=`/v1/payments/${e}`;return{input:{id:e,payment:n},metadata:{commandName:"UpdatePayment",path:o,method:"PUT"},execute:async s=>{try{T(n)}catch(i){throw i instanceof K.ZodError?h({message:`Invalid payment update data: ${i.errors.map(u=>u.message).join(", ")}`,code:"invalid_payment_update_input"}):i}let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}},Gt=e=>{let n="/v1/payments";return{input:{params:e},metadata:{commandName:"GetPayments",path:n,method:"GET"},execute:async o=>{let s=await c(o),r={locale:"en",originatedBy:"us",orderBy:"id",sortOrder:"DESC",limit:20,offset:0},i=u=>{let l=["fromValueDate","toValueDate","fromExecuteDate","toExecuteDate","fromReturnDate","toReturnDate"].some(f=>u[f]!==void 0),C={...u};return l&&C.dateFormat===void 0&&(C.dateFormat="yyyy-MM-dd"),C};try{let u=i(e),p={...r,...u,limit:u.limit!==void 0&&u.limit!==0?u.limit:20,offset:u.offset!==void 0?u.offset:0};return(await s.get(n,{params:p})).data}catch(u){d(u)}}}},Et=e=>{let n=`/v1/payments/${e}`;return{input:{id:e},metadata:{commandName:"DeletePayment",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{await s.delete(n)}catch(r){d(r)}}}};var Lt=e=>({input:{accountId:e},metadata:{commandName:"GetAccount",path:`/v1/savingsaccounts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsaccounts/${e}`)).data}catch(s){d(s)}}}),Ut=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"UpdateAccount",path:`/v1/savingsaccounts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsaccounts/${e}`,n)).data}catch(r){d(r)}}}),Nt=e=>({input:{accountId:e},metadata:{commandName:"DeleteAccount",path:`/v1/savingsaccounts/${e}`,method:"DELETE"},execute:async n=>{let o=await c(n);try{return(await o.delete(`/v1/savingsaccounts/${e}`)).data}catch(s){d(s)}}}),Ot=(e,n)=>({input:{clientId:e,params:n},metadata:{commandName:"ListAccountsOfClient",path:`/v1/clients/${e}/accounts`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/clients/${e}/accounts`,{params:n})).data}catch(r){d(r)}}}),kt=e=>({input:{params:e},metadata:{commandName:"CreateAndActivateAccount",path:"/v1/savingsaccounts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsaccounts?command=submit,approve,activate",e)).data}catch(s){d(s)}}}),$t=(e,n)=>({input:{savingsAccountId:e,requestData:n},metadata:{commandName:"CloseAccount",path:`/v1/savingsaccounts/${e}?command=close`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=close`,n)).data}catch(r){d(r)}}}),Bt=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"ScheduleAccountClosure",path:`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=SCHEDULECLOSE`,n)).data}catch(r){d(r)}}}),zt=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"BlockAccount",path:`/v1/savingsaccounts/${e}?command=block`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=block`,n)).data}catch(r){d(r)}}}),Ft=(e,n)=>({input:{accountId:e,requestData:n},metadata:{commandName:"HoldAmount",path:`/v1/savingsaccounts/${e}?command=hold`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/savingsaccounts/${e}?command=hold`,n)).data}catch(r){d(r)}}});var jt=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetPendingTransactions",path:`/v1/savingsaccounts/${e}/pendingTransaction`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/pendingTransaction`,{params:n})).data}catch(r){d(r)}}}),_t=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetCompletedTransactions",path:`/v1/savingsaccounts/${e}/transactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/transactions`,{params:n})).data}catch(r){d(r)}}}),Vt=(e,n)=>({input:{savingsId:e,params:n},metadata:{commandName:"GetRecentTransactions",path:`/v1/savingsaccounts/${e}/unifiedtransactions`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savingsaccounts/${e}/unifiedtransactions`,{params:n})).data}catch(r){d(r)}}}),Mt=(e,n,o)=>({input:{savingsAccountId:e,transactionId:n,params:o},metadata:{commandName:"GetTransactionById",path:`/v1/savingsaccounts/${e}/transactions/${n}`,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(`/v1/savingsaccounts/${e}/transactions/${n}`,{params:o})).data}catch(i){d(i)}}}),Wt=(e,n)=>({input:{routingNumber:e,params:n},metadata:{commandName:"GetBankDetailsFromRoutingCode",path:`/v1/bankdetails/routing/${e}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/bankdetails/routing/${e}`,{params:n})).data}catch(r){d(r)}}});var Kt=e=>({input:{params:e},metadata:{commandName:"CreateAccountProduct",path:"/v1/savingsproducts",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/savingsproducts",e)).data}catch(s){d(s)}}}),Qt=(e,n)=>({input:{productId:e,params:n},metadata:{commandName:"UpdateAccountProduct",path:`/v1/savingsproducts/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/savingsproducts/${e}`,n)).data}catch(r){d(r)}}}),Ht=()=>({input:{},metadata:{commandName:"GetAllAccountProducts",path:"/v1/savingsproducts",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/savingsproducts")).data}catch(o){d(o)}}}),Yt=e=>({input:{productId:e},metadata:{commandName:"GetAccountProductById",path:`/v1/savingsproducts/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/savingsproducts/${e}`)).data}catch(s){d(s)}}});var Jt=e=>({input:{requestData:e},metadata:{commandName:"GenerateAccountStatement",path:"/v1/generatestatements",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/generatestatements",e)).data}catch(s){d(s)}}}),Zt=(e,n)=>({input:{savingsAccountId:e,documentId:n},metadata:{commandName:"DownloadAccountStatement",path:`/v1/savings/${e}/documents/${n}/attachment`,method:"GET"},execute:async o=>{let s=await c(o);try{let r=await s.get(`/v1/savings/${e}/documents/${n}/attachment`,{responseType:"blob"}),i=r.headers["content-disposition"],u;if(i){let l=i.match(/filename="?(.+?)"?$/i);l&&(u=l[1])}let p=r.headers["content-type"];return{data:r.data,fileName:u,contentType:p}}catch(r){d(r)}}}),Xt=(e,n)=>({input:{savingsAccountId:e,queryParams:n},metadata:{commandName:"GetAccountDocumentsDetails",path:`/v1/savings/${e}/documents`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/savings/${e}/documents`,{params:n})).data}catch(r){d(r)}}});import{print as nn}from"graphql";var en=`
2
2
  mutation updateRecipient($id: ID!, $input: UpdateRecipientInput!) {
3
3
  updateRecipient(id: $id, input: $input) {
4
4
  id
@@ -29,4 +29,4 @@ import{G as D,H as T,p as v}from"../chunk-AKKSZ4BX.mjs";import{a as h,c as d}fro
29
29
  }
30
30
  }
31
31
  }
32
- `,tn=e=>{let n=A({command:en,variables:{id:e.id,input:e.input},operationName:"updateRecipient",tenantId:e.tenantId});return{input:e,metadata:{commandName:"UpdateRecipientGQL",path:"/graphql",method:"POST"},execute:n.execute}};var A=e=>({input:e,metadata:{commandName:e.operationName||"GraphQL",path:"/graphql",method:"POST"},execute:async n=>{e.tenantId&&(n.tenantId=e.tenantId);let o=await c(n),s=n.graphqlPath||"/graphql";try{let r=typeof e.command=="string"?e.command:nn(e.command),{data:i}=await o.post(s,{query:r,variables:e.variables,operationName:e.operationName});if(i.errors?.length)throw h({message:i.errors[0].message,code:"graphql_error",originalError:i.errors[0]});if(!i.data)throw h({message:"No data returned from GraphQL query",code:"graphql_no_data"});return i.data}catch(r){throw r.name==="CommandError"?r:h({message:r.message,code:"graphql_request_failed",originalError:r})}}});var an=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomUpdate",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n,{...e.updates},{params:e.params})).data}catch(r){d(r)}}}},on=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomCreate",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e.data,{params:e.params})).data}catch(r){d(r)}}}},rn=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomGet",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n,{params:e.params})).data}catch(r){d(r)}}}};var sn=(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,id:n},metadata:{commandName:"GetRecipient",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){d(i)}}}},cn=(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,recipient:n},metadata:{commandName:"CreateRecipient",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},dn=(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,recipientId:n},metadata:{commandName:"DeleteRecipient",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){d(i)}}}},un=(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,params:n},metadata:{commandName:"GetRecipients",path:o,method:"GET"},execute:async s=>{let r=await c(s);(!n.limit||n.limit<=0)&&(n.limit=20),n.name||(n.name="");try{return(await r.get(o,{params:n})).data}catch(i){d(i)}}}};var mn=()=>{let e="/v1/userdetails";return{input:{},metadata:{commandName:"GetUserDetail",path:e,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(e)).data}catch(s){d(s)}}}},pn=e=>{let n="/v1/users";return{input:{requestData:e},metadata:{commandName:"EnableSelfServiceAccess",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},ln=e=>{let{userId:n,...o}=e,s=`/v1/users/${n}`;return{input:{requestData:e},metadata:{commandName:"UpdateSelfServiceUser",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o,isSelfServiceUser:!0})).data}catch(u){d(u)}}}},Cn=e=>{let n=`/v1/users/${e}`;return{input:{userId:e},metadata:{commandName:"DeleteSelfServiceUser",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){d(r)}}}};var fn=(e={})=>{let n="/v1/cardproducts",o=new URLSearchParams;o.append("limit",e?.limit?.toString()||"0"),o.append("offset",e?.offset?.toString()||"0");let s=o.toString(),r=`${n}?${s}`;return{input:{params:e},metadata:{commandName:"ListCardProduct",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){d(p)}}}},hn=e=>{let n=`/v1/cardproducts/${e}`;return{input:{cardProductId:e},metadata:{commandName:"GetCardProduct",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},yn=e=>{let n="/v1/cardproducts";return{input:{params:e},metadata:{commandName:"CreateCardProduct",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},gn=(e,n)=>{let o=`/v1/cardproducts/${e}`;return{input:{cardProductId:e,params:n},metadata:{commandName:"UpdateCardProduct",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}};var S=(e,n)=>{let o=new URLSearchParams;return o.append("type",n.toString()),`${e}?${o.toString()}`},bn=e=>{let n=`/v1/client/${e}/addresses`;return{input:{clientId:e},metadata:{commandName:"GetClientAddress",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Rn=(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"CreateClientAddress",path:r,method:"POST"},execute:async i=>{let u=await c(i);try{return(await u.post(r,o)).data}catch(p){d(p)}}}},xn=(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"UpdateClientAddress",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){d(p)}}}},An=(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"SetClientAddressStatus",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){d(p)}}}};var Sn=e=>{let n=`/v1/clients/${e}/classifications`;return{input:{clientId:e},metadata:{commandName:"GetClientClassification",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},In=(e,n)=>{let o=`/v1/clients/${e}?command=switchclassification`;return{input:{clientId:e,params:n},metadata:{commandName:"SwitchClientClassification",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}};var vn=()=>({input:{},metadata:{commandName:"GetConfigurations",path:"/v1/configurations",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/configurations")).data}catch(o){d(o)}}}),Dn=e=>({input:{configName:e},metadata:{commandName:"GetConfigurationByName",path:`/v1/configurations/name/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/configurations/name/${e}`)).data}catch(s){d(s)}}}),Tn=(e,n)=>({input:{configId:e,requestData:n},metadata:{commandName:"EnableDisableConfiguration",path:`/v1/configurations/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/configurations/${e}`,n)).data}catch(r){d(r)}}});var qn=e=>({input:{params:e},metadata:{commandName:"CreateFixedDepositAccount",path:"/v1/fixeddepositaccounts",method:"POST"},async execute(n){try{return(await(await c(n)).post("/v1/fixeddepositaccounts?command=submit,approve,activate",e)).data}catch(o){throw d(o)}}}),wn=e=>({input:{accountId:e},metadata:{commandName:"GetFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"GET"},async execute(n){try{return(await(await c(n)).get(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw d(o)}}}),Pn=(e,n)=>({input:{accountId:e,params:n},metadata:{commandName:"UpdateFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"PUT"},async execute(o){try{return(await(await c(o)).put(`/v1/fixeddepositaccounts/${e}`,n)).data}catch(s){throw d(s)}}}),Gn=e=>({input:{accountId:e},metadata:{commandName:"DeleteFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"DELETE"},async execute(n){try{return(await(await c(n)).delete(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw d(o)}}});var En=e=>{let n=`/v1/clients/${e}/externalCards`;return{input:{clientId:e},metadata:{commandName:"GetAcquiredCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Ln=e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"GetAcquiredCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Un=(e,n)=>{let o=`/v1/clients/${e}/externalCards`;return{input:{clientId:e,params:n},metadata:{commandName:"AddAcquiredCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},Nn=(e,n)=>{let o=`/v1/clients/${e}?command=blockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"BlockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},On=(e,n)=>{let o=`/v1/clients/${e}?command=unblockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"UnblockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},$n=e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"DeleteAcquiredCard",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){d(r)}}}};var kn=e=>({input:{subscriberId:e},metadata:{commandName:"GetSubscriber",path:`/v1/subscribers/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/subscribers/${e}`)).data}catch(s){d(s)}}});var Bn=e=>({input:{requestData:e},metadata:{commandName:"CreateLoan",path:"/v1/loans",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans",e)).data}catch(s){d(s)}}}),zn=(e,n)=>({input:{loanIdForApprove:e,requestData:n},metadata:{commandName:"ApproveLoan",path:`/v1/loans/${e}?command=approve`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=approve`,n)).data}catch(r){d(r)}}}),Fn=(e,n,o)=>({input:{loanId:e,associations:n,exclude:o},metadata:{commandName:"GetLoanById",path:`/v1/loans/${e}`,method:"GET"},execute:async s=>{let r=await c(s);try{let i={};return n&&(i.associations=n),o&&(i.exclude=o),(await r.get(`/v1/loans/${e}`,Object.keys(i).length>0?{params:i}:void 0)).data}catch(i){d(i)}}}),jn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"DisburseLoanToLinkedAccount",path:`/v1/loans/${e}?command=disburseToSavings`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburseToSavings`,n)).data}catch(r){d(r)}}}),_n=(e,n)=>({input:{loanIdForDisburse:e,requestData:n},metadata:{commandName:"DisburseLoan",path:`/v1/loans/${e}?command=disburse`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburse`,n)).data}catch(r){d(r)}}}),Vn=e=>({input:{requestData:e},metadata:{commandName:"CalculateLoanSchedule",path:"/v1/loans?command=calculateLoanSchedule",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans?command=calculateLoanSchedule",e)).data}catch(s){d(s)}}}),Mn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"MakeRepayment",path:`/v1/loans/${e}/transactions?command=repayment`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}/transactions?command=repayment`,n)).data}catch(r){d(r)}}}),Wn=(e,n)=>{let o=new URLSearchParams;o.append("command","preclosure"),n?.transactionDate&&o.append("transactionDate",n.transactionDate),n?.locale&&o.append("locale",n.locale),n?.dateFormat&&o.append("dateFormat",n.dateFormat);let s=o.toString(),r=`/v1/loans/${e}/transactions/template?${s}`;return{input:{loanId:e,params:n},metadata:{commandName:"GetLoanPreclosureTemplate",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){d(p)}}}},Kn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"PreCloseLoan",path:`/v1/loans/${e}?command=preclosure`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=preclosure`,n)).data}catch(r){d(r)}}}),Qn=(e,n)=>({input:{loanId:e,transactionId:n},metadata:{commandName:"GetLoanTransactionDetails",path:`/v1/loans/${e}/transactions/${n}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/loans/${e}/transactions/${n}`)).data}catch(r){d(r)}}}),Hn=e=>({input:{loanId:e},metadata:{commandName:"GetLoanWriteoffTemplate",path:`/v1/loans/${e}/transactions/template?command=writeoff`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/loans/${e}/transactions/template?command=writeoff`)).data}catch(s){d(s)}}}),Yn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"WriteLoanOff",path:`/v1/loans/${e}?command=writeoff`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=writeoff`,n)).data}catch(r){d(r)}}}),Jn=()=>({input:{},metadata:{commandName:"GetLoanSearchTemplate",path:"/v1/search/template",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/search/template")).data}catch(o){d(o)}}}),Zn=(e,n)=>({input:{query:e,requestData:n},metadata:{commandName:"GetSearchData",path:"/v1/search",method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get("/v1/search",{params:{query:e,...n}})).data}catch(r){d(r)}}});var Xn=(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges`;return{input:{accountId:e,params:n},metadata:{commandName:"AddChargeToAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},ea=e=>{let n=`/v1/savingsaccounts/${e}?associations=charges`;return{input:{accountIdForAccountCharges:e},metadata:{commandName:"GetChargesByAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},ta=(e,n)=>{let o=`/v1/loans/${e}/charges`;return{input:{loanAccountId:e,params:n},metadata:{commandName:"AddChargeToLoanAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},na=e=>{let n=`/v1/loans/${e}/charges`;return{input:{loanIdForCharge:e},metadata:{commandName:"GetChargesByLoanAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},aa=(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges/${n}?command=waive`;return{input:{accountId:e,chargeId:n},metadata:{commandName:"WaiveChargeFromAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){d(i)}}}},oa=(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/transactions/${n}?command=undo`;return{input:{accountId:e,transactionId:n,params:o},metadata:{commandName:"UndoChargeToAccount",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){d(u)}}}},ra=(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/charges/${n}?command=paycharge`;return{input:{accountId:e,chargeId:n,params:o},metadata:{commandName:"PayAccountCharge",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){d(u)}}}};export{Pe as ActivateCard,be as ActivatePhysicalCard,Un as AddAcquiredCard,Ae as AddCardToMobileWallet,Xn as AddChargeToAccount,ta as AddChargeToLoanAccount,zn as ApproveLoan,He as ApproveRejectClientDocument,zt as BlockAccount,Nn as BlockAcquiredCardAddition,Vn as CalculateLoanSchedule,ge as ChangeCardType,kt as CloseAccount,Kt as CreateAccountProduct,$t as CreateAndActivateAccount,ye as CreateCard,yn as CreateCardProduct,bt as CreateClient,Rn as CreateClientAddress,Me as CreateClientIdentifier,qn as CreateFixedDepositAccount,Bn as CreateLoan,qt as CreatePayment,Le as CreatePrepaidCard,cn as CreateRecipient,vt as CreateTransfer,on as CustomCreate,rn as CustomGet,an as CustomUpdate,Oe as DeactivatePrepaidCard,Nt as DeleteAccount,$n as DeleteAcquiredCard,xt as DeleteClient,Qe as DeleteClientDocument,Gn as DeleteFixedDepositAccount,Et as DeletePayment,dn as DeleteRecipient,Cn as DeleteSelfServiceUser,_n as DisburseLoan,jn as DisburseLoanToLinkedAccount,Zt as DownloadAccountStatement,Tn as EnableDisableConfiguration,pn as EnableSelfServiceAccess,Jt as GenerateAccountStatement,Lt as GetAccount,Xt as GetAccountDocumentsDetails,Yt as GetAccountProductById,Ot as GetAccountsOfClient,Ln as GetAcquiredCardById,En as GetAcquiredCards,Ht as GetAllAccountProducts,Wt as GetBankDetailsFromRoutingCode,ve as GetCardAuthorizationById,he as GetCardAuthorizations,Ce as GetCardById,fe as GetCardImageUrl,hn as GetCardProduct,Te as GetCardSettlementById,De as GetCardSettlements,le as GetCards,ea as GetChargesByAccountId,na as GetChargesByLoanAccountId,yt as GetClient,bn as GetClientAddress,Sn as GetClientClassification,Rt as GetClients,_t as GetCompletedTransactions,Dn as GetConfigurationByName,vn as GetConfigurations,wn as GetFixedDepositAccount,Fn as GetLoanById,Wn as GetLoanPreclosureTemplate,Jn as GetLoanSearchTemplate,Qn as GetLoanTransactionDetails,Hn as GetLoanWriteoffTemplate,wt as GetPayment,Gt as GetPayments,jt as GetPendingTransactions,_e as GetPermittedDocumentTypes,Ne as GetPrepaidCardById,Ue as GetPrepaidCardsByAccountId,Vt as GetRecentTransactions,sn as GetRecipient,un as GetRecipients,Zn as GetSearchData,St as GetStatusOfVerifyClient,kn as GetSubscriber,Mt as GetTransactionById,Dt as GetTransfer,Tt as GetTransfers,mn as GetUserDetail,A as GraphQL,Ft as HoldAmount,fn as ListCardProduct,Ve as ListClientDocument,Mn as MakeRepayment,Re as OrderPhysicalCard,ra as PayAccountCharge,Kn as PreCloseLoan,Ee as RenewCard,Ge as ReplaceCard,Bt as ScheduleAccountClosure,An as SetClientAddressStatus,xe as SetPIN,we as SuspendCard,In as SwitchClientClassification,qe as TerminateCard,On as UnblockAcquiredCardAddition,oa as UndoChargeToAccount,Ut as UpdateAccount,Qt as UpdateAccountProduct,Se as UpdateCardFeature,Ie as UpdateCardLimit,gn as UpdateCardProduct,gt as UpdateClient,xn as UpdateClientAddress,We as UpdateClientIdentifier,Pn as UpdateFixedDepositAccount,Pt as UpdatePayment,tn as UpdateRecipient,ln as UpdateSelfServiceUser,Ke as UploadClientIdentifierDocument,At as VerifyWithActivateClients,aa as WaiveChargeFromAccount,Yn as WriteLoanOff};
32
+ `,tn=e=>{let n=A({command:en,variables:{id:e.id,input:e.input},operationName:"updateRecipient",tenantId:e.tenantId});return{input:e,metadata:{commandName:"UpdateRecipientGQL",path:"/graphql",method:"POST"},execute:n.execute}};var A=e=>({input:e,metadata:{commandName:e.operationName||"GraphQL",path:"/graphql",method:"POST"},execute:async n=>{e.tenantId&&(n.tenantId=e.tenantId);let o=await c(n),s=n.graphqlPath||"/graphql";try{let r=typeof e.command=="string"?e.command:nn(e.command),{data:i}=await o.post(s,{query:r,variables:e.variables,operationName:e.operationName});if(i.errors?.length)throw h({message:i.errors[0].message,code:"graphql_error",originalError:i.errors[0]});if(!i.data)throw h({message:"No data returned from GraphQL query",code:"graphql_no_data"});return i.data}catch(r){throw r.name==="CommandError"?r:h({message:r.message,code:"graphql_request_failed",originalError:r})}}});var an=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomUpdate",path:n,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(n,{...e.updates},{params:e.params})).data}catch(r){d(r)}}}},on=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomCreate",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e.data,{params:e.params})).data}catch(r){d(r)}}}},rn=e=>{let n=e.url;return{input:{params:e},metadata:{commandName:e.commandName||"CustomGet",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n,{params:e.params})).data}catch(r){d(r)}}}};var sn=(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,id:n},metadata:{commandName:"GetRecipient",path:o,method:"GET"},execute:async s=>{let r=await c(s);try{return(await r.get(o)).data}catch(i){d(i)}}}},cn=(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,recipient:n},metadata:{commandName:"CreateRecipient",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},dn=(e,n)=>{let o=`/v1/clients/${e}/recipients/${n}`;return{input:{clientId:e,recipientId:n},metadata:{commandName:"DeleteRecipient",path:o,method:"DELETE"},execute:async s=>{let r=await c(s);try{return(await r.delete(o)).data}catch(i){d(i)}}}},un=(e,n)=>{let o=`/v1/clients/${e}/recipients`;return{input:{clientId:e,params:n},metadata:{commandName:"GetRecipients",path:o,method:"GET"},execute:async s=>{let r=await c(s);(!n.limit||n.limit<=0)&&(n.limit=20),n.name||(n.name="");try{return(await r.get(o,{params:n})).data}catch(i){d(i)}}}};var mn=()=>{let e="/v1/userdetails";return{input:{},metadata:{commandName:"GetUserDetail",path:e,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(e)).data}catch(s){d(s)}}}},pn=e=>{let n="/v1/users";return{input:{requestData:e},metadata:{commandName:"EnableSelfServiceAccess",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},ln=e=>{let{userId:n,...o}=e,s=`/v1/users/${n}`;return{input:{requestData:e},metadata:{commandName:"UpdateSelfServiceUser",path:s,method:"PUT"},execute:async r=>{let i=await c(r);try{return(await i.put(s,{...o,isSelfServiceUser:!0})).data}catch(u){d(u)}}}},Cn=e=>{let n=`/v1/users/${e}`;return{input:{userId:e},metadata:{commandName:"DeleteSelfServiceUser",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){d(r)}}}};var fn=(e={})=>{let n="/v1/cardproducts",o=new URLSearchParams;o.append("limit",e?.limit?.toString()||"0"),o.append("offset",e?.offset?.toString()||"0");let s=o.toString(),r=`${n}?${s}`;return{input:{params:e},metadata:{commandName:"ListCardProduct",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){d(p)}}}},hn=e=>{let n=`/v1/cardproducts/${e}`;return{input:{cardProductId:e},metadata:{commandName:"GetCardProduct",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},yn=e=>{let n="/v1/cardproducts";return{input:{params:e},metadata:{commandName:"CreateCardProduct",path:n,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(n,e)).data}catch(r){d(r)}}}},gn=(e,n)=>{let o=`/v1/cardproducts/${e}`;return{input:{cardProductId:e,params:n},metadata:{commandName:"UpdateCardProduct",path:o,method:"PUT"},execute:async s=>{let r=await c(s);try{return(await r.put(o,n)).data}catch(i){d(i)}}}};var S=(e,n)=>{let o=new URLSearchParams;return o.append("type",n.toString()),`${e}?${o.toString()}`},bn=e=>{let n=`/v1/client/${e}/addresses`;return{input:{clientId:e},metadata:{commandName:"GetClientAddress",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Rn=(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"CreateClientAddress",path:r,method:"POST"},execute:async i=>{let u=await c(i);try{return(await u.post(r,o)).data}catch(p){d(p)}}}},xn=(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"UpdateClientAddress",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){d(p)}}}},An=(e,n,o)=>{let s=`/v1/client/${e}/addresses`,r=S(s,n);return{input:{clientId:e,type:n,params:o},metadata:{commandName:"SetClientAddressStatus",path:r,method:"PUT"},execute:async i=>{let u=await c(i);try{return(await u.put(r,o)).data}catch(p){d(p)}}}};var Sn=e=>{let n=`/v1/clients/${e}/classifications`;return{input:{clientId:e},metadata:{commandName:"GetClientClassification",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},In=(e,n)=>{let o=`/v1/clients/${e}?command=switchclassification`;return{input:{clientId:e,params:n},metadata:{commandName:"SwitchClientClassification",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}};var vn=()=>({input:{},metadata:{commandName:"GetConfigurations",path:"/v1/configurations",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/configurations")).data}catch(o){d(o)}}}),Dn=e=>({input:{configName:e},metadata:{commandName:"GetConfigurationByName",path:`/v1/configurations/name/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/configurations/name/${e}`)).data}catch(s){d(s)}}}),Tn=(e,n)=>({input:{configId:e,requestData:n},metadata:{commandName:"EnableDisableConfiguration",path:`/v1/configurations/${e}`,method:"PUT"},execute:async o=>{let s=await c(o);try{return(await s.put(`/v1/configurations/${e}`,n)).data}catch(r){d(r)}}});var qn=e=>({input:{params:e},metadata:{commandName:"CreateFixedDepositAccount",path:"/v1/fixeddepositaccounts",method:"POST"},async execute(n){try{return(await(await c(n)).post("/v1/fixeddepositaccounts?command=submit,approve,activate",e)).data}catch(o){throw d(o)}}}),Pn=e=>({input:{accountId:e},metadata:{commandName:"GetFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"GET"},async execute(n){try{return(await(await c(n)).get(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw d(o)}}}),wn=(e,n)=>({input:{accountId:e,params:n},metadata:{commandName:"UpdateFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"PUT"},async execute(o){try{return(await(await c(o)).put(`/v1/fixeddepositaccounts/${e}`,n)).data}catch(s){throw d(s)}}}),Gn=e=>({input:{accountId:e},metadata:{commandName:"DeleteFixedDepositAccount",path:`/v1/fixeddepositaccounts/${e}`,method:"DELETE"},async execute(n){try{return(await(await c(n)).delete(`/v1/fixeddepositaccounts/${e}`)).data}catch(o){throw d(o)}}});var En=e=>{let n=`/v1/clients/${e}/externalCards`;return{input:{clientId:e},metadata:{commandName:"GetAcquiredCards",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Ln=e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"GetAcquiredCardById",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},Un=(e,n)=>{let o=`/v1/clients/${e}/externalCards`;return{input:{clientId:e,params:n},metadata:{commandName:"AddAcquiredCard",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},Nn=(e,n)=>{let o=`/v1/clients/${e}?command=blockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"BlockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},On=(e,n)=>{let o=`/v1/clients/${e}?command=unblockExternalCardsAddition`;return{input:{clientId:e,params:n},metadata:{commandName:"UnblockAcquiredCardAddition",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},kn=e=>{let n=`/v1/clients/${e.clientId}/externalCards/${e.acquiredCardId}`;return{input:{...e},metadata:{commandName:"DeleteAcquiredCard",path:n,method:"DELETE"},execute:async o=>{let s=await c(o);try{return(await s.delete(n)).data}catch(r){d(r)}}}},$n=()=>{let e="/v1/externalCards/key";return{input:void 0,metadata:{commandName:"GetAcquiredCardPublicKey",path:e,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(e)).data}catch(s){d(s)}}}};var Bn=e=>({input:{subscriberId:e},metadata:{commandName:"GetSubscriber",path:`/v1/subscribers/${e}`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/subscribers/${e}`)).data}catch(s){d(s)}}});var zn=e=>({input:{requestData:e},metadata:{commandName:"CreateLoan",path:"/v1/loans",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans",e)).data}catch(s){d(s)}}}),Fn=(e,n)=>({input:{loanIdForApprove:e,requestData:n},metadata:{commandName:"ApproveLoan",path:`/v1/loans/${e}?command=approve`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=approve`,n)).data}catch(r){d(r)}}}),jn=(e,n,o)=>({input:{loanId:e,associations:n,exclude:o},metadata:{commandName:"GetLoanById",path:`/v1/loans/${e}`,method:"GET"},execute:async s=>{let r=await c(s);try{let i={};return n&&(i.associations=n),o&&(i.exclude=o),(await r.get(`/v1/loans/${e}`,Object.keys(i).length>0?{params:i}:void 0)).data}catch(i){d(i)}}}),_n=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"DisburseLoanToLinkedAccount",path:`/v1/loans/${e}?command=disburseToSavings`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburseToSavings`,n)).data}catch(r){d(r)}}}),Vn=(e,n)=>({input:{loanIdForDisburse:e,requestData:n},metadata:{commandName:"DisburseLoan",path:`/v1/loans/${e}?command=disburse`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=disburse`,n)).data}catch(r){d(r)}}}),Mn=e=>({input:{requestData:e},metadata:{commandName:"CalculateLoanSchedule",path:"/v1/loans?command=calculateLoanSchedule",method:"POST"},execute:async n=>{let o=await c(n);try{return(await o.post("/v1/loans?command=calculateLoanSchedule",e)).data}catch(s){d(s)}}}),Wn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"MakeRepayment",path:`/v1/loans/${e}/transactions?command=repayment`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}/transactions?command=repayment`,n)).data}catch(r){d(r)}}}),Kn=(e,n)=>{let o=new URLSearchParams;o.append("command","preclosure"),n?.transactionDate&&o.append("transactionDate",n.transactionDate),n?.locale&&o.append("locale",n.locale),n?.dateFormat&&o.append("dateFormat",n.dateFormat);let s=o.toString(),r=`/v1/loans/${e}/transactions/template?${s}`;return{input:{loanId:e,params:n},metadata:{commandName:"GetLoanPreclosureTemplate",path:r,method:"GET"},execute:async i=>{let u=await c(i);try{return(await u.get(r)).data}catch(p){d(p)}}}},Qn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"PreCloseLoan",path:`/v1/loans/${e}?command=preclosure`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=preclosure`,n)).data}catch(r){d(r)}}}),Hn=(e,n)=>({input:{loanId:e,transactionId:n},metadata:{commandName:"GetLoanTransactionDetails",path:`/v1/loans/${e}/transactions/${n}`,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(`/v1/loans/${e}/transactions/${n}`)).data}catch(r){d(r)}}}),Yn=e=>({input:{loanId:e},metadata:{commandName:"GetLoanWriteoffTemplate",path:`/v1/loans/${e}/transactions/template?command=writeoff`,method:"GET"},execute:async n=>{let o=await c(n);try{return(await o.get(`/v1/loans/${e}/transactions/template?command=writeoff`)).data}catch(s){d(s)}}}),Jn=(e,n)=>({input:{loanId:e,requestData:n},metadata:{commandName:"WriteLoanOff",path:`/v1/loans/${e}?command=writeoff`,method:"POST"},execute:async o=>{let s=await c(o);try{return(await s.post(`/v1/loans/${e}?command=writeoff`,n)).data}catch(r){d(r)}}}),Zn=()=>({input:{},metadata:{commandName:"GetLoanSearchTemplate",path:"/v1/search/template",method:"GET"},execute:async e=>{let n=await c(e);try{return(await n.get("/v1/search/template")).data}catch(o){d(o)}}}),Xn=(e,n)=>({input:{query:e,requestData:n},metadata:{commandName:"GetSearchData",path:"/v1/search",method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get("/v1/search",{params:{query:e,...n}})).data}catch(r){d(r)}}});var ea=(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges`;return{input:{accountId:e,params:n},metadata:{commandName:"AddChargeToAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},ta=e=>{let n=`/v1/savingsaccounts/${e}?associations=charges`;return{input:{accountIdForAccountCharges:e},metadata:{commandName:"GetChargesByAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},na=(e,n)=>{let o=`/v1/loans/${e}/charges`;return{input:{loanAccountId:e,params:n},metadata:{commandName:"AddChargeToLoanAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o,n)).data}catch(i){d(i)}}}},aa=e=>{let n=`/v1/loans/${e}/charges`;return{input:{loanIdForCharge:e},metadata:{commandName:"GetChargesByLoanAccountId",path:n,method:"GET"},execute:async o=>{let s=await c(o);try{return(await s.get(n)).data}catch(r){d(r)}}}},oa=(e,n)=>{let o=`/v1/savingsaccounts/${e}/charges/${n}?command=waive`;return{input:{accountId:e,chargeId:n},metadata:{commandName:"WaiveChargeFromAccount",path:o,method:"POST"},execute:async s=>{let r=await c(s);try{return(await r.post(o)).data}catch(i){d(i)}}}},ra=(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/transactions/${n}?command=undo`;return{input:{accountId:e,transactionId:n,params:o},metadata:{commandName:"UndoChargeToAccount",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){d(u)}}}},sa=(e,n,o)=>{let s=`/v1/savingsaccounts/${e}/charges/${n}?command=paycharge`;return{input:{accountId:e,chargeId:n,params:o},metadata:{commandName:"PayAccountCharge",path:s,method:"POST"},execute:async r=>{let i=await c(r);try{return(await i.post(s,o)).data}catch(u){d(u)}}}};export{we as ActivateCard,be as ActivatePhysicalCard,Un as AddAcquiredCard,Ae as AddCardToMobileWallet,ea as AddChargeToAccount,na as AddChargeToLoanAccount,Fn as ApproveLoan,He as ApproveRejectClientDocument,zt as BlockAccount,Nn as BlockAcquiredCardAddition,Mn as CalculateLoanSchedule,ge as ChangeCardType,$t as CloseAccount,Kt as CreateAccountProduct,kt as CreateAndActivateAccount,ye as CreateCard,yn as CreateCardProduct,bt as CreateClient,Rn as CreateClientAddress,Me as CreateClientIdentifier,qn as CreateFixedDepositAccount,zn as CreateLoan,qt as CreatePayment,Le as CreatePrepaidCard,cn as CreateRecipient,vt as CreateTransfer,on as CustomCreate,rn as CustomGet,an as CustomUpdate,Oe as DeactivatePrepaidCard,Nt as DeleteAccount,kn as DeleteAcquiredCard,xt as DeleteClient,Qe as DeleteClientDocument,Gn as DeleteFixedDepositAccount,Et as DeletePayment,dn as DeleteRecipient,Cn as DeleteSelfServiceUser,Vn as DisburseLoan,_n as DisburseLoanToLinkedAccount,Zt as DownloadAccountStatement,Tn as EnableDisableConfiguration,pn as EnableSelfServiceAccess,Jt as GenerateAccountStatement,Lt as GetAccount,Xt as GetAccountDocumentsDetails,Yt as GetAccountProductById,Ot as GetAccountsOfClient,Ln as GetAcquiredCardById,$n as GetAcquiredCardPublicKey,En as GetAcquiredCards,Ht as GetAllAccountProducts,Wt as GetBankDetailsFromRoutingCode,ve as GetCardAuthorizationById,he as GetCardAuthorizations,Ce as GetCardById,fe as GetCardImageUrl,hn as GetCardProduct,Te as GetCardSettlementById,De as GetCardSettlements,le as GetCards,ta as GetChargesByAccountId,aa as GetChargesByLoanAccountId,yt as GetClient,bn as GetClientAddress,Sn as GetClientClassification,Rt as GetClients,_t as GetCompletedTransactions,Dn as GetConfigurationByName,vn as GetConfigurations,Pn as GetFixedDepositAccount,jn as GetLoanById,Kn as GetLoanPreclosureTemplate,Zn as GetLoanSearchTemplate,Hn as GetLoanTransactionDetails,Yn as GetLoanWriteoffTemplate,Pt as GetPayment,Gt as GetPayments,jt as GetPendingTransactions,_e as GetPermittedDocumentTypes,Ne as GetPrepaidCardById,Ue as GetPrepaidCardsByAccountId,Vt as GetRecentTransactions,sn as GetRecipient,un as GetRecipients,Xn as GetSearchData,St as GetStatusOfVerifyClient,Bn as GetSubscriber,Mt as GetTransactionById,Dt as GetTransfer,Tt as GetTransfers,mn as GetUserDetail,A as GraphQL,Ft as HoldAmount,fn as ListCardProduct,Ve as ListClientDocument,Wn as MakeRepayment,Re as OrderPhysicalCard,sa as PayAccountCharge,Qn as PreCloseLoan,Ee as RenewCard,Ge as ReplaceCard,Bt as ScheduleAccountClosure,An as SetClientAddressStatus,xe as SetPIN,Pe as SuspendCard,In as SwitchClientClassification,qe as TerminateCard,On as UnblockAcquiredCardAddition,ra as UndoChargeToAccount,Ut as UpdateAccount,Qt as UpdateAccountProduct,Se as UpdateCardFeature,Ie as UpdateCardLimit,gn as UpdateCardProduct,gt as UpdateClient,xn as UpdateClientAddress,We as UpdateClientIdentifier,wn as UpdateFixedDepositAccount,wt as UpdatePayment,tn as UpdateRecipient,ln as UpdateSelfServiceUser,Ke as UploadClientIdentifierDocument,At as VerifyWithActivateClients,oa as WaiveChargeFromAccount,Jn as WriteLoanOff};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbanq/core-sdk-js",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "description": "A comprehensive JavaScript SDK for interacting with the Mbanq payment API. Features type-safe payment operations, multi-tenant support, and Zod validation.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",