@develit-services/bank 0.3.2 → 0.3.3

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.
@@ -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.CjJZ44pz.cjs';
1
+ export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.xrXNjWCo.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.CjJZ44pz.mjs';
1
+ export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.xrXNjWCo.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.CjJZ44pz.js';
1
+ export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.xrXNjWCo.js';
2
2
  import 'zod';
3
3
  import 'drizzle-zod';
4
4
  import 'drizzle-orm/sqlite-core';
@@ -7,7 +7,7 @@ const database_schema = require('../shared/bank.CpcK1Dse.cjs');
7
7
  require('jose');
8
8
  const generalCodes = require('@develit-io/general-codes');
9
9
  const zod = require('zod');
10
- const processBatch_workflow = require('../shared/bank.CIJDq7GL.cjs');
10
+ const processBatch_workflow = require('../shared/bank.wqkNncOE.cjs');
11
11
  const drizzleOrm = require('drizzle-orm');
12
12
  require('drizzle-orm/sqlite-core');
13
13
  require('date-fns');
@@ -1,4 +1,4 @@
1
- import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, I as IBankConnector, a as ConnectorKey, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.CjJZ44pz.cjs';
1
+ import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, I as IBankConnector, a as ConnectorKey, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.xrXNjWCo.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';
@@ -1529,21 +1529,21 @@ declare const getBatchesInputSchema: z.ZodObject<{
1529
1529
  }, z.core.$strip>;
1530
1530
  filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
1531
1531
  filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1532
- FAILED: "FAILED";
1533
1532
  OPEN: "OPEN";
1534
1533
  FULL: "FULL";
1535
1534
  PROCESSING: "PROCESSING";
1536
1535
  READY_TO_SIGN: "READY_TO_SIGN";
1537
1536
  SIGNED: "SIGNED";
