@develit-services/bank 0.0.20 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export { c as batch, o as ott, d as payment, e as paymentRelations } from '../shared/bank.BuNG2S8h.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.BuNG2S8h.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.BuNG2S8h.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';
@@ -3,7 +3,7 @@
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.DQn99N-C.cjs');
6
+ const db = require('../shared/bank.DmwWNL_H.cjs');
7
7
  const cloudflare_workers = require('cloudflare:workers');
8
8
  const d1 = require('drizzle-orm/d1');
9
9
  const zod = require('zod');
@@ -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.BuNG2S8h.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.DmypH3Au.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';
@@ -241,16 +241,16 @@ declare class BankServiceBase extends BankServiceBase_base {
241
241
  addPaymentsToBatch({ paymentsToBatch, }: {
242
242
  paymentsToBatch: SendPaymentInput[];
243
243
  }): Promise<IRPCResponse<{
244
+ batchPaymentInitiatedAt: Date | null;
245
+ authorizationUrls: string | string[] | null;
244
246
  accountId: string | null;
247
+ status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
248
+ payments: PaymentInsertType[];
249
+ metadata: object | null;
245
250
  id: string;
246
251
  createdAt: Date | null;
247
252
  updatedAt: Date | null;
248
253
  deletedAt: Date | null;
249
- status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
250
- batchPaymentInitiatedAt: Date | null;
251
- authorizationUrls: string | string[] | null;
252
- payments: PaymentInsertType[];
253
- metadata: object | null;
254
254
  }[] | undefined>>;
255
255
  processBatch(input: ProcessBatchInput): Promise<IRPCResponse<void>>;
256
256
  queue(b: MessageBatch<SendPaymentInput>): Promise<void>;
@@ -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.BuNG2S8h.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.DWVLVMDa.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';
@@ -241,16 +241,16 @@ declare class BankServiceBase extends BankServiceBase_base {
241
241
  addPaymentsToBatch({ paymentsToBatch, }: {
242
242
  paymentsToBatch: SendPaymentInput[];
243
243
  }): Promise<IRPCResponse<{
244
+ batchPaymentInitiatedAt: Date | null;
245
+ authorizationUrls: string | string[] | null;
244
246
  accountId: string | null;
247
+ status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
248
+ payments: PaymentInsertType[];
249
+ metadata: object | null;
245
250
  id: string;
246
251
  createdAt: Date | null;
247
252
  updatedAt: Date | null;
248
253
  deletedAt: Date | null;
249
- status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
250
- batchPaymentInitiatedAt: Date | null;
251
- authorizationUrls: string | string[] | null;
252
- payments: PaymentInsertType[];
253
- metadata: object | null;
254
254
  }[] | undefined>>;
255
255
  processBatch(input: ProcessBatchInput): Promise<IRPCResponse<void>>;
256
256
  queue(b: MessageBatch<SendPaymentInput>): Promise<void>;
@@ -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.BuNG2S8h.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.BkLncGmL.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';
@@ -241,16 +241,16 @@ declare class BankServiceBase extends BankServiceBase_base {
241
241
  addPaymentsToBatch({ paymentsToBatch, }: {
242
242
  paymentsToBatch: SendPaymentInput[];
243
243
  }): Promise<IRPCResponse<{
244
+ batchPaymentInitiatedAt: Date | null;
245
+ authorizationUrls: string | string[] | null;
244
246
  accountId: string | null;
247
+ status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
248
+ payments: PaymentInsertType[];
249
+ metadata: object | null;
245
250
  id: string;
246
251
  createdAt: Date | null;
247
252
  updatedAt: Date | null;
248
253
  deletedAt: Date | null;
249
- status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
250
- batchPaymentInitiatedAt: Date | null;
251
- authorizationUrls: string | string[] | null;
252
- payments: PaymentInsertType[];
253
- metadata: object | null;
254
254
  }[] | undefined>>;
255
255
  processBatch(input: ProcessBatchInput): Promise<IRPCResponse<void>>;
256
256
  queue(b: MessageBatch<SendPaymentInput>): Promise<void>;
@@ -1,5 +1,5 @@
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.CNpjRxvL.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.DGHQNxSO.mjs';
3
3
  import { WorkerEntrypoint } from 'cloudflare:workers';
4
4
  import { drizzle } from 'drizzle-orm/d1';
5
5
  import { z } from 'zod';
@@ -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.BuNG2S8h.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"];
@@ -276,13 +276,19 @@ class FinbricksConnector extends IBankConnector {
276
276
  }
277
277
  async getClientIds() {
278
278
  let saved = await this.kv.get(this.storageKey);
279
+ console.log("storage key", this.storageKey);
280
+ console.log("saved ids", saved);
279
281
  if (!saved) {
282
+ console.log("not saved", true);
280
283
  const empty = Object.fromEntries(CONNECTOR_KEYS.map((v) => [v, ""]));
281
284
  empty["FIO"] = "d32a83cf-d352-41f3-96d7-4d2961336ddc";
285
+ console.log("empty", empty);
282
286
  await this.kv.put(this.storageKey, JSON.stringify(empty));
283
287
  saved = JSON.stringify(empty);
284
288
  }
289
+ console.log("saved ids after", saved);
285
290
  this._clientIds = JSON.parse(saved);
291
+ console.log("client ids", this._clientIds);
286
292
  return this._clientIds;
287
293
  }
288
294
  async setClientIds(value) {
@@ -467,6 +473,24 @@ class FinbricksConnector extends IBankConnector {
467
473
  let cursor = null;
468
474
  const allPayments = [];
469
475
  const fetchTransactions = async (cursor2) => {
476
+ console.log("provider", this.PROVIDER);
477
+ console.log("clientids", this._clientIds);
478
+ console.log("clientid", this._clientIds[this.PROVIDER]);
479
+ console.log({
480
+ method: "GET",
481
+ endpoint: FINBRICKS_ENDPOINTS.ACCOUNT_TRANSACTIONS,
482
+ query: {
483
+ merchantId: this.finbricks.MERCHANT_ID,
484
+ clientId: this._clientIds[this.PROVIDER],
485
+ paymentProvider: this.PROVIDER,
486
+ bankAccountId: account.identification.number,
487
+ dateFrom,
488
+ dateTo,
489
+ currency: account.currency,
490
+ size: "20",
491
+ cursor: cursor2 ?? void 0
492
+ }
493
+ });
470
494
  return useResult(
471
495
  this.finbricks.request({
472
496
  method: "GET",
@@ -486,18 +510,18 @@ class FinbricksConnector extends IBankConnector {
486
510
  );
487
511
  };
488
512
  do {
489
- {
490
- const [response, error] = await fetchTransactions(cursor);
491
- if (error || !response) {
492
- throw createInternalError(error, {
493
- message: "Finbricks: failed to fetch account transactions"
494
- });
495
- }
496
- const { transactions, links } = response;
497
- cursor = links?.[0]?.value || null;
498
- for (const tx of transactions) {
499
- allPayments.push(mapFinbricksTransactionToPayment(tx, account));
500
- }
513
+ const [response, error] = await fetchTransactions(cursor);
514
+ if (error || !response) {
515
+ console.log("error", error);
516
+ console.log("reponse", response);
517
+ throw createInternalError(error, {
518
+ message: "Finbricks: failed to fetch account transactions"
519
+ });
520
+ }
521
+ const { transactions, links } = response;
522
+ cursor = links?.[0]?.value || null;
523
+ for (const tx of transactions) {
524
+ allPayments.push(mapFinbricksTransactionToPayment(tx, account));
501
525
  }
502
526
  } while (cursor != null);
503
527
  return allPayments;
@@ -278,13 +278,19 @@ class FinbricksConnector extends IBankConnector {
278
278
  }
279
279
  async getClientIds() {
280
280
  let saved = await this.kv.get(this.storageKey);
281
+ console.log("storage key", this.storageKey);
282
+ console.log("saved ids", saved);
281
283
  if (!saved) {
284
+ console.log("not saved", true);
282
285
  const empty = Object.fromEntries(database_schema.CONNECTOR_KEYS.map((v) => [v, ""]));
283
286
  empty["FIO"] = "d32a83cf-d352-41f3-96d7-4d2961336ddc";
287
+ console.log("empty", empty);
284
288
  await this.kv.put(this.storageKey, JSON.stringify(empty));
285
289
  saved = JSON.stringify(empty);
286
290
  }
291
+ console.log("saved ids after", saved);
287
292
  this._clientIds = JSON.parse(saved);
293
+ console.log("client ids", this._clientIds);
288
294
  return this._clientIds;
289
295
  }
290
296
  async setClientIds(value) {
@@ -469,6 +475,24 @@ class FinbricksConnector extends IBankConnector {
469
475
  let cursor = null;
470
476
  const allPayments = [];
471
477
  const fetchTransactions = async (cursor2) => {
478
+ console.log("provider", this.PROVIDER);
479
+ console.log("clientids", this._clientIds);
480
+ console.log("clientid", this._clientIds[this.PROVIDER]);
481
+ console.log({
482
+ method: "GET",
483
+ endpoint: FINBRICKS_ENDPOINTS.ACCOUNT_TRANSACTIONS,
484
+ query: {
485
+ merchantId: this.finbricks.MERCHANT_ID,
486
+ clientId: this._clientIds[this.PROVIDER],
487
+ paymentProvider: this.PROVIDER,
488
+ bankAccountId: account.identification.number,
489
+ dateFrom,
490
+ dateTo,
491
+ currency: account.currency,
492
+ size: "20",
493
+ cursor: cursor2 ?? void 0
494
+ }
495
+ });
472
496
  return backendSdk.useResult(
473
497
  this.finbricks.request({
474
498
  method: "GET",
@@ -488,18 +512,18 @@ class FinbricksConnector extends IBankConnector {
488
512
  );
489
513
  };
490
514
  do {
491
- {
492
- const [response, error] = await fetchTransactions(cursor);
493
- if (error || !response) {
494
- throw backendSdk.createInternalError(error, {
495
- message: "Finbricks: failed to fetch account transactions"
496
- });
497
- }
498
- const { transactions, links } = response;
499
- cursor = links?.[0]?.value || null;
500
- for (const tx of transactions) {
501
- allPayments.push(mapFinbricksTransactionToPayment(tx, account));
502
- }
515
+ const [response, error] = await fetchTransactions(cursor);
516
+ if (error || !response) {
517
+ console.log("error", error);
518
+ console.log("reponse", response);
519
+ throw backendSdk.createInternalError(error, {
520
+ message: "Finbricks: failed to fetch account transactions"
521
+ });
522
+ }
523
+ const { transactions, links } = response;
524
+ cursor = links?.[0]?.value || null;
525
+ for (const tx of transactions) {
526
+ allPayments.push(mapFinbricksTransactionToPayment(tx, account));
503
527
  }
504
528
  } while (cursor != null);
505
529
  return allPayments;
@@ -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.BuNG2S8h.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";
@@ -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";
@@ -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";
@@ -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.BuNG2S8h.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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const db = require('./shared/bank.DQn99N-C.cjs');
3
+ const db = require('./shared/bank.DmwWNL_H.cjs');
4
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');
package/dist/types.d.cts CHANGED
@@ -1,7 +1,7 @@
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.DmypH3Au.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.DmypH3Au.cjs';
3
- import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.BuNG2S8h.cjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.BuNG2S8h.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
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.cjs';
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
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.DWVLVMDa.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.DWVLVMDa.mjs';
3
- import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.BuNG2S8h.mjs';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.BuNG2S8h.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
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.mjs';
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
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.BkLncGmL.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.BkLncGmL.js';
3
- import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.BuNG2S8h.js';
4
- export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.BuNG2S8h.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
7
  export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.js';
package/dist/types.mjs CHANGED
@@ -1,4 +1,4 @@
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';
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.DGHQNxSO.mjs';
2
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {