@roc-db/test-utils 0.2.0-pre.9 → 0.2.0-pre.91
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/index.js +933 -287
- package/dist/types/entities/BlockImageEntity.d.ts +7 -0
- package/dist/types/entities/BlockParagraph.d.ts +7 -0
- package/dist/types/entities/BlockRow.d.ts +7 -0
- package/dist/types/entities/Draft.d.ts +7 -0
- package/dist/types/entities/PostEntity.d.ts +12 -0
- package/dist/types/entities/PostVersion.d.ts +8 -0
- package/dist/types/entities/UserEntity.d.ts +5 -0
- package/dist/types/entities/index.d.ts +33 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/operations/applyDraft.d.ts +1 -0
- package/dist/types/operations/createBlockImage.d.ts +5 -15
- package/dist/types/operations/createBlockParagraph.d.ts +5 -15
- package/dist/types/operations/createBlockRow.d.ts +4 -15
- package/dist/types/operations/createBlockTitle.d.ts +4 -15
- package/dist/types/operations/createDraft.d.ts +4 -15
- package/dist/types/operations/createPost.d.ts +6 -19
- package/dist/types/operations/createUser.d.ts +4 -0
- package/dist/types/operations/crudBySlug.d.ts +5 -0
- package/dist/types/operations/deleteBlocks.d.ts +2 -0
- package/dist/types/operations/deleteDraft.d.ts +1 -0
- package/dist/types/operations/deletePost.d.ts +1 -9
- package/dist/types/operations/index.d.ts +1 -157
- package/dist/types/operations/moveBlocks.d.ts +5 -0
- package/dist/types/operations/pageBlocks.d.ts +1 -0
- package/dist/types/operations/pageEmptyEntitiesArray.d.ts +1 -0
- package/dist/types/operations/pagePosts.d.ts +1 -0
- package/dist/types/operations/pagePostsByTag.d.ts +1 -0
- package/dist/types/operations/pageSplat.d.ts +1 -0
- package/dist/types/operations/readMutation.d.ts +1 -0
- package/dist/types/operations/readPostBySlug.d.ts +1 -0
- package/dist/types/operations/testTransactionalEdits.d.ts +6 -0
- package/dist/types/operations/updateBlockParagraph.d.ts +5 -15
- package/dist/types/operations/updatePost.d.ts +7 -21
- package/dist/types/operations/updatePostDescription.d.ts +5 -0
- package/dist/types/operations/updatePostSlug.d.ts +5 -0
- package/dist/types/operations/updatePostTags.d.ts +5 -0
- package/dist/types/operations/updatePostTitle.d.ts +5 -17
- package/dist/types/schemas/BlockImageRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockImageSchema.d.ts +20 -31
- package/dist/types/schemas/BlockParagraphRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockParagraphSchema.d.ts +20 -31
- 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 +21 -31
- package/dist/types/schemas/BlockTitleRefSchema.d.ts +1 -1
- package/dist/types/schemas/BlockTitleSchema.d.ts +20 -31
- package/dist/types/schemas/CreatePostMutationSchema.d.ts +14 -44
- package/dist/types/schemas/CreateUserMutationSchema.d.ts +13 -35
- package/dist/types/schemas/DraftRefSchema.d.ts +1 -1
- package/dist/types/schemas/DraftSchema.d.ts +18 -31
- package/dist/types/schemas/PostRefSchema.d.ts +1 -1
- package/dist/types/schemas/PostSchema.d.ts +25 -31
- package/dist/types/schemas/UpdatePostMutationSchema.d.ts +16 -50
- package/dist/types/schemas/UpdatePostTitleMutationSchema.d.ts +14 -40
- package/dist/types/schemas/UserRefSchema.d.ts +1 -1
- package/dist/types/schemas/index.d.ts +0 -31
- package/dist/types/testAdapterImplementation.d.ts +1 -1
- package/package.json +3 -3
- package/dist/types/operations/deleteBlock.d.ts +0 -11
- package/dist/types/schemas/CreateBlockImageMutationSchema.d.ts +0 -40
- package/dist/types/schemas/CreateBlockParagraphMutationSchema.d.ts +0 -40
- package/dist/types/schemas/CreateBlockRowMutationSchema.d.ts +0 -40
- package/dist/types/schemas/CreateBlockTitleMutationSchema.d.ts +0 -40
- package/dist/types/schemas/CreateDraftMutationSchema.d.ts +0 -40
- package/dist/types/schemas/DeleteBlockMutationSchema.d.ts +0 -30
- package/dist/types/schemas/DeletePostMutationSchema.d.ts +0 -29
- package/dist/types/schemas/UpdateBlockParagraphMutationSchema.d.ts +0 -45
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const BlockParagraphSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
4
|
-
entity: z.
|
|
5
|
-
created: z.ZodObject<{
|
|
6
|
-
mutationRef: z.
|
|
7
|
-
timestamp: z.ZodString
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
mutationRef: `Mutation/${string}`;
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}>;
|
|
25
|
-
data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
26
|
-
parents: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
27
|
-
ancestors: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
28
|
-
}, z.ZodRawShape>, "strict", z.ZodTypeAny, {
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
}, {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
}>;
|
|
2
|
+
export declare const BlockParagraphSchema: z.ZodObject<{
|
|
3
|
+
ref: z.ZodNonOptional<z.ZodTemplateLiteral<`BlockParagraph/${number}`>>;
|
|
4
|
+
entity: z.ZodNonOptional<z.ZodLiteral<"BlockParagraph">>;
|
|
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<{
|
|
14
|
+
content: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
children: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
17
|
+
parents: z.ZodNonOptional<z.ZodObject<{
|
|
18
|
+
parent: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
ancestors: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strict>;
|
|
33
22
|
export type BlockParagraph = z.infer<typeof BlockParagraphSchema>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const BlockRefSchema: z.ZodUnion<[z.
|
|
2
|
+
export declare const BlockRefSchema: z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const BlockRowRefSchema: import("zod").
|
|
1
|
+
export declare const BlockRowRefSchema: import("zod").ZodTemplateLiteral<`BlockRow/${number}`>;
|
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const BlockRowSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
4
|
-
entity: z.
|
|
5
|
-
created: z.ZodObject<{
|
|
6
|
-
mutationRef: z.
|
|
7
|
-
timestamp: z.ZodString
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}>;
|
|
25
|
-
data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
26
|
-
parents: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
27
|
-
ancestors: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
28
|
-
}, z.ZodRawShape>, "strict", z.ZodTypeAny, {
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
}, {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
}>;
|
|
2
|
+
export declare const BlockRowSchema: z.ZodObject<{
|
|
3
|
+
ref: z.ZodNonOptional<z.ZodTemplateLiteral<`BlockRow/${number}`>>;
|
|
4
|
+
entity: z.ZodNonOptional<z.ZodLiteral<"BlockRow">>;
|
|
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<{}, z.core.$strip>>;
|
|
14
|
+
children: z.ZodNonOptional<z.ZodObject<{
|
|
15
|
+
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
parents: z.ZodNonOptional<z.ZodObject<{
|
|
18
|
+
post: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
19
|
+
block: z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
ancestors: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strict>;
|
|
33
23
|
export type BlockRow = z.infer<typeof BlockRowSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const BlockTitleRefSchema: import("zod").
|
|
1
|
+
export declare const BlockTitleRefSchema: import("zod").ZodTemplateLiteral<`BlockTitle/${number}`>;
|
|
@@ -1,32 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const BlockTitleSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
4
|
-
entity: z.
|
|
5
|
-
created: z.ZodObject<{
|
|
6
|
-
mutationRef: z.
|
|
7
|
-
timestamp: z.ZodString
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
mutationRef: `Mutation/${string}`;
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}>;
|
|
25
|
-
data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
26
|
-
parents: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
27
|
-
ancestors: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
28
|
-
}, z.ZodRawShape>, "strict", z.ZodTypeAny, {
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
}, {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
}>;
|
|
2
|
+
export declare const BlockTitleSchema: z.ZodObject<{
|
|
3
|
+
ref: z.ZodNonOptional<z.ZodTemplateLiteral<`BlockTitle/${number}`>>;
|
|
4
|
+
entity: z.ZodNonOptional<z.ZodLiteral<"BlockTitle">>;
|
|
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<{
|
|
14
|
+
content: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
children: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
17
|
+
parents: z.ZodNonOptional<z.ZodObject<{
|
|
18
|
+
post: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
ancestors: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strict>;
|
|
@@ -1,50 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const CreatePostMutationSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
2
|
+
export declare const CreatePostMutationSchema: 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.ZodTuple<[z.ZodType<never, z.ZodTypeDef, never>, z.ZodString, z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>], null>, "many">;
|
|
8
5
|
debounceCount: z.ZodNumber;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
identityRef: z.ZodString;
|
|
7
|
+
sessionRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
operation: z.ZodObject<{
|
|
10
|
+
name: z.ZodLiteral<"createPost">;
|
|
11
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
changeSetRef: z.ZodTemplateLiteral<`${string}/${number}`> | z.ZodNullable<z.ZodTemplateLiteral<`${string}/${number}`>>;
|
|
12
14
|
payload: z.ZodObject<{
|
|
13
15
|
title: z.ZodString;
|
|
14
16
|
slug: z.ZodOptional<z.ZodString>;
|
|
15
|
-
tags: z.ZodDefault<z.ZodArray<z.ZodString
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
slug?: string | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
title: string;
|
|
22
|
-
tags?: string[] | undefined;
|
|
23
|
-
slug?: string | undefined;
|
|
24
|
-
}>;
|
|
25
|
-
log: z.ZodType<[never, string, null][], z.ZodTypeDef, [never, string, null][]>;
|
|
26
|
-
}>, "strict", z.ZodTypeAny, {
|
|
27
|
-
ref: `Mutation/${string}`;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
changeSetRef: null;
|
|
30
|
-
payload: {
|
|
31
|
-
title: string;
|
|
32
|
-
tags: string[];
|
|
33
|
-
slug?: string | undefined;
|
|
34
|
-
};
|
|
35
|
-
log: [never, string, null][];
|
|
36
|
-
debounceCount: number;
|
|
37
|
-
name: "createPost";
|
|
38
|
-
}, {
|
|
39
|
-
ref: `Mutation/${string}`;
|
|
40
|
-
timestamp: string;
|
|
41
|
-
changeSetRef: null;
|
|
42
|
-
payload: {
|
|
43
|
-
title: string;
|
|
44
|
-
tags?: string[] | undefined;
|
|
45
|
-
slug?: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
log: [never, string, null][];
|
|
48
|
-
debounceCount: number;
|
|
49
|
-
name: "createPost";
|
|
50
|
-
}>;
|
|
17
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
log: z.ZodType<any[], unknown, z.core.$ZodTypeInternals<any[], unknown>>;
|
|
20
|
+
}, z.core.$strict>;
|
|
@@ -1,40 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const CreateUserMutationSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
2
|
+
export declare const CreateUserMutationSchema: 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.ZodTuple<[z.ZodType<never, z.ZodTypeDef, never>, z.ZodString, z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>], null>, "many">;
|
|
8
5
|
debounceCount: z.ZodNumber;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
identityRef: z.ZodString;
|
|
7
|
+
sessionRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
operation: z.ZodObject<{
|
|
10
|
+
name: z.ZodLiteral<"createUser">;
|
|
11
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
changeSetRef: z.ZodTemplateLiteral<`${string}/${number}`> | z.ZodNullable<z.ZodTemplateLiteral<`${string}/${number}`>>;
|
|
12
14
|
payload: z.ZodObject<{
|
|
13
15
|
email: z.ZodString;
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
email: string;
|
|
18
|
-
}>;
|
|
19
|
-
log: z.ZodType<[never, string, null][], z.ZodTypeDef, [never, string, null][]>;
|
|
20
|
-
}>, "strict", z.ZodTypeAny, {
|
|
21
|
-
ref: `Mutation/${string}`;
|
|
22
|
-
timestamp: string;
|
|
23
|
-
changeSetRef: null;
|
|
24
|
-
payload: {
|
|
25
|
-
email: string;
|
|
26
|
-
};
|
|
27
|
-
log: [never, string, null][];
|
|
28
|
-
debounceCount: number;
|
|
29
|
-
name: "createUser";
|
|
30
|
-
}, {
|
|
31
|
-
ref: `Mutation/${string}`;
|
|
32
|
-
timestamp: string;
|
|
33
|
-
changeSetRef: null;
|
|
34
|
-
payload: {
|
|
35
|
-
email: string;
|
|
36
|
-
};
|
|
37
|
-
log: [never, string, null][];
|
|
38
|
-
debounceCount: number;
|
|
39
|
-
name: "createUser";
|
|
40
|
-
}>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
log: z.ZodType<any[], unknown, z.core.$ZodTypeInternals<any[], unknown>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DraftRefSchema: import("zod").ZodType<`Draft/${string}`,
|
|
1
|
+
export declare const DraftRefSchema: import("zod").ZodType<`Draft/${string}`, z.ZodTypeDef, `Draft/${string}`>;
|
|
@@ -1,32 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const DraftSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
4
|
-
entity: z.
|
|
5
|
-
created: z.ZodObject<{
|
|
6
|
-
mutationRef: z.
|
|
7
|
-
timestamp: z.ZodString
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
timestamp: string;
|
|
21
|
-
}, {
|
|
22
|
-
mutationRef: `Mutation/${string}`;
|
|
23
|
-
timestamp: string;
|
|
24
|
-
}>;
|
|
25
|
-
data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
26
|
-
parents: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
27
|
-
ancestors: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
28
|
-
}, z.ZodRawShape>, "strict", z.ZodTypeAny, {
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
}, {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
}>;
|
|
2
|
+
export declare const DraftSchema: z.ZodObject<{
|
|
3
|
+
ref: z.ZodNonOptional<z.ZodTemplateLiteral<`Draft/${number}`>>;
|
|
4
|
+
entity: z.ZodNonOptional<z.ZodLiteral<"Draft">>;
|
|
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<{}, z.core.$strip>>;
|
|
14
|
+
children: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
15
|
+
parents: z.ZodNonOptional<z.ZodObject<{
|
|
16
|
+
post: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
ancestors: z.ZodNonOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PostRefSchema: import("zod").
|
|
1
|
+
export declare const PostRefSchema: import("zod").ZodTemplateLiteral<`Post/${number}`>;
|
|
@@ -1,33 +1,27 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const PostSchema: z.ZodObject<
|
|
3
|
-
ref: z.
|
|
4
|
-
entity: z.
|
|
5
|
-
created: z.ZodObject<{
|
|
6
|
-
mutationRef: z.
|
|
7
|
-
timestamp: z.ZodString
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ancestors: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
28
|
-
}, z.ZodRawShape>, "strict", z.ZodTypeAny, {
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
}, {
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
}>;
|
|
2
|
+
export declare const PostSchema: 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<{
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
text: z.ZodOptional<z.ZodString>;
|
|
16
|
+
tags: z.ZodArray<z.ZodString>;
|
|
17
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
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>;
|
|
33
27
|
export type Post = z.infer<typeof PostSchema>;
|
|
@@ -1,55 +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.ZodTuple<[z.ZodType<never, z.ZodTypeDef, never>, z.ZodString, z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>], null>, "many">;
|
|
8
5
|
debounceCount: z.ZodNumber;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
identityRef: z.ZodString;
|
|
7
|
+
sessionRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
operation: z.ZodObject<{
|
|
10
|
+
name: z.ZodLiteral<"updatePost">;
|
|
11
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
changeSetRef: z.ZodTemplateLiteral<`${string}/${number}`> | z.ZodNullable<z.ZodTemplateLiteral<`${string}/${number}`>>;
|
|
12
14
|
payload: z.ZodObject<{
|
|
13
|
-
ref: z.
|
|
15
|
+
ref: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
14
16
|
title: z.ZodOptional<z.ZodString>;
|
|
15
|
-
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString
|
|
16
|
-
authorRef: z.ZodOptional<z.
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
authorRef?: `User/${string}` | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
ref: `Post/${string}`;
|
|
24
|
-
title?: string | undefined;
|
|
25
|
-
tags?: string[] | undefined;
|
|
26
|
-
authorRef?: `User/${string}` | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
log: z.ZodType<[never, string, null][], z.ZodTypeDef, [never, string, null][]>;
|
|
29
|
-
}>, "strict", z.ZodTypeAny, {
|
|
30
|
-
ref: `Mutation/${string}`;
|
|
31
|
-
timestamp: string;
|
|
32
|
-
changeSetRef: null;
|
|
33
|
-
payload: {
|
|
34
|
-
ref: `Post/${string}`;
|
|
35
|
-
tags: string[];
|
|
36
|
-
title?: string | undefined;
|
|
37
|
-
authorRef?: `User/${string}` | undefined;
|
|
38
|
-
};
|
|
39
|
-
log: [never, string, null][];
|
|
40
|
-
debounceCount: number;
|
|
41
|
-
name: "updatePost";
|
|
42
|
-
}, {
|
|
43
|
-
ref: `Mutation/${string}`;
|
|
44
|
-
timestamp: string;
|
|
45
|
-
changeSetRef: null;
|
|
46
|
-
payload: {
|
|
47
|
-
ref: `Post/${string}`;
|
|
48
|
-
title?: string | undefined;
|
|
49
|
-
tags?: string[] | undefined;
|
|
50
|
-
authorRef?: `User/${string}` | undefined;
|
|
51
|
-
};
|
|
52
|
-
log: [never, string, null][];
|
|
53
|
-
debounceCount: number;
|
|
54
|
-
name: "updatePost";
|
|
55
|
-
}>;
|
|
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,45 +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.ZodTuple<[z.ZodType<never, z.ZodTypeDef, never>, z.ZodString, z.ZodNullable<z.ZodType<never, z.ZodTypeDef, never>>], null>, "many">;
|
|
8
5
|
debounceCount: z.ZodNumber;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
identityRef: z.ZodString;
|
|
7
|
+
sessionRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
operation: z.ZodObject<{
|
|
10
|
+
name: z.ZodLiteral<"updatePostTitle">;
|
|
11
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
changeSetRef: z.ZodTemplateLiteral<`${string}/${number}`> | z.ZodNullable<z.ZodTemplateLiteral<`${string}/${number}`>>;
|
|
12
14
|
payload: z.ZodObject<{
|
|
13
|
-
ref: z.
|
|
15
|
+
ref: z.ZodTemplateLiteral<`Post/${number}`>;
|
|
14
16
|
title: z.ZodString;
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, {
|
|
19
|
-
ref: `Post/${string}`;
|
|
20
|
-
title: string;
|
|
21
|
-
}>;
|
|
22
|
-
log: z.ZodType<[never, string, null][], z.ZodTypeDef, [never, string, null][]>;
|
|
23
|
-
}>, "strict", z.ZodTypeAny, {
|
|
24
|
-
ref: `Mutation/${string}`;
|
|
25
|
-
timestamp: string;
|
|
26
|
-
changeSetRef: null;
|
|
27
|
-
payload: {
|
|
28
|
-
ref: `Post/${string}`;
|
|
29
|
-
title: string;
|
|
30
|
-
};
|
|
31
|
-
log: [never, string, null][];
|
|
32
|
-
debounceCount: number;
|
|
33
|
-
name: "updatePostTitle";
|
|
34
|
-
}, {
|
|
35
|
-
ref: `Mutation/${string}`;
|
|
36
|
-
timestamp: string;
|
|
37
|
-
changeSetRef: null;
|
|
38
|
-
payload: {
|
|
39
|
-
ref: `Post/${string}`;
|
|
40
|
-
title: string;
|
|
41
|
-
};
|
|
42
|
-
log: [never, string, null][];
|
|
43
|
-
debounceCount: number;
|
|
44
|
-
name: "updatePostTitle";
|
|
45
|
-
}>;
|
|
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}`>;
|
|
@@ -4,37 +4,6 @@ import { BlockTitleSchema } from "./BlockTitleSchema";
|
|
|
4
4
|
import { DraftSchema } from "./DraftSchema";
|
|
5
5
|
import { PostSchema } from "./PostSchema";
|
|
6
6
|
export { BlockImageSchema, BlockParagraphSchema, BlockTitleSchema, DraftSchema, PostSchema, };
|
|
7
|
-
export declare const entities: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
8
|
-
ref: import("zod").ZodType<never, import("zod").ZodTypeDef, never>;
|
|
9
|
-
entity: import("zod").ZodString;
|
|
10
|
-
created: import("zod").ZodObject<{
|
|
11
|
-
mutationRef: import("zod").ZodType<`Mutation/${string}`, import("zod").ZodTypeDef, `Mutation/${string}`>;
|
|
12
|
-
timestamp: import("zod").ZodString;
|
|
13
|
-
}, "strict", import("zod").ZodTypeAny, {
|
|
14
|
-
mutationRef: `Mutation/${string}`;
|
|
15
|
-
timestamp: string;
|
|
16
|
-
}, {
|
|
17
|
-
mutationRef: `Mutation/${string}`;
|
|
18
|
-
timestamp: string;
|
|
19
|
-
}>;
|
|
20
|
-
updated: import("zod").ZodObject<{
|
|
21
|
-
mutationRef: import("zod").ZodType<`Mutation/${string}`, import("zod").ZodTypeDef, `Mutation/${string}`>;
|
|
22
|
-
timestamp: import("zod").ZodString;
|
|
23
|
-
}, "strict", import("zod").ZodTypeAny, {
|
|
24
|
-
mutationRef: `Mutation/${string}`;
|
|
25
|
-
timestamp: string;
|
|
26
|
-
}, {
|
|
27
|
-
mutationRef: `Mutation/${string}`;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
}>;
|
|
30
|
-
data: import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
31
|
-
parents: import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
32
|
-
ancestors: import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
33
|
-
}, import("zod").ZodRawShape>, "strict", import("zod").ZodTypeAny, {
|
|
34
|
-
[x: string]: any;
|
|
35
|
-
}, {
|
|
36
|
-
[x: string]: any;
|
|
37
|
-
}>[];
|
|
38
7
|
export { DraftRefSchema } from "./DraftRefSchema";
|
|
39
8
|
export { PostRefSchema } from "./PostRefSchema";
|
|
40
9
|
export { UserRefSchema } from "./UserRefSchema";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const testAdapterImplementation: <EngineOptions extends {}>(adapterConstructor: any,
|
|
1
|
+
export declare const testAdapterImplementation: <EngineOptions extends {}>(adapterConstructor: any, generateArgs: () => EngineOptions) => Promise<void>;
|
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.91",
|
|
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.91",
|
|
21
|
+
"zod": ">=4.0.0"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [],
|
|
24
24
|
"author": "Eigil Sagafos",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const deleteBlock: import("roc-db").WriteOperation<"deleteBlock", {
|
|
2
|
-
ref: `Mutation/${string}`;
|
|
3
|
-
timestamp: string;
|
|
4
|
-
changeSetRef: null;
|
|
5
|
-
payload: `BlockImage/${string}` | `BlockParagraph/${string}`;
|
|
6
|
-
log: [never, string, null][];
|
|
7
|
-
debounceCount: number;
|
|
8
|
-
name: "deleteBlock";
|
|
9
|
-
}, `BlockImage/${string}` | `BlockParagraph/${string}`, {
|
|
10
|
-
[x: string]: any;
|
|
11
|
-
}>;
|