You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "The publish ID of the document to create",
25
+
label: "Document ID",
26
+
description: "A unique identifier for the document to create",
28
27
},
29
-
document: {
28
+
type: {
29
+
type: "string",
30
+
label: "Type",
31
+
description: "The type of document to create. Example: `post`",
32
+
},
33
+
additionalFields: {
30
34
type: "object",
31
-
label: "Document",
32
-
description: "The document to create. Must include `_type` and `_id` fields. Example: `{\"_type\":\"post\",\"_id\":\"drafts.post-123\",\"title\":\"My First Post\",\"slug\":{\"current\":\"my-first-post\"},\"body\":[{\"_type\":\"block\",\"children\":[{\"_type\":\"span\",\"text\":\"Hello world!\"}]}]}`",
35
+
label: "Additional Fields",
36
+
description: "Additional fields to add to the document. Example: `{\"title\":\"My First Post\",\"slug\":{\"current\":\"my-first-post\"},\"body\":[{\"_type\":\"block\",\"children\":[{\"_type\":\"span\",\"text\":\"Hello world!\"}]}]}`",
37
+
optional: true,
33
38
},
34
39
},
35
40
asyncrun({ $ }){
36
-
constdocument=parseObject(this.document);
37
-
if(!document._type||!document._id){
38
-
thrownewConfigurationError("Document must include `_type` and `_id` fields");
0 commit comments