1538
1537
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1539
- }>, z.ZodArray<z.ZodEnum<{
1540
1538
  FAILED: "FAILED";
1539
+ }>, z.ZodArray<z.ZodEnum<{
1541
1540
  OPEN: "OPEN";
1542
1541
  FULL: "FULL";
1543
1542
  PROCESSING: "PROCESSING";
1544
1543
  READY_TO_SIGN: "READY_TO_SIGN";
1545
1544
  SIGNED: "SIGNED";
1546
1545
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
+ FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
1549
1549
  type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
@@ -1786,16 +1786,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1786
1786
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1787
1787
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1788
1788
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1789
+ FAILED: "FAILED";
1789
1790
  PREPARED: "PREPARED";
1790
1791
  INITIALIZED: "INITIALIZED";
1791
- FAILED: "FAILED";
1792
1792
  PENDING: "PENDING";
1793
1793
  COMPLETED: "COMPLETED";
1794
1794
  CREATED: "CREATED";
1795
1795
  }>, z.ZodArray<z.ZodEnum<{
1796
+ FAILED: "FAILED";
1796
1797
  PREPARED: "PREPARED";
1797
1798
  INITIALIZED: "INITIALIZED";
1798
- FAILED: "FAILED";
1799
1799
  PENDING: "PENDING";
1800
1800
  COMPLETED: "COMPLETED";
1801
1801
  CREATED: "CREATED";
@@ -2462,7 +2462,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2462
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2463
2463
  paymentsToBatch: SendPaymentInput[];
2464
2464
  }): Promise<IRPCResponse<{
2465
- status: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
2465
+ status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2466
2466
  id: string;
2467
2467
  createdAt: Date | null;
2468
2468
  updatedAt: Date | null;
@@ -1,4 +1,4 @@
1
- import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, I as IBankConnector, a as ConnectorKey, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.CjJZ44pz.mjs';
1
+ import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, I as IBankConnector, a as ConnectorKey, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.xrXNjWCo.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';
@@ -1529,21 +1529,21 @@ declare const getBatchesInputSchema: z.ZodObject<{
1529
1529
  }, z.core.$strip>;
1530
1530
  filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
1531
1531
  filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1532
- FAILED: "FAILED";
1533
1532
  OPEN: "OPEN";
1534
1533
  FULL: "FULL";
1535
1534
  PROCESSING: "PROCESSING";
1536
1535
  READY_TO_SIGN: "READY_TO_SIGN";
1537
1536
  SIGNED: "SIGNED";
1538
1537
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1539
- }>, z.ZodArray<z.ZodEnum<{
1540
1538
  FAILED: "FAILED";
1539
+ }>, z.ZodArray<z.ZodEnum<{
1541
1540
  OPEN: "OPEN";
1542
1541
  FULL: "FULL";
1543
1542
  PROCESSING: "PROCESSING";
1544
1543
  READY_TO_SIGN: "READY_TO_SIGN";
1545
1544
  SIGNED: "SIGNED";
1546
1545
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
+ FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
1549
1549
  type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
@@ -1786,16 +1786,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1786
1786
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1787
1787
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1788
1788
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1789
+ FAILED: "FAILED";
1789
1790
  PREPARED: "PREPARED";
1790
1791
  INITIALIZED: "INITIALIZED";
1791
- FAILED: "FAILED";
1792
1792
  PENDING: "PENDING";
1793
1793
  COMPLETED: "COMPLETED";
1794
1794
  CREATED: "CREATED";
1795
1795
  }>, z.ZodArray<z.ZodEnum<{
1796
+ FAILED: "FAILED";
1796
1797
  PREPARED: "PREPARED";
1797
1798
  INITIALIZED: "INITIALIZED";
1798
- FAILED: "FAILED";
1799
1799
  PENDING: "PENDING";
1800
1800
  COMPLETED: "COMPLETED";
1801
1801
  CREATED: "CREATED";
@@ -2462,7 +2462,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2462
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2463
2463
  paymentsToBatch: SendPaymentInput[];
2464
2464
  }): Promise<IRPCResponse<{
2465
- status: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
2465
+ status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2466
2466
  id: string;
2467
2467
  createdAt: Date | null;
2468
2468
  updatedAt: Date | null;
@@ -1,4 +1,4 @@
1
- import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, I as IBankConnector, a as ConnectorKey, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.CjJZ44pz.js';
1
+ import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, I as IBankConnector, a as ConnectorKey, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.xrXNjWCo.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';
@@ -1529,21 +1529,21 @@ declare const getBatchesInputSchema: z.ZodObject<{
1529
1529
  }, z.core.$strip>;
1530
1530
  filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
1531
1531
  filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1532
- FAILED: "FAILED";
1533
1532
  OPEN: "OPEN";
1534
1533
  FULL: "FULL";
1535
1534
  PROCESSING: "PROCESSING";
1536
1535
  READY_TO_SIGN: "READY_TO_SIGN";
1537
1536
  SIGNED: "SIGNED";
1538
1537
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1539
- }>, z.ZodArray<z.ZodEnum<{
1540
1538
  FAILED: "FAILED";
1539
+ }>, z.ZodArray<z.ZodEnum<{
1541
1540
  OPEN: "OPEN";
1542
1541
  FULL: "FULL";
1543
1542
  PROCESSING: "PROCESSING";
1544
1543
  READY_TO_SIGN: "READY_TO_SIGN";
1545
1544
  SIGNED: "SIGNED";
1546
1545
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
+ FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
1549
1549
  type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
@@ -1786,16 +1786,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1786
1786
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1787
1787
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1788
1788
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1789
+ FAILED: "FAILED";
1789
1790
  PREPARED: "PREPARED";
1790
1791
  INITIALIZED: "INITIALIZED";
1791
- FAILED: "FAILED";
1792
1792
  PENDING: "PENDING";
1793
1793
  COMPLETED: "COMPLETED";
1794
1794
  CREATED: "CREATED";
1795
1795
  }>, z.ZodArray<z.ZodEnum<{
1796
+ FAILED: "FAILED";
1796
1797
  PREPARED: "PREPARED";
1797
1798
  INITIALIZED: "INITIALIZED";
1798
- FAILED: "FAILED";
1799
1799
  PENDING: "PENDING";
1800
1800
  COMPLETED: "COMPLETED";
1801
1801
  CREATED: "CREATED";
@@ -2462,7 +2462,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2462
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2463
2463
  paymentsToBatch: SendPaymentInput[];
2464
2464
  }): Promise<IRPCResponse<{
2465
- status: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
2465
+ status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2466
2466
  id: string;
2467
2467
  createdAt: Date | null;
2468
2468
  updatedAt: Date | null;
@@ -5,7 +5,7 @@ import { t as tables, c as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAY
5
5
  import 'jose';
6
6
  import { CURRENCY_CODES } from '@develit-io/general-codes';
7
7
  import { z } from 'zod';
8
- import { e as encrypt, P as PROCESS_BATCH_WORKFLOW_EVENTS, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.mZtcXaJo.mjs';
8
+ import { e as encrypt, P as PROCESS_BATCH_WORKFLOW_EVENTS, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.BX43jn5k.mjs';
9
9
  import { eq, inArray, and, sql, asc, desc, gte, lte } from 'drizzle-orm';
10
10
  import 'drizzle-orm/sqlite-core';
11
11
  import 'date-fns';
@@ -5,7 +5,7 @@ const cloudflare_workflows = require('cloudflare:workflows');
5
5
  const d1 = require('drizzle-orm/d1');
6
6
  const database_schema = require('../shared/bank.CpcK1Dse.cjs');
7
7
  const backendSdk = require('@develit-io/backend-sdk');
8
- const processBatch_workflow = require('../shared/bank.CIJDq7GL.cjs');
8
+ const processBatch_workflow = require('../shared/bank.wqkNncOE.cjs');
9
9
  const drizzleOrm = require('drizzle-orm');
10
10
  require('drizzle-orm/sqlite-core');
11
11
  require('date-fns');
@@ -39,7 +39,7 @@ function pushToQueue(queue, message) {
39
39
  }))
40
40
  );
41
41
  }
