@zyacreatives/shared 2.0.43 → 2.0.45
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/chat.d.ts +13 -0
- package/dist/schemas/chat.js +2 -1
- package/dist/schemas/message.d.ts +6 -0
- package/dist/schemas/message.js +2 -1
- package/dist/types/chat.d.ts +2 -1
- package/dist/types/message.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/chat.ts +2 -0
- package/src/schemas/message.ts +2 -0
- package/src/types/chat.ts +3 -0
- package/src/types/message.ts +3 -0
package/dist/schemas/chat.d.ts
CHANGED
|
@@ -35,3 +35,16 @@ export declare const CreateChatOutputSchema: z.ZodObject<{
|
|
|
35
35
|
export declare const ChatIdSchema: z.ZodObject<{
|
|
36
36
|
chatId: z.ZodCUID2;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
|
+
export declare const GetChatsOutputSchema: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodCUID2;
|
|
40
|
+
senderId: z.ZodCUID2;
|
|
41
|
+
receiverId: z.ZodCUID2;
|
|
42
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
43
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
44
|
+
deletedAt: z.ZodCoercedDate<unknown>;
|
|
45
|
+
senderImgUrl: z.ZodOptional<z.ZodString>;
|
|
46
|
+
senderName: z.ZodString;
|
|
47
|
+
receiverImgUrl: z.ZodOptional<z.ZodString>;
|
|
48
|
+
receiverName: z.ZodString;
|
|
49
|
+
lastMessageSent: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>>;
|
package/dist/schemas/chat.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatIdSchema = exports.CreateChatOutputSchema = exports.CreateChatInputSchema = exports.ChatEntitySchema = exports.BaseChatEntitySchema = void 0;
|
|
3
|
+
exports.GetChatsOutputSchema = 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(),
|
|
@@ -25,3 +25,4 @@ exports.CreateChatOutputSchema = exports.BaseChatEntitySchema;
|
|
|
25
25
|
exports.ChatIdSchema = zod_openapi_1.z.object({
|
|
26
26
|
chatId: zod_openapi_1.z.cuid2(),
|
|
27
27
|
});
|
|
28
|
+
exports.GetChatsOutputSchema = zod_openapi_1.z.array(exports.ChatEntitySchema);
|
|
@@ -128,3 +128,9 @@ export declare const CreateMessageOutputSchema: z.ZodObject<{
|
|
|
128
128
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
129
129
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
130
130
|
}, z.core.$strip>;
|
|
131
|
+
export declare const GetMessagesOutputSchema: z.ZodArray<z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
messageId: z.ZodString;
|
|
134
|
+
fileId: z.ZodString;
|
|
135
|
+
order: z.ZodNumber;
|
|
136
|
+
}, z.core.$strip>>;
|
package/dist/schemas/message.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateMessageOutputSchema = exports.CreateMessageInputSchema = exports.MessageWithFilesEntitySchema = exports.MessageFileEntitySchema = exports.MessageEntitySchema = void 0;
|
|
3
|
+
exports.GetMessagesOutputSchema = exports.CreateMessageOutputSchema = exports.CreateMessageInputSchema = exports.MessageWithFilesEntitySchema = exports.MessageFileEntitySchema = exports.MessageEntitySchema = 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");
|
|
@@ -102,3 +102,4 @@ exports.CreateMessageInputSchema = zod_openapi_1.z.object({
|
|
|
102
102
|
}),
|
|
103
103
|
});
|
|
104
104
|
exports.CreateMessageOutputSchema = exports.MessageEntitySchema;
|
|
105
|
+
exports.GetMessagesOutputSchema = zod_openapi_1.z.array(exports.MessageFileEntitySchema);
|
package/dist/types/chat.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { BaseChatEntitySchema, ChatEntitySchema, ChatIdSchema, CreateChatInputSchema, CreateChatOutputSchema } from "../schemas/chat";
|
|
2
|
+
import { BaseChatEntitySchema, ChatEntitySchema, ChatIdSchema, CreateChatInputSchema, CreateChatOutputSchema, GetChatsOutputSchema } 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
7
|
export type ChatIdInput = z.infer<typeof ChatIdSchema>;
|
|
8
|
+
export type GetChatsOutput = z.infer<typeof GetChatsOutputSchema>;
|
package/dist/types/message.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { CreateMessageInputSchema, CreateMessageOutputSchema, MessageEntitySchema, MessageFileEntitySchema, MessageWithFilesEntitySchema } from "../schemas/message";
|
|
2
|
+
import { CreateMessageInputSchema, CreateMessageOutputSchema, GetMessagesOutputSchema, MessageEntitySchema, MessageFileEntitySchema, MessageWithFilesEntitySchema } from "../schemas/message";
|
|
3
3
|
export type MessageEntity = z.infer<typeof MessageEntitySchema>;
|
|
4
4
|
export type MessageFileEntity = z.infer<typeof MessageFileEntitySchema>;
|
|
5
5
|
export type MessageWithFilesEntity = z.infer<typeof MessageWithFilesEntitySchema>;
|
|
6
6
|
export type CreateMessageInput = z.infer<typeof CreateMessageInputSchema>;
|
|
7
7
|
export type CreateMessageOutput = z.infer<typeof CreateMessageOutputSchema>;
|
|
8
|
+
export type GetMessagesOutput = z.infer<typeof GetMessagesOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/chat.ts
CHANGED
package/src/schemas/message.ts
CHANGED
package/src/types/chat.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ChatIdSchema,
|
|
6
6
|
CreateChatInputSchema,
|
|
7
7
|
CreateChatOutputSchema,
|
|
8
|
+
GetChatsOutputSchema,
|
|
8
9
|
} from "../schemas/chat";
|
|
9
10
|
|
|
10
11
|
export type BaseChatEntity = z.infer<typeof BaseChatEntitySchema>;
|
|
@@ -16,3 +17,5 @@ export type CreateChatInput = z.infer<typeof CreateChatInputSchema>;
|
|
|
16
17
|
export type CreateChatOutput = z.infer<typeof CreateChatOutputSchema>;
|
|
17
18
|
|
|
18
19
|
export type ChatIdInput = z.infer<typeof ChatIdSchema>;
|
|
20
|
+
|
|
21
|
+
export type GetChatsOutput = z.infer<typeof GetChatsOutputSchema>;
|
package/src/types/message.ts
CHANGED
|
@@ -2,6 +2,7 @@ import z from "zod";
|
|
|
2
2
|
import {
|
|
3
3
|
CreateMessageInputSchema,
|
|
4
4
|
CreateMessageOutputSchema,
|
|
5
|
+
GetMessagesOutputSchema,
|
|
5
6
|
MessageEntitySchema,
|
|
6
7
|
MessageFileEntitySchema,
|
|
7
8
|
MessageWithFilesEntitySchema,
|
|
@@ -18,3 +19,5 @@ export type MessageWithFilesEntity = z.infer<
|
|
|
18
19
|
export type CreateMessageInput = z.infer<typeof CreateMessageInputSchema>;
|
|
19
20
|
|
|
20
21
|
export type CreateMessageOutput = z.infer<typeof CreateMessageOutputSchema>;
|
|
22
|
+
|
|
23
|
+
export type GetMessagesOutput = z.infer<typeof GetMessagesOutputSchema>;
|