@zyacreatives/shared 2.0.18 → 2.0.20
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/job.d.ts +6 -0
- package/dist/schemas/job.js +3 -0
- package/dist/schemas/post.d.ts +9 -0
- package/dist/schemas/post.js +10 -1
- package/dist/types/post.d.ts +3 -1
- package/package.json +1 -1
- package/src/schemas/job.ts +3 -0
- package/src/schemas/post.ts +11 -0
- package/src/types/post.ts +4 -0
package/dist/schemas/job.d.ts
CHANGED
|
@@ -530,6 +530,12 @@ export declare const UpdateJobInputSchema: z.ZodObject<{
|
|
|
530
530
|
[x: string]: string;
|
|
531
531
|
}>>>>;
|
|
532
532
|
id: z.ZodCUID2;
|
|
533
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
534
|
+
ACTIVE: "ACTIVE";
|
|
535
|
+
DELETED: "DELETED";
|
|
536
|
+
DRAFT: "DRAFT";
|
|
537
|
+
ARCHIVED: "ARCHIVED";
|
|
538
|
+
}>>;
|
|
533
539
|
}, z.core.$strip>;
|
|
534
540
|
export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
535
541
|
title: z.ZodString;
|
package/dist/schemas/job.js
CHANGED
|
@@ -193,6 +193,9 @@ exports.UpdateRoleJobInputSchema = exports.CreateRoleJobInputSchema.partial().re
|
|
|
193
193
|
exports.UpdateGigJobInputSchema = exports.CreateGigJobInputSchema.partial().required({ id: true });
|
|
194
194
|
exports.UpdateJobInputSchema = exports.CreateJobInputSchema.partial().extend({
|
|
195
195
|
id: zod_1.z.cuid2(),
|
|
196
|
+
status: zod_1.z
|
|
197
|
+
.enum(Object.values(constants_1.JOB_STATUS))
|
|
198
|
+
.optional(),
|
|
196
199
|
});
|
|
197
200
|
exports.NormalizedJobOutputSchema = zod_1.z.discriminatedUnion("jobType", [
|
|
198
201
|
exports.JobWithGigDetailsEntitySchema,
|
package/dist/schemas/post.d.ts
CHANGED
|
@@ -210,3 +210,12 @@ export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
|
|
|
210
210
|
}>;
|
|
211
211
|
}, z.core.$strip>>;
|
|
212
212
|
}, z.core.$strip>;
|
|
213
|
+
export declare const LinkPreviewInputSchema: z.ZodObject<{
|
|
214
|
+
url: z.ZodString;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
export declare const LinkPreviewOutputSchema: z.ZodObject<{
|
|
217
|
+
title: z.ZodString;
|
|
218
|
+
description: z.ZodOptional<z.ZodString>;
|
|
219
|
+
image: z.ZodOptional<z.ZodString>;
|
|
220
|
+
url: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, z.core.$strip>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostWithBookmarksEntitySchema = exports.PostWithCommentsEntitySchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
|
|
3
|
+
exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.PostWithBookmarksEntitySchema = exports.PostWithCommentsEntitySchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const file_1 = require("./file");
|
|
@@ -129,3 +129,12 @@ exports.PostWithBookmarksEntitySchema = exports.MinimalPostSchema.extend({
|
|
|
129
129
|
}).openapi({
|
|
130
130
|
title: "PostWithPostBookmarksEntity",
|
|
131
131
|
});
|
|
132
|
+
exports.LinkPreviewInputSchema = zod_openapi_1.z.object({
|
|
133
|
+
url: zod_openapi_1.z.string(),
|
|
134
|
+
});
|
|
135
|
+
exports.LinkPreviewOutputSchema = zod_openapi_1.z.object({
|
|
136
|
+
title: zod_openapi_1.z.string(),
|
|
137
|
+
description: zod_openapi_1.z.string().optional(),
|
|
138
|
+
image: zod_openapi_1.z.string().optional(),
|
|
139
|
+
url: zod_openapi_1.z.string().optional(),
|
|
140
|
+
});
|
package/dist/types/post.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreatePostInputSchema, CreatePostOutputSchema, GetPostOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } from "../schemas/post";
|
|
2
|
+
import { CreatePostInputSchema, CreatePostOutputSchema, GetPostOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } from "../schemas/post";
|
|
3
3
|
export type PostEntity = z.infer<typeof PostEntitySchema>;
|
|
4
4
|
export type PostFileEntity = z.infer<typeof PostFileEntitySchema>;
|
|
5
5
|
export type PostWithFilesEntity = z.infer<typeof PostWithFilesEntitySchema>;
|
|
@@ -10,3 +10,5 @@ export type PostWithPostBookmarksEntity = z.infer<typeof PostWithBookmarksEntity
|
|
|
10
10
|
export type PostIdInput = z.infer<typeof PostIdSchema>;
|
|
11
11
|
export type PostWithPostCommentsEntity = z.infer<typeof PostWithCommentsEntitySchema>;
|
|
12
12
|
export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
|
13
|
+
export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
14
|
+
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -255,6 +255,9 @@ export const UpdateGigJobInputSchema =
|
|
|
255
255
|
|
|
256
256
|
export const UpdateJobInputSchema = CreateJobInputSchema.partial().extend({
|
|
257
257
|
id: z.cuid2(),
|
|
258
|
+
status: z
|
|
259
|
+
.enum(Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]])
|
|
260
|
+
.optional(),
|
|
258
261
|
});
|
|
259
262
|
|
|
260
263
|
export const NormalizedJobOutputSchema = z.discriminatedUnion("jobType", [
|
package/src/schemas/post.ts
CHANGED
|
@@ -147,3 +147,14 @@ export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
|
|
|
147
147
|
}).openapi({
|
|
148
148
|
title: "PostWithPostBookmarksEntity",
|
|
149
149
|
});
|
|
150
|
+
|
|
151
|
+
export const LinkPreviewInputSchema = z.object({
|
|
152
|
+
url: z.string(),
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
export const LinkPreviewOutputSchema = z.object({
|
|
156
|
+
title: z.string(),
|
|
157
|
+
description: z.string().optional(),
|
|
158
|
+
image: z.string().optional(),
|
|
159
|
+
url: z.string().optional(),
|
|
160
|
+
});
|
package/src/types/post.ts
CHANGED
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
CreatePostInputSchema,
|
|
4
4
|
CreatePostOutputSchema,
|
|
5
5
|
GetPostOutputSchema,
|
|
6
|
+
LinkPreviewInputSchema,
|
|
7
|
+
LinkPreviewOutputSchema,
|
|
6
8
|
PostEntitySchema,
|
|
7
9
|
PostFileEntitySchema,
|
|
8
10
|
PostIdSchema,
|
|
@@ -26,3 +28,5 @@ export type PostWithPostCommentsEntity = z.infer<
|
|
|
26
28
|
typeof PostWithCommentsEntitySchema
|
|
27
29
|
>;
|
|
28
30
|
export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
|
31
|
+
export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
32
|
+
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|