You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)",
7
+
version: "0.0.1",
8
+
type: "action",
9
+
props: {
10
+
openphone,
11
+
},
12
+
asyncrun({ $ }){
13
+
const{ data }=awaitthis.openphone.listPhoneNumbers({
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)",
Copy file name to clipboardExpand all lines: components/openphone/actions/update-contact/update-contact.mjs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ export default {
5
5
key: "openphone-update-contact",
6
6
name: "Update Contact",
7
7
description: "Update an existing contact on OpenPhone. [See the documentation](https://www.openphone.com/docs/api-reference/contacts/update-a-contact-by-id)",
8
-
version: "0.0.1",
8
+
version: "0.0.2",
9
9
type: "action",
10
10
props: {
11
11
openphone,
12
12
contactId: {
13
13
type: "string",
14
14
label: "Contact ID",
15
-
description: "The unique identifier of the contact.",
15
+
description: "The unique identifier of the contact",
Copy file name to clipboardExpand all lines: components/openphone/openphone.app.mjs
+35-17Lines changed: 35 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,12 @@
1
-
import{axios}from"@pipedream/platform";
1
+
import{
2
+
axios,ConfigurationError,
3
+
}from"@pipedream/platform";
4
+
importBottleneckfrom"bottleneck";
5
+
constlimiter=newBottleneck({
6
+
minTime: 100,// 10 requests per seconds (https://www.openphone.com/docs/mdx/api-reference/rate-limits)
7
+
maxConcurrent: 1,
8
+
});
9
+
constaxiosRateLimiter=limiter.wrap(axios);
2
10
3
11
exportdefault{
4
12
type: "app",
@@ -10,51 +18,53 @@ export default {
10
18
description: "The sender's phone number. Can be either your OpenPhone phone number ID or the full phone number in E.164 format.",
11
19
asyncoptions(){
12
20
const{ data }=awaitthis.listPhoneNumbers();
13
-
returndata.map(({
21
+
returndata?.map(({
14
22
id: value, name, formattedNumber,
15
23
})=>({
16
-
label: `${name} - ${formattedNumber}`,
24
+
label: name&&formattedNumber
25
+
? `${name} - ${formattedNumber}`
26
+
: value,
17
27
value,
18
-
}));
28
+
}))||[];
19
29
},
20
30
},
21
31
firstName: {
22
32
type: "string",
23
33
label: "First Name",
24
-
description: "The contact's first name.",
34
+
description: "The contact's first name",
25
35
},
26
36
lastName: {
27
37
type: "string",
28
38
label: "Last Name",
29
-
description: "The contact's last name.",
39
+
description: "The contact's last name",
30
40
optional: true,
31
41
},
32
42
company: {
33
43
type: "string",
34
44
label: "Company",
35
-
description: "The contact's company name.",
45
+
description: "The contact's company name",
36
46
optional: true,
37
47
},
38
48
role: {
39
49
type: "string",
40
50
label: "Role",
41
-
description: "The contact's role.",
51
+
description: "The contact's role",
42
52
optional: true,
43
53
},
44
54
emails: {
45
55
type: "string[]",
46
56
label: "Emails",
47
-
description: "Array of objects of contact's emails. **Example:** `{\"name\": \"Company Email\", \"value\": \"[email protected]\"}`.",
57
+
description: "Array of objects of contact's emails. **Example:** `{\"name\": \"Company Email\", \"value\": \"[email protected]\"}`",
48
58
},
49
59
phoneNumbers: {
50
60
type: "string[]",
51
61
label: "Phone Numbers",
52
-
description: "Array of objects of contact's phone numbers. **Example:** `{\"name\": \"Company Phone\", \"value\": \"+12345678901\"}`.",
62
+
description: "Array of objects of contact's phone numbers. **Example:** `{\"name\": \"Company Phone\", \"value\": \"+12345678901\"}`",
53
63
},
54
64
customFields: {
55
65
type: "string[]",
56
66
label: "Custom Fields",
57
-
description: "Array of objects of custom fields for the contact. **Example:** `{\"key\": \"inbound-lead\", \"value\": \"[\"option1\", \"option2\"]\"}`.",
67
+
description: "Array of objects of custom fields for the contact. **Example:** `{\"key\": \"inbound-lead\", \"value\": [\"option1\", \"option2\"]}`",
Copy file name to clipboardExpand all lines: components/openphone/sources/common/base.mjs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,13 @@ export default {
12
12
],
13
13
type: "string[]",
14
14
label: "Resource IDs",
15
-
description: "The unique identifiers of phone numbers associated with the webhook.",
15
+
description: "The IDs of the incoming or outgoing phone numbers to retrieve events for. Use the List Phone Numbers action to retrieve information about phone numbers.",
0 commit comments