Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name: "Update Contact",
description: "Updates an existing contact in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-a-contact)",
type: "action",
version: "0.0.4",
version: "0.0.{{ts}}",

Check warning on line 9 in components/apollo_io/actions/update-contact/update-contact.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

{{ts}} macro should be removed before committing
props: {
app,
contactId: {
Expand Down Expand Up @@ -83,7 +83,9 @@
title: this.title,
account_id: this.accountId,
website_url: this.websiteUrl,
label_names: this.labelNames,
label_names: typeof this.labelNames === "string"
? JSON.parse(this.labelNames)
: this.labelNames,
present_raw_address: this.address,
direct_phone: this.phone,
}),
Expand Down
13 changes: 12 additions & 1 deletion components/apollo_io/apollo_io.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ export default {
labelNames: {
type: "string[]",
label: "Label Names",
description: "A list of names to tag this newly created contact. If the name does not exist, Apollo will automatically create it",
description: "A list of names to tag this contact. You can select the labels from the list or create new ones using a custom expression, i.e., `[\"label1\", \"label2\"]`",
optional: true,
async options() {
const response = await this.listLabels();
console.log(response);
return response.map(({ name }) => name) || [];
},
},
address: {
type: "string",
Expand Down Expand Up @@ -384,6 +389,12 @@ export default {
...args,
});
},
listLabels(args = {}) {
return this.makeRequest({
path: "/labels",
...args,
});
},
async *getResourcesStream({
resourceFn,
resourceFnArgs,
Expand Down
Loading