@develit-services/bank 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/database/schema.cjs +2 -1
  2. package/dist/database/schema.d.cts +1 -1
  3. package/dist/database/schema.d.mts +1 -1
  4. package/dist/database/schema.d.ts +1 -1
  5. package/dist/database/schema.mjs +2 -1
  6. package/dist/export/worker.cjs +223 -168
  7. package/dist/export/worker.d.cts +136 -28
  8. package/dist/export/worker.d.mts +136 -28
  9. package/dist/export/worker.d.ts +136 -28
  10. package/dist/export/worker.mjs +219 -164
  11. package/dist/export/workflows.cjs +27 -24
  12. package/dist/export/workflows.d.cts +10 -3
  13. package/dist/export/workflows.d.mts +10 -3
  14. package/dist/export/workflows.d.ts +10 -3
  15. package/dist/export/workflows.mjs +24 -21
  16. package/dist/export/wrangler.cjs +8 -2
  17. package/dist/export/wrangler.d.cts +1 -0
  18. package/dist/export/wrangler.d.mts +1 -0
  19. package/dist/export/wrangler.d.ts +1 -0
  20. package/dist/export/wrangler.mjs +8 -2
  21. package/dist/shared/{bank.Bz_9Rd77.cjs → bank.BGuS_o9V.cjs} +1 -1
  22. package/dist/shared/bank.CIJDq7GL.cjs +401 -0
  23. package/dist/shared/{bank.AJrHfGNj.cjs → bank.CpcK1Dse.cjs} +13 -10
  24. package/dist/shared/{bank.6g3WuMht.mjs → bank.CthUj-ff.mjs} +1 -1
  25. package/dist/shared/{bank.CsAnzmYN.mjs → bank.lZMrqjVR.mjs} +13 -10
  26. package/dist/shared/bank.mZtcXaJo.mjs +391 -0
  27. package/dist/shared/{bank.eVSSL0hq.d.cts → bank.xrXNjWCo.d.cts} +113 -18
  28. package/dist/shared/{bank.eVSSL0hq.d.mts → bank.xrXNjWCo.d.mts} +113 -18
  29. package/dist/shared/{bank.eVSSL0hq.d.ts → bank.xrXNjWCo.d.ts} +113 -18
  30. package/dist/types.cjs +3 -2
  31. package/dist/types.d.cts +2 -2
  32. package/dist/types.d.mts +2 -2
  33. package/dist/types.d.ts +2 -2
  34. package/dist/types.mjs +3 -2
  35. package/package.json +2 -1
  36. package/dist/shared/bank.B8vgpVU6.cjs +0 -98
  37. package/dist/shared/bank.jhJ4j7UB.mjs +0 -94
@@ -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 } from '../shared/bank.eVSSL0hq.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';
@@ -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";
1521
1522
  createdAt: "createdAt";
1522
1523
  updatedAt: "updatedAt";
1523
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1524
1524
  }>;
