@develit-services/ledger 0.0.7 → 0.0.8
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/database/schema.d.cts +2 -2
- package/dist/database/schema.d.mts +2 -2
- package/dist/database/schema.d.ts +2 -2
- package/dist/export/worker.cjs +18 -20
- package/dist/export/worker.d.cts +3 -3
- package/dist/export/worker.d.mts +3 -3
- package/dist/export/worker.d.ts +3 -3
- package/dist/export/worker.mjs +20 -22
- package/dist/export/wrangler.d.cts +0 -1
- package/dist/export/wrangler.d.mts +0 -1
- package/dist/export/wrangler.d.ts +0 -1
- package/dist/shared/{ledger.CSKqugjV.d.ts → ledger.B097jcnG.d.ts} +8 -8
- package/dist/shared/{ledger.BGDeCrA0.d.mts → ledger.DRJcpNto.d.cts} +8 -8
- package/dist/shared/{ledger._YlR4Uxg.d.mts → ledger.MnYNWZoo.d.cts} +117 -117
- package/dist/shared/{ledger._YlR4Uxg.d.ts → ledger.MnYNWZoo.d.mts} +117 -117
- package/dist/shared/{ledger._YlR4Uxg.d.cts → ledger.MnYNWZoo.d.ts} +117 -117
- package/dist/shared/{ledger.CSi5bWgX.d.cts → ledger.w4G_kYoj.d.mts} +8 -8
- package/dist/{@types.d.cts → types.d.cts} +5 -10
- package/dist/{@types.d.mts → types.d.mts} +5 -10
- package/dist/{@types.d.ts → types.d.ts} +5 -10
- package/package.json +5 -5
- /package/dist/{@types.cjs → types.cjs} +0 -0
- /package/dist/{@types.mjs → types.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
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
3
|
import { BankAccountMetadata } from '@develit-io/backend-sdk';
|
|
4
|
+
import { CURRENCY_CODES, CRYPTO_NETWORK_CODES, CODES, BANK_CODES } from '@develit-io/general-codes';
|
|
5
5
|
|
|
6
6
|
declare const ACCOUNT_TYPES: readonly ["INTERNAL", "EXTERNAL", "NOSTRO", "TECHNICAL", "SETTLEMENT", "FX", "FEE", "REVENUE", "LOSS", "TRANSPORT", "HOLD", "SYSTEM", "TEST"];
|
|
7
7
|
type AccountType = (typeof ACCOUNT_TYPES)[number];
|
|
@@ -262,7 +262,7 @@ declare const accountIdentifier: drizzle_orm_sqlite_core.SQLiteTableWithColumns<
|
|
|
262
262
|
tableName: "account_identifier";
|
|
263
263
|
dataType: "string";
|
|
264
264
|
columnType: "SQLiteText";
|
|
265
|
-
data: "
|
|
265
|
+
data: "IBAN" | "LOCAL_CZ" | "SWIFT" | "CRYPTO_ADDRESS";
|
|
266
266
|
driverParam: string;
|
|
267
267
|
notNull: true;
|
|
268
268
|
hasDefault: false;
|
|
@@ -275,7 +275,7 @@ declare const accountIdentifier: drizzle_orm_sqlite_core.SQLiteTableWithColumns<
|
|
|
275
275
|
generated: undefined;
|
|
276
276
|
}, {}, {
|
|
277
277
|
length: number | undefined;
|
|
278
|
-
$type: "
|
|
278
|
+
$type: "IBAN" | "LOCAL_CZ" | "SWIFT" | "CRYPTO_ADDRESS";
|
|
279
279
|
}>;
|
|
280
280
|
iban: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
281
281
|
name: "iban";
|
|
@@ -599,118 +599,6 @@ declare const accountIdentifierMappingRelations: drizzle_orm.Relations<"account_
|
|
|
599
599
|
identifier: drizzle_orm.One<"account_identifier", true>;
|
|
600
600
|
}>;
|
|
601
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
602
|
declare const entry: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
715
603
|
name: "entry";
|
|
716
604
|
schema: undefined;
|
|
@@ -1112,7 +1000,7 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
1112
1000
|
tableName: "transaction";
|
|
1113
1001
|
dataType: "string";
|
|
1114
1002
|
columnType: "SQLiteText";
|
|
1115
|
-
data: "
|
|
1003
|
+
data: "WAITING_FOR_PAYMENT" | "PAUSED" | "WAITING_FOR_MANUAL_PROCESSING" | "MATCHED" | "RETURNING" | "RETURNED" | "FAILED" | "CANCELLED" | "COMPLETED";
|
|
1116
1004
|
driverParam: string;
|
|
1117
1005
|
notNull: true;
|
|
1118
1006
|
hasDefault: false;
|
|
@@ -1125,7 +1013,7 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
1125
1013
|
generated: undefined;
|
|
1126
1014
|
}, {}, {
|
|
1127
1015
|
length: number | undefined;
|
|
1128
|
-
$type: "
|
|
1016
|
+
$type: "WAITING_FOR_PAYMENT" | "PAUSED" | "WAITING_FOR_MANUAL_PROCESSING" | "MATCHED" | "RETURNING" | "RETURNED" | "FAILED" | "CANCELLED" | "COMPLETED";
|
|
1129
1017
|
}>;
|
|
1130
1018
|
statusReason: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1131
1019
|
name: "status_reason";
|
|
@@ -1316,5 +1204,117 @@ declare namespace schema {
|
|
|
1316
1204
|
};
|
|
1317
1205
|
}
|
|
1318
1206
|
|
|
1207
|
+
declare const PAYMENT_TYPES: readonly ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
|
|
1208
|
+
type PaymentType = (typeof PAYMENT_TYPES)[number];
|
|
1209
|
+
|
|
1210
|
+
type CryptoNetworkCode = (typeof CRYPTO_NETWORK_CODES)[number];
|
|
1211
|
+
declare const PAYMENT_STATUSES: readonly ["PREPARED", "INITIALIZED", "FAILED", "PENDING", "COMPLETED", "CREATED"];
|
|
1212
|
+
type PaymentStatus = (typeof PAYMENT_STATUSES)[number];
|
|
1213
|
+
declare const PAYMENT_DIRECTIONS: readonly ["INCOMING", "OUTGOING"];
|
|
1214
|
+
type PaymentDirection = (typeof PAYMENT_DIRECTIONS)[number];
|
|
1215
|
+
|
|
1216
|
+
type CurrencyCode = (typeof CURRENCY_CODES)[number];
|
|
1217
|
+
/**
|
|
1218
|
+
* Batch status constants
|
|
1219
|
+
*/
|
|
1220
|
+
declare const BATCH_STATUSES: readonly ["OPEN", "WAITING_FOR_PROCESSING", "PROCESSING", "READY_TO_SIGN", "PREPARED", "COMPLETED", "FAILED"];
|
|
1221
|
+
/**
|
|
1222
|
+
* Type definition for batch status
|
|
1223
|
+
*/
|
|
1224
|
+
type BatchStatus = (typeof BATCH_STATUSES)[number];
|
|
1225
|
+
type Currency = CODES.Currency;
|
|
1226
|
+
|
|
1227
|
+
type BankCode = (typeof BANK_CODES)[number];
|
|
1228
|
+
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")[]];
|
|
1229
|
+
type CountryCode = (typeof COUNTRY_CODES)[number];
|
|
1230
|
+
|
|
1231
|
+
interface TransactionMetadata {
|
|
1232
|
+
/**
|
|
1233
|
+
* Tags for categorization or grouping of the transaction
|
|
1234
|
+
*/
|
|
1235
|
+
tags?: string[];
|
|
1236
|
+
/**
|
|
1237
|
+
* Additional notes or comments about the transaction
|
|
1238
|
+
*/
|
|
1239
|
+
note?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* Payment processing information for bank payment matching and initiation
|
|
1242
|
+
*/
|
|
1243
|
+
payment?: {
|
|
1244
|
+
vs?: string;
|
|
1245
|
+
ss?: string;
|
|
1246
|
+
ks?: string;
|
|
1247
|
+
message?: string;
|
|
1248
|
+
paymentReason?: string;
|
|
1249
|
+
paymentChargeType?: PaymentChargeType;
|
|
1250
|
+
reference?: string;
|
|
1251
|
+
creditor?: BankAccountMetadata;
|
|
1252
|
+
debtor?: BankAccountMetadata;
|
|
1253
|
+
executionDate?: string;
|
|
1254
|
+
currency?: CurrencyCode;
|
|
1255
|
+
amount?: number;
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
interface EntryMetadata {
|
|
1259
|
+
context?: {
|
|
1260
|
+
initiatedBy?: 'system' | 'user' | 'bank' | 'blockchain';
|
|
1261
|
+
sourceService?: string;
|
|
1262
|
+
processor?: string;
|
|
1263
|
+
userId?: string;
|
|
1264
|
+
organizationId?: string;
|
|
1265
|
+
sessionId?: string;
|
|
1266
|
+
ipAddress?: string;
|
|
1267
|
+
};
|
|
1268
|
+
/**
|
|
1269
|
+
* Info about the crypto transaction
|
|
1270
|
+
*/
|
|
1271
|
+
crypto?: {
|
|
1272
|
+
txHash?: string;
|
|
1273
|
+
fromAddress?: string;
|
|
1274
|
+
toAddress?: string;
|
|
1275
|
+
chainId?: string;
|
|
1276
|
+
network?: string;
|
|
1277
|
+
confirmations?: number;
|
|
1278
|
+
blockNumber?: number;
|
|
1279
|
+
};
|
|
1280
|
+
/**
|
|
1281
|
+
* Info about the foreign exchange transaction
|
|
1282
|
+
*/
|
|
1283
|
+
fx?: {
|
|
1284
|
+
rate?: number;
|
|
1285
|
+
sourceCurrency?: string;
|
|
1286
|
+
targetCurrency?: string;
|
|
1287
|
+
provider?: string;
|
|
1288
|
+
slippage?: number;
|
|
1289
|
+
spread?: number;
|
|
1290
|
+
};
|
|
1291
|
+
/**
|
|
1292
|
+
* Info about the fee applied to the transaction
|
|
1293
|
+
*/
|
|
1294
|
+
fee?: {
|
|
1295
|
+
feeType?: 'flat' | 'percentage';
|
|
1296
|
+
sourceAmount?: number;
|
|
1297
|
+
appliedAmount?: number;
|
|
1298
|
+
feeTargetAccountId?: string;
|
|
1299
|
+
feeCode?: string;
|
|
1300
|
+
};
|
|
1301
|
+
/**
|
|
1302
|
+
* Specific tag for reconciliation purposes, e.g. for bank statements, batchId, etc.
|
|
1303
|
+
*/
|
|
1304
|
+
reconciliationTag?: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* Specific code for bank clearing purposes
|
|
1307
|
+
*/
|
|
1308
|
+
clearingCode?: string;
|
|
1309
|
+
/**
|
|
1310
|
+
* Tags for categorization or grouping of the transaction
|
|
1311
|
+
*/
|
|
1312
|
+
tags?: string[];
|
|
1313
|
+
/**
|
|
1314
|
+
* Additional notes or comments about the transaction
|
|
1315
|
+
*/
|
|
1316
|
+
note?: string;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
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
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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { D as schema } from './ledger.
|
|
2
|
+
import { D as schema } from './ledger.MnYNWZoo.mjs';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
declare const tables: typeof schema;
|
|
@@ -331,9 +331,9 @@ declare const createAccountInputSchema: z.ZodObject<{
|
|
|
331
331
|
}>>;
|
|
332
332
|
identifier: z.ZodOptional<z.ZodObject<{
|
|
333
333
|
kind: z.ZodEnum<{
|
|
334
|
-
SWIFT: "SWIFT";
|
|
335
334
|
IBAN: "IBAN";
|
|
336
335
|
LOCAL_CZ: "LOCAL_CZ";
|
|
336
|
+
SWIFT: "SWIFT";
|
|
337
337
|
CRYPTO_ADDRESS: "CRYPTO_ADDRESS";
|
|
338
338
|
}>;
|
|
339
339
|
iban: z.ZodOptional<z.ZodString>;
|
|
@@ -606,15 +606,15 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
606
606
|
}, z.core.$strip>>;
|
|
607
607
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
608
608
|
status: z.ZodEnum<{
|
|
609
|
-
FAILED: "FAILED";
|
|
610
|
-
COMPLETED: "COMPLETED";
|
|
611
609
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
612
610
|
PAUSED: "PAUSED";
|
|
613
611
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
614
612
|
MATCHED: "MATCHED";
|
|
615
613
|
RETURNING: "RETURNING";
|
|
616
614
|
RETURNED: "RETURNED";
|
|
615
|
+
FAILED: "FAILED";
|
|
617
616
|
CANCELLED: "CANCELLED";
|
|
617
|
+
COMPLETED: "COMPLETED";
|
|
618
618
|
}>;
|
|
619
619
|
}, z.core.$strip>;
|
|
620
620
|
interface CreateTransactionInput extends z.infer<typeof createTransactionInputSchema> {
|
|
@@ -919,15 +919,15 @@ interface UpdateAccountOutput extends AccountSelectType {
|
|
|
919
919
|
declare const updateTransactionInputSchema: z.ZodObject<{
|
|
920
920
|
transactionId: z.ZodUUID;
|
|
921
921
|
status: z.ZodEnum<{
|
|
922
|
-
FAILED: "FAILED";
|
|
923
|
-
COMPLETED: "COMPLETED";
|
|
924
922
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
925
923
|
PAUSED: "PAUSED";
|
|
926
924
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
927
925
|
MATCHED: "MATCHED";
|
|
928
926
|
RETURNING: "RETURNING";
|
|
929
927
|
RETURNED: "RETURNED";
|
|
928
|
+
FAILED: "FAILED";
|
|
930
929
|
CANCELLED: "CANCELLED";
|
|
930
|
+
COMPLETED: "COMPLETED";
|
|
931
931
|
}>;
|
|
932
932
|
completedAt: z.ZodOptional<z.ZodDate>;
|
|
933
933
|
}, z.core.$strip>;
|
|
@@ -989,15 +989,15 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
989
989
|
filterTransactionDateTo: z.ZodOptional<z.ZodDate>;
|
|
990
990
|
filterTransactionCompletedAt: z.ZodOptional<z.ZodDate>;
|
|
991
991
|
filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
|
|
992
|
-
FAILED: "FAILED";
|
|
993
|
-
COMPLETED: "COMPLETED";
|
|
994
992
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
995
993
|
PAUSED: "PAUSED";
|
|
996
994
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
997
995
|
MATCHED: "MATCHED";
|
|
998
996
|
RETURNING: "RETURNING";
|
|
999
997
|
RETURNED: "RETURNED";
|
|
998
|
+
FAILED: "FAILED";
|
|
1000
999
|
CANCELLED: "CANCELLED";
|
|
1000
|
+
COMPLETED: "COMPLETED";
|
|
1001
1001
|
}>>;
|
|
1002
1002
|
search: z.ZodOptional<z.ZodString>;
|
|
1003
1003
|
}, z.core.$strip>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, b as ASSET_TYPES, a as AccountType, c as AssetType, B as BALANCE_STRATEGIES, u as BATCH_STATUSES, d as BalanceStrategy, x as BankCode, v as BatchStatus, y as COUNTRY_CODES, z as CountryCode, C as CryptoNetworkCode, w as Currency, t as CurrencyCode, E as ENTRY_STATUSES, m as EntryMetadata, f as EntryStatus, I as IDENTIFIER_KINDS, e as IdentifierKind, P as PAYMENT_CHARGE_TYPES, r as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, n as PAYMENT_TYPES, k as PaymentChargeType, s as PaymentDirection, q as PaymentStatus, o as PaymentType, R as REFERENCE_TYPES, j as ReferenceType, T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, l as TransactionMetadata, g as TransactionStatus, i as TransactionType } from './shared/ledger.
|
|
2
|
-
import { T as TransactionSelectType } from './shared/ledger.
|
|
3
|
-
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, M as AccountIdentifierMappingSelectType, J as AccountIdentifierSelectType, H as AccountInsertType, E as AccountSelectType, P as AccountWithIdentifiersSelectType, h as CreateAccountInput, i as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, l as DeleteAccountOutput, F as FindAccountByIdentifierInput, w as FindAccountByIdentifierOutput, x as GetAccountBalanceInput, y as GetAccountBalanceOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, c as GetTransactionByIdOutput, d as GetTransactionsByIdReferenceInput, e as GetTransactionsByReferenceIdOutput, f as GetTransactionsInput, g as GetTransactionsOutput, I as IncludeRelation, B as InferResultType, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, L as ListAccountsInput, q as ListAccountsOutput, O as TransactionInsertType, j as UpdateAccountInput, k as UpdateAccountOutput, z as UpdateTransactionConfirmationSentAtInput, A as UpdateTransactionConfirmationSentAtOutput, U as UpdateTransactionInput, b as UpdateTransactionOutput, Q as createAccountInputSchema, R as createTransactionInputSchema, S as deleteAccountInputSchema, V as findAccountByIdentifierInputSchema, X as getAccountBalanceInputSchema, Y as getAccountIdentifierInputSchema, W as getAccountInputSchema, Z as getAccountsByOwnerInputSchema, a2 as getTransactionByIdInputSchema, a3 as getTransactionsByReferenceIdInputSchema, a4 as getTransactionsInputSchema, _ as listAccountIdentifiersInputSchema, $ as listAccountsInputSchema, a0 as updateAccountInputSchema, a5 as updateTransactionConfirmationSentAtInputSchema, a1 as updateTransactionInputSchema } from './shared/ledger.
|
|
1
|
+
export { A as ACCOUNT_TYPES, b as ASSET_TYPES, a as AccountType, c as AssetType, B as BALANCE_STRATEGIES, u as BATCH_STATUSES, d as BalanceStrategy, x as BankCode, v as BatchStatus, y as COUNTRY_CODES, z as CountryCode, C as CryptoNetworkCode, w as Currency, t as CurrencyCode, E as ENTRY_STATUSES, m as EntryMetadata, f as EntryStatus, I as IDENTIFIER_KINDS, e as IdentifierKind, P as PAYMENT_CHARGE_TYPES, r as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, n as PAYMENT_TYPES, k as PaymentChargeType, s as PaymentDirection, q as PaymentStatus, o as PaymentType, R as REFERENCE_TYPES, j as ReferenceType, T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, l as TransactionMetadata, g as TransactionStatus, i as TransactionType } from './shared/ledger.MnYNWZoo.cjs';
|
|
2
|
+
import { T as TransactionSelectType } from './shared/ledger.DRJcpNto.cjs';
|
|
3
|
+
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, M as AccountIdentifierMappingSelectType, J as AccountIdentifierSelectType, H as AccountInsertType, E as AccountSelectType, P as AccountWithIdentifiersSelectType, h as CreateAccountInput, i as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, l as DeleteAccountOutput, F as FindAccountByIdentifierInput, w as FindAccountByIdentifierOutput, x as GetAccountBalanceInput, y as GetAccountBalanceOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, c as GetTransactionByIdOutput, d as GetTransactionsByIdReferenceInput, e as GetTransactionsByReferenceIdOutput, f as GetTransactionsInput, g as GetTransactionsOutput, I as IncludeRelation, B as InferResultType, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, L as ListAccountsInput, q as ListAccountsOutput, O as TransactionInsertType, j as UpdateAccountInput, k as UpdateAccountOutput, z as UpdateTransactionConfirmationSentAtInput, A as UpdateTransactionConfirmationSentAtOutput, U as UpdateTransactionInput, b as UpdateTransactionOutput, Q as createAccountInputSchema, R as createTransactionInputSchema, S as deleteAccountInputSchema, V as findAccountByIdentifierInputSchema, X as getAccountBalanceInputSchema, Y as getAccountIdentifierInputSchema, W as getAccountInputSchema, Z as getAccountsByOwnerInputSchema, a2 as getTransactionByIdInputSchema, a3 as getTransactionsByReferenceIdInputSchema, a4 as getTransactionsInputSchema, _ as listAccountIdentifiersInputSchema, $ as listAccountsInputSchema, a0 as updateAccountInputSchema, a5 as updateTransactionConfirmationSentAtInputSchema, a1 as updateTransactionInputSchema } from './shared/ledger.DRJcpNto.cjs';
|
|
4
4
|
export { b as LedgerServiceEnv, a as LedgerServiceEnvironmentConfig, L as LedgerServiceWranglerConfig } from './shared/ledger.Ce2yPDUS.cjs';
|
|
5
|
+
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
5
6
|
export { BANK_CODES, CRYPTO_NETWORK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
6
7
|
import 'drizzle-orm';
|
|
7
8
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import '@develit-io/backend-sdk';
|
|
9
9
|
import 'zod';
|
|
10
10
|
|
|
11
11
|
declare const ALLOWED_TRANSACTION_FILTERS: {
|
|
@@ -29,16 +29,11 @@ interface LedgerEntry {
|
|
|
29
29
|
interface LedgerDeposit {
|
|
30
30
|
entries: LedgerEntry[];
|
|
31
31
|
}
|
|
32
|
+
|
|
32
33
|
type LedgerTransactionEvent = BaseEvent & {
|
|
33
34
|
eventType: 'LEDGER_TRANSACTION';
|
|
34
35
|
ledgerTransaction: TransactionSelectType;
|
|
35
36
|
};
|
|
36
|
-
interface BaseEvent {
|
|
37
|
-
metadata: {
|
|
38
|
-
timestamp: string;
|
|
39
|
-
correlationId: string;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
37
|
|
|
43
38
|
export { ALLOWED_TRANSACTION_FILTERS, TransactionSelectType };
|
|
44
39
|
export type { LedgerDeposit, LedgerEntry, LedgerTransactionEvent };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, b as ASSET_TYPES, a as AccountType, c as AssetType, B as BALANCE_STRATEGIES, u as BATCH_STATUSES, d as BalanceStrategy, x as BankCode, v as BatchStatus, y as COUNTRY_CODES, z as CountryCode, C as CryptoNetworkCode, w as Currency, t as CurrencyCode, E as ENTRY_STATUSES, m as EntryMetadata, f as EntryStatus, I as IDENTIFIER_KINDS, e as IdentifierKind, P as PAYMENT_CHARGE_TYPES, r as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, n as PAYMENT_TYPES, k as PaymentChargeType, s as PaymentDirection, q as PaymentStatus, o as PaymentType, R as REFERENCE_TYPES, j as ReferenceType, T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, l as TransactionMetadata, g as TransactionStatus, i as TransactionType } from './shared/ledger.
|
|
2
|
-
import { T as TransactionSelectType } from './shared/ledger.
|
|
3
|
-
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, M as AccountIdentifierMappingSelectType, J as AccountIdentifierSelectType, H as AccountInsertType, E as AccountSelectType, P as AccountWithIdentifiersSelectType, h as CreateAccountInput, i as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, l as DeleteAccountOutput, F as FindAccountByIdentifierInput, w as FindAccountByIdentifierOutput, x as GetAccountBalanceInput, y as GetAccountBalanceOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, c as GetTransactionByIdOutput, d as GetTransactionsByIdReferenceInput, e as GetTransactionsByReferenceIdOutput, f as GetTransactionsInput, g as GetTransactionsOutput, I as IncludeRelation, B as InferResultType, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, L as ListAccountsInput, q as ListAccountsOutput, O as TransactionInsertType, j as UpdateAccountInput, k as UpdateAccountOutput, z as UpdateTransactionConfirmationSentAtInput, A as UpdateTransactionConfirmationSentAtOutput, U as UpdateTransactionInput, b as UpdateTransactionOutput, Q as createAccountInputSchema, R as createTransactionInputSchema, S as deleteAccountInputSchema, V as findAccountByIdentifierInputSchema, X as getAccountBalanceInputSchema, Y as getAccountIdentifierInputSchema, W as getAccountInputSchema, Z as getAccountsByOwnerInputSchema, a2 as getTransactionByIdInputSchema, a3 as getTransactionsByReferenceIdInputSchema, a4 as getTransactionsInputSchema, _ as listAccountIdentifiersInputSchema, $ as listAccountsInputSchema, a0 as updateAccountInputSchema, a5 as updateTransactionConfirmationSentAtInputSchema, a1 as updateTransactionInputSchema } from './shared/ledger.
|
|
1
|
+
export { A as ACCOUNT_TYPES, b as ASSET_TYPES, a as AccountType, c as AssetType, B as BALANCE_STRATEGIES, u as BATCH_STATUSES, d as BalanceStrategy, x as BankCode, v as BatchStatus, y as COUNTRY_CODES, z as CountryCode, C as CryptoNetworkCode, w as Currency, t as CurrencyCode, E as ENTRY_STATUSES, m as EntryMetadata, f as EntryStatus, I as IDENTIFIER_KINDS, e as IdentifierKind, P as PAYMENT_CHARGE_TYPES, r as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, n as PAYMENT_TYPES, k as PaymentChargeType, s as PaymentDirection, q as PaymentStatus, o as PaymentType, R as REFERENCE_TYPES, j as ReferenceType, T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, l as TransactionMetadata, g as TransactionStatus, i as TransactionType } from './shared/ledger.MnYNWZoo.mjs';
|
|
2
|
+
import { T as TransactionSelectType } from './shared/ledger.w4G_kYoj.mjs';
|
|
3
|
+
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, M as AccountIdentifierMappingSelectType, J as AccountIdentifierSelectType, H as AccountInsertType, E as AccountSelectType, P as AccountWithIdentifiersSelectType, h as CreateAccountInput, i as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, l as DeleteAccountOutput, F as FindAccountByIdentifierInput, w as FindAccountByIdentifierOutput, x as GetAccountBalanceInput, y as GetAccountBalanceOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, c as GetTransactionByIdOutput, d as GetTransactionsByIdReferenceInput, e as GetTransactionsByReferenceIdOutput, f as GetTransactionsInput, g as GetTransactionsOutput, I as IncludeRelation, B as InferResultType, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, L as ListAccountsInput, q as ListAccountsOutput, O as TransactionInsertType, j as UpdateAccountInput, k as UpdateAccountOutput, z as UpdateTransactionConfirmationSentAtInput, A as UpdateTransactionConfirmationSentAtOutput, U as UpdateTransactionInput, b as UpdateTransactionOutput, Q as createAccountInputSchema, R as createTransactionInputSchema, S as deleteAccountInputSchema, V as findAccountByIdentifierInputSchema, X as getAccountBalanceInputSchema, Y as getAccountIdentifierInputSchema, W as getAccountInputSchema, Z as getAccountsByOwnerInputSchema, a2 as getTransactionByIdInputSchema, a3 as getTransactionsByReferenceIdInputSchema, a4 as getTransactionsInputSchema, _ as listAccountIdentifiersInputSchema, $ as listAccountsInputSchema, a0 as updateAccountInputSchema, a5 as updateTransactionConfirmationSentAtInputSchema, a1 as updateTransactionInputSchema } from './shared/ledger.w4G_kYoj.mjs';
|
|
4
4
|
export { b as LedgerServiceEnv, a as LedgerServiceEnvironmentConfig, L as LedgerServiceWranglerConfig } from './shared/ledger.Ce2yPDUS.mjs';
|
|
5
|
+
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
5
6
|
export { BANK_CODES, CRYPTO_NETWORK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
6
7
|
import 'drizzle-orm';
|
|
7
8
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import '@develit-io/backend-sdk';
|
|
9
9
|
import 'zod';
|
|
10
10
|
|
|
11
11
|
declare const ALLOWED_TRANSACTION_FILTERS: {
|
|
@@ -29,16 +29,11 @@ interface LedgerEntry {
|
|
|
29
29
|
interface LedgerDeposit {
|
|
30
30
|
entries: LedgerEntry[];
|
|
31
31
|
}
|
|
32
|
+
|
|
32
33
|
type LedgerTransactionEvent = BaseEvent & {
|
|
33
34
|
eventType: 'LEDGER_TRANSACTION';
|
|
34
35
|
ledgerTransaction: TransactionSelectType;
|
|
35
36
|
};
|
|
36
|
-
interface BaseEvent {
|
|
37
|
-
metadata: {
|
|
38
|
-
timestamp: string;
|
|
39
|
-
correlationId: string;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
37
|
|
|
43
38
|
export { ALLOWED_TRANSACTION_FILTERS, TransactionSelectType };
|
|
44
39
|
export type { LedgerDeposit, LedgerEntry, LedgerTransactionEvent };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, b as ASSET_TYPES, a as AccountType, c as AssetType, B as BALANCE_STRATEGIES, u as BATCH_STATUSES, d as BalanceStrategy, x as BankCode, v as BatchStatus, y as COUNTRY_CODES, z as CountryCode, C as CryptoNetworkCode, w as Currency, t as CurrencyCode, E as ENTRY_STATUSES, m as EntryMetadata, f as EntryStatus, I as IDENTIFIER_KINDS, e as IdentifierKind, P as PAYMENT_CHARGE_TYPES, r as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, n as PAYMENT_TYPES, k as PaymentChargeType, s as PaymentDirection, q as PaymentStatus, o as PaymentType, R as REFERENCE_TYPES, j as ReferenceType, T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, l as TransactionMetadata, g as TransactionStatus, i as TransactionType } from './shared/ledger.
|
|
2
|
-
import { T as TransactionSelectType } from './shared/ledger.
|
|
3
|
-
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, M as AccountIdentifierMappingSelectType, J as AccountIdentifierSelectType, H as AccountInsertType, E as AccountSelectType, P as AccountWithIdentifiersSelectType, h as CreateAccountInput, i as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, l as DeleteAccountOutput, F as FindAccountByIdentifierInput, w as FindAccountByIdentifierOutput, x as GetAccountBalanceInput, y as GetAccountBalanceOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, c as GetTransactionByIdOutput, d as GetTransactionsByIdReferenceInput, e as GetTransactionsByReferenceIdOutput, f as GetTransactionsInput, g as GetTransactionsOutput, I as IncludeRelation, B as InferResultType, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, L as ListAccountsInput, q as ListAccountsOutput, O as TransactionInsertType, j as UpdateAccountInput, k as UpdateAccountOutput, z as UpdateTransactionConfirmationSentAtInput, A as UpdateTransactionConfirmationSentAtOutput, U as UpdateTransactionInput, b as UpdateTransactionOutput, Q as createAccountInputSchema, R as createTransactionInputSchema, S as deleteAccountInputSchema, V as findAccountByIdentifierInputSchema, X as getAccountBalanceInputSchema, Y as getAccountIdentifierInputSchema, W as getAccountInputSchema, Z as getAccountsByOwnerInputSchema, a2 as getTransactionByIdInputSchema, a3 as getTransactionsByReferenceIdInputSchema, a4 as getTransactionsInputSchema, _ as listAccountIdentifiersInputSchema, $ as listAccountsInputSchema, a0 as updateAccountInputSchema, a5 as updateTransactionConfirmationSentAtInputSchema, a1 as updateTransactionInputSchema } from './shared/ledger.
|
|
1
|
+
export { A as ACCOUNT_TYPES, b as ASSET_TYPES, a as AccountType, c as AssetType, B as BALANCE_STRATEGIES, u as BATCH_STATUSES, d as BalanceStrategy, x as BankCode, v as BatchStatus, y as COUNTRY_CODES, z as CountryCode, C as CryptoNetworkCode, w as Currency, t as CurrencyCode, E as ENTRY_STATUSES, m as EntryMetadata, f as EntryStatus, I as IDENTIFIER_KINDS, e as IdentifierKind, P as PAYMENT_CHARGE_TYPES, r as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, n as PAYMENT_TYPES, k as PaymentChargeType, s as PaymentDirection, q as PaymentStatus, o as PaymentType, R as REFERENCE_TYPES, j as ReferenceType, T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, l as TransactionMetadata, g as TransactionStatus, i as TransactionType } from './shared/ledger.MnYNWZoo.js';
|
|
2
|
+
import { T as TransactionSelectType } from './shared/ledger.B097jcnG.js';
|
|
3
|
+
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, M as AccountIdentifierMappingSelectType, J as AccountIdentifierSelectType, H as AccountInsertType, E as AccountSelectType, P as AccountWithIdentifiersSelectType, h as CreateAccountInput, i as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, l as DeleteAccountOutput, F as FindAccountByIdentifierInput, w as FindAccountByIdentifierOutput, x as GetAccountBalanceInput, y as GetAccountBalanceOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, c as GetTransactionByIdOutput, d as GetTransactionsByIdReferenceInput, e as GetTransactionsByReferenceIdOutput, f as GetTransactionsInput, g as GetTransactionsOutput, I as IncludeRelation, B as InferResultType, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, L as ListAccountsInput, q as ListAccountsOutput, O as TransactionInsertType, j as UpdateAccountInput, k as UpdateAccountOutput, z as UpdateTransactionConfirmationSentAtInput, A as UpdateTransactionConfirmationSentAtOutput, U as UpdateTransactionInput, b as UpdateTransactionOutput, Q as createAccountInputSchema, R as createTransactionInputSchema, S as deleteAccountInputSchema, V as findAccountByIdentifierInputSchema, X as getAccountBalanceInputSchema, Y as getAccountIdentifierInputSchema, W as getAccountInputSchema, Z as getAccountsByOwnerInputSchema, a2 as getTransactionByIdInputSchema, a3 as getTransactionsByReferenceIdInputSchema, a4 as getTransactionsInputSchema, _ as listAccountIdentifiersInputSchema, $ as listAccountsInputSchema, a0 as updateAccountInputSchema, a5 as updateTransactionConfirmationSentAtInputSchema, a1 as updateTransactionInputSchema } from './shared/ledger.B097jcnG.js';
|
|
4
4
|
export { b as LedgerServiceEnv, a as LedgerServiceEnvironmentConfig, L as LedgerServiceWranglerConfig } from './shared/ledger.Ce2yPDUS.js';
|
|
5
|
+
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
5
6
|
export { BANK_CODES, CRYPTO_NETWORK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
6
7
|
import 'drizzle-orm';
|
|
7
8
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import '@develit-io/backend-sdk';
|
|
9
9
|
import 'zod';
|
|
10
10
|
|
|
11
11
|
declare const ALLOWED_TRANSACTION_FILTERS: {
|
|
@@ -29,16 +29,11 @@ interface LedgerEntry {
|
|
|
29
29
|
interface LedgerDeposit {
|
|
30
30
|
entries: LedgerEntry[];
|
|
31
31
|
}
|
|
32
|
+
|
|
32
33
|
type LedgerTransactionEvent = BaseEvent & {
|
|
33
34
|
eventType: 'LEDGER_TRANSACTION';
|
|
34
35
|
ledgerTransaction: TransactionSelectType;
|
|
35
36
|
};
|
|
36
|
-
interface BaseEvent {
|
|
37
|
-
metadata: {
|
|
38
|
-
timestamp: string;
|
|
39
|
-
correlationId: string;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
37
|
|
|
43
38
|
export { ALLOWED_TRANSACTION_FILTERS, TransactionSelectType };
|
|
44
39
|
export type { LedgerDeposit, LedgerEntry, LedgerTransactionEvent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/ledger",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"require": "./dist/database/schema.cjs"
|
|
21
21
|
},
|
|
22
22
|
"./@types": {
|
|
23
|
-
"types": "./dist
|
|
24
|
-
"import": "./dist
|
|
25
|
-
"require": "./dist
|
|
23
|
+
"types": "./dist/types.d.ts",
|
|
24
|
+
"import": "./dist/types.mjs",
|
|
25
|
+
"require": "./dist/types.cjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./dist"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"dev": "wrangler dev --port
|
|
33
|
+
"dev": "wrangler dev --port 9233 --persist-to ../../.wrangler/state",
|
|
34
34
|
"wrangler:generate": "develit wrangler:generate",
|
|
35
35
|
"db:init": "wrangler d1 execute develit-ledger --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
|
|
36
36
|
"db:generate": "drizzle-kit generate",
|
|
File without changes
|
|
File without changes
|