@develit-services/bank 0.0.4 → 0.0.6

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.
package/dist/@types.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { b as CurrencyCode, c as BankCode, d as CountryCode, I as IBankConnector, a as ConnectorKey, A as AuthInput, e as IncomingPaymentMessage, P as PaymentPreparedInsertType, f as InitiatedBatch, g as InitiatedPayment, C as ConfigBankAccount, S as SyncLog, h as BatchMetadata, i as Currency } from './shared/bank.C28GtA5s.cjs';
2
- export { k as BATCH_STATUES, k as BATCH_STATUSES, l as BatchStatus, t as COUNTRY_CODES, O as OutgoingPaymentMessage, r as PAYMENT_DIRECTIONS, o as PAYMENT_STATUSES, m as PAYMENT_TYPES, s as PaymentDirection, j as PaymentFailedInsertType, q as PaymentStatus, n as PaymentType, p as paymentInitializedInsertType } from './shared/bank.C28GtA5s.cjs';
3
- import { t as tables, a as PaymentInsertType } from './shared/bank.CBNQZ5Pd.cjs';
4
- export { b as BatchInsertType, B as BatchSelectType, P as PaymentSelectType, p as paymentInsertTypeZod } from './shared/bank.CBNQZ5Pd.cjs';
1
+ import { b as CurrencyCode, c as BankCode, d as CountryCode, I as IBankConnector, a as ConnectorKey, A as AuthInput, e as IncomingPaymentMessage, P as PaymentPreparedInsertType, f as InitiatedBatch, g as InitiatedPayment, C as ConfigBankAccount, S as SyncLog, h as BatchMetadata, i as Currency } from './shared/bank.DmLulSzu.cjs';
2
+ export { k as BATCH_STATUES, k as BATCH_STATUSES, l as BatchStatus, t as COUNTRY_CODES, O as OutgoingPaymentMessage, r as PAYMENT_DIRECTIONS, o as PAYMENT_STATUSES, m as PAYMENT_TYPES, s as PaymentDirection, j as PaymentFailedInsertType, q as PaymentStatus, n as PaymentType, p as paymentInitializedInsertType } from './shared/bank.DmLulSzu.cjs';
3
+ import { t as tables, a as PaymentInsertType } from './shared/bank.dxpKOn1t.cjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, P as PaymentSelectType, p as paymentInsertTypeZod } from './shared/bank.dxpKOn1t.cjs';
5
5
  import { Environment } 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.DxGqqFhD.cjs';
package/dist/@types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { b as CurrencyCode, c as BankCode, d as CountryCode, I as IBankConnector, a as ConnectorKey, A as AuthInput, e as IncomingPaymentMessage, P as PaymentPreparedInsertType, f as InitiatedBatch, g as InitiatedPayment, C as ConfigBankAccount, S as SyncLog, h as BatchMetadata, i as Currency } from './shared/bank.LCrZu9Ic.mjs';
2
- export { k as BATCH_STATUES, k as BATCH_STATUSES, l as BatchStatus, t as COUNTRY_CODES, O as OutgoingPaymentMessage, r as PAYMENT_DIRECTIONS, o as PAYMENT_STATUSES, m as PAYMENT_TYPES, s as PaymentDirection, j as PaymentFailedInsertType, q as PaymentStatus, n as PaymentType, p as paymentInitializedInsertType } from './shared/bank.LCrZu9Ic.mjs';
3
- import { t as tables, a as PaymentInsertType } from './shared/bank.CBNQZ5Pd.mjs';
4
- export { b as BatchInsertType, B as BatchSelectType, P as PaymentSelectType, p as paymentInsertTypeZod } from './shared/bank.CBNQZ5Pd.mjs';
1
+ import { b as CurrencyCode, c as BankCode, d as CountryCode, I as IBankConnector, a as ConnectorKey, A as AuthInput, e as IncomingPaymentMessage, P as PaymentPreparedInsertType, f as InitiatedBatch, g as InitiatedPayment, C as ConfigBankAccount, S as SyncLog, h as BatchMetadata, i as Currency } from './shared/bank.DqT4zUJn.mjs';
2
+ export { k as BATCH_STATUES, k as BATCH_STATUSES, l as BatchStatus, t as COUNTRY_CODES, O as OutgoingPaymentMessage, r as PAYMENT_DIRECTIONS, o as PAYMENT_STATUSES, m as PAYMENT_TYPES, s as PaymentDirection, j as PaymentFailedInsertType, q as PaymentStatus, n as PaymentType, p as paymentInitializedInsertType } from './shared/bank.DqT4zUJn.mjs';
3
+ import { t as tables, a as PaymentInsertType } from './shared/bank.dxpKOn1t.mjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, P as PaymentSelectType, p as paymentInsertTypeZod } from './shared/bank.dxpKOn1t.mjs';
5
5
  import { Environment } 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.DxGqqFhD.mjs';
