Skip to content

Commit 32b6daa

Browse files
committed
Added actions
1 parent 30f72f2 commit 32b6daa

File tree

18 files changed

+80
-34
lines changed

18 files changed

+80
-34
lines changed

components/attio/actions/create-note/create-note.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "attio-create-note",
55
name: "Create Note",
66
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)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
attio,

components/attio/actions/create-person/create-person.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "attio-create-person",
66
name: "Create Person",
77
description: "Creates a new person. [See the documentation](https://developers.attio.com/reference/post_v2-objects-people-records).",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
attio,

components/attio/actions/create-task/create-task.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "attio-create-task",
77
name: "Create Task",
88
description: "Creates a new task. [See the documentation](https://docs.attio.com/rest-api/endpoint-reference/tasks/create-a-task)",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
type: "action",
1111
props: {
1212
attio,

components/attio/actions/create-update-record/create-update-record.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "attio-create-update-record",
77
name: "Create or Update Record",
88
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)",
9-
version: "0.0.3",
9+
version: "0.0.5",
1010
type: "action",
1111
props: {
1212
attio,

components/attio/actions/delete-list-entry/delete-list-entry.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "attio-delete-list-entry",
55
name: "Delete List Entry",
66
description: "Deletes an existing entry from a specific list. [See the documentation](https://developers.attio.com/reference/delete_v2-lists-list-entries-entry-id)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
attio,
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import attio from "../../attio.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "attio-get-record",
6+
name: "Get Record",
7+
description: "Retrieves the record with the specified ID. [See the documentation](https://docs.attio.com/rest-api/endpoint-reference/records/get-a-record)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
attio,
12+
objectId: {
13+
propDefinition: [
14+
attio,
15+
"objectId",
16+
],
17+
},
18+
recordId: {
19+
label: "Person ID",
20+
description: "The identifier of the contact to update.",
21+
propDefinition: [
22+
attio,
23+
"recordId",
24+
() => ({
25+
targetObject: constants.TARGET_OBJECT.PEOPLE,
26+
mapper: ({
27+
id: { record_id: value },
28+
values: { name },
29+
}) => ({
30+
value,
31+
label: name[0]?.full_name,
32+
}),
33+
}),
34+
],
35+
},
36+
},
37+
async run({ $ }) {
38+
const response = await this.attio.getRecord({
39+
$,
40+
objectId: this.objectId,
41+
recordId: this.recordId,
42+
});
43+
$.export("$summary", "Successfully retrieved the record with ID: " + this.recordId);
44+
return response;
45+
},
46+
};

components/attio/actions/update-person/update-person.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "attio-update-person",
66
name: "Update Person",
77
description: "Update an existing person. [See the documentation](https://developers.attio.com/reference/patch_v2-objects-people-records-record-id).",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
attio,

components/attio/attio.app.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,5 +302,13 @@ export default {
302302
...args,
303303
});
304304
},
305+
getRecord({
306+
objectId, recordId, ...args
307+
}) {
308+
return this._makeRequest({
309+
path: `/objects/${objectId}/records/${recordId}`,
310+
...args,
311+
});
312+
},
305313
},
306314
};

components/attio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^3.0.3"
16+
"@pipedream/platform": "^3.1.0"
1717
}
1818
}

components/attio/sources/list-entry-deleted-instant/list-entry-deleted-instant.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import sampleEmit from "./test-event.mjs";
44
export default {
55
...common,
66
key: "attio-list-entry-deleted-instant",
7-
name: "List Entry Deleted (Instant)",
7+
name: "New List Entry Deleted (Instant)",
88
description: "Emit new event when a list entry is deleted (i.e. when a record is removed from a list).",
9-
version: "0.0.2",
9+
version: "0.0.3",
1010
type: "source",
1111
dedupe: "unique",
1212
props: {

0 commit comments

Comments
 (0)