@develit-services/ledger 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { F as schema } from './ledger.B9mOFtFf.cjs';
2
+ import { F as schema } from './ledger.CZgIHlf1.js';
3
3
  import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
4
4
 
5
5
  interface TSchema extends ExtractTablesWithRelations<typeof tables> {
@@ -354,31 +354,42 @@ declare const createAccountInputSchema: z.ZodObject<{
354
354
  "0710": "0710";
355
355
  "0800": "0800";
356
356
  2010: "2010";
357
+ 2020: "2020";
358
+ 2030: "2030";
357
359
  2060: "2060";
358
360
  2070: "2070";
359
361
  2100: "2100";
360
362
  2200: "2200";
363
+ 2210: "2210";
361
364
  2220: "2220";
365
+ 2240: "2240";
362
366
  2250: "2250";
363
367
  2260: "2260";
368
+ 2310: "2310";
364
369
  2600: "2600";
365
370
  2700: "2700";
366
371
  3030: "3030";
372
+ 3050: "3050";
367
373
  3060: "3060";
368
374
  3500: "3500";
375
+ 4000: "4000";
369
376
  4300: "4300";
370
377
  5500: "5500";
378
+ 5400: "5400";
371
379
  5800: "5800";
372
380
  6000: "6000";
381
+ 6100: "6100";
373
382
  6200: "6200";
374
383
  6210: "6210";
375
384
  6300: "6300";
376
385
  6363: "6363";
377
386
  6700: "6700";
378
387
  6800: "6800";
388
+ 7940: "7940";
379
389
  7910: "7910";
380
390
  7950: "7950";
381
391
  7960: "7960";
392
+ 7980: "7980";
382
393
  7970: "7970";
383
394
  7990: "7990";
384
395
  8030: "8030";
@@ -388,11 +399,15 @@ declare const createAccountInputSchema: z.ZodObject<{
388
399
  8150: "8150";
389
400
  8190: "8190";
390
401
  8198: "8198";
402
+ 8200: "8200";
391
403
  8220: "8220";
404
+ 8230: "8230";
405
+ 8240: "8240";
392
406
  8250: "8250";
393
407
  8255: "8255";
394
408
  8265: "8265";
395
409
  8500: "8500";
410
+ 8610: "8610";
396
411
  }>>;
397
412
  prefix: z.ZodOptional<z.ZodString>;
398
413
  swift: z.ZodOptional<z.ZodString>;
@@ -434,6 +449,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
434
449
  }>;
435
450
  description: z.ZodOptional<z.ZodString>;
436
451
  paymentId: z.ZodOptional<z.ZodString>;
452
+ paymentRequestId: z.ZodOptional<z.ZodString>;
437
453
  metadata: z.ZodDefault<z.ZodOptional<z.ZodObject<{
438
454
  rejectImbalanced: z.ZodOptional<z.ZodBoolean>;
439
455
  allowPartialFailure: z.ZodOptional<z.ZodBoolean>;
@@ -468,31 +484,42 @@ declare const createTransactionInputSchema: z.ZodObject<{
468
484
  "0710": "0710";
469
485
  "0800": "0800";
470
486
  2010: "2010";
487
+ 2020: "2020";
488
+ 2030: "2030";
471
489
  2060: "2060";
472
490
  2070: "2070";
473
491
  2100: "2100";
474
492
  2200: "2200";
493
+ 2210: "2210";
475
494
  2220: "2220";
495
+ 2240: "2240";
476
496
  2250: "2250";
477
497
  2260: "2260";
498
+ 2310: "2310";
478
499
  2600: "2600";
479
500
  2700: "2700";
480
501
  3030: "3030";
502
+ 3050: "3050";
481
503
  3060: "3060";
482
504
  3500: "3500";
505
+ 4000: "4000";
483
506
  4300: "4300";
484
507
  5500: "5500";
508
+ 5400: "5400";
485
509
  5800: "5800";
486
510
  6000: "6000";
511
+ 6100: "6100";
487
512
  6200: "6200";
488
513
  6210: "6210";
489
514
  6300: "6300";
490
515
  6363: "6363";
491
516
  6700: "6700";
492
517
  6800: "6800";
518
+ 7940: "7940";
493
519
  7910: "7910";
494
520
  7950: "7950";
495
521
  7960: "7960";
522
+ 7980: "7980";
496
523
  7970: "7970";
497
524
  7990: "7990";
498
525
  8030: "8030";
@@ -502,11 +529,15 @@ declare const createTransactionInputSchema: z.ZodObject<{
502
529
  8150: "8150";
503
530
  8190: "8190";
504
531
  8198: "8198";
532
+ 8200: "8200";
505
533
  8220: "8220";
534
+ 8230: "8230";
535
+ 8240: "8240";
506
536
  8250: "8250";
507
537
  8255: "8255";
508
538
  8265: "8265";
509
539
  8500: "8500";
540
+ 8610: "8610";
510
541
  }>>;
511
542
  holderName: z.ZodOptional<z.ZodString>;
512
543
  iban: z.ZodOptional<z.ZodString>;
@@ -569,6 +600,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
569
600
  AVAX: "AVAX";
570
601
  }>>;
571
602
  countryCode: z.ZodOptional<z.ZodEnum<{
603
+ IM: "IM";
572
604
  AF: "AF";
573
605
  AL: "AL";
574
606
  DZ: "DZ";
@@ -657,7 +689,6 @@ declare const createTransactionInputSchema: z.ZodObject<{
657
689
  IR: "IR";
658
690
  IQ: "IQ";
659
691
  IE: "IE";
660
- IM: "IM";
661
692
  IL: "IL";
662
693
  IT: "IT";
663
694
  CI: "CI";
@@ -798,31 +829,42 @@ declare const createTransactionInputSchema: z.ZodObject<{
798
829
  "0710": "0710";
799
830
  "0800": "0800";
800
831
  2010: "2010";
832
+ 2020: "2020";
833
+ 2030: "2030";
801
834
  2060: "2060";
802
835
  2070: "2070";
803
836
  2100: "2100";
804
837
  2200: "2200";
838
+ 2210: "2210";
805
839
  2220: "2220";
840
+ 2240: "2240";
806
841
  2250: "2250";
807
842
  2260: "2260";
843
+ 2310: "2310";
808
844
  2600: "2600";
809
845
  2700: "2700";
810
846
  3030: "3030";
847
+ 3050: "3050";
811
848
  3060: "3060";
812
849
  3500: "3500";
850
+ 4000: "4000";
813
851
  4300: "4300";
814
852
  5500: "5500";
853
+ 5400: "5400";
815
854
  5800: "5800";
816
855
  6000: "6000";
856
+ 6100: "6100";
817
857
  6200: "6200";
818
858
  6210: "6210";
819
859
  6300: "6300";
820
860
  6363: "6363";
821
861
  6700: "6700";
822
862
  6800: "6800";
863
+ 7940: "7940";
823
864
  7910: "7910";
824
865
  7950: "7950";
825
866
  7960: "7960";
867
+ 7980: "7980";
826
868
  7970: "7970";
827
869
  7990: "7990";
828
870
  8030: "8030";
@@ -832,11 +874,15 @@ declare const createTransactionInputSchema: z.ZodObject<{
832
874
  8150: "8150";
833
875
  8190: "8190";
834
876
  8198: "8198";
877
+ 8200: "8200";
835
878
  8220: "8220";
879
+ 8230: "8230";
880
+ 8240: "8240";
836
881
  8250: "8250";
837
882
  8255: "8255";
838
883
  8265: "8265";
839
884
  8500: "8500";
885
+ 8610: "8610";
840
886
  }>>;
841
887
  holderName: z.ZodOptional<z.ZodString>;
842
888
  iban: z.ZodOptional<z.ZodString>;
@@ -899,6 +945,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
899
945
  AVAX: "AVAX";
900
946
  }>>;
901
947
  countryCode: z.ZodOptional<z.ZodEnum<{
948
+ IM: "IM";
902
949
  AF: "AF";
903
950
  AL: "AL";
904
951
  DZ: "DZ";
@@ -987,7 +1034,6 @@ declare const createTransactionInputSchema: z.ZodObject<{
987
1034
  IR: "IR";
988
1035
  IQ: "IQ";
989
1036
  IE: "IE";
990
- IM: "IM";
991
1037
  IL: "IL";
992
1038
  IT: "IT";
993
1039
  CI: "CI";
@@ -1184,6 +1230,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
1184
1230
  }, z.core.$strip>>>;
1185
1231
  status: z.ZodEnum<{
1186
1232
  FAILED: "FAILED";
1233
+ NEW: "NEW";
1187
1234
  WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
1188
1235
  PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
1189
1236
  WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
@@ -1285,31 +1332,42 @@ declare const findAccountByIdentifierInputSchema: z.ZodObject<{
1285
1332
  "0710": "0710";
1286
1333
  "0800": "0800";
1287
1334
  2010: "2010";
1335
+ 2020: "2020";
1336
+ 2030: "2030";
1288
1337
  2060: "2060";
1289
1338
  2070: "2070";
1290
1339
  2100: "2100";
1291
1340
  2200: "2200";
1341
+ 2210: "2210";
1292
1342
  2220: "2220";
1343
+ 2240: "2240";
1293
1344
  2250: "2250";
1294
1345
  2260: "2260";
1346
+ 2310: "2310";
1295
1347
  2600: "2600";
1296
1348
  2700: "2700";
1297
1349
  3030: "3030";
1350
+ 3050: "3050";
1298
1351
  3060: "3060";
1299
1352
  3500: "3500";
1353
+ 4000: "4000";
1300
1354
  4300: "4300";
1301
1355
  5500: "5500";
1356
+ 5400: "5400";
1302
1357
  5800: "5800";
1303
1358
  6000: "6000";
1359
+ 6100: "6100";
1304
1360
  6200: "6200";
1305
1361
  6210: "6210";
1306
1362
  6300: "6300";
1307
1363
  6363: "6363";
1308
1364
  6700: "6700";
1309
1365
  6800: "6800";
1366
+ 7940: "7940";
1310
1367
  7910: "7910";
1311
1368
  7950: "7950";
1312
1369
  7960: "7960";
1370
+ 7980: "7980";
1313
1371
  7970: "7970";
1314
1372
  7990: "7990";
1315
1373
  8030: "8030";
@@ -1319,11 +1377,15 @@ declare const findAccountByIdentifierInputSchema: z.ZodObject<{
1319
1377
  8150: "8150";
1320
1378
  8190: "8190";
1321
1379
  8198: "8198";
1380
+ 8200: "8200";
1322
1381
  8220: "8220";
1382
+ 8230: "8230";
1383
+ 8240: "8240";
1323
1384
  8250: "8250";
1324
1385
  8255: "8255";
1325
1386
  8265: "8265";
1326
1387
  8500: "8500";
1388
+ 8610: "8610";
1327
1389
  }>>;
1328
1390
  swift: z.ZodOptional<z.ZodString>;
1329
1391
  cryptoAddress: z.ZodOptional<z.ZodString>;
@@ -1413,6 +1475,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
1413
1475
  filterTransactionCompletedAt: z.ZodOptional<z.ZodDate>;
1414
1476
  filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
1415
1477
  FAILED: "FAILED";
1478
+ NEW: "NEW";
1416
1479
  WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
1417
1480
  PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
1418
1481
  WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
@@ -1424,6 +1487,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
1424
1487
  }>>;
1425
1488
  filterTransactionStatuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1426
1489
  FAILED: "FAILED";
1490
+ NEW: "NEW";
1427
1491
  WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
1428
1492
  PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
1429
1493
  WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
@@ -1433,6 +1497,8 @@ declare const getTransactionsInputSchema: z.ZodObject<{
1433
1497
  CANCELLED: "CANCELLED";
1434
1498
  SETTLED: "SETTLED";
1435
1499
  }>>>;
1500
+ filterTransactionPaymentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1501
+ filterTransactionPaymentRequestIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1436
1502
  search: z.ZodOptional<z.ZodString>;
1437
1503
  }, z.core.$strip>;
1438
1504
  interface GetTransactionsInput extends z.input<typeof getTransactionsInputSchema> {
@@ -1561,7 +1627,8 @@ interface ListAccountsOutput {
1561
1627
 
1562
1628
  declare const matchTransactionInputSchema: z.ZodObject<{
1563
1629
  transactionId: z.ZodUUID;
1564
- paymentId: z.ZodString;
1630
+ paymentId: z.ZodOptional<z.ZodString>;
1631
+ paymentRequestId: z.ZodOptional<z.ZodString>;
1565
1632
  amount: z.ZodOptional<z.ZodNumber>;
1566
1633
  completedAt: z.ZodOptional<z.ZodDate>;
1567
1634
  }, z.core.$strip>;
@@ -1697,6 +1764,7 @@ declare const updateTransactionStatusInputSchema: z.ZodObject<{
1697
1764
  transactionId: z.ZodUUID;
1698
1765
  status: z.ZodEnum<{
1699
1766
  FAILED: "FAILED";
1767
+ NEW: "NEW";
1700
1768
  WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
1701
1769
  PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
1702
1770
  WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
@@ -1708,6 +1776,7 @@ declare const updateTransactionStatusInputSchema: z.ZodObject<{
1708
1776
  }>;
1709
1777
  statusReason: z.ZodOptional<z.ZodString>;
1710
1778
  paymentId: z.ZodOptional<z.ZodString>;
1779
+ paymentRequestId: z.ZodOptional<z.ZodString>;
1711
1780
  completedAt: z.ZodOptional<z.ZodDate>;
1712
1781
  }, z.core.$strip>;
1713
1782
  interface UpdateTransactionStatusInput extends z.infer<typeof updateTransactionStatusInputSchema> {
@@ -1,7 +1,7 @@
1
1
  import { base } from '@develit-io/backend-sdk';
2
2
  import { relations } from 'drizzle-orm';
3
3
  import { sqliteTable, integer, text, real } from 'drizzle-orm/sqlite-core';
4
- import { T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, R as REFERENCE_TYPES } from './ledger.De19PrJa.mjs';
4
+ import { T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, R as REFERENCE_TYPES } from './ledger.DvHIBJap.mjs';
5
5
  import '@develit-io/general-codes';
6
6
 
7
7
  const account = sqliteTable("account", {
@@ -88,6 +88,7 @@ const transaction = sqliteTable("transaction", {
88
88
  status: text("status", { enum: TRANSACTION_STATUSES }).$type().notNull(),
89
89
  statusReason: text("status_reason"),
90
90
  paymentId: text("payment_id"),
91
+ paymentRequestId: text("payment_request_id"),
91
92
  metadata: text("metadata", { mode: "json" }).$type().notNull(),
92
93
  value: real("value"),
93
94
  receivedValue: real("received_value"),
@@ -3,7 +3,7 @@
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
4
  const drizzleOrm = require('drizzle-orm');
5
5
  const sqliteCore = require('drizzle-orm/sqlite-core');
6
- const updateTransactionStatus = require('./ledger.CAoxOU3F.cjs');
6
+ const updateTransactionStatus = require('./ledger.ChjFG1yE.cjs');
7
7
  require('@develit-io/general-codes');
8
8
 
9
9
  const account = sqliteCore.sqliteTable("account", {
@@ -90,6 +90,7 @@ const transaction = sqliteCore.sqliteTable("transaction", {
90
90
  status: sqliteCore.text("status", { enum: updateTransactionStatus.TRANSACTION_STATUSES }).$type().notNull(),
91
91
  statusReason: sqliteCore.text("status_reason"),
92
92
  paymentId: sqliteCore.text("payment_id"),
93
+ paymentRequestId: sqliteCore.text("payment_request_id"),
93
94
  metadata: sqliteCore.text("metadata", { mode: "json" }).$type().notNull(),
94
95
  value: sqliteCore.real("value"),
95
96
  receivedValue: sqliteCore.real("received_value"),