@develit-services/bank 0.3.55 → 0.3.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('../shared/bank.DoHc7geB.cjs');
3
+ const database_schema = require('../shared/bank.BnDb4liE.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 { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.B9ZliW26.cjs';
1
+ export { aa as account, ab as accountCredentials, a6 as batch, a9 as ott, a7 as payment, a8 as paymentRelations } from '../shared/bank.Clkw7jCx.cjs';
2
2
  import 'zod';
3
3
  import 'drizzle-zod';
4
4
  import 'drizzle-orm/sqlite-core';
@@ -1,4 +1,4 @@
1
- export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.B9ZliW26.mjs';
1
+ export { aa as account, ab as accountCredentials, a6 as batch, a9 as ott, a7 as payment, a8 as paymentRelations } from '../shared/bank.Clkw7jCx.mjs';
2
2
  import 'zod';
3
3
  import 'drizzle-zod';
4
4
  import 'drizzle-orm/sqlite-core';
@@ -1,4 +1,4 @@
1
- export { a9 as account, aa as accountCredentials, a5 as batch, a8 as ott, a6 as payment, a7 as paymentRelations } from '../shared/bank.B9ZliW26.js';
1
+ export { aa as account, ab as accountCredentials, a6 as batch, a9 as ott, a7 as payment, a8 as paymentRelations } from '../shared/bank.Clkw7jCx.js';
2
2
  import 'zod';
3
3
  import 'drizzle-zod';
4
4
  import 'drizzle-orm/sqlite-core';
@@ -1,4 +1,4 @@
1
- export { t as account, u as accountCredentials, n as batch, r as ott, p as payment, q as paymentRelations } from '../shared/bank.C1bHZDjr.mjs';
1
+ export { t as account, u as accountCredentials, n as batch, r as ott, p as payment, q as paymentRelations } from '../shared/bank.BPxg79Tw.mjs';
2
2
  import '@develit-io/backend-sdk';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import 'date-fns';
@@ -3,15 +3,15 @@
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
4
  const cloudflare_workers = require('cloudflare:workers');
5
5
  const d1 = require('drizzle-orm/d1');
6
- const drizzle = require('../shared/bank.CW-0OIFF.cjs');
6
+ const drizzle = require('../shared/bank.BdlPpN78.cjs');
7
7
  const zod = require('zod');
8
- const database_schema = require('../shared/bank.DoHc7geB.cjs');
8
+ const database_schema = require('../shared/bank.BnDb4liE.cjs');
9
9
  const generalCodes = require('@develit-io/general-codes');
10
10
  require('date-fns');
11
11
  const drizzleOrm = require('drizzle-orm');
12
12
  require('jose');
13
13
  require('node:crypto');
14
- const encryption = require('../shared/bank.CTHp1cWX.cjs');
14
+ const encryption = require('../shared/bank.BfxCyEqX.cjs');
15
15
  require('drizzle-orm/sqlite-core');
16
16
  require('drizzle-orm/relations');
17
17
  require('drizzle-zod');
@@ -874,7 +874,6 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
874
874
  const { credentials, accounts } = await connector.authorizeAccount({
875
875
  urlParams
876
876
  });
877
- console.log("Bank connector initiated");
878
877
  const alreadyExistingAccounts = (await this._getAccounts()).filter(
879
878
  (acc) => acc.connectorKey === ottRow.refId && accounts.map((item) => item.iban).includes(acc.iban)
880
879
  );
@@ -882,19 +881,18 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
882
881
  const existingAccount = alreadyExistingAccounts.find(
883
882
  (existing) => existing.iban === acc.iban
884
883
  );
884
+ const base = { ...acc };
885
+ const existingPart = existingAccount ? {
886
+ id: existingAccount.id,
887
+ lastSyncAt: existingAccount.lastSyncAt
888
+ } : {
889
+ lastSyncAt: lastSyncAt ?? /* @__PURE__ */ new Date(),
890
+ syncIntervalS
891
+ };
885
892
  return upsertAccountCommand(this.db, {
886
893
  account: {
887
- ...acc,
888
- syncIntervalS,
889
- // For existing accounts, preserve id and lastSyncAt
890
- ...existingAccount && {
891
- id: existingAccount.id,
892
- lastSyncAt: existingAccount.lastSyncAt
893
- },
894
- // For new accounts, set lastSyncAt to provided value or now
895
- ...!existingAccount && {
896
- lastSyncAt: lastSyncAt ?? /* @__PURE__ */ new Date()
897
- }
894
+ ...base,
895
+ ...existingPart
898
896
  }
899
897
  }).command;
900
898
  });
@@ -1,4 +1,4 @@
1
- import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.B9ZliW26.cjs';
1
+ import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as BatchPayment, c as BatchMetadata } from '../shared/bank.Clkw7jCx.cjs';
2
2
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
3
3
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
@@ -2521,7 +2521,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2521
2521
  authorizationUrls: string[] | null;
2522
2522
  statusReason: string | null;
2523
2523
  statusResponse: object | null;
2524
- payments: PaymentInsertType[];
2524
+ payments: BatchPayment[];
2525
2525
  metadata: BatchMetadata | null;
2526
2526
  paymentsChecksum: string | null;
2527
2527
  }[] | undefined>>;
@@ -1,4 +1,4 @@
1
- import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.B9ZliW26.mjs';
1
+ import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as BatchPayment, c as BatchMetadata } from '../shared/bank.Clkw7jCx.mjs';
2
2
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
3
3
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
@@ -2521,7 +2521,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2521
2521
  authorizationUrls: string[] | null;
2522
2522
  statusReason: string | null;
2523
2523
  statusResponse: object | null;
2524
- payments: PaymentInsertType[];
2524
+ payments: BatchPayment[];
2525
2525
  metadata: BatchMetadata | null;
