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