@zyacreatives/shared 2.0.62 → 2.0.63
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 +9 -0
- package/dist/constants.js +9 -1
- package/dist/schemas/brand.d.ts +158 -5
- package/dist/schemas/brand.js +53 -8
- package/dist/schemas/creative.d.ts +211 -9
- package/dist/schemas/creative.js +56 -10
- package/dist/schemas/user.d.ts +116 -26
- package/dist/types/brand.d.ts +2 -1
- package/dist/types/creative.d.ts +2 -1
- package/package.json +1 -1
- package/src/constants.ts +11 -0
- package/src/schemas/brand.ts +60 -9
- package/src/schemas/creative.ts +65 -18
- package/src/types/brand.ts +3 -0
- package/src/types/creative.ts +2 -0
package/dist/constants.d.ts
CHANGED
|
@@ -195,6 +195,14 @@ export declare const ACTIVITY_TYPES: {
|
|
|
195
195
|
readonly UNBOOKMARK: "UNBOOKMARK";
|
|
196
196
|
readonly VIEW: "VIEW";
|
|
197
197
|
};
|
|
198
|
+
export declare const LINK_TYPES: {
|
|
199
|
+
readonly INSTAGRAM: "Instagram";
|
|
200
|
+
readonly LINKEDIN: "LinkedIn";
|
|
201
|
+
readonly TWITTER: "Twitter";
|
|
202
|
+
readonly YOUTUBE: "Youtube";
|
|
203
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
204
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
205
|
+
};
|
|
198
206
|
export type ActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
199
207
|
export type PostBadgeType = (typeof POST_BADGE_TYPES)[keyof typeof POST_BADGE_TYPES];
|
|
200
208
|
export type JobSections = (typeof JOB_SECTIONS)[keyof typeof JOB_SECTIONS];
|
|
@@ -209,6 +217,7 @@ export type JobAvailabilityTypes = (typeof JOB_AVAILABILITY_TYPES)[keyof typeof
|
|
|
209
217
|
export type WageTypes = (typeof WAGE_TYPES)[keyof typeof WAGE_TYPES];
|
|
210
218
|
export type PostType = (typeof POST_TYPES)[keyof typeof POST_TYPES];
|
|
211
219
|
export type MessageType = (typeof MESSAGE_TYPES)[keyof typeof MESSAGE_TYPES];
|
|
220
|
+
export type LinkType = (typeof LINK_TYPES)[keyof typeof LINK_TYPES];
|
|
212
221
|
export type ActivityParentType = (typeof ACTIVITY_PARENT_TYPES)[keyof typeof ACTIVITY_PARENT_TYPES];
|
|
213
222
|
export type UserStatus = (typeof USER_STATUSES)[keyof typeof USER_STATUSES];
|
|
214
223
|
export type ClientType = (typeof CLIENT_TYPES)[keyof typeof CLIENT_TYPES];
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = 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.API_ROUTES = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = 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",
|
|
@@ -197,6 +197,14 @@ exports.ACTIVITY_TYPES = {
|
|
|
197
197
|
UNBOOKMARK: "UNBOOKMARK",
|
|
198
198
|
VIEW: "VIEW",
|
|
199
199
|
};
|
|
200
|
+
exports.LINK_TYPES = {
|
|
201
|
+
INSTAGRAM: "Instagram",
|
|
202
|
+
LINKEDIN: "LinkedIn",
|
|
203
|
+
TWITTER: "Twitter",
|
|
204
|
+
YOUTUBE: "Youtube",
|
|
205
|
+
PORTFOLIO: "Portfolio Website",
|
|
206
|
+
GENERIC_WEBSITE: "Generic Website",
|
|
207
|
+
};
|
|
200
208
|
exports.API_ROUTES = {
|
|
201
209
|
healthCheck: "/health",
|
|
202
210
|
username: {
|
package/dist/schemas/brand.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const MinimalBrandEntitySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodCUID2;
|
|
4
|
+
userId: z.ZodCUID2;
|
|
5
|
+
brandName: z.ZodString;
|
|
6
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
7
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
2
10
|
export declare const BrandEntitySchema: z.ZodObject<{
|
|
3
11
|
id: z.ZodCUID2;
|
|
4
12
|
userId: z.ZodCUID2;
|
|
@@ -6,6 +14,24 @@ export declare const BrandEntitySchema: z.ZodObject<{
|
|
|
6
14
|
bio: z.ZodOptional<z.ZodString>;
|
|
7
15
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
16
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
url: z.ZodString;
|
|
20
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
21
|
+
readonly INSTAGRAM: "Instagram";
|
|
22
|
+
readonly LINKEDIN: "LinkedIn";
|
|
23
|
+
readonly TWITTER: "Twitter";
|
|
24
|
+
readonly YOUTUBE: "Youtube";
|
|
25
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
26
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
27
|
+
}>>;
|
|
28
|
+
}, z.core.$strip>>>;
|
|
29
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
title: z.ZodString;
|
|
31
|
+
description: z.ZodString;
|
|
32
|
+
link: z.ZodOptional<z.ZodString>;
|
|
33
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
9
35
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
10
36
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
11
37
|
}, z.core.$strip>;
|
|
@@ -25,12 +51,29 @@ export declare const ListBrandsInputSchema: z.ZodObject<{
|
|
|
25
51
|
}, z.core.$strip>;
|
|
26
52
|
export declare const CreateBrandProfileInputSchema: z.ZodObject<{
|
|
27
53
|
brandName: z.ZodString;
|
|
28
|
-
bio: z.ZodOptional<z.ZodString>;
|
|
29
54
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
55
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
31
56
|
}, z.core.$strip>;
|
|
32
57
|
export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
|
|
33
58
|
brandName: z.ZodOptional<z.ZodString>;
|
|
59
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
url: z.ZodString;
|
|
62
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
readonly INSTAGRAM: "Instagram";
|
|
64
|
+
readonly LINKEDIN: "LinkedIn";
|
|
65
|
+
readonly TWITTER: "Twitter";
|
|
66
|
+
readonly YOUTUBE: "Youtube";
|
|
67
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
68
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
69
|
+
}>>;
|
|
70
|
+
}, z.core.$strip>>>;
|
|
71
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
title: z.ZodString;
|
|
73
|
+
description: z.ZodString;
|
|
74
|
+
link: z.ZodOptional<z.ZodString>;
|
|
75
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
34
77
|
bio: z.ZodOptional<z.ZodString>;
|
|
35
78
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
79
|
disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -55,6 +98,24 @@ export declare const CreateBrandOutputSchema: z.ZodObject<{
|
|
|
55
98
|
bio: z.ZodOptional<z.ZodString>;
|
|
56
99
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
100
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
url: z.ZodString;
|
|
104
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
105
|
+
readonly INSTAGRAM: "Instagram";
|
|
106
|
+
readonly LINKEDIN: "LinkedIn";
|
|
107
|
+
readonly TWITTER: "Twitter";
|
|
108
|
+
readonly YOUTUBE: "Youtube";
|
|
109
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
110
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
111
|
+
}>>;
|
|
112
|
+
}, z.core.$strip>>>;
|
|
113
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
|
+
title: z.ZodString;
|
|
115
|
+
description: z.ZodString;
|
|
116
|
+
link: z.ZodOptional<z.ZodString>;
|
|
117
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>>>;
|
|
58
119
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
59
120
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
60
121
|
}, z.core.$strip>;
|
|
@@ -65,6 +126,24 @@ export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
|
65
126
|
bio: z.ZodOptional<z.ZodString>;
|
|
66
127
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
128
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
url: z.ZodString;
|
|
132
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
133
|
+
readonly INSTAGRAM: "Instagram";
|
|
134
|
+
readonly LINKEDIN: "LinkedIn";
|
|
135
|
+
readonly TWITTER: "Twitter";
|
|
136
|
+
readonly YOUTUBE: "Youtube";
|
|
137
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
138
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
139
|
+
}>>;
|
|
140
|
+
}, z.core.$strip>>>;
|
|
141
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
+
title: z.ZodString;
|
|
143
|
+
description: z.ZodString;
|
|
144
|
+
link: z.ZodOptional<z.ZodString>;
|
|
145
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
68
147
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
69
148
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
70
149
|
}, z.core.$strip>;
|
|
@@ -75,6 +154,24 @@ export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
|
75
154
|
bio: z.ZodOptional<z.ZodString>;
|
|
76
155
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
156
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
158
|
+
name: z.ZodString;
|
|
159
|
+
url: z.ZodString;
|
|
160
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
161
|
+
readonly INSTAGRAM: "Instagram";
|
|
162
|
+
readonly LINKEDIN: "LinkedIn";
|
|
163
|
+
readonly TWITTER: "Twitter";
|
|
164
|
+
readonly YOUTUBE: "Youtube";
|
|
165
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
166
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
167
|
+
}>>;
|
|
168
|
+
}, z.core.$strip>>>;
|
|
169
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
|
+
title: z.ZodString;
|
|
171
|
+
description: z.ZodString;
|
|
172
|
+
link: z.ZodOptional<z.ZodString>;
|
|
173
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
}, z.core.$strip>>>;
|
|
78
175
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
79
176
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
80
177
|
}, z.core.$strip>;
|
|
@@ -85,20 +182,38 @@ export declare const BrandWithUserEntitySchema: z.ZodObject<{
|
|
|
85
182
|
bio: z.ZodOptional<z.ZodString>;
|
|
86
183
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
184
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
185
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
186
|
+
name: z.ZodString;
|
|
187
|
+
url: z.ZodString;
|
|
188
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
189
|
+
readonly INSTAGRAM: "Instagram";
|
|
190
|
+
readonly LINKEDIN: "LinkedIn";
|
|
191
|
+
readonly TWITTER: "Twitter";
|
|
192
|
+
readonly YOUTUBE: "Youtube";
|
|
193
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
194
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
195
|
+
}>>;
|
|
196
|
+
}, z.core.$strip>>>;
|
|
197
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
198
|
+
title: z.ZodString;
|
|
199
|
+
description: z.ZodString;
|
|
200
|
+
link: z.ZodOptional<z.ZodString>;
|
|
201
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
}, z.core.$strip>>>;
|
|
88
203
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
89
204
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
90
205
|
user: z.ZodObject<{
|
|
91
206
|
id: z.ZodCUID2;
|
|
92
207
|
username: z.ZodOptional<z.ZodString>;
|
|
93
208
|
email: z.ZodString;
|
|
94
|
-
name: z.ZodOptional<z.ZodString>;
|
|
95
|
-
image: z.ZodOptional<z.ZodString>;
|
|
96
209
|
role: z.ZodEnum<{
|
|
97
210
|
CREATIVE: "CREATIVE";
|
|
98
211
|
BRAND: "BRAND";
|
|
99
212
|
INVESTOR: "INVESTOR";
|
|
100
213
|
ADMIN: "ADMIN";
|
|
101
214
|
}>;
|
|
215
|
+
name: z.ZodOptional<z.ZodString>;
|
|
216
|
+
image: z.ZodOptional<z.ZodString>;
|
|
102
217
|
}, z.core.$strip>;
|
|
103
218
|
}, z.core.$strip>;
|
|
104
219
|
export declare const SearchBrandInputSchema: z.ZodObject<{
|
|
@@ -114,21 +229,59 @@ export declare const SearchBrandOutputSchema: z.ZodObject<{
|
|
|
114
229
|
bio: z.ZodOptional<z.ZodString>;
|
|
115
230
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
116
231
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
232
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
233
|
+
name: z.ZodString;
|
|
234
|
+
url: z.ZodString;
|
|
235
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
236
|
+
readonly INSTAGRAM: "Instagram";
|
|
237
|
+
readonly LINKEDIN: "LinkedIn";
|
|
238
|
+
readonly TWITTER: "Twitter";
|
|
239
|
+
readonly YOUTUBE: "Youtube";
|
|
240
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
241
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
242
|
+
}>>;
|
|
243
|
+
}, z.core.$strip>>>;
|
|
244
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
245
|
+
title: z.ZodString;
|
|
246
|
+
description: z.ZodString;
|
|
247
|
+
link: z.ZodOptional<z.ZodString>;
|
|
248
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
}, z.core.$strip>>>;
|
|
117
250
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
118
251
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
119
252
|
user: z.ZodObject<{
|
|
120
253
|
id: z.ZodCUID2;
|
|
121
254
|
username: z.ZodOptional<z.ZodString>;
|
|
122
255
|
email: z.ZodString;
|
|
123
|
-
name: z.ZodOptional<z.ZodString>;
|
|
124
|
-
image: z.ZodOptional<z.ZodString>;
|
|
125
256
|
role: z.ZodEnum<{
|
|
126
257
|
CREATIVE: "CREATIVE";
|
|
127
258
|
BRAND: "BRAND";
|
|
128
259
|
INVESTOR: "INVESTOR";
|
|
129
260
|
ADMIN: "ADMIN";
|
|
130
261
|
}>;
|
|
262
|
+
name: z.ZodOptional<z.ZodString>;
|
|
263
|
+
image: z.ZodOptional<z.ZodString>;
|
|
131
264
|
}, z.core.$strip>;
|
|
132
265
|
}, z.core.$strip>>;
|
|
133
266
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
134
267
|
}, z.core.$strip>;
|
|
268
|
+
export declare const BrandAboutInputSchema: z.ZodObject<{
|
|
269
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
270
|
+
name: z.ZodString;
|
|
271
|
+
url: z.ZodString;
|
|
272
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
273
|
+
readonly INSTAGRAM: "Instagram";
|
|
274
|
+
readonly LINKEDIN: "LinkedIn";
|
|
275
|
+
readonly TWITTER: "Twitter";
|
|
276
|
+
readonly YOUTUBE: "Youtube";
|
|
277
|
+
readonly PORTFOLIO: "Portfolio Website";
|
|
278
|
+
readonly GENERIC_WEBSITE: "Generic Website";
|
|
279
|
+
}>>;
|
|
280
|
+
}, z.core.$strip>>>;
|
|
281
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
282
|
+
title: z.ZodString;
|
|
283
|
+
description: z.ZodString;
|
|
284
|
+
link: z.ZodOptional<z.ZodString>;
|
|
285
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
}, z.core.$strip>>>;
|
|
287
|
+
}, z.core.$strip>;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchBrandOutputSchema = exports.SearchBrandInputSchema = exports.BrandWithUserEntitySchema = exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateBrandOutputSchema = exports.GetBrandQuerySchema = exports.GetBrandInputSchema = exports.UpdateBrandProfileInputSchema = exports.CreateBrandProfileInputSchema = exports.ListBrandsInputSchema = exports.BrandEntitySchema = void 0;
|
|
3
|
+
exports.BrandAboutInputSchema = exports.SearchBrandOutputSchema = exports.SearchBrandInputSchema = exports.BrandWithUserEntitySchema = exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateBrandOutputSchema = exports.GetBrandQuerySchema = exports.GetBrandInputSchema = exports.UpdateBrandProfileInputSchema = exports.CreateBrandProfileInputSchema = exports.ListBrandsInputSchema = exports.BrandEntitySchema = exports.MinimalBrandEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const user_1 = require("./user");
|
|
8
|
+
exports.MinimalBrandEntitySchema = zod_openapi_1.z.object({
|
|
9
|
+
id: zod_openapi_1.z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
|
+
userId: zod_openapi_1.z.cuid2().openapi({ example: "user_owner_123" }),
|
|
11
|
+
brandName: zod_openapi_1.z.string().openapi({ example: "TechInnovate Inc." }),
|
|
12
|
+
bio: zod_openapi_1.z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.openapi({ example: "Leading software development firm focused on AI." }),
|
|
16
|
+
tags: zod_openapi_1.z
|
|
17
|
+
.array(zod_openapi_1.z.string())
|
|
18
|
+
.optional()
|
|
19
|
+
.openapi({ example: ["technology", "saas", "startup"] }),
|
|
20
|
+
disciplines: zod_openapi_1.z
|
|
21
|
+
.array(zod_openapi_1.z.string())
|
|
22
|
+
.optional()
|
|
23
|
+
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
24
|
+
});
|
|
8
25
|
exports.BrandEntitySchema = zod_openapi_1.z
|
|
9
26
|
.object({
|
|
10
27
|
id: zod_openapi_1.z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -22,6 +39,17 @@ exports.BrandEntitySchema = zod_openapi_1.z
|
|
|
22
39
|
.array(zod_openapi_1.z.string())
|
|
23
40
|
.optional()
|
|
24
41
|
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
42
|
+
links: zod_openapi_1.z.object({
|
|
43
|
+
name: zod_openapi_1.z.string(),
|
|
44
|
+
url: zod_openapi_1.z.string(),
|
|
45
|
+
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
|
|
46
|
+
}).array().optional(),
|
|
47
|
+
achievements: zod_openapi_1.z.object({
|
|
48
|
+
title: zod_openapi_1.z.string(),
|
|
49
|
+
description: zod_openapi_1.z.string(),
|
|
50
|
+
link: zod_openapi_1.z.string().optional(),
|
|
51
|
+
year: zod_openapi_1.z.number().int().optional(),
|
|
52
|
+
}).array().optional(),
|
|
25
53
|
createdAt: zod_openapi_1.z.coerce
|
|
26
54
|
.date()
|
|
27
55
|
.optional()
|
|
@@ -65,13 +93,6 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
65
93
|
.string()
|
|
66
94
|
.min(1, "Brand name is required")
|
|
67
95
|
.openapi({ example: "Acme Creative Studio" }),
|
|
68
|
-
bio: zod_openapi_1.z
|
|
69
|
-
.string()
|
|
70
|
-
.max(210)
|
|
71
|
-
.optional()
|
|
72
|
-
.openapi({
|
|
73
|
-
example: "We help brands tell their stories through design.",
|
|
74
|
-
}),
|
|
75
96
|
tags: zod_openapi_1.z
|
|
76
97
|
.array(zod_openapi_1.z.string())
|
|
77
98
|
.optional()
|
|
@@ -88,6 +109,17 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
88
109
|
exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
|
|
89
110
|
.object({
|
|
90
111
|
brandName: zod_openapi_1.z.string().min(1).optional().openapi({ example: "Acme Studio" }),
|
|
112
|
+
links: zod_openapi_1.z.object({
|
|
113
|
+
name: zod_openapi_1.z.string(),
|
|
114
|
+
url: zod_openapi_1.z.string(),
|
|
115
|
+
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
|
|
116
|
+
}).array().optional(),
|
|
117
|
+
achievements: zod_openapi_1.z.object({
|
|
118
|
+
title: zod_openapi_1.z.string(),
|
|
119
|
+
description: zod_openapi_1.z.string(),
|
|
120
|
+
link: zod_openapi_1.z.string().optional(),
|
|
121
|
+
year: zod_openapi_1.z.number().int().optional(),
|
|
122
|
+
}).array().optional(),
|
|
91
123
|
bio: zod_openapi_1.z
|
|
92
124
|
.string()
|
|
93
125
|
.max(210)
|
|
@@ -134,3 +166,16 @@ exports.SearchBrandOutputSchema = zod_openapi_1.z.object({
|
|
|
134
166
|
brands: zod_openapi_1.z.array(exports.BrandWithUserEntitySchema),
|
|
135
167
|
nextCursor: zod_openapi_1.z.string().optional(),
|
|
136
168
|
});
|
|
169
|
+
exports.BrandAboutInputSchema = zod_openapi_1.z.object({
|
|
170
|
+
links: zod_openapi_1.z.object({
|
|
171
|
+
name: zod_openapi_1.z.string(),
|
|
172
|
+
url: zod_openapi_1.z.string(),
|
|
173
|
+
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
|
|
174
|
+
}).array().optional(),
|
|
175
|
+
achievements: zod_openapi_1.z.object({
|
|
176
|
+
title: zod_openapi_1.z.string(),
|
|
177
|
+
description: zod_openapi_1.z.string(),
|
|
178
|
+
link: zod_openapi_1.z.string().optional(),
|
|
179
|
+
year: zod_openapi_1.z.number().int().optional(),
|
|
180
|
+
}).array().optional(),
|
|
181
|
+
});
|