Skip to content

Commit 5886ddd

Browse files
authored
Documint - add preview prop to Create Document action (#17382)
* add preview prop * pnpm-lock.yaml
1 parent 2846097 commit 5886ddd

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

components/documint/actions/create-document/create-document.mjs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import app from "../../documint.app.mjs";
22

33
export default {
44
name: "Create Document",
5-
version: "0.0.1",
5+
version: "0.0.2",
66
key: "documint-create-document",
77
description: "Create a document. [See the documentation](https://documenter.getpostman.com/view/11741160/TVK5cLxQ#032798a4-6eb6-43cd-9c1b-9ba313f7d39c)",
88
type: "action",
@@ -19,6 +19,13 @@ export default {
1919
description: "Variables to merge with template. E.g. `{ \"company\": \"Pipedream\" }`",
2020
type: "object",
2121
},
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+
},
2229
},
2330
async run({ $ }) {
2431
const variables = typeof this.variables === "string"
@@ -30,15 +37,15 @@ export default {
3037
templateId: this.templateId,
3138
params: {
3239
active: true,
33-
preview: true,
40+
preview: this.preview,
3441
},
3542
data: {
3643
...variables,
3744
},
3845
});
3946

4047
if (response) {
41-
$.export("$summary", `Successfully created document with ID \`${response.id}\``);
48+
$.export("$summary", `Successfully created document with ID \`${response._id}\``);
4249
}
4350

4451
return response;

components/documint/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/documint",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Documint Components",
55
"main": "documint.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^1.5.1"
16+
"@pipedream/platform": "^3.1.0"
1717
}
1818
}

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)