@develit-services/bank 0.3.46 → 0.3.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/schema.cjs +1 -1
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +57 -20
- package/dist/export/worker.d.cts +30 -17
- package/dist/export/worker.d.mts +30 -17
- package/dist/export/worker.d.ts +30 -17
- package/dist/export/worker.mjs +59 -22
- package/dist/export/workflows.cjs +4 -4
- package/dist/export/workflows.mjs +4 -4
- package/dist/shared/{bank.CpwLFudl.cjs → bank.BfBw79Y1.cjs} +0 -1
- package/dist/shared/{bank.BEL1HIxZ.d.cts → bank.CG0gMBFx.d.cts} +6 -6
- package/dist/shared/{bank.BEL1HIxZ.d.mts → bank.CG0gMBFx.d.mts} +6 -6
- package/dist/shared/{bank.BEL1HIxZ.d.ts → bank.CG0gMBFx.d.ts} +6 -6
- package/dist/shared/{bank.D0a-MZon.cjs → bank.CwRMB9Ek.cjs} +2 -2
- package/dist/shared/{bank.B1Gpn3ht.mjs → bank.D7JSg_d9.mjs} +1 -1
- package/dist/shared/{bank.CPYfE-Ei.cjs → bank.DXj5tpXa.cjs} +1 -1
- package/dist/shared/{bank.BUEmFxS8.mjs → bank.DYJuicD-.mjs} +2 -2
- package/dist/shared/{bank.D-3fzX63.mjs → bank.m2X4FSvr.mjs} +0 -1
- package/dist/types.cjs +2 -2
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.mjs +2 -2
- package/package.json +1 -1
package/dist/database/schema.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.
|
|
1
|
+
export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.CG0gMBFx.cjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'drizzle-zod';
|
|
4
4
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.
|
|
1
|
+
export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.CG0gMBFx.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'drizzle-zod';
|
|
4
4
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.
|
|
1
|
+
export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.CG0gMBFx.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'drizzle-zod';
|
|
4
4
|
import 'drizzle-orm/sqlite-core';
|
package/dist/database/schema.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { t as account, u as accountCredentials, n as batch, r as ott, p as payment, q as paymentRelations } from '../shared/bank.
|
|
1
|
+
export { t as account, u as accountCredentials, n as batch, r as ott, p as payment, q as paymentRelations } from '../shared/bank.m2X4FSvr.mjs';
|
|
2
2
|
import '@develit-io/backend-sdk';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import 'date-fns';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const cloudflare_workers = require('cloudflare:workers');
|
|
5
5
|
const d1 = require('drizzle-orm/d1');
|
|
6
|
-
const drizzle = require('../shared/bank.
|
|
6
|
+
const drizzle = require('../shared/bank.DXj5tpXa.cjs');
|
|
7
7
|
const zod = require('zod');
|
|
8
|
-
const database_schema = require('../shared/bank.
|
|
8
|
+
const database_schema = require('../shared/bank.BfBw79Y1.cjs');
|
|
9
9
|
const generalCodes = require('@develit-io/general-codes');
|
|
10
10
|
require('date-fns');
|
|
11
11
|
const drizzleOrm = require('drizzle-orm');
|
|
12
12
|
require('jose');
|
|
13
13
|
require('node:crypto');
|
|
14
|
-
const encryption = require('../shared/bank.
|
|
14
|
+
const encryption = require('../shared/bank.CwRMB9Ek.cjs');
|
|
15
15
|
require('drizzle-orm/sqlite-core');
|
|
16
16
|
require('drizzle-orm/relations');
|
|
17
17
|
require('drizzle-zod');
|
|
@@ -93,6 +93,27 @@ const deletePaymentsByAccountCommand = (db, { accountId }) => {
|
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
+
const getAccountBatchCountsQuery = async (db, { accountId }) => {
|
|
97
|
+
const result = await db.select({
|
|
98
|
+
totalCount: drizzleOrm.sql`COUNT(*)`.as("totalCount"),
|
|
99
|
+
openCount: drizzleOrm.sql`SUM(CASE WHEN ${drizzle.tables.batch.status} = 'OPEN' THEN 1 ELSE 0 END)`.as(
|
|
100
|
+
"openCount"
|
|
101
|
+
),
|
|
102
|
+
readyToSignCount: drizzleOrm.sql`SUM(CASE WHEN ${drizzle.tables.batch.status} = 'READY_TO_SIGN' THEN 1 ELSE 0 END)`.as(
|
|
103
|
+
"readyToSignCount"
|
|
104
|
+
),
|
|
105
|
+
failedCount: drizzleOrm.sql`SUM(CASE WHEN ${drizzle.tables.batch.status} = 'FAILED' THEN 1 ELSE 0 END)`.as(
|
|
106
|
+
"failedCount"
|
|
107
|
+
)
|
|
108
|
+
}).from(drizzle.tables.batch).where(drizzleOrm.eq(drizzle.tables.batch.accountId, accountId)).then(backendSdk.first);
|
|
109
|
+
return result || {
|
|
110
|
+
totalCount: 0,
|
|
111
|
+
openCount: 0,
|
|
112
|
+
readyToSignCount: 0,
|
|
113
|
+
failedCount: 0
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
96
117
|
const getAccountByIbanQuery = async (db, { iban }) => {
|
|
97
118
|
return await db.select().from(drizzle.tables.account).where(drizzleOrm.eq(drizzle.tables.account.iban, iban)).get();
|
|
98
119
|
};
|
|
@@ -385,6 +406,13 @@ const updateAccountInputSchema = zod.z.object({
|
|
|
385
406
|
account: database_schema.accountInsertSchema
|
|
386
407
|
});
|
|
387
408
|
|
|
409
|
+
const getBankAccountsInputSchema = zod.z.object({
|
|
410
|
+
includes: zod.z.object({
|
|
411
|
+
workflow: zod.z.boolean().optional(),
|
|
412
|
+
batchCounts: zod.z.boolean().optional()
|
|
413
|
+
}).optional()
|
|
414
|
+
});
|
|
415
|
+
|
|
388
416
|
const disconnectAccountInputSchema = zod.z.object({
|
|
389
417
|
accountId: zod.z.uuid()
|
|
390
418
|
});
|
|
@@ -981,32 +1009,41 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
981
1009
|
}
|
|
982
1010
|
);
|
|
983
1011
|
}
|
|
984
|
-
async getBankAccounts() {
|
|
1012
|
+
async getBankAccounts(input) {
|
|
985
1013
|
return this.handleAction(
|
|
986
|
-
|
|
1014
|
+
{ data: input, schema: getBankAccountsInputSchema },
|
|
987
1015
|
{ successMessage: "Bank accounts retrieved successfully" },
|
|
988
|
-
async () => {
|
|
1016
|
+
async ({ includes }) => {
|
|
989
1017
|
const accounts = await this._getAccounts();
|
|
990
|
-
const
|
|
1018
|
+
const includeWorkflow = includes?.workflow ?? true;
|
|
1019
|
+
const includeBatchCounts = includes?.batchCounts ?? false;
|
|
1020
|
+
const accountsWithOptionalFields = await Promise.all(
|
|
991
1021
|
accounts.map(async (a) => {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
workflow
|
|
1022
|
+
const result = { ...a };
|
|
1023
|
+
if (includeWorkflow) {
|
|
1024
|
+
let status;
|
|
1025
|
+
try {
|
|
1026
|
+
const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(a.id);
|
|
1027
|
+
status = await instance.status();
|
|
1028
|
+
} catch (_) {
|
|
1029
|
+
status = null;
|
|
1030
|
+
}
|
|
1031
|
+
result.workflow = status ? {
|
|
1002
1032
|
instanceId: a.id,
|
|
1003
1033
|
details: status
|
|
1004
|
-
} : null
|
|
1005
|
-
}
|
|
1034
|
+
} : null;
|
|
1035
|
+
}
|
|
1036
|
+
if (includeBatchCounts) {
|
|
1037
|
+
const batchCounts = await getAccountBatchCountsQuery(this.db, {
|
|
1038
|
+
accountId: a.id
|
|
1039
|
+
});
|
|
1040
|
+
result.batches = batchCounts;
|
|
1041
|
+
}
|
|
1042
|
+
return result;
|
|
1006
1043
|
})
|
|
1007
1044
|
);
|
|
1008
1045
|
return {
|
|
1009
|
-
accounts:
|
|
1046
|
+
accounts: accountsWithOptionalFields,
|
|
1010
1047
|
totalCount: accounts.length
|
|
1011
1048
|
};
|
|
1012
1049
|
}
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.
|
|
1
|
+
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.CG0gMBFx.cjs';
|
|
2
2
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
3
3
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
@@ -1531,21 +1531,19 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
1531
1531
|
}, z.core.$strip>;
|
|
1532
1532
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
1533
1533
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1534
|
+
FAILED: "FAILED";
|
|
1534
1535
|
OPEN: "OPEN";
|
|
1535
|
-
FULL: "FULL";
|
|
1536
1536
|
PROCESSING: "PROCESSING";
|
|
1537
1537
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
1538
1538
|
SIGNED: "SIGNED";
|
|
1539
1539
|
SIGNATURE_FAILED: "SIGNATURE_FAILED";
|
|
1540
|
-
FAILED: "FAILED";
|
|
1541
1540
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1541
|
+
FAILED: "FAILED";
|
|
1542
1542
|
OPEN: "OPEN";
|
|
1543
|
-
FULL: "FULL";
|
|
1544
1543
|
PROCESSING: "PROCESSING";
|
|
1545
1544
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
1546
1545
|
SIGNED: "SIGNED";
|
|
1547
1546
|
SIGNATURE_FAILED: "SIGNATURE_FAILED";
|
|
1548
|
-
FAILED: "FAILED";
|
|
1549
1547
|
}>>]>>;
|
|
1550
1548
|
}, z.core.$strip>;
|
|
1551
1549
|
type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
|
|
@@ -1790,16 +1788,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
1790
1788
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
1791
1789
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
1792
1790
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1793
|
-
FAILED: "FAILED";
|
|
1794
1791
|
PREPARED: "PREPARED";
|
|
1795
1792
|
INITIALIZED: "INITIALIZED";
|
|
1793
|
+
FAILED: "FAILED";
|
|
1796
1794
|
PENDING: "PENDING";
|
|
1797
1795
|
COMPLETED: "COMPLETED";
|
|
1798
1796
|
CREATED: "CREATED";
|
|
1799
1797
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1800
|
-
FAILED: "FAILED";
|
|
1801
1798
|
PREPARED: "PREPARED";
|
|
1802
1799
|
INITIALIZED: "INITIALIZED";
|
|
1800
|
+
FAILED: "FAILED";
|
|
1803
1801
|
PENDING: "PENDING";
|
|
1804
1802
|
COMPLETED: "COMPLETED";
|
|
1805
1803
|
CREATED: "CREATED";
|
|
@@ -2396,14 +2394,29 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
2396
2394
|
type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
|
|
2397
2395
|
type UpdateAccountOutput = AccountSelectType;
|
|
2398
2396
|
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
}
|
|
2397
|
+
declare const getBankAccountsInputSchema: z.ZodObject<{
|
|
2398
|
+
includes: z.ZodOptional<z.ZodObject<{
|
|
2399
|
+
workflow: z.ZodOptional<z.ZodBoolean>;
|
|
2400
|
+
batchCounts: z.ZodOptional<z.ZodBoolean>;
|
|
2401
|
+
}, z.core.$strip>>;
|
|
2402
|
+
}, z.core.$strip>;
|
|
2403
|
+
type GetBankAccountsInput = z.infer<typeof getBankAccountsInputSchema>;
|
|
2404
|
+
type WorkflowInfo = {
|
|
2405
|
+
instanceId: string;
|
|
2406
|
+
details: WorkflowInstanceStatus;
|
|
2407
|
+
} | null;
|
|
2408
|
+
type BatchCounts = {
|
|
2409
|
+
totalCount: number;
|
|
2410
|
+
openCount: number;
|
|
2411
|
+
readyToSignCount: number;
|
|
2412
|
+
failedCount: number;
|
|
2413
|
+
};
|
|
2414
|
+
type AccountWithOptionalFields = AccountSelectType & {
|
|
2415
|
+
workflow?: WorkflowInfo;
|
|
2416
|
+
batches?: BatchCounts;
|
|
2404
2417
|
};
|
|
2405
|
-
type
|
|
2406
|
-
accounts:
|
|
2418
|
+
type GetBankAccountsOutput = {
|
|
2419
|
+
accounts: AccountWithOptionalFields[];
|
|
2407
2420
|
totalCount: number;
|
|
2408
2421
|
};
|
|
2409
2422
|
|
|
@@ -2499,14 +2512,14 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2499
2512
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
2500
2513
|
paymentsToBatch: SendPaymentInput[];
|
|
2501
2514
|
}): Promise<IRPCResponse<{
|
|
2502
|
-
status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
|
|
2503
2515
|
id: string;
|
|
2504
2516
|
createdAt: Date | null;
|
|
2505
2517
|
updatedAt: Date | null;
|
|
2506
2518
|
deletedAt: Date | null;
|
|
2507
|
-
accountId: string | null;
|
|
2508
2519
|
batchPaymentInitiatedAt: Date | null;
|
|
2509
2520
|
authorizationUrls: string[] | null;
|
|
2521
|
+
status: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
|
|
2522
|
+
accountId: string | null;
|
|
2510
2523
|
statusReason: string | null;
|
|
2511
2524
|
payments: PaymentInsertType[];
|
|
2512
2525
|
metadata: BatchMetadata | null;
|
|
@@ -2520,7 +2533,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2520
2533
|
authorizeAccount(input: AuthorizeAccountInput): Promise<IRPCResponse<AuthorizeAccountOutput>>;
|
|
2521
2534
|
simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
|
|
2522
2535
|
sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
|
|
2523
|
-
getBankAccounts(): Promise<IRPCResponse<
|
|
2536
|
+
getBankAccounts(input: GetBankAccountsInput): Promise<IRPCResponse<GetBankAccountsOutput>>;
|
|
2524
2537
|
updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
|
|
2525
2538
|
disconnectAccount(input: DisconnectAccountInput): Promise<IRPCResponse<DisconnectAccountOutput>>;
|
|
2526
2539
|
getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.
|
|
1
|
+
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.CG0gMBFx.mjs';
|
|
2
2
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
3
3
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
@@ -1531,21 +1531,19 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
1531
1531
|
}, z.core.$strip>;
|
|
1532
1532
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
1533
1533
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1534
|
+
FAILED: "FAILED";
|
|
1534
1535
|
OPEN: "OPEN";
|
|
1535
|
-
FULL: "FULL";
|
|
1536
1536
|
PROCESSING: "PROCESSING";
|
|
1537
1537
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
1538
1538
|
SIGNED: "SIGNED";
|
|
1539
1539
|
SIGNATURE_FAILED: "SIGNATURE_FAILED";
|
|
1540
|
-
FAILED: "FAILED";
|
|
1541
1540
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1541
|
+
FAILED: "FAILED";
|
|
1542
1542
|
OPEN: "OPEN";
|
|
1543
|
-
FULL: "FULL";
|
|
1544
1543
|
PROCESSING: "PROCESSING";
|
|
1545
1544
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
1546
1545
|
SIGNED: "SIGNED";
|
|
1547
1546
|
SIGNATURE_FAILED: "SIGNATURE_FAILED";
|
|
1548
|
-
FAILED: "FAILED";
|
|
1549
1547
|
}>>]>>;
|
|
1550
1548
|
}, z.core.$strip>;
|
|
1551
1549
|
type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
|
|
@@ -1790,16 +1788,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
1790
1788
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
1791
1789
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
1792
1790
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1793
|
-
FAILED: "FAILED";
|
|
1794
1791
|
PREPARED: "PREPARED";
|
|
1795
1792
|
INITIALIZED: "INITIALIZED";
|
|
1793
|
+
FAILED: "FAILED";
|
|
1796
1794
|
PENDING: "PENDING";
|
|
1797
1795
|
COMPLETED: "COMPLETED";
|
|
1798
1796
|
CREATED: "CREATED";
|
|
1799
1797
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1800
|
-
FAILED: "FAILED";
|
|
1801
1798
|
PREPARED: "PREPARED";
|
|
1802
1799
|
INITIALIZED: "INITIALIZED";
|
|
1800
|
+
FAILED: "FAILED";
|
|
1803
1801
|
PENDING: "PENDING";
|
|
1804
1802
|
COMPLETED: "COMPLETED";
|
|
1805
1803
|
CREATED: "CREATED";
|
|
@@ -2396,14 +2394,29 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
2396
2394
|
type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
|
|
2397
2395
|
type UpdateAccountOutput = AccountSelectType;
|
|
2398
2396
|
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
}
|
|
2397
|
+
declare const getBankAccountsInputSchema: z.ZodObject<{
|
|
2398
|
+
includes: z.ZodOptional<z.ZodObject<{
|
|
2399
|
+
workflow: z.ZodOptional<z.ZodBoolean>;
|
|
2400
|
+
batchCounts: z.ZodOptional<z.ZodBoolean>;
|
|
2401
|
+
}, z.core.$strip>>;
|
|
2402
|
+
}, z.core.$strip>;
|
|
2403
|
+
type GetBankAccountsInput = z.infer<typeof getBankAccountsInputSchema>;
|
|
2404
|
+
type WorkflowInfo = {
|
|
2405
|
+
instanceId: string;
|
|
2406
|
+
details: WorkflowInstanceStatus;
|
|
2407
|
+
} | null;
|
|
2408
|
+
type BatchCounts = {
|
|
2409
|
+
totalCount: number;
|
|
2410
|
+
openCount: number;
|
|
2411
|
+
readyToSignCount: number;
|
|
2412
|
+
failedCount: number;
|
|
2413
|
+
};
|
|
2414
|
+
type AccountWithOptionalFields = AccountSelectType & {
|
|
2415
|
+
workflow?: WorkflowInfo;
|
|
2416
|
+
batches?: BatchCounts;
|
|
2404
2417
|
};
|
|
2405
|
-
type
|
|
2406
|
-
accounts:
|
|
2418
|
+
type GetBankAccountsOutput = {
|
|
2419
|
+
accounts: AccountWithOptionalFields[];
|
|
2407
2420
|
totalCount: number;
|
|
2408
2421
|
};
|
|
2409
2422
|
|
|
@@ -2499,14 +2512,14 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2499
2512
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
2500
2513
|
paymentsToBatch: SendPaymentInput[];
|
|
2501
2514
|
}): Promise<IRPCResponse<{
|
|
2502
|
-
status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
|
|
2503
2515
|
id: string;
|
|
2504
2516
|
createdAt: Date | null;
|
|
2505
2517
|
updatedAt: Date | null;
|
|
2506
2518
|
deletedAt: Date | null;
|
|
2507
|
-
accountId: string | null;
|
|
2508
2519
|
batchPaymentInitiatedAt: Date | null;
|
|
2509
2520
|
authorizationUrls: string[] | null;
|
|
2521
|
+
status: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
|
|
2522
|
+
accountId: string | null;
|
|
2510
2523
|
statusReason: string | null;
|
|
2511
2524
|
payments: PaymentInsertType[];
|
|
2512
2525
|
metadata: BatchMetadata | null;
|
|
@@ -2520,7 +2533,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2520
2533
|
authorizeAccount(input: AuthorizeAccountInput): Promise<IRPCResponse<AuthorizeAccountOutput>>;
|
|
2521
2534
|
simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
|
|
2522
2535
|
sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
|
|
2523
|
-
getBankAccounts(): Promise<IRPCResponse<
|
|
2536
|
+
getBankAccounts(input: GetBankAccountsInput): Promise<IRPCResponse<GetBankAccountsOutput>>;
|
|
2524
2537
|
updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
|
|
2525
2538
|
disconnectAccount(input: DisconnectAccountInput): Promise<IRPCResponse<DisconnectAccountOutput>>;
|
|
2526
2539
|
getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.
|
|
1
|
+
import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.CG0gMBFx.js';
|
|
2
2
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
3
3
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
@@ -1531,21 +1531,19 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
1531
1531
|
}, z.core.$strip>;
|
|
1532
1532
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
1533
1533
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1534
|
+
FAILED: "FAILED";
|
|
1534
1535
|
OPEN: "OPEN";
|
|
1535
|
-
FULL: "FULL";
|
|
1536
1536
|
PROCESSING: "PROCESSING";
|
|
1537
1537
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
1538
1538
|
SIGNED: "SIGNED";
|
|
1539
1539
|
SIGNATURE_FAILED: "SIGNATURE_FAILED";
|
|
1540
|
-
FAILED: "FAILED";
|
|
1541
1540
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1541
|
+
FAILED: "FAILED";
|
|
1542
1542
|
OPEN: "OPEN";
|
|
1543
|
-
FULL: "FULL";
|
|
1544
1543
|
PROCESSING: "PROCESSING";
|
|
1545
1544
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
1546
1545
|
SIGNED: "SIGNED";
|
|
1547
1546
|
SIGNATURE_FAILED: "SIGNATURE_FAILED";
|
|
1548
|
-
FAILED: "FAILED";
|
|
1549
1547
|
}>>]>>;
|
|
1550
1548
|
}, z.core.$strip>;
|
|
1551
1549
|
type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
|
|
@@ -1790,16 +1788,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
1790
1788
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
1791
1789
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
1792
1790
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1793
|
-
FAILED: "FAILED";
|
|
1794
1791
|
PREPARED: "PREPARED";
|
|
1795
1792
|
INITIALIZED: "INITIALIZED";
|
|
1793
|
+
FAILED: "FAILED";
|
|
1796
1794
|
PENDING: "PENDING";
|
|
1797
1795
|
COMPLETED: "COMPLETED";
|
|
1798
1796
|
CREATED: "CREATED";
|
|
1799
1797
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1800
|
-
FAILED: "FAILED";
|
|
1801
1798
|
PREPARED: "PREPARED";
|
|
1802
1799
|
INITIALIZED: "INITIALIZED";
|
|
1800
|
+
FAILED: "FAILED";
|
|
1803
1801
|
PENDING: "PENDING";
|
|
1804
1802
|
COMPLETED: "COMPLETED";
|
|
1805
1803
|
CREATED: "CREATED";
|
|
@@ -2396,14 +2394,29 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
2396
2394
|
type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
|
|
2397
2395
|
type UpdateAccountOutput = AccountSelectType;
|
|
2398
2396
|
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
}
|
|
2397
|
+
declare const getBankAccountsInputSchema: z.ZodObject<{
|
|
2398
|
+
includes: z.ZodOptional<z.ZodObject<{
|
|
2399
|
+
workflow: z.ZodOptional<z.ZodBoolean>;
|
|
2400
|
+
batchCounts: z.ZodOptional<z.ZodBoolean>;
|
|
2401
|
+
}, z.core.$strip>>;
|
|
2402
|
+
}, z.core.$strip>;
|
|
2403
|
+
type GetBankAccountsInput = z.infer<typeof getBankAccountsInputSchema>;
|
|
2404
|
+
type WorkflowInfo = {
|
|
2405
|
+
instanceId: string;
|
|
2406
|
+
details: WorkflowInstanceStatus;
|
|
2407
|
+
} | null;
|
|
2408
|
+
type BatchCounts = {
|
|
2409
|
+
totalCount: number;
|
|
2410
|
+
openCount: number;
|
|
2411
|
+
readyToSignCount: number;
|
|
2412
|
+
failedCount: number;
|
|
2413
|
+
};
|
|
2414
|
+
type AccountWithOptionalFields = AccountSelectType & {
|
|
2415
|
+
workflow?: WorkflowInfo;
|
|
2416
|
+
batches?: BatchCounts;
|
|
2404
2417
|
};
|
|
2405
|
-
type
|
|
2406
|
-
accounts:
|
|
2418
|
+
type GetBankAccountsOutput = {
|
|
2419
|
+
accounts: AccountWithOptionalFields[];
|
|
2407
2420
|
totalCount: number;
|
|
2408
2421
|
};
|
|
2409
2422
|
|
|
@@ -2499,14 +2512,14 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2499
2512
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
2500
2513
|
paymentsToBatch: SendPaymentInput[];
|
|
2501
2514
|
}): Promise<IRPCResponse<{
|
|
2502
|
-
status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
|
|
2503
2515
|
id: string;
|
|
2504
2516
|
createdAt: Date | null;
|
|
2505
2517
|
updatedAt: Date | null;
|
|
2506
2518
|
deletedAt: Date | null;
|
|
2507
|
-
accountId: string | null;
|
|
2508
2519
|
batchPaymentInitiatedAt: Date | null;
|
|
2509
2520
|
authorizationUrls: string[] | null;
|
|
2521
|
+
status: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
|
|
2522
|
+
accountId: string | null;
|
|
2510
2523
|
statusReason: string | null;
|
|
2511
2524
|
payments: PaymentInsertType[];
|
|
2512
2525
|
metadata: BatchMetadata | null;
|
|
@@ -2520,7 +2533,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2520
2533
|
authorizeAccount(input: AuthorizeAccountInput): Promise<IRPCResponse<AuthorizeAccountOutput>>;
|
|
2521
2534
|
simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
|
|
2522
2535
|
sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
|
|
2523
|
-
getBankAccounts(): Promise<IRPCResponse<
|
|
2536
|
+
getBankAccounts(input: GetBankAccountsInput): Promise<IRPCResponse<GetBankAccountsOutput>>;
|
|
2524
2537
|
updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
|
|
2525
2538
|
disconnectAccount(input: DisconnectAccountInput): Promise<IRPCResponse<DisconnectAccountOutput>>;
|
|
2526
2539
|
getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { uuidv4, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError,
|
|
1
|
+
import { uuidv4, first, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
2
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
3
3
|
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { t as tables } from '../shared/bank.
|
|
4
|
+
import { t as tables } from '../shared/bank.D7JSg_d9.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, d as CONNECTOR_KEYS, B as BATCH_STATUSES, a as PAYMENT_STATUSES, b as PAYMENT_DIRECTIONS, f as accountInsertSchema } from '../shared/bank.
|
|
6
|
+
import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, d as CONNECTOR_KEYS, B as BATCH_STATUSES, a as PAYMENT_STATUSES, b as PAYMENT_DIRECTIONS, f as accountInsertSchema } from '../shared/bank.m2X4FSvr.mjs';
|
|
7
7
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
8
8
|
import 'date-fns';
|
|
9
|
-
import { eq, inArray, and,
|
|
9
|
+
import { eq, sql, inArray, and, asc, desc, gte, lte } from 'drizzle-orm';
|
|
10
10
|
import 'jose';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import { f as encrypt, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, d as getBatchByIdQuery, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.
|
|
12
|
+
import { f as encrypt, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, d as getBatchByIdQuery, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.DYJuicD-.mjs';
|
|
13
13
|
import 'drizzle-orm/sqlite-core';
|
|
14
14
|
import 'drizzle-orm/relations';
|
|
15
15
|
import 'drizzle-zod';
|
|
@@ -91,6 +91,27 @@ const deletePaymentsByAccountCommand = (db, { accountId }) => {
|
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
+
const getAccountBatchCountsQuery = async (db, { accountId }) => {
|
|
95
|
+
const result = await db.select({
|
|
96
|
+
totalCount: sql`COUNT(*)`.as("totalCount"),
|
|
97
|
+
openCount: sql`SUM(CASE WHEN ${tables.batch.status} = 'OPEN' THEN 1 ELSE 0 END)`.as(
|
|
98
|
+
"openCount"
|
|
99
|
+
),
|
|
100
|
+
readyToSignCount: sql`SUM(CASE WHEN ${tables.batch.status} = 'READY_TO_SIGN' THEN 1 ELSE 0 END)`.as(
|
|
101
|
+
"readyToSignCount"
|
|
102
|
+
),
|
|
103
|
+
failedCount: sql`SUM(CASE WHEN ${tables.batch.status} = 'FAILED' THEN 1 ELSE 0 END)`.as(
|
|
104
|
+
"failedCount"
|
|
105
|
+
)
|
|
106
|
+
}).from(tables.batch).where(eq(tables.batch.accountId, accountId)).then(first);
|
|
107
|
+
return result || {
|
|
108
|
+
totalCount: 0,
|
|
109
|
+
openCount: 0,
|
|
110
|
+
readyToSignCount: 0,
|
|
111
|
+
failedCount: 0
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
|
|
94
115
|
const getAccountByIbanQuery = async (db, { iban }) => {
|
|
95
116
|
return await db.select().from(tables.account).where(eq(tables.account.iban, iban)).get();
|
|
96
117
|
};
|
|
@@ -383,6 +404,13 @@ const updateAccountInputSchema = z.object({
|
|
|
383
404
|
account: accountInsertSchema
|
|
384
405
|
});
|
|
385
406
|
|
|
407
|
+
const getBankAccountsInputSchema = z.object({
|
|
408
|
+
includes: z.object({
|
|
409
|
+
workflow: z.boolean().optional(),
|
|
410
|
+
batchCounts: z.boolean().optional()
|
|
411
|
+
}).optional()
|
|
412
|
+
});
|
|
413
|
+
|
|
386
414
|
const disconnectAccountInputSchema = z.object({
|
|
387
415
|
accountId: z.uuid()
|
|
388
416
|
});
|
|
@@ -979,32 +1007,41 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
979
1007
|
}
|
|
980
1008
|
);
|
|
981
1009
|
}
|
|
982
|
-
async getBankAccounts() {
|
|
1010
|
+
async getBankAccounts(input) {
|
|
983
1011
|
return this.handleAction(
|
|
984
|
-
|
|
1012
|
+
{ data: input, schema: getBankAccountsInputSchema },
|
|
985
1013
|
{ successMessage: "Bank accounts retrieved successfully" },
|
|
986
|
-
async () => {
|
|
1014
|
+
async ({ includes }) => {
|
|
987
1015
|
const accounts = await this._getAccounts();
|
|
988
|
-
const
|
|
1016
|
+
const includeWorkflow = includes?.workflow ?? true;
|
|
1017
|
+
const includeBatchCounts = includes?.batchCounts ?? false;
|
|
1018
|
+
const accountsWithOptionalFields = await Promise.all(
|
|
989
1019
|
accounts.map(async (a) => {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
workflow
|
|
1020
|
+
const result = { ...a };
|
|
1021
|
+
if (includeWorkflow) {
|
|
1022
|
+
let status;
|
|
1023
|
+
try {
|
|
1024
|
+
const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(a.id);
|
|
1025
|
+
status = await instance.status();
|
|
1026
|
+
} catch (_) {
|
|
1027
|
+
status = null;
|
|
1028
|
+
}
|
|
1029
|
+
result.workflow = status ? {
|
|
1000
1030
|
instanceId: a.id,
|
|
1001
1031
|
details: status
|
|
1002
|
-
} : null
|
|
1003
|
-
}
|
|
1032
|
+
} : null;
|
|
1033
|
+
}
|
|
1034
|
+
if (includeBatchCounts) {
|
|
1035
|
+
const batchCounts = await getAccountBatchCountsQuery(this.db, {
|
|
1036
|
+
accountId: a.id
|
|
1037
|
+
});
|
|
1038
|
+
result.batches = batchCounts;
|
|
1039
|
+
}
|
|
1040
|
+
return result;
|
|
1004
1041
|
})
|
|
1005
1042
|
);
|
|
1006
1043
|
return {
|
|
1007
|
-
accounts:
|
|
1044
|
+
accounts: accountsWithOptionalFields,
|
|
1008
1045
|
totalCount: accounts.length
|
|
1009
1046
|
};
|
|
1010
1047
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
const cloudflare_workers = require('cloudflare:workers');
|
|
4
4
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
5
5
|
const d1 = require('drizzle-orm/d1');
|
|
6
|
-
const drizzle = require('../shared/bank.
|
|
6
|
+
const drizzle = require('../shared/bank.DXj5tpXa.cjs');
|
|
7
7
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
8
|
-
const encryption = require('../shared/bank.
|
|
8
|
+
const encryption = require('../shared/bank.CwRMB9Ek.cjs');
|
|
9
9
|
const drizzleOrm = require('drizzle-orm');
|
|
10
10
|
require('date-fns');
|
|
11
|
-
require('../shared/bank.
|
|
11
|
+
require('../shared/bank.BfBw79Y1.cjs');
|
|
12
12
|
require('drizzle-orm/sqlite-core');
|
|
13
13
|
require('drizzle-orm/relations');
|
|
14
14
|
require('@develit-io/general-codes');
|
|
@@ -196,7 +196,7 @@ class BankProcessBatch extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
196
196
|
throw new cloudflare_workflows.NonRetryableError(
|
|
197
197
|
`Batch is in FAILED status and cannot be processed, manual review needed`
|
|
198
198
|
);
|
|
199
|
-
if (batch.status === "OPEN"
|
|
199
|
+
if (batch.status === "OPEN") {
|
|
200
200
|
const updatedBatch = await encryption.upsertBatchCommand(db, {
|
|
201
201
|
batch: {
|
|
202
202
|
...batch,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
2
2
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
3
3
|
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { t as tables } from '../shared/bank.
|
|
4
|
+
import { t as tables } from '../shared/bank.D7JSg_d9.mjs';
|
|
5
5
|
import { asNonEmpty, first } from '@develit-io/backend-sdk';
|
|
6
|
-
import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand, d as getBatchByIdQuery, e as checksum, u as upsertBatchCommand } from '../shared/bank.
|
|
6
|
+
import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand, d as getBatchByIdQuery, e as checksum, u as upsertBatchCommand } from '../shared/bank.DYJuicD-.mjs';
|
|
7
7
|
import { eq } from 'drizzle-orm';
|
|
8
8
|
import 'date-fns';
|
|
9
|
-
import '../shared/bank.
|
|
9
|
+
import '../shared/bank.m2X4FSvr.mjs';
|
|
10
10
|
import 'drizzle-orm/sqlite-core';
|
|
11
11
|
import 'drizzle-orm/relations';
|
|
12
12
|
import '@develit-io/general-codes';
|
|
@@ -194,7 +194,7 @@ class BankProcessBatch extends WorkflowEntrypoint {
|
|
|
194
194
|
throw new NonRetryableError(
|
|
195
195
|
`Batch is in FAILED status and cannot be processed, manual review needed`
|
|
196
196
|
);
|
|
197
|
-
if (batch.status === "OPEN"
|
|
197
|
+
if (batch.status === "OPEN") {
|
|
198
198
|
const updatedBatch = await upsertBatchCommand(db, {
|
|
199
199
|
batch: {
|
|
200
200
|
...batch,
|
|
@@ -71,20 +71,20 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
71
71
|
tableName: "batch";
|
|
72
72
|
dataType: "string";
|
|
73
73
|
columnType: "SQLiteText";
|
|
74
|
-
data: "
|
|
74
|
+
data: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
|
|
75
75
|
driverParam: string;
|
|
76
76
|
notNull: false;
|
|
77
77
|
hasDefault: false;
|
|
78
78
|
isPrimaryKey: false;
|
|
79
79
|
isAutoincrement: false;
|
|
80
80
|
hasRuntimeDefault: false;
|
|
81
|
-
enumValues: ["OPEN", "
|
|
81
|
+
enumValues: ["OPEN", "PROCESSING", "READY_TO_SIGN", "SIGNED", "SIGNATURE_FAILED", "FAILED"];
|
|
82
82
|
baseColumn: never;
|
|
83
83
|
identity: undefined;
|
|
84
84
|
generated: undefined;
|
|
85
85
|
}, {}, {
|
|
86
86
|
length: number | undefined;
|
|
87
|
-
$type: "
|
|
87
|
+
$type: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
|
|
88
88
|
}>;
|
|
89
89
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
90
90
|
name: "status_reason";
|
|
@@ -418,7 +418,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
418
418
|
tableName: "payment";
|
|
419
419
|
dataType: "string";
|
|
420
420
|
columnType: "SQLiteText";
|
|
421
|
-
data: "
|
|
421
|
+
data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
|
|
422
422
|
driverParam: string;
|
|
423
423
|
notNull: true;
|
|
424
424
|
hasDefault: false;
|
|
@@ -431,7 +431,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
431
431
|
generated: undefined;
|
|
432
432
|
}, {}, {
|
|
433
433
|
length: number | undefined;
|
|
434
|
-
$type: "
|
|
434
|
+
$type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
|
|
435
435
|
}>;
|
|
436
436
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
437
437
|
name: "status_reason";
|
|
@@ -1607,7 +1607,7 @@ type CurrencyCode = (typeof CURRENCY_CODES)[number];
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Batch status constants
|
|
1609
1609
|
*/
|
|
1610
|
-
declare const BATCH_STATUSES: readonly ["OPEN", "
|
|
1610
|
+
declare const BATCH_STATUSES: readonly ["OPEN", "PROCESSING", "READY_TO_SIGN", "SIGNED", "SIGNATURE_FAILED", "FAILED"];
|
|
1611
1611
|
/**
|
|
1612
1612
|
* Type definition for batch status
|
|
1613
1613
|
*/
|
|
@@ -71,20 +71,20 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
71
71
|
tableName: "batch";
|
|
72
72
|
dataType: "string";
|
|
73
73
|
columnType: "SQLiteText";
|
|
74
|
-
data: "
|
|
74
|
+
data: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
|
|
75
75
|
driverParam: string;
|
|
76
76
|
notNull: false;
|
|
77
77
|
hasDefault: false;
|
|
78
78
|
isPrimaryKey: false;
|
|
79
79
|
isAutoincrement: false;
|
|
80
80
|
hasRuntimeDefault: false;
|
|
81
|
-
enumValues: ["OPEN", "
|
|
81
|
+
enumValues: ["OPEN", "PROCESSING", "READY_TO_SIGN", "SIGNED", "SIGNATURE_FAILED", "FAILED"];
|
|
82
82
|
baseColumn: never;
|
|
83
83
|
identity: undefined;
|
|
84
84
|
generated: undefined;
|
|
85
85
|
}, {}, {
|
|
86
86
|
length: number | undefined;
|
|
87
|
-
$type: "
|
|
87
|
+
$type: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
|
|
88
88
|
}>;
|
|
89
89
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
90
90
|
name: "status_reason";
|
|
@@ -418,7 +418,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
418
418
|
tableName: "payment";
|
|
419
419
|
dataType: "string";
|
|
420
420
|
columnType: "SQLiteText";
|
|
421
|
-
data: "
|
|
421
|
+
data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
|
|
422
422
|
driverParam: string;
|
|
423
423
|
notNull: true;
|
|
424
424
|
hasDefault: false;
|
|
@@ -431,7 +431,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
431
431
|
generated: undefined;
|
|
432
432
|
}, {}, {
|
|
433
433
|
length: number | undefined;
|
|
434
|
-
$type: "
|
|
434
|
+
$type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
|
|
435
435
|
}>;
|
|
436
436
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
437
437
|
name: "status_reason";
|
|
@@ -1607,7 +1607,7 @@ type CurrencyCode = (typeof CURRENCY_CODES)[number];
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Batch status constants
|
|
1609
1609
|
*/
|
|
1610
|
-
declare const BATCH_STATUSES: readonly ["OPEN", "
|
|
1610
|
+
declare const BATCH_STATUSES: readonly ["OPEN", "PROCESSING", "READY_TO_SIGN", "SIGNED", "SIGNATURE_FAILED", "FAILED"];
|
|
1611
1611
|
/**
|
|
1612
1612
|
* Type definition for batch status
|
|
1613
1613
|
*/
|
|
@@ -71,20 +71,20 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
71
71
|
tableName: "batch";
|
|
72
72
|
dataType: "string";
|
|
73
73
|
columnType: "SQLiteText";
|
|
74
|
-
data: "
|
|
74
|
+
data: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
|
|
75
75
|
driverParam: string;
|
|
76
76
|
notNull: false;
|
|
77
77
|
hasDefault: false;
|
|
78
78
|
isPrimaryKey: false;
|
|
79
79
|
isAutoincrement: false;
|
|
80
80
|
hasRuntimeDefault: false;
|
|
81
|
-
enumValues: ["OPEN", "
|
|
81
|
+
enumValues: ["OPEN", "PROCESSING", "READY_TO_SIGN", "SIGNED", "SIGNATURE_FAILED", "FAILED"];
|
|
82
82
|
baseColumn: never;
|
|
83
83
|
identity: undefined;
|
|
84
84
|
generated: undefined;
|
|
85
85
|
}, {}, {
|
|
86
86
|
length: number | undefined;
|
|
87
|
-
$type: "
|
|
87
|
+
$type: "FAILED" | "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
|
|
88
88
|
}>;
|
|
89
89
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
90
90
|
name: "status_reason";
|
|
@@ -418,7 +418,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
418
418
|
tableName: "payment";
|
|
419
419
|
dataType: "string";
|
|
420
420
|
columnType: "SQLiteText";
|
|
421
|
-
data: "
|
|
421
|
+
data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
|
|
422
422
|
driverParam: string;
|
|
423
423
|
notNull: true;
|
|
424
424
|
hasDefault: false;
|
|
@@ -431,7 +431,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
431
431
|
generated: undefined;
|
|
432
432
|
}, {}, {
|
|
433
433
|
length: number | undefined;
|
|
434
|
-
$type: "
|
|
434
|
+
$type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
|
|
435
435
|
}>;
|
|
436
436
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
437
437
|
name: "status_reason";
|
|
@@ -1607,7 +1607,7 @@ type CurrencyCode = (typeof CURRENCY_CODES)[number];
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Batch status constants
|
|
1609
1609
|
*/
|
|
1610
|
-
declare const BATCH_STATUSES: readonly ["OPEN", "
|
|
1610
|
+
declare const BATCH_STATUSES: readonly ["OPEN", "PROCESSING", "READY_TO_SIGN", "SIGNED", "SIGNATURE_FAILED", "FAILED"];
|
|
1611
1611
|
/**
|
|
1612
1612
|
* Type definition for batch status
|
|
1613
1613
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const drizzle = require('./bank.
|
|
3
|
+
const drizzle = require('./bank.DXj5tpXa.cjs');
|
|
4
4
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
5
5
|
const drizzleOrm = require('drizzle-orm');
|
|
6
6
|
require('date-fns');
|
|
7
7
|
require('jose');
|
|
8
8
|
require('@develit-io/general-codes');
|
|
9
|
-
require('./bank.
|
|
9
|
+
require('./bank.BfBw79Y1.cjs');
|
|
10
10
|
const node_crypto = require('node:crypto');
|
|
11
11
|
|
|
12
12
|
const createPaymentCommand = (db, { payment }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { uuidv4, useResult, createInternalError } from '@develit-io/backend-sdk';
|
|
2
2
|
import { format, parseISO } from 'date-fns';
|
|
3
|
-
import { s as schema } from './bank.
|
|
3
|
+
import { s as schema } from './bank.m2X4FSvr.mjs';
|
|
4
4
|
import { and, eq } from 'drizzle-orm';
|
|
5
5
|
import { importPKCS8, SignJWT } from 'jose';
|
|
6
6
|
import '@develit-io/general-codes';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const dateFns = require('date-fns');
|
|
5
|
-
const database_schema = require('./bank.
|
|
5
|
+
const database_schema = require('./bank.BfBw79Y1.cjs');
|
|
6
6
|
const drizzleOrm = require('drizzle-orm');
|
|
7
7
|
const jose = require('jose');
|
|
8
8
|
require('@develit-io/general-codes');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector } from './bank.
|
|
1
|
+
import { t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector } from './bank.D7JSg_d9.mjs';
|
|
2
2
|
import { uuidv4 } from '@develit-io/backend-sdk';
|
|
3
3
|
import { eq } from 'drizzle-orm';
|
|
4
4
|
import 'date-fns';
|
|
5
5
|
import 'jose';
|
|
6
6
|
import '@develit-io/general-codes';
|
|
7
|
-
import './bank.
|
|
7
|
+
import './bank.m2X4FSvr.mjs';
|
|
8
8
|
import { createHash } from 'node:crypto';
|
|
9
9
|
|
|
10
10
|
const createPaymentCommand = (db, { payment }) => {
|
package/dist/types.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const drizzle = require('./shared/bank.
|
|
4
|
-
const database_schema = require('./shared/bank.
|
|
3
|
+
const drizzle = require('./shared/bank.DXj5tpXa.cjs');
|
|
4
|
+
const database_schema = require('./shared/bank.BfBw79Y1.cjs');
|
|
5
5
|
const generalCodes = require('@develit-io/general-codes');
|
|
6
6
|
require('@develit-io/backend-sdk');
|
|
7
7
|
require('date-fns');
|
package/dist/types.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.CG0gMBFx.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.CG0gMBFx.cjs';
|
|
3
3
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
5
|
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.cjs';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.CG0gMBFx.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.CG0gMBFx.mjs';
|
|
3
3
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
5
|
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.mjs';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.CG0gMBFx.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.CG0gMBFx.js';
|
|
3
3
|
import { Environment, BaseEvent } from '@develit-io/backend-sdk';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
5
|
export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.js';
|
package/dist/types.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.
|
|
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.
|
|
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.D7JSg_d9.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.m2X4FSvr.mjs';
|
|
3
3
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
5
5
|
import 'date-fns';
|