42
- class BankSyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypoint {
42
+ class BankSyncAccountPayments extends cloudflare_workers.WorkflowEntrypoint {
43
43
  async run(event, step) {
44
44
  const { accountId } = event.payload;
45
45
  const db = d1.drizzle(this.env.BANK_D1, { schema: database_schema.tables });
@@ -164,5 +164,5 @@ class BankSyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypo
164
164
  }
165
165
  }
166
166
 
167
- exports.BankProcessBatchWorkflow = processBatch_workflow.BankProcessBatchWorkflow;
168
- exports.BankSyncAccountPaymentsWorkflow = BankSyncAccountPaymentsWorkflow;
167
+ exports.BankProcessBatch = processBatch_workflow.BankProcessBatch;
168
+ exports.BankSyncAccountPayments = BankSyncAccountPayments;
@@ -3,15 +3,15 @@ import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from 'cloudflare:work
3
3
  type Params$1 = {
4
4
  accountId: string;
5
5
  };
6
- declare class BankSyncAccountPaymentsWorkflow extends WorkflowEntrypoint<BankEnv, Params$1> {
6
+ declare class BankSyncAccountPayments extends WorkflowEntrypoint<BankEnv, Params$1> {
7
7
  run(event: WorkflowEvent<Params$1>, step: WorkflowStep): Promise<void>;
8
8
  }
9
9
 
10
10
  type Params = {
11
11
  batchId: string;
12
12
  };
13
- declare class BankProcessBatchWorkflow extends WorkflowEntrypoint<BankEnv, Params> {
13
+ declare class BankProcessBatch extends WorkflowEntrypoint<BankEnv, Params> {
14
14
  run(event: WorkflowEvent<Params>, step: WorkflowStep): Promise<void>;
15
15
  }
16
16
 
17
- export { BankProcessBatchWorkflow, BankSyncAccountPaymentsWorkflow };
17
+ export { BankProcessBatch, BankSyncAccountPayments };
@@ -3,15 +3,15 @@ import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from 'cloudflare:work
3
3
  type Params$1 = {
4
4
  accountId: string;
5
5
  };
6
- declare class BankSyncAccountPaymentsWorkflow extends WorkflowEntrypoint<BankEnv, Params$1> {
6
+ declare class BankSyncAccountPayments extends WorkflowEntrypoint<BankEnv, Params$1> {
7
7
  run(event: WorkflowEvent<Params$1>, step: WorkflowStep): Promise<void>;
8
8
  }
9
9
 
10
10
  type Params = {
11
11
  batchId: string;
12
12
  };
13
- declare class BankProcessBatchWorkflow extends WorkflowEntrypoint<BankEnv, Params> {
13
+ declare class BankProcessBatch extends WorkflowEntrypoint<BankEnv, Params> {
14
14
  run(event: WorkflowEvent<Params>, step: WorkflowStep): Promise<void>;
15
15
  }
16
16
 
17
- export { BankProcessBatchWorkflow, BankSyncAccountPaymentsWorkflow };
17
+ export { BankProcessBatch, BankSyncAccountPayments };
@@ -3,15 +3,15 @@ import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from 'cloudflare:work
3
3
  type Params$1 = {
4
4
  accountId: string;
5
5
  };
6
- declare class BankSyncAccountPaymentsWorkflow extends WorkflowEntrypoint<BankEnv, Params$1> {
6
+ declare class BankSyncAccountPayments extends WorkflowEntrypoint<BankEnv, Params$1> {
7
7
  run(event: WorkflowEvent<Params$1>, step: WorkflowStep): Promise<void>;
8
8
  }
9
9
 
10
10
  type Params = {
11
11
  batchId: string;
12
12
  };
13
- declare class BankProcessBatchWorkflow extends WorkflowEntrypoint<BankEnv, Params> {
13
+ declare class BankProcessBatch extends WorkflowEntrypoint<BankEnv, Params> {
14
14
  run(event: WorkflowEvent<Params>, step: WorkflowStep): Promise<void>;
15
15
  }
16
16
 
17
- export { BankProcessBatchWorkflow, BankSyncAccountPaymentsWorkflow };
17
+ export { BankProcessBatch, BankSyncAccountPayments };
@@ -3,8 +3,8 @@ import { NonRetryableError } from 'cloudflare:workflows';
3
3
  import { drizzle } from 'drizzle-orm/d1';
4
4
  import { t as tables } from '../shared/bank.lZMrqjVR.mjs';
5
5
  import { asNonEmpty } from '@develit-io/backend-sdk';
6
- import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand } from '../shared/bank.mZtcXaJo.mjs';
7
- export { B as BankProcessBatchWorkflow } from '../shared/bank.mZtcXaJo.mjs';
6
+ import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand } from '../shared/bank.BX43jn5k.mjs';
7
+ export { B as BankProcessBatch } from '../shared/bank.BX43jn5k.mjs';
8
8
  import { eq } from 'drizzle-orm';
9
9
  import 'drizzle-orm/sqlite-core';
10
10
  import 'date-fns';
@@ -38,7 +38,7 @@ function pushToQueue(queue, message) {
38
38
  }))
39
39
  );
40
40
  }
41
- class BankSyncAccountPaymentsWorkflow extends WorkflowEntrypoint {
41
+ class BankSyncAccountPayments extends WorkflowEntrypoint {
42
42
  async run(event, step) {
43
43
  const { accountId } = event.payload;
44
44
  const db = drizzle(this.env.BANK_D1, { schema: tables });
@@ -163,4 +163,4 @@ class BankSyncAccountPaymentsWorkflow extends WorkflowEntrypoint {
163
163
  }
164
164
  }
165
165
 
166
- export { BankSyncAccountPaymentsWorkflow };
166
+ export { BankSyncAccountPayments };
@@ -39,12 +39,12 @@ function defineBankServiceWrangler(config) {
39
39
  {
40
40
  name: `${project}-bank-sync-account-payments`,
41
41
  binding: "SYNC_ACCOUNT_PAYMENTS_WORKFLOW",
42
- class_name: "BankSyncAccountPaymentsWorkflow"
42
+ class_name: "BankSyncAccountPayments"
43
43
  },
44
44
  {
45
45
  name: `${project}-bank-process-batch`,
46
46
  binding: "PROCESS_BATCH_WORKFLOW",
47
- class_name: "BankProcessBatchWorkflow"
47
+ class_name: "BankProcessBatch"
48
48
  }
49
49
  ],
50
50
  queues: {
@@ -37,12 +37,12 @@ function defineBankServiceWrangler(config) {
37
37
  {
38
38
  name: `${project}-bank-sync-account-payments`,
39
39
  binding: "SYNC_ACCOUNT_PAYMENTS_WORKFLOW",
40
- class_name: "BankSyncAccountPaymentsWorkflow"
40
+ class_name: "BankSyncAccountPayments"
41
41
  },
42
42
  {
43
43
  name: `${project}-bank-process-batch`,
44
44
  binding: "PROCESS_BATCH_WORKFLOW",
45
- class_name: "BankProcessBatchWorkflow"
45
+ class_name: "BankProcessBatch"
46
46
  }
47
47
  ],
48
48
  queues: {
@@ -185,7 +185,7 @@ function pushToQueue(queue, message) {
185
185
  }))
186
186
  );
187
187
  }
188
- class BankProcessBatchWorkflow extends WorkflowEntrypoint {
188
+ class BankProcessBatch extends WorkflowEntrypoint {
189
189
  async run(event, step) {
190
190
  const { batchId } = event.payload;
191
191
  const db = drizzle(this.env.BANK_D1, { schema: tables });
@@ -388,4 +388,4 @@ class BankProcessBatchWorkflow extends WorkflowEntrypoint {
388
388
  }
389
389
  }
390
390
 
391
- export { BankProcessBatchWorkflow as B, PROCESS_BATCH_WORKFLOW_EVENTS as P, getCredentialsByAccountId as a, initiateConnector as b, createPaymentCommand as c, encrypt as e, getAccountByIdQuery as g, importAesKey as i, upsertBatchCommand as u };
391
+ export { BankProcessBatch as B, PROCESS_BATCH_WORKFLOW_EVENTS as P, getCredentialsByAccountId as a, initiateConnector as b, createPaymentCommand as c, encrypt as e, getAccountByIdQuery as g, importAesKey as i, upsertBatchCommand as u };
@@ -187,7 +187,7 @@ function pushToQueue(queue, message) {
187
187
  }))
188
188
  );
