@develit-services/bank 0.0.31 → 0.0.32
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 -2
- 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 -2
- package/dist/export/worker.cjs +58 -69
- package/dist/export/worker.d.cts +21 -10
- package/dist/export/worker.d.mts +21 -10
- package/dist/export/worker.d.ts +21 -10
- package/dist/export/worker.mjs +59 -66
- package/dist/shared/{bank.D8o86NLF.d.mts → bank.-qiBc98X.d.mts} +63 -11
- package/dist/shared/{bank.DbNuuGvb.mjs → bank.A5zjotaU.mjs} +1 -1
- package/dist/shared/{bank.CtUeOz8i.d.ts → bank.BRiDHyNf.d.ts} +63 -11
- package/dist/shared/{bank.DuY4d2y_.cjs → bank.BiZtZWed.cjs} +1 -1
- package/dist/shared/{bank.BMRBXGF1.cjs → bank.Dx7kRjFL.cjs} +18 -10
- package/dist/shared/{bank.DUalSuEK.d.cts → bank._5C74-4K.d.cts} +63 -11
- package/dist/shared/{bank.Nf6oaNfB.d.cts → bank.e_XSg9KV.d.cts} +25 -6
- package/dist/shared/{bank.Nf6oaNfB.d.mts → bank.e_XSg9KV.d.mts} +25 -6
- package/dist/shared/{bank.Nf6oaNfB.d.ts → bank.e_XSg9KV.d.ts} +25 -6
- package/dist/shared/{bank.YCUhOduX.mjs → bank.uJ3YtInA.mjs} +18 -10
- package/dist/types.cjs +2 -3
- package/dist/types.d.cts +66 -68
- package/dist/types.d.mts +66 -68
- package/dist/types.d.ts +66 -68
- package/dist/types.mjs +2 -3
- package/package.json +1 -1
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.-qiBc98X.mjs';
|
|
2
|
+
export { w as ACCOUNT_STATUSES, U as AccountCredentialsPatchType, V as AccountCredentialsSelectType, S as AccountCredentialsUpdateType, M as AccountPatchType, x as AccountStatus, L as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, z as BankAccountWithLastSync, D as CONNECTOR_KEYS, y as COUNTRY_CODES, E as CREDENTIALS_TYPES, C as ConfigEnvironmentBank, F as CredentialsType, O as OutgoingPaymentMessage, u as PAYMENT_DIRECTIONS, t as PAYMENT_STATUSES, r as PAYMENT_TYPES, v as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, G as TokenType, N as accountCredentialsInsertSchema, R as accountCredentialsSelectSchema, Q as accountCredentialsUpdateSchema, H as accountInsertSchema, K as accountSelectSchema, J as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.-qiBc98X.mjs';
|
|
3
|
+
import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.e_XSg9KV.mjs';
|
|
4
|
+
export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.e_XSg9KV.mjs';
|
|
5
5
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
6
6
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
7
7
|
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.mjs';
|
|
@@ -11,6 +11,65 @@ import { z } from 'zod';
|
|
|
11
11
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
12
12
|
import 'drizzle-orm';
|
|
13
13
|
|
|
14
|
+
interface ErsteConnectorConfig {
|
|
15
|
+
API_KEY: string;
|
|
16
|
+
CLIENT_ID: string;
|
|
17
|
+
CLIENT_SECRET: string;
|
|
18
|
+
REDIRECT_URI: string;
|
|
19
|
+
AUTH_URI: string;
|
|
20
|
+
PAYMENTS_URI: string;
|
|
21
|
+
ACCOUNTS_URI: string;
|
|
22
|
+
connectedAccounts: ConnectedAccount[];
|
|
23
|
+
}
|
|
24
|
+
declare class ErsteConnector extends IBankConnector {
|
|
25
|
+
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
26
|
+
static readonly FETCH_INTERVAL: number;
|
|
27
|
+
private readonly API_KEY;
|
|
28
|
+
private readonly CLIENT_ID;
|
|
29
|
+
private readonly CLIENT_SECRET;
|
|
30
|
+
private readonly AUTH_URI;
|
|
31
|
+
private readonly PAYMENTS_URI;
|
|
32
|
+
private readonly REDIRECT_URI;
|
|
33
|
+
private readonly ACCOUNTS_URI;
|
|
34
|
+
connectorKey: ConnectorKey;
|
|
35
|
+
connectedAccounts: ConnectedAccount[];
|
|
36
|
+
private accessToken;
|
|
37
|
+
constructor(config: ErsteConnectorConfig);
|
|
38
|
+
getAuthUri({ ott }: {
|
|
39
|
+
ott: string;
|
|
40
|
+
}): Promise<string>;
|
|
41
|
+
authorizeAccount({ urlParams }: {
|
|
42
|
+
urlParams: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
credentials: AccountCredentialsInsertType[];
|
|
45
|
+
accounts: AccountInsertType[];
|
|
46
|
+
}>;
|
|
47
|
+
authenticate(tokens?: {
|
|
48
|
+
refreshToken?: string;
|
|
49
|
+
token?: string;
|
|
50
|
+
}): Promise<string>;
|
|
51
|
+
listAccounts(): Promise<[]>;
|
|
52
|
+
preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
|
|
53
|
+
initiateBatchFromPayments({ payments, }: {
|
|
54
|
+
payments: PaymentPreparedInsertType[];
|
|
55
|
+
}): Promise<InitiatedBatch>;
|
|
56
|
+
initiateSinglePayment(): Promise<InitiatedPayment>;
|
|
57
|
+
sendBatchPaymentForAuthorization(paymentIds: string[]): Promise<BatchMetadata>;
|
|
58
|
+
getBatchAuthorizationURI({ signId, signHash, }: {
|
|
59
|
+
signId: string;
|
|
60
|
+
signHash: string;
|
|
61
|
+
}): Promise<string>;
|
|
62
|
+
getAllAccountPayments({ account, }: {
|
|
63
|
+
account: AccountSelectType;
|
|
64
|
+
}): Promise<PaymentInsertType[]>;
|
|
65
|
+
getPaymentStatus(_: {
|
|
66
|
+
paymentId: string;
|
|
67
|
+
}): Promise<PaymentStatus>;
|
|
68
|
+
getBatchStatus(_: {
|
|
69
|
+
batchId: string;
|
|
70
|
+
}): Promise<BatchStatus>;
|
|
71
|
+
}
|
|
72
|
+
|
|
14
73
|
type FinbricksProvider = 'KB' | 'ERSTE' | 'CSOB' | 'MOCK_COBS' | 'CREDITAS' | 'FIO' | 'MONETA';
|
|
15
74
|
declare const FINBRICKS_TRANSACTION_STATUSES: readonly ["OPENED", "AUTHORIZED", "COMPLETED", "BOOKED", "SETTLED", "REJECTED", "CLOSED"];
|
|
16
75
|
type FinbricksTransactionStatus = (typeof FINBRICKS_TRANSACTION_STATUSES)[number];
|
|
@@ -355,9 +414,8 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
355
414
|
}): Promise<InitiatedBatch>;
|
|
356
415
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
357
416
|
initiateSinglePayment(payment: PaymentPreparedInsertType): Promise<InitiatedPayment>;
|
|
358
|
-
getAllAccountPayments({ account,
|
|
359
|
-
account:
|
|
360
|
-
lastSync: SyncLog;
|
|
417
|
+
getAllAccountPayments({ account, }: {
|
|
418
|
+
account: AccountSelectType;
|
|
361
419
|
db: DrizzleD1Database<typeof tables>;
|
|
362
420
|
env: Environment;
|
|
363
421
|
}): Promise<PaymentInsertType[]>;
|
|
@@ -369,66 +427,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
369
427
|
}): Promise<BatchStatus>;
|
|
370
428
|
}
|
|
371
429
|
|
|
372
|
-
interface ErsteConnectorConfig {
|
|
373
|
-
API_KEY: string;
|
|
374
|
-
CLIENT_ID: string;
|
|
375
|
-
CLIENT_SECRET: string;
|
|
376
|
-
REDIRECT_URI: string;
|
|
377
|
-
AUTH_URI: string;
|
|
378
|
-
PAYMENTS_URI: string;
|
|
379
|
-
ACCOUNTS_URI: string;
|
|
380
|
-
connectedAccounts: ConnectedAccount[];
|
|
381
|
-
}
|
|
382
|
-
declare class ErsteConnector extends IBankConnector {
|
|
383
|
-
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
384
|
-
static readonly FETCH_INTERVAL: number;
|
|
385
|
-
private readonly API_KEY;
|
|
386
|
-
private readonly CLIENT_ID;
|
|
387
|
-
private readonly CLIENT_SECRET;
|
|
388
|
-
private readonly AUTH_URI;
|
|
389
|
-
private readonly PAYMENTS_URI;
|
|
390
|
-
private readonly REDIRECT_URI;
|
|
391
|
-
private readonly ACCOUNTS_URI;
|
|
392
|
-
connectorKey: ConnectorKey;
|
|
393
|
-
connectedAccounts: ConnectedAccount[];
|
|
394
|
-
private accessToken;
|
|
395
|
-
constructor(config: ErsteConnectorConfig);
|
|
396
|
-
getAuthUri({ ott }: {
|
|
397
|
-
ott: string;
|
|
398
|
-
}): Promise<string>;
|
|
399
|
-
authorizeAccount({ urlParams }: {
|
|
400
|
-
urlParams: string;
|
|
401
|
-
}): Promise<{
|
|
402
|
-
credentials: AccountCredentialsInsertType[];
|
|
403
|
-
accounts: AccountInsertType[];
|
|
404
|
-
}>;
|
|
405
|
-
authenticate(tokens?: {
|
|
406
|
-
refreshToken?: string;
|
|
407
|
-
token?: string;
|
|
408
|
-
}): Promise<string>;
|
|
409
|
-
listAccounts(): Promise<[]>;
|
|
410
|
-
preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
|
|
411
|
-
initiateBatchFromPayments({ payments, }: {
|
|
412
|
-
payments: PaymentPreparedInsertType[];
|
|
413
|
-
}): Promise<InitiatedBatch>;
|
|
414
|
-
initiateSinglePayment(): Promise<InitiatedPayment>;
|
|
415
|
-
sendBatchPaymentForAuthorization(paymentIds: string[]): Promise<BatchMetadata>;
|
|
416
|
-
getBatchAuthorizationURI({ signId, signHash, }: {
|
|
417
|
-
signId: string;
|
|
418
|
-
signHash: string;
|
|
419
|
-
}): Promise<string>;
|
|
420
|
-
getAllAccountPayments({ account, lastSync, }: {
|
|
421
|
-
account: ConnectedAccount;
|
|
422
|
-
lastSync: SyncLog;
|
|
423
|
-
}): Promise<PaymentInsertType[]>;
|
|
424
|
-
getPaymentStatus(_: {
|
|
425
|
-
paymentId: string;
|
|
426
|
-
}): Promise<PaymentStatus>;
|
|
427
|
-
getBatchStatus(_: {
|
|
428
|
-
batchId: string;
|
|
429
|
-
}): Promise<BatchStatus>;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
430
|
declare class MockConnector extends IBankConnector {
|
|
433
431
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
434
432
|
connectedAccounts: ConnectedAccount[];
|
|
@@ -1054,5 +1052,5 @@ type OneTimeTokenUpdateType = z.infer<typeof ottInsertSchema>;
|
|
|
1054
1052
|
type OneTimeTokenPatchType = z.infer<typeof ottUpdateSchema>;
|
|
1055
1053
|
type OneTimeTokenSelectType = z.infer<typeof ottSelectSchema>;
|
|
1056
1054
|
|
|
1057
|
-
export { AccountCredentialsInsertType, AccountInsertType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
|
|
1055
|
+
export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
|
|
1058
1056
|
export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.BRiDHyNf.js';
|
|
2
|
+
export { w as ACCOUNT_STATUSES, U as AccountCredentialsPatchType, V as AccountCredentialsSelectType, S as AccountCredentialsUpdateType, M as AccountPatchType, x as AccountStatus, L as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, z as BankAccountWithLastSync, D as CONNECTOR_KEYS, y as COUNTRY_CODES, E as CREDENTIALS_TYPES, C as ConfigEnvironmentBank, F as CredentialsType, O as OutgoingPaymentMessage, u as PAYMENT_DIRECTIONS, t as PAYMENT_STATUSES, r as PAYMENT_TYPES, v as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, G as TokenType, N as accountCredentialsInsertSchema, R as accountCredentialsSelectSchema, Q as accountCredentialsUpdateSchema, H as accountInsertSchema, K as accountSelectSchema, J as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.BRiDHyNf.js';
|
|
3
|
+
import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.e_XSg9KV.js';
|
|
4
|
+
export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.e_XSg9KV.js';
|
|
5
5
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
6
6
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
7
7
|
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.js';
|
|
@@ -11,6 +11,65 @@ import { z } from 'zod';
|
|
|
11
11
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
12
12
|
import 'drizzle-orm';
|
|
13
13
|
|
|
14
|
+
interface ErsteConnectorConfig {
|
|
15
|
+
API_KEY: string;
|
|
16
|
+
CLIENT_ID: string;
|
|
17
|
+
CLIENT_SECRET: string;
|
|
18
|
+
REDIRECT_URI: string;
|
|
19
|
+
AUTH_URI: string;
|
|
20
|
+
PAYMENTS_URI: string;
|
|
21
|
+
ACCOUNTS_URI: string;
|
|
22
|
+
connectedAccounts: ConnectedAccount[];
|
|
23
|
+
}
|
|
24
|
+
declare class ErsteConnector extends IBankConnector {
|
|
25
|
+
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
26
|
+
static readonly FETCH_INTERVAL: number;
|
|
27
|
+
private readonly API_KEY;
|
|
28
|
+
private readonly CLIENT_ID;
|
|
29
|
+
private readonly CLIENT_SECRET;
|
|
30
|
+
private readonly AUTH_URI;
|
|
31
|
+
private readonly PAYMENTS_URI;
|
|
32
|
+
private readonly REDIRECT_URI;
|
|
33
|
+
private readonly ACCOUNTS_URI;
|
|
34
|
+
connectorKey: ConnectorKey;
|
|
35
|
+
connectedAccounts: ConnectedAccount[];
|
|
36
|
+
private accessToken;
|
|
37
|
+
constructor(config: ErsteConnectorConfig);
|
|
38
|
+
getAuthUri({ ott }: {
|
|
39
|
+
ott: string;
|
|
40
|
+
}): Promise<string>;
|
|
41
|
+
authorizeAccount({ urlParams }: {
|
|
42
|
+
urlParams: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
credentials: AccountCredentialsInsertType[];
|
|
45
|
+
accounts: AccountInsertType[];
|
|
46
|
+
}>;
|
|
47
|
+
authenticate(tokens?: {
|
|
48
|
+
refreshToken?: string;
|
|
49
|
+
token?: string;
|
|
50
|
+
}): Promise<string>;
|
|
51
|
+
listAccounts(): Promise<[]>;
|
|
52
|
+
preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
|
|
53
|
+
initiateBatchFromPayments({ payments, }: {
|
|
54
|
+
payments: PaymentPreparedInsertType[];
|
|
55
|
+
}): Promise<InitiatedBatch>;
|
|
56
|
+
initiateSinglePayment(): Promise<InitiatedPayment>;
|
|
57
|
+
sendBatchPaymentForAuthorization(paymentIds: string[]): Promise<BatchMetadata>;
|
|
58
|
+
getBatchAuthorizationURI({ signId, signHash, }: {
|
|
59
|
+
signId: string;
|
|
60
|
+
signHash: string;
|
|
61
|
+
}): Promise<string>;
|
|
62
|
+
getAllAccountPayments({ account, }: {
|
|
63
|
+
account: AccountSelectType;
|
|
64
|
+
}): Promise<PaymentInsertType[]>;
|
|
65
|
+
getPaymentStatus(_: {
|
|
66
|
+
paymentId: string;
|
|
67
|
+
}): Promise<PaymentStatus>;
|
|
68
|
+
getBatchStatus(_: {
|
|
69
|
+
batchId: string;
|
|
70
|
+
}): Promise<BatchStatus>;
|
|
71
|
+
}
|
|
72
|
+
|
|
14
73
|
type FinbricksProvider = 'KB' | 'ERSTE' | 'CSOB' | 'MOCK_COBS' | 'CREDITAS' | 'FIO' | 'MONETA';
|
|
15
74
|
declare const FINBRICKS_TRANSACTION_STATUSES: readonly ["OPENED", "AUTHORIZED", "COMPLETED", "BOOKED", "SETTLED", "REJECTED", "CLOSED"];
|
|
16
75
|
type FinbricksTransactionStatus = (typeof FINBRICKS_TRANSACTION_STATUSES)[number];
|
|
@@ -355,9 +414,8 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
355
414
|
}): Promise<InitiatedBatch>;
|
|
356
415
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
357
416
|
initiateSinglePayment(payment: PaymentPreparedInsertType): Promise<InitiatedPayment>;
|
|
358
|
-
getAllAccountPayments({ account,
|
|
359
|
-
account:
|
|
360
|
-
lastSync: SyncLog;
|
|
417
|
+
getAllAccountPayments({ account, }: {
|
|
418
|
+
account: AccountSelectType;
|
|
361
419
|
db: DrizzleD1Database<typeof tables>;
|
|
362
420
|
env: Environment;
|
|
363
421
|
}): Promise<PaymentInsertType[]>;
|
|
@@ -369,66 +427,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
369
427
|
}): Promise<BatchStatus>;
|
|
370
428
|
}
|
|
371
429
|
|
|
372
|
-
interface ErsteConnectorConfig {
|
|
373
|
-
API_KEY: string;
|
|
374
|
-
CLIENT_ID: string;
|
|
375
|
-
CLIENT_SECRET: string;
|
|
376
|
-
REDIRECT_URI: string;
|
|
377
|
-
AUTH_URI: string;
|
|
378
|
-
PAYMENTS_URI: string;
|
|
379
|
-
ACCOUNTS_URI: string;
|
|
380
|
-
connectedAccounts: ConnectedAccount[];
|
|
381
|
-
}
|
|
382
|
-
declare class ErsteConnector extends IBankConnector {
|
|
383
|
-
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
384
|
-
static readonly FETCH_INTERVAL: number;
|
|
385
|
-
private readonly API_KEY;
|
|
386
|
-
private readonly CLIENT_ID;
|
|
387
|
-
private readonly CLIENT_SECRET;
|
|
388
|
-
private readonly AUTH_URI;
|
|
389
|
-
private readonly PAYMENTS_URI;
|
|
390
|
-
private readonly REDIRECT_URI;
|
|
391
|
-
private readonly ACCOUNTS_URI;
|
|
392
|
-
connectorKey: ConnectorKey;
|
|
393
|
-
connectedAccounts: ConnectedAccount[];
|
|
394
|
-
private accessToken;
|
|
395
|
-
constructor(config: ErsteConnectorConfig);
|
|
396
|
-
getAuthUri({ ott }: {
|
|
397
|
-
ott: string;
|
|
398
|
-
}): Promise<string>;
|
|
399
|
-
authorizeAccount({ urlParams }: {
|
|
400
|
-
urlParams: string;
|
|
401
|
-
}): Promise<{
|
|
402
|
-
credentials: AccountCredentialsInsertType[];
|
|
403
|
-
accounts: AccountInsertType[];
|
|
404
|
-
}>;
|
|
405
|
-
authenticate(tokens?: {
|
|
406
|
-
refreshToken?: string;
|
|
407
|
-
token?: string;
|
|
408
|
-
}): Promise<string>;
|
|
409
|
-
listAccounts(): Promise<[]>;
|
|
410
|
-
preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
|
|
411
|
-
initiateBatchFromPayments({ payments, }: {
|
|
412
|
-
payments: PaymentPreparedInsertType[];
|
|
413
|
-
}): Promise<InitiatedBatch>;
|
|
414
|
-
initiateSinglePayment(): Promise<InitiatedPayment>;
|
|
415
|
-
sendBatchPaymentForAuthorization(paymentIds: string[]): Promise<BatchMetadata>;
|
|
416
|
-
getBatchAuthorizationURI({ signId, signHash, }: {
|
|
417
|
-
signId: string;
|
|
418
|
-
signHash: string;
|
|
419
|
-
}): Promise<string>;
|
|
420
|
-
getAllAccountPayments({ account, lastSync, }: {
|
|
421
|
-
account: ConnectedAccount;
|
|
422
|
-
lastSync: SyncLog;
|
|
423
|
-
}): Promise<PaymentInsertType[]>;
|
|
424
|
-
getPaymentStatus(_: {
|
|
425
|
-
paymentId: string;
|
|
426
|
-
}): Promise<PaymentStatus>;
|
|
427
|
-
getBatchStatus(_: {
|
|
428
|
-
batchId: string;
|
|
429
|
-
}): Promise<BatchStatus>;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
430
|
declare class MockConnector extends IBankConnector {
|
|
433
431
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
434
432
|
connectedAccounts: ConnectedAccount[];
|
|
@@ -1054,5 +1052,5 @@ type OneTimeTokenUpdateType = z.infer<typeof ottInsertSchema>;
|
|
|
1054
1052
|
type OneTimeTokenPatchType = z.infer<typeof ottUpdateSchema>;
|
|
1055
1053
|
type OneTimeTokenSelectType = z.infer<typeof ottSelectSchema>;
|
|
1056
1054
|
|
|
1057
|
-
export { AccountCredentialsInsertType, AccountInsertType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
|
|
1055
|
+
export { AccountCredentialsInsertType, AccountInsertType, AccountSelectType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
|
|
1058
1056
|
export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
|
package/dist/types.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, e as CONNECTOR_KEYS, C as COUNTRY_CODES, f as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, M as MockConnector, d as PAYMENT_DIRECTIONS, c as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, j as accountCredentialsInsertSchema, l as accountCredentialsSelectSchema, k as accountCredentialsUpdateSchema, g as accountInsertSchema, i as accountSelectSchema, h as accountUpdateSchema, o as ottInsertSchema, n as ottSelectSchema, m as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.
|
|
2
|
-
export { M as MockCobsConnector } from './shared/bank.
|
|
1
|
+
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, e as CONNECTOR_KEYS, C as COUNTRY_CODES, f as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, M as MockConnector, d as PAYMENT_DIRECTIONS, c as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, j as accountCredentialsInsertSchema, l as accountCredentialsSelectSchema, k as accountCredentialsUpdateSchema, g as accountInsertSchema, i as accountSelectSchema, h as accountUpdateSchema, o as ottInsertSchema, n as ottSelectSchema, m as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.uJ3YtInA.mjs';
|
|
2
|
+
export { M as MockCobsConnector } from './shared/bank.A5zjotaU.mjs';
|
|
3
3
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
5
5
|
import 'drizzle-orm';
|
|
@@ -9,4 +9,3 @@ import 'drizzle-zod';
|
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import 'date-fns';
|
|
11
11
|
import 'drizzle-orm/relations';
|
|
12
|
-
import 'superjson';
|