@llun/activities.schema 0.2.4 → 0.2.5
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/cjs/note/baseContent.js +5 -1
- package/dist/esm/note/baseContent.js +5 -1
- package/dist/types/like.d.ts +5 -5
- package/dist/types/note/baseContent.d.ts +3 -3
- package/dist/types/note.d.ts +3 -3
- package/dist/types/undo.d.ts +7 -7
- package/package.json +1 -1
- package/src/note/baseContent.ts +5 -1
|
@@ -18,7 +18,11 @@ exports.BaseContent = zod_1.z.object({
|
|
|
18
18
|
.optional(),
|
|
19
19
|
content: zod_1.z.string({ description: "Note content" }).optional(),
|
|
20
20
|
contentMap: zod_1.z
|
|
21
|
-
.
|
|
21
|
+
.union([
|
|
22
|
+
zod_1.z.record(zod_1.z.string(), { description: "Note content in each locale" }),
|
|
23
|
+
// Content map can be array when send from Wordpress
|
|
24
|
+
zod_1.z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
25
|
+
])
|
|
22
26
|
.optional(),
|
|
23
27
|
attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).optional(),
|
|
24
28
|
tag: zod_1.z.union([mention_js_1.Mention, emoji_js_1.Emoji]).array(),
|
|
@@ -15,7 +15,11 @@ export const BaseContent = z.object({
|
|
|
15
15
|
.optional(),
|
|
16
16
|
content: z.string({ description: "Note content" }).optional(),
|
|
17
17
|
contentMap: z
|
|
18
|
-
.
|
|
18
|
+
.union([
|
|
19
|
+
z.record(z.string(), { description: "Note content in each locale" }),
|
|
20
|
+
// Content map can be array when send from Wordpress
|
|
21
|
+
z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
22
|
+
])
|
|
19
23
|
.optional(),
|
|
20
24
|
attachment: z.union([Attachment, Attachment.array()]).optional(),
|
|
21
25
|
tag: z.union([Mention, Emoji]).array(),
|
package/dist/types/like.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const Like: z.ZodObject<{
|
|
|
13
13
|
summary: z.ZodOptional<z.ZodString>;
|
|
14
14
|
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
15
|
content: z.ZodOptional<z.ZodString>;
|
|
16
|
-
contentMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
|
+
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
|
|
17
17
|
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
18
18
|
type: z.ZodLiteral<"PropertyValue">;
|
|
19
19
|
name: z.ZodString;
|
|
@@ -172,7 +172,7 @@ export declare const Like: z.ZodObject<{
|
|
|
172
172
|
summary?: string | undefined;
|
|
173
173
|
summaryMap?: Record<string, string> | undefined;
|
|
174
174
|
content?: string | undefined;
|
|
175
|
-
contentMap?: Record<string, string> | undefined;
|
|
175
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
176
176
|
attachment?: {
|
|
177
177
|
type: "Document";
|
|
178
178
|
mediaType: string;
|
|
@@ -227,7 +227,7 @@ export declare const Like: z.ZodObject<{
|
|
|
227
227
|
summary?: string | undefined;
|
|
228
228
|
summaryMap?: Record<string, string> | undefined;
|
|
229
229
|
content?: string | undefined;
|
|
230
|
-
contentMap?: Record<string, string> | undefined;
|
|
230
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
231
231
|
attachment?: {
|
|
232
232
|
type: "Document";
|
|
233
233
|
mediaType: string;
|
|
@@ -284,7 +284,7 @@ export declare const Like: z.ZodObject<{
|
|
|
284
284
|
summary?: string | undefined;
|
|
285
285
|
summaryMap?: Record<string, string> | undefined;
|
|
286
286
|
content?: string | undefined;
|
|
287
|
-
contentMap?: Record<string, string> | undefined;
|
|
287
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
288
288
|
attachment?: {
|
|
289
289
|
type: "Document";
|
|
290
290
|
mediaType: string;
|
|
@@ -344,7 +344,7 @@ export declare const Like: z.ZodObject<{
|
|
|
344
344
|
summary?: string | undefined;
|
|
345
345
|
summaryMap?: Record<string, string> | undefined;
|
|
346
346
|
content?: string | undefined;
|
|
347
|
-
contentMap?: Record<string, string> | undefined;
|
|
347
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
348
348
|
attachment?: {
|
|
349
349
|
type: "Document";
|
|
350
350
|
mediaType: string;
|
|
@@ -9,7 +9,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
9
9
|
summary: z.ZodOptional<z.ZodString>;
|
|
10
10
|
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
11
11
|
content: z.ZodOptional<z.ZodString>;
|
|
12
|
-
contentMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
|
+
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
|
|
13
13
|
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
14
14
|
type: z.ZodLiteral<"PropertyValue">;
|
|
15
15
|
name: z.ZodString;
|
|
@@ -165,7 +165,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
165
165
|
summary?: string | undefined;
|
|
166
166
|
summaryMap?: Record<string, string> | undefined;
|
|
167
167
|
content?: string | undefined;
|
|
168
|
-
contentMap?: Record<string, string> | undefined;
|
|
168
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
169
169
|
attachment?: {
|
|
170
170
|
type: "Document";
|
|
171
171
|
mediaType: string;
|
|
@@ -219,7 +219,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
219
219
|
summary?: string | undefined;
|
|
220
220
|
summaryMap?: Record<string, string> | undefined;
|
|
221
221
|
content?: string | undefined;
|
|
222
|
-
contentMap?: Record<string, string> | undefined;
|
|
222
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
223
223
|
attachment?: {
|
|
224
224
|
type: "Document";
|
|
225
225
|
mediaType: string;
|
package/dist/types/note.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
9
9
|
summary: z.ZodOptional<z.ZodString>;
|
|
10
10
|
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
11
11
|
content: z.ZodOptional<z.ZodString>;
|
|
12
|
-
contentMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
|
+
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
|
|
13
13
|
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
14
14
|
type: z.ZodLiteral<"PropertyValue">;
|
|
15
15
|
name: z.ZodString;
|
|
@@ -168,7 +168,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
168
168
|
summary?: string | undefined;
|
|
169
169
|
summaryMap?: Record<string, string> | undefined;
|
|
170
170
|
content?: string | undefined;
|
|
171
|
-
contentMap?: Record<string, string> | undefined;
|
|
171
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
172
172
|
attachment?: {
|
|
173
173
|
type: "Document";
|
|
174
174
|
mediaType: string;
|
|
@@ -223,7 +223,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
223
223
|
summary?: string | undefined;
|
|
224
224
|
summaryMap?: Record<string, string> | undefined;
|
|
225
225
|
content?: string | undefined;
|
|
226
|
-
contentMap?: Record<string, string> | undefined;
|
|
226
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
227
227
|
attachment?: {
|
|
228
228
|
type: "Document";
|
|
229
229
|
mediaType: string;
|
package/dist/types/undo.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
17
17
|
summary: z.ZodOptional<z.ZodString>;
|
|
18
18
|
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19
19
|
content: z.ZodOptional<z.ZodString>;
|
|
20
|
-
contentMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
|
|
21
21
|
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
22
22
|
type: z.ZodLiteral<"PropertyValue">;
|
|
23
23
|
name: z.ZodString;
|
|
@@ -176,7 +176,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
176
176
|
summary?: string | undefined;
|
|
177
177
|
summaryMap?: Record<string, string> | undefined;
|
|
178
178
|
content?: string | undefined;
|
|
179
|
-
contentMap?: Record<string, string> | undefined;
|
|
179
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
180
180
|
attachment?: {
|
|
181
181
|
type: "Document";
|
|
182
182
|
mediaType: string;
|
|
@@ -231,7 +231,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
231
231
|
summary?: string | undefined;
|
|
232
232
|
summaryMap?: Record<string, string> | undefined;
|
|
233
233
|
content?: string | undefined;
|
|
234
|
-
contentMap?: Record<string, string> | undefined;
|
|
234
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
235
235
|
attachment?: {
|
|
236
236
|
type: "Document";
|
|
237
237
|
mediaType: string;
|
|
@@ -288,7 +288,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
288
288
|
summary?: string | undefined;
|
|
289
289
|
summaryMap?: Record<string, string> | undefined;
|
|
290
290
|
content?: string | undefined;
|
|
291
|
-
contentMap?: Record<string, string> | undefined;
|
|
291
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
292
292
|
attachment?: {
|
|
293
293
|
type: "Document";
|
|
294
294
|
mediaType: string;
|
|
@@ -348,7 +348,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
348
348
|
summary?: string | undefined;
|
|
349
349
|
summaryMap?: Record<string, string> | undefined;
|
|
350
350
|
content?: string | undefined;
|
|
351
|
-
contentMap?: Record<string, string> | undefined;
|
|
351
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
352
352
|
attachment?: {
|
|
353
353
|
type: "Document";
|
|
354
354
|
mediaType: string;
|
|
@@ -430,7 +430,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
430
430
|
summary?: string | undefined;
|
|
431
431
|
summaryMap?: Record<string, string> | undefined;
|
|
432
432
|
content?: string | undefined;
|
|
433
|
-
contentMap?: Record<string, string> | undefined;
|
|
433
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
434
434
|
attachment?: {
|
|
435
435
|
type: "Document";
|
|
436
436
|
mediaType: string;
|
|
@@ -500,7 +500,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
500
500
|
summary?: string | undefined;
|
|
501
501
|
summaryMap?: Record<string, string> | undefined;
|
|
502
502
|
content?: string | undefined;
|
|
503
|
-
contentMap?: Record<string, string> | undefined;
|
|
503
|
+
contentMap?: string[] | Record<string, string> | undefined;
|
|
504
504
|
attachment?: {
|
|
505
505
|
type: "Document";
|
|
506
506
|
mediaType: string;
|
package/package.json
CHANGED
package/src/note/baseContent.ts
CHANGED
|
@@ -20,7 +20,11 @@ export const BaseContent = z.object({
|
|
|
20
20
|
|
|
21
21
|
content: z.string({ description: "Note content" }).optional(),
|
|
22
22
|
contentMap: z
|
|
23
|
-
.
|
|
23
|
+
.union([
|
|
24
|
+
z.record(z.string(), { description: "Note content in each locale" }),
|
|
25
|
+
// Content map can be array when send from Wordpress
|
|
26
|
+
z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
27
|
+
])
|
|
24
28
|
.optional(),
|
|
25
29
|
|
|
26
30
|
attachment: z.union([Attachment, Attachment.array()]).optional(),
|