@develit-services/bank 0.3.44 → 0.3.46
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 +4 -4
- 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 +4 -4
- package/dist/export/worker.cjs +201 -183
- package/dist/export/worker.d.cts +51 -20
- package/dist/export/worker.d.mts +51 -20
- package/dist/export/worker.d.ts +51 -20
- package/dist/export/worker.mjs +161 -143
- package/dist/export/workflows.cjs +214 -18
- package/dist/export/workflows.mjs +207 -12
- package/dist/export/wrangler.d.cts +1 -2
- package/dist/export/wrangler.d.mts +1 -2
- package/dist/export/wrangler.d.ts +1 -2
- package/dist/shared/{bank.DFRS9oN5.mjs → bank.B1Gpn3ht.mjs} +9 -172
- package/dist/shared/{bank.D8wUOeOK.d.cts → bank.BEL1HIxZ.d.cts} +20 -1
- package/dist/shared/{bank.D8wUOeOK.d.mts → bank.BEL1HIxZ.d.mts} +20 -1
- package/dist/shared/{bank.D8wUOeOK.d.ts → bank.BEL1HIxZ.d.ts} +20 -1
- package/dist/shared/bank.BUEmFxS8.mjs +174 -0
- package/dist/shared/{bank.C335-raZ.cjs → bank.CPYfE-Ei.cjs} +9 -197
- package/dist/shared/bank.CpwLFudl.cjs +198 -0
- package/dist/shared/bank.D-3fzX63.mjs +170 -0
- package/dist/shared/bank.D0a-MZon.cjs +184 -0
- package/dist/shared/{bank.BchnXQDL.d.cts → bank.Dh_H_5rC.d.cts} +0 -1
- package/dist/shared/{bank.BchnXQDL.d.mts → bank.Dh_H_5rC.d.mts} +0 -1
- package/dist/shared/{bank.BchnXQDL.d.ts → bank.Dh_H_5rC.d.ts} +0 -1
- package/dist/types.cjs +14 -14
- package/dist/types.d.cts +3 -6
- package/dist/types.d.mts +3 -6
- package/dist/types.d.ts +3 -6
- package/dist/types.mjs +5 -5
- package/package.json +1 -1
- package/dist/shared/bank.Cj-oB02_.mjs +0 -392
- package/dist/shared/bank.ClRIj2Ma.cjs +0 -11
- package/dist/shared/bank.DhPfZ6b_.mjs +0 -9
- package/dist/shared/bank.DwyrLcKu.cjs +0 -402
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const drizzle = require('./bank.CPYfE-Ei.cjs');
|
|
4
|
+
const backendSdk = require('@develit-io/backend-sdk');
|
|
5
|
+
const drizzleOrm = require('drizzle-orm');
|
|
6
|
+
require('date-fns');
|
|
7
|
+
require('jose');
|
|
8
|
+
require('@develit-io/general-codes');
|
|
9
|
+
require('./bank.CpwLFudl.cjs');
|
|
10
|
+
const node_crypto = require('node:crypto');
|
|
11
|
+
|
|
12
|
+
const createPaymentCommand = (db, { payment }) => {
|
|
13
|
+
return {
|
|
14
|
+
command: db.insert(drizzle.tables.payment).values({
|
|
15
|
+
...payment,
|
|
16
|
+
creditorIban: payment.creditor.iban,
|
|
17
|
+
debtorIban: payment.debtor.iban
|
|
18
|
+
}).returning()
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const upsertBatchCommand = (db, { batch }) => {
|
|
23
|
+
const id = batch.id || backendSdk.uuidv4();
|
|
24
|
+
const command = db.insert(drizzle.tables.batch).values({
|
|
25
|
+
...batch,
|
|
26
|
+
id
|
|
27
|
+
}).onConflictDoUpdate({
|
|
28
|
+
target: drizzle.tables.batch.id,
|
|
29
|
+
set: {
|
|
30
|
+
...batch
|
|
31
|
+
}
|
|
32
|
+
}).returning();
|
|
33
|
+
return {
|
|
34
|
+
id,
|
|
35
|
+
command
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const getAccountByIdQuery = async (db, { accountId }) => {
|
|
40
|
+
return await db.select().from(drizzle.tables.account).where(drizzleOrm.eq(drizzle.tables.account.id, accountId)).get();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const getBatchByIdQuery = async (db, { batchId }) => {
|
|
44
|
+
return await db.select().from(drizzle.tables.batch).where(drizzleOrm.eq(drizzle.tables.batch.id, batchId)).get();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const getCredentialsByAccountId = async (db, encryptionKey, { accountId }) => {
|
|
48
|
+
const cred = await db.select().from(drizzle.tables.accountCredentials).where(drizzleOrm.eq(drizzle.tables.accountCredentials.accountId, accountId)).get();
|
|
49
|
+
return cred ? {
|
|
50
|
+
...cred,
|
|
51
|
+
value: await decrypt(cred.value, encryptionKey)
|
|
52
|
+
} : void 0;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
class CreditasConnector extends drizzle.FinbricksConnector {
|
|
56
|
+
constructor(config) {
|
|
57
|
+
super("CREDITAS", config);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
class FioConnector extends drizzle.FinbricksConnector {
|
|
62
|
+
constructor(config) {
|
|
63
|
+
super("FIO", config);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class MonetaConnector extends drizzle.FinbricksConnector {
|
|
68
|
+
constructor(config) {
|
|
69
|
+
super("MONETA", config);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const initiateConnector = ({
|
|
74
|
+
bank,
|
|
75
|
+
env,
|
|
76
|
+
connectedAccounts
|
|
77
|
+
}) => {
|
|
78
|
+
switch (bank) {
|
|
79
|
+
case "ERSTE":
|
|
80
|
+
return new drizzle.ErsteConnector({
|
|
81
|
+
API_KEY: env.ERSTE_API_KEY,
|
|
82
|
+
CLIENT_ID: env.ERSTE_CLIENT_ID,
|
|
83
|
+
CLIENT_SECRET: env.ERSTE_CLIENT_SECRET,
|
|
84
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
85
|
+
AUTH_URI: env.ERSTE_AUTH_URI,
|
|
86
|
+
PAYMENTS_URI: env.ERSTE_PAYMENTS_URI,
|
|
87
|
+
ACCOUNTS_URI: env.ERSTE_ACCOUNTS_URI,
|
|
88
|
+
connectedAccounts
|
|
89
|
+
});
|
|
90
|
+
case "CREDITAS":
|
|
91
|
+
return new CreditasConnector({
|
|
92
|
+
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
93
|
+
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
94
|
+
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
95
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
96
|
+
connectedAccounts
|
|
97
|
+
});
|
|
98
|
+
case "MOCK_COBS":
|
|
99
|
+
return new drizzle.MockCobsConnector({
|
|
100
|
+
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
101
|
+
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
102
|
+
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
103
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
104
|
+
connectedAccounts
|
|
105
|
+
});
|
|
106
|
+
case "FIO":
|
|
107
|
+
return new FioConnector({
|
|
108
|
+
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
109
|
+
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
110
|
+
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
111
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
112
|
+
connectedAccounts
|
|
113
|
+
});
|
|
114
|
+
case "MONETA":
|
|
115
|
+
return new MonetaConnector({
|
|
116
|
+
BASE_URI: env.FINBRICKS_BASE_URI,
|
|
117
|
+
MERCHANT_ID: env.FINBRICKS_MERCHANT_ID,
|
|
118
|
+
PRIVATE_KEY_PEM: env.FINBRICKS_PRIVATE_KEY_PEM,
|
|
119
|
+
REDIRECT_URI: env.REDIRECT_URI,
|
|
120
|
+
connectedAccounts
|
|
121
|
+
});
|
|
122
|
+
default:
|
|
123
|
+
return new drizzle.MockConnector();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
async function importAesKey(base64Key) {
|
|
128
|
+
const raw = Uint8Array.from(atob(base64Key), (c) => c.charCodeAt(0));
|
|
129
|
+
return await crypto.subtle.importKey("raw", raw, { name: "AES-GCM" }, false, [
|
|
130
|
+
"encrypt",
|
|
131
|
+
"decrypt"
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
134
|
+
async function encrypt(value, key) {
|
|
135
|
+
const encoder = new TextEncoder();
|
|
136
|
+
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
137
|
+
const ciphertext = await crypto.subtle.encrypt(
|
|
138
|
+
{ name: "AES-GCM", iv },
|
|
139
|
+
key,
|
|
140
|
+
encoder.encode(value)
|
|
141
|
+
);
|
|
142
|
+
const combined = new Uint8Array(iv.length + ciphertext.byteLength);
|
|
143
|
+
combined.set(iv, 0);
|
|
144
|
+
combined.set(new Uint8Array(ciphertext), iv.length);
|
|
145
|
+
return btoa(String.fromCharCode(...combined));
|
|
146
|
+
}
|
|
147
|
+
async function decrypt(base64, key) {
|
|
148
|
+
const raw = Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
|
|
149
|
+
const iv = raw.slice(0, 12);
|
|
150
|
+
const ciphertext = raw.slice(12);
|
|
151
|
+
const decrypted = await crypto.subtle.decrypt(
|
|
152
|
+
{ name: "AES-GCM", iv },
|
|
153
|
+
key,
|
|
154
|
+
ciphertext
|
|
155
|
+
);
|
|
156
|
+
return new TextDecoder().decode(decrypted);
|
|
157
|
+
}
|
|
158
|
+
function canonicalize(value) {
|
|
159
|
+
if (value === null || typeof value !== "object") return value;
|
|
160
|
+
if (Array.isArray(value)) {
|
|
161
|
+
return value.map(canonicalize);
|
|
162
|
+
}
|
|
163
|
+
const obj = value;
|
|
164
|
+
const sorted = Object.keys(obj).sort().reduce((acc, key) => {
|
|
165
|
+
acc[key] = canonicalize(obj[key]);
|
|
166
|
+
return acc;
|
|
167
|
+
}, {});
|
|
168
|
+
return sorted;
|
|
169
|
+
}
|
|
170
|
+
function checksum(input) {
|
|
171
|
+
const canonical = canonicalize(input);
|
|
172
|
+
const json = JSON.stringify(canonical);
|
|
173
|
+
return node_crypto.createHash("sha256").update(json).digest("hex");
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
exports.checksum = checksum;
|
|
177
|
+
exports.createPaymentCommand = createPaymentCommand;
|
|
178
|
+
exports.encrypt = encrypt;
|
|
179
|
+
exports.getAccountByIdQuery = getAccountByIdQuery;
|
|
180
|
+
exports.getBatchByIdQuery = getBatchByIdQuery;
|
|
181
|
+
exports.getCredentialsByAccountId = getCredentialsByAccountId;
|
|
182
|
+
exports.importAesKey = importAesKey;
|
|
183
|
+
exports.initiateConnector = initiateConnector;
|
|
184
|
+
exports.upsertBatchCommand = upsertBatchCommand;
|
|
@@ -16,7 +16,6 @@ interface BankServiceEnvironmentConfig {
|
|
|
16
16
|
ERSTE_AUTH_URI: 'https://webapi.developers.erstegroup.com/api/csas/sandbox/v1/sandbox-idp';
|
|
17
17
|
ERSTE_PAYMENTS_URI: 'https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v1/payments';
|
|
18
18
|
ERSTE_ACCOUNTS_URI: 'https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v3/accounts';
|
|
19
|
-
ERSTE_FETCH_INTERVAL: 300;
|
|
20
19
|
FINBRICKS_BASE_URI: 'https://api.sandbox.finbricks.com';
|
|
21
20
|
FINBRICKS_MERCHANT_ID: string;
|
|
22
21
|
CRON_BATCH_STATUSES: string;
|
|
@@ -16,7 +16,6 @@ interface BankServiceEnvironmentConfig {
|
|
|
16
16
|
ERSTE_AUTH_URI: 'https://webapi.developers.erstegroup.com/api/csas/sandbox/v1/sandbox-idp';
|
|
17
17
|
ERSTE_PAYMENTS_URI: 'https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v1/payments';
|
|
18
18
|
ERSTE_ACCOUNTS_URI: 'https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v3/accounts';
|
|
19
|
-
ERSTE_FETCH_INTERVAL: 300;
|
|
20
19
|
FINBRICKS_BASE_URI: 'https://api.sandbox.finbricks.com';
|
|
21
20
|
FINBRICKS_MERCHANT_ID: string;
|
|
22
21
|
CRON_BATCH_STATUSES: string;
|
|
@@ -16,7 +16,6 @@ interface BankServiceEnvironmentConfig {
|
|
|
16
16
|
ERSTE_AUTH_URI: 'https://webapi.developers.erstegroup.com/api/csas/sandbox/v1/sandbox-idp';
|
|
17
17
|
ERSTE_PAYMENTS_URI: 'https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v1/payments';
|
|
18
18
|
ERSTE_ACCOUNTS_URI: 'https://webapi.developers.erstegroup.com/api/csas/public/sandbox/v3/accounts';
|
|
19
|
-
ERSTE_FETCH_INTERVAL: 300;
|
|
20
19
|
FINBRICKS_BASE_URI: 'https://api.sandbox.finbricks.com';
|
|
21
20
|
FINBRICKS_MERCHANT_ID: string;
|
|
22
21
|
CRON_BATCH_STATUSES: string;
|
package/dist/types.cjs
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const drizzle = require('./shared/bank.CPYfE-Ei.cjs');
|
|
4
|
+
const database_schema = require('./shared/bank.CpwLFudl.cjs');
|
|
5
5
|
const generalCodes = require('@develit-io/general-codes');
|
|
6
6
|
require('@develit-io/backend-sdk');
|
|
7
|
-
require('drizzle-orm/sqlite-core');
|
|
8
7
|
require('date-fns');
|
|
9
8
|
require('drizzle-orm');
|
|
10
9
|
require('jose');
|
|
11
|
-
require('drizzle-zod');
|
|
12
|
-
require('drizzle-orm/relations');
|
|
13
10
|
require('node:crypto');
|
|
11
|
+
require('drizzle-orm/sqlite-core');
|
|
12
|
+
require('drizzle-orm/relations');
|
|
13
|
+
require('drizzle-zod');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
exports.ErsteConnector = drizzle.ErsteConnector;
|
|
18
|
+
exports.FINBRICKS_ENDPOINTS = drizzle.FINBRICKS_ENDPOINTS;
|
|
19
|
+
exports.FinbricksClient = drizzle.FinbricksClient;
|
|
20
|
+
exports.FinbricksConnector = drizzle.FinbricksConnector;
|
|
21
|
+
exports.IBankConnector = drizzle.IBankConnector;
|
|
22
|
+
exports.MockCobsConnector = drizzle.MockCobsConnector;
|
|
23
|
+
exports.MockConnector = drizzle.MockConnector;
|
|
24
|
+
exports.signFinbricksJws = drizzle.signFinbricksJws;
|
|
25
|
+
exports.useFinbricksFetch = drizzle.useFinbricksFetch;
|
|
17
26
|
exports.ACCOUNT_STATUSES = database_schema.ACCOUNT_STATUSES;
|
|
18
27
|
exports.BATCH_STATUES = database_schema.BATCH_STATUSES;
|
|
19
28
|
exports.BATCH_STATUSES = database_schema.BATCH_STATUSES;
|
|
@@ -21,13 +30,7 @@ exports.CHARGE_BEARERS = database_schema.CHARGE_BEARERS;
|
|
|
21
30
|
exports.CONNECTOR_KEYS = database_schema.CONNECTOR_KEYS;
|
|
22
31
|
exports.COUNTRY_CODES = database_schema.COUNTRY_CODES;
|
|
23
32
|
exports.CREDENTIALS_TYPES = database_schema.CREDENTIALS_TYPES;
|
|
24
|
-
exports.ErsteConnector = database_schema.ErsteConnector;
|
|
25
|
-
exports.FINBRICKS_ENDPOINTS = database_schema.FINBRICKS_ENDPOINTS;
|
|
26
|
-
exports.FinbricksClient = database_schema.FinbricksClient;
|
|
27
|
-
exports.FinbricksConnector = database_schema.FinbricksConnector;
|
|
28
|
-
exports.IBankConnector = database_schema.IBankConnector;
|
|
29
33
|
exports.INSTRUCTION_PRIORITIES = database_schema.INSTRUCTION_PRIORITIES;
|
|
30
|
-
exports.MockConnector = database_schema.MockConnector;
|
|
31
34
|
exports.PAYMENT_DIRECTIONS = database_schema.PAYMENT_DIRECTIONS;
|
|
32
35
|
exports.PAYMENT_STATUSES = database_schema.PAYMENT_STATUSES;
|
|
33
36
|
exports.PAYMENT_TYPES = database_schema.PAYMENT_TYPES;
|
|
@@ -41,8 +44,5 @@ exports.accountUpdateSchema = database_schema.accountUpdateSchema;
|
|
|
41
44
|
exports.ottInsertSchema = database_schema.ottInsertSchema;
|
|
42
45
|
exports.ottSelectSchema = database_schema.ottSelectSchema;
|
|
43
46
|
exports.ottUpdateSchema = database_schema.ottUpdateSchema;
|
|
44
|
-
exports.signFinbricksJws = database_schema.signFinbricksJws;
|
|
45
|
-
exports.useFinbricksFetch = database_schema.useFinbricksFetch;
|
|
46
|
-
exports.MockCobsConnector = mockCobs_connector.MockCobsConnector;
|
|
47
47
|
exports.BANK_CODES = generalCodes.BANK_CODES;
|
|
48
48
|
exports.CURRENCY_CODES = generalCodes.CURRENCY_CODES;
|
package/dist/types.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.
|
|
2
|
-
export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.BEL1HIxZ.cjs';
|
|
2
|
+
export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.BEL1HIxZ.cjs';
|
|
3
3
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.
|
|
5
|
+
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.cjs';
|
|
6
6
|
import * as drizzle_zod from 'drizzle-zod';
|
|
7
7
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -21,7 +21,6 @@ interface ErsteConnectorConfig {
|
|
|
21
21
|
}
|
|
22
22
|
declare class ErsteConnector extends IBankConnector {
|
|
23
23
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
24
|
-
static readonly FETCH_INTERVAL: number;
|
|
25
24
|
private readonly API_KEY;
|
|
26
25
|
private readonly CLIENT_ID;
|
|
27
26
|
private readonly CLIENT_SECRET;
|
|
@@ -457,7 +456,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
457
456
|
connectedAccounts: ConnectedAccount[];
|
|
458
457
|
protected readonly finbricks: FinbricksClient;
|
|
459
458
|
protected readonly PROVIDER: FinbricksProvider;
|
|
460
|
-
static readonly FETCH_INTERVAL: number;
|
|
461
459
|
constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, }: FinbricksConnectorConfig);
|
|
462
460
|
getAuthUri({ ott }: {
|
|
463
461
|
ott: string;
|
|
@@ -505,7 +503,6 @@ declare class MockConnector extends IBankConnector {
|
|
|
505
503
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
506
504
|
connectedAccounts: ConnectedAccount[];
|
|
507
505
|
connectorKey: ConnectorKey;
|
|
508
|
-
static readonly FETCH_INTERVAL: number;
|
|
509
506
|
constructor();
|
|
510
507
|
authenticate(): Promise<string>;
|
|
511
508
|
listAccounts(): Promise<[]>;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.
|
|
2
|
-
export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.BEL1HIxZ.mjs';
|
|
2
|
+
export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.BEL1HIxZ.mjs';
|
|
3
3
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.
|
|
5
|
+
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.mjs';
|
|
6
6
|
import * as drizzle_zod from 'drizzle-zod';
|
|
7
7
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -21,7 +21,6 @@ interface ErsteConnectorConfig {
|
|
|
21
21
|
}
|
|
22
22
|
declare class ErsteConnector extends IBankConnector {
|
|
23
23
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
24
|
-
static readonly FETCH_INTERVAL: number;
|
|
25
24
|
private readonly API_KEY;
|
|
26
25
|
private readonly CLIENT_ID;
|
|
27
26
|
private readonly CLIENT_SECRET;
|
|
@@ -457,7 +456,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
457
456
|
connectedAccounts: ConnectedAccount[];
|
|
458
457
|
protected readonly finbricks: FinbricksClient;
|
|
459
458
|
protected readonly PROVIDER: FinbricksProvider;
|
|
460
|
-
static readonly FETCH_INTERVAL: number;
|
|
461
459
|
constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, }: FinbricksConnectorConfig);
|
|
462
460
|
getAuthUri({ ott }: {
|
|
463
461
|
ott: string;
|
|
@@ -505,7 +503,6 @@ declare class MockConnector extends IBankConnector {
|
|
|
505
503
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
506
504
|
connectedAccounts: ConnectedAccount[];
|
|
507
505
|
connectorKey: ConnectorKey;
|
|
508
|
-
static readonly FETCH_INTERVAL: number;
|
|
509
506
|
constructor();
|
|
510
507
|
authenticate(): Promise<string>;
|
|
511
508
|
listAccounts(): Promise<[]>;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.
|
|
2
|
-
export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.BEL1HIxZ.js';
|
|
2
|
+
export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.BEL1HIxZ.js';
|
|
3
3
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.
|
|
5
|
+
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.js';
|
|
6
6
|
import * as drizzle_zod from 'drizzle-zod';
|
|
7
7
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -21,7 +21,6 @@ interface ErsteConnectorConfig {
|
|
|
21
21
|
}
|
|
22
22
|
declare class ErsteConnector extends IBankConnector {
|
|
23
23
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
24
|
-
static readonly FETCH_INTERVAL: number;
|
|
25
24
|
private readonly API_KEY;
|
|
26
25
|
private readonly CLIENT_ID;
|
|
27
26
|
private readonly CLIENT_SECRET;
|
|
@@ -457,7 +456,6 @@ declare abstract class FinbricksConnector extends IBankConnector {
|
|
|
457
456
|
connectedAccounts: ConnectedAccount[];
|
|
458
457
|
protected readonly finbricks: FinbricksClient;
|
|
459
458
|
protected readonly PROVIDER: FinbricksProvider;
|
|
460
|
-
static readonly FETCH_INTERVAL: number;
|
|
461
459
|
constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, }: FinbricksConnectorConfig);
|
|
462
460
|
getAuthUri({ ott }: {
|
|
463
461
|
ott: string;
|
|
@@ -505,7 +503,6 @@ declare class MockConnector extends IBankConnector {
|
|
|
505
503
|
initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
|
|
506
504
|
connectedAccounts: ConnectedAccount[];
|
|
507
505
|
connectorKey: ConnectorKey;
|
|
508
|
-
static readonly FETCH_INTERVAL: number;
|
|
509
506
|
constructor();
|
|
510
507
|
authenticate(): Promise<string>;
|
|
511
508
|
listAccounts(): Promise<[]>;
|
package/dist/types.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.B1Gpn3ht.mjs';
|
|
2
|
+
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, d as CONNECTOR_KEYS, c as COUNTRY_CODES, e as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, b as PAYMENT_DIRECTIONS, a as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, i as accountCredentialsInsertSchema, k as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, f as accountInsertSchema, h as accountSelectSchema, g as accountUpdateSchema, o as ottInsertSchema, m as ottSelectSchema, l as ottUpdateSchema } from './shared/bank.D-3fzX63.mjs';
|
|
3
3
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
5
|
-
import 'drizzle-orm/sqlite-core';
|
|
6
5
|
import 'date-fns';
|
|
7
6
|
import 'drizzle-orm';
|
|
8
7
|
import 'jose';
|
|
9
|
-
import 'drizzle-zod';
|
|
10
|
-
import 'drizzle-orm/relations';
|
|
11
8
|
import 'node:crypto';
|
|
9
|
+
import 'drizzle-orm/sqlite-core';
|
|
10
|
+
import 'drizzle-orm/relations';
|
|
11
|
+
import 'drizzle-zod';
|