@zyacreatives/shared 2.1.45 → 2.1.47

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.
@@ -54,15 +54,15 @@ export declare const CreateBrandProfileInputSchema: z.ZodObject<{
54
54
  export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
55
55
  brandName: z.ZodOptional<z.ZodString>;
56
56
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
58
- type: z.ZodOptional<z.ZodEnum<{
57
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
58
+ type: z.ZodEnum<{
59
59
  readonly INSTAGRAM: "Instagram";
60
60
  readonly LINKEDIN: "LinkedIn";
61
61
  readonly TWITTER: "Twitter";
62
62
  readonly YOUTUBE: "Youtube";
63
63
  readonly PORTFOLIO: "Portfolio Website";
64
64
  readonly GENERIC_WEBSITE: "Generic Website";
65
- }>>;
65
+ }>;
66
66
  }, z.core.$strip>>>;
67
67
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
68
  title: z.ZodString;
@@ -54,9 +54,7 @@ exports.BrandEntitySchema = zod_openapi_1.z
54
54
  .date()
55
55
  .optional()
56
56
  .openapi({ example: "2025-10-13T09:00:00.000Z" }),
57
- updatedAt: zod_openapi_1.z.coerce
58
- .date()
59
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
57
+ updatedAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
60
58
  })
61
59
  .openapi("BrandEntitySchema");
62
60
  exports.ListBrandsInputSchema = zod_openapi_1.z
@@ -74,13 +72,7 @@ exports.ListBrandsInputSchema = zod_openapi_1.z
74
72
  description: "Filter based on the required experience level of partners.",
75
73
  }),
76
74
  location: zod_openapi_1.z.string().optional().openapi({ example: "San Francisco" }),
77
- page: zod_openapi_1.z
78
- .number()
79
- .int()
80
- .min(1)
81
- .default(1)
82
- .optional()
83
- .openapi({ example: 1 }),
75
+ page: zod_openapi_1.z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
84
76
  perPage: zod_openapi_1.z
85
77
  .number()
86
78
  .int()
@@ -108,20 +100,14 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
108
100
  });
109
101
  exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
110
102
  .object({
111
- brandName: zod_openapi_1.z
112
- .string()
113
- .min(1)
114
- .optional()
115
- .openapi({ example: "Acme Studio" }),
103
+ brandName: zod_openapi_1.z.string().min(1).optional().openapi({ example: "Acme Studio" }),
116
104
  links: zod_openapi_1.z
117
105
  .object({
118
- url: zod_openapi_1.z
119
- .union([
106
+ url: zod_openapi_1.z.union([
120
107
  zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
121
108
  zod_openapi_1.z.literal(""),
122
- ])
123
- .optional(),
124
- type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).optional(),
109
+ ]),
110
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
125
111
  })
126
112
  .array()
127
113
  .optional(),
@@ -99,15 +99,15 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
99
99
  description: z.ZodOptional<z.ZodString>;
100
100
  }, z.core.$strip>>>;
101
101
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
- url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
103
- type: z.ZodOptional<z.ZodEnum<{
102
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
103
+ type: z.ZodEnum<{
104
104
  readonly INSTAGRAM: "Instagram";
105
105
  readonly LINKEDIN: "LinkedIn";
106
106
  readonly TWITTER: "Twitter";
107
107
  readonly YOUTUBE: "Youtube";
108
108
  readonly PORTFOLIO: "Portfolio Website";
109
109
  readonly GENERIC_WEBSITE: "Generic Website";
110
- }>>;
110
+ }>;
111
111
  }, z.core.$strip>>>;
112
112
  achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
113
113
  title: z.ZodString;
@@ -177,13 +177,11 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
177
177
  .optional(),
178
178
  links: zod_openapi_1.z
179
179
  .object({
180
- url: zod_openapi_1.z
181
- .union([
180
+ url: zod_openapi_1.z.union([
182
181
  zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
183
182
  zod_openapi_1.z.literal(""),
184
- ])
185
- .optional(),
186
- type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).optional(),
183
+ ]),
184
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
187
185
  })
188
186
  .array()
189
187
  .optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.45",
3
+ "version": "2.1.47",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,165 +4,151 @@ 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.string().optional().openapi({
11
+ example: "Leading software development firm focused on AI.",
12
+ }),
13
+
14
+ disciplines: z
15
+ .array(z.string())
16
+ .optional()
17
+ .openapi({ example: ["Marketing", "Product Development"] }),
18
+ createdAt: z.coerce
19
+ .date()
20
+ .optional()
21
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
22
+ updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
23
+ });
24
+
25
+ export const BrandEntitySchema = z
26
+ .object({
7
27
  id: z.cuid2().openapi({ example: "brd_cksd0v6q0000s9a5y8z7p3x9" }),
8
28
  userId: z.cuid2().openapi({ example: "user_owner_123" }),
9
29
  brandName: z.string().openapi({ example: "TechInnovate Inc." }),
10
30
  bio: z.string().optional().openapi({
11
- example: "Leading software development firm focused on AI.",
31
+ example: "Leading software development firm focused on AI.",
12
32
  }),
13
-
14
33
  disciplines: z
15
- .array(z.string())
16
- .optional()
17
- .openapi({ example: ["Marketing", "Product Development"] }),
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(),
18
54
  createdAt: z.coerce
19
- .date()
20
- .optional()
21
- .openapi({ example: "2025-10-13T09:00:00.000Z" }),
55
+ .date()
56
+ .optional()
57
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
22
58
  updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
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");
59
+ })
60
+ .openapi("BrandEntitySchema");
63
61
 
