@zyacreatives/shared 2.2.66 → 2.2.68
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.
|
@@ -46,6 +46,8 @@ export declare const MessageEntitySchema: z.ZodObject<{
|
|
|
46
46
|
}, z.core.$strip>>;
|
|
47
47
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
48
48
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
deletedBySender: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
|
+
deletedByReceiver: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
51
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
52
|
}, z.core.$strip>;
|
|
51
53
|
export declare const MessageFileEntitySchema: z.ZodObject<{
|
|
@@ -96,6 +98,8 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
|
|
|
96
98
|
}, z.core.$strip>>;
|
|
97
99
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
98
100
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
101
|
+
deletedBySender: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
102
|
+
deletedByReceiver: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
99
103
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
100
104
|
messageFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
101
105
|
id: z.ZodCUID2;
|
|
@@ -176,6 +180,8 @@ export declare const GetMessagesOutputSchema: z.ZodObject<{
|
|
|
176
180
|
}, z.core.$strip>>;
|
|
177
181
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
178
182
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
183
|
+
deletedBySender: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
184
|
+
deletedByReceiver: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
179
185
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
180
186
|
messageFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
181
187
|
id: z.ZodCUID2;
|
package/dist/schemas/message.js
CHANGED
|
@@ -32,6 +32,8 @@ exports.MessageEntitySchema = zod_openapi_1.z.object({
|
|
|
32
32
|
linkMeta: exports.LinkMetaSchema.optional(),
|
|
33
33
|
createdAt: zod_openapi_1.z.coerce.date(),
|
|
34
34
|
updatedAt: zod_openapi_1.z.coerce.date().optional(),
|
|
35
|
+
deletedBySender: zod_openapi_1.z.coerce.date().optional(),
|
|
36
|
+
deletedByReceiver: zod_openapi_1.z.coerce.date().optional(),
|
|
35
37
|
deletedAt: zod_openapi_1.z.coerce.date().optional(),
|
|
36
38
|
});
|
|
37
39
|
exports.MessageFileEntitySchema = zod_openapi_1.z.object({
|
package/dist/utils/slugify.d.ts
CHANGED
package/dist/utils/slugify.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.slugify = void 0;
|
|
3
|
+
exports.unslugify = exports.slugify = void 0;
|
|
4
4
|
const slugify = ({ value }) => {
|
|
5
5
|
return value
|
|
6
6
|
.normalize("NFKD")
|
|
@@ -12,3 +12,11 @@ const slugify = ({ value }) => {
|
|
|
12
12
|
.replace(/__+/g, "_"); // Collapse multiple underscores
|
|
13
13
|
};
|
|
14
14
|
exports.slugify = slugify;
|
|
15
|
+
const unslugify = ({ value }) => {
|
|
16
|
+
return value
|
|
17
|
+
.replace(/_/g, " ") // Replace underscores with spaces
|
|
18
|
+
.replace(/\s+/g, " ") // Collapse multiple spaces
|
|
19
|
+
.trim() // Trim leading/trailing spaces
|
|
20
|
+
.replace(/\b\w/g, (c) => c.toUpperCase()); // Capitalize first letter of each word
|
|
21
|
+
};
|
|
22
|
+
exports.unslugify = unslugify;
|
package/package.json
CHANGED
package/src/schemas/message.ts
CHANGED
|
@@ -35,6 +35,8 @@ export const MessageEntitySchema = z.object({
|
|
|
35
35
|
linkMeta: LinkMetaSchema.optional(),
|
|
36
36
|
createdAt: z.coerce.date(),
|
|
37
37
|
updatedAt: z.coerce.date().optional(),
|
|
38
|
+
deletedBySender: z.coerce.date().optional(),
|
|
39
|
+
deletedByReceiver: z.coerce.date().optional(),
|
|
38
40
|
deletedAt: z.coerce.date().optional(),
|
|
39
41
|
});
|
|
40
42
|
|
package/src/utils/slugify.ts
CHANGED
|
@@ -8,3 +8,11 @@ export const slugify = ({ value }: { value: string }) => {
|
|
|
8
8
|
.replace(/^_+|_+$/g, "") // Trim leading/trailing underscores
|
|
9
9
|
.replace(/__+/g, "_"); // Collapse multiple underscores
|
|
10
10
|
};
|
|
11
|
+
|
|
12
|
+
export const unslugify = ({ value }: { value: string }) => {
|
|
13
|
+
return value
|
|
14
|
+
.replace(/_/g, " ") // Replace underscores with spaces
|
|
15
|
+
.replace(/\s+/g, " ") // Collapse multiple spaces
|
|
16
|
+
.trim() // Trim leading/trailing spaces
|
|
17
|
+
.replace(/\b\w/g, (c) => c.toUpperCase()); // Capitalize first letter of each word
|
|
18
|
+
};
|