@roc-db/test-utils 0.2.0-pre.7 → 0.2.0-pre.70

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.
Files changed (60) hide show
  1. package/dist/index.js +926 -286
  2. package/dist/types/entities/BlockImageEntity.d.ts +15 -0
  3. package/dist/types/entities/BlockParagraph.d.ts +15 -0
  4. package/dist/types/entities/BlockRow.d.ts +15 -0
  5. package/dist/types/entities/Draft.d.ts +15 -0
  6. package/dist/types/entities/PostEntity.d.ts +30 -0
  7. package/dist/types/entities/PostVersion.d.ts +18 -0
  8. package/dist/types/entities/UserEntity.d.ts +9 -0
  9. package/dist/types/entities/index.d.ts +97 -0
  10. package/dist/types/index.d.ts +2 -1
  11. package/dist/types/operations/applyDraft.d.ts +1 -0
  12. package/dist/types/operations/createBlockImage.d.ts +10 -14
  13. package/dist/types/operations/createBlockParagraph.d.ts +6 -13
  14. package/dist/types/operations/createBlockRow.d.ts +6 -13
  15. package/dist/types/operations/createBlockTitle.d.ts +6 -13
  16. package/dist/types/operations/createDraft.d.ts +6 -13
  17. package/dist/types/operations/createPost.d.ts +10 -15
  18. package/dist/types/operations/createUser.d.ts +8 -0
  19. package/dist/types/operations/crudBySlug.d.ts +11 -0
  20. package/dist/types/operations/deleteBlocks.d.ts +2 -0
  21. package/dist/types/operations/deleteDraft.d.ts +1 -0
  22. package/dist/types/operations/deletePost.d.ts +1 -9
  23. package/dist/types/operations/index.d.ts +1 -157
  24. package/dist/types/operations/moveBlocks.d.ts +11 -0
  25. package/dist/types/operations/pageBlocks.d.ts +1 -0
  26. package/dist/types/operations/pageEmptyEntitiesArray.d.ts +1 -0
  27. package/dist/types/operations/pagePosts.d.ts +1 -0
  28. package/dist/types/operations/pagePostsByTag.d.ts +1 -0
  29. package/dist/types/operations/pageSplat.d.ts +1 -0
  30. package/dist/types/operations/readMutation.d.ts +1 -0
  31. package/dist/types/operations/readPostBySlug.d.ts +1 -0
  32. package/dist/types/operations/testTransactionalEdits.d.ts +14 -0
  33. package/dist/types/operations/updateBlockParagraph.d.ts +8 -12
  34. package/dist/types/operations/updatePost.d.ts +12 -16
  35. package/dist/types/operations/updatePostDescription.d.ts +11 -0
  36. package/dist/types/operations/updatePostSlug.d.ts +11 -0
  37. package/dist/types/operations/updatePostTags.d.ts +11 -0
  38. package/dist/types/operations/updatePostTitle.d.ts +8 -14
  39. package/dist/types/schemas/BlockImageSchema.d.ts +56 -9
  40. package/dist/types/schemas/BlockParagraphSchema.d.ts +56 -9
  41. package/dist/types/schemas/BlockRowSchema.d.ts +61 -9
  42. package/dist/types/schemas/BlockTitleSchema.d.ts +56 -9
  43. package/dist/types/schemas/CreatePostMutationSchema.d.ts +31 -7
  44. package/dist/types/schemas/CreateUserMutationSchema.d.ts +31 -7
  45. package/dist/types/schemas/DraftSchema.d.ts +46 -9
  46. package/dist/types/schemas/PostSchema.d.ts +81 -9
  47. package/dist/types/schemas/UpdatePostMutationSchema.d.ts +32 -8
  48. package/dist/types/schemas/UpdatePostTitleMutationSchema.d.ts +31 -7
  49. package/dist/types/schemas/index.d.ts +0 -31
  50. package/dist/types/testAdapterImplementation.d.ts +1 -1
  51. package/package.json +2 -2
  52. package/dist/types/operations/deleteBlock.d.ts +0 -11
  53. package/dist/types/schemas/CreateBlockImageMutationSchema.d.ts +0 -40
  54. package/dist/types/schemas/CreateBlockParagraphMutationSchema.d.ts +0 -40
  55. package/dist/types/schemas/CreateBlockRowMutationSchema.d.ts +0 -40
  56. package/dist/types/schemas/CreateBlockTitleMutationSchema.d.ts +0 -40
  57. package/dist/types/schemas/CreateDraftMutationSchema.d.ts +0 -40
  58. package/dist/types/schemas/DeleteBlockMutationSchema.d.ts +0 -30
  59. package/dist/types/schemas/DeletePostMutationSchema.d.ts +0 -29
  60. package/dist/types/schemas/UpdateBlockParagraphMutationSchema.d.ts +0 -45