package/dist/@types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { b as CurrencyCode, c as BankCode, d as CountryCode, I as IBankConnector, a as ConnectorKey, A as AuthInput, e as IncomingPaymentMessage, P as PaymentPreparedInsertType, f as InitiatedBatch, g as InitiatedPayment, C as ConfigBankAccount, S as SyncLog, h as BatchMetadata, i as Currency } from './shared/bank.atHmEWmc.js';
2
- export { k as BATCH_STATUES, k as BATCH_STATUSES, l as BatchStatus, t as COUNTRY_CODES, O as OutgoingPaymentMessage, r as PAYMENT_DIRECTIONS, o as PAYMENT_STATUSES, m as PAYMENT_TYPES, s as PaymentDirection, j as PaymentFailedInsertType, q as PaymentStatus, n as PaymentType, p as paymentInitializedInsertType } from './shared/bank.atHmEWmc.js';
3
- import { t as tables, a as PaymentInsertType } from './shared/bank.CBNQZ5Pd.js';
4
- export { b as BatchInsertType, B as BatchSelectType, P as PaymentSelectType, p as paymentInsertTypeZod } from './shared/bank.CBNQZ5Pd.js';
1
+ import { b as CurrencyCode, c as BankCode, d as CountryCode, I as IBankConnector, a as ConnectorKey, A as AuthInput, e as IncomingPaymentMessage, P as PaymentPreparedInsertType, f as InitiatedBatch, g as InitiatedPayment, C as ConfigBankAccount, S as SyncLog, h as BatchMetadata, i as Currency } from './shared/bank.B72_bFlr.js';
2
+ export { k as BATCH_STATUES, k as BATCH_STATUSES, l as BatchStatus, t as COUNTRY_CODES, O as OutgoingPaymentMessage, r as PAYMENT_DIRECTIONS, o as PAYMENT_STATUSES, m as PAYMENT_TYPES, s as PaymentDirection, j as PaymentFailedInsertType, q as PaymentStatus, n as PaymentType, p as paymentInitializedInsertType } from './shared/bank.B72_bFlr.js';
3
+ import { t as tables, a as PaymentInsertType } from './shared/bank.dxpKOn1t.js';
4
+ export { b as BatchInsertType, B as BatchSelectType, P as PaymentSelectType, p as paymentInsertTypeZod } from './shared/bank.dxpKOn1t.js';
5
5
  import { Environment } 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.DxGqqFhD.js';
@@ -1,4 +1,4 @@
1
- export { c as batch, d as payment, e as paymentRelations } from '../shared/bank.CBNQZ5Pd.cjs';
1
+ export { c as batch, d as payment, e as paymentRelations } from '../shared/bank.dxpKOn1t.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, d as payment, e as paymentRelations } from '../shared/bank.CBNQZ5Pd.mjs';
1
+ export { c as batch, d as payment, e as paymentRelations } from '../shared/bank.dxpKOn1t.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, d as payment, e as paymentRelations } from '../shared/bank.CBNQZ5Pd.js';
1
+ export { c as batch, d as payment, e as paymentRelations } from '../shared/bank.dxpKOn1t.js';
2
2
  import 'drizzle-orm/sqlite-core';
