@zyacreatives/shared 1.5.4 → 1.5.6

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.
@@ -43,3 +43,6 @@ export declare const GetPresignedDownloadUrlInputSchema: z.ZodObject<{
43
43
  export declare const GetPresignedDownloadUrlOutputSchema: z.ZodObject<{
44
44
  url: z.ZodURL;
45
45
  }, z.core.$strip>;
46
+ export declare const FileKeySchema: z.ZodObject<{
47
+ key: z.ZodString;
48
+ }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetPresignedDownloadUrlOutputSchema = exports.GetPresignedDownloadUrlInputSchema = exports.GetPresignedUploadUrlOutputSchema = exports.GetPresignedUploadUrlInputSchema = exports.DeleteFileOutputSchema = exports.DeleteFileInputSchema = exports.CreateFileOutputSchema = exports.CreateFileInputSchema = exports.FileUpdateInputSchema = exports.FileEntitySchema = void 0;
3
+ exports.FileKeySchema = exports.GetPresignedDownloadUrlOutputSchema = exports.GetPresignedDownloadUrlInputSchema = exports.GetPresignedUploadUrlOutputSchema = exports.GetPresignedUploadUrlInputSchema = exports.DeleteFileOutputSchema = exports.DeleteFileInputSchema = exports.CreateFileOutputSchema = exports.CreateFileInputSchema = exports.FileUpdateInputSchema = exports.FileEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  exports.FileEntitySchema = zod_openapi_1.z
6
6
  .object({
@@ -47,3 +47,6 @@ exports.GetPresignedDownloadUrlInputSchema = zod_openapi_1.z.object({
47
47
  fileId: zod_openapi_1.z.cuid2().openapi({ example: "0irjif0qur09481u90r1u" }),
48
48
  });
49
49
  exports.GetPresignedDownloadUrlOutputSchema = exports.GetPresignedUploadUrlOutputSchema;
50
+ exports.FileKeySchema = zod_openapi_1.z.object({
51
+ key: zod_openapi_1.z.string().max(400, { error: "Key should not be longner than 400 characters" }),
52
+ });
@@ -119,7 +119,7 @@ export declare const ProjectUpdateOutputEntitySchema: z.ZodObject<{
119
119
  }, z.core.$strip>;
120
120
  export declare const CreateProjectInputSchema: z.ZodObject<{
121
121
  title: z.ZodString;
122
- description: z.ZodDefault<z.ZodOptional<z.ZodString>>;
122
+ description: z.ZodOptional<z.ZodString>;
123
123
  url: z.ZodString;
124
124
  imagePlaceholderUrl: z.ZodURL;
125
125
  tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -138,7 +138,7 @@ export declare const CreateProjectInputSchema: z.ZodObject<{
138
138
  readonly BRAND: "BRAND";
139
139
  readonly NONE: "NONE";
140
140
  }>>;
141
- clientName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
141
+ clientName: z.ZodOptional<z.ZodString>;
142
142
  files: z.ZodArray<z.ZodObject<{
143
143
  key: z.ZodString;
144
144
  mimeType: z.ZodString;
@@ -202,7 +202,7 @@ exports.CreateProjectInputSchema = zod_openapi_1.z
202
202
  description: "Title of the project, 1-100 characters.",
203
203
  example: "E-commerce Mobile App",
204
204
  }),
205
- description: zod_openapi_1.z.string().max(1000).optional().default("").openapi({
205
+ description: zod_openapi_1.z.string().max(1000).optional().openapi({
206
206
  description: "Detailed description of the project, max 1000 characters.",
207
207
  example: "A modern e-commerce mobile application built with React Native.",
208
208
  }),
@@ -245,7 +245,7 @@ exports.CreateProjectInputSchema = zod_openapi_1.z
245
245
  description: "Type of client for this project.",
246
246
  example: "BRAND",
247
247
  }),
248
- clientName: zod_openapi_1.z.string().optional().default("").openapi({
248
+ clientName: zod_openapi_1.z.string().optional().openapi({
249
249
  description: "Name of the client.",
250
250
  example: "Acme Corp",
251
251
  }),
@@ -1,14 +1,12 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import { CreateFileInputSchema, CreateFileOutputSchema, DeleteFileInputSchema, DeleteFileOutputSchema, FileEntitySchema, FileUpdateInputSchema, GetPresignedDownloadUrlInputSchema, GetPresignedDownloadUrlOutputSchema, GetPresignedUploadUrlInputSchema, GetPresignedUploadUrlOutputSchema } from "../schemas/file";
2
+ import { CreateFileInputSchema, CreateFileOutputSchema, DeleteFileInputSchema, DeleteFileOutputSchema, FileEntitySchema, FileKeySchema, FileUpdateInputSchema, GetPresignedDownloadUrlInputSchema, GetPresignedDownloadUrlOutputSchema, GetPresignedUploadUrlInputSchema, GetPresignedUploadUrlOutputSchema } from "../schemas/file";
3
3
  export type FileEntity = z.infer<typeof FileEntitySchema>;
4
4
  export type CreateFileInput = z.infer<typeof CreateFileInputSchema>;
5
5
  export type CreateFileOutput = z.infer<typeof CreateFileOutputSchema>;
6
6
  export type FileUpdateEntity = z.infer<typeof FileUpdateInputSchema>;
7
7
  export type DeleteFileInput = z.infer<typeof DeleteFileInputSchema>;
8
8
  export type DeleteFileOutput = z.infer<typeof DeleteFileOutputSchema>;
9
- export type FileKeyInput = {
10
- key: string;
11
- };
9
+ export type FileKeyInput = z.infer<typeof FileKeySchema>;
12
10
  export type GetPresignedUploadUrlInput = z.infer<typeof GetPresignedUploadUrlInputSchema>;
13
11
  export type GetPresignedUploadUrlOutput = z.infer<typeof GetPresignedUploadUrlOutputSchema>;
14
12
  export type GetPresignedDownloadUrlInput = z.infer<typeof GetPresignedDownloadUrlInputSchema>;
@@ -1,5 +1,5 @@
1
1
  import type { z } from "@hono/zod-openapi";
2
- import type { ProjectEntitySchema, ProjectFileEntitySchema, ProjectWithFilesEntitySchema, ProjectViewEntitySchema, ProjectLikeEntitySchema, ProjectCommentEntitySchema, ProjectBookmarkEntitySchema, ProjectUpdateOutputEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, ProjectIdSchema, CommentOnProjectParamsSchema, CommentOnProjectInputSchema, CommentOnProjectOutputSchema, DeleteProjectInputSchema, DeleteProjectCommentParamsSchema, DeleteProjectCommentOutputSchema, DeleteProjectOutputSchema, GetProjectParamsSchema, GetProjectOutputSchema, BookmarkProjectParamsSchema, BookmarkProjectOutputSchema, LikeProjectParamsSchema, UnlikeProjectParamsSchema, ViewProjectInputSchema, MinimalProjectSchema, ListProjectsInputSchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithProjectLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema } from "../schemas/project";
2
+ import type { ProjectEntitySchema, ProjectFileEntitySchema, ProjectWithFilesEntitySchema, ProjectViewEntitySchema, ProjectLikeEntitySchema, ProjectCommentEntitySchema, ProjectBookmarkEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, CommentOnProjectInputSchema, CommentOnProjectOutputSchema, DeleteProjectInputSchema, DeleteProjectCommentOutputSchema, DeleteProjectOutputSchema, GetProjectOutputSchema, BookmarkProjectOutputSchema, ViewProjectInputSchema, MinimalProjectSchema, ListProjectsInputSchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithProjectLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema } from "../schemas/project";
3
3
  export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
4
4
  export type ProjectFileEntity = z.infer<typeof ProjectFileEntitySchema>;
5
5
  export type ProjectWithFilesEntity = z.infer<typeof ProjectWithFilesEntitySchema>;
@@ -7,25 +7,17 @@ export type ProjectViewEntity = z.infer<typeof ProjectViewEntitySchema>;
7
7
  export type ProjectLikeEntity = z.infer<typeof ProjectLikeEntitySchema>;
8
8
  export type ProjectCommentEntity = z.infer<typeof ProjectCommentEntitySchema>;
9
9
  export type ProjectBookmarkEntity = z.infer<typeof ProjectBookmarkEntitySchema>;
10
- export type ProjectUpdateOutputEntity = z.infer<typeof ProjectUpdateOutputEntitySchema>;
11
10
  export type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;
12
11
  export type CreateProjectOutput = z.infer<typeof CreateProjectOutputSchema>;
13
12
  export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
14
13
  export type UpdateProjectOutput = z.infer<typeof UpdateProjectOutputSchema>;
15
- export type ProjectId = z.infer<typeof ProjectIdSchema>;
16
- export type CommentOnProjectParams = z.infer<typeof CommentOnProjectParamsSchema>;
17
14
  export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
18
15
  export type CommentOnProjectOutput = z.infer<typeof CommentOnProjectOutputSchema>;
19
16
  export type DeleteProjectInput = z.infer<typeof DeleteProjectInputSchema>;
20
- export type DeleteProjectCommentParams = z.infer<typeof DeleteProjectCommentParamsSchema>;
21
17
  export type DeleteProjectCommentOutput = z.infer<typeof DeleteProjectCommentOutputSchema>;
22
18
  export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
23
- export type GetProjectParams = z.infer<typeof GetProjectParamsSchema>;
24
19
  export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
25
- export type BookmarkProjectParams = z.infer<typeof BookmarkProjectParamsSchema>;
26
20
  export type BookmarkProjectOutput = z.infer<typeof BookmarkProjectOutputSchema>;
27
- export type LikeProjectParams = z.infer<typeof LikeProjectParamsSchema>;
28
- export type UnlikeProjectParams = z.infer<typeof UnlikeProjectParamsSchema>;
29
21
  export type ViewProjectInput = z.infer<typeof ViewProjectInputSchema>;
30
22
  export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
31
23
  export type ListProjectsInput = z.infer<typeof ListProjectsInputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,3 +55,7 @@ export const GetPresignedDownloadUrlInputSchema = z.object({
55
55
 
56
56
  export const GetPresignedDownloadUrlOutputSchema =
57
57
  GetPresignedUploadUrlOutputSchema;
58
+
59
+ export const FileKeySchema = z.object({
60
+ key: z.string().max(400, {error: "Key should not be longner than 400 characters"}),
61
+ });
@@ -212,7 +212,7 @@ export const CreateProjectInputSchema = z
212
212
  description: "Title of the project, 1-100 characters.",
213
213
  example: "E-commerce Mobile App",
214
214
  }),
215
- description: z.string().max(1000).optional().default("").openapi({
215
+ description: z.string().max(1000).optional().openapi({
216
216
  description: "Detailed description of the project, max 1000 characters.",
217
217
  example:
218
218
  "A modern e-commerce mobile application built with React Native.",
@@ -256,7 +256,7 @@ export const CreateProjectInputSchema = z
256
256
  description: "Type of client for this project.",
257
257
  example: "BRAND",
258
258
  }),
259
- clientName: z.string().optional().default("").openapi({
259
+ clientName: z.string().optional().openapi({
260
260
  description: "Name of the client.",
261
261
  example: "Acme Corp",
262
262
  }),
package/src/types/file.ts CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  DeleteFileInputSchema,
6
6
  DeleteFileOutputSchema,
7
7
  FileEntitySchema,
8
+ FileKeySchema,
8
9
  FileUpdateInputSchema,
9
10
  GetPresignedDownloadUrlInputSchema,
10
11
  GetPresignedDownloadUrlOutputSchema,
@@ -22,8 +23,7 @@ export type FileUpdateEntity = z.infer<typeof FileUpdateInputSchema>;
22
23
  export type DeleteFileInput = z.infer<typeof DeleteFileInputSchema>;
23
24
  export type DeleteFileOutput = z.infer<typeof DeleteFileOutputSchema>;
24
25
 
25
- export type FileKeyInput = { key: string };
26
-
26
+ export type FileKeyInput = z.infer<typeof FileKeySchema>;
27
27
  export type GetPresignedUploadUrlInput = z.infer<
28
28
  typeof GetPresignedUploadUrlInputSchema
29
29
  >;
@@ -7,25 +7,17 @@ import type {
7
7
  ProjectLikeEntitySchema,
8
8
  ProjectCommentEntitySchema,
9
9
  ProjectBookmarkEntitySchema,
10
- ProjectUpdateOutputEntitySchema,
11
10
  CreateProjectInputSchema,
12
11
  CreateProjectOutputSchema,
13
12
  UpdateProjectInputSchema,
14
13
  UpdateProjectOutputSchema,
15
- ProjectIdSchema,
16
- CommentOnProjectParamsSchema,
17
14
  CommentOnProjectInputSchema,
18
15
  CommentOnProjectOutputSchema,
19
16
  DeleteProjectInputSchema,
20
- DeleteProjectCommentParamsSchema,
21
17
  DeleteProjectCommentOutputSchema,
22
18
  DeleteProjectOutputSchema,
23
- GetProjectParamsSchema,
24
19
  GetProjectOutputSchema,
25
- BookmarkProjectParamsSchema,
26
20
  BookmarkProjectOutputSchema,
27
- LikeProjectParamsSchema,
28
- UnlikeProjectParamsSchema,
29
21
  ViewProjectInputSchema,
30
22
  MinimalProjectSchema,
31
23
  ListProjectsInputSchema,
@@ -37,58 +29,31 @@ import type {
37
29
 
38
30
  export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
39
31
  export type ProjectFileEntity = z.infer<typeof ProjectFileEntitySchema>;
40
-
41
- export type ProjectWithFilesEntity = z.infer<
42
- typeof ProjectWithFilesEntitySchema
43
- >;
32
+ export type ProjectWithFilesEntity = z.infer<typeof ProjectWithFilesEntitySchema>;
44
33
  export type ProjectViewEntity = z.infer<typeof ProjectViewEntitySchema>;
45
34
  export type ProjectLikeEntity = z.infer<typeof ProjectLikeEntitySchema>;
46
35
  export type ProjectCommentEntity = z.infer<typeof ProjectCommentEntitySchema>;
47
36
  export type ProjectBookmarkEntity = z.infer<typeof ProjectBookmarkEntitySchema>;
48
- export type ProjectUpdateOutputEntity = z.infer<
49
- typeof ProjectUpdateOutputEntitySchema
50
- >;
51
37
 
52
38
  export type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;
53
39
  export type CreateProjectOutput = z.infer<typeof CreateProjectOutputSchema>;
54
40
  export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
55
41
  export type UpdateProjectOutput = z.infer<typeof UpdateProjectOutputSchema>;
56
42
 
57
- export type ProjectId = z.infer<typeof ProjectIdSchema>;
58
- export type CommentOnProjectParams = z.infer<
59
- typeof CommentOnProjectParamsSchema
60
- >;
43
+
61
44
  export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
62
- export type CommentOnProjectOutput = z.infer<
63
- typeof CommentOnProjectOutputSchema
64
- >;
45
+ export type CommentOnProjectOutput = z.infer<typeof CommentOnProjectOutputSchema>;
65
46
  export type DeleteProjectInput = z.infer<typeof DeleteProjectInputSchema>;
66
- export type DeleteProjectCommentParams = z.infer<
67
- typeof DeleteProjectCommentParamsSchema
68
- >;
69
- export type DeleteProjectCommentOutput = z.infer<
70
- typeof DeleteProjectCommentOutputSchema
71
- >;
47
+ export type DeleteProjectCommentOutput = z.infer<typeof DeleteProjectCommentOutputSchema>;
72
48
  export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
73
- export type GetProjectParams = z.infer<typeof GetProjectParamsSchema>;
74
49
  export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
75
- export type BookmarkProjectParams = z.infer<typeof BookmarkProjectParamsSchema>;
76
50
  export type BookmarkProjectOutput = z.infer<typeof BookmarkProjectOutputSchema>;
77
- export type LikeProjectParams = z.infer<typeof LikeProjectParamsSchema>;
78
- export type UnlikeProjectParams = z.infer<typeof UnlikeProjectParamsSchema>;
79
51
  export type ViewProjectInput = z.infer<typeof ViewProjectInputSchema>;
80
52
 
81
53
  export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
82
54
  export type ListProjectsInput = z.infer<typeof ListProjectsInputSchema>;
83
- export type ProjectWithProjectViewsEntity = z.infer<
84
- typeof ProjectWithProjectViewsEntitySchema
85
- >;
86
- export type ProjectWithProjectCommentsEntity = z.infer<
87
- typeof ProjectWithProjectCommentsEntitySchema
88
- >;
89
- export type ProjectWithProjectLikesEntity = z.infer<
90
- typeof ProjectWithProjectLikesEntitySchema
91
- >;
92
- export type ProjectWithProjectBookmarksEntity = z.infer<
93
- typeof ProjectWithProjectBookmarksEntitySchema
94
- >;
55
+
56
+ export type ProjectWithProjectViewsEntity = z.infer<typeof ProjectWithProjectViewsEntitySchema>;
57
+ export type ProjectWithProjectCommentsEntity = z.infer<typeof ProjectWithProjectCommentsEntitySchema>;
58
+ export type ProjectWithProjectLikesEntity = z.infer<typeof ProjectWithProjectLikesEntitySchema>;
59
+ export type ProjectWithProjectBookmarksEntity = z.infer<typeof ProjectWithProjectBookmarksEntitySchema>;