@r2wa-org/eden 0.0.56 → 0.0.59
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/src/admin/admin/dto.schemas.d.ts +3 -54
- package/dist/src/admin/admin/router.d.ts +10 -12
- package/dist/src/admin/admin/service.d.ts +0 -2
- package/dist/src/admin/index.d.ts +1043 -54
- package/dist/src/asset/admin/dto.schemas.d.ts +49 -26
- package/dist/src/asset/admin/router.d.ts +123 -20
- package/dist/src/asset/admin/service.d.ts +52 -4
- package/dist/src/asset/user/dto.schemas.d.ts +16 -98
- package/dist/src/asset/user/router.d.ts +69 -75
- package/dist/src/asset/user/service.d.ts +42 -42
- package/dist/src/asset-convert-product/admin/dto.schemas.d.ts +459 -566
- package/dist/src/asset-convert-product/admin/router.d.ts +564 -22
- package/dist/src/asset-convert-product/admin/service.d.ts +419 -12
- package/dist/src/asset-convert-product/errors/index.d.ts +7 -0
- package/dist/src/asset-convert-product/errors/locales/zh.d.ts +7 -0
- package/dist/src/asset-convert-product/permissions.d.ts +2 -2
- package/dist/src/asset-convert-product/user/router.d.ts +8 -8
- package/dist/src/asset-price/admin/dto.schemas.d.ts +99 -352
- package/dist/src/asset-price/admin/router.d.ts +125 -10
- package/dist/src/asset-price/admin/service.d.ts +157 -0
- package/dist/src/asset-price/errors/index.d.ts +3 -0
- package/dist/src/asset-price/errors/locales/zh.d.ts +3 -0
- package/dist/src/asset-price/internal/service.d.ts +1 -0
- package/dist/src/asset-price/user/dto.schemas.d.ts +7 -3
- package/dist/src/asset-price/user/router.d.ts +51 -10
- package/dist/src/asset-price/user/service.d.ts +13 -1
- package/dist/src/asset-type/admin/dto.schemas.d.ts +291 -33
- package/dist/src/asset-type/admin/router.d.ts +60 -18
- package/dist/src/asset-type/admin/service.d.ts +16 -6
- package/dist/src/asset-type/db.schemas.d.ts +6 -6
- package/dist/src/asset-type/errors/index.d.ts +6 -0
- package/dist/src/asset-type/errors/locales/zh.d.ts +3 -0
- package/dist/src/asset-type/internal/service.d.ts +4 -4
- package/dist/src/asset-type/permissions.d.ts +1 -1
- package/dist/src/asset-type/schema.d.ts +3 -5
- package/dist/src/asset-type/user/dto.schemas.d.ts +3 -15
- package/dist/src/asset-type/user/router.d.ts +10 -10
- package/dist/src/asset-type/user/service.d.ts +1 -1
- package/dist/src/auth/better-auth.d.ts +706 -451
- package/dist/src/auth/db.schemas.d.ts +27 -407
- package/dist/src/auth/permissions.d.ts +20 -20
- package/dist/src/auth/roles.d.ts +60 -60
- package/dist/src/auth/router.d.ts +6 -6
- package/dist/src/auth/schema.d.ts +8 -206
- package/dist/src/bank-account/admin/router.d.ts +10 -10
- package/dist/src/bank-account/user/router.d.ts +6 -6
- package/dist/src/check-in/admin/dto.schemas.d.ts +1 -18
- package/dist/src/check-in/admin/router.d.ts +10 -11
- package/dist/src/check-in/admin/service.d.ts +0 -1
- package/dist/src/check-in/internal/service.d.ts +0 -1
- package/dist/src/check-in/user/dto.schemas.d.ts +1 -18
- package/dist/src/check-in/user/router.d.ts +8 -9
- package/dist/src/check-in/user/service.d.ts +0 -1
- package/dist/src/deposit/admin/dto.schemas.d.ts +8 -42
- package/dist/src/deposit/admin/router.d.ts +10 -11
- package/dist/src/deposit/admin/service.d.ts +0 -2
- package/dist/src/deposit/user/dto.schemas.d.ts +8 -42
- package/dist/src/deposit/user/router.d.ts +8 -9
- package/dist/src/deposit/user/service.d.ts +0 -2
- package/dist/src/dynamic-env/admin.router.d.ts +10 -10
- package/dist/src/env/server.d.ts +1 -1
- package/dist/src/file-storage/admin/router.d.ts +10 -10
- package/dist/src/file-storage/share/router.d.ts +8 -8
- package/dist/src/file-storage/user/router.d.ts +8 -8
- package/dist/src/index.d.ts +1578 -352
- package/dist/src/ledger/admin/router.d.ts +10 -10
- package/dist/src/ledger/user/router.d.ts +8 -8
- package/dist/src/ledger-account/admin/dto.schemas.d.ts +2 -2
- package/dist/src/ledger-account/admin/router.d.ts +11 -11
- package/dist/src/ledger-account/user/dto.schemas.d.ts +39 -193
- package/dist/src/ledger-account/user/router.d.ts +51 -50
- package/dist/src/ledger-account/user/service.d.ts +41 -41
- package/dist/src/ledger-account-import/admin/router.d.ts +10 -10
- package/dist/src/ledger-account-transfer/user/router.d.ts +8 -8
- package/dist/src/ledger-account-type/admin/router.d.ts +10 -10
- package/dist/src/ledger-account-type/user/router.d.ts +56 -8
- package/dist/src/ledger-account-type/user/service.d.ts +25 -0
- package/dist/src/market-data/admin/router.d.ts +10 -10
- package/dist/src/market-data/user/router.d.ts +8 -8
- package/dist/src/market-pricing/admin/router.d.ts +10 -10
- package/dist/src/news/admin/dto.schemas.d.ts +6 -6
- package/dist/src/news/admin/router.d.ts +10 -10
- package/dist/src/news/user/dto.schemas.d.ts +12 -12
- package/dist/src/news/user/router.d.ts +8 -8
- package/dist/src/news-category/user/router.d.ts +6 -6
- package/dist/src/notification/admin/dto.schemas.d.ts +3 -3
- package/dist/src/notification/admin/router.d.ts +10 -10
- package/dist/src/notification/user/dto.schemas.d.ts +2 -2
- package/dist/src/notification/user/router.d.ts +8 -8
- package/dist/src/portfolio/index.d.ts +2 -0
- package/dist/src/portfolio/internal/index.d.ts +1 -0
- package/dist/src/portfolio/internal/service.d.ts +5 -0
- package/dist/src/portfolio/user/dto.schemas.d.ts +352 -0
- package/dist/src/portfolio/user/index.d.ts +3 -0
- package/dist/src/portfolio/user/router.d.ts +659 -0
- package/dist/src/portfolio/user/service.d.ts +143 -0
- package/dist/src/receipt-method/admin/router.d.ts +10 -10
- package/dist/src/receipt-method/user/router.d.ts +6 -6
- package/dist/src/referral/admin/dto.schemas.d.ts +2 -36
- package/dist/src/referral/admin/router.d.ts +10 -11
- package/dist/src/referral/user/dto.schemas.d.ts +2 -36
- package/dist/src/referral/user/router.d.ts +8 -9
- package/dist/src/referral-depth-config/admin/router.d.ts +10 -10
- package/dist/src/server-test/index.d.ts +6 -6
- package/dist/src/shipping-address/admin/router.d.ts +10 -10
- package/dist/src/shipping-address/user/router.d.ts +6 -6
- package/dist/src/team/admin/dto.schemas.d.ts +2 -36
- package/dist/src/team/admin/router.d.ts +10 -11
- package/dist/src/team/user/dto.schemas.d.ts +5 -90
- package/dist/src/team/user/router.d.ts +8 -11
- package/dist/src/trade-market/admin/dto.schemas.d.ts +1 -1
- package/dist/src/trade-market/admin/router.d.ts +10 -10
- package/dist/src/trade-market/user/router.d.ts +8 -8
- package/dist/src/transfer/admin/router.d.ts +10 -10
- package/dist/src/transfer/admin/service.d.ts +0 -2
- package/dist/src/transfer/user/router.d.ts +8 -8
- package/dist/src/transfer/user/service.d.ts +0 -2
- package/dist/src/user/admin/dto.schemas.d.ts +1 -21
- package/dist/src/user/admin/router.d.ts +10 -15
- package/dist/src/user/admin/service.d.ts +0 -4
- package/dist/src/user/user/router.d.ts +6 -8
- package/dist/src/user/user/service.d.ts +0 -2
- package/dist/src/user-kyc/admin/dto.schemas.d.ts +1 -1
- package/dist/src/user-kyc/admin/router.d.ts +10 -10
- package/dist/src/user-kyc/user/router.d.ts +8 -8
- package/dist/src/user-security/admin/router.d.ts +10 -10
- package/dist/src/user-security/user/router.d.ts +8 -8
- package/dist/src/wallet/admin/dto.schemas.d.ts +35 -3
- package/dist/src/wallet/admin/router.d.ts +75 -10
- package/dist/src/wallet/admin/service.d.ts +46 -8
- package/dist/src/wallet/internal/service.d.ts +118 -14
- package/dist/src/wallet/user/dto.schemas.d.ts +6 -66
- package/dist/src/wallet/user/router.d.ts +9 -69
- package/dist/src/wallet/user/service.d.ts +20 -46
- package/dist/src/wallet-type/admin/dto.schemas.d.ts +4 -0
- package/dist/src/wallet-type/admin/router.d.ts +143 -10
- package/dist/src/wallet-type/admin/service.d.ts +51 -0
- package/dist/src/wallet-type/errors/index.d.ts +4 -0
- package/dist/src/wallet-type/errors/locales/zh.d.ts +4 -0
- package/dist/src/wallet-type/internal/service.d.ts +37 -0
- package/dist/src/wallet-type/user/router.d.ts +8 -8
- package/dist/src/welfare-cycle/admin/dto.schemas.d.ts +3 -3
- package/dist/src/welfare-cycle/admin/router.d.ts +10 -10
- package/dist/src/welfare-cycle/user/dto.schemas.d.ts +1 -0
- package/dist/src/welfare-cycle/user/router.d.ts +51 -56
- package/dist/src/welfare-cycle/user/service.d.ts +1 -1
- package/dist/src/withdraw/admin/router.d.ts +10 -10
- package/dist/src/withdraw/user/dto.schemas.d.ts +7 -0
- package/dist/src/withdraw/user/router.d.ts +55 -8
- package/dist/src/withdraw/user/service.d.ts +20 -1
- package/package.json +1 -1
|
@@ -1,25 +1,91 @@
|
|
|
1
1
|
import type { TransactionTx } from "../../db/transaction";
|
|
2
2
|
import type { WalletAdminListQueryType } from "../admin/dto.schemas";
|
|
3
3
|
declare abstract class BaseWalletService {
|
|
4
|
-
protected static
|
|
5
|
-
|
|
4
|
+
protected static serializeWalletRecord(item: {
|
|
5
|
+
id: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
walletTypeId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
isPrimary: boolean;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
walletType: {
|
|
6
14
|
id: string;
|
|
15
|
+
key: string;
|
|
7
16
|
name: string;
|
|
17
|
+
isSingleton: boolean;
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
sortOrder: number;
|
|
8
20
|
createdAt: Date;
|
|
9
21
|
updatedAt: Date;
|
|
10
|
-
|
|
22
|
+
};
|
|
23
|
+
user: {
|
|
24
|
+
id: string;
|
|
25
|
+
username: string | null;
|
|
26
|
+
displayUsername: string | null;
|
|
27
|
+
email: string;
|
|
28
|
+
phoneNumber: string | null;
|
|
29
|
+
role: string | null;
|
|
30
|
+
banned: boolean | null;
|
|
31
|
+
};
|
|
32
|
+
}): {
|
|
33
|
+
userInfo: {
|
|
34
|
+
id: string;
|
|
35
|
+
username: string | null;
|
|
36
|
+
displayUsername: string | null;
|
|
37
|
+
email: string;
|
|
38
|
+
phoneNumber: string | null;
|
|
39
|
+
role: string | null;
|
|
40
|
+
banned: boolean | null;
|
|
41
|
+
};
|
|
42
|
+
id: string;
|
|
43
|
+
userId: string;
|
|
44
|
+
walletTypeId: string;
|
|
45
|
+
name: string;
|
|
46
|
+
isPrimary: boolean;
|
|
47
|
+
isActive: boolean;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
walletType: {
|
|
51
|
+
id: string;
|
|
52
|
+
key: string;
|
|
53
|
+
name: string;
|
|
54
|
+
isSingleton: boolean;
|
|
11
55
|
isActive: boolean;
|
|
56
|
+
sortOrder: number;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
protected static listWalletsInternal(options?: WalletAdminListQueryType, defaultToCurrentUserId?: string): Promise<{
|
|
62
|
+
items: {
|
|
63
|
+
userInfo: {
|
|
64
|
+
id: string;
|
|
65
|
+
username: string | null;
|
|
66
|
+
displayUsername: string | null;
|
|
67
|
+
email: string;
|
|
68
|
+
phoneNumber: string | null;
|
|
69
|
+
role: string | null;
|
|
70
|
+
banned: boolean | null;
|
|
71
|
+
};
|
|
72
|
+
id: string;
|
|
73
|
+
userId: string;
|
|
12
74
|
walletTypeId: string;
|
|
75
|
+
name: string;
|
|
13
76
|
isPrimary: boolean;
|
|
77
|
+
isActive: boolean;
|
|
78
|
+
createdAt: Date;
|
|
79
|
+
updatedAt: Date;
|
|
14
80
|
walletType: {
|
|
15
81
|
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
createdAt: Date;
|
|
18
|
-
updatedAt: Date;
|
|
19
82
|
key: string;
|
|
83
|
+
name: string;
|
|
84
|
+
isSingleton: boolean;
|
|
20
85
|
isActive: boolean;
|
|
21
86
|
sortOrder: number;
|
|
22
|
-
|
|
87
|
+
createdAt: Date;
|
|
88
|
+
updatedAt: Date;
|
|
23
89
|
};
|
|
24
90
|
}[];
|
|
25
91
|
total: number;
|
|
@@ -46,25 +112,63 @@ export declare abstract class InternalWalletService extends BaseWalletService {
|
|
|
46
112
|
isSingleton: boolean;
|
|
47
113
|
};
|
|
48
114
|
}>;
|
|
49
|
-
static
|
|
50
|
-
|
|
115
|
+
static getWalletByIdInternal(walletId: string): Promise<{
|
|
116
|
+
userInfo: {
|
|
51
117
|
id: string;
|
|
118
|
+
username: string | null;
|
|
119
|
+
displayUsername: string | null;
|
|
120
|
+
email: string;
|
|
121
|
+
phoneNumber: string | null;
|
|
122
|
+
role: string | null;
|
|
123
|
+
banned: boolean | null;
|
|
124
|
+
};
|
|
125
|
+
id: string;
|
|
126
|
+
userId: string;
|
|
127
|
+
walletTypeId: string;
|
|
128
|
+
name: string;
|
|
129
|
+
isPrimary: boolean;
|
|
130
|
+
isActive: boolean;
|
|
131
|
+
createdAt: Date;
|
|
132
|
+
updatedAt: Date;
|
|
133
|
+
walletType: {
|
|
134
|
+
id: string;
|
|
135
|
+
key: string;
|
|
52
136
|
name: string;
|
|
137
|
+
isSingleton: boolean;
|
|
138
|
+
isActive: boolean;
|
|
139
|
+
sortOrder: number;
|
|
53
140
|
createdAt: Date;
|
|
54
141
|
updatedAt: Date;
|
|
142
|
+
};
|
|
143
|
+
}>;
|
|
144
|
+
static listWalletsForInternal(options?: WalletAdminListQueryType): Promise<{
|
|
145
|
+
items: {
|
|
146
|
+
userInfo: {
|
|
147
|
+
id: string;
|
|
148
|
+
username: string | null;
|
|
149
|
+
displayUsername: string | null;
|
|
150
|
+
email: string;
|
|
151
|
+
phoneNumber: string | null;
|
|
152
|
+
role: string | null;
|
|
153
|
+
banned: boolean | null;
|
|
154
|
+
};
|
|
155
|
+
id: string;
|
|
55
156
|
userId: string;
|
|
56
|
-
isActive: boolean;
|
|
57
157
|
walletTypeId: string;
|
|
158
|
+
name: string;
|
|
58
159
|
isPrimary: boolean;
|
|
160
|
+
isActive: boolean;
|
|
161
|
+
createdAt: Date;
|
|
162
|
+
updatedAt: Date;
|
|
59
163
|
walletType: {
|
|
60
164
|
id: string;
|
|
61
|
-
name: string;
|
|
62
|
-
createdAt: Date;
|
|
63
|
-
updatedAt: Date;
|
|
64
165
|
key: string;
|
|
166
|
+
name: string;
|
|
167
|
+
isSingleton: boolean;
|
|
65
168
|
isActive: boolean;
|
|
66
169
|
sortOrder: number;
|
|
67
|
-
|
|
170
|
+
createdAt: Date;
|
|
171
|
+
updatedAt: Date;
|
|
68
172
|
};
|
|
69
173
|
}[];
|
|
70
174
|
total: number;
|
|
@@ -3,8 +3,8 @@ export declare const walletResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
3
3
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
4
4
|
id: import("@sinclair/typebox").TString;
|
|
5
5
|
name: import("@sinclair/typebox").TString;
|
|
6
|
-
userId: import("@sinclair/typebox").TString;
|
|
7
6
|
isActive: import("@sinclair/typebox").TBoolean;
|
|
7
|
+
userId: import("@sinclair/typebox").TString;
|
|
8
8
|
walletTypeId: import("@sinclair/typebox").TString;
|
|
9
9
|
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
10
10
|
walletType: import("drizzle-typebox").BuildSchema<"select", {
|
|
@@ -162,8 +162,8 @@ export declare const walletListResponseSchema: import("@sinclair/typebox").TObje
|
|
|
162
162
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
163
163
|
id: import("@sinclair/typebox").TString;
|
|
164
164
|
name: import("@sinclair/typebox").TString;
|
|
165
|
-
userId: import("@sinclair/typebox").TString;
|
|
166
165
|
isActive: import("@sinclair/typebox").TBoolean;
|
|
166
|
+
userId: import("@sinclair/typebox").TString;
|
|
167
167
|
walletTypeId: import("@sinclair/typebox").TString;
|
|
168
168
|
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
169
169
|
walletType: import("drizzle-typebox").BuildSchema<"select", {
|
|
@@ -314,27 +314,11 @@ export declare const walletListResponseSchema: import("@sinclair/typebox").TObje
|
|
|
314
314
|
}>;
|
|
315
315
|
}>;
|
|
316
316
|
export type WalletListResponseType = typeof walletListResponseSchema.static;
|
|
317
|
-
export declare const
|
|
317
|
+
export declare const walletOverviewQuerySchema: import("@sinclair/typebox").TObject<{
|
|
318
318
|
quoteAsset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
319
319
|
}>;
|
|
320
|
-
export type
|
|
321
|
-
export declare const
|
|
322
|
-
quantity: import("@sinclair/typebox").TString;
|
|
323
|
-
valuation: import("@sinclair/typebox").TString;
|
|
324
|
-
}>;
|
|
325
|
-
export type FinanceOverviewBaseAssetValueType = typeof financeOverviewBaseAssetValueSchema.static;
|
|
326
|
-
export declare const financeOverviewWalletItemSchema: import("@sinclair/typebox").TObject<{
|
|
327
|
-
walletId: import("@sinclair/typebox").TString;
|
|
328
|
-
walletName: import("@sinclair/typebox").TString;
|
|
329
|
-
walletTypeId: import("@sinclair/typebox").TString;
|
|
330
|
-
walletTypeKey: import("@sinclair/typebox").TString;
|
|
331
|
-
walletTypeName: import("@sinclair/typebox").TString;
|
|
332
|
-
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
333
|
-
isActive: import("@sinclair/typebox").TBoolean;
|
|
334
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
335
|
-
}>;
|
|
336
|
-
export type FinanceOverviewWalletItemType = typeof financeOverviewWalletItemSchema.static;
|
|
337
|
-
export declare const financeOverviewAccountItemSchema: import("@sinclair/typebox").TObject<{
|
|
320
|
+
export type WalletOverviewQueryType = typeof walletOverviewQuerySchema.static;
|
|
321
|
+
export declare const walletOverviewAccountItemSchema: import("@sinclair/typebox").TObject<{
|
|
338
322
|
ledgerAccountId: import("@sinclair/typebox").TString;
|
|
339
323
|
assetId: import("@sinclair/typebox").TString;
|
|
340
324
|
assetCode: import("@sinclair/typebox").TString;
|
|
@@ -346,51 +330,7 @@ export declare const financeOverviewAccountItemSchema: import("@sinclair/typebox
|
|
|
346
330
|
quantity: import("@sinclair/typebox").TString;
|
|
347
331
|
totalValuation: import("@sinclair/typebox").TString;
|
|
348
332
|
}>;
|
|
349
|
-
export type
|
|
350
|
-
export declare const financeOverviewAssetItemSchema: import("@sinclair/typebox").TObject<{
|
|
351
|
-
assetId: import("@sinclair/typebox").TString;
|
|
352
|
-
assetCode: import("@sinclair/typebox").TString;
|
|
353
|
-
assetName: import("@sinclair/typebox").TString;
|
|
354
|
-
quantity: import("@sinclair/typebox").TString;
|
|
355
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
356
|
-
}>;
|
|
357
|
-
export type FinanceOverviewAssetItemType = typeof financeOverviewAssetItemSchema.static;
|
|
358
|
-
export declare const financeOverviewResponseSchema: import("@sinclair/typebox").TObject<{
|
|
359
|
-
quoteAsset: import("@sinclair/typebox").TString;
|
|
360
|
-
overview: import("@sinclair/typebox").TObject<{
|
|
361
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
362
|
-
}>;
|
|
363
|
-
walletView: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
364
|
-
walletId: import("@sinclair/typebox").TString;
|
|
365
|
-
walletName: import("@sinclair/typebox").TString;
|
|
366
|
-
walletTypeId: import("@sinclair/typebox").TString;
|
|
367
|
-
walletTypeKey: import("@sinclair/typebox").TString;
|
|
368
|
-
walletTypeName: import("@sinclair/typebox").TString;
|
|
369
|
-
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
370
|
-
isActive: import("@sinclair/typebox").TBoolean;
|
|
371
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
372
|
-
}>>;
|
|
373
|
-
accountView: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
374
|
-
ledgerAccountId: import("@sinclair/typebox").TString;
|
|
375
|
-
assetId: import("@sinclair/typebox").TString;
|
|
376
|
-
assetCode: import("@sinclair/typebox").TString;
|
|
377
|
-
assetName: import("@sinclair/typebox").TString;
|
|
378
|
-
ledgerAccountTypeId: import("@sinclair/typebox").TString;
|
|
379
|
-
ledgerAccountTypeKey: import("@sinclair/typebox").TString;
|
|
380
|
-
ledgerAccountTypeName: import("@sinclair/typebox").TString;
|
|
381
|
-
status: import("@sinclair/typebox").TString;
|
|
382
|
-
quantity: import("@sinclair/typebox").TString;
|
|
383
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
384
|
-
}>>;
|
|
385
|
-
assetView: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
386
|
-
assetId: import("@sinclair/typebox").TString;
|
|
387
|
-
assetCode: import("@sinclair/typebox").TString;
|
|
388
|
-
assetName: import("@sinclair/typebox").TString;
|
|
389
|
-
quantity: import("@sinclair/typebox").TString;
|
|
390
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
391
|
-
}>>;
|
|
392
|
-
}>;
|
|
393
|
-
export type FinanceOverviewResponseType = typeof financeOverviewResponseSchema.static;
|
|
333
|
+
export type WalletOverviewAccountItemType = typeof walletOverviewAccountItemSchema.static;
|
|
394
334
|
export declare const walletDetailParamsSchema: import("@sinclair/typebox").TObject<{
|
|
395
335
|
walletId: import("@sinclair/typebox").TString;
|
|
396
336
|
}>;
|
|
@@ -41,7 +41,7 @@ export declare const walletRouter: Elysia<"", {
|
|
|
41
41
|
route: string;
|
|
42
42
|
request: Request;
|
|
43
43
|
store: {};
|
|
44
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 100 | 500 | 418 | 200 |
|
|
44
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 100 | 500 | 418 | 200 | 422 | 400 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 421 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | 420 ? {
|
|
45
45
|
readonly 100: "Continue";
|
|
46
46
|
readonly 101: "Switching Protocols";
|
|
47
47
|
readonly 102: "Processing";
|
|
@@ -175,11 +175,11 @@ export declare const walletRouter: Elysia<"", {
|
|
|
175
175
|
emailVerified: boolean;
|
|
176
176
|
name: string;
|
|
177
177
|
image?: string | null | undefined | undefined;
|
|
178
|
-
phoneNumber?: string | null | undefined;
|
|
179
|
-
phoneNumberVerified?: boolean | null | undefined;
|
|
180
178
|
twoFactorEnabled: boolean | null | undefined;
|
|
181
179
|
username?: string | null | undefined;
|
|
182
180
|
displayUsername?: string | null | undefined;
|
|
181
|
+
phoneNumber?: string | null | undefined;
|
|
182
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
183
183
|
banned: boolean | null | undefined;
|
|
184
184
|
role?: string | null | undefined;
|
|
185
185
|
banReason?: string | null | undefined;
|
|
@@ -217,7 +217,7 @@ export declare const walletRouter: Elysia<"", {
|
|
|
217
217
|
route: string;
|
|
218
218
|
request: Request;
|
|
219
219
|
store: {};
|
|
220
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 100 | 500 | 418 | 200 |
|
|
220
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 100 | 500 | 418 | 200 | 422 | 400 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 421 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | 420 ? {
|
|
221
221
|
readonly 100: "Continue";
|
|
222
222
|
readonly 101: "Switching Protocols";
|
|
223
223
|
readonly 102: "Processing";
|
|
@@ -351,11 +351,11 @@ export declare const walletRouter: Elysia<"", {
|
|
|
351
351
|
emailVerified: boolean;
|
|
352
352
|
name: string;
|
|
353
353
|
image?: string | null | undefined | undefined;
|
|
354
|
-
phoneNumber?: string | null | undefined;
|
|
355
|
-
phoneNumberVerified?: boolean | null | undefined;
|
|
356
354
|
twoFactorEnabled: boolean | null | undefined;
|
|
357
355
|
username?: string | null | undefined;
|
|
358
356
|
displayUsername?: string | null | undefined;
|
|
357
|
+
phoneNumber?: string | null | undefined;
|
|
358
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
359
359
|
banned: boolean | null | undefined;
|
|
360
360
|
role?: string | null | undefined;
|
|
361
361
|
banReason?: string | null | undefined;
|
|
@@ -434,66 +434,6 @@ export declare const walletRouter: Elysia<"", {
|
|
|
434
434
|
};
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
|
-
} & {
|
|
438
|
-
finance: {
|
|
439
|
-
overview: {
|
|
440
|
-
get: {
|
|
441
|
-
body: {};
|
|
442
|
-
params: {};
|
|
443
|
-
query: {
|
|
444
|
-
quoteAsset?: string | undefined;
|
|
445
|
-
};
|
|
446
|
-
headers: {};
|
|
447
|
-
response: {
|
|
448
|
-
200: {
|
|
449
|
-
quoteAsset: string;
|
|
450
|
-
overview: {
|
|
451
|
-
totalValuation: string;
|
|
452
|
-
};
|
|
453
|
-
walletView: {
|
|
454
|
-
isActive: boolean;
|
|
455
|
-
walletTypeId: string;
|
|
456
|
-
isPrimary: boolean;
|
|
457
|
-
totalValuation: string;
|
|
458
|
-
walletTypeKey: string;
|
|
459
|
-
walletId: string;
|
|
460
|
-
walletName: string;
|
|
461
|
-
walletTypeName: string;
|
|
462
|
-
}[];
|
|
463
|
-
accountView: {
|
|
464
|
-
status: string;
|
|
465
|
-
assetId: string;
|
|
466
|
-
ledgerAccountTypeId: string;
|
|
467
|
-
assetCode: string;
|
|
468
|
-
ledgerAccountId: string;
|
|
469
|
-
totalValuation: string;
|
|
470
|
-
assetName: string;
|
|
471
|
-
quantity: string;
|
|
472
|
-
ledgerAccountTypeKey: string;
|
|
473
|
-
ledgerAccountTypeName: string;
|
|
474
|
-
}[];
|
|
475
|
-
assetView: {
|
|
476
|
-
assetId: string;
|
|
477
|
-
assetCode: string;
|
|
478
|
-
totalValuation: string;
|
|
479
|
-
assetName: string;
|
|
480
|
-
quantity: string;
|
|
481
|
-
}[];
|
|
482
|
-
};
|
|
483
|
-
422: {
|
|
484
|
-
type: "validation";
|
|
485
|
-
on: string;
|
|
486
|
-
summary?: string;
|
|
487
|
-
message?: string;
|
|
488
|
-
found?: unknown;
|
|
489
|
-
property?: string;
|
|
490
|
-
expected?: string;
|
|
491
|
-
};
|
|
492
|
-
401: "Unauthorized";
|
|
493
|
-
};
|
|
494
|
-
};
|
|
495
|
-
};
|
|
496
|
-
};
|
|
497
437
|
} & {
|
|
498
438
|
wallets: {
|
|
499
439
|
":walletId": {
|
|
@@ -536,10 +476,10 @@ export declare const walletRouter: Elysia<"", {
|
|
|
536
476
|
assetCode: string;
|
|
537
477
|
ledgerAccountId: string;
|
|
538
478
|
totalValuation: string;
|
|
539
|
-
assetName: string;
|
|
540
479
|
quantity: string;
|
|
541
480
|
ledgerAccountTypeKey: string;
|
|
542
481
|
ledgerAccountTypeName: string;
|
|
482
|
+
assetName: string;
|
|
543
483
|
}[];
|
|
544
484
|
};
|
|
545
485
|
422: {
|
|
@@ -574,11 +514,11 @@ export declare const walletRouter: Elysia<"", {
|
|
|
574
514
|
emailVerified: boolean;
|
|
575
515
|
name: string;
|
|
576
516
|
image?: string | null | undefined | undefined;
|
|
577
|
-
phoneNumber?: string | null | undefined;
|
|
578
|
-
phoneNumberVerified?: boolean | null | undefined;
|
|
579
517
|
twoFactorEnabled: boolean | null | undefined;
|
|
580
518
|
username?: string | null | undefined;
|
|
581
519
|
displayUsername?: string | null | undefined;
|
|
520
|
+
phoneNumber?: string | null | undefined;
|
|
521
|
+
phoneNumberVerified?: boolean | null | undefined;
|
|
582
522
|
banned: boolean | null | undefined;
|
|
583
523
|
role?: string | null | undefined;
|
|
584
524
|
banReason?: string | null | undefined;
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { InternalWalletService } from "../internal/service";
|
|
2
|
-
import type {
|
|
2
|
+
import type { WalletDetailParamsType, WalletListQueryType, WalletOverviewQueryType } from "./dto.schemas";
|
|
3
3
|
export declare abstract class UserWalletService extends InternalWalletService {
|
|
4
4
|
static listWallets(userId: string, options?: Omit<WalletListQueryType, "userId">): Promise<{
|
|
5
5
|
items: {
|
|
6
|
+
userInfo: {
|
|
7
|
+
id: string;
|
|
8
|
+
username: string | null;
|
|
9
|
+
displayUsername: string | null;
|
|
10
|
+
email: string;
|
|
11
|
+
phoneNumber: string | null;
|
|
12
|
+
role: string | null;
|
|
13
|
+
banned: boolean | null;
|
|
14
|
+
};
|
|
6
15
|
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
updatedAt: Date;
|
|
10
16
|
userId: string;
|
|
11
|
-
isActive: boolean;
|
|
12
17
|
walletTypeId: string;
|
|
18
|
+
name: string;
|
|
13
19
|
isPrimary: boolean;
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
14
23
|
walletType: {
|
|
15
24
|
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
createdAt: Date;
|
|
18
|
-
updatedAt: Date;
|
|
19
25
|
key: string;
|
|
26
|
+
name: string;
|
|
27
|
+
isSingleton: boolean;
|
|
20
28
|
isActive: boolean;
|
|
21
29
|
sortOrder: number;
|
|
22
|
-
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
23
32
|
};
|
|
24
33
|
}[];
|
|
25
34
|
total: number;
|
|
@@ -28,43 +37,8 @@ export declare abstract class UserWalletService extends InternalWalletService {
|
|
|
28
37
|
private static toDecimal;
|
|
29
38
|
private static getLatestPriceMapForAssets;
|
|
30
39
|
private static getValuationPrice;
|
|
31
|
-
private static
|
|
32
|
-
static
|
|
33
|
-
quoteAsset: string;
|
|
34
|
-
overview: {
|
|
35
|
-
totalValuation: string;
|
|
36
|
-
};
|
|
37
|
-
walletView: {
|
|
38
|
-
walletId: string;
|
|
39
|
-
walletName: string;
|
|
40
|
-
walletTypeId: string;
|
|
41
|
-
walletTypeKey: string;
|
|
42
|
-
walletTypeName: string;
|
|
43
|
-
isPrimary: boolean;
|
|
44
|
-
isActive: boolean;
|
|
45
|
-
totalValuation: string;
|
|
46
|
-
}[];
|
|
47
|
-
accountView: {
|
|
48
|
-
ledgerAccountId: string;
|
|
49
|
-
assetId: string;
|
|
50
|
-
assetCode: string;
|
|
51
|
-
assetName: string;
|
|
52
|
-
ledgerAccountTypeId: string;
|
|
53
|
-
ledgerAccountTypeKey: string;
|
|
54
|
-
ledgerAccountTypeName: string;
|
|
55
|
-
status: string;
|
|
56
|
-
quantity: string;
|
|
57
|
-
totalValuation: string;
|
|
58
|
-
}[];
|
|
59
|
-
assetView: {
|
|
60
|
-
assetId: string;
|
|
61
|
-
assetCode: string;
|
|
62
|
-
assetName: string;
|
|
63
|
-
quantity: string;
|
|
64
|
-
totalValuation: string;
|
|
65
|
-
}[];
|
|
66
|
-
}>;
|
|
67
|
-
static getWalletOverview(userId: string, params: WalletDetailParamsType, query?: FinanceOverviewQueryType): Promise<{
|
|
40
|
+
private static getWalletOverviewBaseData;
|
|
41
|
+
static getWalletOverview(userId: string, params: WalletDetailParamsType, query?: WalletOverviewQueryType): Promise<{
|
|
68
42
|
quoteAsset: string;
|
|
69
43
|
overview: {
|
|
70
44
|
totalValuation: string;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare const walletTypeKeyParamsSchema: import("@sinclair/typebox").TObject<{
|
|
2
|
+
key: import("@sinclair/typebox").TString;
|
|
3
|
+
}>;
|
|
4
|
+
export type WalletTypeKeyParamsType = typeof walletTypeKeyParamsSchema.static;
|
|
1
5
|
export declare const walletTypeAdminListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
2
6
|
key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
3
7
|
isActive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|