Skip to content

Commit 40c73de

Browse files
Merge branch 'master' into docs/invoke-workflows-for-external-user
2 parents d0032bd + c673fb7 commit 40c73de

File tree

63 files changed

+6095
-827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+6095
-827
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ docs/.vuepress/dist
1616

1717
./package-lock.json
1818
components/**/package-lock.json
19+
/packages/evals/
20+
/packages/sdk/examples/.next/

components/attio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/attio",
3-
"version": "0.1.1",
3+
"version": "0.2.0",
44
"description": "Pipedream Attio Components",
55
"main": "attio.app.mjs",
66
"keywords": [
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import common from "../common/base.mjs";
2+
import sampleEmit from "./test-event.mjs";
3+
4+
export default {
5+
...common,
6+
key: "attio-list-entry-deleted-instant",
7+
name: "List Entry Deleted (Instant)",
8+
description: "Emit new event when a list entry is deleted (i.e. when a record is removed from a list).",
9+
version: "0.0.1",
10+
type: "source",
11+
dedupe: "unique",
12+
props: {
13+
...common.props,
14+
listId: {
15+
propDefinition: [
16+
common.props.attio,
17+
"listId",
18+
],
19+
},
20+
},
21+
methods: {
22+
...common.methods,
23+
getEventType() {
24+
return "list-entry.deleted";
25+
},
26+
getFilter() {
27+
return {
28+
"$and": [
29+
{
30+
field: "id.list_id",
31+
operator: "equals",
32+
value: this.listId,
33+
},
34+
],
35+
};
36+
},
37+
generateMeta(entry) {
38+
return {
39+
id: entry.id.entry_id,
40+
summary: `Deleted Entry with ID: ${entry.id.entry_id}`,
41+
ts: Date.now(),
42+
};
43+
},
44+
},
45+
sampleEmit,
46+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default {
2+
"event_type": "list-entry.deleted",
3+
"id": {
4+
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
5+
"list_id": "dd41a385-c7cd-4832-ad57-c9a824b32ba4",
6+
"entry_id": "7ce64af0-9d4a-4899-88c8-6d74258ca8ef"
7+
},
8+
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
9+
"parent_record_id": "64561036-ee99-47f7-926c-66bf43808dcf",
10+
"actor": {
11+
"type": "api-token",
12+
"id": "76602e62-6767-4975-9e3f-751d5ce80a05"
13+
}
14+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import common from "../common/base.mjs";
2+
import sampleEmit from "./test-event.mjs";
3+
4+
export default {
5+
...common,
6+
key: "attio-list-entry-updated-instant",
7+
name: "List Entry Updated (Instant)",
8+
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\")",
9+
version: "0.0.1",
10+
type: "source",
11+
dedupe: "unique",
12+
props: {
13+
...common.props,
14+
listId: {
15+
propDefinition: [
16+
common.props.attio,
17+
"listId",
18+
],
19+
},
20+
},
21+
methods: {
22+
...common.methods,
23+
getEventType() {
24+
return "list-entry.updated";
25+
},
26+
getFilter() {
27+
return {
28+
"$and": [
29+
{
30+
field: "id.list_id",
31+
operator: "equals",
32+
value: this.listId,
33+
},
34+
],
35+
};
36+
},
37+
generateMeta(entry) {
38+
const ts = Date.now();
39+
return {
40+
id: `${entry.id.entry_id}-${ts}`,
41+
summary: `Updated Entry with ID: ${entry.id.entry_id}`,
42+
ts,
43+
};
44+
},
45+
},
46+
sampleEmit,
47+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default {
2+
"event_type": "list-entry.updated",
3+
"id": {
4+
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
5+
"list_id": "dd41a385-c7cd-4832-ad57-c9a824b32ba4",
6+
"entry_id": "d7b73c9c-5b91-45df-bf3f-677b9bd563eb",
7+
"attribute_id": "82b07502-9c9d-4996-a46f-4a5b687015d5"
8+
},
9+
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
10+
"parent_record_id": "6a3cce50-9589-4f94-be16-8aa0a80c46e1",
11+
"actor": {
12+
"type": "workspace-member",
13+
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
14+
}
15+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import common from "../common/base.mjs";
2+
import sampleEmit from "./test-event.mjs";
3+
4+
export default {
5+
...common,
6+
key: "attio-new-note-instant",
7+
name: "New Note (Instant)",
8+
description: "Emit new event when a new note is created.",
9+
version: "0.0.1",
10+
type: "source",
11+
dedupe: "unique",
12+
methods: {
13+
...common.methods,
14+
getEventType() {
15+
return "note.created";
16+
},
17+
generateMeta(note) {
18+
return {
19+
id: note.id.note_id,
20+
summary: `New Note with ID: ${note.id.note_id}`,
21+
ts: Date.now(),
22+
};
23+
},
24+
},
25+
sampleEmit,
26+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default {
2+
"event_type": "note.created",
3+
"id": {
4+
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
5+
"note_id": "cc2a06ee-61ae-4a9b-bf1b-4e9774270061"
6+
},
7+
"parent_object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
8+
"parent_record_id": "64561036-ee99-47f7-926c-66bf43808dcf",
9+
"actor": {
10+
"type": "workspace-member",
11+
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
12+
}
13+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import common from "../common/base.mjs";
2+
import sampleEmit from "./test-event.mjs";
3+
4+
export default {
5+
...common,
6+
key: "attio-new-object-attribute-instant",
7+
name: "New Object Attribute (Instant)",
8+
description: "Emit new event when an object attribute is created (e.g. when defining a new attribute \"Rating\" on the company object)",
9+
version: "0.0.1",
10+
type: "source",
11+
dedupe: "unique",
12+
methods: {
13+
...common.methods,
14+
getEventType() {
15+
return "object-attribute.created";
16+
},
17+
generateMeta(attribute) {
18+
return {
19+
id: attribute.id.attribute_id,
20+
summary: `New Object Attribute with ID: ${attribute.id.attribute_id}`,
21+
ts: Date.now(),
22+
};
23+
},
24+
},
25+
sampleEmit,
26+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default {
2+
"event_type": "object-attribute.created",
3+
"id": {
4+
"workspace_id": "21e6dc8b-aa9f-4970-bdce-fa207cf3a7d9",
5+
"object_id": "6a3d5e81-0de0-4e96-a535-957b28ba8211",
6+
"attribute_id": "44a18da2-582e-4e65-9349-9b49b9bb7a14"
7+
},
8+
"actor": {
9+
"type": "workspace-member",
10+
"id": "3ccf848d-58e5-4ccb-88d7-d85944eda037"
11+
}
12+
}

0 commit comments

Comments
 (0)