189
189
  }
190
- class BankProcessBatchWorkflow extends cloudflare_workers.WorkflowEntrypoint {
190
+ class BankProcessBatch extends cloudflare_workers.WorkflowEntrypoint {
191
191
  async run(event, step) {
192
192
  const { batchId } = event.payload;
193
193
  const db = d1.drizzle(this.env.BANK_D1, { schema: database_schema.tables });
@@ -390,7 +390,7 @@ class BankProcessBatchWorkflow extends cloudflare_workers.WorkflowEntrypoint {
390
390
  }
391
391
  }
392
392
 
393
- exports.BankProcessBatchWorkflow = BankProcessBatchWorkflow;
393
+ exports.BankProcessBatch = BankProcessBatch;
394
394
  exports.PROCESS_BATCH_WORKFLOW_EVENTS = PROCESS_BATCH_WORKFLOW_EVENTS;
395
395
  exports.createPaymentCommand = createPaymentCommand;
396
396
  exports.encrypt = encrypt;
@@ -71,7 +71,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
71
71
  tableName: "batch";
72
72
  dataType: "string";
73
73
  columnType: "SQLiteText";
74
- data: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
74
+ data: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
75
75
  driverParam: string;
76
76
  notNull: false;
77
77
  hasDefault: false;
@@ -84,7 +84,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
84
84
  generated: undefined;
85
85
  }, {}, {
86
86
  length: number | undefined;
87
- $type: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
87
+ $type: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
88
88
  }>;
89
89
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
90
90
  name: "payments";
@@ -399,7 +399,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
399
399
  tableName: "payment";
400
400
  dataType: "string";
401
401
  columnType: "SQLiteText";
402
- data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
402
+ data: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
403
403
  driverParam: string;
404
404
  notNull: true;
405
405
  hasDefault: false;
@@ -412,7 +412,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
412
412
  generated: undefined;
413
413
  }, {}, {
414
414
  length: number | undefined;
415
- $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
415
+ $type: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
416
416
  }>;
