@r2wa-org/eden 0.0.97 → 0.0.99

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 (71) hide show
  1. package/dist/admin/index.d.ts +731 -152
  2. package/dist/asset/admin/router.d.ts +1 -13
  3. package/dist/asset-convert-product/admin/dto.schemas.d.ts +8 -0
  4. package/dist/asset-convert-product/admin/router.d.ts +25 -13
  5. package/dist/asset-convert-product/admin/service.d.ts +12 -12
  6. package/dist/auth/better-auth.d.ts +7 -1
  7. package/dist/auth/i18n/zh.d.ts +100 -0
  8. package/dist/auth/permissions.d.ts +6 -1
  9. package/dist/auth/roles.d.ts +15 -0
  10. package/dist/bank-account/admin/router.d.ts +13 -1
  11. package/dist/content-video/admin/dto.schemas.d.ts +128 -0
  12. package/dist/content-video/admin/router.d.ts +861 -0
  13. package/dist/content-video/admin/service.d.ts +210 -0
  14. package/dist/content-video/db.schemas.d.ts +486 -0
  15. package/dist/content-video/errors/index.d.ts +17 -0
  16. package/dist/content-video/errors/locales/zh.d.ts +16 -0
  17. package/dist/content-video/index.d.ts +8 -0
  18. package/dist/content-video/internal/service.d.ts +106 -0
  19. package/dist/content-video/permissions.d.ts +4 -0
  20. package/dist/content-video/schema.d.ts +257 -0
  21. package/dist/content-video/user/dto.schemas.d.ts +52 -0
  22. package/dist/content-video/user/router.d.ts +482 -0
  23. package/dist/content-video/user/service.d.ts +36 -0
  24. package/dist/db/schemas.d.ts +1 -0
  25. package/dist/file-storage/admin/dto.schemas.d.ts +4 -0
  26. package/dist/file-storage/admin/router.d.ts +2 -2
  27. package/dist/file-storage/admin/service.d.ts +2 -2
  28. package/dist/file-storage/db.schemas.d.ts +4 -4
  29. package/dist/file-storage/internal/service.d.ts +1 -1
  30. package/dist/file-storage/s3.client.d.ts +22 -0
  31. package/dist/file-storage/schema.d.ts +3 -3
  32. package/dist/file-storage/share/dto.schemas.d.ts +1 -0
  33. package/dist/file-storage/share/router.d.ts +1 -1
  34. package/dist/file-storage/user/dto.schemas.d.ts +6 -4
  35. package/dist/file-storage/user/router.d.ts +3 -3
  36. package/dist/file-storage/user/service.d.ts +2 -2
  37. package/dist/index.d.ts +1019 -170
  38. package/dist/ledger/admin/dto.schemas.d.ts +8 -0
  39. package/dist/ledger/admin/router.d.ts +4 -4
  40. package/dist/ledger/db.schemas.d.ts +8 -8
  41. package/dist/ledger/schema.d.ts +6 -6
  42. package/dist/ledger/user/dto.schemas.d.ts +8 -8
  43. package/dist/ledger/user/router.d.ts +2 -2
  44. package/dist/ledger/user/service.d.ts +2 -2
  45. package/dist/ledger-account-type/admin/router.d.ts +1 -13
  46. package/dist/lock-activity/admin/participation.dto.schemas.d.ts +52 -0
  47. package/dist/lock-activity/admin/reward.service.d.ts +48 -0
  48. package/dist/lock-activity/admin/router.d.ts +71 -0
  49. package/dist/lock-activity/constants.d.ts +2 -0
  50. package/dist/lock-activity/cron.d.ts +6 -0
  51. package/dist/lock-activity/errors/index.d.ts +3 -0
  52. package/dist/lock-activity/errors/locales/zh.d.ts +3 -0
  53. package/dist/lock-activity/internal/reward.service.d.ts +15 -0
  54. package/dist/lock-activity/user/router.d.ts +13 -1
  55. package/dist/news/admin/dto.schemas.d.ts +26 -26
  56. package/dist/news/admin/router.d.ts +25 -25
  57. package/dist/news/admin/service.d.ts +4 -1
  58. package/dist/news/user/service.d.ts +2 -2
  59. package/dist/referral/admin/dto.schemas.d.ts +597 -0
  60. package/dist/referral/admin/router.d.ts +553 -0
  61. package/dist/referral/admin/service.d.ts +6 -0
  62. package/dist/referral/errors/index.d.ts +15 -0
  63. package/dist/referral/errors/locales/zh.d.ts +14 -0
  64. package/dist/referral/index.d.ts +10 -0
  65. package/dist/referral/internal/service.d.ts +23 -0
  66. package/dist/referral/user/dto.schemas.d.ts +602 -0
  67. package/dist/referral/user/router.d.ts +606 -0
  68. package/dist/referral/user/service.d.ts +21 -0
  69. package/dist/user/internal/avatar.service.d.ts +42 -0
  70. package/dist/withdraw/user/router.d.ts +1 -13
  71. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ export declare const zh: {
2
+ CONTENT_VIDEO_NOT_FOUND: string;
3
+ CONTENT_VIDEO_CREATE_FAILED: string;
4
+ CONTENT_VIDEO_UPDATE_FAILED: string;
5
+ CONTENT_VIDEO_VIDEO_FILE_NOT_FOUND: string;
6
+ CONTENT_VIDEO_VIDEO_FILE_INVALID: string;
7
+ CONTENT_VIDEO_COVER_FILE_NOT_FOUND: string;
8
+ CONTENT_VIDEO_COVER_FILE_INVALID: string;
9
+ CONTENT_VIDEO_STATUS_INVALID: string;
10
+ };
11
+ type ZHType = typeof zh;
12
+ declare module '../../../error/messages' {
13
+ interface ErrorMessageRegistry extends ZHType {
14
+ }
15
+ }
16
+ export {};
@@ -0,0 +1,8 @@
1
+ export * from './schema';
2
+ export * from './db.schemas';
3
+ export * from './permissions';
4
+ export * from './internal/service';
5
+ export * from './admin/service';
6
+ export * from './user/service';
7
+ export { contentVideoAdminRouter } from './admin/router';
8
+ export { contentVideoRouter } from './user/router';
@@ -0,0 +1,106 @@
1
+ import type { TransactionTx } from '../../db/transaction';
2
+ export declare abstract class InternalContentVideoService {
3
+ static resolveFilePublicUrl(file: {
4
+ publicUrl: string | null;
5
+ thumbnailUrl: string | null;
6
+ }): string | null;
7
+ static assertAppVideoFile(tx: TransactionTx, fileId: string): Promise<{
8
+ file: {
9
+ accessControl: "private" | "public" | "restricted" | null;
10
+ archivedAt: Date | null;
11
+ businessId: string | null;
12
+ businessMetadata: string | null;
13
+ businessType: "app_video" | "avatar" | "bank_verification" | "contract" | "cover_image" | "export_report" | "financial_report" | "kyc_document" | "ledger_account_import" | "news_attachment" | "notification_attachment" | "other" | "transaction_receipt";
14
+ createdAt: Date;
15
+ deletedAt: Date | null;
16
+ downloadCount: number | null;
17
+ fileExtension: string | null;
18
+ fileHash: string | null;
19
+ fileName: string | null;
20
+ fileSize: number | null;
21
+ id: string;
22
+ isVerified: boolean | null;
23
+ lastDownloadedAt: Date | null;
24
+ mimeType: string | null;
25
+ ownerId: string;
26
+ publicUrl: string | null;
27
+ s3Bucket: string;
28
+ s3ETag: string | null;
29
+ s3Key: string;
30
+ s3Region: string;
31
+ status: "active" | "archived" | "pending_deletion" | "uploading" | null;
32
+ thumbnailUrl: string | null;
33
+ updatedAt: Date;
34
+ uploadCompletedAt: Date | null;
35
+ uploadIpAddress: string | null;
36
+ verificationNote: string | null;
37
+ verifiedAt: Date | null;
38
+ verifiedBy: string | null;
39
+ };
40
+ videoUrl: string;
41
+ }>;
42
+ static assertCoverImageFile(tx: TransactionTx, fileId: string): Promise<{
43
+ file: {
44
+ accessControl: "private" | "public" | "restricted" | null;
45
+ archivedAt: Date | null;
46
+ businessId: string | null;
47
+ businessMetadata: string | null;
48
+ businessType: "app_video" | "avatar" | "bank_verification" | "contract" | "cover_image" | "export_report" | "financial_report" | "kyc_document" | "ledger_account_import" | "news_attachment" | "notification_attachment" | "other" | "transaction_receipt";
49
+ createdAt: Date;
50
+ deletedAt: Date | null;
51
+ downloadCount: number | null;
52
+ fileExtension: string | null;
53
+ fileHash: string | null;
54
+ fileName: string | null;
55
+ fileSize: number | null;
56
+ id: string;
57
+ isVerified: boolean | null;
58
+ lastDownloadedAt: Date | null;
59
+ mimeType: string | null;
60
+ ownerId: string;
61
+ publicUrl: string | null;
62
+ s3Bucket: string;
63
+ s3ETag: string | null;
64
+ s3Key: string;
65
+ s3Region: string;
66
+ status: "active" | "archived" | "pending_deletion" | "uploading" | null;
67
+ thumbnailUrl: string | null;
68
+ updatedAt: Date;
69
+ uploadCompletedAt: Date | null;
70
+ uploadIpAddress: string | null;
71
+ verificationNote: string | null;
72
+ verifiedAt: Date | null;
73
+ verifiedBy: string | null;
74
+ };
75
+ coverUrl: string;
76
+ }>;
77
+ static formatPublicVideo(row: {
78
+ id: string;
79
+ title: string;
80
+ description: string | null;
81
+ sortOrder: number;
82
+ durationSeconds: number | null;
83
+ publishedAt: Date | null;
84
+ videoFile: {
85
+ publicUrl: string | null;
86
+ thumbnailUrl: string | null;
87
+ mimeType: string | null;
88
+ fileSize: number | null;
89
+ } | null;
90
+ coverFile: {
91
+ publicUrl: string | null;
92
+ thumbnailUrl: string | null;
93
+ } | null;
94
+ }): {
95
+ id: string;
96
+ title: string;
97
+ description: string | undefined;
98
+ videoUrl: string;
99
+ coverUrl: string | undefined;
100
+ mimeType: string | undefined;
101
+ fileSize: number | undefined;
102
+ durationSeconds: number | undefined;
103
+ sortOrder: number;
104
+ publishedAt: Date | undefined;
105
+ };
106
+ }
@@ -0,0 +1,4 @@
1
+ export declare const contentVideoPermissions: {
2
+ readonly 'content_video:video': readonly ['create', 'read', 'update', 'delete', 'list'];
3
+ };
4
+ export type ContentVideoPermission = keyof typeof contentVideoPermissions;
@@ -0,0 +1,257 @@
1
+ export declare const contentVideoStatusEnum: import("drizzle-orm/pg-core").PgEnum<["draft", "published", "archived"]>;
2
+ /**
3
+ * App 展示视频
4
+ * 后台上传并发布,供前端 App 列表/播放
5
+ */
6
+ export declare const contentVideo: import("drizzle-orm/pg-core").PgTableWithColumns<{
7
+ name: "content_video";
8
+ schema: undefined;
9
+ columns: {
10
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
11
+ name: "created_at";
12
+ tableName: "content_video";
13
+ dataType: "date";
14
+ columnType: "PgTimestamp";
15
+ data: Date;
16
+ driverParam: string;
17
+ notNull: true;
18
+ hasDefault: true;
19
+ isPrimaryKey: false;
20
+ isAutoincrement: false;
21
+ hasRuntimeDefault: false;
22
+ enumValues: undefined;
23
+ baseColumn: never;
24
+ identity: undefined;
25
+ generated: undefined;
26
+ }, {}, {}>;
27
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
28
+ name: "updated_at";
29
+ tableName: "content_video";
30
+ dataType: "date";
31
+ columnType: "PgTimestamp";
32
+ data: Date;
33
+ driverParam: string;
34
+ notNull: true;
35
+ hasDefault: true;
36
+ isPrimaryKey: false;
37
+ isAutoincrement: false;
38
+ hasRuntimeDefault: false;
39
+ enumValues: undefined;
40
+ baseColumn: never;
41
+ identity: undefined;
42
+ generated: undefined;
43
+ }, {}, {}>;
44
+ deletedAt: import("drizzle-orm/pg-core").PgColumn<{
45
+ name: "deleted_at";
46
+ tableName: "content_video";
47
+ dataType: "date";
48
+ columnType: "PgTimestamp";
49
+ data: Date;
50
+ driverParam: string;
51
+ notNull: false;
52
+ hasDefault: false;
53
+ isPrimaryKey: false;
54
+ isAutoincrement: false;
55
+ hasRuntimeDefault: false;
56
+ enumValues: undefined;
57
+ baseColumn: never;
58
+ identity: undefined;
59
+ generated: undefined;
60
+ }, {}, {}>;
61
+ id: import("drizzle-orm/pg-core").PgColumn<{
62
+ name: "id";
63
+ tableName: "content_video";
64
+ dataType: "string";
65
+ columnType: "PgUUID";
66
+ data: string;
67
+ driverParam: string;
68
+ notNull: true;
69
+ hasDefault: true;
70
+ isPrimaryKey: true;
71
+ isAutoincrement: false;
72
+ hasRuntimeDefault: false;
73
+ enumValues: undefined;
74
+ baseColumn: never;
75
+ identity: undefined;
76
+ generated: undefined;
77
+ }, {}, {}>;
78
+ title: import("drizzle-orm/pg-core").PgColumn<{
79
+ name: "title";
80
+ tableName: "content_video";
81
+ dataType: "string";
82
+ columnType: "PgVarchar";
83
+ data: string;
84
+ driverParam: string;
85
+ notNull: true;
86
+ hasDefault: false;
87
+ isPrimaryKey: false;
88
+ isAutoincrement: false;
89
+ hasRuntimeDefault: false;
90
+ enumValues: [string, ...string[]];
91
+ baseColumn: never;
92
+ identity: undefined;
93
+ generated: undefined;
94
+ }, {}, {
95
+ length: 255;
96
+ }>;
97
+ description: import("drizzle-orm/pg-core").PgColumn<{
98
+ name: "description";
99
+ tableName: "content_video";
100
+ dataType: "string";
101
+ columnType: "PgText";
102
+ data: string;
103
+ driverParam: string;
104
+ notNull: false;
105
+ hasDefault: false;
106
+ isPrimaryKey: false;
107
+ isAutoincrement: false;
108
+ hasRuntimeDefault: false;
109
+ enumValues: [string, ...string[]];
110
+ baseColumn: never;
111
+ identity: undefined;
112
+ generated: undefined;
113
+ }, {}, {}>;
114
+ videoFileId: import("drizzle-orm/pg-core").PgColumn<{
115
+ name: "video_file_id";
116
+ tableName: "content_video";
117
+ dataType: "string";
118
+ columnType: "PgText";
119
+ data: string;
120
+ driverParam: string;
121
+ notNull: true;
122
+ hasDefault: false;
123
+ isPrimaryKey: false;
124
+ isAutoincrement: false;
125
+ hasRuntimeDefault: false;
126
+ enumValues: [string, ...string[]];
127
+ baseColumn: never;
128
+ identity: undefined;
129
+ generated: undefined;
130
+ }, {}, {}>;
131
+ coverFileId: import("drizzle-orm/pg-core").PgColumn<{
132
+ name: "cover_file_id";
133
+ tableName: "content_video";
134
+ dataType: "string";
135
+ columnType: "PgText";
136
+ data: string;
137
+ driverParam: string;
138
+ notNull: false;
139
+ hasDefault: false;
140
+ isPrimaryKey: false;
141
+ isAutoincrement: false;
142
+ hasRuntimeDefault: false;
143
+ enumValues: [string, ...string[]];
144
+ baseColumn: never;
145
+ identity: undefined;
146
+ generated: undefined;
147
+ }, {}, {}>;
148
+ status: import("drizzle-orm/pg-core").PgColumn<{
149
+ name: "status";
150
+ tableName: "content_video";
151
+ dataType: "string";
152
+ columnType: "PgEnumColumn";
153
+ data: "archived" | "draft" | "published";
154
+ driverParam: string;
155
+ notNull: true;
156
+ hasDefault: true;
157
+ isPrimaryKey: false;
158
+ isAutoincrement: false;
159
+ hasRuntimeDefault: false;
160
+ enumValues: ["draft", "published", "archived"];
161
+ baseColumn: never;
162
+ identity: undefined;
163
+ generated: undefined;
164
+ }, {}, {}>;
165
+ isEnabled: import("drizzle-orm/pg-core").PgColumn<{
166
+ name: "is_enabled";
167
+ tableName: "content_video";
168
+ dataType: "boolean";
169
+ columnType: "PgBoolean";
170
+ data: boolean;
171
+ driverParam: boolean;
172
+ notNull: true;
173
+ hasDefault: true;
174
+ isPrimaryKey: false;
175
+ isAutoincrement: false;
176
+ hasRuntimeDefault: false;
177
+ enumValues: undefined;
178
+ baseColumn: never;
179
+ identity: undefined;
180
+ generated: undefined;
181
+ }, {}, {}>;
182
+ sortOrder: import("drizzle-orm/pg-core").PgColumn<{
183
+ name: "sort_order";
184
+ tableName: "content_video";
185
+ dataType: "number";
186
+ columnType: "PgInteger";
187
+ data: number;
188
+ driverParam: string | number;
189
+ notNull: true;
190
+ hasDefault: true;
191
+ isPrimaryKey: false;
192
+ isAutoincrement: false;
193
+ hasRuntimeDefault: false;
194
+ enumValues: undefined;
195
+ baseColumn: never;
196
+ identity: undefined;
197
+ generated: undefined;
198
+ }, {}, {}>;
199
+ durationSeconds: import("drizzle-orm/pg-core").PgColumn<{
200
+ name: "duration_seconds";
201
+ tableName: "content_video";
202
+ dataType: "number";
203
+ columnType: "PgInteger";
204
+ data: number;
205
+ driverParam: string | number;
206
+ notNull: false;
207
+ hasDefault: false;
208
+ isPrimaryKey: false;
209
+ isAutoincrement: false;
210
+ hasRuntimeDefault: false;
211
+ enumValues: undefined;
212
+ baseColumn: never;
213
+ identity: undefined;
214
+ generated: undefined;
215
+ }, {}, {}>;
216
+ publishedAt: import("drizzle-orm/pg-core").PgColumn<{
217
+ name: "published_at";
218
+ tableName: "content_video";
219
+ dataType: "date";
220
+ columnType: "PgTimestamp";
221
+ data: Date;
222
+ driverParam: string;
223
+ notNull: false;
224
+ hasDefault: false;
225
+ isPrimaryKey: false;
226
+ isAutoincrement: false;
227
+ hasRuntimeDefault: false;
228
+ enumValues: undefined;
229
+ baseColumn: never;
230
+ identity: undefined;
231
+ generated: undefined;
232
+ }, {}, {}>;
233
+ createdBy: import("drizzle-orm/pg-core").PgColumn<{
234
+ name: "created_by";
235
+ tableName: "content_video";
236
+ dataType: "string";
237
+ columnType: "PgText";
238
+ data: string;
239
+ driverParam: string;
240
+ notNull: true;
241
+ hasDefault: false;
242
+ isPrimaryKey: false;
243
+ isAutoincrement: false;
244
+ hasRuntimeDefault: false;
245
+ enumValues: [string, ...string[]];
246
+ baseColumn: never;
247
+ identity: undefined;
248
+ generated: undefined;
249
+ }, {}, {}>;
250
+ };
251
+ dialect: 'pg';
252
+ }>;
253
+ export declare const contentVideoRelations: import("drizzle-orm").Relations<"content_video", {
254
+ videoFile: import("drizzle-orm").One<"file_storage", true>;
255
+ coverFile: import("drizzle-orm").One<"file_storage", false>;
256
+ creator: import("drizzle-orm").One<"user", true>;
257
+ }>;
@@ -0,0 +1,52 @@
1
+ export declare const contentVideoPublicItemSchema: import("@sinclair/typebox").TObject<{
2
+ id: import("@sinclair/typebox").TString;
3
+ title: import("@sinclair/typebox").TString;
4
+ description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
5
+ videoUrl: import("@sinclair/typebox").TString;
6
+ coverUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
7
+ mimeType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
8
+ fileSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
9
+ durationSeconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
10
+ sortOrder: import("@sinclair/typebox").TInteger;
11
+ publishedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
12
+ }>;
13
+ export declare const contentVideoPublicListQuerySchema: import("@sinclair/typebox").TObject<{
14
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
15
+ offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
16
+ pageSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
17
+ pageIndex: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
18
+ }>;
19
+ export declare const contentVideoPublicListResponseSchema: import("@sinclair/typebox").TObject<{
20
+ data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
21
+ id: import("@sinclair/typebox").TString;
22
+ title: import("@sinclair/typebox").TString;
23
+ description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
24
+ videoUrl: import("@sinclair/typebox").TString;
25
+ coverUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
26
+ mimeType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
+ fileSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
28
+ durationSeconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
29
+ sortOrder: import("@sinclair/typebox").TInteger;
30
+ publishedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
31
+ }>>;
32
+ pagination: import("@sinclair/typebox").TObject<{
33
+ pageSize: import("@sinclair/typebox").TNumber;
34
+ pageIndex: import("@sinclair/typebox").TNumber;
35
+ total: import("@sinclair/typebox").TNumber;
36
+ totalPages: import("@sinclair/typebox").TNumber;
37
+ hasNextPage: import("@sinclair/typebox").TBoolean;
38
+ }>;
39
+ }>;
40
+ export declare const contentVideoPublicDetailResponseSchema: import("@sinclair/typebox").TObject<{
41
+ id: import("@sinclair/typebox").TString;
42
+ title: import("@sinclair/typebox").TString;
43
+ description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
44
+ videoUrl: import("@sinclair/typebox").TString;
45
+ coverUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
46
+ mimeType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
47
+ fileSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
48
+ durationSeconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
49
+ sortOrder: import("@sinclair/typebox").TInteger;
50
+ publishedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
51
+ }>;
52
+ export type ContentVideoPublicListQueryType = typeof contentVideoPublicListQuerySchema.static;