@pipedream/prodpad 0.0.1

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.
Files changed (33) hide show
  1. package/LICENSE +41 -0
  2. package/README.md +33 -0
  3. package/actions/create-company/create-company.mjs +81 -0
  4. package/actions/create-contact/create-contact.mjs +115 -0
  5. package/actions/create-feedback/create-feedback.mjs +85 -0
  6. package/actions/create-idea/create-idea.mjs +151 -0
  7. package/actions/find-company/find-company.mjs +85 -0
  8. package/actions/find-contact/find-contact.mjs +90 -0
  9. package/actions/find-feedback/find-feedback.mjs +123 -0
  10. package/actions/find-idea/find-idea.mjs +66 -0
  11. package/actions/find-or-create-company/find-or-create-company.mjs +105 -0
  12. package/actions/find-or-create-contact/find-or-create-contact.mjs +114 -0
  13. package/actions/find-or-create-feedback/find-or-create-feedback.mjs +149 -0
  14. package/actions/update-company/update-company.mjs +101 -0
  15. package/actions/update-contact/update-contact.mjs +134 -0
  16. package/actions/update-feedback/update-feedback.mjs +87 -0
  17. package/actions/update-idea-stage/update-idea-stage.mjs +52 -0
  18. package/common/constants.mjs +11 -0
  19. package/common/utils.mjs +42 -0
  20. package/package.json +19 -0
  21. package/prodpad.app.mjs +427 -0
  22. package/sources/common/polling.mjs +65 -0
  23. package/sources/new-company-created/new-company-created.mjs +27 -0
  24. package/sources/new-contact-created/new-contact-created.mjs +27 -0
  25. package/sources/new-feedback-created/new-feedback-created.mjs +27 -0
  26. package/sources/new-idea-created/new-idea-created.mjs +27 -0
  27. package/sources/new-idea-feedback-created/new-idea-feedback-created.mjs +38 -0
  28. package/sources/new-persona-created/new-persona-created.mjs +24 -0
  29. package/sources/new-product-created/new-product-created.mjs +24 -0
  30. package/sources/new-tag-created/new-tag-created.mjs +24 -0
  31. package/sources/new-user-story-created/new-user-story-created.mjs +24 -0
  32. package/sources/pushed-idea/pushed-idea.mjs +24 -0
  33. package/sources/pushed-user-story/pushed-user-story.mjs +24 -0