1525
1525
  direction: z.ZodEnum<{
1526
1526
  asc: "asc";
@@ -1530,19 +1530,19 @@ declare const getBatchesInputSchema: z.ZodObject<{
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
1532
  OPEN: "OPEN";
1533
+ FULL: "FULL";
1533
1534
  PROCESSING: "PROCESSING";
1534
1535
  READY_TO_SIGN: "READY_TO_SIGN";
1535
- WAITING_FOR_PROCESSING: "WAITING_FOR_PROCESSING";
1536
- PREPARED: "PREPARED";
1537
- COMPLETED: "COMPLETED";
1536
+ SIGNED: "SIGNED";
1537
+ SIGNATURE_FAILED: "SIGNATURE_FAILED";
1538
1538
  FAILED: "FAILED";
1539
1539
  }>, z.ZodArray<z.ZodEnum<{
1540
1540
  OPEN: "OPEN";
1541
+ FULL: "FULL";
1541
1542
  PROCESSING: "PROCESSING";
1542
1543
  READY_TO_SIGN: "READY_TO_SIGN";
1543
- WAITING_FOR_PROCESSING: "WAITING_FOR_PROCESSING";
1544
- PREPARED: "PREPARED";
1545
- COMPLETED: "COMPLETED";
1544
+ SIGNED: "SIGNED";
1545
+ SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
1546
  FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
@@ -1553,19 +1553,93 @@ type GetBatchesOutput = {
1553
1553
  };
1554
1554
 
1555
1555
  declare const processBatchInputSchema: z.ZodObject<{
1556
- connectorKey: z.ZodEnum<{
1557
- ERSTE: "ERSTE";
1558
- FINBRICKS: "FINBRICKS";
1559
- MOCK: "MOCK";
1560
- CREDITAS: "CREDITAS";
1561
- MOCK_COBS: "MOCK_COBS";
1562
- FIO: "FIO";
1563
- MONETA: "MONETA";
1564
- }>;
1565
- batch: z.ZodCustom<BatchSelectType, BatchSelectType>;
1556
+ batchId: z.ZodUUID;
1557
+ }, z.core.$strip>;
1558
+ declare const processBatchOutputSchema: z.ZodObject<{
1559
+ instanceId: z.ZodString;
1560
+ details: z.ZodObject<{
1561
+ status: z.ZodEnum<{
1562
+ unknown: "unknown";
1563
+ queued: "queued";
1564
+ running: "running";
1565
+ paused: "paused";
1566
+ errored: "errored";
1567
+ terminated: "terminated";
1568
+ complete: "complete";
1569
+ waiting: "waiting";
1570
+ waitingForPause: "waitingForPause";
1571
+ }>;
1572
+ error: z.ZodOptional<z.ZodString>;
1573
+ output: z.ZodOptional<z.ZodUnknown>;
1574
+ }, z.core.$strip>;
1566
1575
  }, z.core.$strip>;
1567
1576
  interface ProcessBatchInput extends z.infer<typeof processBatchInputSchema> {
1568
1577
  }
1578
+ type ProcessBatchOutput = z.infer<typeof processBatchOutputSchema>;
1579
+
1580
+ declare const processBatchStatusInputSchema: z.ZodObject<{
1581
+ batchId: z.ZodUUID;
1582
+ }, z.core.$strip>;
1583
+ declare const processBatchStatusOutputSchema: z.ZodObject<{
1584
+ instanceId: z.ZodString;
1585
+ details: z.ZodObject<{
1586
+ status: z.ZodEnum<{
1587
+ unknown: "unknown";
1588
+ queued: "queued";
1589
+ running: "running";
1590
+ paused: "paused";
1591
+ errored: "errored";
1592
+ terminated: "terminated";
1593
+ complete: "complete";
1594
+ waiting: "waiting";
1595
+ waitingForPause: "waitingForPause";
1596
+ }>;
1597
+ error: z.ZodOptional<z.ZodString>;
1598
+ output: z.ZodOptional<z.ZodUnknown>;
1599
+ }, z.core.$strip>;
1600
+ }, z.core.$strip>;
1601
+ interface ProcessBatchStatusInput extends z.infer<typeof processBatchStatusInputSchema> {
1602
+ }
1603
+ type ProcessBatchStatusOutput = z.infer<typeof processBatchStatusOutputSchema>;
1604
+
1605
+ declare const processBatchRestartInputSchema: z.ZodObject<{
1606
+ batchId: z.ZodUUID;
1607
+ }, z.core.$strip>;
1608
+ declare const processBatchRestartOutputSchema: z.ZodObject<{
1609
+ instanceId: z.ZodString;
1610
+ details: z.ZodObject<{
1611
+ status: z.ZodEnum<{
1612
+ unknown: "unknown";
1613
+ queued: "queued";
1614
+ running: "running";
1615
+ paused: "paused";
1616
+ errored: "errored";
1617
+ terminated: "terminated";
1618
+ complete: "complete";
1619
+ waiting: "waiting";
1620
+ waitingForPause: "waitingForPause";
1621
+ }>;
1622
+ error: z.ZodOptional<z.ZodString>;
1623
+ output: z.ZodOptional<z.ZodUnknown>;
1624
+ }, z.core.$strip>;
1625
+ }, z.core.$strip>;
1626
+ interface ProcessBatchRestartInput extends z.infer<typeof processBatchRestartInputSchema> {
1627
+ }
1628
+ type ProcessBatchRestartOutput = z.infer<typeof processBatchRestartOutputSchema>;
1629
+
1630
+ declare const processBatchEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1631
+ batchId: z.ZodUUID;
1632
+ eventType: z.ZodLiteral<string>;
1633
+ payload: z.ZodObject<{
1634
+ authorized: z.ZodBoolean;
1635
+ }, z.core.$strip>;
1636
+ }, z.core.$strip>], "eventType">;
1637
+ declare const processBatchEventOutputSchema: z.ZodObject<{
1638
+ success: z.ZodBoolean;
1639
+ message: z.ZodString;
1640
+ }, z.core.$strip>;
1641
+ type ProcessBatchEventInput = z.infer<typeof processBatchEventInputSchema>;
1642
+ type ProcessBatchEventOutput = z.infer<typeof processBatchEventOutputSchema>;
1569
1643
 
