@zyacreatives/shared 1.5.2 → 1.5.3
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 +5 -5
- package/dist/schemas/creative.js +13 -16
- package/dist/types/creative.d.ts +5 -5
- package/package.json +1 -1
- package/src/schemas/creative.ts +14 -18
- package/src/types/creative.ts +13 -18
|
@@ -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.
|
|
30
|
-
perPage: z.
|
|
29
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
30
|
+
perPage: z.ZodDefault<z.ZodNumber>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
export declare const CreateCreativeProfileInputSchema: z.ZodObject<{
|
|
33
33
|
experienceLevel: z.ZodDefault<z.ZodEnum<{
|
|
@@ -52,10 +52,10 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
|
|
|
52
52
|
location: z.ZodOptional<z.ZodString>;
|
|
53
53
|
disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
|
-
export declare const
|
|
56
|
-
|
|
55
|
+
export declare const GetCreativeInputSchema: z.ZodObject<{
|
|
56
|
+
id: z.ZodCUID2;
|
|
57
57
|
}, z.core.$strip>;
|
|
58
|
-
export declare const
|
|
58
|
+
export declare const GetCreativeByProfileIdentifierInputSchema: z.ZodObject<{
|
|
59
59
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
60
60
|
id: "id";
|
|
61
61
|
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.GetCreativeByProfileIdentifierInputSchema = 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: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
|
+
userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0001s9a5y8z7p3x9" }),
|
|
11
11
|
bio: zod_openapi_1.z.string().optional().openapi({
|
|
12
12
|
example: "A multi-disciplinary designer specializing in brand identity.",
|
|
13
13
|
}),
|
|
@@ -41,20 +41,19 @@ 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: ["YEAR_0_1", "YEAR_1_3"] }),
|
|
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).
|
|
50
|
+
page: zod_openapi_1.z.number().int().min(1).default(1).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()
|
|
58
57
|
.openapi({ example: 20 }),
|
|
59
58
|
})
|
|
60
59
|
.openapi("ListCreativesInput");
|
|
@@ -80,9 +79,7 @@ exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
80
79
|
.default([])
|
|
81
80
|
.openapi({ example: ["ui-ux", "frontend"] }),
|
|
82
81
|
})
|
|
83
|
-
.openapi(
|
|
84
|
-
title: "create creative profile",
|
|
85
|
-
});
|
|
82
|
+
.openapi("CreateCreativeProfileInput");
|
|
86
83
|
exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
87
84
|
.object({
|
|
88
85
|
experienceLevel: zod_openapi_1.z
|
|
@@ -109,13 +106,13 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
109
106
|
.optional()
|
|
110
107
|
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
111
108
|
})
|
|
112
|
-
.openapi(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
exports.
|
|
109
|
+
.openapi("UpdateCreativeProfileInput");
|
|
110
|
+
exports.GetCreativeInputSchema = zod_openapi_1.z
|
|
111
|
+
.object({
|
|
112
|
+
id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
113
|
+
})
|
|
114
|
+
.openapi("GetCreativeInput");
|
|
115
|
+
exports.GetCreativeByProfileIdentifierInputSchema = common_1.ProfileIdentifierSchema;
|
|
119
116
|
exports.CreateCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
120
117
|
exports.GetCreativeOutputSchema = exports.CreativeEntitySchema;
|
|
121
118
|
exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
|
package/dist/types/creative.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
2
|
+
import { CreativeEntitySchema, ListCreativesInputSchema, CreateCreativeProfileInputSchema, UpdateCreativeProfileInputSchema, GetCreativeInputSchema, GetCreativeByProfileIdentifierInputSchema, 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
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
5
|
+
export type CreateCreativeProfileInput = z.infer<typeof CreateCreativeProfileInputSchema>;
|
|
6
|
+
export type UpdateCreativeProfileInput = z.infer<typeof UpdateCreativeProfileInputSchema>;
|
|
7
|
+
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
8
|
+
export type GetCreativeByProfileIdentifierInput = z.infer<typeof GetCreativeByProfileIdentifierInputSchema>;
|
|
9
9
|
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
10
10
|
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
11
11
|
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 {
|
|
3
|
+
import { 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: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
8
|
+
userId: z.cuid2().openapi({ example: "cksd0v6q0001s9a5y8z7p3x9" }),
|
|
9
9
|
bio: z.string().optional().openapi({
|
|
10
10
|
example: "A multi-disciplinary designer specializing in brand identity.",
|
|
11
11
|
}),
|
|
@@ -52,20 +52,19 @@ export const ListCreativesInputSchema = z
|
|
|
52
52
|
)
|
|
53
53
|
)
|
|
54
54
|
.optional()
|
|
55
|
-
.openapi({ example: ["
|
|
55
|
+
.openapi({ example: ["YEAR_0_1", "YEAR_1_3"] }),
|
|
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).
|
|
61
|
+
page: z.number().int().min(1).default(1).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()
|
|
69
68
|
.openapi({ example: 20 }),
|
|
70
69
|
})
|
|
71
70
|
.openapi("ListCreativesInput");
|
|
@@ -92,9 +91,7 @@ export const CreateCreativeProfileInputSchema = z
|
|
|
92
91
|
.default([])
|
|
93
92
|
.openapi({ example: ["ui-ux", "frontend"] }),
|
|
94
93
|
})
|
|
95
|
-
.openapi(
|
|
96
|
-
title: "create creative profile",
|
|
97
|
-
});
|
|
94
|
+
.openapi("CreateCreativeProfileInput");
|
|
98
95
|
|
|
99
96
|
export const UpdateCreativeProfileInputSchema = z
|
|
100
97
|
.object({
|
|
@@ -122,18 +119,17 @@ export const UpdateCreativeProfileInputSchema = z
|
|
|
122
119
|
.optional()
|
|
123
120
|
.openapi({ example: ["frontend", "ui-ux"] }),
|
|
124
121
|
})
|
|
125
|
-
.openapi(
|
|
126
|
-
title: "update creative profile",
|
|
127
|
-
});
|
|
122
|
+
.openapi("UpdateCreativeProfileInput");
|
|
128
123
|
|
|
129
|
-
export const
|
|
130
|
-
|
|
131
|
-
})
|
|
124
|
+
export const GetCreativeInputSchema = z
|
|
125
|
+
.object({
|
|
126
|
+
id: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
127
|
+
})
|
|
128
|
+
.openapi("GetCreativeInput");
|
|
132
129
|
|
|
133
|
-
export const
|
|
130
|
+
export const GetCreativeByProfileIdentifierInputSchema =
|
|
131
|
+
ProfileIdentifierSchema;
|
|
134
132
|
|
|
135
133
|
export const CreateCreativeOutputSchema = CreativeEntitySchema;
|
|
136
|
-
|
|
137
134
|
export const GetCreativeOutputSchema = CreativeEntitySchema;
|
|
138
|
-
|
|
139
135
|
export const UpdateCreativeOutputSchema = CreativeEntitySchema;
|
package/src/types/creative.ts
CHANGED
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
import {
|
|
3
|
-
CreateCreativeOutputSchema,
|
|
4
|
-
CreateCreativeProfileInputSchema,
|
|
5
3
|
CreativeEntitySchema,
|
|
6
|
-
GetCreativeOutputSchema,
|
|
7
|
-
GetCreativeParamsSchema,
|
|
8
|
-
GetCreativeQuerySchema,
|
|
9
4
|
ListCreativesInputSchema,
|
|
10
|
-
|
|
5
|
+
CreateCreativeProfileInputSchema,
|
|
11
6
|
UpdateCreativeProfileInputSchema,
|
|
12
|
-
|
|
7
|
+
GetCreativeInputSchema,
|
|
8
|
+
GetCreativeByProfileIdentifierInputSchema,
|
|
9
|
+
CreateCreativeOutputSchema,
|
|
10
|
+
GetCreativeOutputSchema,
|
|
11
|
+
UpdateCreativeOutputSchema,
|
|
12
|
+
} from "../schemas/creative";
|
|
13
13
|
|
|
14
14
|
export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
|
|
15
15
|
|
|
16
16
|
export type ListCreativesInput = z.infer<typeof ListCreativesInputSchema>;
|
|
17
17
|
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
>;
|
|
21
|
-
export type UpdateCreativeInput = z.infer<
|
|
22
|
-
typeof UpdateCreativeProfileInputSchema
|
|
23
|
-
>;
|
|
24
|
-
|
|
25
|
-
export type GetCreativeParams = z.infer<typeof GetCreativeParamsSchema>;
|
|
18
|
+
export type CreateCreativeProfileInput = z.infer<typeof CreateCreativeProfileInputSchema>;
|
|
19
|
+
export type UpdateCreativeProfileInput = z.infer<typeof UpdateCreativeProfileInputSchema>;
|
|
26
20
|
|
|
27
|
-
export type
|
|
21
|
+
export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
|
|
22
|
+
export type GetCreativeByProfileIdentifierInput = z.infer<
|
|
23
|
+
typeof GetCreativeByProfileIdentifierInputSchema
|
|
24
|
+
>;
|
|
28
25
|
|
|
29
26
|
export type CreateCreativeOutput = z.infer<typeof CreateCreativeOutputSchema>;
|
|
30
|
-
|
|
31
27
|
export type GetCreativeOutput = z.infer<typeof GetCreativeOutputSchema>;
|
|
32
|
-
|
|
33
28
|
export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
|