@develit-services/bank 0.3.0 → 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';
@@ -422,12 +422,14 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
422
422
  }) {
423
423
  if (!this.allowedProviders.includes(connectorKey)) {
424
424
  throw backendSdk.createInternalError(null, {
425
- message: `Invalid connector key: ${connectorKey}`
425
+ message: `Invalid connector key: ${connectorKey}`,
426
+ code: "VALID-B-001",
427
+ status: 400
426
428
  });
427
429
  }
428
430
  const accounts = await this._getAccounts();
429
431
  const accountsForConnector = accounts.filter(
430
- (acc) => acc.connectorKey === connectorKey
432
+ (acc) => acc.connectorKey === connectorKey && acc.status !== "DISABLED"
431
433
  );
432
434
  const encryptionKey = await processBatch_workflow.importAesKey(this.env.ENCRYPTION_KEY);
433
435
  const accountsWithCredentials = await Promise.all(
@@ -441,7 +443,9 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
441
443
  );
442
444
  if (!credentials) {
443
445
  throw backendSdk.createInternalError(null, {
444
- message: `No credentials found for account ${acc.id}`
446
+ message: `No credentials found for account ${acc.id}`,
447
+ code: "DB-B-001",
448
+ status: 404
445
449
  });
446
450
  }
447
451
  return {
@@ -546,7 +550,9 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
546
550
  { successMessage: "Accounts synchronized successfully" },
547
551
  async () => {
548
552
  throw backendSdk.createInternalError(null, {
549
- message: "Not implemented yet"
553
+ message: "Not implemented yet",
554
+ code: "SYS-B-001",
555
+ status: 501
550
556
  });
551
557
  }
552
558
  );
@@ -820,14 +826,14 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
820
826
  if (!ottRow) {
821
827
  throw backendSdk.createInternalError(null, {
822
828
  message: "One-time token not found",
823
- code: "NOT_FOUND",
829
+ code: "DB-B-002",
824
830
  status: 404
825
831
  });
826
832
  }
827
833
  if (ottRow.expiresAt.getTime() < Date.now()) {
828
834
  throw backendSdk.createInternalError(null, {
829
835
  message: "One time token has expired",
830
- code: "INVALID_GRANT",
836
+ code: "VALID-B-002",
831
837
  status: 400
832
838
  });
833
839
  }
@@ -872,7 +878,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
872
878
  if (!fetchedAccounts)
873
879
  throw backendSdk.createInternalError(null, {
874
880
  message: "Account not found",
875
- code: "NOT_FOUND",
881
+ code: "DB-B-003",
876
882
  status: 404
877
883
  });
878
884
  return {
@@ -902,7 +908,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
902
908
  if (!account)
903
909
  throw backendSdk.createInternalError(null, {
904
910
  message: "Unsupported account",
905
- code: "UNSUPPORTED_ACCOUNT",
911
+ code: "VALID-B-003",
906
912
  status: 422
907
913
  });
908
914
  const payment = {
@@ -1002,7 +1008,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
1002
1008
  if (!updatedAccount) {
1003
1009
  throw backendSdk.createInternalError(null, {
1004
1010
  message: "Account not found",
1005
- code: "ACCOUNT_NOT_FOUND",
1011
+ code: "DB-B-004",
1006
1012
  status: 404
1007
1013
  });
1008
1014
  }
@@ -1019,7 +1025,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
1019
1025
  if (!account) {
1020
1026
  throw backendSdk.createInternalError(null, {
1021
1027
  message: "Account not found",
1022
- code: "ACCOUNT_NOT_FOUND",
1028
+ code: "DB-B-005",
1023
1029
  status: 404
1024
1030
  });
1025
1031
  }
@@ -1060,8 +1066,8 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
1060
1066
  if (!updatedAccount) {
1061
1067
  throw backendSdk.createInternalError(null, {
1062
1068
  message: "Account not updated",
1063
- code: "DB-B-0?",
1064
- status: 404
1069
+ code: "DB-B-006",
1070
+ status: 500
1065
1071
  });
1066
1072
  }
1067
1073
  return updatedAccount;
@@ -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';
@@ -1518,9 +1518,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
1518
1518
  limit: z.ZodNumber;
1519
1519
  sort: z.ZodObject<{
1520
1520
  column: z.ZodEnum<{
1521
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1522
1521
  createdAt: "createdAt";
1523
1522
  updatedAt: "updatedAt";
1523
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1524
1524
  }>;
1525
1525
  direction: z.ZodEnum<{
1526
1526
  asc: "asc";
@@ -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,14 +2462,14 @@ declare class BankServiceBase extends BankServiceBase_base {
2444
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2445
2463
  paymentsToBatch: SendPaymentInput[];
2446
2464
  }): Promise<IRPCResponse<{
2447
- batchPaymentInitiatedAt: Date | null;
2448
- authorizationUrls: string[] | null;
2449
- 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;
2450
2466
  id: string;
2451
2467
  createdAt: Date | null;
2452
2468
  updatedAt: Date | null;
2453
2469
  deletedAt: Date | null;
2454
2470
  accountId: string | null;
2471
+ batchPaymentInitiatedAt: Date | null;
2472
+ authorizationUrls: string[] | null;
2455
2473
  payments: PaymentInsertType[];
2456
2474
  metadata: BatchMetadata | null;
2457
2475
  paymentsChecksum: string | 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';
@@ -1518,9 +1518,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
1518
1518
  limit: z.ZodNumber;
1519
1519
  sort: z.ZodObject<{
1520
1520
  column: z.ZodEnum<{
1521
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1522
1521
  createdAt: "createdAt";
1523
1522
  updatedAt: "updatedAt";
1523
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1524
1524
  }>;
1525
1525
  direction: z.ZodEnum<{
1526
1526
  asc: "asc";
@@ -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,14 +2462,14 @@ declare class BankServiceBase extends BankServiceBase_base {
2444
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2445
2463
  paymentsToBatch: SendPaymentInput[];
2446
2464
  }): Promise<IRPCResponse<{
2447
- batchPaymentInitiatedAt: Date | null;
2448
- authorizationUrls: string[] | null;
2449
- 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;
2450
2466
  id: string;
2451
2467
  createdAt: Date | null;
2452
2468
  updatedAt: Date | null;
2453
2469
  deletedAt: Date | null;
2454
2470
  accountId: string | null;
2471
+ batchPaymentInitiatedAt: Date | null;
2472
+ authorizationUrls: string[] | null;
2455
2473
  payments: PaymentInsertType[];
2456
2474
  metadata: BatchMetadata | null;
2457
2475
  paymentsChecksum: string | 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';
@@ -1518,9 +1518,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
1518
1518
  limit: z.ZodNumber;
1519
1519
  sort: z.ZodObject<{
1520
1520
  column: z.ZodEnum<{
1521
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1522
1521
  createdAt: "createdAt";
1523
1522
  updatedAt: "updatedAt";
1523
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1524
1524
  }>;
1525
1525
  direction: z.ZodEnum<{
1526
1526
  asc: "asc";
@@ -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,14 +2462,14 @@ declare class BankServiceBase extends BankServiceBase_base {
2444
2462
  addPaymentsToBatch({ paymentsToBatch, }: {
2445
2463
  paymentsToBatch: SendPaymentInput[];
2446
2464
  }): Promise<IRPCResponse<{
2447
- batchPaymentInitiatedAt: Date | null;
2448
- authorizationUrls: string[] | null;
2449
- 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;
2450
2466
  id: string;
2451
2467
  createdAt: Date | null;
2452
2468
  updatedAt: Date | null;
2453
2469
  deletedAt: Date | null;
2454
2470
  accountId: string | null;
2471
+ batchPaymentInitiatedAt: Date | null;
2472
+ authorizationUrls: string[] | null;
2455
2473
  payments: PaymentInsertType[];
2456
2474
  metadata: BatchMetadata | null;
2457
2475
  paymentsChecksum: string | null;
@@ -420,12 +420,14 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
420
420
  }) {
421
421
  if (!this.allowedProviders.includes(connectorKey)) {
422
422
  throw createInternalError(null, {
423
- message: `Invalid connector key: ${connectorKey}`
423
+ message: `Invalid connector key: ${connectorKey}`,
424
+ code: "VALID-B-001",
425
+ status: 400
424
426
  });
425
427
  }
426
428
  const accounts = await this._getAccounts();
427
429
  const accountsForConnector = accounts.filter(
428
- (acc) => acc.connectorKey === connectorKey
430
+ (acc) => acc.connectorKey === connectorKey && acc.status !== "DISABLED"
429
431
  );
430
432
  const encryptionKey = await importAesKey(this.env.ENCRYPTION_KEY);
431
433
  const accountsWithCredentials = await Promise.all(
@@ -439,7 +441,9 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
439
441
  );
440
442
  if (!credentials) {
441
443
  throw createInternalError(null, {
442
- message: `No credentials found for account ${acc.id}`
444
+ message: `No credentials found for account ${acc.id}`,
445
+ code: "DB-B-001",
446
+ status: 404
443
447
  });
444
448
  }
445
449
  return {
@@ -544,7 +548,9 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
544
548
  { successMessage: "Accounts synchronized successfully" },
545
549
  async () => {
546
550
  throw createInternalError(null, {
547
- message: "Not implemented yet"
551
+ message: "Not implemented yet",
552
+ code: "SYS-B-001",
553
+ status: 501
548
554
  });
549
555
  }
550
556
  );
@@ -818,14 +824,14 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
818
824
  if (!ottRow) {
819
825
  throw createInternalError(null, {
820
826
  message: "One-time token not found",
821
- code: "NOT_FOUND",
827
+ code: "DB-B-002",
822
828
  status: 404
823
829
  });
824
830
  }
825
831
  if (ottRow.expiresAt.getTime() < Date.now()) {
826
832
  throw createInternalError(null, {
827
833
  message: "One time token has expired",
828
- code: "INVALID_GRANT",
834
+ code: "VALID-B-002",
829
835
  status: 400
830
836
  });
831
837
  }
@@ -870,7 +876,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
870
876
  if (!fetchedAccounts)
871
877
  throw createInternalError(null, {
872
878
  message: "Account not found",
873
- code: "NOT_FOUND",
879
+ code: "DB-B-003",
874
880
  status: 404
875
881
  });
876
882
  return {
@@ -900,7 +906,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
900
906
  if (!account)
901
907
  throw createInternalError(null, {
902
908
  message: "Unsupported account",
903
- code: "UNSUPPORTED_ACCOUNT",
909
+ code: "VALID-B-003",
904
910
  status: 422
905
911
  });
906
912
  const payment = {
@@ -1000,7 +1006,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
1000
1006
  if (!updatedAccount) {
1001
1007
  throw createInternalError(null, {
1002
1008
  message: "Account not found",
1003
- code: "ACCOUNT_NOT_FOUND",
1009
+ code: "DB-B-004",
1004
1010
  status: 404
1005
1011
  });
1006
1012
  }
@@ -1017,7 +1023,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
1017
1023
  if (!account) {
1018
1024
  throw createInternalError(null, {
1019
1025
  message: "Account not found",
1020
- code: "ACCOUNT_NOT_FOUND",
1026
+ code: "DB-B-005",
1021
1027
  status: 404
1022
1028
  });
1023
1029
  }
@@ -1058,8 +1064,8 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
1058
1064
  if (!updatedAccount) {
1059
1065
  throw createInternalError(null, {
1060
1066
  message: "Account not updated",
1061
- code: "DB-B-0?",
1062
- status: 404
1067
+ code: "DB-B-006",
1068
+ status: 500
1063
1069
  });
1064
1070
  }
1065
1071
  return updatedAccount;
@@ -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.0",
3
+ "version": "0.3.2",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {