@aitlabs/namkwong 0.0.92 → 0.0.103

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.
Files changed (88) hide show
  1. package/dist/admin/index.d.ts +2807 -797
  2. package/dist/app-version/admin/router.d.ts +13 -1
  3. package/dist/asset-convert-product/admin/dto.schemas.d.ts +8 -0
  4. package/dist/asset-convert-product/admin/router.d.ts +12 -12
  5. package/dist/asset-convert-product/admin/service.d.ts +12 -12
  6. package/dist/auth/better-auth.d.ts +19 -1
  7. package/dist/auth/i18n/zh.d.ts +100 -0
  8. package/dist/auth/permissions.d.ts +16 -1
  9. package/dist/auth/roles.d.ts +45 -0
  10. package/dist/check-in/admin/reward.dto.schemas.d.ts +321 -0
  11. package/dist/check-in/admin/reward.router.d.ts +1109 -0
  12. package/dist/check-in/admin/reward.service.d.ts +433 -0
  13. package/dist/check-in/admin/router.d.ts +662 -0
  14. package/dist/check-in/errors/index.d.ts +10 -0
  15. package/dist/check-in/errors/locales/zh.d.ts +10 -0
  16. package/dist/check-in/index.d.ts +5 -0
  17. package/dist/check-in/internal/reward-config.service.d.ts +97 -0
  18. package/dist/check-in/permissions.d.ts +2 -0
  19. package/dist/check-in/reward.db.schemas.d.ts +896 -0
  20. package/dist/check-in/reward.schema.d.ts +477 -0
  21. package/dist/content-video/admin/dto.schemas.d.ts +128 -0
  22. package/dist/content-video/admin/router.d.ts +861 -0
  23. package/dist/content-video/admin/service.d.ts +211 -0
  24. package/dist/content-video/db.schemas.d.ts +486 -0
  25. package/dist/content-video/errors/index.d.ts +17 -0
  26. package/dist/content-video/errors/locales/zh.d.ts +16 -0
  27. package/dist/content-video/index.d.ts +8 -0
  28. package/dist/content-video/internal/service.d.ts +106 -0
  29. package/dist/content-video/permissions.d.ts +4 -0
  30. package/dist/content-video/schema.d.ts +257 -0
  31. package/dist/content-video/user/dto.schemas.d.ts +52 -0
  32. package/dist/content-video/user/router.d.ts +482 -0
  33. package/dist/content-video/user/service.d.ts +36 -0
  34. package/dist/db/schemas.d.ts +4 -0
  35. package/dist/file-storage/admin/dto.schemas.d.ts +4 -0
  36. package/dist/file-storage/admin/router.d.ts +2 -2
  37. package/dist/file-storage/admin/service.d.ts +2 -2
  38. package/dist/file-storage/db.schemas.d.ts +4 -4
  39. package/dist/file-storage/internal/service.d.ts +1 -1
  40. package/dist/file-storage/s3.client.d.ts +22 -0
  41. package/dist/file-storage/schema.d.ts +3 -3
  42. package/dist/file-storage/share/dto.schemas.d.ts +1 -0
  43. package/dist/file-storage/share/router.d.ts +1 -1
  44. package/dist/file-storage/user/dto.schemas.d.ts +6 -4
  45. package/dist/file-storage/user/router.d.ts +3 -3
  46. package/dist/file-storage/user/service.d.ts +2 -2
  47. package/dist/index.d.ts +3131 -805
  48. package/dist/ledger/admin/dto.schemas.d.ts +8 -0
  49. package/dist/ledger/admin/router.d.ts +5 -17
  50. package/dist/ledger/db.schemas.d.ts +8 -8
  51. package/dist/ledger/schema.d.ts +6 -6
  52. package/dist/ledger/user/dto.schemas.d.ts +8 -8
  53. package/dist/ledger/user/router.d.ts +2 -2
  54. package/dist/ledger/user/service.d.ts +2 -2
  55. package/dist/lock-activity/admin/dto.schemas.d.ts +161 -0
  56. package/dist/lock-activity/admin/participation.dto.schemas.d.ts +200 -0
  57. package/dist/lock-activity/admin/participation.service.d.ts +144 -0
  58. package/dist/lock-activity/admin/reward.service.d.ts +48 -0
  59. package/dist/lock-activity/admin/router.d.ts +1399 -0
  60. package/dist/lock-activity/admin/service.d.ts +518 -0
  61. package/dist/lock-activity/constants.d.ts +2 -0
  62. package/dist/lock-activity/cron.d.ts +6 -0
  63. package/dist/lock-activity/db.schemas.d.ts +516 -0
  64. package/dist/lock-activity/errors/index.d.ts +32 -0
  65. package/dist/lock-activity/errors/locales/zh.d.ts +31 -0
  66. package/dist/lock-activity/index.d.ts +7 -0
  67. package/dist/lock-activity/internal/participation.service.d.ts +42 -0
  68. package/dist/lock-activity/internal/reward.service.d.ts +15 -0
  69. package/dist/lock-activity/internal/service.d.ts +66 -0
  70. package/dist/lock-activity/participation.db.schemas.d.ts +448 -0
  71. package/dist/lock-activity/participation.schema.d.ts +239 -0
  72. package/dist/lock-activity/permissions.d.ts +5 -0
  73. package/dist/lock-activity/schema.d.ts +273 -0
  74. package/dist/lock-activity/shared.dto.schemas.d.ts +7 -0
  75. package/dist/lock-activity/user/dto.schemas.d.ts +116 -0
  76. package/dist/lock-activity/user/participation.dto.schemas.d.ts +25 -0
  77. package/dist/lock-activity/user/participation.service.d.ts +24 -0
  78. package/dist/lock-activity/user/router.d.ts +624 -0
  79. package/dist/lock-activity/user/service.d.ts +86 -0
  80. package/dist/market-pricing/admin/router.d.ts +13 -1
  81. package/dist/news/admin/dto.schemas.d.ts +26 -26
  82. package/dist/news/admin/router.d.ts +25 -25
  83. package/dist/news/admin/service.d.ts +4 -1
  84. package/dist/news/user/service.d.ts +2 -2
  85. package/dist/referral/index.d.ts +1 -0
  86. package/dist/referral/user/router.d.ts +29 -1
  87. package/dist/wallet-type/admin/router.d.ts +1 -13
  88. package/package.json +1 -1
