@zyacreatives/shared 1.2.7 → 1.2.9
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 +4 -0
- package/dist/constants.js +60 -1
- package/dist/schemas/brand.d.ts +5 -57
- package/dist/schemas/brand.js +6 -10
- package/dist/schemas/creative.d.ts +5 -57
- package/dist/schemas/creative.js +7 -11
- package/dist/schemas/discipline.d.ts +33 -0
- package/dist/schemas/discipline.js +90 -0
- package/dist/schemas/investor.d.ts +5 -57
- package/dist/schemas/investor.js +6 -10
- package/dist/schemas/user.d.ts +1 -1
- package/dist/types/brand.d.ts +6 -6
- package/dist/types/creative.d.ts +7 -7
- package/dist/types/discipline.d.ts +11 -8
- package/dist/types/investor.d.ts +6 -6
- package/dist/types/project.d.ts +1 -1
- package/package.json +1 -1
- package/src/constants.ts +60 -0
- package/src/schemas/brand.ts +7 -10
- package/src/schemas/creative.ts +8 -10
- package/src/schemas/discipline.ts +101 -0
- package/src/schemas/investor.ts +7 -8
- package/src/types/brand.ts +13 -13
- package/src/types/creative.ts +14 -14
- package/src/types/discipline.ts +36 -9
- package/src/types/investor.ts +13 -13
- package/src/types/project.ts +1 -1
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FRONTEND_API_ROUTES = exports.API_ROUTES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
|
|
3
|
+
exports.DEFAULT_DISCIPLINES = exports.FRONTEND_API_ROUTES = exports.API_ROUTES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
|
|
4
4
|
exports.ROLES = {
|
|
5
5
|
CREATIVE: "CREATIVE",
|
|
6
6
|
BRAND: "BRAND",
|
|
@@ -257,3 +257,62 @@ exports.FRONTEND_API_ROUTES = {
|
|
|
257
257
|
getProjectUser: (projectId) => `${projectId}/user`,
|
|
258
258
|
},
|
|
259
259
|
};
|
|
260
|
+
exports.DEFAULT_DISCIPLINES = [
|
|
261
|
+
{ name: "Painting", slug: "painting" },
|
|
262
|
+
{ name: "Drawing", slug: "drawing" },
|
|
263
|
+
{ name: "Sculpture", slug: "sculpture" },
|
|
264
|
+
{ name: "Printmaking", slug: "printmaking" },
|
|
265
|
+
{ name: "Photography", slug: "photography" },
|
|
266
|
+
{ name: "Illustration", slug: "illustration" },
|
|
267
|
+
{ name: "Installation Art", slug: "installation_art" },
|
|
268
|
+
{ name: "Mixed Media Art", slug: "mixed_media_art" },
|
|
269
|
+
{ name: "Conceptual Art", slug: "conceptual_art" },
|
|
270
|
+
{ name: "Graphic Design", slug: "graphic_design" },
|
|
271
|
+
{ name: "Fashion Design", slug: "fashion_design" },
|
|
272
|
+
{ name: "Interior Design", slug: "interior_design" },
|
|
273
|
+
{ name: "Industrial / Product Design", slug: "industrial_product_design" },
|
|
274
|
+
{ name: "UX Design", slug: "ux_design" },
|
|
275
|
+
{ name: "UI Design", slug: "ui_design" },
|
|
276
|
+
{ name: "Motion Design", slug: "motion_design" },
|
|
277
|
+
{ name: "Textile Design", slug: "textile_design" },
|
|
278
|
+
{ name: "Jewelry Design", slug: "jewelry_design" },
|
|
279
|
+
{ name: "Furniture Design", slug: "furniture_design" },
|
|
280
|
+
{ name: "Architecture", slug: "architecture" },
|
|
281
|
+
{ name: "Web Design", slug: "web_design" },
|
|
282
|
+
{ name: "Exhibition Design", slug: "exhibition_design" },
|
|
283
|
+
{ name: "Design Research", slug: "design_research" },
|
|
284
|
+
{ name: "Film / Video Production", slug: "film_video_production" },
|
|
285
|
+
{ name: "Animation", slug: "animation" },
|
|
286
|
+
{ name: "Game Design", slug: "game_design" },
|
|
287
|
+
{ name: "Digital Media Art", slug: "digital_media_art" },
|
|
288
|
+
{ name: "Advertising / Art Direction", slug: "advertising_art_direction" },
|
|
289
|
+
{ name: "Copywriting", slug: "copywriting" },
|
|
290
|
+
{ name: "Content Strategy", slug: "content_strategy" },
|
|
291
|
+
{
|
|
292
|
+
name: "Social Media Content Creation",
|
|
293
|
+
slug: "social_media_content_creation",
|
|
294
|
+
},
|
|
295
|
+
{ name: "Podcasting", slug: "podcasting" },
|
|
296
|
+
{ name: "Journalism", slug: "journalism" },
|
|
297
|
+
{ name: "Creative Coding", slug: "creative_coding" },
|
|
298
|
+
{
|
|
299
|
+
name: "Augmented Reality (AR) Design",
|
|
300
|
+
slug: "augmented_reality_ar_design",
|
|
301
|
+
},
|
|
302
|
+
{ name: "Virtual Reality (VR) Design", slug: "virtual_reality_vr_design" },
|
|
303
|
+
{ name: "Interaction Design", slug: "interaction_design" },
|
|
304
|
+
{ name: "Music", slug: "music" },
|
|
305
|
+
{ name: "Dance", slug: "dance" },
|
|
306
|
+
{ name: "Theatre / Acting", slug: "theatre_acting" },
|
|
307
|
+
{
|
|
308
|
+
name: "Spoken Word / Performance Poetry",
|
|
309
|
+
slug: "spoken_word_performance_poetry",
|
|
310
|
+
},
|
|
311
|
+
{ name: "DJ", slug: "dj" },
|
|
312
|
+
{ name: "Sound Design", slug: "sound_design" },
|
|
313
|
+
{ name: "Voice Acting", slug: "voice_acting" },
|
|
314
|
+
{ name: "Creative Writing", slug: "creative_writing" },
|
|
315
|
+
{ name: "Comics / Graphic Novels", slug: "comics_graphic_novels" },
|
|
316
|
+
{ name: "Curation", slug: "curation" },
|
|
317
|
+
{ name: "Creative Entrepreneurship", slug: "creative_entrepreneurship" },
|
|
318
|
+
];
|
package/dist/schemas/brand.d.ts
CHANGED
|
@@ -5,19 +5,6 @@ export declare const BrandEntitySchema: z.ZodObject<{
|
|
|
5
5
|
brandName: z.ZodString;
|
|
6
6
|
bio: z.ZodOptional<z.ZodString>;
|
|
7
7
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
user: z.ZodObject<{
|
|
9
|
-
id: z.ZodCUID2;
|
|
10
|
-
username: z.ZodOptional<z.ZodString>;
|
|
11
|
-
email: z.ZodString;
|
|
12
|
-
name: z.ZodOptional<z.ZodString>;
|
|
13
|
-
image: z.ZodOptional<z.ZodString>;
|
|
14
|
-
role: z.ZodEnum<{
|
|
15
|
-
CREATIVE: "CREATIVE";
|
|
16
|
-
BRAND: "BRAND";
|
|
17
|
-
INVESTOR: "INVESTOR";
|
|
18
|
-
ADMIN: "ADMIN";
|
|
19
|
-
}>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
8
|
disciplines: z.ZodArray<z.ZodString>;
|
|
22
9
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
23
10
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -36,13 +23,13 @@ export declare const ListBrandsInputSchema: z.ZodObject<{
|
|
|
36
23
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
37
24
|
perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
38
25
|
}, z.core.$strip>;
|
|
39
|
-
export declare const
|
|
26
|
+
export declare const CreateBrandProfileInputSchema: z.ZodObject<{
|
|
40
27
|
brandName: z.ZodString;
|
|
41
28
|
bio: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
42
29
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
43
30
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
44
31
|
}, z.core.$strip>;
|
|
45
|
-
export declare const
|
|
32
|
+
export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
|
|
46
33
|
brandName: z.ZodOptional<z.ZodString>;
|
|
47
34
|
bio: z.ZodOptional<z.ZodString>;
|
|
48
35
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -56,30 +43,17 @@ export declare const GetBrandQuerySchema: z.ZodObject<{
|
|
|
56
43
|
userId: "userId";
|
|
57
44
|
}>>>;
|
|
58
45
|
}, z.core.$strip>;
|
|
59
|
-
export declare const
|
|
46
|
+
export declare const CreateBrandOutputSchema: z.ZodObject<{
|
|
60
47
|
id: z.ZodCUID2;
|
|
61
48
|
userId: z.ZodCUID2;
|
|
62
49
|
brandName: z.ZodString;
|
|
63
50
|
bio: z.ZodOptional<z.ZodString>;
|
|
64
51
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
|
-
user: z.ZodObject<{
|
|
66
|
-
id: z.ZodCUID2;
|
|
67
|
-
username: z.ZodOptional<z.ZodString>;
|
|
68
|
-
email: z.ZodString;
|
|
69
|
-
name: z.ZodOptional<z.ZodString>;
|
|
70
|
-
image: z.ZodOptional<z.ZodString>;
|
|
71
|
-
role: z.ZodEnum<{
|
|
72
|
-
CREATIVE: "CREATIVE";
|
|
73
|
-
BRAND: "BRAND";
|
|
74
|
-
INVESTOR: "INVESTOR";
|
|
75
|
-
ADMIN: "ADMIN";
|
|
76
|
-
}>;
|
|
77
|
-
}, z.core.$strip>;
|
|
78
52
|
disciplines: z.ZodArray<z.ZodString>;
|
|
79
53
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
80
54
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
81
55
|
}, z.core.$strip>;
|
|
82
|
-
export declare const
|
|
56
|
+
export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
83
57
|
id: z.ZodCUID2;
|
|
84
58
|
userId: z.ZodCUID2;
|
|
85
59
|
brandName: z.ZodString;
|
|
@@ -88,39 +62,13 @@ export declare const GetBrandEndpointResponseSchema: z.ZodObject<{
|
|
|
88
62
|
disciplines: z.ZodArray<z.ZodString>;
|
|
89
63
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
90
64
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
91
|
-
user: z.ZodObject<{
|
|
92
|
-
id: z.ZodCUID2;
|
|
93
|
-
username: z.ZodOptional<z.ZodString>;
|
|
94
|
-
email: z.ZodString;
|
|
95
|
-
name: z.ZodOptional<z.ZodString>;
|
|
96
|
-
image: z.ZodOptional<z.ZodString>;
|
|
97
|
-
role: z.ZodEnum<{
|
|
98
|
-
CREATIVE: "CREATIVE";
|
|
99
|
-
BRAND: "BRAND";
|
|
100
|
-
INVESTOR: "INVESTOR";
|
|
101
|
-
ADMIN: "ADMIN";
|
|
102
|
-
}>;
|
|
103
|
-
}, z.core.$strip>;
|
|
104
65
|
}, z.core.$strip>;
|
|
105
|
-
export declare const
|
|
66
|
+
export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
106
67
|
id: z.ZodCUID2;
|
|
107
68
|
userId: z.ZodCUID2;
|
|
108
69
|
brandName: z.ZodString;
|
|
109
70
|
bio: z.ZodOptional<z.ZodString>;
|
|
110
71
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
111
|
-
user: z.ZodObject<{
|
|
112
|
-
id: z.ZodCUID2;
|
|
113
|
-
username: z.ZodOptional<z.ZodString>;
|
|
114
|
-
email: z.ZodString;
|
|
115
|
-
name: z.ZodOptional<z.ZodString>;
|
|
116
|
-
image: z.ZodOptional<z.ZodString>;
|
|
117
|
-
role: z.ZodEnum<{
|
|
118
|
-
CREATIVE: "CREATIVE";
|
|
119
|
-
BRAND: "BRAND";
|
|
120
|
-
INVESTOR: "INVESTOR";
|
|
121
|
-
ADMIN: "ADMIN";
|
|
122
|
-
}>;
|
|
123
|
-
}, z.core.$strip>;
|
|
124
72
|
disciplines: z.ZodArray<z.ZodString>;
|
|
125
73
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
126
74
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateBrandOutputSchema = exports.GetBrandQuerySchema = exports.GetBrandParamsSchema = exports.UpdateBrandProfileInputSchema = exports.CreateBrandProfileInputSchema = exports.ListBrandsInputSchema = exports.BrandEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
|
-
const user_1 = require("./user");
|
|
7
6
|
const constants_1 = require("../constants");
|
|
8
7
|
exports.BrandEntitySchema = zod_openapi_1.z
|
|
9
8
|
.object({
|
|
@@ -18,7 +17,6 @@ exports.BrandEntitySchema = zod_openapi_1.z
|
|
|
18
17
|
.array(zod_openapi_1.z.string())
|
|
19
18
|
.optional()
|
|
20
19
|
.openapi({ example: ["technology", "saas", "startup"] }),
|
|
21
|
-
user: user_1.MinimalUserSchema,
|
|
22
20
|
disciplines: zod_openapi_1.z
|
|
23
21
|
.array(zod_openapi_1.z.string())
|
|
24
22
|
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
@@ -61,7 +59,7 @@ exports.ListBrandsInputSchema = zod_openapi_1.z
|
|
|
61
59
|
.openapi({ example: 20 }),
|
|
62
60
|
})
|
|
63
61
|
.openapi("ListBrandsInput");
|
|
64
|
-
exports.
|
|
62
|
+
exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
65
63
|
.object({
|
|
66
64
|
brandName: zod_openapi_1.z
|
|
67
65
|
.string()
|
|
@@ -84,7 +82,7 @@ exports.CreateBrandProfileSchema = zod_openapi_1.z
|
|
|
84
82
|
.openapi({
|
|
85
83
|
title: "create brand profile",
|
|
86
84
|
});
|
|
87
|
-
exports.
|
|
85
|
+
exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
|
|
88
86
|
.object({
|
|
89
87
|
brandName: zod_openapi_1.z.string().min(1).optional().openapi({ example: "Acme Studio" }),
|
|
90
88
|
bio: zod_openapi_1.z.string().max(210).optional().openapi({
|
|
@@ -102,8 +100,6 @@ exports.GetBrandParamsSchema = zod_openapi_1.z.object({
|
|
|
102
100
|
value: common_1.CuidSchema,
|
|
103
101
|
});
|
|
104
102
|
exports.GetBrandQuerySchema = common_1.ProfileIdentifierSchema;
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
exports.UpdateBrandEndpointResponseSchema = exports.BrandEntitySchema;
|
|
103
|
+
exports.CreateBrandOutputSchema = exports.BrandEntitySchema;
|
|
104
|
+
exports.GetBrandOutputSchema = exports.BrandEntitySchema;
|
|
105
|
+
exports.UpdateBrandOutputSchema = exports.BrandEntitySchema;
|
|
@@ -12,19 +12,6 @@ export declare const CreativeEntitySchema: z.ZodObject<{
|
|
|
12
12
|
}>>;
|
|
13
13
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
14
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
-
user: z.ZodObject<{
|
|
16
|
-
id: z.ZodCUID2;
|
|
17
|
-
username: z.ZodOptional<z.ZodString>;
|
|
18
|
-
email: z.ZodString;
|
|
19
|
-
name: z.ZodOptional<z.ZodString>;
|
|
20
|
-
image: z.ZodOptional<z.ZodString>;
|
|
21
|
-
role: z.ZodEnum<{
|
|
22
|
-
CREATIVE: "CREATIVE";
|
|
23
|
-
BRAND: "BRAND";
|
|
24
|
-
INVESTOR: "INVESTOR";
|
|
25
|
-
ADMIN: "ADMIN";
|
|
26
|
-
}>;
|
|
27
|
-
}, z.core.$strip>;
|
|
28
15
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
29
16
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
30
17
|
}, z.core.$strip>;
|
|
@@ -42,7 +29,7 @@ export declare const ListCreativesInputSchema: z.ZodObject<{
|
|
|
42
29
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
43
30
|
perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
44
31
|
}, z.core.$strip>;
|
|
45
|
-
export declare const
|
|
32
|
+
export declare const CreateCreativeProfileInputSchema: z.ZodObject<{
|
|
46
33
|
experienceLevel: z.ZodDefault<z.ZodEnum<{
|
|
47
34
|
readonly YEAR_0_1: "0-1 year";
|
|
48
35
|
readonly YEAR_1_3: "1-3 years";
|
|
@@ -53,7 +40,7 @@ export declare const CreateCreativeProfileSchema: z.ZodObject<{
|
|
|
53
40
|
location: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
54
41
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
55
42
|
}, z.core.$strip>;
|
|
56
|
-
export declare const
|
|
43
|
+
export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
|
|
57
44
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
58
45
|
readonly YEAR_0_1: "0-1 year";
|
|
59
46
|
readonly YEAR_1_3: "1-3 years";
|
|
@@ -74,7 +61,7 @@ export declare const GetCreativeQuerySchema: z.ZodObject<{
|
|
|
74
61
|
userId: "userId";
|
|
75
62
|
}>>>;
|
|
76
63
|
}, z.core.$strip>;
|
|
77
|
-
export declare const
|
|
64
|
+
export declare const CreateCreativeOutputSchema: z.ZodObject<{
|
|
78
65
|
id: z.ZodCUID2;
|
|
79
66
|
userId: z.ZodCUID2;
|
|
80
67
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -87,23 +74,10 @@ export declare const CreateCreativeEndpointResponseSchema: z.ZodObject<{
|
|
|
87
74
|
}>>;
|
|
88
75
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
76
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
-
user: z.ZodObject<{
|
|
91
|
-
id: z.ZodCUID2;
|
|
92
|
-
username: z.ZodOptional<z.ZodString>;
|
|
93
|
-
email: z.ZodString;
|
|
94
|
-
name: z.ZodOptional<z.ZodString>;
|
|
95
|
-
image: z.ZodOptional<z.ZodString>;
|
|
96
|
-
role: z.ZodEnum<{
|
|
97
|
-
CREATIVE: "CREATIVE";
|
|
98
|
-
BRAND: "BRAND";
|
|
99
|
-
INVESTOR: "INVESTOR";
|
|
100
|
-
ADMIN: "ADMIN";
|
|
101
|
-
}>;
|
|
102
|
-
}, z.core.$strip>;
|
|
103
77
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
104
78
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
105
79
|
}, z.core.$strip>;
|
|
106
|
-
export declare const
|
|
80
|
+
export declare const GetCreativeOutputSchema: z.ZodObject<{
|
|
107
81
|
id: z.ZodCUID2;
|
|
108
82
|
userId: z.ZodCUID2;
|
|
109
83
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -118,21 +92,8 @@ export declare const GetCreativeEndpointResponseSchema: z.ZodObject<{
|
|
|
118
92
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
93
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
120
94
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
121
|
-
user: z.ZodObject<{
|
|
122
|
-
id: z.ZodCUID2;
|
|
123
|
-
username: z.ZodOptional<z.ZodString>;
|
|
124
|
-
email: z.ZodString;
|
|
125
|
-
name: z.ZodOptional<z.ZodString>;
|
|
126
|
-
image: z.ZodOptional<z.ZodString>;
|
|
127
|
-
role: z.ZodEnum<{
|
|
128
|
-
CREATIVE: "CREATIVE";
|
|
129
|
-
BRAND: "BRAND";
|
|
130
|
-
INVESTOR: "INVESTOR";
|
|
131
|
-
ADMIN: "ADMIN";
|
|
132
|
-
}>;
|
|
133
|
-
}, z.core.$strip>;
|
|
134
95
|
}, z.core.$strip>;
|
|
135
|
-
export declare const
|
|
96
|
+
export declare const UpdateCreativeOutputSchema: z.ZodObject<{
|
|
136
97
|
id: z.ZodCUID2;
|
|
137
98
|
userId: z.ZodCUID2;
|
|
138
99
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -145,19 +106,6 @@ export declare const UpdateCreativeEndpointResponseSchema: z.ZodObject<{
|
|
|
145
106
|
}>>;
|
|
146
107
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
108
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
-
user: z.ZodObject<{
|
|
149
|
-
id: z.ZodCUID2;
|
|
150
|
-
username: z.ZodOptional<z.ZodString>;
|
|
151
|
-
email: z.ZodString;
|
|
152
|
-
name: z.ZodOptional<z.ZodString>;
|
|
153
|
-
image: z.ZodOptional<z.ZodString>;
|
|
154
|
-
role: z.ZodEnum<{
|
|
155
|
-
CREATIVE: "CREATIVE";
|
|
156
|
-
BRAND: "BRAND";
|
|
157
|
-
INVESTOR: "INVESTOR";
|
|
158
|
-
ADMIN: "ADMIN";
|
|
159
|
-
}>;
|
|
160
|
-
}, z.core.$strip>;
|
|
161
109
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
162
110
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
163
111
|
}, z.core.$strip>;
|
package/dist/schemas/creative.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UpdateCreativeOutputSchema = exports.GetCreativeOutputSchema = exports.CreateCreativeOutputSchema = exports.GetCreativeQuerySchema = exports.GetCreativeParamsSchema = exports.UpdateCreativeProfileInputSchema = exports.CreateCreativeProfileInputSchema = exports.ListCreativesInputSchema = exports.CreativeEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
|
-
const user_1 = require("./user");
|
|
8
7
|
exports.CreativeEntitySchema = zod_openapi_1.z
|
|
9
8
|
.object({
|
|
10
9
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -16,7 +15,7 @@ exports.CreativeEntitySchema = zod_openapi_1.z
|
|
|
16
15
|
experienceLevel: zod_openapi_1.z
|
|
17
16
|
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
18
17
|
.optional()
|
|
19
|
-
.openapi({ example: "
|
|
18
|
+
.openapi({ example: "YEAR_0_1" }),
|
|
20
19
|
tags: zod_openapi_1.z
|
|
21
20
|
.array(zod_openapi_1.z.string())
|
|
22
21
|
.optional()
|
|
@@ -25,7 +24,6 @@ exports.CreativeEntitySchema = zod_openapi_1.z
|
|
|
25
24
|
.array(zod_openapi_1.z.string())
|
|
26
25
|
.optional()
|
|
27
26
|
.openapi({ example: ["Design", "Art Direction"] }),
|
|
28
|
-
user: user_1.MinimalUserSchema,
|
|
29
27
|
createdAt: zod_openapi_1.z.coerce
|
|
30
28
|
.date()
|
|
31
29
|
.optional()
|
|
@@ -60,7 +58,7 @@ exports.ListCreativesInputSchema = zod_openapi_1.z
|
|
|
60
58
|
.openapi({ example: 20 }),
|
|
61
59
|
})
|
|
62
60
|
.openapi("ListCreativesInput");
|
|
63
|
-
exports.
|
|
61
|
+
exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
|
|
64
62
|
.object({
|
|
65
63
|
experienceLevel: zod_openapi_1.z
|
|
66
64
|
.enum(constants_1.EXPERIENCE_LEVELS)
|
|
@@ -87,7 +85,7 @@ exports.CreateCreativeProfileSchema = zod_openapi_1.z
|
|
|
87
85
|
.openapi({
|
|
88
86
|
title: "create creative profile",
|
|
89
87
|
});
|
|
90
|
-
exports.
|
|
88
|
+
exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
91
89
|
.object({
|
|
92
90
|
experienceLevel: zod_openapi_1.z
|
|
93
91
|
.enum(constants_1.EXPERIENCE_LEVELS)
|
|
@@ -120,8 +118,6 @@ exports.GetCreativeParamsSchema = zod_openapi_1.z.object({
|
|
|
120
118
|
value: common_1.CuidSchema,
|
|
121
119
|
});
|
|
122
120
|
exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
|
|
123
|
-
exports.
|
|
124
|
-
exports.
|
|
125
|
-
|
|
126
|
-
});
|
|
127
|
-
exports.UpdateCreativeEndpointResponseSchema = exports.CreativeEntitySchema;
|
|
121
|
+
exports.CreateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
122
|
+
exports.GetCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
123
|
+
exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const DisciplineEntitySchema: z.ZodObject<{
|
|
3
|
+
slug: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const DisciplineUpdateOutputEntitySchema: z.ZodObject<{
|
|
8
|
+
slug: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const CreateDisciplinesInputSchema: z.ZodObject<{
|
|
11
|
+
disciplines: z.ZodArray<z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const SlugSchema: z.ZodObject<{
|
|
17
|
+
slug: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const GetDisciplinesInputSchema: z.ZodObject<{
|
|
20
|
+
withTags: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>>;
|
|
21
|
+
getDefault: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>>;
|
|
22
|
+
slugs: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const CreateDisciplinesOutputSchema: z.ZodObject<{
|
|
25
|
+
disciplines: z.ZodArray<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const GetDisciplinesOutputSchema: z.ZodObject<{
|
|
28
|
+
disciplines: z.ZodArray<z.ZodObject<{
|
|
29
|
+
slug: z.ZodString;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetDisciplinesOutputSchema = exports.CreateDisciplinesOutputSchema = exports.GetDisciplinesInputSchema = exports.SlugSchema = exports.CreateDisciplinesInputSchema = exports.DisciplineUpdateOutputEntitySchema = exports.DisciplineEntitySchema = void 0;
|
|
4
|
+
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
+
exports.DisciplineEntitySchema = zod_openapi_1.z
|
|
6
|
+
.object({
|
|
7
|
+
slug: zod_openapi_1.z.string().openapi({ example: "digital-art" }),
|
|
8
|
+
name: zod_openapi_1.z.string().openapi({ example: "Digital Art" }),
|
|
9
|
+
tags: zod_openapi_1.z
|
|
10
|
+
.array(zod_openapi_1.z.string().openapi({ example: "illustration" }))
|
|
11
|
+
.optional()
|
|
12
|
+
.openapi({
|
|
13
|
+
example: ["illustration", "concept-art"],
|
|
14
|
+
}),
|
|
15
|
+
})
|
|
16
|
+
.openapi({ title: "DisciplineEntity" });
|
|
17
|
+
exports.DisciplineUpdateOutputEntitySchema = zod_openapi_1.z
|
|
18
|
+
.object({
|
|
19
|
+
slug: zod_openapi_1.z.string().openapi({ example: "digital-art" }),
|
|
20
|
+
})
|
|
21
|
+
.openapi({ title: "DisciplineUpdateOutputEntity" });
|
|
22
|
+
exports.CreateDisciplinesInputSchema = zod_openapi_1.z
|
|
23
|
+
.object({
|
|
24
|
+
disciplines: zod_openapi_1.z
|
|
25
|
+
.array(zod_openapi_1.z.object({
|
|
26
|
+
name: zod_openapi_1.z.string().max(128).openapi({
|
|
27
|
+
example: "Mathematics",
|
|
28
|
+
}),
|
|
29
|
+
tags: zod_openapi_1.z
|
|
30
|
+
.array(zod_openapi_1.z.string().openapi({
|
|
31
|
+
example: "algebra",
|
|
32
|
+
}))
|
|
33
|
+
.default([])
|
|
34
|
+
.openapi({
|
|
35
|
+
example: ["algebra", "geometry"],
|
|
36
|
+
}),
|
|
37
|
+
}))
|
|
38
|
+
.openapi({
|
|
39
|
+
description: "Array of disciplines to upsert.",
|
|
40
|
+
example: [
|
|
41
|
+
{
|
|
42
|
+
name: "Mathematics",
|
|
43
|
+
tags: ["algebra", "geometry"],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "Physics",
|
|
47
|
+
tags: ["mechanics", "optics"],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
})
|
|
52
|
+
.openapi({
|
|
53
|
+
description: "Schema for upserting multiple disciplines.",
|
|
54
|
+
});
|
|
55
|
+
exports.SlugSchema = zod_openapi_1.z.object({
|
|
56
|
+
slug: zod_openapi_1.z.string().max(128).openapi({
|
|
57
|
+
example: "mathematics",
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
exports.GetDisciplinesInputSchema = zod_openapi_1.z
|
|
61
|
+
.object({
|
|
62
|
+
withTags: zod_openapi_1.z
|
|
63
|
+
.union([zod_openapi_1.z.literal("true"), zod_openapi_1.z.literal("false")])
|
|
64
|
+
.optional()
|
|
65
|
+
.default("false")
|
|
66
|
+
.openapi({
|
|
67
|
+
description: "Whether to include tags in the response.",
|
|
68
|
+
example: "true",
|
|
69
|
+
}),
|
|
70
|
+
getDefault: zod_openapi_1.z
|
|
71
|
+
.union([zod_openapi_1.z.literal("true"), zod_openapi_1.z.literal("false")])
|
|
72
|
+
.optional()
|
|
73
|
+
.default("false")
|
|
74
|
+
.openapi({
|
|
75
|
+
description: "Fetch the default list of disciplines (non user-added disciplines)",
|
|
76
|
+
}),
|
|
77
|
+
slugs: zod_openapi_1.z.string().optional().openapi({
|
|
78
|
+
description: "Comma-separated list of discipline slugs to filter by.",
|
|
79
|
+
example: "mathematics,physics",
|
|
80
|
+
}),
|
|
81
|
+
})
|
|
82
|
+
.openapi({
|
|
83
|
+
description: "Query parameters for fetching multiple disciplines.",
|
|
84
|
+
});
|
|
85
|
+
exports.CreateDisciplinesOutputSchema = zod_openapi_1.z.object({
|
|
86
|
+
disciplines: zod_openapi_1.z.array(zod_openapi_1.z.string()),
|
|
87
|
+
});
|
|
88
|
+
exports.GetDisciplinesOutputSchema = zod_openapi_1.z.object({
|
|
89
|
+
disciplines: zod_openapi_1.z.array(exports.DisciplineEntitySchema),
|
|
90
|
+
});
|
|
@@ -46,22 +46,9 @@ export declare const InvestorEntitySchema: z.ZodObject<{
|
|
|
46
46
|
websiteURL: z.ZodOptional<z.ZodURL>;
|
|
47
47
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
48
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
-
user: z.ZodObject<{
|
|
50
|
-
id: z.ZodCUID2;
|
|
51
|
-
username: z.ZodOptional<z.ZodString>;
|
|
52
|
-
email: z.ZodString;
|
|
53
|
-
name: z.ZodOptional<z.ZodString>;
|
|
54
|
-
image: z.ZodOptional<z.ZodString>;
|
|
55
|
-
role: z.ZodEnum<{
|
|
56
|
-
CREATIVE: "CREATIVE";
|
|
57
|
-
BRAND: "BRAND";
|
|
58
|
-
INVESTOR: "INVESTOR";
|
|
59
|
-
ADMIN: "ADMIN";
|
|
60
|
-
}>;
|
|
61
|
-
}, z.core.$strip>;
|
|
62
49
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
63
50
|
}, z.core.$strip>;
|
|
64
|
-
export declare const
|
|
51
|
+
export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
|
|
65
52
|
bio: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
66
53
|
websiteURL: z.ZodOptional<z.ZodString>;
|
|
67
54
|
experienceLevel: z.ZodDefault<z.ZodEnum<{
|
|
@@ -72,7 +59,7 @@ export declare const CreateInvestorProfileSchema: z.ZodObject<{
|
|
|
72
59
|
}>>;
|
|
73
60
|
location: z.ZodString;
|
|
74
61
|
}, z.core.$strip>;
|
|
75
|
-
export declare const
|
|
62
|
+
export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
|
|
76
63
|
bio: z.ZodOptional<z.ZodString>;
|
|
77
64
|
websiteURL: z.ZodOptional<z.ZodString>;
|
|
78
65
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
@@ -140,7 +127,7 @@ export declare const GetInvestorQuerySchema: z.ZodObject<{
|
|
|
140
127
|
userId: "userId";
|
|
141
128
|
}>>>;
|
|
142
129
|
}, z.core.$strip>;
|
|
143
|
-
export declare const
|
|
130
|
+
export declare const CreateInvestorOutputSchema: z.ZodObject<{
|
|
144
131
|
id: z.ZodCUID2;
|
|
145
132
|
userId: z.ZodCUID2;
|
|
146
133
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -187,22 +174,9 @@ export declare const CreateInvestorEndpointResponseSchema: z.ZodObject<{
|
|
|
187
174
|
websiteURL: z.ZodOptional<z.ZodURL>;
|
|
188
175
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
176
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
190
|
-
user: z.ZodObject<{
|
|
191
|
-
id: z.ZodCUID2;
|
|
192
|
-
username: z.ZodOptional<z.ZodString>;
|
|
193
|
-
email: z.ZodString;
|
|
194
|
-
name: z.ZodOptional<z.ZodString>;
|
|
195
|
-
image: z.ZodOptional<z.ZodString>;
|
|
196
|
-
role: z.ZodEnum<{
|
|
197
|
-
CREATIVE: "CREATIVE";
|
|
198
|
-
BRAND: "BRAND";
|
|
199
|
-
INVESTOR: "INVESTOR";
|
|
200
|
-
ADMIN: "ADMIN";
|
|
201
|
-
}>;
|
|
202
|
-
}, z.core.$strip>;
|
|
203
177
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
204
178
|
}, z.core.$strip>;
|
|
205
|
-
export declare const
|
|
179
|
+
export declare const GetInvestorOutputSchema: z.ZodObject<{
|
|
206
180
|
id: z.ZodCUID2;
|
|
207
181
|
userId: z.ZodCUID2;
|
|
208
182
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -250,21 +224,8 @@ export declare const GetInvestorEndpointResponseSchema: z.ZodObject<{
|
|
|
250
224
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
225
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
252
226
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
253
|
-
user: z.ZodObject<{
|
|
254
|
-
id: z.ZodCUID2;
|
|
255
|
-
username: z.ZodOptional<z.ZodString>;
|
|
256
|
-
email: z.ZodString;
|
|
257
|
-
name: z.ZodOptional<z.ZodString>;
|
|
258
|
-
image: z.ZodOptional<z.ZodString>;
|
|
259
|
-
role: z.ZodEnum<{
|
|
260
|
-
CREATIVE: "CREATIVE";
|
|
261
|
-
BRAND: "BRAND";
|
|
262
|
-
INVESTOR: "INVESTOR";
|
|
263
|
-
ADMIN: "ADMIN";
|
|
264
|
-
}>;
|
|
265
|
-
}, z.core.$strip>;
|
|
266
227
|
}, z.core.$strip>;
|
|
267
|
-
export declare const
|
|
228
|
+
export declare const UpdateInvestorOutputSchema: z.ZodObject<{
|
|
268
229
|
id: z.ZodCUID2;
|
|
269
230
|
userId: z.ZodCUID2;
|
|
270
231
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -311,18 +272,5 @@ export declare const UpdateInvestorEndpointResponseSchema: z.ZodObject<{
|
|
|
311
272
|
websiteURL: z.ZodOptional<z.ZodURL>;
|
|
312
273
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
313
274
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
314
|
-
user: z.ZodObject<{
|
|
315
|
-
id: z.ZodCUID2;
|
|
316
|
-
username: z.ZodOptional<z.ZodString>;
|
|
317
|
-
email: z.ZodString;
|
|
318
|
-
name: z.ZodOptional<z.ZodString>;
|
|
319
|
-
image: z.ZodOptional<z.ZodString>;
|
|
320
|
-
role: z.ZodEnum<{
|
|
321
|
-
CREATIVE: "CREATIVE";
|
|
322
|
-
BRAND: "BRAND";
|
|
323
|
-
INVESTOR: "INVESTOR";
|
|
324
|
-
ADMIN: "ADMIN";
|
|
325
|
-
}>;
|
|
326
|
-
}, z.core.$strip>;
|
|
327
275
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
328
276
|
}, z.core.$strip>;
|