@develit-services/ledger 0.0.9 → 0.0.11
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 +65 -9
- package/dist/export/worker.d.cts +4 -3
- package/dist/export/worker.d.mts +4 -3
- package/dist/export/worker.d.ts +4 -3
- package/dist/export/worker.mjs +65 -9
- package/dist/shared/{ledger.Bagnlywy.d.ts → ledger.Bkm5mMWD.d.ts} +95 -97
- package/dist/shared/{ledger.BEYBX0jI.d.cts → ledger.CBwk-FaO.d.cts} +8 -0
- package/dist/shared/{ledger.BEYBX0jI.d.mts → ledger.CBwk-FaO.d.mts} +8 -0
- package/dist/shared/{ledger.BEYBX0jI.d.ts → ledger.CBwk-FaO.d.ts} +8 -0
- package/dist/shared/{ledger.DGu3Pj-Y.cjs → ledger.CDuhIB9s.cjs} +1 -1
- package/dist/shared/{ledger.Dif5Euam.d.cts → ledger.CPyxWt0p.d.mts} +95 -97
- package/dist/shared/{ledger.BMjN2CMY.d.mts → ledger.ClXoajxH.d.cts} +95 -97
- package/dist/shared/{ledger.ByUO4e44.mjs → ledger.D8XNEnr1.mjs} +39 -35
- package/dist/shared/{ledger.D1MIlhpb.cjs → ledger.DXlB4bbD.cjs} +40 -35
- package/dist/shared/{ledger.Bl4HgQDw.mjs → ledger.qEafj0Ix.mjs} +1 -1
- package/dist/types.cjs +3 -2
- package/dist/types.d.cts +4 -4
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
package/dist/database/schema.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const database_schema = require('../shared/ledger.
|
|
3
|
+
const database_schema = require('../shared/ledger.CDuhIB9s.cjs');
|
|
4
4
|
require('@develit-io/backend-sdk');
|
|
5
5
|
require('drizzle-orm');
|
|
6
6
|
require('drizzle-orm/sqlite-core');
|
|
7
|
-
require('../shared/ledger.
|
|
7
|
+
require('../shared/ledger.DXlB4bbD.cjs');
|
|
8
8
|
require('@develit-io/general-codes');
|
|
9
9
|
require('zod');
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, L as accountIdentifierMappingRelations, K as accountIdentifierRelations, J as accountRelations, M as entry, N as transaction } from '../shared/ledger.
|
|
1
|
+
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, L as accountIdentifierMappingRelations, K as accountIdentifierRelations, J as accountRelations, M as entry, N as transaction } from '../shared/ledger.CBwk-FaO.cjs';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, L as accountIdentifierMappingRelations, K as accountIdentifierRelations, J as accountRelations, M as entry, N as transaction } from '../shared/ledger.
|
|
1
|
+
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, L as accountIdentifierMappingRelations, K as accountIdentifierRelations, J as accountRelations, M as entry, N as transaction } from '../shared/ledger.CBwk-FaO.mjs';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, L as accountIdentifierMappingRelations, K as accountIdentifierRelations, J as accountRelations, M as entry, N as transaction } from '../shared/ledger.
|
|
1
|
+
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, L as accountIdentifierMappingRelations, K as accountIdentifierRelations, J as accountRelations, M as entry, N as transaction } from '../shared/ledger.CBwk-FaO.js';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
package/dist/database/schema.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as account, b as accountIdentifier, c as accountIdentifierMapping, f as accountIdentifierMappingRelations, e as accountIdentifierRelations, d as accountRelations, g as entry, t as transaction } from '../shared/ledger.
|
|
1
|
+
export { a as account, b as accountIdentifier, c as accountIdentifierMapping, f as accountIdentifierMappingRelations, e as accountIdentifierRelations, d as accountRelations, g as entry, t as transaction } from '../shared/ledger.qEafj0Ix.mjs';
|
|
2
2
|
import '@develit-io/backend-sdk';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import 'drizzle-orm/sqlite-core';
|
|
5
|
-
import '../shared/ledger.
|
|
5
|
+
import '../shared/ledger.D8XNEnr1.mjs';
|
|
6
6
|
import '@develit-io/general-codes';
|
|
7
7
|
import 'zod';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
8
|
-
const database_schema = require('../shared/ledger.
|
|
8
|
+
const database_schema = require('../shared/ledger.CDuhIB9s.cjs');
|
|
9
9
|
const drizzleOrm = require('drizzle-orm');
|
|
10
|
-
const updateTransactionConfirmationSentAt = require('../shared/ledger.
|
|
10
|
+
const updateTransactionConfirmationSentAt = require('../shared/ledger.DXlB4bbD.cjs');
|
|
11
11
|
require('@develit-io/general-codes');
|
|
12
12
|
require('drizzle-orm/sqlite-core');
|
|
13
13
|
require('zod');
|
|
@@ -369,9 +369,11 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
369
369
|
this.env.QUEUE_BUS_QUEUE,
|
|
370
370
|
{
|
|
371
371
|
eventType: "LEDGER_TRANSACTION",
|
|
372
|
+
eventSignal: "created",
|
|
372
373
|
ledgerTransaction: result.transaction,
|
|
373
374
|
metadata: {
|
|
374
375
|
correlationId: backendSdk.uuidv4(),
|
|
376
|
+
entityId: result.transaction.id,
|
|
375
377
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
376
378
|
}
|
|
377
379
|
}
|
|
@@ -387,12 +389,12 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
387
389
|
}
|
|
388
390
|
);
|
|
389
391
|
}
|
|
390
|
-
async
|
|
392
|
+
async matchTransaction(input) {
|
|
391
393
|
return this.handleAction(
|
|
392
|
-
{ data: input, schema: updateTransactionConfirmationSentAt.
|
|
393
|
-
{ successMessage: "Transaction successfully
|
|
394
|
+
{ data: input, schema: updateTransactionConfirmationSentAt.matchTransactionInputSchema },
|
|
395
|
+
{ successMessage: "Transaction successfully matched." },
|
|
394
396
|
async (params) => {
|
|
395
|
-
const { transactionId,
|
|
397
|
+
const { transactionId, completedAt } = params;
|
|
396
398
|
const existingTransaction = await getTransactionByIdQuery(
|
|
397
399
|
this.db,
|
|
398
400
|
transactionId
|
|
@@ -407,7 +409,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
407
409
|
const { command } = await updateTransactionStatusCommand(
|
|
408
410
|
this.db,
|
|
409
411
|
transactionId,
|
|
410
|
-
|
|
412
|
+
"MATCHED",
|
|
411
413
|
completedAt
|
|
412
414
|
);
|
|
413
415
|
const [updatedTransaction] = await this.db.batch([command]);
|
|
@@ -423,9 +425,60 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
423
425
|
this.env.QUEUE_BUS_QUEUE,
|
|
424
426
|
{
|
|
425
427
|
eventType: "LEDGER_TRANSACTION",
|
|
428
|
+
eventSignal: "matched",
|
|
426
429
|
ledgerTransaction: transaction,
|
|
427
430
|
metadata: {
|
|
428
431
|
correlationId: backendSdk.uuidv4(),
|
|
432
|
+
entityId: transaction.id,
|
|
433
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
return transaction;
|
|
438
|
+
}
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
async failTransaction(input) {
|
|
442
|
+
return this.handleAction(
|
|
443
|
+
{ data: input, schema: updateTransactionConfirmationSentAt.failTransactionInputSchema },
|
|
444
|
+
{ successMessage: "Transaction successfully failed." },
|
|
445
|
+
async (params) => {
|
|
446
|
+
const { transactionId, completedAt } = params;
|
|
447
|
+
const existingTransaction = await getTransactionByIdQuery(
|
|
448
|
+
this.db,
|
|
449
|
+
transactionId
|
|
450
|
+
);
|
|
451
|
+
if (!existingTransaction) {
|
|
452
|
+
throw backendSdk.createInternalError(null, {
|
|
453
|
+
message: "Transaction not found",
|
|
454
|
+
status: 404,
|
|
455
|
+
code: "NOT_FOUND"
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
const { command } = await updateTransactionStatusCommand(
|
|
459
|
+
this.db,
|
|
460
|
+
transactionId,
|
|
461
|
+
"FAILED",
|
|
462
|
+
completedAt
|
|
463
|
+
);
|
|
464
|
+
const [updatedTransaction] = await this.db.batch([command]);
|
|
465
|
+
if (!updatedTransaction) {
|
|
466
|
+
throw backendSdk.createInternalError(null, {
|
|
467
|
+
message: "Failed to update transaction",
|
|
468
|
+
status: 500,
|
|
469
|
+
code: "INTERNAL_ERROR"
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
const transaction = backendSdk.first(updatedTransaction);
|
|
473
|
+
await this.pushToQueue(
|
|
474
|
+
this.env.QUEUE_BUS_QUEUE,
|
|
475
|
+
{
|
|
476
|
+
eventType: "LEDGER_TRANSACTION",
|
|
477
|
+
eventSignal: "failed",
|
|
478
|
+
ledgerTransaction: transaction,
|
|
479
|
+
metadata: {
|
|
480
|
+
correlationId: backendSdk.uuidv4(),
|
|
481
|
+
entityId: transaction.id,
|
|
429
482
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
430
483
|
}
|
|
431
484
|
}
|
|
@@ -702,8 +755,11 @@ __decorateClass([
|
|
|
702
755
|
backendSdk.action("create-transaction")
|
|
703
756
|
], LedgerServiceBase.prototype, "createTransaction", 1);
|
|
704
757
|
__decorateClass([
|
|
705
|
-
backendSdk.action("
|
|
706
|
-
], LedgerServiceBase.prototype, "
|
|
758
|
+
backendSdk.action("match-transaction")
|
|
759
|
+
], LedgerServiceBase.prototype, "matchTransaction", 1);
|
|
760
|
+
__decorateClass([
|
|
761
|
+
backendSdk.action("fail-transaction")
|
|
762
|
+
], LedgerServiceBase.prototype, "failTransaction", 1);
|
|
707
763
|
__decorateClass([
|
|
708
764
|
backendSdk.action("get-transaction-by-id")
|
|
709
765
|
], LedgerServiceBase.prototype, "getTransactionById", 1);
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -2,9 +2,9 @@ import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
3
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput,
|
|
5
|
+
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, G as GetTransactionByIdInput, d as GetTransactionByIdOutput, e as GetTransactionsByIdReferenceInput, f as GetTransactionsByReferenceIdOutput, g as GetTransactionsInput, h as GetTransactionsOutput, i as CreateAccountInput, j as CreateAccountOutput, U as UpdateAccountInput, k as UpdateAccountOutput, D as DeleteAccountInput, l as DeleteAccountOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, L as ListAccountsInput, q as ListAccountsOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, w as FindAccountByIdentifierInput, x as FindAccountByIdentifierOutput, y as GetAccountBalanceInput, z as GetAccountBalanceOutput, A as UpdateTransactionConfirmationSentAtInput, B as UpdateTransactionConfirmationSentAtOutput } from '../shared/ledger.ClXoajxH.cjs';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../shared/ledger.
|
|
7
|
+
import '../shared/ledger.CBwk-FaO.cjs';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import '@develit-io/general-codes';
|
|
@@ -14,7 +14,8 @@ declare class LedgerServiceBase extends LedgerServiceBase_base {
|
|
|
14
14
|
readonly db: DrizzleD1Database<typeof tables>;
|
|
15
15
|
constructor(ctx: ExecutionContext, env: LedgerEnv);
|
|
16
16
|
createTransaction(input: CreateTransactionInput): Promise<IRPCResponse<CreateTransactionOutput>>;
|
|
17
|
-
|
|
17
|
+
matchTransaction(input: MatchTransactionInput): Promise<IRPCResponse<MatchTransactionOutput>>;
|
|
18
|
+
failTransaction(input: FailTransactionInput): Promise<IRPCResponse<FailTransactionOutput>>;
|
|
18
19
|
getTransactionById(input: GetTransactionByIdInput): Promise<IRPCResponse<GetTransactionByIdOutput | undefined>>;
|
|
19
20
|
getTransactionsByReferenceId(input: GetTransactionsByIdReferenceInput): Promise<IRPCResponse<GetTransactionsByReferenceIdOutput | undefined>>;
|
|
20
21
|
getTransactions(input: GetTransactionsInput): Promise<IRPCResponse<GetTransactionsOutput>>;
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -2,9 +2,9 @@ import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
3
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput,
|
|
5
|
+
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, G as GetTransactionByIdInput, d as GetTransactionByIdOutput, e as GetTransactionsByIdReferenceInput, f as GetTransactionsByReferenceIdOutput, g as GetTransactionsInput, h as GetTransactionsOutput, i as CreateAccountInput, j as CreateAccountOutput, U as UpdateAccountInput, k as UpdateAccountOutput, D as DeleteAccountInput, l as DeleteAccountOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, L as ListAccountsInput, q as ListAccountsOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, w as FindAccountByIdentifierInput, x as FindAccountByIdentifierOutput, y as GetAccountBalanceInput, z as GetAccountBalanceOutput, A as UpdateTransactionConfirmationSentAtInput, B as UpdateTransactionConfirmationSentAtOutput } from '../shared/ledger.CPyxWt0p.mjs';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../shared/ledger.
|
|
7
|
+
import '../shared/ledger.CBwk-FaO.mjs';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import '@develit-io/general-codes';
|
|
@@ -14,7 +14,8 @@ declare class LedgerServiceBase extends LedgerServiceBase_base {
|
|
|
14
14
|
readonly db: DrizzleD1Database<typeof tables>;
|
|
15
15
|
constructor(ctx: ExecutionContext, env: LedgerEnv);
|
|
16
16
|
createTransaction(input: CreateTransactionInput): Promise<IRPCResponse<CreateTransactionOutput>>;
|
|
17
|
-
|
|
17
|
+
matchTransaction(input: MatchTransactionInput): Promise<IRPCResponse<MatchTransactionOutput>>;
|
|
18
|
+
failTransaction(input: FailTransactionInput): Promise<IRPCResponse<FailTransactionOutput>>;
|
|
18
19
|
getTransactionById(input: GetTransactionByIdInput): Promise<IRPCResponse<GetTransactionByIdOutput | undefined>>;
|
|
19
20
|
getTransactionsByReferenceId(input: GetTransactionsByIdReferenceInput): Promise<IRPCResponse<GetTransactionsByReferenceIdOutput | undefined>>;
|
|
20
21
|
getTransactions(input: GetTransactionsInput): Promise<IRPCResponse<GetTransactionsOutput>>;
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
3
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
4
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput,
|
|
5
|
+
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, G as GetTransactionByIdInput, d as GetTransactionByIdOutput, e as GetTransactionsByIdReferenceInput, f as GetTransactionsByReferenceIdOutput, g as GetTransactionsInput, h as GetTransactionsOutput, i as CreateAccountInput, j as CreateAccountOutput, U as UpdateAccountInput, k as UpdateAccountOutput, D as DeleteAccountInput, l as DeleteAccountOutput, m as GetAccountInput, n as GetAccountOutput, o as GetAccountsByOwnerInput, p as GetAccountsByOwnerOutput, L as ListAccountsInput, q as ListAccountsOutput, r as GetAccountIdentifierInput, s as GetAccountIdentifierOutput, u as ListAccountIdentifiersInput, v as ListAccountIdentifiersOutput, w as FindAccountByIdentifierInput, x as FindAccountByIdentifierOutput, y as GetAccountBalanceInput, z as GetAccountBalanceOutput, A as UpdateTransactionConfirmationSentAtInput, B as UpdateTransactionConfirmationSentAtOutput } from '../shared/ledger.Bkm5mMWD.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../shared/ledger.
|
|
7
|
+
import '../shared/ledger.CBwk-FaO.js';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import '@develit-io/general-codes';
|
|
@@ -14,7 +14,8 @@ declare class LedgerServiceBase extends LedgerServiceBase_base {
|
|
|
14
14
|
readonly db: DrizzleD1Database<typeof tables>;
|
|
15
15
|
constructor(ctx: ExecutionContext, env: LedgerEnv);
|
|
16
16
|
createTransaction(input: CreateTransactionInput): Promise<IRPCResponse<CreateTransactionOutput>>;
|
|
17
|
-
|
|
17
|
+
matchTransaction(input: MatchTransactionInput): Promise<IRPCResponse<MatchTransactionOutput>>;
|
|
18
|
+
failTransaction(input: FailTransactionInput): Promise<IRPCResponse<FailTransactionOutput>>;
|
|
18
19
|
getTransactionById(input: GetTransactionByIdInput): Promise<IRPCResponse<GetTransactionByIdOutput | undefined>>;
|
|
19
20
|
getTransactionsByReferenceId(input: GetTransactionsByIdReferenceInput): Promise<IRPCResponse<GetTransactionsByReferenceIdOutput | undefined>>;
|
|
20
21
|
getTransactions(input: GetTransactionsInput): Promise<IRPCResponse<GetTransactionsOutput>>;
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { first, develitWorker, uuidv4, useResult, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
2
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
3
3
|
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { s as schema } from '../shared/ledger.
|
|
4
|
+
import { s as schema } from '../shared/ledger.qEafj0Ix.mjs';
|
|
5
5
|
import { eq, and, inArray, or, count, gte, lte, sql, asc, desc } from 'drizzle-orm';
|
|
6
|
-
import { e as createTransactionInputSchema,
|
|
6
|
+
import { e as createTransactionInputSchema, r as matchTransactionInputSchema, g as failTransactionInputSchema, m as getTransactionByIdInputSchema, o as getTransactionsByReferenceIdInputSchema, n as getTransactionsInputSchema, d as createAccountInputSchema, u as updateAccountInputSchema, f as deleteAccountInputSchema, i as getAccountInputSchema, l as getAccountsByOwnerInputSchema, q as listAccountsInputSchema, k as getAccountIdentifierInputSchema, p as listAccountIdentifiersInputSchema, h as findAccountByIdentifierInputSchema, j as getAccountBalanceInputSchema, s as updateTransactionConfirmationSentAtInputSchema } from '../shared/ledger.D8XNEnr1.mjs';
|
|
7
7
|
import '@develit-io/general-codes';
|
|
8
8
|
import 'drizzle-orm/sqlite-core';
|
|
9
9
|
import 'zod';
|
|
@@ -365,9 +365,11 @@ let LedgerServiceBase = class extends develitWorker(
|
|
|
365
365
|
this.env.QUEUE_BUS_QUEUE,
|
|
366
366
|
{
|
|
367
367
|
eventType: "LEDGER_TRANSACTION",
|
|
368
|
+
eventSignal: "created",
|
|
368
369
|
ledgerTransaction: result.transaction,
|
|
369
370
|
metadata: {
|
|
370
371
|
correlationId: uuidv4(),
|
|
372
|
+
entityId: result.transaction.id,
|
|
371
373
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
372
374
|
}
|
|
373
375
|
}
|
|
@@ -383,12 +385,12 @@ let LedgerServiceBase = class extends develitWorker(
|
|
|
383
385
|
}
|
|
384
386
|
);
|
|
385
387
|
}
|
|
386
|
-
async
|
|
388
|
+
async matchTransaction(input) {
|
|
387
389
|
return this.handleAction(
|
|
388
|
-
{ data: input, schema:
|
|
389
|
-
{ successMessage: "Transaction successfully
|
|
390
|
+
{ data: input, schema: matchTransactionInputSchema },
|
|
391
|
+
{ successMessage: "Transaction successfully matched." },
|
|
390
392
|
async (params) => {
|
|
391
|
-
const { transactionId,
|
|
393
|
+
const { transactionId, completedAt } = params;
|
|
392
394
|
const existingTransaction = await getTransactionByIdQuery(
|
|
393
395
|
this.db,
|
|
394
396
|
transactionId
|
|
@@ -403,7 +405,7 @@ let LedgerServiceBase = class extends develitWorker(
|
|
|
403
405
|
const { command } = await updateTransactionStatusCommand(
|
|
404
406
|
this.db,
|
|
405
407
|
transactionId,
|
|
406
|
-
|
|
408
|
+
"MATCHED",
|
|
407
409
|
completedAt
|
|
408
410
|
);
|
|
409
411
|
const [updatedTransaction] = await this.db.batch([command]);
|
|
@@ -419,9 +421,60 @@ let LedgerServiceBase = class extends develitWorker(
|
|
|
419
421
|
this.env.QUEUE_BUS_QUEUE,
|
|
420
422
|
{
|
|
421
423
|
eventType: "LEDGER_TRANSACTION",
|
|
424
|
+
eventSignal: "matched",
|
|
422
425
|
ledgerTransaction: transaction,
|
|
423
426
|
metadata: {
|
|
424
427
|
correlationId: uuidv4(),
|
|
428
|
+
entityId: transaction.id,
|
|
429
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
return transaction;
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
async failTransaction(input) {
|
|
438
|
+
return this.handleAction(
|
|
439
|
+
{ data: input, schema: failTransactionInputSchema },
|
|
440
|
+
{ successMessage: "Transaction successfully failed." },
|
|
441
|
+
async (params) => {
|
|
442
|
+
const { transactionId, completedAt } = params;
|
|
443
|
+
const existingTransaction = await getTransactionByIdQuery(
|
|
444
|
+
this.db,
|
|
445
|
+
transactionId
|
|
446
|
+
);
|
|
447
|
+
if (!existingTransaction) {
|
|
448
|
+
throw createInternalError(null, {
|
|
449
|
+
message: "Transaction not found",
|
|
450
|
+
status: 404,
|
|
451
|
+
code: "NOT_FOUND"
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
const { command } = await updateTransactionStatusCommand(
|
|
455
|
+
this.db,
|
|
456
|
+
transactionId,
|
|
457
|
+
"FAILED",
|
|
458
|
+
completedAt
|
|
459
|
+
);
|
|
460
|
+
const [updatedTransaction] = await this.db.batch([command]);
|
|
461
|
+
if (!updatedTransaction) {
|
|
462
|
+
throw createInternalError(null, {
|
|
463
|
+
message: "Failed to update transaction",
|
|
464
|
+
status: 500,
|
|
465
|
+
code: "INTERNAL_ERROR"
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
const transaction = first(updatedTransaction);
|
|
469
|
+
await this.pushToQueue(
|
|
470
|
+
this.env.QUEUE_BUS_QUEUE,
|
|
471
|
+
{
|
|
472
|
+
eventType: "LEDGER_TRANSACTION",
|
|
473
|
+
eventSignal: "failed",
|
|
474
|
+
ledgerTransaction: transaction,
|
|
475
|
+
metadata: {
|
|
476
|
+
correlationId: uuidv4(),
|
|
477
|
+
entityId: transaction.id,
|
|
425
478
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
426
479
|
}
|
|
427
480
|
}
|
|
@@ -698,8 +751,11 @@ __decorateClass([
|
|
|
698
751
|
action("create-transaction")
|
|
699
752
|
], LedgerServiceBase.prototype, "createTransaction", 1);
|
|
700
753
|
__decorateClass([
|
|
701
|
-
action("
|
|
702
|
-
], LedgerServiceBase.prototype, "
|
|
754
|
+
action("match-transaction")
|
|
755
|
+
], LedgerServiceBase.prototype, "matchTransaction", 1);
|
|
756
|
+
__decorateClass([
|
|
757
|
+
action("fail-transaction")
|
|
758
|
+
], LedgerServiceBase.prototype, "failTransaction", 1);
|
|
703
759
|
__decorateClass([
|
|
704
760
|
action("get-transaction-by-id")
|
|
705
761
|
], LedgerServiceBase.prototype, "getTransactionById", 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { D as schema } from './ledger.
|
|
2
|
+
import { D as schema } from './ledger.CBwk-FaO.js';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -541,7 +541,6 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
541
541
|
AVAX: "AVAX";
|
|
542
542
|
}>>;
|
|
543
543
|
country: z.ZodOptional<z.ZodEnum<{
|
|
544
|
-
EC: "EC";
|
|
545
544
|
AF: "AF";
|
|
546
545
|
AL: "AL";
|
|
547
546
|
DZ: "DZ";
|
|
@@ -595,6 +594,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
595
594
|
DM: "DM";
|
|
596
595
|
DO: "DO";
|
|
597
596
|
TL: "TL";
|
|
597
|
+
EC: "EC";
|
|
598
598
|
EG: "EG";
|
|
599
599
|
SV: "SV";
|
|
600
600
|
GQ: "GQ";
|
|
@@ -870,7 +870,6 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
870
870
|
AVAX: "AVAX";
|
|
871
871
|
}>>;
|
|
872
872
|
country: z.ZodOptional<z.ZodEnum<{
|
|
873
|
-
EC: "EC";
|
|
874
873
|
AF: "AF";
|
|
875
874
|
AL: "AL";
|
|
876
875
|
DZ: "DZ";
|
|
@@ -924,6 +923,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
924
923
|
DM: "DM";
|
|
925
924
|
DO: "DO";
|
|
926
925
|
TL: "TL";
|
|
926
|
+
EC: "EC";
|
|
927
927
|
EG: "EG";
|
|
928
928
|
SV: "SV";
|
|
929
929
|
GQ: "GQ";
|
|
@@ -1173,6 +1173,15 @@ interface DeleteAccountInput extends z.infer<typeof deleteAccountInputSchema> {
|
|
|
1173
1173
|
interface DeleteAccountOutput {
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
|
+
declare const failTransactionInputSchema: z.ZodObject<{
|
|
1177
|
+
transactionId: z.ZodUUID;
|
|
1178
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1179
|
+
}, z.core.$strip>;
|
|
1180
|
+
interface FailTransactionInput extends z.infer<typeof failTransactionInputSchema> {
|
|
1181
|
+
}
|
|
1182
|
+
interface FailTransactionOutput extends TransactionSelectType {
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1176
1185
|
declare const findAccountByIdentifierInputSchema: z.ZodObject<{
|
|
1177
1186
|
iban: z.ZodOptional<z.ZodString>;
|
|
1178
1187
|
accountNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -1265,6 +1274,78 @@ interface GetAccountsByOwnerInput extends z.infer<typeof getAccountsByOwnerInput
|
|
|
1265
1274
|
interface GetAccountsByOwnerOutput extends Array<AccountSelectType> {
|
|
1266
1275
|
}
|
|
1267
1276
|
|
|
1277
|
+
declare const getTransactionByIdInputSchema: z.ZodObject<{
|
|
1278
|
+
id: z.ZodUUID;
|
|
1279
|
+
}, z.core.$strip>;
|
|
1280
|
+
interface GetTransactionByIdInput extends z.infer<typeof getTransactionByIdInputSchema> {
|
|
1281
|
+
}
|
|
1282
|
+
interface GetTransactionByIdOutput extends TransactionSelectType {
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
declare const getTransactionsInputSchema: z.ZodObject<{
|
|
1286
|
+
page: z.ZodNumber;
|
|
1287
|
+
limit: z.ZodNumber;
|
|
1288
|
+
sort: z.ZodObject<{
|
|
1289
|
+
column: z.ZodString;
|
|
1290
|
+
direction: z.ZodEnum<{
|
|
1291
|
+
asc: "asc";
|
|
1292
|
+
desc: "desc";
|
|
1293
|
+
}>;
|
|
1294
|
+
}, z.core.$strip>;
|
|
1295
|
+
filterTransactionCorrelationId: z.ZodOptional<z.ZodUUID>;
|
|
1296
|
+
filterTransactionReferenceType: z.ZodOptional<z.ZodEnum<{
|
|
1297
|
+
PAYMENT: "PAYMENT";
|
|
1298
|
+
EXCHANGE: "EXCHANGE";
|
|
1299
|
+
ORDER: "ORDER";
|
|
1300
|
+
}>>;
|
|
1301
|
+
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1302
|
+
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
1303
|
+
EXCHANGE: "EXCHANGE";
|
|
1304
|
+
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
1305
|
+
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
1306
|
+
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
1307
|
+
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
1308
|
+
UNMATCHED: "UNMATCHED";
|
|
1309
|
+
ADJUSTMENT: "ADJUSTMENT";
|
|
1310
|
+
TRANSFER: "TRANSFER";
|
|
1311
|
+
}>>;
|
|
1312
|
+
filterTransactionDescription: z.ZodOptional<z.ZodString>;
|
|
1313
|
+
filterTransactionDateFrom: z.ZodOptional<z.ZodDate>;
|
|
1314
|
+
filterTransactionDateTo: z.ZodOptional<z.ZodDate>;
|
|
1315
|
+
filterTransactionCompletedAt: z.ZodOptional<z.ZodDate>;
|
|
1316
|
+
filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
|
|
1317
|
+
FAILED: "FAILED";
|
|
1318
|
+
COMPLETED: "COMPLETED";
|
|
1319
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1320
|
+
PAUSED: "PAUSED";
|
|
1321
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1322
|
+
MATCHED: "MATCHED";
|
|
1323
|
+
RETURNING: "RETURNING";
|
|
1324
|
+
RETURNED: "RETURNED";
|
|
1325
|
+
CANCELLED: "CANCELLED";
|
|
1326
|
+
}>>;
|
|
1327
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1328
|
+
}, z.core.$strip>;
|
|
1329
|
+
interface GetTransactionsInput extends z.input<typeof getTransactionsInputSchema> {
|
|
1330
|
+
}
|
|
1331
|
+
interface GetTransactionsOutput {
|
|
1332
|
+
transactions: TransactionSelectType[];
|
|
1333
|
+
totalCount: number;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
1337
|
+
referenceType: z.ZodEnum<{
|
|
1338
|
+
PAYMENT: "PAYMENT";
|
|
1339
|
+
EXCHANGE: "EXCHANGE";
|
|
1340
|
+
ORDER: "ORDER";
|
|
1341
|
+
}>;
|
|
1342
|
+
referenceId: z.ZodUUID;
|
|
1343
|
+
}, z.core.$strip>;
|
|
1344
|
+
interface GetTransactionsByIdReferenceInput extends z.infer<typeof getTransactionsByReferenceIdInputSchema> {
|
|
1345
|
+
}
|
|
1346
|
+
interface GetTransactionsByReferenceIdOutput extends Array<TransactionSelectType> {
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1268
1349
|
declare const listAccountIdentifiersInputSchema: z.ZodObject<{
|
|
1269
1350
|
accountId: z.ZodUUID;
|
|
1270
1351
|
}, z.core.$strip>;
|
|
@@ -1366,6 +1447,15 @@ interface ListAccountsOutput {
|
|
|
1366
1447
|
offset: number;
|
|
1367
1448
|
}
|
|
1368
1449
|
|
|
1450
|
+
declare const matchTransactionInputSchema: z.ZodObject<{
|
|
1451
|
+
transactionId: z.ZodUUID;
|
|
1452
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1453
|
+
}, z.core.$strip>;
|
|
1454
|
+
interface MatchTransactionInput extends z.infer<typeof matchTransactionInputSchema> {
|
|
1455
|
+
}
|
|
1456
|
+
interface MatchTransactionOutput extends TransactionSelectType {
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1369
1459
|
declare const updateAccountInputSchema: z.ZodObject<{
|
|
1370
1460
|
accountId: z.ZodUUID;
|
|
1371
1461
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1458,98 +1548,6 @@ interface UpdateAccountInput extends z.infer<typeof updateAccountInputSchema> {
|
|
|
1458
1548
|
interface UpdateAccountOutput extends AccountSelectType {
|
|
1459
1549
|
}
|
|
1460
1550
|
|
|
1461
|
-
declare const updateTransactionInputSchema: z.ZodObject<{
|
|
1462
|
-
transactionId: z.ZodUUID;
|
|
1463
|
-
status: z.ZodEnum<{
|
|
1464
|
-
FAILED: "FAILED";
|
|
1465
|
-
COMPLETED: "COMPLETED";
|
|
1466
|
-
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1467
|
-
PAUSED: "PAUSED";
|
|
1468
|
-
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1469
|
-
MATCHED: "MATCHED";
|
|
1470
|
-
RETURNING: "RETURNING";
|
|
1471
|
-
RETURNED: "RETURNED";
|
|
1472
|
-
CANCELLED: "CANCELLED";
|
|
1473
|
-
}>;
|
|
1474
|
-
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1475
|
-
}, z.core.$strip>;
|
|
1476
|
-
interface UpdateTransactionInput extends z.infer<typeof updateTransactionInputSchema> {
|
|
1477
|
-
}
|
|
1478
|
-
interface UpdateTransactionOutput extends TransactionSelectType {
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
declare const getTransactionByIdInputSchema: z.ZodObject<{
|
|
1482
|
-
id: z.ZodUUID;
|
|
1483
|
-
}, z.core.$strip>;
|
|
1484
|
-
interface GetTransactionByIdInput extends z.infer<typeof getTransactionByIdInputSchema> {
|
|
1485
|
-
}
|
|
1486
|
-
interface GetTransactionByIdOutput extends TransactionSelectType {
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
1490
|
-
referenceType: z.ZodEnum<{
|
|
1491
|
-
PAYMENT: "PAYMENT";
|
|
1492
|
-
EXCHANGE: "EXCHANGE";
|
|
1493
|
-
ORDER: "ORDER";
|
|
1494
|
-
}>;
|
|
1495
|
-
referenceId: z.ZodUUID;
|
|
1496
|
-
}, z.core.$strip>;
|
|
1497
|
-
interface GetTransactionsByIdReferenceInput extends z.infer<typeof getTransactionsByReferenceIdInputSchema> {
|
|
1498
|
-
}
|
|
1499
|
-
interface GetTransactionsByReferenceIdOutput extends Array<TransactionSelectType> {
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
declare const getTransactionsInputSchema: z.ZodObject<{
|
|
1503
|
-
page: z.ZodNumber;
|
|
1504
|
-
limit: z.ZodNumber;
|
|
1505
|
-
sort: z.ZodObject<{
|
|
1506
|
-
column: z.ZodString;
|
|
1507
|
-
direction: z.ZodEnum<{
|
|
1508
|
-
asc: "asc";
|
|
1509
|
-
desc: "desc";
|
|
1510
|
-
}>;
|
|
1511
|
-
}, z.core.$strip>;
|
|
1512
|
-
filterTransactionCorrelationId: z.ZodOptional<z.ZodUUID>;
|
|
1513
|
-
filterTransactionReferenceType: z.ZodOptional<z.ZodEnum<{
|
|
1514
|
-
PAYMENT: "PAYMENT";
|
|
1515
|
-
EXCHANGE: "EXCHANGE";
|
|
1516
|
-
ORDER: "ORDER";
|
|
1517
|
-
}>>;
|
|
1518
|
-
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1519
|
-
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
1520
|
-
EXCHANGE: "EXCHANGE";
|
|
1521
|
-
CLIENT_FUND_IN: "CLIENT_FUND_IN";
|
|
1522
|
-
CLIENT_FUND_OUT: "CLIENT_FUND_OUT";
|
|
1523
|
-
PROVIDER_FUND_IN: "PROVIDER_FUND_IN";
|
|
1524
|
-
PROVIDER_FUND_OUT: "PROVIDER_FUND_OUT";
|
|
1525
|
-
UNMATCHED: "UNMATCHED";
|
|
1526
|
-
ADJUSTMENT: "ADJUSTMENT";
|
|
1527
|
-
TRANSFER: "TRANSFER";
|
|
1528
|
-
}>>;
|
|
1529
|
-
filterTransactionDescription: z.ZodOptional<z.ZodString>;
|
|
1530
|
-
filterTransactionDateFrom: z.ZodOptional<z.ZodDate>;
|
|
1531
|
-
filterTransactionDateTo: z.ZodOptional<z.ZodDate>;
|
|
1532
|
-
filterTransactionCompletedAt: z.ZodOptional<z.ZodDate>;
|
|
1533
|
-
filterTransactionStatus: z.ZodOptional<z.ZodEnum<{
|
|
1534
|
-
FAILED: "FAILED";
|
|
1535
|
-
COMPLETED: "COMPLETED";
|
|
1536
|
-
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1537
|
-
PAUSED: "PAUSED";
|
|
1538
|
-
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1539
|
-
MATCHED: "MATCHED";
|
|
1540
|
-
RETURNING: "RETURNING";
|
|
1541
|
-
RETURNED: "RETURNED";
|
|
1542
|
-
CANCELLED: "CANCELLED";
|
|
1543
|
-
}>>;
|
|
1544
|
-
search: z.ZodOptional<z.ZodString>;
|
|
1545
|
-
}, z.core.$strip>;
|
|
1546
|
-
interface GetTransactionsInput extends z.input<typeof getTransactionsInputSchema> {
|
|
1547
|
-
}
|
|
1548
|
-
interface GetTransactionsOutput {
|
|
1549
|
-
transactions: TransactionSelectType[];
|
|
1550
|
-
totalCount: number;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
1551
|
declare const updateTransactionConfirmationSentAtInputSchema: z.ZodObject<{
|
|
1554
1552
|
transactionId: z.ZodUUID;
|
|
1555
1553
|
}, z.core.$strip>;
|
|
@@ -1559,5 +1557,5 @@ type UpdateTransactionConfirmationSentAtOutput = void;
|
|
|
1559
1557
|
|
|
1560
1558
|
declare const tables: typeof schema;
|
|
1561
1559
|
|
|
1562
|
-
export {
|
|
1563
|
-
export type {
|
|
1560
|
+
export { getAccountIdentifierInputSchema as $, createAccountInputSchema as S, createTransactionInputSchema as V, deleteAccountInputSchema as W, failTransactionInputSchema as X, findAccountByIdentifierInputSchema as Y, getAccountInputSchema as Z, getAccountBalanceInputSchema as _, getAccountsByOwnerInputSchema as a0, getTransactionByIdInputSchema as a1, getTransactionsInputSchema as a2, getTransactionsByReferenceIdInputSchema as a3, listAccountIdentifiersInputSchema as a4, listAccountsInputSchema as a5, matchTransactionInputSchema as a6, updateAccountInputSchema as a7, updateTransactionConfirmationSentAtInputSchema as a8, tables as t };
|
|
1561
|
+
export type { UpdateTransactionConfirmationSentAtInput as A, UpdateTransactionConfirmationSentAtOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, InferResultType as E, FailTransactionInput as F, GetTransactionByIdInput as G, AccountSelectType as H, IncludeRelation as I, AccountInsertType as J, AccountIdentifierSelectType as K, ListAccountsInput as L, MatchTransactionInput as M, AccountIdentifierInsertType as N, AccountIdentifierMappingSelectType as O, AccountIdentifierMappingInsertType as P, TransactionInsertType as Q, AccountWithIdentifiersSelectType as R, TransactionSelectType as T, UpdateAccountInput as U, CreateTransactionOutput as a, MatchTransactionOutput as b, FailTransactionOutput as c, GetTransactionByIdOutput as d, GetTransactionsByIdReferenceInput as e, GetTransactionsByReferenceIdOutput as f, GetTransactionsInput as g, GetTransactionsOutput as h, CreateAccountInput as i, CreateAccountOutput as j, UpdateAccountOutput as k, DeleteAccountOutput as l, GetAccountInput as m, GetAccountOutput as n, GetAccountsByOwnerInput as o, GetAccountsByOwnerOutput as p, ListAccountsOutput as q, GetAccountIdentifierInput as r, GetAccountIdentifierOutput as s, ListAccountIdentifiersInput as u, ListAccountIdentifiersOutput as v, FindAccountByIdentifierInput as w, FindAccountByIdentifierOutput as x, GetAccountBalanceInput as y, GetAccountBalanceOutput as z };
|
|
@@ -641,6 +641,14 @@ interface TransactionMetadata {
|
|
|
641
641
|
currency?: CurrencyCode;
|
|
642
642
|
amount?: number;
|
|
643
643
|
};
|
|
644
|
+
/**
|
|
645
|
+
* Tags for categorization or grouping of the transaction
|
|
646
|
+
*/
|
|
647
|
+
tags?: string[];
|
|
648
|
+
/**
|
|
649
|
+
* Additional notes or comments about the transaction
|
|
650
|
+
*/
|
|
651
|
+
note?: string;
|
|
644
652
|
}
|
|
645
653
|
interface EntryMetadata {
|
|
646
654
|
context?: {
|