From 5b587f29b0191fc835c397bc7eeba7538b9722ef Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 12 Nov 2024 12:20:32 -0500 Subject: [PATCH] updaet recordId prop --- components/attio/actions/create-note/create-note.mjs | 2 +- .../create-update-record/create-update-record.mjs | 2 +- .../actions/delete-list-entry/delete-list-entry.mjs | 2 +- components/attio/attio.app.mjs | 10 +++++++++- components/attio/package.json | 2 +- .../new-list-entry-instant/new-list-entry-instant.mjs | 2 +- .../new-record-created-instant.mjs | 2 +- .../record-updated-instant/record-updated-instant.mjs | 2 +- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/components/attio/actions/create-note/create-note.mjs b/components/attio/actions/create-note/create-note.mjs index 6811657df129e..923c548133fde 100644 --- a/components/attio/actions/create-note/create-note.mjs +++ b/components/attio/actions/create-note/create-note.mjs @@ -4,7 +4,7 @@ export default { key: "attio-create-note", name: "Create Note", description: "Creates a new note for a given record. The note will be linked to the specified record. [See the documentation](https://developers.attio.com/reference/post_v2-notes)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { attio, diff --git a/components/attio/actions/create-update-record/create-update-record.mjs b/components/attio/actions/create-update-record/create-update-record.mjs index 648a2c8b96c87..e0abe3c586fd1 100644 --- a/components/attio/actions/create-update-record/create-update-record.mjs +++ b/components/attio/actions/create-update-record/create-update-record.mjs @@ -5,7 +5,7 @@ export default { key: "attio-create-update-record", name: "Create or Update Record", description: "Creates or updates a specific record such as a person or a deal. If the record already exists, it's updated. Otherwise, a new record is created. [See the documentation](https://developers.attio.com/reference/put_v2-objects-object-records)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { attio, diff --git a/components/attio/actions/delete-list-entry/delete-list-entry.mjs b/components/attio/actions/delete-list-entry/delete-list-entry.mjs index 5c866be65fade..3b98149d16d05 100644 --- a/components/attio/actions/delete-list-entry/delete-list-entry.mjs +++ b/components/attio/actions/delete-list-entry/delete-list-entry.mjs @@ -4,7 +4,7 @@ export default { key: "attio-delete-list-entry", name: "Delete List Entry", description: "Deletes an existing entry from a specific list. [See the documentation](https://developers.attio.com/reference/delete_v2-lists-list-entries-entry-id)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { attio, diff --git a/components/attio/attio.app.mjs b/components/attio/attio.app.mjs index ecd1af069dacc..27f2fb1027f24 100644 --- a/components/attio/attio.app.mjs +++ b/components/attio/attio.app.mjs @@ -64,7 +64,15 @@ export default { offset: page * DEFAULT_LIMIT, }, }); - return data?.map(({ id }) => id.record_id) || []; + return data?.map(({ + id, values, + }) => ({ + value: id.record_id, + label: (values?.name?.length && (values.name[0].value || values.name[0].full_name)) + ?? (values?.domains?.length && values.domains[0].domain) + ?? (values?.email_addresses?.length && values.email_addresses[0].email_address) + ?? values?.id?.record_id, + })) || []; }, }, attributeId: { diff --git a/components/attio/package.json b/components/attio/package.json index 247666fdb730f..a817f7de21633 100644 --- a/components/attio/package.json +++ b/components/attio/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/attio", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Attio Components", "main": "attio.app.mjs", "keywords": [ diff --git a/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs b/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs index ebb0c2409497d..886af1869c311 100644 --- a/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs +++ b/components/attio/sources/new-list-entry-instant/new-list-entry-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-list-entry-instant", name: "New List Entry (Instant)", description: "Emit new event when a record, such as person, company, or deal, is added to a list", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { diff --git a/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs b/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs index 9e374d218e0c4..6bf50c00fb8eb 100644 --- a/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs +++ b/components/attio/sources/new-record-created-instant/new-record-created-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-new-record-created-instant", name: "New Record Created (Instant)", description: "Emit new event when new record, such as person, company or deal gets created", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: { diff --git a/components/attio/sources/record-updated-instant/record-updated-instant.mjs b/components/attio/sources/record-updated-instant/record-updated-instant.mjs index e94b7b17efce7..cfe60ad7bdeef 100644 --- a/components/attio/sources/record-updated-instant/record-updated-instant.mjs +++ b/components/attio/sources/record-updated-instant/record-updated-instant.mjs @@ -6,7 +6,7 @@ export default { key: "attio-record-updated-instant", name: "Record Updated (Instant)", description: "Emit new event when values on a record, such as person, company or deal, are updated", - version: "0.0.1", + version: "0.0.2", type: "source", dedupe: "unique", props: {