1570
1644
  declare const getPaymentsInputSchema: z.ZodObject<{
1571
1645
  page: z.ZodNumber;
@@ -1581,6 +1655,7 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1581
1655
  desc: "desc";
1582
1656
  }>;
1583
1657
  }, z.core.$strip>;
1658
+ ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1584
1659
  filterPaymentAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
1585
1660
  filterPaymentAmount: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
1586
1661
  filterPaymentCurrency: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -1702,18 +1777,18 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1702
1777
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1703
1778
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1704
1779
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1705
- PREPARED: "PREPARED";
1706
- COMPLETED: "COMPLETED";
1707
1780
  FAILED: "FAILED";
1781
+ PREPARED: "PREPARED";
1708
1782
  INITIALIZED: "INITIALIZED";
1709
1783
  PENDING: "PENDING";
1784
+ COMPLETED: "COMPLETED";
1710
1785
  CREATED: "CREATED";
1711
1786
  }>, z.ZodArray<z.ZodEnum<{
1712
- PREPARED: "PREPARED";
1713
- COMPLETED: "COMPLETED";
1714
1787
  FAILED: "FAILED";
1788
+ PREPARED: "PREPARED";
1715
1789
  INITIALIZED: "INITIALIZED";
1716
1790
  PENDING: "PENDING";
1791
+ COMPLETED: "COMPLETED";
1717
1792
  CREATED: "CREATED";
1718
1793
  }>>]>>;
1719
1794
  }, z.core.$strip>;
@@ -1829,6 +1904,25 @@ declare const updateAccountInputSchema: z.ZodObject<{
1829
1904
  }, {}, {
1830
1905
  length: number | undefined;
1831
1906
  }>;
