@develit-services/bank 0.3.1 → 0.3.2

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.xrXNjWCo.cjs';
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';
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.xrXNjWCo.mjs';
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';
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.xrXNjWCo.js';
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';
2
2
  import 'zod';
3
3
  import 'drizzle-zod';
4
4
  import 'drizzle-orm/sqlite-core';
@@ -429,7 +429,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
429
429
  }
430
430
  const accounts = await this._getAccounts();
431
431
  const accountsForConnector = accounts.filter(
432
- (acc) => acc.connectorKey === connectorKey
432
+ (acc) => acc.connectorKey === connectorKey && acc.status !== "DISABLED"
433
433
  );
434
434
  const encryptionKey = await processBatch_workflow.importAesKey(this.env.ENCRYPTION_KEY);
435
435
  const accountsWithCredentials = await Promise.all(
@@ -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.xrXNjWCo.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.CjJZ44pz.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";
1532
1533
  OPEN: "OPEN";
1533
1534
  FULL: "FULL";
1534
1535
  PROCESSING: "PROCESSING";
1535
1536
  READY_TO_SIGN: "READY_TO_SIGN";
1536
1537
  SIGNED: "SIGNED";
1537
1538
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1538
- FAILED: "FAILED";
1539
1539
  }>, z.ZodArray<z.ZodEnum<{
1540
+ FAILED: "FAILED";
1540
1541
  OPEN: "OPEN";
1541
1542
  FULL: "FULL";
1542
1543
  PROCESSING: "PROCESSING";
1543
1544
  READY_TO_SIGN: "READY_TO_SIGN";
1544
1545
  SIGNED: "SIGNED";
1545
1546
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
- FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
1549
1549
  type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
@@ -1569,7 +1569,10 @@ declare const processBatchOutputSchema: z.ZodObject<{
1569
1569
  waiting: "waiting";
1570
1570
  waitingForPause: "waitingForPause";
1571
1571
  }>;
1572
- error: z.ZodOptional<z.ZodString>;
1572
+ error: z.ZodOptional<z.ZodObject<{
1573
+ message: z.ZodString;
1574
+ name: z.ZodOptional<z.ZodString>;
1575
+ }, z.core.$strip>>;
1573
1576
  output: z.ZodOptional<z.ZodUnknown>;
1574
1577
  }, z.core.$strip>;
1575
1578
  }, z.core.$strip>;
@@ -1594,7 +1597,10 @@ declare const processBatchStatusOutputSchema: z.ZodObject<{
1594
1597
  waiting: "waiting";
1595
1598
  waitingForPause: "waitingForPause";
1596
1599
  }>;
1597
- error: z.ZodOptional<z.ZodString>;
1600
+ error: z.ZodOptional<z.ZodObject<{
1601
+ message: z.ZodString;
1602
+ name: z.ZodOptional<z.ZodString>;
1603
+ }, z.core.$strip>>;
1598
1604
  output: z.ZodOptional<z.ZodUnknown>;
1599
1605
  }, z.core.$strip>;
1600
1606
  }, z.core.$strip>;
@@ -1619,7 +1625,10 @@ declare const processBatchRestartOutputSchema: z.ZodObject<{
1619
1625
  waiting: "waiting";
1620
1626
  waitingForPause: "waitingForPause";
1621
1627
  }>;
1622
- error: z.ZodOptional<z.ZodString>;
1628
+ error: z.ZodOptional<z.ZodObject<{
1629
+ message: z.ZodString;
1630
+ name: z.ZodOptional<z.ZodString>;
1631
+ }, z.core.$strip>>;
1623
1632
  output: z.ZodOptional<z.ZodUnknown>;
1624
1633
  }, z.core.$strip>;
1625
1634
  }, z.core.$strip>;
@@ -1777,16 +1786,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1777
1786
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1778
1787
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1779
1788
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1780
- FAILED: "FAILED";
1781
1789
  PREPARED: "PREPARED";
1782
1790
  INITIALIZED: "INITIALIZED";
1791
+ FAILED: "FAILED";
1783
1792
  PENDING: "PENDING";
1784
1793
  COMPLETED: "COMPLETED";
