@supernova-studio/client 0.4.3 → 0.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -26,11 +26,15 @@
26
26
  "build": "tsup",
27
27
  "typecheck": "tsc --noEmit",
28
28
  "publish": "npm run build && npm publish",
29
- "test:unit": "vitest run"
29
+ "test:unit": "vitest run",
30
+ "index": "node ./create-indexes.js"
30
31
  },
31
32
  "author": "",
32
33
  "license": "ISC",
33
34
  "dependencies": {
35
+ "@supernova-studio/model": "*",
36
+ "prosemirror-model": "^1.19.4",
37
+ "typescript": "^5.0.4",
34
38
  "y-prosemirror": "^1.2.2",
35
39
  "yjs": "^13.6.10",
36
40
  "zod": "^3.22.4"
package/src/api/index.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from "./requests";
1
2
  export * from "./responses";
@@ -0,0 +1,2 @@
1
+ export * from "./post-bulk-doc-page-elements";
2
+ export * from "./post-liveblocks-auth";
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+
3
+ import { DocumentationItemConfiguration } from "@supernova-studio/model"
4
+
5
+ export const CreateBulkElementsInput = z.object({
6
+ persistentId: z.string().uuid(),
7
+ title: z.string(),
8
+ configuration: DocumentationItemConfiguration,
9
+ parentPersistentId: z.string().nullish(),
10
+ afterPersistentId: z.string().nullish(),
11
+ });
12
+
13
+ export type CreateBulkElementsInput = z.infer<typeof CreateBulkElementsInput>;
14
+
15
+
16
+ export const UpdateBulkElementsInput = z.object({
17
+ id: z.string(),
18
+ title: z.string().optional(),
19
+ configuration: DocumentationItemConfiguration.optional(),
20
+ parentPersistentId: z.string().optional(),
21
+ afterPersistentId: z.string().optional(),
22
+ });
23
+
24
+ export type UpdateBulkElementsInput = z.infer<typeof UpdateBulkElementsInput>;
25
+
26
+
27
+ export const DeleteBulkElementsInput = z.array(z.string());
28
+
29
+ export type DeleteBulkElementsInput = z.infer<typeof DeleteBulkElementsInput>;
30
+
31
+
32
+ export const DuplicateBulkElementsInput = z.object({
33
+ id: z.string(),
34
+ persistentId: z.string().uuid(),
35
+ parentPersistentId: z.string().uuid(),
36
+ afterPersistentId: z.string().uuid().nullish(),
37
+ });
38
+
39
+ export type DuplicateBulkElementsInput = z.infer<typeof DuplicateBulkElementsInput>;
40
+
41
+
42
+ export const BulkEditDocPageElementsInput = z.object({
43
+ documentationPages: z.object({
44
+ create: z.array(CreateBulkElementsInput).optional(),
45
+ update: z.array(UpdateBulkElementsInput).optional(),
46
+ delete: DeleteBulkElementsInput.optional(),
47
+ duplicate: z.array(DuplicateBulkElementsInput).optional()
48
+ })
49
+ });
50
+
51
+ export type BulkEditDocPageElementsInput = z.infer<typeof BulkEditDocPageElementsInput>;
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ import { RoomTypeSchema } from "@supernova-studio/model";
3
+
4
+ export const PostLiveblocksAuth = z.object({
5
+ room: z.string(),
6
+ });
@@ -144,6 +144,9 @@ const newSchema = {
144
144
  content: "(paragraph|image)+",
145
145
  isolating: true,
146
146
  attrs: {
147
+ id: {
148
+ default: null,
149
+ },
147
150
  textAlign: {
148
151
  default: "left",
149
152
  },
@@ -204,6 +207,9 @@ const newSchema = {
204
207
  content: "(paragraph|image)+",
205
208
  isolating: true,
206
209
  attrs: {
210
+ id: {
211
+ default: null,
212
+ },
207
213
  textAlign: {
208
214
  default: "left",
209
215
  },
@@ -753,6 +759,9 @@ const newSchema = {
753
759
  group: "block",
754
760
  defining: true,
755
761
  attrs: {
762
+ id: {
763
+ default: null,
764
+ },
756
765
  definitionId: {
757
766
  default: "io.supernova.block.blockquote",
758
767
  },
package/src/index.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export * from "./api";
2
2
  export * from "./docs-editor";
3
- export * from "@supernova-studio/model";