@@ -0,0 +1,15 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const BlockImageEntity: Entity<"BlockImage", z.ZodObject<{
4
+ url: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ url: string;
7
+ }, {
8
+ url: string;
9
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{
10
+ parent: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ parent: `Post/${string}`;
13
+ }, {
14
+ parent: `Post/${string}`;
15
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,15 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const BlockParagraph: Entity<"BlockParagraph", z.ZodObject<{
4
+ content: z.ZodOptional<z.ZodString>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ content?: string | undefined;
7
+ }, {
8
+ content?: string | undefined;
9
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{
10
+ parent: z.ZodUnion<[z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>, z.ZodUnion<[z.ZodType<`BlockParagraph/${string}`, z.ZodTypeDef, `BlockParagraph/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>]>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
13
+ }, {
14
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
15
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,15 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const BlockRow: Entity<"BlockRow", z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{
4
+ blocks: z.ZodArray<z.ZodUnion<[z.ZodType<`BlockParagraph/${string}`, z.ZodTypeDef, `BlockParagraph/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>, "many">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ blocks: (`BlockParagraph/${string}` | `BlockRow/${string}`)[];
7
+ }, {
8
+ blocks: (`BlockParagraph/${string}` | `BlockRow/${string}`)[];
9
+ }>, z.ZodObject<{
10
+ parent: z.ZodUnion<[z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>, z.ZodUnion<[z.ZodType<`BlockParagraph/${string}`, z.ZodTypeDef, `BlockParagraph/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>]>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
13
+ }, {
14
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
15
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,15 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const Draft: Entity<"Draft", z.ZodObject<{
4
+ appliedAt: z.ZodOptional<z.ZodString>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ appliedAt?: string | undefined;
7
+ }, {
8
+ appliedAt?: string | undefined;
9
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{
10
+ post: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ post: `Post/${string}`;
13
+ }, {
14
+ post: `Post/${string}`;
15
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,30 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const PostEntity: Entity<"Post", z.ZodObject<{
4
+ title: z.ZodString;
5
+ text: z.ZodOptional<z.ZodString>;
6
+ tags: z.ZodArray<z.ZodString, "many">;
7
+ slug: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ title: string;
10
+ tags: string[];
11
+ text?: string | undefined;
12
+ slug?: string | undefined;
13
+ }, {
14
+ title: string;
15
+ tags: string[];
16
+ text?: string | undefined;
17
+ slug?: string | undefined;
18
+ }>, z.ZodObject<{
19
+ blocks: z.ZodArray<z.ZodString, "many">;
20
+ }, "strip", z.ZodTypeAny, {
21
+ blocks: string[];
22
+ }, {
23
+ blocks: string[];
24
+ }>, z.ZodObject<{
25
+ author: z.ZodOptional<z.ZodType<`User/${string}`, z.ZodTypeDef, `User/${string}`>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ author?: `User/${string}` | undefined;
28
+ }, {
29
+ author?: `User/${string}` | undefined;
30
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,18 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const PostVersion: Entity<"PostVersion", z.ZodObject<{
4
+ version: z.ZodNumber;
5
+ snapshot: z.ZodArray<z.ZodAny, "many">;
6
+ }, "strip", z.ZodTypeAny, {
7
+ version: number;
8
+ snapshot: any[];
9
+ }, {
10
+ version: number;
11
+ snapshot: any[];
12
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{
13
+ post: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ post: `Post/${string}`;
16
+ }, {
17
+ post: `Post/${string}`;
18
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,9 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const UserEntity: Entity<"User", z.ZodObject<{
4
+ email: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ email: string;
7
+ }, {
8
+ email: string;
9
+ }>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>, z.ZodObject<{}, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>>;
@@ -0,0 +1,97 @@
1
+ export declare const entities: (import("roc-db").Entity<"Draft", import("zod").ZodObject<{
2
+ appliedAt: import("zod").ZodOptional<import("zod").ZodString>;
3
+ }, "strip", import("zod").ZodTypeAny, {
4
+ appliedAt?: string | undefined;
5
+ }, {
6
+ appliedAt?: string | undefined;
7
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
8
+ post: import("zod").ZodType<`Post/${string}`, import("zod").ZodTypeDef, `Post/${string}`>;
9
+ }, "strip", import("zod").ZodTypeAny, {
10
+ post: `Post/${string}`;
11
+ }, {
12
+ post: `Post/${string}`;
13
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>> | import("roc-db").Entity<"BlockImage", import("zod").ZodObject<{
14
+ url: import("zod").ZodString;
15
+ }, "strip", import("zod").ZodTypeAny, {
16
+ url: string;
17
+ }, {
18
+ url: string;
19
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
20
+ parent: import("zod").ZodType<`Post/${string}`, import("zod").ZodTypeDef, `Post/${string}`>;
21
+ }, "strip", import("zod").ZodTypeAny, {
22
+ parent: `Post/${string}`;
23
+ }, {
24
+ parent: `Post/${string}`;
25
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>> | import("roc-db").Entity<"Post", import("zod").ZodObject<{
26
+ title: import("zod").ZodString;
27
+ text: import("zod").ZodOptional<import("zod").ZodString>;
28
+ tags: import("zod").ZodArray<import("zod").ZodString, "many">;
29
+ slug: import("zod").ZodOptional<import("zod").ZodString>;
30
+ }, "strip", import("zod").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
+ }>, import("zod").ZodObject<{
41
+ blocks: import("zod").ZodArray<import("zod").ZodString, "many">;
42
+ }, "strip", import("zod").ZodTypeAny, {
43
+ blocks: string[];
44
+ }, {
45
+ blocks: string[];
46
+ }>, import("zod").ZodObject<{
47
+ author: import("zod").ZodOptional<import("zod").ZodType<`User/${string}`, import("zod").ZodTypeDef, `User/${string}`>>;
48
+ }, "strip", import("zod").ZodTypeAny, {
49
+ author?: `User/${string}` | undefined;
50
+ }, {
51
+ author?: `User/${string}` | undefined;
52
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>> | import("roc-db").Entity<"BlockParagraph", import("zod").ZodObject<{
53
+ content: import("zod").ZodOptional<import("zod").ZodString>;
54
+ }, "strip", import("zod").ZodTypeAny, {
55
+ content?: string | undefined;
56
+ }, {
57
+ content?: string | undefined;
58
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
59
+ parent: import("zod").ZodUnion<[import("zod").ZodType<`Post/${string}`, import("zod").ZodTypeDef, `Post/${string}`>, import("zod").ZodUnion<[import("zod").ZodType<`BlockParagraph/${string}`, import("zod").ZodTypeDef, `BlockParagraph/${string}`>, import("zod").ZodType<`BlockRow/${string}`, import("zod").ZodTypeDef, `BlockRow/${string}`>]>]>;
60
+ }, "strip", import("zod").ZodTypeAny, {
61
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
62
+ }, {
63
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
64
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>> | import("roc-db").Entity<"BlockRow", import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
65
+ blocks: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodType<`BlockParagraph/${string}`, import("zod").ZodTypeDef, `BlockParagraph/${string}`>, import("zod").ZodType<`BlockRow/${string}`, import("zod").ZodTypeDef, `BlockRow/${string}`>]>, "many">;
66
+ }, "strip", import("zod").ZodTypeAny, {
67
+ blocks: (`BlockParagraph/${string}` | `BlockRow/${string}`)[];
68
+ }, {
69
+ blocks: (`BlockParagraph/${string}` | `BlockRow/${string}`)[];
70
+ }>, import("zod").ZodObject<{
71
+ parent: import("zod").ZodUnion<[import("zod").ZodType<`Post/${string}`, import("zod").ZodTypeDef, `Post/${string}`>, import("zod").ZodUnion<[import("zod").ZodType<`BlockParagraph/${string}`, import("zod").ZodTypeDef, `BlockParagraph/${string}`>, import("zod").ZodType<`BlockRow/${string}`, import("zod").ZodTypeDef, `BlockRow/${string}`>]>]>;
72
+ }, "strip", import("zod").ZodTypeAny, {
73
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
74
+ }, {
75
+ parent: `Post/${string}` | `BlockParagraph/${string}` | `BlockRow/${string}`;
76
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>> | import("roc-db").Entity<"PostVersion", import("zod").ZodObject<{
77
+ version: import("zod").ZodNumber;
78
+ snapshot: import("zod").ZodArray<import("zod").ZodAny, "many">;
79
+ }, "strip", import("zod").ZodTypeAny, {
80
+ version: number;
81
+ snapshot: any[];
82
+ }, {
83
+ version: number;
84
+ snapshot: any[];
85
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
86
+ post: import("zod").ZodType<`Post/${string}`, import("zod").ZodTypeDef, `Post/${string}`>;
87
+ }, "strip", import("zod").ZodTypeAny, {
88
+ post: `Post/${string}`;
89
+ }, {
90
+ post: `Post/${string}`;
91
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>> | import("roc-db").Entity<"User", import("zod").ZodObject<{
92
+ email: import("zod").ZodString;
93
+ }, "strip", import("zod").ZodTypeAny, {
94
+ email: string;
95
+ }, {
96
+ email: string;
97
+ }>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {}, {}>>)[];
@@ -1,4 +1,5 @@
1
1
  export * from "./schemas";
2
- export * from "./operations";
2
+ export { entities } from "./entities";
3
+ export { operations } from "./operations";
3
4
  export { testAdapterImplementation } from "./testAdapterImplementation";
4
5
  export { inMemoryAdapter } from "./inMemoryAdapter";
@@ -0,0 +1 @@
1
+ export declare const applyDraft: import("roc-db").WriteOperation<"applyDraft", import("zod").ZodType<`Draft/${string}`, import("zod").ZodTypeDef, `Draft/${string}`>>;
@@ -1,15 +1,11 @@
1
- export declare const createBlockImage: import("roc-db").WriteOperation<"createBlockImage", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- postRef: `Post/${string}`;
7
- };
8
- log: [never, string, null][];
9
- debounceCount: number;
10
- name: "createBlockImage";
1
+ import { z } from "zod";
2
+ export declare const createBlockImage: import("roc-db").WriteOperation<"createBlockImage", z.ZodObject<{
3
+ parentRef: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
4
+ url: z.ZodString;
5
+ }, "strict", z.ZodTypeAny, {
6
+ url: string;
7
+ parentRef: `Post/${string}`;
11
8
  }, {
12
- postRef: `Post/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>;
9
+ url: string;
10
+ parentRef: `Post/${string}`;
11
+ }>>;
@@ -1,15 +1,8 @@
1
- export declare const createBlockParagrah: import("roc-db").WriteOperation<"createBlockParagraph", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- parentRef: `Post/${string}` | `BlockRow/${string}`;
7
- };
8
- log: [never, string, null][];
9
- debounceCount: number;
10
- name: "createBlockParagraph";
11
- }, {
1
+ import { z } from "zod";
2
+ export declare const createBlockParagrah: import("roc-db").WriteOperation<"createBlockParagraph", z.ZodObject<{
3
+ parentRef: z.ZodUnion<[z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>;
4
+ }, "strict", z.ZodTypeAny, {
12
5
  parentRef: `Post/${string}` | `BlockRow/${string}`;
13
6
  }, {
14
- [x: string]: any;
15
- }>;
7
+ parentRef: `Post/${string}` | `BlockRow/${string}`;
8
+ }>>;
@@ -1,15 +1,8 @@
1
- export declare const createBlockRow: import("roc-db").WriteOperation<"createBlockRow", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- parentRef: `Post/${string}` | `BlockRow/${string}`;
7
- };
8
- log: [never, string, null][];
9
- debounceCount: number;
10
- name: "createBlockRow";
11
- }, {
1
+ import { z } from "zod";
2
+ export declare const createBlockRow: import("roc-db").WriteOperation<"createBlockRow", z.ZodObject<{
3
+ parentRef: z.ZodUnion<[z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>;
4
+ }, "strict", z.ZodTypeAny, {
12
5
  parentRef: `Post/${string}` | `BlockRow/${string}`;
13
6
  }, {
14
- [x: string]: any;
15
- }>;
7
+ parentRef: `Post/${string}` | `BlockRow/${string}`;
8
+ }>>;
@@ -1,15 +1,8 @@
1
- export declare const createBlockTitle: import("roc-db").WriteOperation<"createBlockTitle", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- parentRef: `Post/${string}` | `BlockRow/${string}`;
7
- };
8
- log: [never, string, null][];
9
- debounceCount: number;
10
- name: "createBlockTitle";
11
- }, {
1
+ import { z } from "zod";
2
+ export declare const createBlockTitle: import("roc-db").WriteOperation<"createBlockTitle", z.ZodObject<{
3
+ parentRef: z.ZodUnion<[z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>;
4
+ }, "strict", z.ZodTypeAny, {
12
5
  parentRef: `Post/${string}` | `BlockRow/${string}`;
13
6
  }, {
14
- [x: string]: any;
15
- }>;
7
+ parentRef: `Post/${string}` | `BlockRow/${string}`;
8
+ }>>;
@@ -1,15 +1,8 @@
1
- export declare const createDraft: import("roc-db").WriteOperation<"createDraft", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- postRef: `Post/${string}`;
7
- };
8
- log: [never, string, null][];
9
- debounceCount: number;
10
- name: "createDraft";
11
- }, {
1
+ import { z } from "zod";
2
+ export declare const createDraft: import("roc-db").WriteOperation<"createDraft", z.ZodObject<{
3
+ postRef: z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>;
4
+ }, "strict", z.ZodTypeAny, {
12
5
  postRef: `Post/${string}`;
13
6
  }, {
14
- [x: string]: any;
15
- }>;
7
+ postRef: `Post/${string}`;
8
+ }>>;
@@ -1,19 +1,14 @@
1
- export declare const createPost: import("roc-db").WriteOperation<"createPost", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- title: string;
7
- tags: string[];
8
- slug?: string | undefined;
9
- };
10
- log: [never, string, null][];
11
- debounceCount: number;
12
- name: "createPost";
13
- }, {
1
+ import { z } from "zod";
2
+ export declare const createPost: import("roc-db").WriteOperation<"createPost", z.ZodObject<{
3
+ title: z.ZodString;
4
+ slug: z.ZodOptional<z.ZodString>;
5
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6
+ }, "strict", z.ZodTypeAny, {
14
7
  title: string;
15
8
  tags: string[];
16
9
  slug?: string | undefined;
17
10
  }, {
18
- [x: string]: any;
19
- }>;
11
+ title: string;
12
+ tags?: string[] | undefined;
13
+ slug?: string | undefined;
14
+ }>>;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export declare const createUser: import("roc-db").WriteOperation<"createUser", z.ZodObject<{
3
+ email: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ email: string;
6
+ }, {
7
+ email: string;
8
+ }>>;
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ export declare const crudBySlug: import("roc-db").WriteOperation<"crudBySlug", z.ZodObject<{
3
+ slug: z.ZodString;
4
+ newSlug: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ slug: string;
7
+ newSlug: string;
8
+ }, {
9
+ slug: string;
10
+ newSlug: string;
11
+ }>>;
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export declare const deleteBlocks: import("roc-db").WriteOperation<"deleteBlocks", z.ZodArray<z.ZodUnion<[z.ZodType<`BlockParagraph/${string}`, z.ZodTypeDef, `BlockParagraph/${string}`>, z.ZodType<`BlockImage/${string}`, z.ZodTypeDef, `BlockImage/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>, "many">>;
@@ -0,0 +1 @@
1
+ export declare const deleteDraft: import("roc-db").WriteOperation<"deleteDraft", import("zod").ZodType<`Draft/${string}`, import("zod").ZodTypeDef, `Draft/${string}`>>;
@@ -1,9 +1 @@
1
- export declare const deletePost: import("roc-db").WriteOperation<"deletePost", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: `Post/${string}`;
6
- log: [never, string, null][];
7
- debounceCount: number;
8
- name: "deletePost";
9
- }, `Post/${string}`, any>;
1
+ export declare const deletePost: import("roc-db").WriteOperation<"deletePost", import("zod").ZodType<`Post/${string}`, import("zod").ZodTypeDef, `Post/${string}`>>;
@@ -1,157 +1 @@
1
- export declare const operations: readonly [import("roc-db").WriteOperation<"createBlockImage", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- postRef: `Post/${string}`;
7
- };
8
- log: [never, string, null][];
9
- debounceCount: number;
10
- name: "createBlockImage";
11
- }, {
12
- postRef: `Post/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>, import("roc-db").WriteOperation<"createBlockTitle", {
16
- ref: `Mutation/${string}`;
17
- timestamp: string;
18
- changeSetRef: null;
19
- payload: {
20
- parentRef: `Post/${string}` | `BlockRow/${string}`;
21
- };
22
- log: [never, string, null][];
23
- debounceCount: number;
24
- name: "createBlockTitle";
25
- }, {
26
- parentRef: `Post/${string}` | `BlockRow/${string}`;
27
- }, {
28
- [x: string]: any;
29
- }>, import("roc-db").WriteOperation<"createBlockParagraph", {
30
- ref: `Mutation/${string}`;
31
- timestamp: string;
32
- changeSetRef: null;
33
- payload: {
34
- parentRef: `Post/${string}` | `BlockRow/${string}`;
35
- };
36
- log: [never, string, null][];
37
- debounceCount: number;
38
- name: "createBlockParagraph";
39
- }, {
40
- parentRef: `Post/${string}` | `BlockRow/${string}`;
41
- }, {
42
- [x: string]: any;
43
- }>, import("roc-db").WriteOperation<"createBlockRow", {
44
- ref: `Mutation/${string}`;
45
- timestamp: string;
46
- changeSetRef: null;
47
- payload: {
48
- parentRef: `Post/${string}` | `BlockRow/${string}`;
49
- };
50
- log: [never, string, null][];
51
- debounceCount: number;
52
- name: "createBlockRow";
53
- }, {
54
- parentRef: `Post/${string}` | `BlockRow/${string}`;
55
- }, {
56
- [x: string]: any;
57
- }>, import("roc-db").WriteOperation<"createDraft", {
58
- ref: `Mutation/${string}`;
59
- timestamp: string;
60
- changeSetRef: null;
61
- payload: {
62
- postRef: `Post/${string}`;
63
- };
64
- log: [never, string, null][];
65
- debounceCount: number;
66
- name: "createDraft";
67
- }, {
68
- postRef: `Post/${string}`;
69
- }, {
70
- [x: string]: any;
71
- }>, import("roc-db").WriteOperation<"createPost", {
72
- ref: `Mutation/${string}`;
73
- timestamp: string;
74
- changeSetRef: null;
75
- payload: {
76
- title: string;
77
- tags: string[];
78
- slug?: string | undefined;
79
- };
80
- log: [never, string, null][];
81
- debounceCount: number;
82
- name: "createPost";
83
- }, {
84
- title: string;
85
- tags: string[];
86
- slug?: string | undefined;
87
- }, {
88
- [x: string]: any;
89
- }>, import("roc-db").WriteOperation<"deleteBlock", {
90
- ref: `Mutation/${string}`;
91
- timestamp: string;
92
- changeSetRef: null;
93
- payload: `BlockImage/${string}` | `BlockParagraph/${string}`;
94
- log: [never, string, null][];
95
- debounceCount: number;
96
- name: "deleteBlock";
97
- }, `BlockImage/${string}` | `BlockParagraph/${string}`, {
98
- [x: string]: any;
99
- }>, import("roc-db").WriteOperation<"deletePost", {
100
- ref: `Mutation/${string}`;
101
- timestamp: string;
102
- changeSetRef: null;
103
- payload: `Post/${string}`;
104
- log: [never, string, null][];
105
- debounceCount: number;
106
- name: "deletePost";
107
- }, `Post/${string}`, any>, any, any, import("roc-db").WriteOperation<"updateBlockParagraph", {
108
- ref: `Mutation/${string}`;
109
- timestamp: string;
110
- changeSetRef: null;
111
- payload: {
112
- ref: `BlockParagraph/${string}`;
113
- content: string;
114
- };
115
- log: [never, string, null][];
116
- debounceCount: number;
117
- name: "updateBlockParagraph";
118
- }, {
119
- ref: `BlockParagraph/${string}`;
120
- content: string;
121
- }, `BlockParagraph/${string}`>, import("roc-db").WriteOperation<"updatePost", {
122
- ref: `Mutation/${string}`;
123
- timestamp: string;
124
- changeSetRef: null;
125
- payload: {
126
- ref: `Post/${string}`;
127
- tags: string[];
128
- title?: string | undefined;
129
- authorRef?: `User/${string}` | undefined;
130
- };
131
- log: [never, string, null][];
132
- debounceCount: number;
133
- name: "updatePost";
134
- }, {
135
- ref: `Post/${string}`;
136
- tags: string[];
137
- title?: string | undefined;
138
- authorRef?: `User/${string}` | undefined;
139
- }, {
140
- [x: string]: any;
141
- }>, import("roc-db").WriteOperation<"updatePostTitle", {
142
- ref: `Mutation/${string}`;
143
- timestamp: string;
144
- changeSetRef: null;
145
- payload: {
146
- ref: `Post/${string}`;
147
- title: string;
148
- };
149
- log: [never, string, null][];
150
- debounceCount: number;
151
- name: "updatePostTitle";
152
- }, {
153
- ref: `Post/${string}`;
154
- title: string;
155
- }, {
156
- [x: string]: any;
157
- }>];
1
+ export declare const operations: any[];
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ export declare const moveBlocks: import("roc-db").WriteOperation<"moveBlocks", z.ZodObject<{
3
+ refs: z.ZodArray<z.ZodUnion<[z.ZodType<`BlockParagraph/${string}`, z.ZodTypeDef, `BlockParagraph/${string}`>, z.ZodType<`BlockRow/${string}`, z.ZodTypeDef, `BlockRow/${string}`>]>, "many">;
4
+ targetPosition: z.ZodNumber;
5
+ }, "strict", z.ZodTypeAny, {
6
+ refs: (`BlockParagraph/${string}` | `BlockRow/${string}`)[];
7
+ targetPosition: number;
8
+ }, {
9
+ refs: (`BlockParagraph/${string}` | `BlockRow/${string}`)[];
10
+ targetPosition: number;
11
+ }>>;
@@ -0,0 +1 @@
1
+ export declare const pageBlocks: any;
@@ -0,0 +1 @@
1
+ export declare const pageEmptyEntitiesArray: any;
@@ -0,0 +1 @@
1
+ export declare const pagePosts: any;
@@ -0,0 +1 @@
1
+ export declare const pagePostsByTag: any;
@@ -0,0 +1 @@
1
+ export declare const pageSplat: any;
@@ -0,0 +1 @@
1
+ export declare const readMutation: any;
@@ -0,0 +1 @@
1
+ export declare const readPostBySlug: any;
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ export declare const testTransactionalEdits: import("roc-db").WriteOperation<"testTransactionalEdits", z.ZodObject<{
3
+ name: z.ZodOptional<z.ZodString>;
4
+ post1ref: z.ZodOptional<z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>>;
5
+ post2ref: z.ZodOptional<z.ZodType<`Post/${string}`, z.ZodTypeDef, `Post/${string}`>>;
6
+ }, "strict", z.ZodTypeAny, {
7
+ name?: string | undefined;
8
+ post1ref?: `Post/${string}` | undefined;
9
+ post2ref?: `Post/${string}` | undefined;
10
+ }, {
11
+ name?: string | undefined;
12
+ post1ref?: `Post/${string}` | undefined;
13
+ post2ref?: `Post/${string}` | undefined;
14
+ }>>;