@develit-services/bank 0.6.0 → 0.7.1
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/README.md +381 -0
- 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 +47 -36
- package/dist/export/worker.d.cts +76 -27
- package/dist/export/worker.d.mts +76 -27
- package/dist/export/worker.d.ts +76 -27
- package/dist/export/worker.mjs +47 -36
- package/dist/export/workflows.cjs +24 -9
- package/dist/export/workflows.mjs +25 -10
- package/dist/export/wrangler.cjs +7 -6
- package/dist/export/wrangler.d.cts +7 -1
- package/dist/export/wrangler.d.mts +7 -1
- package/dist/export/wrangler.d.ts +7 -1
- package/dist/export/wrangler.mjs +7 -6
- package/dist/shared/{bank.BHU46soy.d.ts → bank.BC06Rbrx.d.cts} +2 -1
- package/dist/shared/{bank.BHU46soy.d.cts → bank.BC06Rbrx.d.mts} +2 -1
- package/dist/shared/{bank.BHU46soy.d.mts → bank.BC06Rbrx.d.ts} +2 -1
- package/dist/shared/{bank.qc8ALZwm.mjs → bank.BnIYdBEF.mjs} +10 -1
- package/dist/shared/{bank.CsJuzqZH.d.cts → bank.C6_7Rch8.d.cts} +785 -30
- package/dist/shared/{bank.CsJuzqZH.d.mts → bank.C6_7Rch8.d.mts} +785 -30
- package/dist/shared/{bank.CsJuzqZH.d.ts → bank.C6_7Rch8.d.ts} +785 -30
- package/dist/shared/{bank.DEvSNsEs.cjs → bank.CTqIXnHg.cjs} +2 -2
- package/dist/shared/{bank.BUSlmr6r.mjs → bank.CTtFAN03.mjs} +1 -1
- package/dist/shared/{bank.Dpx6PvkA.mjs → bank.CbAwwIhZ.mjs} +1 -1
- package/dist/shared/{bank.B-ZnLUcL.mjs → bank.CkUMU1sJ.mjs} +368 -53
- package/dist/shared/{bank.BeIpkWR-.cjs → bank.D7kwLMqF.cjs} +9 -0
- package/dist/shared/{bank.c38V_FCq.cjs → bank.DlW1XNug.cjs} +1 -1
- package/dist/shared/{bank.B51e8oDT.mjs → bank.e8T8fQDG.mjs} +2 -2
- package/dist/shared/{bank.BJroS_i3.cjs → bank.iEgK7rge.cjs} +367 -52
- package/dist/types.cjs +2 -2
- package/dist/types.d.cts +244 -21
- package/dist/types.d.mts +244 -21
- package/dist/types.d.ts +244 -21
- package/dist/types.mjs +3 -3
- package/package.json +12 -14
- package/dist/shared/{bank.CDoYUKBx.d.cts → bank.BVIkpji3.d.cts} +2 -2
- package/dist/shared/{bank.CDoYUKBx.d.mts → bank.BVIkpji3.d.mts} +2 -2
- package/dist/shared/{bank.CDoYUKBx.d.ts → bank.BVIkpji3.d.ts} +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { I as IBankConnector, a as ConnectorKey,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
import { I as IBankConnector, a as ConnectorKey, b as ConnectedAccount, c as PaymentType, d as AccountCredentialsInsertType, e as AccountInsertType, f as BatchedPayment, g as InitiatedPayment, h as InitiatedBatch, A as AccountSelectType, i as ParsedBankPayment, j as PaymentStatus, k as BatchStatus, l as IncomingPayment, m as BatchMetadata, n as CurrencyCode, o as BankCode, p as CountryCode, q as Currency, P as PaymentSelectType, r as AccountAssignedPayment, s as PreparedPayment, u as CompletedPayment } from './shared/bank.C6_7Rch8.js';
|
|
2
|
+
export { v as ACCOUNT_STATUSES, w as AccountCredentialsPatchType, x as AccountCredentialsSelectType, y as AccountCredentialsUpdateType, z as AccountPatchType, D as AccountStatus, E as AccountUpdateType, F as BATCH_STATUES, F as BATCH_STATUSES, G as BankAccountWithLastSync, H as BatchInsertType, J as BatchLifecycle, K as BatchPayment, B as BatchSelectType, M as CHARGE_BEARERS, N as CONNECTOR_KEYS, O as COUNTRY_CODES, Q as CREDENTIALS_TYPES, R as ChargeBearer, S as CompletedBatch, C as ConfigEnvironmentBank, T as CreatedBatch, U as CredentialsType, V as INSTRUCTION_PRIORITIES, W as InstructionPriority, L as LastSyncMetadata, X as PAYMENT_DIRECTIONS, Y as PAYMENT_STATUSES, Z as PAYMENT_TYPES, _ as PaymentDirection, $ as PaymentFailedInsertType, a0 as PaymentInsertType, a1 as PaymentLifecycle, a2 as PaymentPreparedInsertType, a3 as ProcessingBatch, a4 as ReadyToSignBatch, a5 as SignedBatch, a6 as TOKEN_TYPES, a7 as TokenType, a8 as accountCredentialsInsertSchema, a9 as accountCredentialsSelectSchema, aa as accountCredentialsUpdateSchema, ab as accountInsertSchema, ac as accountSelectSchema, ad as accountUpdateSchema, ae as hasPaymentAccountAssigned, af as isBatchCompleted, ag as isBatchFailed, ah as isBatchInitiated, ai as isBatchOpen, aj as isBatchProcessing, ak as isBatchReadyToSign, al as isBatchSigned, am as isPaymentCompleted, an as isPaymentPrepared } from './shared/bank.C6_7Rch8.js';
|
|
3
|
+
export { a as BankServiceEnv, b as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BC06Rbrx.js';
|
|
4
4
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
5
5
|
import * as drizzle_zod from 'drizzle-zod';
|
|
6
6
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { S as SendPaymentInput } from './shared/bank.
|
|
8
|
+
import { S as SendPaymentInput } from './shared/bank.BVIkpji3.js';
|
|
9
9
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
10
10
|
import 'drizzle-orm';
|
|
11
11
|
|
|
@@ -13,16 +13,24 @@ interface DbuConnectorConfig {
|
|
|
13
13
|
BASE_URL: string;
|
|
14
14
|
USERNAME: string;
|
|
15
15
|
KV: KVNamespace;
|
|
16
|
+
API: Fetcher;
|
|
17
|
+
REDIRECT_URI: string;
|
|
18
|
+
TX_AUTH_URI: string;
|
|
19
|
+
connectedAccounts: ConnectedAccount[];
|
|
16
20
|
}
|
|
17
21
|
declare class DbuConnector extends IBankConnector {
|
|
18
22
|
connectorKey: ConnectorKey;
|
|
19
23
|
connectedAccounts: ConnectedAccount[];
|
|
20
24
|
readonly kv: KVNamespace;
|
|
25
|
+
readonly api: Fetcher;
|
|
21
26
|
private readonly baseUrl;
|
|
22
27
|
private readonly username;
|
|
23
28
|
private readonly sessionId;
|
|
29
|
+
private readonly redirectUri;
|
|
30
|
+
private readonly txAuthUri;
|
|
24
31
|
private readonly allowedPostEndpoints;
|
|
25
|
-
constructor({ BASE_URL, USERNAME, KV }: DbuConnectorConfig);
|
|
32
|
+
constructor({ BASE_URL, USERNAME, KV, API, REDIRECT_URI, TX_AUTH_URI, connectedAccounts, }: DbuConnectorConfig);
|
|
33
|
+
supportsBatch(_paymentType: PaymentType): boolean;
|
|
26
34
|
private makeRequest;
|
|
27
35
|
private mapDbuCurrencyCode;
|
|
28
36
|
private mapDbuTransactionToPayment;
|
|
@@ -37,12 +45,23 @@ declare class DbuConnector extends IBankConnector {
|
|
|
37
45
|
accounts: AccountInsertType[];
|
|
38
46
|
}>;
|
|
39
47
|
listAccounts(): Promise<AccountInsertType[]>;
|
|
40
|
-
|
|
48
|
+
private resolveIdAccountDebit;
|
|
49
|
+
private initiateInstantPayment;
|
|
50
|
+
initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
51
|
+
initiateSEPAPayment(_payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
52
|
+
initiateForeignPayment(_payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
53
|
+
protected initiateDomesticBatchImpl(_args: {
|
|
54
|
+
batchId: string;
|
|
55
|
+
payments: BatchedPayment[];
|
|
56
|
+
}): Promise<InitiatedBatch>;
|
|
57
|
+
protected initiateSEPABatchImpl(_args: {
|
|
58
|
+
batchId: string;
|
|
59
|
+
payments: BatchedPayment[];
|
|
60
|
+
}): Promise<InitiatedBatch>;
|
|
61
|
+
protected initiateForeignBatchImpl(_args: {
|
|
41
62
|
batchId: string;
|
|
42
63
|
payments: BatchedPayment[];
|
|
43
64
|
}): Promise<InitiatedBatch>;
|
|
44
|
-
initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
45
|
-
initiateSinglePayment(payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
46
65
|
getAllAccountPayments({ account, filter, }: {
|
|
47
66
|
account: AccountSelectType;
|
|
48
67
|
filter: {
|
|
@@ -72,7 +91,9 @@ interface ErsteConnectorConfig {
|
|
|
72
91
|
connectedAccounts: ConnectedAccount[];
|
|
73
92
|
}
|
|
74
93
|
declare class ErsteConnector extends IBankConnector {
|
|
75
|
-
|
|
94
|
+
initiateDomesticPayment(_payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
95
|
+
initiateSEPAPayment(_payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
96
|
+
initiateForeignPayment(_payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
76
97
|
private readonly API_KEY;
|
|
77
98
|
private readonly CLIENT_ID;
|
|
78
99
|
private readonly CLIENT_SECRET;
|
|
@@ -84,6 +105,7 @@ declare class ErsteConnector extends IBankConnector {
|
|
|
84
105
|
connectedAccounts: ConnectedAccount[];
|
|
85
106
|
private accessToken;
|
|
86
107
|
constructor(config: ErsteConnectorConfig);
|
|
108
|
+
supportsBatch(paymentType: PaymentType): boolean;
|
|
87
109
|
getAuthUri({ ott }: {
|
|
88
110
|
ott: string;
|
|
89
111
|
}): Promise<string>;
|
|
@@ -98,11 +120,18 @@ declare class ErsteConnector extends IBankConnector {
|
|
|
98
120
|
* This is an internal method used by initiateBatch
|
|
99
121
|
*/
|
|
100
122
|
private prepareErstePayment;
|
|
101
|
-
|
|
123
|
+
protected initiateDomesticBatchImpl({ batchId, payments, }: {
|
|
124
|
+
batchId: string;
|
|
125
|
+
payments: IncomingPayment[];
|
|
126
|
+
}): Promise<InitiatedBatch>;
|
|
127
|
+
protected initiateSEPABatchImpl(_args: {
|
|
128
|
+
batchId: string;
|
|
129
|
+
payments: IncomingPayment[];
|
|
130
|
+
}): Promise<InitiatedBatch>;
|
|
131
|
+
protected initiateForeignBatchImpl(_args: {
|
|
102
132
|
batchId: string;
|
|
103
133
|
payments: IncomingPayment[];
|
|
104
134
|
}): Promise<InitiatedBatch>;
|
|
105
|
-
initiateSinglePayment(payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
106
135
|
sendBatchPaymentForAuthorization(paymentIds: string[]): Promise<BatchMetadata>;
|
|
107
136
|
getBatchAuthorizationURI({ signId, signHash, }: {
|
|
108
137
|
signId: string;
|
|
@@ -389,7 +418,7 @@ type FinbricksTransaction = {
|
|
|
389
418
|
currency: CurrencyCode;
|
|
390
419
|
};
|
|
391
420
|
relatedParties: {
|
|
392
|
-
debtor
|
|
421
|
+
debtor?: {
|
|
393
422
|
name: string;
|
|
394
423
|
postalAddress: FinbricksAddress;
|
|
395
424
|
identification: {
|
|
@@ -398,7 +427,7 @@ type FinbricksTransaction = {
|
|
|
398
427
|
};
|
|
399
428
|
};
|
|
400
429
|
};
|
|
401
|
-
debtorAccount
|
|
430
|
+
debtorAccount?: {
|
|
402
431
|
name: string;
|
|
403
432
|
identification: {
|
|
404
433
|
iban: string;
|
|
@@ -407,7 +436,7 @@ type FinbricksTransaction = {
|
|
|
407
436
|
};
|
|
408
437
|
};
|
|
409
438
|
};
|
|
410
|
-
creditor
|
|
439
|
+
creditor?: {
|
|
411
440
|
name: string;
|
|
412
441
|
postalAddress: FinbricksAddress;
|
|
413
442
|
identification: {
|
|
@@ -416,7 +445,7 @@ type FinbricksTransaction = {
|
|
|
416
445
|
};
|
|
417
446
|
};
|
|
418
447
|
};
|
|
419
|
-
creditorAccount
|
|
448
|
+
creditorAccount?: {
|
|
420
449
|
name: string;
|
|
421
450
|
identification: {
|
|
422
451
|
iban: string;
|
|
@@ -527,13 +556,25 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
527
556
|
getAccountsForClient({ clientId, }: {
|
|
528
557
|
clientId: string;
|
|
529
558
|
}): Promise<FinbricksAccount[]>;
|
|
530
|
-
|
|
559
|
+
/**
|
|
560
|
+
* Native domestic batch implementation using Finbricks API.
|
|
561
|
+
* Called by base class when supportsBatch('DOMESTIC') returns true.
|
|
562
|
+
*/
|
|
563
|
+
protected initiateDomesticBatchImpl({ batchId, payments, }: {
|
|
564
|
+
batchId: string;
|
|
565
|
+
payments: BatchedPayment[];
|
|
566
|
+
}): Promise<InitiatedBatch>;
|
|
567
|
+
protected initiateSEPABatchImpl(_args: {
|
|
568
|
+
batchId: string;
|
|
569
|
+
payments: BatchedPayment[];
|
|
570
|
+
}): Promise<InitiatedBatch>;
|
|
571
|
+
protected initiateForeignBatchImpl(_args: {
|
|
531
572
|
batchId: string;
|
|
532
573
|
payments: BatchedPayment[];
|
|
533
574
|
}): Promise<InitiatedBatch>;
|
|
534
575
|
initiateForeignPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
535
576
|
initiateSEPAPayment(payment: IncomingPayment): Promise<InitiatedPayment>;
|
|
536
|
-
|
|
577
|
+
initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
537
578
|
getAllAccountPayments({ account, filter, }: {
|
|
538
579
|
account: AccountSelectType;
|
|
539
580
|
filter: {
|
|
@@ -555,12 +596,14 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
555
596
|
|
|
556
597
|
declare class MockCobsConnector extends FinbricksConnector {
|
|
557
598
|
constructor(config: FinbricksConnectorConfig);
|
|
599
|
+
supportsBatch(_paymentType: PaymentType): boolean;
|
|
558
600
|
}
|
|
559
601
|
|
|
560
602
|
declare class MockConnector extends IBankConnector {
|
|
561
603
|
connectedAccounts: ConnectedAccount[];
|
|
562
604
|
connectorKey: ConnectorKey;
|
|
563
605
|
constructor();
|
|
606
|
+
supportsBatch(_paymentType: PaymentType): boolean;
|
|
564
607
|
getAuthUri({ accountId, }: {
|
|
565
608
|
accountId: string;
|
|
566
609
|
ott: string;
|
|
@@ -571,13 +614,22 @@ declare class MockConnector extends IBankConnector {
|
|
|
571
614
|
credentials: AccountCredentialsInsertType[];
|
|
572
615
|
accounts: AccountInsertType[];
|
|
573
616
|
}>;
|
|
574
|
-
|
|
617
|
+
initiateDomesticPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
575
618
|
initiateSEPAPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
576
|
-
|
|
619
|
+
initiateForeignPayment(payment: BatchedPayment): Promise<InitiatedPayment>;
|
|
620
|
+
protected initiateDomesticBatchImpl({ batchId, payments, }: {
|
|
577
621
|
batchId: string;
|
|
578
622
|
payments: BatchedPayment[];
|
|
579
623
|
}): Promise<InitiatedBatch>;
|
|
580
|
-
|
|
624
|
+
protected initiateSEPABatchImpl(args: {
|
|
625
|
+
batchId: string;
|
|
626
|
+
payments: BatchedPayment[];
|
|
627
|
+
}): Promise<InitiatedBatch>;
|
|
628
|
+
protected initiateForeignBatchImpl(args: {
|
|
629
|
+
batchId: string;
|
|
630
|
+
payments: BatchedPayment[];
|
|
631
|
+
}): Promise<InitiatedBatch>;
|
|
632
|
+
getAllAccountPayments({ account: _account, filter: _filter, }: {
|
|
581
633
|
account: AccountSelectType;
|
|
582
634
|
filter: {
|
|
583
635
|
dateFrom: Date;
|
|
@@ -846,6 +898,25 @@ declare const ottInsertSchema: drizzle_zod.BuildSchema<"insert", {
|
|
|
846
898
|
identity: undefined;
|
|
847
899
|
generated: undefined;
|
|
848
900
|
}, {}, {}>;
|
|
901
|
+
createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
902
|
+
name: "created_by";
|
|
903
|
+
tableName: "ott";
|
|
904
|
+
dataType: "string";
|
|
905
|
+
columnType: "SQLiteText";
|
|
906
|
+
data: string;
|
|
907
|
+
driverParam: string;
|
|
908
|
+
notNull: false;
|
|
909
|
+
hasDefault: true;
|
|
910
|
+
isPrimaryKey: false;
|
|
911
|
+
isAutoincrement: false;
|
|
912
|
+
hasRuntimeDefault: false;
|
|
913
|
+
enumValues: [string, ...string[]];
|
|
914
|
+
baseColumn: never;
|
|
915
|
+
identity: undefined;
|
|
916
|
+
generated: undefined;
|
|
917
|
+
}, {}, {
|
|
918
|
+
length: number | undefined;
|
|
919
|
+
}>;
|
|
849
920
|
updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
850
921
|
name: "updated_at";
|
|
851
922
|
tableName: "ott";
|
|
@@ -863,6 +934,25 @@ declare const ottInsertSchema: drizzle_zod.BuildSchema<"insert", {
|
|
|
863
934
|
identity: undefined;
|
|
864
935
|
generated: undefined;
|
|
865
936
|
}, {}, {}>;
|
|
937
|
+
updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
938
|
+
name: "updated_by";
|
|
939
|
+
tableName: "ott";
|
|
940
|
+
dataType: "string";
|
|
941
|
+
columnType: "SQLiteText";
|
|
942
|
+
data: string;
|
|
943
|
+
driverParam: string;
|
|
944
|
+
notNull: false;
|
|
945
|
+
hasDefault: true;
|
|
946
|
+
isPrimaryKey: false;
|
|
947
|
+
isAutoincrement: false;
|
|
948
|
+
hasRuntimeDefault: false;
|
|
949
|
+
enumValues: [string, ...string[]];
|
|
950
|
+
baseColumn: never;
|
|
951
|
+
identity: undefined;
|
|
952
|
+
generated: undefined;
|
|
953
|
+
}, {}, {
|
|
954
|
+
length: number | undefined;
|
|
955
|
+
}>;
|
|
866
956
|
deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
867
957
|
name: "deleted_at";
|
|
868
958
|
tableName: "ott";
|
|
@@ -880,6 +970,25 @@ declare const ottInsertSchema: drizzle_zod.BuildSchema<"insert", {
|
|
|
880
970
|
identity: undefined;
|
|
881
971
|
generated: undefined;
|
|
882
972
|
}, {}, {}>;
|
|
973
|
+
deletedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
974
|
+
name: "deleted_by";
|
|
975
|
+
tableName: "ott";
|
|
976
|
+
dataType: "string";
|
|
977
|
+
columnType: "SQLiteText";
|
|
978
|
+
data: string;
|
|
979
|
+
driverParam: string;
|
|
980
|
+
notNull: false;
|
|
981
|
+
hasDefault: true;
|
|
982
|
+
isPrimaryKey: false;
|
|
983
|
+
isAutoincrement: false;
|
|
984
|
+
hasRuntimeDefault: false;
|
|
985
|
+
enumValues: [string, ...string[]];
|
|
986
|
+
baseColumn: never;
|
|
987
|
+
identity: undefined;
|
|
988
|
+
generated: undefined;
|
|
989
|
+
}, {}, {
|
|
990
|
+
length: number | undefined;
|
|
991
|
+
}>;
|
|
883
992
|
}, undefined, undefined>;
|
|
884
993
|
declare const ottUpdateSchema: drizzle_zod.BuildSchema<"update", {
|
|
885
994
|
oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
@@ -993,6 +1102,25 @@ declare const ottUpdateSchema: drizzle_zod.BuildSchema<"update", {
|
|
|
993
1102
|
identity: undefined;
|
|
994
1103
|
generated: undefined;
|
|
995
1104
|
}, {}, {}>;
|
|
1105
|
+
createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1106
|
+
name: "created_by";
|
|
1107
|
+
tableName: "ott";
|
|
1108
|
+
dataType: "string";
|
|
1109
|
+
columnType: "SQLiteText";
|
|
1110
|
+
data: string;
|
|
1111
|
+
driverParam: string;
|
|
1112
|
+
notNull: false;
|
|
1113
|
+
hasDefault: true;
|
|
1114
|
+
isPrimaryKey: false;
|
|
1115
|
+
isAutoincrement: false;
|
|
1116
|
+
hasRuntimeDefault: false;
|
|
1117
|
+
enumValues: [string, ...string[]];
|
|
1118
|
+
baseColumn: never;
|
|
1119
|
+
identity: undefined;
|
|
1120
|
+
generated: undefined;
|
|
1121
|
+
}, {}, {
|
|
1122
|
+
length: number | undefined;
|
|
1123
|
+
}>;
|
|
996
1124
|
updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
997
1125
|
name: "updated_at";
|
|
998
1126
|
tableName: "ott";
|
|
@@ -1010,6 +1138,25 @@ declare const ottUpdateSchema: drizzle_zod.BuildSchema<"update", {
|
|
|
1010
1138
|
identity: undefined;
|
|
1011
1139
|
generated: undefined;
|
|
1012
1140
|
}, {}, {}>;
|
|
1141
|
+
updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1142
|
+
name: "updated_by";
|
|
1143
|
+
tableName: "ott";
|
|
1144
|
+
dataType: "string";
|
|
1145
|
+
columnType: "SQLiteText";
|
|
1146
|
+
data: string;
|
|
1147
|
+
driverParam: string;
|
|
1148
|
+
notNull: false;
|
|
1149
|
+
hasDefault: true;
|
|
1150
|
+
isPrimaryKey: false;
|
|
1151
|
+
isAutoincrement: false;
|
|
1152
|
+
hasRuntimeDefault: false;
|
|
1153
|
+
enumValues: [string, ...string[]];
|
|
1154
|
+
baseColumn: never;
|
|
1155
|
+
identity: undefined;
|
|
1156
|
+
generated: undefined;
|
|
1157
|
+
}, {}, {
|
|
1158
|
+
length: number | undefined;
|
|
1159
|
+
}>;
|
|
1013
1160
|
deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1014
1161
|
name: "deleted_at";
|
|
1015
1162
|
tableName: "ott";
|
|
@@ -1027,6 +1174,25 @@ declare const ottUpdateSchema: drizzle_zod.BuildSchema<"update", {
|
|
|
1027
1174
|
identity: undefined;
|
|
1028
1175
|
generated: undefined;
|
|
1029
1176
|
}, {}, {}>;
|
|
1177
|
+
deletedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1178
|
+
name: "deleted_by";
|
|
1179
|
+
tableName: "ott";
|
|
1180
|
+
dataType: "string";
|
|
1181
|
+
columnType: "SQLiteText";
|
|
1182
|
+
data: string;
|
|
1183
|
+
driverParam: string;
|
|
1184
|
+
notNull: false;
|
|
1185
|
+
hasDefault: true;
|
|
1186
|
+
isPrimaryKey: false;
|
|
1187
|
+
isAutoincrement: false;
|
|
1188
|
+
hasRuntimeDefault: false;
|
|
1189
|
+
enumValues: [string, ...string[]];
|
|
1190
|
+
baseColumn: never;
|
|
1191
|
+
identity: undefined;
|
|
1192
|
+
generated: undefined;
|
|
1193
|
+
}, {}, {
|
|
1194
|
+
length: number | undefined;
|
|
1195
|
+
}>;
|
|
1030
1196
|
}, undefined, undefined>;
|
|
1031
1197
|
declare const ottSelectSchema: drizzle_zod.BuildSchema<"select", {
|
|
1032
1198
|
oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
@@ -1140,6 +1306,25 @@ declare const ottSelectSchema: drizzle_zod.BuildSchema<"select", {
|
|
|
1140
1306
|
identity: undefined;
|
|
1141
1307
|
generated: undefined;
|
|
1142
1308
|
}, {}, {}>;
|
|
1309
|
+
createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1310
|
+
name: "created_by";
|
|
1311
|
+
tableName: "ott";
|
|
1312
|
+
dataType: "string";
|
|
1313
|
+
columnType: "SQLiteText";
|
|
1314
|
+
data: string;
|
|
1315
|
+
driverParam: string;
|
|
1316
|
+
notNull: false;
|
|
1317
|
+
hasDefault: true;
|
|
1318
|
+
isPrimaryKey: false;
|
|
1319
|
+
isAutoincrement: false;
|
|
1320
|
+
hasRuntimeDefault: false;
|
|
1321
|
+
enumValues: [string, ...string[]];
|
|
1322
|
+
baseColumn: never;
|
|
1323
|
+
identity: undefined;
|
|
1324
|
+
generated: undefined;
|
|
1325
|
+
}, {}, {
|
|
1326
|
+
length: number | undefined;
|
|
1327
|
+
}>;
|
|
1143
1328
|
updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1144
1329
|
name: "updated_at";
|
|
1145
1330
|
tableName: "ott";
|
|
@@ -1157,6 +1342,25 @@ declare const ottSelectSchema: drizzle_zod.BuildSchema<"select", {
|
|
|
1157
1342
|
identity: undefined;
|
|
1158
1343
|
generated: undefined;
|
|
1159
1344
|
}, {}, {}>;
|
|
1345
|
+
updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1346
|
+
name: "updated_by";
|
|
1347
|
+
tableName: "ott";
|
|
1348
|
+
dataType: "string";
|
|
1349
|
+
columnType: "SQLiteText";
|
|
1350
|
+
data: string;
|
|
1351
|
+
driverParam: string;
|
|
1352
|
+
notNull: false;
|
|
1353
|
+
hasDefault: true;
|
|
1354
|
+
isPrimaryKey: false;
|
|
1355
|
+
isAutoincrement: false;
|
|
1356
|
+
hasRuntimeDefault: false;
|
|
1357
|
+
enumValues: [string, ...string[]];
|
|
1358
|
+
baseColumn: never;
|
|
1359
|
+
identity: undefined;
|
|
1360
|
+
generated: undefined;
|
|
1361
|
+
}, {}, {
|
|
1362
|
+
length: number | undefined;
|
|
1363
|
+
}>;
|
|
1160
1364
|
deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1161
1365
|
name: "deleted_at";
|
|
1162
1366
|
tableName: "ott";
|
|
@@ -1174,6 +1378,25 @@ declare const ottSelectSchema: drizzle_zod.BuildSchema<"select", {
|
|
|
1174
1378
|
identity: undefined;
|
|
1175
1379
|
generated: undefined;
|
|
1176
1380
|
}, {}, {}>;
|
|
1381
|
+
deletedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1382
|
+
name: "deleted_by";
|
|
1383
|
+
tableName: "ott";
|
|
1384
|
+
dataType: "string";
|
|
1385
|
+
columnType: "SQLiteText";
|
|
1386
|
+
data: string;
|
|
1387
|
+
driverParam: string;
|
|
1388
|
+
notNull: false;
|
|
1389
|
+
hasDefault: true;
|
|
1390
|
+
isPrimaryKey: false;
|
|
1391
|
+
isAutoincrement: false;
|
|
1392
|
+
hasRuntimeDefault: false;
|
|
1393
|
+
enumValues: [string, ...string[]];
|
|
1394
|
+
baseColumn: never;
|
|
1395
|
+
identity: undefined;
|
|
1396
|
+
generated: undefined;
|
|
1397
|
+
}, {}, {
|
|
1398
|
+
length: number | undefined;
|
|
1399
|
+
}>;
|
|
1177
1400
|
}, undefined, undefined>;
|
|
1178
1401
|
|
|
1179
1402
|
type OneTimeTokenInsertType = Omit<z.infer<typeof ottInsertSchema>, 'id'> & {
|
|
@@ -1260,5 +1483,5 @@ declare function toCompletedPayment(payment: PreparedPayment, status: 'COMPLETED
|
|
|
1260
1483
|
*/
|
|
1261
1484
|
declare function batchTransform<TInput, TOutput>(payments: TInput[], transformer: (payment: TInput) => TOutput): TOutput[];
|
|
1262
1485
|
|
|
1263
|
-
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BankCode, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentSelectType, PaymentStatus, PreparedPayment, SendPaymentInput, assignAccount, batchTransform, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toCompletedPayment, toIncomingPayment, toPreparedPayment, useFinbricksFetch };
|
|
1486
|
+
export { AccountAssignedPayment, AccountCredentialsInsertType, AccountInsertType, AccountSelectType, BankCode, BatchMetadata, BatchStatus, BatchedPayment, CompletedPayment, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, DbuConnector, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPayment, IncomingPayment as IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, ParsedBankPayment, PaymentSelectType, PaymentStatus, PaymentType, PreparedPayment, SendPaymentInput, assignAccount, batchTransform, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, toBatchedPayment, toCompletedPayment, toIncomingPayment, toPreparedPayment, useFinbricksFetch };
|
|
1264
1487
|
export type { BankPaymentEvent, DbuConnectorConfig, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksForeignPaymentBody, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };
|
package/dist/types.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DbuConnector, E as ErsteConnector,
|
|
2
|
-
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS,
|
|
3
|
-
export { h as hasPaymentAccountAssigned,
|
|
1
|
+
export { D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, M as MockCobsConnector, c as MockConnector, d as assignAccount, e as batchTransform, s as signFinbricksJws, t as toBatchedPayment, f as toCompletedPayment, g as toIncomingPayment, h as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.CkUMU1sJ.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.BnIYdBEF.mjs';
|
|
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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/bank",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"dev": "wrangler dev --port 9232 --persist-to ../../.wrangler/state -c ./wrangler.jsonc -c ../../apps/secrets-store/wrangler.jsonc",
|
|
39
39
|
"wrangler:generate": "bunx develit wrangler:generate --types",
|
|
40
40
|
"db:init": "wrangler d1 execute develit-bank --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
|
|
41
|
-
"db:generate": "drizzle-kit generate",
|
|
42
|
-
"db:migrate": "drizzle-kit migrate",
|
|
43
|
-
"db:explore": "drizzle-kit studio",
|
|
41
|
+
"db:generate": "NODE_OPTIONS='--import tsx' drizzle-kit generate",
|
|
42
|
+
"db:migrate": "NODE_OPTIONS='--import tsx' drizzle-kit migrate",
|
|
43
|
+
"db:explore": "NODE_OPTIONS='--import tsx' drizzle-kit studio",
|
|
44
44
|
"types": "bash typegen.sh",
|
|
45
45
|
"lint": "biome check",
|
|
46
46
|
"lint:fix": "biome check --fix",
|
|
@@ -51,17 +51,15 @@
|
|
|
51
51
|
"test:workflows": "vitest workflows",
|
|
52
52
|
"build": "unbuild"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
55
|
-
"@develit-io/backend-sdk": "9.1.6",
|
|
56
|
-
"@develit-io/general-codes": "*",
|
|
57
|
-
"drizzle-kit": "0.31.8",
|
|
58
|
-
"drizzle-orm": "0.45.0",
|
|
59
|
-
"drizzle-seed": "*",
|
|
60
|
-
"wrangler": "4.50.0",
|
|
61
|
-
"zod": "4.1.13"
|
|
62
|
-
},
|
|
63
|
-
"devDependencies": {
|
|
54
|
+
"dependencies": {
|
|
64
55
|
"date-fns": "^4.1.0",
|
|
65
56
|
"jose": "^6.1.3"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@develit-io/backend-sdk": "^9.8.1",
|
|
60
|
+
"@develit-io/general-codes": "^1.14.0",
|
|
61
|
+
"drizzle-orm": "^0.45.0",
|
|
62
|
+
"drizzle-zod": "^0.8.3",
|
|
63
|
+
"zod": "^4.1.13"
|
|
66
64
|
}
|
|
67
65
|
}
|
|
@@ -192,7 +192,6 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
192
192
|
AVAX: "AVAX";
|
|
193
193
|
}>>;
|
|
194
194
|
countryCode: z.ZodOptional<z.ZodEnum<{
|
|
195
|
-
IM: "IM";
|
|
196
195
|
AF: "AF";
|
|
197
196
|
AL: "AL";
|
|
198
197
|
DZ: "DZ";
|
|
@@ -281,6 +280,7 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
281
280
|
IR: "IR";
|
|
282
281
|
IQ: "IQ";
|
|
283
282
|
IE: "IE";
|
|
283
|
+
IM: "IM";
|
|
284
284
|
IL: "IL";
|
|
285
285
|
IT: "IT";
|
|
286
286
|
CI: "CI";
|
|
@@ -521,7 +521,6 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
521
521
|
AVAX: "AVAX";
|
|
522
522
|
}>>;
|
|
523
523
|
countryCode: z.ZodOptional<z.ZodEnum<{
|
|
524
|
-
IM: "IM";
|
|
525
524
|
AF: "AF";
|
|
526
525
|
AL: "AL";
|
|
527
526
|
DZ: "DZ";
|
|
@@ -610,6 +609,7 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
610
609
|
IR: "IR";
|
|
611
610
|
IQ: "IQ";
|
|
612
611
|
IE: "IE";
|
|
612
|
+
IM: "IM";
|
|
613
613
|
IL: "IL";
|
|
614
614
|
IT: "IT";
|
|
615
615
|
CI: "CI";
|
|
@@ -192,7 +192,6 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
192
192
|
AVAX: "AVAX";
|
|
193
193
|
}>>;
|
|
194
194
|
countryCode: z.ZodOptional<z.ZodEnum<{
|
|
195
|
-
IM: "IM";
|
|
196
195
|
AF: "AF";
|
|
197
196
|
AL: "AL";
|
|
198
197
|
DZ: "DZ";
|
|
@@ -281,6 +280,7 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
281
280
|
IR: "IR";
|
|
282
281
|
IQ: "IQ";
|
|
283
282
|
IE: "IE";
|
|
283
|
+
IM: "IM";
|
|
284
284
|
IL: "IL";
|
|
285
285
|
IT: "IT";
|
|
286
286
|
CI: "CI";
|
|
@@ -521,7 +521,6 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
521
521
|
AVAX: "AVAX";
|
|
522
522
|
}>>;
|
|
523
523
|
countryCode: z.ZodOptional<z.ZodEnum<{
|
|
524
|
-
IM: "IM";
|
|
525
524
|
AF: "AF";
|
|
526
525
|
AL: "AL";
|
|
527
526
|
DZ: "DZ";
|
|
@@ -610,6 +609,7 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
610
609
|
IR: "IR";
|
|
611
610
|
IQ: "IQ";
|
|
612
611
|
IE: "IE";
|
|
612
|
+
IM: "IM";
|
|
613
613
|
IL: "IL";
|
|
614
614
|
IT: "IT";
|
|
615
615
|
CI: "CI";
|
|
@@ -192,7 +192,6 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
192
192
|
AVAX: "AVAX";
|
|
193
193
|
}>>;
|
|
194
194
|
countryCode: z.ZodOptional<z.ZodEnum<{
|
|
195
|
-
IM: "IM";
|
|
196
195
|
AF: "AF";
|
|
197
196
|
AL: "AL";
|
|
198
197
|
DZ: "DZ";
|
|
@@ -281,6 +280,7 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
281
280
|
IR: "IR";
|
|
282
281
|
IQ: "IQ";
|
|
283
282
|
IE: "IE";
|
|
283
|
+
IM: "IM";
|
|
284
284
|
IL: "IL";
|
|
285
285
|
IT: "IT";
|
|
286
286
|
CI: "CI";
|
|
@@ -521,7 +521,6 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
521
521
|
AVAX: "AVAX";
|
|
522
522
|
}>>;
|
|
523
523
|
countryCode: z.ZodOptional<z.ZodEnum<{
|
|
524
|
-
IM: "IM";
|
|
525
524
|
AF: "AF";
|
|
526
525
|
AL: "AL";
|
|
527
526
|
DZ: "DZ";
|
|
@@ -610,6 +609,7 @@ declare const sendPaymentInputSchema: z.ZodObject<{
|
|
|
610
609
|
IR: "IR";
|
|
611
610
|
IQ: "IQ";
|
|
612
611
|
IE: "IE";
|
|
612
|
+
IM: "IM";
|
|
613
613
|
IL: "IL";
|
|
614
614
|
IT: "IT";
|
|
615
615
|
CI: "CI";
|