@roc-db/test-utils 0.2.0-pre.4 → 0.2.0-pre.41

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 (55) hide show
  1. package/dist/index.js +474 -138
  2. package/dist/types/inMemoryAdapter.d.ts +1 -0
  3. package/dist/types/index.d.ts +4 -0
  4. package/dist/types/operations/applyDraft.d.ts +5 -0
  5. package/dist/types/operations/createBlockImage.d.ts +7 -0
  6. package/dist/types/operations/createBlockParagraph.d.ts +7 -0
  7. package/dist/types/operations/createBlockRow.d.ts +7 -0
  8. package/dist/types/operations/createBlockTitle.d.ts +7 -0
  9. package/dist/types/operations/createDraft.d.ts +7 -0
  10. package/dist/types/operations/createPost.d.ts +7 -0
  11. package/dist/types/operations/deleteBlocks.d.ts +7 -0
  12. package/dist/types/operations/deletePost.d.ts +5 -0
  13. package/dist/types/operations/index.d.ts +83 -0
  14. package/dist/types/operations/moveBlocks.d.ts +5 -0
  15. package/dist/types/operations/readEntity.d.ts +1 -0
  16. package/dist/types/operations/readPost.d.ts +1 -0
  17. package/dist/types/operations/testTransactionalEdits.d.ts +7 -0
  18. package/dist/types/operations/updateBlockParagraph.d.ts +5 -0
  19. package/dist/types/operations/updatePost.d.ts +7 -0
  20. package/dist/types/operations/updatePostDescription.d.ts +7 -0
  21. package/dist/types/operations/updatePostTitle.d.ts +7 -0
  22. package/dist/types/schemas/ApplyDraftMutationSchema.d.ts +64 -0
  23. package/dist/types/schemas/BlockImageRefSchema.d.ts +1 -0
  24. package/dist/types/schemas/BlockImageSchema.d.ts +32 -0
  25. package/dist/types/schemas/BlockParagraphRefSchema.d.ts +1 -0
  26. package/dist/types/schemas/BlockParagraphSchema.d.ts +33 -0
  27. package/dist/types/schemas/BlockRefSchema.d.ts +2 -0
  28. package/dist/types/schemas/BlockRowRefSchema.d.ts +1 -0
  29. package/dist/types/schemas/BlockRowSchema.d.ts +33 -0
  30. package/dist/types/schemas/BlockTitleRefSchema.d.ts +1 -0
  31. package/dist/types/schemas/BlockTitleSchema.d.ts +32 -0
  32. package/dist/types/schemas/CreateBlockImageMutationSchema.d.ts +64 -0
  33. package/dist/types/schemas/CreateBlockParagraphMutationSchema.d.ts +64 -0
  34. package/dist/types/schemas/CreateBlockRowMutationSchema.d.ts +64 -0
  35. package/dist/types/schemas/CreateBlockTitleMutationSchema.d.ts +64 -0
  36. package/dist/types/schemas/CreateDraftMutationSchema.d.ts +64 -0
  37. package/dist/types/schemas/CreatePostMutationSchema.d.ts +74 -0
  38. package/dist/types/schemas/CreateUserMutationSchema.d.ts +64 -0
  39. package/dist/types/schemas/DeleteBlocksMutationSchema.d.ts +54 -0
  40. package/dist/types/schemas/DeletePostMutationSchema.d.ts +53 -0
  41. package/dist/types/schemas/DraftRefSchema.d.ts +1 -0
  42. package/dist/types/schemas/DraftSchema.d.ts +32 -0
  43. package/dist/types/schemas/MoveBlocksMutationSchema.d.ts +69 -0
  44. package/dist/types/schemas/PostRefSchema.d.ts +1 -0
  45. package/dist/types/schemas/PostSchema.d.ts +33 -0
  46. package/dist/types/schemas/TestTransactionalEditsMutationSchema.d.ts +74 -0
  47. package/dist/types/schemas/UpdateBlockParagraphMutationSchema.d.ts +69 -0
  48. package/dist/types/schemas/UpdatePostDescriptionMutationSchema.d.ts +69 -0
  49. package/dist/types/schemas/UpdatePostMutationSchema.d.ts +79 -0
  50. package/dist/types/schemas/UpdatePostTitleMutationSchema.d.ts +69 -0
  51. package/dist/types/schemas/UserRefSchema.d.ts +1 -0
  52. package/dist/types/schemas/index.d.ts +44 -0
  53. package/dist/types/testAdapterImplementation.d.ts +1 -0
  54. package/package.json +10 -17
  55. package/dist/tarball/roc-db-test-utils-0.2.0-pre.4.tgz +0 -0
@@ -0,0 +1,69 @@
1
+ import { z } from "zod";
2
+ export declare const UpdatePostDescriptionMutationSchema: 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.ZodString>;
11
+ persistedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ }, {
13
+ operation: z.ZodObject<{
14
+ name: z.ZodLiteral<"updatePostDescription">;
15
+ version: z.ZodDefault<z.ZodNumber>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ name: "updatePostDescription";
18
+ version: number;
19
+ }, {
20
+ name: "updatePostDescription";
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
+ description: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ ref: `Post/${string}`;
29
+ description: string;
30
+ }, {
31
+ ref: `Post/${string}`;
32
+ description: 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
+ description: string;
42
+ };
43
+ log: any[];
44
+ debounceCount: number;
45
+ identityRef: string;
46
+ operation: {
47
+ name: "updatePostDescription";
48
+ version: number;
49
+ };
50
+ sessionRef?: string | undefined;
51
+ persistedAt?: string | null | undefined;
52
+ }, {
53
+ ref: `Mutation/${string}`;
54
+ timestamp: string;
55
+ changeSetRef: null;
56
+ payload: {
57
+ ref: `Post/${string}`;
58
+ description: string;
59
+ };
60
+ log: any[];
61
+ debounceCount: number;
62
+ identityRef: string;
63
+ operation: {
64
+ name: "updatePostDescription";
65
+ version?: number | undefined;
66
+ };
67
+ sessionRef?: string | undefined;
68
+ persistedAt?: string | null | undefined;
69
+ }>;
@@ -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.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 | 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 | 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.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 | 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 | 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,44 @@
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 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
+ export { DraftRefSchema } from "./DraftRefSchema";
39
+ export { PostRefSchema } from "./PostRefSchema";
40
+ export { UserRefSchema } from "./UserRefSchema";
41
+ export { CreatePostMutationSchema } from "./CreatePostMutationSchema";
42
+ export { CreateUserMutationSchema } from "./CreateUserMutationSchema";
43
+ export { UpdatePostMutationSchema } from "./UpdatePostMutationSchema";
44
+ 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,30 +1,23 @@
1
1
  {
2
2
  "name": "@roc-db/test-utils",
3
- "version": "0.2.0-pre.4",
3
+ "version": "0.2.0-pre.41",
4
4
  "type": "module",
5
5
  "exports": {
6
- ".": "./src/index.ts",
7
- "./setup": "./src/setup/index.ts"
6
+ ".": {
7
+ "import": "./dist/index.js",
8
+ "types": "./dist/types/index.d.ts"
9
+ },
10
+ "./setup": {
11
+ "import": "./dist/setup/index.js",
12
+ "types": "./dist/types/setup/index.d.ts"
13
+ }
8
14
  },
9
15
  "files": [
10
16
  "dist"
11
17
  ],
12
18
  "sideEffects": false,
13
- "scripts": {
14
- "build": "NODE_ENV=production bun run scripts/build.ts",
15
- "build:types": "rm -rf dist/types && bun run tsc --noCheck",
16
- "test": "echo"
17
- },
18
- "devDependencies": {
19
- "@faker-js/faker": "9.6.0",
20
- "@types/bun": "1.2.5",
21
- "@types/sanitize-html": "2.13.0",
22
- "bun": "1.2.5",
23
- "expect-type": "1.2.0",
24
- "roc-db": "0.2.0-pre.4"
25
- },
26
19
  "peerDependencies": {
27
- "roc-db": "0.2.0-pre.4",
20
+ "roc-db": "0.2.0-pre.41",
28
21
  "zod": "3.24.2"
29
22
  },
30
23
  "keywords": [],