@develit-services/bank 0.0.17 → 0.0.19

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 (34) 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 +21 -29
  7. package/dist/export/worker.d.cts +3 -3
  8. package/dist/export/worker.d.mts +3 -3
  9. package/dist/export/worker.d.ts +3 -3
  10. package/dist/export/worker.mjs +21 -29
  11. package/dist/export/wrangler.cjs +2 -1
  12. package/dist/export/wrangler.d.cts +2 -1
  13. package/dist/export/wrangler.d.mts +2 -1
  14. package/dist/export/wrangler.d.ts +2 -1
  15. package/dist/export/wrangler.mjs +2 -1
  16. package/dist/shared/{bank.DkD_K2Pp.d.mts → bank.C8aShbaN.d.mts} +1 -1
  17. package/dist/shared/{bank.Bgq67An_.mjs → bank.C9jAvwna.mjs} +1 -1
  18. package/dist/shared/{bank.CJFy17-g.d.cts → bank.CEZKAEiY.d.cts} +1 -0
  19. package/dist/shared/{bank.CJFy17-g.d.mts → bank.CEZKAEiY.d.mts} +1 -0
  20. package/dist/shared/{bank.CJFy17-g.d.ts → bank.CEZKAEiY.d.ts} +1 -0
  21. package/dist/shared/{bank.4vcryDK5.mjs → bank.CNpjRxvL.mjs} +1 -1
  22. package/dist/shared/{bank.C9Yr7ASx.cjs → bank.DQn99N-C.cjs} +1 -1
  23. package/dist/shared/{bank.Docz6If9.cjs → bank.P9gDUycr.cjs} +1 -1
  24. package/dist/shared/{bank.DnUXZU3A.d.cts → bank.TyzHNrzR.d.cts} +1 -1
  25. package/dist/shared/{bank.CYP8KnoM.d.cts → bank.mGCkS7Y9.d.cts} +16 -16
  26. package/dist/shared/{bank.CYP8KnoM.d.mts → bank.mGCkS7Y9.d.mts} +16 -16
  27. package/dist/shared/{bank.CYP8KnoM.d.ts → bank.mGCkS7Y9.d.ts} +16 -16
  28. package/dist/shared/{bank.BTiCct5w.d.ts → bank.zK_DX1oe.d.ts} +1 -1
  29. package/dist/types.cjs +2 -2
  30. package/dist/types.d.cts +5 -5
  31. package/dist/types.d.mts +5 -5
  32. package/dist/types.d.ts +5 -5
  33. package/dist/types.mjs +2 -2
  34. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('../shared/bank.Docz6If9.cjs');
3
+ const database_schema = require('../shared/bank.P9gDUycr.cjs');
4
4
  require('@develit-io/backend-sdk');
5
5
  require('drizzle-orm/sqlite-core');
6
6
  require('drizzle-orm/relations');
@@ -1,4 +1,4 @@
1
- export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.CYP8KnoM.cjs';
1
+ export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.mGCkS7Y9.cjs';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.CYP8KnoM.mjs';
1
+ export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.mGCkS7Y9.mjs';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.CYP8KnoM.js';
1
+ export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.mGCkS7Y9.js';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { b as batch, o as ott, p as payment, a as paymentRelations } from '../shared/bank.Bgq67An_.mjs';
1
+ export { b as batch, o as ott, p as payment, a as paymentRelations } from '../shared/bank.C9jAvwna.mjs';
2
2
  import '@develit-io/backend-sdk';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import 'drizzle-orm/relations';
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
- const db = require('../shared/bank.C9Yr7ASx.cjs');
6
+ const db = require('../shared/bank.DQn99N-C.cjs');
7
7
  const cloudflare_workers = require('cloudflare:workers');
8
8
  const d1 = require('drizzle-orm/d1');
9
9
  const zod = require('zod');
10
10
  const generalCodes = require('@develit-io/general-codes');
11
- const database_schema = require('../shared/bank.Docz6If9.cjs');
11
+ const database_schema = require('../shared/bank.P9gDUycr.cjs');
12
12
  require('jose');
13
13
  const drizzleOrm = require('drizzle-orm');
14
14
  const superjson = require('superjson');
@@ -135,10 +135,6 @@ const getOpenBatchByAccountIdQuery = async (db$1, { accountId }) => {
135
135
  return batch;
136
136
  };
137
137
 
138
- const getAllOpenBatchesQuery = async (db$1) => {
139
- return await db$1.select().from(db.tables.batch).where(drizzleOrm.eq(db.tables.batch.status, "OPEN"));
140
- };
141
-
142
138
  const getPaymentsByBankRefIdsQuery = async (db$1, { ids }) => {
143
139
  return await db$1.select().from(db.tables.payment).where(drizzleOrm.inArray(db.tables.payment.bankRefId, ids));
144
140
  };
@@ -331,28 +327,6 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
331
327
  });
332
328
  }
333
329
  async scheduled(controller) {
334
- if (controller.cron === this.env.CRON_BATCHES_PROCESSING) {
335
- console.log("Scheduled CRON batches processing");
336
- const openBatches = await getAllOpenBatchesQuery(this.db);
337
- if (!openBatches.length) return;
338
- for (const batch of openBatches) {
339
- const connectorKey = this.accounts.find(
340
- (acc) => acc.id === batch.accountId
341
- )?.connectorKey;
342
- if (!connectorKey) {
343
- this.logError({
344
- message: "Failed to find connector key",
345
- batch,
346
- connectorKey
347
- });
348
- continue;
349
- }
350
- await this.processBatch({
351
- batch,
352
- connectorKey
353
- });
354
- }
355
- }
356
330
  if (controller.cron === this.env.CRON_PAYMENTS_PROCESSING) {
357
331
  console.log("Scheduled CRON payments processing");
358
332
  await this.syncAccounts();
@@ -481,6 +455,12 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
481
455
  }).command.execute();