3
3
  import 'drizzle-orm';
4
4
  import 'zod';
@@ -612,11 +612,11 @@ const useSync = (kv) => {
612
612
  };
613
613
 
614
614
  const seperateSupportedPayments = (mappedPayments, accounts) => {
615
- const ibans = new Set(accounts.map((acc) => acc.identification.iban));
616
- const currencies = new Set(accounts.map((acc) => acc.currency));
617
615
  const [supportedPayments, unsupportedPayments] = mappedPayments.reduce(
618
616
  ([valid, invalid], payment) => {
619
- const isValid = ibans.has(payment.debtorIban ?? "") && currencies.has(payment.currency);
617
+ const isValid = accounts.some(
618
+ (acc) => acc.identification.iban === payment.debtorIban && acc.currency === payment.currency
619
+ );
620
620
  if (isValid) {
621
621
  valid.push(payment);
622
622
  } else {
@@ -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.CBNQZ5Pd.cjs';
3
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.dxpKOn1t.cjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import { z } from 'zod';
7
- import { I as IBankConnector, C as ConfigBankAccount, a as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.C28GtA5s.cjs';
7
+ import { I as IBankConnector, C as ConfigBankAccount, a as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.DmLulSzu.cjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'drizzle-orm';
10
10
  import '@develit-io/general-codes';
@@ -209,10 +209,10 @@ declare class BankServiceBase extends BankServiceBase_base {
209
209
  addPaymentsToBatch({ paymentsToBatch, }: {
210
210
  paymentsToBatch: SendPaymentInput[];
211
211
  }): Promise<IRPCResponse<{
212
+ status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
212
213
  batchPaymentInitiatedAt: Date | null;
213
214
  authorizationUrls: string | string[] | null;
214
215
  accountId: string | null;
215
- status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
216
216
  payments: PaymentInsertType[];
217
217
  metadata: object | null;
218
218
  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.CBNQZ5Pd.mjs';
3
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.dxpKOn1t.mjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import { z } from 'zod';
7
- import { I as IBankConnector, C as ConfigBankAccount, a as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.LCrZu9Ic.mjs';
7
+ import { I as IBankConnector, C as ConfigBankAccount, a as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.DqT4zUJn.mjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'drizzle-orm';
10
10
  import '@develit-io/general-codes';
@@ -209,10 +209,10 @@ declare class BankServiceBase extends BankServiceBase_base {
209
209
  addPaymentsToBatch({ paymentsToBatch, }: {
210
210
  paymentsToBatch: SendPaymentInput[];
211
211
  }): Promise<IRPCResponse<{
212
+ status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
212
213
  batchPaymentInitiatedAt: Date | null;
213
214
  authorizationUrls: string | string[] | null;
214
215
  accountId: string | null;
215
- status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
216
216
  payments: PaymentInsertType[];
217
217
  metadata: object | null;
218
218
  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.CBNQZ5Pd.js';
3
+ import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.dxpKOn1t.js';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import { z } from 'zod';
7
- import { I as IBankConnector, C as ConfigBankAccount, a as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.atHmEWmc.js';
7
+ import { I as IBankConnector, C as ConfigBankAccount, a as ConnectorKey, B as BankAccountWithLastSync } from '../shared/bank.B72_bFlr.js';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import 'drizzle-orm';
10
10
  import '@develit-io/general-codes';
@@ -209,10 +209,10 @@ declare class BankServiceBase extends BankServiceBase_base {
209
209
  addPaymentsToBatch({ paymentsToBatch, }: {
210
210
  paymentsToBatch: SendPaymentInput[];
211
211
  }): Promise<IRPCResponse<{
212
+ status: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | null;
212
213
  batchPaymentInitiatedAt: Date | null;
213
214
  authorizationUrls: string | string[] | null;
214
215
  accountId: string | null;
215
- status: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED" | null;
216
216
  payments: PaymentInsertType[];
217
217
  metadata: object | null;
218
218
  id: string;
@@ -604,11 +604,11 @@ const useSync = (kv) => {
604
604
  };
605
605
 
606
606
  const seperateSupportedPayments = (mappedPayments, accounts) => {
607
- const ibans = new Set(accounts.map((acc) => acc.identification.iban));
608
- const currencies = new Set(accounts.map((acc) => acc.currency));
609
607
  const [supportedPayments, unsupportedPayments] = mappedPayments.reduce(
610
608
  ([valid, invalid], payment) => {
611
- const isValid = ibans.has(payment.debtorIban ?? "") && currencies.has(payment.currency);
609
+ const isValid = accounts.some(
610
+ (acc) => acc.identification.iban === payment.debtorIban && acc.currency === payment.currency
611
+ );
612
612
  if (isValid) {
613
613
  valid.push(payment);
614
614
  } else {
@@ -3,6 +3,7 @@
3
3
  function defineBankServiceWrangler(config) {
4
4
  const { project, name, envs } = config;
5
5
  const base = {
6
+ project,
6
7
  name,
7
8
  main: "./src/index.ts",
8
9
  compatibility_date: "2025-06-04",
@@ -45,7 +46,7 @@ function defineBankServiceWrangler(config) {
45
46
  d1_databases: [
46
47
  {
47
48
  binding: "BANK_D1",
48
- database_name: name,
49
+ database_name: `${project}-${name}`,
49
50
  database_id: envs.local.d1.id,
50
51
  migrations_dir: "./src/database/migrations"
51
52
  }
@@ -93,8 +94,8 @@ function defineBankServiceWrangler(config) {
93
94
  ],
94
95
  d1_databases: [
95
96
  {
96
- binding: "NOTIFICATION_D1",
97
- database_name: `${name}-${envName}`,
97
+ binding: "BANK_D1",
98
+ database_name: `${project}-${name}-${envName}`,
98
99
  database_id: envCfg.d1.id,
99
100
  migrations_dir: "./src/database/migrations"
100
101
  }
@@ -119,7 +120,7 @@ function defineBankServiceWrangler(config) {
119
120
  queue: `${project}-payments-ready-to-batch-${envName}`,
120
121
  max_batch_size: envCfg.queue?.max_batch_size ?? 1,
121
122
  max_batch_timeout: envCfg.queue?.max_batch_timeout ?? 5,
122
- dead_letter_queue: `${project}-payments-ready-to-batch-dlq`
123
+ dead_letter_queue: `${project}-payments-ready-to-batch-dlq-${envName}`
123
124
  }
124
125
  ]
125
126
  }
@@ -1,6 +1,7 @@
1
1
  import { B as BankServiceWranglerConfig } from '../shared/bank.DxGqqFhD.cjs';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
+ project: string;
4
5
  name: string;
5
6
  main: string;
6
7
  compatibility_date: string;
@@ -1,6 +1,7 @@
1
1
  import { B as BankServiceWranglerConfig } from '../shared/bank.DxGqqFhD.mjs';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
+ project: string;
4
5
  name: string;
5
6
  main: string;
6
7
  compatibility_date: string;
@@ -1,6 +1,7 @@
1
1
  import { B as BankServiceWranglerConfig } from '../shared/bank.DxGqqFhD.js';
2
2
 
3
3
  declare function defineBankServiceWrangler(config: BankServiceWranglerConfig): {
4
+ project: string;
4
5
  name: string;
5
6
  main: string;
6
7
  compatibility_date: string;
@@ -1,6 +1,7 @@
1
1
  function defineBankServiceWrangler(config) {
2
2
  const { project, name, envs } = config;
3
3
  const base = {
4
+ project,
4
5
  name,
5
6
  main: "./src/index.ts",
6
7
  compatibility_date: "2025-06-04",
@@ -43,7 +44,7 @@ function defineBankServiceWrangler(config) {
43
44
  d1_databases: [
44
45
  {
45
46
  binding: "BANK_D1",
46
- database_name: name,
47
+ database_name: `${project}-${name}`,
47
48
  database_id: envs.local.d1.id,
48
49
  migrations_dir: "./src/database/migrations"
49
50
  }
@@ -91,8 +92,8 @@ function defineBankServiceWrangler(config) {
91
92
  ],
92
93
  d1_databases: [
93
94
  {
94
- binding: "NOTIFICATION_D1",
95
- database_name: `${name}-${envName}`,
95
+ binding: "BANK_D1",
96
+ database_name: `${project}-${name}-${envName}`,
96
97
  database_id: envCfg.d1.id,
97
98
  migrations_dir: "./src/database/migrations"
98
99
  }
@@ -117,7 +118,7 @@ function defineBankServiceWrangler(config) {
117
118
  queue: `${project}-payments-ready-to-batch-${envName}`,
118
119
  max_batch_size: envCfg.queue?.max_batch_size ?? 1,
119
120
  max_batch_timeout: envCfg.queue?.max_batch_timeout ?? 5,
120
- dead_letter_queue: `${project}-payments-ready-to-batch-dlq`
121
+ dead_letter_queue: `${project}-payments-ready-to-batch-dlq-${envName}`
121
122
  }
122
123
  ]
123
124
  }
@@ -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.CBNQZ5Pd.js';
3
+ import { a as PaymentInsertType, t as tables } from './bank.dxpKOn1t.js';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
 
6
6
  declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
@@ -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.CBNQZ5Pd.cjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.dxpKOn1t.cjs';
4
4
  import { DrizzleD1Database } from 'drizzle-orm/d1';
5
5
 
6
6
  declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
@@ -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.CBNQZ5Pd.mjs';
3
+ import { a as PaymentInsertType, t as tables } from './bank.dxpKOn1t.mjs';
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
- COMPLETED: "COMPLETED";
86
- FAILED: "FAILED";
87
85
  INITIALIZED: "INITIALIZED";
86
+ FAILED: "FAILED";
88
87
  PENDING: "PENDING";
88
+ COMPLETED: "COMPLETED";
89
89
  CREATED: "CREATED";
90
90
  }>;
91
91
  batchId: z.ZodString;
@@ -163,7 +163,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
163
163
  tableName: "batch";
164
164
  dataType: "string";
165
165
  columnType: "SQLiteText";
166
- data: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
166
+ data: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
167
167
  driverParam: string;
168
168
  notNull: false;
169
169
  hasDefault: false;
@@ -176,7 +176,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
176
176
  generated: undefined;
177
177
  }, {}, {
178
178
  length: number | undefined;
179
- $type: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
179
+ $type: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
180
180
  }>;
181
181
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
182
182
  name: "payments";
@@ -414,7 +414,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
414
414
  tableName: "payment";
415
415
  dataType: "string";
416
416
  columnType: "SQLiteText";
417
- data: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
417
+ data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
418
418
  driverParam: string;
419
419
  notNull: true;
420
420
  hasDefault: false;
@@ -427,7 +427,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
427
427
  generated: undefined;
428
428
  }, {}, {
429
429
  length: number | undefined;
430
- $type: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
430
+ $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
431
431
  }>;
432
432
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
433
433
  name: "status_reason";
@@ -82,10 +82,10 @@ declare const paymentInsertTypeZod: z.ZodObject<{
82
82
  }>;
83
83
  status: z.ZodEnum<{
84
84
  PREPARED: "PREPARED";
85
- COMPLETED: "COMPLETED";
86
- FAILED: "FAILED";
87
85
  INITIALIZED: "INITIALIZED";
86
+ FAILED: "FAILED";
88
87
  PENDING: "PENDING";
88
+ COMPLETED: "COMPLETED";
89
89
  CREATED: "CREATED";
90
90
  }>;
91
91
  batchId: z.ZodString;
@@ -163,7 +163,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
163
163
  tableName: "batch";
164
164
  dataType: "string";
165
165
  columnType: "SQLiteText";
166
- data: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
166
+ data: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
167
167
  driverParam: string;
168
168
  notNull: false;
169
169
  hasDefault: false;
@@ -176,7 +176,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
176
176
  generated: undefined;
177
177
  }, {}, {
178
178
  length: number | undefined;
179
- $type: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
179
+ $type: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
180
180
  }>;
181
181
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
182
182
  name: "payments";
@@ -414,7 +414,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
414
414
  tableName: "payment";
415
415
  dataType: "string";
416
416
  columnType: "SQLiteText";
417
- data: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
417
+ data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
418
418
  driverParam: string;
419
419
  notNull: true;
420
420
  hasDefault: false;
@@ -427,7 +427,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
427
427
  generated: undefined;
428
428
  }, {}, {
429
429
  length: number | undefined;
430
- $type: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
430
+ $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
431
431
  }>;
432
432
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
433
433
  name: "status_reason";
@@ -82,10 +82,10 @@ declare const paymentInsertTypeZod: z.ZodObject<{
82
82
  }>;
83
83
  status: z.ZodEnum<{
84
84
  PREPARED: "PREPARED";
85
- COMPLETED: "COMPLETED";
86
- FAILED: "FAILED";
87
85
  INITIALIZED: "INITIALIZED";
86
+ FAILED: "FAILED";
88
87
  PENDING: "PENDING";
88
+ COMPLETED: "COMPLETED";
89
89
  CREATED: "CREATED";
90
90
  }>;
91
91
  batchId: z.ZodString;
@@ -163,7 +163,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
163
163
  tableName: "batch";
164
164
  dataType: "string";
165
165
  columnType: "SQLiteText";
166
- data: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
166
+ data: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
167
167
  driverParam: string;
168
168
  notNull: false;
169
169
  hasDefault: false;
@@ -176,7 +176,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
176
176
  generated: undefined;
177
177
  }, {}, {
178
178
  length: number | undefined;
179
- $type: "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN" | "PREPARED" | "COMPLETED" | "FAILED";
179
+ $type: "PREPARED" | "FAILED" | "COMPLETED" | "OPEN" | "WAITING_FOR_PROCESSING" | "PROCESSING" | "READY_TO_SIGN";
180
180
  }>;
181
181
  payments: drizzle_orm_sqlite_core.SQLiteColumn<{
182
182
  name: "payments";
@@ -414,7 +414,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
414
414
  tableName: "payment";
415
415
  dataType: "string";
416
416
  columnType: "SQLiteText";
417
- data: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
417
+ data: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
418
418
  driverParam: string;
419
419
  notNull: true;
420
420
  hasDefault: false;
@@ -427,7 +427,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
427
427
  generated: undefined;
428
428
  }, {}, {
429
429
  length: number | undefined;
430
- $type: "PREPARED" | "COMPLETED" | "FAILED" | "INITIALIZED" | "PENDING" | "CREATED";
430
+ $type: "PREPARED" | "INITIALIZED" | "FAILED" | "PENDING" | "COMPLETED" | "CREATED";
431
431
  }>;
432
432
  statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
433
433
  name: "status_reason";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -30,12 +30,12 @@
30
30
  "./dist"
31
31
  ],
32
32
  "scripts": {
33
- "dev": "wrangler dev --port 9230",
34
- "db:init": "wrangler d1 execute bank --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
33
+ "dev": "wrangler dev --port 9231 --persist-to ../../.wrangler/state",
34
+ "wrangler:generate": "bunx develit wrangler:generate",
35
+ "db:init": "wrangler d1 execute develit-bank --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
35
36
  "db:generate": "drizzle-kit generate",
36
37
  "db:migrate": "drizzle-kit migrate",
37
38
  "db:explore": "drizzle-kit studio",
38
- "wrangler:generate": "bunx develit wrangler:generate",
39
39
  "types": "wrangler types --env-interface BankEnv --include-runtime false",
40
40
  "typecheck": "tsc",
41
41
  "lint": "biome check",