@zyacreatives/shared 2.0.76 → 2.0.77
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/brand.d.ts +4 -4
- package/dist/schemas/creative.d.ts +4 -4
- package/dist/schemas/message.js +1 -1
- package/dist/schemas/post.js +1 -1
- package/dist/schemas/project.d.ts +27 -1
- package/dist/schemas/project.js +6 -4
- package/dist/schemas/user.d.ts +26 -26
- package/dist/types/project.d.ts +2 -2
- package/package.json +1 -1
- package/src/schemas/message.ts +1 -1
- package/src/schemas/post.ts +1 -1
- package/src/schemas/project.ts +5 -3
- package/src/types/project.ts +2 -4
package/dist/schemas/brand.d.ts
CHANGED
|
@@ -185,14 +185,14 @@ export declare const BrandWithUserEntitySchema: z.ZodObject<{
|
|
|
185
185
|
id: z.ZodCUID2;
|
|
186
186
|
username: z.ZodOptional<z.ZodString>;
|
|
187
187
|
email: z.ZodString;
|
|
188
|
+
name: z.ZodOptional<z.ZodString>;
|
|
189
|
+
image: z.ZodOptional<z.ZodString>;
|
|
188
190
|
role: z.ZodEnum<{
|
|
189
191
|
CREATIVE: "CREATIVE";
|
|
190
192
|
BRAND: "BRAND";
|
|
191
193
|
INVESTOR: "INVESTOR";
|
|
192
194
|
ADMIN: "ADMIN";
|
|
193
195
|
}>;
|
|
194
|
-
name: z.ZodOptional<z.ZodString>;
|
|
195
|
-
image: z.ZodOptional<z.ZodString>;
|
|
196
196
|
}, z.core.$strip>;
|
|
197
197
|
}, z.core.$strip>;
|
|
198
198
|
export declare const SearchBrandInputSchema: z.ZodObject<{
|
|
@@ -214,14 +214,14 @@ export declare const SearchBrandOutputSchema: z.ZodObject<{
|
|
|
214
214
|
id: z.ZodCUID2;
|
|
215
215
|
username: z.ZodOptional<z.ZodString>;
|
|
216
216
|
email: z.ZodString;
|
|
217
|
+
name: z.ZodOptional<z.ZodString>;
|
|
218
|
+
image: z.ZodOptional<z.ZodString>;
|
|
217
219
|
role: z.ZodEnum<{
|
|
218
220
|
CREATIVE: "CREATIVE";
|
|
219
221
|
BRAND: "BRAND";
|
|
220
222
|
INVESTOR: "INVESTOR";
|
|
221
223
|
ADMIN: "ADMIN";
|
|
222
224
|
}>;
|
|
223
|
-
name: z.ZodOptional<z.ZodString>;
|
|
224
|
-
image: z.ZodOptional<z.ZodString>;
|
|
225
225
|
}, z.core.$strip>;
|
|
226
226
|
}, z.core.$strip>>;
|
|
227
227
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
@@ -275,14 +275,14 @@ export declare const CreativeWithUserEntitySchema: z.ZodObject<{
|
|
|
275
275
|
id: z.ZodCUID2;
|
|
276
276
|
username: z.ZodOptional<z.ZodString>;
|
|
277
277
|
email: z.ZodString;
|
|
278
|
+
name: z.ZodOptional<z.ZodString>;
|
|
279
|
+
image: z.ZodOptional<z.ZodString>;
|
|
278
280
|
role: z.ZodEnum<{
|
|
279
281
|
CREATIVE: "CREATIVE";
|
|
280
282
|
BRAND: "BRAND";
|
|
281
283
|
INVESTOR: "INVESTOR";
|
|
282
284
|
ADMIN: "ADMIN";
|
|
283
285
|
}>;
|
|
284
|
-
name: z.ZodOptional<z.ZodString>;
|
|
285
|
-
image: z.ZodOptional<z.ZodString>;
|
|
286
286
|
}, z.core.$strip>;
|
|
287
287
|
}, z.core.$strip>;
|
|
288
288
|
export declare const SearchCreativeInputSchema: z.ZodObject<{
|
|
@@ -311,14 +311,14 @@ export declare const SearchCreativeOutputSchema: z.ZodObject<{
|
|
|
311
311
|
id: z.ZodCUID2;
|
|
312
312
|
username: z.ZodOptional<z.ZodString>;
|
|
313
313
|
email: z.ZodString;
|
|
314
|
+
name: z.ZodOptional<z.ZodString>;
|
|
315
|
+
image: z.ZodOptional<z.ZodString>;
|
|
314
316
|
role: z.ZodEnum<{
|
|
315
317
|
CREATIVE: "CREATIVE";
|
|
316
318
|
BRAND: "BRAND";
|
|
317
319
|
INVESTOR: "INVESTOR";
|
|
318
320
|
ADMIN: "ADMIN";
|
|
319
321
|
}>;
|
|
320
|
-
name: z.ZodOptional<z.ZodString>;
|
|
321
|
-
image: z.ZodOptional<z.ZodString>;
|
|
322
322
|
}, z.core.$strip>;
|
|
323
323
|
}, z.core.$strip>>;
|
|
324
324
|
nextCursor: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/message.js
CHANGED
|
@@ -59,7 +59,7 @@ exports.MessageWithFilesEntitySchema = exports.MessageEntitySchema.extend({
|
|
|
59
59
|
}))
|
|
60
60
|
.optional()
|
|
61
61
|
.openapi({ description: "Files associated with the project." }),
|
|
62
|
-
})
|
|
62
|
+
});
|
|
63
63
|
exports.CreateMessageInputSchema = zod_openapi_1.z.object({
|
|
64
64
|
parentId: zod_openapi_1.z
|
|
65
65
|
.cuid2()
|
package/dist/schemas/post.js
CHANGED
|
@@ -82,7 +82,7 @@ exports.PostWithFilesEntitySchema = exports.PostEntitySchema.extend({
|
|
|
82
82
|
}))
|
|
83
83
|
.optional()
|
|
84
84
|
.openapi({ description: "Files associated with the project." }),
|
|
85
|
-
})
|
|
85
|
+
});
|
|
86
86
|
exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
87
87
|
parentId: zod_openapi_1.z
|
|
88
88
|
.cuid2({ message: "Invalid parentId" })
|
|
@@ -40,7 +40,7 @@ export declare const ProjectSocialGraphEntitySchema: z.ZodObject<{
|
|
|
40
40
|
noOfBookmarks: z.ZodOptional<z.ZodNumber>;
|
|
41
41
|
noOfViews: z.ZodOptional<z.ZodNumber>;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const ProjectDetailsEntitySchema: z.ZodObject<{
|
|
44
44
|
id: z.ZodString;
|
|
45
45
|
userId: z.ZodString;
|
|
46
46
|
title: z.ZodString;
|
|
@@ -67,6 +67,19 @@ export declare const ProjectWithFilesEntitySchema: z.ZodObject<{
|
|
|
67
67
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
68
68
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
69
69
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
70
|
+
user: z.ZodObject<{
|
|
71
|
+
id: z.ZodCUID2;
|
|
72
|
+
username: z.ZodOptional<z.ZodString>;
|
|
73
|
+
email: z.ZodString;
|
|
74
|
+
name: z.ZodOptional<z.ZodString>;
|
|
75
|
+
image: z.ZodOptional<z.ZodString>;
|
|
76
|
+
role: z.ZodEnum<{
|
|
77
|
+
CREATIVE: "CREATIVE";
|
|
78
|
+
BRAND: "BRAND";
|
|
79
|
+
INVESTOR: "INVESTOR";
|
|
80
|
+
ADMIN: "ADMIN";
|
|
81
|
+
}>;
|
|
82
|
+
}, z.core.$strip>;
|
|
70
83
|
projectFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
84
|
id: z.ZodString;
|
|
72
85
|
projectId: z.ZodString;
|
|
@@ -264,6 +277,19 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
|
|
|
264
277
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
265
278
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
266
279
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
280
|
+
user: z.ZodObject<{
|
|
281
|
+
id: z.ZodCUID2;
|
|
282
|
+
username: z.ZodOptional<z.ZodString>;
|
|
283
|
+
email: z.ZodString;
|
|
284
|
+
name: z.ZodOptional<z.ZodString>;
|
|
285
|
+
image: z.ZodOptional<z.ZodString>;
|
|
286
|
+
role: z.ZodEnum<{
|
|
287
|
+
CREATIVE: "CREATIVE";
|
|
288
|
+
BRAND: "BRAND";
|
|
289
|
+
INVESTOR: "INVESTOR";
|
|
290
|
+
ADMIN: "ADMIN";
|
|
291
|
+
}>;
|
|
292
|
+
}, z.core.$strip>;
|
|
267
293
|
projectFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
268
294
|
id: z.ZodString;
|
|
269
295
|
projectId: z.ZodString;
|
package/dist/schemas/project.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.ListProjectsInputSchema = exports.MinimalProjectSchema = exports.ProjectIdSchema = exports.GetProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ViewProjectInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectUpdateOutputEntitySchema = exports.
|
|
3
|
+
exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.ListProjectsInputSchema = exports.MinimalProjectSchema = exports.ProjectIdSchema = exports.GetProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ViewProjectInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectDetailsEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.ProjectFileEntitySchema = exports.ProjectEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const file_1 = require("./file");
|
|
@@ -8,6 +8,7 @@ const comment_1 = require("./comment");
|
|
|
8
8
|
const bookmark_1 = require("./bookmark");
|
|
9
9
|
const view_1 = require("./view");
|
|
10
10
|
const like_1 = require("./like");
|
|
11
|
+
const user_1 = require("./user");
|
|
11
12
|
/* ------------------------------ Core Entities ------------------------------ */
|
|
12
13
|
exports.ProjectEntitySchema = zod_openapi_1.z
|
|
13
14
|
.object({
|
|
@@ -124,14 +125,15 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
|
|
|
124
125
|
})
|
|
125
126
|
.openapi("ProjectSocialGraphEntity");
|
|
126
127
|
/* ------------------------------ Derived Entities ------------------------------ */
|
|
127
|
-
exports.
|
|
128
|
+
exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
|
|
129
|
+
user: user_1.MinimalUserSchema,
|
|
128
130
|
projectFiles: zod_openapi_1.z
|
|
129
131
|
.array(exports.ProjectFileEntitySchema.extend({
|
|
130
132
|
file: file_1.FileEntitySchema,
|
|
131
133
|
}))
|
|
132
134
|
.optional()
|
|
133
135
|
.openapi({ description: "Files associated with the project." }),
|
|
134
|
-
}).openapi({ title: "
|
|
136
|
+
}).openapi({ title: "ProjectDetailsEntity" });
|
|
135
137
|
exports.ProjectUpdateOutputEntitySchema = zod_openapi_1.z
|
|
136
138
|
.object({ id: zod_openapi_1.z.cuid2() })
|
|
137
139
|
.openapi("ProjectUpdateOutputEntity");
|
|
@@ -210,7 +212,7 @@ exports.ViewProjectInputSchema = zod_openapi_1.z
|
|
|
210
212
|
exports.CreateProjectOutputSchema = exports.ProjectEntitySchema;
|
|
211
213
|
exports.UpdateProjectOutputSchema = exports.ProjectEntitySchema;
|
|
212
214
|
exports.DeleteProjectOutputSchema = exports.ProjectEntitySchema;
|
|
213
|
-
exports.GetProjectOutputSchema = exports.
|
|
215
|
+
exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema.extend({
|
|
214
216
|
isLiked: zod_openapi_1.z.boolean().optional(),
|
|
215
217
|
isBookmarked: zod_openapi_1.z.boolean().optional(),
|
|
216
218
|
});
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -40,14 +40,14 @@ export declare const MinimalUserSchema: z.ZodObject<{
|
|
|
40
40
|
id: z.ZodCUID2;
|
|
41
41
|
username: z.ZodOptional<z.ZodString>;
|
|
42
42
|
email: z.ZodString;
|
|
43
|
+
name: z.ZodOptional<z.ZodString>;
|
|
44
|
+
image: z.ZodOptional<z.ZodString>;
|
|
43
45
|
role: z.ZodEnum<{
|
|
44
46
|
CREATIVE: "CREATIVE";
|
|
45
47
|
BRAND: "BRAND";
|
|
46
48
|
INVESTOR: "INVESTOR";
|
|
47
49
|
ADMIN: "ADMIN";
|
|
48
50
|
}>;
|
|
49
|
-
name: z.ZodOptional<z.ZodString>;
|
|
50
|
-
image: z.ZodOptional<z.ZodString>;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
export declare const UserStatsEntitySchema: z.ZodObject<{
|
|
53
53
|
followerCount: z.ZodInt;
|
|
@@ -299,52 +299,52 @@ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
|
|
|
299
299
|
id: z.ZodCUID2;
|
|
300
300
|
username: z.ZodOptional<z.ZodString>;
|
|
301
301
|
email: z.ZodString;
|
|
302
|
+
name: z.ZodOptional<z.ZodString>;
|
|
303
|
+
image: z.ZodOptional<z.ZodString>;
|
|
302
304
|
role: z.ZodEnum<{
|
|
303
305
|
CREATIVE: "CREATIVE";
|
|
304
306
|
BRAND: "BRAND";
|
|
305
307
|
INVESTOR: "INVESTOR";
|
|
306
308
|
ADMIN: "ADMIN";
|
|
307
309
|
}>;
|
|
308
|
-
name: z.ZodOptional<z.ZodString>;
|
|
309
|
-
image: z.ZodOptional<z.ZodString>;
|
|
310
310
|
following: z.ZodArray<z.ZodObject<{
|
|
311
311
|
id: z.ZodCUID2;
|
|
312
312
|
username: z.ZodOptional<z.ZodString>;
|
|
313
313
|
email: z.ZodString;
|
|
314
|
+
name: z.ZodOptional<z.ZodString>;
|
|
315
|
+
image: z.ZodOptional<z.ZodString>;
|
|
314
316
|
role: z.ZodEnum<{
|
|
315
317
|
CREATIVE: "CREATIVE";
|
|
316
318
|
BRAND: "BRAND";
|
|
317
319
|
INVESTOR: "INVESTOR";
|
|
318
320
|
ADMIN: "ADMIN";
|
|
319
321
|
}>;
|
|
320
|
-
name: z.ZodOptional<z.ZodString>;
|
|
321
|
-
image: z.ZodOptional<z.ZodString>;
|
|
322
322
|
}, z.core.$strip>>;
|
|
323
323
|
}, z.core.$strip>;
|
|
324
324
|
export declare const UserWithFollowersEntitySchema: z.ZodObject<{
|
|
325
325
|
id: z.ZodCUID2;
|
|
326
326
|
username: z.ZodOptional<z.ZodString>;
|
|
327
327
|
email: z.ZodString;
|
|
328
|
+
name: z.ZodOptional<z.ZodString>;
|
|
329
|
+
image: z.ZodOptional<z.ZodString>;
|
|
328
330
|
role: z.ZodEnum<{
|
|
329
331
|
CREATIVE: "CREATIVE";
|
|
330
332
|
BRAND: "BRAND";
|
|
331
333
|
INVESTOR: "INVESTOR";
|
|
332
334
|
ADMIN: "ADMIN";
|
|
333
335
|
}>;
|
|
334
|
-
name: z.ZodOptional<z.ZodString>;
|
|
335
|
-
image: z.ZodOptional<z.ZodString>;
|
|
336
336
|
followers: z.ZodArray<z.ZodObject<{
|
|
337
337
|
id: z.ZodCUID2;
|
|
338
338
|
username: z.ZodOptional<z.ZodString>;
|
|
339
339
|
email: z.ZodString;
|
|
340
|
+
name: z.ZodOptional<z.ZodString>;
|
|
341
|
+
image: z.ZodOptional<z.ZodString>;
|
|
340
342
|
role: z.ZodEnum<{
|
|
341
343
|
CREATIVE: "CREATIVE";
|
|
342
344
|
BRAND: "BRAND";
|
|
343
345
|
INVESTOR: "INVESTOR";
|
|
344
346
|
ADMIN: "ADMIN";
|
|
345
347
|
}>;
|
|
346
|
-
name: z.ZodOptional<z.ZodString>;
|
|
347
|
-
image: z.ZodOptional<z.ZodString>;
|
|
348
348
|
}, z.core.$strip>>;
|
|
349
349
|
}, z.core.$strip>;
|
|
350
350
|
export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
@@ -352,26 +352,26 @@ export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
|
352
352
|
id: z.ZodCUID2;
|
|
353
353
|
username: z.ZodOptional<z.ZodString>;
|
|
354
354
|
email: z.ZodString;
|
|
355
|
+
name: z.ZodOptional<z.ZodString>;
|
|
356
|
+
image: z.ZodOptional<z.ZodString>;
|
|
355
357
|
role: z.ZodEnum<{
|
|
356
358
|
CREATIVE: "CREATIVE";
|
|
357
359
|
BRAND: "BRAND";
|
|
358
360
|
INVESTOR: "INVESTOR";
|
|
359
361
|
ADMIN: "ADMIN";
|
|
360
362
|
}>;
|
|
361
|
-
name: z.ZodOptional<z.ZodString>;
|
|
362
|
-
image: z.ZodOptional<z.ZodString>;
|
|
363
363
|
following: z.ZodArray<z.ZodObject<{
|
|
364
364
|
id: z.ZodCUID2;
|
|
365
365
|
username: z.ZodOptional<z.ZodString>;
|
|
366
366
|
email: z.ZodString;
|
|
367
|
+
name: z.ZodOptional<z.ZodString>;
|
|
368
|
+
image: z.ZodOptional<z.ZodString>;
|
|
367
369
|
role: z.ZodEnum<{
|
|
368
370
|
CREATIVE: "CREATIVE";
|
|
369
371
|
BRAND: "BRAND";
|
|
370
372
|
INVESTOR: "INVESTOR";
|
|
371
373
|
ADMIN: "ADMIN";
|
|
372
374
|
}>;
|
|
373
|
-
name: z.ZodOptional<z.ZodString>;
|
|
374
|
-
image: z.ZodOptional<z.ZodString>;
|
|
375
375
|
}, z.core.$strip>>;
|
|
376
376
|
}, z.core.$strip>;
|
|
377
377
|
}, z.core.$strip>;
|
|
@@ -380,26 +380,26 @@ export declare const GetUserFollowersOutputSchema: z.ZodObject<{
|
|
|
380
380
|
id: z.ZodCUID2;
|
|
381
381
|
username: z.ZodOptional<z.ZodString>;
|
|
382
382
|
email: z.ZodString;
|
|
383
|
+
name: z.ZodOptional<z.ZodString>;
|
|
384
|
+
image: z.ZodOptional<z.ZodString>;
|
|
383
385
|
role: z.ZodEnum<{
|
|
384
386
|
CREATIVE: "CREATIVE";
|
|
385
387
|
BRAND: "BRAND";
|
|
386
388
|
INVESTOR: "INVESTOR";
|
|
387
389
|
ADMIN: "ADMIN";
|
|
388
390
|
}>;
|
|
389
|
-
name: z.ZodOptional<z.ZodString>;
|
|
390
|
-
image: z.ZodOptional<z.ZodString>;
|
|
391
391
|
followers: z.ZodArray<z.ZodObject<{
|
|
392
392
|
id: z.ZodCUID2;
|
|
393
393
|
username: z.ZodOptional<z.ZodString>;
|
|
394
394
|
email: z.ZodString;
|
|
395
|
+
name: z.ZodOptional<z.ZodString>;
|
|
396
|
+
image: z.ZodOptional<z.ZodString>;
|
|
395
397
|
role: z.ZodEnum<{
|
|
396
398
|
CREATIVE: "CREATIVE";
|
|
397
399
|
BRAND: "BRAND";
|
|
398
400
|
INVESTOR: "INVESTOR";
|
|
399
401
|
ADMIN: "ADMIN";
|
|
400
402
|
}>;
|
|
401
|
-
name: z.ZodOptional<z.ZodString>;
|
|
402
|
-
image: z.ZodOptional<z.ZodString>;
|
|
403
403
|
}, z.core.$strip>>;
|
|
404
404
|
}, z.core.$strip>;
|
|
405
405
|
}, z.core.$strip>;
|
|
@@ -655,52 +655,52 @@ export declare const GetAuthenticatedUserWithUserFollowingOutputSchema: z.ZodObj
|
|
|
655
655
|
id: z.ZodCUID2;
|
|
656
656
|
username: z.ZodOptional<z.ZodString>;
|
|
657
657
|
email: z.ZodString;
|
|
658
|
+
name: z.ZodOptional<z.ZodString>;
|
|
659
|
+
image: z.ZodOptional<z.ZodString>;
|
|
658
660
|
role: z.ZodEnum<{
|
|
659
661
|
CREATIVE: "CREATIVE";
|
|
660
662
|
BRAND: "BRAND";
|
|
661
663
|
INVESTOR: "INVESTOR";
|
|
662
664
|
ADMIN: "ADMIN";
|
|
663
665
|
}>;
|
|
664
|
-
name: z.ZodOptional<z.ZodString>;
|
|
665
|
-
image: z.ZodOptional<z.ZodString>;
|
|
666
666
|
following: z.ZodArray<z.ZodObject<{
|
|
667
667
|
id: z.ZodCUID2;
|
|
668
668
|
username: z.ZodOptional<z.ZodString>;
|
|
669
669
|
email: z.ZodString;
|
|
670
|
+
name: z.ZodOptional<z.ZodString>;
|
|
671
|
+
image: z.ZodOptional<z.ZodString>;
|
|
670
672
|
role: z.ZodEnum<{
|
|
671
673
|
CREATIVE: "CREATIVE";
|
|
672
674
|
BRAND: "BRAND";
|
|
673
675
|
INVESTOR: "INVESTOR";
|
|
674
676
|
ADMIN: "ADMIN";
|
|
675
677
|
}>;
|
|
676
|
-
name: z.ZodOptional<z.ZodString>;
|
|
677
|
-
image: z.ZodOptional<z.ZodString>;
|
|
678
678
|
}, z.core.$strip>>;
|
|
679
679
|
}, z.core.$strip>;
|
|
680
680
|
export declare const GetAuthenticatedUserWithUserFollowersOutputSchema: z.ZodObject<{
|
|
681
681
|
id: z.ZodCUID2;
|
|
682
682
|
username: z.ZodOptional<z.ZodString>;
|
|
683
683
|
email: z.ZodString;
|
|
684
|
+
name: z.ZodOptional<z.ZodString>;
|
|
685
|
+
image: z.ZodOptional<z.ZodString>;
|
|
684
686
|
role: z.ZodEnum<{
|
|
685
687
|
CREATIVE: "CREATIVE";
|
|
686
688
|
BRAND: "BRAND";
|
|
687
689
|
INVESTOR: "INVESTOR";
|
|
688
690
|
ADMIN: "ADMIN";
|
|
689
691
|
}>;
|
|
690
|
-
name: z.ZodOptional<z.ZodString>;
|
|
691
|
-
image: z.ZodOptional<z.ZodString>;
|
|
692
692
|
followers: z.ZodArray<z.ZodObject<{
|
|
693
693
|
id: z.ZodCUID2;
|
|
694
694
|
username: z.ZodOptional<z.ZodString>;
|
|
695
695
|
email: z.ZodString;
|
|
696
|
+
name: z.ZodOptional<z.ZodString>;
|
|
697
|
+
image: z.ZodOptional<z.ZodString>;
|
|
696
698
|
role: z.ZodEnum<{
|
|
697
699
|
CREATIVE: "CREATIVE";
|
|
698
700
|
BRAND: "BRAND";
|
|
699
701
|
INVESTOR: "INVESTOR";
|
|
700
702
|
ADMIN: "ADMIN";
|
|
701
703
|
}>;
|
|
702
|
-
name: z.ZodOptional<z.ZodString>;
|
|
703
|
-
image: z.ZodOptional<z.ZodString>;
|
|
704
704
|
}, z.core.$strip>>;
|
|
705
705
|
}, z.core.$strip>;
|
|
706
706
|
export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObject<{
|
package/dist/types/project.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "@hono/zod-openapi";
|
|
2
|
-
import type { ProjectEntitySchema, ProjectIdSchema, MinimalProjectSchema, ProjectFileEntitySchema,
|
|
2
|
+
import type { ProjectEntitySchema, ProjectIdSchema, MinimalProjectSchema, ProjectFileEntitySchema, ProjectDetailsEntitySchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithProjectLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, DeleteProjectOutputSchema, GetProjectOutputSchema, ListProjectsInputSchema, ViewProjectInputSchema } from "../schemas/project";
|
|
3
3
|
import { ViewEntitySchema } from "../schemas/view";
|
|
4
4
|
import { LikeEntitySchema } from "../schemas/like";
|
|
5
5
|
import { CommentEntitySchema } from "../schemas/comment";
|
|
@@ -10,7 +10,7 @@ export type ProjectFileEntity = z.infer<typeof ProjectFileEntitySchema>;
|
|
|
10
10
|
export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
|
|
11
11
|
export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
|
|
12
12
|
export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
|
|
13
|
-
export type
|
|
13
|
+
export type ProjectDetailsEntity = z.infer<typeof ProjectDetailsEntitySchema>;
|
|
14
14
|
export type ProjectWithProjectViewsEntity = z.infer<typeof ProjectWithProjectViewsEntitySchema>;
|
|
15
15
|
export type ProjectWithProjectCommentsEntity = z.infer<typeof ProjectWithProjectCommentsEntitySchema>;
|
|
16
16
|
export type ProjectWithProjectLikesEntity = z.infer<typeof ProjectWithProjectLikesEntitySchema>;
|
package/package.json
CHANGED
package/src/schemas/message.ts
CHANGED
|
@@ -61,7 +61,7 @@ export const MessageWithFilesEntitySchema = MessageEntitySchema.extend({
|
|
|
61
61
|
)
|
|
62
62
|
.optional()
|
|
63
63
|
.openapi({ description: "Files associated with the project." }),
|
|
64
|
-
})
|
|
64
|
+
});
|
|
65
65
|
|
|
66
66
|
export const CreateMessageInputSchema = z.object({
|
|
67
67
|
parentId: z
|
package/src/schemas/post.ts
CHANGED
|
@@ -92,7 +92,7 @@ export const PostWithFilesEntitySchema = PostEntitySchema.extend({
|
|
|
92
92
|
)
|
|
93
93
|
.optional()
|
|
94
94
|
.openapi({ description: "Files associated with the project." }),
|
|
95
|
-
})
|
|
95
|
+
});
|
|
96
96
|
|
|
97
97
|
export const CreatePostInputSchema = z.object({
|
|
98
98
|
parentId: z
|
package/src/schemas/project.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { CommentEntitySchema } from "./comment";
|
|
|
5
5
|
import { BookmarkEntitySchema } from "./bookmark";
|
|
6
6
|
import { ViewEntitySchema } from "./view";
|
|
7
7
|
import { LikeEntitySchema } from "./like";
|
|
8
|
+
import { MinimalUserSchema } from "./user";
|
|
8
9
|
|
|
9
10
|
/* ------------------------------ Core Entities ------------------------------ */
|
|
10
11
|
export const ProjectEntitySchema = z
|
|
@@ -126,7 +127,8 @@ export const ProjectSocialGraphEntitySchema = z
|
|
|
126
127
|
.openapi("ProjectSocialGraphEntity");
|
|
127
128
|
|
|
128
129
|
/* ------------------------------ Derived Entities ------------------------------ */
|
|
129
|
-
export const
|
|
130
|
+
export const ProjectDetailsEntitySchema = ProjectEntitySchema.extend({
|
|
131
|
+
user: MinimalUserSchema,
|
|
130
132
|
projectFiles: z
|
|
131
133
|
.array(
|
|
132
134
|
ProjectFileEntitySchema.extend({
|
|
@@ -135,7 +137,7 @@ export const ProjectWithFilesEntitySchema = ProjectEntitySchema.extend({
|
|
|
135
137
|
)
|
|
136
138
|
.optional()
|
|
137
139
|
.openapi({ description: "Files associated with the project." }),
|
|
138
|
-
}).openapi({ title: "
|
|
140
|
+
}).openapi({ title: "ProjectDetailsEntity" });
|
|
139
141
|
|
|
140
142
|
export const ProjectUpdateOutputEntitySchema = z
|
|
141
143
|
.object({ id: z.cuid2() })
|
|
@@ -221,7 +223,7 @@ export const CreateProjectOutputSchema = ProjectEntitySchema;
|
|
|
221
223
|
export const UpdateProjectOutputSchema = ProjectEntitySchema;
|
|
222
224
|
export const DeleteProjectOutputSchema = ProjectEntitySchema;
|
|
223
225
|
|
|
224
|
-
export const GetProjectOutputSchema =
|
|
226
|
+
export const GetProjectOutputSchema = ProjectDetailsEntitySchema.extend({
|
|
225
227
|
isLiked: z.boolean().optional(),
|
|
226
228
|
isBookmarked: z.boolean().optional(),
|
|
227
229
|
});
|
package/src/types/project.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
ProjectIdSchema,
|
|
5
5
|
MinimalProjectSchema,
|
|
6
6
|
ProjectFileEntitySchema,
|
|
7
|
-
|
|
7
|
+
ProjectDetailsEntitySchema,
|
|
8
8
|
ProjectWithProjectViewsEntitySchema,
|
|
9
9
|
ProjectWithProjectCommentsEntitySchema,
|
|
10
10
|
ProjectWithProjectLikesEntitySchema,
|
|
@@ -31,9 +31,7 @@ export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
|
|
|
31
31
|
export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
|
|
32
32
|
export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
|
|
33
33
|
|
|
34
|
-
export type
|
|
35
|
-
typeof ProjectWithFilesEntitySchema
|
|
36
|
-
>;
|
|
34
|
+
export type ProjectDetailsEntity = z.infer<typeof ProjectDetailsEntitySchema>;
|
|
37
35
|
export type ProjectWithProjectViewsEntity = z.infer<
|
|
38
36
|
typeof ProjectWithProjectViewsEntitySchema
|
|
39
37
|
>;
|