@develit-services/ledger 0.3.6 → 0.4.0
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.cjs +2 -2
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/database/schema.mjs +2 -2
- package/dist/export/worker.cjs +190 -18
- package/dist/export/worker.d.cts +8 -2
- package/dist/export/worker.d.mts +8 -2
- package/dist/export/worker.d.ts +8 -2
- package/dist/export/worker.mjs +190 -18
- package/dist/shared/{ledger.CclKAyrw.d.ts → ledger.BtCTt25C.d.cts} +37 -8
- package/dist/shared/{ledger.CclKAyrw.d.mts → ledger.BtCTt25C.d.mts} +37 -8
- package/dist/shared/{ledger.CclKAyrw.d.cts → ledger.BtCTt25C.d.ts} +37 -8
- package/dist/shared/{ledger.DOcqPJUV.cjs → ledger.C4eXkZIj.cjs} +2 -1
- package/dist/shared/{ledger.qc5F0gBL.cjs → ledger.CAoxOU3F.cjs} +15 -3
- package/dist/shared/{ledger.QqlD3imC.d.mts → ledger.D_QC9ub6.d.mts} +35 -8
- package/dist/shared/{ledger.DvlQNN83.mjs → ledger.De19PrJa.mjs} +15 -4
- package/dist/shared/{ledger.CGMCq9Gr.mjs → ledger.Dpxzz64a.mjs} +2 -1
- package/dist/shared/{ledger.CWua2AX5.d.cts → ledger.WHp2MLCf.d.cts} +35 -8
- package/dist/shared/{ledger.BEmulMH8.d.ts → ledger.ZADe_DAC.d.ts} +35 -8
- package/dist/types.cjs +2 -1
- package/dist/types.d.cts +5 -4
- package/dist/types.d.mts +5 -4
- package/dist/types.d.ts +5 -4
- package/dist/types.mjs +1 -1
- package/package.json +2 -2
|
@@ -61,7 +61,7 @@ const ENTRY_STATUSES = [
|
|
|
61
61
|
];
|
|
62
62
|
const TRANSACTION_STATUSES = [
|
|
63
63
|
"WAITING_FOR_PAYMENT",
|
|
64
|
-
|
|
64
|
+
"PARTIALLY_MATCHED",
|
|
65
65
|
"WAITING_FOR_MANUAL_PROCESSING",
|
|
66
66
|
"MATCHED",
|
|
67
67
|
"RETURNING",
|
|
@@ -110,7 +110,8 @@ const ALLOWED_TRANSACTION_FILTERS = {
|
|
|
110
110
|
TO: "filterTransactionDateTo",
|
|
111
111
|
DESCRIPTION: "filterTransactionDescription",
|
|
112
112
|
COMPLETED_AT: "filterTransactionCompletedAt",
|
|
113
|
-
STATUS: "filterTransactionStatus"
|
|
113
|
+
STATUS: "filterTransactionStatus",
|
|
114
|
+
STATUSES: "filterTransactionStatuses"
|
|
114
115
|
};
|
|
115
116
|
|
|
116
117
|
const cancelTransactionInputSchema = zod.z.object({
|
|
@@ -273,6 +274,7 @@ const getTransactionsInputSchema = zod.z.object({
|
|
|
273
274
|
[ALLOWED_TRANSACTION_FILTERS.TO]: zod.z.date().optional(),
|
|
274
275
|
[ALLOWED_TRANSACTION_FILTERS.COMPLETED_AT]: zod.z.date().optional(),
|
|
275
276
|
[ALLOWED_TRANSACTION_FILTERS.STATUS]: zod.z.enum(TRANSACTION_STATUSES).optional(),
|
|
277
|
+
[ALLOWED_TRANSACTION_FILTERS.STATUSES]: zod.z.array(zod.z.enum(TRANSACTION_STATUSES)).optional(),
|
|
276
278
|
search: zod.z.string().optional()
|
|
277
279
|
});
|
|
278
280
|
|
|
@@ -298,6 +300,7 @@ const listAccountsInputSchema = zod.z.object({
|
|
|
298
300
|
const matchTransactionInputSchema = zod.z.object({
|
|
299
301
|
transactionId: zod.z.uuid(),
|
|
300
302
|
paymentId: zod.z.string(),
|
|
303
|
+
amount: zod.z.number().positive().optional(),
|
|
301
304
|
completedAt: zod.z.date().optional()
|
|
302
305
|
});
|
|
303
306
|
|
|
@@ -320,7 +323,15 @@ const updateTransactionConfirmationSentAtInputSchema = zod.z.object({
|
|
|
320
323
|
const refundTransactionInputSchema = zod.z.object({
|
|
321
324
|
transactionId: zod.z.uuid(),
|
|
322
325
|
amount: zod.z.number().positive().optional(),
|
|
323
|
-
reason: zod.z.string().min(1)
|
|
326
|
+
reason: zod.z.string().min(1),
|
|
327
|
+
performedBy: zod.z.string().min(1).optional()
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
const resolveUnmatchedTransactionInputSchema = zod.z.object({
|
|
331
|
+
unmatchedTransactionId: zod.z.uuid(),
|
|
332
|
+
targetTransactionId: zod.z.uuid(),
|
|
333
|
+
note: zod.z.string().min(1),
|
|
334
|
+
performedBy: zod.z.string().min(1)
|
|
324
335
|
});
|
|
325
336
|
|
|
326
337
|
const updateTransactionStatusInputSchema = zod.z.object({
|
|
@@ -364,6 +375,7 @@ exports.listAccountIdentifiersInputSchema = listAccountIdentifiersInputSchema;
|
|
|
364
375
|
exports.listAccountsInputSchema = listAccountsInputSchema;
|
|
365
376
|
exports.matchTransactionInputSchema = matchTransactionInputSchema;
|
|
366
377
|
exports.refundTransactionInputSchema = refundTransactionInputSchema;
|
|
378
|
+
exports.resolveUnmatchedTransactionInputSchema = resolveUnmatchedTransactionInputSchema;
|
|
367
379
|
exports.updateAccountInputSchema = updateAccountInputSchema;
|
|
368
380
|
exports.updateTransactionConfirmationSentAtInputSchema = updateTransactionConfirmationSentAtInputSchema;
|
|
369
381
|
exports.updateTransactionStatusInputSchema = updateTransactionStatusInputSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { F as schema } from './ledger.
|
|
2
|
+
import { F as schema } from './ledger.BtCTt25C.mjs';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -411,8 +411,8 @@ interface CreateAccountOutput {
|
|
|
411
411
|
declare const createTransactionInputSchema: z.ZodObject<{
|
|
412
412
|
correlationId: z.ZodString;
|
|
413
413
|
referenceType: z.ZodEnum<{
|
|
414
|
-
PAYMENT: "PAYMENT";
|
|
415
414
|
EXCHANGE: "EXCHANGE";
|
|
415
|
+
PAYMENT: "PAYMENT";
|
|
416
416
|
ORDER: "ORDER";
|
|
417
417
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
418
418
|
FORWARD: "FORWARD";
|
|
@@ -420,13 +420,13 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
420
420
|
}>;
|
|
421
421
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
422
422
|
type: z.ZodEnum<{
|
|
423
|
-
EXCHANGE: "EXCHANGE";
|
|
424
423
|
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
425
424
|
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
426
425
|
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
427
426
|
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
428
427
|
COLLATERAL_FUND_IN: "COLLATERAL_FUND_IN";
|
|
429
428
|
COLLATERAL_FUND_OUT: "COLLATERAL_FUND_OUT";
|
|
429
|
+
EXCHANGE: "EXCHANGE";
|
|
430
430
|
UNMATCHED: "UNMATCHED";
|
|
431
431
|
ADJUSTMENT: "ADJUSTMENT";
|
|
432
432
|
TRANSFER: "TRANSFER";
|
|
@@ -1185,6 +1185,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
1185
1185
|
status: z.ZodEnum<{
|
|
1186
1186
|
FAILED: "FAILED";
|
|
1187
1187
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1188
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1188
1189
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1189
1190
|
MATCHED: "MATCHED";
|
|
1190
1191
|
RETURNING: "RETURNING";
|
|
@@ -1385,8 +1386,8 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1385
1386
|
}, z.core.$strip>;
|
|
1386
1387
|
filterTransactionCorrelationId: z.ZodOptional<z.ZodUUID>;
|
|
1387
1388
|
filterTransactionReferenceType: z.ZodOptional<z.ZodEnum<{
|
|
1388
|
-
PAYMENT: "PAYMENT";
|
|
1389
1389
|
EXCHANGE: "EXCHANGE";
|
|
1390
|
+
PAYMENT: "PAYMENT";
|
|
1390
1391
|
ORDER: "ORDER";
|
|
1391
1392
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1392
1393
|
FORWARD: "FORWARD";
|
|
@@ -1394,13 +1395,13 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1394
1395
|
}>>;
|
|
1395
1396
|
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1396
1397
|
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
1397
|
-
EXCHANGE: "EXCHANGE";
|
|
1398
1398
|
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
1399
1399
|
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
1400
1400
|
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
1401
1401
|
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
1402
1402
|
COLLATERAL_FUND_IN: "COLLATERAL_FUND_IN";
|
|
1403
1403
|
COLLATERAL_FUND_OUT: "COLLATERAL_FUND_OUT";
|
|
1404
|
+
EXCHANGE: "EXCHANGE";
|
|
1404
1405
|
UNMATCHED: "UNMATCHED";
|
|
1405
1406
|
ADJUSTMENT: "ADJUSTMENT";
|
|
1406
1407
|
TRANSFER: "TRANSFER";
|
|
@@ -1413,6 +1414,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1413
1414
|
filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
|
|
1414
1415
|
FAILED: "FAILED";
|
|
1415
1416
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1417
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1416
1418
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1417
1419
|
MATCHED: "MATCHED";
|
|
1418
1420
|
RETURNING: "RETURNING";
|
|
@@ -1420,6 +1422,17 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1420
1422
|
CANCELLED: "CANCELLED";
|
|
1421
1423
|
SETTLED: "SETTLED";
|
|
1422
1424
|
}>>;
|
|
1425
|
+
filterTransactionStatuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1426
|
+
FAILED: "FAILED";
|
|
1427
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1428
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1429
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1430
|
+
MATCHED: "MATCHED";
|
|
1431
|
+
RETURNING: "RETURNING";
|
|
1432
|
+
RETURNED: "RETURNED";
|
|
1433
|
+
CANCELLED: "CANCELLED";
|
|
1434
|
+
SETTLED: "SETTLED";
|
|
1435
|
+
}>>>;
|
|
1423
1436
|
search: z.ZodOptional<z.ZodString>;
|
|
1424
1437
|
}, z.core.$strip>;
|
|
1425
1438
|
interface GetTransactionsInput extends z.input<typeof getTransactionsInputSchema> {
|
|
@@ -1431,8 +1444,8 @@ interface GetTransactionsOutput {
|
|
|
1431
1444
|
|
|
1432
1445
|
declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
1433
1446
|
referenceType: z.ZodEnum<{
|
|
1434
|
-
PAYMENT: "PAYMENT";
|
|
1435
1447
|
EXCHANGE: "EXCHANGE";
|
|
1448
|
+
PAYMENT: "PAYMENT";
|
|
1436
1449
|
ORDER: "ORDER";
|
|
1437
1450
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1438
1451
|
FORWARD: "FORWARD";
|
|
@@ -1549,6 +1562,7 @@ interface ListAccountsOutput {
|
|
|
1549
1562
|
declare const matchTransactionInputSchema: z.ZodObject<{
|
|
1550
1563
|
transactionId: z.ZodUUID;
|
|
1551
1564
|
paymentId: z.ZodString;
|
|
1565
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
1552
1566
|
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1553
1567
|
}, z.core.$strip>;
|
|
1554
1568
|
interface MatchTransactionInput extends z.infer<typeof matchTransactionInputSchema> {
|
|
@@ -1659,6 +1673,7 @@ declare const refundTransactionInputSchema: z.ZodObject<{
|
|
|
1659
1673
|
transactionId: z.ZodUUID;
|
|
1660
1674
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
1661
1675
|
reason: z.ZodString;
|
|
1676
|
+
performedBy: z.ZodOptional<z.ZodString>;
|
|
1662
1677
|
}, z.core.$strip>;
|
|
1663
1678
|
interface RefundTransactionInput extends z.infer<typeof refundTransactionInputSchema> {
|
|
1664
1679
|
}
|
|
@@ -1667,11 +1682,23 @@ interface RefundTransactionOutput {
|
|
|
1667
1682
|
originalTransaction: TransactionSelectType;
|
|
1668
1683
|
}
|
|
1669
1684
|
|
|
1685
|
+
declare const resolveUnmatchedTransactionInputSchema: z.ZodObject<{
|
|
1686
|
+
unmatchedTransactionId: z.ZodUUID;
|
|
1687
|
+
targetTransactionId: z.ZodUUID;
|
|
1688
|
+
note: z.ZodString;
|
|
1689
|
+
performedBy: z.ZodString;
|
|
1690
|
+
}, z.core.$strip>;
|
|
1691
|
+
interface ResolveUnmatchedTransactionInput extends z.infer<typeof resolveUnmatchedTransactionInputSchema> {
|
|
1692
|
+
}
|
|
1693
|
+
interface ResolveUnmatchedTransactionOutput extends TransactionSelectType {
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1670
1696
|
declare const updateTransactionStatusInputSchema: z.ZodObject<{
|
|
1671
1697
|
transactionId: z.ZodUUID;
|
|
1672
1698
|
status: z.ZodEnum<{
|
|
1673
1699
|
FAILED: "FAILED";
|
|
1674
1700
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1701
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1675
1702
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1676
1703
|
MATCHED: "MATCHED";
|
|
1677
1704
|
RETURNING: "RETURNING";
|
|
@@ -1690,5 +1717,5 @@ interface UpdateTransactionStatusOutput extends TransactionSelectType {
|
|
|
1690
1717
|
|
|
1691
1718
|
declare const tables: typeof schema;
|
|
1692
1719
|
|
|
1693
|
-
export {
|
|
1694
|
-
export type {
|
|
1720
|
+
export { cancelTransactionInputSchema as a0, createAccountInputSchema as a1, createTransactionInputSchema as a2, deleteAccountInputSchema as a3, failTransactionInputSchema as a4, findAccountByIdentifierInputSchema as a5, getAccountBalanceInputSchema as a6, getAccountIdentifierInputSchema as a7, getAccountInputSchema as a8, getAccountsByOwnerInputSchema as a9, getTransactionByIdInputSchema as aa, getTransactionsByReferenceIdInputSchema as ab, getTransactionsInputSchema as ac, listAccountIdentifiersInputSchema as ad, listAccountsInputSchema as ae, matchTransactionInputSchema as af, refundTransactionInputSchema as ag, resolveUnmatchedTransactionInputSchema as ah, updateAccountInputSchema as ai, updateTransactionConfirmationSentAtInputSchema as aj, updateTransactionStatusInputSchema as ak, tables as t };
|
|
1721
|
+
export type { TransactionInsertType as $, ListAccountIdentifiersOutput as A, FindAccountByIdentifierInput as B, CreateTransactionInput as C, DeleteAccountInput as D, FindAccountByIdentifierOutput as E, FailTransactionInput as F, GetTransactionByIdInput as G, GetAccountBalanceInput as H, GetAccountBalanceOutput as I, UpdateTransactionConfirmationSentAtInput as J, UpdateTransactionConfirmationSentAtOutput as K, ListAccountsInput as L, MatchTransactionInput as M, UpdateTransactionStatusInput as N, UpdateTransactionStatusOutput as O, AccountIdentifierInsertType as P, AccountIdentifierMappingInsertType as Q, ResolveUnmatchedTransactionInput as R, AccountIdentifierMappingSelectType as S, TransactionSelectType as T, UpdateAccountInput as U, AccountIdentifierSelectType as V, AccountInsertType as W, AccountSelectType as X, AccountWithIdentifiersSelectType as Y, IncludeRelation as Z, InferResultType as _, CreateTransactionOutput as a, MatchTransactionOutput as b, ResolveUnmatchedTransactionOutput as c, FailTransactionOutput as d, CancelTransactionInput as e, CancelTransactionOutput as f, RefundTransactionInput as g, RefundTransactionOutput as h, GetTransactionByIdOutput as i, GetTransactionsByIdReferenceInput as j, GetTransactionsByReferenceIdOutput as k, GetTransactionsInput as l, GetTransactionsOutput as m, CreateAccountInput as n, CreateAccountOutput as o, UpdateAccountOutput as p, DeleteAccountOutput as q, GetAccountInput as r, GetAccountOutput as s, GetAccountsByOwnerInput as u, GetAccountsByOwnerOutput as v, ListAccountsOutput as w, GetAccountIdentifierInput as x, GetAccountIdentifierOutput as y, ListAccountIdentifiersInput as z };
|
|
@@ -59,7 +59,7 @@ const ENTRY_STATUSES = [
|
|
|
59
59
|
];
|
|
60
60
|
const TRANSACTION_STATUSES = [
|
|
61
61
|
"WAITING_FOR_PAYMENT",
|
|
62
|
-
|
|
62
|
+
"PARTIALLY_MATCHED",
|
|
63
63
|
"WAITING_FOR_MANUAL_PROCESSING",
|
|
64
64
|
"MATCHED",
|
|
65
65
|
"RETURNING",
|
|
@@ -108,7 +108,8 @@ const ALLOWED_TRANSACTION_FILTERS = {
|
|
|
108
108
|
TO: "filterTransactionDateTo",
|
|
109
109
|
DESCRIPTION: "filterTransactionDescription",
|
|
110
110
|
COMPLETED_AT: "filterTransactionCompletedAt",
|
|
111
|
-
STATUS: "filterTransactionStatus"
|
|
111
|
+
STATUS: "filterTransactionStatus",
|
|
112
|
+
STATUSES: "filterTransactionStatuses"
|
|
112
113
|
};
|
|
113
114
|
|
|
114
115
|
const cancelTransactionInputSchema = z.object({
|
|
@@ -271,6 +272,7 @@ const getTransactionsInputSchema = z.object({
|
|
|
271
272
|
[ALLOWED_TRANSACTION_FILTERS.TO]: z.date().optional(),
|
|
272
273
|
[ALLOWED_TRANSACTION_FILTERS.COMPLETED_AT]: z.date().optional(),
|
|
273
274
|
[ALLOWED_TRANSACTION_FILTERS.STATUS]: z.enum(TRANSACTION_STATUSES).optional(),
|
|
275
|
+
[ALLOWED_TRANSACTION_FILTERS.STATUSES]: z.array(z.enum(TRANSACTION_STATUSES)).optional(),
|
|
274
276
|
search: z.string().optional()
|
|
275
277
|
});
|
|
276
278
|
|
|
@@ -296,6 +298,7 @@ const listAccountsInputSchema = z.object({
|
|
|
296
298
|
const matchTransactionInputSchema = z.object({
|
|
297
299
|
transactionId: z.uuid(),
|
|
298
300
|
paymentId: z.string(),
|
|
301
|
+
amount: z.number().positive().optional(),
|
|
299
302
|
completedAt: z.date().optional()
|
|
300
303
|
});
|
|
301
304
|
|
|
@@ -318,7 +321,15 @@ const updateTransactionConfirmationSentAtInputSchema = z.object({
|
|
|
318
321
|
const refundTransactionInputSchema = z.object({
|
|
319
322
|
transactionId: z.uuid(),
|
|
320
323
|
amount: z.number().positive().optional(),
|
|
321
|
-
reason: z.string().min(1)
|
|
324
|
+
reason: z.string().min(1),
|
|
325
|
+
performedBy: z.string().min(1).optional()
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
const resolveUnmatchedTransactionInputSchema = z.object({
|
|
329
|
+
unmatchedTransactionId: z.uuid(),
|
|
330
|
+
targetTransactionId: z.uuid(),
|
|
331
|
+
note: z.string().min(1),
|
|
332
|
+
performedBy: z.string().min(1)
|
|
322
333
|
});
|
|
323
334
|
|
|
324
335
|
const updateTransactionStatusInputSchema = z.object({
|
|
@@ -329,4 +340,4 @@ const updateTransactionStatusInputSchema = z.object({
|
|
|
329
340
|
completedAt: z.date().optional()
|
|
330
341
|
});
|
|
331
342
|
|
|
332
|
-
export { ACCOUNT_TYPES as A, BALANCE_STRATEGIES as B, CHARGE_BEARERS as C,
|
|
343
|
+
export { ACCOUNT_TYPES as A, BALANCE_STRATEGIES as B, CHARGE_BEARERS as C, updateAccountInputSchema as D, ENTRY_STATUSES as E, updateTransactionConfirmationSentAtInputSchema as F, updateTransactionStatusInputSchema as G, IDENTIFIER_KINDS as I, PAYMENT_DIRECTIONS as P, REFERENCE_TYPES as R, TRANSACTION_STATUSES as T, ALLOWED_TRANSACTION_FILTERS as a, ASSET_TYPES as b, BATCH_STATUSES as c, COUNTRY_CODES as d, PAYMENT_STATUSES as e, PAYMENT_TYPES as f, REFUNDABLE_TRANSACTION_STATUSES as g, TRANSACTION_TYPES as h, cancelTransactionInputSchema as i, createAccountInputSchema as j, createTransactionInputSchema as k, deleteAccountInputSchema as l, failTransactionInputSchema as m, findAccountByIdentifierInputSchema as n, getAccountBalanceInputSchema as o, getAccountIdentifierInputSchema as p, getAccountInputSchema as q, getAccountsByOwnerInputSchema as r, getTransactionByIdInputSchema as s, getTransactionsByReferenceIdInputSchema as t, getTransactionsInputSchema as u, listAccountIdentifiersInputSchema as v, listAccountsInputSchema as w, matchTransactionInputSchema as x, refundTransactionInputSchema as y, resolveUnmatchedTransactionInputSchema as z };
|
|
@@ -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.
|
|
4
|
+
import { T as TRANSACTION_STATUSES, h as TRANSACTION_TYPES, R as REFERENCE_TYPES } from './ledger.De19PrJa.mjs';
|
|
5
5
|
import '@develit-io/general-codes';
|
|
6
6
|
|
|
7
7
|
const account = sqliteTable("account", {
|
|
@@ -90,6 +90,7 @@ const transaction = sqliteTable("transaction", {
|
|
|
90
90
|
paymentId: text("payment_id"),
|
|
91
91
|
metadata: text("metadata", { mode: "json" }).$type().notNull(),
|
|
92
92
|
value: real("value"),
|
|
93
|
+
receivedValue: real("received_value"),
|
|
93
94
|
currency: text("currency").$type()
|
|
94
95
|
});
|
|
95
96
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { F as schema } from './ledger.
|
|
2
|
+
import { F as schema } from './ledger.BtCTt25C.cjs';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -411,8 +411,8 @@ interface CreateAccountOutput {
|
|
|
411
411
|
declare const createTransactionInputSchema: z.ZodObject<{
|
|
412
412
|
correlationId: z.ZodString;
|
|
413
413
|
referenceType: z.ZodEnum<{
|
|
414
|
-
PAYMENT: "PAYMENT";
|
|
415
414
|
EXCHANGE: "EXCHANGE";
|
|
415
|
+
PAYMENT: "PAYMENT";
|
|
416
416
|
ORDER: "ORDER";
|
|
417
417
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
418
418
|
FORWARD: "FORWARD";
|
|
@@ -420,13 +420,13 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
420
420
|
}>;
|
|
421
421
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
422
422
|
type: z.ZodEnum<{
|
|
423
|
-
EXCHANGE: "EXCHANGE";
|
|
424
423
|
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
425
424
|
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
426
425
|
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
427
426
|
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
428
427
|
COLLATERAL_FUND_IN: "COLLATERAL_FUND_IN";
|
|
429
428
|
COLLATERAL_FUND_OUT: "COLLATERAL_FUND_OUT";
|
|
429
|
+
EXCHANGE: "EXCHANGE";
|
|
430
430
|
UNMATCHED: "UNMATCHED";
|
|
431
431
|
ADJUSTMENT: "ADJUSTMENT";
|
|
432
432
|
TRANSFER: "TRANSFER";
|
|
@@ -1185,6 +1185,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
1185
1185
|
status: z.ZodEnum<{
|
|
1186
1186
|
FAILED: "FAILED";
|
|
1187
1187
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1188
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1188
1189
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1189
1190
|
MATCHED: "MATCHED";
|
|
1190
1191
|
RETURNING: "RETURNING";
|
|
@@ -1385,8 +1386,8 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1385
1386
|
}, z.core.$strip>;
|
|
1386
1387
|
filterTransactionCorrelationId: z.ZodOptional<z.ZodUUID>;
|
|
1387
1388
|
filterTransactionReferenceType: z.ZodOptional<z.ZodEnum<{
|
|
1388
|
-
PAYMENT: "PAYMENT";
|
|
1389
1389
|
EXCHANGE: "EXCHANGE";
|
|
1390
|
+
PAYMENT: "PAYMENT";
|
|
1390
1391
|
ORDER: "ORDER";
|
|
1391
1392
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1392
1393
|
FORWARD: "FORWARD";
|
|
@@ -1394,13 +1395,13 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1394
1395
|
}>>;
|
|
1395
1396
|
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1396
1397
|
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
1397
|
-
EXCHANGE: "EXCHANGE";
|
|
1398
1398
|
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
1399
1399
|
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
1400
1400
|
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
1401
1401
|
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
1402
1402
|
COLLATERAL_FUND_IN: "COLLATERAL_FUND_IN";
|
|
1403
1403
|
COLLATERAL_FUND_OUT: "COLLATERAL_FUND_OUT";
|
|
1404
|
+
EXCHANGE: "EXCHANGE";
|
|
1404
1405
|
UNMATCHED: "UNMATCHED";
|
|
1405
1406
|
ADJUSTMENT: "ADJUSTMENT";
|
|
1406
1407
|
TRANSFER: "TRANSFER";
|
|
@@ -1413,6 +1414,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1413
1414
|
filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
|
|
1414
1415
|
FAILED: "FAILED";
|
|
1415
1416
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1417
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1416
1418
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1417
1419
|
MATCHED: "MATCHED";
|
|
1418
1420
|
RETURNING: "RETURNING";
|
|
@@ -1420,6 +1422,17 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1420
1422
|
CANCELLED: "CANCELLED";
|
|
1421
1423
|
SETTLED: "SETTLED";
|
|
1422
1424
|
}>>;
|
|
1425
|
+
filterTransactionStatuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1426
|
+
FAILED: "FAILED";
|
|
1427
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1428
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1429
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1430
|
+
MATCHED: "MATCHED";
|
|
1431
|
+
RETURNING: "RETURNING";
|
|
1432
|
+
RETURNED: "RETURNED";
|
|
1433
|
+
CANCELLED: "CANCELLED";
|
|
1434
|
+
SETTLED: "SETTLED";
|
|
1435
|
+
}>>>;
|
|
1423
1436
|
search: z.ZodOptional<z.ZodString>;
|
|
1424
1437
|
}, z.core.$strip>;
|
|
1425
1438
|
interface GetTransactionsInput extends z.input<typeof getTransactionsInputSchema> {
|
|
@@ -1431,8 +1444,8 @@ interface GetTransactionsOutput {
|
|
|
1431
1444
|
|
|
1432
1445
|
declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
1433
1446
|
referenceType: z.ZodEnum<{
|
|
1434
|
-
PAYMENT: "PAYMENT";
|
|
1435
1447
|
EXCHANGE: "EXCHANGE";
|
|
1448
|
+
PAYMENT: "PAYMENT";
|
|
1436
1449
|
ORDER: "ORDER";
|
|
1437
1450
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1438
1451
|
FORWARD: "FORWARD";
|
|
@@ -1549,6 +1562,7 @@ interface ListAccountsOutput {
|
|
|
1549
1562
|
declare const matchTransactionInputSchema: z.ZodObject<{
|
|
1550
1563
|
transactionId: z.ZodUUID;
|
|
1551
1564
|
paymentId: z.ZodString;
|
|
1565
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
1552
1566
|
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1553
1567
|
}, z.core.$strip>;
|
|
1554
1568
|
interface MatchTransactionInput extends z.infer<typeof matchTransactionInputSchema> {
|
|
@@ -1659,6 +1673,7 @@ declare const refundTransactionInputSchema: z.ZodObject<{
|
|
|
1659
1673
|
transactionId: z.ZodUUID;
|
|
1660
1674
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
1661
1675
|
reason: z.ZodString;
|
|
1676
|
+
performedBy: z.ZodOptional<z.ZodString>;
|
|
1662
1677
|
}, z.core.$strip>;
|
|
1663
1678
|
interface RefundTransactionInput extends z.infer<typeof refundTransactionInputSchema> {
|
|
1664
1679
|
}
|
|
@@ -1667,11 +1682,23 @@ interface RefundTransactionOutput {
|
|
|
1667
1682
|
originalTransaction: TransactionSelectType;
|
|
1668
1683
|
}
|
|
1669
1684
|
|
|
1685
|
+
declare const resolveUnmatchedTransactionInputSchema: z.ZodObject<{
|
|
1686
|
+
unmatchedTransactionId: z.ZodUUID;
|
|
1687
|
+
targetTransactionId: z.ZodUUID;
|
|
1688
|
+
note: z.ZodString;
|
|
1689
|
+
performedBy: z.ZodString;
|
|
1690
|
+
}, z.core.$strip>;
|
|
1691
|
+
interface ResolveUnmatchedTransactionInput extends z.infer<typeof resolveUnmatchedTransactionInputSchema> {
|
|
1692
|
+
}
|
|
1693
|
+
interface ResolveUnmatchedTransactionOutput extends TransactionSelectType {
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1670
1696
|
declare const updateTransactionStatusInputSchema: z.ZodObject<{
|
|
1671
1697
|
transactionId: z.ZodUUID;
|
|
1672
1698
|
status: z.ZodEnum<{
|
|
1673
1699
|
FAILED: "FAILED";
|
|
1674
1700
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1701
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1675
1702
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1676
1703
|
MATCHED: "MATCHED";
|
|
1677
1704
|
RETURNING: "RETURNING";
|
|
@@ -1690,5 +1717,5 @@ interface UpdateTransactionStatusOutput extends TransactionSelectType {
|
|
|
1690
1717
|
|
|
1691
1718
|
declare const tables: typeof schema;
|
|
1692
1719
|
|
|
1693
|
-
export {
|
|
1694
|
-
export type {
|
|
1720
|
+
export { cancelTransactionInputSchema as a0, createAccountInputSchema as a1, createTransactionInputSchema as a2, deleteAccountInputSchema as a3, failTransactionInputSchema as a4, findAccountByIdentifierInputSchema as a5, getAccountBalanceInputSchema as a6, getAccountIdentifierInputSchema as a7, getAccountInputSchema as a8, getAccountsByOwnerInputSchema as a9, getTransactionByIdInputSchema as aa, getTransactionsByReferenceIdInputSchema as ab, getTransactionsInputSchema as ac, listAccountIdentifiersInputSchema as ad, listAccountsInputSchema as ae, matchTransactionInputSchema as af, refundTransactionInputSchema as ag, resolveUnmatchedTransactionInputSchema as ah, updateAccountInputSchema as ai, updateTransactionConfirmationSentAtInputSchema as aj, updateTransactionStatusInputSchema as ak, tables as t };
|
|
1721
|
+
export type { TransactionInsertType as $, ListAccountIdentifiersOutput as A, FindAccountByIdentifierInput as B, CreateTransactionInput as C, DeleteAccountInput as D, FindAccountByIdentifierOutput as E, FailTransactionInput as F, GetTransactionByIdInput as G, GetAccountBalanceInput as H, GetAccountBalanceOutput as I, UpdateTransactionConfirmationSentAtInput as J, UpdateTransactionConfirmationSentAtOutput as K, ListAccountsInput as L, MatchTransactionInput as M, UpdateTransactionStatusInput as N, UpdateTransactionStatusOutput as O, AccountIdentifierInsertType as P, AccountIdentifierMappingInsertType as Q, ResolveUnmatchedTransactionInput as R, AccountIdentifierMappingSelectType as S, TransactionSelectType as T, UpdateAccountInput as U, AccountIdentifierSelectType as V, AccountInsertType as W, AccountSelectType as X, AccountWithIdentifiersSelectType as Y, IncludeRelation as Z, InferResultType as _, CreateTransactionOutput as a, MatchTransactionOutput as b, ResolveUnmatchedTransactionOutput as c, FailTransactionOutput as d, CancelTransactionInput as e, CancelTransactionOutput as f, RefundTransactionInput as g, RefundTransactionOutput as h, GetTransactionByIdOutput as i, GetTransactionsByIdReferenceInput as j, GetTransactionsByReferenceIdOutput as k, GetTransactionsInput as l, GetTransactionsOutput as m, CreateAccountInput as n, CreateAccountOutput as o, UpdateAccountOutput as p, DeleteAccountOutput as q, GetAccountInput as r, GetAccountOutput as s, GetAccountsByOwnerInput as u, GetAccountsByOwnerOutput as v, ListAccountsOutput as w, GetAccountIdentifierInput as x, GetAccountIdentifierOutput as y, ListAccountIdentifiersInput as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { F as schema } from './ledger.
|
|
2
|
+
import { F as schema } from './ledger.BtCTt25C.js';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -411,8 +411,8 @@ interface CreateAccountOutput {
|
|
|
411
411
|
declare const createTransactionInputSchema: z.ZodObject<{
|
|
412
412
|
correlationId: z.ZodString;
|
|
413
413
|
referenceType: z.ZodEnum<{
|
|
414
|
-
PAYMENT: "PAYMENT";
|
|
415
414
|
EXCHANGE: "EXCHANGE";
|
|
415
|
+
PAYMENT: "PAYMENT";
|
|
416
416
|
ORDER: "ORDER";
|
|
417
417
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
418
418
|
FORWARD: "FORWARD";
|
|
@@ -420,13 +420,13 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
420
420
|
}>;
|
|
421
421
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
422
422
|
type: z.ZodEnum<{
|
|
423
|
-
EXCHANGE: "EXCHANGE";
|
|
424
423
|
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
425
424
|
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
426
425
|
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
427
426
|
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
428
427
|
COLLATERAL_FUND_IN: "COLLATERAL_FUND_IN";
|
|
429
428
|
COLLATERAL_FUND_OUT: "COLLATERAL_FUND_OUT";
|
|
429
|
+
EXCHANGE: "EXCHANGE";
|
|
430
430
|
UNMATCHED: "UNMATCHED";
|
|
431
431
|
ADJUSTMENT: "ADJUSTMENT";
|
|
432
432
|
TRANSFER: "TRANSFER";
|
|
@@ -1185,6 +1185,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
1185
1185
|
status: z.ZodEnum<{
|
|
1186
1186
|
FAILED: "FAILED";
|
|
1187
1187
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1188
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1188
1189
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1189
1190
|
MATCHED: "MATCHED";
|
|
1190
1191
|
RETURNING: "RETURNING";
|
|
@@ -1385,8 +1386,8 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1385
1386
|
}, z.core.$strip>;
|
|
1386
1387
|
filterTransactionCorrelationId: z.ZodOptional<z.ZodUUID>;
|
|
1387
1388
|
filterTransactionReferenceType: z.ZodOptional<z.ZodEnum<{
|
|
1388
|
-
PAYMENT: "PAYMENT";
|
|
1389
1389
|
EXCHANGE: "EXCHANGE";
|
|
1390
|
+
PAYMENT: "PAYMENT";
|
|
1390
1391
|
ORDER: "ORDER";
|
|
1391
1392
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1392
1393
|
FORWARD: "FORWARD";
|
|
@@ -1394,13 +1395,13 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1394
1395
|
}>>;
|
|
1395
1396
|
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1396
1397
|
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
1397
|
-
EXCHANGE: "EXCHANGE";
|
|
1398
1398
|
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
1399
1399
|
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
1400
1400
|
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
1401
1401
|
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
1402
1402
|
COLLATERAL_FUND_IN: "COLLATERAL_FUND_IN";
|
|
1403
1403
|
COLLATERAL_FUND_OUT: "COLLATERAL_FUND_OUT";
|
|
1404
|
+
EXCHANGE: "EXCHANGE";
|
|
1404
1405
|
UNMATCHED: "UNMATCHED";
|
|
1405
1406
|
ADJUSTMENT: "ADJUSTMENT";
|
|
1406
1407
|
TRANSFER: "TRANSFER";
|
|
@@ -1413,6 +1414,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1413
1414
|
filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
|
|
1414
1415
|
FAILED: "FAILED";
|
|
1415
1416
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1417
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1416
1418
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1417
1419
|
MATCHED: "MATCHED";
|
|
1418
1420
|
RETURNING: "RETURNING";
|
|
@@ -1420,6 +1422,17 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1420
1422
|
CANCELLED: "CANCELLED";
|
|
1421
1423
|
SETTLED: "SETTLED";
|
|
1422
1424
|
}>>;
|
|
1425
|
+
filterTransactionStatuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1426
|
+
FAILED: "FAILED";
|
|
1427
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1428
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1429
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1430
|
+
MATCHED: "MATCHED";
|
|
1431
|
+
RETURNING: "RETURNING";
|
|
1432
|
+
RETURNED: "RETURNED";
|
|
1433
|
+
CANCELLED: "CANCELLED";
|
|
1434
|
+
SETTLED: "SETTLED";
|
|
1435
|
+
}>>>;
|
|
1423
1436
|
search: z.ZodOptional<z.ZodString>;
|
|
1424
1437
|
}, z.core.$strip>;
|
|
1425
1438
|
interface GetTransactionsInput extends z.input<typeof getTransactionsInputSchema> {
|
|
@@ -1431,8 +1444,8 @@ interface GetTransactionsOutput {
|
|
|
1431
1444
|
|
|
1432
1445
|
declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
1433
1446
|
referenceType: z.ZodEnum<{
|
|
1434
|
-
PAYMENT: "PAYMENT";
|
|
1435
1447
|
EXCHANGE: "EXCHANGE";
|
|
1448
|
+
PAYMENT: "PAYMENT";
|
|
1436
1449
|
ORDER: "ORDER";
|
|
1437
1450
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1438
1451
|
FORWARD: "FORWARD";
|
|
@@ -1549,6 +1562,7 @@ interface ListAccountsOutput {
|
|
|
1549
1562
|
declare const matchTransactionInputSchema: z.ZodObject<{
|
|
1550
1563
|
transactionId: z.ZodUUID;
|
|
1551
1564
|
paymentId: z.ZodString;
|
|
1565
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
1552
1566
|
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1553
1567
|
}, z.core.$strip>;
|
|
1554
1568
|
interface MatchTransactionInput extends z.infer<typeof matchTransactionInputSchema> {
|
|
@@ -1659,6 +1673,7 @@ declare const refundTransactionInputSchema: z.ZodObject<{
|
|
|
1659
1673
|
transactionId: z.ZodUUID;
|
|
1660
1674
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
1661
1675
|
reason: z.ZodString;
|
|
1676
|
+
performedBy: z.ZodOptional<z.ZodString>;
|
|
1662
1677
|
}, z.core.$strip>;
|
|
1663
1678
|
interface RefundTransactionInput extends z.infer<typeof refundTransactionInputSchema> {
|
|
1664
1679
|
}
|
|
@@ -1667,11 +1682,23 @@ interface RefundTransactionOutput {
|
|
|
1667
1682
|
originalTransaction: TransactionSelectType;
|
|
1668
1683
|
}
|
|
1669
1684
|
|
|
1685
|
+
declare const resolveUnmatchedTransactionInputSchema: z.ZodObject<{
|
|
1686
|
+
unmatchedTransactionId: z.ZodUUID;
|
|
1687
|
+
targetTransactionId: z.ZodUUID;
|
|
1688
|
+
note: z.ZodString;
|
|
1689
|
+
performedBy: z.ZodString;
|
|
1690
|
+
}, z.core.$strip>;
|
|
1691
|
+
interface ResolveUnmatchedTransactionInput extends z.infer<typeof resolveUnmatchedTransactionInputSchema> {
|
|
1692
|
+
}
|
|
1693
|
+
interface ResolveUnmatchedTransactionOutput extends TransactionSelectType {
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1670
1696
|
declare const updateTransactionStatusInputSchema: z.ZodObject<{
|
|
1671
1697
|
transactionId: z.ZodUUID;
|
|
1672
1698
|
status: z.ZodEnum<{
|
|
1673
1699
|
FAILED: "FAILED";
|
|
1674
1700
|
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1701
|
+
PARTIALLY_MATCHED: "PARTIALLY_MATCHED";
|
|
1675
1702
|
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1676
1703
|
MATCHED: "MATCHED";
|
|
1677
1704
|
RETURNING: "RETURNING";
|
|
@@ -1690,5 +1717,5 @@ interface UpdateTransactionStatusOutput extends TransactionSelectType {
|
|
|
1690
1717
|
|
|
1691
1718
|
declare const tables: typeof schema;
|
|
1692
1719
|
|
|
1693
|
-
export {
|
|
1694
|
-
export type {
|
|
1720
|
+
export { cancelTransactionInputSchema as a0, createAccountInputSchema as a1, createTransactionInputSchema as a2, deleteAccountInputSchema as a3, failTransactionInputSchema as a4, findAccountByIdentifierInputSchema as a5, getAccountBalanceInputSchema as a6, getAccountIdentifierInputSchema as a7, getAccountInputSchema as a8, getAccountsByOwnerInputSchema as a9, getTransactionByIdInputSchema as aa, getTransactionsByReferenceIdInputSchema as ab, getTransactionsInputSchema as ac, listAccountIdentifiersInputSchema as ad, listAccountsInputSchema as ae, matchTransactionInputSchema as af, refundTransactionInputSchema as ag, resolveUnmatchedTransactionInputSchema as ah, updateAccountInputSchema as ai, updateTransactionConfirmationSentAtInputSchema as aj, updateTransactionStatusInputSchema as ak, tables as t };
|
|
1721
|
+
export type { TransactionInsertType as $, ListAccountIdentifiersOutput as A, FindAccountByIdentifierInput as B, CreateTransactionInput as C, DeleteAccountInput as D, FindAccountByIdentifierOutput as E, FailTransactionInput as F, GetTransactionByIdInput as G, GetAccountBalanceInput as H, GetAccountBalanceOutput as I, UpdateTransactionConfirmationSentAtInput as J, UpdateTransactionConfirmationSentAtOutput as K, ListAccountsInput as L, MatchTransactionInput as M, UpdateTransactionStatusInput as N, UpdateTransactionStatusOutput as O, AccountIdentifierInsertType as P, AccountIdentifierMappingInsertType as Q, ResolveUnmatchedTransactionInput as R, AccountIdentifierMappingSelectType as S, TransactionSelectType as T, UpdateAccountInput as U, AccountIdentifierSelectType as V, AccountInsertType as W, AccountSelectType as X, AccountWithIdentifiersSelectType as Y, IncludeRelation as Z, InferResultType as _, CreateTransactionOutput as a, MatchTransactionOutput as b, ResolveUnmatchedTransactionOutput as c, FailTransactionOutput as d, CancelTransactionInput as e, CancelTransactionOutput as f, RefundTransactionInput as g, RefundTransactionOutput as h, GetTransactionByIdOutput as i, GetTransactionsByIdReferenceInput as j, GetTransactionsByReferenceIdOutput as k, GetTransactionsInput as l, GetTransactionsOutput as m, CreateAccountInput as n, CreateAccountOutput as o, UpdateAccountOutput as p, DeleteAccountOutput as q, GetAccountInput as r, GetAccountOutput as s, GetAccountsByOwnerInput as u, GetAccountsByOwnerOutput as v, ListAccountsOutput as w, GetAccountIdentifierInput as x, GetAccountIdentifierOutput as y, ListAccountIdentifiersInput as z };
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const updateTransactionStatus = require('./shared/ledger.
|
|
3
|
+
const updateTransactionStatus = require('./shared/ledger.CAoxOU3F.cjs');
|
|
4
4
|
const generalCodes = require('@develit-io/general-codes');
|
|
5
5
|
require('zod');
|
|
6
6
|
require('@develit-io/backend-sdk');
|
|
@@ -40,6 +40,7 @@ exports.listAccountIdentifiersInputSchema = updateTransactionStatus.listAccountI
|
|
|
40
40
|
exports.listAccountsInputSchema = updateTransactionStatus.listAccountsInputSchema;
|
|
41
41
|
exports.matchTransactionInputSchema = updateTransactionStatus.matchTransactionInputSchema;
|
|
42
42
|
exports.refundTransactionInputSchema = updateTransactionStatus.refundTransactionInputSchema;
|
|
43
|
+
exports.resolveUnmatchedTransactionInputSchema = updateTransactionStatus.resolveUnmatchedTransactionInputSchema;
|
|
43
44
|
exports.updateAccountInputSchema = updateTransactionStatus.updateAccountInputSchema;
|
|
44
45
|
exports.updateTransactionConfirmationSentAtInputSchema = updateTransactionStatus.updateTransactionConfirmationSentAtInputSchema;
|
|
45
46
|
exports.updateTransactionStatusInputSchema = updateTransactionStatus.updateTransactionStatusInputSchema;
|