package/LICENSE ADDED
@@ -0,0 +1,41 @@
1
+ Pipedream Source Available License Version 1.0
2
+
3
+ This Pipedream Source Available License Agreement Version 1.0 (this “Agreement”) sets forth the terms on which Pipedream, Inc., a Delaware corporation (“Pipedream”) makes available certain software (the “Software”). By installing, downloading, accessing, using or distributing the Software, you agree to the terms of this Agreement. If you do not agree to such terms, you must not use the Software. If you are receiving the Software on behalf of a legal entity, you represent and warrant that you have the actual authority to agree to the terms and conditions of this Agreement on behalf of such entity. “Licensee” means you, an individual, or the entity on whose behalf you are receiving the Software.
4
+
5
+ LICENSE GRANT AND CONDITIONS.
6
+
7
+ 1.1 License. Subject to the terms and conditions of this Agreement, Pipedream hereby grants to Licensee a non-exclusive, royalty-free, worldwide, non-transferable, non-sublicenseable license during the term of this Agreement to use, prepare modifications and derivative works, distribute (including without limitation in source code or object code form) and reproduce copies of the Software (the “License”). Licensee is not granted the right to, and Licensee shall not, exercise the License for an Excluded Purpose. For purposes of this Agreement, “Excluded Purpose” means any commercial use of the software including, but not limited to, making available any software-as-a-service, platform-as-a-service, infrastructure-as-a-service or other online service that competes with the Software or any other Pipedream products or services.
8
+
9
+ 1.2 Conditions. In consideration of the License, Licensee’s distribution of the Software is subject to the following conditions:
10
+
11
+ a. Licensee must cause any Software modified by Licensee to carry prominent notices stating that Licensee modified the Software.
12
+
13
+ b. On each Software copy, Licensee shall reproduce and not remove or alter all Pipedream or third party copyright or other proprietary notices contained in the Software, and Licensee must provide this with each copy: “This software is made available by Pipedream, Inc., under the terms of the Pipedream Source Available License, Version 1.0 located at https://github.com/PipedreamHQ/pipedream/blob/master/LICENSE. By installing, downloading, accessing, using or distributing the Software, you agree to the terms of such License Agreement.”
14
+
15
+ 1.3 Modifications. Licensee may add its own copyright notices to modifications made by Licensee and may provide additional or different license terms and conditions for use, reproduction, or distribution of Licensee’s modifications. While redistributing the Software or modifications thereof, Licensee may choose to offer, for a fee or free of charge, support, warranty, indemnity, or other obligations. Licensee, and not Pipedream, will be responsible for any such obligations.
16
+
17
+ 1.4 No Sublicensing. The License does not include the right to sublicense the Software; provided, however, that any recipient to which Licensee provides the Software may exercise the License so long as such recipient agrees to the terms and conditions of this Agreement.
18
+
19
+ TERM AND TERMINATION.
20
+
21
+ This Agreement will continue unless and until earlier terminated as set forth herein. If Licensee breaches any of its conditions or obligations under this Agreement, this Agreement will terminate automatically and the License will terminate automatically and permanently.
22
+
23
+ INTELLECTUAL PROPERTY.
24
+
25
+ As between the parties, Pipedream retains all right, title, and interest in the Software, and all intellectual property rights therein. Pipedream hereby reserves all rights not expressly granted to Licensee in this Agreement. Pipedream reserves all rights in its trademarks and service marks, and no licenses thereto are granted by this Agreement.
26
+
27
+ DISCLAIMER.
28
+
29
+ PIPEDREAM HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE.
30
+
31
+ LIMITATION OF LIABILITY.
32
+
33
+ PIPEDREAM WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO, LOST PROFITS OR ANY CONSEQUENTIAL, SPECIAL, INCIDENTAL, INDIRECT, OR DIRECT DAMAGES, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF THIS AGREEMENT. THE FOREGOING SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW.
34
+
35
+ GENERAL.
36
+
37
+ 6.1 Governing Law. This Agreement will be governed by and interpreted in accordance with the laws of the state of California, without reference to its conflict of laws principles. If Licensee is located outside of the United States, any dispute, controversy or claim arising out of or relating to this Agreement will be referred to and finally determined by arbitration in accordance with the JAMS International Arbitration Rules. The tribunal will consist of one arbitrator. Judgment upon the award rendered by the arbitrator may be entered in any court having jurisdiction thereof. All disputes including arbitrations shall take place in Santa Clara County, California. The language to be used in any such proceedings shall be English.
38
+
39
+ 6.2. Assignment. Licensee is not authorized to assign its rights under this Agreement to any third party. Pipedream may freely assign its rights under this Agreement to any third party.
40
+
41
+ 6.3. Other. This Agreement is the entire agreement between the parties regarding the subject matter hereof. No amendment or modification of this Agreement will be valid or binding upon the parties unless made in writing and signed by the duly authorized representatives of both parties. In the event that any provision, including without limitation any condition, of this Agreement is held to be unenforceable, this Agreement and all licenses and rights granted hereunder will immediately terminate. Waiver by Pipedream of a breach of any provision of this Agreement or the failure by Pipedream to exercise any right hereunder will not be construed as a waiver of any subsequent breach of that right or as a waiver of any other right.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Overview
2
+
3
+ What can you build with ProdPad's API? The possibilities are endless!
4
+
5
+ ProdPad is an idea and innovation management platform – with our API, you’re able to turn ideas into actionable tasks with minimal effort. ProdPad’s API enables you to manage product planning and roadmapping, such as:
6
+
7
+ - Retrieve ideas, including customer feedback and suggestions
8
+ - Automatically creates tasks for your team to feature develop and utilize
9
+ - Track and analyze the progress of product-related tasks across your different products
10
+ - Generate reports on product performance
11
+ - Monitor customer feedback with customizable filters
12
+ - Integrate your product roadmap with third-party systems and tools
13
+
14
+ The ProdPad API allows you to build a range of custom projects that can streamline and automate parts of your product planning process. Here are some of the things you can do:
15
+
16
+ - Track customer feedback and manage product roadmaps
17
+ - Keep track of team tasks and milestones
18
+ - Analyze product performance and utilization
19
+ - Visualize your product roadmap
20
+ - Aggregate customer feedback into reports
21
+ - Integrate ProdPad into your existing systems and tools
22
+ - Create custom development projects
23
+ - Synchronize data between Prodpad and third-party applications
24
+
25
+ # Webhooks
26
+
27
+ Some triggers support webhooks for ProdPad. These include:
28
+
29
+ - New Pushed Idea
30
+ - New Pushed User Story
31
+
32
+ To set up a webhook, please create and deploy one of these triggers and copy the HTTP URL.
33
+ Then follow the instructions on [this link](https://help.prodpad.com/article/759-create-a-custom-webhook).
@@ -0,0 +1,81 @@
1
+ import app from "../../prodpad.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "prodpad-create-company",
6
+ name: "Create Company",
7
+ description: "Create a new company in the account. This is only available to accounts with an Advanced or higher subscription. If you try on an account without an advanced or higher subscription package it will return a 403. [See the docs](https://app.swaggerhub.com/apis-docs/ProdPad/prodpad/1.0#/Feedback/PostCompanies).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ props: {
11
+ app,
12
+ name: {
13
+ propDefinition: [
14
+ app,
15
+ "name",
16
+ ],
17
+ },
18
+ city: {
19
+ propDefinition: [
20
+ app,
21
+ "city",
22
+ ],
23
+ },
24
+ country: {
25
+ propDefinition: [
26
+ app,
27
+ "country",
28
+ ],
29
+ },
30
+ size: {
31
+ propDefinition: [
32
+ app,
33
+ "companySize",
34
+ ],
35
+ },
36
+ value: {
37
+ propDefinition: [
38
+ app,
39
+ "companyValue",
40
+ ],
41
+ },
42
+ tagIds: {
43
+ type: "string[]",
44
+ label: "Tags",
45
+ description: "The tags to associate with the company.",
46
+ optional: true,
47
+ propDefinition: [
48
+ app,
49
+ "tagId",
50
+ ],
51
+ },
52
+ },
53
+ async run({ $: step }) {
54
+ const {
55
+ name,
56
+ city,
57
+ country,
58
+ size,
59
+ value,
60
+ tagIds,
61
+ } = this;
62
+
63
+ const response = await this.app.createCompany({
64
+ step,
65
+ data: {
66
+ name,
67
+ city,
68
+ country,
69
+ size,
70
+ value,
71
+ tags: utils.mapOrParse(tagIds, (id) => ({
72
+ id,
73
+ })),
74
+ },
75
+ });
76
+
77
+ step.export("$summary", `Successfully created company with ID ${response.id}.`);
78
+
79
+ return response;
80
+ },
81
+ };
@@ -0,0 +1,115 @@
1
+ import app from "../../prodpad.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "prodpad-create-contact",
6
+ name: "Create Contact",
7
+ description: "Creates a contact. [See the docs](https://app.swaggerhub.com/apis-docs/ProdPad/prodpad/1.0#/Feedback/PostContacts).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ props: {
11
+ app,
12
+ name: {
13
+ description: "The name of the contact",
14
+ propDefinition: [
15
+ app,
16
+ "name",
17
+ ],
18
+ },
19
+ email: {
20
+ description: "The email of the contact",
21
+ propDefinition: [
22
+ app,
23
+ "email",
24
+ ],
25
+ },
26
+ about: {
27
+ type: "string",
28
+ label: "About",
29
+ description: "About the contact",
30
+ optional: true,
31
+ },
32
+ phone: {
33
+ type: "string",
34
+ label: "Phone",
35
+ description: "The phone number of the contact",
36
+ optional: true,
37
+ },
38
+ twitterUrl: {
39
+ type: "string",
40
+ label: "Twitter URL",
41
+ description: "The twitter URL of the contact",
42
+ optional: true,
43
+ },
44
+ tagIds: {
45
+ type: "string[]",
46
+ label: "Tags",
47
+ description: "The tags to associate with the contact.",
48
+ optional: true,
49
+ propDefinition: [
50
+ app,
51
+ "tagId",
52
+ ],
53
+ },
54
+ personaIds: {
55
+ type: "string[]",
56
+ label: "Persona IDs",
57
+ description: "The persona IDs to associate with the contact.",
58
+ optional: true,
59
+ propDefinition: [
60
+ app,
61
+ "personaId",
62
+ ],
63
+ },
64
+ company: {
65
+ optional: true,
66
+ propDefinition: [
67
+ app,
68
+ "companyId",
69
+ ],
70
+ },
71
+ jobrole: {
72
+ optional: true,
73
+ propDefinition: [
74
+ app,
75
+ "jobroleId",
76
+ ],
77
+ },
78
+ },
79
+ async run({ $: step }) {
80
+ const {
81
+ name,
82
+ email,
83
+ about,
84
+ phone,
85
+ twitterUrl,
86
+ tagIds,
87
+ personaIds,
88
+ company,
89
+ jobrole,
90
+ } = this;
91
+
92
+ const response = await this.app.createContact({
93
+ step,
94
+ data: {
95
+ name,
96
+ email,
97
+ about,
98
+ phone,
99
+ twitter_url: twitterUrl,
100
+ tags: utils.mapOrParse(tagIds, (id) => ({
101
+ id,
102
+ })),
103
+ personas: utils.mapOrParse(personaIds, (id) => ({
104
+ id,
105
+ })),
106
+ company,
107
+ jobrole,
108
+ },
109
+ });
110
+
111
+ step.export("$summary", `Successfully created contact with ID ${response.id}.`);
112
+
113
+ return response;
114
+ },
115
+ };
@@ -0,0 +1,85 @@
1
+ import app from "../../prodpad.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "prodpad-create-feedback",
6
+ name: "Create Feedback",
7
+ description: "Creates a feedback. [See the docs](https://app.swaggerhub.com/apis-docs/ProdPad/prodpad/1.0#/Feedback/PostFeedbacks).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ props: {
11
+ app,
12
+ contactId: {
13
+ description: "ID of the contact providing the feedback.",
14
+ propDefinition: [
15
+ app,
16
+ "contactId",
17
+ ],
18
+ },
19
+ feedback: {
20
+ propDefinition: [
21
+ app,
22
+ "feedback",
23
+ ],
24
+ },
25
+ tagIds: {
26
+ type: "string[]",
27
+ label: "Tag IDs",
28
+ description: "Tag IDs to link to the feedback.",
29
+ optional: true,
30
+ propDefinition: [
31
+ app,
32
+ "tagId",
33
+ ],
34
+ },
35
+ personaIds: {
36
+ type: "string[]",
37
+ label: "Persona IDs",
38
+ description: "Persona IDs to link to the feedback.",
39
+ optional: true,
40
+ propDefinition: [
41
+ app,
42
+ "personaId",
43
+ ],
44
+ },
45
+ productIds: {
46
+ type: "string[]",
47
+ label: "Product IDs",
48
+ description: "Product IDs to link to the feedback.",
49
+ optional: true,
50
+ propDefinition: [
51
+ app,
52
+ "productId",
53
+ ],
54
+ },
55
+ },
56
+ async run({ $: step }) {
57
+ const {
58
+ contactId,
59
+ feedback,
60
+ tagIds,
61
+ personaIds,
62
+ productIds,
63
+ } = this;
64
+
65
+ const response = await this.app.createFeedback({
66
+ step,
67
+ data: {
68
+ contact_id: contactId,
69
+ feedback,
70
+ tags: utils.mapOrParse(tagIds, (id) => ({
71
+ id,
72
+ })),
73
+ personas: utils.mapOrParse(personaIds, (id) => ({
74
+ id,
75
+ })),
76
+ products: utils.mapOrParse(productIds, (id) => ({
77
+ id,
78
+ })),
79
+ },
80
+ });
81
+
82
+ step.export("$summary", `Successfully created feedback with ID ${response.id}.`);
83
+ return response;
84
+ },
85
+ };
@@ -0,0 +1,151 @@
1
+ import app from "../../prodpad.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "prodpad-create-idea",
6
+ name: "Create Idea",
7
+ description: "Creates an idea. [See the docs](https://app.swaggerhub.com/apis-docs/ProdPad/prodpad/1.0#/Ideas/PostIdeas).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ props: {
11
+ app,
12
+ title: {
13
+ type: "string",
14
+ label: "Title",
15
+ description: "The title of the idea. Either the title or description is required.",
16
+ },
17
+ description: {
18
+ type: "string",
19
+ label: "Description",
20
+ description: "The description of the idea. This field accepts HTML and is stored as UTF-8.",
21
+ optional: true,
22
+ },
23
+ businessCaseProblem: {
24
+ type: "string",
25
+ label: "Business Case Problem",
26
+ description: "The problem or hypothesis this idea is aiming to address. This field accepts HTML and is stored as UTF-8.",
27
+ optional: true,
28
+ },
29
+ businessCaseValue: {
30
+ type: "string",
31
+ label: "Business Case Value",
32
+ description: "The value of solving this problem or hypothesis to the user and the company. This field accepts HTML and is stored as UTF-8.",
33
+ optional: true,
34
+ },
35
+ functional: {
36
+ type: "string",
37
+ label: "Functional Specs",
38
+ description: "The functional specs of how this idea could be implemented. This field accepts HTML and is stored as UTF-8.",
39
+ optional: true,
40
+ },
41
+ notes: {
42
+ type: "string",
43
+ label: "Notes",
44
+ description: "Free text field for notes on the idea. This field accepts HTML and is stored as UTF-8.",
45
+ optional: true,
46
+ },
47
+ productIds: {
48
+ type: "string[]",
49
+ label: "Products",
50
+ description: "The products to associate with the idea.",
51
+ optional: true,
52
+ propDefinition: [
53
+ app,
54
+ "productId",
55
+ ],
56
+ },
57
+ personaIds: {
58
+ type: "string[]",
59
+ label: "Personas",
60
+ description: "The persona IDs to associate with the persona.",
61
+ optional: true,
62
+ propDefinition: [
63
+ app,
64
+ "personaId",
65
+ ],
66
+ },
67
+ tagIds: {
68
+ type: "string[]",
69
+ label: "Tags",
70
+ description: "The tags to associate with the persona.",
71
+ optional: true,
72
+ propDefinition: [
73
+ app,
74
+ "tagId",
75
+ ],
76
+ },
77
+ statusId: {
78
+ optional: true,
79
+ propDefinition: [
80
+ app,
81
+ "statusId",
82
+ ],
83
+ },
84
+ state: {
85
+ type: "string",
86
+ label: "State",
87
+ description: "State of the idea.",
88
+ optional: true,
89
+ options: [
90
+ "active",
91
+ "active_public",
92
+ "archived",
93
+ "unsorted",
94
+ ],
95
+ },
96
+ },
97
+ methods: {
98
+ createIdea(args = {}) {
99
+ return this.app.create({
100
+ path: "/ideas",
101
+ ...args,
102
+ });
103
+ },
104
+ },
105
+ async run({ $: step }) {
106
+ const {
107
+ title,
108
+ description,
109
+ businessCaseProblem,
110
+ businessCaseValue,
111
+ functional,
112
+ notes,
113
+ productIds,
114
+ personaIds,
115
+ tagIds,
116
+ statusId,
117
+ state,
118
+ } = this;
119
+
120
+ const response = await this.createIdea({
121
+ step,
122
+ data: {
123
+ title,
124
+ description,
125
+ business_case: {
126
+ problem: businessCaseProblem,
127
+ value: businessCaseValue,
128
+ },
129
+ functional,
130
+ notes,
131
+ tags: utils.mapOrParse(tagIds, (id) => ({
132
+ id,
133
+ })),
134
+ personas: utils.mapOrParse(personaIds, (id) => ({
135
+ id,
136
+ })),
137
+ products: utils.mapOrParse(productIds, (id) => ({
138
+ id,
139
+ })),
140
+ status: {
141
+ id: statusId,
142
+ },
143
+ state,
144
+ },
145
+ });
146
+
147
+ step.export("$summary", `Successfully created idea with ID ${response.id}.`);
148
+
149
+ return response;
150
+ },
151
+ };
@@ -0,0 +1,85 @@
1
+ import app from "../../prodpad.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "prodpad-find-company",
6
+ name: "Find Company",
7
+ description: "Finds a company. [See the docs](https://app.swaggerhub.com/apis-docs/ProdPad/prodpad/1.0#/Feedback/GetCompanies).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ props: {
11
+ app,
12
+ name: {
13
+ description: "Filter the companies by the name or partial name of the companies.",
14
+ optional: true,
15
+ propDefinition: [
16
+ app,
17
+ "name",
18
+ ],
19
+ },
20
+ city: {
21
+ description: "Set to filter the companies based on city.",
22
+ propDefinition: [
23
+ app,
24
+ "city",
25
+ ],
26
+ },
27
+ country: {
28
+ description: "Set to filter the companies based on the country. Use ISO Alpha-2 country codes. Only one country can be filtered at a time.",
29
+ propDefinition: [
30
+ app,
31
+ "country",
32
+ ],
33
+ },
34
+ companySize: {
35
+ description: "Set to filter the companies based on their size.",
36
+ propDefinition: [
37
+ app,
38
+ "companySize",
39
+ ],
40
+ },
41
+ companyValue: {
42
+ description: "Set to filter the companies based on their value.",
43
+ propDefinition: [
44
+ app,
45
+ "companyValue",
46
+ ],
47
+ },
48
+ tagIds: {
49
+ type: "string[]",
50
+ label: "Tags",
51
+ description: "Filter companies by the tags associated to the feedback. Mulitple tags can be specified and acts as an OR. Use the tag ID or UUID.",
52
+ optional: true,
53
+ propDefinition: [
54
+ app,
55
+ "tagId",
56
+ ],
57
+ },
58
+ },
59
+ async run({ $: step }) {
60
+ const {
61
+ name,
62
+ city,
63
+ country,
64
+ companySize,
65
+ companyValue,
66
+ tagIds,
67
+ } = this;
68
+
69
+ const { companies } = await this.app.listCompanies({
70
+ step,
71
+ params: {
72
+ name,
73
+ city,
74
+ country,
75
+ company_size: companySize,
76
+ value: companyValue,
77
+ tags: utils.mapOrParse(tagIds).join(","),
78
+ },
79
+ });
80
+
81
+ step.export("$summary", `Successfully found ${utils.summaryEnd(companies.length, "company", "companies")}`);
82
+
83
+ return companies;
84
+ },
85
+ };
@@ -0,0 +1,90 @@
1
+ import app from "../../prodpad.app.mjs";
2
+ import utils from "../../common/utils.mjs";
3
+
4
+ export default {
5
+ key: "prodpad-find-contact",
6
+ name: "Find Contact",
7
+ description: "Finds a contact. [See the docs](https://app.swaggerhub.com/apis-docs/ProdPad/prodpad/1.0#/Feedback/PostContacts).",
8
+ type: "action",
9
+ version: "0.0.1",
10
+ props: {
11
+ app,
12
+ name: {
13
+ description: "Name of contact or partial name of contacts to filter the list by",
14
+ optional: true,
15
+ propDefinition: [
16
+ app,
17
+ "name",
18
+ ],
19
+ },
20
+ email: {
21
+ description: "Filter the contacts by an email.",
22
+ optional: true,
23
+ propDefinition: [
24
+ app,
25
+ "email",
26
+ ],
27
+ },
28
+ tagIds: {
29
+ type: "string[]",
30
+ label: "Tags",
31
+ description: "ID of one or more tags to filter the contacts by.",
32
+ optional: true,
33
+ propDefinition: [
34
+ app,
35
+ "tagId",
36
+ ],
37
+ },
38
+ persona: {
39
+ label: "Persona ID",
40
+ description: "ID of a persona to filter contacts by.",
41
+ optional: true,
42
+ propDefinition: [
43
+ app,
44
+ "personaId",
45
+ ],
46
+ },
47
+ company: {
48
+ description: "UUID of a company to filter contacts by.",
49
+ optional: true,
50
+ propDefinition: [
51
+ app,
52
+ "companyId",
53
+ ],
54
+ },
55
+ jobrole: {
56
+ description: "UUID of a job role to filter contacts by.",
57
+ optional: true,
58
+ propDefinition: [
59
+ app,
60
+ "jobroleId",
61
+ ],
62
+ },
63
+ },
64
+ async run({ $: step }) {
65
+ const {
66
+ name,
67
+ email,
68
+ tagIds,
69
+ persona,
70
+ company,
71
+ jobrole,
72
+ } = this;
73
+
74
+ const { contacts } = await this.app.listContacts({
75
+ step,
76
+ params: {
77
+ name,
78
+ email,
79
+ tags: utils.mapOrParse(tagIds).join(","),
80
+ persona,
81
+ company,
82
+ job_role: jobrole,
83
+ },
84
+ });
85
+
86
+ step.export("$summary", `Successfully found ${utils.summaryEnd(contacts.length, "contact")}`);
87
+
88
+ return contacts;
89
+ },
90
+ };