@zyacreatives/shared 1.5.1 → 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.
@@ -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.ZodOptional<z.ZodDefault<z.ZodNumber>>;
30
- perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
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 GetCreativeParamsSchema: z.ZodObject<{
56
- value: z.ZodCUID2;
55
+ export declare const GetCreativeInputSchema: z.ZodObject<{
56
+ id: z.ZodCUID2;
57
57
  }, z.core.$strip>;
58
- export declare const GetCreativeQuerySchema: z.ZodObject<{
58
+ export declare const GetCreativeByProfileIdentifierInputSchema: z.ZodObject<{
59
59
  by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
60
60
  id: "id";
61
61
  userId: "userId";
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateCreativeOutputSchema = exports.GetCreativeOutputSchema = exports.CreateCreativeOutputSchema = exports.GetCreativeQuerySchema = exports.GetCreativeParamsSchema = exports.UpdateCreativeProfileInputSchema = exports.CreateCreativeProfileInputSchema = exports.ListCreativesInputSchema = exports.CreativeEntitySchema = void 0;
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: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
10
- userId: zod_openapi_1.z.cuid2().openapi({ example: "user_abc123" }),
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: ["SENIOR", "EXPERT"] }),
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).optional().openapi({ example: 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
- title: "update creative profile",
114
- });
115
- exports.GetCreativeParamsSchema = zod_openapi_1.z.object({
116
- value: common_1.CuidSchema,
117
- });
118
- exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
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;
@@ -17,8 +17,8 @@ export declare const CreateDisciplinesOutputSchema: z.ZodObject<{
17
17
  disciplines: z.ZodArray<z.ZodString>;
18
18
  }, z.core.$strip>;
19
19
  export declare const GetDisciplinesInputSchema: z.ZodObject<{
20
- withTags: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>>;
21
- getDefault: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>>;
20
+ withTags: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>;
21
+ getDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>;
22
22
  slugs: z.ZodOptional<z.ZodString>;
23
23
  }, z.core.$strip>;
24
24
  export declare const GetDisciplinesOutputSchema: z.ZodObject<{
@@ -46,7 +46,6 @@ exports.GetDisciplinesInputSchema = zod_openapi_1.z
46
46
  withTags: zod_openapi_1.z
47
47
  .union([zod_openapi_1.z.literal("true"), zod_openapi_1.z.literal("false")])
48
48
  .optional()
49
- .default("false")
50
49
  .openapi({
51
50
  description: "Whether to include tags in the response.",
52
51
  example: "true",
@@ -54,7 +53,6 @@ exports.GetDisciplinesInputSchema = zod_openapi_1.z
54
53
  getDefault: zod_openapi_1.z
55
54
  .union([zod_openapi_1.z.literal("true"), zod_openapi_1.z.literal("false")])
56
55
  .optional()
57
- .default("false")
58
56
  .openapi({
59
57
  description: "Fetch the default list of disciplines (non user-added disciplines).",
60
58
  }),
@@ -1,11 +1,11 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import { CreateCreativeOutputSchema, CreateCreativeProfileInputSchema, CreativeEntitySchema, GetCreativeOutputSchema, GetCreativeParamsSchema, GetCreativeQuerySchema, ListCreativesInputSchema, UpdateCreativeOutputSchema, UpdateCreativeProfileInputSchema } from "../schemas";
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 CreateCreativeInput = z.infer<typeof CreateCreativeProfileInputSchema>;
6
- export type UpdateCreativeInput = z.infer<typeof UpdateCreativeProfileInputSchema>;
7
- export type GetCreativeParams = z.infer<typeof GetCreativeParamsSchema>;
8
- export type GetCreativeQuery = z.infer<typeof GetCreativeQuerySchema>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,11 +1,11 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
  import { EXPERIENCE_LEVELS, ExperienceLevel } from "../constants";
3
- import { CuidSchema, ProfileIdentifierSchema } from "./common";
3
+ import { ProfileIdentifierSchema } from "./common";
4
4
 
5
5
  export const CreativeEntitySchema = z
6
6
  .object({
7
- id: z.cuid2().openapi({ example: "cre_cksd0v6q0000s9a5y8z7p3x9" }),
8
- userId: z.cuid2().openapi({ example: "user_abc123" }),
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: ["SENIOR", "EXPERT"] }),
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).optional().openapi({ example: 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 GetCreativeParamsSchema = z.object({
130
- value: CuidSchema,
131
- });
124
+ export const GetCreativeInputSchema = z
125
+ .object({
126
+ id: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
127
+ })
128
+ .openapi("GetCreativeInput");
132
129
 
133
- export const GetCreativeQuerySchema = ProfileIdentifierSchema;
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;
@@ -50,7 +50,6 @@ export const GetDisciplinesInputSchema = z
50
50
  withTags: z
51
51
  .union([z.literal("true"), z.literal("false")])
52
52
  .optional()
53
- .default("false")
54
53
  .openapi({
55
54
  description: "Whether to include tags in the response.",
56
55
  example: "true",
@@ -58,7 +57,6 @@ export const GetDisciplinesInputSchema = z
58
57
  getDefault: z
59
58
  .union([z.literal("true"), z.literal("false")])
60
59
  .optional()
61
- .default("false")
62
60
  .openapi({
63
61
  description:
64
62
  "Fetch the default list of disciplines (non user-added disciplines).",
@@ -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
- UpdateCreativeOutputSchema,
5
+ CreateCreativeProfileInputSchema,
11
6
  UpdateCreativeProfileInputSchema,
12
- } from "../schemas";
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 CreateCreativeInput = z.infer<
19
- typeof CreateCreativeProfileInputSchema
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 GetCreativeQuery = z.infer<typeof GetCreativeQuerySchema>;
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>;