@@ -0,0 +1,516 @@
1
+ export declare const lockActivitySelectSchema: import("drizzle-typebox").BuildSchema<"select", {
2
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
3
+ name: "created_at";
4
+ tableName: "lock_activity";
5
+ dataType: "date";
6
+ columnType: "PgTimestamp";
7
+ data: Date;
8
+ driverParam: string;
9
+ notNull: true;
10
+ hasDefault: true;
11
+ isPrimaryKey: false;
12
+ isAutoincrement: false;
13
+ hasRuntimeDefault: false;
14
+ enumValues: undefined;
15
+ baseColumn: never;
16
+ identity: undefined;
17
+ generated: undefined;
18
+ }, {}, {}>;
19
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
20
+ name: "updated_at";
21
+ tableName: "lock_activity";
22
+ dataType: "date";
23
+ columnType: "PgTimestamp";
24
+ data: Date;
25
+ driverParam: string;
26
+ notNull: true;
27
+ hasDefault: true;
28
+ isPrimaryKey: false;
29
+ isAutoincrement: false;
30
+ hasRuntimeDefault: false;
31
+ enumValues: undefined;
32
+ baseColumn: never;
33
+ identity: undefined;
34
+ generated: undefined;
35
+ }, {}, {}>;
36
+ id: import("drizzle-orm/pg-core").PgColumn<{
37
+ name: "id";
38
+ tableName: "lock_activity";
39
+ dataType: "string";
40
+ columnType: "PgUUID";
41
+ data: string;
42
+ driverParam: string;
43
+ notNull: true;
44
+ hasDefault: true;
45
+ isPrimaryKey: true;
46
+ isAutoincrement: false;
47
+ hasRuntimeDefault: false;
48
+ enumValues: undefined;
49
+ baseColumn: never;
50
+ identity: undefined;
51
+ generated: undefined;
52
+ }, {}, {}>;
53
+ title: import("drizzle-orm/pg-core").PgColumn<{
54
+ name: "title";
55
+ tableName: "lock_activity";
56
+ dataType: "string";
57
+ columnType: "PgText";
58
+ data: string;
59
+ driverParam: string;
60
+ notNull: true;
61
+ hasDefault: false;
62
+ isPrimaryKey: false;
63
+ isAutoincrement: false;
64
+ hasRuntimeDefault: false;
65
+ enumValues: [string, ...string[]];
66
+ baseColumn: never;
67
+ identity: undefined;
68
+ generated: undefined;
69
+ }, {}, {}>;
70
+ description: import("drizzle-orm/pg-core").PgColumn<{
71
+ name: "description";
72
+ tableName: "lock_activity";
73
+ dataType: "string";
74
+ columnType: "PgText";
75
+ data: string;
76
+ driverParam: string;
77
+ notNull: false;
78
+ hasDefault: false;
79
+ isPrimaryKey: false;
80
+ isAutoincrement: false;
81
+ hasRuntimeDefault: false;
82
+ enumValues: [string, ...string[]];
83
+ baseColumn: never;
84
+ identity: undefined;
85
+ generated: undefined;
86
+ }, {}, {}>;
87
+ coverImageUrl: import("drizzle-orm/pg-core").PgColumn<{
88
+ name: "cover_image_url";
89
+ tableName: "lock_activity";
90
+ dataType: "string";
91
+ columnType: "PgText";
92
+ data: string;
93
+ driverParam: string;
94
+ notNull: true;
95
+ hasDefault: false;
96
+ isPrimaryKey: false;
97
+ isAutoincrement: false;
98
+ hasRuntimeDefault: false;
99
+ enumValues: [string, ...string[]];
100
+ baseColumn: never;
101
+ identity: undefined;
102
+ generated: undefined;
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
+ }, {}, {}>;
121
+ startAt: import("drizzle-orm/pg-core").PgColumn<{
122
+ name: "start_at";
123
+ tableName: "lock_activity";
124
+ dataType: "date";
125
+ columnType: "PgTimestamp";
126
+ data: Date;
127
+ driverParam: string;
128
+ notNull: true;
129
+ hasDefault: false;
130
+ isPrimaryKey: false;
131
+ isAutoincrement: false;
132
+ hasRuntimeDefault: false;
133
+ enumValues: undefined;
134
+ baseColumn: never;
135
+ identity: undefined;
136
+ generated: undefined;
137
+ }, {}, {}>;
138
+ endAt: import("drizzle-orm/pg-core").PgColumn<{
139
+ name: "end_at";
140
+ tableName: "lock_activity";
141
+ dataType: "date";
142
+ columnType: "PgTimestamp";
143
+ data: Date;
144
+ driverParam: string;
145
+ notNull: true;
146
+ hasDefault: false;
147
+ isPrimaryKey: false;
148
+ isAutoincrement: false;
149
+ hasRuntimeDefault: false;
150
+ enumValues: undefined;
151
+ baseColumn: never;
152
+ identity: undefined;
153
+ generated: undefined;
154
+ }, {}, {}>;
155
+ rewardCnyEquivalent: import("drizzle-orm/pg-core").PgColumn<{
156
+ name: "reward_cny_equivalent";
157
+ tableName: "lock_activity";
158
+ dataType: "string";
159
+ columnType: "PgNumeric";
160
+ data: string;
161
+ driverParam: string;
162
+ notNull: true;
163
+ hasDefault: false;
164
+ isPrimaryKey: false;
165
+ isAutoincrement: false;
166
+ hasRuntimeDefault: false;
167
+ enumValues: undefined;
168
+ baseColumn: never;
169
+ identity: undefined;
170
+ generated: undefined;
171
+ }, {}, {}>;
172
+ rewardAssetId: import("drizzle-orm/pg-core").PgColumn<{
173
+ name: "reward_asset_id";
174
+ tableName: "lock_activity";
175
+ dataType: "string";
176
+ columnType: "PgUUID";
177
+ data: string;
178
+ driverParam: string;
179
+ notNull: true;
180
+ hasDefault: false;
181
+ isPrimaryKey: false;
182
+ isAutoincrement: false;
183
+ hasRuntimeDefault: false;
184
+ enumValues: undefined;
185
+ baseColumn: never;
186
+ identity: undefined;
187
+ generated: undefined;
188
+ }, {}, {}>;
189
+ receiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
190
+ name: "receive_account_type_id";
191
+ tableName: "lock_activity";
192
+ dataType: "string";
193
+ columnType: "PgUUID";
194
+ data: string;
195
+ driverParam: string;
196
+ notNull: true;
197
+ hasDefault: false;
198
+ isPrimaryKey: false;
199
+ isAutoincrement: false;
200
+ hasRuntimeDefault: false;
201
+ enumValues: undefined;
202
+ baseColumn: never;
203
+ identity: undefined;
204
+ generated: undefined;
205
+ }, {}, {}>;
206
+ isVisibleOnFrontend: import("drizzle-orm/pg-core").PgColumn<{
207
+ name: "is_visible_on_frontend";
208
+ tableName: "lock_activity";
209
+ dataType: "boolean";
210
+ columnType: "PgBoolean";
211
+ data: boolean;
212
+ driverParam: boolean;
213
+ notNull: true;
214
+ hasDefault: true;
215
+ isPrimaryKey: false;
216
+ isAutoincrement: false;
217
+ hasRuntimeDefault: false;
218
+ enumValues: undefined;
219
+ baseColumn: never;
220
+ identity: undefined;
221
+ generated: undefined;
222
+ }, {}, {}>;
223
+ status: import("drizzle-orm/pg-core").PgColumn<{
224
+ name: "status";
225
+ tableName: "lock_activity";
226
+ dataType: "string";
227
+ columnType: "PgEnumColumn";
228
+ data: "active" | "cancelled" | "draft" | "ended";
229
+ driverParam: string;
230
+ notNull: true;
231
+ hasDefault: true;
232
+ isPrimaryKey: false;
233
+ isAutoincrement: false;
234
+ hasRuntimeDefault: false;
235
+ enumValues: ["draft", "active", "ended", "cancelled"];
236
+ baseColumn: never;
237
+ identity: undefined;
238
+ generated: undefined;
239
+ }, {}, {}>;
240
+ sortOrder: import("drizzle-orm/pg-core").PgColumn<{
241
+ name: "sort_order";
242
+ tableName: "lock_activity";
243
+ dataType: "number";
244
+ columnType: "PgInteger";
245
+ data: number;
246
+ driverParam: string | number;
247
+ notNull: true;
248
+ hasDefault: true;
249
+ isPrimaryKey: false;
250
+ isAutoincrement: false;
251
+ hasRuntimeDefault: false;
252
+ enumValues: undefined;
253
+ baseColumn: never;
254
+ identity: undefined;
255
+ generated: undefined;
256
+ }, {}, {}>;
257
+ }, undefined>;
258
+ export type LockActivitySelectSchemaType = typeof lockActivitySelectSchema.static;
259
+ export declare const lockActivityInsertSchema: import("drizzle-typebox").BuildSchema<"insert", {
260
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
261
+ name: "created_at";
262
+ tableName: "lock_activity";
263
+ dataType: "date";
264
+ columnType: "PgTimestamp";
265
+ data: Date;
266
+ driverParam: string;
267
+ notNull: true;
268
+ hasDefault: true;
269
+ isPrimaryKey: false;
270
+ isAutoincrement: false;
271
+ hasRuntimeDefault: false;
272
+ enumValues: undefined;
273
+ baseColumn: never;
274
+ identity: undefined;
275
+ generated: undefined;
276
+ }, {}, {}>;
277
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
278
+ name: "updated_at";
279
+ tableName: "lock_activity";
280
+ dataType: "date";
281
+ columnType: "PgTimestamp";
282
+ data: Date;
283
+ driverParam: string;
284
+ notNull: true;
285
+ hasDefault: true;
286
+ isPrimaryKey: false;
287
+ isAutoincrement: false;
288
+ hasRuntimeDefault: false;
289
+ enumValues: undefined;
290
+ baseColumn: never;
291
+ identity: undefined;
292
+ generated: undefined;
293
+ }, {}, {}>;
294
+ id: import("drizzle-orm/pg-core").PgColumn<{
295
+ name: "id";
296
+ tableName: "lock_activity";
297
+ dataType: "string";
298
+ columnType: "PgUUID";
299
+ data: string;
300
+ driverParam: string;
301
+ notNull: true;
302
+ hasDefault: true;
303
+ isPrimaryKey: true;
304
+ isAutoincrement: false;
305
+ hasRuntimeDefault: false;
306
+ enumValues: undefined;
307
+ baseColumn: never;
308
+ identity: undefined;
309
+ generated: undefined;
310
+ }, {}, {}>;
311
+ title: import("drizzle-orm/pg-core").PgColumn<{
312
+ name: "title";
313
+ tableName: "lock_activity";
314
+ dataType: "string";
315
+ columnType: "PgText";
316
+ data: string;
317
+ driverParam: string;
318
+ notNull: true;
319
+ hasDefault: false;
320
+ isPrimaryKey: false;
321
+ isAutoincrement: false;
322
+ hasRuntimeDefault: false;
323
+ enumValues: [string, ...string[]];
324
+ baseColumn: never;
325
+ identity: undefined;
326
+ generated: undefined;
327
+ }, {}, {}>;
328
+ description: import("drizzle-orm/pg-core").PgColumn<{
329
+ name: "description";
330
+ tableName: "lock_activity";
331
+ dataType: "string";
332
+ columnType: "PgText";
333
+ data: string;
334
+ driverParam: string;
335
+ notNull: false;
336
+ hasDefault: false;
337
+ isPrimaryKey: false;
338
+ isAutoincrement: false;
339
+ hasRuntimeDefault: false;
340
+ enumValues: [string, ...string[]];
341
+ baseColumn: never;
342
+ identity: undefined;
343
+ generated: undefined;
344
+ }, {}, {}>;
345
+ coverImageUrl: import("drizzle-orm/pg-core").PgColumn<{
346
+ name: "cover_image_url";
347
+ tableName: "lock_activity";
348
+ dataType: "string";
349
+ columnType: "PgText";
350
+ data: string;
351
+ driverParam: string;
352
+ notNull: true;
353
+ hasDefault: false;
354
+ isPrimaryKey: false;
355
+ isAutoincrement: false;
356
+ hasRuntimeDefault: false;
357
+ enumValues: [string, ...string[]];
358
+ baseColumn: never;
359
+ identity: undefined;
360
+ generated: undefined;
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
+ }, {}, {}>;
379
+ startAt: import("drizzle-orm/pg-core").PgColumn<{
380
+ name: "start_at";
381
+ tableName: "lock_activity";
382
+ dataType: "date";
383
+ columnType: "PgTimestamp";
384
+ data: Date;
385
+ driverParam: string;
386
+ notNull: true;
387
+ hasDefault: false;
388
+ isPrimaryKey: false;
389
+ isAutoincrement: false;
390
+ hasRuntimeDefault: false;
391
+ enumValues: undefined;
392
+ baseColumn: never;
393
+ identity: undefined;
394
+ generated: undefined;
395
+ }, {}, {}>;
396
+ endAt: import("drizzle-orm/pg-core").PgColumn<{
397
+ name: "end_at";
398
+ tableName: "lock_activity";
399
+ dataType: "date";
400
+ columnType: "PgTimestamp";
401
+ data: Date;
402
+ driverParam: string;
403
+ notNull: true;
404
+ hasDefault: false;
405
+ isPrimaryKey: false;
406
+ isAutoincrement: false;
407
+ hasRuntimeDefault: false;
408
+ enumValues: undefined;
409
+ baseColumn: never;
410
+ identity: undefined;
411
+ generated: undefined;
412
+ }, {}, {}>;
413
+ rewardCnyEquivalent: import("drizzle-orm/pg-core").PgColumn<{
414
+ name: "reward_cny_equivalent";
415
+ tableName: "lock_activity";
416
+ dataType: "string";
417
+ columnType: "PgNumeric";
418
+ data: string;
419
+ driverParam: string;
420
+ notNull: true;
421
+ hasDefault: false;
422
+ isPrimaryKey: false;
423
+ isAutoincrement: false;
424
+ hasRuntimeDefault: false;
425
+ enumValues: undefined;
426
+ baseColumn: never;
427
+ identity: undefined;
428
+ generated: undefined;
429
+ }, {}, {}>;
430
+ rewardAssetId: import("drizzle-orm/pg-core").PgColumn<{
431
+ name: "reward_asset_id";
432
+ tableName: "lock_activity";
433
+ dataType: "string";
434
+ columnType: "PgUUID";
435
+ data: string;
436
+ driverParam: string;
437
+ notNull: true;
438
+ hasDefault: false;
439
+ isPrimaryKey: false;
440
+ isAutoincrement: false;
441
+ hasRuntimeDefault: false;
442
+ enumValues: undefined;
443
+ baseColumn: never;
444
+ identity: undefined;
445
+ generated: undefined;
446
+ }, {}, {}>;
447
+ receiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
448
+ name: "receive_account_type_id";
449
+ tableName: "lock_activity";
450
+ dataType: "string";
451
+ columnType: "PgUUID";
452
+ data: string;
453
+ driverParam: string;
454
+ notNull: true;
455
+ hasDefault: false;
456
+ isPrimaryKey: false;
457
+ isAutoincrement: false;
458
+ hasRuntimeDefault: false;
459
+ enumValues: undefined;
460
+ baseColumn: never;
461
+ identity: undefined;
462
+ generated: undefined;
463
+ }, {}, {}>;
464
+ isVisibleOnFrontend: import("drizzle-orm/pg-core").PgColumn<{
465
+ name: "is_visible_on_frontend";
466
+ tableName: "lock_activity";
467
+ dataType: "boolean";
468
+ columnType: "PgBoolean";
469
+ data: boolean;
470
+ driverParam: boolean;
471
+ notNull: true;
472
+ hasDefault: true;
473
+ isPrimaryKey: false;
474
+ isAutoincrement: false;
475
+ hasRuntimeDefault: false;
476
+ enumValues: undefined;
477
+ baseColumn: never;
478
+ identity: undefined;
479
+ generated: undefined;
480
+ }, {}, {}>;
481
+ status: import("drizzle-orm/pg-core").PgColumn<{
482
+ name: "status";
483
+ tableName: "lock_activity";
484
+ dataType: "string";
485
+ columnType: "PgEnumColumn";
486
+ data: "active" | "cancelled" | "draft" | "ended";
487
+ driverParam: string;
488
+ notNull: true;
489
+ hasDefault: true;
490
+ isPrimaryKey: false;
491
+ isAutoincrement: false;
492
+ hasRuntimeDefault: false;
493
+ enumValues: ["draft", "active", "ended", "cancelled"];
494
+ baseColumn: never;
495
+ identity: undefined;
496
+ generated: undefined;
497
+ }, {}, {}>;
498
+ sortOrder: import("drizzle-orm/pg-core").PgColumn<{
499
+ name: "sort_order";
500
+ tableName: "lock_activity";
501
+ dataType: "number";
502
+ columnType: "PgInteger";
503
+ data: number;
504
+ driverParam: string | number;
505
+ notNull: true;
506
+ hasDefault: true;
507
+ isPrimaryKey: false;
508
+ isAutoincrement: false;
509
+ hasRuntimeDefault: false;
510
+ enumValues: undefined;
511
+ baseColumn: never;
512
+ identity: undefined;
513
+ generated: undefined;
514
+ }, {}, {}>;
515
+ }, undefined>;
516
+ export type LockActivityInsertSchemaType = typeof lockActivityInsertSchema.static;
@@ -0,0 +1,32 @@
1
+ export * from './locales/zh';
2
+ export declare const LockActivityErrorCodes: {
3
+ readonly LOCK_ACTIVITY_NOT_FOUND: 'LOCK_ACTIVITY_NOT_FOUND';
4
+ readonly LOCK_ACTIVITY_STATUS_INVALID: 'LOCK_ACTIVITY_STATUS_INVALID';
5
+ readonly LOCK_ACTIVITY_UPDATE_NOT_ALLOWED: 'LOCK_ACTIVITY_UPDATE_NOT_ALLOWED';
6
+ readonly LOCK_ACTIVITY_TIME_RANGE_INVALID: 'LOCK_ACTIVITY_TIME_RANGE_INVALID';
7
+ readonly LOCK_ACTIVITY_REWARD_CNY_INVALID: 'LOCK_ACTIVITY_REWARD_CNY_INVALID';
8
+ readonly LOCK_ACTIVITY_ASSET_NOT_FOUND: 'LOCK_ACTIVITY_ASSET_NOT_FOUND';
9
+ readonly LOCK_ACTIVITY_ASSET_INACTIVE: 'LOCK_ACTIVITY_ASSET_INACTIVE';
10
+ readonly LOCK_ACTIVITY_ACCOUNT_TYPE_NOT_FOUND: 'LOCK_ACTIVITY_ACCOUNT_TYPE_NOT_FOUND';
11
+ readonly LOCK_ACTIVITY_ACCOUNT_TYPE_INACTIVE: 'LOCK_ACTIVITY_ACCOUNT_TYPE_INACTIVE';
12
+ readonly LOCK_ACTIVITY_COVER_IMAGE_FILE_NOT_FOUND: 'LOCK_ACTIVITY_COVER_IMAGE_FILE_NOT_FOUND';
13
+ readonly LOCK_ACTIVITY_CREATE_FAILED: 'LOCK_ACTIVITY_CREATE_FAILED';
14
+ readonly LOCK_ACTIVITY_UPDATE_FAILED: 'LOCK_ACTIVITY_UPDATE_FAILED';
15
+ readonly LOCK_ACTIVITY_PARTICIPATION_NOT_FOUND: 'LOCK_ACTIVITY_PARTICIPATION_NOT_FOUND';
16
+ readonly LOCK_ACTIVITY_PARTICIPATION_ALREADY_EXISTS: 'LOCK_ACTIVITY_PARTICIPATION_ALREADY_EXISTS';
17
+ readonly LOCK_ACTIVITY_PARTICIPATION_STATUS_INVALID: 'LOCK_ACTIVITY_PARTICIPATION_STATUS_INVALID';
18
+ readonly LOCK_ACTIVITY_PARTICIPATION_INVITE_CODE_INVALID: 'LOCK_ACTIVITY_PARTICIPATION_INVITE_CODE_INVALID';
19
+ readonly LOCK_ACTIVITY_NOT_AVAILABLE: 'LOCK_ACTIVITY_NOT_AVAILABLE';
20
+ readonly LOCK_ACTIVITY_PARTICIPATION_USER_NOT_FOUND: 'LOCK_ACTIVITY_PARTICIPATION_USER_NOT_FOUND';
21
+ readonly LOCK_ACTIVITY_PARTICIPATION_CREATE_FAILED: 'LOCK_ACTIVITY_PARTICIPATION_CREATE_FAILED';
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';
26
+ };
27
+ type LockActivityErrorCodesType = typeof LockActivityErrorCodes;
28
+ export type LockActivityErrorCode = keyof LockActivityErrorCodesType;
29
+ declare module '../../error/errorcode' {
30
+ interface ErrorCodeRegistry extends LockActivityErrorCodesType {
31
+ }
32
+ }
@@ -0,0 +1,31 @@
1
+ export declare const zh: {
2
+ LOCK_ACTIVITY_NOT_FOUND: string;
3
+ LOCK_ACTIVITY_NOT_AVAILABLE: string;
4
+ LOCK_ACTIVITY_STATUS_INVALID: string;
5
+ LOCK_ACTIVITY_UPDATE_NOT_ALLOWED: string;
6
+ LOCK_ACTIVITY_TIME_RANGE_INVALID: string;
7
+ LOCK_ACTIVITY_REWARD_CNY_INVALID: string;
8
+ LOCK_ACTIVITY_ASSET_NOT_FOUND: string;
9
+ LOCK_ACTIVITY_ASSET_INACTIVE: string;
10
+ LOCK_ACTIVITY_ACCOUNT_TYPE_NOT_FOUND: string;
11
+ LOCK_ACTIVITY_ACCOUNT_TYPE_INACTIVE: string;
12
+ LOCK_ACTIVITY_COVER_IMAGE_FILE_NOT_FOUND: string;
13
+ LOCK_ACTIVITY_CREATE_FAILED: string;
14
+ LOCK_ACTIVITY_UPDATE_FAILED: string;
15
+ LOCK_ACTIVITY_PARTICIPATION_NOT_FOUND: string;
16
+ LOCK_ACTIVITY_PARTICIPATION_ALREADY_EXISTS: string;
17
+ LOCK_ACTIVITY_PARTICIPATION_STATUS_INVALID: string;
18
+ LOCK_ACTIVITY_PARTICIPATION_INVITE_CODE_INVALID: string;
19
+ LOCK_ACTIVITY_PARTICIPATION_USER_NOT_FOUND: string;
20
+ LOCK_ACTIVITY_PARTICIPATION_CREATE_FAILED: string;
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;
25
+ };
26
+ type ZHType = typeof zh;
27
+ declare module '../../../error/messages' {
28
+ interface ErrorMessageRegistry extends ZHType {
29
+ }
30
+ }
31
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from './admin/service';
2
+ export * from './db.schemas';
3
+ export * from './internal/service';
4
+ export * from './permissions';
5
+ export * from './schema';
6
+ export { lockActivityRouter } from './user/router';
7
+ export * from './user/service';
@@ -0,0 +1,42 @@
1
+ import type { TransactionTx } from '../../db/transaction';
2
+ import { type lockActivityParticipationStatusEnum } from '../participation.schema';
3
+ export type LockActivityParticipationStatus = (typeof lockActivityParticipationStatusEnum.enumValues)[number];
4
+ export declare abstract class InternalLockActivityParticipationService {
5
+ static normalizeInviteCode(inviteCode: string): string;
6
+ static assertStatusTransition(current: LockActivityParticipationStatus, next: LockActivityParticipationStatus): void;
7
+ static ensureActivityExists(tx: TransactionTx, activityId: string): Promise<{
8
+ id: string;
9
+ }>;
10
+ /** App 提交:活动须已上架、前端可见且在有效期内 */
11
+ static ensureActivityOpenForParticipation(tx: TransactionTx, activityId: string): Promise<{
12
+ id: string;
13
+ }>;
14
+ /**
15
+ * 创建参与记录。推广码仅校验非空;邀请人不存在时 inviterUserId 为 null(不阻断提交)。
16
+ */
17
+ static createParticipationRecord(tx: TransactionTx, input: {
18
+ activityId: string;
19
+ userId: string;
20
+ inviteCode: string;
21
+ requireOpenActivity: boolean;
22
+ }): Promise<{
23
+ activityId: string;
24
+ adminRemark: string | null;
25
+ createdAt: Date;
26
+ id: string;
27
+ inviteCode: string;
28
+ inviterUserId: string | null;
29
+ rejectReason: string | null;
30
+ reviewedAt: Date | null;
31
+ rewardIssuedAt: Date | null;
32
+ status: "rejected" | "reward_issued" | "submitted" | "under_review";
33
+ submittedAt: Date;
34
+ updatedAt: Date;
35
+ userId: string;
36
+ }>;
37
+ static ensureUserExists(tx: TransactionTx, userId: string): Promise<{
38
+ id: string;
39
+ }>;
40
+ static resolveInviterUserIdByInviteCode(tx: TransactionTx, inviteCode: string): Promise<string | null>;
41
+ static ensureParticipationUnique(tx: TransactionTx, activityId: string, userId: string): Promise<void>;
42
+ }
@@ -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
+ }