Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion components/attio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/attio",
"version": "0.1.1",
"version": "0.2.0",
"description": "Pipedream Attio Components",
"main": "attio.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "attio-list-entry-deleted-instant",
name: "List Entry Deleted (Instant)",
description: "Emit new event when a list entry is deleted (i.e. when a record is removed from a list).",
version: "0.0.1",
type: "source",
dedupe: "unique",
props: {
...common.props,
listId: {
propDefinition: [
common.props.attio,
"listId",
],
},
},
methods: {
...common.methods,
getEventType() {
return "list-entry.deleted";
},
getFilter() {
return {
"$and": [
{
field: "id.list_id",
operator: "equals",
value: this.listId,
},
],
};
},
generateMeta(entry) {
return {
id: entry.id.entry_id,
summary: `Deleted Entry with ID: ${entry.id.entry_id}`,
ts: Date.now(),
};
},
},
sampleEmit,
};
14 changes: 14 additions & 0 deletions components/attio/sources/list-entry-deleted-instant/test-event.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default {
"event_type": "list-entry.deleted",
"id": {
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
"list_id": "dd41a385-c7cd-4832-ad57-c9a824b32ba4",
"entry_id": "7ce64af0-9d4a-4899-88c8-6d74258ca8ef"
},
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
"parent_record_id": "64561036-ee99-47f7-926c-66bf43808dcf",
"actor": {
"type": "api-token",
"id": "76602e62-6767-4975-9e3f-751d5ce80a05"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "attio-list-entry-updated-instant",
name: "List Entry Updated (Instant)",
description: "Emit new event when an existing list entry is updated (i.e. when a list attribute is changed for a specific list entry, e.g. when setting \"Owner\")",
version: "0.0.1",
type: "source",
dedupe: "unique",
props: {
...common.props,
listId: {
propDefinition: [
common.props.attio,
"listId",
],
},
},
methods: {
...common.methods,
getEventType() {
return "list-entry.updated";
},
getFilter() {
return {
"$and": [
{
field: "id.list_id",
operator: "equals",
value: this.listId,
},
],
};
},
generateMeta(entry) {
const ts = Date.now();
return {
id: `${entry.id.entry_id}-${ts}`,
summary: `Updated Entry with ID: ${entry.id.entry_id}`,
ts,
};
},
},
sampleEmit,
};
15 changes: 15 additions & 0 deletions components/attio/sources/list-entry-updated-instant/test-event.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
"event_type": "list-entry.updated",
"id": {
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
"list_id": "dd41a385-c7cd-4832-ad57-c9a824b32ba4",
"entry_id": "d7b73c9c-5b91-45df-bf3f-677b9bd563eb",
"attribute_id": "82b07502-9c9d-4996-a46f-4a5b687015d5"
},
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
"parent_record_id": "6a3cce50-9589-4f94-be16-8aa0a80c46e1",
"actor": {
"type": "workspace-member",
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
}
}
26 changes: 26 additions & 0 deletions components/attio/sources/new-note-instant/new-note-instant.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "attio-new-note-instant",
name: "New Note (Instant)",
description: "Emit new event when a new note is created.",
version: "0.0.1",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
getEventType() {
return "note.created";
},
generateMeta(note) {
return {
id: note.id.note_id,
summary: `New Note with ID: ${note.id.note_id}`,
ts: Date.now(),
};
},
},
sampleEmit,
};
13 changes: 13 additions & 0 deletions components/attio/sources/new-note-instant/test-event.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
"event_type": "note.created",
"id": {
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
"note_id": "cc2a06ee-61ae-4a9b-bf1b-4e9774270061"
},
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
"parent_record_id": "64561036-ee99-47f7-926c-66bf43808dcf",
"actor": {
"type": "workspace-member",
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "attio-new-object-attribute-instant",
name: "New Object Attribute (Instant)",
description: "Emit new event when an object attribute is created (e.g. when defining a new attribute \"Rating\" on the company object)",
version: "0.0.1",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
getEventType() {
return "object-attribute.created";
},
generateMeta(attribute) {
return {
id: attribute.id.attribute_id,
summary: `New Object Attribute with ID: ${attribute.id.attribute_id}`,
ts: Date.now(),
};
},
},
sampleEmit,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
"event_type": "object-attribute.created",
"id": {
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
"object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
"attribute_id": "44a18da2-582e-4e65-9349-9b49b9bb7a14"
},
"actor": {
"type": "workspace-member",
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "attio-note-updated-instant",
name: "Note Updated (Instant)",
description: "Emit new event when the title of a note is modified. Body updates do not currently trigger webhooks.",
version: "0.0.1",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
getEventType() {
return "note.updated";
},
generateMeta(note) {
return {
id: note.id.note_id,
summary: `Updated Note with ID: ${note.id.note_id}`,
ts: Date.now(),
};
},
},
sampleEmit,
};
13 changes: 13 additions & 0 deletions components/attio/sources/note-updated-instant/test-event.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
"event_type": "note.updated",
"id": {
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
"note_id": "cc2a06ee-61ae-4a9b-bf1b-4e9774270061"
},
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
"parent_record_id": "64561036-ee99-47f7-926c-66bf43808dcf",
"actor": {
"type": "workspace-member",
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "attio-object-attribute-updated-instant",
name: "Object Attribute Updated (Instant)",
description: "Emit new event when an object attribute is updated (e.g. when renaming the \"Rating\" attribute to \"Score\" on the company object)",
version: "0.0.1",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
getEventType() {
return "object-attribute.updated";
},
generateMeta(attribute) {
const ts = Date.now();
return {
id: `${attribute.id.attribute_id}-${ts}`,
summary: `New Object Attribute with ID: ${attribute.id.attribute_id}`,
ts: Date.now(),
};
},
},
sampleEmit,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
"event_type": "object-attribute.updated",
"id": {
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
"object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
"attribute_id": "44a18da2-582e-4e65-9349-9b49b9bb7a14"
},
"actor": {
"type": "workspace-member",
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
}
}
Loading