@zyacreatives/shared 2.0.41 → 2.0.43

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.
@@ -32,3 +32,6 @@ export declare const CreateChatOutputSchema: z.ZodObject<{
32
32
  updatedAt: z.ZodCoercedDate<unknown>;
33
33
  deletedAt: z.ZodCoercedDate<unknown>;
34
34
  }, z.core.$strip>;
35
+ export declare const ChatIdSchema: z.ZodObject<{
36
+ chatId: z.ZodCUID2;
37
+ }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateChatOutputSchema = exports.CreateChatInputSchema = exports.ChatEntitySchema = exports.BaseChatEntitySchema = void 0;
3
+ exports.ChatIdSchema = exports.CreateChatOutputSchema = exports.CreateChatInputSchema = exports.ChatEntitySchema = exports.BaseChatEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  exports.BaseChatEntitySchema = zod_openapi_1.z.object({
6
6
  id: zod_openapi_1.z.cuid2(),
@@ -22,3 +22,6 @@ exports.CreateChatInputSchema = zod_openapi_1.z.object({
22
22
  receiverId: zod_openapi_1.z.cuid2(),
23
23
  });
24
24
  exports.CreateChatOutputSchema = exports.BaseChatEntitySchema;
25
+ exports.ChatIdSchema = zod_openapi_1.z.object({
26
+ chatId: zod_openapi_1.z.cuid2(),
27
+ });
@@ -26,6 +26,7 @@ export declare const MessageEntitySchema: z.ZodObject<{
26
26
  readonly MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS";
27
27
  }>>;
28
28
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
29
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
29
30
  deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
30
31
  }, z.core.$strip>;
31
32
  export declare const MessageFileEntitySchema: z.ZodObject<{
@@ -61,6 +62,7 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
61
62
  readonly MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS";
62
63
  }>>;
63
64
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
65
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
64
66
  deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
65
67
  messageFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
66
68
  id: z.ZodString;
@@ -123,5 +125,6 @@ export declare const CreateMessageOutputSchema: z.ZodObject<{
123
125
  readonly MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS";
124
126
  }>>;
125
127
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
128
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
126
129
  deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
127
130
  }, z.core.$strip>;
@@ -31,6 +31,7 @@ exports.MessageEntitySchema = zod_openapi_1.z.object({
31
31
  content: zod_openapi_1.z.string().optional(),
32
32
  messageType: zod_openapi_1.z.enum(constants_1.MESSAGE_TYPES).default(constants_1.MESSAGE_TYPES.DEFAULT_MESSAGE),
33
33
  createdAt: zod_openapi_1.z.coerce.date().optional(),
34
+ updatedAt: zod_openapi_1.z.coerce.date().optional(),
34
35
  deletedAt: zod_openapi_1.z.coerce.date().optional(),
35
36
  });
36
37
  exports.MessageFileEntitySchema = zod_openapi_1.z
@@ -1,6 +1,7 @@
1
1
  import z from "zod";
2
- import { BaseChatEntitySchema, ChatEntitySchema, CreateChatInputSchema, CreateChatOutputSchema } from "../schemas/chat";
2
+ import { BaseChatEntitySchema, ChatEntitySchema, ChatIdSchema, CreateChatInputSchema, CreateChatOutputSchema } from "../schemas/chat";
3
3
  export type BaseChatEntity = z.infer<typeof BaseChatEntitySchema>;
4
4
  export type ChatEntity = z.infer<typeof ChatEntitySchema>;
5
5
  export type CreateChatInput = z.infer<typeof CreateChatInputSchema>;
6
6
  export type CreateChatOutput = z.infer<typeof CreateChatOutputSchema>;
7
+ export type ChatIdInput = z.infer<typeof ChatIdSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.41",
3
+ "version": "2.0.43",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,3 +23,7 @@ export const CreateChatInputSchema = z.object({
23
23
  });
24
24
 
25
25
  export const CreateChatOutputSchema = BaseChatEntitySchema;
26
+
27
+ export const ChatIdSchema = z.object({
28
+ chatId: z.cuid2(),
29
+ });
@@ -29,6 +29,7 @@ export const MessageEntitySchema = z.object({
29
29
  content: z.string().optional(),
30
30
  messageType: z.enum(MESSAGE_TYPES).default(MESSAGE_TYPES.DEFAULT_MESSAGE),
31
31
  createdAt: z.coerce.date().optional(),
32
+ updatedAt: z.coerce.date().optional(),
32
33
  deletedAt: z.coerce.date().optional(),
33
34
  });
34
35
 
package/src/types/chat.ts CHANGED
@@ -2,6 +2,7 @@ import z from "zod";
2
2
  import {
3
3
  BaseChatEntitySchema,
4
4
  ChatEntitySchema,
5
+ ChatIdSchema,
5
6
  CreateChatInputSchema,
6
7
  CreateChatOutputSchema,
7
8
  } from "../schemas/chat";
@@ -13,3 +14,5 @@ export type ChatEntity = z.infer<typeof ChatEntitySchema>;
13
14
  export type CreateChatInput = z.infer<typeof CreateChatInputSchema>;
14
15
 
15
16
  export type CreateChatOutput = z.infer<typeof CreateChatOutputSchema>;
17
+
18
+ export type ChatIdInput = z.infer<typeof ChatIdSchema>;