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