1907
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
1908
+ name: "name";
1909
+ tableName: "account";
1910
+ dataType: "string";
1911
+ columnType: "SQLiteText";
1912
+ data: string;
1913
+ driverParam: string;
1914
+ notNull: false;
1915
+ hasDefault: false;
1916
+ isPrimaryKey: false;
1917
+ isAutoincrement: false;
1918
+ hasRuntimeDefault: false;
1919
+ enumValues: [string, ...string[]];
1920
+ baseColumn: never;
1921
+ identity: undefined;
1922
+ generated: undefined;
1923
+ }, {}, {
1924
+ length: number | undefined;
1925
+ }>;
1832
1926
  iban: drizzle_orm_sqlite_core.SQLiteColumn<{
1833
1927
  name: "iban";
1834
1928
  tableName: "account";
@@ -1961,7 +2055,7 @@ declare const updateAccountInputSchema: z.ZodObject<{
1961
2055
  generated: undefined;
1962
2056
  }, {}, {}>;
1963
2057
  lastSyncAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1964
- name: "last_sync";
2058
+ name: "last_sync_at";
1965
2059
  tableName: "account";
1966
2060
  dataType: "date";
1967
2061
  columnType: "SQLiteTimestamp";
@@ -2291,6 +2385,14 @@ type GetAccountsOutput = {
2291
2385
  totalCount: number;
2292
2386
  };
2293
2387
 
2388
+ declare const disconnectAccountInputSchema: z.ZodObject<{
2389
+ accountId: z.ZodUUID;
2390
+ }, z.core.$strip>;
2391
+ interface DisconnectAccountInput extends z.infer<typeof disconnectAccountInputSchema> {
2392
+ }
2393
+ interface DisconnectAccountOutput extends AccountSelectType {
2394
+ }
2395
+
2294
2396
  declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
2295
2397
  declare class BankServiceBase extends BankServiceBase_base {
2296
2398
  readonly db: DrizzleD1Database<typeof tables>;
@@ -2300,6 +2402,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2300
2402
  _getAccounts(): Promise<{
2301
2403
  expiresAt: Date | undefined;
2302
2404
  number: string;
2405
+ name: string | null;
2303
2406
  iban: string;
2304
2407
  bankCode: "5051" | "0100" | "0300" | "0600" | "0710" | "0800" | "2010" | "2060" | "2070" | "2100" | "2200" | "2220" | "2250" | "2260" | "2600" | "2700" | "3030" | "3060" | "3500" | "4300" | "5500" | "5800" | "6000" | "6200" | "6210" | "6300" | "6363" | "6700" | "6800" | "7910" | "7950" | "7960" | "7970" | "7990" | "8030" | "8040" | "8060" | "8090" | "8150" | "8190" | "8198" | "8220" | "8250" | "8255" | "8265" | "8500";
2305
2408
  connectorKey: "ERSTE" | "FINBRICKS" | "MOCK" | "CREDITAS" | "MOCK_COBS" | "FIO" | "MONETA";
@@ -2341,18 +2444,22 @@ declare class BankServiceBase extends BankServiceBase_base {
2341
2444
  addPaymentsToBatch({ paymentsToBatch, }: {
2342
2445
  paymentsToBatch: SendPaymentInput[];
2343
2446
  }): Promise<IRPCResponse<{
2344
- status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
2447
+ batchPaymentInitiatedAt: Date | null;
2448
+ authorizationUrls: string[] | null;
2449
+ status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2345
2450
  id: string;
2346
2451
  createdAt: Date | null;
2347
2452
  updatedAt: Date | null;
2348
2453
  deletedAt: Date | null;
2349
2454
  accountId: string | null;
2350
- batchPaymentInitiatedAt: Date | null;
2351
- authorizationUrls: string | string[] | null;
2352
2455
  payments: PaymentInsertType[];
2353
- metadata: object | null;
2456
+ metadata: BatchMetadata | null;
2457
+ paymentsChecksum: string | null;
2354
2458
  }[] | undefined>>;
2355
- processBatch(input: ProcessBatchInput): Promise<IRPCResponse<void>>;
2459
+ processBatch(input: ProcessBatchInput): Promise<IRPCResponse<ProcessBatchOutput>>;
2460
+ processBatchStatus(input: ProcessBatchStatusInput): Promise<IRPCResponse<ProcessBatchStatusOutput>>;
2461
+ processBatchRestart(input: ProcessBatchRestartInput): Promise<IRPCResponse<ProcessBatchRestartOutput>>;
2462
+ processBatchEvent(input: ProcessBatchEventInput): Promise<IRPCResponse<ProcessBatchEventOutput>>;
2356
2463
  queue(b: MessageBatch<SendPaymentInput>): Promise<void>;
2357
2464
  getAuthUri(input: GetAuthUriInput): Promise<IRPCResponse<GetAuthUriOutput>>;
2358
2465
  authorizeAccount(input: AuthorizeAccountInput): Promise<IRPCResponse<AuthorizeAccountOutput>>;
@@ -2360,6 +2467,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2360
2467
  sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
2361
2468
  getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
2362
2469
  updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
2470
+ disconnectAccount(input: DisconnectAccountInput): Promise<IRPCResponse<DisconnectAccountOutput>>;
2363
2471
  getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
2364
2472
  }
2365
2473
  declare function defineBankService({ config, }: {
@@ -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 } from '../shared/bank.eVSSL0hq.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';
@@ -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";
1521
1522
  createdAt: "createdAt";
1522
1523
  updatedAt: "updatedAt";
1523
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
1524
1524
  }>;
1525
1525
  direction: z.ZodEnum<{
1526
1526
  asc: "asc";
@@ -1530,19 +1530,19 @@ declare const getBatchesInputSchema: z.ZodObject<{
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
1532
  OPEN: "OPEN";
1533
+ FULL: "FULL";
1533
1534
  PROCESSING: "PROCESSING";
1534
1535
  READY_TO_SIGN: "READY_TO_SIGN";
1535
- WAITING_FOR_PROCESSING: "WAITING_FOR_PROCESSING";
1536
- PREPARED: "PREPARED";
1537
- COMPLETED: "COMPLETED";
1536
+ SIGNED: "SIGNED";
1537
+ SIGNATURE_FAILED: "SIGNATURE_FAILED";
1538
1538
  FAILED: "FAILED";
1539
1539
  }>, z.ZodArray<z.ZodEnum<{
1540
1540
  OPEN: "OPEN";
1541
+ FULL: "FULL";
1541
1542
  PROCESSING: "PROCESSING";
1542
1543
  READY_TO_SIGN: "READY_TO_SIGN";
1543
- WAITING_FOR_PROCESSING: "WAITING_FOR_PROCESSING";
1544
- PREPARED: "PREPARED";
1545
- COMPLETED: "COMPLETED";
1544
+ SIGNED: "SIGNED";
1545
+ SIGNATURE_FAILED: "SIGNATURE_FAILED";
1546
1546
  FAILED: "FAILED";
1547
1547
  }>>]>>;
1548
1548
  }, z.core.$strip>;
@@ -1553,19 +1553,93 @@ type GetBatchesOutput = {
1553
1553
  };
1554
1554
 
1555
1555
  declare const processBatchInputSchema: z.ZodObject<{
1556
- connectorKey: z.ZodEnum<{
1557
- ERSTE: "ERSTE";
1558
- FINBRICKS: "FINBRICKS";
1559
- MOCK: "MOCK";
1560
- CREDITAS: "CREDITAS";
1561
- MOCK_COBS: "MOCK_COBS";
1562
- FIO: "FIO";
1563
- MONETA: "MONETA";
1564
- }>;
1565
- batch: z.ZodCustom<BatchSelectType, BatchSelectType>;
1556
+ batchId: z.ZodUUID;
1557
+ }, z.core.$strip>;
1558
+ declare const processBatchOutputSchema: z.ZodObject<{
1559
+ instanceId: z.ZodString;
1560
+ details: z.ZodObject<{
1561
+ status: z.ZodEnum<{
1562
+ unknown: "unknown";
1563
+ queued: "queued";
1564
+ running: "running";
1565
+ paused: "paused";
1566
+ errored: "errored";
1567
+ terminated: "terminated";
1568
+ complete: "complete";
1569
+ waiting: "waiting";
1570
+ waitingForPause: "waitingForPause";
1571
+ }>;
1572
+ error: z.ZodOptional<z.ZodString>;
1573
+ output: z.ZodOptional<z.ZodUnknown>;
1574
+ }, z.core.$strip>;
1566
1575
  }, z.core.$strip>;
1567
1576
  interface ProcessBatchInput extends z.infer<typeof processBatchInputSchema> {
1568
1577
  }
1578
+ type ProcessBatchOutput = z.infer<typeof processBatchOutputSchema>;
1579
+
1580
+ declare const processBatchStatusInputSchema: z.ZodObject<{
1581
+ batchId: z.ZodUUID;
1582
+ }, z.core.$strip>;
1583
+ declare const processBatchStatusOutputSchema: z.ZodObject<{
1584
+ instanceId: z.ZodString;
1585
+ details: z.ZodObject<{
1586
+ status: z.ZodEnum<{
1587
+ unknown: "unknown";
1588
+ queued: "queued";
1589
+ running: "running";
1590
+ paused: "paused";
1591
+ errored: "errored";
1592
+ terminated: "terminated";
1593
+ complete: "complete";
1594
+ waiting: "waiting";
1595
+ waitingForPause: "waitingForPause";
1596
+ }>;
1597
+ error: z.ZodOptional<z.ZodString>;
1598
+ output: z.ZodOptional<z.ZodUnknown>;
1599
+ }, z.core.$strip>;
1600
+ }, z.core.$strip>;
1601
+ interface ProcessBatchStatusInput extends z.infer<typeof processBatchStatusInputSchema> {
1602
+ }
1603
+ type ProcessBatchStatusOutput = z.infer<typeof processBatchStatusOutputSchema>;
1604
+
1605
+ declare const processBatchRestartInputSchema: z.ZodObject<{
1606
+ batchId: z.ZodUUID;
1607
+ }, z.core.$strip>;
1608
+ declare const processBatchRestartOutputSchema: z.ZodObject<{
1609
+ instanceId: z.ZodString;
1610
+ details: z.ZodObject<{
1611
+ status: z.ZodEnum<{
1612
+ unknown: "unknown";
1613
+ queued: "queued";
1614
+ running: "running";
1615
+ paused: "paused";
1616
+ errored: "errored";
1617
+ terminated: "terminated";
1618
+ complete: "complete";
1619
+ waiting: "waiting";
1620
+ waitingForPause: "waitingForPause";
1621
+ }>;
1622
+ error: z.ZodOptional<z.ZodString>;
1623
+ output: z.ZodOptional<z.ZodUnknown>;
1624
+ }, z.core.$strip>;
1625
+ }, z.core.$strip>;
1626
+ interface ProcessBatchRestartInput extends z.infer<typeof processBatchRestartInputSchema> {
1627
+ }
1628
+ type ProcessBatchRestartOutput = z.infer<typeof processBatchRestartOutputSchema>;
1629
+
1630
+ declare const processBatchEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1631
+ batchId: z.ZodUUID;
1632
+ eventType: z.ZodLiteral<string>;
1633
+ payload: z.ZodObject<{
1634
+ authorized: z.ZodBoolean;
1635
+ }, z.core.$strip>;
1636
+ }, z.core.$strip>], "eventType">;
1637
+ declare const processBatchEventOutputSchema: z.ZodObject<{
1638
+ success: z.ZodBoolean;
1639
+ message: z.ZodString;
1640
+ }, z.core.$strip>;
1641
+ type ProcessBatchEventInput = z.infer<typeof processBatchEventInputSchema>;
1642
+ type ProcessBatchEventOutput = z.infer<typeof processBatchEventOutputSchema>;
1569
1643
 