1785
1794
  CREATED: "CREATED";
1786
1795
  }>, z.ZodArray<z.ZodEnum<{
1787
- FAILED: "FAILED";
1788
1796
  PREPARED: "PREPARED";
1789
1797
  INITIALIZED: "INITIALIZED";
1798
+ FAILED: "FAILED";
1790
1799
  PENDING: "PENDING";
1791
1800
  COMPLETED: "COMPLETED";
1792
1801
  CREATED: "CREATED";
@@ -1815,7 +1824,10 @@ declare const syncAccountOutputSchema: z.ZodObject<{
1815
1824
  waiting: "waiting";
1816
1825
  waitingForPause: "waitingForPause";
1817
1826
  }>;
1818
- error: z.ZodOptional<z.ZodString>;
1827
+ error: z.ZodOptional<z.ZodObject<{
1828
+ message: z.ZodString;
1829
+ name: z.ZodOptional<z.ZodString>;
1830
+ }, z.core.$strip>>;
1819
1831
  output: z.ZodOptional<z.ZodUnknown>;
1820
1832
  }, z.core.$strip>;
1821
1833
  }, z.core.$strip>;
@@ -1840,7 +1852,10 @@ declare const syncAccountStatusOutputSchema: z.ZodObject<{
1840
1852
  waiting: "waiting";
1841
1853
  waitingForPause: "waitingForPause";
1842
1854
  }>;
1843
- error: z.ZodOptional<z.ZodString>;
1855
+ error: z.ZodOptional<z.ZodObject<{
1856
+ message: z.ZodString;
1857
+ name: z.ZodOptional<z.ZodString>;
1858
+ }, z.core.$strip>>;
1844
1859
  output: z.ZodOptional<z.ZodUnknown>;
1845
1860
  }, z.core.$strip>;
1846
1861
  }, z.core.$strip>;
@@ -1865,7 +1880,10 @@ declare const syncAccountRestartOutputSchema: z.ZodObject<{
1865
1880
  waiting: "waiting";
1866
1881
  waitingForPause: "waitingForPause";
1867
1882
  }>;
1868
- error: z.ZodOptional<z.ZodString>;
1883
+ error: z.ZodOptional<z.ZodObject<{
1884
+ message: z.ZodString;
1885
+ name: z.ZodOptional<z.ZodString>;
1886
+ }, z.core.$strip>>;
1869
1887
  output: z.ZodOptional<z.ZodUnknown>;
1870
1888
  }, z.core.$strip>;
1871
1889
  }, z.core.$strip>;
@@ -2444,7 +2462,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2444
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2445
2463
  paymentsToBatch: SendPaymentInput[];
2446
2464
  }): Promise<IRPCResponse<{
2447
- status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2465
+ status: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
2448
2466
  id: string;
2449
2467
  createdAt: Date | null;
2450
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.xrXNjWCo.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.CjJZ44pz.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";
1532
1533
  OPEN: "OPEN";
1533
1534
  FULL: "FULL";
1534
1535
  PROCESSING: "PROCESSING";
1535
1536
  READY_TO_SIGN: "READY_TO_SIGN";
1536
1537
  SIGNED: "SIGNED";
1537
1538
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1538
- FAILED: "FAILED";
1539
1539
  }>, z.ZodArray<z.ZodEnum<{
1540
+ FAILED: "FAILED";
1540
1541
  OPEN: "OPEN";
1541
1542
  FULL: "FULL";
1542
1543
  PROCESSING: "PROCESSING";
1543
1544
  READY_TO_SIGN: "READY_TO_SIGN";
1544
1545
  SIGNED: "SIGNED";
1545
1546
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
- FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
1549
1549
  type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
@@ -1569,7 +1569,10 @@ declare const processBatchOutputSchema: z.ZodObject<{
1569
1569
  waiting: "waiting";
1570
1570
  waitingForPause: "waitingForPause";
1571
1571
  }>;
1572
- error: z.ZodOptional<z.ZodString>;
1572
+ error: z.ZodOptional<z.ZodObject<{
1573
+ message: z.ZodString;
1574
+ name: z.ZodOptional<z.ZodString>;
1575
+ }, z.core.$strip>>;
1573
1576
  output: z.ZodOptional<z.ZodUnknown>;
1574
1577
  }, z.core.$strip>;
