@pipedream/pandadoc 0.2.0 → 0.2.2
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/actions/create-document-attachment/create-document-attachment.mjs +1 -1
- package/actions/create-document-from-file/create-document-from-file.mjs +1 -1
- package/actions/create-document-from-template/create-document-from-template.mjs +1 -1
- package/actions/create-folder/create-folder.mjs +1 -1
- package/actions/create-or-update-contact/create-or-update-contact.mjs +1 -1
- package/actions/document-details/document-details.mjs +1 -1
- package/actions/get-document-status/get-document-status.mjs +24 -0
- package/actions/list-contacts/list-contacts.mjs +1 -1
- package/actions/list-document-attachments/list-document-attachments.mjs +1 -1
- package/actions/list-documents/list-documents.mjs +1 -1
- package/actions/list-folders/list-folders.mjs +1 -1
- package/actions/send-document/send-document.mjs +90 -0
- package/package.json +1 -1
- package/pandadoc.app.mjs +13 -0
- package/sources/document-creation-failed/document-creation-failed.mjs +1 -1
- package/sources/document-deleted/document-deleted.mjs +1 -1
- package/sources/document-state-changed/document-state-changed.mjs +1 -1
- package/sources/document-updated/document-updated.mjs +1 -1
- package/sources/recipient-completed/recipient-completed.mjs +1 -1
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
name: "Create Document Attachment",
|
|
10
10
|
description: "Adds an attachment to a document. [See the docs here](https://developers.pandadoc.com/reference/create-document-attachment)",
|
|
11
11
|
type: "action",
|
|
12
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.5",
|
|
13
13
|
props: {
|
|
14
14
|
app,
|
|
15
15
|
documentId: {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "Create Document From File",
|
|
8
8
|
description: "Create a document from a file or public file URL. [See the docs here](https://developers.pandadoc.com/reference/create-document-from-pdf)",
|
|
9
9
|
type: "action",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.6",
|
|
11
11
|
props: {
|
|
12
12
|
app,
|
|
13
13
|
name: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Create Document From Template",
|
|
6
6
|
description: "Create Document from PandaDoc Template. [See the docs here](https://developers.pandadoc.com/reference/create-document-from-pandadoc-template)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
name: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Create Folder",
|
|
6
6
|
description: "Create a new folder to store your documents. [See the docs here](https://developers.pandadoc.com/reference/create-documents-folder)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
name: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Create or Update Contact",
|
|
6
6
|
description: "This method adds or updates a contact using the email as index. [See the docs here](https://developers.pandadoc.com/reference/create-contact)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
email: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Document Details",
|
|
6
6
|
description: "Return detailed data about a document. [See the docs here](https://developers.pandadoc.com/reference/document-details)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
id: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import app from "../../pandadoc.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "pandadoc-get-document-status",
|
|
5
|
+
name: "Get Document Status",
|
|
6
|
+
description:
|
|
7
|
+
"Get basic status info about a document. [See documentation here](https://developers.pandadoc.com/reference/document-status)",
|
|
8
|
+
type: "action",
|
|
9
|
+
version: "0.0.1",
|
|
10
|
+
props: {
|
|
11
|
+
app,
|
|
12
|
+
id: {
|
|
13
|
+
propDefinition: [app, "documentId"],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
async run({ $ }) {
|
|
17
|
+
const response = await this.app.getDocument({
|
|
18
|
+
id: this.id
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
$.export("$summary", `Successfully fetched document status with ID ${this.id}`);
|
|
22
|
+
return response;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "List Contacts",
|
|
6
6
|
description: "This method lists all contacts within an account. [See the docs here](https://developers.pandadoc.com/reference/list-contacts)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
},
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "List Document Attachment",
|
|
6
6
|
description: "Returns a list of attachments associated with a specified document. [See the docs here](https://developers.pandadoc.com/reference/list-attachment)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.5",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
documentId: {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "List Documents",
|
|
7
7
|
description: "List documents optionally filter by a search query or tags. [See the docs here](https://developers.pandadoc.com/reference/list-documents)",
|
|
8
8
|
type: "action",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.5",
|
|
10
10
|
props: {
|
|
11
11
|
app,
|
|
12
12
|
query: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "List Folders",
|
|
6
6
|
description: "List folders which contain Documents [See the docs here](https://developers.pandadoc.com/reference/list-documents-folders)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
parentFolderId: {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import app from "../../pandadoc.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
key: "pandadoc-send-document",
|
|
5
|
+
name: "Send Document",
|
|
6
|
+
description: "Move a document to sent status and send an optional email. [See the documentation](https://developers.pandadoc.com/reference/send-document)",
|
|
7
|
+
type: "action",
|
|
8
|
+
version: "0.0.2",
|
|
9
|
+
props: {
|
|
10
|
+
app,
|
|
11
|
+
documentId: {
|
|
12
|
+
propDefinition: [
|
|
13
|
+
app,
|
|
14
|
+
"documentId",
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
subject: {
|
|
18
|
+
type: "string",
|
|
19
|
+
label: "Subject",
|
|
20
|
+
description: "Value that will be used as the email subject.",
|
|
21
|
+
optional: true,
|
|
22
|
+
},
|
|
23
|
+
message: {
|
|
24
|
+
type: "string",
|
|
25
|
+
label: "Message",
|
|
26
|
+
description:
|
|
27
|
+
"A message which will be sent by email with a link to a document to sign.",
|
|
28
|
+
optional: true,
|
|
29
|
+
},
|
|
30
|
+
silent: {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
label: "Silent",
|
|
33
|
+
description:
|
|
34
|
+
`Disables sent, viewed, comment and completed email notifications for document recipients and the document sender. By default, notifications emails are sent for specific actions. If set as true, it won't affect "Approve document" email notification sent to the Approver.`,
|
|
35
|
+
optional: true,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
senderEmail: {
|
|
39
|
+
type: "string",
|
|
40
|
+
label: "Sender Email",
|
|
41
|
+
description: "Set a sender (email) for the document. Must be an email which is a member on your account.",
|
|
42
|
+
optional: true,
|
|
43
|
+
},
|
|
44
|
+
forwarding_allowed: {
|
|
45
|
+
type: "boolean",
|
|
46
|
+
label: "Forwarding Allowed",
|
|
47
|
+
description:
|
|
48
|
+
"Your recipient will be able/not able to forward the document to another email address.",
|
|
49
|
+
optional: true,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
forwarding_with_reassigning_allowed: {
|
|
53
|
+
type: "boolean",
|
|
54
|
+
label: "Forwarding With Reassigning Allowed",
|
|
55
|
+
description:
|
|
56
|
+
"Your recipient will be able/not able to forward the right to fill out all fields (including signature) assigned to them to another email address.",
|
|
57
|
+
optional: true,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
async run({ $ }) {
|
|
62
|
+
const documentId = this.documentId;
|
|
63
|
+
|
|
64
|
+
const data = {
|
|
65
|
+
subject: this.subject,
|
|
66
|
+
message: this.message,
|
|
67
|
+
silent: this.silent,
|
|
68
|
+
forwarding_settings: {
|
|
69
|
+
forwarding_allowed: this.forwarding_allowed,
|
|
70
|
+
forwarding_with_reassigning_allowed:
|
|
71
|
+
this.forwarding_with_reassigning_allowed,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
if (this.senderEmail) {
|
|
76
|
+
data.sender = {
|
|
77
|
+
email: this.senderEmail,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const response = await this.app.sendDocument({
|
|
82
|
+
$,
|
|
83
|
+
documentId,
|
|
84
|
+
data,
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
$.export("$summary", `Successfully sent "${response.name}" document with ID: ${response.id} to ${response.recipients.length} recipient(s)`);
|
|
88
|
+
return response;
|
|
89
|
+
},
|
|
90
|
+
});
|
package/package.json
CHANGED
package/pandadoc.app.mjs
CHANGED
|
@@ -181,5 +181,18 @@ export default {
|
|
|
181
181
|
method: "DELETE",
|
|
182
182
|
});
|
|
183
183
|
},
|
|
184
|
+
sendDocument(args = {}) {
|
|
185
|
+
return this.makeRequest({
|
|
186
|
+
path: `/documents/${args.documentId}/send`,
|
|
187
|
+
method: "POST",
|
|
188
|
+
...args,
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
getDocument({ id, ...args }) {
|
|
192
|
+
return this.makeRequest({
|
|
193
|
+
path: `/documents/${id}`,
|
|
194
|
+
...args,
|
|
195
|
+
});
|
|
196
|
+
},
|
|
184
197
|
},
|
|
185
198
|
};
|