@zyacreatives/shared 2.5.12 → 2.5.13
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 +11 -0
- package/dist/schemas/brand.js +1 -1
- package/dist/schemas/creative.d.ts +14 -3
- package/dist/schemas/creative.js +22 -11
- package/dist/schemas/project.d.ts +2 -2
- package/dist/schemas/user.d.ts +3 -3
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.js +0 -2
- package/package.json +1 -1
- package/src/schemas/brand.ts +27 -3
- package/src/schemas/creative.ts +47 -15
- package/src/types/index.ts +0 -2
- package/src/types/brand.ts +0 -38
- package/src/types/creative.ts +0 -34
package/dist/schemas/brand.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const MinimalBrandEntitySchema: z.ZodObject<{
|
|
|
8
8
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
9
9
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
|
+
export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
|
|
11
12
|
export declare const BrandEntitySchema: z.ZodObject<{
|
|
12
13
|
id: z.ZodCUID2;
|
|
13
14
|
userId: z.ZodCUID2;
|
|
@@ -34,10 +35,12 @@ export declare const BrandEntitySchema: z.ZodObject<{
|
|
|
34
35
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
35
36
|
version: z.ZodInt;
|
|
36
37
|
}, z.core.$strip>;
|
|
38
|
+
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
37
39
|
export declare const CreateBrandProfileInputSchema: z.ZodObject<{
|
|
38
40
|
brandName: z.ZodString;
|
|
39
41
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
40
42
|
}, z.core.$strip>;
|
|
43
|
+
export type CreateBrandProfileInput = z.infer<typeof CreateBrandProfileInputSchema>;
|
|
41
44
|
export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
|
|
42
45
|
brandName: z.ZodOptional<z.ZodString>;
|
|
43
46
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -60,6 +63,7 @@ export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
|
|
|
60
63
|
disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
64
|
version: z.ZodInt;
|
|
62
65
|
}, z.core.$strip>;
|
|
66
|
+
export type UpdateBrandProfileInput = z.infer<typeof UpdateBrandProfileInputSchema>;
|
|
63
67
|
export declare const GetBrandInputSchema: z.ZodObject<{
|
|
64
68
|
value: z.ZodCUID2;
|
|
65
69
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -67,6 +71,7 @@ export declare const GetBrandInputSchema: z.ZodObject<{
|
|
|
67
71
|
userId: "userId";
|
|
68
72
|
}>>>;
|
|
69
73
|
}, z.core.$strip>;
|
|
74
|
+
export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
|
|
70
75
|
export declare const GetBrandQuerySchema: z.ZodObject<{
|
|
71
76
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
72
77
|
id: "id";
|
|
@@ -99,6 +104,7 @@ export declare const CreateBrandOutputSchema: z.ZodObject<{
|
|
|
99
104
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
100
105
|
version: z.ZodInt;
|
|
101
106
|
}, z.core.$strip>;
|
|
107
|
+
export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
|
|
102
108
|
export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
103
109
|
id: z.ZodCUID2;
|
|
104
110
|
userId: z.ZodCUID2;
|
|
@@ -125,6 +131,7 @@ export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
|
125
131
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
126
132
|
version: z.ZodInt;
|
|
127
133
|
}, z.core.$strip>;
|
|
134
|
+
export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
|
|
128
135
|
export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
129
136
|
id: z.ZodCUID2;
|
|
130
137
|
userId: z.ZodCUID2;
|
|
@@ -151,6 +158,7 @@ export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
|
151
158
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
152
159
|
version: z.ZodInt;
|
|
153
160
|
}, z.core.$strip>;
|
|
161
|
+
export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
|
|
154
162
|
export declare const BrandWithUserEntitySchema: z.ZodObject<{
|
|
155
163
|
id: z.ZodCUID2;
|
|
156
164
|
userId: z.ZodCUID2;
|
|
@@ -173,11 +181,13 @@ export declare const BrandWithUserEntitySchema: z.ZodObject<{
|
|
|
173
181
|
}>;
|
|
174
182
|
}, z.core.$strip>;
|
|
175
183
|
}, z.core.$strip>;
|
|
184
|
+
export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
|
|
176
185
|
export declare const SearchBrandInputSchema: z.ZodObject<{
|
|
177
186
|
string: z.ZodString;
|
|
178
187
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
179
188
|
cursor: z.ZodOptional<z.ZodString>;
|
|
180
189
|
}, z.core.$strip>;
|
|
190
|
+
export type SearchBrandInput = z.infer<typeof SearchBrandInputSchema>;
|
|
181
191
|
export declare const SearchBrandOutputSchema: z.ZodObject<{
|
|
182
192
|
brands: z.ZodArray<z.ZodObject<{
|
|
183
193
|
id: z.ZodCUID2;
|
|
@@ -203,3 +213,4 @@ export declare const SearchBrandOutputSchema: z.ZodObject<{
|
|
|
203
213
|
}, z.core.$strip>>;
|
|
204
214
|
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
205
215
|
}, z.core.$strip>;
|
|
216
|
+
export type SearchBrandOutput = z.infer<typeof SearchBrandOutputSchema>;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SearchBrandOutputSchema = exports.SearchBrandInputSchema = exports.BrandWithUserEntitySchema = exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateBrandOutputSchema = exports.GetBrandQuerySchema = exports.GetBrandInputSchema = exports.UpdateBrandProfileInputSchema = exports.CreateBrandProfileInputSchema = exports.BrandEntitySchema = exports.MinimalBrandEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
-
const common_1 = require("./common");
|
|
6
5
|
const constants_1 = require("../constants");
|
|
6
|
+
const common_1 = require("./common");
|
|
7
7
|
const user_1 = require("./user");
|
|
8
8
|
exports.MinimalBrandEntitySchema = zod_openapi_1.z.object({
|
|
9
9
|
id: zod_openapi_1.z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -15,6 +15,7 @@ export declare const MinimalCreativeEntitySchema: z.ZodObject<{
|
|
|
15
15
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
16
16
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
+
export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
|
|
18
19
|
export declare const CreativeEntitySchema: z.ZodObject<{
|
|
19
20
|
id: z.ZodCUID2;
|
|
20
21
|
userId: z.ZodCUID2;
|
|
@@ -56,17 +57,19 @@ export declare const CreativeEntitySchema: z.ZodObject<{
|
|
|
56
57
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
57
58
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
58
59
|
}, z.core.$strip>;
|
|
60
|
+
export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
59
61
|
export declare const CreateCreativeProfileInputSchema: z.ZodObject<{
|
|
60
|
-
experienceLevel: z.
|
|
62
|
+
experienceLevel: z.ZodEnum<{
|
|
61
63
|
readonly YEAR_0_1: "0-1 year";
|
|
62
64
|
readonly YEAR_1_3: "1-3 years";
|
|
63
65
|
readonly YEAR_3_5: "3-5 years";
|
|
64
66
|
readonly YEAR_5_PLUS: "5+ years";
|
|
65
|
-
}
|
|
67
|
+
}>;
|
|
66
68
|
role: z.ZodOptional<z.ZodString>;
|
|
67
|
-
location: z.
|
|
69
|
+
location: z.ZodString;
|
|
68
70
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
69
71
|
}, z.core.$strip>;
|
|
72
|
+
export type CreateCreativeProfileInput = z.infer<typeof CreateCreativeProfileInputSchema>;
|
|
70
73
|
export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
|
|
71
74
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
72
75
|
readonly YEAR_0_1: "0-1 year";
|
|
@@ -104,6 +107,7 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
|
|
|
104
107
|
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
105
108
|
}, z.core.$strip>>>;
|
|
106
109
|
}, z.core.$strip>;
|
|
110
|
+
export type UpdateCreativeProfileInput = z.infer<typeof UpdateCreativeProfileInputSchema>;
|
|
107
111
|
export declare const GetCreativeInputSchema: z.ZodObject<{
|
|
108
112
|
value: z.ZodCUID2;
|
|
109
113
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -111,6 +115,7 @@ export declare const GetCreativeInputSchema: z.ZodObject<{
|
|
|
111
115
|
userId: "userId";
|
|
112
116
|
}>>>;
|
|
113
117
|
}, z.core.$strip>;
|
|
118
|
+
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
114
119
|
export declare const GetCreativeQuerySchema: z.ZodObject<{
|
|
115
120
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
116
121
|
id: "id";
|
|
@@ -158,6 +163,7 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
|
|
|
158
163
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
159
164
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
160
165
|
}, z.core.$strip>;
|
|
166
|
+
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
161
167
|
export declare const GetCreativeOutputSchema: z.ZodObject<{
|
|
162
168
|
id: z.ZodCUID2;
|
|
163
169
|
userId: z.ZodCUID2;
|
|
@@ -199,6 +205,7 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
|
|
|
199
205
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
200
206
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
201
207
|
}, z.core.$strip>;
|
|
208
|
+
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
202
209
|
export declare const UpdateCreativeOutputSchema: z.ZodObject<{
|
|
203
210
|
id: z.ZodCUID2;
|
|
204
211
|
userId: z.ZodCUID2;
|
|
@@ -240,6 +247,7 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
|
|
|
240
247
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
241
248
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
242
249
|
}, z.core.$strip>;
|
|
250
|
+
export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
|
|
243
251
|
export declare const CreativeWithUserEntitySchema: z.ZodObject<{
|
|
244
252
|
id: z.ZodCUID2;
|
|
245
253
|
userId: z.ZodCUID2;
|
|
@@ -269,11 +277,13 @@ export declare const CreativeWithUserEntitySchema: z.ZodObject<{
|
|
|
269
277
|
}>;
|
|
270
278
|
}, z.core.$strip>;
|
|
271
279
|
}, z.core.$strip>;
|
|
280
|
+
export type CreativeWithUserEntity = z.infer<typeof CreativeWithUserEntitySchema>;
|
|
272
281
|
export declare const SearchCreativeInputSchema: z.ZodObject<{
|
|
273
282
|
string: z.ZodString;
|
|
274
283
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
275
284
|
cursor: z.ZodOptional<z.ZodString>;
|
|
276
285
|
}, z.core.$strip>;
|
|
286
|
+
export type SearchCreativeInput = z.infer<typeof SearchCreativeInputSchema>;
|
|
277
287
|
export declare const SearchCreativeOutputSchema: z.ZodObject<{
|
|
278
288
|
creatives: z.ZodArray<z.ZodObject<{
|
|
279
289
|
id: z.ZodCUID2;
|
|
@@ -306,3 +316,4 @@ export declare const SearchCreativeOutputSchema: z.ZodObject<{
|
|
|
306
316
|
}, z.core.$strip>>;
|
|
307
317
|
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
308
318
|
}, z.core.$strip>;
|
|
319
|
+
export type SearchCreativeOutput = z.infer<typeof SearchCreativeOutputSchema>;
|
package/dist/schemas/creative.js
CHANGED
|
@@ -5,6 +5,9 @@ const zod_openapi_1 = require("@hono/zod-openapi");
|
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
const user_1 = require("./user");
|
|
8
|
+
// -----------------------------------------------------------------------------
|
|
9
|
+
// Minimal Creative Entity
|
|
10
|
+
// -----------------------------------------------------------------------------
|
|
8
11
|
exports.MinimalCreativeEntitySchema = zod_openapi_1.z.object({
|
|
9
12
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
13
|
userId: zod_openapi_1.z.cuid2().openapi({ example: "user_abc123" }),
|
|
@@ -24,6 +27,9 @@ exports.MinimalCreativeEntitySchema = zod_openapi_1.z.object({
|
|
|
24
27
|
createdAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
25
28
|
updatedAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
26
29
|
});
|
|
30
|
+
// -----------------------------------------------------------------------------
|
|
31
|
+
// Full Creative Entity
|
|
32
|
+
// -----------------------------------------------------------------------------
|
|
27
33
|
exports.CreativeEntitySchema = zod_openapi_1.z
|
|
28
34
|
.object({
|
|
29
35
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -81,32 +87,27 @@ exports.CreativeEntitySchema = zod_openapi_1.z
|
|
|
81
87
|
title: "CreativeEntitySchema",
|
|
82
88
|
description: "Represents a creative profile, including bio, experience level, location, disciplines and timestamps.",
|
|
83
89
|
});
|
|
90
|
+
// -----------------------------------------------------------------------------
|
|
91
|
+
// Creative Profile Actions (Create / Update)
|
|
92
|
+
// -----------------------------------------------------------------------------
|
|
84
93
|
exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
|
|
85
94
|
.object({
|
|
86
95
|
experienceLevel: zod_openapi_1.z
|
|
87
96
|
.enum(constants_1.EXPERIENCE_LEVELS)
|
|
88
97
|
.describe("Overall experience range of the creative.")
|
|
89
|
-
.
|
|
90
|
-
.openapi({
|
|
91
|
-
example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3,
|
|
92
|
-
}),
|
|
98
|
+
.openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3 }),
|
|
93
99
|
role: zod_openapi_1.z.string().optional().openapi({ example: "Designer" }),
|
|
94
100
|
location: zod_openapi_1.z
|
|
95
101
|
.string()
|
|
96
102
|
.max(100)
|
|
97
|
-
.optional()
|
|
98
103
|
.describe("Primary location where the creative works or resides.")
|
|
99
|
-
.openapi({
|
|
100
|
-
example: "Lagos, Nigeria",
|
|
101
|
-
}),
|
|
104
|
+
.openapi({ example: "Lagos, Nigeria" }),
|
|
102
105
|
disciplineSlugs: zod_openapi_1.z
|
|
103
106
|
.array(zod_openapi_1.z.string())
|
|
104
107
|
.min(1, "At least one discipline is required")
|
|
105
108
|
.default([])
|
|
106
109
|
.describe("List of discipline slugs representing the creative’s fields.")
|
|
107
|
-
.openapi({
|
|
108
|
-
example: ["ui-ux", "frontend"],
|
|
109
|
-
}),
|
|
110
|
+
.openapi({ example: ["ui-ux", "frontend"] }),
|
|
110
111
|
})
|
|
111
112
|
.openapi({
|
|
112
113
|
title: "create creative profile",
|
|
@@ -168,17 +169,27 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
168
169
|
.openapi({
|
|
169
170
|
title: "update creative profile",
|
|
170
171
|
});
|
|
172
|
+
// -----------------------------------------------------------------------------
|
|
173
|
+
// Queries & Outputs
|
|
174
|
+
// -----------------------------------------------------------------------------
|
|
171
175
|
exports.GetCreativeInputSchema = zod_openapi_1.z.object({
|
|
172
176
|
value: zod_openapi_1.z.cuid2(),
|
|
173
177
|
by: common_1.ProfileIdentifierSchema.shape.by,
|
|
174
178
|
});
|
|
175
179
|
exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
|
|
180
|
+
// Re-exports for explicit intent
|
|
176
181
|
exports.CreateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
177
182
|
exports.GetCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
178
183
|
exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
184
|
+
// -----------------------------------------------------------------------------
|
|
185
|
+
// Entity With User
|
|
186
|
+
// -----------------------------------------------------------------------------
|
|
179
187
|
exports.CreativeWithUserEntitySchema = exports.MinimalCreativeEntitySchema.extend({
|
|
180
188
|
user: user_1.MinimalUserSchema,
|
|
181
189
|
});
|
|
190
|
+
// -----------------------------------------------------------------------------
|
|
191
|
+
// Search Actions
|
|
192
|
+
// -----------------------------------------------------------------------------
|
|
182
193
|
exports.SearchCreativeInputSchema = zod_openapi_1.z.object({
|
|
183
194
|
string: zod_openapi_1.z
|
|
184
195
|
.string()
|
|
@@ -820,9 +820,9 @@ export declare const DeleteProjectOutputSchema: z.ZodObject<{
|
|
|
820
820
|
}, z.core.$strip>;
|
|
821
821
|
export declare const CommentOnProjectOutputSchema: z.ZodObject<{
|
|
822
822
|
id: z.ZodCUID2;
|
|
823
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
823
824
|
userId: z.ZodCUID2;
|
|
824
825
|
parentId: z.ZodCUID2;
|
|
825
|
-
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
826
826
|
parentType: z.ZodEnum<{
|
|
827
827
|
readonly PROJECT: "PROJECT";
|
|
828
828
|
readonly USER: "USER";
|
|
@@ -834,12 +834,12 @@ export declare const CommentOnProjectOutputSchema: z.ZodObject<{
|
|
|
834
834
|
readonly COMMENT: "COMMENT";
|
|
835
835
|
readonly JOB_APPLICATION: "JOB_APPLICATION";
|
|
836
836
|
}>;
|
|
837
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
837
838
|
content: z.ZodString;
|
|
838
839
|
commenterUsername: z.ZodOptional<z.ZodString>;
|
|
839
840
|
commenterName: z.ZodOptional<z.ZodString>;
|
|
840
841
|
commenterImageUrl: z.ZodOptional<z.ZodString>;
|
|
841
842
|
replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
842
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
843
843
|
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
844
844
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
845
845
|
}, z.core.$strip>;
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -229,8 +229,8 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
|
|
|
229
229
|
description: z.ZodOptional<z.ZodString>;
|
|
230
230
|
title: z.ZodString;
|
|
231
231
|
id: z.ZodCUID2;
|
|
232
|
-
userId: z.ZodCUID2;
|
|
233
232
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
233
|
+
userId: z.ZodCUID2;
|
|
234
234
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
235
235
|
url: z.ZodOptional<z.ZodURL>;
|
|
236
236
|
status: z.ZodEnum<{
|
|
@@ -419,9 +419,9 @@ export declare const UserWithPostLikesEntitySchema: z.ZodObject<{
|
|
|
419
419
|
}>;
|
|
420
420
|
post: z.ZodObject<{
|
|
421
421
|
id: z.ZodCUID2;
|
|
422
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
422
423
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
423
424
|
content: z.ZodOptional<z.ZodString>;
|
|
424
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
425
425
|
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
426
426
|
name: z.ZodString;
|
|
427
427
|
id: z.ZodInt;
|
|
@@ -1387,8 +1387,8 @@ export declare const GetAuthenticatedUserWithProjectsOutputSchema: z.ZodObject<{
|
|
|
1387
1387
|
description: z.ZodOptional<z.ZodString>;
|
|
1388
1388
|
title: z.ZodString;
|
|
1389
1389
|
id: z.ZodCUID2;
|
|
1390
|
-
userId: z.ZodCUID2;
|
|
1391
1390
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
1391
|
+
userId: z.ZodCUID2;
|
|
1392
1392
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1393
1393
|
url: z.ZodOptional<z.ZodURL>;
|
|
1394
1394
|
status: z.ZodEnum<{
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -15,11 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./auth"), exports);
|
|
18
|
-
__exportStar(require("./brand"), exports);
|
|
19
18
|
__exportStar(require("./bookmark"), exports);
|
|
20
19
|
__exportStar(require("./like"), exports);
|
|
21
20
|
__exportStar(require("./common"), exports);
|
|
22
|
-
__exportStar(require("./creative"), exports);
|
|
23
21
|
__exportStar(require("./discipline"), exports);
|
|
24
22
|
__exportStar(require("./investor"), exports);
|
|
25
23
|
__exportStar(require("./project"), exports);
|
package/package.json
CHANGED
package/src/schemas/brand.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { ProfileIdentifierSchema } from "./common";
|
|
3
2
|
import { LINK_TYPES } from "../constants";
|
|
3
|
+
import { ProfileIdentifierSchema } from "./common";
|
|
4
4
|
import { MinimalUserSchema } from "./user";
|
|
5
5
|
|
|
6
6
|
export const MinimalBrandEntitySchema = z.object({
|
|
@@ -10,7 +10,6 @@ export const MinimalBrandEntitySchema = z.object({
|
|
|
10
10
|
bio: z.string().optional().openapi({
|
|
11
11
|
example: "Leading software development firm focused on AI.",
|
|
12
12
|
}),
|
|
13
|
-
|
|
14
13
|
disciplines: z
|
|
15
14
|
.array(z.string())
|
|
16
15
|
.optional()
|
|
@@ -22,6 +21,8 @@ export const MinimalBrandEntitySchema = z.object({
|
|
|
22
21
|
updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
23
22
|
});
|
|
24
23
|
|
|
24
|
+
export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
|
|
25
|
+
|
|
25
26
|
export const BrandEntitySchema = z
|
|
26
27
|
.object({
|
|
27
28
|
id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -34,7 +35,6 @@ export const BrandEntitySchema = z
|
|
|
34
35
|
.array(z.string())
|
|
35
36
|
.optional()
|
|
36
37
|
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
37
|
-
|
|
38
38
|
links: z
|
|
39
39
|
.object({
|
|
40
40
|
url: z.url(),
|
|
@@ -56,6 +56,8 @@ export const BrandEntitySchema = z
|
|
|
56
56
|
})
|
|
57
57
|
.openapi("BrandEntitySchema");
|
|
58
58
|
|
|
59
|
+
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
60
|
+
|
|
59
61
|
export const CreateBrandProfileInputSchema = z
|
|
60
62
|
.object({
|
|
61
63
|
brandName: z
|
|
@@ -72,6 +74,10 @@ export const CreateBrandProfileInputSchema = z
|
|
|
72
74
|
title: "create brand profile",
|
|
73
75
|
});
|
|
74
76
|
|
|
77
|
+
export type CreateBrandProfileInput = z.infer<
|
|
78
|
+
typeof CreateBrandProfileInputSchema
|
|
79
|
+
>;
|
|
80
|
+
|
|
75
81
|
export const UpdateBrandProfileInputSchema = z
|
|
76
82
|
.object({
|
|
77
83
|
brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
|
|
@@ -109,23 +115,37 @@ export const UpdateBrandProfileInputSchema = z
|
|
|
109
115
|
title: "update brand profile",
|
|
110
116
|
});
|
|
111
117
|
|
|
118
|
+
export type UpdateBrandProfileInput = z.infer<
|
|
119
|
+
typeof UpdateBrandProfileInputSchema
|
|
120
|
+
>;
|
|
121
|
+
|
|
112
122
|
export const GetBrandInputSchema = z.object({
|
|
113
123
|
value: z.cuid2(),
|
|
114
124
|
by: ProfileIdentifierSchema.shape.by,
|
|
115
125
|
});
|
|
116
126
|
|
|
127
|
+
export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
|
|
128
|
+
|
|
117
129
|
export const GetBrandQuerySchema = ProfileIdentifierSchema;
|
|
118
130
|
|
|
119
131
|
export const CreateBrandOutputSchema = BrandEntitySchema;
|
|
120
132
|
|
|
133
|
+
export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
|
|
134
|
+
|
|
121
135
|
export const GetBrandOutputSchema = BrandEntitySchema;
|
|
122
136
|
|
|
137
|
+
export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
|
|
138
|
+
|
|
123
139
|
export const UpdateBrandOutputSchema = BrandEntitySchema;
|
|
124
140
|
|
|
141
|
+
export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
|
|
142
|
+
|
|
125
143
|
export const BrandWithUserEntitySchema = MinimalBrandEntitySchema.extend({
|
|
126
144
|
user: MinimalUserSchema,
|
|
127
145
|
});
|
|
128
146
|
|
|
147
|
+
export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
|
|
148
|
+
|
|
129
149
|
export const SearchBrandInputSchema = z.object({
|
|
130
150
|
string: z
|
|
131
151
|
.string()
|
|
@@ -140,7 +160,11 @@ export const SearchBrandInputSchema = z.object({
|
|
|
140
160
|
cursor: z.string().optional(),
|
|
141
161
|
});
|
|
142
162
|
|
|
163
|
+
export type SearchBrandInput = z.infer<typeof SearchBrandInputSchema>;
|
|
164
|
+
|
|
143
165
|
export const SearchBrandOutputSchema = z.object({
|
|
144
166
|
brands: z.array(BrandWithUserEntitySchema),
|
|
145
167
|
nextCursor: z.string().optional().nullable(),
|
|
146
168
|
});
|
|
169
|
+
|
|
170
|
+
export type SearchBrandOutput = z.infer<typeof SearchBrandOutputSchema>;
|
package/src/schemas/creative.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { EXPERIENCE_LEVELS, ExperienceLevel, LINK_TYPES } from "../constants";
|
|
|
3
3
|
import { ProfileIdentifierSchema } from "./common";
|
|
4
4
|
import { MinimalUserSchema } from "./user";
|
|
5
5
|
|
|
6
|
+
// -----------------------------------------------------------------------------
|
|
7
|
+
// Minimal Creative Entity
|
|
8
|
+
// -----------------------------------------------------------------------------
|
|
6
9
|
export const MinimalCreativeEntitySchema = z.object({
|
|
7
10
|
id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
8
11
|
userId: z.cuid2().openapi({ example: "user_abc123" }),
|
|
@@ -20,7 +23,6 @@ export const MinimalCreativeEntitySchema = z.object({
|
|
|
20
23
|
)
|
|
21
24
|
.optional()
|
|
22
25
|
.openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
|
|
23
|
-
|
|
24
26
|
disciplines: z
|
|
25
27
|
.array(z.string())
|
|
26
28
|
.optional()
|
|
@@ -29,6 +31,11 @@ export const MinimalCreativeEntitySchema = z.object({
|
|
|
29
31
|
updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
30
32
|
});
|
|
31
33
|
|
|
34
|
+
export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
|
|
35
|
+
|
|
36
|
+
// -----------------------------------------------------------------------------
|
|
37
|
+
// Full Creative Entity
|
|
38
|
+
// -----------------------------------------------------------------------------
|
|
32
39
|
export const CreativeEntitySchema = z
|
|
33
40
|
.object({
|
|
34
41
|
id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -48,7 +55,6 @@ export const CreativeEntitySchema = z
|
|
|
48
55
|
)
|
|
49
56
|
.optional()
|
|
50
57
|
.openapi({ example: EXPERIENCE_LEVELS.YEAR_0_1 }),
|
|
51
|
-
|
|
52
58
|
disciplines: z
|
|
53
59
|
.array(z.string())
|
|
54
60
|
.optional()
|
|
@@ -87,7 +93,6 @@ export const CreativeEntitySchema = z
|
|
|
87
93
|
.optional()
|
|
88
94
|
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
89
95
|
updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
90
|
-
|
|
91
96
|
})
|
|
92
97
|
.openapi({
|
|
93
98
|
title: "CreativeEntitySchema",
|
|
@@ -95,39 +100,39 @@ export const CreativeEntitySchema = z
|
|
|
95
100
|
"Represents a creative profile, including bio, experience level, location, disciplines and timestamps.",
|
|
96
101
|
});
|
|
97
102
|
|
|
103
|
+
export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
104
|
+
|
|
105
|
+
// -----------------------------------------------------------------------------
|
|
106
|
+
// Creative Profile Actions (Create / Update)
|
|
107
|
+
// -----------------------------------------------------------------------------
|
|
98
108
|
export const CreateCreativeProfileInputSchema = z
|
|
99
109
|
.object({
|
|
100
110
|
experienceLevel: z
|
|
101
111
|
.enum(EXPERIENCE_LEVELS)
|
|
102
112
|
.describe("Overall experience range of the creative.")
|
|
103
|
-
.
|
|
104
|
-
.openapi({
|
|
105
|
-
example: EXPERIENCE_LEVELS.YEAR_1_3,
|
|
106
|
-
}),
|
|
113
|
+
.openapi({ example: EXPERIENCE_LEVELS.YEAR_1_3 }),
|
|
107
114
|
role: z.string().optional().openapi({ example: "Designer" }),
|
|
108
|
-
|
|
109
115
|
location: z
|
|
110
116
|
.string()
|
|
111
117
|
.max(100)
|
|
112
|
-
.optional()
|
|
113
118
|
.describe("Primary location where the creative works or resides.")
|
|
114
|
-
.openapi({
|
|
115
|
-
example: "Lagos, Nigeria",
|
|
116
|
-
}),
|
|
119
|
+
.openapi({ example: "Lagos, Nigeria" }),
|
|
117
120
|
disciplineSlugs: z
|
|
118
121
|
.array(z.string())
|
|
119
122
|
.min(1, "At least one discipline is required")
|
|
120
123
|
.default([])
|
|
121
124
|
.describe("List of discipline slugs representing the creative’s fields.")
|
|
122
|
-
.openapi({
|
|
123
|
-
example: ["ui-ux", "frontend"],
|
|
124
|
-
}),
|
|
125
|
+
.openapi({ example: ["ui-ux", "frontend"] }),
|
|
125
126
|
})
|
|
126
127
|
.openapi({
|
|
127
128
|
title: "create creative profile",
|
|
128
129
|
description: "Payload for creating a new creative profile.",
|
|
129
130
|
});
|
|
130
131
|
|
|
132
|
+
export type CreateCreativeProfileInput = z.infer<
|
|
133
|
+
typeof CreateCreativeProfileInputSchema
|
|
134
|
+
>;
|
|
135
|
+
|
|
131
136
|
export const UpdateCreativeProfileInputSchema = z
|
|
132
137
|
.object({
|
|
133
138
|
experienceLevel: z
|
|
@@ -185,23 +190,46 @@ export const UpdateCreativeProfileInputSchema = z
|
|
|
185
190
|
title: "update creative profile",
|
|
186
191
|
});
|
|
187
192
|
|
|
193
|
+
export type UpdateCreativeProfileInput = z.infer<
|
|
194
|
+
typeof UpdateCreativeProfileInputSchema
|
|
195
|
+
>;
|
|
196
|
+
|
|
197
|
+
// -----------------------------------------------------------------------------
|
|
198
|
+
// Queries & Outputs
|
|
199
|
+
// -----------------------------------------------------------------------------
|
|
188
200
|
export const GetCreativeInputSchema = z.object({
|
|
189
201
|
value: z.cuid2(),
|
|
190
202
|
by: ProfileIdentifierSchema.shape.by,
|
|
191
203
|
});
|
|
192
204
|
|
|
205
|
+
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
206
|
+
|
|
193
207
|
export const GetCreativeQuerySchema = ProfileIdentifierSchema;
|
|
194
208
|
|
|
209
|
+
// Re-exports for explicit intent
|
|
195
210
|
export const CreateCreativeOutputSchema = CreativeEntitySchema;
|
|
211
|
+
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
196
212
|
|
|
197
213
|
export const GetCreativeOutputSchema = CreativeEntitySchema;
|
|
214
|
+
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
198
215
|
|
|
199
216
|
export const UpdateCreativeOutputSchema = CreativeEntitySchema;
|
|
217
|
+
export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
|
|
200
218
|
|
|
219
|
+
// -----------------------------------------------------------------------------
|
|
220
|
+
// Entity With User
|
|
221
|
+
// -----------------------------------------------------------------------------
|
|
201
222
|
export const CreativeWithUserEntitySchema = MinimalCreativeEntitySchema.extend({
|
|
202
223
|
user: MinimalUserSchema,
|
|
203
224
|
});
|
|
204
225
|
|
|
226
|
+
export type CreativeWithUserEntity = z.infer<
|
|
227
|
+
typeof CreativeWithUserEntitySchema
|
|
228
|
+
>;
|
|
229
|
+
|
|
230
|
+
// -----------------------------------------------------------------------------
|
|
231
|
+
// Search Actions
|
|
232
|
+
// -----------------------------------------------------------------------------
|
|
205
233
|
export const SearchCreativeInputSchema = z.object({
|
|
206
234
|
string: z
|
|
207
235
|
.string()
|
|
@@ -216,7 +244,11 @@ export const SearchCreativeInputSchema = z.object({
|
|
|
216
244
|
cursor: z.string().optional(),
|
|
217
245
|
});
|
|
218
246
|
|
|
247
|
+
export type SearchCreativeInput = z.infer<typeof SearchCreativeInputSchema>;
|
|
248
|
+
|
|
219
249
|
export const SearchCreativeOutputSchema = z.object({
|
|
220
250
|
creatives: z.array(CreativeWithUserEntitySchema),
|
|
221
251
|
nextCursor: z.string().optional().nullable(),
|
|
222
252
|
});
|
|
253
|
+
|
|
254
|
+
export type SearchCreativeOutput = z.infer<typeof SearchCreativeOutputSchema>;
|
package/src/types/index.ts
CHANGED
package/src/types/brand.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
3
|
-
BrandEntitySchema,
|
|
4
|
-
CreateBrandProfileInputSchema,
|
|
5
|
-
UpdateBrandProfileInputSchema,
|
|
6
|
-
GetBrandInputSchema,
|
|
7
|
-
CreateBrandOutputSchema,
|
|
8
|
-
GetBrandOutputSchema,
|
|
9
|
-
UpdateBrandOutputSchema,
|
|
10
|
-
BrandWithUserEntitySchema,
|
|
11
|
-
SearchBrandInputSchema,
|
|
12
|
-
SearchBrandOutputSchema,
|
|
13
|
-
MinimalBrandEntitySchema,
|
|
14
|
-
} from "../schemas/brand";
|
|
15
|
-
|
|
16
|
-
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
17
|
-
|
|
18
|
-
export type CreateBrandProfileInput = z.infer<
|
|
19
|
-
typeof CreateBrandProfileInputSchema
|
|
20
|
-
>;
|
|
21
|
-
|
|
22
|
-
export type UpdateBrandProfileInput = z.infer<
|
|
23
|
-
typeof UpdateBrandProfileInputSchema
|
|
24
|
-
>;
|
|
25
|
-
|
|
26
|
-
export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
|
|
27
|
-
|
|
28
|
-
export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
|
|
29
|
-
|
|
30
|
-
export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
|
|
31
|
-
|
|
32
|
-
export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
|
|
33
|
-
|
|
34
|
-
export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>
|
|
35
|
-
export type SearchBrandInput = z.infer<typeof SearchBrandInputSchema>
|
|
36
|
-
export type SearchBrandOutput = z.infer<typeof SearchBrandOutputSchema>
|
|
37
|
-
|
|
38
|
-
export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>
|
package/src/types/creative.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
3
|
-
CreativeEntitySchema,
|
|
4
|
-
CreateCreativeProfileInputSchema,
|
|
5
|
-
UpdateCreativeProfileInputSchema,
|
|
6
|
-
GetCreativeInputSchema,
|
|
7
|
-
CreateCreativeOutputSchema,
|
|
8
|
-
GetCreativeOutputSchema,
|
|
9
|
-
UpdateCreativeOutputSchema,
|
|
10
|
-
CreativeWithUserEntitySchema,
|
|
11
|
-
SearchCreativeInputSchema,
|
|
12
|
-
SearchCreativeOutputSchema,
|
|
13
|
-
MinimalCreativeEntitySchema,
|
|
14
|
-
} from "../schemas/creative";
|
|
15
|
-
|
|
16
|
-
export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
17
|
-
|
|
18
|
-
export type CreateCreativeProfileInput = z.infer<
|
|
19
|
-
typeof CreateCreativeProfileInputSchema
|
|
20
|
-
>;
|
|
21
|
-
export type UpdateCreativeProfileInput = z.infer<
|
|
22
|
-
typeof UpdateCreativeProfileInputSchema
|
|
23
|
-
>;
|
|
24
|
-
|
|
25
|
-
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
26
|
-
|
|
27
|
-
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
28
|
-
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
29
|
-
export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
|
|
30
|
-
|
|
31
|
-
export type CreativeWithUserEntity = z.infer<typeof CreativeWithUserEntitySchema>
|
|
32
|
-
export type SearchCreativeInput = z.infer<typeof SearchCreativeInputSchema>
|
|
33
|
-
export type SearchCreativeOutput = z.infer<typeof SearchCreativeOutputSchema>
|
|
34
|
-
export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>
|