1575
1578
  }, z.core.$strip>;
@@ -1594,7 +1597,10 @@ declare const processBatchStatusOutputSchema: z.ZodObject<{
1594
1597
  waiting: "waiting";
1595
1598
  waitingForPause: "waitingForPause";
1596
1599
  }>;
1597
- error: z.ZodOptional<z.ZodString>;
1600
+ error: z.ZodOptional<z.ZodObject<{
1601
+ message: z.ZodString;
1602
+ name: z.ZodOptional<z.ZodString>;
1603
+ }, z.core.$strip>>;
1598
1604
  output: z.ZodOptional<z.ZodUnknown>;
1599
1605
  }, z.core.$strip>;
1600
1606
  }, z.core.$strip>;
@@ -1619,7 +1625,10 @@ declare const processBatchRestartOutputSchema: z.ZodObject<{
1619
1625
  waiting: "waiting";
1620
1626
  waitingForPause: "waitingForPause";
1621
1627
  }>;
1622
- error: z.ZodOptional<z.ZodString>;
1628
+ error: z.ZodOptional<z.ZodObject<{
1629
+ message: z.ZodString;
1630
+ name: z.ZodOptional<z.ZodString>;
1631
+ }, z.core.$strip>>;
1623
1632
  output: z.ZodOptional<z.ZodUnknown>;
1624
1633
  }, z.core.$strip>;
1625
1634
  }, z.core.$strip>;
@@ -1777,16 +1786,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1777
1786
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1778
1787
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1779
1788
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1780
- FAILED: "FAILED";
1781
1789
  PREPARED: "PREPARED";
1782
1790
  INITIALIZED: "INITIALIZED";
1791
+ FAILED: "FAILED";
1783
1792
  PENDING: "PENDING";
1784
1793
  COMPLETED: "COMPLETED";
1785
1794
  CREATED: "CREATED";
1786
1795
  }>, z.ZodArray<z.ZodEnum<{
1787
- FAILED: "FAILED";
1788
1796
  PREPARED: "PREPARED";
1789
1797
  INITIALIZED: "INITIALIZED";
1798
+ FAILED: "FAILED";
1790
1799
  PENDING: "PENDING";
1791
1800
  COMPLETED: "COMPLETED";
1792
1801
  CREATED: "CREATED";
@@ -1815,7 +1824,10 @@ declare const syncAccountOutputSchema: z.ZodObject<{
1815
1824
  waiting: "waiting";
1816
1825
  waitingForPause: "waitingForPause";
1817
1826
  }>;
1818
- error: z.ZodOptional<z.ZodString>;
1827
+ error: z.ZodOptional<z.ZodObject<{
1828
+ message: z.ZodString;
1829
+ name: z.ZodOptional<z.ZodString>;
1830
+ }, z.core.$strip>>;
1819
1831
  output: z.ZodOptional<z.ZodUnknown>;
1820
1832
  }, z.core.$strip>;
1821
1833
  }, z.core.$strip>;
@@ -1840,7 +1852,10 @@ declare const syncAccountStatusOutputSchema: z.ZodObject<{
1840
1852
  waiting: "waiting";
1841
1853
  waitingForPause: "waitingForPause";
1842
1854
  }>;
1843
- error: z.ZodOptional<z.ZodString>;
1855
+ error: z.ZodOptional<z.ZodObject<{
1856
+ message: z.ZodString;
1857
+ name: z.ZodOptional<z.ZodString>;
1858
+ }, z.core.$strip>>;
1844
1859
  output: z.ZodOptional<z.ZodUnknown>;
1845
1860
  }, z.core.$strip>;
1846
1861
  }, z.core.$strip>;
@@ -1865,7 +1880,10 @@ declare const syncAccountRestartOutputSchema: z.ZodObject<{
1865
1880
  waiting: "waiting";
1866
1881
  waitingForPause: "waitingForPause";
1867
1882
  }>;
