@develit-services/bank 0.8.20 → 1.1.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/README.md +33 -0
- package/dist/database/schema.cjs +1 -1
- package/dist/database/schema.d.cts +2 -1
- package/dist/database/schema.d.mts +2 -1
- package/dist/database/schema.d.ts +2 -1
- package/dist/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +6 -6
- package/dist/export/worker.d.cts +2083 -939
- package/dist/export/worker.d.mts +2083 -939
- package/dist/export/worker.d.ts +2083 -939
- package/dist/export/worker.mjs +7 -7
- package/dist/export/workflows.cjs +5 -5
- package/dist/export/workflows.mjs +5 -5
- package/dist/export/wrangler.d.cts +2 -1
- package/dist/export/wrangler.d.mts +2 -1
- package/dist/export/wrangler.d.ts +2 -1
- package/dist/shared/{bank.jRGa7MKk.d.mts → bank.5WIfKLgm.d.ts} +890 -17
- package/dist/shared/{bank.o95cOH_P.cjs → bank.B5nOIsGC.cjs} +10 -4
- package/dist/shared/{bank.BOY6AI1t.d.cts → bank.BECp1kh0.d.cts} +1789 -1627
- package/dist/shared/{bank.BOY6AI1t.d.mts → bank.BECp1kh0.d.mts} +1789 -1627
- package/dist/shared/{bank.BOY6AI1t.d.ts → bank.BECp1kh0.d.ts} +1789 -1627
- package/dist/shared/{bank.DWsHTK_n.cjs → bank.BMLgGhBY.cjs} +44 -8
- package/dist/shared/{bank.DMjtitKo.d.cts → bank.CVJosema.d.cts} +1 -0
- package/dist/shared/{bank.DMjtitKo.d.mts → bank.CVJosema.d.mts} +1 -0
- package/dist/shared/{bank.DMjtitKo.d.ts → bank.CVJosema.d.ts} +1 -0
- package/dist/shared/{bank.DfTdMAi9.d.ts → bank.CX7-ohgB.d.mts} +890 -17
- package/dist/shared/{bank.ESTBT4J6.mjs → bank.DMsXwzJn.mjs} +11 -5
- package/dist/shared/{bank.Cwg6oHMM.mjs → bank.DTnA4eC9.mjs} +44 -8
- package/dist/shared/{bank.vGCuP898.cjs → bank.f7ykgYdD.cjs} +7 -3
- package/dist/shared/{bank.CPLR0Ul7.mjs → bank.rcoRRywt.mjs} +7 -3
- package/dist/shared/{bank.Bo01T_MM.d.cts → bank.yUQZ6PWV.d.cts} +890 -17
- package/dist/types.cjs +2 -2
- package/dist/types.d.cts +13 -8
- package/dist/types.d.mts +13 -8
- package/dist/types.d.ts +13 -8
- package/dist/types.mjs +2 -2
- package/package.json +1 -1
package/dist/export/worker.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
|
-
import { v as tables, I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, k as accountInsertSchema, e as PAYMENT_REQUEST_STATUSES, q as isProcessedStatus, r as isTerminalStatus, w as getNonTerminalPaymentRequestsQuery } from '../shared/bank.
|
|
1
|
+
import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, structuredAddressSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
|
+
import { v as tables, I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, k as accountInsertSchema, e as PAYMENT_REQUEST_STATUSES, q as isProcessedStatus, r as isTerminalStatus, w as getNonTerminalPaymentRequestsQuery } from '../shared/bank.DMsXwzJn.mjs';
|
|
3
3
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
6
|
-
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.
|
|
6
|
+
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.DTnA4eC9.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
10
10
|
import 'date-fns';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from '../shared/bank.
|
|
12
|
+
import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from '../shared/bank.rcoRRywt.mjs';
|
|
13
13
|
import 'drizzle-orm/sqlite-core';
|
|
14
14
|
import 'drizzle-orm/relations';
|
|
15
15
|
import 'drizzle-zod';
|
|
@@ -351,7 +351,7 @@ function buildPaymentRequestEvent(pr) {
|
|
|
351
351
|
metadata: {
|
|
352
352
|
correlationId: pr.correlationId,
|
|
353
353
|
entityId: pr.id,
|
|
354
|
-
timestamp:
|
|
354
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
357
|
}
|
|
@@ -387,7 +387,7 @@ const authorizeAccountInputSchema = z.object({
|
|
|
387
387
|
syncIntervalS: z.number().int().positive().optional(),
|
|
388
388
|
startSync: z.boolean().optional(),
|
|
389
389
|
lastSyncAt: z.date().optional(),
|
|
390
|
-
address:
|
|
390
|
+
address: structuredAddressSchema.optional()
|
|
391
391
|
});
|
|
392
392
|
|
|
393
393
|
const simulateDepositInputSchema = z.object({
|
|
@@ -1187,7 +1187,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1187
1187
|
metadata: {
|
|
1188
1188
|
correlationId: createdPayment.correlationId,
|
|
1189
1189
|
entityId: createdPayment.id,
|
|
1190
|
-
timestamp:
|
|
1190
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
1191
1191
|
}
|
|
1192
1192
|
});
|
|
1193
1193
|
return createdPayment;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const database_schema = require('../shared/bank.
|
|
4
|
+
const database_schema = require('../shared/bank.B5nOIsGC.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
|
|
6
|
-
const mock_connector = require('../shared/bank.
|
|
6
|
+
const mock_connector = require('../shared/bank.BMLgGhBY.cjs');
|
|
7
7
|
const drizzleOrm = require('drizzle-orm');
|
|
8
|
-
const credentialsResolver = require('../shared/bank.
|
|
8
|
+
const credentialsResolver = require('../shared/bank.f7ykgYdD.cjs');
|
|
9
9
|
const cloudflare_workers = require('cloudflare:workers');
|
|
10
10
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
11
11
|
const d1 = require('drizzle-orm/d1');
|
|
@@ -247,7 +247,7 @@ class BankProcessBatch extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
247
247
|
metadata: {
|
|
248
248
|
correlationId: backendSdk.uuidv4(),
|
|
249
249
|
entityId: payment.id,
|
|
250
|
-
timestamp:
|
|
250
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
251
251
|
}
|
|
252
252
|
}));
|
|
253
253
|
await pushToQueue$1(
|
|
@@ -407,7 +407,7 @@ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
407
407
|
metadata: {
|
|
408
408
|
correlationId: p.parsed.correlationId,
|
|
409
409
|
entityId: p.parsed.id,
|
|
410
|
-
timestamp:
|
|
410
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
411
411
|
}
|
|
412
412
|
}))
|
|
413
413
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
|
-
import { v as tables, o as isPaymentCompleted } from '../shared/bank.
|
|
2
|
+
import { v as tables, o as isPaymentCompleted } from '../shared/bank.DMsXwzJn.mjs';
|
|
3
3
|
import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
|
|
4
|
-
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.
|
|
4
|
+
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.DTnA4eC9.mjs';
|
|
5
5
|
import { eq, and, inArray } from 'drizzle-orm';
|
|
6
|
-
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.
|
|
6
|
+
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.rcoRRywt.mjs';
|
|
7
7
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
8
8
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
9
9
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -245,7 +245,7 @@ class BankProcessBatch extends WorkflowEntrypoint {
|
|
|
245
245
|
metadata: {
|
|
246
246
|
correlationId: uuidv4(),
|
|
247
247
|
entityId: payment.id,
|
|
248
|
-
timestamp:
|
|
248
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
249
249
|
}
|
|
250
250
|
}));
|
|
251
251
|
await pushToQueue$1(
|
|
@@ -405,7 +405,7 @@ class BankSyncAccountPayments extends WorkflowEntrypoint {
|
|
|
405
405
|
metadata: {
|
|
406
406
|
correlationId: p.parsed.correlationId,
|
|
407
407
|
entityId: p.parsed.id,
|
|
408
|
-
timestamp:
|
|
408
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
409
409
|
}
|
|
410
410
|
}))
|
|
411
411
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BankServiceWranglerConfig } from '../shared/bank.
|
|
1
|
+
import { B as BankServiceWranglerConfig } from '../shared/bank.CVJosema.cjs';
|
|
2
2
|
|
|
3
3
|
declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
|
|
4
4
|
vars: {
|
|
@@ -12,6 +12,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
|
|
|
12
12
|
BANK_AUTH_RECIPIENT: string;
|
|
13
13
|
DBUCS_BASE_URI: string;
|
|
14
14
|
DBUCS_USERNAME: string;
|
|
15
|
+
DBUCS_APPLICATION_CODE: string;
|
|
15
16
|
DBUCS_TX_AUTH_URI: string;
|
|
16
17
|
REDIRECT_URI: string;
|
|
17
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BankServiceWranglerConfig } from '../shared/bank.
|
|
1
|
+
import { B as BankServiceWranglerConfig } from '../shared/bank.CVJosema.mjs';
|
|
2
2
|
|
|
3
3
|
declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
|
|
4
4
|
vars: {
|
|
@@ -12,6 +12,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
|
|
|
12
12
|
BANK_AUTH_RECIPIENT: string;
|
|
13
13
|
DBUCS_BASE_URI: string;
|
|
14
14
|
DBUCS_USERNAME: string;
|
|
15
|
+
DBUCS_APPLICATION_CODE: string;
|
|
15
16
|
DBUCS_TX_AUTH_URI: string;
|
|
16
17
|
REDIRECT_URI: string;
|
|
17
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BankServiceWranglerConfig } from '../shared/bank.
|
|
1
|
+
import { B as BankServiceWranglerConfig } from '../shared/bank.CVJosema.js';
|
|
2
2
|
|
|
3
3
|
declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
|
|
4
4
|
vars: {
|
|
@@ -12,6 +12,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
|
|
|
12
12
|
BANK_AUTH_RECIPIENT: string;
|
|
13
13
|
DBUCS_BASE_URI: string;
|
|
14
14
|
DBUCS_USERNAME: string;
|
|
15
|
+
DBUCS_APPLICATION_CODE: string;
|
|
15
16
|
DBUCS_TX_AUTH_URI: string;
|
|
16
17
|
REDIRECT_URI: string;
|
|
17
18
|
};
|