@r2wa-org/eden 0.0.81 → 0.0.82
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 +11 -4
- package/dist/asset/admin/dto.schemas.d.ts +14 -0
- package/dist/asset/admin/router.d.ts +7 -0
- package/dist/asset/admin/service.d.ts +8 -0
- package/dist/asset/user/dto.schemas.d.ts +14 -0
- package/dist/asset/user/router.d.ts +21 -0
- package/dist/asset/user/service.d.ts +8 -0
- package/dist/asset-price/cron.d.ts +7 -0
- package/dist/asset-price/internal/service.d.ts +6 -0
- package/dist/env/server.d.ts +1 -0
- package/dist/index.d.ts +32 -4
- package/dist/welfare-cycle/admin/dto.schemas.d.ts +4 -4
- package/dist/welfare-cycle/admin/router.d.ts +4 -4
- package/package.json +1 -1
package/dist/admin/index.d.ts
CHANGED
|
@@ -975,6 +975,13 @@ export declare const adminRouter: Elysia<"/admin", {
|
|
|
975
975
|
response: {
|
|
976
976
|
200: {
|
|
977
977
|
data: {
|
|
978
|
+
latestPrice?: {
|
|
979
|
+
quoteAssetId: string;
|
|
980
|
+
quoteAsset: string;
|
|
981
|
+
price: string;
|
|
982
|
+
source: string;
|
|
983
|
+
effectiveAt: Date;
|
|
984
|
+
} | null | undefined;
|
|
978
985
|
symbol: string | null;
|
|
979
986
|
type: {
|
|
980
987
|
id: string;
|
|
@@ -8020,16 +8027,16 @@ export declare const adminRouter: Elysia<"/admin", {
|
|
|
8020
8027
|
body: {
|
|
8021
8028
|
description?: string | null | undefined;
|
|
8022
8029
|
status?: "active" | "draft" | "paused" | "ended" | undefined;
|
|
8030
|
+
pricingAssetId?: string | undefined;
|
|
8031
|
+
sourcePricingAccountTypeId?: string | undefined;
|
|
8032
|
+
dailyPayoutAccountTypeId?: string | undefined;
|
|
8033
|
+
maturitySettlementAccountTypeId?: string | undefined;
|
|
8023
8034
|
minShares?: number | undefined;
|
|
8024
8035
|
maxSharesPerOrder?: number | null | undefined;
|
|
8025
8036
|
saleStartAt?: Date | null | undefined;
|
|
8026
8037
|
saleEndAt?: Date | null | undefined;
|
|
8027
8038
|
name: string;
|
|
8028
8039
|
rightsAssetId: string;
|
|
8029
|
-
pricingAssetId: string;
|
|
8030
|
-
sourcePricingAccountTypeId: string;
|
|
8031
|
-
dailyPayoutAccountTypeId: string;
|
|
8032
|
-
maturitySettlementAccountTypeId: string;
|
|
8033
8040
|
pricePerShare: string;
|
|
8034
8041
|
rightsPerShare: string;
|
|
8035
8042
|
cycleDays: number;
|
|
@@ -44,6 +44,13 @@ export declare const assetAdminItemResponseSchema: import("@sinclair/typebox").T
|
|
|
44
44
|
key: import("@sinclair/typebox").TString;
|
|
45
45
|
isActive: import("@sinclair/typebox").TBoolean;
|
|
46
46
|
}>, import("@sinclair/typebox").TNull]>;
|
|
47
|
+
latestPrice: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
48
|
+
quoteAssetId: import("@sinclair/typebox").TString;
|
|
49
|
+
quoteAsset: import("@sinclair/typebox").TString;
|
|
50
|
+
price: import("@sinclair/typebox").TString;
|
|
51
|
+
source: import("@sinclair/typebox").TString;
|
|
52
|
+
effectiveAt: import("@sinclair/typebox").TDate;
|
|
53
|
+
}>, import("@sinclair/typebox").TNull]>>;
|
|
47
54
|
}>;
|
|
48
55
|
export type AssetAdminItemResponseType = typeof assetAdminItemResponseSchema.static;
|
|
49
56
|
export declare const assetAdminListResponseSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -70,6 +77,13 @@ export declare const assetAdminListResponseSchema: import("@sinclair/typebox").T
|
|
|
70
77
|
key: import("@sinclair/typebox").TString;
|
|
71
78
|
isActive: import("@sinclair/typebox").TBoolean;
|
|
72
79
|
}>, import("@sinclair/typebox").TNull]>;
|
|
80
|
+
latestPrice: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
81
|
+
quoteAssetId: import("@sinclair/typebox").TString;
|
|
82
|
+
quoteAsset: import("@sinclair/typebox").TString;
|
|
83
|
+
price: import("@sinclair/typebox").TString;
|
|
84
|
+
source: import("@sinclair/typebox").TString;
|
|
85
|
+
effectiveAt: import("@sinclair/typebox").TDate;
|
|
86
|
+
}>, import("@sinclair/typebox").TNull]>>;
|
|
73
87
|
}>>;
|
|
74
88
|
pagination: import("@sinclair/typebox").TObject<{
|
|
75
89
|
pageSize: import("@sinclair/typebox").TNumber;
|
|
@@ -401,6 +401,13 @@ export declare const assetAdminRouter: Elysia<"/assets", {
|
|
|
401
401
|
response: {
|
|
402
402
|
200: {
|
|
403
403
|
data: {
|
|
404
|
+
latestPrice?: {
|
|
405
|
+
quoteAssetId: string;
|
|
406
|
+
quoteAsset: string;
|
|
407
|
+
price: string;
|
|
408
|
+
source: string;
|
|
409
|
+
effectiveAt: Date;
|
|
410
|
+
} | null | undefined;
|
|
404
411
|
symbol: string | null;
|
|
405
412
|
type: {
|
|
406
413
|
id: string;
|
|
@@ -3,11 +3,19 @@ import { BaseAssetService } from '../internal/service';
|
|
|
3
3
|
export interface AssetAdminListQueryOptions extends AssetAdminListQueryType {
|
|
4
4
|
}
|
|
5
5
|
export declare abstract class AdminAssetService extends BaseAssetService {
|
|
6
|
+
private static getLatestPriceMapForAssets;
|
|
6
7
|
private static resolveIconUrlByFileId;
|
|
7
8
|
private static buildAdminListWhere;
|
|
8
9
|
private static createInitialPriceInTx;
|
|
9
10
|
static listAssets(options?: AssetAdminListQueryOptions): Promise<{
|
|
10
11
|
items: {
|
|
12
|
+
latestPrice: {
|
|
13
|
+
quoteAssetId: string;
|
|
14
|
+
quoteAsset: string;
|
|
15
|
+
price: string;
|
|
16
|
+
source: string;
|
|
17
|
+
effectiveAt: Date;
|
|
18
|
+
} | null;
|
|
11
19
|
symbol: string | null;
|
|
12
20
|
id: string;
|
|
13
21
|
name: string;
|
|
@@ -34,6 +34,13 @@ export declare const assetUserItemResponseSchema: import("@sinclair/typebox").TO
|
|
|
34
34
|
key: import("@sinclair/typebox").TString;
|
|
35
35
|
isActive: import("@sinclair/typebox").TBoolean;
|
|
36
36
|
}>, import("@sinclair/typebox").TNull]>;
|
|
37
|
+
latestPrice: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
38
|
+
quoteAssetId: import("@sinclair/typebox").TString;
|
|
39
|
+
quoteAsset: import("@sinclair/typebox").TString;
|
|
40
|
+
price: import("@sinclair/typebox").TString;
|
|
41
|
+
source: import("@sinclair/typebox").TString;
|
|
42
|
+
effectiveAt: import("@sinclair/typebox").TDate;
|
|
43
|
+
}>, import("@sinclair/typebox").TNull]>>;
|
|
37
44
|
}>;
|
|
38
45
|
export type AssetUserItemResponseType = typeof assetUserItemResponseSchema.static;
|
|
39
46
|
export declare const assetUserIdParamsSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -66,6 +73,13 @@ export declare const assetUserListResponseSchema: import("@sinclair/typebox").TO
|
|
|
66
73
|
key: import("@sinclair/typebox").TString;
|
|
67
74
|
isActive: import("@sinclair/typebox").TBoolean;
|
|
68
75
|
}>, import("@sinclair/typebox").TNull]>;
|
|
76
|
+
latestPrice: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
77
|
+
quoteAssetId: import("@sinclair/typebox").TString;
|
|
78
|
+
quoteAsset: import("@sinclair/typebox").TString;
|
|
79
|
+
price: import("@sinclair/typebox").TString;
|
|
80
|
+
source: import("@sinclair/typebox").TString;
|
|
81
|
+
effectiveAt: import("@sinclair/typebox").TDate;
|
|
82
|
+
}>, import("@sinclair/typebox").TNull]>>;
|
|
69
83
|
}>>;
|
|
70
84
|
pagination: import("@sinclair/typebox").TObject<{
|
|
71
85
|
pageSize: import("@sinclair/typebox").TNumber;
|
|
@@ -397,6 +397,13 @@ export declare const assetRouter: Elysia<"/assets", {
|
|
|
397
397
|
response: {
|
|
398
398
|
200: {
|
|
399
399
|
data: {
|
|
400
|
+
latestPrice?: {
|
|
401
|
+
quoteAssetId: string;
|
|
402
|
+
quoteAsset: string;
|
|
403
|
+
price: string;
|
|
404
|
+
source: string;
|
|
405
|
+
effectiveAt: Date;
|
|
406
|
+
} | null | undefined;
|
|
400
407
|
symbol: string | null;
|
|
401
408
|
type: {
|
|
402
409
|
id: string;
|
|
@@ -447,6 +454,13 @@ export declare const assetRouter: Elysia<"/assets", {
|
|
|
447
454
|
headers: {};
|
|
448
455
|
response: {
|
|
449
456
|
200: {
|
|
457
|
+
latestPrice?: {
|
|
458
|
+
quoteAssetId: string;
|
|
459
|
+
quoteAsset: string;
|
|
460
|
+
price: string;
|
|
461
|
+
source: string;
|
|
462
|
+
effectiveAt: Date;
|
|
463
|
+
} | null | undefined;
|
|
450
464
|
symbol: string | null;
|
|
451
465
|
type: {
|
|
452
466
|
id: string;
|
|
@@ -490,6 +504,13 @@ export declare const assetRouter: Elysia<"/assets", {
|
|
|
490
504
|
headers: {};
|
|
491
505
|
response: {
|
|
492
506
|
200: {
|
|
507
|
+
latestPrice?: {
|
|
508
|
+
quoteAssetId: string;
|
|
509
|
+
quoteAsset: string;
|
|
510
|
+
price: string;
|
|
511
|
+
source: string;
|
|
512
|
+
effectiveAt: Date;
|
|
513
|
+
} | null | undefined;
|
|
493
514
|
symbol: string | null;
|
|
494
515
|
type: {
|
|
495
516
|
id: string;
|
|
@@ -3,8 +3,16 @@ import { BaseAssetService } from '../internal/service';
|
|
|
3
3
|
export interface AssetUserListQueryOptions extends AssetUserListQueryType {
|
|
4
4
|
}
|
|
5
5
|
export declare abstract class UserAssetService extends BaseAssetService {
|
|
6
|
+
private static getLatestPriceMapForAssets;
|
|
6
7
|
static listAssets(options?: AssetUserListQueryOptions): Promise<{
|
|
7
8
|
items: {
|
|
9
|
+
latestPrice: {
|
|
10
|
+
price: string;
|
|
11
|
+
source: string;
|
|
12
|
+
effectiveAt: Date;
|
|
13
|
+
quoteAssetId: string;
|
|
14
|
+
quoteAsset: string;
|
|
15
|
+
} | null;
|
|
8
16
|
symbol: string | null;
|
|
9
17
|
id: string;
|
|
10
18
|
name: string;
|
|
@@ -11,4 +11,10 @@ export declare abstract class InternalAssetPriceService {
|
|
|
11
11
|
source: string;
|
|
12
12
|
effectiveAt: Date;
|
|
13
13
|
}>;
|
|
14
|
+
static cleanupExpiredHistory(retentionMonths: number, now?: Date, batchSize?: number): Promise<{
|
|
15
|
+
deletedCount: number;
|
|
16
|
+
retentionMonths: number;
|
|
17
|
+
cutoffAt: Date;
|
|
18
|
+
batchSize: number;
|
|
19
|
+
}>;
|
|
14
20
|
}
|
package/dist/env/server.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ declare const _default: {
|
|
|
2
2
|
TZ?: string | undefined;
|
|
3
3
|
PGTZ?: string | undefined;
|
|
4
4
|
LOG_LEVEL?: "debug" | "info" | "warn" | "error" | undefined;
|
|
5
|
+
ASSET_PRICE_RETENTION_MONTHS?: number | undefined;
|
|
5
6
|
HTTP_ACCESS_LOG?: boolean | undefined;
|
|
6
7
|
ALLOWED_ORIGINS?: string[] | undefined;
|
|
7
8
|
FEATURE_FLAGS?: string[] | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1298,6 +1298,13 @@ declare const app: Elysia<"/api", {
|
|
|
1298
1298
|
response: {
|
|
1299
1299
|
200: {
|
|
1300
1300
|
data: {
|
|
1301
|
+
latestPrice?: {
|
|
1302
|
+
quoteAssetId: string;
|
|
1303
|
+
quoteAsset: string;
|
|
1304
|
+
price: string;
|
|
1305
|
+
source: string;
|
|
1306
|
+
effectiveAt: Date;
|
|
1307
|
+
} | null | undefined;
|
|
1301
1308
|
symbol: string | null;
|
|
1302
1309
|
type: {
|
|
1303
1310
|
id: string;
|
|
@@ -8343,16 +8350,16 @@ declare const app: Elysia<"/api", {
|
|
|
8343
8350
|
body: {
|
|
8344
8351
|
description?: string | null | undefined;
|
|
8345
8352
|
status?: "active" | "draft" | "paused" | "ended" | undefined;
|
|
8353
|
+
pricingAssetId?: string | undefined;
|
|
8354
|
+
sourcePricingAccountTypeId?: string | undefined;
|
|
8355
|
+
dailyPayoutAccountTypeId?: string | undefined;
|
|
8356
|
+
maturitySettlementAccountTypeId?: string | undefined;
|
|
8346
8357
|
minShares?: number | undefined;
|
|
8347
8358
|
maxSharesPerOrder?: number | null | undefined;
|
|
8348
8359
|
saleStartAt?: Date | null | undefined;
|
|
8349
8360
|
saleEndAt?: Date | null | undefined;
|
|
8350
8361
|
name: string;
|
|
8351
8362
|
rightsAssetId: string;
|
|
8352
|
-
pricingAssetId: string;
|
|
8353
|
-
sourcePricingAccountTypeId: string;
|
|
8354
|
-
dailyPayoutAccountTypeId: string;
|
|
8355
|
-
maturitySettlementAccountTypeId: string;
|
|
8356
8363
|
pricePerShare: string;
|
|
8357
8364
|
rightsPerShare: string;
|
|
8358
8365
|
cycleDays: number;
|
|
@@ -11061,6 +11068,13 @@ declare const app: Elysia<"/api", {
|
|
|
11061
11068
|
response: {
|
|
11062
11069
|
200: {
|
|
11063
11070
|
data: {
|
|
11071
|
+
latestPrice?: {
|
|
11072
|
+
quoteAssetId: string;
|
|
11073
|
+
quoteAsset: string;
|
|
11074
|
+
price: string;
|
|
11075
|
+
source: string;
|
|
11076
|
+
effectiveAt: Date;
|
|
11077
|
+
} | null | undefined;
|
|
11064
11078
|
symbol: string | null;
|
|
11065
11079
|
type: {
|
|
11066
11080
|
id: string;
|
|
@@ -11111,6 +11125,13 @@ declare const app: Elysia<"/api", {
|
|
|
11111
11125
|
headers: {};
|
|
11112
11126
|
response: {
|
|
11113
11127
|
200: {
|
|
11128
|
+
latestPrice?: {
|
|
11129
|
+
quoteAssetId: string;
|
|
11130
|
+
quoteAsset: string;
|
|
11131
|
+
price: string;
|
|
11132
|
+
source: string;
|
|
11133
|
+
effectiveAt: Date;
|
|
11134
|
+
} | null | undefined;
|
|
11114
11135
|
symbol: string | null;
|
|
11115
11136
|
type: {
|
|
11116
11137
|
id: string;
|
|
@@ -11154,6 +11175,13 @@ declare const app: Elysia<"/api", {
|
|
|
11154
11175
|
headers: {};
|
|
11155
11176
|
response: {
|
|
11156
11177
|
200: {
|
|
11178
|
+
latestPrice?: {
|
|
11179
|
+
quoteAssetId: string;
|
|
11180
|
+
quoteAsset: string;
|
|
11181
|
+
price: string;
|
|
11182
|
+
source: string;
|
|
11183
|
+
effectiveAt: Date;
|
|
11184
|
+
} | null | undefined;
|
|
11157
11185
|
symbol: string | null;
|
|
11158
11186
|
type: {
|
|
11159
11187
|
id: string;
|
|
@@ -12,10 +12,6 @@ export declare const welfareCyclePlanCreateSchema: import("@sinclair/typebox").T
|
|
|
12
12
|
ended: "ended";
|
|
13
13
|
}>>;
|
|
14
14
|
rightsAssetId: import("@sinclair/typebox").TString;
|
|
15
|
-
pricingAssetId: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TString]>;
|
|
16
|
-
sourcePricingAccountTypeId: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TString]>;
|
|
17
|
-
dailyPayoutAccountTypeId: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TString]>;
|
|
18
|
-
maturitySettlementAccountTypeId: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TString]>;
|
|
19
15
|
pricePerShare: import("@sinclair/typebox").TString;
|
|
20
16
|
rightsPerShare: import("@sinclair/typebox").TString;
|
|
21
17
|
cycleDays: import("@sinclair/typebox").TInteger;
|
|
@@ -25,6 +21,10 @@ export declare const welfareCyclePlanCreateSchema: import("@sinclair/typebox").T
|
|
|
25
21
|
maxSharesPerOrder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>>;
|
|
26
22
|
saleStartAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>>;
|
|
27
23
|
saleEndAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>>;
|
|
24
|
+
pricingAssetId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25
|
+
sourcePricingAccountTypeId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
dailyPayoutAccountTypeId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
27
|
+
maturitySettlementAccountTypeId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
28
|
coverImageFileId: import("@sinclair/typebox").TString;
|
|
29
29
|
}>;
|
|
30
30
|
export type WelfareCyclePlanCreateInputType = typeof welfareCyclePlanCreateSchema.static;
|
|
@@ -386,16 +386,16 @@ export declare const welfareCycleAdminRouter: Elysia<"/welfare_cycle", {
|
|
|
386
386
|
body: {
|
|
387
387
|
description?: string | null | undefined;
|
|
388
388
|
status?: "active" | "draft" | "paused" | "ended" | undefined;
|
|
389
|
+
pricingAssetId?: string | undefined;
|
|
390
|
+
sourcePricingAccountTypeId?: string | undefined;
|
|
391
|
+
dailyPayoutAccountTypeId?: string | undefined;
|
|
392
|
+
maturitySettlementAccountTypeId?: string | undefined;
|
|
389
393
|
minShares?: number | undefined;
|
|
390
394
|
maxSharesPerOrder?: number | null | undefined;
|
|
391
395
|
saleStartAt?: Date | null | undefined;
|
|
392
396
|
saleEndAt?: Date | null | undefined;
|
|
393
397
|
name: string;
|
|
394
398
|
rightsAssetId: string;
|
|
395
|
-
pricingAssetId: string;
|
|
396
|
-
sourcePricingAccountTypeId: string;
|
|
397
|
-
dailyPayoutAccountTypeId: string;
|
|
398
|
-
maturitySettlementAccountTypeId: string;
|
|
399
399
|
pricePerShare: string;
|
|
400
400
|
rightsPerShare: string;
|
|
401
401
|
cycleDays: number;
|