1868
- error: z.ZodOptional<z.ZodString>;
1883
+ error: z.ZodOptional<z.ZodObject<{
1884
+ message: z.ZodString;
1885
+ name: z.ZodOptional<z.ZodString>;
1886
+ }, z.core.$strip>>;
1869
1887
  output: z.ZodOptional<z.ZodUnknown>;
1870
1888
  }, z.core.$strip>;
1871
1889
  }, z.core.$strip>;
@@ -2444,7 +2462,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2444
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2445
2463
  paymentsToBatch: SendPaymentInput[];
2446
2464
  }): Promise<IRPCResponse<{
2447
- status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2465
+ status: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
2448
2466
  id: string;
2449
2467
  createdAt: Date | null;
2450
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.xrXNjWCo.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.CjJZ44pz.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";
1532
1533
  OPEN: "OPEN";
1533
1534
  FULL: "FULL";
1534
1535
  PROCESSING: "PROCESSING";
1535
1536
  READY_TO_SIGN: "READY_TO_SIGN";
1536
1537
  SIGNED: "SIGNED";
1537
1538
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1538
- FAILED: "FAILED";
1539
1539
  }>, z.ZodArray<z.ZodEnum<{
1540
+ FAILED: "FAILED";
1540
1541
  OPEN: "OPEN";
1541
1542
  FULL: "FULL";
1542
1543
  PROCESSING: "PROCESSING";
1543
1544
  READY_TO_SIGN: "READY_TO_SIGN";
1544
1545
  SIGNED: "SIGNED";
1545
1546
  SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
- FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
1549
1549
  type GetBatchesInput = z.input<typeof getBatchesInputSchema>;
@@ -1569,7 +1569,10 @@ declare const processBatchOutputSchema: z.ZodObject<{
1569
1569
  waiting: "waiting";
1570
1570
  waitingForPause: "waitingForPause";
1571
1571
  }>;
1572
- error: z.ZodOptional<z.ZodString>;
1572
+ error: z.ZodOptional<z.ZodObject<{
1573
+ message: z.ZodString;
1574
+ name: z.ZodOptional<z.ZodString>;
1575
+ }, z.core.$strip>>;
1573
1576
  output: z.ZodOptional<z.ZodUnknown>;
1574
1577
  }, z.core.$strip>;
1575
1578
  }, z.core.$strip>;
@@ -1594,7 +1597,10 @@ declare const processBatchStatusOutputSchema: z.ZodObject<{
1594
1597
  waiting: "waiting";
1595
1598
  waitingForPause: "waitingForPause";
1596
1599
  }>;
1597
- error: z.ZodOptional<z.ZodString>;
1600
+ error: z.ZodOptional<z.ZodObject<{
1601
+ message: z.ZodString;
1602
+ name: z.ZodOptional<z.ZodString>;
1603
+ }, z.core.$strip>>;
1598
1604
  output: z.ZodOptional<z.ZodUnknown>;
1599
1605
  }, z.core.$strip>;
1600
1606
  }, z.core.$strip>;
@@ -1619,7 +1625,10 @@ declare const processBatchRestartOutputSchema: z.ZodObject<{
1619
1625
  waiting: "waiting";
1620
1626
  waitingForPause: "waitingForPause";
1621
1627
  }>;
1622
- error: z.ZodOptional<z.ZodString>;
1628
+ error: z.ZodOptional<z.ZodObject<{
1629
+ message: z.ZodString;
1630
+ name: z.ZodOptional<z.ZodString>;
1631
+ }, z.core.$strip>>;
1623
1632
  output: z.ZodOptional<z.ZodUnknown>;
1624
1633
  }, z.core.$strip>;
1625
1634
  }, z.core.$strip>;
@@ -1777,16 +1786,16 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1777
1786
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1778
1787
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1779
1788
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1780
- FAILED: "FAILED";
1781
1789
  PREPARED: "PREPARED";
1782
1790
  INITIALIZED: "INITIALIZED";
1791
+ FAILED: "FAILED";
1783
1792
  PENDING: "PENDING";
1784
1793
  COMPLETED: "COMPLETED";
1785
1794
  CREATED: "CREATED";
