@r2wa-org/eden 0.0.84 → 0.0.86
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/admin/index.d.ts +40 -2
- package/dist/asset/admin/dto.schemas.d.ts +2 -2
- package/dist/asset/admin/router.d.ts +2 -2
- package/dist/index.d.ts +40 -2
- package/dist/market-pricing/admin/service.d.ts +3 -0
- package/dist/market-pricing/errors/index.d.ts +20 -0
- package/dist/market-pricing/errors/locales/zh.d.ts +20 -0
- package/dist/user/admin/dto.schemas.d.ts +15 -0
- package/dist/user/admin/router.d.ts +38 -0
- package/dist/user/admin/service.d.ts +10 -0
- package/package.json +1 -1
package/dist/admin/index.d.ts
CHANGED
|
@@ -1074,12 +1074,12 @@ export declare const adminRouter: Elysia<"/admin", {
|
|
|
1074
1074
|
symbol?: string | null | undefined;
|
|
1075
1075
|
isActive?: boolean | undefined;
|
|
1076
1076
|
typeId?: string | null | undefined;
|
|
1077
|
+
iconFileId?: string | null | undefined;
|
|
1077
1078
|
initialCnyPrice?: string | undefined;
|
|
1078
1079
|
name: string;
|
|
1079
1080
|
code: string;
|
|
1080
1081
|
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
1081
1082
|
precision: number;
|
|
1082
|
-
iconFileId: string;
|
|
1083
1083
|
};
|
|
1084
1084
|
params: {};
|
|
1085
1085
|
query: {};
|
|
@@ -1129,7 +1129,7 @@ export declare const adminRouter: Elysia<"/admin", {
|
|
|
1129
1129
|
isActive?: boolean | undefined;
|
|
1130
1130
|
typeId?: string | null | undefined;
|
|
1131
1131
|
precision?: number | undefined;
|
|
1132
|
-
iconFileId?: string | undefined;
|
|
1132
|
+
iconFileId?: string | null | undefined;
|
|
1133
1133
|
};
|
|
1134
1134
|
params: {
|
|
1135
1135
|
code: string;
|
|
@@ -9996,6 +9996,44 @@ export declare const adminRouter: Elysia<"/admin", {
|
|
|
9996
9996
|
};
|
|
9997
9997
|
};
|
|
9998
9998
|
};
|
|
9999
|
+
} & {
|
|
10000
|
+
users: {
|
|
10001
|
+
":userId": {
|
|
10002
|
+
"latest-session": {
|
|
10003
|
+
get: {
|
|
10004
|
+
body: {};
|
|
10005
|
+
params: {
|
|
10006
|
+
userId: string;
|
|
10007
|
+
};
|
|
10008
|
+
query: {};
|
|
10009
|
+
headers: {};
|
|
10010
|
+
response: {
|
|
10011
|
+
200: {
|
|
10012
|
+
id: string;
|
|
10013
|
+
createdAt: Date;
|
|
10014
|
+
updatedAt: Date;
|
|
10015
|
+
expiresAt: Date;
|
|
10016
|
+
ipAddress: string | null;
|
|
10017
|
+
userAgent: string | null;
|
|
10018
|
+
userId: string;
|
|
10019
|
+
impersonatedBy: string | null;
|
|
10020
|
+
} | null;
|
|
10021
|
+
401: "Unauthorized";
|
|
10022
|
+
403: "Forbidden: Admins only";
|
|
10023
|
+
422: {
|
|
10024
|
+
type: "validation";
|
|
10025
|
+
on: string;
|
|
10026
|
+
summary?: string;
|
|
10027
|
+
message?: string;
|
|
10028
|
+
found?: unknown;
|
|
10029
|
+
property?: string;
|
|
10030
|
+
expected?: string;
|
|
10031
|
+
};
|
|
10032
|
+
};
|
|
10033
|
+
};
|
|
10034
|
+
};
|
|
10035
|
+
};
|
|
10036
|
+
};
|
|
9999
10037
|
} & {
|
|
10000
10038
|
users: {
|
|
10001
10039
|
":userId": {
|
|
@@ -132,7 +132,7 @@ export declare const assetAdminCreateSchema: import("@sinclair/typebox").TObject
|
|
|
132
132
|
isActive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
133
133
|
typeId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
134
134
|
precision: import("@sinclair/typebox").TInteger;
|
|
135
|
-
iconFileId: import("@sinclair/typebox").TString
|
|
135
|
+
iconFileId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
136
136
|
initialCnyPrice: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
137
137
|
}>;
|
|
138
138
|
export type AssetAdminCreateInputType = typeof assetAdminCreateSchema.static;
|
|
@@ -148,7 +148,7 @@ export declare const assetAdminUpdateSchema: import("@sinclair/typebox").TObject
|
|
|
148
148
|
isActive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
149
149
|
typeId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
150
150
|
precision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
151
|
-
iconFileId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString
|
|
151
|
+
iconFileId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
152
152
|
}>;
|
|
153
153
|
export type AssetAdminUpdateInputType = typeof assetAdminUpdateSchema.static;
|
|
154
154
|
export declare const assetAdminStatusActionResponseSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -500,12 +500,12 @@ export declare const assetAdminRouter: Elysia<"/assets", {
|
|
|
500
500
|
symbol?: string | null | undefined;
|
|
501
501
|
isActive?: boolean | undefined;
|
|
502
502
|
typeId?: string | null | undefined;
|
|
503
|
+
iconFileId?: string | null | undefined;
|
|
503
504
|
initialCnyPrice?: string | undefined;
|
|
504
505
|
name: string;
|
|
505
506
|
code: string;
|
|
506
507
|
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
507
508
|
precision: number;
|
|
508
|
-
iconFileId: string;
|
|
509
509
|
};
|
|
510
510
|
params: {};
|
|
511
511
|
query: {};
|
|
@@ -555,7 +555,7 @@ export declare const assetAdminRouter: Elysia<"/assets", {
|
|
|
555
555
|
isActive?: boolean | undefined;
|
|
556
556
|
typeId?: string | null | undefined;
|
|
557
557
|
precision?: number | undefined;
|
|
558
|
-
iconFileId?: string | undefined;
|
|
558
|
+
iconFileId?: string | null | undefined;
|
|
559
559
|
};
|
|
560
560
|
params: {
|
|
561
561
|
code: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1397,12 +1397,12 @@ declare const app: Elysia<"/api", {
|
|
|
1397
1397
|
symbol?: string | null | undefined;
|
|
1398
1398
|
isActive?: boolean | undefined;
|
|
1399
1399
|
typeId?: string | null | undefined;
|
|
1400
|
+
iconFileId?: string | null | undefined;
|
|
1400
1401
|
initialCnyPrice?: string | undefined;
|
|
1401
1402
|
name: string;
|
|
1402
1403
|
code: string;
|
|
1403
1404
|
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
1404
1405
|
precision: number;
|
|
1405
|
-
iconFileId: string;
|
|
1406
1406
|
};
|
|
1407
1407
|
params: {};
|
|
1408
1408
|
query: {};
|
|
@@ -1452,7 +1452,7 @@ declare const app: Elysia<"/api", {
|
|
|
1452
1452
|
isActive?: boolean | undefined;
|
|
1453
1453
|
typeId?: string | null | undefined;
|
|
1454
1454
|
precision?: number | undefined;
|
|
1455
|
-
iconFileId?: string | undefined;
|
|
1455
|
+
iconFileId?: string | null | undefined;
|
|
1456
1456
|
};
|
|
1457
1457
|
params: {
|
|
1458
1458
|
code: string;
|
|
@@ -10319,6 +10319,44 @@ declare const app: Elysia<"/api", {
|
|
|
10319
10319
|
};
|
|
10320
10320
|
};
|
|
10321
10321
|
};
|
|
10322
|
+
} & {
|
|
10323
|
+
users: {
|
|
10324
|
+
":userId": {
|
|
10325
|
+
"latest-session": {
|
|
10326
|
+
get: {
|
|
10327
|
+
body: {};
|
|
10328
|
+
params: {
|
|
10329
|
+
userId: string;
|
|
10330
|
+
};
|
|
10331
|
+
query: {};
|
|
10332
|
+
headers: {};
|
|
10333
|
+
response: {
|
|
10334
|
+
200: {
|
|
10335
|
+
id: string;
|
|
10336
|
+
createdAt: Date;
|
|
10337
|
+
updatedAt: Date;
|
|
10338
|
+
expiresAt: Date;
|
|
10339
|
+
ipAddress: string | null;
|
|
10340
|
+
userAgent: string | null;
|
|
10341
|
+
userId: string;
|
|
10342
|
+
impersonatedBy: string | null;
|
|
10343
|
+
} | null;
|
|
10344
|
+
401: "Unauthorized";
|
|
10345
|
+
403: "Forbidden: Admins only";
|
|
10346
|
+
422: {
|
|
10347
|
+
type: "validation";
|
|
10348
|
+
on: string;
|
|
10349
|
+
summary?: string;
|
|
10350
|
+
message?: string;
|
|
10351
|
+
found?: unknown;
|
|
10352
|
+
property?: string;
|
|
10353
|
+
expected?: string;
|
|
10354
|
+
};
|
|
10355
|
+
};
|
|
10356
|
+
};
|
|
10357
|
+
};
|
|
10358
|
+
};
|
|
10359
|
+
};
|
|
10322
10360
|
} & {
|
|
10323
10361
|
users: {
|
|
10324
10362
|
":userId": {
|
|
@@ -6,6 +6,9 @@ export declare abstract class AdminMarketPricingService {
|
|
|
6
6
|
private static toDetailItem;
|
|
7
7
|
private static ensureBaseAssetAllowed;
|
|
8
8
|
private static resolveQuoteAssetId;
|
|
9
|
+
private static ensureStrategyPairUnique;
|
|
10
|
+
private static toDecimal;
|
|
11
|
+
private static validateStrategyChecks;
|
|
9
12
|
private static strategyAssetsWithQuery;
|
|
10
13
|
private static strategyAssetsWithListQuery;
|
|
11
14
|
static createStrategy(input: MarketPricingStrategyCreateInputType): Promise<{
|
|
@@ -2,6 +2,26 @@ export * from './locales/zh';
|
|
|
2
2
|
export declare const MarketPricingErrorCodes: {
|
|
3
3
|
readonly MARKET_PRICING_STRATEGY_NOT_FOUND: "MARKET_PRICING_STRATEGY_NOT_FOUND";
|
|
4
4
|
readonly MARKET_PRICING_STRATEGY_DISABLED: "MARKET_PRICING_STRATEGY_DISABLED";
|
|
5
|
+
readonly MARKET_PRICING_STRATEGY_PAIR_ALREADY_EXISTS: "MARKET_PRICING_STRATEGY_PAIR_ALREADY_EXISTS";
|
|
6
|
+
readonly MARKET_PRICING_STRATEGY_ASSETS_MUST_BE_DIFFERENT: "MARKET_PRICING_STRATEGY_ASSETS_MUST_BE_DIFFERENT";
|
|
7
|
+
readonly MARKET_PRICING_STRATEGY_INTERVAL_SECONDS_INVALID: "MARKET_PRICING_STRATEGY_INTERVAL_SECONDS_INVALID";
|
|
8
|
+
readonly MARKET_PRICING_STRATEGY_TREND_SWITCH_MIN_TICKS_INVALID: "MARKET_PRICING_STRATEGY_TREND_SWITCH_MIN_TICKS_INVALID";
|
|
9
|
+
readonly MARKET_PRICING_STRATEGY_TREND_SWITCH_MAX_TICKS_INVALID: "MARKET_PRICING_STRATEGY_TREND_SWITCH_MAX_TICKS_INVALID";
|
|
10
|
+
readonly MARKET_PRICING_STRATEGY_TREND_SWITCH_RANGE_INVALID: "MARKET_PRICING_STRATEGY_TREND_SWITCH_RANGE_INVALID";
|
|
11
|
+
readonly MARKET_PRICING_STRATEGY_TREND_UP_WEIGHT_INVALID: "MARKET_PRICING_STRATEGY_TREND_UP_WEIGHT_INVALID";
|
|
12
|
+
readonly MARKET_PRICING_STRATEGY_TREND_FLAT_WEIGHT_INVALID: "MARKET_PRICING_STRATEGY_TREND_FLAT_WEIGHT_INVALID";
|
|
13
|
+
readonly MARKET_PRICING_STRATEGY_TREND_DOWN_WEIGHT_INVALID: "MARKET_PRICING_STRATEGY_TREND_DOWN_WEIGHT_INVALID";
|
|
14
|
+
readonly MARKET_PRICING_STRATEGY_TREND_WEIGHT_SUM_INVALID: "MARKET_PRICING_STRATEGY_TREND_WEIGHT_SUM_INVALID";
|
|
15
|
+
readonly MARKET_PRICING_STRATEGY_NOISE_SIGMA_BPS_INVALID: "MARKET_PRICING_STRATEGY_NOISE_SIGMA_BPS_INVALID";
|
|
16
|
+
readonly MARKET_PRICING_STRATEGY_JUMP_CHANCE_BPS_INVALID: "MARKET_PRICING_STRATEGY_JUMP_CHANCE_BPS_INVALID";
|
|
17
|
+
readonly MARKET_PRICING_STRATEGY_JUMP_MIN_BPS_INVALID: "MARKET_PRICING_STRATEGY_JUMP_MIN_BPS_INVALID";
|
|
18
|
+
readonly MARKET_PRICING_STRATEGY_JUMP_MAX_BPS_INVALID: "MARKET_PRICING_STRATEGY_JUMP_MAX_BPS_INVALID";
|
|
19
|
+
readonly MARKET_PRICING_STRATEGY_JUMP_RANGE_INVALID: "MARKET_PRICING_STRATEGY_JUMP_RANGE_INVALID";
|
|
20
|
+
readonly MARKET_PRICING_STRATEGY_MEAN_REVERSION_BPS_INVALID: "MARKET_PRICING_STRATEGY_MEAN_REVERSION_BPS_INVALID";
|
|
21
|
+
readonly MARKET_PRICING_STRATEGY_ROUND_NUMBER_MAGNET_BPS_INVALID: "MARKET_PRICING_STRATEGY_ROUND_NUMBER_MAGNET_BPS_INVALID";
|
|
22
|
+
readonly MARKET_PRICING_STRATEGY_MIN_PRICE_INVALID: "MARKET_PRICING_STRATEGY_MIN_PRICE_INVALID";
|
|
23
|
+
readonly MARKET_PRICING_STRATEGY_MAX_PRICE_INVALID: "MARKET_PRICING_STRATEGY_MAX_PRICE_INVALID";
|
|
24
|
+
readonly MARKET_PRICING_STRATEGY_PRICE_RANGE_INVALID: "MARKET_PRICING_STRATEGY_PRICE_RANGE_INVALID";
|
|
5
25
|
readonly MARKET_PRICING_ASSET_NOT_FOUND: "MARKET_PRICING_ASSET_NOT_FOUND";
|
|
6
26
|
readonly MARKET_PRICING_BASE_ASSET_NOT_ALLOWED: "MARKET_PRICING_BASE_ASSET_NOT_ALLOWED";
|
|
7
27
|
readonly MARKET_PRICING_INVALID_PRICE: "MARKET_PRICING_INVALID_PRICE";
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
export declare const zh: {
|
|
2
2
|
MARKET_PRICING_STRATEGY_NOT_FOUND: string;
|
|
3
3
|
MARKET_PRICING_STRATEGY_DISABLED: string;
|
|
4
|
+
MARKET_PRICING_STRATEGY_PAIR_ALREADY_EXISTS: string;
|
|
5
|
+
MARKET_PRICING_STRATEGY_ASSETS_MUST_BE_DIFFERENT: string;
|
|
6
|
+
MARKET_PRICING_STRATEGY_INTERVAL_SECONDS_INVALID: string;
|
|
7
|
+
MARKET_PRICING_STRATEGY_TREND_SWITCH_MIN_TICKS_INVALID: string;
|
|
8
|
+
MARKET_PRICING_STRATEGY_TREND_SWITCH_MAX_TICKS_INVALID: string;
|
|
9
|
+
MARKET_PRICING_STRATEGY_TREND_SWITCH_RANGE_INVALID: string;
|
|
10
|
+
MARKET_PRICING_STRATEGY_TREND_UP_WEIGHT_INVALID: string;
|
|
11
|
+
MARKET_PRICING_STRATEGY_TREND_FLAT_WEIGHT_INVALID: string;
|
|
12
|
+
MARKET_PRICING_STRATEGY_TREND_DOWN_WEIGHT_INVALID: string;
|
|
13
|
+
MARKET_PRICING_STRATEGY_TREND_WEIGHT_SUM_INVALID: string;
|
|
14
|
+
MARKET_PRICING_STRATEGY_NOISE_SIGMA_BPS_INVALID: string;
|
|
15
|
+
MARKET_PRICING_STRATEGY_JUMP_CHANCE_BPS_INVALID: string;
|
|
16
|
+
MARKET_PRICING_STRATEGY_JUMP_MIN_BPS_INVALID: string;
|
|
17
|
+
MARKET_PRICING_STRATEGY_JUMP_MAX_BPS_INVALID: string;
|
|
18
|
+
MARKET_PRICING_STRATEGY_JUMP_RANGE_INVALID: string;
|
|
19
|
+
MARKET_PRICING_STRATEGY_MEAN_REVERSION_BPS_INVALID: string;
|
|
20
|
+
MARKET_PRICING_STRATEGY_ROUND_NUMBER_MAGNET_BPS_INVALID: string;
|
|
21
|
+
MARKET_PRICING_STRATEGY_MIN_PRICE_INVALID: string;
|
|
22
|
+
MARKET_PRICING_STRATEGY_MAX_PRICE_INVALID: string;
|
|
23
|
+
MARKET_PRICING_STRATEGY_PRICE_RANGE_INVALID: string;
|
|
4
24
|
MARKET_PRICING_ASSET_NOT_FOUND: string;
|
|
5
25
|
MARKET_PRICING_BASE_ASSET_NOT_ALLOWED: string;
|
|
6
26
|
MARKET_PRICING_INVALID_PRICE: string;
|
|
@@ -1437,3 +1437,18 @@ export declare const userAdminBanResponseSchema: import("@sinclair/typebox").TOb
|
|
|
1437
1437
|
success: import("@sinclair/typebox").TBoolean;
|
|
1438
1438
|
}>;
|
|
1439
1439
|
export type UserAdminBanResponseSchemaType = typeof userAdminBanResponseSchema.static;
|
|
1440
|
+
export declare const userAdminLatestSessionParamsSchema: import("@sinclair/typebox").TObject<{
|
|
1441
|
+
userId: import("@sinclair/typebox").TString;
|
|
1442
|
+
}>;
|
|
1443
|
+
export type UserAdminLatestSessionParamsSchemaType = typeof userAdminLatestSessionParamsSchema.static;
|
|
1444
|
+
export declare const userAdminLatestSessionResponseSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
1445
|
+
id: import("@sinclair/typebox").TString;
|
|
1446
|
+
createdAt: import("@sinclair/typebox").TDate;
|
|
1447
|
+
updatedAt: import("@sinclair/typebox").TDate;
|
|
1448
|
+
expiresAt: import("@sinclair/typebox").TDate;
|
|
1449
|
+
ipAddress: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
1450
|
+
userAgent: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
1451
|
+
userId: import("@sinclair/typebox").TString;
|
|
1452
|
+
impersonatedBy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
1453
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
1454
|
+
export type UserAdminLatestSessionResponseSchemaType = typeof userAdminLatestSessionResponseSchema.static;
|
|
@@ -741,6 +741,44 @@ export declare const userAdminRouter: Elysia<"/users", {
|
|
|
741
741
|
};
|
|
742
742
|
};
|
|
743
743
|
};
|
|
744
|
+
} & {
|
|
745
|
+
users: {
|
|
746
|
+
":userId": {
|
|
747
|
+
"latest-session": {
|
|
748
|
+
get: {
|
|
749
|
+
body: {};
|
|
750
|
+
params: {
|
|
751
|
+
userId: string;
|
|
752
|
+
};
|
|
753
|
+
query: {};
|
|
754
|
+
headers: {};
|
|
755
|
+
response: {
|
|
756
|
+
200: {
|
|
757
|
+
id: string;
|
|
758
|
+
createdAt: Date;
|
|
759
|
+
updatedAt: Date;
|
|
760
|
+
expiresAt: Date;
|
|
761
|
+
ipAddress: string | null;
|
|
762
|
+
userAgent: string | null;
|
|
763
|
+
userId: string;
|
|
764
|
+
impersonatedBy: string | null;
|
|
765
|
+
} | null;
|
|
766
|
+
401: "Unauthorized";
|
|
767
|
+
403: "Forbidden: Admins only";
|
|
768
|
+
422: {
|
|
769
|
+
type: "validation";
|
|
770
|
+
on: string;
|
|
771
|
+
summary?: string;
|
|
772
|
+
message?: string;
|
|
773
|
+
found?: unknown;
|
|
774
|
+
property?: string;
|
|
775
|
+
expected?: string;
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
};
|
|
744
782
|
} & {
|
|
745
783
|
users: {
|
|
746
784
|
":userId": {
|
|
@@ -128,6 +128,16 @@ export declare abstract class AdminUserService extends InternalUserService {
|
|
|
128
128
|
banReason: string | null;
|
|
129
129
|
banExpires: Date | null;
|
|
130
130
|
}>;
|
|
131
|
+
static getLatestSessionByUserId(userId: string): Promise<{
|
|
132
|
+
id: string;
|
|
133
|
+
createdAt: Date;
|
|
134
|
+
updatedAt: Date;
|
|
135
|
+
expiresAt: Date;
|
|
136
|
+
ipAddress: string | null;
|
|
137
|
+
userAgent: string | null;
|
|
138
|
+
userId: string;
|
|
139
|
+
impersonatedBy: string | null;
|
|
140
|
+
} | null>;
|
|
131
141
|
static updateProfile(userId: string, payload: UserProfileAdminUpdateSchemaType): Promise<{
|
|
132
142
|
userProfile: {
|
|
133
143
|
deletedAt: Date | null;
|