@develit-services/bank 0.8.6 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/schema.cjs +1 -1
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +583 -146
- package/dist/export/worker.d.cts +251 -39
- package/dist/export/worker.d.mts +251 -39
- package/dist/export/worker.d.ts +251 -39
- package/dist/export/worker.mjs +584 -147
- package/dist/export/workflows.cjs +132 -16
- package/dist/export/workflows.mjs +133 -17
- package/dist/shared/{bank.C-T1FQxg.cjs → bank.62VzK9Aj.cjs} +1 -1
- package/dist/shared/{bank.SQ4Mmr8u.cjs → bank.BS7fFjGA.cjs} +34 -4
- package/dist/shared/{bank.B6U8sUZn.d.mts → bank.BYRq3yJf.d.ts} +17 -7
- package/dist/shared/{bank.C4VOdIx1.mjs → bank.C0UN6luZ.mjs} +34 -4
- package/dist/shared/{bank.DDHrdFgy.mjs → bank.CA5ytXxp.mjs} +1 -1
- package/dist/shared/{bank.BoMDujsl.d.ts → bank.CO89tR9U.d.cts} +17 -7
- package/dist/shared/{bank.BliD3oCT.d.ts → bank.Cns5ss41.d.cts} +47 -10
- package/dist/shared/{bank.BliD3oCT.d.cts → bank.Cns5ss41.d.mts} +47 -10
- package/dist/shared/{bank.BliD3oCT.d.mts → bank.Cns5ss41.d.ts} +47 -10
- package/dist/shared/{bank.lbzMqyr3.d.cts → bank.CreoSb2d.d.mts} +17 -7
- package/dist/shared/{bank.DRrBrAdI.mjs → bank.D1jqaHaF.mjs} +91 -31
- package/dist/shared/{bank.Cpy9PULF.mjs → bank.DEmzZGZW.mjs} +31 -5
- package/dist/shared/{bank.BOnP9p9Y.cjs → bank.Dm8GHThw.cjs} +31 -5
- package/dist/shared/{bank.CQURey1E.cjs → bank.DwyCCyd0.cjs} +90 -31
- package/dist/types.cjs +3 -4
- package/dist/types.d.cts +8 -16
- package/dist/types.d.mts +8 -16
- package/dist/types.d.ts +8 -16
- package/dist/types.mjs +3 -3
- package/package.json +2 -2
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey,
|
|
2
|
-
export {
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, e as ConnectedAccount, c as PaymentType, f as CredentialsResolver, g as AccountCredentialsInsertType, h as AccountInsertType, i as BatchedPayment, j as InitiatedBatch, k as IncomingPayment, l as InitiatedPayment, A as AccountSelectType, m as ParsedBankPayment, n as PaymentStatus, o as BatchStatus, p as BatchMetadata, q as Currency, P as PaymentSelectType, r as AccountAssignedPayment, a as PaymentRequestSelectType, s as PreparedPayment, u as CompletedPayment, v as PaymentRequestInsertType } from './shared/bank.Cns5ss41.cjs';
|
|
2
|
+
export { w as ACCOUNT_STATUSES, x as AccountCredentialsPatchType, y as AccountCredentialsSelectType, z as AccountCredentialsUpdateType, D as AccountPatchType, E as AccountStatus, F as AccountUpdateType, G as BATCH_STATUES, G as BATCH_STATUSES, H as BankAccountWithLastSync, J as BankCode, K as BatchInsertType, M as BatchLifecycle, N as BatchPayment, B as BatchSelectType, O as CHARGE_BEARERS, Q as CONNECTOR_KEYS, R as COUNTRY_CODES, S as CREDENTIALS_TYPES, T as ChargeBearer, U as CompletedBatch, C as ConfigEnvironmentBank, V as CountryCode, W as CreatedBatch, X as CredentialsType, d as CurrencyCode, Y as INSTRUCTION_PRIORITIES, Z as InstructionPriority, L as LastSyncMetadata, _ as PAYMENT_DIRECTIONS, $ as PAYMENT_STATUSES, a0 as PAYMENT_TYPES, a1 as PaymentDirection, a2 as PaymentFailedInsertType, a3 as PaymentInsertType, a4 as PaymentLifecycle, a5 as PaymentPreparedInsertType, a6 as ProcessingBatch, a7 as ReadyToSignBatch, a8 as ResolvedCredentials, a9 as SignedBatch, aa as TOKEN_TYPES, ab as TokenType, ac as accountCredentialsInsertSchema, ad as accountCredentialsSelectSchema, ae as accountCredentialsUpdateSchema, af as accountInsertSchema, ag as accountSelectSchema, ah as accountUpdateSchema, ai as hasPaymentAccountAssigned, aj as isBatchCompleted, ak as isBatchFailed, al as isBatchInitiated, am as isBatchOpen, an as isBatchProcessing, ao as isBatchReadyToSign, ap as isBatchSigned, aq as isPaymentCompleted, ar as isPaymentPrepared } from './shared/bank.Cns5ss41.cjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CO89tR9U.cjs';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, P as PaymentQueueMessage, b as SendPaymentSyncInput } from './shared/bank.CO89tR9U.cjs';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CQBfbG8u.cjs';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
|
@@ -240,6 +240,7 @@ interface FinbricksConnectorConfig {
|
|
|
240
240
|
declare abstract class FinbricksConnector extends IBankConnector {
|
|
241
241
|
connectorKey: ConnectorKey;
|
|
242
242
|
connectedAccounts: ConnectedAccount[];
|
|
243
|
+
supportsPaymentType(paymentType: PaymentType): boolean;
|
|
243
244
|
protected readonly finbricks: FinbricksClient;
|
|
244
245
|
protected readonly PROVIDER: FinbricksProvider;
|
|
245
246
|
constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, resolveCredentials, }: FinbricksConnectorConfig);
|
|
@@ -340,6 +341,7 @@ declare class DbuConnector extends IBankConnector {
|
|
|
340
341
|
}>;
|
|
341
342
|
listAccounts(): Promise<AccountInsertType[]>;
|
|
342
343
|
private resolveIdAccountDebit;
|
|
344
|
+
private resolveAccountDetails;
|
|
343
345
|
private initiateInstantPayment;
|
|
344
346
|
initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
345
347
|
initiateSEPAPayment(_payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
@@ -1333,18 +1335,8 @@ declare function toPreparedPayment(payment: BatchedPayment, bankRefId?: string,
|
|
|
1333
1335
|
* @returns CompletedPayment with final status
|
|
1334
1336
|
*/
|
|
1335
1337
|
declare function toCompletedPayment(payment: PreparedPayment, status: 'COMPLETED' | 'FAILED', bankRefId: string, processedAt?: Date): CompletedPayment;
|
|
1336
|
-
|
|
1337
|
-
* Batch transform multiple payments
|
|
1338
|
-
*
|
|
1339
|
-
* Helper to transform array of payments using a transformer function.
|
|
1340
|
-
*
|
|
1341
|
-
* @param payments - Array of payments to transform
|
|
1342
|
-
* @param transformer - Transformer function
|
|
1343
|
-
* @returns Array of transformed payments
|
|
1344
|
-
*/
|
|
1345
|
-
declare function batchTransform<TInput, TOutput>(payments: TInput[], transformer: (payment: TInput) => TOutput): TOutput[];
|
|
1346
|
-
declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string): PaymentRequestInsertType;
|
|
1338
|
+
declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
|
|
1347
1339
|
declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
|
|
1348
1340
|
|
|
1349
|
-
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount,
|
|
1341
|
+
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
|
|
1350
1342
|
export type { BankPaymentEvent, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksProvider, FinbricksRequestInit, FinbricksSupportedBanksQuery, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey,
|
|
2
|
-
export {
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, e as ConnectedAccount, c as PaymentType, f as CredentialsResolver, g as AccountCredentialsInsertType, h as AccountInsertType, i as BatchedPayment, j as InitiatedBatch, k as IncomingPayment, l as InitiatedPayment, A as AccountSelectType, m as ParsedBankPayment, n as PaymentStatus, o as BatchStatus, p as BatchMetadata, q as Currency, P as PaymentSelectType, r as AccountAssignedPayment, a as PaymentRequestSelectType, s as PreparedPayment, u as CompletedPayment, v as PaymentRequestInsertType } from './shared/bank.Cns5ss41.mjs';
|
|
2
|
+
export { w as ACCOUNT_STATUSES, x as AccountCredentialsPatchType, y as AccountCredentialsSelectType, z as AccountCredentialsUpdateType, D as AccountPatchType, E as AccountStatus, F as AccountUpdateType, G as BATCH_STATUES, G as BATCH_STATUSES, H as BankAccountWithLastSync, J as BankCode, K as BatchInsertType, M as BatchLifecycle, N as BatchPayment, B as BatchSelectType, O as CHARGE_BEARERS, Q as CONNECTOR_KEYS, R as COUNTRY_CODES, S as CREDENTIALS_TYPES, T as ChargeBearer, U as CompletedBatch, C as ConfigEnvironmentBank, V as CountryCode, W as CreatedBatch, X as CredentialsType, d as CurrencyCode, Y as INSTRUCTION_PRIORITIES, Z as InstructionPriority, L as LastSyncMetadata, _ as PAYMENT_DIRECTIONS, $ as PAYMENT_STATUSES, a0 as PAYMENT_TYPES, a1 as PaymentDirection, a2 as PaymentFailedInsertType, a3 as PaymentInsertType, a4 as PaymentLifecycle, a5 as PaymentPreparedInsertType, a6 as ProcessingBatch, a7 as ReadyToSignBatch, a8 as ResolvedCredentials, a9 as SignedBatch, aa as TOKEN_TYPES, ab as TokenType, ac as accountCredentialsInsertSchema, ad as accountCredentialsSelectSchema, ae as accountCredentialsUpdateSchema, af as accountInsertSchema, ag as accountSelectSchema, ah as accountUpdateSchema, ai as hasPaymentAccountAssigned, aj as isBatchCompleted, ak as isBatchFailed, al as isBatchInitiated, am as isBatchOpen, an as isBatchProcessing, ao as isBatchReadyToSign, ap as isBatchSigned, aq as isPaymentCompleted, ar as isPaymentPrepared } from './shared/bank.Cns5ss41.mjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CreoSb2d.mjs';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, P as PaymentQueueMessage, b as SendPaymentSyncInput } from './shared/bank.CreoSb2d.mjs';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CQBfbG8u.mjs';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
|
@@ -240,6 +240,7 @@ interface FinbricksConnectorConfig {
|
|
|
240
240
|
declare abstract class FinbricksConnector extends IBankConnector {
|
|
241
241
|
connectorKey: ConnectorKey;
|
|
242
242
|
connectedAccounts: ConnectedAccount[];
|
|
243
|
+
supportsPaymentType(paymentType: PaymentType): boolean;
|
|
243
244
|
protected readonly finbricks: FinbricksClient;
|
|
244
245
|
protected readonly PROVIDER: FinbricksProvider;
|
|
245
246
|
constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, resolveCredentials, }: FinbricksConnectorConfig);
|
|
@@ -340,6 +341,7 @@ declare class DbuConnector extends IBankConnector {
|
|
|
340
341
|
}>;
|
|
341
342
|
listAccounts(): Promise<AccountInsertType[]>;
|
|
342
343
|
private resolveIdAccountDebit;
|
|
344
|
+
private resolveAccountDetails;
|
|
343
345
|
private initiateInstantPayment;
|
|
344
346
|
initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
345
347
|
initiateSEPAPayment(_payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
@@ -1333,18 +1335,8 @@ declare function toPreparedPayment(payment: BatchedPayment, bankRefId?: string,
|
|
|
1333
1335
|
* @returns CompletedPayment with final status
|
|
1334
1336
|
*/
|
|
1335
1337
|
declare function toCompletedPayment(payment: PreparedPayment, status: 'COMPLETED' | 'FAILED', bankRefId: string, processedAt?: Date): CompletedPayment;
|
|
1336
|
-
|
|
1337
|
-
* Batch transform multiple payments
|
|
1338
|
-
*
|
|
1339
|
-
* Helper to transform array of payments using a transformer function.
|
|
1340
|
-
*
|
|
1341
|
-
* @param payments - Array of payments to transform
|
|
1342
|
-
* @param transformer - Transformer function
|
|
1343
|
-
* @returns Array of transformed payments
|
|
1344
|
-
*/
|
|
1345
|
-
declare function batchTransform<TInput, TOutput>(payments: TInput[], transformer: (payment: TInput) => TOutput): TOutput[];
|
|
1346
|
-
declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string): PaymentRequestInsertType;
|
|
1338
|
+
declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
|
|
1347
1339
|
declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
|
|
1348
1340
|
|
|
1349
|
-
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount,
|
|
1341
|
+
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
|
|
1350
1342
|
export type { BankPaymentEvent, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksProvider, FinbricksRequestInit, FinbricksSupportedBanksQuery, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey,
|
|
2
|
-
export {
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, e as ConnectedAccount, c as PaymentType, f as CredentialsResolver, g as AccountCredentialsInsertType, h as AccountInsertType, i as BatchedPayment, j as InitiatedBatch, k as IncomingPayment, l as InitiatedPayment, A as AccountSelectType, m as ParsedBankPayment, n as PaymentStatus, o as BatchStatus, p as BatchMetadata, q as Currency, P as PaymentSelectType, r as AccountAssignedPayment, a as PaymentRequestSelectType, s as PreparedPayment, u as CompletedPayment, v as PaymentRequestInsertType } from './shared/bank.Cns5ss41.js';
|
|
2
|
+
export { w as ACCOUNT_STATUSES, x as AccountCredentialsPatchType, y as AccountCredentialsSelectType, z as AccountCredentialsUpdateType, D as AccountPatchType, E as AccountStatus, F as AccountUpdateType, G as BATCH_STATUES, G as BATCH_STATUSES, H as BankAccountWithLastSync, J as BankCode, K as BatchInsertType, M as BatchLifecycle, N as BatchPayment, B as BatchSelectType, O as CHARGE_BEARERS, Q as CONNECTOR_KEYS, R as COUNTRY_CODES, S as CREDENTIALS_TYPES, T as ChargeBearer, U as CompletedBatch, C as ConfigEnvironmentBank, V as CountryCode, W as CreatedBatch, X as CredentialsType, d as CurrencyCode, Y as INSTRUCTION_PRIORITIES, Z as InstructionPriority, L as LastSyncMetadata, _ as PAYMENT_DIRECTIONS, $ as PAYMENT_STATUSES, a0 as PAYMENT_TYPES, a1 as PaymentDirection, a2 as PaymentFailedInsertType, a3 as PaymentInsertType, a4 as PaymentLifecycle, a5 as PaymentPreparedInsertType, a6 as ProcessingBatch, a7 as ReadyToSignBatch, a8 as ResolvedCredentials, a9 as SignedBatch, aa as TOKEN_TYPES, ab as TokenType, ac as accountCredentialsInsertSchema, ad as accountCredentialsSelectSchema, ae as accountCredentialsUpdateSchema, af as accountInsertSchema, ag as accountSelectSchema, ah as accountUpdateSchema, ai as hasPaymentAccountAssigned, aj as isBatchCompleted, ak as isBatchFailed, al as isBatchInitiated, am as isBatchOpen, an as isBatchProcessing, ao as isBatchReadyToSign, ap as isBatchSigned, aq as isPaymentCompleted, ar as isPaymentPrepared } from './shared/bank.Cns5ss41.js';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.BYRq3yJf.js';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, P as PaymentQueueMessage, b as SendPaymentSyncInput } from './shared/bank.BYRq3yJf.js';
|
|
5
5
|
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CQBfbG8u.js';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_zod from 'drizzle-zod';
|
|
@@ -240,6 +240,7 @@ interface FinbricksConnectorConfig {
|
|
|
240
240
|
declare abstract class FinbricksConnector extends IBankConnector {
|
|
241
241
|
connectorKey: ConnectorKey;
|
|
242
242
|
connectedAccounts: ConnectedAccount[];
|
|
243
|
+
supportsPaymentType(paymentType: PaymentType): boolean;
|
|
243
244
|
protected readonly finbricks: FinbricksClient;
|
|
244
245
|
protected readonly PROVIDER: FinbricksProvider;
|
|
245
246
|
constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, resolveCredentials, }: FinbricksConnectorConfig);
|
|
@@ -340,6 +341,7 @@ declare class DbuConnector extends IBankConnector {
|
|
|
340
341
|
}>;
|
|
341
342
|
listAccounts(): Promise<AccountInsertType[]>;
|
|
342
343
|
private resolveIdAccountDebit;
|
|
344
|
+
private resolveAccountDetails;
|
|
343
345
|
private initiateInstantPayment;
|
|
344
346
|
initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
345
347
|
initiateSEPAPayment(_payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
@@ -1333,18 +1335,8 @@ declare function toPreparedPayment(payment: BatchedPayment, bankRefId?: string,
|
|
|
1333
1335
|
* @returns CompletedPayment with final status
|
|
1334
1336
|
*/
|
|
1335
1337
|
declare function toCompletedPayment(payment: PreparedPayment, status: 'COMPLETED' | 'FAILED', bankRefId: string, processedAt?: Date): CompletedPayment;
|
|
1336
|
-
|
|
1337
|
-
* Batch transform multiple payments
|
|
1338
|
-
*
|
|
1339
|
-
* Helper to transform array of payments using a transformer function.
|
|
1340
|
-
*
|
|
1341
|
-
* @param payments - Array of payments to transform
|
|
1342
|
-
* @param transformer - Transformer function
|
|
1343
|
-
* @returns Array of transformed payments
|
|
1344
|
-
*/
|
|
1345
|
-
declare function batchTransform<TInput, TOutput>(payments: TInput[], transformer: (payment: TInput) => TOutput): TOutput[];
|
|
1346
|
-
declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string): PaymentRequestInsertType;
|
|
1338
|
+
declare function toPaymentRequestInsert(payment: AccountAssignedPayment, batchId: string | null): PaymentRequestInsertType;
|
|
1347
1339
|
declare function toBatchedPaymentFromPaymentRequest(sp: PaymentRequestSelectType): BatchedPayment;
|
|
1348
1340
|
|
|
1349
|
-
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount,
|
|
1341
|
+
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CredentialsResolver, CsobConnector, Currency, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksAccount, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, KBConnector, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentRequestInsertType, PaymentRequestSelectType, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toBatchedPaymentFromPaymentRequest, toCompletedPayment, toIncomingPayment, toPaymentRequestInsert, toPreparedPayment, useFinbricksFetch };
|
|
1350
1342
|
export type { BankPaymentEvent, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksBatchBody, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksProvider, FinbricksRequestInit, FinbricksSupportedBanksQuery, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
|
package/dist/types.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as assignAccount,
|
|
2
|
-
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, a as CONNECTOR_KEYS, b as COUNTRY_CODES, c as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, e as PAYMENT_TYPES, T as TOKEN_TYPES, f as accountCredentialsInsertSchema, g as accountCredentialsSelectSchema, h as accountCredentialsUpdateSchema, i as accountInsertSchema, j as accountSelectSchema, k as accountUpdateSchema, o as ottInsertSchema, l as ottSelectSchema, m as ottUpdateSchema } from './shared/bank.
|
|
1
|
+
export { C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.D1jqaHaF.mjs';
|
|
2
|
+
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, a as CONNECTOR_KEYS, b as COUNTRY_CODES, c as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, e as PAYMENT_TYPES, T as TOKEN_TYPES, f as accountCredentialsInsertSchema, g as accountCredentialsSelectSchema, h as accountCredentialsUpdateSchema, i as accountInsertSchema, j as accountSelectSchema, k as accountUpdateSchema, o as ottInsertSchema, l as ottSelectSchema, m as ottUpdateSchema } from './shared/bank.C0UN6luZ.mjs';
|
|
3
3
|
export { h as hasPaymentAccountAssigned, i as isBatchCompleted, a as isBatchFailed, b as isBatchInitiated, c as isBatchOpen, d as isBatchProcessing, e as isBatchReadyToSign, f as isBatchSigned, g as isPaymentCompleted, j as isPaymentPrepared } from './shared/bank.CbAwwIhZ.mjs';
|
|
4
4
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
5
5
|
import '@develit-io/backend-sdk';
|
|
6
6
|
import 'date-fns';
|
|
7
7
|
import 'drizzle-orm';
|
|
8
|
+
import 'drizzle-orm/sqlite-core';
|
|
8
9
|
import 'jose';
|
|
9
10
|
import 'node:crypto';
|
|
10
11
|
import 'drizzle-orm/relations';
|
|
11
|
-
import 'drizzle-orm/sqlite-core';
|
|
12
12
|
import 'drizzle-zod';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/bank",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"jose": "^6.1.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@develit-io/backend-sdk": "^9.
|
|
59
|
+
"@develit-io/backend-sdk": "^9.11.9",
|
|
60
60
|
"@develit-io/general-codes": "^1.19.0",
|
|
61
61
|
"drizzle-orm": "^0.45.0",
|
|
62
62
|
"drizzle-zod": "^0.8.3",
|