zcw-shared 2.8.0 → 2.10.0

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 (38) hide show
  1. package/dist/functions/file/getIconfontNameByExtension.js +8 -8
  2. package/dist/functions/file/getIconfontNameByExtension.js.map +1 -1
  3. package/package.json +1 -1
  4. package/types/im-api.d.ts +7 -3
  5. package/types/im-chat.d.ts +7 -5
  6. package/dist/functions/api/auth.d.ts +0 -14
  7. package/dist/functions/api/auth.js +0 -109
  8. package/dist/functions/api/auth.js.map +0 -1
  9. package/dist/functions/api/schemas/auth.schema.d.ts +0 -363
  10. package/dist/functions/api/schemas/auth.schema.js +0 -39
  11. package/dist/functions/api/schemas/auth.schema.js.map +0 -1
  12. package/dist/functions/api/schemas/video.schema.d.ts +0 -391
  13. package/dist/functions/api/schemas/video.schema.js +0 -55
  14. package/dist/functions/api/schemas/video.schema.js.map +0 -1
  15. package/dist/functions/api/video.d.ts +0 -62
  16. package/dist/functions/api/video.js +0 -243
  17. package/dist/functions/api/video.js.map +0 -1
  18. package/dist/functions/oss/uploadViaSignedPut.d.ts +0 -35
  19. package/dist/functions/oss/uploadViaSignedPut.js +0 -86
  20. package/dist/functions/oss/uploadViaSignedPut.js.map +0 -1
  21. package/dist/functions/software/publishToPgyer.d.ts +0 -16
  22. package/dist/functions/software/publishToPgyer.js +0 -96
  23. package/dist/functions/software/publishToPgyer.js.map +0 -1
  24. package/dist/functions/validation/generateFakeBankCard.d.ts +0 -87
  25. package/dist/functions/validation/generateFakeBankCard.js +0 -152
  26. package/dist/functions/validation/generateFakeBankCard.js.map +0 -1
  27. package/dist/functions/validation/generateFakeBusinessLicense.d.ts +0 -21
  28. package/dist/functions/validation/generateFakeBusinessLicense.js +0 -160
  29. package/dist/functions/validation/generateFakeBusinessLicense.js.map +0 -1
  30. package/dist/functions/validation/generateFakeDrivingLicense.d.ts +0 -31
  31. package/dist/functions/validation/generateFakeDrivingLicense.js +0 -119
  32. package/dist/functions/validation/generateFakeDrivingLicense.js.map +0 -1
  33. package/dist/functions/validation/generateFakeIdCard.d.ts +0 -30
  34. package/dist/functions/validation/generateFakeIdCard.js +0 -123
  35. package/dist/functions/validation/generateFakeIdCard.js.map +0 -1
  36. package/dist/functions/validation/generateFakeLicensePlate.d.ts +0 -13
  37. package/dist/functions/validation/generateFakeLicensePlate.js +0 -87
  38. package/dist/functions/validation/generateFakeLicensePlate.js.map +0 -1
