@zyacreatives/shared 1.5.2 → 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.
@@ -52,8 +52,12 @@ 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<{
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
62
  export declare const GetCreativeQuerySchema: z.ZodObject<{
59
63
  by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
@@ -1,6 +1,6 @@
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.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");
@@ -112,8 +112,9 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
112
112
  .openapi({
113
113
  title: "update creative profile",
114
114
  });
115
- exports.GetCreativeParamsSchema = zod_openapi_1.z.object({
116
- value: common_1.CuidSchema,
115
+ exports.GetCreativeInputSchema = zod_openapi_1.z.object({
116
+ value: zod_openapi_1.z.cuid2(),
117
+ by: common_1.ProfileIdentifierSchema.shape.by,
117
118
  });
118
119
  exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
119
120
  exports.CreateCreativeOutputSchema = exports.CreativeEntitySchema;
@@ -1,11 +1,10 @@
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, 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>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -126,8 +126,9 @@ export const UpdateCreativeProfileInputSchema = z
126
126
  title: "update creative profile",
127
127
  });
128
128
 
129
- export const GetCreativeParamsSchema = z.object({
130
- value: CuidSchema,
129
+ export const GetCreativeInputSchema = z.object({
130
+ value: z.cuid2(),
131
+ by: ProfileIdentifierSchema.shape.by,
131
132
  });
132
133
 
133
134
  export const GetCreativeQuerySchema = ProfileIdentifierSchema;
@@ -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
+ CreateCreativeOutputSchema,
9
+ GetCreativeOutputSchema,
10
+ UpdateCreativeOutputSchema,
11
+ } from "../schemas/creative";
13
12
 
14
13
  export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
15
14
 
16
15
  export type ListCreativesInput = z.infer<typeof ListCreativesInputSchema>;
17
16
 
18
- export type CreateCreativeInput = z.infer<
17
+ export type CreateCreativeProfileInput = z.infer<
19
18
  typeof CreateCreativeProfileInputSchema
20
19
  >;
21
- export type UpdateCreativeInput = z.infer<
20
+ export type UpdateCreativeProfileInput = z.infer<
22
21
  typeof UpdateCreativeProfileInputSchema
23
22
  >;
24
23
 
25
- export type GetCreativeParams = z.infer<typeof GetCreativeParamsSchema>;
26
-
27
- export type GetCreativeQuery = z.infer<typeof GetCreativeQuerySchema>;
24
+ export type GetCreativeInput = z.infer<typeof GetCreativeInputSchema>;
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>;