482
456
  await this.initiateBankConnector({ connectorKey });
483
457
  if (!this.bankConnector) {
458
+ await upsertBatchCommand(this.db, {
459
+ batch: {
460
+ ...batch,
461
+ status: "FAILED"
462
+ }
463
+ }).command.execute();
484
464
  throw backendSdk.createInternalError(null, {
485
465
  message: `\u274C Failed to initialize ${connectorKey} bank connector`
486
466
  });
@@ -522,6 +502,12 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
522
502
  (p) => createPaymentCommand(this.db, { payment: p }).command.execute()
523
503
  )
524
504
  ]);
505
+ await upsertBatchCommand(this.db, {
506
+ batch: {
507
+ ...batch,
508
+ status: "PREPARED"
509
+ }
510
+ }).command.execute();
525
511
  const { authorizationUrls, payments, metadata } = await this.bankConnector.initiateBatchFromPayments({
526
512
  payments: [
527
513
  ...preparedBatch.newlyPreparedPayments,
@@ -530,6 +516,12 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
530
516
  });
531
517
  if (!authorizationUrls) {
532
518
  this.logError({ message: "Failed to retrieve signing URI" });
519
+ await upsertBatchCommand(this.db, {
520
+ batch: {
521
+ ...batch,
522
+ status: "FAILED"
523
+ }
524
+ }).command.execute();
533
525
  return;
534
526
  }
535
527
  const { command: upsertBatch } = upsertBatchCommand(this.db, {
@@ -556,7 +548,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
556
548
  type: "email",
557
549
  payload: {
558
550
  email: {
559
- to: ["petr@develit.io"],
551
+ to: [this.env.BANK_AUTH_RECIPIENT],
560
552
  subject: "Payment Authorization",
561
553
  text: authorizationUrls[0] || "No Authorization Url"
562
554
  }
@@ -1,10 +1,10 @@
1
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
2
  import { IRPCResponse } from '@develit-io/backend-sdk';
3
- import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.CYP8KnoM.cjs';
3
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mGCkS7Y9.cjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import { z } from 'zod';
7
- import { C as ConfigEnvironmentBankAccount, I as IBankConnector, a as ConfigBankAccount, b as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.DnUXZU3A.cjs';
7
+ import { C as ConfigEnvironmentBankAccount, I as IBankConnector, a as ConfigBankAccount, b as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.TyzHNrzR.cjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'drizzle-orm';
10
10
  import '@develit-io/general-codes';
@@ -226,10 +226,10 @@ declare class BankServiceBase extends BankServiceBase_base {
226
226
  addPaymentsToBatch({ paymentsToBatch, }: {
227
227
  paymentsToBatch: SendPaymentInput[];
228
228
  }): Promise<IRPCResponse<{
229
- status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
230
229
  batchPaymentInitiatedAt: Date | null;
231
230
  authorizationUrls: string | string[] | null;
232
231
  accountId: string | null;
232
+ status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
233
233
  payments: PaymentInsertType[];
234
234
  metadata: object | null;
235
235
  id: string;
@@ -1,10 +1,10 @@
1
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
2
  import { IRPCResponse } from '@develit-io/backend-sdk';
3
- import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.CYP8KnoM.mjs';
3
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mGCkS7Y9.mjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import { z } from 'zod';
7
- import { C as ConfigEnvironmentBankAccount, I as IBankConnector, a as ConfigBankAccount, b as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.DkD_K2Pp.mjs';
7
+ import { C as ConfigEnvironmentBankAccount, I as IBankConnector, a as ConfigBankAccount, b as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.C8aShbaN.mjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'drizzle-orm';
10
10
  import '@develit-io/general-codes';
@@ -226,10 +226,10 @@ declare class BankServiceBase extends BankServiceBase_base {
226
226
  addPaymentsToBatch({ paymentsToBatch, }: {
227
227
  paymentsToBatch: SendPaymentInput[];
228
228
  }): Promise<IRPCResponse<{
229
- status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
230
229
  batchPaymentInitiatedAt: Date | null;
231
230
  authorizationUrls: string | string[] | null;
232
231
  accountId: string | null;
232
+ status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
233
233
  payments: PaymentInsertType[];
234
234
  metadata: object | null;
235
235
  id: string;
@@ -1,10 +1,10 @@
1
1
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
2
2
  import { IRPCResponse } from '@develit-io/backend-sdk';
3
- import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.CYP8KnoM.js';
3
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mGCkS7Y9.js';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import { z } from 'zod';
7
- import { C as ConfigEnvironmentBankAccount, I as IBankConnector, a as ConfigBankAccount, b as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.BTiCct5w.js';
7
+ import { C as ConfigEnvironmentBankAccount, I as IBankConnector, a as ConfigBankAccount, b as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.zK_DX1oe.js';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'drizzle-orm';
10
10
  import '@develit-io/general-codes';
@@ -226,10 +226,10 @@ declare class BankServiceBase extends BankServiceBase_base {
226
226
  addPaymentsToBatch({ paymentsToBatch, }: {
227
227
  paymentsToBatch: SendPaymentInput[];
228
228
  }): Promise<IRPCResponse<{
229
- status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
230
229
  batchPaymentInitiatedAt: Date | null;
231
230
  authorizationUrls: string | string[] | null;
232
231
  accountId: string | null;
232
+ status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
233
233
  payments: PaymentInsertType[];
234
234
  metadata: object | null;
235
235
  id: string;
@@ -1,10 +1,10 @@
1
1
  import { uuidv4, useResult, createInternalError, develitWorker, first, RPCResponse, action, service } from '@develit-io/backend-sdk';
2
- import { P as PAYMENT_TYPES, t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector, g as getPaymentDirection } from '../shared/bank.4vcryDK5.mjs';
2
+ import { P as PAYMENT_TYPES, t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector, g as getPaymentDirection } from '../shared/bank.CNpjRxvL.mjs';
3
3
  import { WorkerEntrypoint } from 'cloudflare:workers';
4
4
  import { drizzle } from 'drizzle-orm/d1';
5
5
  import { z } from 'zod';
6
6
  import { CURRENCY_CODES } from '@develit-io/general-codes';
7
- import { C as CONNECTOR_KEYS } from '../shared/bank.Bgq67An_.mjs';
7
+ import { C as CONNECTOR_KEYS } from '../shared/bank.C9jAvwna.mjs';
8
8
  import 'jose';
9
9
  import { eq, and, inArray, desc, sql } from 'drizzle-orm';
10
10
  import superjson from 'superjson';
@@ -127,10 +127,6 @@ const getOpenBatchByAccountIdQuery = async (db, { accountId }) => {
127
127
  return batch;
128
128
  };
129
129
 
130
- const getAllOpenBatchesQuery = async (db) => {
131
- return await db.select().from(tables.batch).where(eq(tables.batch.status, "OPEN"));
132
- };
133
-
134
130
  const getPaymentsByBankRefIdsQuery = async (db, { ids }) => {
135
131
  return await db.select().from(tables.payment).where(inArray(tables.payment.bankRefId, ids));
136
132
  };
@@ -323,28 +319,6 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
323
319
  });
324
320
  }
325
321
  async scheduled(controller) {
326
- if (controller.cron === this.env.CRON_BATCHES_PROCESSING) {
327
- console.log("Scheduled CRON batches processing");
328
- const openBatches = await getAllOpenBatchesQuery(this.db);
329
- if (!openBatches.length) return;
330
- for (const batch of openBatches) {
331
- const connectorKey = this.accounts.find(
332
- (acc) => acc.id === batch.accountId
333
- )?.connectorKey;
334
- if (!connectorKey) {
335
- this.logError({
336
- message: "Failed to find connector key",
337
- batch,
338
- connectorKey
339
- });
340
- continue;
341
- }
342
- await this.processBatch({
343
- batch,
344
- connectorKey
345
- });
346
- }
347
- }
348
322
  if (controller.cron === this.env.CRON_PAYMENTS_PROCESSING) {
349
323
  console.log("Scheduled CRON payments processing");
350
324
  await this.syncAccounts();
@@ -473,6 +447,12 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
473
447
  }).command.execute();
474
448
  await this.initiateBankConnector({ connectorKey });
475
449
  if (!this.bankConnector) {
450
+ await upsertBatchCommand(this.db, {
451
+ batch: {
452
+ ...batch,
453
+ status: "FAILED"
454
+ }
455
+ }).command.execute();
476
456
  throw createInternalError(null, {
477
457
  message: `\u274C Failed to initialize ${connectorKey} bank connector`
478
458
  });
@@ -514,6 +494,12 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
514
494
  (p) => createPaymentCommand(this.db, { payment: p }).command.execute()
515
495
  )
516
496
  ]);
497
+ await upsertBatchCommand(this.db, {
498
+ batch: {
499
+ ...batch,
500
+ status: "PREPARED"
501
+ }
502
+ }).command.execute();
517
503
  const { authorizationUrls, payments, metadata } = await this.bankConnector.initiateBatchFromPayments({
518
504
  payments: [
519
505
  ...preparedBatch.newlyPreparedPayments,
@@ -522,6 +508,12 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
522
508
  });
523
509
  if (!authorizationUrls) {
524
510
  this.logError({ message: "Failed to retrieve signing URI" });
511
+ await upsertBatchCommand(this.db, {
512
+ batch: {
513
+ ...batch,
514
+ status: "FAILED"
515
+ }
516
+ }).command.execute();
525
517
  return;
526
518
  }
527
519
  const { command: upsertBatch } = upsertBatchCommand(this.db, {
@@ -548,7 +540,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
548
540
  type: "email",
549
541
  payload: {
550
542
  email: {
551
- to: ["petr@develit.io"],
543
+ to: [this.env.BANK_AUTH_RECIPIENT],
552
544
  subject: "Payment Authorization",
553
545
  text: authorizationUrls[0] || "No Authorization Url"
554
546
  }
@@ -26,7 +26,8 @@ function defineBankServiceWrangler(config) {
26
26
  FINBRICKS_BASE_URI: "https://api.sandbox.finbricks.com",
27
27
  FINBRICKS_MERCHANT_ID: "10435c82-84b4-4efa-b5bf-ae6cd723e653",
28
28
  CRON_BATCHES_PROCESSING: "* * * * *",
29
- CRON_PAYMENTS_PROCESSING: "* * * * *"
29
+ CRON_PAYMENTS_PROCESSING: "* * * * *",
30
+ BANK_AUTH_RECIPIENT: "petr@develit.io"
30
31
  },
31
32
  triggers: envs.local.triggers,
32
33
  kv_namespaces: [
@@ -1,4 +1,4 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.CJFy17-g.cjs';
1
+ import { B as BankServiceWranglerConfig } from '../shared/bank.CEZKAEiY.cjs';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
4
  vars: {
@@ -12,6 +12,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
12
12
  FINBRICKS_MERCHANT_ID: string;
13
13
  CRON_BATCHES_PROCESSING: string;
14
14
  CRON_PAYMENTS_PROCESSING: string;
15
+ BANK_AUTH_RECIPIENT: string;
15
16
  ERSTE_REDIRECT_URI: string;
16
17
  FINBRICKS_PRIVATE_KEY_PEM: string;
17
18
  ERSTE_API_KEY: string;
@@ -1,4 +1,4 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.CJFy17-g.mjs';
1
+ import { B as BankServiceWranglerConfig } from '../shared/bank.CEZKAEiY.mjs';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
4
  vars: {
@@ -12,6 +12,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
12
12
  FINBRICKS_MERCHANT_ID: string;
13
13
  CRON_BATCHES_PROCESSING: string;
14
14
  CRON_PAYMENTS_PROCESSING: string;
15
+ BANK_AUTH_RECIPIENT: string;
15
16
  ERSTE_REDIRECT_URI: string;
16
17
  FINBRICKS_PRIVATE_KEY_PEM: string;
17
18
  ERSTE_API_KEY: string;
@@ -1,4 +1,4 @@
1
- import { B as BankServiceWranglerConfig } from '../shared/bank.CJFy17-g.js';
1
+ import { B as BankServiceWranglerConfig } from '../shared/bank.CEZKAEiY.js';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
4
  vars: {
@@ -12,6 +12,7 @@ declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
12
12
  FINBRICKS_MERCHANT_ID: string;
13
13
  CRON_BATCHES_PROCESSING: string;
14
14
  CRON_PAYMENTS_PROCESSING: string;
15
+ BANK_AUTH_RECIPIENT: string;
15
16
  ERSTE_REDIRECT_URI: string;
16
17
  FINBRICKS_PRIVATE_KEY_PEM: string;
17
18
  ERSTE_API_KEY: string;
@@ -24,7 +24,8 @@ function defineBankServiceWrangler(config) {
24
24
  FINBRICKS_BASE_URI: "https://api.sandbox.finbricks.com",
25
25
  FINBRICKS_MERCHANT_ID: "10435c82-84b4-4efa-b5bf-ae6cd723e653",
26
26
  CRON_BATCHES_PROCESSING: "* * * * *",
27
- CRON_PAYMENTS_PROCESSING: "* * * * *"
27
+ CRON_PAYMENTS_PROCESSING: "* * * * *",
28
+ BANK_AUTH_RECIPIENT: "petr@develit.io"
28
29
  },
29
30
  triggers: envs.local.triggers,
30
31
  kv_namespaces: [
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { BANK_CODES, CURRENCY_CODES, CODES } from '@develit-io/general-codes';
3
- import { a as PaymentInsertType, t as tables } from './bank.CYP8KnoM.mjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.mGCkS7Y9.mjs';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
 
6
6
  declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
@@ -68,7 +68,7 @@ const CONNECTOR_KEYS = [
68
68
  ];
69
69
  const TOKEN_TYPES = ["ACCOUNT_AUTHORIZATION"];
70
70
 
71
- const ott = sqliteTable("otp", {
71
+ const ott = sqliteTable("ott", {
72
72
  ...base,
73
73
  oneTimeToken: text("one_time_token").notNull(),
74
74
  tokenType: text("token_type", { enum: TOKEN_TYPES }).$type().notNull(),
@@ -22,6 +22,7 @@ interface BankServiceEnvironmentConfig {
22
22
  FINBRICKS_MERCHANT_ID: string;
23
23
  CRON_BATCHES_PROCESSING: string;
24
24
  CRON_PAYMENTS_PROCESSING: string;
25
+ BANK_AUTH_RECIPIENT: string;
25
26
  };
26
27
  }
27
28
  interface BankServiceWranglerConfig {
@@ -22,6 +22,7 @@ interface BankServiceEnvironmentConfig {
22
22
  FINBRICKS_MERCHANT_ID: string;
23
23
  CRON_BATCHES_PROCESSING: string;
24
24
  CRON_PAYMENTS_PROCESSING: string;
25
+ BANK_AUTH_RECIPIENT: string;
25
26
  };
26
27
  }
27
28
  interface BankServiceWranglerConfig {
@@ -22,6 +22,7 @@ interface BankServiceEnvironmentConfig {
22
22
  FINBRICKS_MERCHANT_ID: string;
23
23
  CRON_BATCHES_PROCESSING: string;
24
24
  CRON_PAYMENTS_PROCESSING: string;
25
+ BANK_AUTH_RECIPIENT: string;
25
26
  };
26
27
  }
27
28
  interface BankServiceWranglerConfig {
@@ -1,5 +1,5 @@
1
1
  import { uuidv4, useResult, createInternalError } from '@develit-io/backend-sdk';
2
- import { s as schema, C as CONNECTOR_KEYS } from './bank.Bgq67An_.mjs';
2
+ import { s as schema, C as CONNECTOR_KEYS } from './bank.C9jAvwna.mjs';
3
3
  import { and, eq } from 'drizzle-orm';
4
4
  import { z } from 'zod';
5
5
  import { COUNTRY_CODES_2, CURRENCY_CODES } from '@develit-io/general-codes';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const database_schema = require('./bank.Docz6If9.cjs');
4
+ const database_schema = require('./bank.P9gDUycr.cjs');
5
5
  const drizzleOrm = require('drizzle-orm');
6
6
  const zod = require('zod');
7
7
  const generalCodes = require('@develit-io/general-codes');
@@ -70,7 +70,7 @@ const CONNECTOR_KEYS = [
70
70
  ];
71
71
  const TOKEN_TYPES = ["ACCOUNT_AUTHORIZATION"];
72
72
 
73
- const ott = sqliteCore.sqliteTable("otp", {
73
+ const ott = sqliteCore.sqliteTable("ott", {
74
74
  ...backendSdk.base,
75
75
  oneTimeToken: sqliteCore.text("one_time_token").notNull(),
76
76
  tokenType: sqliteCore.text("token_type", { enum: TOKEN_TYPES }).$type().notNull(),
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { BANK_CODES, CURRENCY_CODES, CODES } from '@develit-io/general-codes';
3
- import { a as PaymentInsertType, t as tables } from './bank.CYP8KnoM.cjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.mGCkS7Y9.cjs';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
 
6
6
  declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
@@ -82,10 +82,10 @@ declare const paymentInsertTypeZod: z.ZodObject<{
82
82
  }>;
83
83
  status: z.ZodEnum<{
84
84
  PREPARED: "PREPARED";
85
- INITIALIZED: "INITIALIZED";
85
+ COMPLETED: "COMPLETED";
86
86
  FAILED: "FAILED";
87
+ INITIALIZED: "INITIALIZED";
87
88
  PENDING: "PENDING";
88
- COMPLETED: "COMPLETED";
89
89
  CREATED: "CREATED";
90
90
  }>;
91
91
  batchId: z.ZodString;
@@ -165,7 +165,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
165
165
  tableName: "batch";
166
166
  dataType: "string";
167
167
  columnType: "SQLiteText";
168
- data: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
168
+ data: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
169
169
  driverParam: string;
170
170
  notNull: false;
171
171
  hasDefault: false;
@@ -178,7 +178,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
178
178
  generated: undefined;
179
179
  }, {}, {
180
180
  length: number | undefined;
181
- $type: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
181
+ $type: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
182
182
  }>;
183
183
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
184
184
  name: "payments";
@@ -416,7 +416,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
416
416
  tableName: "payment";
417
417
  dataType: "string";
418
418
  columnType: "SQLiteText";
419
- data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
419
+ data: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
420
420
  driverParam: string;
421
421
  notNull: true;
422
422
  hasDefault: false;
@@ -429,7 +429,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
429
429
  generated: undefined;
430
430
  }, {}, {
431
431
  length: number | undefined;
432
- $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
432
+ $type: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
433
433
  }>;
434
434
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
435
435
  name: "status_reason";
@@ -771,12 +771,12 @@ declare const paymentRelations: drizzle_orm.Relations<"payment", {
771
771
  }>;
772
772
 
773
773
  declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
774
- name: "otp";
774
+ name: "ott";
775
775
  schema: undefined;
776
776
  columns: {
777
777
  oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
778
778
  name: "one_time_token";
779
- tableName: "otp";
779
+ tableName: "ott";
780
780
  dataType: "string";
781
781
  columnType: "SQLiteText";
782
782
  data: string;
@@ -795,7 +795,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
795
795
  }>;
796
796
  tokenType: drizzle_orm_sqlite_core.SQLiteColumn<{
797
797
  name: "token_type";
798
- tableName: "otp";
798
+ tableName: "ott";
799
799
  dataType: "string";
800
800
  columnType: "SQLiteText";
801
801
  data: "ACCOUNT_AUTHORIZATION";
@@ -815,7 +815,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
815
815
  }>;
816
816
  connectorKey: drizzle_orm_sqlite_core.SQLiteColumn<{
817
817
  name: "connector_key";
818
- tableName: "otp";
818
+ tableName: "ott";
819
819
  dataType: "string";
820
820
  columnType: "SQLiteText";
821
821
  data: "ERSTE" | "FINBRICKS" | "MOCK" | "CREDITAS" | "MOCK_COBS" | "FIO" | "MONETA";
@@ -835,7 +835,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
835
835
  }>;
836
836
  accountId: drizzle_orm_sqlite_core.SQLiteColumn<{
837
837
  name: "account_id";
838
- tableName: "otp";
838
+ tableName: "ott";
839
839
  dataType: "string";
840
840
  columnType: "SQLiteText";
841
841
  data: string;
@@ -854,7 +854,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
854
854
  }>;
855
855
  expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
856
856
  name: "expires_at";
857
- tableName: "otp";
857
+ tableName: "ott";
858
858
  dataType: "date";
859
859
  columnType: "SQLiteTimestamp";
860
860
  data: Date;
@@ -871,7 +871,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
871
871
  }, {}, {}>;
872
872
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
873
873
  name: "id";
874
- tableName: "otp";
874
+ tableName: "ott";
875
875
  dataType: "string";
876
876
  columnType: "SQLiteText";
877
877
  data: string;
@@ -890,7 +890,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
890
890
  }>;
891
891
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
892
892
  name: "created_at";
893
- tableName: "otp";
893
+ tableName: "ott";
894
894
  dataType: "date";
895
895
  columnType: "SQLiteTimestamp";
896
896
  data: Date;
@@ -907,7 +907,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
907
907
  }, {}, {}>;
908
908
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
909
909
  name: "updated_at";
910
- tableName: "otp";
910
+ tableName: "ott";
911
911
  dataType: "date";
912
912
  columnType: "SQLiteTimestamp";
913
913
  data: Date;
@@ -924,7 +924,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
924
924
  }, {}, {}>;
925
925
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
926
926
  name: "deleted_at";
927
- tableName: "otp";
927
+ tableName: "ott";
928
928
  dataType: "date";
929
929
  columnType: "SQLiteTimestamp";
930
930
  data: Date;
@@ -82,10 +82,10 @@ declare const paymentInsertTypeZod: z.ZodObject<{
82
82
  }>;
83
83
  status: z.ZodEnum<{
84
84
  PREPARED: "PREPARED";
85
- INITIALIZED: "INITIALIZED";
85
+ COMPLETED: "COMPLETED";
86
86
  FAILED: "FAILED";
87
+ INITIALIZED: "INITIALIZED";
87
88
  PENDING: "PENDING";
88
- COMPLETED: "COMPLETED";
89
89
  CREATED: "CREATED";
90
90
  }>;
91
91
  batchId: z.ZodString;
@@ -165,7 +165,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
165
165
  tableName: "batch";
166
166
  dataType: "string";
167
167
  columnType: "SQLiteText";
168
- data: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
168
+ data: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
169
169
  driverParam: string;
170
170
  notNull: false;
171
171
  hasDefault: false;
@@ -178,7 +178,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
178
178
  generated: undefined;
179
179
  }, {}, {
180
180
  length: number | undefined;
181
- $type: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
181
+ $type: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
182
182
  }>;
183
183
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
184
184
  name: "payments";
@@ -416,7 +416,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
416
416
  tableName: "payment";
417
417
  dataType: "string";
418
418
  columnType: "SQLiteText";
419
- data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
419
+ data: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
420
420
  driverParam: string;
421
421
  notNull: true;
422
422
  hasDefault: false;
@@ -429,7 +429,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
429
429
  generated: undefined;
430
430
  }, {}, {
431
431
  length: number | undefined;
432
- $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
432
+ $type: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
433
433
  }>;
434
434
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
435
435
  name: "status_reason";
@@ -771,12 +771,12 @@ declare const paymentRelations: drizzle_orm.Relations<"payment", {
771
771
  }>;
772
772
 
773
773
  declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
774
- name: "otp";
774
+ name: "ott";
775
775
  schema: undefined;
776
776
  columns: {
777
777
  oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
778
778
  name: "one_time_token";
779
- tableName: "otp";
779
+ tableName: "ott";
780
780
  dataType: "string";
781
781
  columnType: "SQLiteText";
782
782
  data: string;
@@ -795,7 +795,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
795
795
  }>;
796
796
  tokenType: drizzle_orm_sqlite_core.SQLiteColumn<{
797
797
  name: "token_type";
798
- tableName: "otp";
798
+ tableName: "ott";
799
799
  dataType: "string";
800
800
  columnType: "SQLiteText";
801
801
  data: "ACCOUNT_AUTHORIZATION";
@@ -815,7 +815,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
815
815
  }>;
816
816
  connectorKey: drizzle_orm_sqlite_core.SQLiteColumn<{
817
817
  name: "connector_key";
818
- tableName: "otp";
818
+ tableName: "ott";
819
819
  dataType: "string";
820
820
  columnType: "SQLiteText";
821
821
  data: "ERSTE" | "FINBRICKS" | "MOCK" | "CREDITAS" | "MOCK_COBS" | "FIO" | "MONETA";
@@ -835,7 +835,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
835
835
  }>;
836
836
  accountId: drizzle_orm_sqlite_core.SQLiteColumn<{
837
837
  name: "account_id";
838
- tableName: "otp";
838
+ tableName: "ott";
839
839
  dataType: "string";
840
840
  columnType: "SQLiteText";
841
841
  data: string;
@@ -854,7 +854,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
854
854
  }>;
855
855
  expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
856
856
  name: "expires_at";
857
- tableName: "otp";
857
+ tableName: "ott";
858
858
  dataType: "date";
859
859
  columnType: "SQLiteTimestamp";
860
860
  data: Date;
@@ -871,7 +871,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
871
871
  }, {}, {}>;
872
872
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
873
873
  name: "id";
874
- tableName: "otp";
874
+ tableName: "ott";
875
875
  dataType: "string";
876
876
  columnType: "SQLiteText";
877
877
  data: string;
@@ -890,7 +890,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
890
890
  }>;
891
891
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
892
892
  name: "created_at";
893
- tableName: "otp";
893
+ tableName: "ott";
894
894
  dataType: "date";
895
895
  columnType: "SQLiteTimestamp";
896
896
  data: Date;
@@ -907,7 +907,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
907
907
  }, {}, {}>;
908
908
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
909
909
  name: "updated_at";
910
- tableName: "otp";
910
+ tableName: "ott";
911
911
  dataType: "date";
912
912
  columnType: "SQLiteTimestamp";
913
913
  data: Date;
@@ -924,7 +924,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
924
924
  }, {}, {}>;
925
925
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
926
926
  name: "deleted_at";
927
- tableName: "otp";
927
+ tableName: "ott";
928
928
  dataType: "date";
929
929
  columnType: "SQLiteTimestamp";
930
930
  data: Date;
@@ -82,10 +82,10 @@ declare const paymentInsertTypeZod: z.ZodObject<{
82
82
  }>;
83
83
  status: z.ZodEnum<{
84
84
  PREPARED: "PREPARED";
85
- INITIALIZED: "INITIALIZED";
85
+ COMPLETED: "COMPLETED";
86
86
  FAILED: "FAILED";
87
+ INITIALIZED: "INITIALIZED";
87
88
  PENDING: "PENDING";
88
- COMPLETED: "COMPLETED";
89
89
  CREATED: "CREATED";
90
90
  }>;
91
91
  batchId: z.ZodString;
@@ -165,7 +165,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
165
165
  tableName: "batch";
166
166
  dataType: "string";
167
167
  columnType: "SQLiteText";
168
- data: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
168
+ data: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
169
169
  driverParam: string;
170
170
  notNull: false;
171
171
  hasDefault: false;
@@ -178,7 +178,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
178
178
  generated: undefined;
179
179
  }, {}, {
180
180
  length: number | undefined;
181
- $type: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
181
+ $type: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
182
182
  }>;
183
183
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
184
184
  name: "payments";
@@ -416,7 +416,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
416
416
  tableName: "payment";
417
417
  dataType: "string";
418
418
  columnType: "SQLiteText";
419
- data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
419
+ data: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
420
420
  driverParam: string;
421
421
  notNull: true;
422
422
  hasDefault: false;
@@ -429,7 +429,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
429
429
  generated: undefined;
430
430
  }, {}, {
431
431
  length: number | undefined;
432
- $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
432
+ $type: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
433
433
  }>;
434
434
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
435
435
  name: "status_reason";
@@ -771,12 +771,12 @@ declare const paymentRelations: drizzle_orm.Relations<"payment", {
771
771
  }>;
772
772
 
773
773
  declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
774
- name: "otp";
774
+ name: "ott";
775
775
  schema: undefined;
776
776
  columns: {
777
777
  oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
778
778
  name: "one_time_token";
779
- tableName: "otp";
779
+ tableName: "ott";
780
780
  dataType: "string";
781
781
  columnType: "SQLiteText";
782
782
  data: string;
@@ -795,7 +795,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
795
795
  }>;
796
796
  tokenType: drizzle_orm_sqlite_core.SQLiteColumn<{
797
797
  name: "token_type";
798
- tableName: "otp";
798
+ tableName: "ott";
799
799
  dataType: "string";
800
800
  columnType: "SQLiteText";
801
801
  data: "ACCOUNT_AUTHORIZATION";
@@ -815,7 +815,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
815
815
  }>;
816
816
  connectorKey: drizzle_orm_sqlite_core.SQLiteColumn<{
817
817
  name: "connector_key";
818
- tableName: "otp";
818
+ tableName: "ott";
819
819
  dataType: "string";
820
820
  columnType: "SQLiteText";
821
821
  data: "ERSTE" | "FINBRICKS" | "MOCK" | "CREDITAS" | "MOCK_COBS" | "FIO" | "MONETA";
@@ -835,7 +835,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
835
835
  }>;
836
836
  accountId: drizzle_orm_sqlite_core.SQLiteColumn<{
837
837
  name: "account_id";
838
- tableName: "otp";
838
+ tableName: "ott";
839
839
  dataType: "string";
840
840
  columnType: "SQLiteText";
841
841
  data: string;
@@ -854,7 +854,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
854
854
  }>;
855
855
  expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
856
856
  name: "expires_at";
857
- tableName: "otp";
857
+ tableName: "ott";
858
858
  dataType: "date";
859
859
  columnType: "SQLiteTimestamp";
860
860
  data: Date;
@@ -871,7 +871,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
871
871
  }, {}, {}>;
872
872
  id: drizzle_orm_sqlite_core.SQLiteColumn<{
873
873
  name: "id";
874
- tableName: "otp";
874
+ tableName: "ott";
875
875
  dataType: "string";
876
876
  columnType: "SQLiteText";
877
877
  data: string;
@@ -890,7 +890,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
890
890
  }>;
891
891
  createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
892
892
  name: "created_at";
893
- tableName: "otp";
893
+ tableName: "ott";
894
894
  dataType: "date";
895
895
  columnType: "SQLiteTimestamp";
896
896
  data: Date;
@@ -907,7 +907,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
907
907
  }, {}, {}>;
908
908
  updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
909
909
  name: "updated_at";
910
- tableName: "otp";
910
+ tableName: "ott";
911
911
  dataType: "date";
912
912
  columnType: "SQLiteTimestamp";
913
913
  data: Date;
@@ -924,7 +924,7 @@ declare const ott: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
924
924
  }, {}, {}>;
925
925
  deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
926
926
  name: "deleted_at";
927
- tableName: "otp";
927
+ tableName: "ott";
928
928
  dataType: "date";
929
929
  columnType: "SQLiteTimestamp";
930
930
  data: Date;
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '@develit-io/backend-sdk';
2
2
  import { BANK_CODES, CURRENCY_CODES, CODES } from '@develit-io/general-codes';
3
- import { a as PaymentInsertType, t as tables } from './bank.CYP8KnoM.js';
3
+ import { a as PaymentInsertType, t as tables } from './bank.mGCkS7Y9.js';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
 
6
6
  declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
package/dist/types.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const db = require('./shared/bank.C9Yr7ASx.cjs');
4
- const database_schema = require('./shared/bank.Docz6If9.cjs');
3
+ const db = require('./shared/bank.DQn99N-C.cjs');
4
+ const database_schema = require('./shared/bank.P9gDUycr.cjs');
5
5
  const generalCodes = require('@develit-io/general-codes');
6
6
  require('@develit-io/backend-sdk');
7
7
  require('drizzle-orm');
package/dist/types.d.cts CHANGED
@@ -1,10 +1,10 @@
1
- import { c as CurrencyCode, d as BankCode, e as CountryCode, I as IBankConnector, b as ConnectorKey, A as AuthInput, f as IncomingPaymentMessage, P as PaymentPreparedInsertType, g as InitiatedBatch, h as InitiatedPayment, a as ConfigBankAccount, S as SyncLog, i as PaymentStatus, j as BatchStatus, k as BatchMetadata, l as Currency } from './shared/bank.DnUXZU3A.cjs';
2
- export { n as BATCH_STATUES, n as BATCH_STATUSES, B as BankAccountWithLastSync, v as CONNECTOR_KEYS, u as COUNTRY_CODES, C as ConfigEnvironmentBankAccount, O as OutgoingPaymentMessage, s as PAYMENT_DIRECTIONS, r as PAYMENT_STATUSES, o as PAYMENT_TYPES, t as PaymentDirection, m as PaymentFailedInsertType, q as PaymentType, T as TOKEN_TYPES, w as TokenType, p as paymentInitializedInsertType } from './shared/bank.DnUXZU3A.cjs';
3
- import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.CYP8KnoM.cjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.CYP8KnoM.cjs';
1
+ import { c as CurrencyCode, d as BankCode, e as CountryCode, I as IBankConnector, b as ConnectorKey, A as AuthInput, f as IncomingPaymentMessage, P as PaymentPreparedInsertType, g as InitiatedBatch, h as InitiatedPayment, a as ConfigBankAccount, S as SyncLog, i as PaymentStatus, j as BatchStatus, k as BatchMetadata, l as Currency } from './shared/bank.TyzHNrzR.cjs';
2
+ export { n as BATCH_STATUES, n as BATCH_STATUSES, B as BankAccountWithLastSync, v as CONNECTOR_KEYS, u as COUNTRY_CODES, C as ConfigEnvironmentBankAccount, O as OutgoingPaymentMessage, s as PAYMENT_DIRECTIONS, r as PAYMENT_STATUSES, o as PAYMENT_TYPES, t as PaymentDirection, m as PaymentFailedInsertType, q as PaymentType, T as TOKEN_TYPES, w as TokenType, p as paymentInitializedInsertType } from './shared/bank.TyzHNrzR.cjs';
3
+ import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.mGCkS7Y9.cjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mGCkS7Y9.cjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
- export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CJFy17-g.cjs';
7
+ export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.cjs';
8
8
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
9
9
  import 'drizzle-orm/sqlite-core';
10
10
  import 'drizzle-orm';
package/dist/types.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { c as CurrencyCode, d as BankCode, e as CountryCode, I as IBankConnector, b as ConnectorKey, A as AuthInput, f as IncomingPaymentMessage, P as PaymentPreparedInsertType, g as InitiatedBatch, h as InitiatedPayment, a as ConfigBankAccount, S as SyncLog, i as PaymentStatus, j as BatchStatus, k as BatchMetadata, l as Currency } from './shared/bank.DkD_K2Pp.mjs';
2
- export { n as BATCH_STATUES, n as BATCH_STATUSES, B as BankAccountWithLastSync, v as CONNECTOR_KEYS, u as COUNTRY_CODES, C as ConfigEnvironmentBankAccount, O as OutgoingPaymentMessage, s as PAYMENT_DIRECTIONS, r as PAYMENT_STATUSES, o as PAYMENT_TYPES, t as PaymentDirection, m as PaymentFailedInsertType, q as PaymentType, T as TOKEN_TYPES, w as TokenType, p as paymentInitializedInsertType } from './shared/bank.DkD_K2Pp.mjs';
3
- import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.CYP8KnoM.mjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.CYP8KnoM.mjs';
1
+ import { c as CurrencyCode, d as BankCode, e as CountryCode, I as IBankConnector, b as ConnectorKey, A as AuthInput, f as IncomingPaymentMessage, P as PaymentPreparedInsertType, g as InitiatedBatch, h as InitiatedPayment, a as ConfigBankAccount, S as SyncLog, i as PaymentStatus, j as BatchStatus, k as BatchMetadata, l as Currency } from './shared/bank.C8aShbaN.mjs';
2
+ export { n as BATCH_STATUES, n as BATCH_STATUSES, B as BankAccountWithLastSync, v as CONNECTOR_KEYS, u as COUNTRY_CODES, C as ConfigEnvironmentBankAccount, O as OutgoingPaymentMessage, s as PAYMENT_DIRECTIONS, r as PAYMENT_STATUSES, o as PAYMENT_TYPES, t as PaymentDirection, m as PaymentFailedInsertType, q as PaymentType, T as TOKEN_TYPES, w as TokenType, p as paymentInitializedInsertType } from './shared/bank.C8aShbaN.mjs';
3
+ import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.mGCkS7Y9.mjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mGCkS7Y9.mjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
- export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CJFy17-g.mjs';
7
+ export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.mjs';
8
8
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
9
9
  import 'drizzle-orm/sqlite-core';
10
10
  import 'drizzle-orm';
package/dist/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { c as CurrencyCode, d as BankCode, e as CountryCode, I as IBankConnector, b as ConnectorKey, A as AuthInput, f as IncomingPaymentMessage, P as PaymentPreparedInsertType, g as InitiatedBatch, h as InitiatedPayment, a as ConfigBankAccount, S as SyncLog, i as PaymentStatus, j as BatchStatus, k as BatchMetadata, l as Currency } from './shared/bank.BTiCct5w.js';
2
- export { n as BATCH_STATUES, n as BATCH_STATUSES, B as BankAccountWithLastSync, v as CONNECTOR_KEYS, u as COUNTRY_CODES, C as ConfigEnvironmentBankAccount, O as OutgoingPaymentMessage, s as PAYMENT_DIRECTIONS, r as PAYMENT_STATUSES, o as PAYMENT_TYPES, t as PaymentDirection, m as PaymentFailedInsertType, q as PaymentType, T as TOKEN_TYPES, w as TokenType, p as paymentInitializedInsertType } from './shared/bank.BTiCct5w.js';
3
- import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.CYP8KnoM.js';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.CYP8KnoM.js';
1
+ import { c as CurrencyCode, d as BankCode, e as CountryCode, I as IBankConnector, b as ConnectorKey, A as AuthInput, f as IncomingPaymentMessage, P as PaymentPreparedInsertType, g as InitiatedBatch, h as InitiatedPayment, a as ConfigBankAccount, S as SyncLog, i as PaymentStatus, j as BatchStatus, k as BatchMetadata, l as Currency } from './shared/bank.zK_DX1oe.js';
2
+ export { n as BATCH_STATUES, n as BATCH_STATUSES, B as BankAccountWithLastSync, v as CONNECTOR_KEYS, u as COUNTRY_CODES, C as ConfigEnvironmentBankAccount, O as OutgoingPaymentMessage, s as PAYMENT_DIRECTIONS, r as PAYMENT_STATUSES, o as PAYMENT_TYPES, t as PaymentDirection, m as PaymentFailedInsertType, q as PaymentType, T as TOKEN_TYPES, w as TokenType, p as paymentInitializedInsertType } from './shared/bank.zK_DX1oe.js';
3
+ import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.mGCkS7Y9.js';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.mGCkS7Y9.js';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
- export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CJFy17-g.js';
7
+ export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.js';
8
8
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
9
9
  import 'drizzle-orm/sqlite-core';
10
10
  import 'drizzle-orm';
package/dist/types.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { B as BATCH_STATUES, B as BATCH_STATUSES, C as COUNTRY_CODES, E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, e as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, P as PAYMENT_TYPES, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.4vcryDK5.mjs';
2
- export { C as CONNECTOR_KEYS, T as TOKEN_TYPES } from './shared/bank.Bgq67An_.mjs';
1
+ export { B as BATCH_STATUES, B as BATCH_STATUSES, C as COUNTRY_CODES, E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, e as PAYMENT_DIRECTIONS, d as PAYMENT_STATUSES, P as PAYMENT_TYPES, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.CNpjRxvL.mjs';
2
+ export { C as CONNECTOR_KEYS, T as TOKEN_TYPES } from './shared/bank.C9jAvwna.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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {