@zyacreatives/shared 2.0.71 → 2.0.72

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.
@@ -39,9 +39,8 @@ export declare const CreativeEntitySchema: z.ZodObject<{
39
39
  description: z.ZodOptional<z.ZodString>;
40
40
  }, z.core.$strip>>>;
41
41
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
- name: z.ZodString;
43
- url: z.ZodURL;
44
- type: z.ZodDefault<z.ZodEnum<{
42
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
43
+ type: z.ZodOptional<z.ZodEnum<{
45
44
  readonly INSTAGRAM: "Instagram";
46
45
  readonly LINKEDIN: "LinkedIn";
47
46
  readonly TWITTER: "Twitter";
@@ -104,9 +103,8 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
104
103
  description: z.ZodOptional<z.ZodString>;
105
104
  }, z.core.$strip>>>;
106
105
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
- name: z.ZodString;
108
- url: z.ZodURL;
109
- type: z.ZodDefault<z.ZodEnum<{
106
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
107
+ type: z.ZodOptional<z.ZodEnum<{
110
108
  readonly INSTAGRAM: "Instagram";
111
109
  readonly LINKEDIN: "LinkedIn";
112
110
  readonly TWITTER: "Twitter";
@@ -157,9 +155,8 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
157
155
  description: z.ZodOptional<z.ZodString>;
158
156
  }, z.core.$strip>>>;
159
157
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
160
- name: z.ZodString;
161
- url: z.ZodURL;
162
- type: z.ZodDefault<z.ZodEnum<{
158
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
159
+ type: z.ZodOptional<z.ZodEnum<{
163
160
  readonly INSTAGRAM: "Instagram";
164
161
  readonly LINKEDIN: "LinkedIn";
165
162
  readonly TWITTER: "Twitter";
@@ -199,9 +196,8 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
199
196
  description: z.ZodOptional<z.ZodString>;
200
197
  }, z.core.$strip>>>;
201
198
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
202
- name: z.ZodString;
203
- url: z.ZodURL;
204
- type: z.ZodDefault<z.ZodEnum<{
199
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
200
+ type: z.ZodOptional<z.ZodEnum<{
205
201
  readonly INSTAGRAM: "Instagram";
206
202
  readonly LINKEDIN: "LinkedIn";
207
203
  readonly TWITTER: "Twitter";
@@ -241,9 +237,8 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
241
237
  description: z.ZodOptional<z.ZodString>;
242
238
  }, z.core.$strip>>>;
243
239
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
244
- name: z.ZodString;
245
- url: z.ZodURL;
246
- type: z.ZodDefault<z.ZodEnum<{
240
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
241
+ type: z.ZodOptional<z.ZodEnum<{
247
242
  readonly INSTAGRAM: "Instagram";
248
243
  readonly LINKEDIN: "LinkedIn";
249
244
  readonly TWITTER: "Twitter";
@@ -65,9 +65,13 @@ exports.CreativeEntitySchema = zod_openapi_1.z
65
65
  .optional(),
66
66
  links: zod_openapi_1.z
67
67
  .object({
68
- name: zod_openapi_1.z.string(),
69
- url: zod_openapi_1.z.url(),
70
- type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
68
+ url: zod_openapi_1.z
69
+ .union([
70
+ zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
71
+ zod_openapi_1.z.literal(""),
72
+ ])
73
+ .optional(),
74
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).optional(),
71
75
  })
72
76
  .array()
73
77
  .optional(),
@@ -191,9 +195,13 @@ exports.UpdateCreativeProfileInputSchema = zod_openapi_1.z
191
195
  .optional(),
192
196
  links: zod_openapi_1.z
193
197
  .object({
194
- name: zod_openapi_1.z.string(),
195
- url: zod_openapi_1.z.url(),
196
- type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
198
+ url: zod_openapi_1.z
199
+ .union([
200
+ zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
201
+ zod_openapi_1.z.literal(""),
202
+ ])
203
+ .optional(),
204
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).optional(),
197
205
  })
198
206
  .array()
199
207
  .optional(),
@@ -145,9 +145,8 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
145
145
  description: z.ZodOptional<z.ZodString>;
146
146
  }, z.core.$strip>>>;
147
147
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
148
- name: z.ZodString;
149
- url: z.ZodURL;
150
- type: z.ZodDefault<z.ZodEnum<{
148
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
149
+ type: z.ZodOptional<z.ZodEnum<{
151
150
  readonly INSTAGRAM: "Instagram";
152
151
  readonly LINKEDIN: "LinkedIn";
153
152
  readonly TWITTER: "Twitter";
@@ -532,9 +531,8 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
532
531
  description: z.ZodOptional<z.ZodString>;
533
532
  }, z.core.$strip>>>;
534
533
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
535
- name: z.ZodString;
536
- url: z.ZodURL;
537
- type: z.ZodDefault<z.ZodEnum<{
534
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
535
+ type: z.ZodOptional<z.ZodEnum<{
538
536
  readonly INSTAGRAM: "Instagram";
539
537
  readonly LINKEDIN: "LinkedIn";
540
538
  readonly TWITTER: "Twitter";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.71",
3
+ "version": "2.0.72",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,6 @@ export const MinimalCreativeEntitySchema = z.object({
24
24
  .array(z.string())
25
25
  .optional()
26
26
  .openapi({ example: ["branding", "typography", "UX"] }),
27
-
28
27
  disciplines: z
29
28
  .array(z.string())
30
29
  .optional()
@@ -77,9 +76,13 @@ export const CreativeEntitySchema = z
77
76
  .optional(),
78
77
  links: z
79
78
  .object({
80
- name: z.string(),
81
- url: z.url(),
82
- type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
79
+ url: z
80
+ .union([
81
+ z.url({ message: "Please enter a valid URL" }),
82
+ z.literal(""),
83
+ ])
84
+ .optional(),
85
+ type: z.enum(LINK_TYPES).optional(),
83
86
  })
84
87
  .array()
85
88
  .optional(),
@@ -224,9 +227,13 @@ export const UpdateCreativeProfileInputSchema = z
224
227
  .optional(),
225
228
  links: z
226
229
  .object({
227
- name: z.string(),
228
- url: z.url(),
229
- type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
230
+ url: z
231
+ .union([
232
+ z.url({ message: "Please enter a valid URL" }),
233
+ z.literal(""),
234
+ ])
235
+ .optional(),
236
+ type: z.enum(LINK_TYPES).optional(),
230
237
  })
231
238
  .array()
232
239
  .optional(),