@zyacreatives/shared 2.0.23 → 2.0.24
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/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/schemas/post.d.ts +13 -17
- package/dist/schemas/post.js +1 -9
- package/package.json +1 -1
- package/src/constants.ts +1 -0
- package/src/schemas/post.ts +1 -11
package/dist/constants.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ export declare const POST_TYPES: {
|
|
|
91
91
|
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
92
92
|
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
93
93
|
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
94
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
94
95
|
};
|
|
95
96
|
export declare const JOB_TYPE: {
|
|
96
97
|
readonly GIG: "GIG";
|
package/dist/constants.js
CHANGED
package/dist/schemas/post.d.ts
CHANGED
|
@@ -17,8 +17,7 @@ export declare const PostEntitySchema: z.ZodObject<{
|
|
|
17
17
|
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
18
18
|
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
19
19
|
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
20
|
-
content: z.ZodString
|
|
21
|
-
title: z.ZodOptional<z.ZodString>;
|
|
20
|
+
content: z.ZodOptional<z.ZodString>;
|
|
22
21
|
postType: z.ZodEnum<{
|
|
23
22
|
readonly MARKETPLACE: "MARKETPLACE";
|
|
24
23
|
readonly PROJECT: "PROJECT";
|
|
@@ -26,6 +25,7 @@ export declare const PostEntitySchema: z.ZodObject<{
|
|
|
26
25
|
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
27
26
|
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
28
27
|
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
28
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
29
29
|
}>;
|
|
30
30
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
31
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
@@ -59,8 +59,7 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
|
|
|
59
59
|
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
60
60
|
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
61
61
|
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
62
|
-
content: z.ZodString
|
|
63
|
-
title: z.ZodOptional<z.ZodString>;
|
|
62
|
+
content: z.ZodOptional<z.ZodString>;
|
|
64
63
|
postType: z.ZodEnum<{
|
|
65
64
|
readonly MARKETPLACE: "MARKETPLACE";
|
|
66
65
|
readonly PROJECT: "PROJECT";
|
|
@@ -68,6 +67,7 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
|
|
|
68
67
|
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
69
68
|
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
70
69
|
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
70
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
71
71
|
}>;
|
|
72
72
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
73
73
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
@@ -87,7 +87,6 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
|
|
|
87
87
|
export declare const CreatePostInputSchema: z.ZodObject<{
|
|
88
88
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
89
89
|
content: z.ZodString;
|
|
90
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
90
|
postType: z.ZodDefault<z.ZodEnum<{
|
|
92
91
|
readonly MARKETPLACE: "MARKETPLACE";
|
|
93
92
|
readonly PROJECT: "PROJECT";
|
|
@@ -95,6 +94,7 @@ export declare const CreatePostInputSchema: z.ZodObject<{
|
|
|
95
94
|
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
96
95
|
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
97
96
|
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
97
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
98
98
|
}>>;
|
|
99
99
|
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
100
|
key: z.ZodString;
|
|
@@ -137,8 +137,7 @@ export declare const CreatePostOutputSchema: z.ZodObject<{
|
|
|
137
137
|
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
138
138
|
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
139
139
|
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
140
|
-
content: z.ZodString
|
|
141
|
-
title: z.ZodOptional<z.ZodString>;
|
|
140
|
+
content: z.ZodOptional<z.ZodString>;
|
|
142
141
|
postType: z.ZodEnum<{
|
|
143
142
|
readonly MARKETPLACE: "MARKETPLACE";
|
|
144
143
|
readonly PROJECT: "PROJECT";
|
|
@@ -146,6 +145,7 @@ export declare const CreatePostOutputSchema: z.ZodObject<{
|
|
|
146
145
|
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
147
146
|
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
148
147
|
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
148
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
149
149
|
}>;
|
|
150
150
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
151
151
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
@@ -173,8 +173,7 @@ export declare const GetPostOutputSchema: z.ZodObject<{
|
|
|
173
173
|
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
174
174
|
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
175
175
|
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
176
|
-
content: z.ZodString
|
|
177
|
-
title: z.ZodOptional<z.ZodString>;
|
|
176
|
+
content: z.ZodOptional<z.ZodString>;
|
|
178
177
|
postType: z.ZodEnum<{
|
|
179
178
|
readonly MARKETPLACE: "MARKETPLACE";
|
|
180
179
|
readonly PROJECT: "PROJECT";
|
|
@@ -182,6 +181,7 @@ export declare const GetPostOutputSchema: z.ZodObject<{
|
|
|
182
181
|
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
183
182
|
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
184
183
|
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
184
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
185
185
|
}>;
|
|
186
186
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
187
187
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
@@ -203,15 +203,13 @@ export declare const PostIdSchema: z.ZodObject<{
|
|
|
203
203
|
}, z.core.$strip>;
|
|
204
204
|
export declare const MinimalPostSchema: z.ZodObject<{
|
|
205
205
|
id: z.ZodCUID2;
|
|
206
|
-
title: z.ZodOptional<z.ZodString>;
|
|
207
206
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
208
|
-
content: z.ZodString
|
|
207
|
+
content: z.ZodOptional<z.ZodString>;
|
|
209
208
|
}, z.core.$strip>;
|
|
210
209
|
export declare const PostWithLikesEntitySchema: z.ZodObject<{
|
|
211
210
|
id: z.ZodCUID2;
|
|
212
|
-
title: z.ZodOptional<z.ZodString>;
|
|
213
211
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
214
|
-
content: z.ZodString
|
|
212
|
+
content: z.ZodOptional<z.ZodString>;
|
|
215
213
|
likes: z.ZodArray<z.ZodObject<{
|
|
216
214
|
id: z.ZodCUID2;
|
|
217
215
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -225,9 +223,8 @@ export declare const PostWithLikesEntitySchema: z.ZodObject<{
|
|
|
225
223
|
}, z.core.$strip>;
|
|
226
224
|
export declare const PostWithCommentsEntitySchema: z.ZodObject<{
|
|
227
225
|
id: z.ZodCUID2;
|
|
228
|
-
title: z.ZodOptional<z.ZodString>;
|
|
229
226
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
230
|
-
content: z.ZodString
|
|
227
|
+
content: z.ZodOptional<z.ZodString>;
|
|
231
228
|
comments: z.ZodArray<z.ZodObject<{
|
|
232
229
|
id: z.ZodCUID2;
|
|
233
230
|
userId: z.ZodCUID2;
|
|
@@ -247,9 +244,8 @@ export declare const PostWithCommentsEntitySchema: z.ZodObject<{
|
|
|
247
244
|
}, z.core.$strip>;
|
|
248
245
|
export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
|
|
249
246
|
id: z.ZodCUID2;
|
|
250
|
-
title: z.ZodOptional<z.ZodString>;
|
|
251
247
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
252
|
-
content: z.ZodString
|
|
248
|
+
content: z.ZodOptional<z.ZodString>;
|
|
253
249
|
bookmarks: z.ZodArray<z.ZodObject<{
|
|
254
250
|
id: z.ZodCUID2;
|
|
255
251
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -24,12 +24,9 @@ exports.PostEntitySchema = zod_openapi_1.z.object({
|
|
|
24
24
|
creatorFullName: zod_openapi_1.z.string().optional(),
|
|
25
25
|
creatorImageUrl: zod_openapi_1.z.cuid2().optional().openapi({ description: "Username" }),
|
|
26
26
|
content: zod_openapi_1.z
|
|
27
|
-
.string()
|
|
28
|
-
.openapi({ description: "Post content", example: "Hello world" }),
|
|
29
|
-
title: zod_openapi_1.z
|
|
30
27
|
.string()
|
|
31
28
|
.optional()
|
|
32
|
-
.openapi({ description: "
|
|
29
|
+
.openapi({ description: "Post content", example: "Hello world" }),
|
|
33
30
|
postType: zod_openapi_1.z.enum(constants_1.POST_TYPES).openapi({
|
|
34
31
|
description: "Type of the post entity this statistic belongs to.",
|
|
35
32
|
title: "Post Type",
|
|
@@ -88,11 +85,6 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
88
85
|
description: "Post content",
|
|
89
86
|
example: "New project announcement",
|
|
90
87
|
}),
|
|
91
|
-
title: zod_openapi_1.z
|
|
92
|
-
.string()
|
|
93
|
-
.nullable()
|
|
94
|
-
.optional()
|
|
95
|
-
.openapi({ description: "Optional title", example: "Project launch" }),
|
|
96
88
|
postType: zod_openapi_1.z
|
|
97
89
|
.enum(constants_1.POST_TYPES)
|
|
98
90
|
.default("DEFAULT_POST")
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -24,14 +24,9 @@ export const PostEntitySchema = z.object({
|
|
|
24
24
|
creatorFullName: z.string().optional(),
|
|
25
25
|
creatorImageUrl: z.cuid2().optional().openapi({ description: "Username" }),
|
|
26
26
|
content: z
|
|
27
|
-
.string()
|
|
28
|
-
.openapi({ description: "Post content", example: "Hello world" }),
|
|
29
|
-
|
|
30
|
-
title: z
|
|
31
27
|
.string()
|
|
32
28
|
.optional()
|
|
33
|
-
.openapi({ description: "
|
|
34
|
-
|
|
29
|
+
.openapi({ description: "Post content", example: "Hello world" }),
|
|
35
30
|
postType: z.enum(POST_TYPES).openapi({
|
|
36
31
|
description: "Type of the post entity this statistic belongs to.",
|
|
37
32
|
title: "Post Type",
|
|
@@ -97,11 +92,6 @@ export const CreatePostInputSchema = z.object({
|
|
|
97
92
|
description: "Post content",
|
|
98
93
|
example: "New project announcement",
|
|
99
94
|
}),
|
|
100
|
-
title: z
|
|
101
|
-
.string()
|
|
102
|
-
.nullable()
|
|
103
|
-
.optional()
|
|
104
|
-
.openapi({ description: "Optional title", example: "Project launch" }),
|
|
105
95
|
postType: z
|
|
106
96
|
.enum(POST_TYPES)
|
|
107
97
|
.default("DEFAULT_POST")
|