2526
2526
  paymentsChecksum: string | null;
2527
2527
  }[] | undefined>>;
@@ -1,4 +1,4 @@
1
- import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as PaymentInsertType, c as BatchMetadata } from '../shared/bank.B9ZliW26.js';
1
+ import { A as AccountSelectType, P as PaymentSelectType, B as BatchSelectType, L as LastSyncMetadata, C as ConfigEnvironmentBank, t as tables, a as ConnectorKey, I as IBankConnector, b as BatchPayment, c as BatchMetadata } from '../shared/bank.Clkw7jCx.js';
2
2
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
3
3
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
@@ -2521,7 +2521,7 @@ declare class BankServiceBase extends BankServiceBase_base {
2521
2521
  authorizationUrls: string[] | null;
2522
2522
  statusReason: string | null;
2523
2523
  statusResponse: object | null;
2524
- payments: PaymentInsertType[];
2524
+ payments: BatchPayment[];
2525
2525
  metadata: BatchMetadata | null;
2526
2526
  paymentsChecksum: string | null;
2527
2527
  }[] | undefined>>;
@@ -1,15 +1,15 @@
1
1
  import { uuidv4, first, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
2
2
  import { WorkerEntrypoint } from 'cloudflare:workers';
3
3
  import { drizzle } from 'drizzle-orm/d1';
4
- import { t as tables } from '../shared/bank.eDTSA4Gp.mjs';
4
+ import { t as tables } from '../shared/bank.BiOcvKnQ.mjs';
5
5
  import { z } from 'zod';
6
- import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, d as CONNECTOR_KEYS, B as BATCH_STATUSES, a as PAYMENT_STATUSES, b as PAYMENT_DIRECTIONS, f as accountInsertSchema } from '../shared/bank.C1bHZDjr.mjs';
6
+ import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, d as CONNECTOR_KEYS, B as BATCH_STATUSES, a as PAYMENT_STATUSES, b as PAYMENT_DIRECTIONS, f as accountInsertSchema } from '../shared/bank.BPxg79Tw.mjs';
7
7
  import { CURRENCY_CODES } from '@develit-io/general-codes';
8
8
  import 'date-fns';
9
9
  import { eq, sql, inArray, and, asc, desc, gte, lte } from 'drizzle-orm';
10
10
  import 'jose';
11
11
  import 'node:crypto';
12
- import { f as encrypt, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, d as getBatchByIdQuery, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.CdDZBwwf.mjs';
12
+ import { f as encrypt, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, d as getBatchByIdQuery, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.DbS9RyGZ.mjs';
13
13
  import 'drizzle-orm/sqlite-core';
14
14
  import 'drizzle-orm/relations';
15
15
  import 'drizzle-zod';
@@ -872,7 +872,6 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
872
872
  const { credentials, accounts } = await connector.authorizeAccount({
873
873
  urlParams
874
874
  });
875
- console.log("Bank connector initiated");
876
875
  const alreadyExistingAccounts = (await this._getAccounts()).filter(
877
876
  (acc) => acc.connectorKey === ottRow.refId && accounts.map((item) => item.iban).includes(acc.iban)
878
877
  );
@@ -880,19 +879,18 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
880
879
  const existingAccount = alreadyExistingAccounts.find(
881
880
  (existing) => existing.iban === acc.iban
882
881
  );
882
+ const base = { ...acc };
883
+ const existingPart = existingAccount ? {
884
+ id: existingAccount.id,
885
+ lastSyncAt: existingAccount.lastSyncAt
886
+ } : {
887
+ lastSyncAt: lastSyncAt ?? /* @__PURE__ */ new Date(),
888
+ syncIntervalS
889
+ };
883
890
  return upsertAccountCommand(this.db, {
884
891
  account: {
885
- ...acc,
886
- syncIntervalS,
887
- // For existing accounts, preserve id and lastSyncAt
888
- ...existingAccount && {
889
- id: existingAccount.id,
890
- lastSyncAt: existingAccount.lastSyncAt
891
- },
892
- // For new accounts, set lastSyncAt to provided value or now
893
- ...!existingAccount && {
894
- lastSyncAt: lastSyncAt ?? /* @__PURE__ */ new Date()
895
- }
892
+ ...base,
893
+ ...existingPart
896
894
  }
897
895
  }).command;
898
896
  });
@@ -3,12 +3,12 @@
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 drizzle = require('../shared/bank.CW-0OIFF.cjs');
6
+ const drizzle = require('../shared/bank.BdlPpN78.cjs');
7
7
  const backendSdk = require('@develit-io/backend-sdk');
8
- const encryption = require('../shared/bank.CTHp1cWX.cjs');
8
+ const encryption = require('../shared/bank.BfxCyEqX.cjs');
9
9
  const drizzleOrm = require('drizzle-orm');
10
10
  require('date-fns');
11
- require('../shared/bank.DoHc7geB.cjs');
11
+ require('../shared/bank.BnDb4liE.cjs');
12
12
  require('drizzle-orm/sqlite-core');
13
13
  require('drizzle-orm/relations');
14
14
  require('@develit-io/general-codes');
@@ -1,12 +1,12 @@
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 } from '../shared/bank.eDTSA4Gp.mjs';
4
+ import { t as tables } from '../shared/bank.BiOcvKnQ.mjs';
5
5
  import { asNonEmpty, first } from '@develit-io/backend-sdk';
6
- import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand, d as getBatchByIdQuery, e as checksum, u as upsertBatchCommand } from '../shared/bank.CdDZBwwf.mjs';
6
+ import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand, d as getBatchByIdQuery, e as checksum, u as upsertBatchCommand } from '../shared/bank.DbS9RyGZ.mjs';
7
7
  import { eq } from 'drizzle-orm';
8
8
  import 'date-fns';
