@develit-services/ledger 0.3.1 → 0.3.2
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 +73 -20
- package/dist/export/worker.d.cts +3 -2
- package/dist/export/worker.d.mts +3 -2
- package/dist/export/worker.d.ts +3 -2
- package/dist/export/worker.mjs +55 -2
- package/dist/shared/{ledger.149a0ags.mjs → ledger.BGgIPMu-.mjs} +1 -1
- package/dist/shared/{ledger.DkcYdsVZ.mjs → ledger.BVNtjljl.mjs} +13 -3
- package/dist/shared/{ledger.B2SLAQpo.cjs → ledger.C7cMVCgk.cjs} +4 -4
- package/dist/shared/{ledger.CeePJr7h.d.cts → ledger.CDdw0Nyc.d.ts} +32 -3
- package/dist/shared/{ledger.Ci2NnLFo.d.mts → ledger.CLVyCzRb.d.cts} +8 -8
- package/dist/shared/{ledger.Ci2NnLFo.d.cts → ledger.CLVyCzRb.d.mts} +8 -8
- package/dist/shared/{ledger.Ci2NnLFo.d.ts → ledger.CLVyCzRb.d.ts} +8 -8
- package/dist/shared/{ledger.Bombc2Sm.d.ts → ledger.D7boja6V.d.cts} +32 -3
- package/dist/shared/{ledger.C63GL8Bq.d.mts → ledger.D_uHoy5E.d.mts} +32 -3
- package/dist/shared/{ledger.C6xAPWKq.cjs → ledger.Dfi_K5W2.cjs} +13 -2
- package/dist/types.cjs +35 -34
- package/dist/types.d.cts +3 -3
- package/dist/types.d.mts +3 -3
- package/dist/types.d.ts +3 -3
- 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.C7cMVCgk.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.Dfi_K5W2.cjs');
|
|
8
8
|
require('zod');
|
|
9
9
|
require('@develit-io/general-codes');
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, J as accountIdentifierMappingRelations, K as accountIdentifierRelations, L as accountRelations, M as entry, N as transaction } from '../shared/ledger.
|
|
1
|
+
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, J as accountIdentifierMappingRelations, K as accountIdentifierRelations, L as accountRelations, M as entry, N as transaction } from '../shared/ledger.CLVyCzRb.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, J as accountIdentifierMappingRelations, K as accountIdentifierRelations, L as accountRelations, M as entry, N as transaction } from '../shared/ledger.
|
|
1
|
+
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, J as accountIdentifierMappingRelations, K as accountIdentifierRelations, L as accountRelations, M as entry, N as transaction } from '../shared/ledger.CLVyCzRb.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, J as accountIdentifierMappingRelations, K as accountIdentifierRelations, L as accountRelations, M as entry, N as transaction } from '../shared/ledger.
|
|
1
|
+
export { F as account, G as accountIdentifier, H as accountIdentifierMapping, J as accountIdentifierMappingRelations, K as accountIdentifierRelations, L as accountRelations, M as entry, N as transaction } from '../shared/ledger.CLVyCzRb.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, d as accountIdentifierMappingRelations, e as accountIdentifierRelations, f as accountRelations, g as entry, t as transaction } from '../shared/ledger.
|
|
1
|
+
export { a as account, b as accountIdentifier, c as accountIdentifierMapping, d as accountIdentifierMappingRelations, e as accountIdentifierRelations, f as accountRelations, g as entry, t as transaction } from '../shared/ledger.BGgIPMu-.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.BVNtjljl.mjs';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import '@develit-io/general-codes';
|
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.C7cMVCgk.cjs');
|
|
9
9
|
const drizzleOrm = require('drizzle-orm');
|
|
10
|
-
const
|
|
10
|
+
const updateTransactionStatus = require('../shared/ledger.Dfi_K5W2.cjs');
|
|
11
11
|
require('@develit-io/general-codes');
|
|
12
12
|
require('drizzle-orm/sqlite-core');
|
|
13
13
|
require('zod');
|
|
@@ -315,7 +315,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
315
315
|
return this.handleAction(
|
|
316
316
|
{
|
|
317
317
|
data: input,
|
|
318
|
-
schema:
|
|
318
|
+
schema: updateTransactionStatus.createTransactionInputSchema
|
|
319
319
|
},
|
|
320
320
|
{ successMessage: "Transaction successfully created." },
|
|
321
321
|
async (params) => {
|
|
@@ -397,7 +397,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
397
397
|
}
|
|
398
398
|
async matchTransaction(input) {
|
|
399
399
|
return this.handleAction(
|
|
400
|
-
{ data: input, schema:
|
|
400
|
+
{ data: input, schema: updateTransactionStatus.matchTransactionInputSchema },
|
|
401
401
|
{ successMessage: "Transaction successfully matched." },
|
|
402
402
|
async (params) => {
|
|
403
403
|
const { transactionId, completedAt, paymentId } = params;
|
|
@@ -444,7 +444,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
444
444
|
}
|
|
445
445
|
async failTransaction(input) {
|
|
446
446
|
return this.handleAction(
|
|
447
|
-
{ data: input, schema:
|
|
447
|
+
{ data: input, schema: updateTransactionStatus.failTransactionInputSchema },
|
|
448
448
|
{ successMessage: "Transaction successfully failed." },
|
|
449
449
|
async (params) => {
|
|
450
450
|
const { transactionId, completedAt, statusReason } = params;
|
|
@@ -493,7 +493,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
493
493
|
}
|
|
494
494
|
async cancelTransaction(input) {
|
|
495
495
|
return this.handleAction(
|
|
496
|
-
{ data: input, schema:
|
|
496
|
+
{ data: input, schema: updateTransactionStatus.cancelTransactionInputSchema },
|
|
497
497
|
{ successMessage: "Transaction successfully cancelled." },
|
|
498
498
|
async ({ transactionId, statusReason }) => {
|
|
499
499
|
const existingTransaction = await getTransactionByIdQuery(
|
|
@@ -540,7 +540,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
540
540
|
}
|
|
541
541
|
async getTransactionById(input) {
|
|
542
542
|
return this.handleAction(
|
|
543
|
-
{ data: input, schema:
|
|
543
|
+
{ data: input, schema: updateTransactionStatus.getTransactionByIdInputSchema },
|
|
544
544
|
{ successMessage: "Transaction successfully obtained." },
|
|
545
545
|
async (params) => {
|
|
546
546
|
const { id } = params;
|
|
@@ -551,7 +551,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
551
551
|
}
|
|
552
552
|
async getTransactionsByReferenceId(input) {
|
|
553
553
|
return this.handleAction(
|
|
554
|
-
{ data: input, schema:
|
|
554
|
+
{ data: input, schema: updateTransactionStatus.getTransactionsByReferenceIdInputSchema },
|
|
555
555
|
{ successMessage: "Transaction successfully obtained." },
|
|
556
556
|
async (params) => {
|
|
557
557
|
const { referenceType, referenceId } = params;
|
|
@@ -566,7 +566,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
566
566
|
}
|
|
567
567
|
async getTransactions(input) {
|
|
568
568
|
return this.handleAction(
|
|
569
|
-
{ data: input, schema:
|
|
569
|
+
{ data: input, schema: updateTransactionStatus.getTransactionsInputSchema },
|
|
570
570
|
{ successMessage: "Transactions fetched successfully" },
|
|
571
571
|
async (pagination) => {
|
|
572
572
|
const { transactions, totalCount } = await getTransactionsWithPaginationQuery({
|
|
@@ -579,7 +579,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
579
579
|
}
|
|
580
580
|
async createAccount(input) {
|
|
581
581
|
return this.handleAction(
|
|
582
|
-
{ data: input, schema:
|
|
582
|
+
{ data: input, schema: updateTransactionStatus.createAccountInputSchema },
|
|
583
583
|
{ successMessage: "Account successfully created." },
|
|
584
584
|
async (params) => {
|
|
585
585
|
const { identifier, ...accountData } = params;
|
|
@@ -619,7 +619,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
619
619
|
}
|
|
620
620
|
async updateAccount(input) {
|
|
621
621
|
return this.handleAction(
|
|
622
|
-
{ data: input, schema:
|
|
622
|
+
{ data: input, schema: updateTransactionStatus.updateAccountInputSchema },
|
|
623
623
|
{ successMessage: "Account successfully updated." },
|
|
624
624
|
async (params) => {
|
|
625
625
|
const { accountId, ...updateData } = params;
|
|
@@ -653,7 +653,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
653
653
|
}
|
|
654
654
|
async deleteAccount(input) {
|
|
655
655
|
return this.handleAction(
|
|
656
|
-
{ data: input, schema:
|
|
656
|
+
{ data: input, schema: updateTransactionStatus.deleteAccountInputSchema },
|
|
657
657
|
{ successMessage: "Account successfully deleted." },
|
|
658
658
|
async (params) => {
|
|
659
659
|
const { accountId } = params;
|
|
@@ -668,7 +668,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
668
668
|
}
|
|
669
669
|
async getAccount(input) {
|
|
670
670
|
return this.handleAction(
|
|
671
|
-
{ data: input, schema:
|
|
671
|
+
{ data: input, schema: updateTransactionStatus.getAccountInputSchema },
|
|
672
672
|
{ successMessage: "Account successfully retrieved." },
|
|
673
673
|
async (params) => {
|
|
674
674
|
const { accountId } = params;
|
|
@@ -686,7 +686,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
686
686
|
}
|
|
687
687
|
async getAccountsByOwner(input) {
|
|
688
688
|
return this.handleAction(
|
|
689
|
-
{ data: input, schema:
|
|
689
|
+
{ data: input, schema: updateTransactionStatus.getAccountsByOwnerInputSchema },
|
|
690
690
|
{ successMessage: "Accounts successfully retrieved." },
|
|
691
691
|
async (params) => {
|
|
692
692
|
const { ownerId } = params;
|
|
@@ -697,7 +697,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
697
697
|
}
|
|
698
698
|
async listAccounts(input) {
|
|
699
699
|
return this.handleAction(
|
|
700
|
-
{ data: input, schema:
|
|
700
|
+
{ data: input, schema: updateTransactionStatus.listAccountsInputSchema },
|
|
701
701
|
{ successMessage: "Accounts successfully listed." },
|
|
702
702
|
async (params) => {
|
|
703
703
|
const {
|
|
@@ -725,7 +725,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
725
725
|
}
|
|
726
726
|
async getAccountIdentifierById(input) {
|
|
727
727
|
return this.handleAction(
|
|
728
|
-
{ data: input, schema:
|
|
728
|
+
{ data: input, schema: updateTransactionStatus.getAccountIdentifierInputSchema },
|
|
729
729
|
{ successMessage: "Account identifier successfully retrieved." },
|
|
730
730
|
async (params) => {
|
|
731
731
|
const { identifierId } = params;
|
|
@@ -746,7 +746,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
746
746
|
}
|
|
747
747
|
async listAccountIdentifiers(input) {
|
|
748
748
|
return this.handleAction(
|
|
749
|
-
{ data: input, schema:
|
|
749
|
+
{ data: input, schema: updateTransactionStatus.listAccountIdentifiersInputSchema },
|
|
750
750
|
{ successMessage: "Account identifiers successfully listed." },
|
|
751
751
|
async (params) => {
|
|
752
752
|
const { accountId } = params;
|
|
@@ -760,7 +760,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
760
760
|
}
|
|
761
761
|
async findAccountByIdentifier(input) {
|
|
762
762
|
return this.handleAction(
|
|
763
|
-
{ data: input, schema:
|
|
763
|
+
{ data: input, schema: updateTransactionStatus.findAccountByIdentifierInputSchema },
|
|
764
764
|
{ successMessage: "Account search completed." },
|
|
765
765
|
async (params) => {
|
|
766
766
|
const searchParams = params;
|
|
@@ -774,7 +774,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
774
774
|
}
|
|
775
775
|
async getAccountBalance(input) {
|
|
776
776
|
return this.handleAction(
|
|
777
|
-
{ data: input, schema:
|
|
777
|
+
{ data: input, schema: updateTransactionStatus.getAccountBalanceInputSchema },
|
|
778
778
|
{ successMessage: "Balance successfully obtained." },
|
|
779
779
|
async (params) => {
|
|
780
780
|
const { accountId } = params;
|
|
@@ -789,7 +789,7 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
789
789
|
}
|
|
790
790
|
async updateTransactionConfirmationSentAt(input) {
|
|
791
791
|
return this.handleAction(
|
|
792
|
-
{ data: input, schema:
|
|
792
|
+
{ data: input, schema: updateTransactionStatus.updateTransactionConfirmationSentAtInputSchema },
|
|
793
793
|
{ successMessage: "Confirmation email sent successfully" },
|
|
794
794
|
async ({ transactionId }) => {
|
|
795
795
|
const { command: transactionCommand } = updateTransactionConfirmationSentAtCommand({
|
|
@@ -801,6 +801,56 @@ let LedgerServiceBase = class extends backendSdk.develitWorker(
|
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
803
|
}
|
|
804
|
+
async updateTransactionStatus(input) {
|
|
805
|
+
return this.handleAction(
|
|
806
|
+
{ data: input, schema: updateTransactionStatus.updateTransactionStatusInputSchema },
|
|
807
|
+
{ successMessage: "Transaction status successfully updated." },
|
|
808
|
+
async (params) => {
|
|
809
|
+
const { transactionId, status, statusReason, paymentId, completedAt } = params;
|
|
810
|
+
const existingTransaction = await getTransactionByIdQuery(
|
|
811
|
+
this.db,
|
|
812
|
+
transactionId
|
|
813
|
+
);
|
|
814
|
+
if (!existingTransaction) {
|
|
815
|
+
throw backendSdk.createInternalError(null, {
|
|
816
|
+
message: "Transaction not found",
|
|
817
|
+
status: 404,
|
|
818
|
+
code: "NOT_FOUND"
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
const { command } = updateTransactionStatusCommand(this.db, {
|
|
822
|
+
transactionId,
|
|
823
|
+
status,
|
|
824
|
+
statusReason,
|
|
825
|
+
paymentId,
|
|
826
|
+
completedAt
|
|
827
|
+
});
|
|
828
|
+
const [updatedTransaction] = await this.db.batch([command]);
|
|
829
|
+
if (!updatedTransaction) {
|
|
830
|
+
throw backendSdk.createInternalError(null, {
|
|
831
|
+
message: "Failed to update transaction",
|
|
832
|
+
status: 500,
|
|
833
|
+
code: "INTERNAL_ERROR"
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
const transaction = backendSdk.first(updatedTransaction);
|
|
837
|
+
await this.pushToQueue(
|
|
838
|
+
this.env.QUEUE_BUS_QUEUE,
|
|
839
|
+
{
|
|
840
|
+
eventType: "LEDGER_TRANSACTION",
|
|
841
|
+
eventSignal: "updated",
|
|
842
|
+
ledgerTransaction: transaction,
|
|
843
|
+
metadata: {
|
|
844
|
+
correlationId: backendSdk.uuidv4(),
|
|
845
|
+
entityId: transaction.id,
|
|
846
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
);
|
|
850
|
+
return transaction;
|
|
851
|
+
}
|
|
852
|
+
);
|
|
853
|
+
}
|
|
804
854
|
};
|
|
805
855
|
__decorateClass([
|
|
806
856
|
backendSdk.action("create-transaction")
|
|
@@ -856,6 +906,9 @@ __decorateClass([
|
|
|
856
906
|
__decorateClass([
|
|
857
907
|
backendSdk.action("update-transaction-confirmation-sent-at")
|
|
858
908
|
], LedgerServiceBase.prototype, "updateTransactionConfirmationSentAt", 1);
|
|
909
|
+
__decorateClass([
|
|
910
|
+
backendSdk.action("update-transaction-status")
|
|
911
|
+
], LedgerServiceBase.prototype, "updateTransactionStatus", 1);
|
|
859
912
|
LedgerServiceBase = __decorateClass([
|
|
860
913
|
backendSdk.service("ledger")
|
|
861
914
|
], LedgerServiceBase);
|
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, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, d as CancelTransactionInput, e as CancelTransactionOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, k as CreateAccountInput, l as CreateAccountOutput, U as UpdateAccountInput, m as UpdateAccountOutput, D as DeleteAccountInput, n as DeleteAccountOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, L as ListAccountsInput, s as ListAccountsOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput } from '../shared/ledger.
|
|
5
|
+
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, d as CancelTransactionInput, e as CancelTransactionOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, k as CreateAccountInput, l as CreateAccountOutput, U as UpdateAccountInput, m as UpdateAccountOutput, D as DeleteAccountInput, n as DeleteAccountOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, L as ListAccountsInput, s as ListAccountsOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput, I as UpdateTransactionStatusInput, J as UpdateTransactionStatusOutput } from '../shared/ledger.D7boja6V.cjs';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../shared/ledger.
|
|
7
|
+
import '../shared/ledger.CLVyCzRb.cjs';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import '@develit-io/general-codes';
|
|
@@ -31,6 +31,7 @@ declare class LedgerServiceBase extends LedgerServiceBase_base {
|
|
|
31
31
|
findAccountByIdentifier(input: FindAccountByIdentifierInput): Promise<IRPCResponse<FindAccountByIdentifierOutput>>;
|
|
32
32
|
getAccountBalance(input: GetAccountBalanceInput): Promise<IRPCResponse<GetAccountBalanceOutput>>;
|
|
33
33
|
updateTransactionConfirmationSentAt(input: UpdateTransactionConfirmationSentAtInput): Promise<IRPCResponse<UpdateTransactionConfirmationSentAtOutput>>;
|
|
34
|
+
updateTransactionStatus(input: UpdateTransactionStatusInput): Promise<IRPCResponse<UpdateTransactionStatusOutput>>;
|
|
34
35
|
}
|
|
35
36
|
declare function defineLedgerService(): new (ctx: ExecutionContext, env: LedgerEnv) => LedgerServiceBase;
|
|
36
37
|
|
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, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, d as CancelTransactionInput, e as CancelTransactionOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, k as CreateAccountInput, l as CreateAccountOutput, U as UpdateAccountInput, m as UpdateAccountOutput, D as DeleteAccountInput, n as DeleteAccountOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, L as ListAccountsInput, s as ListAccountsOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput } from '../shared/ledger.
|
|
5
|
+
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, d as CancelTransactionInput, e as CancelTransactionOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, k as CreateAccountInput, l as CreateAccountOutput, U as UpdateAccountInput, m as UpdateAccountOutput, D as DeleteAccountInput, n as DeleteAccountOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, L as ListAccountsInput, s as ListAccountsOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput, I as UpdateTransactionStatusInput, J as UpdateTransactionStatusOutput } from '../shared/ledger.D_uHoy5E.mjs';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../shared/ledger.
|
|
7
|
+
import '../shared/ledger.CLVyCzRb.mjs';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import '@develit-io/general-codes';
|
|
@@ -31,6 +31,7 @@ declare class LedgerServiceBase extends LedgerServiceBase_base {
|
|
|
31
31
|
findAccountByIdentifier(input: FindAccountByIdentifierInput): Promise<IRPCResponse<FindAccountByIdentifierOutput>>;
|
|
32
32
|
getAccountBalance(input: GetAccountBalanceInput): Promise<IRPCResponse<GetAccountBalanceOutput>>;
|
|
33
33
|
updateTransactionConfirmationSentAt(input: UpdateTransactionConfirmationSentAtInput): Promise<IRPCResponse<UpdateTransactionConfirmationSentAtOutput>>;
|
|
34
|
+
updateTransactionStatus(input: UpdateTransactionStatusInput): Promise<IRPCResponse<UpdateTransactionStatusOutput>>;
|
|
34
35
|
}
|
|
35
36
|
declare function defineLedgerService(): new (ctx: ExecutionContext, env: LedgerEnv) => LedgerServiceBase;
|
|
36
37
|
|
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, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, d as CancelTransactionInput, e as CancelTransactionOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, k as CreateAccountInput, l as CreateAccountOutput, U as UpdateAccountInput, m as UpdateAccountOutput, D as DeleteAccountInput, n as DeleteAccountOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, L as ListAccountsInput, s as ListAccountsOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput } from '../shared/ledger.
|
|
5
|
+
import { t as tables, C as CreateTransactionInput, a as CreateTransactionOutput, M as MatchTransactionInput, b as MatchTransactionOutput, F as FailTransactionInput, c as FailTransactionOutput, d as CancelTransactionInput, e as CancelTransactionOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, k as CreateAccountInput, l as CreateAccountOutput, U as UpdateAccountInput, m as UpdateAccountOutput, D as DeleteAccountInput, n as DeleteAccountOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, L as ListAccountsInput, s as ListAccountsOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput, I as UpdateTransactionStatusInput, J as UpdateTransactionStatusOutput } from '../shared/ledger.CDdw0Nyc.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../shared/ledger.
|
|
7
|
+
import '../shared/ledger.CLVyCzRb.js';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import 'drizzle-orm/sqlite-core';
|
|
10
10
|
import '@develit-io/general-codes';
|
|
@@ -31,6 +31,7 @@ declare class LedgerServiceBase extends LedgerServiceBase_base {
|
|
|
31
31
|
findAccountByIdentifier(input: FindAccountByIdentifierInput): Promise<IRPCResponse<FindAccountByIdentifierOutput>>;
|
|
32
32
|
getAccountBalance(input: GetAccountBalanceInput): Promise<IRPCResponse<GetAccountBalanceOutput>>;
|
|
33
33
|
updateTransactionConfirmationSentAt(input: UpdateTransactionConfirmationSentAtInput): Promise<IRPCResponse<UpdateTransactionConfirmationSentAtOutput>>;
|
|
34
|
+
updateTransactionStatus(input: UpdateTransactionStatusInput): Promise<IRPCResponse<UpdateTransactionStatusOutput>>;
|
|
34
35
|
}
|
|
35
36
|
declare function defineLedgerService(): new (ctx: ExecutionContext, env: LedgerEnv) => LedgerServiceBase;
|
|
36
37
|
|
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.BGgIPMu-.mjs';
|
|
5
5
|
import { eq, and, inArray, or, count, gte, lte, sql, asc, desc } from 'drizzle-orm';
|
|
6
|
-
import { j as createTransactionInputSchema, w as matchTransactionInputSchema, l as failTransactionInputSchema, h as cancelTransactionInputSchema, r as getTransactionByIdInputSchema, s as getTransactionsByReferenceIdInputSchema, t as getTransactionsInputSchema, i as createAccountInputSchema, x as updateAccountInputSchema, k as deleteAccountInputSchema, p as getAccountInputSchema, q as getAccountsByOwnerInputSchema, v as listAccountsInputSchema, o as getAccountIdentifierInputSchema, u as listAccountIdentifiersInputSchema, m as findAccountByIdentifierInputSchema, n as getAccountBalanceInputSchema, y as updateTransactionConfirmationSentAtInputSchema } from '../shared/ledger.
|
|
6
|
+
import { j as createTransactionInputSchema, w as matchTransactionInputSchema, l as failTransactionInputSchema, h as cancelTransactionInputSchema, r as getTransactionByIdInputSchema, s as getTransactionsByReferenceIdInputSchema, t as getTransactionsInputSchema, i as createAccountInputSchema, x as updateAccountInputSchema, k as deleteAccountInputSchema, p as getAccountInputSchema, q as getAccountsByOwnerInputSchema, v as listAccountsInputSchema, o as getAccountIdentifierInputSchema, u as listAccountIdentifiersInputSchema, m as findAccountByIdentifierInputSchema, n as getAccountBalanceInputSchema, y as updateTransactionConfirmationSentAtInputSchema, z as updateTransactionStatusInputSchema } from '../shared/ledger.BVNtjljl.mjs';
|
|
7
7
|
import '@develit-io/general-codes';
|
|
8
8
|
import 'drizzle-orm/sqlite-core';
|
|
9
9
|
import 'zod';
|
|
@@ -797,6 +797,56 @@ let LedgerServiceBase = class extends develitWorker(
|
|
|
797
797
|
}
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
|
+
async updateTransactionStatus(input) {
|
|
801
|
+
return this.handleAction(
|
|
802
|
+
{ data: input, schema: updateTransactionStatusInputSchema },
|
|
803
|
+
{ successMessage: "Transaction status successfully updated." },
|
|
804
|
+
async (params) => {
|
|
805
|
+
const { transactionId, status, statusReason, paymentId, completedAt } = params;
|
|
806
|
+
const existingTransaction = await getTransactionByIdQuery(
|
|
807
|
+
this.db,
|
|
808
|
+
transactionId
|
|
809
|
+
);
|
|
810
|
+
if (!existingTransaction) {
|
|
811
|
+
throw createInternalError(null, {
|
|
812
|
+
message: "Transaction not found",
|
|
813
|
+
status: 404,
|
|
814
|
+
code: "NOT_FOUND"
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
const { command } = updateTransactionStatusCommand(this.db, {
|
|
818
|
+
transactionId,
|
|
819
|
+
status,
|
|
820
|
+
statusReason,
|
|
821
|
+
paymentId,
|
|
822
|
+
completedAt
|
|
823
|
+
});
|
|
824
|
+
const [updatedTransaction] = await this.db.batch([command]);
|
|
825
|
+
if (!updatedTransaction) {
|
|
826
|
+
throw createInternalError(null, {
|
|
827
|
+
message: "Failed to update transaction",
|
|
828
|
+
status: 500,
|
|
829
|
+
code: "INTERNAL_ERROR"
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
const transaction = first(updatedTransaction);
|
|
833
|
+
await this.pushToQueue(
|
|
834
|
+
this.env.QUEUE_BUS_QUEUE,
|
|
835
|
+
{
|
|
836
|
+
eventType: "LEDGER_TRANSACTION",
|
|
837
|
+
eventSignal: "updated",
|
|
838
|
+
ledgerTransaction: transaction,
|
|
839
|
+
metadata: {
|
|
840
|
+
correlationId: uuidv4(),
|
|
841
|
+
entityId: transaction.id,
|
|
842
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
);
|
|
846
|
+
return transaction;
|
|
847
|
+
}
|
|
848
|
+
);
|
|
849
|
+
}
|
|
800
850
|
};
|
|
801
851
|
__decorateClass([
|
|
802
852
|
action("create-transaction")
|
|
@@ -852,6 +902,9 @@ __decorateClass([
|
|
|
852
902
|
__decorateClass([
|
|
853
903
|
action("update-transaction-confirmation-sent-at")
|
|
854
904
|
], LedgerServiceBase.prototype, "updateTransactionConfirmationSentAt", 1);
|
|
905
|
+
__decorateClass([
|
|
906
|
+
action("update-transaction-status")
|
|
907
|
+
], LedgerServiceBase.prototype, "updateTransactionStatus", 1);
|
|
855
908
|
LedgerServiceBase = __decorateClass([
|
|
856
909
|
service("ledger")
|
|
857
910
|
], LedgerServiceBase);
|
|
@@ -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, g as TRANSACTION_TYPES, R as REFERENCE_TYPES } from './ledger.
|
|
4
|
+
import { T as TRANSACTION_STATUSES, g as TRANSACTION_TYPES, R as REFERENCE_TYPES } from './ledger.BVNtjljl.mjs';
|
|
5
5
|
import '@develit-io/general-codes';
|
|
6
6
|
|
|
7
7
|
const account = sqliteTable("account", {
|
|
@@ -82,15 +82,17 @@ const TRANSACTION_TYPES = [
|
|
|
82
82
|
// manual correction
|
|
83
83
|
"TRANSFER",
|
|
84
84
|
// internal transfer between accounts
|
|
85
|
-
"COLLATERAL"
|
|
85
|
+
"COLLATERAL",
|
|
86
86
|
// forward collateral payment from client
|
|
87
|
+
"REFUND"
|
|
87
88
|
];
|
|
88
89
|
const REFERENCE_TYPES = [
|
|
89
90
|
"PAYMENT",
|
|
90
91
|
"EXCHANGE",
|
|
91
92
|
"ORDER",
|
|
92
93
|
"INTERNAL-TRANSFER",
|
|
93
|
-
"FORWARD"
|
|
94
|
+
"FORWARD",
|
|
95
|
+
"TRANSACTION"
|
|
94
96
|
];
|
|
95
97
|
const PAYMENT_CHARGE_TYPES = ["SHA", "OUR", "BEN"];
|
|
96
98
|
const PAYMENT_TYPES = ["DOMESTIC", "SEPA", "SWIFT", "UNKNOWN"];
|
|
@@ -309,4 +311,12 @@ const updateTransactionConfirmationSentAtInputSchema = z.object({
|
|
|
309
311
|
transactionId: z.uuid()
|
|
310
312
|
});
|
|
311
313
|
|
|
312
|
-
|
|
314
|
+
const updateTransactionStatusInputSchema = z.object({
|
|
315
|
+
transactionId: z.uuid(),
|
|
316
|
+
status: z.enum(TRANSACTION_STATUSES),
|
|
317
|
+
statusReason: z.string().optional(),
|
|
318
|
+
paymentId: z.string().optional(),
|
|
319
|
+
completedAt: z.date().optional()
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
export { ACCOUNT_TYPES as A, BALANCE_STRATEGIES as B, COUNTRY_CODES as C, ENTRY_STATUSES as E, IDENTIFIER_KINDS as I, PAYMENT_CHARGE_TYPES as P, REFERENCE_TYPES as R, TRANSACTION_STATUSES as T, ALLOWED_TRANSACTION_FILTERS as a, ASSET_TYPES as b, BATCH_STATUSES as c, PAYMENT_DIRECTIONS as d, PAYMENT_STATUSES as e, PAYMENT_TYPES as f, TRANSACTION_TYPES as g, cancelTransactionInputSchema as h, createAccountInputSchema as i, createTransactionInputSchema as j, deleteAccountInputSchema as k, failTransactionInputSchema as l, findAccountByIdentifierInputSchema as m, getAccountBalanceInputSchema as n, getAccountIdentifierInputSchema as o, getAccountInputSchema as p, getAccountsByOwnerInputSchema as q, getTransactionByIdInputSchema as r, getTransactionsByReferenceIdInputSchema as s, getTransactionsInputSchema as t, listAccountIdentifiersInputSchema as u, listAccountsInputSchema as v, matchTransactionInputSchema as w, updateAccountInputSchema as x, updateTransactionConfirmationSentAtInputSchema as y, updateTransactionStatusInputSchema as z };
|
|
@@ -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
|
|
6
|
+
const updateTransactionStatus = require('./ledger.Dfi_K5W2.cjs');
|
|
7
7
|
require('@develit-io/general-codes');
|
|
8
8
|
|
|
9
9
|
const account = sqliteCore.sqliteTable("account", {
|
|
@@ -80,14 +80,14 @@ const transaction = sqliteCore.sqliteTable("transaction", {
|
|
|
80
80
|
correlationId: sqliteCore.text("correlation_id").notNull(),
|
|
81
81
|
// Unique ID for the transaction, used for correlation
|
|
82
82
|
// Business context
|
|
83
|
-
referenceType: sqliteCore.text("reference_type", { enum:
|
|
83
|
+
referenceType: sqliteCore.text("reference_type", { enum: updateTransactionStatus.REFERENCE_TYPES }).$type().notNull(),
|
|
84
84
|
referenceId: sqliteCore.text("reference_id"),
|
|
85
85
|
// business transaction ID
|
|
86
|
-
type: sqliteCore.text("type", { enum:
|
|
86
|
+
type: sqliteCore.text("type", { enum: updateTransactionStatus.TRANSACTION_TYPES }).$type().notNull(),
|
|
87
87
|
description: sqliteCore.text("description"),
|
|
88
88
|
completedAt: sqliteCore.integer("completed_at", { mode: "timestamp_ms" }),
|
|
89
89
|
confirmationSentAt: sqliteCore.integer("confirmation_sent_at", { mode: "timestamp_ms" }),
|
|
90
|
-
status: sqliteCore.text("status", { enum:
|
|
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
93
|
metadata: sqliteCore.text("metadata", { mode: "json" }).$type().notNull(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { D as schema } from './ledger.
|
|
2
|
+
import { D as schema } from './ledger.CLVyCzRb.js';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -415,6 +415,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
415
415
|
ORDER: "ORDER";
|
|
416
416
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
417
417
|
FORWARD: "FORWARD";
|
|
418
|
+
TRANSACTION: "TRANSACTION";
|
|
418
419
|
}>;
|
|
419
420
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
420
421
|
type: z.ZodEnum<{
|
|
@@ -427,6 +428,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
427
428
|
ADJUSTMENT: "ADJUSTMENT";
|
|
428
429
|
TRANSFER: "TRANSFER";
|
|
429
430
|
COLLATERAL: "COLLATERAL";
|
|
431
|
+
REFUND: "REFUND";
|
|
430
432
|
}>;
|
|
431
433
|
description: z.ZodOptional<z.ZodString>;
|
|
432
434
|
paymentId: z.ZodOptional<z.ZodString>;
|
|
@@ -1382,6 +1384,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1382
1384
|
ORDER: "ORDER";
|
|
1383
1385
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1384
1386
|
FORWARD: "FORWARD";
|
|
1387
|
+
TRANSACTION: "TRANSACTION";
|
|
1385
1388
|
}>>;
|
|
1386
1389
|
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1387
1390
|
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1394,6 +1397,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1394
1397
|
ADJUSTMENT: "ADJUSTMENT";
|
|
1395
1398
|
TRANSFER: "TRANSFER";
|
|
1396
1399
|
COLLATERAL: "COLLATERAL";
|
|
1400
|
+
REFUND: "REFUND";
|
|
1397
1401
|
}>>;
|
|
1398
1402
|
filterTransactionDescription: z.ZodOptional<z.ZodString>;
|
|
1399
1403
|
filterTransactionDateFrom: z.ZodOptional<z.ZodDate>;
|
|
@@ -1428,6 +1432,7 @@ declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
|
1428
1432
|
ORDER: "ORDER";
|
|
1429
1433
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1430
1434
|
FORWARD: "FORWARD";
|
|
1435
|
+
TRANSACTION: "TRANSACTION";
|
|
1431
1436
|
}>;
|
|
1432
1437
|
referenceId: z.ZodUUID;
|
|
1433
1438
|
}, z.core.$strip>;
|
|
@@ -1646,7 +1651,31 @@ interface UpdateTransactionConfirmationSentAtInput extends z.input<typeof update
|
|
|
1646
1651
|
}
|
|
1647
1652
|
type UpdateTransactionConfirmationSentAtOutput = void;
|
|
1648
1653
|
|
|
1654
|
+
declare const updateTransactionStatusInputSchema: z.ZodObject<{
|
|
1655
|
+
transactionId: z.ZodUUID;
|
|
1656
|
+
status: z.ZodEnum<{
|
|
1657
|
+
FAILED: "FAILED";
|
|
1658
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1659
|
+
WAITING_FOR_COLLATERAL: "WAITING_FOR_COLLATERAL";
|
|
1660
|
+
COLLATERAL_PAID: "COLLATERAL_PAID";
|
|
1661
|
+
PAUSED: "PAUSED";
|
|
1662
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1663
|
+
MATCHED: "MATCHED";
|
|
1664
|
+
RETURNING: "RETURNING";
|
|
1665
|
+
RETURNED: "RETURNED";
|
|
1666
|
+
CANCELLED: "CANCELLED";
|
|
1667
|
+
SETTLED: "SETTLED";
|
|
1668
|
+
}>;
|
|
1669
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
1670
|
+
paymentId: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1672
|
+
}, z.core.$strip>;
|
|
1673
|
+
interface UpdateTransactionStatusInput extends z.infer<typeof updateTransactionStatusInputSchema> {
|
|
1674
|
+
}
|
|
1675
|
+
interface UpdateTransactionStatusOutput extends TransactionSelectType {
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1649
1678
|
declare const tables: typeof schema;
|
|
1650
1679
|
|
|
1651
|
-
export {
|
|
1652
|
-
export type { GetAccountBalanceInput as A, GetAccountBalanceOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, UpdateTransactionConfirmationSentAtInput as E, FailTransactionInput as F, GetTransactionByIdInput as G, UpdateTransactionConfirmationSentAtOutput as H,
|
|
1680
|
+
export { deleteAccountInputSchema as $, cancelTransactionInputSchema as Y, createAccountInputSchema as Z, createTransactionInputSchema as _, failTransactionInputSchema as a0, findAccountByIdentifierInputSchema as a1, getAccountBalanceInputSchema as a2, getAccountIdentifierInputSchema as a3, getAccountInputSchema as a4, getAccountsByOwnerInputSchema as a5, getTransactionByIdInputSchema as a6, getTransactionsByReferenceIdInputSchema as a7, getTransactionsInputSchema as a8, listAccountIdentifiersInputSchema as a9, listAccountsInputSchema as aa, matchTransactionInputSchema as ab, updateAccountInputSchema as ac, updateTransactionConfirmationSentAtInputSchema as ad, updateTransactionStatusInputSchema as ae, tables as t };
|
|
1681
|
+
export type { GetAccountBalanceInput as A, GetAccountBalanceOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, UpdateTransactionConfirmationSentAtInput as E, FailTransactionInput as F, GetTransactionByIdInput as G, UpdateTransactionConfirmationSentAtOutput as H, UpdateTransactionStatusInput as I, UpdateTransactionStatusOutput as J, AccountIdentifierInsertType as K, ListAccountsInput as L, MatchTransactionInput as M, AccountIdentifierMappingInsertType as N, AccountIdentifierMappingSelectType as O, AccountIdentifierSelectType as P, AccountInsertType as Q, AccountSelectType as R, AccountWithIdentifiersSelectType as S, TransactionSelectType as T, UpdateAccountInput as U, IncludeRelation as V, InferResultType as W, TransactionInsertType as X, CreateTransactionOutput as a, MatchTransactionOutput as b, FailTransactionOutput as c, CancelTransactionInput as d, CancelTransactionOutput as e, GetTransactionByIdOutput as f, GetTransactionsByIdReferenceInput as g, GetTransactionsByReferenceIdOutput as h, GetTransactionsInput as i, GetTransactionsOutput as j, CreateAccountInput as k, CreateAccountOutput as l, UpdateAccountOutput as m, DeleteAccountOutput as n, GetAccountInput as o, GetAccountOutput as p, GetAccountsByOwnerInput as q, GetAccountsByOwnerOutput as r, ListAccountsOutput as s, GetAccountIdentifierInput as u, GetAccountIdentifierOutput as v, ListAccountIdentifiersInput as w, ListAccountIdentifiersOutput as x, FindAccountByIdentifierInput as y, FindAccountByIdentifierOutput as z };
|
|
@@ -466,9 +466,9 @@ declare const ENTRY_STATUSES: readonly ["PENDING", "REALIZED", "FAILED", "CANCEL
|
|
|
466
466
|
type EntryStatus = (typeof ENTRY_STATUSES)[number];
|
|
467
467
|
declare const TRANSACTION_STATUSES: readonly ["WAITING_FOR_PAYMENT", "WAITING_FOR_COLLATERAL", "COLLATERAL_PAID", "PAUSED", "WAITING_FOR_MANUAL_PROCESSING", "MATCHED", "RETURNING", "RETURNED", "FAILED", "CANCELLED", "SETTLED"];
|
|
468
468
|
type TransactionStatus = (typeof TRANSACTION_STATUSES)[number];
|
|
469
|
-
declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL"];
|
|
469
|
+
declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL", "REFUND"];
|
|
470
470
|
type TransactionType = (typeof TRANSACTION_TYPES)[number];
|
|
471
|
-
declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD"];
|
|
471
|
+
declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD", "TRANSACTION"];
|
|
472
472
|
type ReferenceType = (typeof REFERENCE_TYPES)[number];
|
|
473
473
|
declare const PAYMENT_CHARGE_TYPES: readonly ["SHA", "OUR", "BEN"];
|
|
474
474
|
type PaymentChargeType = (typeof PAYMENT_CHARGE_TYPES)[number];
|
|
@@ -813,20 +813,20 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
813
813
|
tableName: "transaction";
|
|
814
814
|
dataType: "string";
|
|
815
815
|
columnType: "SQLiteText";
|
|
816
|
-
data: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD";
|
|
816
|
+
data: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD" | "TRANSACTION";
|
|
817
817
|
driverParam: string;
|
|
818
818
|
notNull: true;
|
|
819
819
|
hasDefault: false;
|
|
820
820
|
isPrimaryKey: false;
|
|
821
821
|
isAutoincrement: false;
|
|
822
822
|
hasRuntimeDefault: false;
|
|
823
|
-
enumValues: ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD"];
|
|
823
|
+
enumValues: ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD", "TRANSACTION"];
|
|
824
824
|
baseColumn: never;
|
|
825
825
|
identity: undefined;
|
|
826
826
|
generated: undefined;
|
|
827
827
|
}, {}, {
|
|
828
828
|
length: number | undefined;
|
|
829
|
-
$type: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD";
|
|
829
|
+
$type: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD" | "TRANSACTION";
|
|
830
830
|
}>;
|
|
831
831
|
referenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
832
832
|
name: "reference_id";
|
|
@@ -852,20 +852,20 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
852
852
|
tableName: "transaction";
|
|
853
853
|
dataType: "string";
|
|
854
854
|
columnType: "SQLiteText";
|
|
855
|
-
data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL";
|
|
855
|
+
data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL" | "REFUND";
|
|
856
856
|
driverParam: string;
|
|
857
857
|
notNull: true;
|
|
858
858
|
hasDefault: false;
|
|
859
859
|
isPrimaryKey: false;
|
|
860
860
|
isAutoincrement: false;
|
|
861
861
|
hasRuntimeDefault: false;
|
|
862
|
-
enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL"];
|
|
862
|
+
enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL", "REFUND"];
|
|
863
863
|
baseColumn: never;
|
|
864
864
|
identity: undefined;
|
|
865
865
|
generated: undefined;
|
|
866
866
|
}, {}, {
|
|
867
867
|
length: number | undefined;
|
|
868
|
-
$type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL";
|
|
868
|
+
$type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL" | "REFUND";
|
|
869
869
|
}>;
|
|
870
870
|
description: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
871
871
|
name: "description";
|
|
@@ -466,9 +466,9 @@ declare const ENTRY_STATUSES: readonly ["PENDING", "REALIZED", "FAILED", "CANCEL
|
|
|
466
466
|
type EntryStatus = (typeof ENTRY_STATUSES)[number];
|
|
467
467
|
declare const TRANSACTION_STATUSES: readonly ["WAITING_FOR_PAYMENT", "WAITING_FOR_COLLATERAL", "COLLATERAL_PAID", "PAUSED", "WAITING_FOR_MANUAL_PROCESSING", "MATCHED", "RETURNING", "RETURNED", "FAILED", "CANCELLED", "SETTLED"];
|
|
468
468
|
type TransactionStatus = (typeof TRANSACTION_STATUSES)[number];
|
|
469
|
-
declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL"];
|
|
469
|
+
declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL", "REFUND"];
|
|
470
470
|
type TransactionType = (typeof TRANSACTION_TYPES)[number];
|
|
471
|
-
declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD"];
|
|
471
|
+
declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD", "TRANSACTION"];
|
|
472
472
|
type ReferenceType = (typeof REFERENCE_TYPES)[number];
|
|
473
473
|
declare const PAYMENT_CHARGE_TYPES: readonly ["SHA", "OUR", "BEN"];
|
|
474
474
|
type PaymentChargeType = (typeof PAYMENT_CHARGE_TYPES)[number];
|
|
@@ -813,20 +813,20 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
813
813
|
tableName: "transaction";
|
|
814
814
|
dataType: "string";
|
|
815
815
|
columnType: "SQLiteText";
|
|
816
|
-
data: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD";
|
|
816
|
+
data: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD" | "TRANSACTION";
|
|
817
817
|
driverParam: string;
|
|
818
818
|
notNull: true;
|
|
819
819
|
hasDefault: false;
|
|
820
820
|
isPrimaryKey: false;
|
|
821
821
|
isAutoincrement: false;
|
|
822
822
|
hasRuntimeDefault: false;
|
|
823
|
-
enumValues: ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD"];
|
|
823
|
+
enumValues: ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD", "TRANSACTION"];
|
|
824
824
|
baseColumn: never;
|
|
825
825
|
identity: undefined;
|
|
826
826
|
generated: undefined;
|
|
827
827
|
}, {}, {
|
|
828
828
|
length: number | undefined;
|
|
829
|
-
$type: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD";
|
|
829
|
+
$type: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD" | "TRANSACTION";
|
|
830
830
|
}>;
|
|
831
831
|
referenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
832
832
|
name: "reference_id";
|
|
@@ -852,20 +852,20 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
852
852
|
tableName: "transaction";
|
|
853
853
|
dataType: "string";
|
|
854
854
|
columnType: "SQLiteText";
|
|
855
|
-
data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL";
|
|
855
|
+
data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL" | "REFUND";
|
|
856
856
|
driverParam: string;
|
|
857
857
|
notNull: true;
|
|
858
858
|
hasDefault: false;
|
|
859
859
|
isPrimaryKey: false;
|
|
860
860
|
isAutoincrement: false;
|
|
861
861
|
hasRuntimeDefault: false;
|
|
862
|
-
enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL"];
|
|
862
|
+
enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL", "REFUND"];
|
|
863
863
|
baseColumn: never;
|
|
864
864
|
identity: undefined;
|
|
865
865
|
generated: undefined;
|
|
866
866
|
}, {}, {
|
|
867
867
|
length: number | undefined;
|
|
868
|
-
$type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL";
|
|
868
|
+
$type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL" | "REFUND";
|
|
869
869
|
}>;
|
|
870
870
|
description: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
871
871
|
name: "description";
|
|
@@ -466,9 +466,9 @@ declare const ENTRY_STATUSES: readonly ["PENDING", "REALIZED", "FAILED", "CANCEL
|
|
|
466
466
|
type EntryStatus = (typeof ENTRY_STATUSES)[number];
|
|
467
467
|
declare const TRANSACTION_STATUSES: readonly ["WAITING_FOR_PAYMENT", "WAITING_FOR_COLLATERAL", "COLLATERAL_PAID", "PAUSED", "WAITING_FOR_MANUAL_PROCESSING", "MATCHED", "RETURNING", "RETURNED", "FAILED", "CANCELLED", "SETTLED"];
|
|
468
468
|
type TransactionStatus = (typeof TRANSACTION_STATUSES)[number];
|
|
469
|
-
declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL"];
|
|
469
|
+
declare const TRANSACTION_TYPES: readonly ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL", "REFUND"];
|
|
470
470
|
type TransactionType = (typeof TRANSACTION_TYPES)[number];
|
|
471
|
-
declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD"];
|
|
471
|
+
declare const REFERENCE_TYPES: readonly ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD", "TRANSACTION"];
|
|
472
472
|
type ReferenceType = (typeof REFERENCE_TYPES)[number];
|
|
473
473
|
declare const PAYMENT_CHARGE_TYPES: readonly ["SHA", "OUR", "BEN"];
|
|
474
474
|
type PaymentChargeType = (typeof PAYMENT_CHARGE_TYPES)[number];
|
|
@@ -813,20 +813,20 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
813
813
|
tableName: "transaction";
|
|
814
814
|
dataType: "string";
|
|
815
815
|
columnType: "SQLiteText";
|
|
816
|
-
data: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD";
|
|
816
|
+
data: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD" | "TRANSACTION";
|
|
817
817
|
driverParam: string;
|
|
818
818
|
notNull: true;
|
|
819
819
|
hasDefault: false;
|
|
820
820
|
isPrimaryKey: false;
|
|
821
821
|
isAutoincrement: false;
|
|
822
822
|
hasRuntimeDefault: false;
|
|
823
|
-
enumValues: ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD"];
|
|
823
|
+
enumValues: ["PAYMENT", "EXCHANGE", "ORDER", "INTERNAL-TRANSFER", "FORWARD", "TRANSACTION"];
|
|
824
824
|
baseColumn: never;
|
|
825
825
|
identity: undefined;
|
|
826
826
|
generated: undefined;
|
|
827
827
|
}, {}, {
|
|
828
828
|
length: number | undefined;
|
|
829
|
-
$type: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD";
|
|
829
|
+
$type: "PAYMENT" | "EXCHANGE" | "ORDER" | "INTERNAL-TRANSFER" | "FORWARD" | "TRANSACTION";
|
|
830
830
|
}>;
|
|
831
831
|
referenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
832
832
|
name: "reference_id";
|
|
@@ -852,20 +852,20 @@ declare const transaction: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
852
852
|
tableName: "transaction";
|
|
853
853
|
dataType: "string";
|
|
854
854
|
columnType: "SQLiteText";
|
|
855
|
-
data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL";
|
|
855
|
+
data: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL" | "REFUND";
|
|
856
856
|
driverParam: string;
|
|
857
857
|
notNull: true;
|
|
858
858
|
hasDefault: false;
|
|
859
859
|
isPrimaryKey: false;
|
|
860
860
|
isAutoincrement: false;
|
|
861
861
|
hasRuntimeDefault: false;
|
|
862
|
-
enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL"];
|
|
862
|
+
enumValues: ["CLIENT_FUND_IN", "CLIENT_FUND_OUT", "PROVIDER_FUND_IN", "PROVIDER_FUND_OUT", "EXCHANGE", "UNMATCHED", "ADJUSTMENT", "TRANSFER", "COLLATERAL", "REFUND"];
|
|
863
863
|
baseColumn: never;
|
|
864
864
|
identity: undefined;
|
|
865
865
|
generated: undefined;
|
|
866
866
|
}, {}, {
|
|
867
867
|
length: number | undefined;
|
|
868
|
-
$type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL";
|
|
868
|
+
$type: "EXCHANGE" | "CLIENT_FUND_IN" | "CLIENT_FUND_OUT" | "PROVIDER_FUND_IN" | "PROVIDER_FUND_OUT" | "UNMATCHED" | "ADJUSTMENT" | "TRANSFER" | "COLLATERAL" | "REFUND";
|
|
869
869
|
}>;
|
|
870
870
|
description: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
871
871
|
name: "description";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { D as schema } from './ledger.
|
|
2
|
+
import { D as schema } from './ledger.CLVyCzRb.cjs';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -415,6 +415,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
415
415
|
ORDER: "ORDER";
|
|
416
416
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
417
417
|
FORWARD: "FORWARD";
|
|
418
|
+
TRANSACTION: "TRANSACTION";
|
|
418
419
|
}>;
|
|
419
420
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
420
421
|
type: z.ZodEnum<{
|
|
@@ -427,6 +428,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
427
428
|
ADJUSTMENT: "ADJUSTMENT";
|
|
428
429
|
TRANSFER: "TRANSFER";
|
|
429
430
|
COLLATERAL: "COLLATERAL";
|
|
431
|
+
REFUND: "REFUND";
|
|
430
432
|
}>;
|
|
431
433
|
description: z.ZodOptional<z.ZodString>;
|
|
432
434
|
paymentId: z.ZodOptional<z.ZodString>;
|
|
@@ -1382,6 +1384,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1382
1384
|
ORDER: "ORDER";
|
|
1383
1385
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1384
1386
|
FORWARD: "FORWARD";
|
|
1387
|
+
TRANSACTION: "TRANSACTION";
|
|
1385
1388
|
}>>;
|
|
1386
1389
|
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1387
1390
|
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1394,6 +1397,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1394
1397
|
ADJUSTMENT: "ADJUSTMENT";
|
|
1395
1398
|
TRANSFER: "TRANSFER";
|
|
1396
1399
|
COLLATERAL: "COLLATERAL";
|
|
1400
|
+
REFUND: "REFUND";
|
|
1397
1401
|
}>>;
|
|
1398
1402
|
filterTransactionDescription: z.ZodOptional<z.ZodString>;
|
|
1399
1403
|
filterTransactionDateFrom: z.ZodOptional<z.ZodDate>;
|
|
@@ -1428,6 +1432,7 @@ declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
|
1428
1432
|
ORDER: "ORDER";
|
|
1429
1433
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1430
1434
|
FORWARD: "FORWARD";
|
|
1435
|
+
TRANSACTION: "TRANSACTION";
|
|
1431
1436
|
}>;
|
|
1432
1437
|
referenceId: z.ZodUUID;
|
|
1433
1438
|
}, z.core.$strip>;
|
|
@@ -1646,7 +1651,31 @@ interface UpdateTransactionConfirmationSentAtInput extends z.input<typeof update
|
|
|
1646
1651
|
}
|
|
1647
1652
|
type UpdateTransactionConfirmationSentAtOutput = void;
|
|
1648
1653
|
|
|
1654
|
+
declare const updateTransactionStatusInputSchema: z.ZodObject<{
|
|
1655
|
+
transactionId: z.ZodUUID;
|
|
1656
|
+
status: z.ZodEnum<{
|
|
1657
|
+
FAILED: "FAILED";
|
|
1658
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1659
|
+
WAITING_FOR_COLLATERAL: "WAITING_FOR_COLLATERAL";
|
|
1660
|
+
COLLATERAL_PAID: "COLLATERAL_PAID";
|
|
1661
|
+
PAUSED: "PAUSED";
|
|
1662
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1663
|
+
MATCHED: "MATCHED";
|
|
1664
|
+
RETURNING: "RETURNING";
|
|
1665
|
+
RETURNED: "RETURNED";
|
|
1666
|
+
CANCELLED: "CANCELLED";
|
|
1667
|
+
SETTLED: "SETTLED";
|
|
1668
|
+
}>;
|
|
1669
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
1670
|
+
paymentId: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1672
|
+
}, z.core.$strip>;
|
|
1673
|
+
interface UpdateTransactionStatusInput extends z.infer<typeof updateTransactionStatusInputSchema> {
|
|
1674
|
+
}
|
|
1675
|
+
interface UpdateTransactionStatusOutput extends TransactionSelectType {
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1649
1678
|
declare const tables: typeof schema;
|
|
1650
1679
|
|
|
1651
|
-
export {
|
|
1652
|
-
export type { GetAccountBalanceInput as A, GetAccountBalanceOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, UpdateTransactionConfirmationSentAtInput as E, FailTransactionInput as F, GetTransactionByIdInput as G, UpdateTransactionConfirmationSentAtOutput as H,
|
|
1680
|
+
export { deleteAccountInputSchema as $, cancelTransactionInputSchema as Y, createAccountInputSchema as Z, createTransactionInputSchema as _, failTransactionInputSchema as a0, findAccountByIdentifierInputSchema as a1, getAccountBalanceInputSchema as a2, getAccountIdentifierInputSchema as a3, getAccountInputSchema as a4, getAccountsByOwnerInputSchema as a5, getTransactionByIdInputSchema as a6, getTransactionsByReferenceIdInputSchema as a7, getTransactionsInputSchema as a8, listAccountIdentifiersInputSchema as a9, listAccountsInputSchema as aa, matchTransactionInputSchema as ab, updateAccountInputSchema as ac, updateTransactionConfirmationSentAtInputSchema as ad, updateTransactionStatusInputSchema as ae, tables as t };
|
|
1681
|
+
export type { GetAccountBalanceInput as A, GetAccountBalanceOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, UpdateTransactionConfirmationSentAtInput as E, FailTransactionInput as F, GetTransactionByIdInput as G, UpdateTransactionConfirmationSentAtOutput as H, UpdateTransactionStatusInput as I, UpdateTransactionStatusOutput as J, AccountIdentifierInsertType as K, ListAccountsInput as L, MatchTransactionInput as M, AccountIdentifierMappingInsertType as N, AccountIdentifierMappingSelectType as O, AccountIdentifierSelectType as P, AccountInsertType as Q, AccountSelectType as R, AccountWithIdentifiersSelectType as S, TransactionSelectType as T, UpdateAccountInput as U, IncludeRelation as V, InferResultType as W, TransactionInsertType as X, CreateTransactionOutput as a, MatchTransactionOutput as b, FailTransactionOutput as c, CancelTransactionInput as d, CancelTransactionOutput as e, GetTransactionByIdOutput as f, GetTransactionsByIdReferenceInput as g, GetTransactionsByReferenceIdOutput as h, GetTransactionsInput as i, GetTransactionsOutput as j, CreateAccountInput as k, CreateAccountOutput as l, UpdateAccountOutput as m, DeleteAccountOutput as n, GetAccountInput as o, GetAccountOutput as p, GetAccountsByOwnerInput as q, GetAccountsByOwnerOutput as r, ListAccountsOutput as s, GetAccountIdentifierInput as u, GetAccountIdentifierOutput as v, ListAccountIdentifiersInput as w, ListAccountIdentifiersOutput as x, FindAccountByIdentifierInput as y, FindAccountByIdentifierOutput 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.CLVyCzRb.mjs';
|
|
3
3
|
import { InferSelectModel, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, InferInsertModel } from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
interface TSchema extends ExtractTablesWithRelations<typeof tables> {
|
|
@@ -415,6 +415,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
415
415
|
ORDER: "ORDER";
|
|
416
416
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
417
417
|
FORWARD: "FORWARD";
|
|
418
|
+
TRANSACTION: "TRANSACTION";
|
|
418
419
|
}>;
|
|
419
420
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
420
421
|
type: z.ZodEnum<{
|
|
@@ -427,6 +428,7 @@ declare const createTransactionInputSchema: z.ZodObject<{
|
|
|
427
428
|
ADJUSTMENT: "ADJUSTMENT";
|
|
428
429
|
TRANSFER: "TRANSFER";
|
|
429
430
|
COLLATERAL: "COLLATERAL";
|
|
431
|
+
REFUND: "REFUND";
|
|
430
432
|
}>;
|
|
431
433
|
description: z.ZodOptional<z.ZodString>;
|
|
432
434
|
paymentId: z.ZodOptional<z.ZodString>;
|
|
@@ -1382,6 +1384,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1382
1384
|
ORDER: "ORDER";
|
|
1383
1385
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1384
1386
|
FORWARD: "FORWARD";
|
|
1387
|
+
TRANSACTION: "TRANSACTION";
|
|
1385
1388
|
}>>;
|
|
1386
1389
|
filterTransactionReferenceId: z.ZodOptional<z.ZodUUID>;
|
|
1387
1390
|
filterTransactionType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1394,6 +1397,7 @@ declare const getTransactionsInputSchema: z.ZodObject<{
|
|
|
1394
1397
|
ADJUSTMENT: "ADJUSTMENT";
|
|
1395
1398
|
TRANSFER: "TRANSFER";
|
|
1396
1399
|
COLLATERAL: "COLLATERAL";
|
|
1400
|
+
REFUND: "REFUND";
|
|
1397
1401
|
}>>;
|
|
1398
1402
|
filterTransactionDescription: z.ZodOptional<z.ZodString>;
|
|
1399
1403
|
filterTransactionDateFrom: z.ZodOptional<z.ZodDate>;
|
|
@@ -1428,6 +1432,7 @@ declare const getTransactionsByReferenceIdInputSchema: z.ZodObject<{
|
|
|
1428
1432
|
ORDER: "ORDER";
|
|
1429
1433
|
"INTERNAL-TRANSFER": "INTERNAL-TRANSFER";
|
|
1430
1434
|
FORWARD: "FORWARD";
|
|
1435
|
+
TRANSACTION: "TRANSACTION";
|
|
1431
1436
|
}>;
|
|
1432
1437
|
referenceId: z.ZodUUID;
|
|
1433
1438
|
}, z.core.$strip>;
|
|
@@ -1646,7 +1651,31 @@ interface UpdateTransactionConfirmationSentAtInput extends z.input<typeof update
|
|
|
1646
1651
|
}
|
|
1647
1652
|
type UpdateTransactionConfirmationSentAtOutput = void;
|
|
1648
1653
|
|
|
1654
|
+
declare const updateTransactionStatusInputSchema: z.ZodObject<{
|
|
1655
|
+
transactionId: z.ZodUUID;
|
|
1656
|
+
status: z.ZodEnum<{
|
|
1657
|
+
FAILED: "FAILED";
|
|
1658
|
+
WAITING_FOR_PAYMENT: "WAITING_FOR_PAYMENT";
|
|
1659
|
+
WAITING_FOR_COLLATERAL: "WAITING_FOR_COLLATERAL";
|
|
1660
|
+
COLLATERAL_PAID: "COLLATERAL_PAID";
|
|
1661
|
+
PAUSED: "PAUSED";
|
|
1662
|
+
WAITING_FOR_MANUAL_PROCESSING: "WAITING_FOR_MANUAL_PROCESSING";
|
|
1663
|
+
MATCHED: "MATCHED";
|
|
1664
|
+
RETURNING: "RETURNING";
|
|
1665
|
+
RETURNED: "RETURNED";
|
|
1666
|
+
CANCELLED: "CANCELLED";
|
|
1667
|
+
SETTLED: "SETTLED";
|
|
1668
|
+
}>;
|
|
1669
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
1670
|
+
paymentId: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
completedAt: z.ZodOptional<z.ZodDate>;
|
|
1672
|
+
}, z.core.$strip>;
|
|
1673
|
+
interface UpdateTransactionStatusInput extends z.infer<typeof updateTransactionStatusInputSchema> {
|
|
1674
|
+
}
|
|
1675
|
+
interface UpdateTransactionStatusOutput extends TransactionSelectType {
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1649
1678
|
declare const tables: typeof schema;
|
|
1650
1679
|
|
|
1651
|
-
export {
|
|
1652
|
-
export type { GetAccountBalanceInput as A, GetAccountBalanceOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, UpdateTransactionConfirmationSentAtInput as E, FailTransactionInput as F, GetTransactionByIdInput as G, UpdateTransactionConfirmationSentAtOutput as H,
|
|
1680
|
+
export { deleteAccountInputSchema as $, cancelTransactionInputSchema as Y, createAccountInputSchema as Z, createTransactionInputSchema as _, failTransactionInputSchema as a0, findAccountByIdentifierInputSchema as a1, getAccountBalanceInputSchema as a2, getAccountIdentifierInputSchema as a3, getAccountInputSchema as a4, getAccountsByOwnerInputSchema as a5, getTransactionByIdInputSchema as a6, getTransactionsByReferenceIdInputSchema as a7, getTransactionsInputSchema as a8, listAccountIdentifiersInputSchema as a9, listAccountsInputSchema as aa, matchTransactionInputSchema as ab, updateAccountInputSchema as ac, updateTransactionConfirmationSentAtInputSchema as ad, updateTransactionStatusInputSchema as ae, tables as t };
|
|
1681
|
+
export type { GetAccountBalanceInput as A, GetAccountBalanceOutput as B, CreateTransactionInput as C, DeleteAccountInput as D, UpdateTransactionConfirmationSentAtInput as E, FailTransactionInput as F, GetTransactionByIdInput as G, UpdateTransactionConfirmationSentAtOutput as H, UpdateTransactionStatusInput as I, UpdateTransactionStatusOutput as J, AccountIdentifierInsertType as K, ListAccountsInput as L, MatchTransactionInput as M, AccountIdentifierMappingInsertType as N, AccountIdentifierMappingSelectType as O, AccountIdentifierSelectType as P, AccountInsertType as Q, AccountSelectType as R, AccountWithIdentifiersSelectType as S, TransactionSelectType as T, UpdateAccountInput as U, IncludeRelation as V, InferResultType as W, TransactionInsertType as X, CreateTransactionOutput as a, MatchTransactionOutput as b, FailTransactionOutput as c, CancelTransactionInput as d, CancelTransactionOutput as e, GetTransactionByIdOutput as f, GetTransactionsByIdReferenceInput as g, GetTransactionsByReferenceIdOutput as h, GetTransactionsInput as i, GetTransactionsOutput as j, CreateAccountInput as k, CreateAccountOutput as l, UpdateAccountOutput as m, DeleteAccountOutput as n, GetAccountInput as o, GetAccountOutput as p, GetAccountsByOwnerInput as q, GetAccountsByOwnerOutput as r, ListAccountsOutput as s, GetAccountIdentifierInput as u, GetAccountIdentifierOutput as v, ListAccountIdentifiersInput as w, ListAccountIdentifiersOutput as x, FindAccountByIdentifierInput as y, FindAccountByIdentifierOutput as z };
|
|
@@ -84,15 +84,17 @@ const TRANSACTION_TYPES = [
|
|
|
84
84
|
// manual correction
|
|
85
85
|
"TRANSFER",
|
|
86
86
|
// internal transfer between accounts
|
|
87
|
-
"COLLATERAL"
|
|
87
|
+
"COLLATERAL",
|
|
88
88
|
// forward collateral payment from client
|
|
89
|
+
"REFUND"
|
|
89
90
|
];
|
|
90
91
|
const REFERENCE_TYPES = [
|
|
91
92
|
"PAYMENT",
|
|
92
93
|
"EXCHANGE",
|
|
93
94
|
"ORDER",
|
|
94
95
|
"INTERNAL-TRANSFER",
|
|
95
|
-
"FORWARD"
|
|
96
|
+
"FORWARD",
|
|
97
|
+
"TRANSACTION"
|
|
96
98
|
];
|
|
97
99
|
const PAYMENT_CHARGE_TYPES = ["SHA", "OUR", "BEN"];
|
|
98
100
|
const PAYMENT_TYPES = ["DOMESTIC", "SEPA", "SWIFT", "UNKNOWN"];
|
|
@@ -311,6 +313,14 @@ const updateTransactionConfirmationSentAtInputSchema = zod.z.object({
|
|
|
311
313
|
transactionId: zod.z.uuid()
|
|
312
314
|
});
|
|
313
315
|
|
|
316
|
+
const updateTransactionStatusInputSchema = zod.z.object({
|
|
317
|
+
transactionId: zod.z.uuid(),
|
|
318
|
+
status: zod.z.enum(TRANSACTION_STATUSES),
|
|
319
|
+
statusReason: zod.z.string().optional(),
|
|
320
|
+
paymentId: zod.z.string().optional(),
|
|
321
|
+
completedAt: zod.z.date().optional()
|
|
322
|
+
});
|
|
323
|
+
|
|
314
324
|
exports.ACCOUNT_TYPES = ACCOUNT_TYPES;
|
|
315
325
|
exports.ALLOWED_TRANSACTION_FILTERS = ALLOWED_TRANSACTION_FILTERS;
|
|
316
326
|
exports.ASSET_TYPES = ASSET_TYPES;
|
|
@@ -344,3 +354,4 @@ exports.listAccountsInputSchema = listAccountsInputSchema;
|
|
|
344
354
|
exports.matchTransactionInputSchema = matchTransactionInputSchema;
|
|
345
355
|
exports.updateAccountInputSchema = updateAccountInputSchema;
|
|
346
356
|
exports.updateTransactionConfirmationSentAtInputSchema = updateTransactionConfirmationSentAtInputSchema;
|
|
357
|
+
exports.updateTransactionStatusInputSchema = updateTransactionStatusInputSchema;
|
package/dist/types.cjs
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const updateTransactionStatus = require('./shared/ledger.Dfi_K5W2.cjs');
|
|
4
4
|
const generalCodes = require('@develit-io/general-codes');
|
|
5
5
|
require('zod');
|
|
6
6
|
require('@develit-io/backend-sdk');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.ACCOUNT_TYPES =
|
|
11
|
-
exports.ALLOWED_TRANSACTION_FILTERS =
|
|
12
|
-
exports.ASSET_TYPES =
|
|
13
|
-
exports.BALANCE_STRATEGIES =
|
|
14
|
-
exports.BATCH_STATUSES =
|
|
15
|
-
exports.COUNTRY_CODES =
|
|
16
|
-
exports.ENTRY_STATUSES =
|
|
17
|
-
exports.IDENTIFIER_KINDS =
|
|
18
|
-
exports.PAYMENT_CHARGE_TYPES =
|
|
19
|
-
exports.PAYMENT_DIRECTIONS =
|
|
20
|
-
exports.PAYMENT_STATUSES =
|
|
21
|
-
exports.PAYMENT_TYPES =
|
|
22
|
-
exports.REFERENCE_TYPES =
|
|
23
|
-
exports.TRANSACTION_STATUSES =
|
|
24
|
-
exports.TRANSACTION_TYPES =
|
|
25
|
-
exports.cancelTransactionInputSchema =
|
|
26
|
-
exports.createAccountInputSchema =
|
|
27
|
-
exports.createTransactionInputSchema =
|
|
28
|
-
exports.deleteAccountInputSchema =
|
|
29
|
-
exports.failTransactionInputSchema =
|
|
30
|
-
exports.findAccountByIdentifierInputSchema =
|
|
31
|
-
exports.getAccountBalanceInputSchema =
|
|
32
|
-
exports.getAccountIdentifierInputSchema =
|
|
33
|
-
exports.getAccountInputSchema =
|
|
34
|
-
exports.getAccountsByOwnerInputSchema =
|
|
35
|
-
exports.getTransactionByIdInputSchema =
|
|
36
|
-
exports.getTransactionsByReferenceIdInputSchema =
|
|
37
|
-
exports.getTransactionsInputSchema =
|
|
38
|
-
exports.listAccountIdentifiersInputSchema =
|
|
39
|
-
exports.listAccountsInputSchema =
|
|
40
|
-
exports.matchTransactionInputSchema =
|
|
41
|
-
exports.updateAccountInputSchema =
|
|
42
|
-
exports.updateTransactionConfirmationSentAtInputSchema =
|
|
10
|
+
exports.ACCOUNT_TYPES = updateTransactionStatus.ACCOUNT_TYPES;
|
|
11
|
+
exports.ALLOWED_TRANSACTION_FILTERS = updateTransactionStatus.ALLOWED_TRANSACTION_FILTERS;
|
|
12
|
+
exports.ASSET_TYPES = updateTransactionStatus.ASSET_TYPES;
|
|
13
|
+
exports.BALANCE_STRATEGIES = updateTransactionStatus.BALANCE_STRATEGIES;
|
|
14
|
+
exports.BATCH_STATUSES = updateTransactionStatus.BATCH_STATUSES;
|
|
15
|
+
exports.COUNTRY_CODES = updateTransactionStatus.COUNTRY_CODES;
|
|
16
|
+
exports.ENTRY_STATUSES = updateTransactionStatus.ENTRY_STATUSES;
|
|
17
|
+
exports.IDENTIFIER_KINDS = updateTransactionStatus.IDENTIFIER_KINDS;
|
|
18
|
+
exports.PAYMENT_CHARGE_TYPES = updateTransactionStatus.PAYMENT_CHARGE_TYPES;
|
|
19
|
+
exports.PAYMENT_DIRECTIONS = updateTransactionStatus.PAYMENT_DIRECTIONS;
|
|
20
|
+
exports.PAYMENT_STATUSES = updateTransactionStatus.PAYMENT_STATUSES;
|
|
21
|
+
exports.PAYMENT_TYPES = updateTransactionStatus.PAYMENT_TYPES;
|
|
22
|
+
exports.REFERENCE_TYPES = updateTransactionStatus.REFERENCE_TYPES;
|
|
23
|
+
exports.TRANSACTION_STATUSES = updateTransactionStatus.TRANSACTION_STATUSES;
|
|
24
|
+
exports.TRANSACTION_TYPES = updateTransactionStatus.TRANSACTION_TYPES;
|
|
25
|
+
exports.cancelTransactionInputSchema = updateTransactionStatus.cancelTransactionInputSchema;
|
|
26
|
+
exports.createAccountInputSchema = updateTransactionStatus.createAccountInputSchema;
|
|
27
|
+
exports.createTransactionInputSchema = updateTransactionStatus.createTransactionInputSchema;
|
|
28
|
+
exports.deleteAccountInputSchema = updateTransactionStatus.deleteAccountInputSchema;
|
|
29
|
+
exports.failTransactionInputSchema = updateTransactionStatus.failTransactionInputSchema;
|
|
30
|
+
exports.findAccountByIdentifierInputSchema = updateTransactionStatus.findAccountByIdentifierInputSchema;
|
|
31
|
+
exports.getAccountBalanceInputSchema = updateTransactionStatus.getAccountBalanceInputSchema;
|
|
32
|
+
exports.getAccountIdentifierInputSchema = updateTransactionStatus.getAccountIdentifierInputSchema;
|
|
33
|
+
exports.getAccountInputSchema = updateTransactionStatus.getAccountInputSchema;
|
|
34
|
+
exports.getAccountsByOwnerInputSchema = updateTransactionStatus.getAccountsByOwnerInputSchema;
|
|
35
|
+
exports.getTransactionByIdInputSchema = updateTransactionStatus.getTransactionByIdInputSchema;
|
|
36
|
+
exports.getTransactionsByReferenceIdInputSchema = updateTransactionStatus.getTransactionsByReferenceIdInputSchema;
|
|
37
|
+
exports.getTransactionsInputSchema = updateTransactionStatus.getTransactionsInputSchema;
|
|
38
|
+
exports.listAccountIdentifiersInputSchema = updateTransactionStatus.listAccountIdentifiersInputSchema;
|
|
39
|
+
exports.listAccountsInputSchema = updateTransactionStatus.listAccountsInputSchema;
|
|
40
|
+
exports.matchTransactionInputSchema = updateTransactionStatus.matchTransactionInputSchema;
|
|
41
|
+
exports.updateAccountInputSchema = updateTransactionStatus.updateAccountInputSchema;
|
|
42
|
+
exports.updateTransactionConfirmationSentAtInputSchema = updateTransactionStatus.updateTransactionConfirmationSentAtInputSchema;
|
|
43
|
+
exports.updateTransactionStatusInputSchema = updateTransactionStatus.updateTransactionStatusInputSchema;
|
|
43
44
|
exports.BANK_CODES = generalCodes.BANK_CODES;
|
|
44
45
|
exports.CURRENCY_CODES = generalCodes.CURRENCY_CODES;
|
package/dist/types.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, a as ASSET_TYPES, b as AccountType, c as AssetType, B as BALANCE_STRATEGIES, d as BATCH_STATUSES, e as BalanceStrategy, f as BankCode, g as BatchStatus, C as COUNTRY_CODES, h as CountryCode, i as CryptoNetworkCode, j as Currency, k as CurrencyCode, E as ENTRY_STATUSES, l as EntryMetadata, m as EntryStatus, I as IDENTIFIER_KINDS, n as IdentifierKind, P as PAYMENT_CHARGE_TYPES, o as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, q as PAYMENT_TYPES, r as PaymentChargeType, s as PaymentDirection, t as PaymentStatus, u as PaymentType, R as REFERENCE_TYPES, v as ReferenceType, T as TRANSACTION_STATUSES, w as TRANSACTION_TYPES, x as TransactionMetadata, y as TransactionStatus, z as TransactionType } from './shared/ledger.
|
|
2
|
-
import { T as TransactionSelectType } from './shared/ledger.
|
|
3
|
-
export {
|
|
1
|
+
export { A as ACCOUNT_TYPES, a as ASSET_TYPES, b as AccountType, c as AssetType, B as BALANCE_STRATEGIES, d as BATCH_STATUSES, e as BalanceStrategy, f as BankCode, g as BatchStatus, C as COUNTRY_CODES, h as CountryCode, i as CryptoNetworkCode, j as Currency, k as CurrencyCode, E as ENTRY_STATUSES, l as EntryMetadata, m as EntryStatus, I as IDENTIFIER_KINDS, n as IdentifierKind, P as PAYMENT_CHARGE_TYPES, o as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, q as PAYMENT_TYPES, r as PaymentChargeType, s as PaymentDirection, t as PaymentStatus, u as PaymentType, R as REFERENCE_TYPES, v as ReferenceType, T as TRANSACTION_STATUSES, w as TRANSACTION_TYPES, x as TransactionMetadata, y as TransactionStatus, z as TransactionType } from './shared/ledger.CLVyCzRb.cjs';
|
|
2
|
+
import { T as TransactionSelectType } from './shared/ledger.D7boja6V.cjs';
|
|
3
|
+
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, O as AccountIdentifierMappingSelectType, P as AccountIdentifierSelectType, Q as AccountInsertType, R as AccountSelectType, S as AccountWithIdentifiersSelectType, d as CancelTransactionInput, e as CancelTransactionOutput, k as CreateAccountInput, l as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, n as DeleteAccountOutput, F as FailTransactionInput, c as FailTransactionOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, V as IncludeRelation, W as InferResultType, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, L as ListAccountsInput, s as ListAccountsOutput, M as MatchTransactionInput, b as MatchTransactionOutput, X as TransactionInsertType, U as UpdateAccountInput, m as UpdateAccountOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput, I as UpdateTransactionStatusInput, J as UpdateTransactionStatusOutput, Y as cancelTransactionInputSchema, Z as createAccountInputSchema, _ as createTransactionInputSchema, $ as deleteAccountInputSchema, a0 as failTransactionInputSchema, a1 as findAccountByIdentifierInputSchema, a2 as getAccountBalanceInputSchema, a3 as getAccountIdentifierInputSchema, a4 as getAccountInputSchema, a5 as getAccountsByOwnerInputSchema, a6 as getTransactionByIdInputSchema, a7 as getTransactionsByReferenceIdInputSchema, a8 as getTransactionsInputSchema, a9 as listAccountIdentifiersInputSchema, aa as listAccountsInputSchema, ab as matchTransactionInputSchema, ac as updateAccountInputSchema, ad as updateTransactionConfirmationSentAtInputSchema, ae as updateTransactionStatusInputSchema } from './shared/ledger.D7boja6V.cjs';
|
|
4
4
|
export { a as LedgerServiceEnv, b as LedgerServiceEnvironmentConfig, L as LedgerServiceWranglerConfig } from './shared/ledger.VQWxyeV6.cjs';
|
|
5
5
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
6
6
|
export { BANK_CODES, CRYPTO_NETWORK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, a as ASSET_TYPES, b as AccountType, c as AssetType, B as BALANCE_STRATEGIES, d as BATCH_STATUSES, e as BalanceStrategy, f as BankCode, g as BatchStatus, C as COUNTRY_CODES, h as CountryCode, i as CryptoNetworkCode, j as Currency, k as CurrencyCode, E as ENTRY_STATUSES, l as EntryMetadata, m as EntryStatus, I as IDENTIFIER_KINDS, n as IdentifierKind, P as PAYMENT_CHARGE_TYPES, o as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, q as PAYMENT_TYPES, r as PaymentChargeType, s as PaymentDirection, t as PaymentStatus, u as PaymentType, R as REFERENCE_TYPES, v as ReferenceType, T as TRANSACTION_STATUSES, w as TRANSACTION_TYPES, x as TransactionMetadata, y as TransactionStatus, z as TransactionType } from './shared/ledger.
|
|
2
|
-
import { T as TransactionSelectType } from './shared/ledger.
|
|
3
|
-
export {
|
|
1
|
+
export { A as ACCOUNT_TYPES, a as ASSET_TYPES, b as AccountType, c as AssetType, B as BALANCE_STRATEGIES, d as BATCH_STATUSES, e as BalanceStrategy, f as BankCode, g as BatchStatus, C as COUNTRY_CODES, h as CountryCode, i as CryptoNetworkCode, j as Currency, k as CurrencyCode, E as ENTRY_STATUSES, l as EntryMetadata, m as EntryStatus, I as IDENTIFIER_KINDS, n as IdentifierKind, P as PAYMENT_CHARGE_TYPES, o as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, q as PAYMENT_TYPES, r as PaymentChargeType, s as PaymentDirection, t as PaymentStatus, u as PaymentType, R as REFERENCE_TYPES, v as ReferenceType, T as TRANSACTION_STATUSES, w as TRANSACTION_TYPES, x as TransactionMetadata, y as TransactionStatus, z as TransactionType } from './shared/ledger.CLVyCzRb.mjs';
|
|
2
|
+
import { T as TransactionSelectType } from './shared/ledger.D_uHoy5E.mjs';
|
|
3
|
+
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, O as AccountIdentifierMappingSelectType, P as AccountIdentifierSelectType, Q as AccountInsertType, R as AccountSelectType, S as AccountWithIdentifiersSelectType, d as CancelTransactionInput, e as CancelTransactionOutput, k as CreateAccountInput, l as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, n as DeleteAccountOutput, F as FailTransactionInput, c as FailTransactionOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, V as IncludeRelation, W as InferResultType, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, L as ListAccountsInput, s as ListAccountsOutput, M as MatchTransactionInput, b as MatchTransactionOutput, X as TransactionInsertType, U as UpdateAccountInput, m as UpdateAccountOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput, I as UpdateTransactionStatusInput, J as UpdateTransactionStatusOutput, Y as cancelTransactionInputSchema, Z as createAccountInputSchema, _ as createTransactionInputSchema, $ as deleteAccountInputSchema, a0 as failTransactionInputSchema, a1 as findAccountByIdentifierInputSchema, a2 as getAccountBalanceInputSchema, a3 as getAccountIdentifierInputSchema, a4 as getAccountInputSchema, a5 as getAccountsByOwnerInputSchema, a6 as getTransactionByIdInputSchema, a7 as getTransactionsByReferenceIdInputSchema, a8 as getTransactionsInputSchema, a9 as listAccountIdentifiersInputSchema, aa as listAccountsInputSchema, ab as matchTransactionInputSchema, ac as updateAccountInputSchema, ad as updateTransactionConfirmationSentAtInputSchema, ae as updateTransactionStatusInputSchema } from './shared/ledger.D_uHoy5E.mjs';
|
|
4
4
|
export { a as LedgerServiceEnv, b as LedgerServiceEnvironmentConfig, L as LedgerServiceWranglerConfig } from './shared/ledger.VQWxyeV6.mjs';
|
|
5
5
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
6
6
|
export { BANK_CODES, CRYPTO_NETWORK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, a as ASSET_TYPES, b as AccountType, c as AssetType, B as BALANCE_STRATEGIES, d as BATCH_STATUSES, e as BalanceStrategy, f as BankCode, g as BatchStatus, C as COUNTRY_CODES, h as CountryCode, i as CryptoNetworkCode, j as Currency, k as CurrencyCode, E as ENTRY_STATUSES, l as EntryMetadata, m as EntryStatus, I as IDENTIFIER_KINDS, n as IdentifierKind, P as PAYMENT_CHARGE_TYPES, o as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, q as PAYMENT_TYPES, r as PaymentChargeType, s as PaymentDirection, t as PaymentStatus, u as PaymentType, R as REFERENCE_TYPES, v as ReferenceType, T as TRANSACTION_STATUSES, w as TRANSACTION_TYPES, x as TransactionMetadata, y as TransactionStatus, z as TransactionType } from './shared/ledger.
|
|
2
|
-
import { T as TransactionSelectType } from './shared/ledger.
|
|
3
|
-
export {
|
|
1
|
+
export { A as ACCOUNT_TYPES, a as ASSET_TYPES, b as AccountType, c as AssetType, B as BALANCE_STRATEGIES, d as BATCH_STATUSES, e as BalanceStrategy, f as BankCode, g as BatchStatus, C as COUNTRY_CODES, h as CountryCode, i as CryptoNetworkCode, j as Currency, k as CurrencyCode, E as ENTRY_STATUSES, l as EntryMetadata, m as EntryStatus, I as IDENTIFIER_KINDS, n as IdentifierKind, P as PAYMENT_CHARGE_TYPES, o as PAYMENT_DIRECTIONS, p as PAYMENT_STATUSES, q as PAYMENT_TYPES, r as PaymentChargeType, s as PaymentDirection, t as PaymentStatus, u as PaymentType, R as REFERENCE_TYPES, v as ReferenceType, T as TRANSACTION_STATUSES, w as TRANSACTION_TYPES, x as TransactionMetadata, y as TransactionStatus, z as TransactionType } from './shared/ledger.CLVyCzRb.js';
|
|
2
|
+
import { T as TransactionSelectType } from './shared/ledger.CDdw0Nyc.js';
|
|
3
|
+
export { K as AccountIdentifierInsertType, N as AccountIdentifierMappingInsertType, O as AccountIdentifierMappingSelectType, P as AccountIdentifierSelectType, Q as AccountInsertType, R as AccountSelectType, S as AccountWithIdentifiersSelectType, d as CancelTransactionInput, e as CancelTransactionOutput, k as CreateAccountInput, l as CreateAccountOutput, C as CreateTransactionInput, a as CreateTransactionOutput, D as DeleteAccountInput, n as DeleteAccountOutput, F as FailTransactionInput, c as FailTransactionOutput, y as FindAccountByIdentifierInput, z as FindAccountByIdentifierOutput, A as GetAccountBalanceInput, B as GetAccountBalanceOutput, u as GetAccountIdentifierInput, v as GetAccountIdentifierOutput, o as GetAccountInput, p as GetAccountOutput, q as GetAccountsByOwnerInput, r as GetAccountsByOwnerOutput, G as GetTransactionByIdInput, f as GetTransactionByIdOutput, g as GetTransactionsByIdReferenceInput, h as GetTransactionsByReferenceIdOutput, i as GetTransactionsInput, j as GetTransactionsOutput, V as IncludeRelation, W as InferResultType, w as ListAccountIdentifiersInput, x as ListAccountIdentifiersOutput, L as ListAccountsInput, s as ListAccountsOutput, M as MatchTransactionInput, b as MatchTransactionOutput, X as TransactionInsertType, U as UpdateAccountInput, m as UpdateAccountOutput, E as UpdateTransactionConfirmationSentAtInput, H as UpdateTransactionConfirmationSentAtOutput, I as UpdateTransactionStatusInput, J as UpdateTransactionStatusOutput, Y as cancelTransactionInputSchema, Z as createAccountInputSchema, _ as createTransactionInputSchema, $ as deleteAccountInputSchema, a0 as failTransactionInputSchema, a1 as findAccountByIdentifierInputSchema, a2 as getAccountBalanceInputSchema, a3 as getAccountIdentifierInputSchema, a4 as getAccountInputSchema, a5 as getAccountsByOwnerInputSchema, a6 as getTransactionByIdInputSchema, a7 as getTransactionsByReferenceIdInputSchema, a8 as getTransactionsInputSchema, a9 as listAccountIdentifiersInputSchema, aa as listAccountsInputSchema, ab as matchTransactionInputSchema, ac as updateAccountInputSchema, ad as updateTransactionConfirmationSentAtInputSchema, ae as updateTransactionStatusInputSchema } from './shared/ledger.CDdw0Nyc.js';
|
|
4
4
|
export { a as LedgerServiceEnv, b as LedgerServiceEnvironmentConfig, L as LedgerServiceWranglerConfig } from './shared/ledger.VQWxyeV6.js';
|
|
5
5
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
6
6
|
export { BANK_CODES, CRYPTO_NETWORK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ACCOUNT_TYPES, a as ALLOWED_TRANSACTION_FILTERS, b as ASSET_TYPES, B as BALANCE_STRATEGIES, c as BATCH_STATUSES, C as COUNTRY_CODES, E as ENTRY_STATUSES, I as IDENTIFIER_KINDS, P as PAYMENT_CHARGE_TYPES, d as PAYMENT_DIRECTIONS, e as PAYMENT_STATUSES, f as PAYMENT_TYPES, R as REFERENCE_TYPES, T as TRANSACTION_STATUSES, g as TRANSACTION_TYPES, h as cancelTransactionInputSchema, i as createAccountInputSchema, j as createTransactionInputSchema, k as deleteAccountInputSchema, l as failTransactionInputSchema, m as findAccountByIdentifierInputSchema, n as getAccountBalanceInputSchema, o as getAccountIdentifierInputSchema, p as getAccountInputSchema, q as getAccountsByOwnerInputSchema, r as getTransactionByIdInputSchema, s as getTransactionsByReferenceIdInputSchema, t as getTransactionsInputSchema, u as listAccountIdentifiersInputSchema, v as listAccountsInputSchema, w as matchTransactionInputSchema, x as updateAccountInputSchema, y as updateTransactionConfirmationSentAtInputSchema } from './shared/ledger.
|
|
1
|
+
export { A as ACCOUNT_TYPES, a as ALLOWED_TRANSACTION_FILTERS, b as ASSET_TYPES, B as BALANCE_STRATEGIES, c as BATCH_STATUSES, C as COUNTRY_CODES, E as ENTRY_STATUSES, I as IDENTIFIER_KINDS, P as PAYMENT_CHARGE_TYPES, d as PAYMENT_DIRECTIONS, e as PAYMENT_STATUSES, f as PAYMENT_TYPES, R as REFERENCE_TYPES, T as TRANSACTION_STATUSES, g as TRANSACTION_TYPES, h as cancelTransactionInputSchema, i as createAccountInputSchema, j as createTransactionInputSchema, k as deleteAccountInputSchema, l as failTransactionInputSchema, m as findAccountByIdentifierInputSchema, n as getAccountBalanceInputSchema, o as getAccountIdentifierInputSchema, p as getAccountInputSchema, q as getAccountsByOwnerInputSchema, r as getTransactionByIdInputSchema, s as getTransactionsByReferenceIdInputSchema, t as getTransactionsInputSchema, u as listAccountIdentifiersInputSchema, v as listAccountsInputSchema, w as matchTransactionInputSchema, x as updateAccountInputSchema, y as updateTransactionConfirmationSentAtInputSchema, z as updateTransactionStatusInputSchema } from './shared/ledger.BVNtjljl.mjs';
|
|
2
2
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '@develit-io/backend-sdk';
|