417
417
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
418
418
  name: "status_reason";
@@ -71,7 +71,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
71
71
  tableName: "batch";
72
72
  dataType: "string";
73
73
  columnType: "SQLiteText";
74
- data: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
74
+ data: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
75
75
  driverParam: string;
76
76
  notNull: false;
77
77
  hasDefault: false;
@@ -84,7 +84,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
84
84
  generated: undefined;
85
85
  }, {}, {
86
86
  length: number | undefined;
87
- $type: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
87
+ $type: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
88
88
  }>;
89
89
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
90
90
  name: "payments";
@@ -399,7 +399,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
399
399
  tableName: "payment";
400
400
  dataType: "string";
401
401
  columnType: "SQLiteText";
402
- data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
402
+ data: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
403
403
  driverParam: string;
404
404
  notNull: true;
405
405
  hasDefault: false;
@@ -412,7 +412,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
412
412
  generated: undefined;
413
413
  }, {}, {
414
414
  length: number | undefined;
415
- $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
415
+ $type: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
416
416
  }>;
417
417
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
418
418
  name: "status_reason";
@@ -71,7 +71,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
71
71
  tableName: "batch";
72
72
  dataType: "string";
73
73
  columnType: "SQLiteText";
74
- data: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
74
+ data: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
75
75
  driverParam: string;
76
76
  notNull: false;
77
77
  hasDefault: false;
@@ -84,7 +84,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
84
84
  generated: undefined;
85
85
  }, {}, {
86
86
  length: number | undefined;
87
- $type: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED";
87
+ $type: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
88
88
  }>;
89
89
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
90
90
  name: "payments";
@@ -399,7 +399,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
399
399
  tableName: "payment";
400
400
  dataType: "string";
401
401
  columnType: "SQLiteText";
402
- data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
402
+ data: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
403
403
  driverParam: string;
404
404
  notNull: true;
405
405
  hasDefault: false;
@@ -412,7 +412,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
412
412
  generated: undefined;
413
413
  }, {}, {
414
414
  length: number | undefined;
415
- $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
415
+ $type: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
416
416
  }>;
417
417
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
418
418
  name: "status_reason";
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.CjJZ44pz.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.CjJZ44pz.cjs';
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.xrXNjWCo.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.xrXNjWCo.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.BchnXQDL.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.CjJZ44pz.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.CjJZ44pz.mjs';
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.xrXNjWCo.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.xrXNjWCo.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.BchnXQDL.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.CjJZ44pz.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.CjJZ44pz.js';
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.xrXNjWCo.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.xrXNjWCo.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.BchnXQDL.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {