@zyacreatives/shared 2.3.6 → 2.3.8
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/file.d.ts +73 -12
- package/dist/schemas/file.js +39 -17
- package/dist/schemas/message.d.ts +11 -0
- package/dist/schemas/post.d.ts +318 -201
- package/dist/schemas/post.js +82 -145
- package/dist/schemas/user.d.ts +57 -12
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.js +0 -2
- package/dist/utils/generate-file-url.d.ts +1 -0
- package/dist/utils/generate-file-url.js +7 -0
- package/package.json +1 -1
- package/src/schemas/file.ts +60 -17
- package/src/schemas/post.ts +129 -165
- package/src/types/index.ts +0 -2
- package/src/utils/generate-file-url.ts +3 -0
- package/src/types/file.ts +0 -39
- package/src/types/post.ts +0 -66
package/src/schemas/post.ts
CHANGED
|
@@ -3,16 +3,13 @@ import {
|
|
|
3
3
|
ACTIVITY_PARENT_TYPES,
|
|
4
4
|
POST_BADGE_TYPES,
|
|
5
5
|
POST_TYPES,
|
|
6
|
-
|
|
7
6
|
} from "../constants";
|
|
8
|
-
import { CreateFileInputSchema } from "./file";
|
|
7
|
+
import { FileEntitySchema, CreateFileInputSchema } from "./file";
|
|
9
8
|
import { CommentEntitySchema } from "./comment";
|
|
10
9
|
import { EntityStatsSchema } from "./entity-stats";
|
|
11
10
|
import { ActivitySchema } from "./activity";
|
|
12
11
|
import { cleanHtml } from "../utils/clean-html";
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
13
|
export const PostEntitySchema = z.object({
|
|
17
14
|
id: z
|
|
18
15
|
.cuid2()
|
|
@@ -33,9 +30,7 @@ export const PostEntitySchema = z.object({
|
|
|
33
30
|
}),
|
|
34
31
|
)
|
|
35
32
|
.optional()
|
|
36
|
-
.openapi({
|
|
37
|
-
example: [{ name: "javascript", id: 101 }],
|
|
38
|
-
}),
|
|
33
|
+
.openapi({ example: [{ name: "javascript", id: 101 }] }),
|
|
39
34
|
badge: z.enum(POST_BADGE_TYPES).optional().openapi({ example: "FEATURED" }),
|
|
40
35
|
userId: z
|
|
41
36
|
.cuid2()
|
|
@@ -58,22 +53,18 @@ export const PostEntitySchema = z.object({
|
|
|
58
53
|
const plainText = cleanHtml(val, Number.MAX_SAFE_INTEGER);
|
|
59
54
|
return plainText.length <= 300;
|
|
60
55
|
},
|
|
61
|
-
{
|
|
62
|
-
message: "Post content cannot exceed 300 characters",
|
|
63
|
-
},
|
|
56
|
+
{ message: "Post content cannot exceed 300 characters" },
|
|
64
57
|
)
|
|
65
58
|
.openapi({ example: "Check out my new portfolio update!" }),
|
|
66
59
|
postType: z.enum(POST_TYPES).openapi({
|
|
67
|
-
description: "Type of the post entity
|
|
60
|
+
description: "Type of the post entity",
|
|
68
61
|
title: "Post Type",
|
|
69
62
|
example: "PROJECT",
|
|
70
63
|
}),
|
|
71
|
-
|
|
72
64
|
createdAt: z.coerce
|
|
73
65
|
.date()
|
|
74
66
|
.optional()
|
|
75
67
|
.openapi({ example: "2026-03-11T14:43:09Z" }),
|
|
76
|
-
|
|
77
68
|
linkMeta: z
|
|
78
69
|
.object({
|
|
79
70
|
url: z.url().openapi({ example: "https://example.com" }),
|
|
@@ -90,60 +81,64 @@ export const PostEntitySchema = z.object({
|
|
|
90
81
|
.optional()
|
|
91
82
|
.openapi({
|
|
92
83
|
description: "Optional metadata for a single link in the post",
|
|
93
|
-
example: {
|
|
94
|
-
url: "https://example.com",
|
|
95
|
-
title: "Example Website",
|
|
96
|
-
description: "This is an example link",
|
|
97
|
-
image: "https://example.com/preview.jpg",
|
|
98
|
-
},
|
|
99
84
|
}),
|
|
100
85
|
});
|
|
86
|
+
export type PostEntity = z.infer<typeof PostEntitySchema>;
|
|
101
87
|
|
|
102
|
-
|
|
103
|
-
.object({
|
|
104
|
-
id: z.cuid2().openapi({
|
|
105
|
-
description: "CUID2 of the project file record.",
|
|
106
|
-
example: "cxy1a2b3c0000qwe",
|
|
107
|
-
}),
|
|
108
|
-
postId: z.cuid2().openapi({
|
|
109
|
-
description: "CUID2 of the post this file belongs to.",
|
|
110
|
-
example: "ckj1a2b3c0000xyz",
|
|
111
|
-
}),
|
|
112
|
-
fileId: z.cuid2().openapi({
|
|
113
|
-
description: "CUID2 of the linked file.",
|
|
114
|
-
example: "cvb1a2b3c0000rty",
|
|
115
|
-
}),
|
|
116
|
-
order: z.number().int().openapi({
|
|
117
|
-
description: "Order index of the file in the project.",
|
|
118
|
-
example: 1,
|
|
119
|
-
}),
|
|
120
|
-
})
|
|
121
|
-
.openapi({
|
|
122
|
-
title: "Post File Entity",
|
|
123
|
-
description: "Schema representing a file associated with a project.",
|
|
124
|
-
});
|
|
88
|
+
// ─── Composed ─────────────────────────────────────────────────────────────────
|
|
125
89
|
|
|
126
90
|
export const PostWithFilesEntitySchema = PostEntitySchema.extend({
|
|
127
|
-
|
|
91
|
+
files: z.array(FileEntitySchema).optional().openapi({
|
|
92
|
+
description: "Files attached to the post",
|
|
93
|
+
example: [],
|
|
94
|
+
}),
|
|
95
|
+
});
|
|
96
|
+
export type PostWithFilesEntity = z.infer<typeof PostWithFilesEntitySchema>;
|
|
97
|
+
|
|
98
|
+
export const MinimalPostSchema = PostEntitySchema.pick({
|
|
99
|
+
id: true,
|
|
100
|
+
parentId: true,
|
|
101
|
+
content: true,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const FeedPostEntitySchema = PostWithFilesEntitySchema.extend({
|
|
105
|
+
stats: EntityStatsSchema,
|
|
106
|
+
score: z.number().openapi({ example: 98.5 }),
|
|
107
|
+
isLiked: z.boolean().optional().openapi({ example: true }),
|
|
108
|
+
isFollowing: z.boolean().optional().openapi({ example: false }),
|
|
109
|
+
isBookmarked: z.boolean().optional().openapi({ example: false }),
|
|
110
|
+
});
|
|
111
|
+
export type FeedPostEntity = z.infer<typeof FeedPostEntitySchema>;
|
|
112
|
+
|
|
113
|
+
// ─── Interactions ─────────────────────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
export const PostWithLikesEntitySchema = MinimalPostSchema.extend({
|
|
116
|
+
likes: z
|
|
128
117
|
.array(
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
ActivitySchema.extend({
|
|
119
|
+
followsYou: z.boolean().optional().openapi({ example: true }),
|
|
120
|
+
isFollowing: z.boolean().optional().openapi({ example: false }),
|
|
131
121
|
}),
|
|
132
122
|
)
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
123
|
+
.openapi({ example: [] }),
|
|
124
|
+
}).openapi({ title: "PostWithPostLikesEntity" });
|
|
125
|
+
export type PostWithPostLikesEntity = z.infer<typeof PostWithLikesEntitySchema>;
|
|
126
|
+
|
|
127
|
+
export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
|
|
128
|
+
comments: z.array(CommentEntitySchema).openapi({ example: [] }),
|
|
129
|
+
}).openapi({ title: "PostWithPostCommentsEntity" });
|
|
130
|
+
export type PostWithPostCommentsEntity = z.infer<
|
|
131
|
+
typeof PostWithCommentsEntitySchema
|
|
132
|
+
>;
|
|
133
|
+
|
|
134
|
+
export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
|
|
135
|
+
bookmarks: z.array(ActivitySchema).openapi({ example: [] }),
|
|
136
|
+
}).openapi({ title: "PostWithPostBookmarksEntity" });
|
|
137
|
+
export type PostWithPostBookmarksEntity = z.infer<
|
|
138
|
+
typeof PostWithBookmarksEntitySchema
|
|
139
|
+
>;
|
|
140
|
+
|
|
141
|
+
// ─── Inputs ───────────────────────────────────────────────────────────────────
|
|
147
142
|
|
|
148
143
|
export const CreatePostInputSchema = z.object({
|
|
149
144
|
id: z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
|
|
@@ -163,12 +158,10 @@ export const CreatePostInputSchema = z.object({
|
|
|
163
158
|
description: "Post content",
|
|
164
159
|
example: "New project announcement",
|
|
165
160
|
}),
|
|
166
|
-
|
|
167
161
|
postType: z
|
|
168
162
|
.enum(POST_TYPES)
|
|
169
163
|
.default("DEFAULT_POST")
|
|
170
164
|
.openapi({ description: "Post type", example: "PROJECT" }),
|
|
171
|
-
|
|
172
165
|
files: z
|
|
173
166
|
.array(
|
|
174
167
|
CreateFileInputSchema.extend({
|
|
@@ -178,14 +171,21 @@ export const CreatePostInputSchema = z.object({
|
|
|
178
171
|
.max(5, { message: "File order cannot exceed 5" })
|
|
179
172
|
.default(1)
|
|
180
173
|
.openapi({ example: 1 }),
|
|
174
|
+
isThumbnail: z.boolean().optional().openapi({ example: false }),
|
|
181
175
|
}),
|
|
182
176
|
)
|
|
183
177
|
.max(5, { message: "Cannot attach more than 5 files" })
|
|
184
178
|
.optional()
|
|
185
179
|
.openapi({
|
|
186
|
-
example: [
|
|
180
|
+
example: [
|
|
181
|
+
{
|
|
182
|
+
key: "uploads/img.png",
|
|
183
|
+
mimeType: "image/png",
|
|
184
|
+
order: 1,
|
|
185
|
+
isThumbnail: false,
|
|
186
|
+
},
|
|
187
|
+
],
|
|
187
188
|
}),
|
|
188
|
-
|
|
189
189
|
tags: z
|
|
190
190
|
.array(
|
|
191
191
|
z
|
|
@@ -209,9 +209,7 @@ export const CreatePostInputSchema = z.object({
|
|
|
209
209
|
.openapi({ example: "Example Website" }),
|
|
210
210
|
description: z
|
|
211
211
|
.string()
|
|
212
|
-
.max(500, {
|
|
213
|
-
message: "Description cannot exceed 500 characters",
|
|
214
|
-
})
|
|
212
|
+
.max(500, { message: "Description cannot exceed 500 characters" })
|
|
215
213
|
.optional()
|
|
216
214
|
.openapi({ example: "This is an example link" }),
|
|
217
215
|
image: z
|
|
@@ -222,77 +220,51 @@ export const CreatePostInputSchema = z.object({
|
|
|
222
220
|
.optional()
|
|
223
221
|
.openapi({
|
|
224
222
|
description: "Optional metadata for a single link in the post",
|
|
225
|
-
example: {
|
|
226
|
-
url: "https://example.com",
|
|
227
|
-
title: "Example Website",
|
|
228
|
-
description: "This is an example link",
|
|
229
|
-
image: "https://example.com/preview.jpg",
|
|
230
|
-
},
|
|
231
223
|
}),
|
|
232
224
|
});
|
|
225
|
+
export type CreatePostInput = z.infer<typeof CreatePostInputSchema>;
|
|
233
226
|
|
|
234
|
-
export const CreatePostOutputSchema = PostEntitySchema;
|
|
235
|
-
export const GetPostOutputSchema = PostWithFilesEntitySchema;
|
|
236
227
|
export const PostIdSchema = z.object({
|
|
237
228
|
postId: z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
|
|
238
229
|
});
|
|
230
|
+
export type PostIdInput = z.infer<typeof PostIdSchema>;
|
|
239
231
|
|
|
240
|
-
export const
|
|
241
|
-
|
|
242
|
-
parentId: true,
|
|
243
|
-
content: true,
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
export const PostWithLikesEntitySchema = MinimalPostSchema.extend({
|
|
247
|
-
likes: z
|
|
248
|
-
.array(
|
|
249
|
-
ActivitySchema.extend({
|
|
250
|
-
followsYou: z.boolean().optional().openapi({ example: true }),
|
|
251
|
-
isFollowing: z.boolean().optional().openapi({ example: false }),
|
|
252
|
-
}),
|
|
253
|
-
)
|
|
254
|
-
.openapi({ example: [] }),
|
|
255
|
-
}).openapi({
|
|
256
|
-
title: "PostWithPostLikesEntity",
|
|
232
|
+
export const LinkPreviewInputSchema = z.object({
|
|
233
|
+
url: z.url().openapi({ example: "https://example.com/article" }),
|
|
257
234
|
});
|
|
235
|
+
export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
258
236
|
|
|
259
|
-
export const
|
|
260
|
-
|
|
237
|
+
export const ReportPostInputSchema = z.object({
|
|
238
|
+
complaint: z
|
|
261
239
|
.string()
|
|
262
|
-
.
|
|
263
|
-
.
|
|
264
|
-
.openapi({ example: "ckj1a2b3c0000nxt" }),
|
|
240
|
+
.max(200, { error: "Complaint cannot be longer than 200 characters" })
|
|
241
|
+
.openapi({ example: "This post contains spam." }),
|
|
265
242
|
});
|
|
243
|
+
export type ReportPostInput = z.infer<typeof ReportPostInputSchema>;
|
|
266
244
|
|
|
267
|
-
export const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
title: "PostWithPostCommentsEntity",
|
|
245
|
+
export const GetFeedInputSchema = z.object({
|
|
246
|
+
limit: z.number().int().optional().openapi({ example: 20 }),
|
|
247
|
+
cursor: z.string().optional().openapi({ example: "ckj1a2b3c0000cur" }),
|
|
271
248
|
});
|
|
249
|
+
export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
|
|
272
250
|
|
|
273
|
-
export const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
|
|
283
|
-
bookmarks: z.array(ActivitySchema).openapi({ example: [] }),
|
|
284
|
-
}).openapi({
|
|
285
|
-
title: "PostWithPostBookmarksEntity",
|
|
251
|
+
export const SearchPostInputSchema = z.object({
|
|
252
|
+
queryString: z
|
|
253
|
+
.string()
|
|
254
|
+
.min(1, { message: "Search string cannot be empty" })
|
|
255
|
+
.max(200, { message: "Search string cannot exceed 200 characters" })
|
|
256
|
+
.openapi({ example: "typescript utility types" }),
|
|
257
|
+
cursor: z.string().optional().openapi({ example: "ckj1a2b3c0000cur" }),
|
|
286
258
|
});
|
|
259
|
+
export type SearchPostInput = z.infer<typeof SearchPostInputSchema>;
|
|
287
260
|
|
|
288
|
-
|
|
289
|
-
PostWithBookmarksEntitySchema.extend({
|
|
290
|
-
totalNo: z.number().int().openapi({ example: 42 }),
|
|
291
|
-
});
|
|
261
|
+
// ─── Outputs ──────────────────────────────────────────────────────────────────
|
|
292
262
|
|
|
293
|
-
export const
|
|
294
|
-
|
|
295
|
-
|
|
263
|
+
export const CreatePostOutputSchema = PostEntitySchema;
|
|
264
|
+
export type CreatePostOutput = z.infer<typeof CreatePostOutputSchema>;
|
|
265
|
+
|
|
266
|
+
export const GetPostOutputSchema = PostWithFilesEntitySchema;
|
|
267
|
+
export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
|
296
268
|
|
|
297
269
|
export const LinkPreviewOutputSchema = z.object({
|
|
298
270
|
title: z.string().openapi({ example: "Great Article" }),
|
|
@@ -309,19 +281,38 @@ export const LinkPreviewOutputSchema = z.object({
|
|
|
309
281
|
.optional()
|
|
310
282
|
.openapi({ example: "https://example.com/article" }),
|
|
311
283
|
});
|
|
284
|
+
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|
|
312
285
|
|
|
313
|
-
export const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
286
|
+
export const GetPostWithLikesOutputSchema = PostWithLikesEntitySchema.extend({
|
|
287
|
+
nextCursor: z
|
|
288
|
+
.string()
|
|
289
|
+
.optional()
|
|
290
|
+
.nullable()
|
|
291
|
+
.openapi({ example: "ckj1a2b3c0000nxt" }),
|
|
319
292
|
});
|
|
293
|
+
export type GetPostWithLikesOutput = z.infer<
|
|
294
|
+
typeof GetPostWithLikesOutputSchema
|
|
295
|
+
>;
|
|
320
296
|
|
|
321
|
-
export const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
297
|
+
export const GetPostWithCommentsOutputSchema =
|
|
298
|
+
PostWithCommentsEntitySchema.extend({
|
|
299
|
+
nextCursor: z
|
|
300
|
+
.string()
|
|
301
|
+
.optional()
|
|
302
|
+
.nullable()
|
|
303
|
+
.openapi({ example: "ckj1a2b3c0000nxt" }),
|
|
304
|
+
});
|
|
305
|
+
export type GetPostWithCommentsOutput = z.infer<
|
|
306
|
+
typeof GetPostWithCommentsOutputSchema
|
|
307
|
+
>;
|
|
308
|
+
|
|
309
|
+
export const GetPostWithBookmarksOutputSchema =
|
|
310
|
+
PostWithBookmarksEntitySchema.extend({
|
|
311
|
+
totalNo: z.number().int().openapi({ example: 42 }),
|
|
312
|
+
});
|
|
313
|
+
export type GetPostWithBookmarksOutput = z.infer<
|
|
314
|
+
typeof GetPostWithBookmarksOutputSchema
|
|
315
|
+
>;
|
|
325
316
|
|
|
326
317
|
export const GetFeedOutputSchema = z.object({
|
|
327
318
|
feed: z.array(FeedPostEntitySchema).openapi({ example: [] }),
|
|
@@ -331,15 +322,7 @@ export const GetFeedOutputSchema = z.object({
|
|
|
331
322
|
.nullable()
|
|
332
323
|
.openapi({ example: "ckj1a2b3c0000nxt" }),
|
|
333
324
|
});
|
|
334
|
-
|
|
335
|
-
export const SearchPostInputSchema = z.object({
|
|
336
|
-
queryString: z
|
|
337
|
-
.string()
|
|
338
|
-
.min(1, { message: "Search string cannot be empty" })
|
|
339
|
-
.max(200, { message: "Search string cannot exceed 200 characters" })
|
|
340
|
-
.openapi({ example: "typescript utility types" }),
|
|
341
|
-
cursor: z.string().optional().openapi({ example: "ckj1a2b3c0000cur" }),
|
|
342
|
-
});
|
|
325
|
+
export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
|
|
343
326
|
|
|
344
327
|
export const SearchPostOutputSchema = z.object({
|
|
345
328
|
posts: z.array(FeedPostEntitySchema).openapi({ example: [] }),
|
|
@@ -349,13 +332,9 @@ export const SearchPostOutputSchema = z.object({
|
|
|
349
332
|
.nullable()
|
|
350
333
|
.openapi({ example: "ckj1a2b3c0000nxt" }),
|
|
351
334
|
});
|
|
335
|
+
export type SearchPostOutput = z.infer<typeof SearchPostOutputSchema>;
|
|
352
336
|
|
|
353
|
-
|
|
354
|
-
complaint: z
|
|
355
|
-
.string()
|
|
356
|
-
.max(200, { error: "Complaint cannot be longer than 200 characters" })
|
|
357
|
-
.openapi({ example: "This post contains spam." }),
|
|
358
|
-
});
|
|
337
|
+
// ─── Analytics ────────────────────────────────────────────────────────────────
|
|
359
338
|
|
|
360
339
|
const AnalyticsChartItemSchema = z.object({
|
|
361
340
|
x: z.string().openapi({ example: "2026-03-11" }),
|
|
@@ -396,6 +375,9 @@ export const PostAnalyticsOutputSchema = z.object({
|
|
|
396
375
|
}),
|
|
397
376
|
}),
|
|
398
377
|
});
|
|
378
|
+
export type PostAnalyticsOutput = z.infer<typeof PostAnalyticsOutputSchema>;
|
|
379
|
+
|
|
380
|
+
// ─── Search Index ─────────────────────────────────────────────────────────────
|
|
399
381
|
|
|
400
382
|
export const PostSearchDocumentSchema = z
|
|
401
383
|
.object({
|
|
@@ -430,26 +412,7 @@ export const PostSearchDocumentSchema = z
|
|
|
430
412
|
.url()
|
|
431
413
|
.nullable()
|
|
432
414
|
.openapi({ example: "https://github.com/image.png" }),
|
|
433
|
-
|
|
434
|
-
.array(
|
|
435
|
-
PostFileEntitySchema.extend({
|
|
436
|
-
url: z
|
|
437
|
-
.url()
|
|
438
|
-
.openapi({ example: "https://cdn.example.com/file1.png" }),
|
|
439
|
-
}),
|
|
440
|
-
)
|
|
441
|
-
.nullable()
|
|
442
|
-
.openapi({
|
|
443
|
-
example: [
|
|
444
|
-
{
|
|
445
|
-
id: "cxy1a2b3c0000qwe",
|
|
446
|
-
postId: "ckj1a2b3c0000doc",
|
|
447
|
-
fileId: "cvb1a2b3c0000rty",
|
|
448
|
-
order: 1,
|
|
449
|
-
url: "https://cdn.example.com/file1.png",
|
|
450
|
-
},
|
|
451
|
-
],
|
|
452
|
-
}),
|
|
415
|
+
files: z.array(FileEntitySchema).nullable().openapi({ example: [] }),
|
|
453
416
|
createdAt: z
|
|
454
417
|
.string()
|
|
455
418
|
.nullable()
|
|
@@ -459,3 +422,4 @@ export const PostSearchDocumentSchema = z
|
|
|
459
422
|
title: "Post Search Document",
|
|
460
423
|
description: "Flattened schema used for indexing posts in search engines.",
|
|
461
424
|
});
|
|
425
|
+
export type PostSearchDocument = z.infer<typeof PostSearchDocumentSchema>;
|
package/src/types/index.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./like";
|
|
|
5
5
|
export * from "./common";
|
|
6
6
|
export * from "./creative";
|
|
7
7
|
export * from "./discipline";
|
|
8
|
-
export * from "./file";
|
|
9
8
|
export * from "./investor";
|
|
10
9
|
export * from "./project";
|
|
11
10
|
export * from "./user";
|
|
@@ -14,7 +13,6 @@ export * from "./username";
|
|
|
14
13
|
export * from "./entity-stats";
|
|
15
14
|
export * from "./feed";
|
|
16
15
|
export * from "./activity";
|
|
17
|
-
export * from "./post";
|
|
18
16
|
export * from "./job-application";
|
|
19
17
|
export * from "./message";
|
|
20
18
|
export * from "./chat";
|
package/src/types/file.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
3
|
-
CreateFileInputSchema,
|
|
4
|
-
CreateFileOutputSchema,
|
|
5
|
-
DeleteFileInputSchema,
|
|
6
|
-
DeleteFileOutputSchema,
|
|
7
|
-
FileEntitySchema,
|
|
8
|
-
FileKeySchema,
|
|
9
|
-
FileUpdateInputSchema,
|
|
10
|
-
GetPresignedDownloadUrlInputSchema,
|
|
11
|
-
GetPresignedDownloadUrlOutputSchema,
|
|
12
|
-
GetPresignedUploadUrlInputSchema,
|
|
13
|
-
GetPresignedUploadUrlOutputSchema,
|
|
14
|
-
} from "../schemas/file";
|
|
15
|
-
|
|
16
|
-
export type FileEntity = z.infer<typeof FileEntitySchema>;
|
|
17
|
-
|
|
18
|
-
export type CreateFileInput = z.infer<typeof CreateFileInputSchema>;
|
|
19
|
-
export type CreateFileOutput = z.infer<typeof CreateFileOutputSchema>;
|
|
20
|
-
|
|
21
|
-
export type FileUpdateEntity = z.infer<typeof FileUpdateInputSchema>;
|
|
22
|
-
|
|
23
|
-
export type DeleteFileInput = z.infer<typeof DeleteFileInputSchema>;
|
|
24
|
-
export type DeleteFileOutput = z.infer<typeof DeleteFileOutputSchema>;
|
|
25
|
-
|
|
26
|
-
export type FileKeyInput = z.infer<typeof FileKeySchema>;
|
|
27
|
-
export type GetPresignedUploadUrlInput = z.infer<
|
|
28
|
-
typeof GetPresignedUploadUrlInputSchema
|
|
29
|
-
>;
|
|
30
|
-
export type GetPresignedUploadUrlOutput = z.infer<
|
|
31
|
-
typeof GetPresignedUploadUrlOutputSchema
|
|
32
|
-
>;
|
|
33
|
-
|
|
34
|
-
export type GetPresignedDownloadUrlInput = z.infer<
|
|
35
|
-
typeof GetPresignedDownloadUrlInputSchema
|
|
36
|
-
>;
|
|
37
|
-
export type GetPresignedDownloadUrlOutput = z.infer<
|
|
38
|
-
typeof GetPresignedDownloadUrlOutputSchema
|
|
39
|
-
>;
|
package/src/types/post.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
3
|
-
CreatePostInputSchema,
|
|
4
|
-
CreatePostOutputSchema,
|
|
5
|
-
FeedPostEntitySchema,
|
|
6
|
-
GetFeedInputSchema,
|
|
7
|
-
GetFeedOutputSchema,
|
|
8
|
-
GetPostOutputSchema,
|
|
9
|
-
GetPostWithBookmarksOutputSchema,
|
|
10
|
-
GetPostWithCommentsOutputSchema,
|
|
11
|
-
GetPostWithLikesOutputSchema,
|
|
12
|
-
LinkPreviewInputSchema,
|
|
13
|
-
LinkPreviewOutputSchema,
|
|
14
|
-
PostAnalyticsOutputSchema,
|
|
15
|
-
PostEntitySchema,
|
|
16
|
-
PostFileEntitySchema,
|
|
17
|
-
PostIdSchema,
|
|
18
|
-
PostSearchDocumentSchema,
|
|
19
|
-
PostWithBookmarksEntitySchema,
|
|
20
|
-
PostWithCommentsEntitySchema,
|
|
21
|
-
PostWithFilesEntitySchema,
|
|
22
|
-
PostWithLikesEntitySchema,
|
|
23
|
-
ReportPostInputSchema,
|
|
24
|
-
SearchPostInputSchema,
|
|
25
|
-
SearchPostOutputSchema,
|
|
26
|
-
} from "../schemas/post";
|
|
27
|
-
|
|
28
|
-
export type PostEntity = z.infer<typeof PostEntitySchema>;
|
|
29
|
-
export type PostFileEntity = z.infer<typeof PostFileEntitySchema>;
|
|
30
|
-
export type PostWithFilesEntity = z.infer<typeof PostWithFilesEntitySchema>;
|
|
31
|
-
export type CreatePostInput = z.infer<typeof CreatePostInputSchema>;
|
|
32
|
-
export type CreatePostOutput = z.infer<typeof CreatePostOutputSchema>;
|
|
33
|
-
export type PostWithPostLikesEntity = z.infer<typeof PostWithLikesEntitySchema>;
|
|
34
|
-
export type PostWithPostBookmarksEntity = z.infer<
|
|
35
|
-
typeof PostWithBookmarksEntitySchema
|
|
36
|
-
>;
|
|
37
|
-
export type PostIdInput = z.infer<typeof PostIdSchema>;
|
|
38
|
-
export type PostWithPostCommentsEntity = z.infer<
|
|
39
|
-
typeof PostWithCommentsEntitySchema
|
|
40
|
-
>;
|
|
41
|
-
export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
|
42
|
-
export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
43
|
-
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|
|
44
|
-
export type FeedPostEntity = z.infer<typeof FeedPostEntitySchema>;
|
|
45
|
-
export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
|
|
46
|
-
export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
|
|
47
|
-
|
|
48
|
-
export type SearchPostInput = z.infer<typeof SearchPostInputSchema>;
|
|
49
|
-
export type SearchPostOutput = z.infer<typeof SearchPostOutputSchema>;
|
|
50
|
-
|
|
51
|
-
export type GetPostWithLikesOutput = z.infer<
|
|
52
|
-
typeof GetPostWithLikesOutputSchema
|
|
53
|
-
>;
|
|
54
|
-
|
|
55
|
-
export type GetPostWithCommentsOutput = z.infer<
|
|
56
|
-
typeof GetPostWithCommentsOutputSchema
|
|
57
|
-
>;
|
|
58
|
-
|
|
59
|
-
export type GetPostWithBookmarksOutput = z.infer<
|
|
60
|
-
typeof GetPostWithBookmarksOutputSchema
|
|
61
|
-
>;
|
|
62
|
-
export type ReportPostInput = z.infer<typeof ReportPostInputSchema>;
|
|
63
|
-
|
|
64
|
-
export type PostAnalyticsOutput = z.infer<typeof PostAnalyticsOutputSchema>;
|
|
65
|
-
|
|
66
|
-
export type PostSearchDocument = z.infer<typeof PostSearchDocumentSchema>;
|