1570
1644
  declare const getPaymentsInputSchema: z.ZodObject<{
1571
1645
  page: z.ZodNumber;
@@ -1581,6 +1655,7 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1581
1655
  desc: "desc";
1582
1656
  }>;
1583
1657
  }, z.core.$strip>;
1658
+ ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
1584
1659
  filterPaymentAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
1585
1660
  filterPaymentAmount: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
1586
1661
  filterPaymentCurrency: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -1702,18 +1777,18 @@ declare const getPaymentsInputSchema: z.ZodObject<{
1702
1777
  filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
1703
1778
  filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
1704
1779
  filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1705
- PREPARED: "PREPARED";
1706
- COMPLETED: "COMPLETED";
1707
1780
  FAILED: "FAILED";
1781
+ PREPARED: "PREPARED";
1708
1782
  INITIALIZED: "INITIALIZED";
1709
1783
  PENDING: "PENDING";
1784
+ COMPLETED: "COMPLETED";
1710
1785
  CREATED: "CREATED";
1711
1786
  }>, z.ZodArray<z.ZodEnum<{
1712
- PREPARED: "PREPARED";
1713
- COMPLETED: "COMPLETED";
1714
1787
  FAILED: "FAILED";
1788
+ PREPARED: "PREPARED";
1715
1789
  INITIALIZED: "INITIALIZED";
1716
1790
  PENDING: "PENDING";
1791
+ COMPLETED: "COMPLETED";
1717
1792
  CREATED: "CREATED";
1718
1793
  }>>]>>;