9
- import '../shared/bank.C1bHZDjr.mjs';
9
+ import '../shared/bank.BPxg79Tw.mjs';
10
10
  import 'drizzle-orm/sqlite-core';
11
11
  import 'drizzle-orm/relations';
12
12
  import '@develit-io/general-codes';
@@ -78,7 +78,7 @@ const accountSelectSchema = createSelectSchema(account);
78
78
 
79
79
  const accountCredentials = sqliteTable("account_credentials", {
80
80
  ...base,
81
- accountId: text("account_id").references(() => account.id).notNull(),
81
+ accountId: text("account_id").references(() => account.id, { onDelete: "restrict", onUpdate: "cascade" }).notNull(),
82
82
  connectorKey: text("connector_key", {
83
83
  enum: CONNECTOR_KEYS
84
84
  }).$type().notNull(),
@@ -111,7 +111,10 @@ const batch = sqliteTable("batch", {
111
111
  mode: "timestamp_ms"
112
112
  }),
113
113
  authorizationUrls: text("authorization_urls", { mode: "json" }).$type(),
114
- accountId: text("account_id").references(() => account.id),
114
+ accountId: text("account_id").references(() => account.id, {
115
+ onDelete: "restrict",
116
+ onUpdate: "cascade"
117
+ }),
115
118
  status: text("status", { enum: BATCH_STATUSES }).$type(),
116
119
  statusReason: text("status_reason"),
117
120
  statusResponse: text("status_response", { mode: "json" }).$type(),
@@ -127,7 +130,10 @@ const payment = sqliteTable(
127
130
  correlationId: text("correlation_id").notNull(),
128
131
  refId: text("ref_id"),
129
132
  bankRefId: text("bank_ref_id").notNull(),
130
- accountId: text("account_id").references(() => account.id).notNull(),
133
+ accountId: text("account_id").references(() => account.id, {
134
+ onDelete: "restrict",
135
+ onUpdate: "cascade"
136
+ }).notNull(),
131
137
  connectorKey: text("connector_key", { enum: CONNECTOR_KEYS }).$type().notNull(),
132
138
  amount: real("amount").notNull(),
133
139
  direction: text("direction").$type().notNull(),
@@ -2,7 +2,7 @@
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
4
  const dateFns = require('date-fns');
5
- const database_schema = require('./bank.DoHc7geB.cjs');
5
+ const database_schema = require('./bank.BnDb4liE.cjs');
6
6
  const drizzleOrm = require('drizzle-orm');
7
7
  const jose = require('jose');
8
8
  require('@develit-io/general-codes');
@@ -486,6 +486,7 @@ class FinbricksConnector extends IBankConnector {
486
486
  };
487
487
  }
488
488
  async initiateForeignPayment(payment) {
489
+ const bankRefId = backendSdk.uuidv4();
489
490
  const [response, error] = await backendSdk.useResult(
490
491
  this.finbricks.request({
491
492
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_FOREIGN_INIT,
@@ -498,7 +499,7 @@ class FinbricksConnector extends IBankConnector {
498
499
  ).token
499
500
  },
500
501
  paymentIdentification: {
501
- merchantTransactionId: payment.bankRefId
502
+ merchantTransactionId: bankRefId
502
503
  },
503
504
  amount: {
504
505
  value: payment.amount,
@@ -536,6 +537,7 @@ class FinbricksConnector extends IBankConnector {
536
537
  authorizationUrl: response.redirectUrl,
537
538
  payment: {
538
539
  ...payment,
540
+ bankRefId,
539
541
  status: "INITIALIZED",
540
542
  accountId: this.connectedAccounts.find(
541
543
  (acc) => acc.iban === payment.debtorIban
@@ -545,6 +547,7 @@ class FinbricksConnector extends IBankConnector {
545
547
  };
546
548
  }
547
549
  async initiateSEPAPayment(payment) {
550
+ const bankRefId = backendSdk.uuidv4();
548
551
  const [response, error] = await backendSdk.useResult(
549
552
  this.finbricks.request({
550
553
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_SEPA_INIT,
@@ -557,7 +560,7 @@ class FinbricksConnector extends IBankConnector {
557
560
  ).token
558
561
  },
559
562
  paymentIdentification: {
560
- merchantTransactionId: payment.bankRefId
563
+ merchantTransactionId: bankRefId
561
564
  },
562
565
  amount: payment.amount,
563
566
  debtor: {
@@ -584,6 +587,7 @@ class FinbricksConnector extends IBankConnector {
584
587
  authorizationUrl: response.redirectUrl,
585
588
  payment: {
586
589
  ...payment,
590
+ bankRefId,
587
591
  status: "INITIALIZED",
588
592
  accountId: this.connectedAccounts.find(
589
593
  (acc) => acc.iban === payment.debtorIban
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- const drizzle = require('./bank.CW-0OIFF.cjs');
3
+ const drizzle = require('./bank.BdlPpN78.cjs');
4
4
  const backendSdk = require('@develit-io/backend-sdk');
5
5
  const drizzleOrm = require('drizzle-orm');
6
6
  require('date-fns');
7
7
  require('jose');
8
8
  require('@develit-io/general-codes');
9
- require('./bank.DoHc7geB.cjs');
9
+ require('./bank.BnDb4liE.cjs');
10
10
  const node_crypto = require('node:crypto');
11
11
 
12
12
  const createPaymentCommand = (db, { payment }) => {
@@ -1,6 +1,6 @@
1
1
  import { uuidv4, useResult, createInternalError } from '@develit-io/backend-sdk';
2
2
  import { format, parseISO } from 'date-fns';
3
- import { s as schema } from './bank.C1bHZDjr.mjs';
3
+ import { s as schema } from './bank.BPxg79Tw.mjs';
4
4
  import { and, eq } from 'drizzle-orm';
5
5
  import { importPKCS8, SignJWT } from 'jose';
6
6
  import '@develit-io/general-codes';
@@ -484,6 +484,7 @@ class FinbricksConnector extends IBankConnector {
484
484
  };
485
485
  }
486
486
  async initiateForeignPayment(payment) {
487
+ const bankRefId = uuidv4();
487
488
  const [response, error] = await useResult(
488
489
  this.finbricks.request({
489
490
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_FOREIGN_INIT,
@@ -496,7 +497,7 @@ class FinbricksConnector extends IBankConnector {
496
497
  ).token
497
498
  },
498
499
  paymentIdentification: {
499
- merchantTransactionId: payment.bankRefId
500
+ merchantTransactionId: bankRefId
500
501
  },
501
502
  amount: {
502
503
  value: payment.amount,
@@ -534,6 +535,7 @@ class FinbricksConnector extends IBankConnector {
534
535
  authorizationUrl: response.redirectUrl,
535
536
  payment: {
536
537
  ...payment,
538
+ bankRefId,
537
539
  status: "INITIALIZED",
538
540
  accountId: this.connectedAccounts.find(
539
541
  (acc) => acc.iban === payment.debtorIban
@@ -543,6 +545,7 @@ class FinbricksConnector extends IBankConnector {
543
545
  };
544
546
  }
545
547
  async initiateSEPAPayment(payment) {
548
+ const bankRefId = uuidv4();
546
549
  const [response, error] = await useResult(
547
550
  this.finbricks.request({
548
551
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_SEPA_INIT,
@@ -555,7 +558,7 @@ class FinbricksConnector extends IBankConnector {
555
558
  ).token
556
559
  },
557
560
  paymentIdentification: {
558
- merchantTransactionId: payment.bankRefId
561
+ merchantTransactionId: bankRefId
559
562
  },
560
563
  amount: payment.amount,
561
564
  debtor: {
@@ -582,6 +585,7 @@ class FinbricksConnector extends IBankConnector {
582
585
  authorizationUrl: response.redirectUrl,
583
586
  payment: {
584
587
  ...payment,
588
+ bankRefId,
585
589
  status: "INITIALIZED",
586
590
  accountId: this.connectedAccounts.find(
587
591
  (acc) => acc.iban === payment.debtorIban
@@ -80,7 +80,7 @@ const accountSelectSchema = drizzleZod.createSelectSchema(account);
80
80
 
81
81
  const accountCredentials = sqliteCore.sqliteTable("account_credentials", {
82
82
  ...backendSdk.base,
83
- accountId: sqliteCore.text("account_id").references(() => account.id).notNull(),
83
+ accountId: sqliteCore.text("account_id").references(() => account.id, { onDelete: "restrict", onUpdate: "cascade" }).notNull(),
84
84
  connectorKey: sqliteCore.text("connector_key", {
85
85
  enum: CONNECTOR_KEYS
86
86
  }).$type().notNull(),
@@ -113,7 +113,10 @@ const batch = sqliteCore.sqliteTable("batch", {
113
113
  mode: "timestamp_ms"
114
114
  }),
115
115
  authorizationUrls: sqliteCore.text("authorization_urls", { mode: "json" }).$type(),
116
- accountId: sqliteCore.text("account_id").references(() => account.id),
116
+ accountId: sqliteCore.text("account_id").references(() => account.id, {
117
+ onDelete: "restrict",
118
+ onUpdate: "cascade"
119
+ }),
117
120
  status: sqliteCore.text("status", { enum: BATCH_STATUSES }).$type(),
118
121
  statusReason: sqliteCore.text("status_reason"),
119
122
  statusResponse: sqliteCore.text("status_response", { mode: "json" }).$type(),
@@ -129,7 +132,10 @@ const payment = sqliteCore.sqliteTable(
129
132
  correlationId: sqliteCore.text("correlation_id").notNull(),
130
133
  refId: sqliteCore.text("ref_id"),
131
134
  bankRefId: sqliteCore.text("bank_ref_id").notNull(),
132
- accountId: sqliteCore.text("account_id").references(() => account.id).notNull(),
135
+ accountId: sqliteCore.text("account_id").references(() => account.id, {
136
+ onDelete: "restrict",
137
+ onUpdate: "cascade"
138
+ }).notNull(),
133
139
  connectorKey: sqliteCore.text("connector_key", { enum: CONNECTOR_KEYS }).$type().notNull(),
134
140
  amount: sqliteCore.real("amount").notNull(),
135
141
  direction: sqliteCore.text("direction").$type().notNull(),
@@ -129,7 +129,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
129
129
  tableName: "batch";
130
130
  dataType: "json";
131
131
  columnType: "SQLiteTextJson";
132
- data: PaymentInsertType[];
132
+ data: BatchPayment[];
133
133
  driverParam: string;
134
134
  notNull: true;
135
135
  hasDefault: false;
@@ -141,7 +141,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
141
141
  identity: undefined;
142
142
  generated: undefined;
143
143
  }, {}, {
144
- $type: PaymentInsertType[];
144
+ $type: BatchPayment[];
145
145
  }>;
146
146
  metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
147
147
  name: "metadata";
@@ -1731,6 +1731,7 @@ type ParsedBankPayment = {
1731
1731
  raw: object;
1732
1732
  parsed: PaymentInsertType;
1733
1733
  };
1734
+ type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
1734
1735
 
1735
1736
  type IncomingPaymentMessage = Omit<PaymentInsertType, 'accountId' | 'connectorKey' | 'bankRefId'>;
1736
1737
  interface OutgoingPaymentMessage extends PaymentInsertType {
@@ -3711,5 +3712,5 @@ type AccountCredentialsUpdateType = z.infer<typeof accountCredentialsInsertSchem
3711
3712
  type AccountCredentialsPatchType = z.infer<typeof accountCredentialsUpdateSchema>;
3712
3713
  type AccountCredentialsSelectType = z.infer<typeof accountCredentialsSelectSchema>;
3713
3714
 
3714
- export { accountCredentialsInsertSchema as $, INSTRUCTION_PRIORITIES as E, PAYMENT_STATUSES as G, PAYMENT_DIRECTIONS as H, IBankConnector as I, ACCOUNT_STATUSES as K, COUNTRY_CODES as N, CONNECTOR_KEYS as R, CREDENTIALS_TYPES as S, TOKEN_TYPES as U, accountInsertSchema as W, accountUpdateSchema as X, accountSelectSchema as Y, accountCredentialsUpdateSchema as a0, accountCredentialsSelectSchema as a1, batch as a5, payment as a6, paymentRelations as a7, ott as a8, account as a9, accountCredentials as aa, tables as t, BATCH_STATUSES as w, PAYMENT_TYPES as x, CHARGE_BEARERS as z };
3715
- export type { AccountSelectType as A, BatchSelectType as B, ConfigEnvironmentBank as C, ChargeBearer as D, InstructionPriority as F, PaymentDirection as J, LastSyncMetadata as L, AccountStatus as M, OutgoingPaymentMessage as O, PaymentSelectType as P, BankAccountWithLastSync as Q, CredentialsType as T, TokenType as V, AccountUpdateType as Z, AccountPatchType as _, ConnectorKey as a, AccountCredentialsUpdateType as a2, AccountCredentialsPatchType as a3, AccountCredentialsSelectType as a4, PaymentInsertType as b, BatchMetadata as c, IncomingPaymentMessage as d, InitiatedPayment as e, ConnectedAccount as f, AccountCredentialsInsertType as g, AccountInsertType as h, PaymentPreparedInsertType as i, InitiatedBatch as j, ParsedBankPayment as k, PaymentStatus as l, BatchStatus as m, CurrencyCode as n, BankCode as o, CountryCode as p, AuthInput as q, Currency as r, PaymentFailedInsertType as s, PaymentInitializedInsertType as u, BatchInsertType as v, PaymentType as y };
3715
+ export { CHARGE_BEARERS as D, INSTRUCTION_PRIORITIES as F, PAYMENT_STATUSES as H, IBankConnector as I, PAYMENT_DIRECTIONS as J, ACCOUNT_STATUSES as M, COUNTRY_CODES as Q, CONNECTOR_KEYS as S, CREDENTIALS_TYPES as T, TOKEN_TYPES as V, accountInsertSchema as X, accountUpdateSchema as Y, accountSelectSchema as Z, accountCredentialsInsertSchema as a0, accountCredentialsUpdateSchema as a1, accountCredentialsSelectSchema as a2, batch as a6, payment as a7, paymentRelations as a8, ott as a9, account as aa, accountCredentials as ab, tables as t, BATCH_STATUSES as x, PAYMENT_TYPES as y };
3716
+ export type { AccountPatchType as $, AccountSelectType as A, BatchSelectType as B, ConfigEnvironmentBank as C, ChargeBearer as E, InstructionPriority as G, PaymentDirection as K, LastSyncMetadata as L, AccountStatus as N, OutgoingPaymentMessage as O, PaymentSelectType as P, BankAccountWithLastSync as R, CredentialsType as U, TokenType as W, AccountUpdateType as _, ConnectorKey as a, AccountCredentialsUpdateType as a3, AccountCredentialsPatchType as a4, AccountCredentialsSelectType as a5, BatchPayment as b, BatchMetadata as c, IncomingPaymentMessage as d, InitiatedPayment as e, ConnectedAccount as f, AccountCredentialsInsertType as g, AccountInsertType as h, PaymentPreparedInsertType as i, InitiatedBatch as j, ParsedBankPayment as k, PaymentStatus as l, BatchStatus as m, CurrencyCode as n, BankCode as o, CountryCode as p, AuthInput as q, Currency as r, PaymentFailedInsertType as s, PaymentInitializedInsertType as u, PaymentInsertType as v, BatchInsertType as w, PaymentType as z };
@@ -129,7 +129,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
129
129
  tableName: "batch";
130
130
  dataType: "json";
131
131
  columnType: "SQLiteTextJson";
132
- data: PaymentInsertType[];
132
+ data: BatchPayment[];
133
133
  driverParam: string;
134
134
  notNull: true;
135
135
  hasDefault: false;
@@ -141,7 +141,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
141
141
  identity: undefined;
142
142
  generated: undefined;
143
143
  }, {}, {
144
- $type: PaymentInsertType[];
144
+ $type: BatchPayment[];
145
145
  }>;
146
146
  metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
147
147
  name: "metadata";
@@ -1731,6 +1731,7 @@ type ParsedBankPayment = {
1731
1731
  raw: object;
1732
1732
  parsed: PaymentInsertType;
1733
1733
  };
1734
+ type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
1734
1735
 
1735
1736
  type IncomingPaymentMessage = Omit<PaymentInsertType, 'accountId' | 'connectorKey' | 'bankRefId'>;
1736
1737
  interface OutgoingPaymentMessage extends PaymentInsertType {
@@ -3711,5 +3712,5 @@ type AccountCredentialsUpdateType = z.infer<typeof accountCredentialsInsertSchem
3711
3712
  type AccountCredentialsPatchType = z.infer<typeof accountCredentialsUpdateSchema>;
3712
3713
  type AccountCredentialsSelectType = z.infer<typeof accountCredentialsSelectSchema>;
3713
3714
 
3714
- export { accountCredentialsInsertSchema as $, INSTRUCTION_PRIORITIES as E, PAYMENT_STATUSES as G, PAYMENT_DIRECTIONS as H, IBankConnector as I, ACCOUNT_STATUSES as K, COUNTRY_CODES as N, CONNECTOR_KEYS as R, CREDENTIALS_TYPES as S, TOKEN_TYPES as U, accountInsertSchema as W, accountUpdateSchema as X, accountSelectSchema as Y, accountCredentialsUpdateSchema as a0, accountCredentialsSelectSchema as a1, batch as a5, payment as a6, paymentRelations as a7, ott as a8, account as a9, accountCredentials as aa, tables as t, BATCH_STATUSES as w, PAYMENT_TYPES as x, CHARGE_BEARERS as z };
3715
- export type { AccountSelectType as A, BatchSelectType as B, ConfigEnvironmentBank as C, ChargeBearer as D, InstructionPriority as F, PaymentDirection as J, LastSyncMetadata as L, AccountStatus as M, OutgoingPaymentMessage as O, PaymentSelectType as P, BankAccountWithLastSync as Q, CredentialsType as T, TokenType as V, AccountUpdateType as Z, AccountPatchType as _, ConnectorKey as a, AccountCredentialsUpdateType as a2, AccountCredentialsPatchType as a3, AccountCredentialsSelectType as a4, PaymentInsertType as b, BatchMetadata as c, IncomingPaymentMessage as d, InitiatedPayment as e, ConnectedAccount as f, AccountCredentialsInsertType as g, AccountInsertType as h, PaymentPreparedInsertType as i, InitiatedBatch as j, ParsedBankPayment as k, PaymentStatus as l, BatchStatus as m, CurrencyCode as n, BankCode as o, CountryCode as p, AuthInput as q, Currency as r, PaymentFailedInsertType as s, PaymentInitializedInsertType as u, BatchInsertType as v, PaymentType as y };
3715
+ export { CHARGE_BEARERS as D, INSTRUCTION_PRIORITIES as F, PAYMENT_STATUSES as H, IBankConnector as I, PAYMENT_DIRECTIONS as J, ACCOUNT_STATUSES as M, COUNTRY_CODES as Q, CONNECTOR_KEYS as S, CREDENTIALS_TYPES as T, TOKEN_TYPES as V, accountInsertSchema as X, accountUpdateSchema as Y, accountSelectSchema as Z, accountCredentialsInsertSchema as a0, accountCredentialsUpdateSchema as a1, accountCredentialsSelectSchema as a2, batch as a6, payment as a7, paymentRelations as a8, ott as a9, account as aa, accountCredentials as ab, tables as t, BATCH_STATUSES as x, PAYMENT_TYPES as y };
3716
+ export type { AccountPatchType as $, AccountSelectType as A, BatchSelectType as B, ConfigEnvironmentBank as C, ChargeBearer as E, InstructionPriority as G, PaymentDirection as K, LastSyncMetadata as L, AccountStatus as N, OutgoingPaymentMessage as O, PaymentSelectType as P, BankAccountWithLastSync as R, CredentialsType as U, TokenType as W, AccountUpdateType as _, ConnectorKey as a, AccountCredentialsUpdateType as a3, AccountCredentialsPatchType as a4, AccountCredentialsSelectType as a5, BatchPayment as b, BatchMetadata as c, IncomingPaymentMessage as d, InitiatedPayment as e, ConnectedAccount as f, AccountCredentialsInsertType as g, AccountInsertType as h, PaymentPreparedInsertType as i, InitiatedBatch as j, ParsedBankPayment as k, PaymentStatus as l, BatchStatus as m, CurrencyCode as n, BankCode as o, CountryCode as p, AuthInput as q, Currency as r, PaymentFailedInsertType as s, PaymentInitializedInsertType as u, PaymentInsertType as v, BatchInsertType as w, PaymentType as z };
@@ -129,7 +129,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
129
129
  tableName: "batch";
130
130
  dataType: "json";
131
131
  columnType: "SQLiteTextJson";
132
- data: PaymentInsertType[];
132
+ data: BatchPayment[];
133
133
  driverParam: string;
134
134
  notNull: true;
135
135
  hasDefault: false;
@@ -141,7 +141,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
141
141
  identity: undefined;
142
142
  generated: undefined;
143
143
  }, {}, {
144
- $type: PaymentInsertType[];
144
+ $type: BatchPayment[];
145
145
  }>;
146
146
  metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
147
147
  name: "metadata";
@@ -1731,6 +1731,7 @@ type ParsedBankPayment = {
1731
1731
  raw: object;
1732
1732
  parsed: PaymentInsertType;
1733
1733
  };
1734
+ type BatchPayment = Omit<PaymentInsertType, 'bankRefId'>;
1734
1735
 
1735
1736
  type IncomingPaymentMessage = Omit<PaymentInsertType, 'accountId' | 'connectorKey' | 'bankRefId'>;
1736
1737
  interface OutgoingPaymentMessage extends PaymentInsertType {
@@ -3711,5 +3712,5 @@ type AccountCredentialsUpdateType = z.infer<typeof accountCredentialsInsertSchem
3711
3712
  type AccountCredentialsPatchType = z.infer<typeof accountCredentialsUpdateSchema>;
3712
3713
  type AccountCredentialsSelectType = z.infer<typeof accountCredentialsSelectSchema>;
3713
3714
 
3714
- export { accountCredentialsInsertSchema as $, INSTRUCTION_PRIORITIES as E, PAYMENT_STATUSES as G, PAYMENT_DIRECTIONS as H, IBankConnector as I, ACCOUNT_STATUSES as K, COUNTRY_CODES as N, CONNECTOR_KEYS as R, CREDENTIALS_TYPES as S, TOKEN_TYPES as U, accountInsertSchema as W, accountUpdateSchema as X, accountSelectSchema as Y, accountCredentialsUpdateSchema as a0, accountCredentialsSelectSchema as a1, batch as a5, payment as a6, paymentRelations as a7, ott as a8, account as a9, accountCredentials as aa, tables as t, BATCH_STATUSES as w, PAYMENT_TYPES as x, CHARGE_BEARERS as z };
3715
- export type { AccountSelectType as A, BatchSelectType as B, ConfigEnvironmentBank as C, ChargeBearer as D, InstructionPriority as F, PaymentDirection as J, LastSyncMetadata as L, AccountStatus as M, OutgoingPaymentMessage as O, PaymentSelectType as P, BankAccountWithLastSync as Q, CredentialsType as T, TokenType as V, AccountUpdateType as Z, AccountPatchType as _, ConnectorKey as a, AccountCredentialsUpdateType as a2, AccountCredentialsPatchType as a3, AccountCredentialsSelectType as a4, PaymentInsertType as b, BatchMetadata as c, IncomingPaymentMessage as d, InitiatedPayment as e, ConnectedAccount as f, AccountCredentialsInsertType as g, AccountInsertType as h, PaymentPreparedInsertType as i, InitiatedBatch as j, ParsedBankPayment as k, PaymentStatus as l, BatchStatus as m, CurrencyCode as n, BankCode as o, CountryCode as p, AuthInput as q, Currency as r, PaymentFailedInsertType as s, PaymentInitializedInsertType as u, BatchInsertType as v, PaymentType as y };
3715
+ export { CHARGE_BEARERS as D, INSTRUCTION_PRIORITIES as F, PAYMENT_STATUSES as H, IBankConnector as I, PAYMENT_DIRECTIONS as J, ACCOUNT_STATUSES as M, COUNTRY_CODES as Q, CONNECTOR_KEYS as S, CREDENTIALS_TYPES as T, TOKEN_TYPES as V, accountInsertSchema as X, accountUpdateSchema as Y, accountSelectSchema as Z, accountCredentialsInsertSchema as a0, accountCredentialsUpdateSchema as a1, accountCredentialsSelectSchema as a2, batch as a6, payment as a7, paymentRelations as a8, ott as a9, account as aa, accountCredentials as ab, tables as t, BATCH_STATUSES as x, PAYMENT_TYPES as y };
3716
+ export type { AccountPatchType as $, AccountSelectType as A, BatchSelectType as B, ConfigEnvironmentBank as C, ChargeBearer as E, InstructionPriority as G, PaymentDirection as K, LastSyncMetadata as L, AccountStatus as N, OutgoingPaymentMessage as O, PaymentSelectType as P, BankAccountWithLastSync as R, CredentialsType as U, TokenType as W, AccountUpdateType as _, ConnectorKey as a, AccountCredentialsUpdateType as a3, AccountCredentialsPatchType as a4, AccountCredentialsSelectType as a5, BatchPayment as b, BatchMetadata as c, IncomingPaymentMessage as d, InitiatedPayment as e, ConnectedAccount as f, AccountCredentialsInsertType as g, AccountInsertType as h, PaymentPreparedInsertType as i, InitiatedBatch as j, ParsedBankPayment as k, PaymentStatus as l, BatchStatus as m, CurrencyCode as n, BankCode as o, CountryCode as p, AuthInput as q, Currency as r, PaymentFailedInsertType as s, PaymentInitializedInsertType as u, PaymentInsertType as v, BatchInsertType as w, PaymentType as z };
@@ -1,10 +1,10 @@
1
- import { t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector } from './bank.eDTSA4Gp.mjs';
1
+ import { t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector } from './bank.BiOcvKnQ.mjs';
2
2
  import { uuidv4 } from '@develit-io/backend-sdk';
3
3
  import { eq } from 'drizzle-orm';
4
4
  import 'date-fns';
5
5
  import 'jose';
6
6
  import '@develit-io/general-codes';
7
- import './bank.C1bHZDjr.mjs';
7
+ import './bank.BPxg79Tw.mjs';
8
8
  import { createHash } from 'node:crypto';
9
9
 
10
10
  const createPaymentCommand = (db, { payment }) => {
package/dist/types.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const drizzle = require('./shared/bank.CW-0OIFF.cjs');
4
- const database_schema = require('./shared/bank.DoHc7geB.cjs');
3
+ const drizzle = require('./shared/bank.BdlPpN78.cjs');
4
+ const database_schema = require('./shared/bank.BnDb4liE.cjs');
5
5
  const generalCodes = require('@develit-io/general-codes');
6
6
  require('@develit-io/backend-sdk');
7
7
  require('date-fns');
package/dist/types.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.B9ZliW26.cjs';
2
- export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.B9ZliW26.cjs';
1
+ import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.Clkw7jCx.cjs';
2
+ export { M as ACCOUNT_STATUSES, a4 as AccountCredentialsPatchType, a5 as AccountCredentialsSelectType, a3 as AccountCredentialsUpdateType, $ as AccountPatchType, N as AccountStatus, _ as AccountUpdateType, x as BATCH_STATUES, x as BATCH_STATUSES, R as BankAccountWithLastSync, w as BatchInsertType, b as BatchPayment, B as BatchSelectType, D as CHARGE_BEARERS, S as CONNECTOR_KEYS, Q as COUNTRY_CODES, T as CREDENTIALS_TYPES, E as ChargeBearer, C as ConfigEnvironmentBank, U as CredentialsType, F as INSTRUCTION_PRIORITIES, G as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, J as PAYMENT_DIRECTIONS, H as PAYMENT_STATUSES, y as PAYMENT_TYPES, K as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, v as PaymentInsertType, z as PaymentType, V as TOKEN_TYPES, W as TokenType, a0 as accountCredentialsInsertSchema, a2 as accountCredentialsSelectSchema, a1 as accountCredentialsUpdateSchema, X as accountInsertSchema, Z as accountSelectSchema, Y as accountUpdateSchema } from './shared/bank.Clkw7jCx.cjs';
3
3
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.cjs';
package/dist/types.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.B9ZliW26.mjs';
2
- export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.B9ZliW26.mjs';
1
+ import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.Clkw7jCx.mjs';
2
+ export { M as ACCOUNT_STATUSES, a4 as AccountCredentialsPatchType, a5 as AccountCredentialsSelectType, a3 as AccountCredentialsUpdateType, $ as AccountPatchType, N as AccountStatus, _ as AccountUpdateType, x as BATCH_STATUES, x as BATCH_STATUSES, R as BankAccountWithLastSync, w as BatchInsertType, b as BatchPayment, B as BatchSelectType, D as CHARGE_BEARERS, S as CONNECTOR_KEYS, Q as COUNTRY_CODES, T as CREDENTIALS_TYPES, E as ChargeBearer, C as ConfigEnvironmentBank, U as CredentialsType, F as INSTRUCTION_PRIORITIES, G as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, J as PAYMENT_DIRECTIONS, H as PAYMENT_STATUSES, y as PAYMENT_TYPES, K as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, v as PaymentInsertType, z as PaymentType, V as TOKEN_TYPES, W as TokenType, a0 as accountCredentialsInsertSchema, a2 as accountCredentialsSelectSchema, a1 as accountCredentialsUpdateSchema, X as accountInsertSchema, Z as accountSelectSchema, Y as accountUpdateSchema } from './shared/bank.Clkw7jCx.mjs';
3
3
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.mjs';
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.B9ZliW26.js';
2
- export { K as ACCOUNT_STATUSES, a3 as AccountCredentialsPatchType, a4 as AccountCredentialsSelectType, a2 as AccountCredentialsUpdateType, _ as AccountPatchType, M as AccountStatus, Z as AccountUpdateType, w as BATCH_STATUES, w as BATCH_STATUSES, Q as BankAccountWithLastSync, v as BatchInsertType, B as BatchSelectType, z as CHARGE_BEARERS, R as CONNECTOR_KEYS, N as COUNTRY_CODES, S as CREDENTIALS_TYPES, D as ChargeBearer, C as ConfigEnvironmentBank, T as CredentialsType, E as INSTRUCTION_PRIORITIES, F as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, H as PAYMENT_DIRECTIONS, G as PAYMENT_STATUSES, x as PAYMENT_TYPES, J as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, b as PaymentInsertType, y as PaymentType, U as TOKEN_TYPES, V as TokenType, $ as accountCredentialsInsertSchema, a1 as accountCredentialsSelectSchema, a0 as accountCredentialsUpdateSchema, W as accountInsertSchema, Y as accountSelectSchema, X as accountUpdateSchema } from './shared/bank.B9ZliW26.js';
1
+ import { I as IBankConnector, d as IncomingPaymentMessage, e as InitiatedPayment, a as ConnectorKey, f as ConnectedAccount, g as AccountCredentialsInsertType, h as AccountInsertType, i as PaymentPreparedInsertType, j as InitiatedBatch, c as BatchMetadata, A as AccountSelectType, k as ParsedBankPayment, l as PaymentStatus, m as BatchStatus, n as CurrencyCode, o as BankCode, p as CountryCode, q as AuthInput, t as tables, r as Currency, P as PaymentSelectType } from './shared/bank.Clkw7jCx.js';
2
+ export { M as ACCOUNT_STATUSES, a4 as AccountCredentialsPatchType, a5 as AccountCredentialsSelectType, a3 as AccountCredentialsUpdateType, $ as AccountPatchType, N as AccountStatus, _ as AccountUpdateType, x as BATCH_STATUES, x as BATCH_STATUSES, R as BankAccountWithLastSync, w as BatchInsertType, b as BatchPayment, B as BatchSelectType, D as CHARGE_BEARERS, S as CONNECTOR_KEYS, Q as COUNTRY_CODES, T as CREDENTIALS_TYPES, E as ChargeBearer, C as ConfigEnvironmentBank, U as CredentialsType, F as INSTRUCTION_PRIORITIES, G as InstructionPriority, L as LastSyncMetadata, O as OutgoingPaymentMessage, J as PAYMENT_DIRECTIONS, H as PAYMENT_STATUSES, y as PAYMENT_TYPES, K as PaymentDirection, s as PaymentFailedInsertType, u as PaymentInitializedInsertType, v as PaymentInsertType, z as PaymentType, V as TOKEN_TYPES, W as TokenType, a0 as accountCredentialsInsertSchema, a2 as accountCredentialsSelectSchema, a1 as accountCredentialsUpdateSchema, X as accountInsertSchema, Z as accountSelectSchema, Y as accountUpdateSchema } from './shared/bank.Clkw7jCx.js';
3
3
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.Dh_H_5rC.js';
package/dist/types.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.eDTSA4Gp.mjs';
2
- export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, d as CONNECTOR_KEYS, c as COUNTRY_CODES, e as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, b as PAYMENT_DIRECTIONS, a as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, i as accountCredentialsInsertSchema, k as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, f as accountInsertSchema, h as accountSelectSchema, g as accountUpdateSchema, o as ottInsertSchema, m as ottSelectSchema, l as ottUpdateSchema } from './shared/bank.C1bHZDjr.mjs';
1
+ export { E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.BiOcvKnQ.mjs';
2
+ export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, d as CONNECTOR_KEYS, c as COUNTRY_CODES, e as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, b as PAYMENT_DIRECTIONS, a as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, i as accountCredentialsInsertSchema, k as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, f as accountInsertSchema, h as accountSelectSchema, g as accountUpdateSchema, o as ottInsertSchema, m as ottSelectSchema, l as ottUpdateSchema } from './shared/bank.BPxg79Tw.mjs';
3
3
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
4
4
  import '@develit-io/backend-sdk';
5
5
  import 'date-fns';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.3.55",
3
+ "version": "0.3.56",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {