@develit-services/bank 0.1.0 → 0.1.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.
Files changed (30) hide show
  1. package/dist/database/schema.cjs +1 -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 +1 -1
  6. package/dist/export/worker.cjs +31 -7
  7. package/dist/export/worker.d.cts +20 -27
  8. package/dist/export/worker.d.mts +20 -27
  9. package/dist/export/worker.d.ts +20 -27
  10. package/dist/export/worker.mjs +32 -8
  11. package/dist/export/workflows.cjs +3 -3
  12. package/dist/export/workflows.mjs +3 -3
  13. package/dist/shared/{bank.B72e0ibs.mjs → bank.8lAQLFNI.mjs} +1 -1
  14. package/dist/shared/{bank.Ddhhr_rz.d.ts → bank.BQSnGZ-3.d.cts} +1 -52
  15. package/dist/shared/{bank.DqRaP8LS.d.cts → bank.CouYVuOf.d.ts} +1 -52
  16. package/dist/shared/{bank.BgpXGC_1.cjs → bank.DISsqBb6.cjs} +1 -1
  17. package/dist/shared/{bank.jyyw3_3-.mjs → bank.DJ9d1yaR.mjs} +5 -3
  18. package/dist/shared/{bank.GMK4QNvo.cjs → bank.DOJ8gbXQ.cjs} +5 -3
  19. package/dist/shared/{bank.DSZbtb1J.d.mts → bank.DW3cHO1u.d.mts} +1 -52
  20. package/dist/shared/{bank.CcKNlFRd.mjs → bank.RUV2HUFo.mjs} +0 -2
  21. package/dist/shared/{bank.3YYIj-n6.cjs → bank.UfRkUN2y.cjs} +0 -2
  22. package/dist/shared/{bank.BriEYREq.d.mts → bank.mub5_S4r.d.cts} +0 -17
  23. package/dist/shared/{bank.BriEYREq.d.ts → bank.mub5_S4r.d.mts} +0 -17
  24. package/dist/shared/{bank.BriEYREq.d.cts → bank.mub5_S4r.d.ts} +0 -17
  25. package/dist/types.cjs +2 -2
  26. package/dist/types.d.cts +4 -4
  27. package/dist/types.d.mts +4 -4
  28. package/dist/types.d.ts +4 -4
  29. package/dist/types.mjs +2 -2
  30. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('../shared/bank.3YYIj-n6.cjs');
3
+ const database_schema = require('../shared/bank.UfRkUN2y.cjs');
4
4
  require('@develit-io/backend-sdk');
5
5
  require('drizzle-orm/sqlite-core');
6
6
  require('date-fns');
@@ -1,4 +1,4 @@
1
- export { f as account, g as accountCredentials, c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.BriEYREq.cjs';
1
+ export { f as account, g as accountCredentials, c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.mub5_S4r.cjs';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { f as account, g as accountCredentials, c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.BriEYREq.mjs';
1
+ export { f as account, g as accountCredentials, c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.mub5_S4r.mjs';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { f as account, g as accountCredentials, c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.BriEYREq.js';
1
+ export { f as account, g as accountCredentials, c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.mub5_S4r.js';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { D as account, G as accountCredentials, w as batch, z as ott, x as payment, y as paymentRelations } from '../shared/bank.CcKNlFRd.mjs';
1
+ export { D as account, G as accountCredentials, w as batch, z as ott, x as payment, y as paymentRelations } from '../shared/bank.RUV2HUFo.mjs';
2
2
  import '@develit-io/backend-sdk';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import 'date-fns';
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- const export_workflows = require('../shared/bank.GMK4QNvo.cjs');
3
+ const export_workflows = require('../shared/bank.DOJ8gbXQ.cjs');
4
4
  const backendSdk = require('@develit-io/backend-sdk');
5
5
  const cloudflare_workers = require('cloudflare:workers');
6
6
  const d1 = require('drizzle-orm/d1');
7
- const database_schema = require('../shared/bank.3YYIj-n6.cjs');
7
+ const database_schema = require('../shared/bank.UfRkUN2y.cjs');
8
8
  require('jose');
9
9
  const generalCodes = require('@develit-io/general-codes');
10
10
  const zod = require('zod');
11
11
  const drizzleOrm = require('drizzle-orm');
12
12
  require('cloudflare:workflows');
13
- require('../shared/bank.BgpXGC_1.cjs');
13
+ require('../shared/bank.DISsqBb6.cjs');
14
14
  require('drizzle-orm/sqlite-core');
15
15
  require('date-fns');
16
16
  require('drizzle-zod');
@@ -247,9 +247,9 @@ const sendPaymentInputSchema = zod.z.object({
247
247
  refId: zod.z.string(),
248
248
  amount: zod.z.number().positive(),
249
249
  paymentType: zod.z.enum(database_schema.PAYMENT_TYPES),
250
- chargeBearer: zod.z.enum(database_schema.CHARGE_BEARERS),
251
- executionDate: zod.z.string(),
252
- instructionPriority: zod.z.enum(database_schema.INSTRUCTION_PRIORITIES),
250
+ chargeBearer: zod.z.enum(database_schema.CHARGE_BEARERS).optional(),
251
+ executionDate: zod.z.string().optional(),
252
+ instructionPriority: zod.z.enum(database_schema.INSTRUCTION_PRIORITIES).optional(),
253
253
  currency: zod.z.enum(generalCodes.CURRENCY_CODES),
254
254
  vs: zod.z.string().optional(),
255
255
  ss: zod.z.string().optional(),
@@ -1085,7 +1085,31 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
1085
1085
  return this.handleAction(
1086
1086
  null,
1087
1087
  { successMessage: "Bank accounts retrieved successfully" },
1088
- async () => await this._getAccounts()
1088
+ async () => {
1089
+ const accounts = await this._getAccounts();
1090
+ const accountsWithWorkflows = await Promise.all(
1091
+ accounts.map(async (a) => {
1092
+ let status;
1093
+ try {
1094
+ const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(a.id);
1095
+ status = await instance.status();
1096
+ } catch (_) {
1097
+ status = null;
1098
+ }
1099
+ return {
1100
+ ...a,
1101
+ workflow: status ? {
1102
+ instanceId: a.id,
1103
+ details: status
1104
+ } : null
1105
+ };
1106
+ })
1107
+ );
1108
+ return {
1109
+ accounts: accountsWithWorkflows,
1110
+ totalCount: accounts.length
1111
+ };
1112
+ }
1089
1113
  );
1090
1114
  }
1091
1115
  async updateAccount(input) {
@@ -1,10 +1,10 @@
1
1
  export { w as BankWorkflows } from '../shared/bank.CH22Zrdv.cjs';
2
2
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
3
- import { IRPCResponse } from '@develit-io/backend-sdk';
3
+ import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
- import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.BriEYREq.cjs';
7
- import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.DqRaP8LS.cjs';
6
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mub5_S4r.cjs';
7
+ import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.BQSnGZ-3.cjs';
8
8
  import { z } from 'zod';
9
9
  import * as drizzle_zod from 'drizzle-zod';
10
10
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
@@ -21,16 +21,16 @@ declare const sendPaymentInputSchema: z.ZodObject<{
21
21
  IFSC: "IFSC";
22
22
  DOMESTIC: "DOMESTIC";
23
23
  }>;
24
- chargeBearer: z.ZodEnum<{
24
+ chargeBearer: z.ZodOptional<z.ZodEnum<{
25
25
  SHA: "SHA";
26
26
  OUR: "OUR";
27
27
  BEN: "BEN";
28
- }>;
29
- executionDate: z.ZodString;
30
- instructionPriority: z.ZodEnum<{
28
+ }>>;
29
+ executionDate: z.ZodOptional<z.ZodString>;
30
+ instructionPriority: z.ZodOptional<z.ZodEnum<{
31
31
  NORM: "NORM";
32
32
  INST: "INST";
33
- }>;
33
+ }>>;
34
34
  currency: z.ZodEnum<{
35
35
  CZK: "CZK";
36
36
  EUR: "EUR";
@@ -1885,23 +1885,6 @@ declare const updateAccountInputSchema: z.ZodObject<{
1885
1885
  identity: undefined;
1886
1886
  generated: undefined;
1887
1887
  }, {}, {}>;
1888
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1889
- name: "sync";
1890
- tableName: "account";
1891
- dataType: "boolean";
1892
- columnType: "SQLiteBoolean";
1893
- data: boolean;
1894
- driverParam: number;
1895
- notNull: true;
1896
- hasDefault: true;
1897
- isPrimaryKey: false;
1898
- isAutoincrement: false;
1899
- hasRuntimeDefault: false;
1900
- enumValues: undefined;
1901
- baseColumn: never;
1902
- identity: undefined;
1903
- generated: undefined;
1904
- }, {}, {}>;
1905
1888
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1906
1889
  name: "sync_interval_s";
1907
1890
  tableName: "account";
@@ -2277,6 +2260,17 @@ declare const updateAccountInputSchema: z.ZodObject<{
2277
2260
  type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
2278
2261
  type UpdateAccountOutput = AccountSelectType;
2279
2262
 
2263
+ type AccountWithWorkflow = AccountSelectType & {
2264
+ workflow: {
2265
+ instanceId: string;
2266
+ details: WorkflowInstanceStatus;
2267
+ } | null;
2268
+ };
2269
+ type GetAccountsOutput = {
2270
+ accounts: AccountWithWorkflow[];
2271
+ totalCount: number;
2272
+ };
2273
+
2280
2274
  declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
2281
2275
  declare class BankServiceBase extends BankServiceBase_base {
2282
2276
  readonly db: DrizzleD1Database<typeof tables>;
@@ -2289,7 +2283,6 @@ declare class BankServiceBase extends BankServiceBase_base {
2289
2283
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
2290
2284
  bankRefId: string;
2291
2285
  batchSizeLimit: number;
2292
- sync: boolean;
2293
2286
  syncIntervalS: number;
2294
2287
  lastSyncedAt: Date | null;
2295
2288
  holderName: string;
@@ -2347,7 +2340,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2347
2340
  simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
2348
2341
  setLastSyncAt(input: SetLastSyncAtInput): Promise<IRPCResponse<SetLastSyncAtOutput>>;
2349
2342
  sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
2350
- getBankAccounts(): Promise<IRPCResponse<AccountSelectType[]>>;
2343
+ getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
2351
2344
  updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
2352
2345
  getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
2353
2346
  }
@@ -1,10 +1,10 @@
1
1
  export { w as BankWorkflows } from '../shared/bank.CH22Zrdv.mjs';
2
2
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
3
- import { IRPCResponse } from '@develit-io/backend-sdk';
3
+ import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
- import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.BriEYREq.mjs';
7
- import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.DSZbtb1J.mjs';
6
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mub5_S4r.mjs';
7
+ import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.DW3cHO1u.mjs';
8
8
  import { z } from 'zod';
9
9
  import * as drizzle_zod from 'drizzle-zod';
10
10
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
@@ -21,16 +21,16 @@ declare const sendPaymentInputSchema: z.ZodObject<{
21
21
  IFSC: "IFSC";
22
22
  DOMESTIC: "DOMESTIC";
23
23
  }>;
24
- chargeBearer: z.ZodEnum<{
24
+ chargeBearer: z.ZodOptional<z.ZodEnum<{
25
25
  SHA: "SHA";
26
26
  OUR: "OUR";
27
27
  BEN: "BEN";
28
- }>;
29
- executionDate: z.ZodString;
30
- instructionPriority: z.ZodEnum<{
28
+ }>>;
29
+ executionDate: z.ZodOptional<z.ZodString>;
30
+ instructionPriority: z.ZodOptional<z.ZodEnum<{
31
31
  NORM: "NORM";
32
32
  INST: "INST";
33
- }>;
33
+ }>>;
34
34
  currency: z.ZodEnum<{
35
35
  CZK: "CZK";
36
36
  EUR: "EUR";
@@ -1885,23 +1885,6 @@ declare const updateAccountInputSchema: z.ZodObject<{
1885
1885
  identity: undefined;
1886
1886
  generated: undefined;
1887
1887
  }, {}, {}>;
1888
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1889
- name: "sync";
1890
- tableName: "account";
1891
- dataType: "boolean";
1892
- columnType: "SQLiteBoolean";
1893
- data: boolean;
1894
- driverParam: number;
1895
- notNull: true;
1896
- hasDefault: true;
1897
- isPrimaryKey: false;
1898
- isAutoincrement: false;
1899
- hasRuntimeDefault: false;
1900
- enumValues: undefined;
1901
- baseColumn: never;
1902
- identity: undefined;
1903
- generated: undefined;
1904
- }, {}, {}>;
1905
1888
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1906
1889
  name: "sync_interval_s";
1907
1890
  tableName: "account";
@@ -2277,6 +2260,17 @@ declare const updateAccountInputSchema: z.ZodObject<{
2277
2260
  type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
2278
2261
  type UpdateAccountOutput = AccountSelectType;
2279
2262
 
2263
+ type AccountWithWorkflow = AccountSelectType & {
2264
+ workflow: {
2265
+ instanceId: string;
2266
+ details: WorkflowInstanceStatus;
2267
+ } | null;
2268
+ };
2269
+ type GetAccountsOutput = {
2270
+ accounts: AccountWithWorkflow[];
2271
+ totalCount: number;
2272
+ };
2273
+
2280
2274
  declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
2281
2275
  declare class BankServiceBase extends BankServiceBase_base {
2282
2276
  readonly db: DrizzleD1Database<typeof tables>;
@@ -2289,7 +2283,6 @@ declare class BankServiceBase extends BankServiceBase_base {
2289
2283
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
2290
2284
  bankRefId: string;
2291
2285
  batchSizeLimit: number;
2292
- sync: boolean;
2293
2286
  syncIntervalS: number;
2294
2287
  lastSyncedAt: Date | null;
2295
2288
  holderName: string;
@@ -2347,7 +2340,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2347
2340
  simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
2348
2341
  setLastSyncAt(input: SetLastSyncAtInput): Promise<IRPCResponse<SetLastSyncAtOutput>>;
2349
2342
  sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
2350
- getBankAccounts(): Promise<IRPCResponse<AccountSelectType[]>>;
2343
+ getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
2351
2344
  updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
2352
2345
  getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
2353
2346
  }
@@ -1,10 +1,10 @@
1
1
  export { w as BankWorkflows } from '../shared/bank.CH22Zrdv.js';
2
2
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
3
- import { IRPCResponse } from '@develit-io/backend-sdk';
3
+ import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
- import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.BriEYREq.js';
7
- import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.Ddhhr_rz.js';
6
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mub5_S4r.js';
7
+ import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.CouYVuOf.js';
8
8
  import { z } from 'zod';
9
9
  import * as drizzle_zod from 'drizzle-zod';
10
10
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
@@ -21,16 +21,16 @@ declare const sendPaymentInputSchema: z.ZodObject<{
21
21
  IFSC: "IFSC";
22
22
  DOMESTIC: "DOMESTIC";
23
23
  }>;
24
- chargeBearer: z.ZodEnum<{
24
+ chargeBearer: z.ZodOptional<z.ZodEnum<{
25
25
  SHA: "SHA";
26
26
  OUR: "OUR";
27
27
  BEN: "BEN";
28
- }>;
29
- executionDate: z.ZodString;
30
- instructionPriority: z.ZodEnum<{
28
+ }>>;
29
+ executionDate: z.ZodOptional<z.ZodString>;
30
+ instructionPriority: z.ZodOptional<z.ZodEnum<{
31
31
  NORM: "NORM";
32
32
  INST: "INST";
33
- }>;
33
+ }>>;
34
34
  currency: z.ZodEnum<{
35
35
  CZK: "CZK";
36
36
  EUR: "EUR";
@@ -1885,23 +1885,6 @@ declare const updateAccountInputSchema: z.ZodObject<{
1885
1885
  identity: undefined;
1886
1886
  generated: undefined;
1887
1887
  }, {}, {}>;
1888
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1889
- name: "sync";
1890
- tableName: "account";
1891
- dataType: "boolean";
1892
- columnType: "SQLiteBoolean";
1893
- data: boolean;
1894
- driverParam: number;
1895
- notNull: true;
1896
- hasDefault: true;
1897
- isPrimaryKey: false;
1898
- isAutoincrement: false;
1899
- hasRuntimeDefault: false;
1900
- enumValues: undefined;
1901
- baseColumn: never;
1902
- identity: undefined;
1903
- generated: undefined;
1904
- }, {}, {}>;
1905
1888
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1906
1889
  name: "sync_interval_s";
1907
1890
  tableName: "account";
@@ -2277,6 +2260,17 @@ declare const updateAccountInputSchema: z.ZodObject<{
2277
2260
  type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
2278
2261
  type UpdateAccountOutput = AccountSelectType;
2279
2262
 
2263
+ type AccountWithWorkflow = AccountSelectType & {
2264
+ workflow: {
2265
+ instanceId: string;
2266
+ details: WorkflowInstanceStatus;
2267
+ } | null;
2268
+ };
2269
+ type GetAccountsOutput = {
2270
+ accounts: AccountWithWorkflow[];
2271
+ totalCount: number;
2272
+ };
2273
+
2280
2274
  declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
2281
2275
  declare class BankServiceBase extends BankServiceBase_base {
2282
2276
  readonly db: DrizzleD1Database<typeof tables>;
@@ -2289,7 +2283,6 @@ declare class BankServiceBase extends BankServiceBase_base {
2289
2283
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
2290
2284
  bankRefId: string;
2291
2285
  batchSizeLimit: number;
2292
- sync: boolean;
2293
2286
  syncIntervalS: number;
2294
2287
  lastSyncedAt: Date | null;
2295
2288
  holderName: string;
@@ -2347,7 +2340,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2347
2340
  simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
2348
2341
  setLastSyncAt(input: SetLastSyncAtInput): Promise<IRPCResponse<SetLastSyncAtOutput>>;
2349
2342
  sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
2350
- getBankAccounts(): Promise<IRPCResponse<AccountSelectType[]>>;
2343
+ getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
2351
2344
  updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
2352
2345
  getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
2353
2346
  }
@@ -1,15 +1,15 @@
1
- import { g as getPaymentsByBankRefIdsQuery, u as updatePaymentCommand, c as createPaymentCommand, a as updateAccountLastSyncCommand, b as getCredentialsByAccountId, i as initiateConnector } from '../shared/bank.jyyw3_3-.mjs';
2
- export { w as BankWorkflows } from '../shared/bank.jyyw3_3-.mjs';
1
+ import { g as getPaymentsByBankRefIdsQuery, u as updatePaymentCommand, c as createPaymentCommand, a as updateAccountLastSyncCommand, b as getCredentialsByAccountId, i as initiateConnector } from '../shared/bank.DJ9d1yaR.mjs';
2
+ export { w as BankWorkflows } from '../shared/bank.DJ9d1yaR.mjs';
3
3
  import { uuidv4, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, first, action, service } from '@develit-io/backend-sdk';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { drizzle } from 'drizzle-orm/d1';
6
- import { t as tables, c as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, g as CONNECTOR_KEYS, B as BATCH_STATUSES, d as PAYMENT_STATUSES, e as PAYMENT_DIRECTIONS, i as accountInsertSchema, v as getPaymentDirection, M as MockConnector, F as FinbricksConnector, E as ErsteConnector } from '../shared/bank.CcKNlFRd.mjs';
6
+ import { t as tables, c as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, g as CONNECTOR_KEYS, B as BATCH_STATUSES, d as PAYMENT_STATUSES, e as PAYMENT_DIRECTIONS, i as accountInsertSchema, v as getPaymentDirection, M as MockConnector, F as FinbricksConnector, E as ErsteConnector } from '../shared/bank.RUV2HUFo.mjs';
7
7
  import 'jose';
8
8
  import { CURRENCY_CODES } from '@develit-io/general-codes';
9
9
  import { z } from 'zod';
10
10
  import { eq, inArray, and, sql, asc, desc, gte, lte } from 'drizzle-orm';
11
11
  import 'cloudflare:workflows';
12
- import '../shared/bank.B72e0ibs.mjs';
12
+ import '../shared/bank.8lAQLFNI.mjs';
13
13
  import 'drizzle-orm/sqlite-core';
14
14
  import 'date-fns';
15
15
  import 'drizzle-zod';
@@ -246,9 +246,9 @@ const sendPaymentInputSchema = z.object({
246
246
  refId: z.string(),
247
247
  amount: z.number().positive(),
248
248
  paymentType: z.enum(PAYMENT_TYPES),
249
- chargeBearer: z.enum(CHARGE_BEARERS),
250
- executionDate: z.string(),
251
- instructionPriority: z.enum(INSTRUCTION_PRIORITIES),
249
+ chargeBearer: z.enum(CHARGE_BEARERS).optional(),
250
+ executionDate: z.string().optional(),
251
+ instructionPriority: z.enum(INSTRUCTION_PRIORITIES).optional(),
252
252
  currency: z.enum(CURRENCY_CODES),
253
253
  vs: z.string().optional(),
254
254
  ss: z.string().optional(),
@@ -1084,7 +1084,31 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
1084
1084
  return this.handleAction(
1085
1085
  null,
1086
1086
  { successMessage: "Bank accounts retrieved successfully" },
1087
- async () => await this._getAccounts()
1087
+ async () => {
1088
+ const accounts = await this._getAccounts();
1089
+ const accountsWithWorkflows = await Promise.all(
1090
+ accounts.map(async (a) => {
1091
+ let status;
1092
+ try {
1093
+ const instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(a.id);
1094
+ status = await instance.status();
1095
+ } catch (_) {
1096
+ status = null;
1097
+ }
1098
+ return {
1099
+ ...a,
1100
+ workflow: status ? {
1101
+ instanceId: a.id,
1102
+ details: status
1103
+ } : null
1104
+ };
1105
+ })
1106
+ );
1107
+ return {
1108
+ accounts: accountsWithWorkflows,
1109
+ totalCount: accounts.length
1110
+ };
1111
+ }
1088
1112
  );
1089
1113
  }
1090
1114
  async updateAccount(input) {
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const export_workflows = require('../shared/bank.GMK4QNvo.cjs');
3
+ const export_workflows = require('../shared/bank.DOJ8gbXQ.cjs');
4
4
  require('cloudflare:workers');
5
5
  require('cloudflare:workflows');
6
6
  require('drizzle-orm/d1');
7
- require('../shared/bank.3YYIj-n6.cjs');
7
+ require('../shared/bank.UfRkUN2y.cjs');
8
8
  require('@develit-io/backend-sdk');
9
9
  require('drizzle-orm/sqlite-core');
10
10
  require('date-fns');
@@ -14,7 +14,7 @@ require('zod');
14
14
  require('jose');
15
15
  require('drizzle-zod');
16
16
  require('drizzle-orm/relations');
17
- require('../shared/bank.BgpXGC_1.cjs');
17
+ require('../shared/bank.DISsqBb6.cjs');
18
18
 
19
19
 
20
20
 
@@ -1,8 +1,8 @@
1
- export { S as SyncAccountPaymentsWorkflow } from '../shared/bank.jyyw3_3-.mjs';
1
+ export { S as SyncAccountPaymentsWorkflow } from '../shared/bank.DJ9d1yaR.mjs';
2
2
  import 'cloudflare:workers';
3
3
  import 'cloudflare:workflows';
4
4
  import 'drizzle-orm/d1';
5
- import '../shared/bank.CcKNlFRd.mjs';
5
+ import '../shared/bank.RUV2HUFo.mjs';
6
6
  import '@develit-io/backend-sdk';
7
7
  import 'drizzle-orm/sqlite-core';
8
8
  import 'date-fns';
@@ -12,4 +12,4 @@ import 'zod';
12
12
  import 'jose';
13
13
  import 'drizzle-zod';
14
14
  import 'drizzle-orm/relations';
15
- import '../shared/bank.B72e0ibs.mjs';
15
+ import '../shared/bank.8lAQLFNI.mjs';
@@ -1,4 +1,4 @@
1
- import { F as FinbricksConnector } from './bank.CcKNlFRd.mjs';
1
+ import { F as FinbricksConnector } from './bank.RUV2HUFo.mjs';
2
2
 
3
3
  class MockCobsConnector extends FinbricksConnector {
4
4
  constructor(config) {
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { DrizzleD1Database } from 'drizzle-orm/d1';
3
- import { a as PaymentInsertType, t as tables } from './bank.BriEYREq.js';
3
+ import { a as PaymentInsertType, t as tables } from './bank.mub5_S4r.cjs';
4
4
  import { CURRENCY_CODES, BANK_CODES, CODES } from '@develit-io/general-codes';
5
5
  import { z } from 'zod';
6
6
  import * as drizzle_zod from 'drizzle-zod';
@@ -204,23 +204,6 @@ declare const accountInsertSchema: drizzle_zod.BuildSchema<"insert", {
204
204
  identity: undefined;
205
205
  generated: undefined;
206
206
  }, {}, {}>;
207
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
208
- name: "sync";
209
- tableName: "account";
210
- dataType: "boolean";
211
- columnType: "SQLiteBoolean";
212
- data: boolean;
213
- driverParam: number;
214
- notNull: true;
215
- hasDefault: true;
216
- isPrimaryKey: false;
217
- isAutoincrement: false;
218
- hasRuntimeDefault: false;
219
- enumValues: undefined;
220
- baseColumn: never;
221
- identity: undefined;
222
- generated: undefined;
223
- }, {}, {}>;
224
207
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
225
208
  name: "sync_interval_s";
226
209
  tableName: "account";
@@ -669,23 +652,6 @@ declare const accountUpdateSchema: drizzle_zod.BuildSchema<"update", {
669
652
  identity: undefined;
670
653
  generated: undefined;
671
654
  }, {}, {}>;
672
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
673
- name: "sync";
674
- tableName: "account";
675
- dataType: "boolean";
676
- columnType: "SQLiteBoolean";
677
- data: boolean;
678
- driverParam: number;
679
- notNull: true;
680
- hasDefault: true;
681
- isPrimaryKey: false;
682
- isAutoincrement: false;
683
- hasRuntimeDefault: false;
684
- enumValues: undefined;
685
- baseColumn: never;
686
- identity: undefined;
687
- generated: undefined;
688
- }, {}, {}>;
689
655
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
690
656
  name: "sync_interval_s";
691
657
  tableName: "account";
@@ -1134,23 +1100,6 @@ declare const accountSelectSchema: drizzle_zod.BuildSchema<"select", {
1134
1100
  identity: undefined;
1135
1101
  generated: undefined;
1136
1102
  }, {}, {}>;
1137
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1138
- name: "sync";
1139
- tableName: "account";
1140
- dataType: "boolean";
1141
- columnType: "SQLiteBoolean";
1142
- data: boolean;
1143
- driverParam: number;
1144
- notNull: true;
1145
- hasDefault: true;
1146
- isPrimaryKey: false;
1147
- isAutoincrement: false;
1148
- hasRuntimeDefault: false;
1149
- enumValues: undefined;
1150
- baseColumn: never;
1151
- identity: undefined;
1152
- generated: undefined;
1153
- }, {}, {}>;
1154
1103
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1155
1104
  name: "sync_interval_s";
1156
1105
  tableName: "account";
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { DrizzleD1Database } from 'drizzle-orm/d1';
3
- import { a as PaymentInsertType, t as tables } from './bank.BriEYREq.cjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.mub5_S4r.js';
4
4
  import { CURRENCY_CODES, BANK_CODES, CODES } from '@develit-io/general-codes';
5
5
  import { z } from 'zod';
6
6
  import * as drizzle_zod from 'drizzle-zod';
@@ -204,23 +204,6 @@ declare const accountInsertSchema: drizzle_zod.BuildSchema<"insert", {
204
204
  identity: undefined;
205
205
  generated: undefined;
206
206
  }, {}, {}>;
207
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
208
- name: "sync";
209
- tableName: "account";
210
- dataType: "boolean";
211
- columnType: "SQLiteBoolean";
212
- data: boolean;
213
- driverParam: number;
214
- notNull: true;
215
- hasDefault: true;
216
- isPrimaryKey: false;
217
- isAutoincrement: false;
218
- hasRuntimeDefault: false;
219
- enumValues: undefined;
220
- baseColumn: never;
221
- identity: undefined;
222
- generated: undefined;
223
- }, {}, {}>;
224
207
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
225
208
  name: "sync_interval_s";
226
209
  tableName: "account";
@@ -669,23 +652,6 @@ declare const accountUpdateSchema: drizzle_zod.BuildSchema<"update", {
669
652
  identity: undefined;
670
653
  generated: undefined;
671
654
  }, {}, {}>;
672
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
673
- name: "sync";
674
- tableName: "account";
675
- dataType: "boolean";
676
- columnType: "SQLiteBoolean";
677
- data: boolean;
678
- driverParam: number;
679
- notNull: true;
680
- hasDefault: true;
681
- isPrimaryKey: false;
682
- isAutoincrement: false;
683
- hasRuntimeDefault: false;
684
- enumValues: undefined;
685
- baseColumn: never;
686
- identity: undefined;
687
- generated: undefined;
688
- }, {}, {}>;
689
655
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
690
656
  name: "sync_interval_s";
691
657
  tableName: "account";
@@ -1134,23 +1100,6 @@ declare const accountSelectSchema: drizzle_zod.BuildSchema<"select", {
1134
1100
  identity: undefined;
1135
1101
  generated: undefined;
1136
1102
  }, {}, {}>;
1137
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1138
- name: "sync";
1139
- tableName: "account";
1140
- dataType: "boolean";
1141
- columnType: "SQLiteBoolean";
1142
- data: boolean;
1143
- driverParam: number;
1144
- notNull: true;
1145
- hasDefault: true;
1146
- isPrimaryKey: false;
1147
- isAutoincrement: false;
1148
- hasRuntimeDefault: false;
1149
- enumValues: undefined;
1150
- baseColumn: never;
1151
- identity: undefined;
1152
- generated: undefined;
1153
- }, {}, {}>;
1154
1103
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1155
1104
  name: "sync_interval_s";
1156
1105
  tableName: "account";
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('./bank.3YYIj-n6.cjs');
3
+ const database_schema = require('./bank.UfRkUN2y.cjs');
4
4
 
5
5
  class MockCobsConnector extends database_schema.FinbricksConnector {
6
6
  constructor(config) {
@@ -1,10 +1,10 @@
1
1
  import { WorkflowEntrypoint } from 'cloudflare:workers';
2
2
  import { NonRetryableError } from 'cloudflare:workflows';
3
3
  import { drizzle } from 'drizzle-orm/d1';
4
- import { t as tables, F as FinbricksConnector, M as MockConnector, E as ErsteConnector, v as getPaymentDirection } from './bank.CcKNlFRd.mjs';
4
+ import { t as tables, F as FinbricksConnector, M as MockConnector, E as ErsteConnector, v as getPaymentDirection } from './bank.RUV2HUFo.mjs';
5
5
  import '@develit-io/backend-sdk';
6
6
  import { eq, inArray } from 'drizzle-orm';
7
- import { M as MockCobsConnector } from './bank.B72e0ibs.mjs';
7
+ import { M as MockCobsConnector } from './bank.8lAQLFNI.mjs';
8
8
  import 'jose';
9
9
  import '@develit-io/general-codes';
10
10
 
@@ -136,7 +136,9 @@ class SyncAccountPaymentsWorkflow extends WorkflowEntrypoint {
136
136
  return account2;
137
137
  });
138
138
  if (!account.lastSyncedAt) {
139
- return { status: "skipped_no_last_sync" };
139
+ throw new NonRetryableError(
140
+ `lastSyncedAt is not set for account: ${accountId}`
141
+ );
140
142
  }
141
143
  const credentials = await step.do(
142
144
  "load account credentials",
@@ -3,10 +3,10 @@
3
3
  const cloudflare_workers = require('cloudflare:workers');
4
4
  const cloudflare_workflows = require('cloudflare:workflows');
5
5
  const d1 = require('drizzle-orm/d1');
6
- const database_schema = require('./bank.3YYIj-n6.cjs');
6
+ const database_schema = require('./bank.UfRkUN2y.cjs');
7
7
  require('@develit-io/backend-sdk');
8
8
  const drizzleOrm = require('drizzle-orm');
9
- const mockCobs_connector = require('./bank.BgpXGC_1.cjs');
9
+ const mockCobs_connector = require('./bank.DISsqBb6.cjs');
10
10
  require('jose');
11
11
  require('@develit-io/general-codes');
12
12
 
@@ -138,7 +138,9 @@ class SyncAccountPaymentsWorkflow extends cloudflare_workers.WorkflowEntrypoint
138
138
  return account2;
139
139
  });
140
140
  if (!account.lastSyncedAt) {
141
- return { status: "skipped_no_last_sync" };
141
+ throw new cloudflare_workflows.NonRetryableError(
142
+ `lastSyncedAt is not set for account: ${accountId}`
143
+ );
142
144
  }
143
145
  const credentials = await step.do(
144
146
  "load account credentials",
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { DrizzleD1Database } from 'drizzle-orm/d1';
3
- import { a as PaymentInsertType, t as tables } from './bank.BriEYREq.mjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.mub5_S4r.mjs';
4
4
  import { CURRENCY_CODES, BANK_CODES, CODES } from '@develit-io/general-codes';
5
5
  import { z } from 'zod';
6
6
  import * as drizzle_zod from 'drizzle-zod';
@@ -204,23 +204,6 @@ declare const accountInsertSchema: drizzle_zod.BuildSchema<"insert", {
204
204
  identity: undefined;
205
205
  generated: undefined;
206
206
  }, {}, {}>;
207
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
208
- name: "sync";
209
- tableName: "account";
210
- dataType: "boolean";
211
- columnType: "SQLiteBoolean";
212
- data: boolean;
213
- driverParam: number;
214
- notNull: true;
215
- hasDefault: true;
216
- isPrimaryKey: false;
217
- isAutoincrement: false;
218
- hasRuntimeDefault: false;
219
- enumValues: undefined;
220
- baseColumn: never;
221
- identity: undefined;
222
- generated: undefined;
223
- }, {}, {}>;
224
207
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
225
208
  name: "sync_interval_s";
226
209
  tableName: "account";
@@ -669,23 +652,6 @@ declare const accountUpdateSchema: drizzle_zod.BuildSchema<"update", {
669
652
  identity: undefined;
670
653
  generated: undefined;
671
654
  }, {}, {}>;
672
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
673
- name: "sync";
674
- tableName: "account";
675
- dataType: "boolean";
676
- columnType: "SQLiteBoolean";
677
- data: boolean;
678
- driverParam: number;
679
- notNull: true;
680
- hasDefault: true;
681
- isPrimaryKey: false;
682
- isAutoincrement: false;
683
- hasRuntimeDefault: false;
684
- enumValues: undefined;
685
- baseColumn: never;
686
- identity: undefined;
687
- generated: undefined;
688
- }, {}, {}>;
689
655
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
690
656
  name: "sync_interval_s";
691
657
  tableName: "account";
@@ -1134,23 +1100,6 @@ declare const accountSelectSchema: drizzle_zod.BuildSchema<"select", {
1134
1100
  identity: undefined;
1135
1101
  generated: undefined;
1136
1102
  }, {}, {}>;
1137
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1138
- name: "sync";
1139
- tableName: "account";
1140
- dataType: "boolean";
1141
- columnType: "SQLiteBoolean";
1142
- data: boolean;
1143
- driverParam: number;
1144
- notNull: true;
1145
- hasDefault: true;
1146
- isPrimaryKey: false;
1147
- isAutoincrement: false;
1148
- hasRuntimeDefault: false;
1149
- enumValues: undefined;
1150
- baseColumn: never;
1151
- identity: undefined;
1152
- generated: undefined;
1153
- }, {}, {}>;
1154
1103
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1155
1104
  name: "sync_interval_s";
1156
1105
  tableName: "account";
@@ -229,7 +229,6 @@ const mapFinbricksAccountInsert = ({
229
229
  bankRefId: account.bankRefId,
230
230
  connectorKey,
231
231
  status,
232
- sync: false,
233
232
  currency: account.currency,
234
233
  number: account.identification.accountNumber,
235
234
  bankCode: account.servicer.bankCode,
@@ -1116,7 +1115,6 @@ const account = sqliteTable(
1116
1115
  status: text("status", { enum: ACCOUNT_STATUSES }).$type().notNull(),
1117
1116
  bankRefId: text("bank_ref_id").notNull(),
1118
1117
  batchSizeLimit: integer("batch_size_limit").notNull().default(50),
1119
- sync: integer("sync", { mode: "boolean" }).default(false).notNull(),
1120
1118
  syncIntervalS: integer("sync_interval_s").notNull().default(600),
1121
1119
  lastSyncedAt: integer("last_synced_at", { mode: "timestamp_ms" })
1122
1120
  },
@@ -231,7 +231,6 @@ const mapFinbricksAccountInsert = ({
231
231
  bankRefId: account.bankRefId,
232
232
  connectorKey,
233
233
  status,
234
- sync: false,
235
234
  currency: account.currency,
236
235
  number: account.identification.accountNumber,
237
236
  bankCode: account.servicer.bankCode,
@@ -1118,7 +1117,6 @@ const account = sqliteCore.sqliteTable(
1118
1117
  status: sqliteCore.text("status", { enum: ACCOUNT_STATUSES }).$type().notNull(),
1119
1118
  bankRefId: sqliteCore.text("bank_ref_id").notNull(),
1120
1119
  batchSizeLimit: sqliteCore.integer("batch_size_limit").notNull().default(50),
1121
- sync: sqliteCore.integer("sync", { mode: "boolean" }).default(false).notNull(),
1122
1120
  syncIntervalS: sqliteCore.integer("sync_interval_s").notNull().default(600),
1123
1121
  lastSyncedAt: sqliteCore.integer("last_synced_at", { mode: "timestamp_ms" })
1124
1122
  },
@@ -1024,23 +1024,6 @@ declare const account: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1024
1024
  identity: undefined;
1025
1025
  generated: undefined;
1026
1026
  }, {}, {}>;
1027
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1028
- name: "sync";
1029
- tableName: "account";
1030
- dataType: "boolean";
1031
- columnType: "SQLiteBoolean";
1032
- data: boolean;
1033
- driverParam: number;
1034
- notNull: true;
1035
- hasDefault: true;
1036
- isPrimaryKey: false;
1037
- isAutoincrement: false;
1038
- hasRuntimeDefault: false;
1039
- enumValues: undefined;
1040
- baseColumn: never;
1041
- identity: undefined;
1042
- generated: undefined;
1043
- }, {}, {}>;
1044
1027
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1045
1028
  name: "sync_interval_s";
1046
1029
  tableName: "account";
@@ -1024,23 +1024,6 @@ declare const account: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1024
1024
  identity: undefined;
1025
1025
  generated: undefined;
1026
1026
  }, {}, {}>;
1027
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1028
- name: "sync";
1029
- tableName: "account";
1030
- dataType: "boolean";
1031
- columnType: "SQLiteBoolean";
1032
- data: boolean;
1033
- driverParam: number;
1034
- notNull: true;
1035
- hasDefault: true;
1036
- isPrimaryKey: false;
1037
- isAutoincrement: false;
1038
- hasRuntimeDefault: false;
1039
- enumValues: undefined;
1040
- baseColumn: never;
1041
- identity: undefined;
1042
- generated: undefined;
1043
- }, {}, {}>;
1044
1027
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1045
1028
  name: "sync_interval_s";
1046
1029
  tableName: "account";
@@ -1024,23 +1024,6 @@ declare const account: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1024
1024
  identity: undefined;
1025
1025
  generated: undefined;
1026
1026
  }, {}, {}>;
1027
- sync: drizzle_orm_sqlite_core.SQLiteColumn<{
1028
- name: "sync";
1029
- tableName: "account";
1030
- dataType: "boolean";
1031
- columnType: "SQLiteBoolean";
1032
- data: boolean;
1033
- driverParam: number;
1034
- notNull: true;
1035
- hasDefault: true;
1036
- isPrimaryKey: false;
1037
- isAutoincrement: false;
1038
- hasRuntimeDefault: false;
1039
- enumValues: undefined;
1040
- baseColumn: never;
1041
- identity: undefined;
1042
- generated: undefined;
1043
- }, {}, {}>;
1044
1027
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
1045
1028
  name: "sync_interval_s";
1046
1029
  tableName: "account";
package/dist/types.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('./shared/bank.3YYIj-n6.cjs');
4
- const mockCobs_connector = require('./shared/bank.BgpXGC_1.cjs');
3
+ const database_schema = require('./shared/bank.UfRkUN2y.cjs');
4
+ const mockCobs_connector = require('./shared/bank.DISsqBb6.cjs');
5
5
  const generalCodes = require('@develit-io/general-codes');
6
6
  require('@develit-io/backend-sdk');
7
7
  require('drizzle-orm/sqlite-core');
package/dist/types.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.DqRaP8LS.cjs';
2
- export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.DqRaP8LS.cjs';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.BriEYREq.cjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.BriEYREq.cjs';
1
+ import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.BQSnGZ-3.cjs';
2
+ export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.BQSnGZ-3.cjs';
3
+ import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.mub5_S4r.cjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mub5_S4r.cjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.cjs';
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.DSZbtb1J.mjs';
2
- export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.DSZbtb1J.mjs';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.BriEYREq.mjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.BriEYREq.mjs';
1
+ import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.DW3cHO1u.mjs';
2
+ export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.DW3cHO1u.mjs';
3
+ import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.mub5_S4r.mjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mub5_S4r.mjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.mjs';
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.Ddhhr_rz.js';
2
- export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.Ddhhr_rz.js';
3
- import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.BriEYREq.js';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.BriEYREq.js';
1
+ import { I as IBankConnector, b as IncomingPaymentMessage, c as InitiatedPayment, a as ConnectorKey, d as ConnectedAccount, e as AccountCredentialsInsertType, f as AccountInsertType, P as PaymentPreparedInsertType, g as InitiatedBatch, B as BatchMetadata, A as AccountSelectType, h as PaymentStatus, i as BatchStatus, j as CurrencyCode, k as BankCode, l as CountryCode, m as AuthInput, n as Currency } from './shared/bank.CouYVuOf.js';
2
+ export { D as ACCOUNT_STATUSES, Y as AccountCredentialsPatchType, Z as AccountCredentialsSelectType, X as AccountCredentialsUpdateType, S as AccountPatchType, E as AccountStatus, R as AccountUpdateType, q as BATCH_STATUES, q as BATCH_STATUSES, G as BankAccountWithLastSync, t as CHARGE_BEARERS, H as CONNECTOR_KEYS, F as COUNTRY_CODES, J as CREDENTIALS_TYPES, u as ChargeBearer, C as ConfigEnvironmentBank, K as CredentialsType, v as INSTRUCTION_PRIORITIES, w as InstructionPriority, O as OutgoingPaymentMessage, y as PAYMENT_DIRECTIONS, x as PAYMENT_STATUSES, r as PAYMENT_TYPES, z as PaymentDirection, o as PaymentFailedInsertType, s as PaymentType, T as TOKEN_TYPES, L as TokenType, U as accountCredentialsInsertSchema, W as accountCredentialsSelectSchema, V as accountCredentialsUpdateSchema, M as accountInsertSchema, Q as accountSelectSchema, N as accountUpdateSchema, p as paymentInitializedInsertType } from './shared/bank.CouYVuOf.js';
3
+ import { a as PaymentInsertType, t as tables, P as PaymentSelectType } from './shared/bank.mub5_S4r.js';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mub5_S4r.js';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.js';
package/dist/types.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, g as CONNECTOR_KEYS, f as COUNTRY_CODES, h as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, c as INSTRUCTION_PRIORITIES, M as MockConnector, e as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, l as accountCredentialsInsertSchema, n as accountCredentialsSelectSchema, m as accountCredentialsUpdateSchema, i as accountInsertSchema, k as accountSelectSchema, j as accountUpdateSchema, o as ottInsertSchema, r as ottSelectSchema, q as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.CcKNlFRd.mjs';
2
- export { M as MockCobsConnector } from './shared/bank.B72e0ibs.mjs';
1
+ export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, g as CONNECTOR_KEYS, f as COUNTRY_CODES, h as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, c as INSTRUCTION_PRIORITIES, M as MockConnector, e as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, l as accountCredentialsInsertSchema, n as accountCredentialsSelectSchema, m as accountCredentialsUpdateSchema, i as accountInsertSchema, k as accountSelectSchema, j as accountUpdateSchema, o as ottInsertSchema, r as ottSelectSchema, q as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.RUV2HUFo.mjs';
2
+ export { M as MockCobsConnector } from './shared/bank.8lAQLFNI.mjs';
3
3
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
4
4
  import '@develit-io/backend-sdk';
5
5
  import 'drizzle-orm/sqlite-core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {