@develit-services/bank 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/database/schema.cjs +10 -1
  2. package/dist/database/schema.d.cts +1 -1
  3. package/dist/database/schema.d.mts +1 -1
  4. package/dist/database/schema.d.ts +1 -1
  5. package/dist/database/schema.mjs +8 -1
  6. package/dist/export/worker.cjs +888 -575
  7. package/dist/export/worker.d.cts +210 -12
  8. package/dist/export/worker.d.mts +210 -12
  9. package/dist/export/worker.d.ts +210 -12
  10. package/dist/export/worker.mjs +859 -546
  11. package/dist/export/wrangler.cjs +1 -11
  12. package/dist/export/wrangler.d.cts +8 -9
  13. package/dist/export/wrangler.d.mts +8 -9
  14. package/dist/export/wrangler.d.ts +8 -9
  15. package/dist/export/wrangler.mjs +1 -11
  16. package/dist/shared/{bank.Cy_TcyKb.cjs → bank.BMRBXGF1.cjs} +347 -106
  17. package/dist/shared/{bank.CEZKAEiY.d.cts → bank.BchnXQDL.d.cts} +2 -2
  18. package/dist/shared/{bank.CEZKAEiY.d.mts → bank.BchnXQDL.d.mts} +2 -2
  19. package/dist/shared/{bank.CEZKAEiY.d.ts → bank.BchnXQDL.d.ts} +2 -2
  20. package/dist/shared/bank.CtUeOz8i.d.ts +1648 -0
  21. package/dist/shared/bank.D8o86NLF.d.mts +1648 -0
  22. package/dist/shared/bank.DUalSuEK.d.cts +1648 -0
  23. package/dist/shared/bank.DbNuuGvb.mjs +9 -0
  24. package/dist/shared/bank.DuY4d2y_.cjs +11 -0
  25. package/dist/shared/{bank.BuNG2S8h.d.cts → bank.Nf6oaNfB.d.cts} +547 -11
  26. package/dist/shared/{bank.BuNG2S8h.d.mts → bank.Nf6oaNfB.d.mts} +547 -11
  27. package/dist/shared/{bank.BuNG2S8h.d.ts → bank.Nf6oaNfB.d.ts} +547 -11
  28. package/dist/shared/{bank.DnDcNEvX.mjs → bank.YCUhOduX.mjs} +330 -107
  29. package/dist/types.cjs +32 -20
  30. package/dist/types.d.cts +496 -35
  31. package/dist/types.d.mts +496 -35
  32. package/dist/types.d.ts +496 -35
  33. package/dist/types.mjs +5 -4
  34. package/package.json +1 -1
  35. package/dist/shared/bank.BkLncGmL.d.ts +0 -122
  36. package/dist/shared/bank.C9jAvwna.mjs +0 -90
  37. package/dist/shared/bank.DWVLVMDa.d.mts +0 -122
  38. package/dist/shared/bank.DmypH3Au.d.cts +0 -122
  39. package/dist/shared/bank.P9gDUycr.cjs +0 -98
package/dist/types.cjs CHANGED
@@ -1,36 +1,48 @@
1
1
  'use strict';
2
2
 
3
- const db = require('./shared/bank.Cy_TcyKb.cjs');
4
- const database_schema = require('./shared/bank.P9gDUycr.cjs');
3
+ const database_schema = require('./shared/bank.BMRBXGF1.cjs');
4
+ const mockCobs_connector = require('./shared/bank.DuY4d2y_.cjs');
5
5
  const generalCodes = require('@develit-io/general-codes');
6
6
  require('@develit-io/backend-sdk');
7
7
  require('drizzle-orm');
8
8
  require('zod');
9
9
  require('jose');
10
- require('superjson');
11
- require('date-fns');
10
+ require('drizzle-zod');
12
11
  require('drizzle-orm/sqlite-core');
12
+ require('date-fns');
13
13
  require('drizzle-orm/relations');
14
+ require('superjson');
14
15
 
15
16
 
16
17
 
17
- exports.BATCH_STATUES = db.BATCH_STATUSES;
18
- exports.BATCH_STATUSES = db.BATCH_STATUSES;
19
- exports.COUNTRY_CODES = db.COUNTRY_CODES;
20
- exports.ErsteConnector = db.ErsteConnector;
21
- exports.FINBRICKS_ENDPOINTS = db.FINBRICKS_ENDPOINTS;
22
- exports.FinbricksClient = db.FinbricksClient;
23
- exports.FinbricksConnector = db.FinbricksConnector;
24
- exports.IBankConnector = db.IBankConnector;
25
- exports.MockCobsConnector = db.MockCobsConnector;
26
- exports.MockConnector = db.MockConnector;
27
- exports.PAYMENT_DIRECTIONS = db.PAYMENT_DIRECTIONS;
28
- exports.PAYMENT_STATUSES = db.PAYMENT_STATUSES;
29
- exports.PAYMENT_TYPES = db.PAYMENT_TYPES;
30
- exports.paymentInsertTypeZod = db.paymentInsertTypeZod;
31
- exports.signFinbricksJws = db.signFinbricksJws;
32
- exports.useFinbricksFetch = db.useFinbricksFetch;
18
+ exports.ACCOUNT_STATUSES = database_schema.ACCOUNT_STATUSES;
19
+ exports.BATCH_STATUES = database_schema.BATCH_STATUSES;
20
+ exports.BATCH_STATUSES = database_schema.BATCH_STATUSES;
33
21
  exports.CONNECTOR_KEYS = database_schema.CONNECTOR_KEYS;
22
+ exports.COUNTRY_CODES = database_schema.COUNTRY_CODES;
23
+ exports.CREDENTIALS_TYPES = database_schema.CREDENTIALS_TYPES;
24
+ exports.ErsteConnector = database_schema.ErsteConnector;
25
+ exports.FINBRICKS_ENDPOINTS = database_schema.FINBRICKS_ENDPOINTS;
26
+ exports.FinbricksClient = database_schema.FinbricksClient;
27
+ exports.FinbricksConnector = database_schema.FinbricksConnector;
28
+ exports.IBankConnector = database_schema.IBankConnector;
29
+ exports.MockConnector = database_schema.MockConnector;
30
+ exports.PAYMENT_DIRECTIONS = database_schema.PAYMENT_DIRECTIONS;
31
+ exports.PAYMENT_STATUSES = database_schema.PAYMENT_STATUSES;
32
+ exports.PAYMENT_TYPES = database_schema.PAYMENT_TYPES;
34
33
  exports.TOKEN_TYPES = database_schema.TOKEN_TYPES;
34
+ exports.accountCredentialsInsertSchema = database_schema.accountCredentialsInsertSchema;
35
+ exports.accountCredentialsSelectSchema = database_schema.accountCredentialsSelectSchema;
36
+ exports.accountCredentialsUpdateSchema = database_schema.accountCredentialsUpdateSchema;
37
+ exports.accountInsertSchema = database_schema.accountInsertSchema;
38
+ exports.accountSelectSchema = database_schema.accountSelectSchema;
39
+ exports.accountUpdateSchema = database_schema.accountUpdateSchema;
40
+ exports.ottInsertSchema = database_schema.ottInsertSchema;
41
+ exports.ottSelectSchema = database_schema.ottSelectSchema;
42
+ exports.ottUpdateSchema = database_schema.ottUpdateSchema;
43
+ exports.paymentInsertTypeZod = database_schema.paymentInsertTypeZod;
44
+ exports.signFinbricksJws = database_schema.signFinbricksJws;
45
+ exports.useFinbricksFetch = database_schema.useFinbricksFetch;
46
+ exports.MockCobsConnector = mockCobs_connector.MockCobsConnector;
35
47
  exports.BANK_CODES = generalCodes.BANK_CODES;
36
48
  exports.CURRENCY_CODES = generalCodes.CURRENCY_CODES;
package/dist/types.d.cts CHANGED
@@ -1,14 +1,15 @@
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 { b as CurrencyCode, c as BankCode, d as CountryCode, e as ConnectedAccount, I as IBankConnector, a as ConnectorKey, f as AccountCredentialsInsertType, g as AccountInsertType, h as AuthInput, i as IncomingPaymentMessage, P as PaymentPreparedInsertType, j as InitiatedBatch, k as InitiatedPayment, S as SyncLog, l as PaymentStatus, m as BatchStatus, n as BatchMetadata, o as Currency } from './shared/bank.DUalSuEK.cjs';
2
+ export { x as ACCOUNT_STATUSES, V as AccountCredentialsPatchType, W as AccountCredentialsSelectType, U as AccountCredentialsUpdateType, M as AccountPatchType, A as AccountSelectType, y as AccountStatus, L as AccountUpdateType, r as BATCH_STATUES, r as BATCH_STATUSES, B as BankAccountWithLastSync, D as CONNECTOR_KEYS, z as COUNTRY_CODES, E as CREDENTIALS_TYPES, C as ConfigEnvironmentBank, F as CredentialsType, O as OutgoingPaymentMessage, v as PAYMENT_DIRECTIONS, u as PAYMENT_STATUSES, s as PAYMENT_TYPES, w as PaymentDirection, p as PaymentFailedInsertType, t as PaymentType, T as TOKEN_TYPES, G as TokenType, N as accountCredentialsInsertSchema, R as accountCredentialsSelectSchema, Q as accountCredentialsUpdateSchema, H as accountInsertSchema, K as accountSelectSchema, J as accountUpdateSchema, q as paymentInitializedInsertType } from './shared/bank.DUalSuEK.cjs';
3
+ import { t as tables, a as PaymentInsertType, P as PaymentSelectType } from './shared/bank.Nf6oaNfB.cjs';
4
+ export { b as BatchInsertType, B as BatchSelectType, p as paymentInsertTypeZod } from './shared/bank.Nf6oaNfB.cjs';
5
5
  import { Environment, BaseEvent } from '@develit-io/backend-sdk';
6
6
  import { DrizzleD1Database } from 'drizzle-orm/d1';
7
- export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.CEZKAEiY.cjs';
7
+ export { b as BankServiceEnv, a as BankServiceEnvironmentConfig, B as BankServiceWranglerConfig } from './shared/bank.BchnXQDL.cjs';
8
+ import * as drizzle_zod from 'drizzle-zod';
9
+ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
10
+ import { z } from 'zod';
8
11
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
9
- import 'drizzle-orm/sqlite-core';
10
12
  import 'drizzle-orm';
11
- import 'zod';
12
13
 
13
14
  type FinbricksProvider = 'KB' | 'ERSTE' | 'CSOB' | 'MOCK_COBS' | 'CREDITAS' | 'FIO' | 'MONETA';
14
15
  declare const FINBRICKS_TRANSACTION_STATUSES: readonly ["OPENED", "AUTHORIZED", "COMPLETED", "BOOKED", "SETTLED", "REJECTED", "CLOSED"];
@@ -299,6 +300,7 @@ declare const FINBRICKS_ENDPOINTS: {
299
300
  readonly ACCOUNT_TRANSACTIONS: "/account/transactions";
300
301
  readonly TRANSACTION_INIT: "/transaction/platform/init";
301
302
  readonly TRANSACTION_STATUS: "/transaction/platform/status";
303
+ readonly TRANSACTION_SEPA_INIT: "/transaction/platform/sepa/init";
302
304
  readonly TRANSACTION_BATCH_INIT: "/transaction/platform/batchPayment/init";
303
305
  readonly BATCH_STATUS: "/transaction/platform/batchPayment/status";
304
306
  };
@@ -320,41 +322,41 @@ interface FinbricksConnectorConfig {
320
322
  PRIVATE_KEY_PEM: string;
321
323
  BASE_URI: string;
322
324
  REDIRECT_URI: string;
323
- KV: KVNamespace;
325
+ connectedAccounts: ConnectedAccount[];
324
326
  }
