@unito/integration-api 8.0.2 → 8.0.3

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.
@@ -0,0 +1,29 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/richTextDumpRequestPayload.schema.json",
3
+ "title": "RichTextDumpRequestPayload",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["itemPath", "relationName", "fieldName", "root"],
7
+ "properties": {
8
+ "itemPath": {
9
+ "type": "string",
10
+ "format": "uri-reference",
11
+ "pattern": "^\/.*$"
12
+ },
13
+ "relationName": {
14
+ "type": "string",
15
+ "pattern": "^[a-zA-Z0-9_-]*$",
16
+ "minLength": 1,
17
+ "maxLength": 100
18
+ },
19
+ "fieldName": {
20
+ "type": "string",
21
+ "pattern": "^[a-zA-Z0-9_-]*$",
22
+ "minLength": 1,
23
+ "maxLength": 100
24
+ },
25
+ "root": {
26
+ "$ref": "https://unito.io/integration_api/richTextRoot.schema.json"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/richTextDumpResponsePayload.schema.json",
3
+ "title": "RichTextDumpResponsePayload",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["value"],
7
+ "properties": {
8
+ "value": {
9
+ "type": "string"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/richTextNode.schema.json",
3
+ "title": "RichTextNode",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["type"],
7
+ "properties": {
8
+ "type": {
9
+ "type": "string",
10
+ "minLength": 1
11
+ },
12
+ "value": {
13
+ "type": "string"
14
+ },
15
+ "children": {
16
+ "type": "array",
17
+ "items": {
18
+ "$ref": "https://unito.io/integration_api/richTextNode.schema.json"
19
+ }
20
+ },
21
+ "data": {
22
+ "type": "object"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/richTextParseRequestPayload.schema.json",
3
+ "title": "RichTextParseRequestPayload",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["itemPath", "relationName", "fieldName", "value"],
7
+ "properties": {
8
+ "itemPath": {
9
+ "type": "string",
10
+ "format": "uri-reference",
11
+ "pattern": "^\/.*$"
12
+ },
13
+ "relationName": {
14
+ "type": "string",
15
+ "pattern": "^[a-zA-Z0-9_-]*$",
16
+ "minLength": 1,
17
+ "maxLength": 100
18
+ },
19
+ "fieldName": {
20
+ "type": "string",
21
+ "pattern": "^[a-zA-Z0-9_-]*$",
22
+ "minLength": 1,
23
+ "maxLength": 100
24
+ },
25
+ "value": {
26
+ "type": "string"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/richTextParseResponsePayload.schema.json",
3
+ "title": "RichTextParseResponsePayload",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["root"],
7
+ "properties": {
8
+ "root": {
9
+ "$ref": "https://unito.io/integration_api/richTextRoot.schema.json"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$id": "https://unito.io/integration_api/richTextRoot.schema.json",
3
+ "title": "RichTextRoot",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["type", "children"],
7
+ "properties": {
8
+ "type": {
9
+ "const": "root"
10
+ },
11
+ "children": {
12
+ "type": "array",
13
+ "items": {
14
+ "$ref": "https://unito.io/integration_api/richTextNode.schema.json"
15
+ }
16
+ }
17
+ }
18
+ }
@@ -57,3 +57,33 @@ export interface RichTextRoot {
57
57
  children: RichTextNode[];
58
58
  }
59
59
  export declare function isRichTextNodeType(value: unknown): value is RichTextNodeType;
60
+ /**
61
+ * Request payload for the `/richtext/parse` endpoint.
62
+ *
63
+ * `itemPath` + `relationName` form a `RelationPointer` to the relation that owns the field.
64
+ * For top-level relations (no parent), `itemPath` is `/`.
65
+ */
66
+ export interface RichTextParseRequestPayload {
67
+ itemPath: string;
68
+ relationName: string;
69
+ fieldName: string;
70
+ value: string;
71
+ }
72
+ export interface RichTextParseResponsePayload {
73
+ root: RichTextRoot;
74
+ }
75
+ /**
76
+ * Request payload for the `/richtext/dump` endpoint.
77
+ *
78
+ * `itemPath` + `relationName` form a `RelationPointer` to the relation that owns the field.
79
+ * For top-level relations (no parent), `itemPath` is `/`.
80
+ */
81
+ export interface RichTextDumpRequestPayload {
82
+ itemPath: string;
83
+ relationName: string;
84
+ fieldName: string;
85
+ root: RichTextRoot;
86
+ }
87
+ export interface RichTextDumpResponsePayload {
88
+ value: string;
89
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integration-api",
3
- "version": "8.0.2",
3
+ "version": "8.0.3",
4
4
  "description": "The Unito Integration API",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",