@pipedream/pandadoc 1.0.1 → 1.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.
@@ -7,7 +7,12 @@ export default {
7
7
  name: "Create Document Attachment",
8
8
  description: "Adds an attachment to a document. [See the documentation here](https://developers.pandadoc.com/reference/create-document-attachment)",
9
9
  type: "action",
10
- version: "0.1.1",
10
+ version: "0.1.2",
11
+ annotations: {
12
+ destructiveHint: false,
13
+ openWorldHint: true,
14
+ readOnlyHint: false,
15
+ },
11
16
  props: {
12
17
  app,
13
18
  documentId: {
@@ -7,7 +7,12 @@ export default {
7
7
  name: "Create Document From File",
8
8
  description: "Create a document from a file or public file URL. [See the documentation here](https://developers.pandadoc.com/reference/create-document-from-pdf)",
9
9
  type: "action",
10
- version: "1.0.1",
10
+ version: "1.0.2",
11
+ annotations: {
12
+ destructiveHint: false,
13
+ openWorldHint: true,
14
+ readOnlyHint: false,
15
+ },
11
16
  props: {
12
17
  app,
13
18
  name: {
@@ -5,7 +5,12 @@ export default {
5
5
  name: "Create Document From Template",
6
6
  description: "Create a Document from a PandaDoc Template. [See the documentation here](https://developers.pandadoc.com/reference/create-document-from-pandadoc-template)",
7
7
  type: "action",
8
- version: "0.0.7",
8
+ version: "0.0.9",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  name: {
@@ -52,7 +57,12 @@ export default {
52
57
  },
53
58
  async additionalProps() {
54
59
  const props = {};
55
- const { fields } = await this.app.getTemplate({
60
+ if (!this.templateId) {
61
+ return props;
62
+ }
63
+ const {
64
+ fields, images,
65
+ } = await this.app.getTemplate({
56
66
  templateId: this.templateId,
57
67
  });
58
68
  for (const field of fields) {
@@ -65,6 +75,15 @@ export default {
65
75
  optional: true,
66
76
  };
67
77
  }
78
+ if (images?.length) {
79
+ for (const image of images) {
80
+ props[image.block_uuid] = {
81
+ type: "string",
82
+ label: `${image.name} URL`,
83
+ optional: true,
84
+ };
85
+ }
86
+ }
68
87
  return props;
69
88
  },
70
89
  methods: {
@@ -91,7 +110,9 @@ export default {
91
110
  } = this;
92
111
 
93
112
  const fields = {};
94
- const { fields: items } = await this.app.getTemplate({
113
+ const {
114
+ fields: items, images: templateImages,
115
+ } = await this.app.getTemplate({
95
116
  templateId: this.templateId,
96
117
  });
97
118
  for (const field of items) {
@@ -103,6 +124,20 @@ export default {
103
124
  };
104
125
  }
105
126
 
127
+ const images = [];
128
+ if (templateImages?.length) {
129
+ for (const image of templateImages) {
130
+ if (this[image.block_uuid]) {
131
+ images.push({
132
+ name: image.name,
133
+ urls: [
134
+ this[image.block_uuid],
135
+ ],
136
+ });
137
+ }
138
+ }
139
+ }
140
+
106
141
  const response = await this.app.createDocument({
107
142
  $,
108
143
  data: {
@@ -113,6 +148,7 @@ export default {
113
148
  recipients: this.parseToAnyArray(recipients),
114
149
  tokens: this.parseToAnyArray(tokens),
115
150
  fields,
151
+ images,
116
152
  },
117
153
  });
118
154
 
@@ -5,7 +5,12 @@ export default {
5
5
  name: "Create Folder",
6
6
  description: "Create a new folder to store your documents. [See the documentation here](https://developers.pandadoc.com/reference/create-documents-folder)",
7
7
  type: "action",
8
- version: "0.0.6",
8
+ version: "0.0.7",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  name: {
@@ -5,7 +5,12 @@ 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 documentation here](https://developers.pandadoc.com/reference/create-contact)",
7
7
  type: "action",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
+ annotations: {
10
+ destructiveHint: true,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  email: {
@@ -5,7 +5,12 @@ export default {
5
5
  name: "Get Document Details",
6
6
  description: "Return detailed data about a document. [See the documentation here](https://developers.pandadoc.com/reference/document-details)",
7
7
  type: "action",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  id: {
@@ -7,7 +7,12 @@ export default {
7
7
  description:
8
8
  "Download a document as PDF. [See documentation here](https://developers.pandadoc.com/reference/download-document)",
9
9
  type: "action",
10
- version: "0.0.2",
10
+ version: "0.0.3",
11
+ annotations: {
12
+ destructiveHint: false,
13
+ openWorldHint: true,
14
+ readOnlyHint: false,
15
+ },
11
16
  props: {
12
17
  app,
13
18
  id: {
@@ -7,7 +7,12 @@ export default {
7
7
  description:
8
8
  "Download a completed document as a verifiable PDF. [See documentation here](https://developers.pandadoc.com/reference/download-protected-document)",
9
9
  type: "action",
10
- version: "0.0.2",
10
+ version: "0.0.3",
11
+ annotations: {
12
+ destructiveHint: false,
13
+ openWorldHint: true,
14
+ readOnlyHint: false,
15
+ },
11
16
  props: {
12
17
  app,
13
18
  id: {
@@ -6,7 +6,12 @@ export default {
6
6
  description:
7
7
  "Get basic status info about a document. [See documentation here](https://developers.pandadoc.com/reference/document-status)",
8
8
  type: "action",
9
- version: "0.0.3",
9
+ version: "0.0.4",
10
+ annotations: {
11
+ destructiveHint: false,
12
+ openWorldHint: true,
13
+ readOnlyHint: true,
14
+ },
10
15
  props: {
11
16
  app,
12
17
  id: {
@@ -5,7 +5,12 @@ export default {
5
5
  name: "List Contacts",
6
6
  description: "List all contacts within an account. [See the documentation here](https://developers.pandadoc.com/reference/list-contacts)",
7
7
  type: "action",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  },
@@ -5,7 +5,12 @@ export default {
5
5
  name: "List Document Attachments",
6
6
  description: "Returns a list of attachments associated with a specified document. [See the documentation here](https://developers.pandadoc.com/reference/list-attachment)",
7
7
  type: "action",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  documentId: {
@@ -6,7 +6,12 @@ export default {
6
6
  name: "List Documents",
7
7
  description: "List documents, optionally filtering by a search query or tags. [See the documentation here](https://developers.pandadoc.com/reference/list-documents)",
8
8
  type: "action",
9
- version: "0.0.7",
9
+ version: "0.0.8",
10
+ annotations: {
11
+ destructiveHint: false,
12
+ openWorldHint: true,
13
+ readOnlyHint: true,
14
+ },
10
15
  props: {
11
16
  app,
12
17
  query: {
@@ -5,7 +5,12 @@ export default {
5
5
  name: "List Folders",
6
6
  description: "List folders which contain Documents. [See the documentation here](https://developers.pandadoc.com/reference/list-documents-folders)",
7
7
  type: "action",
8
- version: "0.0.6",
8
+ version: "0.0.7",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  parentFolderId: {
@@ -5,7 +5,12 @@ export default {
5
5
  name: "Send Document",
6
6
  description: "Move a document to sent status and send an optional email. [See the documentation](https://developers.pandadoc.com/reference/send-document)",
7
7
  type: "action",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  app,
11
16
  documentId: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/pandadoc",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Pipedream PandaDoc Components",
5
5
  "main": "pandadoc.app.mjs",
6
6
  "keywords": [
@@ -15,6 +15,6 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@pipedream/platform": "^3.1.0",
18
- "form-data": "^4.0.0"
18
+ "form-data": "^4.0.4"
19
19
  }
20
20
  }