Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -5,7 +5,7 @@ export default {
key: "openphone-create-contact",
name: "Create Contact",
description: "Create a new contact in OpenPhone. [See the documentation](https://www.openphone.com/docs/api-reference/contacts/create-a-contact)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
openphone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "openphone-list-phone-numbers",
name: "List Phone Numbers",
description: "Retrieve the list of phone numbers and users associated with your OpenPhone workspace. [See the documentation](https://www.openphone.com/docs/mdx/api-reference/phone-numbers/list-phone-numbers)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
openphone,
Expand Down
2 changes: 1 addition & 1 deletion components/openphone/actions/send-message/send-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "openphone-send-message",
name: "Send a Text Message",
description: "Send a text message from your OpenPhone number to a recipient. [See the documentation](https://www.openphone.com/docs/api-reference/messages/send-a-text-message)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
openphone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "openphone-update-contact",
name: "Update Contact",
description: "Update an existing contact on OpenPhone. [See the documentation](https://www.openphone.com/docs/api-reference/contacts/update-a-contact-by-id)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
openphone,
Expand Down
6 changes: 4 additions & 2 deletions components/openphone/openphone.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ export default {
...opts,
});
},
createWebhook(opts = {}) {
createWebhook({
webhookType, ...opts
}) {
return this._makeRequest({
method: "POST",
path: "/webhooks/calls",
path: `/webhooks/${webhookType}`,
...opts,
});
},
Expand Down
2 changes: 1 addition & 1 deletion components/openphone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/openphone",
"version": "0.2.0",
"version": "0.3.0",
"description": "Pipedream OpenPhone Components",
"main": "openphone.app.mjs",
"keywords": [
Expand Down
4 changes: 4 additions & 0 deletions components/openphone/sources/common/base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default {
getEventFilter() {
return true;
},
getWebhookType() {
return "calls";
},
},
hooks: {
async activate() {
Expand All @@ -42,6 +45,7 @@ export default {
resourceIds: this.resourceIds,
label: this.label,
},
webhookType: this.getWebhookType(),
});
this._setHookId(response.data.id);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "openphone-new-call-recording-completed-instant",
name: "New Call Recording Completed (Instant)",
description: "Emit new event when a call recording has finished.",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
methods: {
Expand All @@ -16,7 +16,7 @@ export default {
"call.recording.completed",
];
},
getEmit(body) {
getSummary(body) {
return `New call recording completed for call ID: ${body.data.object.id}`;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "openphone-new-incoming-call-completed-instant",
name: "New Incoming Call Completed (Instant)",
description: "Emit new event when an incoming call is completed, including calls not picked up or voicemails left.",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
methods: {
Expand Down
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: "openphone-new-message-received-instant",
name: "New Message Received (Instant)",
description: "Emit new event when a new message is received",
version: "0.0.1",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
getEvent() {
return [
"message.received",
];
},
getSummary() {
return "New Message Received";
},
getWebhookType() {
return "messages";
},
},
sampleEmit,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default {
"id": "",
"object": "event",
"apiVersion": "v4",
"createdAt": "2025-04-10T21:41:01.247Z",
"type": "message.received",
"data": {
"object": {
"id": "",
"object": "message",
"from": "",
"to": "",
"direction": "incoming",
"text": "test",
"status": "received",
"createdAt": "2025-04-10T21:41:00.983Z",
"userId": "",
"phoneNumberId": ""
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "openphone-new-outgoing-call-completed-instant",
name: "New Outgoing Call Completed (Instant)",
description: "Emit new event when an outgoing call has ended.",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
methods: {
Expand Down
9 changes: 3 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading