@develit-services/ledger 0.0.1

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.
@@ -0,0 +1,1320 @@
1
+ import * as drizzle_orm from 'drizzle-orm';
2
+ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
3
+ import { CURRENCY_CODES, CRYPTO_NETWORK_CODES, CODES, BANK_CODES } from '@develit-io/general-codes';
4
+ import { BankAccountMetadata } from '@develit-io/backend-sdk';
5
+
6
+ declare const ACCOUNT_TYPES: readonly ["INTERNAL", "EXTERNAL", "NOSTRO", "TECHNICAL", "SETTLEMENT", "FX", "FEE", "REVENUE", "LOSS", "TRANSPORT", "HOLD", "SYSTEM", "TEST"];
7
+ type AccountType = (typeof ACCOUNT_TYPES)[number];
8
+ declare const ASSET_TYPES: readonly ["FIAT", "CRYPTO", "TOKEN", "STOCK", "COMMODITY", "OTHER"];
9
+ type AssetType = (typeof ASSET_TYPES)[number];
10
+ declare const BALANCE_STRATEGIES: readonly ["SNAPSHOT", "COMPUTED"];
11
+ type BalanceStrategy = (typeof BALANCE_STRATEGIES)[number];
12
+ declare const IDENTIFIER_KINDS: readonly ["IBAN", "LOCAL_CZ", "SWIFT", "CRYPTO_ADDRESS"];
13
+ type IdentifierKind = (typeof IDENTIFIER_KINDS)[number];
14
+ declare const ENTRY_STATUSES: readonly ["PENDING", "REALIZED", "FAILED", "CANCELED"];
15
+ type EntryStatus = (typeof ENTRY_STATUSES)[number];
16
+ declare const TRANSACTION_STATUSES: readonly ["WAITING_FOR_PAYMENT", "PAUSED", "WAITING_FOR_MANUAL_PROCESSING", "MATCHED", "RETURNING", "RETURNED", "FAILED", "CANCELLED", "COMPLETED"];
17
+ type TransactionStatus = (typeof TRANSACTION_STATUSES)[number];
18
+ declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER"];
19
+ type TransactionType = (typeof TRANSACTION_TYPES)[number];
20
+ declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER"];
21
+ type ReferenceType = (typeof REFERENCE_TYPES)[number];
22
+ declare const PAYMENT_CHARGE_TYPES: readonly ["SHA", "OUR", "BEN"];
23
+ type PaymentChargeType = (typeof PAYMENT_CHARGE_TYPES)[number];
24
+
25
+ declare const account: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
26
+ name: "account";
27
+ schema: undefined;
28
+ columns: {
29
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
30
+ name: "name";
31
+ tableName: "account";
32
+ dataType: "string";
33
+ columnType: "SQLiteText";
34
+ data: string;
35
+ driverParam: string;
36
+ notNull: true;
37
+ hasDefault: false;
38
+ isPrimaryKey: false;
39
+ isAutoincrement: false;
40
+ hasRuntimeDefault: false;
41
+ enumValues: [string, ...string[]];
42
+ baseColumn: never;
43
+ identity: undefined;
44
+ generated: undefined;
45
+ }, {}, {
46
+ length: number | undefined;
47
+ }>;
48
+ ownerId: drizzle_orm_sqlite_core.SQLiteColumn<{
49
+ name: "owner_id";
50
+ tableName: "account";
51
+ dataType: "string";
52
+ columnType: "SQLiteText";
53
+ data: string;
54
+ driverParam: string;
55
+ notNull: true;
56
+ hasDefault: false;
57
+ isPrimaryKey: false;
58
+ isAutoincrement: false;
59
+ hasRuntimeDefault: false;
60
+ enumValues: [string, ...string[]];
61
+ baseColumn: never;
62
+ identity: undefined;
63
+ generated: undefined;
64
+ }, {}, {
65
+ length: number | undefined;
66
+ }>;
67
+ accountType: drizzle_orm_sqlite_core.SQLiteColumn<{
68
+ name: "account_type";
69
+ tableName: "account";
70
+ dataType: "string";
71
+ columnType: "SQLiteText";
72
+ data: "INTERNAL" | "EXTERNAL" | "NOSTRO" | "TECHNICAL" | "SETTLEMENT" | "FX" | "FEE" | "REVENUE" | "LOSS" | "TRANSPORT" | "HOLD" | "SYSTEM" | "TEST";
73
+ driverParam: string;
74
+ notNull: true;
75
+ hasDefault: false;
76
+ isPrimaryKey: false;
77
+ isAutoincrement: false;
78
+ hasRuntimeDefault: false;
79
+ enumValues: [string, ...string[]];
80
+ baseColumn: never;
81
+ identity: undefined;
82
+ generated: undefined;
83
+ }, {}, {
84
+ length: number | undefined;
85
+ $type: "INTERNAL" | "EXTERNAL" | "NOSTRO" | "TECHNICAL" | "SETTLEMENT" | "FX" | "FEE" | "REVENUE" | "LOSS" | "TRANSPORT" | "HOLD" | "SYSTEM" | "TEST";
86
+ }>;
87
+ assetType: drizzle_orm_sqlite_core.SQLiteColumn<{
88
+ name: "asset_type";
89
+ tableName: "account";
90
+ dataType: "string";
91
+ columnType: "SQLiteText";
92
+ data: "FIAT" | "CRYPTO" | "TOKEN" | "STOCK" | "COMMODITY" | "OTHER";
93
+ driverParam: string;
94
+ notNull: true;
95
+ hasDefault: false;
96
+ isPrimaryKey: false;
97
+ isAutoincrement: false;
98
+ hasRuntimeDefault: false;
99
+ enumValues: [string, ...string[]];
100
+ baseColumn: never;
101
+ identity: undefined;
102
+ generated: undefined;
103
+ }, {}, {
104
+ length: number | undefined;
105
+ $type: "FIAT" | "CRYPTO" | "TOKEN" | "STOCK" | "COMMODITY" | "OTHER";
106
+ }>;
107
+ currency: drizzle_orm_sqlite_core.SQLiteColumn<{
108
+ name: "currency";
109
+ tableName: "account";
110
+ dataType: "string";
111
+ columnType: "SQLiteText";
112
+ data: "CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX";
113
+ driverParam: string;
114
+ notNull: true;
115
+ hasDefault: false;
116
+ isPrimaryKey: false;
117
+ isAutoincrement: false;
118
+ hasRuntimeDefault: false;
119
+ enumValues: [string, ...string[]];
120
+ baseColumn: never;
121
+ identity: undefined;
122
+ generated: undefined;
123
+ }, {}, {
124
+ length: number | undefined;
125
+ $type: "CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX";
126
+ }>;
127
+ balanceStrategy: drizzle_orm_sqlite_core.SQLiteColumn<{
128
+ name: "balance_strategy";
129
+ tableName: "account";
130
+ dataType: "string";
131
+ columnType: "SQLiteText";
132
+ data: "SNAPSHOT" | "COMPUTED";
133
+ driverParam: string;
134
+ notNull: true;
135
+ hasDefault: false;
136
+ isPrimaryKey: false;
137
+ isAutoincrement: false;
138
+ hasRuntimeDefault: false;
139
+ enumValues: [string, ...string[]];
140
+ baseColumn: never;
141
+ identity: undefined;
142
+ generated: undefined;
143
+ }, {}, {
144
+ length: number | undefined;
145
+ $type: "SNAPSHOT" | "COMPUTED";
146
+ }>;
147
+ parentAccountId: drizzle_orm_sqlite_core.SQLiteColumn<{
148
+ name: "parent_account_id";
149
+ tableName: "account";
150
+ dataType: "string";
151
+ columnType: "SQLiteText";
152
+ data: string;
153
+ driverParam: string;
154
+ notNull: false;
155
+ hasDefault: false;
156
+ isPrimaryKey: false;
157
+ isAutoincrement: false;
158
+ hasRuntimeDefault: false;
159
+ enumValues: [string, ...string[]];
160
+ baseColumn: never;
161
+ identity: undefined;
162
+ generated: undefined;
163
+ }, {}, {
164
+ length: number | undefined;
165
+ }>;
166
+ closedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
167
+ name: "closed_at";
168
+ tableName: "account";
169
+ dataType: "date";
170
+ columnType: "SQLiteTimestamp";
171
+ data: Date;
172
+ driverParam: number;
173
+ notNull: false;
174
+ hasDefault: false;
175
+ isPrimaryKey: false;
176
+ isAutoincrement: false;
177
+ hasRuntimeDefault: false;
178
+ enumValues: undefined;
179
+ baseColumn: never;
180
+ identity: undefined;
181
+ generated: undefined;
182
+ }, {}, {}>;
183
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
184
+ name: "id";
185
+ tableName: "account";
186
+ dataType: "string";
187
+ columnType: "SQLiteText";
188
+ data: string;
189
+ driverParam: string;
190
+ notNull: true;
191
+ hasDefault: false;
192
+ isPrimaryKey: true;
193
+ isAutoincrement: false;
194
+ hasRuntimeDefault: false;
195
+ enumValues: [string, ...string[]];
196
+ baseColumn: never;
197
+ identity: undefined;
198
+ generated: undefined;
199
+ }, {}, {
200
+ length: number | undefined;
201
+ }>;
202
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
203
+ name: "created_at";
204
+ tableName: "account";
205
+ dataType: "date";
206
+ columnType: "SQLiteTimestamp";
207
+ data: Date;
208
+ driverParam: number;
209
+ notNull: false;
210
+ hasDefault: true;
211
+ isPrimaryKey: false;
212
+ isAutoincrement: false;
213
+ hasRuntimeDefault: false;
214
+ enumValues: undefined;
215
+ baseColumn: never;
216
+ identity: undefined;
217
+ generated: undefined;
218
+ }, {}, {}>;
219
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
220
+ name: "updated_at";
221
+ tableName: "account";
222
+ dataType: "date";
223
+ columnType: "SQLiteTimestamp";
224
+ data: Date;
225
+ driverParam: number;
226
+ notNull: false;
227
+ hasDefault: true;
228
+ isPrimaryKey: false;
229
+ isAutoincrement: false;
230
+ hasRuntimeDefault: false;
231
+ enumValues: undefined;
232
+ baseColumn: never;
233
+ identity: undefined;
234
+ generated: undefined;
235
+ }, {}, {}>;
236
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
237
+ name: "deleted_at";
238
+ tableName: "account";
239
+ dataType: "date";
240
+ columnType: "SQLiteTimestamp";
241
+ data: Date;
242
+ driverParam: number;
243
+ notNull: false;
244
+ hasDefault: true;
245
+ isPrimaryKey: false;
246
+ isAutoincrement: false;
247
+ hasRuntimeDefault: false;
248
+ enumValues: undefined;
249
+ baseColumn: never;
250
+ identity: undefined;
251
+ generated: undefined;
252
+ }, {}, {}>;
253
+ };
254
+ dialect: "sqlite";
255
+ }>;
256
+ declare const accountIdentifier: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
257
+ name: "account_identifier";
258
+ schema: undefined;
259
+ columns: {
260
+ kind: drizzle_orm_sqlite_core.SQLiteColumn<{
261
+ name: "kind";
262
+ tableName: "account_identifier";
263
+ dataType: "string";
264
+ columnType: "SQLiteText";
265
+ data: "SWIFT" | "IBAN" | "LOCAL_CZ" | "CRYPTO_ADDRESS";
266
+ driverParam: string;
267
+ notNull: true;
268
+ hasDefault: false;
269
+ isPrimaryKey: false;
270
+ isAutoincrement: false;
271
+ hasRuntimeDefault: false;
272
+ enumValues: [string, ...string[]];
273
+ baseColumn: never;
274
+ identity: undefined;
275
+ generated: undefined;
276
+ }, {}, {
277
+ length: number | undefined;
278
+ $type: "SWIFT" | "IBAN" | "LOCAL_CZ" | "CRYPTO_ADDRESS";
279
+ }>;
280
+ iban: drizzle_orm_sqlite_core.SQLiteColumn<{
281
+ name: "iban";
282
+ tableName: "account_identifier";
283
+ dataType: "string";
284
+ columnType: "SQLiteText";
285
+ data: string;
286
+ driverParam: string;
287
+ notNull: false;
288
+ hasDefault: false;
289
+ isPrimaryKey: false;
290
+ isAutoincrement: false;
291
+ hasRuntimeDefault: false;
292
+ enumValues: [string, ...string[]];
293
+ baseColumn: never;
294
+ identity: undefined;
295
+ generated: undefined;
296
+ }, {}, {
297
+ length: number | undefined;
298
+ }>;
299
+ accountNumber: drizzle_orm_sqlite_core.SQLiteColumn<{
300
+ name: "account_number";
301
+ tableName: "account_identifier";
302
+ dataType: "string";
303
+ columnType: "SQLiteText";
304
+ data: string;
305
+ driverParam: string;
306
+ notNull: false;
307
+ hasDefault: false;
308
+ isPrimaryKey: false;
309
+ isAutoincrement: false;
310
+ hasRuntimeDefault: false;
311
+ enumValues: [string, ...string[]];
312
+ baseColumn: never;
313
+ identity: undefined;
314
+ generated: undefined;
315
+ }, {}, {
316
+ length: number | undefined;
317
+ }>;
318
+ bankCode: drizzle_orm_sqlite_core.SQLiteColumn<{
319
+ name: "bank_code";
320
+ tableName: "account_identifier";
321
+ dataType: "string";
322
+ columnType: "SQLiteText";
323
+ data: "5051" | "0100" | "0300" | "0600" | "0710" | "0800" | "2010" | "2060" | "2070" | "2100" | "2200" | "2220" | "2250" | "2260" | "2600" | "2700" | "3030" | "3060" | "3500" | "4300" | "5500" | "5800" | "6000" | "6200" | "6210" | "6300" | "6363" | "6700" | "6800" | "7910" | "7950" | "7960" | "7970" | "7990" | "8030" | "8040" | "8060" | "8090" | "8150" | "8190" | "8198" | "8220" | "8250" | "8255" | "8265" | "8500";
324
+ driverParam: string;
325
+ notNull: false;
326
+ hasDefault: false;
327
+ isPrimaryKey: false;
328
+ isAutoincrement: false;
329
+ hasRuntimeDefault: false;
330
+ enumValues: [string, ...string[]];
331
+ baseColumn: never;
332
+ identity: undefined;
333
+ generated: undefined;
334
+ }, {}, {
335
+ length: number | undefined;
336
+ $type: "5051" | "0100" | "0300" | "0600" | "0710" | "0800" | "2010" | "2060" | "2070" | "2100" | "2200" | "2220" | "2250" | "2260" | "2600" | "2700" | "3030" | "3060" | "3500" | "4300" | "5500" | "5800" | "6000" | "6200" | "6210" | "6300" | "6363" | "6700" | "6800" | "7910" | "7950" | "7960" | "7970" | "7990" | "8030" | "8040" | "8060" | "8090" | "8150" | "8190" | "8198" | "8220" | "8250" | "8255" | "8265" | "8500";
337
+ }>;
338
+ prefix: drizzle_orm_sqlite_core.SQLiteColumn<{
339
+ name: "prefix";
340
+ tableName: "account_identifier";
341
+ dataType: "string";
342
+ columnType: "SQLiteText";
343
+ data: string;
344
+ driverParam: string;
345
+ notNull: false;
346
+ hasDefault: false;
347
+ isPrimaryKey: false;
348
+ isAutoincrement: false;
349
+ hasRuntimeDefault: false;
350
+ enumValues: [string, ...string[]];
351
+ baseColumn: never;
352
+ identity: undefined;
353
+ generated: undefined;
354
+ }, {}, {
355
+ length: number | undefined;
356
+ }>;
357
+ swift: drizzle_orm_sqlite_core.SQLiteColumn<{
358
+ name: "swift";
359
+ tableName: "account_identifier";
360
+ dataType: "string";
361
+ columnType: "SQLiteText";
362
+ data: string;
363
+ driverParam: string;
364
+ notNull: false;
365
+ hasDefault: false;
366
+ isPrimaryKey: false;
367
+ isAutoincrement: false;
368
+ hasRuntimeDefault: false;
369
+ enumValues: [string, ...string[]];
370
+ baseColumn: never;
371
+ identity: undefined;
372
+ generated: undefined;
373
+ }, {}, {
374
+ length: number | undefined;
375
+ }>;
376
+ cryptoAddress: drizzle_orm_sqlite_core.SQLiteColumn<{
377
+ name: "crypto_address";
378
+ tableName: "account_identifier";
379
+ dataType: "string";
380
+ columnType: "SQLiteText";
381
+ data: string;
382
+ driverParam: string;
383
+ notNull: false;
384
+ hasDefault: false;
385
+ isPrimaryKey: false;
386
+ isAutoincrement: false;
387
+ hasRuntimeDefault: false;
388
+ enumValues: [string, ...string[]];
389
+ baseColumn: never;
390
+ identity: undefined;
391
+ generated: undefined;
392
+ }, {}, {
393
+ length: number | undefined;
394
+ }>;
395
+ label: drizzle_orm_sqlite_core.SQLiteColumn<{
396
+ name: "label";
397
+ tableName: "account_identifier";
398
+ dataType: "string";
399
+ columnType: "SQLiteText";
400
+ data: string;
401
+ driverParam: string;
402
+ notNull: false;
403
+ hasDefault: false;
404
+ isPrimaryKey: false;
405
+ isAutoincrement: false;
406
+ hasRuntimeDefault: false;
407
+ enumValues: [string, ...string[]];
408
+ baseColumn: never;
409
+ identity: undefined;
410
+ generated: undefined;
411
+ }, {}, {
412
+ length: number | undefined;
413
+ }>;
414
+ holderName: drizzle_orm_sqlite_core.SQLiteColumn<{
415
+ name: "holder_name";
416
+ tableName: "account_identifier";
417
+ dataType: "string";
418
+ columnType: "SQLiteText";
419
+ data: string;
420
+ driverParam: string;
421
+ notNull: true;
422
+ hasDefault: false;
423
+ isPrimaryKey: false;
424
+ isAutoincrement: false;
425
+ hasRuntimeDefault: false;
426
+ enumValues: [string, ...string[]];
427
+ baseColumn: never;
428
+ identity: undefined;
429
+ generated: undefined;
430
+ }, {}, {
431
+ length: number | undefined;
432
+ }>;
433
+ network: drizzle_orm_sqlite_core.SQLiteColumn<{
434
+ name: "network";
435
+ tableName: "account_identifier";
436
+ dataType: "string";
437
+ columnType: "SQLiteText";
438
+ data: "BTC" | "ETH" | "XRP" | "LTC" | "DOGE" | "ARBITRUM" | "OPTIMISM" | "POLYGON" | "CARDANO" | "POLKADOT" | "COSMOS" | "SOLANA" | "AVALANCHE" | "BSC" | "FANTOM" | "TRON" | "NEAR" | "ALGORAND" | "TEZOS" | "CRONOS" | "MOONBEAM" | "AURORA" | "HARMONY" | "CELO" | "KAVA";
439
+ driverParam: string;
440
+ notNull: false;
441
+ hasDefault: false;
442
+ isPrimaryKey: false;
443
+ isAutoincrement: false;
444
+ hasRuntimeDefault: false;
445
+ enumValues: [string, ...string[]];
446
+ baseColumn: never;
447
+ identity: undefined;
448
+ generated: undefined;
449
+ }, {}, {
450
+ length: number | undefined;
451
+ $type: "BTC" | "ETH" | "XRP" | "LTC" | "DOGE" | "ARBITRUM" | "OPTIMISM" | "POLYGON" | "CARDANO" | "POLKADOT" | "COSMOS" | "SOLANA" | "AVALANCHE" | "BSC" | "FANTOM" | "TRON" | "NEAR" | "ALGORAND" | "TEZOS" | "CRONOS" | "MOONBEAM" | "AURORA" | "HARMONY" | "CELO" | "KAVA";
452
+ }>;
453
+ countryCode: drizzle_orm_sqlite_core.SQLiteColumn<{
454
+ name: "country_code";
455
+ tableName: "account_identifier";
456
+ dataType: "string";
457
+ columnType: "SQLiteText";
458
+ data: "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
459
+ driverParam: string;
460
+ notNull: false;
461
+ hasDefault: false;
462
+ isPrimaryKey: false;
463
+ isAutoincrement: false;
464
+ hasRuntimeDefault: false;
465
+ enumValues: [string, ...string[]];
466
+ baseColumn: never;
467
+ identity: undefined;
468
+ generated: undefined;
469
+ }, {}, {
470
+ length: number | undefined;
471
+ $type: "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
472
+ }>;
473
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
474
+ name: "id";
475
+ tableName: "account_identifier";
476
+ dataType: "string";
477
+ columnType: "SQLiteText";
478
+ data: string;
479
+ driverParam: string;
480
+ notNull: true;
481
+ hasDefault: false;
482
+ isPrimaryKey: true;
483
+ isAutoincrement: false;
484
+ hasRuntimeDefault: false;
485
+ enumValues: [string, ...string[]];
486
+ baseColumn: never;
487
+ identity: undefined;
488
+ generated: undefined;
489
+ }, {}, {
490
+ length: number | undefined;
491
+ }>;
492
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
493
+ name: "created_at";
494
+ tableName: "account_identifier";
495
+ dataType: "date";
496
+ columnType: "SQLiteTimestamp";
497
+ data: Date;
498
+ driverParam: number;
499
+ notNull: false;
500
+ hasDefault: true;
501
+ isPrimaryKey: false;
502
+ isAutoincrement: false;
503
+ hasRuntimeDefault: false;
504
+ enumValues: undefined;
505
+ baseColumn: never;
506
+ identity: undefined;
507
+ generated: undefined;
508
+ }, {}, {}>;
509
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
510
+ name: "updated_at";
511
+ tableName: "account_identifier";
512
+ dataType: "date";
513
+ columnType: "SQLiteTimestamp";
514
+ data: Date;
515
+ driverParam: number;
516
+ notNull: false;
517
+ hasDefault: true;
518
+ isPrimaryKey: false;
519
+ isAutoincrement: false;
520
+ hasRuntimeDefault: false;
521
+ enumValues: undefined;
522
+ baseColumn: never;
523
+ identity: undefined;
524
+ generated: undefined;
525
+ }, {}, {}>;
526
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
527
+ name: "deleted_at";
528
+ tableName: "account_identifier";
529
+ dataType: "date";
530
+ columnType: "SQLiteTimestamp";
531
+ data: Date;
532
+ driverParam: number;
533
+ notNull: false;
534
+ hasDefault: true;
535
+ isPrimaryKey: false;
536
+ isAutoincrement: false;
537
+ hasRuntimeDefault: false;
538
+ enumValues: undefined;
539
+ baseColumn: never;
540
+ identity: undefined;
541
+ generated: undefined;
542
+ }, {}, {}>;
543
+ };
544
+ dialect: "sqlite";
545
+ }>;
546
+ declare const accountIdentifierMapping: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
547
+ name: "account_identifier_mapping";
548
+ schema: undefined;
549
+ columns: {
550
+ accountId: drizzle_orm_sqlite_core.SQLiteColumn<{
551
+ name: "account_id";
552
+ tableName: "account_identifier_mapping";
553
+ dataType: "string";
554
+ columnType: "SQLiteText";
555
+ data: string;
556
+ driverParam: string;
557
+ notNull: true;
558
+ hasDefault: false;
559
+ isPrimaryKey: false;
560
+ isAutoincrement: false;
561
+ hasRuntimeDefault: false;
562
+ enumValues: [string, ...string[]];
563
+ baseColumn: never;
564
+ identity: undefined;
565
+ generated: undefined;
566
+ }, {}, {
567
+ length: number | undefined;
568
+ }>;
569
+ identifierId: drizzle_orm_sqlite_core.SQLiteColumn<{
570
+ name: "identifier_id";
571
+ tableName: "account_identifier_mapping";
572
+ dataType: "string";
573
+ columnType: "SQLiteText";
574
+ data: string;
575
+ driverParam: string;
576
+ notNull: true;
577
+ hasDefault: false;
578
+ isPrimaryKey: false;
579
+ isAutoincrement: false;
580
+ hasRuntimeDefault: false;
581
+ enumValues: [string, ...string[]];
582
+ baseColumn: never;
583
+ identity: undefined;
584
+ generated: undefined;
585
+ }, {}, {
586
+ length: number | undefined;
587
+ }>;
588
+ };
589
+ dialect: "sqlite";
590
+ }>;
591
+ declare const accountRelations: drizzle_orm.Relations<"account", {
592
+ identifiers: drizzle_orm.Many<"account_identifier_mapping">;
593
+ }>;
594
+ declare const accountIdentifierRelations: drizzle_orm.Relations<"account_identifier", {
595
+ accountMappings: drizzle_orm.Many<"account_identifier_mapping">;
596
+ }>;
597
+ declare const accountIdentifierMappingRelations: drizzle_orm.Relations<"account_identifier_mapping", {
598
+ account: drizzle_orm.One<"account", true>;
599
+ identifier: drizzle_orm.One<"account_identifier", true>;
600
+ }>;
601
+
602
+ declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
603
+ type PaymentType = (typeof PAYMENT_TYPES)[number];
604
+
605
+ type CryptoNetworkCode = (typeof CRYPTO_NETWORK_CODES)[number];
606
+ declare const PAYMENT_STATUSES: readonly ["PREPARED", "INITIALIZED", "FAILED", "PENDING", "COMPLETED", "CREATED"];
607
+ type PaymentStatus = (typeof PAYMENT_STATUSES)[number];
608
+ declare const PAYMENT_DIRECTIONS: readonly ["INCOMING", "OUTGOING"];
609
+ type PaymentDirection = (typeof PAYMENT_DIRECTIONS)[number];
610
+
611
+ type CurrencyCode = (typeof CURRENCY_CODES)[number];
612
+ /**
613
+ * Batch status constants
614
+ */
615
+ declare const BATCH_STATUSES: readonly ["OPEN", "WAITING_FOR_PROCESSING", "PROCESSING", "READY_TO_SIGN", "PREPARED", "COMPLETED", "FAILED"];
616
+ /**
617
+ * Type definition for batch status
618
+ */
619
+ type BatchStatus = (typeof BATCH_STATUSES)[number];
620
+ type Currency = CODES.Currency;
621
+
622
+ type BankCode = (typeof BANK_CODES)[number];
623
+ declare const COUNTRY_CODES: ["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]];
624
+ type CountryCode = (typeof COUNTRY_CODES)[number];
625
+
626
+ interface TransactionMetadata {
627
+ /**
628
+ * Tags for categorization or grouping of the transaction
629
+ */
630
+ tags?: string[];
631
+ /**
632
+ * Additional notes or comments about the transaction
633
+ */
634
+ note?: string;
635
+ /**
636
+ * Payment processing information for bank payment matching and initiation
637
+ */
638
+ payment?: {
639
+ vs?: string;
640
+ ss?: string;
641
+ ks?: string;
642
+ message?: string;
643
+ paymentReason?: string;
644
+ paymentChargeType?: PaymentChargeType;
645
+ reference?: string;
646
+ creditor?: BankAccountMetadata;
647
+ debtor?: BankAccountMetadata;
648
+ executionDate?: string;
649
+ currency?: CurrencyCode;
650
+ amount?: number;
651
+ };
652
+ }
653
+ interface EntryMetadata {
654
+ context?: {
655
+ initiatedBy?: 'system' | 'user' | 'bank' | 'blockchain';
656
+ sourceService?: string;
657
+ processor?: string;
658
+ userId?: string;
659
+ organizationId?: string;
660
+ sessionId?: string;
661
+ ipAddress?: string;
662
+ };
663
+ /**
664
+ * Info about the crypto transaction
665
+ */
666
+ crypto?: {
667
+ txHash?: string;
668
+ fromAddress?: string;
669
+ toAddress?: string;
670
+ chainId?: string;
671
+ network?: string;
672
+ confirmations?: number;
673
+ blockNumber?: number;
674
+ };
675
+ /**
676
+ * Info about the foreign exchange transaction
677
+ */
678
+ fx?: {
679
+ rate?: number;
680
+ sourceCurrency?: string;
681
+ targetCurrency?: string;
682
+ provider?: string;
683
+ slippage?: number;
684
+ spread?: number;
685
+ };
686
+ /**
687
+ * Info about the fee applied to the transaction
688
+ */
689
+ fee?: {
690
+ feeType?: 'flat' | 'percentage';
691
+ sourceAmount?: number;
692
+ appliedAmount?: number;
693
+ feeTargetAccountId?: string;
694
+ feeCode?: string;
695
+ };
696
+ /**
697
+ * Specific tag for reconciliation purposes, e.g. for bank statements, batchId, etc.
698
+ */
699
+ reconciliationTag?: string;
700
+ /**
701
+ * Specific code for bank clearing purposes
702
+ */
703
+ clearingCode?: string;
704
+ /**
705
+ * Tags for categorization or grouping of the transaction
706
+ */
707
+ tags?: string[];
708
+ /**
709
+ * Additional notes or comments about the transaction
710
+ */
711
+ note?: string;
712
+ }
713
+
714
+ declare const entry: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
715
+ name: "entry";
716
+ schema: undefined;
717
+ columns: {
718
+ accountId: drizzle_orm_sqlite_core.SQLiteColumn<{
719
+ name: "account_id";
720
+ tableName: "entry";
721
+ dataType: "string";
722
+ columnType: "SQLiteText";
723
+ data: string;
724
+ driverParam: string;
725
+ notNull: true;
726
+ hasDefault: false;
727
+ isPrimaryKey: false;
728
+ isAutoincrement: false;
729
+ hasRuntimeDefault: false;
730
+ enumValues: [string, ...string[]];
731
+ baseColumn: never;
732
+ identity: undefined;
733
+ generated: undefined;
734
+ }, {}, {
735
+ length: number | undefined;
736
+ }>;
737
+ currency: drizzle_orm_sqlite_core.SQLiteColumn<{
738
+ name: "currency";
739
+ tableName: "entry";
740
+ dataType: "string";
741
+ columnType: "SQLiteText";
742
+ data: string;
743
+ driverParam: string;
744
+ notNull: true;
745
+ hasDefault: false;
746
+ isPrimaryKey: false;
747
+ isAutoincrement: false;
748
+ hasRuntimeDefault: false;
749
+ enumValues: [string, ...string[]];
750
+ baseColumn: never;
751
+ identity: undefined;
752
+ generated: undefined;
753
+ }, {}, {
754
+ length: number | undefined;
755
+ }>;
756
+ creditAmount: drizzle_orm_sqlite_core.SQLiteColumn<{
757
+ name: "amount";
758
+ tableName: "entry";
759
+ dataType: "number";
760
+ columnType: "SQLiteReal";
761
+ data: number;
762
+ driverParam: number;
763
+ notNull: true;
764
+ hasDefault: false;
765
+ isPrimaryKey: false;
766
+ isAutoincrement: false;
767
+ hasRuntimeDefault: false;
768
+ enumValues: undefined;
769
+ baseColumn: never;
770
+ identity: undefined;
771
+ generated: undefined;
772
+ }, {}, {}>;
773
+ debitAmount: drizzle_orm_sqlite_core.SQLiteColumn<{
774
+ name: "debit_amount";
775
+ tableName: "entry";
776
+ dataType: "number";
777
+ columnType: "SQLiteReal";
778
+ data: number;
779
+ driverParam: number;
780
+ notNull: true;
781
+ hasDefault: false;
782
+ isPrimaryKey: false;
783
+ isAutoincrement: false;
784
+ hasRuntimeDefault: false;
785
+ enumValues: undefined;
786
+ baseColumn: never;
787
+ identity: undefined;
788
+ generated: undefined;
789
+ }, {}, {}>;
790
+ correlationId: drizzle_orm_sqlite_core.SQLiteColumn<{
791
+ name: "correlation_id";
792
+ tableName: "entry";
793
+ dataType: "string";
794
+ columnType: "SQLiteText";
795
+ data: string;
796
+ driverParam: string;
797
+ notNull: true;
798
+ hasDefault: false;
799
+ isPrimaryKey: false;
800
+ isAutoincrement: false;
801
+ hasRuntimeDefault: false;
802
+ enumValues: [string, ...string[]];
803
+ baseColumn: never;
804
+ identity: undefined;
805
+ generated: undefined;
806
+ }, {}, {
807
+ length: number | undefined;
808
+ }>;
809
+ transactionId: drizzle_orm_sqlite_core.SQLiteColumn<{
810
+ name: "transaction_id";
811
+ tableName: "entry";
812
+ dataType: "string";
813
+ columnType: "SQLiteText";
814
+ data: string;
815
+ driverParam: string;
816
+ notNull: true;
817
+ hasDefault: false;
818
+ isPrimaryKey: false;
819
+ isAutoincrement: false;
820
+ hasRuntimeDefault: false;
821
+ enumValues: [string, ...string[]];
822
+ baseColumn: never;
823
+ identity: undefined;
824
+ generated: undefined;
825
+ }, {}, {
826
+ length: number | undefined;
827
+ }>;
828
+ status: drizzle_orm_sqlite_core.SQLiteColumn<{
829
+ name: "status";
830
+ tableName: "entry";
831
+ dataType: "string";
832
+ columnType: "SQLiteText";
833
+ data: "FAILED" | "PENDING" | "REALIZED" | "CANCELED";
834
+ driverParam: string;
835
+ notNull: true;
836
+ hasDefault: false;
837
+ isPrimaryKey: false;
838
+ isAutoincrement: false;
839
+ hasRuntimeDefault: false;
840
+ enumValues: [string, ...string[]];
841
+ baseColumn: never;
842
+ identity: undefined;
843
+ generated: undefined;
844
+ }, {}, {
845
+ length: number | undefined;
846
+ $type: "FAILED" | "PENDING" | "REALIZED" | "CANCELED";
847
+ }>;
848
+ isBalanced: drizzle_orm_sqlite_core.SQLiteColumn<{
849
+ name: "is_balanced";
850
+ tableName: "entry";
851
+ dataType: "boolean";
852
+ columnType: "SQLiteBoolean";
853
+ data: boolean;
854
+ driverParam: number;
855
+ notNull: true;
856
+ hasDefault: false;
857
+ isPrimaryKey: false;
858
+ isAutoincrement: false;
859
+ hasRuntimeDefault: false;
860
+ enumValues: undefined;
861
+ baseColumn: never;
862
+ identity: undefined;
863
+ generated: undefined;
864
+ }, {}, {}>;
865
+ metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
866
+ name: "metadata";
867
+ tableName: "entry";
868
+ dataType: "json";
869
+ columnType: "SQLiteTextJson";
870
+ data: EntryMetadata;
871
+ driverParam: string;
872
+ notNull: true;
873
+ hasDefault: false;
874
+ isPrimaryKey: false;
875
+ isAutoincrement: false;
876
+ hasRuntimeDefault: false;
877
+ enumValues: undefined;
878
+ baseColumn: never;
879
+ identity: undefined;
880
+ generated: undefined;
881
+ }, {}, {
882
+ $type: EntryMetadata;
883
+ }>;
884
+ timestamp: drizzle_orm_sqlite_core.SQLiteColumn<{
885
+ name: "timestamp";
886
+ tableName: "entry";
887
+ dataType: "date";
888
+ columnType: "SQLiteTimestamp";
889
+ data: Date;
890
+ driverParam: number;
891
+ notNull: true;
892
+ hasDefault: false;
893
+ isPrimaryKey: false;
894
+ isAutoincrement: false;
895
+ hasRuntimeDefault: false;
896
+ enumValues: undefined;
897
+ baseColumn: never;
898
+ identity: undefined;
899
+ generated: undefined;
900
+ }, {}, {}>;
901
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
902
+ name: "id";
903
+ tableName: "entry";
904
+ dataType: "string";
905
+ columnType: "SQLiteText";
906
+ data: string;
907
+ driverParam: string;
908
+ notNull: true;
909
+ hasDefault: false;
910
+ isPrimaryKey: true;
911
+ isAutoincrement: false;
912
+ hasRuntimeDefault: false;
913
+ enumValues: [string, ...string[]];
914
+ baseColumn: never;
915
+ identity: undefined;
916
+ generated: undefined;
917
+ }, {}, {
918
+ length: number | undefined;
919
+ }>;
920
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
921
+ name: "created_at";
922
+ tableName: "entry";
923
+ dataType: "date";
924
+ columnType: "SQLiteTimestamp";
925
+ data: Date;
926
+ driverParam: number;
927
+ notNull: false;
928
+ hasDefault: true;
929
+ isPrimaryKey: false;
930
+ isAutoincrement: false;
931
+ hasRuntimeDefault: false;
932
+ enumValues: undefined;
933
+ baseColumn: never;
934
+ identity: undefined;
935
+ generated: undefined;
936
+ }, {}, {}>;
937
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
938
+ name: "updated_at";
939
+ tableName: "entry";
940
+ dataType: "date";
941
+ columnType: "SQLiteTimestamp";
942
+ data: Date;
943
+ driverParam: number;
944
+ notNull: false;
945
+ hasDefault: true;
946
+ isPrimaryKey: false;
947
+ isAutoincrement: false;
948
+ hasRuntimeDefault: false;
949
+ enumValues: undefined;
950
+ baseColumn: never;
951
+ identity: undefined;
952
+ generated: undefined;
953
+ }, {}, {}>;
954
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
955
+ name: "deleted_at";
956
+ tableName: "entry";
957
+ dataType: "date";
958
+ columnType: "SQLiteTimestamp";
959
+ data: Date;
960
+ driverParam: number;
961
+ notNull: false;
962
+ hasDefault: true;
963
+ isPrimaryKey: false;
964
+ isAutoincrement: false;
965
+ hasRuntimeDefault: false;
966
+ enumValues: undefined;
967
+ baseColumn: never;
968
+ identity: undefined;
969
+ generated: undefined;
970
+ }, {}, {}>;
971
+ };
972
+ dialect: "sqlite";
973
+ }>;
974
+
975
+ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
976
+ name: "transaction";
977
+ schema: undefined;
978
+ columns: {
979
+ correlationId: drizzle_orm_sqlite_core.SQLiteColumn<{
980
+ name: "correlation_id";
981
+ tableName: "transaction";
982
+ dataType: "string";
983
+ columnType: "SQLiteText";
984
+ data: string;
985
+ driverParam: string;
986
+ notNull: true;
987
+ hasDefault: false;
988
+ isPrimaryKey: false;
989
+ isAutoincrement: false;
990
+ hasRuntimeDefault: false;
991
+ enumValues: [string, ...string[]];
992
+ baseColumn: never;
993
+ identity: undefined;
994
+ generated: undefined;
995
+ }, {}, {
996
+ length: number | undefined;
997
+ }>;
998
+ referenceType: drizzle_orm_sqlite_core.SQLiteColumn<{
999
+ name: "reference_type";
1000
+ tableName: "transaction";
1001
+ dataType: "string";
1002
+ columnType: "SQLiteText";
1003
+ data: "PAYMENT" | "EXCHANGE" | "ORDER";
1004
+ driverParam: string;
1005
+ notNull: true;
1006
+ hasDefault: false;
1007
+ isPrimaryKey: false;
1008
+ isAutoincrement: false;
1009
+ hasRuntimeDefault: false;
1010
+ enumValues: ["PAYMENT", "EXCHANGE", "ORDER"];
1011
+ baseColumn: never;
1012
+ identity: undefined;
1013
+ generated: undefined;
1014
+ }, {}, {
1015
+ length: number | undefined;
1016
+ $type: "PAYMENT" | "EXCHANGE" | "ORDER";
1017
+ }>;
1018
+ referenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
1019
+ name: "reference_id";
1020
+ tableName: "transaction";
1021
+ dataType: "string";
1022
+ columnType: "SQLiteText";
1023
+ data: string;
1024
+ driverParam: string;
1025
+ notNull: false;
1026
+ hasDefault: false;
1027
+ isPrimaryKey: false;
1028
+ isAutoincrement: false;
1029
+ hasRuntimeDefault: false;
1030
+ enumValues: [string, ...string[]];
1031
+ baseColumn: never;
1032
+ identity: undefined;
1033
+ generated: undefined;
1034
+ }, {}, {
1035
+ length: number | undefined;
1036
+ }>;
1037
+ type: drizzle_orm_sqlite_core.SQLiteColumn<{
1038
+ name: "type";
1039
+ tableName: "transaction";
1040
+ dataType: "string";
1041
+ columnType: "SQLiteText";
1042
+ data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER";
1043
+ driverParam: string;
1044
+ notNull: true;
1045
+ hasDefault: false;
1046
+ isPrimaryKey: false;
1047
+ isAutoincrement: false;
1048
+ hasRuntimeDefault: false;
1049
+ enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER"];
1050
+ baseColumn: never;
1051
+ identity: undefined;
1052
+ generated: undefined;
1053
+ }, {}, {
1054
+ length: number | undefined;
1055
+ $type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER";
1056
+ }>;
1057
+ description: drizzle_orm_sqlite_core.SQLiteColumn<{
1058
+ name: "description";
1059
+ tableName: "transaction";
1060
+ dataType: "string";
1061
+ columnType: "SQLiteText";
1062
+ data: string;
1063
+ driverParam: string;
1064
+ notNull: false;
1065
+ hasDefault: false;
1066
+ isPrimaryKey: false;
1067
+ isAutoincrement: false;
1068
+ hasRuntimeDefault: false;
1069
+ enumValues: [string, ...string[]];
1070
+ baseColumn: never;
1071
+ identity: undefined;
1072
+ generated: undefined;
1073
+ }, {}, {
1074
+ length: number | undefined;
1075
+ }>;
1076
+ completedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1077
+ name: "completed_at";
1078
+ tableName: "transaction";
1079
+ dataType: "date";
1080
+ columnType: "SQLiteTimestamp";
1081
+ data: Date;
1082
+ driverParam: number;
1083
+ notNull: false;
1084
+ hasDefault: false;
1085
+ isPrimaryKey: false;
1086
+ isAutoincrement: false;
1087
+ hasRuntimeDefault: false;
1088
+ enumValues: undefined;
1089
+ baseColumn: never;
1090
+ identity: undefined;
1091
+ generated: undefined;
1092
+ }, {}, {}>;
1093
+ confirmationSentAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1094
+ name: "confirmation_sent_at";
1095
+ tableName: "transaction";
1096
+ dataType: "date";
1097
+ columnType: "SQLiteTimestamp";
1098
+ data: Date;
1099
+ driverParam: number;
1100
+ notNull: false;
1101
+ hasDefault: false;
1102
+ isPrimaryKey: false;
1103
+ isAutoincrement: false;
1104
+ hasRuntimeDefault: false;
1105
+ enumValues: undefined;
1106
+ baseColumn: never;
1107
+ identity: undefined;
1108
+ generated: undefined;
1109
+ }, {}, {}>;
1110
+ status: drizzle_orm_sqlite_core.SQLiteColumn<{
1111
+ name: "status";
1112
+ tableName: "transaction";
1113
+ dataType: "string";
1114
+ columnType: "SQLiteText";
1115
+ data: "FAILED" | "COMPLETED" | "WAITING_FOR_PAYMENT" | "PAUSED" | "WAITING_FOR_MANUAL_PROCESSING" | "MATCHED" | "RETURNING" | "RETURNED" | "CANCELLED";
1116
+ driverParam: string;
1117
+ notNull: true;
1118
+ hasDefault: false;
1119
+ isPrimaryKey: false;
1120
+ isAutoincrement: false;
1121
+ hasRuntimeDefault: false;
1122
+ enumValues: ["WAITING_FOR_PAYMENT", "PAUSED", "WAITING_FOR_MANUAL_PROCESSING", "MATCHED", "RETURNING", "RETURNED", "FAILED", "CANCELLED", "COMPLETED"];
1123
+ baseColumn: never;
1124
+ identity: undefined;
1125
+ generated: undefined;
1126
+ }, {}, {
1127
+ length: number | undefined;
1128
+ $type: "FAILED" | "COMPLETED" | "WAITING_FOR_PAYMENT" | "PAUSED" | "WAITING_FOR_MANUAL_PROCESSING" | "MATCHED" | "RETURNING" | "RETURNED" | "CANCELLED";
1129
+ }>;
1130
+ statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
1131
+ name: "status_reason";
1132
+ tableName: "transaction";
1133
+ dataType: "string";
1134
+ columnType: "SQLiteText";
1135
+ data: string;
1136
+ driverParam: string;
1137
+ notNull: false;
1138
+ hasDefault: false;
1139
+ isPrimaryKey: false;
1140
+ isAutoincrement: false;
1141
+ hasRuntimeDefault: false;
1142
+ enumValues: [string, ...string[]];
1143
+ baseColumn: never;
1144
+ identity: undefined;
1145
+ generated: undefined;
1146
+ }, {}, {
1147
+ length: number | undefined;
1148
+ }>;
1149
+ paymentId: drizzle_orm_sqlite_core.SQLiteColumn<{
1150
+ name: "payment_id";
1151
+ tableName: "transaction";
1152
+ dataType: "string";
1153
+ columnType: "SQLiteText";
1154
+ data: string;
1155
+ driverParam: string;
1156
+ notNull: false;
1157
+ hasDefault: false;
1158
+ isPrimaryKey: false;
1159
+ isAutoincrement: false;
1160
+ hasRuntimeDefault: false;
1161
+ enumValues: [string, ...string[]];
1162
+ baseColumn: never;
1163
+ identity: undefined;
1164
+ generated: undefined;
1165
+ }, {}, {
1166
+ length: number | undefined;
1167
+ }>;
1168
+ metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
1169
+ name: "metadata";
1170
+ tableName: "transaction";
1171
+ dataType: "json";
1172
+ columnType: "SQLiteTextJson";
1173
+ data: TransactionMetadata;
1174
+ driverParam: string;
1175
+ notNull: true;
1176
+ hasDefault: false;
1177
+ isPrimaryKey: false;
1178
+ isAutoincrement: false;
1179
+ hasRuntimeDefault: false;
1180
+ enumValues: undefined;
1181
+ baseColumn: never;
1182
+ identity: undefined;
1183
+ generated: undefined;
1184
+ }, {}, {
1185
+ $type: TransactionMetadata;
1186
+ }>;
1187
+ value: drizzle_orm_sqlite_core.SQLiteColumn<{
1188
+ name: "value";
1189
+ tableName: "transaction";
1190
+ dataType: "number";
1191
+ columnType: "SQLiteReal";
1192
+ data: number;
1193
+ driverParam: number;
1194
+ notNull: false;
1195
+ hasDefault: false;
1196
+ isPrimaryKey: false;
1197
+ isAutoincrement: false;
1198
+ hasRuntimeDefault: false;
1199
+ enumValues: undefined;
1200
+ baseColumn: never;
1201
+ identity: undefined;
1202
+ generated: undefined;
1203
+ }, {}, {}>;
1204
+ currency: drizzle_orm_sqlite_core.SQLiteColumn<{
1205
+ name: "currency";
1206
+ tableName: "transaction";
1207
+ dataType: "string";
1208
+ columnType: "SQLiteText";
1209
+ data: "CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX";
1210
+ driverParam: string;
1211
+ notNull: false;
1212
+ hasDefault: false;
1213
+ isPrimaryKey: false;
1214
+ isAutoincrement: false;
1215
+ hasRuntimeDefault: false;
1216
+ enumValues: [string, ...string[]];
1217
+ baseColumn: never;
1218
+ identity: undefined;
1219
+ generated: undefined;
1220
+ }, {}, {
1221
+ length: number | undefined;
1222
+ $type: "CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX";
1223
+ }>;
1224
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1225
+ name: "id";
1226
+ tableName: "transaction";
1227
+ dataType: "string";
1228
+ columnType: "SQLiteText";
1229
+ data: string;
1230
+ driverParam: string;
1231
+ notNull: true;
1232
+ hasDefault: false;
1233
+ isPrimaryKey: true;
1234
+ isAutoincrement: false;
1235
+ hasRuntimeDefault: false;
1236
+ enumValues: [string, ...string[]];
1237
+ baseColumn: never;
1238
+ identity: undefined;
1239
+ generated: undefined;
1240
+ }, {}, {
1241
+ length: number | undefined;
1242
+ }>;
1243
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1244
+ name: "created_at";
1245
+ tableName: "transaction";
1246
+ dataType: "date";
1247
+ columnType: "SQLiteTimestamp";
1248
+ data: Date;
1249
+ driverParam: number;
1250
+ notNull: false;
1251
+ hasDefault: true;
1252
+ isPrimaryKey: false;
1253
+ isAutoincrement: false;
1254
+ hasRuntimeDefault: false;
1255
+ enumValues: undefined;
1256
+ baseColumn: never;
1257
+ identity: undefined;
1258
+ generated: undefined;
1259
+ }, {}, {}>;
1260
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1261
+ name: "updated_at";
1262
+ tableName: "transaction";
1263
+ dataType: "date";
1264
+ columnType: "SQLiteTimestamp";
1265
+ data: Date;
1266
+ driverParam: number;
1267
+ notNull: false;
1268
+ hasDefault: true;
1269
+ isPrimaryKey: false;
1270
+ isAutoincrement: false;
1271
+ hasRuntimeDefault: false;
1272
+ enumValues: undefined;
1273
+ baseColumn: never;
1274
+ identity: undefined;
1275
+ generated: undefined;
1276
+ }, {}, {}>;
1277
+ deletedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1278
+ name: "deleted_at";
1279
+ tableName: "transaction";
1280
+ dataType: "date";
1281
+ columnType: "SQLiteTimestamp";
1282
+ data: Date;
1283
+ driverParam: number;
1284
+ notNull: false;
1285
+ hasDefault: true;
1286
+ isPrimaryKey: false;
1287
+ isAutoincrement: false;
1288
+ hasRuntimeDefault: false;
1289
+ enumValues: undefined;
1290
+ baseColumn: never;
1291
+ identity: undefined;
1292
+ generated: undefined;
1293
+ }, {}, {}>;
1294
+ };
1295
+ dialect: "sqlite";
1296
+ }>;
1297
+
1298
+ declare const schema_account: typeof account;
1299
+ declare const schema_accountIdentifier: typeof accountIdentifier;
1300
+ declare const schema_accountIdentifierMapping: typeof accountIdentifierMapping;
1301
+ declare const schema_accountIdentifierMappingRelations: typeof accountIdentifierMappingRelations;
1302
+ declare const schema_accountIdentifierRelations: typeof accountIdentifierRelations;
1303
+ declare const schema_accountRelations: typeof accountRelations;
1304
+ declare const schema_entry: typeof entry;
1305
+ declare const schema_transaction: typeof transaction;
1306
+ declare namespace schema {
1307
+ export {
1308
+ schema_account as account,
1309
+ schema_accountIdentifier as accountIdentifier,
1310
+ schema_accountIdentifierMapping as accountIdentifierMapping,
1311
+ schema_accountIdentifierMappingRelations as accountIdentifierMappingRelations,
1312
+ schema_accountIdentifierRelations as accountIdentifierRelations,
1313
+ schema_accountRelations as accountRelations,
1314
+ schema_entry as entry,
1315
+ schema_transaction as transaction,
1316
+ };
1317
+ }
1318
+
1319
+ export { ACCOUNT_TYPES as A, BALANCE_STRATEGIES as B, schema as D, ENTRY_STATUSES as E, account as F, accountIdentifier as G, accountIdentifierMapping as H, IDENTIFIER_KINDS as I, accountRelations as J, accountIdentifierRelations as K, accountIdentifierMappingRelations as L, entry as M, transaction as N, PAYMENT_CHARGE_TYPES as P, REFERENCE_TYPES as R, TRANSACTION_STATUSES as T, ASSET_TYPES as b, TRANSACTION_TYPES as h, PAYMENT_TYPES as n, PAYMENT_STATUSES as p, PAYMENT_DIRECTIONS as r, BATCH_STATUSES as u, COUNTRY_CODES as y };
1320
+ export type { CryptoNetworkCode as C, AccountType as a, AssetType as c, BalanceStrategy as d, IdentifierKind as e, EntryStatus as f, TransactionStatus as g, TransactionType as i, ReferenceType as j, PaymentChargeType as k, TransactionMetadata as l, EntryMetadata as m, PaymentType as o, PaymentStatus as q, PaymentDirection as s, CurrencyCode as t, BatchStatus as v, Currency as w, BankCode as x, CountryCode as z };