@zyacreatives/shared 2.0.61 → 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 +208 -1
- package/dist/schemas/brand.js +74 -8
- package/dist/schemas/creative.d.ts +269 -1
- package/dist/schemas/creative.js +76 -9
- package/dist/schemas/project.d.ts +5 -5
- package/dist/schemas/user.d.ts +124 -34
- package/dist/types/brand.d.ts +5 -1
- package/dist/types/creative.d.ts +5 -1
- package/package.json +1 -1
- package/src/constants.ts +11 -0
- package/src/schemas/brand.ts +84 -9
- package/src/schemas/creative.ts +87 -16
- package/src/types/brand.ts +10 -0
- package/src/types/creative.ts +9 -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,134 @@ 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>>>;
|
|
175
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
176
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export declare const BrandWithUserEntitySchema: z.ZodObject<{
|
|
179
|
+
id: z.ZodCUID2;
|
|
180
|
+
userId: z.ZodCUID2;
|
|
181
|
+
brandName: z.ZodString;
|
|
182
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
183
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
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>>>;
|
|
78
203
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
79
204
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
205
|
+
user: z.ZodObject<{
|
|
206
|
+
id: z.ZodCUID2;
|
|
207
|
+
username: z.ZodOptional<z.ZodString>;
|
|
208
|
+
email: z.ZodString;
|
|
209
|
+
role: z.ZodEnum<{
|
|
210
|
+
CREATIVE: "CREATIVE";
|
|
211
|
+
BRAND: "BRAND";
|
|
212
|
+
INVESTOR: "INVESTOR";
|
|
213
|
+
ADMIN: "ADMIN";
|
|
214
|
+
}>;
|
|
215
|
+
name: z.ZodOptional<z.ZodString>;
|
|
216
|
+
image: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export declare const SearchBrandInputSchema: z.ZodObject<{
|
|
220
|
+
string: z.ZodString;
|
|
221
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
222
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
export declare const SearchBrandOutputSchema: z.ZodObject<{
|
|
225
|
+
brands: z.ZodArray<z.ZodObject<{
|
|
226
|
+
id: z.ZodCUID2;
|
|
227
|
+
userId: z.ZodCUID2;
|
|
228
|
+
brandName: z.ZodString;
|
|
229
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
230
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
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>>>;
|
|
250
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
251
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
252
|
+
user: z.ZodObject<{
|
|
253
|
+
id: z.ZodCUID2;
|
|
254
|
+
username: z.ZodOptional<z.ZodString>;
|
|
255
|
+
email: z.ZodString;
|
|
256
|
+
role: z.ZodEnum<{
|
|
257
|
+
CREATIVE: "CREATIVE";
|
|
258
|
+
BRAND: "BRAND";
|
|
259
|
+
INVESTOR: "INVESTOR";
|
|
260
|
+
ADMIN: "ADMIN";
|
|
261
|
+
}>;
|
|
262
|
+
name: z.ZodOptional<z.ZodString>;
|
|
263
|
+
image: z.ZodOptional<z.ZodString>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
}, z.core.$strip>>;
|
|
266
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
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>>>;
|
|
80
287
|
}, z.core.$strip>;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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
|
+
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
|
+
});
|
|
7
25
|
exports.BrandEntitySchema = zod_openapi_1.z
|
|
8
26
|
.object({
|
|
9
27
|
id: zod_openapi_1.z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -21,6 +39,17 @@ exports.BrandEntitySchema = zod_openapi_1.z
|
|
|
21
39
|
.array(zod_openapi_1.z.string())
|
|
22
40
|
.optional()
|
|
23
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(),
|
|
24
53
|
createdAt: zod_openapi_1.z.coerce
|
|
25
54
|
.date()
|
|
26
55
|
.optional()
|
|
@@ -64,13 +93,6 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
64
93
|
.string()
|
|
65
94
|
.min(1, "Brand name is required")
|
|
66
95
|
.openapi({ example: "Acme Creative Studio" }),
|
|
67
|
-
bio: zod_openapi_1.z
|
|
68
|
-
.string()
|
|
69
|
-
.max(210)
|
|
70
|
-
.optional()
|
|
71
|
-
.openapi({
|
|
72
|
-
example: "We help brands tell their stories through design.",
|
|
73
|
-
}),
|
|
74
96
|
tags: zod_openapi_1.z
|
|
75
97
|
.array(zod_openapi_1.z.string())
|
|
76
98
|
.optional()
|
|
@@ -87,6 +109,17 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
87
109
|
exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
|
|
88
110
|
.object({
|
|
89
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(),
|
|
90
123
|
bio: zod_openapi_1.z
|
|
91
124
|
.string()
|
|
92
125
|
.max(210)
|
|
@@ -113,3 +146,36 @@ exports.GetBrandQuerySchema = common_1.ProfileIdentifierSchema;
|
|
|
113
146
|
exports.CreateBrandOutputSchema = exports.BrandEntitySchema;
|
|
114
147
|
exports.GetBrandOutputSchema = exports.BrandEntitySchema;
|
|
115
148
|
exports.UpdateBrandOutputSchema = exports.BrandEntitySchema;
|
|
149
|
+
exports.BrandWithUserEntitySchema = exports.BrandEntitySchema.extend({
|
|
150
|
+
user: user_1.MinimalUserSchema,
|
|
151
|
+
});
|
|
152
|
+
exports.SearchBrandInputSchema = zod_openapi_1.z.object({
|
|
153
|
+
string: zod_openapi_1.z
|
|
154
|
+
.string()
|
|
155
|
+
.min(1, { message: "Search string cannot be empty" })
|
|
156
|
+
.max(200, { message: "Search string cannot exceed 200 characters" }),
|
|
157
|
+
limit: zod_openapi_1.z.coerce
|
|
158
|
+
.number()
|
|
159
|
+
.int({ message: "Limit must be an integer" })
|
|
160
|
+
.min(1, { message: "Limit must be at least 1" })
|
|
161
|
+
.max(100, { message: "Limit cannot exceed 100" })
|
|
162
|
+
.default(20),
|
|
163
|
+
cursor: zod_openapi_1.z.string().optional(),
|
|
164
|
+
});
|
|
165
|
+
exports.SearchBrandOutputSchema = zod_openapi_1.z.object({
|
|
166
|
+
brands: zod_openapi_1.z.array(exports.BrandWithUserEntitySchema),
|
|
167
|
+
nextCursor: zod_openapi_1.z.string().optional(),
|
|
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
|
+
});
|