@roc-db/test-utils 0.2.0-pre.10 → 0.2.0-pre.101

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 (78) hide show
  1. package/dist/index.js +1233 -303
  2. package/dist/types/entities/BlockImageEntity.d.ts +7 -0
  3. package/dist/types/entities/BlockParagraph.d.ts +7 -0
  4. package/dist/types/entities/BlockRow.d.ts +7 -0
  5. package/dist/types/entities/Draft.d.ts +8 -0
  6. package/dist/types/entities/OrgSettingsEntity.d.ts +10 -0
  7. package/dist/types/entities/PostEntity.d.ts +12 -0
  8. package/dist/types/entities/PostVersion.d.ts +8 -0
  9. package/dist/types/entities/UserEntity.d.ts +5 -0
  10. package/dist/types/entities/index.d.ts +41 -0
  11. package/dist/types/index.d.ts +2 -1
  12. package/dist/types/operations/applyDraft.d.ts +1 -0
  13. package/dist/types/operations/createBlockImage.d.ts +5 -15
  14. package/dist/types/operations/createBlockParagraph.d.ts +5 -15
  15. package/dist/types/operations/createBlockRow.d.ts +4 -15
  16. package/dist/types/operations/createBlockRowReadingRoot.d.ts +13 -0
  17. package/dist/types/operations/createBlockTitle.d.ts +4 -15
  18. package/dist/types/operations/createDraft.d.ts +4 -15
  19. package/dist/types/operations/createOrgSettings.d.ts +6 -0
  20. package/dist/types/operations/createPost.d.ts +6 -19
  21. package/dist/types/operations/createUnknownRef.d.ts +2 -0
  22. package/dist/types/operations/createUser.d.ts +4 -0
  23. package/dist/types/operations/crudBySlug.d.ts +5 -0
  24. package/dist/types/operations/deleteBlocks.d.ts +2 -0
  25. package/dist/types/operations/deleteDraft.d.ts +1 -0
  26. package/dist/types/operations/deleteOrgSettings.d.ts +2 -0
  27. package/dist/types/operations/deletePost.d.ts +1 -9
  28. package/dist/types/operations/duplicateDraft.d.ts +10 -0
  29. package/dist/types/operations/index.d.ts +1 -157
  30. package/dist/types/operations/moveBlocks.d.ts +5 -0
  31. package/dist/types/operations/pageBlocks.d.ts +1 -0
  32. package/dist/types/operations/pageEmptyEntitiesArray.d.ts +1 -0
  33. package/dist/types/operations/pagePosts.d.ts +1 -0
  34. package/dist/types/operations/pagePostsByTag.d.ts +1 -0
  35. package/dist/types/operations/pageSplat.d.ts +1 -0
  36. package/dist/types/operations/readMutation.d.ts +1 -0
  37. package/dist/types/operations/readOrgSettings.d.ts +2 -0
  38. package/dist/types/operations/readPostBySlug.d.ts +1 -0
  39. package/dist/types/operations/testTransactionalEdits.d.ts +6 -0
  40. package/dist/types/operations/updateBlockParagraph.d.ts +5 -15
  41. package/dist/types/operations/updateOrgSettingsName.d.ts +4 -0
  42. package/dist/types/operations/updatePost.d.ts +7 -21
  43. package/dist/types/operations/updatePostDescription.d.ts +5 -0
  44. package/dist/types/operations/updatePostSlug.d.ts +5 -0
  45. package/dist/types/operations/updatePostTags.d.ts +5 -0
  46. package/dist/types/operations/updatePostTitle.d.ts +5 -17
  47. package/dist/types/schemas/BlockImageRefSchema.d.ts +1 -1
  48. package/dist/types/schemas/BlockImageSchema.d.ts +20 -31
  49. package/dist/types/schemas/BlockParagraphRefSchema.d.ts +1 -1
  50. package/dist/types/schemas/BlockParagraphSchema.d.ts +20 -31
  51. package/dist/types/schemas/BlockRefSchema.d.ts +1 -1
  52. package/dist/types/schemas/BlockRowRefSchema.d.ts +1 -1
  53. package/dist/types/schemas/BlockRowSchema.d.ts +21 -31
  54. package/dist/types/schemas/BlockTitleSchema.d.ts +20 -31
  55. package/dist/types/schemas/CreatePostMutationSchema.d.ts +14 -44
  56. package/dist/types/schemas/CreateUserMutationSchema.d.ts +13 -35
  57. package/dist/types/schemas/DraftRefSchema.d.ts +1 -1
  58. package/dist/types/schemas/DraftSchema.d.ts +18 -31
  59. package/dist/types/schemas/PostRefSchema.d.ts +1 -1
  60. package/dist/types/schemas/PostSchema.d.ts +25 -31
  61. package/dist/types/schemas/PostVersionRefSchema.d.ts +1 -0
  62. package/dist/types/schemas/UpdatePostMutationSchema.d.ts +16 -50
  63. package/dist/types/schemas/UpdatePostTitleMutationSchema.d.ts +14 -40
  64. package/dist/types/schemas/UserRefSchema.d.ts +1 -1
  65. package/dist/types/schemas/index.d.ts +0 -31
  66. package/dist/types/setup/index.d.ts +11 -0
  67. package/dist/types/testAdapterImplementation.d.ts +1 -1
  68. package/package.json +8 -4
  69. package/dist/types/operations/deleteBlock.d.ts +0 -11
  70. package/dist/types/schemas/BlockTitleRefSchema.d.ts +0 -1
  71. package/dist/types/schemas/CreateBlockImageMutationSchema.d.ts +0 -40
  72. package/dist/types/schemas/CreateBlockParagraphMutationSchema.d.ts +0 -40
  73. package/dist/types/schemas/CreateBlockRowMutationSchema.d.ts +0 -40
  74. package/dist/types/schemas/CreateBlockTitleMutationSchema.d.ts +0 -40
  75. package/dist/types/schemas/CreateDraftMutationSchema.d.ts +0 -40
  76. package/dist/types/schemas/DeleteBlockMutationSchema.d.ts +0 -30
  77. package/dist/types/schemas/DeletePostMutationSchema.d.ts +0 -29
  78. package/dist/types/schemas/UpdateBlockParagraphMutationSchema.d.ts +0 -45
@@ -0,0 +1,7 @@
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
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
6
+ parent: z.ZodTemplateLiteral<`Post/${number}`>;
7
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,7 @@
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
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
6
+ parent: z.ZodUnion<readonly [z.ZodType<`Post/${number}`, `Post/${number}`, z.core.$ZodTypeInternals<`Post/${number}`, `Post/${number}`>>, z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>]>;
7
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,7 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const BlockRow: Entity<"BlockRow", z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
4
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>>;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ parent: z.ZodUnion<readonly [z.ZodType<`Post/${number}`, `Post/${number}`, z.core.$ZodTypeInternals<`Post/${number}`, `Post/${number}`>>, z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>]>;
7
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,8 @@
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
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
6
+ post: z.ZodTemplateLiteral<`Post/${number}`>;
7
+ version: z.ZodOptional<z.ZodTemplateLiteral<`PostVersion/${number}`>>;
8
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,10 @@
1
+ import { Entity } from "roc-db";
2
+ import { z } from "zod";
3
+ export declare const OrgSettingsEntity: Entity<"OrgSettings", z.ZodObject<{
4
+ name: z.ZodString;
5
+ theme: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ featuredPosts: z.ZodArray<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ primaryAdmin: z.ZodOptional<z.ZodTemplateLiteral<`User/${number}`>>;
10
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, true>;
@@ -0,0 +1,12 @@
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>;
7
+ slug: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ blocks: z.ZodArray<z.ZodString>;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ author: z.ZodOptional<z.ZodTemplateLiteral<`User/${number}`>>;
12
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,8 @@
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>;
6
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
7
+ post: z.ZodTemplateLiteral<`Post/${number}`>;
8
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,5 @@
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
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, false>;
@@ -0,0 +1,41 @@
1
+ export declare const entities: (import("roc-db").Entity<"Draft", import("zod").ZodObject<{
2
+ appliedAt: import("zod").ZodOptional<import("zod").ZodString>;
3
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
4
+ post: import("zod").ZodTemplateLiteral<`Post/${number}`>;
5
+ version: import("zod").ZodOptional<import("zod").ZodTemplateLiteral<`PostVersion/${number}`>>;
6
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false> | import("roc-db").Entity<"BlockImage", import("zod").ZodObject<{
7
+ url: import("zod").ZodString;
8
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
9
+ parent: import("zod").ZodTemplateLiteral<`Post/${number}`>;
10
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false> | import("roc-db").Entity<"Post", import("zod").ZodObject<{
11
+ title: import("zod").ZodString;
12
+ text: import("zod").ZodOptional<import("zod").ZodString>;
13
+ tags: import("zod").ZodArray<import("zod").ZodString>;
14
+ slug: import("zod").ZodOptional<import("zod").ZodString>;
15
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
16
+ blocks: import("zod").ZodArray<import("zod").ZodString>;
17
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
18
+ author: import("zod").ZodOptional<import("zod").ZodTemplateLiteral<`User/${number}`>>;
19
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false> | import("roc-db").Entity<"BlockParagraph", import("zod").ZodObject<{
20
+ content: import("zod").ZodOptional<import("zod").ZodString>;
21
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
22
+ parent: import("zod").ZodUnion<readonly [import("zod").ZodType<`Post/${number}`, `Post/${number}`, import("zod/v4/core").$ZodTypeInternals<`Post/${number}`, `Post/${number}`>>, import("zod").ZodUnion<readonly [import("zod").ZodTemplateLiteral<`BlockParagraph/${number}`>, import("zod").ZodTemplateLiteral<`BlockRow/${number}`>]>]>;
23
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false> | import("roc-db").Entity<"BlockRow", import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
24
+ blocks: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodTemplateLiteral<`BlockParagraph/${number}`>, import("zod").ZodTemplateLiteral<`BlockRow/${number}`>]>>;
25
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
26
+ parent: import("zod").ZodUnion<readonly [import("zod").ZodType<`Post/${number}`, `Post/${number}`, import("zod/v4/core").$ZodTypeInternals<`Post/${number}`, `Post/${number}`>>, import("zod").ZodUnion<readonly [import("zod").ZodTemplateLiteral<`BlockParagraph/${number}`>, import("zod").ZodTemplateLiteral<`BlockRow/${number}`>]>]>;
27
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false> | import("roc-db").Entity<"OrgSettings", import("zod").ZodObject<{
28
+ name: import("zod").ZodString;
29
+ theme: import("zod").ZodOptional<import("zod").ZodString>;
30
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
31
+ featuredPosts: import("zod").ZodArray<import("zod").ZodString>;
32
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
33
+ primaryAdmin: import("zod").ZodOptional<import("zod").ZodTemplateLiteral<`User/${number}`>>;
34
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, true> | import("roc-db").Entity<"PostVersion", import("zod").ZodObject<{
35
+ version: import("zod").ZodNumber;
36
+ snapshot: import("zod").ZodArray<import("zod").ZodAny>;
37
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
38
+ post: import("zod").ZodTemplateLiteral<`Post/${number}`>;
39
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false> | import("roc-db").Entity<"User", import("zod").ZodObject<{
40
+ email: import("zod").ZodString;
41
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, false>)[];
@@ -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/${number}`, `Draft/${number}`, import("zod/v4/core").$ZodTypeInternals<`Draft/${number}`, `Draft/${number}`>>>;
@@ -1,15 +1,5 @@
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";
11
- }, {
12
- postRef: `Post/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>;
1
+ import { z } from "zod";
2
+ export declare const createBlockImage: import("roc-db").WriteOperation<"createBlockImage", z.ZodObject<{
3
+ parentRef: z.ZodTemplateLiteral<`Post/${number}`>;
4
+ url: z.ZodString;
5
+ }, z.core.$strict>>;
@@ -1,15 +1,5 @@
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
- }, {
12
- parentRef: `Post/${string}` | `BlockRow/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>;
1
+ import { z } from "zod";
2
+ export declare const createBlockParagrah: import("roc-db").WriteOperation<"createBlockParagraph", z.ZodObject<{
3
+ parentRef: z.ZodUnion<readonly [z.ZodTemplateLiteral<`Post/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>;
4
+ content: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strict>>;
@@ -1,15 +1,4 @@
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
- }, {
12
- parentRef: `Post/${string}` | `BlockRow/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>;
1
+ import { z } from "zod";
2
+ export declare const createBlockRow: import("roc-db").WriteOperation<"createBlockRow", z.ZodObject<{
3
+ parentRef: z.ZodUnion<readonly [z.ZodTemplateLiteral<`Post/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>;
4
+ }, z.core.$strict>>;
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Like `createBlockRow`, but it reads its own changeSet root before creating the
4
+ * block — a common "validate/attach against the changeSet root" pattern. When a
5
+ * mutation of this op is cloned into a freshly-created target and replayed, that
6
+ * read resolves the TARGET root. In the one-transaction duplicate pattern the
7
+ * target root is created (uncommitted) by the same outer operation, so the
8
+ * primitive must surface the outer transaction's pending writes to replay —
9
+ * otherwise this read throws NotFoundError for the target changeSet ref.
10
+ */
11
+ export declare const createBlockRowReadingRoot: import("roc-db").WriteOperation<"createBlockRowReadingRoot", z.ZodObject<{
12
+ parentRef: z.ZodUnion<readonly [z.ZodTemplateLiteral<`Post/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>;
13
+ }, z.core.$strict>>;
@@ -1,15 +1,4 @@
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
- }, {
12
- parentRef: `Post/${string}` | `BlockRow/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>;
1
+ import { z } from "zod";
2
+ export declare const createBlockTitle: import("roc-db").WriteOperation<"createBlockTitle", z.ZodObject<{
3
+ parentRef: z.ZodUnion<readonly [z.ZodTemplateLiteral<`Post/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>;
4
+ }, z.core.$strict>>;
@@ -1,15 +1,4 @@
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
- }, {
12
- postRef: `Post/${string}`;
13
- }, {
14
- [x: string]: any;
15
- }>;
1
+ import { z } from "zod";
2
+ export declare const createDraft: import("roc-db").WriteOperation<"createDraft", z.ZodObject<{
3
+ postRef: z.ZodTemplateLiteral<`Post/${number}`>;
4
+ }, z.core.$strict>>;
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ export declare const createOrgSettings: import("roc-db").WriteOperation<"createOrgSettings", z.ZodObject<{
3
+ name: z.ZodString;
4
+ theme: z.ZodOptional<z.ZodString>;
5
+ primaryAdmin: z.ZodOptional<z.ZodTemplateLiteral<`User/${number}`>>;
6
+ }, z.core.$strip>>;
@@ -1,19 +1,6 @@
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
- }, {
14
- title: string;
15
- tags: string[];
16
- slug?: string | undefined;
17
- }, {
18
- [x: string]: any;
19
- }>;
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>>;
6
+ }, z.core.$strict>>;
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export declare const createUnknownRef: import("roc-db").WriteOperation<"createUnknownRef", z.ZodOptional<z.ZodObject<{}, z.core.$strip>>>;
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ export declare const createUser: import("roc-db").WriteOperation<"createUser", z.ZodObject<{
3
+ email: z.ZodString;
4
+ }, z.core.$strip>>;
@@ -0,0 +1,5 @@
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
+ }, z.core.$strip>>;
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export declare const deleteBlocks: import("roc-db").WriteOperation<"deleteBlocks", z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockImage/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>>>;
@@ -0,0 +1 @@
1
+ export declare const deleteDraft: import("roc-db").WriteOperation<"deleteDraft", import("zod").ZodType<`Draft/${number}`, `Draft/${number}`, import("zod/v4/core").$ZodTypeInternals<`Draft/${number}`, `Draft/${number}`>>>;
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export declare const deleteOrgSettings: import("roc-db").WriteOperation<"deleteOrgSettings", z.ZodOptional<z.ZodObject<{}, z.core.$strip>>>;
@@ -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").ZodTemplateLiteral<`Post/${number}`>>;
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Canonical consumer usage of the `txn.duplicateChangeSetMutations` primitive:
4
+ * create the new draft and copy the source draft's pending mutations into it,
5
+ * all in one transaction.
6
+ */
7
+ export declare const duplicateDraft: import("roc-db").WriteOperation<"duplicateDraft", z.ZodObject<{
8
+ sourceRef: z.ZodType<`Draft/${number}`, `Draft/${number}`, z.core.$ZodTypeInternals<`Draft/${number}`, `Draft/${number}`>>;
9
+ postRef: z.ZodTemplateLiteral<`Post/${number}`>;
10
+ }, z.core.$strict>>;
@@ -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,5 @@
1
+ import { z } from "zod";
2
+ export declare const moveBlocks: import("roc-db").WriteOperation<"moveBlocks", z.ZodObject<{
3
+ refs: z.ZodArray<z.ZodUnion<readonly [z.ZodTemplateLiteral<`BlockParagraph/${number}`>, z.ZodTemplateLiteral<`BlockRow/${number}`>]>>;
4
+ targetPosition: z.ZodNumber;
5
+ }, z.core.$strict>>;
@@ -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,2 @@
1
+ import { z } from "zod";
2
+ export declare const readOrgSettings: import("roc-db").ReadOperation<"readOrgSettings", z.ZodOptional<z.ZodObject<{}, z.core.$strip>>>;
@@ -0,0 +1 @@
1
+ export declare const readPostBySlug: any;
@@ -0,0 +1,6 @@
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.ZodTemplateLiteral<`Post/${number}`>>;
5
+ post2ref: z.ZodOptional<z.ZodTemplateLiteral<`Post/${number}`>>;
6
+ }, z.core.$strict>>;
@@ -1,15 +1,5 @@
1
- export declare const updateBlockParagraph: import("roc-db").WriteOperation<"updateBlockParagraph", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- ref: `BlockParagraph/${string}`;
7
- content: string;
8
- };
9
- log: [never, string, null][];
10
- debounceCount: number;
11
- name: "updateBlockParagraph";
12
- }, {
13
- ref: `BlockParagraph/${string}`;
14
- content: string;
15
- }, `BlockParagraph/${string}`>;
1
+ import { z } from "zod";
2
+ export declare const updateBlockParagraph: import("roc-db").WriteOperation<"updateBlockParagraph", z.ZodObject<{
3
+ ref: z.ZodTemplateLiteral<`BlockParagraph/${number}`>;
4
+ content: z.ZodString;
5
+ }, z.core.$strip>>;
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ export declare const updateOrgSettingsName: import("roc-db").WriteOperation<"updateOrgSettingsName", z.ZodObject<{
3
+ name: z.ZodString;
4
+ }, z.core.$strip>>;
@@ -1,21 +1,7 @@
1
- export declare const updatePost: import("roc-db").WriteOperation<"updatePost", {
2
- ref: `Mutation/${string}`;
3
- timestamp: string;
4
- changeSetRef: null;
5
- payload: {
6
- ref: `Post/${string}`;
7
- tags: string[];
8
- title?: string | undefined;
9
- authorRef?: `User/${string}` | undefined;
10
- };
11
- log: [never, string, null][];
12
- debounceCount: number;
13
- name: "updatePost";
14
- }, {
15
- ref: `Post/${string}`;
16
- tags: string[];
17
- title?: string | undefined;
18
- authorRef?: `User/${string}` | undefined;
19
- }, {
20
- [x: string]: any;
21
- }>;
1
+ import { z } from "zod";
2
+ export declare const updatePost: import("roc-db").WriteOperation<"updatePost", z.ZodObject<{
3
+ ref: z.ZodTemplateLiteral<`Post/${number}`>;
4
+ title: z.ZodOptional<z.ZodString>;
5
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
6
+ authorRef: z.ZodOptional<z.ZodTemplateLiteral<`User/${number}`>>;
7
+ }, z.core.$strip>>;
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export declare const updatePostDescription: import("roc-db").WriteOperation<"updatePostDescription", z.ZodObject<{
3
+ ref: z.ZodTemplateLiteral<`Post/${number}`>;
4
+ description: z.ZodString;
5
+ }, z.core.$strip>>;
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export declare const updatePostSlug: import("roc-db").WriteOperation<"updatePostSlug", z.ZodObject<{
3
+ ref: z.ZodTemplateLiteral<`Post/${number}`>;
4
+ slug: z.ZodString;
5
+ }, z.core.$strip>>;
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export declare const updatePostTags: import("roc-db").WriteOperation<"updatePostTags", z.ZodObject<{
3
+ ref: z.ZodTemplateLiteral<`Post/${number}`>;
4
+ tags: z.ZodArray<z.ZodString>;
5
+ }, z.core.$strip>>;