@zyacreatives/shared 1.5.3 → 1.5.4
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/creative.d.ts +8 -4
- package/dist/schemas/creative.js +17 -13
- package/dist/types/creative.d.ts +1 -2
- package/package.json +1 -1
- package/src/schemas/creative.ts +19 -14
- package/src/types/creative.ts +6 -6
|
@@ -26,8 +26,8 @@ export declare const ListCreativesInputSchema: z.ZodObject<{
|
|
|
26
26
|
}>>>;
|
|
27
27
|
location: z.ZodOptional<z.ZodString>;
|
|
28
28
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
-
page: z.ZodDefault<z.ZodNumber
|
|
30
|
-
perPage: z.ZodDefault<z.ZodNumber
|
|
29
|
+
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
30
|
+
perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
export declare const CreateCreativeProfileInputSchema: z.ZodObject<{
|
|
33
33
|
experienceLevel: z.ZodDefault<z.ZodEnum<{
|
|
@@ -53,9 +53,13 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
|
|
|
53
53
|
disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
export declare const GetCreativeInputSchema: z.ZodObject<{
|
|
56
|
-
|
|
56
|
+
value: z.ZodCUID2;
|
|
57
|
+
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
id: "id";
|
|
59
|
+
userId: "userId";
|
|
60
|
+
}>>>;
|
|
57
61
|
}, z.core.$strip>;
|
|
58
|
-
export declare const
|
|
62
|
+
export declare const GetCreativeQuerySchema: z.ZodObject<{
|
|
59
63
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
60
64
|
id: "id";
|
|
61
65
|
userId: "userId";
|
package/dist/schemas/creative.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateCreativeOutputSchema = exports.GetCreativeOutputSchema = exports.CreateCreativeOutputSchema = exports.
|
|
3
|
+
exports.UpdateCreativeOutputSchema = exports.GetCreativeOutputSchema = exports.CreateCreativeOutputSchema = exports.GetCreativeQuerySchema = exports.GetCreativeInputSchema = exports.UpdateCreativeProfileInputSchema = exports.CreateCreativeProfileInputSchema = exports.ListCreativesInputSchema = exports.CreativeEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
exports.CreativeEntitySchema = zod_openapi_1.z
|
|
8
8
|
.object({
|
|
9
|
-
id: zod_openapi_1.z.cuid2().openapi({ example: "
|
|
10
|
-
userId: zod_openapi_1.z.cuid2().openapi({ example: "
|
|
9
|
+
id: zod_openapi_1.z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
|
+
userId: zod_openapi_1.z.cuid2().openapi({ example: "user_abc123" }),
|
|
11
11
|
bio: zod_openapi_1.z.string().optional().openapi({
|
|
12
12
|
example: "A multi-disciplinary designer specializing in brand identity.",
|
|
13
13
|
}),
|
|
@@ -41,19 +41,20 @@ exports.ListCreativesInputSchema = zod_openapi_1.z
|
|
|
41
41
|
experienceLevels: zod_openapi_1.z
|
|
42
42
|
.array(zod_openapi_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)))
|
|
43
43
|
.optional()
|
|
44
|
-
.openapi({ example: ["
|
|
44
|
+
.openapi({ example: ["SENIOR", "EXPERT"] }),
|
|
45
45
|
location: zod_openapi_1.z.string().optional().openapi({ example: "Los Angeles" }),
|
|
46
46
|
tags: zod_openapi_1.z
|
|
47
47
|
.array(zod_openapi_1.z.string())
|
|
48
48
|
.optional()
|
|
49
49
|
.openapi({ example: ["Figma", "AI"] }),
|
|
50
|
-
page: zod_openapi_1.z.number().int().min(1).default(1).openapi({ example: 1 }),
|
|
50
|
+
page: zod_openapi_1.z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
|
|
51
51
|
perPage: zod_openapi_1.z
|
|
52
52
|
.number()
|
|
53
53
|
.int()
|
|
54
54
|
.min(1)
|
|
55
55
|
.max(100)
|
|
56
56
|
.default(20)
|
|
57
|
+
.optional()
|
|
57
58
|
.openapi({ example: 20 }),
|
|
58
59
|
})
|
|
59
60
|
.openapi("ListCreativesInput");
|
|
@@ -79,7 +80,9 @@ exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
79
80
|
.default([])
|
|
80
81
|
.openapi({ example: ["ui-ux", "frontend"] }),
|
|
81
82
|
})
|
|
82
|
-
.openapi(
|
|
83
|
+
.openapi({
|
|
84
|
+
title: "create creative profile",
|
|
85
|
+
});
|
|
83
86
|
exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
84
87
|
.object({
|
|
85
88
|
experienceLevel: zod_openapi_1.z
|
|
@@ -106,13 +109,14 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
106
109
|
.optional()
|
|
107
110
|
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
108
111
|
})
|
|
109
|
-
.openapi(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
|
|
112
|
+
.openapi({
|
|
113
|
+
title: "update creative profile",
|
|
114
|
+
});
|
|
115
|
+
exports.GetCreativeInputSchema = zod_openapi_1.z.object({
|
|
116
|
+
value: zod_openapi_1.z.cuid2(),
|
|
117
|
+
by: common_1.ProfileIdentifierSchema.shape.by,
|
|
118
|
+
});
|
|
119
|
+
exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
|
|
116
120
|
exports.CreateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
117
121
|
exports.GetCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
118
122
|
exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
|
package/dist/types/creative.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreativeEntitySchema, ListCreativesInputSchema, CreateCreativeProfileInputSchema, UpdateCreativeProfileInputSchema, GetCreativeInputSchema,
|
|
2
|
+
import { CreativeEntitySchema, ListCreativesInputSchema, CreateCreativeProfileInputSchema, UpdateCreativeProfileInputSchema, GetCreativeInputSchema, CreateCreativeOutputSchema, GetCreativeOutputSchema, UpdateCreativeOutputSchema } from "../schemas/creative";
|
|
3
3
|
export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
4
4
|
export type ListCreativesInput = z.infer<typeof ListCreativesInputSchema>;
|
|
5
5
|
export type CreateCreativeProfileInput = z.infer<typeof CreateCreativeProfileInputSchema>;
|
|
6
6
|
export type UpdateCreativeProfileInput = z.infer<typeof UpdateCreativeProfileInputSchema>;
|
|
7
7
|
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
8
|
-
export type GetCreativeByProfileIdentifierInput = z.infer<typeof GetCreativeByProfileIdentifierInputSchema>;
|
|
9
8
|
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
10
9
|
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
11
10
|
export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/creative.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
import { EXPERIENCE_LEVELS, ExperienceLevel } from "../constants";
|
|
3
|
-
import { ProfileIdentifierSchema } from "./common";
|
|
3
|
+
import { CuidSchema, ProfileIdentifierSchema } from "./common";
|
|
4
4
|
|
|
5
5
|
export const CreativeEntitySchema = z
|
|
6
6
|
.object({
|
|
7
|
-
id: z.cuid2().openapi({ example: "
|
|
8
|
-
userId: z.cuid2().openapi({ example: "
|
|
7
|
+
id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
8
|
+
userId: z.cuid2().openapi({ example: "user_abc123" }),
|
|
9
9
|
bio: z.string().optional().openapi({
|
|
10
10
|
example: "A multi-disciplinary designer specializing in brand identity.",
|
|
11
11
|
}),
|
|
@@ -52,19 +52,20 @@ export const ListCreativesInputSchema = z
|
|
|
52
52
|
)
|
|
53
53
|
)
|
|
54
54
|
.optional()
|
|
55
|
-
.openapi({ example: ["
|
|
55
|
+
.openapi({ example: ["SENIOR", "EXPERT"] }),
|
|
56
56
|
location: z.string().optional().openapi({ example: "Los Angeles" }),
|
|
57
57
|
tags: z
|
|
58
58
|
.array(z.string())
|
|
59
59
|
.optional()
|
|
60
60
|
.openapi({ example: ["Figma", "AI"] }),
|
|
61
|
-
page: z.number().int().min(1).default(1).openapi({ example: 1 }),
|
|
61
|
+
page: z.number().int().min(1).default(1).optional().openapi({ example: 1 }),
|
|
62
62
|
perPage: z
|
|
63
63
|
.number()
|
|
64
64
|
.int()
|
|
65
65
|
.min(1)
|
|
66
66
|
.max(100)
|
|
67
67
|
.default(20)
|
|
68
|
+
.optional()
|
|
68
69
|
.openapi({ example: 20 }),
|
|
69
70
|
})
|
|
70
71
|
.openapi("ListCreativesInput");
|
|
@@ -91,7 +92,9 @@ export const CreateCreativeProfileInputSchema = z
|
|
|
91
92
|
.default([])
|
|
92
93
|
.openapi({ example: ["ui-ux", "frontend"] }),
|
|
93
94
|
})
|
|
94
|
-
.openapi(
|
|
95
|
+
.openapi({
|
|
96
|
+
title: "create creative profile",
|
|
97
|
+
});
|
|
95
98
|
|
|
96
99
|
export const UpdateCreativeProfileInputSchema = z
|
|
97
100
|
.object({
|
|
@@ -119,17 +122,19 @@ export const UpdateCreativeProfileInputSchema = z
|
|
|
119
122
|
.optional()
|
|
120
123
|
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
121
124
|
})
|
|
122
|
-
.openapi(
|
|
125
|
+
.openapi({
|
|
126
|
+
title: "update creative profile",
|
|
127
|
+
});
|
|
123
128
|
|
|
124
|
-
export const GetCreativeInputSchema = z
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
.openapi("GetCreativeInput");
|
|
129
|
+
export const GetCreativeInputSchema = z.object({
|
|
130
|
+
value: z.cuid2(),
|
|
131
|
+
by: ProfileIdentifierSchema.shape.by,
|
|
132
|
+
});
|
|
129
133
|
|
|
130
|
-
export const
|
|
131
|
-
ProfileIdentifierSchema;
|
|
134
|
+
export const GetCreativeQuerySchema = ProfileIdentifierSchema;
|
|
132
135
|
|
|
133
136
|
export const CreateCreativeOutputSchema = CreativeEntitySchema;
|
|
137
|
+
|
|
134
138
|
export const GetCreativeOutputSchema = CreativeEntitySchema;
|
|
139
|
+
|
|
135
140
|
export const UpdateCreativeOutputSchema = CreativeEntitySchema;
|
package/src/types/creative.ts
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
CreateCreativeProfileInputSchema,
|
|
6
6
|
UpdateCreativeProfileInputSchema,
|
|
7
7
|
GetCreativeInputSchema,
|
|
8
|
-
GetCreativeByProfileIdentifierInputSchema,
|
|
9
8
|
CreateCreativeOutputSchema,
|
|
10
9
|
GetCreativeOutputSchema,
|
|
11
10
|
UpdateCreativeOutputSchema,
|
|
@@ -15,13 +14,14 @@ export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
|
15
14
|
|
|
16
15
|
export type ListCreativesInput = z.infer<typeof ListCreativesInputSchema>;
|
|
17
16
|
|
|
18
|
-
export type CreateCreativeProfileInput = z.infer<
|
|
19
|
-
|
|
17
|
+
export type CreateCreativeProfileInput = z.infer<
|
|
18
|
+
typeof CreateCreativeProfileInputSchema
|
|
19
|
+
>;
|
|
20
|
+
export type UpdateCreativeProfileInput = z.infer<
|
|
21
|
+
typeof UpdateCreativeProfileInputSchema
|
|
22
|
+
>;
|
|
20
23
|
|
|
21
24
|
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
22
|
-
export type GetCreativeByProfileIdentifierInput = z.infer<
|
|
23
|
-
typeof GetCreativeByProfileIdentifierInputSchema
|
|
24
|
-
>;
|
|
25
25
|
|
|
26
26
|
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
27
27
|
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|