zcw-shared 1.49.4 → 2.0.1
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/README.md +9 -0
- package/dist/functions/deploy/publishToPgyer.d.ts +16 -0
- package/dist/functions/deploy/publishToPgyer.js +96 -0
- package/dist/functions/deploy/publishToPgyer.js.map +1 -0
- package/dist/functions/fake/generateFakeBankCard.d.ts +87 -0
- package/dist/functions/fake/generateFakeBankCard.js +152 -0
- package/dist/functions/fake/generateFakeBankCard.js.map +1 -0
- package/dist/functions/fake/generateFakeBusinessLicense.d.ts +21 -0
- package/dist/functions/fake/generateFakeBusinessLicense.js +160 -0
- package/dist/functions/fake/generateFakeBusinessLicense.js.map +1 -0
- package/dist/functions/fake/generateFakeDrivingLicense.d.ts +31 -0
- package/dist/functions/fake/generateFakeDrivingLicense.js +119 -0
- package/dist/functions/fake/generateFakeDrivingLicense.js.map +1 -0
- package/dist/functions/fake/generateFakeIdCard.d.ts +30 -0
- package/dist/functions/fake/generateFakeIdCard.js +123 -0
- package/dist/functions/fake/generateFakeIdCard.js.map +1 -0
- package/dist/functions/fake/generateFakeLicensePlate.d.ts +13 -0
- package/dist/functions/fake/generateFakeLicensePlate.js +87 -0
- package/dist/functions/fake/generateFakeLicensePlate.js.map +1 -0
- package/dist/functions/image/renderBankCard.d.ts +1 -1
- package/dist/functions/image/renderBusinessLicense.d.ts +1 -1
- package/dist/functions/image/renderDrivingLicense.d.ts +1 -1
- package/dist/functions/image/renderIdCard.d.ts +1 -1
- package/dist/functions/image/renderLicensePlate.d.ts +1 -1
- package/dist/functions/uniapp/api/audio.d.ts +28 -0
- package/dist/functions/uniapp/api/audio.js +49 -0
- package/dist/functions/uniapp/api/audio.js.map +1 -0
- package/dist/functions/uniapp/api/auth.d.ts +44 -0
- package/dist/functions/uniapp/api/auth.js +59 -0
- package/dist/functions/uniapp/api/auth.js.map +1 -0
- package/dist/functions/uniapp/api/dom.d.ts +2 -0
- package/dist/functions/uniapp/api/dom.js +7 -0
- package/dist/functions/uniapp/api/dom.js.map +1 -0
- package/dist/functions/uniapp/api/index.d.ts +10 -0
- package/dist/functions/uniapp/api/index.js +11 -0
- package/dist/functions/uniapp/api/index.js.map +1 -0
- package/dist/functions/uniapp/api/media.d.ts +13 -0
- package/dist/functions/uniapp/api/media.js +16 -0
- package/dist/functions/uniapp/api/media.js.map +1 -0
- package/dist/functions/uniapp/api/navigation.d.ts +12 -0
- package/dist/functions/uniapp/api/navigation.js +72 -0
- package/dist/functions/uniapp/api/navigation.js.map +1 -0
- package/dist/functions/uniapp/api/network.d.ts +40 -0
- package/dist/functions/uniapp/api/network.js +60 -0
- package/dist/functions/uniapp/api/network.js.map +1 -0
- package/dist/functions/uniapp/api/storage.d.ts +7 -0
- package/dist/functions/uniapp/api/storage.js +84 -0
- package/dist/functions/uniapp/api/storage.js.map +1 -0
- package/dist/functions/uniapp/api/system.d.ts +54 -0
- package/dist/functions/uniapp/api/system.js +31 -0
- package/dist/functions/uniapp/api/system.js.map +1 -0
- package/dist/functions/uniapp/api/ui.d.ts +48 -0
- package/dist/functions/uniapp/api/ui.js +81 -0
- package/dist/functions/uniapp/api/ui.js.map +1 -0
- package/dist/functions/uniapp/platform.d.ts +16 -0
- package/dist/functions/uniapp/platform.js +112 -0
- package/dist/functions/uniapp/platform.js.map +1 -0
- package/dist/schemas/auth.schema.d.ts +363 -0
- package/dist/schemas/auth.schema.js +39 -0
- package/dist/schemas/auth.schema.js.map +1 -0
- package/dist/schemas/video.schema.d.ts +391 -0
- package/dist/schemas/video.schema.js +55 -0
- package/dist/schemas/video.schema.js.map +1 -0
- package/package.json +24 -7
- package/references/dom.d.ts +11 -0
- package/types/auth.d.ts +55 -0
- package/types/video.d.ts +71 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const VideoCategorySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
sort_order: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
id: string;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
sort_order?: number | undefined;
|
|
13
|
+
created_at?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
id: string;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
sort_order?: number | undefined;
|
|
19
|
+
created_at?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const VideoSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodNumber;
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
cover_url: z.ZodOptional<z.ZodString>;
|
|
26
|
+
video_url: z.ZodOptional<z.ZodString>;
|
|
27
|
+
author: z.ZodOptional<z.ZodString>;
|
|
28
|
+
category_id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
views: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
like_count: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
comment_count: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
share_count: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
status: z.ZodOptional<z.ZodString>;
|
|
35
|
+
publish_time: z.ZodOptional<z.ZodString>;
|
|
36
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
37
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
title: string;
|
|
40
|
+
id: number;
|
|
41
|
+
description?: string | undefined;
|
|
42
|
+
duration?: number | undefined;
|
|
43
|
+
status?: string | undefined;
|
|
44
|
+
created_at?: string | undefined;
|
|
45
|
+
cover_url?: string | undefined;
|
|
46
|
+
video_url?: string | undefined;
|
|
47
|
+
author?: string | undefined;
|
|
48
|
+
category_id?: string | undefined;
|
|
49
|
+
views?: number | undefined;
|
|
50
|
+
like_count?: number | undefined;
|
|
51
|
+
comment_count?: number | undefined;
|
|
52
|
+
share_count?: number | undefined;
|
|
53
|
+
publish_time?: string | undefined;
|
|
54
|
+
updated_at?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
title: string;
|
|
57
|
+
id: number;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
duration?: number | undefined;
|
|
60
|
+
status?: string | undefined;
|
|
61
|
+
created_at?: string | undefined;
|
|
62
|
+
cover_url?: string | undefined;
|
|
63
|
+
video_url?: string | undefined;
|
|
64
|
+
author?: string | undefined;
|
|
65
|
+
category_id?: string | undefined;
|
|
66
|
+
views?: number | undefined;
|
|
67
|
+
like_count?: number | undefined;
|
|
68
|
+
comment_count?: number | undefined;
|
|
69
|
+
share_count?: number | undefined;
|
|
70
|
+
publish_time?: string | undefined;
|
|
71
|
+
updated_at?: string | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const VideoListResponseSchema: z.ZodObject<{
|
|
74
|
+
data: z.ZodArray<z.ZodObject<{
|
|
75
|
+
id: z.ZodNumber;
|
|
76
|
+
title: z.ZodString;
|
|
77
|
+
description: z.ZodOptional<z.ZodString>;
|
|
78
|
+
cover_url: z.ZodOptional<z.ZodString>;
|
|
79
|
+
video_url: z.ZodOptional<z.ZodString>;
|
|
80
|
+
author: z.ZodOptional<z.ZodString>;
|
|
81
|
+
category_id: z.ZodOptional<z.ZodString>;
|
|
82
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
views: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
like_count: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
comment_count: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
share_count: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
status: z.ZodOptional<z.ZodString>;
|
|
88
|
+
publish_time: z.ZodOptional<z.ZodString>;
|
|
89
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
90
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
title: string;
|
|
93
|
+
id: number;
|
|
94
|
+
description?: string | undefined;
|
|
95
|
+
duration?: number | undefined;
|
|
96
|
+
status?: string | undefined;
|
|
97
|
+
created_at?: string | undefined;
|
|
98
|
+
cover_url?: string | undefined;
|
|
99
|
+
video_url?: string | undefined;
|
|
100
|
+
author?: string | undefined;
|
|
101
|
+
category_id?: string | undefined;
|
|
102
|
+
views?: number | undefined;
|
|
103
|
+
like_count?: number | undefined;
|
|
104
|
+
comment_count?: number | undefined;
|
|
105
|
+
share_count?: number | undefined;
|
|
106
|
+
publish_time?: string | undefined;
|
|
107
|
+
updated_at?: string | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
title: string;
|
|
110
|
+
id: number;
|
|
111
|
+
description?: string | undefined;
|
|
112
|
+
duration?: number | undefined;
|
|
113
|
+
status?: string | undefined;
|
|
114
|
+
created_at?: string | undefined;
|
|
115
|
+
cover_url?: string | undefined;
|
|
116
|
+
video_url?: string | undefined;
|
|
117
|
+
author?: string | undefined;
|
|
118
|
+
category_id?: string | undefined;
|
|
119
|
+
views?: number | undefined;
|
|
120
|
+
like_count?: number | undefined;
|
|
121
|
+
comment_count?: number | undefined;
|
|
122
|
+
share_count?: number | undefined;
|
|
123
|
+
publish_time?: string | undefined;
|
|
124
|
+
updated_at?: string | undefined;
|
|
125
|
+
}>, "many">;
|
|
126
|
+
total: z.ZodNumber;
|
|
127
|
+
limit: z.ZodNumber;
|
|
128
|
+
offset: z.ZodNumber;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
data: {
|
|
131
|
+
title: string;
|
|
132
|
+
id: number;
|
|
133
|
+
description?: string | undefined;
|
|
134
|
+
duration?: number | undefined;
|
|
135
|
+
status?: string | undefined;
|
|
136
|
+
created_at?: string | undefined;
|
|
137
|
+
cover_url?: string | undefined;
|
|
138
|
+
video_url?: string | undefined;
|
|
139
|
+
author?: string | undefined;
|
|
140
|
+
category_id?: string | undefined;
|
|
141
|
+
views?: number | undefined;
|
|
142
|
+
like_count?: number | undefined;
|
|
143
|
+
comment_count?: number | undefined;
|
|
144
|
+
share_count?: number | undefined;
|
|
145
|
+
publish_time?: string | undefined;
|
|
146
|
+
updated_at?: string | undefined;
|
|
147
|
+
}[];
|
|
148
|
+
total: number;
|
|
149
|
+
limit: number;
|
|
150
|
+
offset: number;
|
|
151
|
+
}, {
|
|
152
|
+
data: {
|
|
153
|
+
title: string;
|
|
154
|
+
id: number;
|
|
155
|
+
description?: string | undefined;
|
|
156
|
+
duration?: number | undefined;
|
|
157
|
+
status?: string | undefined;
|
|
158
|
+
created_at?: string | undefined;
|
|
159
|
+
cover_url?: string | undefined;
|
|
160
|
+
video_url?: string | undefined;
|
|
161
|
+
author?: string | undefined;
|
|
162
|
+
category_id?: string | undefined;
|
|
163
|
+
views?: number | undefined;
|
|
164
|
+
like_count?: number | undefined;
|
|
165
|
+
comment_count?: number | undefined;
|
|
166
|
+
share_count?: number | undefined;
|
|
167
|
+
publish_time?: string | undefined;
|
|
168
|
+
updated_at?: string | undefined;
|
|
169
|
+
}[];
|
|
170
|
+
total: number;
|
|
171
|
+
limit: number;
|
|
172
|
+
offset: number;
|
|
173
|
+
}>;
|
|
174
|
+
export declare const VideoDetailResponseSchema: z.ZodObject<{
|
|
175
|
+
data: z.ZodObject<{
|
|
176
|
+
id: z.ZodNumber;
|
|
177
|
+
title: z.ZodString;
|
|
178
|
+
description: z.ZodOptional<z.ZodString>;
|
|
179
|
+
cover_url: z.ZodOptional<z.ZodString>;
|
|
180
|
+
video_url: z.ZodOptional<z.ZodString>;
|
|
181
|
+
author: z.ZodOptional<z.ZodString>;
|
|
182
|
+
category_id: z.ZodOptional<z.ZodString>;
|
|
183
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
views: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
like_count: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
comment_count: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
share_count: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
status: z.ZodOptional<z.ZodString>;
|
|
189
|
+
publish_time: z.ZodOptional<z.ZodString>;
|
|
190
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
191
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
title: string;
|
|
194
|
+
id: number;
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
duration?: number | undefined;
|
|
197
|
+
status?: string | undefined;
|
|
198
|
+
created_at?: string | undefined;
|
|
199
|
+
cover_url?: string | undefined;
|
|
200
|
+
video_url?: string | undefined;
|
|
201
|
+
author?: string | undefined;
|
|
202
|
+
category_id?: string | undefined;
|
|
203
|
+
views?: number | undefined;
|
|
204
|
+
like_count?: number | undefined;
|
|
205
|
+
comment_count?: number | undefined;
|
|
206
|
+
share_count?: number | undefined;
|
|
207
|
+
publish_time?: string | undefined;
|
|
208
|
+
updated_at?: string | undefined;
|
|
209
|
+
}, {
|
|
210
|
+
title: string;
|
|
211
|
+
id: number;
|
|
212
|
+
description?: string | undefined;
|
|
213
|
+
duration?: number | undefined;
|
|
214
|
+
status?: string | undefined;
|
|
215
|
+
created_at?: string | undefined;
|
|
216
|
+
cover_url?: string | undefined;
|
|
217
|
+
video_url?: string | undefined;
|
|
218
|
+
author?: string | undefined;
|
|
219
|
+
category_id?: string | undefined;
|
|
220
|
+
views?: number | undefined;
|
|
221
|
+
like_count?: number | undefined;
|
|
222
|
+
comment_count?: number | undefined;
|
|
223
|
+
share_count?: number | undefined;
|
|
224
|
+
publish_time?: string | undefined;
|
|
225
|
+
updated_at?: string | undefined;
|
|
226
|
+
}>;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
data: {
|
|
229
|
+
title: string;
|
|
230
|
+
id: number;
|
|
231
|
+
description?: string | undefined;
|
|
232
|
+
duration?: number | undefined;
|
|
233
|
+
status?: string | undefined;
|
|
234
|
+
created_at?: string | undefined;
|
|
235
|
+
cover_url?: string | undefined;
|
|
236
|
+
video_url?: string | undefined;
|
|
237
|
+
author?: string | undefined;
|
|
238
|
+
category_id?: string | undefined;
|
|
239
|
+
views?: number | undefined;
|
|
240
|
+
like_count?: number | undefined;
|
|
241
|
+
comment_count?: number | undefined;
|
|
242
|
+
share_count?: number | undefined;
|
|
243
|
+
publish_time?: string | undefined;
|
|
244
|
+
updated_at?: string | undefined;
|
|
245
|
+
};
|
|
246
|
+
}, {
|
|
247
|
+
data: {
|
|
248
|
+
title: string;
|
|
249
|
+
id: number;
|
|
250
|
+
description?: string | undefined;
|
|
251
|
+
duration?: number | undefined;
|
|
252
|
+
status?: string | undefined;
|
|
253
|
+
created_at?: string | undefined;
|
|
254
|
+
cover_url?: string | undefined;
|
|
255
|
+
video_url?: string | undefined;
|
|
256
|
+
author?: string | undefined;
|
|
257
|
+
category_id?: string | undefined;
|
|
258
|
+
views?: number | undefined;
|
|
259
|
+
like_count?: number | undefined;
|
|
260
|
+
comment_count?: number | undefined;
|
|
261
|
+
share_count?: number | undefined;
|
|
262
|
+
publish_time?: string | undefined;
|
|
263
|
+
updated_at?: string | undefined;
|
|
264
|
+
};
|
|
265
|
+
}>;
|
|
266
|
+
export declare const VideoCategoriesResponseSchema: z.ZodObject<{
|
|
267
|
+
data: z.ZodArray<z.ZodObject<{
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
description: z.ZodOptional<z.ZodString>;
|
|
271
|
+
sort_order: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
name: string;
|
|
275
|
+
id: string;
|
|
276
|
+
description?: string | undefined;
|
|
277
|
+
sort_order?: number | undefined;
|
|
278
|
+
created_at?: string | undefined;
|
|
279
|
+
}, {
|
|
280
|
+
name: string;
|
|
281
|
+
id: string;
|
|
282
|
+
description?: string | undefined;
|
|
283
|
+
sort_order?: number | undefined;
|
|
284
|
+
created_at?: string | undefined;
|
|
285
|
+
}>, "many">;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
data: {
|
|
288
|
+
name: string;
|
|
289
|
+
id: string;
|
|
290
|
+
description?: string | undefined;
|
|
291
|
+
sort_order?: number | undefined;
|
|
292
|
+
created_at?: string | undefined;
|
|
293
|
+
}[];
|
|
294
|
+
}, {
|
|
295
|
+
data: {
|
|
296
|
+
name: string;
|
|
297
|
+
id: string;
|
|
298
|
+
description?: string | undefined;
|
|
299
|
+
sort_order?: number | undefined;
|
|
300
|
+
created_at?: string | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
}>;
|
|
303
|
+
export declare const VideoCommentSchema: z.ZodObject<{
|
|
304
|
+
id: z.ZodNumber;
|
|
305
|
+
video_id: z.ZodNumber;
|
|
306
|
+
user_id: z.ZodString;
|
|
307
|
+
content: z.ZodString;
|
|
308
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
309
|
+
like_count: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
311
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
312
|
+
}, "strip", z.ZodTypeAny, {
|
|
313
|
+
id: number;
|
|
314
|
+
content: string;
|
|
315
|
+
video_id: number;
|
|
316
|
+
user_id: string;
|
|
317
|
+
created_at?: string | undefined;
|
|
318
|
+
like_count?: number | undefined;
|
|
319
|
+
updated_at?: string | undefined;
|
|
320
|
+
parent_id?: number | null | undefined;
|
|
321
|
+
}, {
|
|
322
|
+
id: number;
|
|
323
|
+
content: string;
|
|
324
|
+
video_id: number;
|
|
325
|
+
user_id: string;
|
|
326
|
+
created_at?: string | undefined;
|
|
327
|
+
like_count?: number | undefined;
|
|
328
|
+
updated_at?: string | undefined;
|
|
329
|
+
parent_id?: number | null | undefined;
|
|
330
|
+
}>;
|
|
331
|
+
export declare const VideoCommentsResponseSchema: z.ZodObject<{
|
|
332
|
+
data: z.ZodArray<z.ZodObject<{
|
|
333
|
+
id: z.ZodNumber;
|
|
334
|
+
video_id: z.ZodNumber;
|
|
335
|
+
user_id: z.ZodString;
|
|
336
|
+
content: z.ZodString;
|
|
337
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
338
|
+
like_count: z.ZodOptional<z.ZodNumber>;
|
|
339
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
340
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
id: number;
|
|
343
|
+
content: string;
|
|
344
|
+
video_id: number;
|
|
345
|
+
user_id: string;
|
|
346
|
+
created_at?: string | undefined;
|
|
347
|
+
like_count?: number | undefined;
|
|
348
|
+
updated_at?: string | undefined;
|
|
349
|
+
parent_id?: number | null | undefined;
|
|
350
|
+
}, {
|
|
351
|
+
id: number;
|
|
352
|
+
content: string;
|
|
353
|
+
video_id: number;
|
|
354
|
+
user_id: string;
|
|
355
|
+
created_at?: string | undefined;
|
|
356
|
+
like_count?: number | undefined;
|
|
357
|
+
updated_at?: string | undefined;
|
|
358
|
+
parent_id?: number | null | undefined;
|
|
359
|
+
}>, "many">;
|
|
360
|
+
total: z.ZodNumber;
|
|
361
|
+
limit: z.ZodNumber;
|
|
362
|
+
offset: z.ZodNumber;
|
|
363
|
+
}, "strip", z.ZodTypeAny, {
|
|
364
|
+
data: {
|
|
365
|
+
id: number;
|
|
366
|
+
content: string;
|
|
367
|
+
video_id: number;
|
|
368
|
+
user_id: string;
|
|
369
|
+
created_at?: string | undefined;
|
|
370
|
+
like_count?: number | undefined;
|
|
371
|
+
updated_at?: string | undefined;
|
|
372
|
+
parent_id?: number | null | undefined;
|
|
373
|
+
}[];
|
|
374
|
+
total: number;
|
|
375
|
+
limit: number;
|
|
376
|
+
offset: number;
|
|
377
|
+
}, {
|
|
378
|
+
data: {
|
|
379
|
+
id: number;
|
|
380
|
+
content: string;
|
|
381
|
+
video_id: number;
|
|
382
|
+
user_id: string;
|
|
383
|
+
created_at?: string | undefined;
|
|
384
|
+
like_count?: number | undefined;
|
|
385
|
+
updated_at?: string | undefined;
|
|
386
|
+
parent_id?: number | null | undefined;
|
|
387
|
+
}[];
|
|
388
|
+
total: number;
|
|
389
|
+
limit: number;
|
|
390
|
+
offset: number;
|
|
391
|
+
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const VideoCategorySchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
name: z.string(),
|
|
5
|
+
description: z.string().optional(),
|
|
6
|
+
sort_order: z.number().optional(),
|
|
7
|
+
created_at: z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
export const VideoSchema = z.object({
|
|
10
|
+
id: z.number(),
|
|
11
|
+
title: z.string(),
|
|
12
|
+
description: z.string().optional(),
|
|
13
|
+
cover_url: z.string().optional(),
|
|
14
|
+
video_url: z.string().optional(),
|
|
15
|
+
author: z.string().optional(),
|
|
16
|
+
category_id: z.string().optional(),
|
|
17
|
+
duration: z.number().optional(),
|
|
18
|
+
views: z.number().optional(),
|
|
19
|
+
like_count: z.number().optional(),
|
|
20
|
+
comment_count: z.number().optional(),
|
|
21
|
+
share_count: z.number().optional(),
|
|
22
|
+
status: z.string().optional(),
|
|
23
|
+
publish_time: z.string().optional(),
|
|
24
|
+
created_at: z.string().optional(),
|
|
25
|
+
updated_at: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
export const VideoListResponseSchema = z.object({
|
|
28
|
+
data: z.array(VideoSchema),
|
|
29
|
+
total: z.number(),
|
|
30
|
+
limit: z.number(),
|
|
31
|
+
offset: z.number(),
|
|
32
|
+
});
|
|
33
|
+
export const VideoDetailResponseSchema = z.object({
|
|
34
|
+
data: VideoSchema,
|
|
35
|
+
});
|
|
36
|
+
export const VideoCategoriesResponseSchema = z.object({
|
|
37
|
+
data: z.array(VideoCategorySchema),
|
|
38
|
+
});
|
|
39
|
+
export const VideoCommentSchema = z.object({
|
|
40
|
+
id: z.number(),
|
|
41
|
+
video_id: z.number(),
|
|
42
|
+
user_id: z.string(),
|
|
43
|
+
content: z.string(),
|
|
44
|
+
parent_id: z.number().nullable().optional(),
|
|
45
|
+
like_count: z.number().optional(),
|
|
46
|
+
created_at: z.string().optional(),
|
|
47
|
+
updated_at: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
export const VideoCommentsResponseSchema = z.object({
|
|
50
|
+
data: z.array(VideoCommentSchema),
|
|
51
|
+
total: z.number(),
|
|
52
|
+
limit: z.number(),
|
|
53
|
+
offset: z.number(),
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=video.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.schema.js","sourceRoot":"","sources":["../../src/schemas/video.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgBvB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAoC,CAAA;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EA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
14
|
"description": "",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"zod": "^3.23.8"
|
|
17
|
+
},
|
|
15
18
|
"devDependencies": {
|
|
16
19
|
"@cloudbase/manager-node": "^4.3.2",
|
|
17
20
|
"cos-nodejs-sdk-v5": "^2.14.4",
|
|
@@ -118,6 +121,7 @@
|
|
|
118
121
|
"./functions/date/formatDate": "./dist/functions/date/formatDate.js",
|
|
119
122
|
"./functions/date/timeAgo": "./dist/functions/date/timeAgo.js",
|
|
120
123
|
"./functions/debug/createDebugger": "./dist/functions/debug/createDebugger.js",
|
|
124
|
+
"./functions/deploy/publishToPgyer": "./dist/functions/deploy/publishToPgyer.js",
|
|
121
125
|
"./functions/design-tokens/buildTokens": "./dist/functions/design-tokens/buildTokens.js",
|
|
122
126
|
"./functions/design-tokens/generateVariables": "./dist/functions/design-tokens/generateVariables.js",
|
|
123
127
|
"./functions/design-tokens/mixColors": "./dist/functions/design-tokens/mixColors.js",
|
|
@@ -137,6 +141,11 @@
|
|
|
137
141
|
"./functions/dom/getViewportRect": "./dist/functions/dom/getViewportRect.js",
|
|
138
142
|
"./functions/dom/isValidPlacement": "./dist/functions/dom/isValidPlacement.js",
|
|
139
143
|
"./functions/dom/pickFile": "./dist/functions/dom/pickFile.js",
|
|
144
|
+
"./functions/fake/generateFakeBankCard": "./dist/functions/fake/generateFakeBankCard.js",
|
|
145
|
+
"./functions/fake/generateFakeBusinessLicense": "./dist/functions/fake/generateFakeBusinessLicense.js",
|
|
146
|
+
"./functions/fake/generateFakeDrivingLicense": "./dist/functions/fake/generateFakeDrivingLicense.js",
|
|
147
|
+
"./functions/fake/generateFakeIdCard": "./dist/functions/fake/generateFakeIdCard.js",
|
|
148
|
+
"./functions/fake/generateFakeLicensePlate": "./dist/functions/fake/generateFakeLicensePlate.js",
|
|
140
149
|
"./functions/file/formatFileSize": "./dist/functions/file/formatFileSize.js",
|
|
141
150
|
"./functions/file/getFileExtension": "./dist/functions/file/getFileExtension.js",
|
|
142
151
|
"./functions/functional/compose": "./dist/functions/functional/compose.js",
|
|
@@ -214,7 +223,6 @@
|
|
|
214
223
|
"./functions/promise/sleep": "./dist/functions/promise/sleep.js",
|
|
215
224
|
"./functions/promise/timeout": "./dist/functions/promise/timeout.js",
|
|
216
225
|
"./functions/software/findSoftware": "./dist/functions/software/findSoftware.js",
|
|
217
|
-
"./functions/software/publishToPgyer": "./dist/functions/software/publishToPgyer.js",
|
|
218
226
|
"./functions/storage/useLocalStorage": "./dist/functions/storage/useLocalStorage.js",
|
|
219
227
|
"./functions/storage/useSessionStorage": "./dist/functions/storage/useSessionStorage.js",
|
|
220
228
|
"./functions/storage/useStorage": "./dist/functions/storage/useStorage.js",
|
|
@@ -238,6 +246,15 @@
|
|
|
238
246
|
"./functions/tree/filterTree": "./dist/functions/tree/filterTree.js",
|
|
239
247
|
"./functions/tree/findNode": "./dist/functions/tree/findNode.js",
|
|
240
248
|
"./functions/tree/flattenTree": "./dist/functions/tree/flattenTree.js",
|
|
249
|
+
"./functions/uniapp/api/audio": "./dist/functions/uniapp/api/audio.js",
|
|
250
|
+
"./functions/uniapp/api/auth": "./dist/functions/uniapp/api/auth.js",
|
|
251
|
+
"./functions/uniapp/api/dom": "./dist/functions/uniapp/api/dom.js",
|
|
252
|
+
"./functions/uniapp/api/media": "./dist/functions/uniapp/api/media.js",
|
|
253
|
+
"./functions/uniapp/api/navigation": "./dist/functions/uniapp/api/navigation.js",
|
|
254
|
+
"./functions/uniapp/api/network": "./dist/functions/uniapp/api/network.js",
|
|
255
|
+
"./functions/uniapp/api/storage": "./dist/functions/uniapp/api/storage.js",
|
|
256
|
+
"./functions/uniapp/api/system": "./dist/functions/uniapp/api/system.js",
|
|
257
|
+
"./functions/uniapp/api/ui": "./dist/functions/uniapp/api/ui.js",
|
|
241
258
|
"./functions/uniapp/app-plus/buildAndroidApp": "./dist/functions/uniapp/app-plus/buildAndroidApp.js",
|
|
242
259
|
"./functions/uniapp/app-plus/buildIOSApp": "./dist/functions/uniapp/app-plus/buildIOSApp.js",
|
|
243
260
|
"./functions/uniapp/build": "./dist/functions/uniapp/build.js",
|
|
@@ -264,6 +281,7 @@
|
|
|
264
281
|
"./functions/uniapp/pay/showPay": "./dist/functions/uniapp/pay/showPay.js",
|
|
265
282
|
"./functions/uniapp/phone/adapters/getPhoneInMiniapp": "./dist/functions/uniapp/phone/adapters/getPhoneInMiniapp.js",
|
|
266
283
|
"./functions/uniapp/phone/showWxPhone": "./dist/functions/uniapp/phone/showWxPhone.js",
|
|
284
|
+
"./functions/uniapp/platform": "./dist/functions/uniapp/platform.js",
|
|
267
285
|
"./functions/uniapp/record/adapters/recordInApp": "./dist/functions/uniapp/record/adapters/recordInApp.js",
|
|
268
286
|
"./functions/uniapp/record/adapters/recordInH5": "./dist/functions/uniapp/record/adapters/recordInH5.js",
|
|
269
287
|
"./functions/uniapp/record/adapters/recordInMiniapp": "./dist/functions/uniapp/record/adapters/recordInMiniapp.js",
|
|
@@ -290,11 +308,6 @@
|
|
|
290
308
|
"./functions/utils/validate": "./dist/functions/utils/validate.js",
|
|
291
309
|
"./functions/utils/vueDiff": "./dist/functions/utils/vueDiff.js",
|
|
292
310
|
"./functions/utils/walk": "./dist/functions/utils/walk.js",
|
|
293
|
-
"./functions/validation/generateFakeBankCard": "./dist/functions/validation/generateFakeBankCard.js",
|
|
294
|
-
"./functions/validation/generateFakeBusinessLicense": "./dist/functions/validation/generateFakeBusinessLicense.js",
|
|
295
|
-
"./functions/validation/generateFakeDrivingLicense": "./dist/functions/validation/generateFakeDrivingLicense.js",
|
|
296
|
-
"./functions/validation/generateFakeIdCard": "./dist/functions/validation/generateFakeIdCard.js",
|
|
297
|
-
"./functions/validation/generateFakeLicensePlate": "./dist/functions/validation/generateFakeLicensePlate.js",
|
|
298
311
|
"./functions/validation/isEmail": "./dist/functions/validation/isEmail.js",
|
|
299
312
|
"./functions/validation/isIdCard": "./dist/functions/validation/isIdCard.js",
|
|
300
313
|
"./functions/validation/isIpAddress": "./dist/functions/validation/isIpAddress.js",
|
|
@@ -319,6 +332,8 @@
|
|
|
319
332
|
"./reactive/useReactiveCookie": "./dist/reactive/useReactiveCookie.js",
|
|
320
333
|
"./reactive/useReactiveSSE": "./dist/reactive/useReactiveSSE.js",
|
|
321
334
|
"./reactive/useReactiveWebsocket": "./dist/reactive/useReactiveWebsocket.js",
|
|
335
|
+
"./schemas/auth.schema": "./dist/schemas/auth.schema.js",
|
|
336
|
+
"./schemas/video.schema": "./dist/schemas/video.schema.js",
|
|
322
337
|
"./vue-hooks/browser/useBattery": "./dist/vue-hooks/browser/useBattery.js",
|
|
323
338
|
"./vue-hooks/browser/useBluetooth": "./dist/vue-hooks/browser/useBluetooth.js",
|
|
324
339
|
"./vue-hooks/browser/useBridgeMessage": "./dist/vue-hooks/browser/useBridgeMessage.js",
|
|
@@ -368,6 +383,7 @@
|
|
|
368
383
|
"./types/algorithm": "./types/algorithm.d.ts",
|
|
369
384
|
"./types/altool": "./types/altool.d.ts",
|
|
370
385
|
"./types/android-build": "./types/android-build.d.ts",
|
|
386
|
+
"./types/auth": "./types/auth.d.ts",
|
|
371
387
|
"./types/color": "./types/color.d.ts",
|
|
372
388
|
"./types/design-system": "./types/design-system.d.ts",
|
|
373
389
|
"./types/geometry": "./types/geometry.d.ts",
|
|
@@ -384,6 +400,7 @@
|
|
|
384
400
|
"./types/uniapp-android-build": "./types/uniapp-android-build.d.ts",
|
|
385
401
|
"./types/uniapp-ios-build": "./types/uniapp-ios-build.d.ts",
|
|
386
402
|
"./types/uniapp": "./types/uniapp.d.ts",
|
|
403
|
+
"./types/video": "./types/video.d.ts",
|
|
387
404
|
"./types/vue": "./types/vue.d.ts",
|
|
388
405
|
"./types/worker": "./types/worker.d.ts"
|
|
389
406
|
},
|
package/references/dom.d.ts
CHANGED
|
@@ -116,6 +116,15 @@ export interface HTMLCanvasElement extends HTMLElement {
|
|
|
116
116
|
toBlob(callback: (blob: Blob | null) => void, type?: string, quality?: number): void
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
// NodeListOf 类型定义(用于 querySelectorAll 返回值)
|
|
120
|
+
export interface NodeListOf<T extends Element> {
|
|
121
|
+
readonly length: number
|
|
122
|
+
item(index: number): T | null
|
|
123
|
+
[index: number]: T
|
|
124
|
+
forEach(callbackfn: (value: T, key: number, parent: NodeListOf<T>) => void, thisArg?: any): void
|
|
125
|
+
[Symbol.iterator](): IterableIterator<T>
|
|
126
|
+
}
|
|
127
|
+
|
|
119
128
|
export interface Document extends Node {
|
|
120
129
|
createElement(tagName: 'canvas'): HTMLCanvasElement
|
|
121
130
|
createElement(tagName: 'script'): HTMLScriptElement
|
|
@@ -124,6 +133,8 @@ export interface Document extends Node {
|
|
|
124
133
|
createElement(tagName: 'iframe'): HTMLIFrameElement
|
|
125
134
|
createElement(tagName: 'input'): HTMLInputElement
|
|
126
135
|
createElement(tagName: string): HTMLElement
|
|
136
|
+
querySelector(selector: string): Element | null
|
|
137
|
+
querySelectorAll(selector: string): NodeListOf<Element>
|
|
127
138
|
documentElement: {
|
|
128
139
|
clientWidth: number
|
|
129
140
|
clientHeight: number
|
package/types/auth.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 认证相关 API 类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface TokenResult {
|
|
6
|
+
token: string
|
|
7
|
+
expiresIn: number
|
|
8
|
+
expiresAt: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface TokenPair {
|
|
12
|
+
accessToken: TokenResult
|
|
13
|
+
refreshToken: TokenResult
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface UserInfo {
|
|
17
|
+
id: string
|
|
18
|
+
phone?: string
|
|
19
|
+
name?: string
|
|
20
|
+
email?: string
|
|
21
|
+
avatar?: string
|
|
22
|
+
avatarUrl?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface LoginResponse {
|
|
26
|
+
code: number
|
|
27
|
+
data: {
|
|
28
|
+
userInfo: UserInfo
|
|
29
|
+
tokenPair: TokenPair
|
|
30
|
+
}
|
|
31
|
+
message: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface RefreshTokenResponse {
|
|
35
|
+
code: number
|
|
36
|
+
data: TokenPair
|
|
37
|
+
message: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface SendSmsCodeResponse {
|
|
41
|
+
code: number
|
|
42
|
+
data: {
|
|
43
|
+
code: string
|
|
44
|
+
}
|
|
45
|
+
message: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface PhoneLoginPayload {
|
|
49
|
+
phone: string
|
|
50
|
+
code: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface RefreshTokenPayload {
|
|
54
|
+
refreshToken: string
|
|
55
|
+
}
|