@roc-db/test-utils 0.2.0-pre.71 → 0.2.0-pre.73
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/types/entities/BlockImageEntity.d.ts +3 -11
- package/dist/types/entities/BlockParagraph.d.ts +3 -11
- package/dist/types/entities/BlockRow.d.ts +5 -13
- package/dist/types/entities/Draft.d.ts +3 -11
- package/dist/types/entities/PostEntity.d.ts +6 -24
- package/dist/types/entities/PostVersion.d.ts +4 -14
- package/dist/types/entities/UserEntity.d.ts +1 -5
- package/dist/types/entities/index.d.ts +24 -88
- package/dist/types/operations/applyDraft.d.ts +1 -1
- package/dist/types/operations/createBlockImage.d.ts +2 -8
- package/dist/types/operations/createBlockParagraph.d.ts +2 -6
- package/dist/types/operations/createBlockRow.d.ts +2 -6
- package/dist/types/operations/createBlockTitle.d.ts +2 -6
- package/dist/types/operations/createDraft.d.ts +2 -6
- package/dist/types/operations/createPost.d.ts +2 -10
- package/dist/types/operations/createUser.d.ts +1 -5
- package/dist/types/operations/crudBySlug.d.ts +1 -7
- package/dist/types/operations/deleteBlocks.d.ts +1 -1
- package/dist/types/operations/deleteDraft.d.ts +1 -1
- package/dist/types/operations/deletePost.d.ts +1 -1
- package/dist/types/operations/moveBlocks.d.ts +2 -8
- package/dist/types/operations/testTransactionalEdits.d.ts +3 -11
- package/dist/types/operations/updateBlockParagraph.d.ts +2 -8
- package/dist/types/operations/updatePost.d.ts +4 -14
- package/dist/types/operations/updatePostDescription.d.ts +2 -8
- package/dist/types/operations/updatePostSlug.d.ts +2 -8
- package/dist/types/operations/updatePostTags.d.ts +3 -9
- package/dist/types/operations/updatePostTitle.d.ts +2 -8
- package/dist/types/schemas/BlockImageRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockImageSchema.d.ts +18 -76
- package/dist/types/schemas/BlockParagraphRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockParagraphSchema.d.ts +18 -76
- package/dist/types/schemas/BlockRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockRowRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockRowSchema.d.ts +20 -82
- package/dist/types/schemas/BlockTitleRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockTitleSchema.d.ts +18 -76
- package/dist/types/schemas/CreatePostMutationSchema.d.ts +8 -62
- package/dist/types/schemas/CreateUserMutationSchema.d.ts +7 -53
- package/dist/types/schemas/DraftRefSchema.d.ts +1 -1
- package/dist/types/schemas/DraftSchema.d.ts +17 -67
- package/dist/types/schemas/PostRefSchema.d.ts +1 -1
- package/dist/types/schemas/PostSchema.d.ts +21 -99
- package/dist/types/schemas/UpdatePostMutationSchema.d.ts +10 -68
- package/dist/types/schemas/UpdatePostTitleMutationSchema.d.ts +8 -58
- package/dist/types/schemas/UserRefSchema.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PostRefSchema: import("zod").
|
|
1
|
+
export declare const PostRefSchema: import("zod").ZodTemplateLiteral<`Post/${number}`>;
|
|
@@ -1,105 +1,27 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const PostSchema: z.ZodObject<{
|
|
3
|
-
ref: z.
|
|
4
|
-
entity: z.ZodLiteral<"Post"
|
|
5
|
-
created: z.ZodObject<{
|
|
6
|
-
mutationRef: z.
|
|
7
|
-
timestamp: z.ZodString
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}>;
|
|
15
|
-
updated: z.ZodObject<{
|
|
16
|
-
mutationRef: z.ZodType<`Mutation/${string}`, z.ZodTypeDef, `Mutation/${string}`>;
|
|
17
|
-
timestamp: z.ZodString;
|
|
18
|
-
}, "strict", z.ZodTypeAny, {
|
|
19
|
-
mutationRef: `Mutation/${string}`;
|
|
20
|
-
timestamp: string;
|
|
21
|
-
}, {
|
|
22
|
-
mutationRef: `Mutation/${string}`;
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}>;
|
|
25
|
-
data: z.ZodObject<{
|
|
3
|
+
ref: z.ZodNonOptional<z.ZodTemplateLiteral<`Post/${number}`>>;
|
|
4
|
+
entity: z.ZodNonOptional<z.ZodLiteral<"Post">>;
|
|
5
|
+
created: z.ZodNonOptional<z.ZodObject<{
|
|
6
|
+
mutationRef: z.ZodNonOptional<z.ZodTemplateLiteral<`Mutation/${number}`>>;
|
|
7
|
+
timestamp: z.ZodNonOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
updated: z.ZodNonOptional<z.ZodObject<{
|
|
10
|
+
mutationRef: z.ZodNonOptional<z.ZodTemplateLiteral<`Mutation/${number}`>>;
|
|
11
|
+
timestamp: z.ZodNonOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strict>>;
|
|
13
|
+
data: z.ZodNonOptional<z.ZodObject<{
|
|
26
14
|
title: z.ZodString;
|
|
27
15
|
text: z.ZodOptional<z.ZodString>;
|
|
28
|
-
tags: z.ZodArray<z.ZodString
|
|
16
|
+
tags: z.ZodArray<z.ZodString>;
|
|
29
17
|
slug: z.ZodOptional<z.ZodString>;
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
slug?: string | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
children: z.ZodObject<{
|
|
42
|
-
blocks: z.ZodArray<z.ZodString, "many">;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
blocks: string[];
|
|
45
|
-
}, {
|
|
46
|
-
blocks: string[];
|
|
47
|
-
}>;
|
|
48
|
-
parents: z.ZodObject<{
|
|
49
|
-
author: z.ZodOptional<z.ZodType<`User/${string}`, z.ZodTypeDef, `User/${string}`>>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
author?: `User/${string}` | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
author?: `User/${string}` | undefined;
|
|
54
|
-
}>;
|
|
55
|
-
ancestors: z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>;
|
|
56
|
-
}, "strict", z.ZodTypeAny, {
|
|
57
|
-
ref: `Post/${string}`;
|
|
58
|
-
data: {
|
|
59
|
-
title: string;
|
|
60
|
-
tags: string[];
|
|
61
|
-
text?: string | undefined;
|
|
62
|
-
slug?: string | undefined;
|
|
63
|
-
};
|
|
64
|
-
parents: {
|
|
65
|
-
author?: `User/${string}` | undefined;
|
|
66
|
-
};
|
|
67
|
-
entity: "Post";
|
|
68
|
-
created: {
|
|
69
|
-
mutationRef: `Mutation/${string}`;
|
|
70
|
-
timestamp: string;
|
|
71
|
-
};
|
|
72
|
-
updated: {
|
|
73
|
-
mutationRef: `Mutation/${string}`;
|
|
74
|
-
timestamp: string;
|
|
75
|
-
};
|
|
76
|
-
children: {
|
|
77
|
-
blocks: string[];
|
|
78
|
-
};
|
|
79
|
-
ancestors: {};
|
|
80
|
-
}, {
|
|
81
|
-
ref: `Post/${string}`;
|
|
82
|
-
data: {
|
|
83
|
-
title: string;
|
|
84
|
-
tags: string[];
|
|
85
|
-
text?: string | undefined;
|
|
86
|
-
slug?: string | undefined;
|
|
87
|
-
};
|
|
88
|
-
parents: {
|
|
89
|
-
author?: `User/${string}` | undefined;
|
|
90
|
-
};
|
|
91
|
-
entity: "Post";
|
|
92
|
-
created: {
|
|
93
|
-
mutationRef: `Mutation/${string}`;
|
|
94
|
-
timestamp: string;
|
|
95
|
-
};
|
|
96
|
-
updated: {
|
|
97
|
-
mutationRef: `Mutation/${string}`;
|
|
98
|
-
timestamp: string;
|
|
99
|
-
};
|
|
100
|
-
children: {
|
|
101
|
-
blocks: string[];
|
|
102
|
-
};
|
|
103
|
-
ancestors: {};
|
|
104
|
-
}>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
children: z.ZodNonOptional<z.ZodObject<{
|
|
20
|
+
blocks: z.ZodArray<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
parents: z.ZodNonOptional<z.ZodObject<{
|
|
23
|
+
author: z.ZodOptional<z.ZodTemplateLiteral<`User/${number}`>>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
ancestors: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strict>;
|
|
105
27
|
export type Post = z.infer<typeof PostSchema>;
|
|
@@ -1,79 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const UpdatePostMutationSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
2
|
+
export declare const UpdatePostMutationSchema: z.ZodObject<{
|
|
3
|
+
ref: z.ZodTemplateLiteral<`Mutation/${number}`>;
|
|
4
4
|
timestamp: z.ZodString;
|
|
5
|
-
changeSetRef: z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
6
|
-
payload: z.ZodAny;
|
|
7
|
-
log: z.ZodArray<z.ZodAny, "many">;
|
|
8
5
|
debounceCount: z.ZodNumber;
|
|
9
6
|
identityRef: z.ZodString;
|
|
10
7
|
sessionRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
8
|
persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
-
}, {
|
|
13
9
|
operation: z.ZodObject<{
|
|
14
10
|
name: z.ZodLiteral<"updatePost">;
|
|
15
11
|
version: z.ZodDefault<z.ZodNumber>;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
version: number;
|
|
19
|
-
}, {
|
|
20
|
-
name: "updatePost";
|
|
21
|
-
version?: number | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
changeSetRef: z.ZodType<never, z.ZodTypeDef, never> | z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
changeSetRef: z.ZodTemplateLiteral<never> | z.ZodNullable<z.ZodTemplateLiteral<never>>;
|
|
24
14
|
payload: z.ZodObject<{
|
|
25
|
-
ref: z.
|
|
15
|
+
ref: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
26
16
|
title: z.ZodOptional<z.ZodString>;
|
|
27
|
-
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString
|
|
28
|
-
authorRef: z.ZodOptional<z.
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
authorRef?: `User/${string}` | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
ref: `Post/${string}`;
|
|
36
|
-
title?: string | undefined;
|
|
37
|
-
tags?: string[] | undefined;
|
|
38
|
-
authorRef?: `User/${string}` | undefined;
|
|
39
|
-
}>;
|
|
40
|
-
log: z.ZodType<any[], z.ZodTypeDef, any[]>;
|
|
41
|
-
}>, "strict", z.ZodTypeAny, {
|
|
42
|
-
ref: `Mutation/${string}`;
|
|
43
|
-
timestamp: string;
|
|
44
|
-
changeSetRef: null;
|
|
45
|
-
payload: {
|
|
46
|
-
ref: `Post/${string}`;
|
|
47
|
-
tags: string[];
|
|
48
|
-
title?: string | undefined;
|
|
49
|
-
authorRef?: `User/${string}` | undefined;
|
|
50
|
-
};
|
|
51
|
-
log: any[];
|
|
52
|
-
debounceCount: number;
|
|
53
|
-
identityRef: string;
|
|
54
|
-
operation: {
|
|
55
|
-
name: "updatePost";
|
|
56
|
-
version: number;
|
|
57
|
-
};
|
|
58
|
-
sessionRef?: string | null | undefined;
|
|
59
|
-
persistedAt?: string | null | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
ref: `Mutation/${string}`;
|
|
62
|
-
timestamp: string;
|
|
63
|
-
changeSetRef: null;
|
|
64
|
-
payload: {
|
|
65
|
-
ref: `Post/${string}`;
|
|
66
|
-
title?: string | undefined;
|
|
67
|
-
tags?: string[] | undefined;
|
|
68
|
-
authorRef?: `User/${string}` | undefined;
|
|
69
|
-
};
|
|
70
|
-
log: any[];
|
|
71
|
-
debounceCount: number;
|
|
72
|
-
identityRef: string;
|
|
73
|
-
operation: {
|
|
74
|
-
name: "updatePost";
|
|
75
|
-
version?: number | undefined;
|
|
76
|
-
};
|
|
77
|
-
sessionRef?: string | null | undefined;
|
|
78
|
-
persistedAt?: string | null | undefined;
|
|
79
|
-
}>;
|
|
17
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
18
|
+
authorRef: z.ZodOptional<z.ZodTemplateLiteral<`User/${number}`>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
log: z.ZodType<any[], unknown, z.core.$ZodTypeInternals<any[], unknown>>;
|
|
21
|
+
}, z.core.$strict>;
|
|
@@ -1,69 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const UpdatePostTitleMutationSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
2
|
+
export declare const UpdatePostTitleMutationSchema: z.ZodObject<{
|
|
3
|
+
ref: z.ZodTemplateLiteral<`Mutation/${number}`>;
|
|
4
4
|
timestamp: z.ZodString;
|
|
5
|
-
changeSetRef: z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
6
|
-
payload: z.ZodAny;
|
|
7
|
-
log: z.ZodArray<z.ZodAny, "many">;
|
|
8
5
|
debounceCount: z.ZodNumber;
|
|
9
6
|
identityRef: z.ZodString;
|
|
10
7
|
sessionRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
8
|
persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
-
}, {
|
|
13
9
|
operation: z.ZodObject<{
|
|
14
10
|
name: z.ZodLiteral<"updatePostTitle">;
|
|
15
11
|
version: z.ZodDefault<z.ZodNumber>;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
version: number;
|
|
19
|
-
}, {
|
|
20
|
-
name: "updatePostTitle";
|
|
21
|
-
version?: number | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
changeSetRef: z.ZodType<never, z.ZodTypeDef, never> | z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
changeSetRef: z.ZodTemplateLiteral<never> | z.ZodNullable<z.ZodTemplateLiteral<never>>;
|
|
24
14
|
payload: z.ZodObject<{
|
|
25
|
-
ref: z.
|
|
15
|
+
ref: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
26
16
|
title: z.ZodString;
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, {
|
|
31
|
-
ref: `Post/${string}`;
|
|
32
|
-
title: string;
|
|
33
|
-
}>;
|
|
34
|
-
log: z.ZodType<any[], z.ZodTypeDef, any[]>;
|
|
35
|
-
}>, "strict", z.ZodTypeAny, {
|
|
36
|
-
ref: `Mutation/${string}`;
|
|
37
|
-
timestamp: string;
|
|
38
|
-
changeSetRef: null;
|
|
39
|
-
payload: {
|
|
40
|
-
ref: `Post/${string}`;
|
|
41
|
-
title: string;
|
|
42
|
-
};
|
|
43
|
-
log: any[];
|
|
44
|
-
debounceCount: number;
|
|
45
|
-
identityRef: string;
|
|
46
|
-
operation: {
|
|
47
|
-
name: "updatePostTitle";
|
|
48
|
-
version: number;
|
|
49
|
-
};
|
|
50
|
-
sessionRef?: string | null | undefined;
|
|
51
|
-
persistedAt?: string | null | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
ref: `Mutation/${string}`;
|
|
54
|
-
timestamp: string;
|
|
55
|
-
changeSetRef: null;
|
|
56
|
-
payload: {
|
|
57
|
-
ref: `Post/${string}`;
|
|
58
|
-
title: string;
|
|
59
|
-
};
|
|
60
|
-
log: any[];
|
|
61
|
-
debounceCount: number;
|
|
62
|
-
identityRef: string;
|
|
63
|
-
operation: {
|
|
64
|
-
name: "updatePostTitle";
|
|
65
|
-
version?: number | undefined;
|
|
66
|
-
};
|
|
67
|
-
sessionRef?: string | null | undefined;
|
|
68
|
-
persistedAt?: string | null | undefined;
|
|
69
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
log: z.ZodType<any[], unknown, z.core.$ZodTypeInternals<any[], unknown>>;
|
|
19
|
+
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const UserRefSchema: import("zod").
|
|
1
|
+
export declare const UserRefSchema: import("zod").ZodTemplateLiteral<`User/${number}`>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roc-db/test-utils",
|
|
3
|
-
"version": "0.2.0-pre.
|
|
3
|
+
"version": "0.2.0-pre.73",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
],
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"roc-db": "0.2.0-pre.
|
|
21
|
-
"zod": "
|
|
20
|
+
"roc-db": "0.2.0-pre.73",
|
|
21
|
+
"zod": "^4.0.0"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [],
|
|
24
24
|
"author": "Eigil Sagafos",
|