64
62
  export const ListBrandsInputSchema = z
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");
63
+ .object({
64
+ query: z.string().optional().openapi({ example: "AI software brand" }),
65
+ disciplines: z
66
+ .array(z.string())
67
+ .optional()
68
+ .openapi({ example: ["design", "marketing"] }),
69
+ experienceLevels: z
70
+ .array(
71
+ z.enum(
72
+ Object.values(EXPERIENCE_LEVELS) as [
73
+ ExperienceLevel,
74
+ ...ExperienceLevel[]
75
+ ]
76
+ )
77
+ )
78
+ .optional()
79
+ .openapi({
80
+ example: ["SENIOR", "EXPERT"],
81
+ description:
82
+ "Filter based on the required experience level of partners.",
83
+ }),
84
+ location: z.string().optional().openapi({ example: "San Francisco" }),
85
+ page: z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
86
+ perPage: z
87
+ .number()
88
+ .int()
89
+ .min(1)
90
+ .max(100)
91
+ .default(20)
92
+ .optional()
93
+ .openapi({ example: 20 }),
94
+ })
95
+ .openapi("ListBrandsInput");
104
96
 
105
97
  export const CreateBrandProfileInputSchema = z
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
- });
98
+ .object({
99
+ brandName: z
100
+ .string()
101
+ .min(1, "Brand name is required")
102
+ .openapi({ example: "Acme Creative Studio" }),
103
+ disciplineSlugs: z
104
+ .array(z.string())
105
+ .min(1, "At least one discipline is required")
106
+ .default([])
107
+ .openapi({ example: ["ui-ux", "frontend"] }),
108
+ })
109
+ .openapi({
110
+ title: "create brand profile",
111
+ });
120
112
 
121
113
  export const UpdateBrandProfileInputSchema = z
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
- });
114
+ .object({
115
+ brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
116
+ links: z
117
+ .object({
118
+ url: z.union([
119
+ z.url({ message: "Please enter a valid URL" }),
120
+ z.literal(""),
121
+ ]),
122
+ type: z.enum(LINK_TYPES),
123
+ })
124
+ .array()
125
+ .optional(),
126
+ achievements: z
127
+ .object({
128
+ title: z.string(),
129
+ link: z.url().optional(),
130
+ year: z.number().int().optional(),
131
+ })
132
+ .array()
133
+ .optional(),
134
+ bio: z
135
+ .string()
136
+ .max(600)
137
+ .optional()
138
+ .openapi({ example: "Updated bio for our creative agency." }),
139
+ disciplineSlugs: z
140
+ .array(z.string())
141
+ .min(1, "At least one discipline is required")
142
+ .optional()
143
+ .openapi({ example: ["frontend", "ui-ux"] }),
144
+ })
145
+ .openapi({
146
+ title: "update brand profile",
147
+ });
162
148
 
163
149
  export const GetBrandInputSchema = z.object({
164
- value: z.cuid2(),
165
- by: ProfileIdentifierSchema.shape.by,
150
+ value: z.cuid2(),
151
+ by: ProfileIdentifierSchema.shape.by,
166
152
  });
167
153
 
168
154
  export const GetBrandQuerySchema = ProfileIdentifierSchema;
@@ -174,24 +160,24 @@ export const GetBrandOutputSchema = BrandEntitySchema;
174
160
  export const UpdateBrandOutputSchema = BrandEntitySchema;
175
161
 
176
162
  export const BrandWithUserEntitySchema = MinimalBrandEntitySchema.extend({
177
- user: MinimalUserSchema,
163
+ user: MinimalUserSchema,
178
164
  });
179
165
 
180
166
  export const SearchBrandInputSchema = z.object({
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(),
167
+ string: z
168
+ .string()
169
+ .min(1, { message: "Search string cannot be empty" })
170
+ .max(200, { message: "Search string cannot exceed 200 characters" }),
171
+ limit: z.coerce
172
+ .number()
173
+ .int({ message: "Limit must be an integer" })
174
+ .min(1, { message: "Limit must be at least 1" })
175
+ .max(100, { message: "Limit cannot exceed 100" })
176
+ .default(20),
177
+ cursor: z.string().optional(),
192
178
  });
193
179
 
194
180
  export const SearchBrandOutputSchema = z.object({
195
- brands: z.array(BrandWithUserEntitySchema),
196
- nextCursor: z.string().optional().nullable(),
181
+ brands: z.array(BrandWithUserEntitySchema),
182
+ nextCursor: z.string().optional().nullable(),
197
183
  });
@@ -208,13 +208,11 @@ export const UpdateCreativeProfileInputSchema = z
208
208
  .optional(),
209
209
  links: z
210
210
  .object({
211
- url: z
212
- .union([
213
- z.url({ message: "Please enter a valid URL" }),
214
- z.literal(""),
215
- ])
216
- .optional(),
217
- type: z.enum(LINK_TYPES).optional(),
211
+ url: z.union([
212
+ z.url({ message: "Please enter a valid URL" }),
213
+ z.literal(""),
214
+ ]),
215
+ type: z.enum(LINK_TYPES),
218
216
  })
219
217
  .array()
220
218
  .optional(),