@zyacreatives/shared 2.0.54 → 2.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schemas/post.d.ts +129 -123
- package/dist/schemas/post.js +9 -3
- package/package.json +1 -1
- package/src/schemas/post.ts +9 -3
package/dist/schemas/post.d.ts
CHANGED
|
@@ -345,134 +345,140 @@ export declare const GetFeedInputSchema: z.ZodObject<{
|
|
|
345
345
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
346
346
|
cursor: z.ZodOptional<z.ZodString>;
|
|
347
347
|
}, z.core.$strip>;
|
|
348
|
-
export declare const GetFeedOutputSchema: z.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
readonly JOB_OPENING: "JOB_OPENING";
|
|
374
|
-
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
375
|
-
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
376
|
-
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
377
|
-
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
378
|
-
}>;
|
|
379
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
380
|
-
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
381
|
-
url: z.ZodURL;
|
|
382
|
-
title: z.ZodOptional<z.ZodString>;
|
|
383
|
-
description: z.ZodOptional<z.ZodString>;
|
|
384
|
-
image: z.ZodOptional<z.ZodURL>;
|
|
385
|
-
}, z.core.$strip>>;
|
|
386
|
-
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
387
|
-
id: z.ZodString;
|
|
388
|
-
postId: z.ZodString;
|
|
389
|
-
fileId: z.ZodString;
|
|
390
|
-
order: z.ZodNumber;
|
|
391
|
-
url: z.ZodURL;
|
|
392
|
-
}, z.core.$strip>>>;
|
|
393
|
-
stats: z.ZodObject<{
|
|
394
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
395
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
396
|
-
parentId: z.ZodCUID2;
|
|
397
|
-
parentType: z.ZodEnum<{
|
|
348
|
+
export declare const GetFeedOutputSchema: z.ZodObject<{
|
|
349
|
+
feed: z.ZodArray<z.ZodObject<{
|
|
350
|
+
id: z.ZodCUID2;
|
|
351
|
+
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
352
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
353
|
+
name: z.ZodString;
|
|
354
|
+
id: z.ZodInt;
|
|
355
|
+
}, z.core.$strip>>>;
|
|
356
|
+
badge: z.ZodOptional<z.ZodEnum<{
|
|
357
|
+
readonly NETWORKING: "Networking";
|
|
358
|
+
readonly FUNDING: "Funding";
|
|
359
|
+
readonly COLLABORATION: "Collaboration";
|
|
360
|
+
readonly OPPORTUNITIES: "Opportunities";
|
|
361
|
+
readonly SHOWCASE: "Showcase";
|
|
362
|
+
readonly LEARNING: "Learning";
|
|
363
|
+
readonly DISCUSSION: "Discussion";
|
|
364
|
+
readonly MENTORSHIP: "Mentorship";
|
|
365
|
+
}>>;
|
|
366
|
+
userId: z.ZodCUID2;
|
|
367
|
+
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
368
|
+
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
369
|
+
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
370
|
+
content: z.ZodOptional<z.ZodString>;
|
|
371
|
+
postType: z.ZodEnum<{
|
|
372
|
+
readonly MARKETPLACE: "MARKETPLACE";
|
|
398
373
|
readonly PROJECT: "PROJECT";
|
|
399
|
-
readonly
|
|
374
|
+
readonly JOB_OPENING: "JOB_OPENING";
|
|
375
|
+
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
376
|
+
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
377
|
+
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
378
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
400
379
|
}>;
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
380
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
381
|
+
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
382
|
+
url: z.ZodURL;
|
|
383
|
+
title: z.ZodOptional<z.ZodString>;
|
|
384
|
+
description: z.ZodOptional<z.ZodString>;
|
|
385
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
388
|
+
id: z.ZodString;
|
|
389
|
+
postId: z.ZodString;
|
|
390
|
+
fileId: z.ZodString;
|
|
391
|
+
order: z.ZodNumber;
|
|
392
|
+
url: z.ZodURL;
|
|
393
|
+
}, z.core.$strip>>>;
|
|
394
|
+
stats: z.ZodObject<{
|
|
395
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
396
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
397
|
+
parentId: z.ZodCUID2;
|
|
398
|
+
parentType: z.ZodEnum<{
|
|
399
|
+
readonly PROJECT: "PROJECT";
|
|
400
|
+
readonly POST: "POST";
|
|
401
|
+
}>;
|
|
402
|
+
likesCount: z.ZodNumber;
|
|
403
|
+
bookmarksCount: z.ZodNumber;
|
|
404
|
+
viewsCount: z.ZodNumber;
|
|
405
|
+
commentsCount: z.ZodNumber;
|
|
406
|
+
}, z.core.$strip>;
|
|
407
|
+
score: z.ZodNumber;
|
|
408
|
+
isLiked: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
410
|
+
isBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
413
|
+
}, z.core.$strip>;
|
|
411
414
|
export declare const SearchPostInputSchema: z.ZodObject<{
|
|
412
415
|
string: z.ZodString;
|
|
413
|
-
limit: z.ZodDefault<z.
|
|
416
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
414
417
|
cursor: z.ZodOptional<z.ZodString>;
|
|
415
418
|
}, z.core.$strip>;
|
|
416
|
-
export declare const SearchPostOutputSchema: z.
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
readonly JOB_OPENING: "JOB_OPENING";
|
|
442
|
-
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
443
|
-
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
444
|
-
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
445
|
-
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
446
|
-
}>;
|
|
447
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
448
|
-
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
449
|
-
url: z.ZodURL;
|
|
450
|
-
title: z.ZodOptional<z.ZodString>;
|
|
451
|
-
description: z.ZodOptional<z.ZodString>;
|
|
452
|
-
image: z.ZodOptional<z.ZodURL>;
|
|
453
|
-
}, z.core.$strip>>;
|
|
454
|
-
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
455
|
-
id: z.ZodString;
|
|
456
|
-
postId: z.ZodString;
|
|
457
|
-
fileId: z.ZodString;
|
|
458
|
-
order: z.ZodNumber;
|
|
459
|
-
url: z.ZodURL;
|
|
460
|
-
}, z.core.$strip>>>;
|
|
461
|
-
stats: z.ZodObject<{
|
|
462
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
463
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
464
|
-
parentId: z.ZodCUID2;
|
|
465
|
-
parentType: z.ZodEnum<{
|
|
419
|
+
export declare const SearchPostOutputSchema: z.ZodObject<{
|
|
420
|
+
posts: z.ZodArray<z.ZodObject<{
|
|
421
|
+
id: z.ZodCUID2;
|
|
422
|
+
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
423
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
424
|
+
name: z.ZodString;
|
|
425
|
+
id: z.ZodInt;
|
|
426
|
+
}, z.core.$strip>>>;
|
|
427
|
+
badge: z.ZodOptional<z.ZodEnum<{
|
|
428
|
+
readonly NETWORKING: "Networking";
|
|
429
|
+
readonly FUNDING: "Funding";
|
|
430
|
+
readonly COLLABORATION: "Collaboration";
|
|
431
|
+
readonly OPPORTUNITIES: "Opportunities";
|
|
432
|
+
readonly SHOWCASE: "Showcase";
|
|
433
|
+
readonly LEARNING: "Learning";
|
|
434
|
+
readonly DISCUSSION: "Discussion";
|
|
435
|
+
readonly MENTORSHIP: "Mentorship";
|
|
436
|
+
}>>;
|
|
437
|
+
userId: z.ZodCUID2;
|
|
438
|
+
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
439
|
+
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
440
|
+
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
441
|
+
content: z.ZodOptional<z.ZodString>;
|
|
442
|
+
postType: z.ZodEnum<{
|
|
443
|
+
readonly MARKETPLACE: "MARKETPLACE";
|
|
466
444
|
readonly PROJECT: "PROJECT";
|
|
467
|
-
readonly
|
|
445
|
+
readonly JOB_OPENING: "JOB_OPENING";
|
|
446
|
+
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
447
|
+
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
448
|
+
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
449
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
468
450
|
}>;
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
451
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
452
|
+
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
453
|
+
url: z.ZodURL;
|
|
454
|
+
title: z.ZodOptional<z.ZodString>;
|
|
455
|
+
description: z.ZodOptional<z.ZodString>;
|
|
456
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
457
|
+
}, z.core.$strip>>;
|
|
458
|
+
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
459
|
+
id: z.ZodString;
|
|
460
|
+
postId: z.ZodString;
|
|
461
|
+
fileId: z.ZodString;
|
|
462
|
+
order: z.ZodNumber;
|
|
463
|
+
url: z.ZodURL;
|
|
464
|
+
}, z.core.$strip>>>;
|
|
465
|
+
stats: z.ZodObject<{
|
|
466
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
467
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
468
|
+
parentId: z.ZodCUID2;
|
|
469
|
+
parentType: z.ZodEnum<{
|
|
470
|
+
readonly PROJECT: "PROJECT";
|
|
471
|
+
readonly POST: "POST";
|
|
472
|
+
}>;
|
|
473
|
+
likesCount: z.ZodNumber;
|
|
474
|
+
bookmarksCount: z.ZodNumber;
|
|
475
|
+
viewsCount: z.ZodNumber;
|
|
476
|
+
commentsCount: z.ZodNumber;
|
|
477
|
+
}, z.core.$strip>;
|
|
478
|
+
score: z.ZodNumber;
|
|
479
|
+
isLiked: z.ZodOptional<z.ZodBoolean>;
|
|
480
|
+
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
+
isBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
482
|
+
}, z.core.$strip>>;
|
|
483
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
484
|
+
}, z.core.$strip>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -184,13 +184,16 @@ exports.GetFeedInputSchema = zod_openapi_1.z.object({
|
|
|
184
184
|
limit: zod_openapi_1.z.number().optional(),
|
|
185
185
|
cursor: zod_openapi_1.z.string().optional(),
|
|
186
186
|
});
|
|
187
|
-
exports.GetFeedOutputSchema = zod_openapi_1.z.
|
|
187
|
+
exports.GetFeedOutputSchema = zod_openapi_1.z.object({
|
|
188
|
+
feed: zod_openapi_1.z.array(exports.FeedPostEntitySchema),
|
|
189
|
+
nextCursor: zod_openapi_1.z.string().optional(),
|
|
190
|
+
});
|
|
188
191
|
exports.SearchPostInputSchema = zod_openapi_1.z.object({
|
|
189
192
|
string: zod_openapi_1.z
|
|
190
193
|
.string()
|
|
191
194
|
.min(1, { message: "Search string cannot be empty" })
|
|
192
195
|
.max(200, { message: "Search string cannot exceed 200 characters" }),
|
|
193
|
-
limit: zod_openapi_1.z
|
|
196
|
+
limit: zod_openapi_1.z.coerce
|
|
194
197
|
.number()
|
|
195
198
|
.int({ message: "Limit must be an integer" })
|
|
196
199
|
.min(1, { message: "Limit must be at least 1" })
|
|
@@ -198,4 +201,7 @@ exports.SearchPostInputSchema = zod_openapi_1.z.object({
|
|
|
198
201
|
.default(20),
|
|
199
202
|
cursor: zod_openapi_1.z.string().optional(),
|
|
200
203
|
});
|
|
201
|
-
exports.SearchPostOutputSchema = zod_openapi_1.z.
|
|
204
|
+
exports.SearchPostOutputSchema = zod_openapi_1.z.object({
|
|
205
|
+
posts: zod_openapi_1.z.array(exports.FeedPostEntitySchema),
|
|
206
|
+
nextCursor: zod_openapi_1.z.string().optional(),
|
|
207
|
+
});
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -209,14 +209,17 @@ export const GetFeedInputSchema = z.object({
|
|
|
209
209
|
cursor: z.string().optional(),
|
|
210
210
|
});
|
|
211
211
|
|
|
212
|
-
export const GetFeedOutputSchema = z.
|
|
212
|
+
export const GetFeedOutputSchema = z.object({
|
|
213
|
+
feed: z.array(FeedPostEntitySchema),
|
|
214
|
+
nextCursor: z.string().optional(),
|
|
215
|
+
});
|
|
213
216
|
|
|
214
217
|
export const SearchPostInputSchema = z.object({
|
|
215
218
|
string: z
|
|
216
219
|
.string()
|
|
217
220
|
.min(1, { message: "Search string cannot be empty" })
|
|
218
221
|
.max(200, { message: "Search string cannot exceed 200 characters" }),
|
|
219
|
-
limit: z
|
|
222
|
+
limit: z.coerce
|
|
220
223
|
.number()
|
|
221
224
|
.int({ message: "Limit must be an integer" })
|
|
222
225
|
.min(1, { message: "Limit must be at least 1" })
|
|
@@ -225,4 +228,7 @@ export const SearchPostInputSchema = z.object({
|
|
|
225
228
|
cursor: z.string().optional(),
|
|
226
229
|
});
|
|
227
230
|
|
|
228
|
-
export const SearchPostOutputSchema = z.
|
|
231
|
+
export const SearchPostOutputSchema = z.object({
|
|
232
|
+
posts: z.array(FeedPostEntitySchema),
|
|
233
|
+
nextCursor: z.string().optional(),
|
|
234
|
+
});
|