universal-mcp-applications 0.1.30__py3-none-any.whl → 0.1.36rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/ahrefs/app.py +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +33 -100
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/app.py +6 -17
- universal_mcp/applications/falai/app.py +23 -100
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +88 -188
- universal_mcp/applications/google_drive/app.py +140 -462
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +101 -578
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +9 -2
- universal_mcp/applications/linkedin/app.py +392 -212
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +14 -36
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +16 -76
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +216 -102
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +15 -37
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +50 -101
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -105
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from universal_mcp.applications.application import APIApplication
|
|
4
3
|
from universal_mcp.integrations import Integration
|
|
5
4
|
|
|
@@ -9,9 +8,7 @@ class DialpadApp(APIApplication):
|
|
|
9
8
|
super().__init__(name="dialpad", integration=integration, **kwargs)
|
|
10
9
|
self.base_url = "https://dialpad.com/api/v2"
|
|
11
10
|
|
|
12
|
-
def accesscontrolpolicies_assign(
|
|
13
|
-
self, id, target_id=None, target_type=None, user_id=None
|
|
14
|
-
) -> dict[str, Any]:
|
|
11
|
+
async def accesscontrolpolicies_assign(self, id, target_id=None, target_type=None, user_id=None) -> dict[str, Any]:
|
|
15
12
|
"""
|
|
16
13
|
Assigns an access control policy to a target entity using the provided policy ID and returns a success status.
|
|
17
14
|
|
|
@@ -29,11 +26,7 @@ class DialpadApp(APIApplication):
|
|
|
29
26
|
"""
|
|
30
27
|
if id is None:
|
|
31
28
|
raise ValueError("Missing required parameter 'id'")
|
|
32
|
-
request_body = {
|
|
33
|
-
"target_id": target_id,
|
|
34
|
-
"target_type": target_type,
|
|
35
|
-
"user_id": user_id,
|
|
36
|
-
}
|
|
29
|
+
request_body = {"target_id": target_id, "target_type": target_type, "user_id": user_id}
|
|
37
30
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
38
31
|
url = f"{self.base_url}/api/v2/accesscontrolpolicies/{id}/assign"
|
|
39
32
|
query_params = {}
|
|
@@ -41,7 +34,7 @@ class DialpadApp(APIApplication):
|
|
|
41
34
|
response.raise_for_status()
|
|
42
35
|
return response.json()
|
|
43
36
|
|
|
44
|
-
def accesscontrolpolicies_list(self, cursor=None) -> dict[str, Any]:
|
|
37
|
+
async def accesscontrolpolicies_list(self, cursor=None) -> dict[str, Any]:
|
|
45
38
|
"""
|
|
46
39
|
Retrieves a list of access control policies using the "GET" method, optionally paginating results with a cursor parameter.
|
|
47
40
|
|
|
@@ -60,13 +53,8 @@ class DialpadApp(APIApplication):
|
|
|
60
53
|
response.raise_for_status()
|
|
61
54
|
return response.json()
|
|
62
55
|
|
|
63
|
-
def accesscontrolpolicies_create(
|
|
64
|
-
self,
|
|
65
|
-
description=None,
|
|
66
|
-
name=None,
|
|
67
|
-
owner_id=None,
|
|
68
|
-
permission_sets=None,
|
|
69
|
-
target_type=None,
|
|
56
|
+
async def accesscontrolpolicies_create(
|
|
57
|
+
self, description=None, name=None, owner_id=None, permission_sets=None, target_type=None
|
|
70
58
|
) -> dict[str, Any]:
|
|
71
59
|
"""
|
|
72
60
|
Creates a new access control policy using JSON data and returns a successful response upon completion.
|
|
@@ -102,7 +90,7 @@ class DialpadApp(APIApplication):
|
|
|
102
90
|
response.raise_for_status()
|
|
103
91
|
return response.json()
|
|
104
92
|
|
|
105
|
-
def accesscontrolpolicies_delete(self, id) -> dict[str, Any]:
|
|
93
|
+
async def accesscontrolpolicies_delete(self, id) -> dict[str, Any]:
|
|
106
94
|
"""
|
|
107
95
|
Deletes the specified access control policy identified by the provided ID.
|
|
108
96
|
|
|
@@ -123,7 +111,7 @@ class DialpadApp(APIApplication):
|
|
|
123
111
|
response.raise_for_status()
|
|
124
112
|
return response.json()
|
|
125
113
|
|
|
126
|
-
def accesscontrolpolicies_get(self, id) -> dict[str, Any]:
|
|
114
|
+
async def accesscontrolpolicies_get(self, id) -> dict[str, Any]:
|
|
127
115
|
"""
|
|
128
116
|
Retrieves a specific access control policy by its ID using the GET method.
|
|
129
117
|
|
|
@@ -144,14 +132,8 @@ class DialpadApp(APIApplication):
|
|
|
144
132
|
response.raise_for_status()
|
|
145
133
|
return response.json()
|
|
146
134
|
|
|
147
|
-
def accesscontrolpolicies_update(
|
|
148
|
-
self,
|
|
149
|
-
id,
|
|
150
|
-
description=None,
|
|
151
|
-
name=None,
|
|
152
|
-
permission_sets=None,
|
|
153
|
-
state=None,
|
|
154
|
-
user_id=None,
|
|
135
|
+
async def accesscontrolpolicies_update(
|
|
136
|
+
self, id, description=None, name=None, permission_sets=None, state=None, user_id=None
|
|
155
137
|
) -> dict[str, Any]:
|
|
156
138
|
"""
|
|
157
139
|
Partially updates an existing access control policy by its ID using a JSON payload.
|
|
@@ -176,13 +158,7 @@ class DialpadApp(APIApplication):
|
|
|
176
158
|
"""
|
|
177
159
|
if id is None:
|
|
178
160
|
raise ValueError("Missing required parameter 'id'")
|
|
179
|
-
request_body = {
|
|
180
|
-
"description": description,
|
|
181
|
-
"name": name,
|
|
182
|
-
"permission_sets": permission_sets,
|
|
183
|
-
"state": state,
|
|
184
|
-
"user_id": user_id,
|
|
185
|
-
}
|
|
161
|
+
request_body = {"description": description, "name": name, "permission_sets": permission_sets, "state": state, "user_id": user_id}
|
|
186
162
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
187
163
|
url = f"{self.base_url}/api/v2/accesscontrolpolicies/{id}"
|
|
188
164
|
query_params = {}
|
|
@@ -190,7 +166,7 @@ class DialpadApp(APIApplication):
|
|
|
190
166
|
response.raise_for_status()
|
|
191
167
|
return response.json()
|
|
192
168
|
|
|
193
|
-
def accesscontrolpolicies_assignments(self, id, cursor=None) -> dict[str, Any]:
|
|
169
|
+
async def accesscontrolpolicies_assignments(self, id, cursor=None) -> dict[str, Any]:
|
|
194
170
|
"""
|
|
195
171
|
Retrieves the assignments of an access control policy identified by the specified ID.
|
|
196
172
|
|
|
@@ -212,9 +188,7 @@ class DialpadApp(APIApplication):
|
|
|
212
188
|
response.raise_for_status()
|
|
213
189
|
return response.json()
|
|
214
190
|
|
|
215
|
-
def accesscontrolpolicies_unassign(
|
|
216
|
-
self, id, target_id=None, target_type=None, unassign_all=None, user_id=None
|
|
217
|
-
) -> dict[str, Any]:
|
|
191
|
+
async def accesscontrolpolicies_unassign(self, id, target_id=None, target_type=None, unassign_all=None, user_id=None) -> dict[str, Any]:
|
|
218
192
|
"""
|
|
219
193
|
Unassigns an access control policy from a specified ID using a POST request, allowing for the removal of policy assignments based on the provided ID.
|
|
220
194
|
|
|
@@ -233,12 +207,7 @@ class DialpadApp(APIApplication):
|
|
|
233
207
|
"""
|
|
234
208
|
if id is None:
|
|
235
209
|
raise ValueError("Missing required parameter 'id'")
|
|
236
|
-
request_body = {
|
|
237
|
-
"target_id": target_id,
|
|
238
|
-
"target_type": target_type,
|
|
239
|
-
"unassign_all": unassign_all,
|
|
240
|
-
"user_id": user_id,
|
|
241
|
-
}
|
|
210
|
+
request_body = {"target_id": target_id, "target_type": target_type, "unassign_all": unassign_all, "user_id": user_id}
|
|
242
211
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
243
212
|
url = f"{self.base_url}/api/v2/accesscontrolpolicies/{id}/unassign"
|
|
244
213
|
query_params = {}
|
|
@@ -246,7 +215,7 @@ class DialpadApp(APIApplication):
|
|
|
246
215
|
response.raise_for_status()
|
|
247
216
|
return response.json()
|
|
248
217
|
|
|
249
|
-
def app_settings_get(self, target_id=None, target_type=None) -> dict[str, Any]:
|
|
218
|
+
async def app_settings_get(self, target_id=None, target_type=None) -> dict[str, Any]:
|
|
250
219
|
"""
|
|
251
220
|
Retrieves application settings using the provided target ID and type from version 2 of the API.
|
|
252
221
|
|
|
@@ -261,16 +230,12 @@ class DialpadApp(APIApplication):
|
|
|
261
230
|
app
|
|
262
231
|
"""
|
|
263
232
|
url = f"{self.base_url}/api/v2/app/settings"
|
|
264
|
-
query_params = {
|
|
265
|
-
k: v
|
|
266
|
-
for k, v in [("target_id", target_id), ("target_type", target_type)]
|
|
267
|
-
if v is not None
|
|
268
|
-
}
|
|
233
|
+
query_params = {k: v for k, v in [("target_id", target_id), ("target_type", target_type)] if v is not None}
|
|
269
234
|
response = self._get(url, params=query_params)
|
|
270
235
|
response.raise_for_status()
|
|
271
236
|
return response.json()
|
|
272
237
|
|
|
273
|
-
def blockednumbers_add(self, numbers=None) -> Any:
|
|
238
|
+
async def blockednumbers_add(self, numbers=None) -> Any:
|
|
274
239
|
"""
|
|
275
240
|
Adds a phone number to the blocked numbers list using a JSON-formatted request body and returns a success status.
|
|
276
241
|
|
|
@@ -283,9 +248,7 @@ class DialpadApp(APIApplication):
|
|
|
283
248
|
Tags:
|
|
284
249
|
blockednumbers
|
|
285
250
|
"""
|
|
286
|
-
request_body = {
|
|
287
|
-
"numbers": numbers,
|
|
288
|
-
}
|
|
251
|
+
request_body = {"numbers": numbers}
|
|
289
252
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
290
253
|
url = f"{self.base_url}/api/v2/blockednumbers/add"
|
|
291
254
|
query_params = {}
|
|
@@ -293,7 +256,7 @@ class DialpadApp(APIApplication):
|
|
|
293
256
|
response.raise_for_status()
|
|
294
257
|
return response.json()
|
|
295
258
|
|
|
296
|
-
def blockednumbers_get(self, number) -> dict[str, Any]:
|
|
259
|
+
async def blockednumbers_get(self, number) -> dict[str, Any]:
|
|
297
260
|
"""
|
|
298
261
|
Retrieves information about a specific blocked number identified by the given number parameter.
|
|
299
262
|
|
|
@@ -314,7 +277,7 @@ class DialpadApp(APIApplication):
|
|
|
314
277
|
response.raise_for_status()
|
|
315
278
|
return response.json()
|
|
316
279
|
|
|
317
|
-
def blockednumbers_remove(self, numbers=None) -> Any:
|
|
280
|
+
async def blockednumbers_remove(self, numbers=None) -> Any:
|
|
318
281
|
"""
|
|
319
282
|
Removes a blocked number using the POST method, sending data in JSON format to the defined API endpoint and returns a status response.
|
|
320
283
|
|
|
@@ -327,9 +290,7 @@ class DialpadApp(APIApplication):
|
|
|
327
290
|
Tags:
|
|
328
291
|
blockednumbers
|
|
329
292
|
"""
|
|
330
|
-
request_body = {
|
|
331
|
-
"numbers": numbers,
|
|
332
|
-
}
|
|
293
|
+
request_body = {"numbers": numbers}
|
|
333
294
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
334
295
|
url = f"{self.base_url}/api/v2/blockednumbers/remove"
|
|
335
296
|
query_params = {}
|
|
@@ -337,7 +298,7 @@ class DialpadApp(APIApplication):
|
|
|
337
298
|
response.raise_for_status()
|
|
338
299
|
return response.json()
|
|
339
300
|
|
|
340
|
-
def blockednumbers_list(self, cursor=None) -> dict[str, Any]:
|
|
301
|
+
async def blockednumbers_list(self, cursor=None) -> dict[str, Any]:
|
|
341
302
|
"""
|
|
342
303
|
Retrieves a list of blocked numbers using the provided cursor for pagination.
|
|
343
304
|
|
|
@@ -356,7 +317,7 @@ class DialpadApp(APIApplication):
|
|
|
356
317
|
response.raise_for_status()
|
|
357
318
|
return response.json()
|
|
358
319
|
|
|
359
|
-
def call_participants_add(self, id, participant=None) -> dict[str, Any]:
|
|
320
|
+
async def call_participants_add(self, id, participant=None) -> dict[str, Any]:
|
|
360
321
|
"""
|
|
361
322
|
Adds participants to a call using the provided call ID.
|
|
362
323
|
|
|
@@ -372,9 +333,7 @@ class DialpadApp(APIApplication):
|
|
|
372
333
|
"""
|
|
373
334
|
if id is None:
|
|
374
335
|
raise ValueError("Missing required parameter 'id'")
|
|
375
|
-
request_body = {
|
|
376
|
-
"participant": participant,
|
|
377
|
-
}
|
|
336
|
+
request_body = {"participant": participant}
|
|
378
337
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
379
338
|
url = f"{self.base_url}/api/v2/call/{id}/participants/add"
|
|
380
339
|
query_params = {}
|
|
@@ -382,7 +341,7 @@ class DialpadApp(APIApplication):
|
|
|
382
341
|
response.raise_for_status()
|
|
383
342
|
return response.json()
|
|
384
343
|
|
|
385
|
-
def call_get_call_info(self, id) -> dict[str, Any]:
|
|
344
|
+
async def call_get_call_info(self, id) -> dict[str, Any]:
|
|
386
345
|
"""
|
|
387
346
|
Retrieves details of a call resource by its unique identifier.
|
|
388
347
|
|
|
@@ -403,13 +362,8 @@ class DialpadApp(APIApplication):
|
|
|
403
362
|
response.raise_for_status()
|
|
404
363
|
return response.json()
|
|
405
364
|
|
|
406
|
-
def call_initiate_ivr_call(
|
|
407
|
-
self,
|
|
408
|
-
custom_data=None,
|
|
409
|
-
outbound_caller_id=None,
|
|
410
|
-
phone_number=None,
|
|
411
|
-
target_id=None,
|
|
412
|
-
target_type=None,
|
|
365
|
+
async def call_initiate_ivr_call(
|
|
366
|
+
self, custom_data=None, outbound_caller_id=None, phone_number=None, target_id=None, target_type=None
|
|
413
367
|
) -> dict[str, Any]:
|
|
414
368
|
"""
|
|
415
369
|
Initiates an outbound call to ring an IVR workflow by sending a POST request and returns a confirmation upon success[1].
|
|
@@ -441,14 +395,7 @@ class DialpadApp(APIApplication):
|
|
|
441
395
|
response.raise_for_status()
|
|
442
396
|
return response.json()
|
|
443
397
|
|
|
444
|
-
def call_list(
|
|
445
|
-
self,
|
|
446
|
-
cursor=None,
|
|
447
|
-
started_after=None,
|
|
448
|
-
started_before=None,
|
|
449
|
-
target_id=None,
|
|
450
|
-
target_type=None,
|
|
451
|
-
) -> dict[str, Any]:
|
|
398
|
+
async def call_list(self, cursor=None, started_after=None, started_before=None, target_id=None, target_type=None) -> dict[str, Any]:
|
|
452
399
|
"""
|
|
453
400
|
Retrieves a list of calls using the provided query parameters for filtering by cursor, start time, end time, target ID, and target type, and returns the results.
|
|
454
401
|
|
|
@@ -481,7 +428,7 @@ class DialpadApp(APIApplication):
|
|
|
481
428
|
response.raise_for_status()
|
|
482
429
|
return response.json()
|
|
483
430
|
|
|
484
|
-
def call_call(
|
|
431
|
+
async def call_call(
|
|
485
432
|
self,
|
|
486
433
|
custom_data=None,
|
|
487
434
|
device_id=None,
|
|
@@ -530,9 +477,7 @@ class DialpadApp(APIApplication):
|
|
|
530
477
|
response.raise_for_status()
|
|
531
478
|
return response.json()
|
|
532
479
|
|
|
533
|
-
def call_transfer_call(
|
|
534
|
-
self, id, custom_data=None, to=None, transfer_state=None
|
|
535
|
-
) -> dict[str, Any]:
|
|
480
|
+
async def call_transfer_call(self, id, custom_data=None, to=None, transfer_state=None) -> dict[str, Any]:
|
|
536
481
|
"""
|
|
537
482
|
Transfers a call identified by the provided ID using the POST method, sending the request body in JSON format.
|
|
538
483
|
|
|
@@ -551,11 +496,7 @@ class DialpadApp(APIApplication):
|
|
|
551
496
|
"""
|
|
552
497
|
if id is None:
|
|
553
498
|
raise ValueError("Missing required parameter 'id'")
|
|
554
|
-
request_body = {
|
|
555
|
-
"custom_data": custom_data,
|
|
556
|
-
"to": to,
|
|
557
|
-
"transfer_state": transfer_state,
|
|
558
|
-
}
|
|
499
|
+
request_body = {"custom_data": custom_data, "to": to, "transfer_state": transfer_state}
|
|
559
500
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
560
501
|
url = f"{self.base_url}/api/v2/call/{id}/transfer"
|
|
561
502
|
query_params = {}
|
|
@@ -563,7 +504,7 @@ class DialpadApp(APIApplication):
|
|
|
563
504
|
response.raise_for_status()
|
|
564
505
|
return response.json()
|
|
565
506
|
|
|
566
|
-
def call_unpark(self, id, user_id=None) -> dict[str, Any]:
|
|
507
|
+
async def call_unpark(self, id, user_id=None) -> dict[str, Any]:
|
|
567
508
|
"""
|
|
568
509
|
Unparks a call with the specified ID using the POST method.
|
|
569
510
|
|
|
@@ -579,9 +520,7 @@ class DialpadApp(APIApplication):
|
|
|
579
520
|
"""
|
|
580
521
|
if id is None:
|
|
581
522
|
raise ValueError("Missing required parameter 'id'")
|
|
582
|
-
request_body = {
|
|
583
|
-
"user_id": user_id,
|
|
584
|
-
}
|
|
523
|
+
request_body = {"user_id": user_id}
|
|
585
524
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
586
525
|
url = f"{self.base_url}/api/v2/call/{id}/unpark"
|
|
587
526
|
query_params = {}
|
|
@@ -589,7 +528,7 @@ class DialpadApp(APIApplication):
|
|
|
589
528
|
response.raise_for_status()
|
|
590
529
|
return response.json()
|
|
591
530
|
|
|
592
|
-
def call_actions_hangup(self, id) -> Any:
|
|
531
|
+
async def call_actions_hangup(self, id) -> Any:
|
|
593
532
|
"""
|
|
594
533
|
Hangs up a call with the specified ID using the PUT method.
|
|
595
534
|
|
|
@@ -610,7 +549,7 @@ class DialpadApp(APIApplication):
|
|
|
610
549
|
response.raise_for_status()
|
|
611
550
|
return response.json()
|
|
612
551
|
|
|
613
|
-
def call_put_call_labels(self, id, labels=None) -> dict[str, Any]:
|
|
552
|
+
async def call_put_call_labels(self, id, labels=None) -> dict[str, Any]:
|
|
614
553
|
"""
|
|
615
554
|
Updates the labels of a call with the specified ID using the provided JSON data.
|
|
616
555
|
|
|
@@ -626,9 +565,7 @@ class DialpadApp(APIApplication):
|
|
|
626
565
|
"""
|
|
627
566
|
if id is None:
|
|
628
567
|
raise ValueError("Missing required parameter 'id'")
|
|
629
|
-
request_body = {
|
|
630
|
-
"labels": labels,
|
|
631
|
-
}
|
|
568
|
+
request_body = {"labels": labels}
|
|
632
569
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
633
570
|
url = f"{self.base_url}/api/v2/call/{id}/labels"
|
|
634
571
|
query_params = {}
|
|
@@ -636,7 +573,7 @@ class DialpadApp(APIApplication):
|
|
|
636
573
|
response.raise_for_status()
|
|
637
574
|
return response.json()
|
|
638
575
|
|
|
639
|
-
def call_callback(self, call_center_id=None, phone_number=None) -> dict[str, Any]:
|
|
576
|
+
async def call_callback(self, call_center_id=None, phone_number=None) -> dict[str, Any]:
|
|
640
577
|
"""
|
|
641
578
|
Registers a callback endpoint using a POST request to the "/api/v2/callback" path, accepting a JSON payload in the request body, and returns a successful response upon registration.
|
|
642
579
|
|
|
@@ -650,10 +587,7 @@ class DialpadApp(APIApplication):
|
|
|
650
587
|
Tags:
|
|
651
588
|
callback
|
|
652
589
|
"""
|
|
653
|
-
request_body = {
|
|
654
|
-
"call_center_id": call_center_id,
|
|
655
|
-
"phone_number": phone_number,
|
|
656
|
-
}
|
|
590
|
+
request_body = {"call_center_id": call_center_id, "phone_number": phone_number}
|
|
657
591
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
658
592
|
url = f"{self.base_url}/api/v2/callback"
|
|
659
593
|
query_params = {}
|
|
@@ -661,9 +595,7 @@ class DialpadApp(APIApplication):
|
|
|
661
595
|
response.raise_for_status()
|
|
662
596
|
return response.json()
|
|
663
597
|
|
|
664
|
-
def call_validate_callback(
|
|
665
|
-
self, call_center_id=None, phone_number=None
|
|
666
|
-
) -> dict[str, Any]:
|
|
598
|
+
async def call_validate_callback(self, call_center_id=None, phone_number=None) -> dict[str, Any]:
|
|
667
599
|
"""
|
|
668
600
|
Validates a callback using the provided JSON data and returns a success response if the validation is successful.
|
|
669
601
|
|
|
@@ -677,10 +609,7 @@ class DialpadApp(APIApplication):
|
|
|
677
609
|
Tags:
|
|
678
610
|
callback
|
|
679
611
|
"""
|
|
680
|
-
request_body = {
|
|
681
|
-
"call_center_id": call_center_id,
|
|
682
|
-
"phone_number": phone_number,
|
|
683
|
-
}
|
|
612
|
+
request_body = {"call_center_id": call_center_id, "phone_number": phone_number}
|
|
684
613
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
685
614
|
url = f"{self.base_url}/api/v2/callback/validate"
|
|
686
615
|
query_params = {}
|
|
@@ -688,9 +617,7 @@ class DialpadApp(APIApplication):
|
|
|
688
617
|
response.raise_for_status()
|
|
689
618
|
return response.json()
|
|
690
619
|
|
|
691
|
-
def callcenters_listall(
|
|
692
|
-
self, cursor=None, office_id=None, name_search=None
|
|
693
|
-
) -> dict[str, Any]:
|
|
620
|
+
async def callcenters_listall(self, cursor=None, office_id=None, name_search=None) -> dict[str, Any]:
|
|
694
621
|
"""
|
|
695
622
|
Retrieves a list of call centers using the specified query parameters, such as cursor for pagination, office_id for filtering by office, and name_search for searching by name.
|
|
696
623
|
|
|
@@ -706,20 +633,12 @@ class DialpadApp(APIApplication):
|
|
|
706
633
|
callcenters
|
|
707
634
|
"""
|
|
708
635
|
url = f"{self.base_url}/api/v2/callcenters"
|
|
709
|
-
query_params = {
|
|
710
|
-
k: v
|
|
711
|
-
for k, v in [
|
|
712
|
-
("cursor", cursor),
|
|
713
|
-
("office_id", office_id),
|
|
714
|
-
("name_search", name_search),
|
|
715
|
-
]
|
|
716
|
-
if v is not None
|
|
717
|
-
}
|
|
636
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("office_id", office_id), ("name_search", name_search)] if v is not None}
|
|
718
637
|
response = self._get(url, params=query_params)
|
|
719
638
|
response.raise_for_status()
|
|
720
639
|
return response.json()
|
|
721
640
|
|
|
722
|
-
def callcenters_create(
|
|
641
|
+
async def callcenters_create(
|
|
723
642
|
self,
|
|
724
643
|
advanced_settings=None,
|
|
725
644
|
alerts=None,
|
|
@@ -795,7 +714,7 @@ class DialpadApp(APIApplication):
|
|
|
795
714
|
response.raise_for_status()
|
|
796
715
|
return response.json()
|
|
797
716
|
|
|
798
|
-
def callcenters_delete(self, id) -> dict[str, Any]:
|
|
717
|
+
async def callcenters_delete(self, id) -> dict[str, Any]:
|
|
799
718
|
"""
|
|
800
719
|
Deletes a call center identified by the specified ID.
|
|
801
720
|
|
|
@@ -816,7 +735,7 @@ class DialpadApp(APIApplication):
|
|
|
816
735
|
response.raise_for_status()
|
|
817
736
|
return response.json()
|
|
818
737
|
|
|
819
|
-
def callcenters_get(self, id) -> dict[str, Any]:
|
|
738
|
+
async def callcenters_get(self, id) -> dict[str, Any]:
|
|
820
739
|
"""
|
|
821
740
|
Retrieves details for the specified call center identified by its unique ID.
|
|
822
741
|
|
|
@@ -837,7 +756,7 @@ class DialpadApp(APIApplication):
|
|
|
837
756
|
response.raise_for_status()
|
|
838
757
|
return response.json()
|
|
839
758
|
|
|
840
|
-
def callcenters_update(
|
|
759
|
+
async def callcenters_update(
|
|
841
760
|
self,
|
|
842
761
|
id,
|
|
843
762
|
advanced_settings=None,
|
|
@@ -914,7 +833,7 @@ class DialpadApp(APIApplication):
|
|
|
914
833
|
response.raise_for_status()
|
|
915
834
|
return response.json()
|
|
916
835
|
|
|
917
|
-
def callcenters_status(self, id) -> dict[str, Any]:
|
|
836
|
+
async def callcenters_status(self, id) -> dict[str, Any]:
|
|
918
837
|
"""
|
|
919
838
|
Retrieves the status of a call center identified by the provided ID.
|
|
920
839
|
|
|
@@ -935,7 +854,7 @@ class DialpadApp(APIApplication):
|
|
|
935
854
|
response.raise_for_status()
|
|
936
855
|
return response.json()
|
|
937
856
|
|
|
938
|
-
def callcenters_operators_get_dutystatus(self, id) -> dict[str, Any]:
|
|
857
|
+
async def callcenters_operators_get_dutystatus(self, id) -> dict[str, Any]:
|
|
939
858
|
"""
|
|
940
859
|
Retrieves the duty status of a specific call center operator identified by the provided ID.
|
|
941
860
|
|
|
@@ -956,9 +875,7 @@ class DialpadApp(APIApplication):
|
|
|
956
875
|
response.raise_for_status()
|
|
957
876
|
return response.json()
|
|
958
877
|
|
|
959
|
-
def callcenters_operators_dutystatus(
|
|
960
|
-
self, id, duty_status_reason=None, on_duty=None
|
|
961
|
-
) -> dict[str, Any]:
|
|
878
|
+
async def callcenters_operators_dutystatus(self, id, duty_status_reason=None, on_duty=None) -> dict[str, Any]:
|
|
962
879
|
"""
|
|
963
880
|
Updates the duty status of a call center operator with the specified ID using the PATCH method and returns a 200 OK response upon success.
|
|
964
881
|
|
|
@@ -977,10 +894,7 @@ class DialpadApp(APIApplication):
|
|
|
977
894
|
"""
|
|
978
895
|
if id is None:
|
|
979
896
|
raise ValueError("Missing required parameter 'id'")
|
|
980
|
-
request_body = {
|
|
981
|
-
"duty_status_reason": duty_status_reason,
|
|
982
|
-
"on_duty": on_duty,
|
|
983
|
-
}
|
|
897
|
+
request_body = {"duty_status_reason": duty_status_reason, "on_duty": on_duty}
|
|
984
898
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
985
899
|
url = f"{self.base_url}/api/v2/callcenters/operators/{id}/dutystatus"
|
|
986
900
|
query_params = {}
|
|
@@ -988,9 +902,7 @@ class DialpadApp(APIApplication):
|
|
|
988
902
|
response.raise_for_status()
|
|
989
903
|
return response.json()
|
|
990
904
|
|
|
991
|
-
def callcenters_operators_get_skilllevel(
|
|
992
|
-
self, call_center_id, user_id
|
|
993
|
-
) -> dict[str, Any]:
|
|
905
|
+
async def callcenters_operators_get_skilllevel(self, call_center_id, user_id) -> dict[str, Any]:
|
|
994
906
|
"""
|
|
995
907
|
Retrieves the skill information for a specific operator associated with a given call center.
|
|
996
908
|
|
|
@@ -1014,9 +926,7 @@ class DialpadApp(APIApplication):
|
|
|
1014
926
|
response.raise_for_status()
|
|
1015
927
|
return response.json()
|
|
1016
928
|
|
|
1017
|
-
def callcenters_operators_skilllevel(
|
|
1018
|
-
self, call_center_id, user_id, skill_level=None
|
|
1019
|
-
) -> dict[str, Any]:
|
|
929
|
+
async def callcenters_operators_skilllevel(self, call_center_id, user_id, skill_level=None) -> dict[str, Any]:
|
|
1020
930
|
"""
|
|
1021
931
|
Updates the skill information for a specific operator in a call center using the PATCH method, requiring a JSON payload with the updated details.
|
|
1022
932
|
|
|
@@ -1035,9 +945,7 @@ class DialpadApp(APIApplication):
|
|
|
1035
945
|
raise ValueError("Missing required parameter 'call_center_id'")
|
|
1036
946
|
if user_id is None:
|
|
1037
947
|
raise ValueError("Missing required parameter 'user_id'")
|
|
1038
|
-
request_body = {
|
|
1039
|
-
"skill_level": skill_level,
|
|
1040
|
-
}
|
|
948
|
+
request_body = {"skill_level": skill_level}
|
|
1041
949
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1042
950
|
url = f"{self.base_url}/api/v2/callcenters/{call_center_id}/operators/{user_id}/skill"
|
|
1043
951
|
query_params = {}
|
|
@@ -1045,7 +953,7 @@ class DialpadApp(APIApplication):
|
|
|
1045
953
|
response.raise_for_status()
|
|
1046
954
|
return response.json()
|
|
1047
955
|
|
|
1048
|
-
def callcenters_operators_delete(self, id, user_id=None) -> dict[str, Any]:
|
|
956
|
+
async def callcenters_operators_delete(self, id, user_id=None) -> dict[str, Any]:
|
|
1049
957
|
"""
|
|
1050
958
|
Deletes an operator associated with a specific call center identified by the provided ID.
|
|
1051
959
|
|
|
@@ -1061,9 +969,7 @@ class DialpadApp(APIApplication):
|
|
|
1061
969
|
"""
|
|
1062
970
|
if id is None:
|
|
1063
971
|
raise ValueError("Missing required parameter 'id'")
|
|
1064
|
-
request_body = {
|
|
1065
|
-
"user_id": user_id,
|
|
1066
|
-
}
|
|
972
|
+
request_body = {"user_id": user_id}
|
|
1067
973
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1068
974
|
url = f"{self.base_url}/api/v2/callcenters/{id}/operators"
|
|
1069
975
|
query_params = {}
|
|
@@ -1071,7 +977,7 @@ class DialpadApp(APIApplication):
|
|
|
1071
977
|
response.raise_for_status()
|
|
1072
978
|
return response.json()
|
|
1073
979
|
|
|
1074
|
-
def callcenters_operators_get(self, id) -> dict[str, Any]:
|
|
980
|
+
async def callcenters_operators_get(self, id) -> dict[str, Any]:
|
|
1075
981
|
"""
|
|
1076
982
|
Retrieves the list of operators associated with the specified call center by its ID.
|
|
1077
983
|
|
|
@@ -1092,14 +998,8 @@ class DialpadApp(APIApplication):
|
|
|
1092
998
|
response.raise_for_status()
|
|
1093
999
|
return response.json()
|
|
1094
1000
|
|
|
1095
|
-
def callcenters_operators_post(
|
|
1096
|
-
self,
|
|
1097
|
-
id,
|
|
1098
|
-
keep_paid_numbers=None,
|
|
1099
|
-
license_type=None,
|
|
1100
|
-
role=None,
|
|
1101
|
-
skill_level=None,
|
|
1102
|
-
user_id=None,
|
|
1001
|
+
async def callcenters_operators_post(
|
|
1002
|
+
self, id, keep_paid_numbers=None, license_type=None, role=None, skill_level=None, user_id=None
|
|
1103
1003
|
) -> dict[str, Any]:
|
|
1104
1004
|
"""
|
|
1105
1005
|
Adds a new operator to the call center specified by the given ID using a JSON request body.
|
|
@@ -1137,7 +1037,7 @@ class DialpadApp(APIApplication):
|
|
|
1137
1037
|
response.raise_for_status()
|
|
1138
1038
|
return response.json()
|
|
1139
1039
|
|
|
1140
|
-
def calllabel_list(self, limit=None) -> dict[str, Any]:
|
|
1040
|
+
async def calllabel_list(self, limit=None) -> dict[str, Any]:
|
|
1141
1041
|
"""
|
|
1142
1042
|
Retrieves a list of call labels, optionally limited by the specified number of results.
|
|
1143
1043
|
|
|
@@ -1156,9 +1056,7 @@ class DialpadApp(APIApplication):
|
|
|
1156
1056
|
response.raise_for_status()
|
|
1157
1057
|
return response.json()
|
|
1158
1058
|
|
|
1159
|
-
def call_review_share_link_create(
|
|
1160
|
-
self, call_id=None, privacy=None
|
|
1161
|
-
) -> dict[str, Any]:
|
|
1059
|
+
async def call_review_share_link_create(self, call_id=None, privacy=None) -> dict[str, Any]:
|
|
1162
1060
|
"""
|
|
1163
1061
|
Creates a shareable link for a call review, returning the generated link upon successful creation.
|
|
1164
1062
|
|
|
@@ -1172,10 +1070,7 @@ class DialpadApp(APIApplication):
|
|
|
1172
1070
|
Tags:
|
|
1173
1071
|
callreviewsharelink
|
|
1174
1072
|
"""
|
|
1175
|
-
request_body = {
|
|
1176
|
-
"call_id": call_id,
|
|
1177
|
-
"privacy": privacy,
|
|
1178
|
-
}
|
|
1073
|
+
request_body = {"call_id": call_id, "privacy": privacy}
|
|
1179
1074
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1180
1075
|
url = f"{self.base_url}/api/v2/callreviewsharelink"
|
|
1181
1076
|
query_params = {}
|
|
@@ -1183,7 +1078,7 @@ class DialpadApp(APIApplication):
|
|
|
1183
1078
|
response.raise_for_status()
|
|
1184
1079
|
return response.json()
|
|
1185
1080
|
|
|
1186
|
-
def call_review_share_link_delete(self, id) -> dict[str, Any]:
|
|
1081
|
+
async def call_review_share_link_delete(self, id) -> dict[str, Any]:
|
|
1187
1082
|
"""
|
|
1188
1083
|
Deletes a call review share link identified by the provided ID using the DELETE method.
|
|
1189
1084
|
|
|
@@ -1204,7 +1099,7 @@ class DialpadApp(APIApplication):
|
|
|
1204
1099
|
response.raise_for_status()
|
|
1205
1100
|
return response.json()
|
|
1206
1101
|
|
|
1207
|
-
def call_review_share_link_get(self, id) -> dict[str, Any]:
|
|
1102
|
+
async def call_review_share_link_get(self, id) -> dict[str, Any]:
|
|
1208
1103
|
"""
|
|
1209
1104
|
Retrieves a share link for a call review by its ID using the Dialpad API.
|
|
1210
1105
|
|
|
@@ -1225,7 +1120,7 @@ class DialpadApp(APIApplication):
|
|
|
1225
1120
|
response.raise_for_status()
|
|
1226
1121
|
return response.json()
|
|
1227
1122
|
|
|
1228
|
-
def call_review_share_link_update(self, id, privacy=None) -> dict[str, Any]:
|
|
1123
|
+
async def call_review_share_link_update(self, id, privacy=None) -> dict[str, Any]:
|
|
1229
1124
|
"""
|
|
1230
1125
|
Updates a call review share link for the specified ID using the provided JSON data.
|
|
1231
1126
|
|
|
@@ -1241,9 +1136,7 @@ class DialpadApp(APIApplication):
|
|
|
1241
1136
|
"""
|
|
1242
1137
|
if id is None:
|
|
1243
1138
|
raise ValueError("Missing required parameter 'id'")
|
|
1244
|
-
request_body = {
|
|
1245
|
-
"privacy": privacy,
|
|
1246
|
-
}
|
|
1139
|
+
request_body = {"privacy": privacy}
|
|
1247
1140
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1248
1141
|
url = f"{self.base_url}/api/v2/callreviewsharelink/{id}"
|
|
1249
1142
|
query_params = {}
|
|
@@ -1251,7 +1144,7 @@ class DialpadApp(APIApplication):
|
|
|
1251
1144
|
response.raise_for_status()
|
|
1252
1145
|
return response.json()
|
|
1253
1146
|
|
|
1254
|
-
def callrouters_list(self, cursor=None, office_id=None) -> dict[str, Any]:
|
|
1147
|
+
async def callrouters_list(self, cursor=None, office_id=None) -> dict[str, Any]:
|
|
1255
1148
|
"""
|
|
1256
1149
|
Retrieves a list of call routers, optionally filtered by office ID and paginated using a cursor.
|
|
1257
1150
|
|
|
@@ -1266,24 +1159,13 @@ class DialpadApp(APIApplication):
|
|
|
1266
1159
|
callrouters
|
|
1267
1160
|
"""
|
|
1268
1161
|
url = f"{self.base_url}/api/v2/callrouters"
|
|
1269
|
-
query_params = {
|
|
1270
|
-
k: v
|
|
1271
|
-
for k, v in [("cursor", cursor), ("office_id", office_id)]
|
|
1272
|
-
if v is not None
|
|
1273
|
-
}
|
|
1162
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("office_id", office_id)] if v is not None}
|
|
1274
1163
|
response = self._get(url, params=query_params)
|
|
1275
1164
|
response.raise_for_status()
|
|
1276
1165
|
return response.json()
|
|
1277
1166
|
|
|
1278
|
-
def callrouters_create(
|
|
1279
|
-
self,
|
|
1280
|
-
default_target_id=None,
|
|
1281
|
-
default_target_type=None,
|
|
1282
|
-
enabled=None,
|
|
1283
|
-
name=None,
|
|
1284
|
-
office_id=None,
|
|
1285
|
-
routing_url=None,
|
|
1286
|
-
secret=None,
|
|
1167
|
+
async def callrouters_create(
|
|
1168
|
+
self, default_target_id=None, default_target_type=None, enabled=None, name=None, office_id=None, routing_url=None, secret=None
|
|
1287
1169
|
) -> dict[str, Any]:
|
|
1288
1170
|
"""
|
|
1289
1171
|
Creates a new call router configuration using the provided JSON data and returns a successful response upon completion.
|
|
@@ -1323,7 +1205,7 @@ class DialpadApp(APIApplication):
|
|
|
1323
1205
|
response.raise_for_status()
|
|
1324
1206
|
return response.json()
|
|
1325
1207
|
|
|
1326
|
-
def callrouters_delete(self, id) -> Any:
|
|
1208
|
+
async def callrouters_delete(self, id) -> Any:
|
|
1327
1209
|
"""
|
|
1328
1210
|
Deletes a call router identified by the provided ID from the system.
|
|
1329
1211
|
|
|
@@ -1344,7 +1226,7 @@ class DialpadApp(APIApplication):
|
|
|
1344
1226
|
response.raise_for_status()
|
|
1345
1227
|
return response.json()
|
|
1346
1228
|
|
|
1347
|
-
def callrouters_get(self, id) -> dict[str, Any]:
|
|
1229
|
+
async def callrouters_get(self, id) -> dict[str, Any]:
|
|
1348
1230
|
"""
|
|
1349
1231
|
Retrieves details for a specific call router identified by its unique ID.
|
|
1350
1232
|
|
|
@@ -1365,7 +1247,7 @@ class DialpadApp(APIApplication):
|
|
|
1365
1247
|
response.raise_for_status()
|
|
1366
1248
|
return response.json()
|
|
1367
1249
|
|
|
1368
|
-
def callrouters_update(
|
|
1250
|
+
async def callrouters_update(
|
|
1369
1251
|
self,
|
|
1370
1252
|
id,
|
|
1371
1253
|
default_target_id=None,
|
|
@@ -1424,9 +1306,7 @@ class DialpadApp(APIApplication):
|
|
|
1424
1306
|
response.raise_for_status()
|
|
1425
1307
|
return response.json()
|
|
1426
1308
|
|
|
1427
|
-
def numbers_assign_call_router_number_post(
|
|
1428
|
-
self, id, area_code=None, number=None, primary=None
|
|
1429
|
-
) -> dict[str, Any]:
|
|
1309
|
+
async def numbers_assign_call_router_number_post(self, id, area_code=None, number=None, primary=None) -> dict[str, Any]:
|
|
1430
1310
|
"""
|
|
1431
1311
|
Assigns a phone number to a call router with the specified ID using the provided JSON data.
|
|
1432
1312
|
|
|
@@ -1444,11 +1324,7 @@ class DialpadApp(APIApplication):
|
|
|
1444
1324
|
"""
|
|
1445
1325
|
if id is None:
|
|
1446
1326
|
raise ValueError("Missing required parameter 'id'")
|
|
1447
|
-
request_body = {
|
|
1448
|
-
"area_code": area_code,
|
|
1449
|
-
"number": number,
|
|
1450
|
-
"primary": primary,
|
|
1451
|
-
}
|
|
1327
|
+
request_body = {"area_code": area_code, "number": number, "primary": primary}
|
|
1452
1328
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1453
1329
|
url = f"{self.base_url}/api/v2/callrouters/{id}/assign_number"
|
|
1454
1330
|
query_params = {}
|
|
@@ -1456,7 +1332,7 @@ class DialpadApp(APIApplication):
|
|
|
1456
1332
|
response.raise_for_status()
|
|
1457
1333
|
return response.json()
|
|
1458
1334
|
|
|
1459
|
-
def channels_delete(self, id) -> Any:
|
|
1335
|
+
async def channels_delete(self, id) -> Any:
|
|
1460
1336
|
"""
|
|
1461
1337
|
Deletes the channel identified by the specified ID and returns a status response confirming the deletion.
|
|
1462
1338
|
|
|
@@ -1477,7 +1353,7 @@ class DialpadApp(APIApplication):
|
|
|
1477
1353
|
response.raise_for_status()
|
|
1478
1354
|
return response.json()
|
|
1479
1355
|
|
|
1480
|
-
def channels_get(self, id) -> dict[str, Any]:
|
|
1356
|
+
async def channels_get(self, id) -> dict[str, Any]:
|
|
1481
1357
|
"""
|
|
1482
1358
|
Retrieves information about a specific channel by its ID using the GET method.
|
|
1483
1359
|
|
|
@@ -1498,7 +1374,7 @@ class DialpadApp(APIApplication):
|
|
|
1498
1374
|
response.raise_for_status()
|
|
1499
1375
|
return response.json()
|
|
1500
1376
|
|
|
1501
|
-
def channels_list(self, cursor=None, state=None) -> dict[str, Any]:
|
|
1377
|
+
async def channels_list(self, cursor=None, state=None) -> dict[str, Any]:
|
|
1502
1378
|
"""
|
|
1503
1379
|
Retrieves a paginated list of channels, optionally filtered by state, using the provided cursor for pagination.
|
|
1504
1380
|
|
|
@@ -1513,16 +1389,12 @@ class DialpadApp(APIApplication):
|
|
|
1513
1389
|
channels
|
|
1514
1390
|
"""
|
|
1515
1391
|
url = f"{self.base_url}/api/v2/channels"
|
|
1516
|
-
query_params = {
|
|
1517
|
-
k: v for k, v in [("cursor", cursor), ("state", state)] if v is not None
|
|
1518
|
-
}
|
|
1392
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("state", state)] if v is not None}
|
|
1519
1393
|
response = self._get(url, params=query_params)
|
|
1520
1394
|
response.raise_for_status()
|
|
1521
1395
|
return response.json()
|
|
1522
1396
|
|
|
1523
|
-
def channels_post(
|
|
1524
|
-
self, description=None, name=None, privacy_type=None, user_id=None
|
|
1525
|
-
) -> dict[str, Any]:
|
|
1397
|
+
async def channels_post(self, description=None, name=None, privacy_type=None, user_id=None) -> dict[str, Any]:
|
|
1526
1398
|
"""
|
|
1527
1399
|
Creates a new channel by submitting channel details in JSON format.
|
|
1528
1400
|
|
|
@@ -1540,12 +1412,7 @@ class DialpadApp(APIApplication):
|
|
|
1540
1412
|
Tags:
|
|
1541
1413
|
channels
|
|
1542
1414
|
"""
|
|
1543
|
-
request_body = {
|
|
1544
|
-
"description": description,
|
|
1545
|
-
"name": name,
|
|
1546
|
-
"privacy_type": privacy_type,
|
|
1547
|
-
"user_id": user_id,
|
|
1548
|
-
}
|
|
1415
|
+
request_body = {"description": description, "name": name, "privacy_type": privacy_type, "user_id": user_id}
|
|
1549
1416
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1550
1417
|
url = f"{self.base_url}/api/v2/channels"
|
|
1551
1418
|
query_params = {}
|
|
@@ -1553,7 +1420,7 @@ class DialpadApp(APIApplication):
|
|
|
1553
1420
|
response.raise_for_status()
|
|
1554
1421
|
return response.json()
|
|
1555
1422
|
|
|
1556
|
-
def channels_members_delete(self, id, user_id=None) -> Any:
|
|
1423
|
+
async def channels_members_delete(self, id, user_id=None) -> Any:
|
|
1557
1424
|
"""
|
|
1558
1425
|
Removes a member from a channel specified by the given ID using the DELETE method.
|
|
1559
1426
|
|
|
@@ -1569,9 +1436,7 @@ class DialpadApp(APIApplication):
|
|
|
1569
1436
|
"""
|
|
1570
1437
|
if id is None:
|
|
1571
1438
|
raise ValueError("Missing required parameter 'id'")
|
|
1572
|
-
request_body = {
|
|
1573
|
-
"user_id": user_id,
|
|
1574
|
-
}
|
|
1439
|
+
request_body = {"user_id": user_id}
|
|
1575
1440
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1576
1441
|
url = f"{self.base_url}/api/v2/channels/{id}/members"
|
|
1577
1442
|
query_params = {}
|
|
@@ -1579,7 +1444,7 @@ class DialpadApp(APIApplication):
|
|
|
1579
1444
|
response.raise_for_status()
|
|
1580
1445
|
return response.json()
|
|
1581
1446
|
|
|
1582
|
-
def channels_members_list(self, id, cursor=None) -> dict[str, Any]:
|
|
1447
|
+
async def channels_members_list(self, id, cursor=None) -> dict[str, Any]:
|
|
1583
1448
|
"""
|
|
1584
1449
|
Get a list of members in a specific channel, optionally paginated using a cursor.
|
|
1585
1450
|
|
|
@@ -1601,7 +1466,7 @@ class DialpadApp(APIApplication):
|
|
|
1601
1466
|
response.raise_for_status()
|
|
1602
1467
|
return response.json()
|
|
1603
1468
|
|
|
1604
|
-
def channels_members_post(self, id, user_id=None) -> dict[str, Any]:
|
|
1469
|
+
async def channels_members_post(self, id, user_id=None) -> dict[str, Any]:
|
|
1605
1470
|
"""
|
|
1606
1471
|
Adds a member to a channel specified by the provided ID using the provided JSON data.
|
|
1607
1472
|
|
|
@@ -1617,9 +1482,7 @@ class DialpadApp(APIApplication):
|
|
|
1617
1482
|
"""
|
|
1618
1483
|
if id is None:
|
|
1619
1484
|
raise ValueError("Missing required parameter 'id'")
|
|
1620
|
-
request_body = {
|
|
1621
|
-
"user_id": user_id,
|
|
1622
|
-
}
|
|
1485
|
+
request_body = {"user_id": user_id}
|
|
1623
1486
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1624
1487
|
url = f"{self.base_url}/api/v2/channels/{id}/members"
|
|
1625
1488
|
query_params = {}
|
|
@@ -1627,7 +1490,7 @@ class DialpadApp(APIApplication):
|
|
|
1627
1490
|
response.raise_for_status()
|
|
1628
1491
|
return response.json()
|
|
1629
1492
|
|
|
1630
|
-
def coaching_team_members_get(self, id) -> dict[str, Any]:
|
|
1493
|
+
async def coaching_team_members_get(self, id) -> dict[str, Any]:
|
|
1631
1494
|
"""
|
|
1632
1495
|
Retrieves the members of a coaching team identified by the provided ID.
|
|
1633
1496
|
|
|
@@ -1648,9 +1511,7 @@ class DialpadApp(APIApplication):
|
|
|
1648
1511
|
response.raise_for_status()
|
|
1649
1512
|
return response.json()
|
|
1650
1513
|
|
|
1651
|
-
def coaching_team_members_add(
|
|
1652
|
-
self, id, member_id=None, role=None
|
|
1653
|
-
) -> dict[str, Any]:
|
|
1514
|
+
async def coaching_team_members_add(self, id, member_id=None, role=None) -> dict[str, Any]:
|
|
1654
1515
|
"""
|
|
1655
1516
|
Adds a new member to a coaching team identified by the provided ID using the POST method and returns a status message.
|
|
1656
1517
|
|
|
@@ -1667,10 +1528,7 @@ class DialpadApp(APIApplication):
|
|
|
1667
1528
|
"""
|
|
1668
1529
|
if id is None:
|
|
1669
1530
|
raise ValueError("Missing required parameter 'id'")
|
|
1670
|
-
request_body = {
|
|
1671
|
-
"member_id": member_id,
|
|
1672
|
-
"role": role,
|
|
1673
|
-
}
|
|
1531
|
+
request_body = {"member_id": member_id, "role": role}
|
|
1674
1532
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1675
1533
|
url = f"{self.base_url}/api/v2/coachingteams/{id}/members"
|
|
1676
1534
|
query_params = {}
|
|
@@ -1678,7 +1536,7 @@ class DialpadApp(APIApplication):
|
|
|
1678
1536
|
response.raise_for_status()
|
|
1679
1537
|
return response.json()
|
|
1680
1538
|
|
|
1681
|
-
def coaching_team_get(self, id) -> dict[str, Any]:
|
|
1539
|
+
async def coaching_team_get(self, id) -> dict[str, Any]:
|
|
1682
1540
|
"""
|
|
1683
1541
|
Retrieves information about a coaching team specified by its identifier using the GET method.
|
|
1684
1542
|
|
|
@@ -1699,7 +1557,7 @@ class DialpadApp(APIApplication):
|
|
|
1699
1557
|
response.raise_for_status()
|
|
1700
1558
|
return response.json()
|
|
1701
1559
|
|
|
1702
|
-
def coaching_team_listall(self, cursor=None) -> dict[str, Any]:
|
|
1560
|
+
async def coaching_team_listall(self, cursor=None) -> dict[str, Any]:
|
|
1703
1561
|
"""
|
|
1704
1562
|
Retrieves a list of coaching teams using the GET method, optionally allowing pagination with a cursor query parameter.
|
|
1705
1563
|
|
|
@@ -1718,7 +1576,7 @@ class DialpadApp(APIApplication):
|
|
|
1718
1576
|
response.raise_for_status()
|
|
1719
1577
|
return response.json()
|
|
1720
1578
|
|
|
1721
|
-
def company_get(self) -> dict[str, Any]:
|
|
1579
|
+
async def company_get(self) -> dict[str, Any]:
|
|
1722
1580
|
"""
|
|
1723
1581
|
Retrieves company data using the "GET" method at the "/api/v2/company" endpoint and returns the response.
|
|
1724
1582
|
|
|
@@ -1734,9 +1592,7 @@ class DialpadApp(APIApplication):
|
|
|
1734
1592
|
response.raise_for_status()
|
|
1735
1593
|
return response.json()
|
|
1736
1594
|
|
|
1737
|
-
def company_sms_opt_out(
|
|
1738
|
-
self, id, opt_out_state, a2p_campaign_id=None, cursor=None
|
|
1739
|
-
) -> dict[str, Any]:
|
|
1595
|
+
async def company_sms_opt_out(self, id, opt_out_state, a2p_campaign_id=None, cursor=None) -> dict[str, Any]:
|
|
1740
1596
|
"""
|
|
1741
1597
|
Retrieves a list of SMS opt-out information for a specified company, filtered by optional parameters such as a2p campaign ID and cursor, with a required opt-out state parameter.
|
|
1742
1598
|
|
|
@@ -1756,19 +1612,13 @@ class DialpadApp(APIApplication):
|
|
|
1756
1612
|
raise ValueError("Missing required parameter 'id'")
|
|
1757
1613
|
url = f"{self.base_url}/api/v2/company/{id}/smsoptout"
|
|
1758
1614
|
query_params = {
|
|
1759
|
-
k: v
|
|
1760
|
-
for k, v in [
|
|
1761
|
-
("a2p_campaign_id", a2p_campaign_id),
|
|
1762
|
-
("cursor", cursor),
|
|
1763
|
-
("opt_out_state", opt_out_state),
|
|
1764
|
-
]
|
|
1765
|
-
if v is not None
|
|
1615
|
+
k: v for k, v in [("a2p_campaign_id", a2p_campaign_id), ("cursor", cursor), ("opt_out_state", opt_out_state)] if v is not None
|
|
1766
1616
|
}
|
|
1767
1617
|
response = self._get(url, params=query_params)
|
|
1768
1618
|
response.raise_for_status()
|
|
1769
1619
|
return response.json()
|
|
1770
1620
|
|
|
1771
|
-
def conference_rooms_list(self, cursor=None) -> dict[str, Any]:
|
|
1621
|
+
async def conference_rooms_list(self, cursor=None) -> dict[str, Any]:
|
|
1772
1622
|
"""
|
|
1773
1623
|
Retrieves a list of conference rooms using the "GET" method, optionally paginating results with a query parameter cursor, secured by either an API key in the URL or a Bearer token.
|
|
1774
1624
|
|
|
@@ -1787,7 +1637,7 @@ class DialpadApp(APIApplication):
|
|
|
1787
1637
|
response.raise_for_status()
|
|
1788
1638
|
return response.json()
|
|
1789
1639
|
|
|
1790
|
-
def conference_meetings_list(self, cursor=None, room_id=None) -> dict[str, Any]:
|
|
1640
|
+
async def conference_meetings_list(self, cursor=None, room_id=None) -> dict[str, Any]:
|
|
1791
1641
|
"""
|
|
1792
1642
|
Retrieves a list of meetings for a conference, allowing optional filtering by room ID and pagination using a cursor.
|
|
1793
1643
|
|
|
@@ -1802,14 +1652,12 @@ class DialpadApp(APIApplication):
|
|
|
1802
1652
|
conference
|
|
1803
1653
|
"""
|
|
1804
1654
|
url = f"{self.base_url}/api/v2/conference/meetings"
|
|
1805
|
-
query_params = {
|
|
1806
|
-
k: v for k, v in [("cursor", cursor), ("room_id", room_id)] if v is not None
|
|
1807
|
-
}
|
|
1655
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("room_id", room_id)] if v is not None}
|
|
1808
1656
|
response = self._get(url, params=query_params)
|
|
1809
1657
|
response.raise_for_status()
|
|
1810
1658
|
return response.json()
|
|
1811
1659
|
|
|
1812
|
-
def contacts_delete(self, id) -> dict[str, Any]:
|
|
1660
|
+
async def contacts_delete(self, id) -> dict[str, Any]:
|
|
1813
1661
|
"""
|
|
1814
1662
|
Deletes a specific contact by ID and removes all associated list memberships for that contact.
|
|
1815
1663
|
|
|
@@ -1830,7 +1678,7 @@ class DialpadApp(APIApplication):
|
|
|
1830
1678
|
response.raise_for_status()
|
|
1831
1679
|
return response.json()
|
|
1832
1680
|
|
|
1833
|
-
def contacts_get(self, id) -> dict[str, Any]:
|
|
1681
|
+
async def contacts_get(self, id) -> dict[str, Any]:
|
|
1834
1682
|
"""
|
|
1835
1683
|
Retrieves detailed information for a specific contact identified by the given ID.
|
|
1836
1684
|
|
|
@@ -1851,7 +1699,7 @@ class DialpadApp(APIApplication):
|
|
|
1851
1699
|
response.raise_for_status()
|
|
1852
1700
|
return response.json()
|
|
1853
1701
|
|
|
1854
|
-
def contacts_update(
|
|
1702
|
+
async def contacts_update(
|
|
1855
1703
|
self,
|
|
1856
1704
|
id,
|
|
1857
1705
|
company_name=None,
|
|
@@ -1917,9 +1765,7 @@ class DialpadApp(APIApplication):
|
|
|
1917
1765
|
response.raise_for_status()
|
|
1918
1766
|
return response.json()
|
|
1919
1767
|
|
|
1920
|
-
def contacts_list(
|
|
1921
|
-
self, cursor=None, include_local=None, owner_id=None
|
|
1922
|
-
) -> dict[str, Any]:
|
|
1768
|
+
async def contacts_list(self, cursor=None, include_local=None, owner_id=None) -> dict[str, Any]:
|
|
1923
1769
|
"""
|
|
1924
1770
|
Retrieves a paginated list of contacts, optionally filtered by owner and local inclusion status.
|
|
1925
1771
|
|
|
@@ -1935,20 +1781,12 @@ class DialpadApp(APIApplication):
|
|
|
1935
1781
|
contacts
|
|
1936
1782
|
"""
|
|
1937
1783
|
url = f"{self.base_url}/api/v2/contacts"
|
|
1938
|
-
query_params = {
|
|
1939
|
-
k: v
|
|
1940
|
-
for k, v in [
|
|
1941
|
-
("cursor", cursor),
|
|
1942
|
-
("include_local", include_local),
|
|
1943
|
-
("owner_id", owner_id),
|
|
1944
|
-
]
|
|
1945
|
-
if v is not None
|
|
1946
|
-
}
|
|
1784
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("include_local", include_local), ("owner_id", owner_id)] if v is not None}
|
|
1947
1785
|
response = self._get(url, params=query_params)
|
|
1948
1786
|
response.raise_for_status()
|
|
1949
1787
|
return response.json()
|
|
1950
1788
|
|
|
1951
|
-
def contacts_create(
|
|
1789
|
+
async def contacts_create(
|
|
1952
1790
|
self,
|
|
1953
1791
|
company_name=None,
|
|
1954
1792
|
emails=None,
|
|
@@ -2015,7 +1853,7 @@ class DialpadApp(APIApplication):
|
|
|
2015
1853
|
response.raise_for_status()
|
|
2016
1854
|
return response.json()
|
|
2017
1855
|
|
|
2018
|
-
def contacts_create_with_uid(
|
|
1856
|
+
async def contacts_create_with_uid(
|
|
2019
1857
|
self,
|
|
2020
1858
|
company_name=None,
|
|
2021
1859
|
emails=None,
|
|
@@ -2080,9 +1918,7 @@ class DialpadApp(APIApplication):
|
|
|
2080
1918
|
response.raise_for_status()
|
|
2081
1919
|
return response.json()
|
|
2082
1920
|
|
|
2083
|
-
def ivr_delete(
|
|
2084
|
-
self, target_type, target_id, ivr_type, ivr_id=None, select_option=None
|
|
2085
|
-
) -> dict[str, Any]:
|
|
1921
|
+
async def ivr_delete(self, target_type, target_id, ivr_type, ivr_id=None, select_option=None) -> dict[str, Any]:
|
|
2086
1922
|
"""
|
|
2087
1923
|
Deletes a specific customer IVR configuration based on the target type, target ID, and IVR type using the provided JSON payload.
|
|
2088
1924
|
|
|
@@ -2105,10 +1941,7 @@ class DialpadApp(APIApplication):
|
|
|
2105
1941
|
raise ValueError("Missing required parameter 'target_id'")
|
|
2106
1942
|
if ivr_type is None:
|
|
2107
1943
|
raise ValueError("Missing required parameter 'ivr_type'")
|
|
2108
|
-
request_body = {
|
|
2109
|
-
"ivr_id": ivr_id,
|
|
2110
|
-
"select_option": select_option,
|
|
2111
|
-
}
|
|
1944
|
+
request_body = {"ivr_id": ivr_id, "select_option": select_option}
|
|
2112
1945
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2113
1946
|
url = f"{self.base_url}/api/v2/customivrs/{target_type}/{target_id}/{ivr_type}"
|
|
2114
1947
|
query_params = {}
|
|
@@ -2116,9 +1949,7 @@ class DialpadApp(APIApplication):
|
|
|
2116
1949
|
response.raise_for_status()
|
|
2117
1950
|
return response.json()
|
|
2118
1951
|
|
|
2119
|
-
def ivr_update(
|
|
2120
|
-
self, target_type, target_id, ivr_type, ivr_id=None, select_option=None
|
|
2121
|
-
) -> dict[str, Any]:
|
|
1952
|
+
async def ivr_update(self, target_type, target_id, ivr_type, ivr_id=None, select_option=None) -> dict[str, Any]:
|
|
2122
1953
|
"""
|
|
2123
1954
|
Modifies a custom IVR configuration using the PATCH method by updating specific properties for a target identified by type, ID, and IVR type.
|
|
2124
1955
|
|
|
@@ -2141,10 +1972,7 @@ class DialpadApp(APIApplication):
|
|
|
2141
1972
|
raise ValueError("Missing required parameter 'target_id'")
|
|
2142
1973
|
if ivr_type is None:
|
|
2143
1974
|
raise ValueError("Missing required parameter 'ivr_type'")
|
|
2144
|
-
request_body = {
|
|
2145
|
-
"ivr_id": ivr_id,
|
|
2146
|
-
"select_option": select_option,
|
|
2147
|
-
}
|
|
1975
|
+
request_body = {"ivr_id": ivr_id, "select_option": select_option}
|
|
2148
1976
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2149
1977
|
url = f"{self.base_url}/api/v2/customivrs/{target_type}/{target_id}/{ivr_type}"
|
|
2150
1978
|
query_params = {}
|
|
@@ -2152,7 +1980,7 @@ class DialpadApp(APIApplication):
|
|
|
2152
1980
|
response.raise_for_status()
|
|
2153
1981
|
return response.json()
|
|
2154
1982
|
|
|
2155
|
-
def custom_ivrs_get(self, target_type, target_id, cursor=None) -> dict[str, Any]:
|
|
1983
|
+
async def custom_ivrs_get(self, target_type, target_id, cursor=None) -> dict[str, Any]:
|
|
2156
1984
|
"""
|
|
2157
1985
|
Retrieves custom IVR data based on the specified target type and ID, with optional pagination using a cursor.
|
|
2158
1986
|
|
|
@@ -2168,28 +1996,12 @@ class DialpadApp(APIApplication):
|
|
|
2168
1996
|
customivrs, important
|
|
2169
1997
|
"""
|
|
2170
1998
|
url = f"{self.base_url}/api/v2/customivrs"
|
|
2171
|
-
query_params = {
|
|
2172
|
-
k: v
|
|
2173
|
-
for k, v in [
|
|
2174
|
-
("cursor", cursor),
|
|
2175
|
-
("target_type", target_type),
|
|
2176
|
-
("target_id", target_id),
|
|
2177
|
-
]
|
|
2178
|
-
if v is not None
|
|
2179
|
-
}
|
|
1999
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("target_type", target_type), ("target_id", target_id)] if v is not None}
|
|
2180
2000
|
response = self._get(url, params=query_params)
|
|
2181
2001
|
response.raise_for_status()
|
|
2182
2002
|
return response.json()
|
|
2183
2003
|
|
|
2184
|
-
def ivr_create(
|
|
2185
|
-
self,
|
|
2186
|
-
description=None,
|
|
2187
|
-
file=None,
|
|
2188
|
-
ivr_type=None,
|
|
2189
|
-
name=None,
|
|
2190
|
-
target_id=None,
|
|
2191
|
-
target_type=None,
|
|
2192
|
-
) -> dict[str, Any]:
|
|
2004
|
+
async def ivr_create(self, description=None, file=None, ivr_type=None, name=None, target_id=None, target_type=None) -> dict[str, Any]:
|
|
2193
2005
|
"""
|
|
2194
2006
|
Creates a new custom IVR entry via API and returns a confirmation upon success.
|
|
2195
2007
|
|
|
@@ -2226,7 +2038,7 @@ class DialpadApp(APIApplication):
|
|
|
2226
2038
|
response.raise_for_status()
|
|
2227
2039
|
return response.json()
|
|
2228
2040
|
|
|
2229
|
-
def ivr_details_update(self, ivr_id, description=None, name=None) -> dict[str, Any]:
|
|
2041
|
+
async def ivr_details_update(self, ivr_id, description=None, name=None) -> dict[str, Any]:
|
|
2230
2042
|
"""
|
|
2231
2043
|
Updates a custom IVR configuration identified by the `ivr_id` using partial modifications specified in the JSON request body.
|
|
2232
2044
|
|
|
@@ -2247,10 +2059,7 @@ class DialpadApp(APIApplication):
|
|
|
2247
2059
|
"""
|
|
2248
2060
|
if ivr_id is None:
|
|
2249
2061
|
raise ValueError("Missing required parameter 'ivr_id'")
|
|
2250
|
-
request_body = {
|
|
2251
|
-
"description": description,
|
|
2252
|
-
"name": name,
|
|
2253
|
-
}
|
|
2062
|
+
request_body = {"description": description, "name": name}
|
|
2254
2063
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2255
2064
|
url = f"{self.base_url}/api/v2/customivrs/{ivr_id}"
|
|
2256
2065
|
query_params = {}
|
|
@@ -2258,7 +2067,7 @@ class DialpadApp(APIApplication):
|
|
|
2258
2067
|
response.raise_for_status()
|
|
2259
2068
|
return response.json()
|
|
2260
2069
|
|
|
2261
|
-
def departments_delete(self, id) -> dict[str, Any]:
|
|
2070
|
+
async def departments_delete(self, id) -> dict[str, Any]:
|
|
2262
2071
|
"""
|
|
2263
2072
|
Deletes the department identified by the specified ID from the system.
|
|
2264
2073
|
|
|
@@ -2279,7 +2088,7 @@ class DialpadApp(APIApplication):
|
|
|
2279
2088
|
response.raise_for_status()
|
|
2280
2089
|
return response.json()
|
|
2281
2090
|
|
|
2282
|
-
def departments_get(self, id) -> dict[str, Any]:
|
|
2091
|
+
async def departments_get(self, id) -> dict[str, Any]:
|
|
2283
2092
|
"""
|
|
2284
2093
|
Retrieves detailed information for a department by its ID using the GET method.
|
|
2285
2094
|
|
|
@@ -2300,7 +2109,7 @@ class DialpadApp(APIApplication):
|
|
|
2300
2109
|
response.raise_for_status()
|
|
2301
2110
|
return response.json()
|
|
2302
2111
|
|
|
2303
|
-
def departments_update(
|
|
2112
|
+
async def departments_update(
|
|
2304
2113
|
self,
|
|
2305
2114
|
id,
|
|
2306
2115
|
auto_call_recording=None,
|
|
@@ -2374,9 +2183,7 @@ class DialpadApp(APIApplication):
|
|
|
2374
2183
|
response.raise_for_status()
|
|
2375
2184
|
return response.json()
|
|
2376
2185
|
|
|
2377
|
-
def departments_listall(
|
|
2378
|
-
self, cursor=None, office_id=None, name_search=None
|
|
2379
|
-
) -> dict[str, Any]:
|
|
2186
|
+
async def departments_listall(self, cursor=None, office_id=None, name_search=None) -> dict[str, Any]:
|
|
2380
2187
|
"""
|
|
2381
2188
|
Retrieves a list of departments, optionally filtered by office ID or name, and supports pagination via cursor.
|
|
2382
2189
|
|
|
@@ -2392,20 +2199,12 @@ class DialpadApp(APIApplication):
|
|
|
2392
2199
|
departments
|
|
2393
2200
|
"""
|
|
2394
2201
|
url = f"{self.base_url}/api/v2/departments"
|
|
2395
|
-
query_params = {
|
|
2396
|
-
k: v
|
|
2397
|
-
for k, v in [
|
|
2398
|
-
("cursor", cursor),
|
|
2399
|
-
("office_id", office_id),
|
|
2400
|
-
("name_search", name_search),
|
|
2401
|
-
]
|
|
2402
|
-
if v is not None
|
|
2403
|
-
}
|
|
2202
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("office_id", office_id), ("name_search", name_search)] if v is not None}
|
|
2404
2203
|
response = self._get(url, params=query_params)
|
|
2405
2204
|
response.raise_for_status()
|
|
2406
2205
|
return response.json()
|
|
2407
2206
|
|
|
2408
|
-
def departments_create(
|
|
2207
|
+
async def departments_create(
|
|
2409
2208
|
self,
|
|
2410
2209
|
auto_call_recording=None,
|
|
2411
2210
|
friday_hours=None,
|
|
@@ -2478,9 +2277,7 @@ class DialpadApp(APIApplication):
|
|
|
2478
2277
|
response.raise_for_status()
|
|
2479
2278
|
return response.json()
|
|
2480
2279
|
|
|
2481
|
-
def departments_operators_delete(
|
|
2482
|
-
self, id, operator_id=None, operator_type=None
|
|
2483
|
-
) -> dict[str, Any]:
|
|
2280
|
+
async def departments_operators_delete(self, id, operator_id=None, operator_type=None) -> dict[str, Any]:
|
|
2484
2281
|
"""
|
|
2485
2282
|
Deletes a department operator by ID using the specified API endpoint and returns a status message.
|
|
2486
2283
|
|
|
@@ -2497,10 +2294,7 @@ class DialpadApp(APIApplication):
|
|
|
2497
2294
|
"""
|
|
2498
2295
|
if id is None:
|
|
2499
2296
|
raise ValueError("Missing required parameter 'id'")
|
|
2500
|
-
request_body = {
|
|
2501
|
-
"operator_id": operator_id,
|
|
2502
|
-
"operator_type": operator_type,
|
|
2503
|
-
}
|
|
2297
|
+
request_body = {"operator_id": operator_id, "operator_type": operator_type}
|
|
2504
2298
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2505
2299
|
url = f"{self.base_url}/api/v2/departments/{id}/operators"
|
|
2506
2300
|
query_params = {}
|
|
@@ -2508,7 +2302,7 @@ class DialpadApp(APIApplication):
|
|
|
2508
2302
|
response.raise_for_status()
|
|
2509
2303
|
return response.json()
|
|
2510
2304
|
|
|
2511
|
-
def departments_operators_get(self, id) -> dict[str, Any]:
|
|
2305
|
+
async def departments_operators_get(self, id) -> dict[str, Any]:
|
|
2512
2306
|
"""
|
|
2513
2307
|
Retrieves information about operators associated with a specific department by department ID using the GET method.
|
|
2514
2308
|
|
|
@@ -2529,9 +2323,7 @@ class DialpadApp(APIApplication):
|
|
|
2529
2323
|
response.raise_for_status()
|
|
2530
2324
|
return response.json()
|
|
2531
2325
|
|
|
2532
|
-
def departments_operators_post(
|
|
2533
|
-
self, id, operator_id=None, operator_type=None, role=None
|
|
2534
|
-
) -> dict[str, Any]:
|
|
2326
|
+
async def departments_operators_post(self, id, operator_id=None, operator_type=None, role=None) -> dict[str, Any]:
|
|
2535
2327
|
"""
|
|
2536
2328
|
Creates a new operator for the specified department and returns a successful status on completion.
|
|
2537
2329
|
|
|
@@ -2549,11 +2341,7 @@ class DialpadApp(APIApplication):
|
|
|
2549
2341
|
"""
|
|
2550
2342
|
if id is None:
|
|
2551
2343
|
raise ValueError("Missing required parameter 'id'")
|
|
2552
|
-
request_body = {
|
|
2553
|
-
"operator_id": operator_id,
|
|
2554
|
-
"operator_type": operator_type,
|
|
2555
|
-
"role": role,
|
|
2556
|
-
}
|
|
2344
|
+
request_body = {"operator_id": operator_id, "operator_type": operator_type, "role": role}
|
|
2557
2345
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2558
2346
|
url = f"{self.base_url}/api/v2/departments/{id}/operators"
|
|
2559
2347
|
query_params = {}
|
|
@@ -2561,7 +2349,7 @@ class DialpadApp(APIApplication):
|
|
|
2561
2349
|
response.raise_for_status()
|
|
2562
2350
|
return response.json()
|
|
2563
2351
|
|
|
2564
|
-
def faxline_create(self, line=None, target=None) -> dict[str, Any]:
|
|
2352
|
+
async def faxline_create(self, line=None, target=None) -> dict[str, Any]:
|
|
2565
2353
|
"""
|
|
2566
2354
|
Creates a new fax line resource using the provided JSON data and returns a successful response upon creation.
|
|
2567
2355
|
|
|
@@ -2575,10 +2363,7 @@ class DialpadApp(APIApplication):
|
|
|
2575
2363
|
Tags:
|
|
2576
2364
|
faxline
|
|
2577
2365
|
"""
|
|
2578
|
-
request_body = {
|
|
2579
|
-
"line": line,
|
|
2580
|
-
"target": target,
|
|
2581
|
-
}
|
|
2366
|
+
request_body = {"line": line, "target": target}
|
|
2582
2367
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2583
2368
|
url = f"{self.base_url}/api/v2/faxline"
|
|
2584
2369
|
query_params = {}
|
|
@@ -2586,9 +2371,7 @@ class DialpadApp(APIApplication):
|
|
|
2586
2371
|
response.raise_for_status()
|
|
2587
2372
|
return response.json()
|
|
2588
2373
|
|
|
2589
|
-
def numbers_assign_number_post(
|
|
2590
|
-
self, number, primary=None, target_id=None, target_type=None
|
|
2591
|
-
) -> dict[str, Any]:
|
|
2374
|
+
async def numbers_assign_number_post(self, number, primary=None, target_id=None, target_type=None) -> dict[str, Any]:
|
|
2592
2375
|
"""
|
|
2593
2376
|
Assigns a specified number to a resource by sending a POST request with the number as a path parameter and the assignment details in the request body.
|
|
2594
2377
|
|
|
@@ -2606,11 +2389,7 @@ class DialpadApp(APIApplication):
|
|
|
2606
2389
|
"""
|
|
2607
2390
|
if number is None:
|
|
2608
2391
|
raise ValueError("Missing required parameter 'number'")
|
|
2609
|
-
request_body = {
|
|
2610
|
-
"primary": primary,
|
|
2611
|
-
"target_id": target_id,
|
|
2612
|
-
"target_type": target_type,
|
|
2613
|
-
}
|
|
2392
|
+
request_body = {"primary": primary, "target_id": target_id, "target_type": target_type}
|
|
2614
2393
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2615
2394
|
url = f"{self.base_url}/api/v2/numbers/{number}/assign"
|
|
2616
2395
|
query_params = {}
|
|
@@ -2618,13 +2397,8 @@ class DialpadApp(APIApplication):
|
|
|
2618
2397
|
response.raise_for_status()
|
|
2619
2398
|
return response.json()
|
|
2620
2399
|
|
|
2621
|
-
def numbers_assign_target_number_post(
|
|
2622
|
-
self,
|
|
2623
|
-
area_code=None,
|
|
2624
|
-
number=None,
|
|
2625
|
-
primary=None,
|
|
2626
|
-
target_id=None,
|
|
2627
|
-
target_type=None,
|
|
2400
|
+
async def numbers_assign_target_number_post(
|
|
2401
|
+
self, area_code=None, number=None, primary=None, target_id=None, target_type=None
|
|
2628
2402
|
) -> dict[str, Any]:
|
|
2629
2403
|
"""
|
|
2630
2404
|
Assigns numbers using a JSON payload in the request body via the "POST" method and returns a successful response upon completion.
|
|
@@ -2642,13 +2416,7 @@ class DialpadApp(APIApplication):
|
|
|
2642
2416
|
Tags:
|
|
2643
2417
|
numbers
|
|
2644
2418
|
"""
|
|
2645
|
-
request_body = {
|
|
2646
|
-
"area_code": area_code,
|
|
2647
|
-
"number": number,
|
|
2648
|
-
"primary": primary,
|
|
2649
|
-
"target_id": target_id,
|
|
2650
|
-
"target_type": target_type,
|
|
2651
|
-
}
|
|
2419
|
+
request_body = {"area_code": area_code, "number": number, "primary": primary, "target_id": target_id, "target_type": target_type}
|
|
2652
2420
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2653
2421
|
url = f"{self.base_url}/api/v2/numbers/assign"
|
|
2654
2422
|
query_params = {}
|
|
@@ -2656,7 +2424,7 @@ class DialpadApp(APIApplication):
|
|
|
2656
2424
|
response.raise_for_status()
|
|
2657
2425
|
return response.json()
|
|
2658
2426
|
|
|
2659
|
-
def numbers_delete(self, number, release=None) -> dict[str, Any]:
|
|
2427
|
+
async def numbers_delete(self, number, release=None) -> dict[str, Any]:
|
|
2660
2428
|
"""
|
|
2661
2429
|
Deletes a number resource identified by the path parameter "number" and optionally considers the "release" status if specified in the query.
|
|
2662
2430
|
|
|
@@ -2678,7 +2446,7 @@ class DialpadApp(APIApplication):
|
|
|
2678
2446
|
response.raise_for_status()
|
|
2679
2447
|
return response.json()
|
|
2680
2448
|
|
|
2681
|
-
def numbers_get(self, number) -> dict[str, Any]:
|
|
2449
|
+
async def numbers_get(self, number) -> dict[str, Any]:
|
|
2682
2450
|
"""
|
|
2683
2451
|
Retrieves information for a specific number using the provided number identifier.
|
|
2684
2452
|
|
|
@@ -2699,7 +2467,7 @@ class DialpadApp(APIApplication):
|
|
|
2699
2467
|
response.raise_for_status()
|
|
2700
2468
|
return response.json()
|
|
2701
2469
|
|
|
2702
|
-
def numbers_list(self, cursor=None, status=None) -> dict[str, Any]:
|
|
2470
|
+
async def numbers_list(self, cursor=None, status=None) -> dict[str, Any]:
|
|
2703
2471
|
"""
|
|
2704
2472
|
Retrieves a list of numbers with optional filtering by status and supports pagination using a cursor parameter.
|
|
2705
2473
|
|
|
@@ -2714,14 +2482,12 @@ class DialpadApp(APIApplication):
|
|
|
2714
2482
|
numbers
|
|
2715
2483
|
"""
|
|
2716
2484
|
url = f"{self.base_url}/api/v2/numbers"
|
|
2717
|
-
query_params = {
|
|
2718
|
-
k: v for k, v in [("cursor", cursor), ("status", status)] if v is not None
|
|
2719
|
-
}
|
|
2485
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("status", status)] if v is not None}
|
|
2720
2486
|
response = self._get(url, params=query_params)
|
|
2721
2487
|
response.raise_for_status()
|
|
2722
2488
|
return response.json()
|
|
2723
2489
|
|
|
2724
|
-
def format_post(self, country_code=None, number=None) -> dict[str, Any]:
|
|
2490
|
+
async def format_post(self, country_code=None, number=None) -> dict[str, Any]:
|
|
2725
2491
|
"""
|
|
2726
2492
|
Formats a given number according to the specified country code and returns the formatted result.
|
|
2727
2493
|
|
|
@@ -2736,24 +2502,13 @@ class DialpadApp(APIApplication):
|
|
|
2736
2502
|
numbers
|
|
2737
2503
|
"""
|
|
2738
2504
|
url = f"{self.base_url}/api/v2/numbers/format"
|
|
2739
|
-
query_params = {
|
|
2740
|
-
k: v
|
|
2741
|
-
for k, v in [("country_code", country_code), ("number", number)]
|
|
2742
|
-
if v is not None
|
|
2743
|
-
}
|
|
2505
|
+
query_params = {k: v for k, v in [("country_code", country_code), ("number", number)] if v is not None}
|
|
2744
2506
|
response = self._post(url, data={}, params=query_params)
|
|
2745
2507
|
response.raise_for_status()
|
|
2746
2508
|
return response.json()
|
|
2747
2509
|
|
|
2748
|
-
def oauth2_authorize_get(
|
|
2749
|
-
self,
|
|
2750
|
-
redirect_uri,
|
|
2751
|
-
client_id,
|
|
2752
|
-
code_challenge_method=None,
|
|
2753
|
-
code_challenge=None,
|
|
2754
|
-
scope=None,
|
|
2755
|
-
response_type=None,
|
|
2756
|
-
state=None,
|
|
2510
|
+
async def oauth2_authorize_get(
|
|
2511
|
+
self, redirect_uri, client_id, code_challenge_method=None, code_challenge=None, scope=None, response_type=None, state=None
|
|
2757
2512
|
) -> Any:
|
|
2758
2513
|
"""
|
|
2759
2514
|
Initiates the OAuth 2.0 authorization code flow by redirecting the user to authenticate and grant permissions, then redirects back to the specified callback URL with an authorization code or error.
|
|
@@ -2791,7 +2546,7 @@ class DialpadApp(APIApplication):
|
|
|
2791
2546
|
response.raise_for_status()
|
|
2792
2547
|
return response.json()
|
|
2793
2548
|
|
|
2794
|
-
def oauth2_deauthorize_post(self) -> Any:
|
|
2549
|
+
async def oauth2_deauthorize_post(self) -> Any:
|
|
2795
2550
|
"""
|
|
2796
2551
|
Revokes OAuth 2.0 access tokens associated with the client or user, returning a successful response with no content.
|
|
2797
2552
|
|
|
@@ -2806,23 +2561,14 @@ class DialpadApp(APIApplication):
|
|
|
2806
2561
|
response = self._post(url, data={}, params=query_params)
|
|
2807
2562
|
response.raise_for_status()
|
|
2808
2563
|
return response.json()
|
|
2809
|
-
|
|
2810
|
-
"""
|
|
2811
|
-
Requests an access token and optionally a refresh token using OAuth 2.0 by exchanging credentials or codes, typically in flows like authorization code, client credentials, or refresh token.
|
|
2812
|
-
|
|
2813
|
-
Returns:
|
|
2814
|
-
dict[str, Any]: A successful response
|
|
2815
|
-
|
|
2816
|
-
Tags:
|
|
2817
|
-
oauth2
|
|
2818
|
-
"""
|
|
2564
|
+
"\n Requests an access token and optionally a refresh token using OAuth 2.0 by exchanging credentials or codes, typically in flows like authorization code, client credentials, or refresh token.\n\n Returns:\n dict[str, Any]: A successful response\n\n Tags:\n oauth2\n "
|
|
2819
2565
|
url = f"{self.base_url}/oauth2/token"
|
|
2820
2566
|
query_params = {}
|
|
2821
2567
|
response = self._post(url, data=request_body, params=query_params)
|
|
2822
2568
|
response.raise_for_status()
|
|
2823
2569
|
return response.json()
|
|
2824
2570
|
|
|
2825
|
-
def plan_get(self, office_id) -> dict[str, Any]:
|
|
2571
|
+
async def plan_get(self, office_id) -> dict[str, Any]:
|
|
2826
2572
|
"""
|
|
2827
2573
|
Retrieves the plan details for a specified office identified by its office_id.
|
|
2828
2574
|
|
|
@@ -2843,7 +2589,7 @@ class DialpadApp(APIApplication):
|
|
|
2843
2589
|
response.raise_for_status()
|
|
2844
2590
|
return response.json()
|
|
2845
2591
|
|
|
2846
|
-
def callcenters_list(self, office_id, cursor=None) -> dict[str, Any]:
|
|
2592
|
+
async def callcenters_list(self, office_id, cursor=None) -> dict[str, Any]:
|
|
2847
2593
|
"""
|
|
2848
2594
|
Retrieves a list of call centers associated with a specific office, supporting pagination via a cursor parameter.
|
|
2849
2595
|
|
|
@@ -2865,7 +2611,7 @@ class DialpadApp(APIApplication):
|
|
|
2865
2611
|
response.raise_for_status()
|
|
2866
2612
|
return response.json()
|
|
2867
2613
|
|
|
2868
|
-
def coaching_team_list(self, office_id, cursor=None) -> dict[str, Any]:
|
|
2614
|
+
async def coaching_team_list(self, office_id, cursor=None) -> dict[str, Any]:
|
|
2869
2615
|
"""
|
|
2870
2616
|
Retrieves a list of teams associated with a specific office, identified by the office ID provided in the path, with optional pagination using the cursor query parameter.
|
|
2871
2617
|
|
|
@@ -2887,7 +2633,7 @@ class DialpadApp(APIApplication):
|
|
|
2887
2633
|
response.raise_for_status()
|
|
2888
2634
|
return response.json()
|
|
2889
2635
|
|
|
2890
|
-
def departments_list(self, office_id, cursor=None) -> dict[str, Any]:
|
|
2636
|
+
async def departments_list(self, office_id, cursor=None) -> dict[str, Any]:
|
|
2891
2637
|
"""
|
|
2892
2638
|
Retrieves a list of departments associated with a specific office identified by the provided office ID.
|
|
2893
2639
|
|
|
@@ -2909,9 +2655,7 @@ class DialpadApp(APIApplication):
|
|
|
2909
2655
|
response.raise_for_status()
|
|
2910
2656
|
return response.json()
|
|
2911
2657
|
|
|
2912
|
-
def numbers_assign_office_number_post(
|
|
2913
|
-
self, id, area_code=None, number=None, primary=None
|
|
2914
|
-
) -> dict[str, Any]:
|
|
2658
|
+
async def numbers_assign_office_number_post(self, id, area_code=None, number=None, primary=None) -> dict[str, Any]:
|
|
2915
2659
|
"""
|
|
2916
2660
|
Assigns a phone number to an office identified by the specified ID using a JSON request body.
|
|
2917
2661
|
|
|
@@ -2929,11 +2673,7 @@ class DialpadApp(APIApplication):
|
|
|
2929
2673
|
"""
|
|
2930
2674
|
if id is None:
|
|
2931
2675
|
raise ValueError("Missing required parameter 'id'")
|
|
2932
|
-
request_body = {
|
|
2933
|
-
"area_code": area_code,
|
|
2934
|
-
"number": number,
|
|
2935
|
-
"primary": primary,
|
|
2936
|
-
}
|
|
2676
|
+
request_body = {"area_code": area_code, "number": number, "primary": primary}
|
|
2937
2677
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2938
2678
|
url = f"{self.base_url}/api/v2/offices/{id}/assign_number"
|
|
2939
2679
|
query_params = {}
|
|
@@ -2941,7 +2681,7 @@ class DialpadApp(APIApplication):
|
|
|
2941
2681
|
response.raise_for_status()
|
|
2942
2682
|
return response.json()
|
|
2943
2683
|
|
|
2944
|
-
def numbers_office_unassign_number_post(self, id, number=None) -> dict[str, Any]:
|
|
2684
|
+
async def numbers_office_unassign_number_post(self, id, number=None) -> dict[str, Any]:
|
|
2945
2685
|
"""
|
|
2946
2686
|
Unassigns a phone number from an office using the POST method by specifying the office ID in the path and providing additional details in the JSON request body.
|
|
2947
2687
|
|
|
@@ -2957,9 +2697,7 @@ class DialpadApp(APIApplication):
|
|
|
2957
2697
|
"""
|
|
2958
2698
|
if id is None:
|
|
2959
2699
|
raise ValueError("Missing required parameter 'id'")
|
|
2960
|
-
request_body = {
|
|
2961
|
-
"number": number,
|
|
2962
|
-
}
|
|
2700
|
+
request_body = {"number": number}
|
|
2963
2701
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2964
2702
|
url = f"{self.base_url}/api/v2/offices/{id}/unassign_number"
|
|
2965
2703
|
query_params = {}
|
|
@@ -2967,7 +2705,7 @@ class DialpadApp(APIApplication):
|
|
|
2967
2705
|
response.raise_for_status()
|
|
2968
2706
|
return response.json()
|
|
2969
2707
|
|
|
2970
|
-
def offices_e911_get(self, id) -> dict[str, Any]:
|
|
2708
|
+
async def offices_e911_get(self, id) -> dict[str, Any]:
|
|
2971
2709
|
"""
|
|
2972
2710
|
Retrieves Enhanced 911 (E911) information for a specific office identified by the provided office ID.
|
|
2973
2711
|
|
|
@@ -2988,17 +2726,8 @@ class DialpadApp(APIApplication):
|
|
|
2988
2726
|
response.raise_for_status()
|
|
2989
2727
|
return response.json()
|
|
2990
2728
|
|
|
2991
|
-
def offices_e911_update(
|
|
2992
|
-
self,
|
|
2993
|
-
id,
|
|
2994
|
-
address=None,
|
|
2995
|
-
address2=None,
|
|
2996
|
-
city=None,
|
|
2997
|
-
country=None,
|
|
2998
|
-
state=None,
|
|
2999
|
-
update_all=None,
|
|
3000
|
-
use_validated_option=None,
|
|
3001
|
-
zip=None,
|
|
2729
|
+
async def offices_e911_update(
|
|
2730
|
+
self, id, address=None, address2=None, city=None, country=None, state=None, update_all=None, use_validated_option=None, zip=None
|
|
3002
2731
|
) -> dict[str, Any]:
|
|
3003
2732
|
"""
|
|
3004
2733
|
Updates or replaces the E911 configuration for the specified office using the provided data in the request body.
|
|
@@ -3049,7 +2778,7 @@ class DialpadApp(APIApplication):
|
|
|
3049
2778
|
response.raise_for_status()
|
|
3050
2779
|
return response.json()
|
|
3051
2780
|
|
|
3052
|
-
def plan_available_licenses_get(self, office_id) -> dict[str, Any]:
|
|
2781
|
+
async def plan_available_licenses_get(self, office_id) -> dict[str, Any]:
|
|
3053
2782
|
"""
|
|
3054
2783
|
Retrieves the available licenses for a specific office identified by its ID.
|
|
3055
2784
|
|
|
@@ -3070,7 +2799,7 @@ class DialpadApp(APIApplication):
|
|
|
3070
2799
|
response.raise_for_status()
|
|
3071
2800
|
return response.json()
|
|
3072
2801
|
|
|
3073
|
-
def offices_offdutystatuses_get(self, id) -> dict[str, Any]:
|
|
2802
|
+
async def offices_offdutystatuses_get(self, id) -> dict[str, Any]:
|
|
3074
2803
|
"""
|
|
3075
2804
|
Retrieves a list of off-duty statuses for the specified office, identified by its ID.
|
|
3076
2805
|
|
|
@@ -3091,7 +2820,7 @@ class DialpadApp(APIApplication):
|
|
|
3091
2820
|
response.raise_for_status()
|
|
3092
2821
|
return response.json()
|
|
3093
2822
|
|
|
3094
|
-
def offices_get(self, id) -> dict[str, Any]:
|
|
2823
|
+
async def offices_get(self, id) -> dict[str, Any]:
|
|
3095
2824
|
"""
|
|
3096
2825
|
Retrieves details about a specific office by ID using the API.
|
|
3097
2826
|
|
|
@@ -3112,7 +2841,7 @@ class DialpadApp(APIApplication):
|
|
|
3112
2841
|
response.raise_for_status()
|
|
3113
2842
|
return response.json()
|
|
3114
2843
|
|
|
3115
|
-
def offices_list(self, cursor=None, active_only=None) -> dict[str, Any]:
|
|
2844
|
+
async def offices_list(self, cursor=None, active_only=None) -> dict[str, Any]:
|
|
3116
2845
|
"""
|
|
3117
2846
|
Retrieves a list of offices, optionally filtering by active status and supporting pagination with a cursor parameter.
|
|
3118
2847
|
|
|
@@ -3127,16 +2856,12 @@ class DialpadApp(APIApplication):
|
|
|
3127
2856
|
offices
|
|
3128
2857
|
"""
|
|
3129
2858
|
url = f"{self.base_url}/api/v2/offices"
|
|
3130
|
-
query_params = {
|
|
3131
|
-
k: v
|
|
3132
|
-
for k, v in [("cursor", cursor), ("active_only", active_only)]
|
|
3133
|
-
if v is not None
|
|
3134
|
-
}
|
|
2859
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("active_only", active_only)] if v is not None}
|
|
3135
2860
|
response = self._get(url, params=query_params)
|
|
3136
2861
|
response.raise_for_status()
|
|
3137
2862
|
return response.json()
|
|
3138
2863
|
|
|
3139
|
-
def offices_create(
|
|
2864
|
+
async def offices_create(
|
|
3140
2865
|
self,
|
|
3141
2866
|
annual_commit_monthly_billing=None,
|
|
3142
2867
|
auto_call_recording=None,
|
|
@@ -3248,9 +2973,7 @@ class DialpadApp(APIApplication):
|
|
|
3248
2973
|
response.raise_for_status()
|
|
3249
2974
|
return response.json()
|
|
3250
2975
|
|
|
3251
|
-
def offices_operators_delete(
|
|
3252
|
-
self, id, operator_id=None, operator_type=None
|
|
3253
|
-
) -> dict[str, Any]:
|
|
2976
|
+
async def offices_operators_delete(self, id, operator_id=None, operator_type=None) -> dict[str, Any]:
|
|
3254
2977
|
"""
|
|
3255
2978
|
Deletes the specified operator(s) associated with the office whose ID is provided in the path, returning a success status upon completion.
|
|
3256
2979
|
|
|
@@ -3267,10 +2990,7 @@ class DialpadApp(APIApplication):
|
|
|
3267
2990
|
"""
|
|
3268
2991
|
if id is None:
|
|
3269
2992
|
raise ValueError("Missing required parameter 'id'")
|
|
3270
|
-
request_body = {
|
|
3271
|
-
"operator_id": operator_id,
|
|
3272
|
-
"operator_type": operator_type,
|
|
3273
|
-
}
|
|
2993
|
+
request_body = {"operator_id": operator_id, "operator_type": operator_type}
|
|
3274
2994
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3275
2995
|
url = f"{self.base_url}/api/v2/offices/{id}/operators"
|
|
3276
2996
|
query_params = {}
|
|
@@ -3278,7 +2998,7 @@ class DialpadApp(APIApplication):
|
|
|
3278
2998
|
response.raise_for_status()
|
|
3279
2999
|
return response.json()
|
|
3280
3000
|
|
|
3281
|
-
def offices_operators_get(self, id) -> dict[str, Any]:
|
|
3001
|
+
async def offices_operators_get(self, id) -> dict[str, Any]:
|
|
3282
3002
|
"""
|
|
3283
3003
|
Get the list of operators associated with the specified office by its ID.
|
|
3284
3004
|
|
|
@@ -3299,9 +3019,7 @@ class DialpadApp(APIApplication):
|
|
|
3299
3019
|
response.raise_for_status()
|
|
3300
3020
|
return response.json()
|
|
3301
3021
|
|
|
3302
|
-
def offices_operators_post(
|
|
3303
|
-
self, id, operator_id=None, operator_type=None, role=None
|
|
3304
|
-
) -> dict[str, Any]:
|
|
3022
|
+
async def offices_operators_post(self, id, operator_id=None, operator_type=None, role=None) -> dict[str, Any]:
|
|
3305
3023
|
"""
|
|
3306
3024
|
Creates a new operator resource within the specified office using the provided data and returns a success status.
|
|
3307
3025
|
|
|
@@ -3319,11 +3037,7 @@ class DialpadApp(APIApplication):
|
|
|
3319
3037
|
"""
|
|
3320
3038
|
if id is None:
|
|
3321
3039
|
raise ValueError("Missing required parameter 'id'")
|
|
3322
|
-
request_body = {
|
|
3323
|
-
"operator_id": operator_id,
|
|
3324
|
-
"operator_type": operator_type,
|
|
3325
|
-
"role": role,
|
|
3326
|
-
}
|
|
3040
|
+
request_body = {"operator_id": operator_id, "operator_type": operator_type, "role": role}
|
|
3327
3041
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3328
3042
|
url = f"{self.base_url}/api/v2/offices/{id}/operators"
|
|
3329
3043
|
query_params = {}
|
|
@@ -3331,9 +3045,7 @@ class DialpadApp(APIApplication):
|
|
|
3331
3045
|
response.raise_for_status()
|
|
3332
3046
|
return response.json()
|
|
3333
3047
|
|
|
3334
|
-
def recording_share_link_create(
|
|
3335
|
-
self, privacy=None, recording_id=None, recording_type=None
|
|
3336
|
-
) -> dict[str, Any]:
|
|
3048
|
+
async def recording_share_link_create(self, privacy=None, recording_id=None, recording_type=None) -> dict[str, Any]:
|
|
3337
3049
|
"""
|
|
3338
3050
|
Creates a recording share link by accepting JSON input and returns a success response upon completion.
|
|
3339
3051
|
|
|
@@ -3348,11 +3060,7 @@ class DialpadApp(APIApplication):
|
|
|
3348
3060
|
Tags:
|
|
3349
3061
|
recordingsharelink
|
|
3350
3062
|
"""
|
|
3351
|
-
request_body = {
|
|
3352
|
-
"privacy": privacy,
|
|
3353
|
-
"recording_id": recording_id,
|
|
3354
|
-
"recording_type": recording_type,
|
|
3355
|
-
}
|
|
3063
|
+
request_body = {"privacy": privacy, "recording_id": recording_id, "recording_type": recording_type}
|
|
3356
3064
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3357
3065
|
url = f"{self.base_url}/api/v2/recordingsharelink"
|
|
3358
3066
|
query_params = {}
|
|
@@ -3360,7 +3068,7 @@ class DialpadApp(APIApplication):
|
|
|
3360
3068
|
response.raise_for_status()
|
|
3361
3069
|
return response.json()
|
|
3362
3070
|
|
|
3363
|
-
def recording_share_link_delete(self, id) -> dict[str, Any]:
|
|
3071
|
+
async def recording_share_link_delete(self, id) -> dict[str, Any]:
|
|
3364
3072
|
"""
|
|
3365
3073
|
Deletes the recording share link identified by the specified ID and returns a confirmation upon successful completion.
|
|
3366
3074
|
|
|
@@ -3381,7 +3089,7 @@ class DialpadApp(APIApplication):
|
|
|
3381
3089
|
response.raise_for_status()
|
|
3382
3090
|
return response.json()
|
|
3383
3091
|
|
|
3384
|
-
def recording_share_link_get(self, id) -> dict[str, Any]:
|
|
3092
|
+
async def recording_share_link_get(self, id) -> dict[str, Any]:
|
|
3385
3093
|
"""
|
|
3386
3094
|
Retrieves a recording share link by its ID using the GET method.
|
|
3387
3095
|
|
|
@@ -3402,7 +3110,7 @@ class DialpadApp(APIApplication):
|
|
|
3402
3110
|
response.raise_for_status()
|
|
3403
3111
|
return response.json()
|
|
3404
3112
|
|
|
3405
|
-
def recording_share_link_update(self, id, privacy=None) -> dict[str, Any]:
|
|
3113
|
+
async def recording_share_link_update(self, id, privacy=None) -> dict[str, Any]:
|
|
3406
3114
|
"""
|
|
3407
3115
|
Updates or replaces the recording share link resource identified by the given ID with the provided data.
|
|
3408
3116
|
|
|
@@ -3418,9 +3126,7 @@ class DialpadApp(APIApplication):
|
|
|
3418
3126
|
"""
|
|
3419
3127
|
if id is None:
|
|
3420
3128
|
raise ValueError("Missing required parameter 'id'")
|
|
3421
|
-
request_body = {
|
|
3422
|
-
"privacy": privacy,
|
|
3423
|
-
}
|
|
3129
|
+
request_body = {"privacy": privacy}
|
|
3424
3130
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3425
3131
|
url = f"{self.base_url}/api/v2/recordingsharelink/{id}"
|
|
3426
3132
|
query_params = {}
|
|
@@ -3428,9 +3134,7 @@ class DialpadApp(APIApplication):
|
|
|
3428
3134
|
response.raise_for_status()
|
|
3429
3135
|
return response.json()
|
|
3430
3136
|
|
|
3431
|
-
def numbers_assign_room_number_post(
|
|
3432
|
-
self, id, area_code=None, number=None, primary=None
|
|
3433
|
-
) -> dict[str, Any]:
|
|
3137
|
+
async def numbers_assign_room_number_post(self, id, area_code=None, number=None, primary=None) -> dict[str, Any]:
|
|
3434
3138
|
"""
|
|
3435
3139
|
Assigns a number to the specified room and returns a success status.
|
|
3436
3140
|
|
|
@@ -3448,11 +3152,7 @@ class DialpadApp(APIApplication):
|
|
|
3448
3152
|
"""
|
|
3449
3153
|
if id is None:
|
|
3450
3154
|
raise ValueError("Missing required parameter 'id'")
|
|
3451
|
-
request_body = {
|
|
3452
|
-
"area_code": area_code,
|
|
3453
|
-
"number": number,
|
|
3454
|
-
"primary": primary,
|
|
3455
|
-
}
|
|
3155
|
+
request_body = {"area_code": area_code, "number": number, "primary": primary}
|
|
3456
3156
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3457
3157
|
url = f"{self.base_url}/api/v2/rooms/{id}/assign_number"
|
|
3458
3158
|
query_params = {}
|
|
@@ -3460,7 +3160,7 @@ class DialpadApp(APIApplication):
|
|
|
3460
3160
|
response.raise_for_status()
|
|
3461
3161
|
return response.json()
|
|
3462
3162
|
|
|
3463
|
-
def numbers_room_unassign_number_post(self, id, number=None) -> dict[str, Any]:
|
|
3163
|
+
async def numbers_room_unassign_number_post(self, id, number=None) -> dict[str, Any]:
|
|
3464
3164
|
"""
|
|
3465
3165
|
Unassigns a phone number from a room using the API and returns a success status.
|
|
3466
3166
|
|
|
@@ -3476,9 +3176,7 @@ class DialpadApp(APIApplication):
|
|
|
3476
3176
|
"""
|
|
3477
3177
|
if id is None:
|
|
3478
3178
|
raise ValueError("Missing required parameter 'id'")
|
|
3479
|
-
request_body = {
|
|
3480
|
-
"number": number,
|
|
3481
|
-
}
|
|
3179
|
+
request_body = {"number": number}
|
|
3482
3180
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3483
3181
|
url = f"{self.base_url}/api/v2/rooms/{id}/unassign_number"
|
|
3484
3182
|
query_params = {}
|
|
@@ -3486,7 +3184,7 @@ class DialpadApp(APIApplication):
|
|
|
3486
3184
|
response.raise_for_status()
|
|
3487
3185
|
return response.json()
|
|
3488
3186
|
|
|
3489
|
-
def rooms_delete(self, id) -> dict[str, Any]:
|
|
3187
|
+
async def rooms_delete(self, id) -> dict[str, Any]:
|
|
3490
3188
|
"""
|
|
3491
3189
|
Deletes a room by its ID and returns a successful response.
|
|
3492
3190
|
|
|
@@ -3507,7 +3205,7 @@ class DialpadApp(APIApplication):
|
|
|
3507
3205
|
response.raise_for_status()
|
|
3508
3206
|
return response.json()
|
|
3509
3207
|
|
|
3510
|
-
def rooms_get(self, id) -> dict[str, Any]:
|
|
3208
|
+
async def rooms_get(self, id) -> dict[str, Any]:
|
|
3511
3209
|
"""
|
|
3512
3210
|
Retrieves details of a specific room identified by its ID using the GET method.
|
|
3513
3211
|
|
|
@@ -3528,7 +3226,7 @@ class DialpadApp(APIApplication):
|
|
|
3528
3226
|
response.raise_for_status()
|
|
3529
3227
|
return response.json()
|
|
3530
3228
|
|
|
3531
|
-
def rooms_patch(self, id, name=None, phone_numbers=None) -> dict[str, Any]:
|
|
3229
|
+
async def rooms_patch(self, id, name=None, phone_numbers=None) -> dict[str, Any]:
|
|
3532
3230
|
"""
|
|
3533
3231
|
Updates a room with the specified ID by partially modifying its properties using the provided JSON payload.
|
|
3534
3232
|
|
|
@@ -3549,10 +3247,7 @@ class DialpadApp(APIApplication):
|
|
|
3549
3247
|
"""
|
|
3550
3248
|
if id is None:
|
|
3551
3249
|
raise ValueError("Missing required parameter 'id'")
|
|
3552
|
-
request_body = {
|
|
3553
|
-
"name": name,
|
|
3554
|
-
"phone_numbers": phone_numbers,
|
|
3555
|
-
}
|
|
3250
|
+
request_body = {"name": name, "phone_numbers": phone_numbers}
|
|
3556
3251
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3557
3252
|
url = f"{self.base_url}/api/v2/rooms/{id}"
|
|
3558
3253
|
query_params = {}
|
|
@@ -3560,7 +3255,7 @@ class DialpadApp(APIApplication):
|
|
|
3560
3255
|
response.raise_for_status()
|
|
3561
3256
|
return response.json()
|
|
3562
3257
|
|
|
3563
|
-
def rooms_list(self, cursor=None, office_id=None) -> dict[str, Any]:
|
|
3258
|
+
async def rooms_list(self, cursor=None, office_id=None) -> dict[str, Any]:
|
|
3564
3259
|
"""
|
|
3565
3260
|
Retrieves a list of rooms, optionally filtered by office ID, using the provided cursor for pagination.
|
|
3566
3261
|
|
|
@@ -3575,16 +3270,12 @@ class DialpadApp(APIApplication):
|
|
|
3575
3270
|
rooms
|
|
3576
3271
|
"""
|
|
3577
3272
|
url = f"{self.base_url}/api/v2/rooms"
|
|
3578
|
-
query_params = {
|
|
3579
|
-
k: v
|
|
3580
|
-
for k, v in [("cursor", cursor), ("office_id", office_id)]
|
|
3581
|
-
if v is not None
|
|
3582
|
-
}
|
|
3273
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("office_id", office_id)] if v is not None}
|
|
3583
3274
|
response = self._get(url, params=query_params)
|
|
3584
3275
|
response.raise_for_status()
|
|
3585
3276
|
return response.json()
|
|
3586
3277
|
|
|
3587
|
-
def rooms_post(self, name=None, office_id=None) -> dict[str, Any]:
|
|
3278
|
+
async def rooms_post(self, name=None, office_id=None) -> dict[str, Any]:
|
|
3588
3279
|
"""
|
|
3589
3280
|
Creates a new room resource and returns a success response upon completion.
|
|
3590
3281
|
|
|
@@ -3600,10 +3291,7 @@ class DialpadApp(APIApplication):
|
|
|
3600
3291
|
Tags:
|
|
3601
3292
|
rooms
|
|
3602
3293
|
"""
|
|
3603
|
-
request_body = {
|
|
3604
|
-
"name": name,
|
|
3605
|
-
"office_id": office_id,
|
|
3606
|
-
}
|
|
3294
|
+
request_body = {"name": name, "office_id": office_id}
|
|
3607
3295
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3608
3296
|
url = f"{self.base_url}/api/v2/rooms"
|
|
3609
3297
|
query_params = {}
|
|
@@ -3611,9 +3299,7 @@ class DialpadApp(APIApplication):
|
|
|
3611
3299
|
response.raise_for_status()
|
|
3612
3300
|
return response.json()
|
|
3613
3301
|
|
|
3614
|
-
def deskphones_rooms_create_international_pin(
|
|
3615
|
-
self, customer_ref=None
|
|
3616
|
-
) -> dict[str, Any]:
|
|
3302
|
+
async def deskphones_rooms_create_international_pin(self, customer_ref=None) -> dict[str, Any]:
|
|
3617
3303
|
"""
|
|
3618
3304
|
Creates an international PIN for a room and returns the result.
|
|
3619
3305
|
|
|
@@ -3628,9 +3314,7 @@ class DialpadApp(APIApplication):
|
|
|
3628
3314
|
Tags:
|
|
3629
3315
|
rooms
|
|
3630
3316
|
"""
|
|
3631
|
-
request_body = {
|
|
3632
|
-
"customer_ref": customer_ref,
|
|
3633
|
-
}
|
|
3317
|
+
request_body = {"customer_ref": customer_ref}
|
|
3634
3318
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
3635
3319
|
url = f"{self.base_url}/api/v2/rooms/international_pin"
|
|
3636
3320
|
query_params = {}
|
|
@@ -3638,7 +3322,7 @@ class DialpadApp(APIApplication):
|
|
|
3638
3322
|
response.raise_for_status()
|
|
3639
3323
|
return response.json()
|
|
3640
3324
|
|
|
3641
|
-
def deskphones_rooms_delete(self, parent_id, id) -> Any:
|
|
3325
|
+
async def deskphones_rooms_delete(self, parent_id, id) -> Any:
|
|
3642
3326
|
"""
|
|
3643
3327
|
Deletes a deskphone with the specified ID from a room with the given parent ID using the DELETE method.
|
|
3644
3328
|
|
|
@@ -3662,7 +3346,7 @@ class DialpadApp(APIApplication):
|
|
|
3662
3346
|
response.raise_for_status()
|
|
3663
3347
|
return response.json()
|
|
3664
3348
|
|
|
3665
|
-
def deskphones_rooms_get(self, parent_id, id) -> dict[str, Any]:
|
|
3349
|
+
async def deskphones_rooms_get(self, parent_id, id) -> dict[str, Any]:
|
|
3666
3350
|
"""
|
|
3667
3351
|
Retrieves details of a specific desk phone identified by `{id}` within a room associated with `{parent_id}`.
|
|
3668
3352
|
|
|
@@ -3686,7 +3370,7 @@ class DialpadApp(APIApplication):
|
|
|
3686
3370
|
response.raise_for_status()
|
|
3687
3371
|
return response.json()
|
|
3688
3372
|
|
|
3689
|
-
def deskphones_rooms_list(self, parent_id) -> dict[str, Any]:
|
|
3373
|
+
async def deskphones_rooms_list(self, parent_id) -> dict[str, Any]:
|
|
3690
3374
|
"""
|
|
3691
3375
|
Retrieves a list of desk phones associated with a specific room, identified by the parent ID.
|
|
3692
3376
|
|
|
@@ -3707,7 +3391,7 @@ class DialpadApp(APIApplication):
|
|
|
3707
3391
|
response.raise_for_status()
|
|
3708
3392
|
return response.json()
|
|
3709
3393
|
|
|
3710
|
-
def schedule_reports_delete(self, id) -> dict[str, Any]:
|
|
3394
|
+
async def schedule_reports_delete(self, id) -> dict[str, Any]:
|
|
3711
3395
|
"""
|
|
3712
3396
|
Deletes a schedule report by ID using the DELETE method, returning a successful response if the operation is completed.
|
|
3713
3397
|
|
|
@@ -3728,7 +3412,7 @@ class DialpadApp(APIApplication):
|
|
|
3728
3412
|
response.raise_for_status()
|
|
3729
3413
|
return response.json()
|
|
3730
3414
|
|
|
3731
|
-
def schedule_reports_get(self, id) -> dict[str, Any]:
|
|
3415
|
+
async def schedule_reports_get(self, id) -> dict[str, Any]:
|
|
3732
3416
|
"""
|
|
3733
3417
|
Retrieves a scheduled report by its ID using the "GET" method, returning details or results of the specified report.
|
|
3734
3418
|
|
|
@@ -3749,7 +3433,7 @@ class DialpadApp(APIApplication):
|
|
|
3749
3433
|
response.raise_for_status()
|
|
3750
3434
|
return response.json()
|
|
3751
3435
|
|
|
3752
|
-
def schedule_reports_update(
|
|
3436
|
+
async def schedule_reports_update(
|
|
3753
3437
|
self,
|
|
3754
3438
|
id,
|
|
3755
3439
|
at=None,
|
|
@@ -3811,7 +3495,7 @@ class DialpadApp(APIApplication):
|
|
|
3811
3495
|
response.raise_for_status()
|
|
3812
3496
|
return response.json()
|
|
3813
3497
|
|
|
3814
|
-
def schedule_reports_list(self, cursor=None) -> dict[str, Any]:
|
|
3498
|
+
async def schedule_reports_list(self, cursor=None) -> dict[str, Any]:
|
|
3815
3499
|
"""
|
|
3816
3500
|
Retrieves a list of scheduled reports, optionally paginated by a cursor, and returns them in response.
|
|
3817
3501
|
|
|
@@ -3830,7 +3514,7 @@ class DialpadApp(APIApplication):
|
|
|
3830
3514
|
response.raise_for_status()
|
|
3831
3515
|
return response.json()
|
|
3832
3516
|
|
|
3833
|
-
def schedule_reports_create(
|
|
3517
|
+
async def schedule_reports_create(
|
|
3834
3518
|
self,
|
|
3835
3519
|
at=None,
|
|
3836
3520
|
coaching_group=None,
|
|
@@ -3888,7 +3572,7 @@ class DialpadApp(APIApplication):
|
|
|
3888
3572
|
response.raise_for_status()
|
|
3889
3573
|
return response.json()
|
|
3890
3574
|
|
|
3891
|
-
def sms_send(
|
|
3575
|
+
async def sms_send(
|
|
3892
3576
|
self,
|
|
3893
3577
|
channel_hashtag=None,
|
|
3894
3578
|
from_number=None,
|
|
@@ -3940,7 +3624,7 @@ class DialpadApp(APIApplication):
|
|
|
3940
3624
|
response.raise_for_status()
|
|
3941
3625
|
return response.json()
|
|
3942
3626
|
|
|
3943
|
-
def stats_get(self, id) -> dict[str, Any]:
|
|
3627
|
+
async def stats_get(self, id) -> dict[str, Any]:
|
|
3944
3628
|
"""
|
|
3945
3629
|
Retrieves statistics for the specified resource identified by the provided ID.
|
|
3946
3630
|
|
|
@@ -3961,7 +3645,7 @@ class DialpadApp(APIApplication):
|
|
|
3961
3645
|
response.raise_for_status()
|
|
3962
3646
|
return response.json()
|
|
3963
3647
|
|
|
3964
|
-
def stats_create(
|
|
3648
|
+
async def stats_create(
|
|
3965
3649
|
self,
|
|
3966
3650
|
coaching_group=None,
|
|
3967
3651
|
coaching_team=None,
|
|
@@ -4032,9 +3716,7 @@ class DialpadApp(APIApplication):
|
|
|
4032
3716
|
response.raise_for_status()
|
|
4033
3717
|
return response.json()
|
|
4034
3718
|
|
|
4035
|
-
def webhook_agent_status_event_subscription_list(
|
|
4036
|
-
self, cursor=None
|
|
4037
|
-
) -> dict[str, Any]:
|
|
3719
|
+
async def webhook_agent_status_event_subscription_list(self, cursor=None) -> dict[str, Any]:
|
|
4038
3720
|
"""
|
|
4039
3721
|
Retrieves the current status of agent subscriptions, optionally paginated using a cursor parameter.
|
|
4040
3722
|
|
|
@@ -4053,9 +3735,7 @@ class DialpadApp(APIApplication):
|
|
|
4053
3735
|
response.raise_for_status()
|
|
4054
3736
|
return response.json()
|
|
4055
3737
|
|
|
4056
|
-
def webhook_agent_status_event_subscription_create(
|
|
4057
|
-
self, agent_type=None, enabled=None, endpoint_id=None
|
|
4058
|
-
) -> dict[str, Any]:
|
|
3738
|
+
async def webhook_agent_status_event_subscription_create(self, agent_type=None, enabled=None, endpoint_id=None) -> dict[str, Any]:
|
|
4059
3739
|
"""
|
|
4060
3740
|
Updates the agent status for a subscription using JSON data and returns a successful response.
|
|
4061
3741
|
|
|
@@ -4070,11 +3750,7 @@ class DialpadApp(APIApplication):
|
|
|
4070
3750
|
Tags:
|
|
4071
3751
|
subscriptions
|
|
4072
3752
|
"""
|
|
4073
|
-
request_body = {
|
|
4074
|
-
"agent_type": agent_type,
|
|
4075
|
-
"enabled": enabled,
|
|
4076
|
-
"endpoint_id": endpoint_id,
|
|
4077
|
-
}
|
|
3753
|
+
request_body = {"agent_type": agent_type, "enabled": enabled, "endpoint_id": endpoint_id}
|
|
4078
3754
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4079
3755
|
url = f"{self.base_url}/api/v2/subscriptions/agent_status"
|
|
4080
3756
|
query_params = {}
|
|
@@ -4082,7 +3758,7 @@ class DialpadApp(APIApplication):
|
|
|
4082
3758
|
response.raise_for_status()
|
|
4083
3759
|
return response.json()
|
|
4084
3760
|
|
|
4085
|
-
def webhook_agent_status_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
3761
|
+
async def webhook_agent_status_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4086
3762
|
"""
|
|
4087
3763
|
Deletes an agent status event subscription by its unique identifier.
|
|
4088
3764
|
|
|
@@ -4103,7 +3779,7 @@ class DialpadApp(APIApplication):
|
|
|
4103
3779
|
response.raise_for_status()
|
|
4104
3780
|
return response.json()
|
|
4105
3781
|
|
|
4106
|
-
def webhook_agent_status_event_subscription_get(self, id) -> dict[str, Any]:
|
|
3782
|
+
async def webhook_agent_status_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4107
3783
|
"""
|
|
4108
3784
|
Retrieves the status information of a subscription agent identified by the given ID.
|
|
4109
3785
|
|
|
@@ -4124,9 +3800,7 @@ class DialpadApp(APIApplication):
|
|
|
4124
3800
|
response.raise_for_status()
|
|
4125
3801
|
return response.json()
|
|
4126
3802
|
|
|
4127
|
-
def webhook_agent_status_event_subscription_update(
|
|
4128
|
-
self, id, agent_type=None, enabled=None, endpoint_id=None
|
|
4129
|
-
) -> dict[str, Any]:
|
|
3803
|
+
async def webhook_agent_status_event_subscription_update(self, id, agent_type=None, enabled=None, endpoint_id=None) -> dict[str, Any]:
|
|
4130
3804
|
"""
|
|
4131
3805
|
Updates the status of a specific agent subscription using a JSON payload.
|
|
4132
3806
|
|
|
@@ -4145,11 +3819,7 @@ class DialpadApp(APIApplication):
|
|
|
4145
3819
|
"""
|
|
4146
3820
|
if id is None:
|
|
4147
3821
|
raise ValueError("Missing required parameter 'id'")
|
|
4148
|
-
request_body = {
|
|
4149
|
-
"agent_type": agent_type,
|
|
4150
|
-
"enabled": enabled,
|
|
4151
|
-
"endpoint_id": endpoint_id,
|
|
4152
|
-
}
|
|
3822
|
+
request_body = {"agent_type": agent_type, "enabled": enabled, "endpoint_id": endpoint_id}
|
|
4153
3823
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4154
3824
|
url = f"{self.base_url}/api/v2/subscriptions/agent_status/{id}"
|
|
4155
3825
|
query_params = {}
|
|
@@ -4157,9 +3827,7 @@ class DialpadApp(APIApplication):
|
|
|
4157
3827
|
response.raise_for_status()
|
|
4158
3828
|
return response.json()
|
|
4159
3829
|
|
|
4160
|
-
def webhook_call_event_subscription_list(
|
|
4161
|
-
self, cursor=None, target_type=None, target_id=None
|
|
4162
|
-
) -> dict[str, Any]:
|
|
3830
|
+
async def webhook_call_event_subscription_list(self, cursor=None, target_type=None, target_id=None) -> dict[str, Any]:
|
|
4163
3831
|
"""
|
|
4164
3832
|
Retrieves information about a call subscription using optional parameters for cursor, target type, and target ID.
|
|
4165
3833
|
|
|
@@ -4175,27 +3843,13 @@ class DialpadApp(APIApplication):
|
|
|
4175
3843
|
subscriptions
|
|
4176
3844
|
"""
|
|
4177
3845
|
url = f"{self.base_url}/api/v2/subscriptions/call"
|
|
4178
|
-
query_params = {
|
|
4179
|
-
k: v
|
|
4180
|
-
for k, v in [
|
|
4181
|
-
("cursor", cursor),
|
|
4182
|
-
("target_type", target_type),
|
|
4183
|
-
("target_id", target_id),
|
|
4184
|
-
]
|
|
4185
|
-
if v is not None
|
|
4186
|
-
}
|
|
3846
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("target_type", target_type), ("target_id", target_id)] if v is not None}
|
|
4187
3847
|
response = self._get(url, params=query_params)
|
|
4188
3848
|
response.raise_for_status()
|
|
4189
3849
|
return response.json()
|
|
4190
3850
|
|
|
4191
|
-
def webhook_call_event_subscription_create(
|
|
4192
|
-
self,
|
|
4193
|
-
call_states=None,
|
|
4194
|
-
enabled=None,
|
|
4195
|
-
endpoint_id=None,
|
|
4196
|
-
group_calls_only=None,
|
|
4197
|
-
target_id=None,
|
|
4198
|
-
target_type=None,
|
|
3851
|
+
async def webhook_call_event_subscription_create(
|
|
3852
|
+
self, call_states=None, enabled=None, endpoint_id=None, group_calls_only=None, target_id=None, target_type=None
|
|
4199
3853
|
) -> dict[str, Any]:
|
|
4200
3854
|
"""
|
|
4201
3855
|
Subscribes a user to a call notification service using a JSON payload and returns a success response upon successful subscription.
|
|
@@ -4229,7 +3883,7 @@ class DialpadApp(APIApplication):
|
|
|
4229
3883
|
response.raise_for_status()
|
|
4230
3884
|
return response.json()
|
|
4231
3885
|
|
|
4232
|
-
def webhook_call_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
3886
|
+
async def webhook_call_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4233
3887
|
"""
|
|
4234
3888
|
Cancels a subscription identified by the provided ID using the DELETE method, preventing future charges and updating the subscription status to canceled.
|
|
4235
3889
|
|
|
@@ -4250,7 +3904,7 @@ class DialpadApp(APIApplication):
|
|
|
4250
3904
|
response.raise_for_status()
|
|
4251
3905
|
return response.json()
|
|
4252
3906
|
|
|
4253
|
-
def webhook_call_event_subscription_get(self, id) -> dict[str, Any]:
|
|
3907
|
+
async def webhook_call_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4254
3908
|
"""
|
|
4255
3909
|
Retrieves the subscription details identified by the specified subscription ID.
|
|
4256
3910
|
|
|
@@ -4271,15 +3925,8 @@ class DialpadApp(APIApplication):
|
|
|
4271
3925
|
response.raise_for_status()
|
|
4272
3926
|
return response.json()
|
|
4273
3927
|
|
|
4274
|
-
def webhook_call_event_subscription_update(
|
|
4275
|
-
self,
|
|
4276
|
-
id,
|
|
4277
|
-
call_states=None,
|
|
4278
|
-
enabled=None,
|
|
4279
|
-
endpoint_id=None,
|
|
4280
|
-
group_calls_only=None,
|
|
4281
|
-
target_id=None,
|
|
4282
|
-
target_type=None,
|
|
3928
|
+
async def webhook_call_event_subscription_update(
|
|
3929
|
+
self, id, call_states=None, enabled=None, endpoint_id=None, group_calls_only=None, target_id=None, target_type=None
|
|
4283
3930
|
) -> dict[str, Any]:
|
|
4284
3931
|
"""
|
|
4285
3932
|
Partially updates a subscription identified by the provided ID using the PATCH method, allowing for selective modification of specific fields in the subscription resource.
|
|
@@ -4317,7 +3964,7 @@ class DialpadApp(APIApplication):
|
|
|
4317
3964
|
response.raise_for_status()
|
|
4318
3965
|
return response.json()
|
|
4319
3966
|
|
|
4320
|
-
def webhook_change_log_event_subscription_list(self, cursor=None) -> dict[str, Any]:
|
|
3967
|
+
async def webhook_change_log_event_subscription_list(self, cursor=None) -> dict[str, Any]:
|
|
4321
3968
|
"""
|
|
4322
3969
|
Retrieves a changelog of subscription updates using the "GET" method, optionally filtering results by a specified cursor, and authenticates via either an API key or Bearer token.
|
|
4323
3970
|
|
|
@@ -4336,9 +3983,7 @@ class DialpadApp(APIApplication):
|
|
|
4336
3983
|
response.raise_for_status()
|
|
4337
3984
|
return response.json()
|
|
4338
3985
|
|
|
4339
|
-
def webhook_change_log_event_subscription_create(
|
|
4340
|
-
self, enabled=None, endpoint_id=None
|
|
4341
|
-
) -> dict[str, Any]:
|
|
3986
|
+
async def webhook_change_log_event_subscription_create(self, enabled=None, endpoint_id=None) -> dict[str, Any]:
|
|
4342
3987
|
"""
|
|
4343
3988
|
Submits a subscription changelog entry by posting JSON data and returns a 200 response if successful, with authentication handled via API key or bearer token.
|
|
4344
3989
|
|
|
@@ -4352,10 +3997,7 @@ class DialpadApp(APIApplication):
|
|
|
4352
3997
|
Tags:
|
|
4353
3998
|
subscriptions
|
|
4354
3999
|
"""
|
|
4355
|
-
request_body = {
|
|
4356
|
-
"enabled": enabled,
|
|
4357
|
-
"endpoint_id": endpoint_id,
|
|
4358
|
-
}
|
|
4000
|
+
request_body = {"enabled": enabled, "endpoint_id": endpoint_id}
|
|
4359
4001
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4360
4002
|
url = f"{self.base_url}/api/v2/subscriptions/changelog"
|
|
4361
4003
|
query_params = {}
|
|
@@ -4363,7 +4005,7 @@ class DialpadApp(APIApplication):
|
|
|
4363
4005
|
response.raise_for_status()
|
|
4364
4006
|
return response.json()
|
|
4365
4007
|
|
|
4366
|
-
def webhook_change_log_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4008
|
+
async def webhook_change_log_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4367
4009
|
"""
|
|
4368
4010
|
Deletes a specific changelog entry identified by the provided ID using the "DELETE" method.
|
|
4369
4011
|
|
|
@@ -4384,7 +4026,7 @@ class DialpadApp(APIApplication):
|
|
|
4384
4026
|
response.raise_for_status()
|
|
4385
4027
|
return response.json()
|
|
4386
4028
|
|
|
4387
|
-
def webhook_change_log_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4029
|
+
async def webhook_change_log_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4388
4030
|
"""
|
|
4389
4031
|
Retrieves the changelog for a specific subscription with the given ID using a GET request, requiring either an API key in the URL or a Bearer token for authentication.
|
|
4390
4032
|
|
|
@@ -4405,9 +4047,7 @@ class DialpadApp(APIApplication):
|
|
|
4405
4047
|
response.raise_for_status()
|
|
4406
4048
|
return response.json()
|
|
4407
4049
|
|
|
4408
|
-
def webhook_change_log_event_subscription_update(
|
|
4409
|
-
self, id, enabled=None, endpoint_id=None
|
|
4410
|
-
) -> dict[str, Any]:
|
|
4050
|
+
async def webhook_change_log_event_subscription_update(self, id, enabled=None, endpoint_id=None) -> dict[str, Any]:
|
|
4411
4051
|
"""
|
|
4412
4052
|
Updates a specific changelog subscription by modifying its properties using a JSON patch document, and returns a status message indicating the success of the operation.
|
|
4413
4053
|
|
|
@@ -4425,10 +4065,7 @@ class DialpadApp(APIApplication):
|
|
|
4425
4065
|
"""
|
|
4426
4066
|
if id is None:
|
|
4427
4067
|
raise ValueError("Missing required parameter 'id'")
|
|
4428
|
-
request_body = {
|
|
4429
|
-
"enabled": enabled,
|
|
4430
|
-
"endpoint_id": endpoint_id,
|
|
4431
|
-
}
|
|
4068
|
+
request_body = {"enabled": enabled, "endpoint_id": endpoint_id}
|
|
4432
4069
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4433
4070
|
url = f"{self.base_url}/api/v2/subscriptions/changelog/{id}"
|
|
4434
4071
|
query_params = {}
|
|
@@ -4436,7 +4073,7 @@ class DialpadApp(APIApplication):
|
|
|
4436
4073
|
response.raise_for_status()
|
|
4437
4074
|
return response.json()
|
|
4438
4075
|
|
|
4439
|
-
def webhook_contact_event_subscription_list(self, cursor=None) -> dict[str, Any]:
|
|
4076
|
+
async def webhook_contact_event_subscription_list(self, cursor=None) -> dict[str, Any]:
|
|
4440
4077
|
"""
|
|
4441
4078
|
Retrieves a list of contact details for subscriptions, allowing pagination via a cursor parameter.
|
|
4442
4079
|
|
|
@@ -4455,9 +4092,7 @@ class DialpadApp(APIApplication):
|
|
|
4455
4092
|
response.raise_for_status()
|
|
4456
4093
|
return response.json()
|
|
4457
4094
|
|
|
4458
|
-
def webhook_contact_event_subscription_create(
|
|
4459
|
-
self, contact_type=None, enabled=None, endpoint_id=None
|
|
4460
|
-
) -> dict[str, Any]:
|
|
4095
|
+
async def webhook_contact_event_subscription_create(self, contact_type=None, enabled=None, endpoint_id=None) -> dict[str, Any]:
|
|
4461
4096
|
"""
|
|
4462
4097
|
Creates a new contact subscription using the provided JSON data and returns a successful response.
|
|
4463
4098
|
|
|
@@ -4472,11 +4107,7 @@ class DialpadApp(APIApplication):
|
|
|
4472
4107
|
Tags:
|
|
4473
4108
|
subscriptions
|
|
4474
4109
|
"""
|
|
4475
|
-
request_body = {
|
|
4476
|
-
"contact_type": contact_type,
|
|
4477
|
-
"enabled": enabled,
|
|
4478
|
-
"endpoint_id": endpoint_id,
|
|
4479
|
-
}
|
|
4110
|
+
request_body = {"contact_type": contact_type, "enabled": enabled, "endpoint_id": endpoint_id}
|
|
4480
4111
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4481
4112
|
url = f"{self.base_url}/api/v2/subscriptions/contact"
|
|
4482
4113
|
query_params = {}
|
|
@@ -4484,7 +4115,7 @@ class DialpadApp(APIApplication):
|
|
|
4484
4115
|
response.raise_for_status()
|
|
4485
4116
|
return response.json()
|
|
4486
4117
|
|
|
4487
|
-
def webhook_contact_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4118
|
+
async def webhook_contact_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4488
4119
|
"""
|
|
4489
4120
|
Deletes a subscription associated with a specific contact ID, removing the subscription from the system and preventing future charges.
|
|
4490
4121
|
|
|
@@ -4505,7 +4136,7 @@ class DialpadApp(APIApplication):
|
|
|
4505
4136
|
response.raise_for_status()
|
|
4506
4137
|
return response.json()
|
|
4507
4138
|
|
|
4508
|
-
def webhook_contact_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4139
|
+
async def webhook_contact_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4509
4140
|
"""
|
|
4510
4141
|
Retrieves a subscription associated with a specific contact by their ID using the GET method.
|
|
4511
4142
|
|
|
@@ -4526,9 +4157,7 @@ class DialpadApp(APIApplication):
|
|
|
4526
4157
|
response.raise_for_status()
|
|
4527
4158
|
return response.json()
|
|
4528
4159
|
|
|
4529
|
-
def webhook_contact_event_subscription_update(
|
|
4530
|
-
self, id, contact_type=None, enabled=None, endpoint_id=None
|
|
4531
|
-
) -> dict[str, Any]:
|
|
4160
|
+
async def webhook_contact_event_subscription_update(self, id, contact_type=None, enabled=None, endpoint_id=None) -> dict[str, Any]:
|
|
4532
4161
|
"""
|
|
4533
4162
|
Modifies a specific subscription contact by ID using a JSON patch document to update its properties.
|
|
4534
4163
|
|
|
@@ -4547,11 +4176,7 @@ class DialpadApp(APIApplication):
|
|
|
4547
4176
|
"""
|
|
4548
4177
|
if id is None:
|
|
4549
4178
|
raise ValueError("Missing required parameter 'id'")
|
|
4550
|
-
request_body = {
|
|
4551
|
-
"contact_type": contact_type,
|
|
4552
|
-
"enabled": enabled,
|
|
4553
|
-
"endpoint_id": endpoint_id,
|
|
4554
|
-
}
|
|
4179
|
+
request_body = {"contact_type": contact_type, "enabled": enabled, "endpoint_id": endpoint_id}
|
|
4555
4180
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4556
4181
|
url = f"{self.base_url}/api/v2/subscriptions/contact/{id}"
|
|
4557
4182
|
query_params = {}
|
|
@@ -4559,9 +4184,7 @@ class DialpadApp(APIApplication):
|
|
|
4559
4184
|
response.raise_for_status()
|
|
4560
4185
|
return response.json()
|
|
4561
4186
|
|
|
4562
|
-
def webhook_sms_event_subscription_list(
|
|
4563
|
-
self, cursor=None, target_type=None, target_id=None
|
|
4564
|
-
) -> dict[str, Any]:
|
|
4187
|
+
async def webhook_sms_event_subscription_list(self, cursor=None, target_type=None, target_id=None) -> dict[str, Any]:
|
|
4565
4188
|
"""
|
|
4566
4189
|
Retrieves a list of SMS subscriptions, optionally filtered by cursor, target type, and target ID.
|
|
4567
4190
|
|
|
@@ -4577,28 +4200,13 @@ class DialpadApp(APIApplication):
|
|
|
4577
4200
|
subscriptions
|
|
4578
4201
|
"""
|
|
4579
4202
|
url = f"{self.base_url}/api/v2/subscriptions/sms"
|
|
4580
|
-
query_params = {
|
|
4581
|
-
k: v
|
|
4582
|
-
for k, v in [
|
|
4583
|
-
("cursor", cursor),
|
|
4584
|
-
("target_type", target_type),
|
|
4585
|
-
("target_id", target_id),
|
|
4586
|
-
]
|
|
4587
|
-
if v is not None
|
|
4588
|
-
}
|
|
4203
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("target_type", target_type), ("target_id", target_id)] if v is not None}
|
|
4589
4204
|
response = self._get(url, params=query_params)
|
|
4590
4205
|
response.raise_for_status()
|
|
4591
4206
|
return response.json()
|
|
4592
4207
|
|
|
4593
|
-
def webhook_sms_event_subscription_create(
|
|
4594
|
-
self,
|
|
4595
|
-
direction=None,
|
|
4596
|
-
enabled=None,
|
|
4597
|
-
endpoint_id=None,
|
|
4598
|
-
include_internal=None,
|
|
4599
|
-
status=None,
|
|
4600
|
-
target_id=None,
|
|
4601
|
-
target_type=None,
|
|
4208
|
+
async def webhook_sms_event_subscription_create(
|
|
4209
|
+
self, direction=None, enabled=None, endpoint_id=None, include_internal=None, status=None, target_id=None, target_type=None
|
|
4602
4210
|
) -> dict[str, Any]:
|
|
4603
4211
|
"""
|
|
4604
4212
|
Sends a subscription request for SMS notifications by creating an SMS subscription.
|
|
@@ -4634,7 +4242,7 @@ class DialpadApp(APIApplication):
|
|
|
4634
4242
|
response.raise_for_status()
|
|
4635
4243
|
return response.json()
|
|
4636
4244
|
|
|
4637
|
-
def webhook_sms_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4245
|
+
async def webhook_sms_event_subscription_delete(self, id) -> dict[str, Any]:
|
|
4638
4246
|
"""
|
|
4639
4247
|
Cancels an SMS subscription by its ID using the DELETE method, removing future charges and updating the subscription status to reflect cancellation.
|
|
4640
4248
|
|
|
@@ -4655,7 +4263,7 @@ class DialpadApp(APIApplication):
|
|
|
4655
4263
|
response.raise_for_status()
|
|
4656
4264
|
return response.json()
|
|
4657
4265
|
|
|
4658
|
-
def webhook_sms_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4266
|
+
async def webhook_sms_event_subscription_get(self, id) -> dict[str, Any]:
|
|
4659
4267
|
"""
|
|
4660
4268
|
Retrieves the details of a specific SMS subscription identified by the provided subscription ID.
|
|
4661
4269
|
|
|
@@ -4676,16 +4284,8 @@ class DialpadApp(APIApplication):
|
|
|
4676
4284
|
response.raise_for_status()
|
|
4677
4285
|
return response.json()
|
|
4678
4286
|
|
|
4679
|
-
def webhook_sms_event_subscription_update(
|
|
4680
|
-
self,
|
|
4681
|
-
id,
|
|
4682
|
-
direction=None,
|
|
4683
|
-
enabled=None,
|
|
4684
|
-
endpoint_id=None,
|
|
4685
|
-
include_internal=None,
|
|
4686
|
-
status=None,
|
|
4687
|
-
target_id=None,
|
|
4688
|
-
target_type=None,
|
|
4287
|
+
async def webhook_sms_event_subscription_update(
|
|
4288
|
+
self, id, direction=None, enabled=None, endpoint_id=None, include_internal=None, status=None, target_id=None, target_type=None
|
|
4689
4289
|
) -> dict[str, Any]:
|
|
4690
4290
|
"""
|
|
4691
4291
|
Updates an SMS subscription identified by its ID, modifying specific properties using JSON Patch operations.
|
|
@@ -4725,7 +4325,7 @@ class DialpadApp(APIApplication):
|
|
|
4725
4325
|
response.raise_for_status()
|
|
4726
4326
|
return response.json()
|
|
4727
4327
|
|
|
4728
|
-
def transcripts_get(self, call_id) -> dict[str, Any]:
|
|
4328
|
+
async def transcripts_get(self, call_id) -> dict[str, Any]:
|
|
4729
4329
|
"""
|
|
4730
4330
|
Retrieves a transcript for a specific call identified by the call ID using the GET method.
|
|
4731
4331
|
|
|
@@ -4746,7 +4346,7 @@ class DialpadApp(APIApplication):
|
|
|
4746
4346
|
response.raise_for_status()
|
|
4747
4347
|
return response.json()
|
|
4748
4348
|
|
|
4749
|
-
def transcripts_get_url(self, call_id) -> dict[str, Any]:
|
|
4349
|
+
async def transcripts_get_url(self, call_id) -> dict[str, Any]:
|
|
4750
4350
|
"""
|
|
4751
4351
|
Retrieves the URL for a transcript associated with a specific call ID using the GET method.
|
|
4752
4352
|
|
|
@@ -4767,7 +4367,7 @@ class DialpadApp(APIApplication):
|
|
|
4767
4367
|
response.raise_for_status()
|
|
4768
4368
|
return response.json()
|
|
4769
4369
|
|
|
4770
|
-
def userdevices_get(self, id) -> dict[str, Any]:
|
|
4370
|
+
async def userdevices_get(self, id) -> dict[str, Any]:
|
|
4771
4371
|
"""
|
|
4772
4372
|
Retrieves details about a user device specified by its ID using the GET method.
|
|
4773
4373
|
|
|
@@ -4788,7 +4388,7 @@ class DialpadApp(APIApplication):
|
|
|
4788
4388
|
response.raise_for_status()
|
|
4789
4389
|
return response.json()
|
|
4790
4390
|
|
|
4791
|
-
def userdevices_list(self, cursor=None, user_id=None) -> dict[str, Any]:
|
|
4391
|
+
async def userdevices_list(self, cursor=None, user_id=None) -> dict[str, Any]:
|
|
4792
4392
|
"""
|
|
4793
4393
|
Retrieves a list of user devices, optionally filtered by a user ID or a cursor for pagination.
|
|
4794
4394
|
|
|
@@ -4803,21 +4403,13 @@ class DialpadApp(APIApplication):
|
|
|
4803
4403
|
userdevices
|
|
4804
4404
|
"""
|
|
4805
4405
|
url = f"{self.base_url}/api/v2/userdevices"
|
|
4806
|
-
query_params = {
|
|
4807
|
-
k: v for k, v in [("cursor", cursor), ("user_id", user_id)] if v is not None
|
|
4808
|
-
}
|
|
4406
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("user_id", user_id)] if v is not None}
|
|
4809
4407
|
response = self._get(url, params=query_params)
|
|
4810
4408
|
response.raise_for_status()
|
|
4811
4409
|
return response.json()
|
|
4812
4410
|
|
|
4813
|
-
def users_initiate_call(
|
|
4814
|
-
self,
|
|
4815
|
-
id,
|
|
4816
|
-
custom_data=None,
|
|
4817
|
-
group_id=None,
|
|
4818
|
-
group_type=None,
|
|
4819
|
-
outbound_caller_id=None,
|
|
4820
|
-
phone_number=None,
|
|
4411
|
+
async def users_initiate_call(
|
|
4412
|
+
self, id, custom_data=None, group_id=None, group_type=None, outbound_caller_id=None, phone_number=None
|
|
4821
4413
|
) -> dict[str, Any]:
|
|
4822
4414
|
"""
|
|
4823
4415
|
Initiates a call for a user identified by the provided ID using the POST method, sending JSON data in the request body.
|
|
@@ -4855,9 +4447,7 @@ class DialpadApp(APIApplication):
|
|
|
4855
4447
|
response.raise_for_status()
|
|
4856
4448
|
return response.json()
|
|
4857
4449
|
|
|
4858
|
-
def users_update_active_call(
|
|
4859
|
-
self, id, is_recording=None, play_message=None, recording_type=None
|
|
4860
|
-
) -> dict[str, Any]:
|
|
4450
|
+
async def users_update_active_call(self, id, is_recording=None, play_message=None, recording_type=None) -> dict[str, Any]:
|
|
4861
4451
|
"""
|
|
4862
4452
|
Updates the active call status for a user with the specified ID using the PATCH method and returns a status message.
|
|
4863
4453
|
|
|
@@ -4878,11 +4468,7 @@ class DialpadApp(APIApplication):
|
|
|
4878
4468
|
"""
|
|
4879
4469
|
if id is None:
|
|
4880
4470
|
raise ValueError("Missing required parameter 'id'")
|
|
4881
|
-
request_body = {
|
|
4882
|
-
"is_recording": is_recording,
|
|
4883
|
-
"play_message": play_message,
|
|
4884
|
-
"recording_type": recording_type,
|
|
4885
|
-
}
|
|
4471
|
+
request_body = {"is_recording": is_recording, "play_message": play_message, "recording_type": recording_type}
|
|
4886
4472
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4887
4473
|
url = f"{self.base_url}/api/v2/users/{id}/activecall"
|
|
4888
4474
|
query_params = {}
|
|
@@ -4890,7 +4476,7 @@ class DialpadApp(APIApplication):
|
|
|
4890
4476
|
response.raise_for_status()
|
|
4891
4477
|
return response.json()
|
|
4892
4478
|
|
|
4893
|
-
def users_toggle_call_vi(self, id, enable_vi=None) -> dict[str, Any]:
|
|
4479
|
+
async def users_toggle_call_vi(self, id, enable_vi=None) -> dict[str, Any]:
|
|
4894
4480
|
"""
|
|
4895
4481
|
Toggles the "vi" setting for a user with the specified ID using the PATCH method.
|
|
4896
4482
|
|
|
@@ -4906,9 +4492,7 @@ class DialpadApp(APIApplication):
|
|
|
4906
4492
|
"""
|
|
4907
4493
|
if id is None:
|
|
4908
4494
|
raise ValueError("Missing required parameter 'id'")
|
|
4909
|
-
request_body = {
|
|
4910
|
-
"enable_vi": enable_vi,
|
|
4911
|
-
}
|
|
4495
|
+
request_body = {"enable_vi": enable_vi}
|
|
4912
4496
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4913
4497
|
url = f"{self.base_url}/api/v2/users/{id}/togglevi"
|
|
4914
4498
|
query_params = {}
|
|
@@ -4916,7 +4500,7 @@ class DialpadApp(APIApplication):
|
|
|
4916
4500
|
response.raise_for_status()
|
|
4917
4501
|
return response.json()
|
|
4918
4502
|
|
|
4919
|
-
def caller_id_users_get(self, id) -> dict[str, Any]:
|
|
4503
|
+
async def caller_id_users_get(self, id) -> dict[str, Any]:
|
|
4920
4504
|
"""
|
|
4921
4505
|
Retrieves the caller ID information for a user identified by the provided ID using the GET method.
|
|
4922
4506
|
|
|
@@ -4937,7 +4521,7 @@ class DialpadApp(APIApplication):
|
|
|
4937
4521
|
response.raise_for_status()
|
|
4938
4522
|
return response.json()
|
|
4939
4523
|
|
|
4940
|
-
def caller_id_users_post(self, id, caller_id=None) -> dict[str, Any]:
|
|
4524
|
+
async def caller_id_users_post(self, id, caller_id=None) -> dict[str, Any]:
|
|
4941
4525
|
"""
|
|
4942
4526
|
Updates the caller ID for a user with the specified ID using a JSON payload and returns a successful response upon completion.
|
|
4943
4527
|
|
|
@@ -4953,9 +4537,7 @@ class DialpadApp(APIApplication):
|
|
|
4953
4537
|
"""
|
|
4954
4538
|
if id is None:
|
|
4955
4539
|
raise ValueError("Missing required parameter 'id'")
|
|
4956
|
-
request_body = {
|
|
4957
|
-
"caller_id": caller_id,
|
|
4958
|
-
}
|
|
4540
|
+
request_body = {"caller_id": caller_id}
|
|
4959
4541
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
4960
4542
|
url = f"{self.base_url}/api/v2/users/{id}/caller_id"
|
|
4961
4543
|
query_params = {}
|
|
@@ -4963,7 +4545,7 @@ class DialpadApp(APIApplication):
|
|
|
4963
4545
|
response.raise_for_status()
|
|
4964
4546
|
return response.json()
|
|
4965
4547
|
|
|
4966
|
-
def deskphones_users_delete(self, parent_id, id) -> Any:
|
|
4548
|
+
async def deskphones_users_delete(self, parent_id, id) -> Any:
|
|
4967
4549
|
"""
|
|
4968
4550
|
Deletes a specific deskphone associated with a user identified by the parent ID and deskphone ID using the DELETE method.
|
|
4969
4551
|
|
|
@@ -4987,7 +4569,7 @@ class DialpadApp(APIApplication):
|
|
|
4987
4569
|
response.raise_for_status()
|
|
4988
4570
|
return response.json()
|
|
4989
4571
|
|
|
4990
|
-
def deskphones_users_get(self, parent_id, id) -> dict[str, Any]:
|
|
4572
|
+
async def deskphones_users_get(self, parent_id, id) -> dict[str, Any]:
|
|
4991
4573
|
"""
|
|
4992
4574
|
Retrieves details of a specific desk phone associated with a user, identified by the parent ID and desk phone ID.
|
|
4993
4575
|
|
|
@@ -5011,7 +4593,7 @@ class DialpadApp(APIApplication):
|
|
|
5011
4593
|
response.raise_for_status()
|
|
5012
4594
|
return response.json()
|
|
5013
4595
|
|
|
5014
|
-
def deskphones_users_list(self, parent_id) -> dict[str, Any]:
|
|
4596
|
+
async def deskphones_users_list(self, parent_id) -> dict[str, Any]:
|
|
5015
4597
|
"""
|
|
5016
4598
|
Retrieves a list of desk phones associated with a specific parent ID.
|
|
5017
4599
|
|
|
@@ -5032,9 +4614,7 @@ class DialpadApp(APIApplication):
|
|
|
5032
4614
|
response.raise_for_status()
|
|
5033
4615
|
return response.json()
|
|
5034
4616
|
|
|
5035
|
-
def numbers_assign_user_number_post(
|
|
5036
|
-
self, id, area_code=None, number=None, primary=None
|
|
5037
|
-
) -> dict[str, Any]:
|
|
4617
|
+
async def numbers_assign_user_number_post(self, id, area_code=None, number=None, primary=None) -> dict[str, Any]:
|
|
5038
4618
|
"""
|
|
5039
4619
|
Assigns a number to the user identified by the given ID using a POST request with JSON payload and returns a 200 status on success.
|
|
5040
4620
|
|
|
@@ -5052,11 +4632,7 @@ class DialpadApp(APIApplication):
|
|
|
5052
4632
|
"""
|
|
5053
4633
|
if id is None:
|
|
5054
4634
|
raise ValueError("Missing required parameter 'id'")
|
|
5055
|
-
request_body = {
|
|
5056
|
-
"area_code": area_code,
|
|
5057
|
-
"number": number,
|
|
5058
|
-
"primary": primary,
|
|
5059
|
-
}
|
|
4635
|
+
request_body = {"area_code": area_code, "number": number, "primary": primary}
|
|
5060
4636
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5061
4637
|
url = f"{self.base_url}/api/v2/users/{id}/assign_number"
|
|
5062
4638
|
query_params = {}
|
|
@@ -5064,7 +4640,7 @@ class DialpadApp(APIApplication):
|
|
|
5064
4640
|
response.raise_for_status()
|
|
5065
4641
|
return response.json()
|
|
5066
4642
|
|
|
5067
|
-
def numbers_user_unassign_number_post(self, id, number=None) -> dict[str, Any]:
|
|
4643
|
+
async def numbers_user_unassign_number_post(self, id, number=None) -> dict[str, Any]:
|
|
5068
4644
|
"""
|
|
5069
4645
|
Unassigns a phone number from a user using the POST method by providing the user ID in the path and the necessary details in the JSON request body.
|
|
5070
4646
|
|
|
@@ -5080,9 +4656,7 @@ class DialpadApp(APIApplication):
|
|
|
5080
4656
|
"""
|
|
5081
4657
|
if id is None:
|
|
5082
4658
|
raise ValueError("Missing required parameter 'id'")
|
|
5083
|
-
request_body = {
|
|
5084
|
-
"number": number,
|
|
5085
|
-
}
|
|
4659
|
+
request_body = {"number": number}
|
|
5086
4660
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5087
4661
|
url = f"{self.base_url}/api/v2/users/{id}/unassign_number"
|
|
5088
4662
|
query_params = {}
|
|
@@ -5090,9 +4664,7 @@ class DialpadApp(APIApplication):
|
|
|
5090
4664
|
response.raise_for_status()
|
|
5091
4665
|
return response.json()
|
|
5092
4666
|
|
|
5093
|
-
def users_toggle_dnd(
|
|
5094
|
-
self, id, do_not_disturb=None, group_id=None, group_type=None
|
|
5095
|
-
) -> dict[str, Any]:
|
|
4667
|
+
async def users_toggle_dnd(self, id, do_not_disturb=None, group_id=None, group_type=None) -> dict[str, Any]:
|
|
5096
4668
|
"""
|
|
5097
4669
|
Toggles the DND status for a user with the specified ID using the PATCH method, accepting a JSON payload.
|
|
5098
4670
|
|
|
@@ -5110,11 +4682,7 @@ class DialpadApp(APIApplication):
|
|
|
5110
4682
|
"""
|
|
5111
4683
|
if id is None:
|
|
5112
4684
|
raise ValueError("Missing required parameter 'id'")
|
|
5113
|
-
request_body = {
|
|
5114
|
-
"do_not_disturb": do_not_disturb,
|
|
5115
|
-
"group_id": group_id,
|
|
5116
|
-
"group_type": group_type,
|
|
5117
|
-
}
|
|
4685
|
+
request_body = {"do_not_disturb": do_not_disturb, "group_id": group_id, "group_type": group_type}
|
|
5118
4686
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5119
4687
|
url = f"{self.base_url}/api/v2/users/{id}/togglednd"
|
|
5120
4688
|
query_params = {}
|
|
@@ -5122,7 +4690,7 @@ class DialpadApp(APIApplication):
|
|
|
5122
4690
|
response.raise_for_status()
|
|
5123
4691
|
return response.json()
|
|
5124
4692
|
|
|
5125
|
-
def users_e911_get(self, id) -> dict[str, Any]:
|
|
4693
|
+
async def users_e911_get(self, id) -> dict[str, Any]:
|
|
5126
4694
|
"""
|
|
5127
4695
|
Retrieves the Enhanced 911 (E911) information for a specific user identified by their ID.
|
|
5128
4696
|
|
|
@@ -5143,16 +4711,8 @@ class DialpadApp(APIApplication):
|
|
|
5143
4711
|
response.raise_for_status()
|
|
5144
4712
|
return response.json()
|
|
5145
4713
|
|
|
5146
|
-
def users_e911_update(
|
|
5147
|
-
self,
|
|
5148
|
-
id,
|
|
5149
|
-
address=None,
|
|
5150
|
-
address2=None,
|
|
5151
|
-
city=None,
|
|
5152
|
-
country=None,
|
|
5153
|
-
state=None,
|
|
5154
|
-
use_validated_option=None,
|
|
5155
|
-
zip=None,
|
|
4714
|
+
async def users_e911_update(
|
|
4715
|
+
self, id, address=None, address2=None, city=None, country=None, state=None, use_validated_option=None, zip=None
|
|
5156
4716
|
) -> dict[str, Any]:
|
|
5157
4717
|
"""
|
|
5158
4718
|
Updates the E911 (Enhanced 911) location information for a user identified by the specified ID.
|
|
@@ -5201,7 +4761,7 @@ class DialpadApp(APIApplication):
|
|
|
5201
4761
|
response.raise_for_status()
|
|
5202
4762
|
return response.json()
|
|
5203
4763
|
|
|
5204
|
-
def users_personas_get(self, id) -> dict[str, Any]:
|
|
4764
|
+
async def users_personas_get(self, id) -> dict[str, Any]:
|
|
5205
4765
|
"""
|
|
5206
4766
|
Retrieves the personas associated with a user identified by the provided `{id}` parameter using the `GET` method.
|
|
5207
4767
|
|
|
@@ -5222,7 +4782,7 @@ class DialpadApp(APIApplication):
|
|
|
5222
4782
|
response.raise_for_status()
|
|
5223
4783
|
return response.json()
|
|
5224
4784
|
|
|
5225
|
-
def screen_pop_initiate(self, id, screen_pop_uri=None) -> dict[str, Any]:
|
|
4785
|
+
async def screen_pop_initiate(self, id, screen_pop_uri=None) -> dict[str, Any]:
|
|
5226
4786
|
"""
|
|
5227
4787
|
Triggers a screen pop for the specified user by their ID, requiring a JSON request body, and returns a success status upon completion.
|
|
5228
4788
|
|
|
@@ -5241,9 +4801,7 @@ class DialpadApp(APIApplication):
|
|
|
5241
4801
|
"""
|
|
5242
4802
|
if id is None:
|
|
5243
4803
|
raise ValueError("Missing required parameter 'id'")
|
|
5244
|
-
request_body = {
|
|
5245
|
-
"screen_pop_uri": screen_pop_uri,
|
|
5246
|
-
}
|
|
4804
|
+
request_body = {"screen_pop_uri": screen_pop_uri}
|
|
5247
4805
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5248
4806
|
url = f"{self.base_url}/api/v2/users/{id}/screenpop"
|
|
5249
4807
|
query_params = {}
|
|
@@ -5251,7 +4809,7 @@ class DialpadApp(APIApplication):
|
|
|
5251
4809
|
response.raise_for_status()
|
|
5252
4810
|
return response.json()
|
|
5253
4811
|
|
|
5254
|
-
def users_delete(self, id) -> dict[str, Any]:
|
|
4812
|
+
async def users_delete(self, id) -> dict[str, Any]:
|
|
5255
4813
|
"""
|
|
5256
4814
|
Deletes a user with the specified ID from the system, potentially removing associated data and roles.
|
|
5257
4815
|
|
|
@@ -5272,7 +4830,7 @@ class DialpadApp(APIApplication):
|
|
|
5272
4830
|
response.raise_for_status()
|
|
5273
4831
|
return response.json()
|
|
5274
4832
|
|
|
5275
|
-
def users_get(self, id) -> dict[str, Any]:
|
|
4833
|
+
async def users_get(self, id) -> dict[str, Any]:
|
|
5276
4834
|
"""
|
|
5277
4835
|
Retrieves the details of a specific user identified by the provided ID.
|
|
5278
4836
|
|
|
@@ -5293,7 +4851,7 @@ class DialpadApp(APIApplication):
|
|
|
5293
4851
|
response.raise_for_status()
|
|
5294
4852
|
return response.json()
|
|
5295
4853
|
|
|
5296
|
-
def users_update(
|
|
4854
|
+
async def users_update(
|
|
5297
4855
|
self,
|
|
5298
4856
|
id,
|
|
5299
4857
|
admin_office_ids=None,
|
|
@@ -5385,9 +4943,7 @@ class DialpadApp(APIApplication):
|
|
|
5385
4943
|
response.raise_for_status()
|
|
5386
4944
|
return response.json()
|
|
5387
4945
|
|
|
5388
|
-
def users_list(
|
|
5389
|
-
self, cursor=None, state=None, company_admin=None, email=None, number=None
|
|
5390
|
-
) -> dict[str, Any]:
|
|
4946
|
+
async def users_list(self, cursor=None, state=None, company_admin=None, email=None, number=None) -> dict[str, Any]:
|
|
5391
4947
|
"""
|
|
5392
4948
|
Retrieves a list of users with optional filtering by cursor, state, company admin status, email, or number using the "/api/v2/users" GET endpoint.
|
|
5393
4949
|
|
|
@@ -5407,27 +4963,15 @@ class DialpadApp(APIApplication):
|
|
|
5407
4963
|
url = f"{self.base_url}/api/v2/users"
|
|
5408
4964
|
query_params = {
|
|
5409
4965
|
k: v
|
|
5410
|
-
for k, v in [
|
|
5411
|
-
("cursor", cursor),
|
|
5412
|
-
("state", state),
|
|
5413
|
-
("company_admin", company_admin),
|
|
5414
|
-
("email", email),
|
|
5415
|
-
("number", number),
|
|
5416
|
-
]
|
|
4966
|
+
for k, v in [("cursor", cursor), ("state", state), ("company_admin", company_admin), ("email", email), ("number", number)]
|
|
5417
4967
|
if v is not None
|
|
5418
4968
|
}
|
|
5419
4969
|
response = self._get(url, params=query_params)
|
|
5420
4970
|
response.raise_for_status()
|
|
5421
4971
|
return response.json()
|
|
5422
4972
|
|
|
5423
|
-
def users_create(
|
|
5424
|
-
self,
|
|
5425
|
-
auto_assign=None,
|
|
5426
|
-
email=None,
|
|
5427
|
-
first_name=None,
|
|
5428
|
-
last_name=None,
|
|
5429
|
-
license=None,
|
|
5430
|
-
office_id=None,
|
|
4973
|
+
async def users_create(
|
|
4974
|
+
self, auto_assign=None, email=None, first_name=None, last_name=None, license=None, office_id=None
|
|
5431
4975
|
) -> dict[str, Any]:
|
|
5432
4976
|
"""
|
|
5433
4977
|
Creates a new user resource using JSON data and returns a success response with a status code of 200 OK.
|
|
@@ -5465,7 +5009,7 @@ class DialpadApp(APIApplication):
|
|
|
5465
5009
|
response.raise_for_status()
|
|
5466
5010
|
return response.json()
|
|
5467
5011
|
|
|
5468
|
-
def users_move_office_patch(self, id, office_id=None) -> dict[str, Any]:
|
|
5012
|
+
async def users_move_office_patch(self, id, office_id=None) -> dict[str, Any]:
|
|
5469
5013
|
"""
|
|
5470
5014
|
Updates the office location of a user with the specified ID using a JSON payload.
|
|
5471
5015
|
|
|
@@ -5481,9 +5025,7 @@ class DialpadApp(APIApplication):
|
|
|
5481
5025
|
"""
|
|
5482
5026
|
if id is None:
|
|
5483
5027
|
raise ValueError("Missing required parameter 'id'")
|
|
5484
|
-
request_body = {
|
|
5485
|
-
"office_id": office_id,
|
|
5486
|
-
}
|
|
5028
|
+
request_body = {"office_id": office_id}
|
|
5487
5029
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5488
5030
|
url = f"{self.base_url}/api/v2/users/{id}/move_office"
|
|
5489
5031
|
query_params = {}
|
|
@@ -5491,9 +5033,7 @@ class DialpadApp(APIApplication):
|
|
|
5491
5033
|
response.raise_for_status()
|
|
5492
5034
|
return response.json()
|
|
5493
5035
|
|
|
5494
|
-
def users_update_status(
|
|
5495
|
-
self, id, expiration=None, status_message=None
|
|
5496
|
-
) -> dict[str, Any]:
|
|
5036
|
+
async def users_update_status(self, id, expiration=None, status_message=None) -> dict[str, Any]:
|
|
5497
5037
|
"""
|
|
5498
5038
|
Updates the status of a user with the specified ID using the PATCH method.
|
|
5499
5039
|
|
|
@@ -5510,10 +5050,7 @@ class DialpadApp(APIApplication):
|
|
|
5510
5050
|
"""
|
|
5511
5051
|
if id is None:
|
|
5512
5052
|
raise ValueError("Missing required parameter 'id'")
|
|
5513
|
-
request_body = {
|
|
5514
|
-
"expiration": expiration,
|
|
5515
|
-
"status_message": status_message,
|
|
5516
|
-
}
|
|
5053
|
+
request_body = {"expiration": expiration, "status_message": status_message}
|
|
5517
5054
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5518
5055
|
url = f"{self.base_url}/api/v2/users/{id}/status"
|
|
5519
5056
|
query_params = {}
|
|
@@ -5521,7 +5058,7 @@ class DialpadApp(APIApplication):
|
|
|
5521
5058
|
response.raise_for_status()
|
|
5522
5059
|
return response.json()
|
|
5523
5060
|
|
|
5524
|
-
def webhooks_list(self, cursor=None) -> dict[str, Any]:
|
|
5061
|
+
async def webhooks_list(self, cursor=None) -> dict[str, Any]:
|
|
5525
5062
|
"""
|
|
5526
5063
|
Retrieves a list of webhooks, optionally supporting pagination with a cursor query parameter.
|
|
5527
5064
|
|
|
@@ -5540,7 +5077,7 @@ class DialpadApp(APIApplication):
|
|
|
5540
5077
|
response.raise_for_status()
|
|
5541
5078
|
return response.json()
|
|
5542
5079
|
|
|
5543
|
-
def webhooks_create(self, hook_url=None, secret=None) -> dict[str, Any]:
|
|
5080
|
+
async def webhooks_create(self, hook_url=None, secret=None) -> dict[str, Any]:
|
|
5544
5081
|
"""
|
|
5545
5082
|
Creates a new webhook endpoint that sends HTTP notifications in response to specified events.
|
|
5546
5083
|
|
|
@@ -5556,10 +5093,7 @@ class DialpadApp(APIApplication):
|
|
|
5556
5093
|
Tags:
|
|
5557
5094
|
webhooks
|
|
5558
5095
|
"""
|
|
5559
|
-
request_body = {
|
|
5560
|
-
"hook_url": hook_url,
|
|
5561
|
-
"secret": secret,
|
|
5562
|
-
}
|
|
5096
|
+
request_body = {"hook_url": hook_url, "secret": secret}
|
|
5563
5097
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5564
5098
|
url = f"{self.base_url}/api/v2/webhooks"
|
|
5565
5099
|
query_params = {}
|
|
@@ -5567,7 +5101,7 @@ class DialpadApp(APIApplication):
|
|
|
5567
5101
|
response.raise_for_status()
|
|
5568
5102
|
return response.json()
|
|
5569
5103
|
|
|
5570
|
-
def webhooks_delete(self, id) -> dict[str, Any]:
|
|
5104
|
+
async def webhooks_delete(self, id) -> dict[str, Any]:
|
|
5571
5105
|
"""
|
|
5572
5106
|
Deletes the webhook with the specified ID and returns a success status.
|
|
5573
5107
|
|
|
@@ -5588,7 +5122,7 @@ class DialpadApp(APIApplication):
|
|
|
5588
5122
|
response.raise_for_status()
|
|
5589
5123
|
return response.json()
|
|
5590
5124
|
|
|
5591
|
-
def webhooks_get(self, id) -> dict[str, Any]:
|
|
5125
|
+
async def webhooks_get(self, id) -> dict[str, Any]:
|
|
5592
5126
|
"""
|
|
5593
5127
|
Retrieves details of a webhook by its ID using the "GET" method.
|
|
5594
5128
|
|
|
@@ -5609,7 +5143,7 @@ class DialpadApp(APIApplication):
|
|
|
5609
5143
|
response.raise_for_status()
|
|
5610
5144
|
return response.json()
|
|
5611
5145
|
|
|
5612
|
-
def webhook_update(self, id, hook_url=None, secret=None) -> dict[str, Any]:
|
|
5146
|
+
async def webhook_update(self, id, hook_url=None, secret=None) -> dict[str, Any]:
|
|
5613
5147
|
"""
|
|
5614
5148
|
Updates a specific webhook resource by its ID using a partial payload sent via PATCH.
|
|
5615
5149
|
|
|
@@ -5628,10 +5162,7 @@ class DialpadApp(APIApplication):
|
|
|
5628
5162
|
"""
|
|
5629
5163
|
if id is None:
|
|
5630
5164
|
raise ValueError("Missing required parameter 'id'")
|
|
5631
|
-
request_body = {
|
|
5632
|
-
"hook_url": hook_url,
|
|
5633
|
-
"secret": secret,
|
|
5634
|
-
}
|
|
5165
|
+
request_body = {"hook_url": hook_url, "secret": secret}
|
|
5635
5166
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5636
5167
|
url = f"{self.base_url}/api/v2/webhooks/{id}"
|
|
5637
5168
|
query_params = {}
|
|
@@ -5639,7 +5170,7 @@ class DialpadApp(APIApplication):
|
|
|
5639
5170
|
response.raise_for_status()
|
|
5640
5171
|
return response.json()
|
|
5641
5172
|
|
|
5642
|
-
def websockets_list(self, cursor=None) -> dict[str, Any]:
|
|
5173
|
+
async def websockets_list(self, cursor=None) -> dict[str, Any]:
|
|
5643
5174
|
"""
|
|
5644
5175
|
Establishes a WebSocket connection at "/api/v2/websockets" using the GET method, allowing optional specification of a cursor for resuming data consumption.
|
|
5645
5176
|
|
|
@@ -5658,7 +5189,7 @@ class DialpadApp(APIApplication):
|
|
|
5658
5189
|
response.raise_for_status()
|
|
5659
5190
|
return response.json()
|
|
5660
5191
|
|
|
5661
|
-
def websockets_create(self, secret=None) -> dict[str, Any]:
|
|
5192
|
+
async def websockets_create(self, secret=None) -> dict[str, Any]:
|
|
5662
5193
|
"""
|
|
5663
5194
|
Establishes a WebSocket connection using the POST method to the "/api/v2/websockets" endpoint, accepting JSON data in the request body.
|
|
5664
5195
|
|
|
@@ -5673,9 +5204,7 @@ class DialpadApp(APIApplication):
|
|
|
5673
5204
|
Tags:
|
|
5674
5205
|
websockets
|
|
5675
5206
|
"""
|
|
5676
|
-
request_body = {
|
|
5677
|
-
"secret": secret,
|
|
5678
|
-
}
|
|
5207
|
+
request_body = {"secret": secret}
|
|
5679
5208
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5680
5209
|
url = f"{self.base_url}/api/v2/websockets"
|
|
5681
5210
|
query_params = {}
|
|
@@ -5683,7 +5212,7 @@ class DialpadApp(APIApplication):
|
|
|
5683
5212
|
response.raise_for_status()
|
|
5684
5213
|
return response.json()
|
|
5685
5214
|
|
|
5686
|
-
def websockets_delete(self, id) -> dict[str, Any]:
|
|
5215
|
+
async def websockets_delete(self, id) -> dict[str, Any]:
|
|
5687
5216
|
"""
|
|
5688
5217
|
Deletes a WebSocket by its ID, specified in the path, using the "DELETE" method.
|
|
5689
5218
|
|
|
@@ -5704,7 +5233,7 @@ class DialpadApp(APIApplication):
|
|
|
5704
5233
|
response.raise_for_status()
|
|
5705
5234
|
return response.json()
|
|
5706
5235
|
|
|
5707
|
-
def websockets_get(self, id) -> dict[str, Any]:
|
|
5236
|
+
async def websockets_get(self, id) -> dict[str, Any]:
|
|
5708
5237
|
"""
|
|
5709
5238
|
Retrieves details for a specific WebSocket connection identified by its integer ID.
|
|
5710
5239
|
|
|
@@ -5725,7 +5254,7 @@ class DialpadApp(APIApplication):
|
|
|
5725
5254
|
response.raise_for_status()
|
|
5726
5255
|
return response.json()
|
|
5727
5256
|
|
|
5728
|
-
def websockets_update(self, id, secret=None) -> dict[str, Any]:
|
|
5257
|
+
async def websockets_update(self, id, secret=None) -> dict[str, Any]:
|
|
5729
5258
|
"""
|
|
5730
5259
|
Updates the WebSocket connection resource identified by the specified ID using a JSON-formatted patch request.
|
|
5731
5260
|
|
|
@@ -5743,9 +5272,7 @@ class DialpadApp(APIApplication):
|
|
|
5743
5272
|
"""
|
|
5744
5273
|
if id is None:
|
|
5745
5274
|
raise ValueError("Missing required parameter 'id'")
|
|
5746
|
-
request_body = {
|
|
5747
|
-
"secret": secret,
|
|
5748
|
-
}
|
|
5275
|
+
request_body = {"secret": secret}
|
|
5749
5276
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5750
5277
|
url = f"{self.base_url}/api/v2/websockets/{id}"
|
|
5751
5278
|
query_params = {}
|