@zyacreatives/shared 1.6.1 → 1.6.2
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 +16 -11
- package/dist/schemas/brand.js +23 -13
- package/dist/types/brand.d.ts +4 -5
- package/package.json +1 -1
- package/src/schemas/brand.ts +24 -14
- package/src/types/brand.ts +15 -19
- package/src/types/user.ts +0 -2
package/dist/schemas/brand.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export declare const BrandEntitySchema: z.ZodObject<{
|
|
|
5
5
|
brandName: z.ZodString;
|
|
6
6
|
bio: z.ZodOptional<z.ZodString>;
|
|
7
7
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
disciplines: z.ZodArray<z.ZodString
|
|
8
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
9
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
10
|
-
updatedAt: z.
|
|
10
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export declare const ListBrandsInputSchema: z.ZodObject<{
|
|
13
13
|
query: z.ZodOptional<z.ZodString>;
|
|
@@ -25,17 +25,22 @@ export declare const ListBrandsInputSchema: z.ZodObject<{
|
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
export declare const CreateBrandProfileInputSchema: z.ZodObject<{
|
|
27
27
|
brandName: z.ZodString;
|
|
28
|
-
bio: z.
|
|
29
|
-
tags: z.
|
|
28
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
29
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
30
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
|
|
33
33
|
brandName: z.ZodOptional<z.ZodString>;
|
|
34
34
|
bio: z.ZodOptional<z.ZodString>;
|
|
35
35
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
37
|
}, z.core.$strip>;
|
|
37
|
-
export declare const
|
|
38
|
+
export declare const GetBrandInputSchema: z.ZodObject<{
|
|
38
39
|
value: z.ZodCUID2;
|
|
40
|
+
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
41
|
+
id: "id";
|
|
42
|
+
userId: "userId";
|
|
43
|
+
}>>>;
|
|
39
44
|
}, z.core.$strip>;
|
|
40
45
|
export declare const GetBrandQuerySchema: z.ZodObject<{
|
|
41
46
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -49,9 +54,9 @@ export declare const CreateBrandOutputSchema: z.ZodObject<{
|
|
|
49
54
|
brandName: z.ZodString;
|
|
50
55
|
bio: z.ZodOptional<z.ZodString>;
|
|
51
56
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
-
disciplines: z.ZodArray<z.ZodString
|
|
57
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
58
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
54
|
-
updatedAt: z.
|
|
59
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
55
60
|
}, z.core.$strip>;
|
|
56
61
|
export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
57
62
|
id: z.ZodCUID2;
|
|
@@ -59,9 +64,9 @@ export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
|
59
64
|
brandName: z.ZodString;
|
|
60
65
|
bio: z.ZodOptional<z.ZodString>;
|
|
61
66
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
|
-
disciplines: z.ZodArray<z.ZodString
|
|
67
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
68
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
64
|
-
updatedAt: z.
|
|
69
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
65
70
|
}, z.core.$strip>;
|
|
66
71
|
export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
67
72
|
id: z.ZodCUID2;
|
|
@@ -69,7 +74,7 @@ export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
|
69
74
|
brandName: z.ZodString;
|
|
70
75
|
bio: z.ZodOptional<z.ZodString>;
|
|
71
76
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
-
disciplines: z.ZodArray<z.ZodString
|
|
77
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
78
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
74
|
-
updatedAt: z.
|
|
79
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
75
80
|
}, z.core.$strip>;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateBrandOutputSchema = exports.GetBrandQuerySchema = exports.
|
|
3
|
+
exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateBrandOutputSchema = exports.GetBrandQuerySchema = exports.GetBrandInputSchema = exports.UpdateBrandProfileInputSchema = exports.CreateBrandProfileInputSchema = exports.ListBrandsInputSchema = exports.BrandEntitySchema = 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");
|
|
@@ -19,17 +19,15 @@ exports.BrandEntitySchema = zod_openapi_1.z
|
|
|
19
19
|
.openapi({ example: ["technology", "saas", "startup"] }),
|
|
20
20
|
disciplines: zod_openapi_1.z
|
|
21
21
|
.array(zod_openapi_1.z.string())
|
|
22
|
+
.optional()
|
|
22
23
|
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
23
24
|
createdAt: zod_openapi_1.z.coerce
|
|
24
25
|
.date()
|
|
25
26
|
.optional()
|
|
26
27
|
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
27
|
-
updatedAt: zod_openapi_1.z.coerce
|
|
28
|
-
.date()
|
|
29
|
-
.optional()
|
|
30
|
-
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
28
|
+
updatedAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
31
29
|
})
|
|
32
|
-
.openapi("
|
|
30
|
+
.openapi("BrandEntitySchema");
|
|
33
31
|
exports.ListBrandsInputSchema = zod_openapi_1.z
|
|
34
32
|
.object({
|
|
35
33
|
query: zod_openapi_1.z.string().optional().openapi({ example: "AI software brand" }),
|
|
@@ -41,6 +39,7 @@ exports.ListBrandsInputSchema = zod_openapi_1.z
|
|
|
41
39
|
.array(zod_openapi_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)))
|
|
42
40
|
.optional()
|
|
43
41
|
.openapi({
|
|
42
|
+
example: ["SENIOR", "EXPERT"],
|
|
44
43
|
description: "Filter based on the required experience level of partners.",
|
|
45
44
|
}),
|
|
46
45
|
location: zod_openapi_1.z.string().optional().openapi({ example: "San Francisco" }),
|
|
@@ -65,13 +64,16 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
65
64
|
.string()
|
|
66
65
|
.min(1, "Brand name is required")
|
|
67
66
|
.openapi({ example: "Acme Creative Studio" }),
|
|
68
|
-
bio: zod_openapi_1.z
|
|
67
|
+
bio: zod_openapi_1.z
|
|
68
|
+
.string()
|
|
69
|
+
.max(210)
|
|
70
|
+
.optional()
|
|
71
|
+
.openapi({
|
|
69
72
|
example: "We help brands tell their stories through design.",
|
|
70
73
|
}),
|
|
71
74
|
tags: zod_openapi_1.z
|
|
72
75
|
.array(zod_openapi_1.z.string())
|
|
73
76
|
.optional()
|
|
74
|
-
.default([])
|
|
75
77
|
.openapi({ example: ["branding", "ux", "campaigns"] }),
|
|
76
78
|
disciplineSlugs: zod_openapi_1.z
|
|
77
79
|
.array(zod_openapi_1.z.string())
|
|
@@ -85,19 +87,27 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
85
87
|
exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
|
|
86
88
|
.object({
|
|
87
89
|
brandName: zod_openapi_1.z.string().min(1).optional().openapi({ example: "Acme Studio" }),
|
|
88
|
-
bio: zod_openapi_1.z
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
bio: zod_openapi_1.z
|
|
91
|
+
.string()
|
|
92
|
+
.max(210)
|
|
93
|
+
.optional()
|
|
94
|
+
.openapi({ example: "Updated bio for our creative agency." }),
|
|
91
95
|
tags: zod_openapi_1.z
|
|
92
96
|
.array(zod_openapi_1.z.string())
|
|
93
97
|
.optional()
|
|
94
98
|
.openapi({ example: ["branding", "product", "illustration"] }),
|
|
99
|
+
disciplineSlugs: zod_openapi_1.z
|
|
100
|
+
.array(zod_openapi_1.z.string())
|
|
101
|
+
.min(1, "At least one discipline is required")
|
|
102
|
+
.optional()
|
|
103
|
+
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
95
104
|
})
|
|
96
105
|
.openapi({
|
|
97
106
|
title: "update brand profile",
|
|
98
107
|
});
|
|
99
|
-
exports.
|
|
100
|
-
value:
|
|
108
|
+
exports.GetBrandInputSchema = zod_openapi_1.z.object({
|
|
109
|
+
value: zod_openapi_1.z.cuid2(),
|
|
110
|
+
by: common_1.ProfileIdentifierSchema.shape.by,
|
|
101
111
|
});
|
|
102
112
|
exports.GetBrandQuerySchema = common_1.ProfileIdentifierSchema;
|
|
103
113
|
exports.CreateBrandOutputSchema = exports.BrandEntitySchema;
|
package/dist/types/brand.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { BrandEntitySchema,
|
|
2
|
+
import { BrandEntitySchema, ListBrandsInputSchema, CreateBrandProfileInputSchema, UpdateBrandProfileInputSchema, GetBrandInputSchema, CreateBrandOutputSchema, GetBrandOutputSchema, UpdateBrandOutputSchema } from "../schemas/brand";
|
|
3
3
|
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
4
4
|
export type ListBrandsInput = z.infer<typeof ListBrandsInputSchema>;
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type GetBrandQuery = z.infer<typeof GetBrandQuerySchema>;
|
|
5
|
+
export type CreateBrandProfileInput = z.infer<typeof CreateBrandProfileInputSchema>;
|
|
6
|
+
export type UpdateBrandProfileInput = z.infer<typeof UpdateBrandProfileInputSchema>;
|
|
7
|
+
export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
|
|
9
8
|
export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
|
|
10
9
|
export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
|
|
11
10
|
export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/brand.ts
CHANGED
|
@@ -17,17 +17,15 @@ export const BrandEntitySchema = z
|
|
|
17
17
|
.openapi({ example: ["technology", "saas", "startup"] }),
|
|
18
18
|
disciplines: z
|
|
19
19
|
.array(z.string())
|
|
20
|
+
.optional()
|
|
20
21
|
.openapi({ example: ["Marketing", "Product Development"] }),
|
|
21
22
|
createdAt: z.coerce
|
|
22
23
|
.date()
|
|
23
24
|
.optional()
|
|
24
25
|
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
25
|
-
updatedAt: z.coerce
|
|
26
|
-
.date()
|
|
27
|
-
.optional()
|
|
28
|
-
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
26
|
+
updatedAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
29
27
|
})
|
|
30
|
-
.openapi("
|
|
28
|
+
.openapi("BrandEntitySchema");
|
|
31
29
|
|
|
32
30
|
export const ListBrandsInputSchema = z
|
|
33
31
|
.object({
|
|
@@ -47,6 +45,7 @@ export const ListBrandsInputSchema = z
|
|
|
47
45
|
)
|
|
48
46
|
.optional()
|
|
49
47
|
.openapi({
|
|
48
|
+
example: ["SENIOR", "EXPERT"],
|
|
50
49
|
description:
|
|
51
50
|
"Filter based on the required experience level of partners.",
|
|
52
51
|
}),
|
|
@@ -73,13 +72,16 @@ export const CreateBrandProfileInputSchema = z
|
|
|
73
72
|
.string()
|
|
74
73
|
.min(1, "Brand name is required")
|
|
75
74
|
.openapi({ example: "Acme Creative Studio" }),
|
|
76
|
-
bio: z
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
bio: z
|
|
76
|
+
.string()
|
|
77
|
+
.max(210)
|
|
78
|
+
.optional()
|
|
79
|
+
.openapi({
|
|
80
|
+
example: "We help brands tell their stories through design.",
|
|
81
|
+
}),
|
|
79
82
|
tags: z
|
|
80
83
|
.array(z.string())
|
|
81
84
|
.optional()
|
|
82
|
-
.default([])
|
|
83
85
|
.openapi({ example: ["branding", "ux", "campaigns"] }),
|
|
84
86
|
disciplineSlugs: z
|
|
85
87
|
.array(z.string())
|
|
@@ -94,20 +96,28 @@ export const CreateBrandProfileInputSchema = z
|
|
|
94
96
|
export const UpdateBrandProfileInputSchema = z
|
|
95
97
|
.object({
|
|
96
98
|
brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
|
|
97
|
-
bio: z
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
bio: z
|
|
100
|
+
.string()
|
|
101
|
+
.max(210)
|
|
102
|
+
.optional()
|
|
103
|
+
.openapi({ example: "Updated bio for our creative agency." }),
|
|
100
104
|
tags: z
|
|
101
105
|
.array(z.string())
|
|
102
106
|
.optional()
|
|
103
107
|
.openapi({ example: ["branding", "product", "illustration"] }),
|
|
108
|
+
disciplineSlugs: z
|
|
109
|
+
.array(z.string())
|
|
110
|
+
.min(1, "At least one discipline is required")
|
|
111
|
+
.optional()
|
|
112
|
+
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
104
113
|
})
|
|
105
114
|
.openapi({
|
|
106
115
|
title: "update brand profile",
|
|
107
116
|
});
|
|
108
117
|
|
|
109
|
-
export const
|
|
110
|
-
value:
|
|
118
|
+
export const GetBrandInputSchema = z.object({
|
|
119
|
+
value: z.cuid2(),
|
|
120
|
+
by: ProfileIdentifierSchema.shape.by,
|
|
111
121
|
});
|
|
112
122
|
|
|
113
123
|
export const GetBrandQuerySchema = ProfileIdentifierSchema;
|
package/src/types/brand.ts
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
import {
|
|
3
3
|
BrandEntitySchema,
|
|
4
|
-
|
|
4
|
+
ListBrandsInputSchema,
|
|
5
5
|
CreateBrandProfileInputSchema,
|
|
6
|
+
UpdateBrandProfileInputSchema,
|
|
7
|
+
GetBrandInputSchema,
|
|
8
|
+
CreateBrandOutputSchema,
|
|
6
9
|
GetBrandOutputSchema,
|
|
7
|
-
GetBrandParamsSchema,
|
|
8
|
-
GetBrandQuerySchema,
|
|
9
|
-
ListBrandsInputSchema,
|
|
10
10
|
UpdateBrandOutputSchema,
|
|
11
|
-
|
|
12
|
-
} from "../schemas";
|
|
11
|
+
} from "../schemas/brand";
|
|
13
12
|
|
|
14
13
|
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
15
14
|
|
|
16
15
|
export type ListBrandsInput = z.infer<typeof ListBrandsInputSchema>;
|
|
17
16
|
|
|
18
|
-
export type
|
|
17
|
+
export type CreateBrandProfileInput = z.infer<
|
|
18
|
+
typeof CreateBrandProfileInputSchema
|
|
19
|
+
>;
|
|
19
20
|
|
|
20
|
-
export type
|
|
21
|
-
|
|
21
|
+
export type UpdateBrandProfileInput = z.infer<
|
|
22
|
+
typeof UpdateBrandProfileInputSchema
|
|
23
|
+
>;
|
|
22
24
|
|
|
23
|
-
export type
|
|
25
|
+
export type GetBrandInput = z.infer<typeof GetBrandInputSchema>;
|
|
24
26
|
|
|
25
|
-
export type CreateBrandOutput = z.infer<
|
|
26
|
-
typeof CreateBrandOutputSchema
|
|
27
|
-
>;
|
|
27
|
+
export type CreateBrandOutput = z.infer<typeof CreateBrandOutputSchema>;
|
|
28
28
|
|
|
29
|
-
export type GetBrandOutput = z.infer<
|
|
30
|
-
typeof GetBrandOutputSchema
|
|
31
|
-
>;
|
|
29
|
+
export type GetBrandOutput = z.infer<typeof GetBrandOutputSchema>;
|
|
32
30
|
|
|
33
|
-
export type UpdateBrandOutput = z.infer<
|
|
34
|
-
typeof UpdateBrandOutputSchema
|
|
35
|
-
>;
|
|
31
|
+
export type UpdateBrandOutput = z.infer<typeof UpdateBrandOutputSchema>;
|