@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.
- package/dist/schemas/brand.d.ts +3 -3
- package/dist/schemas/brand.js +6 -20
- package/dist/schemas/creative.d.ts +3 -3
- package/dist/schemas/creative.js +3 -5
- package/package.json +1 -1
- package/src/schemas/brand.ts +143 -157
- package/src/schemas/creative.ts +5 -7
package/dist/schemas/brand.d.ts
CHANGED
|
@@ -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.
|
|
58
|
-
type: z.
|
|
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;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
103
|
-
type: z.
|
|
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;
|
package/dist/schemas/creative.js
CHANGED
|
@@ -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
|
-
|
|
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
package/src/schemas/brand.ts
CHANGED
|
@@ -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
|
-
|
|
31
|
+
example: "Leading software development firm focused on AI.",
|
|
12
32
|
}),
|
|
13
|
-
|
|
14
33
|
disciplines: z
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
165
|
-
|
|
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
|
-
|
|
163
|
+
user: MinimalUserSchema,
|
|
178
164
|
});
|
|
179
165
|
|
|
180
166
|
export const SearchBrandInputSchema = z.object({
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
196
|
-
|
|
181
|
+
brands: z.array(BrandWithUserEntitySchema),
|
|
182
|
+
nextCursor: z.string().optional().nullable(),
|
|
197
183
|
});
|
package/src/schemas/creative.ts
CHANGED
|
@@ -208,13 +208,11 @@ export const UpdateCreativeProfileInputSchema = z
|
|
|
208
208
|
.optional(),
|
|
209
209
|
links: z
|
|
210
210
|
.object({
|
|
211
|
-
url: z
|
|
212
|
-
.
|
|
213
|
-
|
|
214
|
-
|
|
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(),
|