@@ -1,391 +0,0 @@
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
- id: number;
40
- title: string;
41
- status?: string | undefined;
42
- description?: string | undefined;
43
- created_at?: string | undefined;
44
- cover_url?: string | undefined;
45
- video_url?: string | undefined;
46
- author?: string | undefined;
47
- category_id?: string | undefined;
48
- duration?: number | 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
- id: number;
57
- title: string;
58
- status?: string | undefined;
59
- description?: string | undefined;
60
- created_at?: string | undefined;
61
- cover_url?: string | undefined;
62
- video_url?: string | undefined;
63
- author?: string | undefined;
64
- category_id?: string | undefined;
65
- duration?: number | 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
- id: number;
93
- title: string;
94
- status?: string | undefined;
95
- description?: string | undefined;
96
- created_at?: string | undefined;
97
- cover_url?: string | undefined;
98
- video_url?: string | undefined;
99
- author?: string | undefined;
100
- category_id?: string | undefined;
101
- duration?: number | 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
- id: number;
110
- title: string;
111
- status?: string | undefined;
112
- description?: string | undefined;
113
- created_at?: string | undefined;
114
- cover_url?: string | undefined;
115
- video_url?: string | undefined;
116
- author?: string | undefined;
117
- category_id?: string | undefined;
118
- duration?: number | 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
- id: number;
132
- title: string;
133
- status?: string | undefined;
134
- description?: string | undefined;
135
- created_at?: string | undefined;
136
- cover_url?: string | undefined;
137
- video_url?: string | undefined;
138
- author?: string | undefined;
139
- category_id?: string | undefined;
140
- duration?: number | 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
- limit: number;
149
- offset: number;
150
- total: number;
151
- }, {
152
- data: {
153
- id: number;
154
- title: string;
155
- status?: string | undefined;
156
- description?: string | undefined;
157
- created_at?: string | undefined;
158
- cover_url?: string | undefined;
159
- video_url?: string | undefined;
160
- author?: string | undefined;
161
- category_id?: string | undefined;
162
- duration?: number | 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
- limit: number;
171
- offset: number;
172
- total: 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
- id: number;
194
- title: string;
195
- status?: string | undefined;
196
- description?: string | undefined;
197
- created_at?: string | undefined;
198
- cover_url?: string | undefined;
199
- video_url?: string | undefined;
200
- author?: string | undefined;
201
- category_id?: string | undefined;
202
- duration?: number | 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
- id: number;
211
- title: string;
212
- status?: string | undefined;
213
- description?: string | undefined;
214
- created_at?: string | undefined;
215
- cover_url?: string | undefined;
216
- video_url?: string | undefined;
217
- author?: string | undefined;
218
- category_id?: string | undefined;
219
- duration?: number | 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
- id: number;
230
- title: string;
231
- status?: string | undefined;
232
- description?: string | undefined;
233
- created_at?: string | undefined;
234
- cover_url?: string | undefined;
235
- video_url?: string | undefined;
236
- author?: string | undefined;
237
- category_id?: string | undefined;
238
- duration?: number | 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
- id: number;
249
- title: string;
250
- status?: string | undefined;
251
- description?: string | undefined;
252
- created_at?: string | undefined;
253
- cover_url?: string | undefined;
254
- video_url?: string | undefined;
255
- author?: string | undefined;
256
- category_id?: string | undefined;
257
- duration?: number | 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
- video_id: number;
315
- user_id: string;
316
- content: 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
- video_id: number;
324
- user_id: string;
325
- content: 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
- video_id: number;
344
- user_id: string;
345
- content: 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
- video_id: number;
353
- user_id: string;
354
- content: 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
- video_id: number;
367
- user_id: string;
368
- content: string;
369
- created_at?: string | undefined;
370
- like_count?: number | undefined;
371
- updated_at?: string | undefined;
372
- parent_id?: number | null | undefined;
373
- }[];
374
- limit: number;
375
- offset: number;
376
- total: number;
377
- }, {
378
- data: {
379
- id: number;
380
- video_id: number;
381
- user_id: string;
382
- content: string;
383
- created_at?: string | undefined;
384
- like_count?: number | undefined;
385
- updated_at?: string | undefined;
386
- parent_id?: number | null | undefined;
387
- }[];
388
- limit: number;
389
- offset: number;
390
- total: number;
391
- }>;
@@ -1,55 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"video.schema.js","sourceRoot":"","sources":["../../../../src/functions/api/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,EAA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AE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAA4C,CAAA"}
@@ -1,62 +0,0 @@
1
- import type { VideoCategory, Video, VideoComment, VideoListResponse, VideoDetailResponse, VideoCategoriesResponse, VideoCommentsResponse, CreateVideoPayload, UpdateVideoPayload, CreateCommentPayload } from '../../../types/video';
2
- import type { FetchFunction } from '../../../references/fetch.d';
3
- import type { URLSearchParams } from '../../../references/url.d';
4
- import type { Console } from '../../../references/console.d';
5
- export interface VideoApiClientOptions {
6
- baseUrl: string;
7
- getToken?: () => string | undefined | Promise<string | undefined>;
8
- fetch: FetchFunction;
9
- console?: Console;
10
- URLSearchParams?: typeof URLSearchParams;
11
- }
12
- export declare function createVideoApiClient(options: VideoApiClientOptions): {
13
- getCategories(): Promise<VideoCategoriesResponse>;
14
- createCategory(payload: VideoCategory): Promise<{
15
- data: VideoCategory;
16
- }>;
17
- updateCategory(id: string, payload: Partial<VideoCategory>): Promise<{
18
- data: VideoCategory;
19
- }>;
20
- deleteCategory(id: string): Promise<{
21
- message: string;
22
- }>;
23
- getVideos(params: {
24
- limit?: number;
25
- offset?: number;
26
- categoryId?: string;
27
- search?: string;
28
- }): Promise<VideoListResponse>;
29
- getVideo(id: number): Promise<VideoDetailResponse>;
30
- getRecommendVideos(id: number, limit?: number): Promise<{
31
- data: Video[];
32
- }>;
33
- createVideo(payload: CreateVideoPayload): Promise<{
34
- data: Video;
35
- message: string;
36
- }>;
37
- updateVideo(id: number, payload: UpdateVideoPayload): Promise<{
38
- data: Video;
39
- message: string;
40
- }>;
41
- deleteVideo(id: number): Promise<{
42
- message: string;
43
- }>;
44
- toggleLike(id: number): Promise<{
45
- data: Video;
46
- isLiked: boolean;
47
- message: string;
48
- }>;
49
- checkLike(id: number): Promise<{
50
- data: {
51
- isLiked: boolean;
52
- };
53
- }>;
54
- getComments(id: number, params?: {
55
- limit?: number;
56
- offset?: number;
57
- }): Promise<VideoCommentsResponse>;
58
- createComment(id: number, payload: CreateCommentPayload): Promise<{
59
- data: VideoComment;
60
- message: string;
61
- }>;
62
- };