1719
1794
  }, z.core.$strip>;
@@ -1829,6 +1904,25 @@ declare const updateAccountInputSchema: z.ZodObject<{
1829
1904
  }, {}, {
1830
1905
  length: number | undefined;
1831
1906
  }>;
1907
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
1908
+ name: "name";
1909
+ tableName: "account";
1910
+ dataType: "string";
1911
+ columnType: "SQLiteText";
1912
+ data: string;
1913
+ driverParam: string;
1914
+ notNull: false;
1915
+ hasDefault: false;
1916
+ isPrimaryKey: false;
1917
+ isAutoincrement: false;
1918
+ hasRuntimeDefault: false;
1919
+ enumValues: [string, ...string[]];
1920
+ baseColumn: never;
1921
+ identity: undefined;
1922
+ generated: undefined;
1923
+ }, {}, {
1924
+ length: number | undefined;
1925
+ }>;
1832
1926
  iban: drizzle_orm_sqlite_core.SQLiteColumn<{
1833
1927
  name: "iban";
1834
1928
  tableName: "account";
@@ -1961,7 +2055,7 @@ declare const updateAccountInputSchema: z.ZodObject<{
1961
2055
  generated: undefined;
1962
2056
  }, {}, {}>;
1963
2057
  lastSyncAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1964
- name: "last_sync";
2058
+ name: "last_sync_at";
1965
2059
  tableName: "account";
1966
2060
  dataType: "date";
1967
2061
  columnType: "SQLiteTimestamp";
@@ -2291,6 +2385,14 @@ type GetAccountsOutput = {
2291
2385
  totalCount: number;
2292
2386
  };
2293
2387
 
2388
+ declare const disconnectAccountInputSchema: z.ZodObject<{
2389
+ accountId: z.ZodUUID;
2390
+ }, z.core.$strip>;
2391
+ interface DisconnectAccountInput extends z.infer<typeof disconnectAccountInputSchema> {
2392
+ }
2393
+ interface DisconnectAccountOutput extends AccountSelectType {
2394
+ }
2395
+
2294
2396
  declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
2295
2397
  declare class BankServiceBase extends BankServiceBase_base {
2296
2398
  readonly db: DrizzleD1Database<typeof tables>;
@@ -2300,6 +2402,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2300
2402
  _getAccounts(): Promise<{
2301
2403
  expiresAt: Date | undefined;
2302
2404
  number: string;
2405
+ name: string | null;
2303
2406
  iban: string;
2304
2407
  bankCode: "5051" | "0100" | "0300" | "0600" | "0710" | "0800" | "2010" | "2060" | "2070" | "2100" | "2200" | "2220" | "2250" | "2260" | "2600" | "2700" | "3030" | "3060" | "3500" | "4300" | "5500" | "5800" | "6000" | "6200" | "6210" | "6300" | "6363" | "6700" | "6800" | "7910" | "7950" | "7960" | "7970" | "7990" | "8030" | "8040" | "8060" | "8090" | "8150" | "8190" | "8198" | "8220" | "8250" | "8255" | "8265" | "8500";
2305
2408
  connectorKey: "ERSTE" | "FINBRICKS" | "MOCK" | "CREDITAS" | "MOCK_COBS" | "FIO" | "MONETA";
@@ -2341,18 +2444,22 @@ declare class BankServiceBase extends BankServiceBase_base {
2341
2444
  addPaymentsToBatch({ paymentsToBatch, }: {
2342
2445
  paymentsToBatch: SendPaymentInput[];
2343
2446
  }): Promise<IRPCResponse<{
2344
- status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
2447
+ batchPaymentInitiatedAt: Date | null;
2448
+ authorizationUrls: string[] | null;
2449
+ status: "OPEN" | "FULL" | "PROCESSING" | "READY_TO_SIGN" | "SIGNED" | "SIGNATURE_FAILED" | "FAILED" | null;
2345
2450
  id: string;
2346
2451
  createdAt: Date | null;
2347
2452
  updatedAt: Date | null;
2348
2453
  deletedAt: Date | null;
2349
2454
  accountId: string | null;
2350
- batchPaymentInitiatedAt: Date | null;
2351
- authorizationUrls: string | string[] | null;
2352
2455
  payments: PaymentInsertType[];
2353
- metadata: object | null;
2456
+ metadata: BatchMetadata | null;
2457
+ paymentsChecksum: string | null;
2354
2458
  }[] | undefined>>;
2355
- processBatch(input: ProcessBatchInput): Promise<IRPCResponse<void>>;
2459
+ processBatch(input: ProcessBatchInput): Promise<IRPCResponse<ProcessBatchOutput>>;
2460
+ processBatchStatus(input: ProcessBatchStatusInput): Promise<IRPCResponse<ProcessBatchStatusOutput>>;
2461
+ processBatchRestart(input: ProcessBatchRestartInput): Promise<IRPCResponse<ProcessBatchRestartOutput>>;
2462
+ processBatchEvent(input: ProcessBatchEventInput): Promise<IRPCResponse<ProcessBatchEventOutput>>;
2356
2463
  queue(b: MessageBatch<SendPaymentInput>): Promise<void>;
2357
2464
  getAuthUri(input: GetAuthUriInput): Promise<IRPCResponse<GetAuthUriOutput>>;
2358
2465
  authorizeAccount(input: AuthorizeAccountInput): Promise<IRPCResponse<AuthorizeAccountOutput>>;
@@ -2360,6 +2467,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2360
2467
  sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
2361
2468
  getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
2362
2469
  updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
2470
+ disconnectAccount(input: DisconnectAccountInput): Promise<IRPCResponse<DisconnectAccountOutput>>;
2363
2471
  getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
2364
2472
  }
2365
2473
  declare function defineBankService({ config, }: {