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
Copy file name to clipboardExpand all lines: components/documint/actions/create-document/create-document.mjs
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ import app from "../../documint.app.mjs";
2
2
3
3
exportdefault{
4
4
name: "Create Document",
5
-
version: "0.0.1",
5
+
version: "0.0.2",
6
6
key: "documint-create-document",
7
7
description: "Create a document. [See the documentation](https://documenter.getpostman.com/view/11741160/TVK5cLxQ#032798a4-6eb6-43cd-9c1b-9ba313f7d39c)",
8
8
type: "action",
@@ -19,6 +19,13 @@ export default {
19
19
description: "Variables to merge with template. E.g. `{ \"company\": \"Pipedream\" }`",
20
20
type: "object",
21
21
},
22
+
preview: {
23
+
type: "boolean",
24
+
label: "Preview",
25
+
description: "Set to `false` to create the document without a watermark",
26
+
optional: true,
27
+
default: true,
28
+
},
22
29
},
23
30
asyncrun({ $ }){
24
31
constvariables=typeofthis.variables==="string"
@@ -30,15 +37,15 @@ export default {
30
37
templateId: this.templateId,
31
38
params: {
32
39
active: true,
33
-
preview: true,
40
+
preview: this.preview,
34
41
},
35
42
data: {
36
43
...variables,
37
44
},
38
45
});
39
46
40
47
if(response){
41
-
$.export("$summary",`Successfully created document with ID \`${response.id}\``);
48
+
$.export("$summary",`Successfully created document with ID \`${response._id}\``);
0 commit comments