@r2wa-org/eden 0.0.97 → 0.0.100
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 +1460 -86
- package/dist/asset/admin/router.d.ts +1 -13
- package/dist/asset-convert-product/admin/dto.schemas.d.ts +8 -0
- package/dist/asset-convert-product/admin/router.d.ts +25 -13
- package/dist/asset-convert-product/admin/service.d.ts +12 -12
- package/dist/auth/better-auth.d.ts +19 -1
- package/dist/auth/i18n/zh.d.ts +100 -0
- package/dist/auth/permissions.d.ts +16 -1
- package/dist/auth/roles.d.ts +45 -0
- package/dist/check-in/admin/reward.dto.schemas.d.ts +294 -0
- package/dist/check-in/admin/reward.router.d.ts +1192 -0
- package/dist/check-in/admin/reward.service.d.ts +479 -0
- package/dist/check-in/admin/router.d.ts +745 -0
- package/dist/check-in/errors/index.d.ts +9 -0
- package/dist/check-in/errors/locales/zh.d.ts +9 -0
- package/dist/check-in/index.d.ts +5 -0
- package/dist/check-in/internal/reward-config.service.d.ts +66 -0
- package/dist/check-in/permissions.d.ts +2 -0
- package/dist/check-in/reward.db.schemas.d.ts +896 -0
- package/dist/check-in/reward.schema.d.ts +477 -0
- package/dist/content-video/admin/dto.schemas.d.ts +128 -0
- package/dist/content-video/admin/router.d.ts +861 -0
- package/dist/content-video/admin/service.d.ts +211 -0
- package/dist/content-video/db.schemas.d.ts +486 -0
- package/dist/content-video/errors/index.d.ts +17 -0
- package/dist/content-video/errors/locales/zh.d.ts +16 -0
- package/dist/content-video/index.d.ts +8 -0
- package/dist/content-video/internal/service.d.ts +106 -0
- package/dist/content-video/permissions.d.ts +4 -0
- package/dist/content-video/schema.d.ts +257 -0
- package/dist/content-video/user/dto.schemas.d.ts +52 -0
- package/dist/content-video/user/router.d.ts +494 -0
- package/dist/content-video/user/service.d.ts +36 -0
- package/dist/db/schemas.d.ts +2 -0
- package/dist/file-storage/admin/dto.schemas.d.ts +4 -0
- package/dist/file-storage/admin/router.d.ts +2 -2
- package/dist/file-storage/admin/service.d.ts +2 -2
- package/dist/file-storage/db.schemas.d.ts +4 -4
- package/dist/file-storage/internal/service.d.ts +1 -1
- package/dist/file-storage/s3.client.d.ts +22 -0
- package/dist/file-storage/schema.d.ts +3 -3
- package/dist/file-storage/share/dto.schemas.d.ts +1 -0
- package/dist/file-storage/share/router.d.ts +1 -1
- package/dist/file-storage/user/dto.schemas.d.ts +6 -4
- package/dist/file-storage/user/router.d.ts +3 -3
- package/dist/file-storage/user/service.d.ts +2 -2
- package/dist/index.d.ts +1875 -215
- package/dist/ledger/admin/dto.schemas.d.ts +8 -0
- package/dist/ledger/admin/router.d.ts +4 -4
- package/dist/ledger/db.schemas.d.ts +8 -8
- package/dist/ledger/schema.d.ts +6 -6
- package/dist/ledger/user/dto.schemas.d.ts +8 -8
- package/dist/ledger/user/router.d.ts +2 -2
- package/dist/ledger/user/service.d.ts +2 -2
- package/dist/ledger-account-type/admin/router.d.ts +1 -13
- package/dist/lock-activity/admin/dto.schemas.d.ts +16 -0
- package/dist/lock-activity/admin/participation.dto.schemas.d.ts +52 -0
- package/dist/lock-activity/admin/reward.service.d.ts +48 -0
- package/dist/lock-activity/admin/router.d.ts +127 -0
- package/dist/lock-activity/admin/service.d.ts +134 -8
- package/dist/lock-activity/constants.d.ts +2 -0
- package/dist/lock-activity/cron.d.ts +6 -0
- package/dist/lock-activity/db.schemas.d.ts +34 -0
- package/dist/lock-activity/errors/index.d.ts +3 -0
- package/dist/lock-activity/errors/locales/zh.d.ts +3 -0
- package/dist/lock-activity/internal/reward.service.d.ts +15 -0
- package/dist/lock-activity/internal/service.d.ts +41 -0
- package/dist/lock-activity/schema.d.ts +18 -0
- package/dist/lock-activity/shared.dto.schemas.d.ts +7 -0
- package/dist/lock-activity/user/dto.schemas.d.ts +24 -0
- package/dist/lock-activity/user/router.d.ts +16 -0
- package/dist/lock-activity/user/service.d.ts +39 -3
- package/dist/news/admin/dto.schemas.d.ts +26 -26
- package/dist/news/admin/router.d.ts +25 -25
- package/dist/news/admin/service.d.ts +4 -1
- package/dist/news/user/service.d.ts +2 -2
- package/dist/referral/admin/dto.schemas.d.ts +597 -0
- package/dist/referral/admin/router.d.ts +565 -0
- package/dist/referral/admin/service.d.ts +6 -0
- package/dist/referral/errors/index.d.ts +15 -0
- package/dist/referral/errors/locales/zh.d.ts +14 -0
- package/dist/referral/index.d.ts +10 -0
- package/dist/referral/internal/service.d.ts +23 -0
- package/dist/referral/user/dto.schemas.d.ts +602 -0
- package/dist/referral/user/router.d.ts +606 -0
- package/dist/referral/user/service.d.ts +21 -0
- package/dist/user/internal/avatar.service.d.ts +42 -0
- package/dist/withdraw/user/router.d.ts +1 -13
- package/package.json +1 -1
|
@@ -400,6 +400,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
400
400
|
headers: {};
|
|
401
401
|
response: {
|
|
402
402
|
200: {
|
|
403
|
+
coverImageFile?: {
|
|
404
|
+
id: string;
|
|
405
|
+
fileName: string | null;
|
|
406
|
+
mimeType: string | null;
|
|
407
|
+
fileSize: number | null;
|
|
408
|
+
publicUrl: string | null;
|
|
409
|
+
} | undefined;
|
|
410
|
+
coverImageFileId: string | null;
|
|
403
411
|
coverImageUrl: string;
|
|
404
412
|
createdAt: Date;
|
|
405
413
|
description: string | null;
|
|
@@ -468,6 +476,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
468
476
|
headers: {};
|
|
469
477
|
response: {
|
|
470
478
|
200: {
|
|
479
|
+
coverImageFile?: {
|
|
480
|
+
id: string;
|
|
481
|
+
fileName: string | null;
|
|
482
|
+
mimeType: string | null;
|
|
483
|
+
fileSize: number | null;
|
|
484
|
+
publicUrl: string | null;
|
|
485
|
+
} | undefined;
|
|
486
|
+
coverImageFileId: string | null;
|
|
471
487
|
coverImageUrl: string;
|
|
472
488
|
createdAt: Date;
|
|
473
489
|
description: string | null;
|
|
@@ -526,6 +542,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
526
542
|
headers: {};
|
|
527
543
|
response: {
|
|
528
544
|
200: {
|
|
545
|
+
coverImageFile?: {
|
|
546
|
+
id: string;
|
|
547
|
+
fileName: string | null;
|
|
548
|
+
mimeType: string | null;
|
|
549
|
+
fileSize: number | null;
|
|
550
|
+
publicUrl: string | null;
|
|
551
|
+
} | undefined;
|
|
552
|
+
coverImageFileId: string | null;
|
|
529
553
|
coverImageUrl: string;
|
|
530
554
|
createdAt: Date;
|
|
531
555
|
description: string | null;
|
|
@@ -590,6 +614,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
590
614
|
response: {
|
|
591
615
|
200: {
|
|
592
616
|
data: {
|
|
617
|
+
coverImageFile?: {
|
|
618
|
+
id: string;
|
|
619
|
+
fileName: string | null;
|
|
620
|
+
mimeType: string | null;
|
|
621
|
+
fileSize: number | null;
|
|
622
|
+
publicUrl: string | null;
|
|
623
|
+
} | undefined;
|
|
624
|
+
coverImageFileId: string | null;
|
|
593
625
|
coverImageUrl: string;
|
|
594
626
|
createdAt: Date;
|
|
595
627
|
description: string | null;
|
|
@@ -656,6 +688,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
656
688
|
headers: {};
|
|
657
689
|
response: {
|
|
658
690
|
200: {
|
|
691
|
+
coverImageFile?: {
|
|
692
|
+
id: string;
|
|
693
|
+
fileName: string | null;
|
|
694
|
+
mimeType: string | null;
|
|
695
|
+
fileSize: number | null;
|
|
696
|
+
publicUrl: string | null;
|
|
697
|
+
} | undefined;
|
|
698
|
+
coverImageFileId: string | null;
|
|
659
699
|
coverImageUrl: string;
|
|
660
700
|
createdAt: Date;
|
|
661
701
|
description: string | null;
|
|
@@ -716,6 +756,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
716
756
|
headers: {};
|
|
717
757
|
response: {
|
|
718
758
|
200: {
|
|
759
|
+
coverImageFile?: {
|
|
760
|
+
id: string;
|
|
761
|
+
fileName: string | null;
|
|
762
|
+
mimeType: string | null;
|
|
763
|
+
fileSize: number | null;
|
|
764
|
+
publicUrl: string | null;
|
|
765
|
+
} | undefined;
|
|
766
|
+
coverImageFileId: string | null;
|
|
719
767
|
coverImageUrl: string;
|
|
720
768
|
createdAt: Date;
|
|
721
769
|
description: string | null;
|
|
@@ -776,6 +824,14 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
776
824
|
headers: {};
|
|
777
825
|
response: {
|
|
778
826
|
200: {
|
|
827
|
+
coverImageFile?: {
|
|
828
|
+
id: string;
|
|
829
|
+
fileName: string | null;
|
|
830
|
+
mimeType: string | null;
|
|
831
|
+
fileSize: number | null;
|
|
832
|
+
publicUrl: string | null;
|
|
833
|
+
} | undefined;
|
|
834
|
+
coverImageFileId: string | null;
|
|
779
835
|
coverImageUrl: string;
|
|
780
836
|
createdAt: Date;
|
|
781
837
|
description: string | null;
|
|
@@ -1194,6 +1250,77 @@ export declare const lockActivityAdminRouter: Elysia<"/lock_activity", {
|
|
|
1194
1250
|
};
|
|
1195
1251
|
};
|
|
1196
1252
|
};
|
|
1253
|
+
} & {
|
|
1254
|
+
lock_activity: {
|
|
1255
|
+
participations: {
|
|
1256
|
+
":id": {
|
|
1257
|
+
"issue-reward": {
|
|
1258
|
+
post: {
|
|
1259
|
+
body: {};
|
|
1260
|
+
params: {
|
|
1261
|
+
id: string;
|
|
1262
|
+
};
|
|
1263
|
+
query: {};
|
|
1264
|
+
headers: {};
|
|
1265
|
+
response: {
|
|
1266
|
+
200: {
|
|
1267
|
+
activity: {
|
|
1268
|
+
id: string;
|
|
1269
|
+
title: string;
|
|
1270
|
+
startAt: Date;
|
|
1271
|
+
endAt: Date;
|
|
1272
|
+
status: "active" | "cancelled" | "draft" | "ended";
|
|
1273
|
+
};
|
|
1274
|
+
activityId: string;
|
|
1275
|
+
adminRemark: string | null;
|
|
1276
|
+
createdAt: Date;
|
|
1277
|
+
id: string;
|
|
1278
|
+
inviteCode: string;
|
|
1279
|
+
inviter?: {
|
|
1280
|
+
id: string;
|
|
1281
|
+
email: string;
|
|
1282
|
+
username: string | null;
|
|
1283
|
+
} | undefined;
|
|
1284
|
+
inviterMatched: boolean;
|
|
1285
|
+
inviterUserId: string | null;
|
|
1286
|
+
isIdempotent: boolean;
|
|
1287
|
+
ledgerEntryId: string;
|
|
1288
|
+
rejectReason: string | null;
|
|
1289
|
+
reviewedAt: Date | null;
|
|
1290
|
+
rewardAmount: string;
|
|
1291
|
+
rewardIssuedAt: Date | null;
|
|
1292
|
+
status: "rejected" | "reward_issued" | "submitted" | "under_review";
|
|
1293
|
+
submittedAt: Date;
|
|
1294
|
+
updatedAt: Date;
|
|
1295
|
+
user: {
|
|
1296
|
+
id: string;
|
|
1297
|
+
email: string;
|
|
1298
|
+
username: string | null;
|
|
1299
|
+
profile?: {
|
|
1300
|
+
uid: string;
|
|
1301
|
+
country: string | null;
|
|
1302
|
+
referralCode: string | null;
|
|
1303
|
+
} | undefined;
|
|
1304
|
+
};
|
|
1305
|
+
userId: string;
|
|
1306
|
+
};
|
|
1307
|
+
401: "Unauthorized";
|
|
1308
|
+
403: "Forbidden: Admins only";
|
|
1309
|
+
422: {
|
|
1310
|
+
type: 'validation';
|
|
1311
|
+
on: string;
|
|
1312
|
+
summary?: string;
|
|
1313
|
+
message?: string;
|
|
1314
|
+
found?: unknown;
|
|
1315
|
+
property?: string;
|
|
1316
|
+
expected?: string;
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
};
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1197
1324
|
}, {
|
|
1198
1325
|
derive: {};
|
|
1199
1326
|
resolve: {};
|
|
@@ -2,7 +2,16 @@ import type { LockActivityCreateInputType, LockActivityListQueryType, LockActivi
|
|
|
2
2
|
export declare abstract class AdminLockActivityService {
|
|
3
3
|
private static getActivityDetail;
|
|
4
4
|
private static assertCoreUpdateAllowed;
|
|
5
|
-
static createActivity(input: LockActivityCreateInputType): Promise<{
|
|
5
|
+
static createActivity(input: LockActivityCreateInputType): Promise<Omit<{
|
|
6
|
+
coverImageFile: {
|
|
7
|
+
fileName: string | null;
|
|
8
|
+
fileSize: number | null;
|
|
9
|
+
id: string;
|
|
10
|
+
mimeType: string | null;
|
|
11
|
+
publicUrl: string | null;
|
|
12
|
+
thumbnailUrl: string | null;
|
|
13
|
+
} | null;
|
|
14
|
+
coverImageFileId: string | null;
|
|
6
15
|
coverImageUrl: string;
|
|
7
16
|
createdAt: Date;
|
|
8
17
|
description: string | null;
|
|
@@ -55,8 +64,26 @@ export declare abstract class AdminLockActivityService {
|
|
|
55
64
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
56
65
|
title: string;
|
|
57
66
|
updatedAt: Date;
|
|
67
|
+
}, "coverImageFile"> & {
|
|
68
|
+
coverImageUrl: string;
|
|
69
|
+
coverImageFile: {
|
|
70
|
+
id: string;
|
|
71
|
+
fileName: string | null;
|
|
72
|
+
mimeType: string | null;
|
|
73
|
+
fileSize: number | null;
|
|
74
|
+
publicUrl: string | null;
|
|
75
|
+
} | undefined;
|
|
58
76
|
}>;
|
|
59
|
-
static updateActivity(activityId: string, input: LockActivityUpdateInputType): Promise<{
|
|
77
|
+
static updateActivity(activityId: string, input: LockActivityUpdateInputType): Promise<Omit<{
|
|
78
|
+
coverImageFile: {
|
|
79
|
+
fileName: string | null;
|
|
80
|
+
fileSize: number | null;
|
|
81
|
+
id: string;
|
|
82
|
+
mimeType: string | null;
|
|
83
|
+
publicUrl: string | null;
|
|
84
|
+
thumbnailUrl: string | null;
|
|
85
|
+
} | null;
|
|
86
|
+
coverImageFileId: string | null;
|
|
60
87
|
coverImageUrl: string;
|
|
61
88
|
createdAt: Date;
|
|
62
89
|
description: string | null;
|
|
@@ -109,8 +136,26 @@ export declare abstract class AdminLockActivityService {
|
|
|
109
136
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
110
137
|
title: string;
|
|
111
138
|
updatedAt: Date;
|
|
139
|
+
}, "coverImageFile"> & {
|
|
140
|
+
coverImageUrl: string;
|
|
141
|
+
coverImageFile: {
|
|
142
|
+
id: string;
|
|
143
|
+
fileName: string | null;
|
|
144
|
+
mimeType: string | null;
|
|
145
|
+
fileSize: number | null;
|
|
146
|
+
publicUrl: string | null;
|
|
147
|
+
} | undefined;
|
|
112
148
|
}>;
|
|
113
|
-
static activateActivity(activityId: string): Promise<{
|
|
149
|
+
static activateActivity(activityId: string): Promise<Omit<{
|
|
150
|
+
coverImageFile: {
|
|
151
|
+
fileName: string | null;
|
|
152
|
+
fileSize: number | null;
|
|
153
|
+
id: string;
|
|
154
|
+
mimeType: string | null;
|
|
155
|
+
publicUrl: string | null;
|
|
156
|
+
thumbnailUrl: string | null;
|
|
157
|
+
} | null;
|
|
158
|
+
coverImageFileId: string | null;
|
|
114
159
|
coverImageUrl: string;
|
|
115
160
|
createdAt: Date;
|
|
116
161
|
description: string | null;
|
|
@@ -163,8 +208,26 @@ export declare abstract class AdminLockActivityService {
|
|
|
163
208
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
164
209
|
title: string;
|
|
165
210
|
updatedAt: Date;
|
|
211
|
+
}, "coverImageFile"> & {
|
|
212
|
+
coverImageUrl: string;
|
|
213
|
+
coverImageFile: {
|
|
214
|
+
id: string;
|
|
215
|
+
fileName: string | null;
|
|
216
|
+
mimeType: string | null;
|
|
217
|
+
fileSize: number | null;
|
|
218
|
+
publicUrl: string | null;
|
|
219
|
+
} | undefined;
|
|
166
220
|
}>;
|
|
167
|
-
static endActivity(activityId: string): Promise<{
|
|
221
|
+
static endActivity(activityId: string): Promise<Omit<{
|
|
222
|
+
coverImageFile: {
|
|
223
|
+
fileName: string | null;
|
|
224
|
+
fileSize: number | null;
|
|
225
|
+
id: string;
|
|
226
|
+
mimeType: string | null;
|
|
227
|
+
publicUrl: string | null;
|
|
228
|
+
thumbnailUrl: string | null;
|
|
229
|
+
} | null;
|
|
230
|
+
coverImageFileId: string | null;
|
|
168
231
|
coverImageUrl: string;
|
|
169
232
|
createdAt: Date;
|
|
170
233
|
description: string | null;
|
|
@@ -217,8 +280,26 @@ export declare abstract class AdminLockActivityService {
|
|
|
217
280
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
218
281
|
title: string;
|
|
219
282
|
updatedAt: Date;
|
|
283
|
+
}, "coverImageFile"> & {
|
|
284
|
+
coverImageUrl: string;
|
|
285
|
+
coverImageFile: {
|
|
286
|
+
id: string;
|
|
287
|
+
fileName: string | null;
|
|
288
|
+
mimeType: string | null;
|
|
289
|
+
fileSize: number | null;
|
|
290
|
+
publicUrl: string | null;
|
|
291
|
+
} | undefined;
|
|
220
292
|
}>;
|
|
221
|
-
static cancelActivity(activityId: string): Promise<{
|
|
293
|
+
static cancelActivity(activityId: string): Promise<Omit<{
|
|
294
|
+
coverImageFile: {
|
|
295
|
+
fileName: string | null;
|
|
296
|
+
fileSize: number | null;
|
|
297
|
+
id: string;
|
|
298
|
+
mimeType: string | null;
|
|
299
|
+
publicUrl: string | null;
|
|
300
|
+
thumbnailUrl: string | null;
|
|
301
|
+
} | null;
|
|
302
|
+
coverImageFileId: string | null;
|
|
222
303
|
coverImageUrl: string;
|
|
223
304
|
createdAt: Date;
|
|
224
305
|
description: string | null;
|
|
@@ -271,8 +352,26 @@ export declare abstract class AdminLockActivityService {
|
|
|
271
352
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
272
353
|
title: string;
|
|
273
354
|
updatedAt: Date;
|
|
355
|
+
}, "coverImageFile"> & {
|
|
356
|
+
coverImageUrl: string;
|
|
357
|
+
coverImageFile: {
|
|
358
|
+
id: string;
|
|
359
|
+
fileName: string | null;
|
|
360
|
+
mimeType: string | null;
|
|
361
|
+
fileSize: number | null;
|
|
362
|
+
publicUrl: string | null;
|
|
363
|
+
} | undefined;
|
|
274
364
|
}>;
|
|
275
|
-
static getActivity(activityId: string): Promise<{
|
|
365
|
+
static getActivity(activityId: string): Promise<Omit<{
|
|
366
|
+
coverImageFile: {
|
|
367
|
+
fileName: string | null;
|
|
368
|
+
fileSize: number | null;
|
|
369
|
+
id: string;
|
|
370
|
+
mimeType: string | null;
|
|
371
|
+
publicUrl: string | null;
|
|
372
|
+
thumbnailUrl: string | null;
|
|
373
|
+
} | null;
|
|
374
|
+
coverImageFileId: string | null;
|
|
276
375
|
coverImageUrl: string;
|
|
277
376
|
createdAt: Date;
|
|
278
377
|
description: string | null;
|
|
@@ -325,9 +424,27 @@ export declare abstract class AdminLockActivityService {
|
|
|
325
424
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
326
425
|
title: string;
|
|
327
426
|
updatedAt: Date;
|
|
427
|
+
}, "coverImageFile"> & {
|
|
428
|
+
coverImageUrl: string;
|
|
429
|
+
coverImageFile: {
|
|
430
|
+
id: string;
|
|
431
|
+
fileName: string | null;
|
|
432
|
+
mimeType: string | null;
|
|
433
|
+
fileSize: number | null;
|
|
434
|
+
publicUrl: string | null;
|
|
435
|
+
} | undefined;
|
|
328
436
|
}>;
|
|
329
437
|
static listActivities(filters: LockActivityListQueryType): Promise<{
|
|
330
|
-
data: {
|
|
438
|
+
data: (Omit<{
|
|
439
|
+
coverImageFile: {
|
|
440
|
+
fileName: string | null;
|
|
441
|
+
fileSize: number | null;
|
|
442
|
+
id: string;
|
|
443
|
+
mimeType: string | null;
|
|
444
|
+
publicUrl: string | null;
|
|
445
|
+
thumbnailUrl: string | null;
|
|
446
|
+
} | null;
|
|
447
|
+
coverImageFileId: string | null;
|
|
331
448
|
coverImageUrl: string;
|
|
332
449
|
createdAt: Date;
|
|
333
450
|
description: string | null;
|
|
@@ -380,7 +497,16 @@ export declare abstract class AdminLockActivityService {
|
|
|
380
497
|
status: "active" | "cancelled" | "draft" | "ended";
|
|
381
498
|
title: string;
|
|
382
499
|
updatedAt: Date;
|
|
383
|
-
}
|
|
500
|
+
}, "coverImageFile"> & {
|
|
501
|
+
coverImageUrl: string;
|
|
502
|
+
coverImageFile: {
|
|
503
|
+
id: string;
|
|
504
|
+
fileName: string | null;
|
|
505
|
+
mimeType: string | null;
|
|
506
|
+
fileSize: number | null;
|
|
507
|
+
publicUrl: string | null;
|
|
508
|
+
} | undefined;
|
|
509
|
+
})[];
|
|
384
510
|
pagination: {
|
|
385
511
|
pageSize: number;
|
|
386
512
|
pageIndex: number;
|
|
@@ -101,6 +101,23 @@ export declare const lockActivitySelectSchema: import("drizzle-typebox").BuildSc
|
|
|
101
101
|
identity: undefined;
|
|
102
102
|
generated: undefined;
|
|
103
103
|
}, {}, {}>;
|
|
104
|
+
coverImageFileId: import("drizzle-orm/pg-core").PgColumn<{
|
|
105
|
+
name: "cover_image_file_id";
|
|
106
|
+
tableName: "lock_activity";
|
|
107
|
+
dataType: "string";
|
|
108
|
+
columnType: "PgText";
|
|
109
|
+
data: string;
|
|
110
|
+
driverParam: string;
|
|
111
|
+
notNull: false;
|
|
112
|
+
hasDefault: false;
|
|
113
|
+
isPrimaryKey: false;
|
|
114
|
+
isAutoincrement: false;
|
|
115
|
+
hasRuntimeDefault: false;
|
|
116
|
+
enumValues: [string, ...string[]];
|
|
117
|
+
baseColumn: never;
|
|
118
|
+
identity: undefined;
|
|
119
|
+
generated: undefined;
|
|
120
|
+
}, {}, {}>;
|
|
104
121
|
startAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
105
122
|
name: "start_at";
|
|
106
123
|
tableName: "lock_activity";
|
|
@@ -342,6 +359,23 @@ export declare const lockActivityInsertSchema: import("drizzle-typebox").BuildSc
|
|
|
342
359
|
identity: undefined;
|
|
343
360
|
generated: undefined;
|
|
344
361
|
}, {}, {}>;
|
|
362
|
+
coverImageFileId: import("drizzle-orm/pg-core").PgColumn<{
|
|
363
|
+
name: "cover_image_file_id";
|
|
364
|
+
tableName: "lock_activity";
|
|
365
|
+
dataType: "string";
|
|
366
|
+
columnType: "PgText";
|
|
367
|
+
data: string;
|
|
368
|
+
driverParam: string;
|
|
369
|
+
notNull: false;
|
|
370
|
+
hasDefault: false;
|
|
371
|
+
isPrimaryKey: false;
|
|
372
|
+
isAutoincrement: false;
|
|
373
|
+
hasRuntimeDefault: false;
|
|
374
|
+
enumValues: [string, ...string[]];
|
|
375
|
+
baseColumn: never;
|
|
376
|
+
identity: undefined;
|
|
377
|
+
generated: undefined;
|
|
378
|
+
}, {}, {}>;
|
|
345
379
|
startAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
346
380
|
name: "start_at";
|
|
347
381
|
tableName: "lock_activity";
|
|
@@ -20,6 +20,9 @@ export declare const LockActivityErrorCodes: {
|
|
|
20
20
|
readonly LOCK_ACTIVITY_PARTICIPATION_USER_NOT_FOUND: 'LOCK_ACTIVITY_PARTICIPATION_USER_NOT_FOUND';
|
|
21
21
|
readonly LOCK_ACTIVITY_PARTICIPATION_CREATE_FAILED: 'LOCK_ACTIVITY_PARTICIPATION_CREATE_FAILED';
|
|
22
22
|
readonly LOCK_ACTIVITY_PARTICIPATION_UPDATE_FAILED: 'LOCK_ACTIVITY_PARTICIPATION_UPDATE_FAILED';
|
|
23
|
+
readonly LOCK_ACTIVITY_REWARD_PRICE_NOT_FOUND: 'LOCK_ACTIVITY_REWARD_PRICE_NOT_FOUND';
|
|
24
|
+
readonly LOCK_ACTIVITY_REWARD_AMOUNT_INVALID: 'LOCK_ACTIVITY_REWARD_AMOUNT_INVALID';
|
|
25
|
+
readonly LOCK_ACTIVITY_REWARD_NOT_DUE_YET: 'LOCK_ACTIVITY_REWARD_NOT_DUE_YET';
|
|
23
26
|
};
|
|
24
27
|
type LockActivityErrorCodesType = typeof LockActivityErrorCodes;
|
|
25
28
|
export type LockActivityErrorCode = keyof LockActivityErrorCodesType;
|
|
@@ -19,6 +19,9 @@ export declare const zh: {
|
|
|
19
19
|
LOCK_ACTIVITY_PARTICIPATION_USER_NOT_FOUND: string;
|
|
20
20
|
LOCK_ACTIVITY_PARTICIPATION_CREATE_FAILED: string;
|
|
21
21
|
LOCK_ACTIVITY_PARTICIPATION_UPDATE_FAILED: string;
|
|
22
|
+
LOCK_ACTIVITY_REWARD_PRICE_NOT_FOUND: string;
|
|
23
|
+
LOCK_ACTIVITY_REWARD_AMOUNT_INVALID: string;
|
|
24
|
+
LOCK_ACTIVITY_REWARD_NOT_DUE_YET: string;
|
|
22
25
|
};
|
|
23
26
|
type ZHType = typeof zh;
|
|
24
27
|
declare module '../../../error/messages' {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TransactionTx } from '../../db/transaction';
|
|
2
|
+
export declare abstract class InternalLockActivityRewardService {
|
|
3
|
+
static calcRewardAssetAmount(rewardCnyEquivalent: string, priceInCny: string): string;
|
|
4
|
+
static getLatestRewardAssetPriceInCny(tx: TransactionTx, rewardAssetId: string): Promise<string>;
|
|
5
|
+
static buildRewardIdempotencyKey(participationId: string): string;
|
|
6
|
+
static processParticipationReward(tx: TransactionTx, participationId: string, operatorId?: string, options?: {
|
|
7
|
+
skipDelayCheck?: boolean;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
participationId: string;
|
|
10
|
+
rewardAmount: string;
|
|
11
|
+
receiveAccountId: string;
|
|
12
|
+
ledgerEntryId: string;
|
|
13
|
+
isIdempotent: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
@@ -3,7 +3,48 @@ export type LockActivityTimeInput = {
|
|
|
3
3
|
startAt: Date;
|
|
4
4
|
endAt: Date;
|
|
5
5
|
};
|
|
6
|
+
export type LockActivityCoverImageFileRow = {
|
|
7
|
+
id: string;
|
|
8
|
+
fileName: string | null;
|
|
9
|
+
mimeType: string | null;
|
|
10
|
+
fileSize: number | null;
|
|
11
|
+
publicUrl: string | null;
|
|
12
|
+
thumbnailUrl: string | null;
|
|
13
|
+
};
|
|
14
|
+
export declare const lockActivityCoverImageFileWith: {
|
|
15
|
+
readonly coverImageFile: {
|
|
16
|
+
readonly columns: {
|
|
17
|
+
readonly id: true;
|
|
18
|
+
readonly fileName: true;
|
|
19
|
+
readonly mimeType: true;
|
|
20
|
+
readonly fileSize: true;
|
|
21
|
+
readonly publicUrl: true;
|
|
22
|
+
readonly thumbnailUrl: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
6
26
|
export declare abstract class InternalLockActivityService {
|
|
27
|
+
static resolveCoverImageUrlFromFile(file: LockActivityCoverImageFileRow | null | undefined, fallbackUrl: string): string;
|
|
28
|
+
static formatCoverImageFile(file: LockActivityCoverImageFileRow | null | undefined): {
|
|
29
|
+
id: string;
|
|
30
|
+
fileName: string | null;
|
|
31
|
+
mimeType: string | null;
|
|
32
|
+
fileSize: number | null;
|
|
33
|
+
publicUrl: string | null;
|
|
34
|
+
} | undefined;
|
|
35
|
+
static formatActivityRow<T extends {
|
|
36
|
+
coverImageUrl: string;
|
|
37
|
+
coverImageFile?: LockActivityCoverImageFileRow | null;
|
|
38
|
+
}>(row: T): Omit<T, "coverImageFile"> & {
|
|
39
|
+
coverImageUrl: string;
|
|
40
|
+
coverImageFile: {
|
|
41
|
+
id: string;
|
|
42
|
+
fileName: string | null;
|
|
43
|
+
mimeType: string | null;
|
|
44
|
+
fileSize: number | null;
|
|
45
|
+
publicUrl: string | null;
|
|
46
|
+
} | undefined;
|
|
47
|
+
};
|
|
7
48
|
static assertTimeRange(input: LockActivityTimeInput): void;
|
|
8
49
|
static assertRewardCnyEquivalent(value: string): string;
|
|
9
50
|
static resolveCoverImageUrlByFileId(tx: TransactionTx, fileId: string): Promise<string>;
|
|
@@ -110,6 +110,23 @@ export declare const lockActivity: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
110
110
|
identity: undefined;
|
|
111
111
|
generated: undefined;
|
|
112
112
|
}, {}, {}>;
|
|
113
|
+
coverImageFileId: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
|
+
name: "cover_image_file_id";
|
|
115
|
+
tableName: "lock_activity";
|
|
116
|
+
dataType: "string";
|
|
117
|
+
columnType: "PgText";
|
|
118
|
+
data: string;
|
|
119
|
+
driverParam: string;
|
|
120
|
+
notNull: false;
|
|
121
|
+
hasDefault: false;
|
|
122
|
+
isPrimaryKey: false;
|
|
123
|
+
isAutoincrement: false;
|
|
124
|
+
hasRuntimeDefault: false;
|
|
125
|
+
enumValues: [string, ...string[]];
|
|
126
|
+
baseColumn: never;
|
|
127
|
+
identity: undefined;
|
|
128
|
+
generated: undefined;
|
|
129
|
+
}, {}, {}>;
|
|
113
130
|
startAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
131
|
name: "start_at";
|
|
115
132
|
tableName: "lock_activity";
|
|
@@ -252,4 +269,5 @@ export declare const lockActivity: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
252
269
|
export declare const lockActivityRelations: import("drizzle-orm").Relations<"lock_activity", {
|
|
253
270
|
rewardAsset: import("drizzle-orm").One<"asset", true>;
|
|
254
271
|
receiveAccountType: import("drizzle-orm").One<"ledger_account_type", true>;
|
|
272
|
+
coverImageFile: import("drizzle-orm").One<"file_storage", false>;
|
|
255
273
|
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const lockActivityCoverImageFileSchema: import("@sinclair/typebox").TObject<{
|
|
2
|
+
id: import("@sinclair/typebox").TString;
|
|
3
|
+
fileName: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
4
|
+
mimeType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
5
|
+
fileSize: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
6
|
+
publicUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
7
|
+
}>;
|
|
@@ -10,6 +10,14 @@ export declare const lockActivityPublicListQuerySchema: import("@sinclair/typebo
|
|
|
10
10
|
}>;
|
|
11
11
|
export type LockActivityPublicListQueryType = typeof lockActivityPublicListQuerySchema.static;
|
|
12
12
|
export declare const lockActivityPublicResponseSchema: import("@sinclair/typebox").TObject<{
|
|
13
|
+
coverImageFile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
14
|
+
id: import("@sinclair/typebox").TString;
|
|
15
|
+
fileName: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
16
|
+
mimeType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
17
|
+
fileSize: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
18
|
+
publicUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
19
|
+
}>>;
|
|
20
|
+
coverImageFileId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
13
21
|
coverImageUrl: import("@sinclair/typebox").TString;
|
|
14
22
|
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
15
23
|
endAt: import("@sinclair/typebox").TDate;
|
|
@@ -35,6 +43,14 @@ export declare const lockActivityPublicResponseSchema: import("@sinclair/typebox
|
|
|
35
43
|
}>;
|
|
36
44
|
export declare const lockActivityPublicListResponseSchema: import("@sinclair/typebox").TObject<{
|
|
37
45
|
data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
46
|
+
coverImageFile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
47
|
+
id: import("@sinclair/typebox").TString;
|
|
48
|
+
fileName: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
49
|
+
mimeType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
50
|
+
fileSize: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
51
|
+
publicUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
52
|
+
}>>;
|
|
53
|
+
coverImageFileId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
38
54
|
coverImageUrl: import("@sinclair/typebox").TString;
|
|
39
55
|
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
40
56
|
endAt: import("@sinclair/typebox").TDate;
|
|
@@ -67,6 +83,14 @@ export declare const lockActivityPublicListResponseSchema: import("@sinclair/typ
|
|
|
67
83
|
}>;
|
|
68
84
|
}>;
|
|
69
85
|
export declare const lockActivityPublicDetailResponseSchema: import("@sinclair/typebox").TObject<{
|
|
86
|
+
coverImageFile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
87
|
+
id: import("@sinclair/typebox").TString;
|
|
88
|
+
fileName: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
89
|
+
mimeType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
90
|
+
fileSize: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
91
|
+
publicUrl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
92
|
+
}>>;
|
|
93
|
+
coverImageFileId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
70
94
|
coverImageUrl: import("@sinclair/typebox").TString;
|
|
71
95
|
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
72
96
|
endAt: import("@sinclair/typebox").TDate;
|
|
@@ -395,6 +395,14 @@ export declare const lockActivityRouter: Elysia<"/lock_activity", {
|
|
|
395
395
|
response: {
|
|
396
396
|
200: {
|
|
397
397
|
data: {
|
|
398
|
+
coverImageFile?: {
|
|
399
|
+
id: string;
|
|
400
|
+
fileName: string | null;
|
|
401
|
+
mimeType: string | null;
|
|
402
|
+
fileSize: number | null;
|
|
403
|
+
publicUrl: string | null;
|
|
404
|
+
} | undefined;
|
|
405
|
+
coverImageFileId: string | null;
|
|
398
406
|
coverImageUrl: string;
|
|
399
407
|
description: string | null;
|
|
400
408
|
endAt: Date;
|
|
@@ -448,6 +456,14 @@ export declare const lockActivityRouter: Elysia<"/lock_activity", {
|
|
|
448
456
|
headers: {};
|
|
449
457
|
response: {
|
|
450
458
|
200: {
|
|
459
|
+
coverImageFile?: {
|
|
460
|
+
id: string;
|
|
461
|
+
fileName: string | null;
|
|
462
|
+
mimeType: string | null;
|
|
463
|
+
fileSize: number | null;
|
|
464
|
+
publicUrl: string | null;
|
|
465
|
+
} | undefined;
|
|
466
|
+
coverImageFileId: string | null;
|
|
451
467
|
coverImageUrl: string;
|
|
452
468
|
description: string | null;
|
|
453
469
|
endAt: Date;
|