@develit-services/bank 0.7.9 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/export/worker.cjs +1 -1
- package/dist/export/worker.mjs +1 -1
- package/dist/export/workflows.cjs +25 -20
- package/dist/export/workflows.mjs +25 -20
- package/dist/shared/{bank.Bbpgmcv1.cjs → bank.Ce-NBBw1.cjs} +4 -2
- package/dist/shared/{bank.CStkMDDC.mjs → bank.CeRbuycV.mjs} +4 -2
- package/dist/types.cjs +1 -1
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
package/dist/export/worker.cjs
CHANGED
|
@@ -11,7 +11,7 @@ require('date-fns');
|
|
|
11
11
|
require('jose');
|
|
12
12
|
const drizzleOrm = require('drizzle-orm');
|
|
13
13
|
require('node:crypto');
|
|
14
|
-
const mock_connector = require('../shared/bank.
|
|
14
|
+
const mock_connector = require('../shared/bank.Ce-NBBw1.cjs');
|
|
15
15
|
require('../shared/bank.Cp0yvOdq.cjs');
|
|
16
16
|
require('drizzle-orm/relations');
|
|
17
17
|
require('drizzle-orm/sqlite-core');
|
package/dist/export/worker.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import 'date-fns';
|
|
|
9
9
|
import 'jose';
|
|
10
10
|
import { eq, sql, and, inArray, asc, desc, gte, lte } from 'drizzle-orm';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import { i as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment } from '../shared/bank.
|
|
12
|
+
import { i as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment } from '../shared/bank.CeRbuycV.mjs';
|
|
13
13
|
import '../shared/bank.fIGTiPnp.mjs';
|
|
14
14
|
import 'drizzle-orm/relations';
|
|
15
15
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const drizzle = require('../shared/bank.Bs7mkXbR.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.Bg3Pdwm4.cjs');
|
|
6
|
-
const mock_connector = require('../shared/bank.
|
|
6
|
+
const mock_connector = require('../shared/bank.Ce-NBBw1.cjs');
|
|
7
7
|
const drizzleOrm = require('drizzle-orm');
|
|
8
8
|
const cloudflare_workers = require('cloudflare:workers');
|
|
9
9
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
@@ -273,25 +273,30 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
273
273
|
timeout: "30 seconds"
|
|
274
274
|
},
|
|
275
275
|
async () => {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
276
|
+
try {
|
|
277
|
+
const resolveCredentials = await drizzle.createCredentialsResolver(
|
|
278
|
+
db,
|
|
279
|
+
this.env
|
|
280
|
+
);
|
|
281
|
+
const connector = await mock_connector.initiateConnector({
|
|
282
|
+
env: this.env,
|
|
283
|
+
bank: account.connectorKey,
|
|
284
|
+
resolveCredentials,
|
|
285
|
+
connectedAccounts: [
|
|
286
|
+
{
|
|
287
|
+
...account,
|
|
288
|
+
iban: account.iban
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
});
|
|
292
|
+
return await connector.getAllAccountPayments({
|
|
293
|
+
account,
|
|
294
|
+
filter: { dateFrom: account.lastSyncAt }
|
|
295
|
+
});
|
|
296
|
+
} catch (err) {
|
|
297
|
+
const message = err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : JSON.stringify(err);
|
|
298
|
+
throw new Error(message);
|
|
299
|
+
}
|
|
295
300
|
}
|
|
296
301
|
);
|
|
297
302
|
const paymentsToProcess = payments.filter(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
2
|
import { t as tables, g as getBatchByIdQuery, c as checksum, u as upsertBatchCommand, a as getAccountByIdQuery, b as createCredentialsResolver, d as createPaymentCommand } from '../shared/bank.CGIeLo8U.mjs';
|
|
3
3
|
import { f as isBatchSigned, a as isBatchFailed, c as isBatchOpen, g as isPaymentCompleted } from '../shared/bank.CbAwwIhZ.mjs';
|
|
4
|
-
import { h as toPreparedPayment, i as initiateConnector, f as toCompletedPayment } from '../shared/bank.
|
|
4
|
+
import { h as toPreparedPayment, i as initiateConnector, f as toCompletedPayment } from '../shared/bank.CeRbuycV.mjs';
|
|
5
5
|
import { eq } from 'drizzle-orm';
|
|
6
6
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
7
7
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
@@ -271,25 +271,30 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
|
|
|
271
271
|
timeout: "30 seconds"
|
|
272
272
|
},
|
|
273
273
|
async () => {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
274
|
+
try {
|
|
275
|
+
const resolveCredentials = await createCredentialsResolver(
|
|
276
|
+
db,
|
|
277
|
+
this.env
|
|
278
|
+
);
|
|
279
|
+
const connector = await initiateConnector({
|
|
280
|
+
env: this.env,
|
|
281
|
+
bank: account.connectorKey,
|
|
282
|
+
resolveCredentials,
|
|
283
|
+
connectedAccounts: [
|
|
284
|
+
{
|
|
285
|
+
...account,
|
|
286
|
+
iban: account.iban
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
});
|
|
290
|
+
return await connector.getAllAccountPayments({
|
|
291
|
+
account,
|
|
292
|
+
filter: { dateFrom: account.lastSyncAt }
|
|
293
|
+
});
|
|
294
|
+
} catch (err) {
|
|
295
|
+
const message = err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : JSON.stringify(err);
|
|
296
|
+
throw new Error(message);
|
|
297
|
+
}
|
|
293
298
|
}
|
|
294
299
|
);
|
|
295
300
|
const paymentsToProcess = payments.filter(
|
|
@@ -1054,7 +1054,8 @@ const initiateConnector = async ({
|
|
|
1054
1054
|
secretName: "BANK_SERVICE_FINBRICKS_PRIVATE_KEY_PEM"
|
|
1055
1055
|
})).data?.secretValue || "",
|
|
1056
1056
|
REDIRECT_URI: env.REDIRECT_URI,
|
|
1057
|
-
connectedAccounts
|
|
1057
|
+
connectedAccounts,
|
|
1058
|
+
resolveCredentials
|
|
1058
1059
|
});
|
|
1059
1060
|
case "CSOB":
|
|
1060
1061
|
return new CsobConnector({
|
|
@@ -1064,7 +1065,8 @@ const initiateConnector = async ({
|
|
|
1064
1065
|
secretName: "BANK_SERVICE_FINBRICKS_PRIVATE_KEY_PEM"
|
|
1065
1066
|
})).data?.secretValue || "",
|
|
1066
1067
|
REDIRECT_URI: env.REDIRECT_URI,
|
|
1067
|
-
connectedAccounts
|
|
1068
|
+
connectedAccounts,
|
|
1069
|
+
resolveCredentials
|
|
1068
1070
|
});
|
|
1069
1071
|
case "DBU":
|
|
1070
1072
|
return new DbuConnector({
|
|
@@ -1052,7 +1052,8 @@ const initiateConnector = async ({
|
|
|
1052
1052
|
secretName: "BANK_SERVICE_FINBRICKS_PRIVATE_KEY_PEM"
|
|
1053
1053
|
})).data?.secretValue || "",
|
|
1054
1054
|
REDIRECT_URI: env.REDIRECT_URI,
|
|
1055
|
-
connectedAccounts
|
|
1055
|
+
connectedAccounts,
|
|
1056
|
+
resolveCredentials
|
|
1056
1057
|
});
|
|
1057
1058
|
case "CSOB":
|
|
1058
1059
|
return new CsobConnector({
|
|
@@ -1062,7 +1063,8 @@ const initiateConnector = async ({
|
|
|
1062
1063
|
secretName: "BANK_SERVICE_FINBRICKS_PRIVATE_KEY_PEM"
|
|
1063
1064
|
})).data?.secretValue || "",
|
|
1064
1065
|
REDIRECT_URI: env.REDIRECT_URI,
|
|
1065
|
-
connectedAccounts
|
|
1066
|
+
connectedAccounts,
|
|
1067
|
+
resolveCredentials
|
|
1066
1068
|
});
|
|
1067
1069
|
case "DBU":
|
|
1068
1070
|
return new DbuConnector({
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const mock_connector = require('./shared/bank.
|
|
3
|
+
const mock_connector = require('./shared/bank.Ce-NBBw1.cjs');
|
|
4
4
|
const payment_schema = require('./shared/bank.IVhZ_RlH.cjs');
|
|
5
5
|
const batchLifecycle = require('./shared/bank.Bg3Pdwm4.cjs');
|
|
6
6
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, e as batchTransform, s as signFinbricksJws, t as toBatchedPayment, f as toCompletedPayment, g as toIncomingPayment, h as toPreparedPayment, u as useFinbricksFetch } 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, e as batchTransform, s as signFinbricksJws, t as toBatchedPayment, f as toCompletedPayment, g as toIncomingPayment, h as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.CeRbuycV.mjs';
|
|
2
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.993UA65l.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';
|