@zyacreatives/shared 2.0.42 → 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
+ });
@@ -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.42",
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
+ });
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>;