1786
1795
  }>, z.ZodArray<z.ZodEnum<{
1787
- FAILED: "FAILED";
1788
1796
  PREPARED: "PREPARED";
1789
1797
  INITIALIZED: "INITIALIZED";
1798
+ FAILED: "FAILED";
1790
1799
  PENDING: "PENDING";
1791
1800
  COMPLETED: "COMPLETED";
1792
1801
  CREATED: "CREATED";
@@ -1815,7 +1824,10 @@ declare const syncAccountOutputSchema: z.ZodObject<{
1815
1824
  waiting: "waiting";
1816
1825
  waitingForPause: "waitingForPause";
1817
1826
  }>;
1818
- error: z.ZodOptional<z.ZodString>;
1827
+ error: z.ZodOptional<z.ZodObject<{
1828
+ message: z.ZodString;
1829
+ name: z.ZodOptional<z.ZodString>;
1830
+ }, z.core.$strip>>;
1819
1831
  output: z.ZodOptional<z.ZodUnknown>;
1820
1832
  }, z.core.$strip>;
1821
1833
  }, z.core.$strip>;
@@ -1840,7 +1852,10 @@ declare const syncAccountStatusOutputSchema: z.ZodObject<{
1840
1852
  waiting: "waiting";
1841
1853
  waitingForPause: "waitingForPause";
1842
1854
  }>;
1843
- error: z.ZodOptional<z.ZodString>;
1855
+ error: z.ZodOptional<z.ZodObject<{
1856
+ message: z.ZodString;
1857
+ name: z.ZodOptional<z.ZodString>;
1858
+ }, z.core.$strip>>;
1844
1859
  output: z.ZodOptional<z.ZodUnknown>;
1845
1860
  }, z.core.$strip>;
1846
1861
  }, z.core.$strip>;
@@ -1865,7 +1880,10 @@ declare const syncAccountRestartOutputSchema: z.ZodObject<{
1865
1880
  waiting: "waiting";
1866
1881
  waitingForPause: "waitingForPause";
1867
1882
  }>;
1868
- error: z.ZodOptional<z.ZodString>;
1883
+ error: z.ZodOptional<z.ZodObject<{
1884
+ message: z.ZodString;
1885
+ name: z.ZodOptional<z.ZodString>;
1886
+ }, z.core.$strip>>;
1869
1887
  output: z.ZodOptional<z.ZodUnknown>;
1870
1888
  }, z.core.$strip>;
1871
1889
  }, z.core.$strip>;
@@ -2444,7 +2462,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2444
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2445
2463
  paymentsToBatch: SendPaymentInput[];
2446
2464
  }): Promise<IRPCResponse<{
2447
- status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2465
+ status: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | null;
2448
2466
  id: string;
2449
2467
  createdAt: Date | null;
2450
2468
  updatedAt: Date | null;
@@ -427,7 +427,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
427
427
  }
428
428
  const accounts = await this._getAccounts();
429
429
  const accountsForConnector = accounts.filter(
430
- (acc) => acc.connectorKey === connectorKey
430
+ (acc) => acc.connectorKey === connectorKey && acc.status !== "DISABLED"
431
431
  );
432
432
  const encryptionKey = await importAesKey(this.env.ENCRYPTION_KEY);
433
433
  const accountsWithCredentials = await Promise.all(
@@ -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: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
74
+ data: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_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: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
87
+ $type: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_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: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
402
+ data: "PREPARED" | "INITIALIZED" | "FAILED" | "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: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
415
+ $type: "PREPARED" | "INITIALIZED" | "FAILED" | "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: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
74
+ data: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_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: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
87
+ $type: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_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: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
402
+ data: "PREPARED" | "INITIALIZED" | "FAILED" | "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: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
415
+ $type: "PREPARED" | "INITIALIZED" | "FAILED" | "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: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
74
+ data: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_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: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED";
87
+ $type: "FAILED" | "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_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: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
402
+ data: "PREPARED" | "INITIALIZED" | "FAILED" | "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: "FAILED" | "PREPARED" | "INITIALIZED" | "PENDING" | "COMPLETED" | "CREATED";
415
+ $type: "PREPARED" | "INITIALIZED" | "FAILED" | "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.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';
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';
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.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';
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';
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.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';
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';
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.1",
3
+ "version": "0.3.2",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {