@zyacreatives/shared 2.1.41 → 2.1.42

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.
@@ -4,174 +4,165 @@ import { EXPERIENCE_LEVELS, ExperienceLevel, LINK_TYPES } from "../constants";
4
4
  import { MinimalUserSchema } from "./user";
5
5
 
6
6
  export const MinimalBrandEntitySchema = z.object({
7
- id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
8
- userId: z.cuid2().openapi({ example: "user_owner_123" }),
9
- brandName: z.string().openapi({ example: "TechInnovate Inc." }),
10
- bio: z
11
- .string()
12
- .optional()
13
- .openapi({ example: "Leading software development firm focused on AI." }),
14
- tags: z
15
- .array(z.string())
16
- .optional()
17
- .openapi({ example: ["technology", "saas", "startup"] }),
18
- disciplines: z
19
- .array(z.string())
20
- .optional()
21
- .openapi({ example: ["Marketing", "Product Development"] }),
22
- createdAt: z.coerce
23
- .date()
24
- .optional()
25
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
26
- updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
27
- });
28
-
29
- export const BrandEntitySchema = z
30
- .object({
31
7
  id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
32
8
  userId: z.cuid2().openapi({ example: "user_owner_123" }),
33
9
  brandName: z.string().openapi({ example: "TechInnovate Inc." }),
34
- bio: z
35
- .string()
36
- .optional()
37
- .openapi({ example: "Leading software development firm focused on AI." }),
38
- tags: z
39
- .array(z.string())
40
- .optional()
41
- .openapi({ example: ["technology", "saas", "startup"] }),
42
- disciplines: z
43
- .array(z.string())
44
- .optional()
45
- .openapi({ example: ["Marketing", "Product Development"] }),
10
+ bio: z.string().optional().openapi({
11
+ example: "Leading software development firm focused on AI.",
12
+ }),
46
13
 
47
- links: z
48
- .object({
49
- name: z.string(),
50
- url: z.url(),
51
- type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
52
- })
53
- .array()
54
- .optional(),
55
- achievements: z
56
- .object({
57
- title: z.string(),
58
- link: z.url().optional(),
59
- year: z.number().int().optional(),
60
- })
61
- .array()
62
- .optional(),
14
+ disciplines: z
15
+ .array(z.string())
16
+ .optional()
17
+ .openapi({ example: ["Marketing", "Product Development"] }),
63
18
  createdAt: z.coerce
64
- .date()
65
- .optional()
66
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
19
+ .date()
20
+ .optional()
21
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
67
22
  updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
68
- })
69
- .openapi("BrandEntitySchema");
23
+ });
24
+
25
+ export const BrandEntitySchema = z
26
+ .object({
27
+ id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
28
+ userId: z.cuid2().openapi({ example: "user_owner_123" }),
29
+ brandName: z.string().openapi({ example: "TechInnovate Inc." }),
30
+ bio: z.string().optional().openapi({
31
+ example: "Leading software development firm focused on AI.",
32
+ }),
33
+ disciplines: z
34
+ .array(z.string())
35
+ .optional()
36
+ .openapi({ example: ["Marketing", "Product Development"] }),
37
+
38
+ links: z
39
+ .object({
40
+ name: z.string(),
41
+ url: z.url(),
42
+ type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
43
+ })
44
+ .array()
45
+ .optional(),
46
+ achievements: z
47
+ .object({
48
+ title: z.string(),
49
+ link: z.url().optional(),
50
+ year: z.number().int().optional(),
51
+ })
52
+ .array()
53
+ .optional(),
54
+ createdAt: z.coerce
55
+ .date()
56
+ .optional()
57
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
58
+ updatedAt: z.coerce
59
+ .date()
60
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
61
+ })
62
+ .openapi("BrandEntitySchema");
70
63
 
71
64
  export const ListBrandsInputSchema = z
72
- .object({
73
- query: z.string().optional().openapi({ example: "AI software brand" }),
74
- disciplines: z
75
- .array(z.string())
76
- .optional()
77
- .openapi({ example: ["design", "marketing"] }),
78
- experienceLevels: z
79
- .array(
80
- z.enum(
81
- Object.values(EXPERIENCE_LEVELS) as [
82
- ExperienceLevel,
83
- ...ExperienceLevel[]
84
- ]
85
- )
86
- )
87
- .optional()
88
- .openapi({
89
- example: ["SENIOR", "EXPERT"],
90
- description:
91
- "Filter based on the required experience level of partners.",
92
- }),
93
- location: z.string().optional().openapi({ example: "San Francisco" }),
94
- tags: z
95
- .array(z.string())
96
- .optional()
97
- .openapi({ example: ["fintech", "remote"] }),
98
- page: z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
99
- perPage: z
100
- .number()
101
- .int()
102
- .min(1)
103
- .max(100)
104
- .default(20)
105
- .optional()
106
- .openapi({ example: 20 }),
107
- })
108
- .openapi("ListBrandsInput");
65
+ .object({
66
+ query: z.string().optional().openapi({ example: "AI software brand" }),
67
+ disciplines: z
68
+ .array(z.string())
69
+ .optional()
70
+ .openapi({ example: ["design", "marketing"] }),
71
+ experienceLevels: z
72
+ .array(
73
+ z.enum(
74
+ Object.values(EXPERIENCE_LEVELS) as [
75
+ ExperienceLevel,
76
+ ...ExperienceLevel[],
77
+ ],
78
+ ),
79
+ )
80
+ .optional()
81
+ .openapi({
82
+ example: ["SENIOR", "EXPERT"],
83
+ description:
84
+ "Filter based on the required experience level of partners.",
85
+ }),
86
+ location: z.string().optional().openapi({ example: "San Francisco" }),
87
+ page: z
88
+ .number()
89
+ .int()
90
+ .min(1)
91
+ .default(1)
92
+ .optional()
93
+ .openapi({ example: 1 }),
94
+ perPage: z
95
+ .number()
96
+ .int()
97
+ .min(1)
98
+ .max(100)
99
+ .default(20)
100
+ .optional()
101
+ .openapi({ example: 20 }),
102
+ })
103
+ .openapi("ListBrandsInput");
109
104
 
110
105
  export const CreateBrandProfileInputSchema = z
111
- .object({
112
- brandName: z
113
- .string()
114
- .min(1, "Brand name is required")
115
- .openapi({ example: "Acme Creative Studio" }),
116
- tags: z
117
- .array(z.string())
118
- .optional()
119
- .openapi({ example: ["branding", "ux", "campaigns"] }),
120
- disciplineSlugs: z
121
- .array(z.string())
122
- .min(1, "At least one discipline is required")
123
- .default([])
124
- .openapi({ example: ["ui-ux", "frontend"] }),
125
- })
126
- .openapi({
127
- title: "create brand profile",
128
- });
106
+ .object({
107
+ brandName: z
108
+ .string()
109
+ .min(1, "Brand name is required")
110
+ .openapi({ example: "Acme Creative Studio" }),
111
+ disciplineSlugs: z
112
+ .array(z.string())
113
+ .min(1, "At least one discipline is required")
114
+ .default([])
115
+ .openapi({ example: ["ui-ux", "frontend"] }),
116
+ })
117
+ .openapi({
118
+ title: "create brand profile",
119
+ });
129
120
 
130
121
  export const UpdateBrandProfileInputSchema = z
131
- .object({
132
- brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
133
- links: z
134
- .object({
135
- url: z
136
- .union([
137
- z.url({ message: "Please enter a valid URL" }),
138
- z.literal(""),
139
- ])
140
- .optional(),
141
- type: z.enum(LINK_TYPES).optional(),
142
- })
143
- .array()
144
- .optional(),
145
- achievements: z
146
- .object({
147
- title: z.string(),
148
- link: z.url().optional(),
149
- year: z.number().int().optional(),
150
- })
151
- .array()
152
- .optional(),
153
- bio: z
154
- .string()
155
- .max(600)
156
- .optional()
157
- .openapi({ example: "Updated bio for our creative agency." }),
158
- tags: z
159
- .array(z.string())
160
- .optional()
161
- .openapi({ example: ["branding", "product", "illustration"] }),
162
- disciplineSlugs: z
163
- .array(z.string())
164
- .min(1, "At least one discipline is required")
165
- .optional()
166
- .openapi({ example: ["frontend", "ui-ux"] }),
167
- })
168
- .openapi({
169
- title: "update brand profile",
170
- });
122
+ .object({
123
+ brandName: z
124
+ .string()
125
+ .min(1)
126
+ .optional()
127
+ .openapi({ example: "Acme Studio" }),
128
+ links: z
129
+ .object({
130
+ url: z
131
+ .union([
132
+ z.url({ message: "Please enter a valid URL" }),
133
+ z.literal(""),
134
+ ])
135
+ .optional(),
136
+ type: z.enum(LINK_TYPES).optional(),
137
+ })
138
+ .array()
139
+ .optional(),
140
+ achievements: z
141
+ .object({
142
+ title: z.string(),
143
+ link: z.url().optional(),
144
+ year: z.number().int().optional(),
145
+ })
146
+ .array()
147
+ .optional(),
148
+ bio: z
149
+ .string()
150
+ .max(600)
151
+ .optional()
152
+ .openapi({ example: "Updated bio for our creative agency." }),
153
+ disciplineSlugs: z
154
+ .array(z.string())
155
+ .min(1, "At least one discipline is required")
156
+ .optional()
157
+ .openapi({ example: ["frontend", "ui-ux"] }),
158
+ })
159
+ .openapi({
160
+ title: "update brand profile",
161
+ });
171
162
 
172
163
  export const GetBrandInputSchema = z.object({
173
- value: z.cuid2(),
174
- by: ProfileIdentifierSchema.shape.by,
164
+ value: z.cuid2(),
165
+ by: ProfileIdentifierSchema.shape.by,
175
166
  });
176
167
 
177
168
  export const GetBrandQuerySchema = ProfileIdentifierSchema;
@@ -183,24 +174,24 @@ export const GetBrandOutputSchema = BrandEntitySchema;
183
174
  export const UpdateBrandOutputSchema = BrandEntitySchema;
184
175
 
185
176
  export const BrandWithUserEntitySchema = MinimalBrandEntitySchema.extend({
186
- user: MinimalUserSchema,
177
+ user: MinimalUserSchema,
187
178
  });
188
179
 
189
180
  export const SearchBrandInputSchema = z.object({
190
- string: z
191
- .string()
192
- .min(1, { message: "Search string cannot be empty" })
193
- .max(200, { message: "Search string cannot exceed 200 characters" }),
194
- limit: z.coerce
195
- .number()
196
- .int({ message: "Limit must be an integer" })
197
- .min(1, { message: "Limit must be at least 1" })
198
- .max(100, { message: "Limit cannot exceed 100" })
199
- .default(20),
200
- cursor: z.string().optional(),
181
+ string: z
182
+ .string()
183
+ .min(1, { message: "Search string cannot be empty" })
184
+ .max(200, { message: "Search string cannot exceed 200 characters" }),
185
+ limit: z.coerce
186
+ .number()
187
+ .int({ message: "Limit must be an integer" })
188
+ .min(1, { message: "Limit must be at least 1" })
189
+ .max(100, { message: "Limit cannot exceed 100" })
190
+ .default(20),
191
+ cursor: z.string().optional(),
201
192
  });
202
193
 
203
194
  export const SearchBrandOutputSchema = z.object({
204
- brands: z.array(BrandWithUserEntitySchema),
205
- nextCursor: z.string().optional().nullable(),
195
+ brands: z.array(BrandWithUserEntitySchema),
196
+ nextCursor: z.string().optional().nullable(),
206
197
  });