325
327
  declare abstract class FinbricksConnector extends IBankConnector {
326
328
  connectorKey: ConnectorKey;
327
- readonly kv: KVNamespace;
329
+ connectedAccounts: ConnectedAccount[];
328
330
  protected readonly finbricks: FinbricksClient;
329
331
  protected readonly PROVIDER: FinbricksProvider;
330
332
  static readonly FETCH_INTERVAL: number;
331
- private _clientIds;
332
- constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, KV, }: FinbricksConnectorConfig);
333
- getAuthUri({ accountId, ott, }: {
334
- accountId: string;
333
+ constructor(provider: FinbricksProvider, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM, REDIRECT_URI, connectedAccounts, }: FinbricksConnectorConfig);
334
+ getAuthUri({ ott }: {
335
335
  ott: string;
336
336
  }): Promise<string>;
337
- private get storageKey();
338
- getClientIds(): Promise<Record<string, string>>;
339
- setClientIds(value: {
340
- [x: string]: string;
341
- }): Promise<void>;
342
- authorizeAccount({ urlParams, }: {
337
+ authorizeAccount({ urlParams }: {
343
338
  urlParams: string;
344
- }): Promise<boolean>;
339
+ }): Promise<{
340
+ credentials: AccountCredentialsInsertType[];
341
+ accounts: AccountInsertType[];
342
+ }>;
345
343
  authenticate(code: AuthInput): Promise<string>;
346
344
  revokeAuthentication(clientId: string): Promise<void>;
347
345
  isClientIdExpired({ clientId, }: {
348
346
  clientId: string;
349
347
  }): Promise<boolean>;
350
- listAccounts(): Promise<[]>;
348
+ getAccountsForClient({ clientId, }: {
349
+ clientId: string;
350
+ }): Promise<FinbricksAccount[]>;
351
+ listAccounts(): Promise<AccountInsertType[]>;
351
352
  preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
352
353
  initiateBatchFromPayments({ payments, }: {
353
354
  payments: PaymentPreparedInsertType[];
354
355
  }): Promise<InitiatedBatch>;
356
+ initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
355
357
  initiateSinglePayment(payment: PaymentPreparedInsertType): Promise<InitiatedPayment>;
356
358
  getAllAccountPayments({ account, lastSync, }: {
357
- account: ConfigBankAccount;
359
+ account: ConnectedAccount;
358
360
  lastSync: SyncLog;
359
361
  db: DrizzleD1Database<typeof tables>;
360
362
  env: Environment;
@@ -375,9 +377,10 @@ interface ErsteConnectorConfig {
375
377
  AUTH_URI: string;
376
378
  PAYMENTS_URI: string;
377
379
  ACCOUNTS_URI: string;
378
- KV: KVNamespace;
380
+ connectedAccounts: ConnectedAccount[];
379
381
  }
380
382
  declare class ErsteConnector extends IBankConnector {
383
+ initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
381
384
  static readonly FETCH_INTERVAL: number;
382
385
  private readonly API_KEY;
383
386
  private readonly CLIENT_ID;
@@ -387,18 +390,21 @@ declare class ErsteConnector extends IBankConnector {
387
390
  private readonly REDIRECT_URI;
388
391
  private readonly ACCOUNTS_URI;
389
392
  connectorKey: ConnectorKey;
390
- readonly kv: KVNamespace;
393
+ connectedAccounts: ConnectedAccount[];
391
394
  private accessToken;
392
395
  constructor(config: ErsteConnectorConfig);
393
- getAuthUri({ accountId, ott, }: {
394
- accountId: string;
396
+ getAuthUri({ ott }: {
395
397
  ott: string;
396
398
  }): Promise<string>;
397
- authorizeAccount({ urlParams, }: {
399
+ authorizeAccount({ urlParams }: {
398
400
  urlParams: string;
399
- }): Promise<boolean>;
401
+ }): Promise<{
402
+ credentials: AccountCredentialsInsertType[];
403
+ accounts: AccountInsertType[];
404
+ }>;
400
405
  authenticate(tokens?: {
401
406
  refreshToken?: string;
407
+ token?: string;
402
408
  }): Promise<string>;
403
409
  listAccounts(): Promise<[]>;
404
410
  preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
@@ -412,7 +418,7 @@ declare class ErsteConnector extends IBankConnector {
412
418
  signHash: string;
413
419
  }): Promise<string>;
414
420
  getAllAccountPayments({ account, lastSync, }: {
415
- account: ConfigBankAccount;
421
+ account: ConnectedAccount;
416
422
  lastSync: SyncLog;
417
423
  }): Promise<PaymentInsertType[]>;
418
424
  getPaymentStatus(_: {
@@ -424,17 +430,23 @@ declare class ErsteConnector extends IBankConnector {
424
430
  }
425
431
 
426
432
  declare class MockConnector extends IBankConnector {
433
+ initiateSEPAPayment(payment: IncomingPaymentMessage): Promise<InitiatedPayment>;
434
+ connectedAccounts: ConnectedAccount[];
427
435
  connectorKey: ConnectorKey;
428
- readonly kv: KVNamespace;
429
436
  static readonly FETCH_INTERVAL: number;
430
- constructor(kv: KVNamespace);
437
+ constructor();
431
438
  authenticate(): Promise<string>;
432
439
  listAccounts(): Promise<[]>;
433
- getAuthUri({ accountId, ott, }: {
440
+ getAuthUri({ accountId, }: {
434
441
  accountId: string;
435
442
  ott: string;
436
443
  }): Promise<string>;
437
- authorizeAccount(): Promise<boolean>;
444
+ authorizeAccount({}: {
445
+ urlParams: string;
446
+ }): Promise<{
447
+ credentials: AccountCredentialsInsertType[];
448
+ accounts: AccountInsertType[];
449
+ }>;
438
450
  preparePayment(payment: IncomingPaymentMessage): Promise<PaymentPreparedInsertType>;
439
451
  initiateSinglePayment(payment: PaymentPreparedInsertType): Promise<InitiatedPayment>;
440
452
  initiateBatchFromPayments({ payments, }: {
@@ -593,5 +605,454 @@ type BankPaymentEvent = BaseEvent & {
593
605
  bankPayment: Partial<PaymentSelectType>;
594
606
  };
595
607
 
596
- export { AuthInput, BankCode, BatchMetadata, BatchStatus, ConfigBankAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, signFinbricksJws, useFinbricksFetch };
597
- export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus };
608
+ declare const ottInsertSchema: drizzle_zod.BuildSchema<"insert", {
609
+ oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
610
+ name: "one_time_token";
611
+ tableName: "ott";
612
+ dataType: "string";
613
+ columnType: "SQLiteText";
614
+ data: string;
615
+ driverParam: string;
616
+ notNull: true;
617
+ hasDefault: false;
618
+ isPrimaryKey: false;
619
+ isAutoincrement: false;
620
+ hasRuntimeDefault: false;
621
+ enumValues: [string, ...string[]];
622
+ baseColumn: never;
623
+ identity: undefined;
624
+ generated: undefined;
625
+ }, {}, {
626
+ length: number | undefined;
627
+ }>;
628
+ refId: drizzle_orm_sqlite_core.SQLiteColumn<{
629
+ name: "ref_id";
630
+ tableName: "ott";
631
+ dataType: "string";
632
+ columnType: "SQLiteText";
633
+ data: string;
634
+ driverParam: string;
635
+ notNull: true;
636
+ hasDefault: false;
637
+ isPrimaryKey: false;
638
+ isAutoincrement: false;
639
+ hasRuntimeDefault: false;
640
+ enumValues: [string, ...string[]];
641
+ baseColumn: never;
642
+ identity: undefined;
643
+ generated: undefined;
644
+ }, {}, {
645
+ length: number | undefined;
646
+ }>;
647
+ tokenType: drizzle_orm_sqlite_core.SQLiteColumn<{
648
+ name: "token_type";
649
+ tableName: "ott";
650
+ dataType: "string";
651
+ columnType: "SQLiteText";
652
+ data: "ACCOUNT_AUTHORIZATION";
653
+ driverParam: string;
654
+ notNull: true;
655
+ hasDefault: false;
656
+ isPrimaryKey: false;
657
+ isAutoincrement: false;
658
+ hasRuntimeDefault: false;
659
+ enumValues: ["ACCOUNT_AUTHORIZATION"];
660
+ baseColumn: never;
661
+ identity: undefined;
662
+ generated: undefined;
663
+ }, {}, {
664
+ length: number | undefined;
665
+ $type: "ACCOUNT_AUTHORIZATION";
666
+ }>;
667
+ expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
668
+ name: "expires_at";
669
+ tableName: "ott";
670
+ dataType: "date";
671
+ columnType: "SQLiteTimestamp";
672
+ data: Date;
673
+ driverParam: number;
674
+ notNull: true;
675
+ hasDefault: false;
676
+ isPrimaryKey: false;
677
+ isAutoincrement: false;
678
+ hasRuntimeDefault: false;
679
+ enumValues: undefined;
680
+ baseColumn: never;
681
+ identity: undefined;
682
+ generated: undefined;
683
+ }, {}, {}>;
684
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
685
+ name: "id";
686
+ tableName: "ott";
687
+ dataType: "string";
688
+ columnType: "SQLiteText";
689
+ data: string;
690
+ driverParam: string;
691
+ notNull: true;
692
+ hasDefault: false;
693
+ isPrimaryKey: true;
694
+ isAutoincrement: false;
695
+ hasRuntimeDefault: false;
696
+ enumValues: [string, ...string[]];
697
+ baseColumn: never;
698
+ identity: undefined;
699
+ generated: undefined;
700
+ }, {}, {
701
+ length: number | undefined;
702
+ }>;
703
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
704
+ name: "created_at";
705
+ tableName: "ott";
706
+ dataType: "date";
707
+ columnType: "SQLiteTimestamp";
708
+ data: Date;
709
+ driverParam: number;
710
+ notNull: false;
711
+ hasDefault: true;
712
+ isPrimaryKey: false;
713
+ isAutoincrement: false;
714
+ hasRuntimeDefault: false;
715
+ enumValues: undefined;
716
+ baseColumn: never;
717
+ identity: undefined;
718
+ generated: undefined;
719
+ }, {}, {}>;
720
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
721
+ name: "updated_at";
722
+ tableName: "ott";
723
+ dataType: "date";
724
+ columnType: "SQLiteTimestamp";
725
+ data: Date;
726
+ driverParam: number;
727
+ notNull: false;
728
+ hasDefault: true;
729
+ isPrimaryKey: false;
730
+ isAutoincrement: false;
731
+ hasRuntimeDefault: false;
732
+ enumValues: undefined;
733
+ baseColumn: never;
734
+ identity: undefined;
735
+ generated: undefined;
736
+ }, {}, {}>;
737
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
738
+ name: "deleted_at";
739
+ tableName: "ott";
740
+ dataType: "date";
741
+ columnType: "SQLiteTimestamp";
742
+ data: Date;
743
+ driverParam: number;
744
+ notNull: false;
745
+ hasDefault: true;
746
+ isPrimaryKey: false;
747
+ isAutoincrement: false;
748
+ hasRuntimeDefault: false;
749
+ enumValues: undefined;
750
+ baseColumn: never;
751
+ identity: undefined;
752
+ generated: undefined;
753
+ }, {}, {}>;
754
+ }, undefined, undefined>;
755
+ declare const ottUpdateSchema: drizzle_zod.BuildSchema<"update", {
756
+ oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
757
+ name: "one_time_token";
758
+ tableName: "ott";
759
+ dataType: "string";
760
+ columnType: "SQLiteText";
761
+ data: string;
762
+ driverParam: string;
763
+ notNull: true;
764
+ hasDefault: false;
765
+ isPrimaryKey: false;
766
+ isAutoincrement: false;
767
+ hasRuntimeDefault: false;
768
+ enumValues: [string, ...string[]];
769
+ baseColumn: never;
770
+ identity: undefined;
771
+ generated: undefined;
772
+ }, {}, {
773
+ length: number | undefined;
774
+ }>;
775
+ refId: drizzle_orm_sqlite_core.SQLiteColumn<{
776
+ name: "ref_id";
777
+ tableName: "ott";
778
+ dataType: "string";
779
+ columnType: "SQLiteText";
780
+ data: string;
781
+ driverParam: string;
782
+ notNull: true;
783
+ hasDefault: false;
784
+ isPrimaryKey: false;
785
+ isAutoincrement: false;
786
+ hasRuntimeDefault: false;
787
+ enumValues: [string, ...string[]];
788
+ baseColumn: never;
789
+ identity: undefined;
790
+ generated: undefined;
791
+ }, {}, {
792
+ length: number | undefined;
793
+ }>;
794
+ tokenType: drizzle_orm_sqlite_core.SQLiteColumn<{
795
+ name: "token_type";
796
+ tableName: "ott";
797
+ dataType: "string";
798
+ columnType: "SQLiteText";
799
+ data: "ACCOUNT_AUTHORIZATION";
800
+ driverParam: string;
801
+ notNull: true;
802
+ hasDefault: false;
803
+ isPrimaryKey: false;
804
+ isAutoincrement: false;
805
+ hasRuntimeDefault: false;
806
+ enumValues: ["ACCOUNT_AUTHORIZATION"];
807
+ baseColumn: never;
808
+ identity: undefined;
809
+ generated: undefined;
810
+ }, {}, {
811
+ length: number | undefined;
812
+ $type: "ACCOUNT_AUTHORIZATION";
813
+ }>;
814
+ expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
815
+ name: "expires_at";
816
+ tableName: "ott";
817
+ dataType: "date";
818
+ columnType: "SQLiteTimestamp";
819
+ data: Date;
820
+ driverParam: number;
821
+ notNull: true;
822
+ hasDefault: false;
823
+ isPrimaryKey: false;
824
+ isAutoincrement: false;
825
+ hasRuntimeDefault: false;
826
+ enumValues: undefined;
827
+ baseColumn: never;
828
+ identity: undefined;
829
+ generated: undefined;
830
+ }, {}, {}>;
831
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
832
+ name: "id";
833
+ tableName: "ott";
834
+ dataType: "string";
835
+ columnType: "SQLiteText";
836
+ data: string;
837
+ driverParam: string;
838
+ notNull: true;
839
+ hasDefault: false;
840
+ isPrimaryKey: true;
841
+ isAutoincrement: false;
842
+ hasRuntimeDefault: false;
843
+ enumValues: [string, ...string[]];
844
+ baseColumn: never;
845
+ identity: undefined;
846
+ generated: undefined;
847
+ }, {}, {
848
+ length: number | undefined;
849
+ }>;
850
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
851
+ name: "created_at";
852
+ tableName: "ott";
853
+ dataType: "date";
854
+ columnType: "SQLiteTimestamp";
855
+ data: Date;
856
+ driverParam: number;
857
+ notNull: false;
858
+ hasDefault: true;
859
+ isPrimaryKey: false;
860
+ isAutoincrement: false;
861
+ hasRuntimeDefault: false;
862
+ enumValues: undefined;
863
+ baseColumn: never;
864
+ identity: undefined;
865
+ generated: undefined;
866
+ }, {}, {}>;
867
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
868
+ name: "updated_at";
869
+ tableName: "ott";
870
+ dataType: "date";
871
+ columnType: "SQLiteTimestamp";
872
+ data: Date;
873
+ driverParam: number;
874
+ notNull: false;
875
+ hasDefault: true;
876
+ isPrimaryKey: false;
877
+ isAutoincrement: false;
878
+ hasRuntimeDefault: false;
879
+ enumValues: undefined;
880
+ baseColumn: never;
881
+ identity: undefined;
882
+ generated: undefined;
883
+ }, {}, {}>;
884
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
885
+ name: "deleted_at";
886
+ tableName: "ott";
887
+ dataType: "date";
888
+ columnType: "SQLiteTimestamp";
889
+ data: Date;
890
+ driverParam: number;
891
+ notNull: false;
892
+ hasDefault: true;
893
+ isPrimaryKey: false;
894
+ isAutoincrement: false;
895
+ hasRuntimeDefault: false;
896
+ enumValues: undefined;
897
+ baseColumn: never;
898
+ identity: undefined;
899
+ generated: undefined;
900
+ }, {}, {}>;
901
+ }, undefined, undefined>;
902
+ declare const ottSelectSchema: drizzle_zod.BuildSchema<"select", {
903
+ oneTimeToken: drizzle_orm_sqlite_core.SQLiteColumn<{
904
+ name: "one_time_token";
905
+ tableName: "ott";
906
+ dataType: "string";
907
+ columnType: "SQLiteText";
908
+ data: string;
909
+ driverParam: string;
910
+ notNull: true;
911
+ hasDefault: false;
912
+ isPrimaryKey: false;
913
+ isAutoincrement: false;
914
+ hasRuntimeDefault: false;
915
+ enumValues: [string, ...string[]];
916
+ baseColumn: never;
917
+ identity: undefined;
918
+ generated: undefined;
919
+ }, {}, {
920
+ length: number | undefined;
921
+ }>;
922
+ refId: drizzle_orm_sqlite_core.SQLiteColumn<{
923
+ name: "ref_id";
924
+ tableName: "ott";
925
+ dataType: "string";
926
+ columnType: "SQLiteText";
927
+ data: string;
928
+ driverParam: string;
929
+ notNull: true;
930
+ hasDefault: false;
931
+ isPrimaryKey: false;
932
+ isAutoincrement: false;
933
+ hasRuntimeDefault: false;
934
+ enumValues: [string, ...string[]];
935
+ baseColumn: never;
936
+ identity: undefined;
937
+ generated: undefined;
938
+ }, {}, {
939
+ length: number | undefined;
940
+ }>;
941
+ tokenType: drizzle_orm_sqlite_core.SQLiteColumn<{
942
+ name: "token_type";
943
+ tableName: "ott";
944
+ dataType: "string";
945
+ columnType: "SQLiteText";
946
+ data: "ACCOUNT_AUTHORIZATION";
947
+ driverParam: string;
948
+ notNull: true;
949
+ hasDefault: false;
950
+ isPrimaryKey: false;
951
+ isAutoincrement: false;
952
+ hasRuntimeDefault: false;
953
+ enumValues: ["ACCOUNT_AUTHORIZATION"];
954
+ baseColumn: never;
955
+ identity: undefined;
956
+ generated: undefined;
957
+ }, {}, {
958
+ length: number | undefined;
959
+ $type: "ACCOUNT_AUTHORIZATION";
960
+ }>;
961
+ expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
962
+ name: "expires_at";
963
+ tableName: "ott";
964
+ dataType: "date";
965
+ columnType: "SQLiteTimestamp";
966
+ data: Date;
967
+ driverParam: number;
968
+ notNull: true;
969
+ hasDefault: false;
970
+ isPrimaryKey: false;
971
+ isAutoincrement: false;
972
+ hasRuntimeDefault: false;
973
+ enumValues: undefined;
974
+ baseColumn: never;
975
+ identity: undefined;
976
+ generated: undefined;
977
+ }, {}, {}>;
978
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
979
+ name: "id";
980
+ tableName: "ott";
981
+ dataType: "string";
982
+ columnType: "SQLiteText";
983
+ data: string;
984
+ driverParam: string;
985
+ notNull: true;
986
+ hasDefault: false;
987
+ isPrimaryKey: true;
988
+ isAutoincrement: false;
989
+ hasRuntimeDefault: false;
990
+ enumValues: [string, ...string[]];
991
+ baseColumn: never;
992
+ identity: undefined;
993
+ generated: undefined;
994
+ }, {}, {
995
+ length: number | undefined;
996
+ }>;
997
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
998
+ name: "created_at";
999
+ tableName: "ott";
1000
+ dataType: "date";
1001
+ columnType: "SQLiteTimestamp";
1002
+ data: Date;
1003
+ driverParam: number;
1004
+ notNull: false;
1005
+ hasDefault: true;
1006
+ isPrimaryKey: false;
1007
+ isAutoincrement: false;
1008
+ hasRuntimeDefault: false;
1009
+ enumValues: undefined;
1010
+ baseColumn: never;
1011
+ identity: undefined;
1012
+ generated: undefined;
1013
+ }, {}, {}>;
1014
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1015
+ name: "updated_at";
1016
+ tableName: "ott";
1017
+ dataType: "date";
1018
+ columnType: "SQLiteTimestamp";
1019
+ data: Date;
1020
+ driverParam: number;
1021
+ notNull: false;
1022
+ hasDefault: true;
1023
+ isPrimaryKey: false;
1024
+ isAutoincrement: false;
1025
+ hasRuntimeDefault: false;
1026
+ enumValues: undefined;
1027
+ baseColumn: never;
1028
+ identity: undefined;
1029
+ generated: undefined;
1030
+ }, {}, {}>;
1031
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1032
+ name: "deleted_at";
1033
+ tableName: "ott";
1034
+ dataType: "date";
1035
+ columnType: "SQLiteTimestamp";
1036
+ data: Date;
1037
+ driverParam: number;
1038
+ notNull: false;
1039
+ hasDefault: true;
1040
+ isPrimaryKey: false;
1041
+ isAutoincrement: false;
1042
+ hasRuntimeDefault: false;
1043
+ enumValues: undefined;
1044
+ baseColumn: never;
1045
+ identity: undefined;
1046
+ generated: undefined;
1047
+ }, {}, {}>;
1048
+ }, undefined, undefined>;
1049
+
1050
+ type OneTimeTokenInsertType = Omit<z.infer<typeof ottInsertSchema>, 'id'> & {
1051
+ id?: string;
1052
+ };
1053
+ type OneTimeTokenUpdateType = z.infer<typeof ottInsertSchema>;
1054
+ type OneTimeTokenPatchType = z.infer<typeof ottUpdateSchema>;
1055
+ type OneTimeTokenSelectType = z.infer<typeof ottSelectSchema>;
1056
+
1057
+ export { AccountCredentialsInsertType, AccountInsertType, AuthInput, BankCode, BatchMetadata, BatchStatus, ConnectedAccount, ConnectorKey, CountryCode, Currency, CurrencyCode, ErsteConnector, FINBRICKS_ENDPOINTS, FinbricksClient, FinbricksConnector, IBankConnector, IncomingPaymentMessage, InitiatedBatch, InitiatedPayment, MockCobsConnector, MockConnector, PaymentInsertType, PaymentPreparedInsertType, PaymentSelectType, PaymentStatus, ottInsertSchema, ottSelectSchema, ottUpdateSchema, signFinbricksJws, useFinbricksFetch };
1058
+ export type { BankPaymentEvent, ErsteAuthenticationResponse, ErsteBatchPaymentInitiationResponse, ErsteIncomingPaymentResponse, ErsteObtainAuthorizationURLResponse, ErstePaymentInitiationResponse, FinbricksAccount, FinbricksAccountTransactionsResponse, FinbricksAccountsListResponse, FinbricksAuthTokenResponse, FinbricksBatchBody, FinbricksBatchResponse, FinbricksBatchStatus, FinbricksConnectAccountBody, FinbricksConnectAccountResponse, FinbricksConnectorConfig, FinbricksEndpoint, FinbricksEndpointPath, FinbricksFetchConfig, FinbricksGetBatchStatusBody, FinbricksGetBatchStatusResponse, FinbricksGetTransactionStatusResponse, FinbricksJWSData, FinbricksPaymentBody, FinbricksPaymentResponse, FinbricksProvider, FinbricksRequestInit, FinbricksTransactionStatus, OneTimeTokenInsertType, OneTimeTokenPatchType, OneTimeTokenSelectType, OneTimeTokenUpdateType };