@zyacreatives/shared 2.5.57 → 2.5.58
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/message.d.ts +5 -0
- package/package.json +1 -1
- package/src/schemas/message.ts +12 -0
|
@@ -101,6 +101,7 @@ export declare const MessageFileEntitySchema: z.ZodObject<{
|
|
|
101
101
|
url: z.ZodURL;
|
|
102
102
|
order: z.ZodInt;
|
|
103
103
|
}, z.core.$strip>;
|
|
104
|
+
export type MessageFileEntity = z.infer<typeof MessageFileEntitySchema>;
|
|
104
105
|
export declare const MessageWithFilesEntitySchema: z.ZodObject<{
|
|
105
106
|
replyToContent: z.ZodOptional<z.ZodString>;
|
|
106
107
|
replyToImages: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
@@ -158,6 +159,7 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
|
|
|
158
159
|
order: z.ZodInt;
|
|
159
160
|
}, z.core.$strip>>;
|
|
160
161
|
}, z.core.$strip>;
|
|
162
|
+
export type MessageWithFilesEntity = z.infer<typeof MessageWithFilesEntitySchema>;
|
|
161
163
|
/**
|
|
162
164
|
* --------------------------------
|
|
163
165
|
* INPUTS
|
|
@@ -201,10 +203,12 @@ export declare const CreateMessageInputSchema: z.ZodObject<{
|
|
|
201
203
|
order: z.ZodInt;
|
|
202
204
|
}, z.core.$strip>>>;
|
|
203
205
|
}, z.core.$strip>;
|
|
206
|
+
export type CreateMessageInput = z.infer<typeof CreateMessageInputSchema>;
|
|
204
207
|
export declare const EditMessageInputSchema: z.ZodObject<{
|
|
205
208
|
messageId: z.ZodCUID2;
|
|
206
209
|
content: z.ZodOptional<z.ZodString>;
|
|
207
210
|
}, z.core.$strip>;
|
|
211
|
+
export type EditMessageInput = z.infer<typeof EditMessageInputSchema>;
|
|
208
212
|
/**
|
|
209
213
|
* --------------------------------
|
|
210
214
|
* OUTPUTS
|
|
@@ -270,4 +274,5 @@ export declare const GetMessagesOutputSchema: z.ZodObject<{
|
|
|
270
274
|
}, z.core.$strip>>;
|
|
271
275
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
272
276
|
}, z.core.$strip>;
|
|
277
|
+
export type GetMessagesOutput = z.infer<typeof GetMessagesOutputSchema>;
|
|
273
278
|
export {};
|
package/package.json
CHANGED
package/src/schemas/message.ts
CHANGED
|
@@ -68,10 +68,16 @@ export const MessageFileEntitySchema = z.object({
|
|
|
68
68
|
order: z.int(),
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
+
export type MessageFileEntity = z.infer<typeof MessageFileEntitySchema>;
|
|
72
|
+
|
|
71
73
|
export const MessageWithFilesEntitySchema = MessageEntitySchema.extend({
|
|
72
74
|
messageFiles: z.array(MessageFileEntitySchema),
|
|
73
75
|
});
|
|
74
76
|
|
|
77
|
+
export type MessageWithFilesEntity = z.infer<
|
|
78
|
+
typeof MessageWithFilesEntitySchema
|
|
79
|
+
>;
|
|
80
|
+
|
|
75
81
|
/**
|
|
76
82
|
* --------------------------------
|
|
77
83
|
* INPUTS
|
|
@@ -90,11 +96,15 @@ export const CreateMessageInputSchema = MessageShape.extend({
|
|
|
90
96
|
.optional(),
|
|
91
97
|
});
|
|
92
98
|
|
|
99
|
+
export type CreateMessageInput = z.infer<typeof CreateMessageInputSchema>;
|
|
100
|
+
|
|
93
101
|
export const EditMessageInputSchema = z.object({
|
|
94
102
|
messageId: z.cuid2(),
|
|
95
103
|
content: z.string().optional(),
|
|
96
104
|
});
|
|
97
105
|
|
|
106
|
+
export type EditMessageInput = z.infer<typeof EditMessageInputSchema>;
|
|
107
|
+
|
|
98
108
|
/**
|
|
99
109
|
* --------------------------------
|
|
100
110
|
* OUTPUTS
|
|
@@ -105,3 +115,5 @@ export const GetMessagesOutputSchema = z.object({
|
|
|
105
115
|
messages: z.array(MessageWithFilesEntitySchema),
|
|
106
116
|
nextCursor: z.string().optional(),
|
|
107
117
|
});
|
|
118
|
+
|
|
119
|
+
export type GetMessagesOutput = z.infer<typeof GetMessagesOutputSchema>;
|