universal-mcp 0.1.12__py3-none-any.whl → 0.1.13rc2__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.
- universal_mcp/applications/__init__.py +51 -7
- universal_mcp/cli.py +109 -17
- universal_mcp/integrations/__init__.py +1 -1
- universal_mcp/integrations/integration.py +79 -0
- universal_mcp/servers/README.md +79 -0
- universal_mcp/servers/server.py +17 -29
- universal_mcp/stores/README.md +74 -0
- universal_mcp/stores/store.py +0 -2
- universal_mcp/templates/README.md.j2 +93 -0
- universal_mcp/templates/api_client.py.j2 +27 -0
- universal_mcp/tools/README.md +86 -0
- universal_mcp/tools/tools.py +1 -1
- universal_mcp/utils/agentr.py +90 -0
- universal_mcp/utils/api_generator.py +166 -208
- universal_mcp/utils/openapi.py +221 -321
- universal_mcp/utils/singleton.py +23 -0
- {universal_mcp-0.1.12.dist-info → universal_mcp-0.1.13rc2.dist-info}/METADATA +16 -41
- universal_mcp-0.1.13rc2.dist-info/RECORD +38 -0
- universal_mcp/applications/ahrefs/README.md +0 -76
- universal_mcp/applications/ahrefs/__init__.py +0 -0
- universal_mcp/applications/ahrefs/app.py +0 -2291
- universal_mcp/applications/cal_com_v2/README.md +0 -175
- universal_mcp/applications/cal_com_v2/__init__.py +0 -0
- universal_mcp/applications/cal_com_v2/app.py +0 -5390
- universal_mcp/applications/calendly/README.md +0 -78
- universal_mcp/applications/calendly/__init__.py +0 -0
- universal_mcp/applications/calendly/app.py +0 -1195
- universal_mcp/applications/clickup/README.md +0 -160
- universal_mcp/applications/clickup/__init__.py +0 -0
- universal_mcp/applications/clickup/app.py +0 -5009
- universal_mcp/applications/coda/README.md +0 -133
- universal_mcp/applications/coda/__init__.py +0 -0
- universal_mcp/applications/coda/app.py +0 -3671
- universal_mcp/applications/e2b/README.md +0 -37
- universal_mcp/applications/e2b/app.py +0 -65
- universal_mcp/applications/elevenlabs/README.md +0 -84
- universal_mcp/applications/elevenlabs/__init__.py +0 -0
- universal_mcp/applications/elevenlabs/app.py +0 -1402
- universal_mcp/applications/falai/README.md +0 -42
- universal_mcp/applications/falai/__init__.py +0 -0
- universal_mcp/applications/falai/app.py +0 -332
- universal_mcp/applications/figma/README.md +0 -74
- universal_mcp/applications/figma/__init__.py +0 -0
- universal_mcp/applications/figma/app.py +0 -1261
- universal_mcp/applications/firecrawl/README.md +0 -45
- universal_mcp/applications/firecrawl/app.py +0 -268
- universal_mcp/applications/github/README.md +0 -47
- universal_mcp/applications/github/app.py +0 -429
- universal_mcp/applications/gong/README.md +0 -88
- universal_mcp/applications/gong/__init__.py +0 -0
- universal_mcp/applications/gong/app.py +0 -2297
- universal_mcp/applications/google_calendar/app.py +0 -442
- universal_mcp/applications/google_docs/README.md +0 -40
- universal_mcp/applications/google_docs/app.py +0 -88
- universal_mcp/applications/google_drive/README.md +0 -44
- universal_mcp/applications/google_drive/app.py +0 -286
- universal_mcp/applications/google_mail/README.md +0 -47
- universal_mcp/applications/google_mail/app.py +0 -664
- universal_mcp/applications/google_sheet/README.md +0 -42
- universal_mcp/applications/google_sheet/app.py +0 -150
- universal_mcp/applications/hashnode/app.py +0 -81
- universal_mcp/applications/hashnode/prompt.md +0 -23
- universal_mcp/applications/heygen/README.md +0 -69
- universal_mcp/applications/heygen/__init__.py +0 -0
- universal_mcp/applications/heygen/app.py +0 -956
- universal_mcp/applications/mailchimp/README.md +0 -306
- universal_mcp/applications/mailchimp/__init__.py +0 -0
- universal_mcp/applications/mailchimp/app.py +0 -10937
- universal_mcp/applications/markitdown/app.py +0 -44
- universal_mcp/applications/notion/README.md +0 -55
- universal_mcp/applications/notion/__init__.py +0 -0
- universal_mcp/applications/notion/app.py +0 -527
- universal_mcp/applications/perplexity/README.md +0 -37
- universal_mcp/applications/perplexity/app.py +0 -65
- universal_mcp/applications/reddit/README.md +0 -45
- universal_mcp/applications/reddit/app.py +0 -379
- universal_mcp/applications/replicate/README.md +0 -65
- universal_mcp/applications/replicate/__init__.py +0 -0
- universal_mcp/applications/replicate/app.py +0 -980
- universal_mcp/applications/resend/README.md +0 -38
- universal_mcp/applications/resend/app.py +0 -37
- universal_mcp/applications/retell_ai/README.md +0 -46
- universal_mcp/applications/retell_ai/__init__.py +0 -0
- universal_mcp/applications/retell_ai/app.py +0 -333
- universal_mcp/applications/rocketlane/README.md +0 -42
- universal_mcp/applications/rocketlane/__init__.py +0 -0
- universal_mcp/applications/rocketlane/app.py +0 -194
- universal_mcp/applications/serpapi/README.md +0 -37
- universal_mcp/applications/serpapi/app.py +0 -73
- universal_mcp/applications/spotify/README.md +0 -116
- universal_mcp/applications/spotify/__init__.py +0 -0
- universal_mcp/applications/spotify/app.py +0 -2526
- universal_mcp/applications/supabase/README.md +0 -112
- universal_mcp/applications/supabase/__init__.py +0 -0
- universal_mcp/applications/supabase/app.py +0 -2970
- universal_mcp/applications/tavily/README.md +0 -38
- universal_mcp/applications/tavily/app.py +0 -51
- universal_mcp/applications/wrike/README.md +0 -71
- universal_mcp/applications/wrike/__init__.py +0 -0
- universal_mcp/applications/wrike/app.py +0 -1372
- universal_mcp/applications/youtube/README.md +0 -82
- universal_mcp/applications/youtube/__init__.py +0 -0
- universal_mcp/applications/youtube/app.py +0 -1428
- universal_mcp/applications/zenquotes/README.md +0 -37
- universal_mcp/applications/zenquotes/app.py +0 -31
- universal_mcp/integrations/agentr.py +0 -112
- universal_mcp-0.1.12.dist-info/RECORD +0 -119
- {universal_mcp-0.1.12.dist-info → universal_mcp-0.1.13rc2.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.12.dist-info → universal_mcp-0.1.13rc2.dist-info}/entry_points.txt +0 -0
@@ -1,2297 +0,0 @@
|
|
1
|
-
from base64 import b64encode
|
2
|
-
from typing import Any
|
3
|
-
|
4
|
-
from universal_mcp.applications import APIApplication
|
5
|
-
from universal_mcp.integrations import Integration
|
6
|
-
|
7
|
-
|
8
|
-
class GongApp(APIApplication):
|
9
|
-
def __init__(self, integration: Integration = None, **kwargs) -> None:
|
10
|
-
super().__init__(name="gong", integration=integration, **kwargs)
|
11
|
-
self.base_url = "https://api.gong.io"
|
12
|
-
|
13
|
-
def _get_headers(self) -> dict[str, str]:
|
14
|
-
credentials = self.integration.get_credentials()
|
15
|
-
api_key = credentials.get("api_key")
|
16
|
-
secret = credentials.get("secret")
|
17
|
-
api_key_b64 = b64encode(f"{api_key}:{secret}".encode()).decode()
|
18
|
-
return {
|
19
|
-
"Authorization": f"Basic {api_key_b64}",
|
20
|
-
"Content-Type": "application/json",
|
21
|
-
"Accept": "application/json",
|
22
|
-
}
|
23
|
-
|
24
|
-
def list_calls(
|
25
|
-
self, fromDateTime, toDateTime, cursor=None, workspaceId=None
|
26
|
-
) -> dict[str, Any]:
|
27
|
-
"""
|
28
|
-
Retrieves a list of call records within the specified date range, with optional pagination and workspace filtering.
|
29
|
-
|
30
|
-
Args:
|
31
|
-
fromDateTime: The start datetime (ISO 8601 string) for filtering calls. Required.
|
32
|
-
toDateTime: The end datetime (ISO 8601 string) for filtering calls. Required.
|
33
|
-
cursor: An optional pagination cursor to fetch the next page of results.
|
34
|
-
workspaceId: An optional identifier to filter calls by a specific workspace.
|
35
|
-
|
36
|
-
Returns:
|
37
|
-
A dictionary containing the list of call records and associated metadata. The exact structure depends on the API response.
|
38
|
-
|
39
|
-
Raises:
|
40
|
-
ValueError: If either 'fromDateTime' or 'toDateTime' is not provided.
|
41
|
-
requests.HTTPError: If the underlying HTTP request fails or the API response contains an HTTP error status.
|
42
|
-
|
43
|
-
Tags:
|
44
|
-
list, calls, fetch, pagination, management, important
|
45
|
-
"""
|
46
|
-
if fromDateTime is None:
|
47
|
-
raise ValueError("Missing required parameter 'fromDateTime'")
|
48
|
-
if toDateTime is None:
|
49
|
-
raise ValueError("Missing required parameter 'toDateTime'")
|
50
|
-
url = f"{self.base_url}/v2/calls"
|
51
|
-
query_params = {
|
52
|
-
k: v
|
53
|
-
for k, v in [
|
54
|
-
("fromDateTime", fromDateTime),
|
55
|
-
("toDateTime", toDateTime),
|
56
|
-
("workspaceId", workspaceId),
|
57
|
-
]
|
58
|
-
if v is not None
|
59
|
-
}
|
60
|
-
response = self._get(url, params=query_params)
|
61
|
-
response.raise_for_status()
|
62
|
-
return response.json()
|
63
|
-
|
64
|
-
def add_call(
|
65
|
-
self,
|
66
|
-
clientUniqueId,
|
67
|
-
actualStart,
|
68
|
-
parties,
|
69
|
-
direction,
|
70
|
-
primaryUser,
|
71
|
-
title=None,
|
72
|
-
purpose=None,
|
73
|
-
scheduledStart=None,
|
74
|
-
scheduledEnd=None,
|
75
|
-
duration=None,
|
76
|
-
disposition=None,
|
77
|
-
context=None,
|
78
|
-
customData=None,
|
79
|
-
speakersTimeline=None,
|
80
|
-
meetingUrl=None,
|
81
|
-
callProviderCode=None,
|
82
|
-
downloadMediaUrl=None,
|
83
|
-
workspaceId=None,
|
84
|
-
languageCode=None,
|
85
|
-
) -> dict[str, Any]:
|
86
|
-
"""
|
87
|
-
Creates and submits a new call record with detailed metadata to the remote service.
|
88
|
-
|
89
|
-
Args:
|
90
|
-
clientUniqueId: str. A unique identifier for the client associated with the call. Required.
|
91
|
-
actualStart: str or datetime. The actual start time of the call. Required.
|
92
|
-
parties: list or dict. Information about the call participants. Required.
|
93
|
-
direction: str. Indicates call direction (e.g., 'inbound', 'outbound'). Required.
|
94
|
-
primaryUser: str. The main user associated with the call. Required.
|
95
|
-
title: str, optional. Title or subject of the call.
|
96
|
-
purpose: str, optional. The purpose or reason for the call.
|
97
|
-
scheduledStart: str or datetime, optional. The scheduled start time of the call.
|
98
|
-
scheduledEnd: str or datetime, optional. The scheduled end time of the call.
|
99
|
-
duration: int, optional. Duration of the call in seconds.
|
100
|
-
disposition: str, optional. Final status or outcome of the call.
|
101
|
-
context: dict, optional. Additional contextual information about the call.
|
102
|
-
customData: dict, optional. Custom key-value data associated with the call.
|
103
|
-
speakersTimeline: list, optional. Timeline of speakers during the call.
|
104
|
-
meetingUrl: str, optional. URL for the associated meeting, if applicable.
|
105
|
-
callProviderCode: str, optional. Identifier for the call provider.
|
106
|
-
downloadMediaUrl: str, optional. URL to download call media.
|
107
|
-
workspaceId: str, optional. Identifier for the workspace to associate the call with.
|
108
|
-
languageCode: str, optional. Language code for the call content (e.g., 'en-US').
|
109
|
-
|
110
|
-
Returns:
|
111
|
-
dict[str, Any]: JSON response representing the created call record from the remote service.
|
112
|
-
|
113
|
-
Raises:
|
114
|
-
ValueError: If any of the required parameters ('clientUniqueId', 'actualStart', 'parties', 'direction', or 'primaryUser') are missing.
|
115
|
-
HTTPError: If the remote service returns an unsuccessful status code during the call creation request.
|
116
|
-
|
117
|
-
Tags:
|
118
|
-
add, call, management, api, important
|
119
|
-
"""
|
120
|
-
if clientUniqueId is None:
|
121
|
-
raise ValueError("Missing required parameter 'clientUniqueId'")
|
122
|
-
if actualStart is None:
|
123
|
-
raise ValueError("Missing required parameter 'actualStart'")
|
124
|
-
if parties is None:
|
125
|
-
raise ValueError("Missing required parameter 'parties'")
|
126
|
-
if direction is None:
|
127
|
-
raise ValueError("Missing required parameter 'direction'")
|
128
|
-
if primaryUser is None:
|
129
|
-
raise ValueError("Missing required parameter 'primaryUser'")
|
130
|
-
request_body = {
|
131
|
-
"clientUniqueId": clientUniqueId,
|
132
|
-
"title": title,
|
133
|
-
"purpose": purpose,
|
134
|
-
"scheduledStart": scheduledStart,
|
135
|
-
"scheduledEnd": scheduledEnd,
|
136
|
-
"actualStart": actualStart,
|
137
|
-
"duration": duration,
|
138
|
-
"parties": parties,
|
139
|
-
"direction": direction,
|
140
|
-
"disposition": disposition,
|
141
|
-
"context": context,
|
142
|
-
"customData": customData,
|
143
|
-
"speakersTimeline": speakersTimeline,
|
144
|
-
"meetingUrl": meetingUrl,
|
145
|
-
"callProviderCode": callProviderCode,
|
146
|
-
"downloadMediaUrl": downloadMediaUrl,
|
147
|
-
"workspaceId": workspaceId,
|
148
|
-
"languageCode": languageCode,
|
149
|
-
"primaryUser": primaryUser,
|
150
|
-
}
|
151
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
152
|
-
url = f"{self.base_url}/v2/calls"
|
153
|
-
query_params = {}
|
154
|
-
response = self._post(url, data=request_body, params=query_params)
|
155
|
-
response.raise_for_status()
|
156
|
-
return response.json()
|
157
|
-
|
158
|
-
def get_call(self, id) -> dict[str, Any]:
|
159
|
-
"""
|
160
|
-
Retrieves details for a specific call by its identifier.
|
161
|
-
|
162
|
-
Args:
|
163
|
-
id: The unique identifier of the call to retrieve. Must not be None.
|
164
|
-
|
165
|
-
Returns:
|
166
|
-
A dictionary containing the call details as returned by the API.
|
167
|
-
|
168
|
-
Raises:
|
169
|
-
ValueError: If the 'id' parameter is None.
|
170
|
-
requests.HTTPError: If the HTTP request to the API fails.
|
171
|
-
|
172
|
-
Tags:
|
173
|
-
get, call, api, management, important
|
174
|
-
"""
|
175
|
-
if id is None:
|
176
|
-
raise ValueError("Missing required parameter 'id'")
|
177
|
-
url = f"{self.base_url}/v2/calls/{id}"
|
178
|
-
query_params = {}
|
179
|
-
response = self._get(url, params=query_params)
|
180
|
-
response.raise_for_status()
|
181
|
-
return response.json()
|
182
|
-
|
183
|
-
def list_calls_extensive(
|
184
|
-
self, filter, cursor=None, contentSelector=None
|
185
|
-
) -> dict[str, Any]:
|
186
|
-
"""
|
187
|
-
Retrieves a list of extensive call records matching the specified filter criteria, with optional pagination and content selection.
|
188
|
-
|
189
|
-
Args:
|
190
|
-
filter: dict; Required. Specifies the filtering criteria for the call records to retrieve.
|
191
|
-
cursor: str, optional; An optional pagination cursor to fetch the next set of results.
|
192
|
-
contentSelector: dict or list, optional; Specifies which content fields or sections to include for each call record.
|
193
|
-
|
194
|
-
Returns:
|
195
|
-
dict: A dictionary containing the fetched extensive call records and any associated metadata.
|
196
|
-
|
197
|
-
Raises:
|
198
|
-
ValueError: Raised if the required 'filter' parameter is missing.
|
199
|
-
requests.HTTPError: Raised if the HTTP request to the call records service fails (e.g., network error, invalid response).
|
200
|
-
|
201
|
-
Tags:
|
202
|
-
list, calls, fetch, filter, api, important
|
203
|
-
"""
|
204
|
-
if filter is None:
|
205
|
-
raise ValueError("Missing required parameter 'filter'")
|
206
|
-
request_body = {
|
207
|
-
"cursor": cursor,
|
208
|
-
"filter": filter,
|
209
|
-
"contentSelector": contentSelector,
|
210
|
-
}
|
211
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
212
|
-
url = f"{self.base_url}/v2/calls/extensive"
|
213
|
-
query_params = {}
|
214
|
-
response = self._post(url, data=request_body, params=query_params)
|
215
|
-
response.raise_for_status()
|
216
|
-
return response.json()
|
217
|
-
|
218
|
-
def get_permission_profile(self, profileId) -> dict[str, Any]:
|
219
|
-
"""
|
220
|
-
Retrieve the details of a permission profile by its profile ID.
|
221
|
-
|
222
|
-
Args:
|
223
|
-
profileId: str. The unique identifier of the permission profile to retrieve.
|
224
|
-
|
225
|
-
Returns:
|
226
|
-
dict[str, Any]: The JSON-decoded response containing the permission profile details.
|
227
|
-
|
228
|
-
Raises:
|
229
|
-
ValueError: If the 'profileId' parameter is None.
|
230
|
-
requests.HTTPError: If the HTTP request to the permission profile endpoint fails.
|
231
|
-
|
232
|
-
Tags:
|
233
|
-
get, permission-profile, fetch, api, management, important
|
234
|
-
"""
|
235
|
-
if profileId is None:
|
236
|
-
raise ValueError("Missing required parameter 'profileId'")
|
237
|
-
url = f"{self.base_url}/v2/permission-profile"
|
238
|
-
query_params = {k: v for k, v in [("profileId", profileId)] if v is not None}
|
239
|
-
response = self._get(url, params=query_params)
|
240
|
-
response.raise_for_status()
|
241
|
-
return response.json()
|
242
|
-
|
243
|
-
def update_permission_profile(
|
244
|
-
self,
|
245
|
-
profileId,
|
246
|
-
id=None,
|
247
|
-
name=None,
|
248
|
-
description=None,
|
249
|
-
callsAccess=None,
|
250
|
-
libraryFolderAccess=None,
|
251
|
-
dealsAccess=None,
|
252
|
-
forecastPermissions=None,
|
253
|
-
coachingAccess=None,
|
254
|
-
insightsAccess=None,
|
255
|
-
usageAccess=None,
|
256
|
-
emailsAccess=None,
|
257
|
-
scoreCalls=None,
|
258
|
-
overrideScore=None,
|
259
|
-
downloadCallMedia=None,
|
260
|
-
shareCallsWithCustomers=None,
|
261
|
-
manuallyScheduleAndUploadCalls=None,
|
262
|
-
privateCalls=None,
|
263
|
-
deleteCalls=None,
|
264
|
-
trimCalls=None,
|
265
|
-
listenInCalls=None,
|
266
|
-
deleteEmails=None,
|
267
|
-
callsAndSearch=None,
|
268
|
-
library=None,
|
269
|
-
deals=None,
|
270
|
-
createEditAndDeleteDealsBoards=None,
|
271
|
-
dealsInlineEditing=None,
|
272
|
-
account=None,
|
273
|
-
coaching=None,
|
274
|
-
usage=None,
|
275
|
-
teamStats=None,
|
276
|
-
initiatives=None,
|
277
|
-
market=None,
|
278
|
-
activity=None,
|
279
|
-
forecast=None,
|
280
|
-
forecastManage=None,
|
281
|
-
engageManageCompanyTemplates=None,
|
282
|
-
engageManageCompanySequences=None,
|
283
|
-
engageCreateAndManageRulesets=None,
|
284
|
-
engageSnoozeFlowToDosForOthers=None,
|
285
|
-
viewEngageAnalyticsActivity=None,
|
286
|
-
viewEngageAnalyticsPerformance=None,
|
287
|
-
viewEngageAnalyticsFlows=None,
|
288
|
-
manageGeneralBusinessSettings=None,
|
289
|
-
manageScorecards=None,
|
290
|
-
exportCallsAndCoachingDataToCSV=None,
|
291
|
-
crmDataInlineEditing=None,
|
292
|
-
crmDataImport=None,
|
293
|
-
viewRevenueAnalytics=None,
|
294
|
-
manageRevenueAnalytics=None,
|
295
|
-
) -> dict[str, Any]:
|
296
|
-
"""
|
297
|
-
Updates an existing permission profile with the specified access settings and permissions.
|
298
|
-
|
299
|
-
Args:
|
300
|
-
profileId: str. The unique identifier of the permission profile to update.
|
301
|
-
id: Optional[str]. The new identifier for the profile (if changing).
|
302
|
-
name: Optional[str]. The name of the permission profile.
|
303
|
-
description: Optional[str]. The description of the permission profile.
|
304
|
-
callsAccess: Optional[Any]. Access configuration for calls.
|
305
|
-
libraryFolderAccess: Optional[Any]. Access controls for library folders.
|
306
|
-
dealsAccess: Optional[Any]. Access configuration for deals.
|
307
|
-
forecastPermissions: Optional[Any]. Permissions related to forecasting.
|
308
|
-
coachingAccess: Optional[Any]. Access permissions for coaching features.
|
309
|
-
insightsAccess: Optional[Any]. Access permissions for insights.
|
310
|
-
usageAccess: Optional[Any]. Access configuration for usage data.
|
311
|
-
emailsAccess: Optional[Any]. Access configuration for emails.
|
312
|
-
scoreCalls: Optional[Any]. Permission to score calls.
|
313
|
-
overrideScore: Optional[Any]. Permission to override call scores.
|
314
|
-
downloadCallMedia: Optional[Any]. Permission to download call media.
|
315
|
-
shareCallsWithCustomers: Optional[Any]. Permission to share calls with customers.
|
316
|
-
manuallyScheduleAndUploadCalls: Optional[Any]. Permission to schedule and upload calls manually.
|
317
|
-
privateCalls: Optional[Any]. Permission to mark calls as private.
|
318
|
-
deleteCalls: Optional[Any]. Permission to delete calls.
|
319
|
-
trimCalls: Optional[Any]. Permission to trim calls.
|
320
|
-
listenInCalls: Optional[Any]. Permission to listen in on calls.
|
321
|
-
deleteEmails: Optional[Any]. Permission to delete emails.
|
322
|
-
callsAndSearch: Optional[Any]. Permissions for calls and search features.
|
323
|
-
library: Optional[Any]. Permissions related to the content library.
|
324
|
-
deals: Optional[Any]. Additional deals-related permissions.
|
325
|
-
createEditAndDeleteDealsBoards: Optional[Any]. Permission to create, edit, and delete deal boards.
|
326
|
-
dealsInlineEditing: Optional[Any]. Permission for inline editing of deals.
|
327
|
-
account: Optional[Any]. Permissions related to account management.
|
328
|
-
coaching: Optional[Any]. Additional coaching-related permissions.
|
329
|
-
usage: Optional[Any]. Additional usage-related permissions.
|
330
|
-
teamStats: Optional[Any]. Access to team statistics.
|
331
|
-
initiatives: Optional[Any]. Permissions for initiatives management.
|
332
|
-
market: Optional[Any]. Permissions for marketing-related features.
|
333
|
-
activity: Optional[Any]. Access to activity data.
|
334
|
-
forecast: Optional[Any]. General forecast permissions.
|
335
|
-
forecastManage: Optional[Any]. Permission to manage forecasting.
|
336
|
-
engageManageCompanyTemplates: Optional[Any]. Permission to manage company templates in Engage.
|
337
|
-
engageManageCompanySequences: Optional[Any]. Permission to manage company sequences in Engage.
|
338
|
-
engageCreateAndManageRulesets: Optional[Any]. Permission to create and manage Engage rulesets.
|
339
|
-
engageSnoozeFlowToDosForOthers: Optional[Any]. Permission to snooze Flow To-Dos for others in Engage.
|
340
|
-
viewEngageAnalyticsActivity: Optional[Any]. Permission to view Engage analytics activity.
|
341
|
-
viewEngageAnalyticsPerformance: Optional[Any]. Permission to view Engage analytics performance data.
|
342
|
-
viewEngageAnalyticsFlows: Optional[Any]. Permission to view Engage analytics flows.
|
343
|
-
manageGeneralBusinessSettings: Optional[Any]. Permission to manage general business settings.
|
344
|
-
manageScorecards: Optional[Any]. Permission to manage scorecards.
|
345
|
-
exportCallsAndCoachingDataToCSV: Optional[Any]. Permission to export calls and coaching data to CSV.
|
346
|
-
crmDataInlineEditing: Optional[Any]. Permission for inline editing of CRM data.
|
347
|
-
crmDataImport: Optional[Any]. Permission to import CRM data.
|
348
|
-
viewRevenueAnalytics: Optional[Any]. Permission to view revenue analytics.
|
349
|
-
manageRevenueAnalytics: Optional[Any]. Permission to manage revenue analytics.
|
350
|
-
|
351
|
-
Returns:
|
352
|
-
dict[str, Any]: The updated permission profile as a dictionary.
|
353
|
-
|
354
|
-
Raises:
|
355
|
-
ValueError: If the required parameter 'profileId' is missing.
|
356
|
-
requests.HTTPError: If the HTTP request to update the profile fails.
|
357
|
-
|
358
|
-
Tags:
|
359
|
-
update, permission-profile, management, important
|
360
|
-
"""
|
361
|
-
if profileId is None:
|
362
|
-
raise ValueError("Missing required parameter 'profileId'")
|
363
|
-
request_body = {
|
364
|
-
"id": id,
|
365
|
-
"name": name,
|
366
|
-
"description": description,
|
367
|
-
"callsAccess": callsAccess,
|
368
|
-
"libraryFolderAccess": libraryFolderAccess,
|
369
|
-
"dealsAccess": dealsAccess,
|
370
|
-
"forecastPermissions": forecastPermissions,
|
371
|
-
"coachingAccess": coachingAccess,
|
372
|
-
"insightsAccess": insightsAccess,
|
373
|
-
"usageAccess": usageAccess,
|
374
|
-
"emailsAccess": emailsAccess,
|
375
|
-
"scoreCalls": scoreCalls,
|
376
|
-
"overrideScore": overrideScore,
|
377
|
-
"downloadCallMedia": downloadCallMedia,
|
378
|
-
"shareCallsWithCustomers": shareCallsWithCustomers,
|
379
|
-
"manuallyScheduleAndUploadCalls": manuallyScheduleAndUploadCalls,
|
380
|
-
"privateCalls": privateCalls,
|
381
|
-
"deleteCalls": deleteCalls,
|
382
|
-
"trimCalls": trimCalls,
|
383
|
-
"listenInCalls": listenInCalls,
|
384
|
-
"deleteEmails": deleteEmails,
|
385
|
-
"callsAndSearch": callsAndSearch,
|
386
|
-
"library": library,
|
387
|
-
"deals": deals,
|
388
|
-
"createEditAndDeleteDealsBoards": createEditAndDeleteDealsBoards,
|
389
|
-
"dealsInlineEditing": dealsInlineEditing,
|
390
|
-
"account": account,
|
391
|
-
"coaching": coaching,
|
392
|
-
"usage": usage,
|
393
|
-
"teamStats": teamStats,
|
394
|
-
"initiatives": initiatives,
|
395
|
-
"market": market,
|
396
|
-
"activity": activity,
|
397
|
-
"forecast": forecast,
|
398
|
-
"forecastManage": forecastManage,
|
399
|
-
"engageManageCompanyTemplates": engageManageCompanyTemplates,
|
400
|
-
"engageManageCompanySequences": engageManageCompanySequences,
|
401
|
-
"engageCreateAndManageRulesets": engageCreateAndManageRulesets,
|
402
|
-
"engageSnoozeFlowToDosForOthers": engageSnoozeFlowToDosForOthers,
|
403
|
-
"viewEngageAnalyticsActivity": viewEngageAnalyticsActivity,
|
404
|
-
"viewEngageAnalyticsPerformance": viewEngageAnalyticsPerformance,
|
405
|
-
"viewEngageAnalyticsFlows": viewEngageAnalyticsFlows,
|
406
|
-
"manageGeneralBusinessSettings": manageGeneralBusinessSettings,
|
407
|
-
"manageScorecards": manageScorecards,
|
408
|
-
"exportCallsAndCoachingDataToCSV": exportCallsAndCoachingDataToCSV,
|
409
|
-
"crmDataInlineEditing": crmDataInlineEditing,
|
410
|
-
"crmDataImport": crmDataImport,
|
411
|
-
"viewRevenueAnalytics": viewRevenueAnalytics,
|
412
|
-
"manageRevenueAnalytics": manageRevenueAnalytics,
|
413
|
-
}
|
414
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
415
|
-
url = f"{self.base_url}/v2/permission-profile"
|
416
|
-
query_params = {k: v for k, v in [("profileId", profileId)] if v is not None}
|
417
|
-
response = self._put(url, data=request_body, params=query_params)
|
418
|
-
response.raise_for_status()
|
419
|
-
return response.json()
|
420
|
-
|
421
|
-
def create_permission_profile(
|
422
|
-
self,
|
423
|
-
workspaceId,
|
424
|
-
id=None,
|
425
|
-
name=None,
|
426
|
-
description=None,
|
427
|
-
callsAccess=None,
|
428
|
-
libraryFolderAccess=None,
|
429
|
-
dealsAccess=None,
|
430
|
-
forecastPermissions=None,
|
431
|
-
coachingAccess=None,
|
432
|
-
insightsAccess=None,
|
433
|
-
usageAccess=None,
|
434
|
-
emailsAccess=None,
|
435
|
-
scoreCalls=None,
|
436
|
-
overrideScore=None,
|
437
|
-
downloadCallMedia=None,
|
438
|
-
shareCallsWithCustomers=None,
|
439
|
-
manuallyScheduleAndUploadCalls=None,
|
440
|
-
privateCalls=None,
|
441
|
-
deleteCalls=None,
|
442
|
-
trimCalls=None,
|
443
|
-
listenInCalls=None,
|
444
|
-
deleteEmails=None,
|
445
|
-
callsAndSearch=None,
|
446
|
-
library=None,
|
447
|
-
deals=None,
|
448
|
-
createEditAndDeleteDealsBoards=None,
|
449
|
-
dealsInlineEditing=None,
|
450
|
-
account=None,
|
451
|
-
coaching=None,
|
452
|
-
usage=None,
|
453
|
-
teamStats=None,
|
454
|
-
initiatives=None,
|
455
|
-
market=None,
|
456
|
-
activity=None,
|
457
|
-
forecast=None,
|
458
|
-
forecastManage=None,
|
459
|
-
engageManageCompanyTemplates=None,
|
460
|
-
engageManageCompanySequences=None,
|
461
|
-
engageCreateAndManageRulesets=None,
|
462
|
-
engageSnoozeFlowToDosForOthers=None,
|
463
|
-
viewEngageAnalyticsActivity=None,
|
464
|
-
viewEngageAnalyticsPerformance=None,
|
465
|
-
viewEngageAnalyticsFlows=None,
|
466
|
-
manageGeneralBusinessSettings=None,
|
467
|
-
manageScorecards=None,
|
468
|
-
exportCallsAndCoachingDataToCSV=None,
|
469
|
-
crmDataInlineEditing=None,
|
470
|
-
crmDataImport=None,
|
471
|
-
viewRevenueAnalytics=None,
|
472
|
-
manageRevenueAnalytics=None,
|
473
|
-
) -> dict[str, Any]:
|
474
|
-
"""
|
475
|
-
Creates a new permission profile in the specified workspace with customizable access and permission settings.
|
476
|
-
|
477
|
-
Args:
|
478
|
-
workspaceId: str. The unique identifier of the workspace where the permission profile will be created. Required.
|
479
|
-
id: str, optional. The unique identifier for the permission profile.
|
480
|
-
name: str, optional. The name of the permission profile.
|
481
|
-
description: str, optional. A description for the permission profile.
|
482
|
-
callsAccess: Any, optional. Specifies calls access permissions.
|
483
|
-
libraryFolderAccess: Any, optional. Specifies access permissions for library folders.
|
484
|
-
dealsAccess: Any, optional. Specifies deals access permissions.
|
485
|
-
forecastPermissions: Any, optional. Specifies forecast related permissions.
|
486
|
-
coachingAccess: Any, optional. Specifies coaching access permissions.
|
487
|
-
insightsAccess: Any, optional. Specifies insights access permissions.
|
488
|
-
usageAccess: Any, optional. Specifies usage access permissions.
|
489
|
-
emailsAccess: Any, optional. Specifies emails access permissions.
|
490
|
-
scoreCalls: Any, optional. Permission to score calls.
|
491
|
-
overrideScore: Any, optional. Permission to override call scores.
|
492
|
-
downloadCallMedia: Any, optional. Permission to download call media.
|
493
|
-
shareCallsWithCustomers: Any, optional. Permission to share calls with customers.
|
494
|
-
manuallyScheduleAndUploadCalls: Any, optional. Permission to manually schedule and upload calls.
|
495
|
-
privateCalls: Any, optional. Permission to mark calls as private.
|
496
|
-
deleteCalls: Any, optional. Permission to delete calls.
|
497
|
-
trimCalls: Any, optional. Permission to trim calls.
|
498
|
-
listenInCalls: Any, optional. Permission to listen to calls.
|
499
|
-
deleteEmails: Any, optional. Permission to delete emails.
|
500
|
-
callsAndSearch: Any, optional. Additional calls and search permissions.
|
501
|
-
library: Any, optional. Library specific permissions.
|
502
|
-
deals: Any, optional. Deals specific permissions.
|
503
|
-
createEditAndDeleteDealsBoards: Any, optional. Permission to create, edit, or delete deals boards.
|
504
|
-
dealsInlineEditing: Any, optional. Permission for inline editing of deals.
|
505
|
-
account: Any, optional. Account management permissions.
|
506
|
-
coaching: Any, optional. Additional coaching permissions.
|
507
|
-
usage: Any, optional. Additional usage permissions.
|
508
|
-
teamStats: Any, optional. Permission to view team statistics.
|
509
|
-
initiatives: Any, optional. Permission related to initiatives.
|
510
|
-
market: Any, optional. Permission related to market features.
|
511
|
-
activity: Any, optional. Permission related to activity features.
|
512
|
-
forecast: Any, optional. Permission to view forecasts.
|
513
|
-
forecastManage: Any, optional. Permission to manage forecasts.
|
514
|
-
engageManageCompanyTemplates: Any, optional. Permission to manage company templates for engagement.
|
515
|
-
engageManageCompanySequences: Any, optional. Permission to manage engagement company sequences.
|
516
|
-
engageCreateAndManageRulesets: Any, optional. Permission to create and manage engagement rulesets.
|
517
|
-
engageSnoozeFlowToDosForOthers: Any, optional. Permission to snooze engagement to-dos for others.
|
518
|
-
viewEngageAnalyticsActivity: Any, optional. Permission to view engagement analytics activity.
|
519
|
-
viewEngageAnalyticsPerformance: Any, optional. Permission to view engagement analytics performance.
|
520
|
-
viewEngageAnalyticsFlows: Any, optional. Permission to view engagement analytics flows.
|
521
|
-
manageGeneralBusinessSettings: Any, optional. Permission to manage general business settings.
|
522
|
-
manageScorecards: Any, optional. Permission to manage scorecards.
|
523
|
-
exportCallsAndCoachingDataToCSV: Any, optional. Permission to export calls and coaching data to CSV.
|
524
|
-
crmDataInlineEditing: Any, optional. Permission for inline editing of CRM data.
|
525
|
-
crmDataImport: Any, optional. Permission to import CRM data.
|
526
|
-
viewRevenueAnalytics: Any, optional. Permission to view revenue analytics.
|
527
|
-
manageRevenueAnalytics: Any, optional. Permission to manage revenue analytics.
|
528
|
-
|
529
|
-
Returns:
|
530
|
-
dict[str, Any]: The response containing details of the created permission profile.
|
531
|
-
|
532
|
-
Raises:
|
533
|
-
ValueError: Raised if the required 'workspaceId' parameter is missing.
|
534
|
-
HTTPError: Raised if the HTTP request to create the permission profile fails (e.g., due to network issues or invalid input).
|
535
|
-
|
536
|
-
Tags:
|
537
|
-
create, permission-profile, management, api, important
|
538
|
-
"""
|
539
|
-
if workspaceId is None:
|
540
|
-
raise ValueError("Missing required parameter 'workspaceId'")
|
541
|
-
request_body = {
|
542
|
-
"id": id,
|
543
|
-
"name": name,
|
544
|
-
"description": description,
|
545
|
-
"callsAccess": callsAccess,
|
546
|
-
"libraryFolderAccess": libraryFolderAccess,
|
547
|
-
"dealsAccess": dealsAccess,
|
548
|
-
"forecastPermissions": forecastPermissions,
|
549
|
-
"coachingAccess": coachingAccess,
|
550
|
-
"insightsAccess": insightsAccess,
|
551
|
-
"usageAccess": usageAccess,
|
552
|
-
"emailsAccess": emailsAccess,
|
553
|
-
"scoreCalls": scoreCalls,
|
554
|
-
"overrideScore": overrideScore,
|
555
|
-
"downloadCallMedia": downloadCallMedia,
|
556
|
-
"shareCallsWithCustomers": shareCallsWithCustomers,
|
557
|
-
"manuallyScheduleAndUploadCalls": manuallyScheduleAndUploadCalls,
|
558
|
-
"privateCalls": privateCalls,
|
559
|
-
"deleteCalls": deleteCalls,
|
560
|
-
"trimCalls": trimCalls,
|
561
|
-
"listenInCalls": listenInCalls,
|
562
|
-
"deleteEmails": deleteEmails,
|
563
|
-
"callsAndSearch": callsAndSearch,
|
564
|
-
"library": library,
|
565
|
-
"deals": deals,
|
566
|
-
"createEditAndDeleteDealsBoards": createEditAndDeleteDealsBoards,
|
567
|
-
"dealsInlineEditing": dealsInlineEditing,
|
568
|
-
"account": account,
|
569
|
-
"coaching": coaching,
|
570
|
-
"usage": usage,
|
571
|
-
"teamStats": teamStats,
|
572
|
-
"initiatives": initiatives,
|
573
|
-
"market": market,
|
574
|
-
"activity": activity,
|
575
|
-
"forecast": forecast,
|
576
|
-
"forecastManage": forecastManage,
|
577
|
-
"engageManageCompanyTemplates": engageManageCompanyTemplates,
|
578
|
-
"engageManageCompanySequences": engageManageCompanySequences,
|
579
|
-
"engageCreateAndManageRulesets": engageCreateAndManageRulesets,
|
580
|
-
"engageSnoozeFlowToDosForOthers": engageSnoozeFlowToDosForOthers,
|
581
|
-
"viewEngageAnalyticsActivity": viewEngageAnalyticsActivity,
|
582
|
-
"viewEngageAnalyticsPerformance": viewEngageAnalyticsPerformance,
|
583
|
-
"viewEngageAnalyticsFlows": viewEngageAnalyticsFlows,
|
584
|
-
"manageGeneralBusinessSettings": manageGeneralBusinessSettings,
|
585
|
-
"manageScorecards": manageScorecards,
|
586
|
-
"exportCallsAndCoachingDataToCSV": exportCallsAndCoachingDataToCSV,
|
587
|
-
"crmDataInlineEditing": crmDataInlineEditing,
|
588
|
-
"crmDataImport": crmDataImport,
|
589
|
-
"viewRevenueAnalytics": viewRevenueAnalytics,
|
590
|
-
"manageRevenueAnalytics": manageRevenueAnalytics,
|
591
|
-
}
|
592
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
593
|
-
url = f"{self.base_url}/v2/permission-profile"
|
594
|
-
query_params = {
|
595
|
-
k: v for k, v in [("workspaceId", workspaceId)] if v is not None
|
596
|
-
}
|
597
|
-
response = self._post(url, data=request_body, params=query_params)
|
598
|
-
response.raise_for_status()
|
599
|
-
return response.json()
|
600
|
-
|
601
|
-
def update_meeting(
|
602
|
-
self,
|
603
|
-
meetingId,
|
604
|
-
startTime,
|
605
|
-
endTime,
|
606
|
-
invitees,
|
607
|
-
organizerEmail,
|
608
|
-
title=None,
|
609
|
-
externalId=None,
|
610
|
-
) -> dict[str, Any]:
|
611
|
-
"""
|
612
|
-
Updates the details of an existing meeting with new information such as time, invitees, and title.
|
613
|
-
|
614
|
-
Args:
|
615
|
-
meetingId: str. The unique identifier of the meeting to update.
|
616
|
-
startTime: str. The updated start time of the meeting in ISO 8601 format.
|
617
|
-
endTime: str. The updated end time of the meeting in ISO 8601 format.
|
618
|
-
invitees: list. The updated list of invitees' email addresses.
|
619
|
-
organizerEmail: str. The email address of the meeting organizer.
|
620
|
-
title: str, optional. The new title of the meeting.
|
621
|
-
externalId: str, optional. An external identifier for the meeting.
|
622
|
-
|
623
|
-
Returns:
|
624
|
-
dict. A dictionary representing the updated meeting details as returned by the server.
|
625
|
-
|
626
|
-
Raises:
|
627
|
-
ValueError: If any of the required parameters ('meetingId', 'startTime', 'endTime', 'invitees', or 'organizerEmail') are missing.
|
628
|
-
|
629
|
-
Tags:
|
630
|
-
update, meeting, management, important
|
631
|
-
"""
|
632
|
-
if meetingId is None:
|
633
|
-
raise ValueError("Missing required parameter 'meetingId'")
|
634
|
-
if startTime is None:
|
635
|
-
raise ValueError("Missing required parameter 'startTime'")
|
636
|
-
if endTime is None:
|
637
|
-
raise ValueError("Missing required parameter 'endTime'")
|
638
|
-
if invitees is None:
|
639
|
-
raise ValueError("Missing required parameter 'invitees'")
|
640
|
-
if organizerEmail is None:
|
641
|
-
raise ValueError("Missing required parameter 'organizerEmail'")
|
642
|
-
request_body = {
|
643
|
-
"startTime": startTime,
|
644
|
-
"endTime": endTime,
|
645
|
-
"title": title,
|
646
|
-
"invitees": invitees,
|
647
|
-
"externalId": externalId,
|
648
|
-
"organizerEmail": organizerEmail,
|
649
|
-
}
|
650
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
651
|
-
url = f"{self.base_url}/v2/meetings/{meetingId}"
|
652
|
-
query_params = {}
|
653
|
-
response = self._put(url, data=request_body, params=query_params)
|
654
|
-
response.raise_for_status()
|
655
|
-
return response.json()
|
656
|
-
|
657
|
-
def delete_meeting(self, meetingId, organizerEmail=None) -> dict[str, Any]:
|
658
|
-
"""
|
659
|
-
Deletes a meeting by its ID, optionally specifying the organizer's email.
|
660
|
-
|
661
|
-
Args:
|
662
|
-
meetingId: str. The unique identifier for the meeting to be deleted. Must not be None.
|
663
|
-
organizerEmail: str, optional. The email address of the meeting organizer. If provided, it is included in the deletion request.
|
664
|
-
|
665
|
-
Returns:
|
666
|
-
dict. The response data from the delete operation, parsed from JSON.
|
667
|
-
|
668
|
-
Raises:
|
669
|
-
ValueError: Raised when 'meetingId' is None.
|
670
|
-
HTTPError: Raised if the HTTP response indicates an unsuccessful delete operation.
|
671
|
-
|
672
|
-
Tags:
|
673
|
-
delete, meeting, api, important
|
674
|
-
"""
|
675
|
-
if meetingId is None:
|
676
|
-
raise ValueError("Missing required parameter 'meetingId'")
|
677
|
-
request_body = {
|
678
|
-
"organizerEmail": organizerEmail,
|
679
|
-
}
|
680
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
681
|
-
url = f"{self.base_url}/v2/meetings/{meetingId}"
|
682
|
-
query_params = {}
|
683
|
-
response = self._delete(url, params=query_params)
|
684
|
-
response.raise_for_status()
|
685
|
-
return response.json()
|
686
|
-
|
687
|
-
def content_viewed(
|
688
|
-
self,
|
689
|
-
reportingSystem,
|
690
|
-
eventTimestamp,
|
691
|
-
contentId,
|
692
|
-
contentUrl,
|
693
|
-
contentTitle,
|
694
|
-
eventId=None,
|
695
|
-
viewActionTitle=None,
|
696
|
-
shareId=None,
|
697
|
-
viewInfoUrl=None,
|
698
|
-
viewer=None,
|
699
|
-
crmContext=None,
|
700
|
-
contentProperties=None,
|
701
|
-
eventProperties=None,
|
702
|
-
userAgent=None,
|
703
|
-
mobileAppId=None,
|
704
|
-
agentPlatform=None,
|
705
|
-
workspaceId=None,
|
706
|
-
trackingId=None,
|
707
|
-
nonCompanyParticipants=None,
|
708
|
-
moreInfoUrl=None,
|
709
|
-
actionName=None,
|
710
|
-
sharer=None,
|
711
|
-
sharingMessageSubject=None,
|
712
|
-
sharingMessageBody=None,
|
713
|
-
) -> Any:
|
714
|
-
"""
|
715
|
-
Reports a content view event to the customer engagement system with detailed metadata about the event and content.
|
716
|
-
|
717
|
-
Args:
|
718
|
-
reportingSystem: The identifier or name of the reporting system submitting the event. Required.
|
719
|
-
eventTimestamp: The timestamp of when the content was viewed (in ISO 8601 format or as required). Required.
|
720
|
-
contentId: A unique identifier for the content that was viewed. Required.
|
721
|
-
contentUrl: The URL of the content that was viewed. Required.
|
722
|
-
contentTitle: The title of the content that was viewed. Required.
|
723
|
-
eventId: An optional unique identifier for the event.
|
724
|
-
viewActionTitle: An optional descriptive title of the view action.
|
725
|
-
shareId: An optional identifier indicating the sharing context, if any.
|
726
|
-
viewInfoUrl: An optional URL for more information about the view event.
|
727
|
-
viewer: An optional identifier or details about the viewer.
|
728
|
-
crmContext: Optional CRM-related context or metadata.
|
729
|
-
contentProperties: Optional additional properties describing the content.
|
730
|
-
eventProperties: Optional additional properties describing the event.
|
731
|
-
userAgent: Optional user agent string from the viewer's device.
|
732
|
-
mobileAppId: Optional identifier for the mobile application.
|
733
|
-
agentPlatform: Optional platform or environment information.
|
734
|
-
workspaceId: Optional identifier for the associated workspace.
|
735
|
-
trackingId: Optional tracking identifier for analytics.
|
736
|
-
nonCompanyParticipants: Optional list or details about non-company viewers/participants.
|
737
|
-
moreInfoUrl: Optional URL for further details about the event.
|
738
|
-
actionName: Optional action name describing the type of view action.
|
739
|
-
sharer: Optional identifier or details about the person who shared the content.
|
740
|
-
sharingMessageSubject: Optional subject line of a sharing message.
|
741
|
-
sharingMessageBody: Optional body/content of a sharing message.
|
742
|
-
|
743
|
-
Returns:
|
744
|
-
A dictionary representing the JSON response from the customer engagement API, containing the outcome of the reported event.
|
745
|
-
|
746
|
-
Raises:
|
747
|
-
ValueError: If any required parameter (reportingSystem, eventTimestamp, contentId, contentUrl, or contentTitle) is missing.
|
748
|
-
requests.HTTPError: If the HTTP request to the customer engagement API fails with a response error status.
|
749
|
-
|
750
|
-
Tags:
|
751
|
-
report, content-view, event, customer-engagement, api, http, important
|
752
|
-
"""
|
753
|
-
if reportingSystem is None:
|
754
|
-
raise ValueError("Missing required parameter 'reportingSystem'")
|
755
|
-
if eventTimestamp is None:
|
756
|
-
raise ValueError("Missing required parameter 'eventTimestamp'")
|
757
|
-
if contentId is None:
|
758
|
-
raise ValueError("Missing required parameter 'contentId'")
|
759
|
-
if contentUrl is None:
|
760
|
-
raise ValueError("Missing required parameter 'contentUrl'")
|
761
|
-
if contentTitle is None:
|
762
|
-
raise ValueError("Missing required parameter 'contentTitle'")
|
763
|
-
request_body = {
|
764
|
-
"reportingSystem": reportingSystem,
|
765
|
-
"eventTimestamp": eventTimestamp,
|
766
|
-
"eventId": eventId,
|
767
|
-
"contentId": contentId,
|
768
|
-
"contentUrl": contentUrl,
|
769
|
-
"contentTitle": contentTitle,
|
770
|
-
"viewActionTitle": viewActionTitle,
|
771
|
-
"shareId": shareId,
|
772
|
-
"viewInfoUrl": viewInfoUrl,
|
773
|
-
"viewer": viewer,
|
774
|
-
"crmContext": crmContext,
|
775
|
-
"contentProperties": contentProperties,
|
776
|
-
"eventProperties": eventProperties,
|
777
|
-
"userAgent": userAgent,
|
778
|
-
"mobileAppId": mobileAppId,
|
779
|
-
"agentPlatform": agentPlatform,
|
780
|
-
"workspaceId": workspaceId,
|
781
|
-
"trackingId": trackingId,
|
782
|
-
"nonCompanyParticipants": nonCompanyParticipants,
|
783
|
-
"moreInfoUrl": moreInfoUrl,
|
784
|
-
"actionName": actionName,
|
785
|
-
"sharer": sharer,
|
786
|
-
"sharingMessageSubject": sharingMessageSubject,
|
787
|
-
"sharingMessageBody": sharingMessageBody,
|
788
|
-
}
|
789
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
790
|
-
url = f"{self.base_url}/v2/customer-engagement/content/viewed"
|
791
|
-
query_params = {}
|
792
|
-
response = self._put(url, data=request_body, params=query_params)
|
793
|
-
response.raise_for_status()
|
794
|
-
return response.json()
|
795
|
-
|
796
|
-
def content_shared(
|
797
|
-
self,
|
798
|
-
reportingSystem,
|
799
|
-
eventTimestamp,
|
800
|
-
contentId,
|
801
|
-
contentUrl,
|
802
|
-
contentTitle,
|
803
|
-
eventId=None,
|
804
|
-
shareId=None,
|
805
|
-
shareInfoUrl=None,
|
806
|
-
sharingMessageSubject=None,
|
807
|
-
sharingMessageBody=None,
|
808
|
-
sharer=None,
|
809
|
-
recipients=None,
|
810
|
-
crmContext=None,
|
811
|
-
contentProperties=None,
|
812
|
-
eventProperties=None,
|
813
|
-
workspaceId=None,
|
814
|
-
actionName=None,
|
815
|
-
nonCompanyParticipants=None,
|
816
|
-
moreInfoUrl=None,
|
817
|
-
trackingId=None,
|
818
|
-
mobileAppId=None,
|
819
|
-
agentPlatform=None,
|
820
|
-
userAgent=None,
|
821
|
-
) -> Any:
|
822
|
-
"""
|
823
|
-
Reports a content sharing event to the customer engagement system with detailed metadata about the shared content, sharer, and recipients.
|
824
|
-
|
825
|
-
Args:
|
826
|
-
reportingSystem: Identifier of the reporting system initiating the content sharing event. Required.
|
827
|
-
eventTimestamp: Timestamp of when the share event occurred, in ISO 8601 format. Required.
|
828
|
-
contentId: Unique identifier of the shared content. Required.
|
829
|
-
contentUrl: URL of the content being shared. Required.
|
830
|
-
contentTitle: Title of the shared content. Required.
|
831
|
-
eventId: Optional unique identifier for the share event.
|
832
|
-
shareId: Optional unique identifier for the share action.
|
833
|
-
shareInfoUrl: Optional URL providing more context or information about the share.
|
834
|
-
sharingMessageSubject: Optional subject line of the sharing message.
|
835
|
-
sharingMessageBody: Optional body text of the sharing message.
|
836
|
-
sharer: Optional identifier or object representing the user who shared the content.
|
837
|
-
recipients: Optional list or object representing the intended recipients of the shared content.
|
838
|
-
crmContext: Optional metadata providing context or references for related CRM objects or processes.
|
839
|
-
contentProperties: Optional dictionary of additional properties or attributes for the shared content.
|
840
|
-
eventProperties: Optional dictionary of additional properties for the share event.
|
841
|
-
workspaceId: Optional identifier for the workspace or environment of the event.
|
842
|
-
actionName: Optional string specifying the action or event type.
|
843
|
-
nonCompanyParticipants: Optional list of participants not affiliated with the company.
|
844
|
-
moreInfoUrl: Optional URL for more information about the content or event.
|
845
|
-
trackingId: Optional tracking identifier for analytics or logging.
|
846
|
-
mobileAppId: Optional identifier of the mobile application involved, if any.
|
847
|
-
agentPlatform: Optional platform or system used by the agent.
|
848
|
-
userAgent: Optional user agent string describing the client device or environment.
|
849
|
-
|
850
|
-
Returns:
|
851
|
-
A dictionary containing the server's JSON response with the recorded event details or status.
|
852
|
-
|
853
|
-
Raises:
|
854
|
-
ValueError: Raised if any required parameter (reportingSystem, eventTimestamp, contentId, contentUrl, or contentTitle) is None.
|
855
|
-
requests.HTTPError: Raised if the HTTP request to the reporting endpoint fails with a non-success status code.
|
856
|
-
|
857
|
-
Tags:
|
858
|
-
report, content, share, customer-engagement, event, api, important
|
859
|
-
"""
|
860
|
-
if reportingSystem is None:
|
861
|
-
raise ValueError("Missing required parameter 'reportingSystem'")
|
862
|
-
if eventTimestamp is None:
|
863
|
-
raise ValueError("Missing required parameter 'eventTimestamp'")
|
864
|
-
if contentId is None:
|
865
|
-
raise ValueError("Missing required parameter 'contentId'")
|
866
|
-
if contentUrl is None:
|
867
|
-
raise ValueError("Missing required parameter 'contentUrl'")
|
868
|
-
if contentTitle is None:
|
869
|
-
raise ValueError("Missing required parameter 'contentTitle'")
|
870
|
-
request_body = {
|
871
|
-
"reportingSystem": reportingSystem,
|
872
|
-
"eventTimestamp": eventTimestamp,
|
873
|
-
"eventId": eventId,
|
874
|
-
"contentId": contentId,
|
875
|
-
"contentUrl": contentUrl,
|
876
|
-
"contentTitle": contentTitle,
|
877
|
-
"shareId": shareId,
|
878
|
-
"shareInfoUrl": shareInfoUrl,
|
879
|
-
"sharingMessageSubject": sharingMessageSubject,
|
880
|
-
"sharingMessageBody": sharingMessageBody,
|
881
|
-
"sharer": sharer,
|
882
|
-
"recipients": recipients,
|
883
|
-
"crmContext": crmContext,
|
884
|
-
"contentProperties": contentProperties,
|
885
|
-
"eventProperties": eventProperties,
|
886
|
-
"workspaceId": workspaceId,
|
887
|
-
"actionName": actionName,
|
888
|
-
"nonCompanyParticipants": nonCompanyParticipants,
|
889
|
-
"moreInfoUrl": moreInfoUrl,
|
890
|
-
"trackingId": trackingId,
|
891
|
-
"mobileAppId": mobileAppId,
|
892
|
-
"agentPlatform": agentPlatform,
|
893
|
-
"userAgent": userAgent,
|
894
|
-
}
|
895
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
896
|
-
url = f"{self.base_url}/v2/customer-engagement/content/shared"
|
897
|
-
query_params = {}
|
898
|
-
response = self._put(url, data=request_body, params=query_params)
|
899
|
-
response.raise_for_status()
|
900
|
-
return response.json()
|
901
|
-
|
902
|
-
def custom_action(
|
903
|
-
self,
|
904
|
-
reportingSystem,
|
905
|
-
eventTimestamp,
|
906
|
-
eventId=None,
|
907
|
-
contentId=None,
|
908
|
-
contentUrl=None,
|
909
|
-
contentTitle=None,
|
910
|
-
actionName=None,
|
911
|
-
eventInfoUrl=None,
|
912
|
-
actor=None,
|
913
|
-
crmContext=None,
|
914
|
-
contentProperties=None,
|
915
|
-
eventProperties=None,
|
916
|
-
userAgent=None,
|
917
|
-
mobileAppId=None,
|
918
|
-
agentPlatform=None,
|
919
|
-
workspaceId=None,
|
920
|
-
nonCompanyParticipants=None,
|
921
|
-
moreInfoUrl=None,
|
922
|
-
shareId=None,
|
923
|
-
trackingId=None,
|
924
|
-
sharer=None,
|
925
|
-
sharingMessageSubject=None,
|
926
|
-
sharingMessageBody=None,
|
927
|
-
) -> Any:
|
928
|
-
"""
|
929
|
-
Submits a custom customer engagement action event with detailed reporting and context information to the server.
|
930
|
-
|
931
|
-
Args:
|
932
|
-
reportingSystem: The identifier or name of the reporting system sending the event. Required.
|
933
|
-
eventTimestamp: The ISO 8601 timestamp representing when the event occurred. Required.
|
934
|
-
eventId: A unique identifier for the event. Optional.
|
935
|
-
contentId: The ID of the related content item. Optional.
|
936
|
-
contentUrl: The URL of the related content item. Optional.
|
937
|
-
contentTitle: The title of the related content item. Optional.
|
938
|
-
actionName: The name describing the action performed (e.g., 'share', 'edit'). Optional.
|
939
|
-
eventInfoUrl: A URL providing additional information about the event. Optional.
|
940
|
-
actor: The actor (user or system) who triggered the event. Optional.
|
941
|
-
crmContext: CRM context or identifiers relevant to the event. Optional.
|
942
|
-
contentProperties: A dictionary of custom properties related to the content. Optional.
|
943
|
-
eventProperties: A dictionary of additional properties about the event. Optional.
|
944
|
-
userAgent: The user agent string of the client device, if available. Optional.
|
945
|
-
mobileAppId: Identifier of the mobile application, if applicable. Optional.
|
946
|
-
agentPlatform: The platform used by the agent (e.g., 'iOS', 'Android', 'Web'). Optional.
|
947
|
-
workspaceId: Workspace or tenant ID associated with the event. Optional.
|
948
|
-
nonCompanyParticipants: A list of participants in the event not affiliated with the company. Optional.
|
949
|
-
moreInfoUrl: An additional URL for more details about the event. Optional.
|
950
|
-
shareId: The identifier for a share or sharing action. Optional.
|
951
|
-
trackingId: Unique identifier for tracking the event. Optional.
|
952
|
-
sharer: User or entity who performed the sharing action. Optional.
|
953
|
-
sharingMessageSubject: Subject line of a related sharing message, if any. Optional.
|
954
|
-
sharingMessageBody: Body of a related sharing message, if any. Optional.
|
955
|
-
|
956
|
-
Returns:
|
957
|
-
A JSON-decoded response from the server containing the result of the action submission.
|
958
|
-
|
959
|
-
Raises:
|
960
|
-
ValueError: If required parameters 'reportingSystem' or 'eventTimestamp' are missing.
|
961
|
-
requests.HTTPError: If the server response contains an HTTP error status.
|
962
|
-
|
963
|
-
Tags:
|
964
|
-
report, submit, action, customer-engagement, api, important
|
965
|
-
"""
|
966
|
-
if reportingSystem is None:
|
967
|
-
raise ValueError("Missing required parameter 'reportingSystem'")
|
968
|
-
if eventTimestamp is None:
|
969
|
-
raise ValueError("Missing required parameter 'eventTimestamp'")
|
970
|
-
request_body = {
|
971
|
-
"reportingSystem": reportingSystem,
|
972
|
-
"eventTimestamp": eventTimestamp,
|
973
|
-
"eventId": eventId,
|
974
|
-
"contentId": contentId,
|
975
|
-
"contentUrl": contentUrl,
|
976
|
-
"contentTitle": contentTitle,
|
977
|
-
"actionName": actionName,
|
978
|
-
"eventInfoUrl": eventInfoUrl,
|
979
|
-
"actor": actor,
|
980
|
-
"crmContext": crmContext,
|
981
|
-
"contentProperties": contentProperties,
|
982
|
-
"eventProperties": eventProperties,
|
983
|
-
"userAgent": userAgent,
|
984
|
-
"mobileAppId": mobileAppId,
|
985
|
-
"agentPlatform": agentPlatform,
|
986
|
-
"workspaceId": workspaceId,
|
987
|
-
"nonCompanyParticipants": nonCompanyParticipants,
|
988
|
-
"moreInfoUrl": moreInfoUrl,
|
989
|
-
"shareId": shareId,
|
990
|
-
"trackingId": trackingId,
|
991
|
-
"sharer": sharer,
|
992
|
-
"sharingMessageSubject": sharingMessageSubject,
|
993
|
-
"sharingMessageBody": sharingMessageBody,
|
994
|
-
}
|
995
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
996
|
-
url = f"{self.base_url}/v2/customer-engagement/action"
|
997
|
-
query_params = {}
|
998
|
-
response = self._put(url, data=request_body, params=query_params)
|
999
|
-
response.raise_for_status()
|
1000
|
-
return response.json()
|
1001
|
-
|
1002
|
-
def list_generic_crm_integration(
|
1003
|
-
self,
|
1004
|
-
) -> dict[str, Any]:
|
1005
|
-
"""
|
1006
|
-
Retrieves a list of generic CRM integrations from the API.
|
1007
|
-
|
1008
|
-
Args:
|
1009
|
-
None: This function takes no arguments
|
1010
|
-
|
1011
|
-
Returns:
|
1012
|
-
dict: A dictionary representing the JSON response containing available CRM integrations.
|
1013
|
-
|
1014
|
-
Raises:
|
1015
|
-
requests.exceptions.HTTPError: If the HTTP request to the CRM integrations endpoint fails or returns an unsuccessful status code.
|
1016
|
-
|
1017
|
-
Tags:
|
1018
|
-
list, crm, integration, api, important
|
1019
|
-
"""
|
1020
|
-
url = f"{self.base_url}/v2/crm/integrations"
|
1021
|
-
query_params = {}
|
1022
|
-
response = self._get(url, params=query_params)
|
1023
|
-
response.raise_for_status()
|
1024
|
-
return response.json()
|
1025
|
-
|
1026
|
-
def register_generic_crm_integration(self, ownerEmail, name) -> dict[str, Any]:
|
1027
|
-
"""
|
1028
|
-
Registers a generic CRM integration for a given owner email and integration name.
|
1029
|
-
|
1030
|
-
Args:
|
1031
|
-
ownerEmail: str. The email address of the owner of the CRM integration. Must not be None.
|
1032
|
-
name: str. The name of the CRM integration to register. Must not be None.
|
1033
|
-
|
1034
|
-
Returns:
|
1035
|
-
dict. The response data from the CRM integration registration API as a dictionary.
|
1036
|
-
|
1037
|
-
Raises:
|
1038
|
-
ValueError: If 'ownerEmail' or 'name' is None.
|
1039
|
-
HTTPError: If the API request returns an unsuccessful status code.
|
1040
|
-
|
1041
|
-
Tags:
|
1042
|
-
register, crm, integration, api, important
|
1043
|
-
"""
|
1044
|
-
if ownerEmail is None:
|
1045
|
-
raise ValueError("Missing required parameter 'ownerEmail'")
|
1046
|
-
if name is None:
|
1047
|
-
raise ValueError("Missing required parameter 'name'")
|
1048
|
-
request_body = {
|
1049
|
-
"ownerEmail": ownerEmail,
|
1050
|
-
"name": name,
|
1051
|
-
}
|
1052
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1053
|
-
url = f"{self.base_url}/v2/crm/integrations"
|
1054
|
-
query_params = {}
|
1055
|
-
response = self._put(url, data=request_body, params=query_params)
|
1056
|
-
response.raise_for_status()
|
1057
|
-
return response.json()
|
1058
|
-
|
1059
|
-
def delete_generic_crm_integration(
|
1060
|
-
self, integrationId, clientRequestId
|
1061
|
-
) -> dict[str, Any]:
|
1062
|
-
"""
|
1063
|
-
Deletes a generic CRM integration using the provided integration and client request IDs.
|
1064
|
-
|
1065
|
-
Args:
|
1066
|
-
integrationId: str. The unique identifier of the CRM integration to delete.
|
1067
|
-
clientRequestId: str. A unique client-assigned identifier for tracking the request.
|
1068
|
-
|
1069
|
-
Returns:
|
1070
|
-
dict[str, Any]: The parsed JSON response from the API after attempting deletion.
|
1071
|
-
|
1072
|
-
Raises:
|
1073
|
-
ValueError: If 'integrationId' or 'clientRequestId' is None.
|
1074
|
-
requests.HTTPError: If the HTTP response indicates an unsuccessful status code.
|
1075
|
-
|
1076
|
-
Tags:
|
1077
|
-
delete, crm, integration, api, important
|
1078
|
-
"""
|
1079
|
-
if integrationId is None:
|
1080
|
-
raise ValueError("Missing required parameter 'integrationId'")
|
1081
|
-
if clientRequestId is None:
|
1082
|
-
raise ValueError("Missing required parameter 'clientRequestId'")
|
1083
|
-
url = f"{self.base_url}/v2/crm/integrations"
|
1084
|
-
query_params = {
|
1085
|
-
k: v
|
1086
|
-
for k, v in [
|
1087
|
-
("integrationId", integrationId),
|
1088
|
-
("clientRequestId", clientRequestId),
|
1089
|
-
]
|
1090
|
-
if v is not None
|
1091
|
-
}
|
1092
|
-
response = self._delete(url, params=query_params)
|
1093
|
-
response.raise_for_status()
|
1094
|
-
return response.json()
|
1095
|
-
|
1096
|
-
def add_users_access_to_calls(self, callAccessList=None) -> dict[str, Any]:
|
1097
|
-
"""
|
1098
|
-
Updates user access permissions for calls by sending a PUT request with the specified access list.
|
1099
|
-
|
1100
|
-
Args:
|
1101
|
-
callAccessList: Optional. A list of user access configurations to be applied to calls. If None, no access list is provided.
|
1102
|
-
|
1103
|
-
Returns:
|
1104
|
-
dict: The server's response as a JSON-decoded dictionary containing the result of the access update operation.
|
1105
|
-
|
1106
|
-
Raises:
|
1107
|
-
HTTPError: Raised if the server returns an unsuccessful status code, indicating a failure in updating user access.
|
1108
|
-
|
1109
|
-
Tags:
|
1110
|
-
update, calls, users-access, api, management, important
|
1111
|
-
"""
|
1112
|
-
request_body = {
|
1113
|
-
"callAccessList": callAccessList,
|
1114
|
-
}
|
1115
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1116
|
-
url = f"{self.base_url}/v2/calls/users-access"
|
1117
|
-
query_params = {}
|
1118
|
-
response = self._put(url, data=request_body, params=query_params)
|
1119
|
-
response.raise_for_status()
|
1120
|
-
return response.json()
|
1121
|
-
|
1122
|
-
def get_users_access_to_calls(self, filter) -> dict[str, Any]:
|
1123
|
-
"""
|
1124
|
-
Retrieves user access information for calls based on the provided filter criteria.
|
1125
|
-
|
1126
|
-
Args:
|
1127
|
-
filter: dict. The filter criteria used to determine which users' access to calls will be retrieved. Must not be None.
|
1128
|
-
|
1129
|
-
Returns:
|
1130
|
-
dict. The JSON response containing user access details matching the given filter.
|
1131
|
-
|
1132
|
-
Raises:
|
1133
|
-
ValueError: If the 'filter' parameter is None.
|
1134
|
-
requests.HTTPError: If the HTTP request fails or returns an unsuccessful status code.
|
1135
|
-
|
1136
|
-
Tags:
|
1137
|
-
get, calls, users-access, filter, api, important
|
1138
|
-
"""
|
1139
|
-
if filter is None:
|
1140
|
-
raise ValueError("Missing required parameter 'filter'")
|
1141
|
-
request_body = {
|
1142
|
-
"filter": filter,
|
1143
|
-
}
|
1144
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1145
|
-
url = f"{self.base_url}/v2/calls/users-access"
|
1146
|
-
query_params = {}
|
1147
|
-
response = self._post(url, data=request_body, params=query_params)
|
1148
|
-
response.raise_for_status()
|
1149
|
-
return response.json()
|
1150
|
-
|
1151
|
-
def delete_users_access_to_calls(self, callAccessList=None) -> dict[str, Any]:
|
1152
|
-
"""
|
1153
|
-
Deletes a list of users' access permissions to calls.
|
1154
|
-
|
1155
|
-
Args:
|
1156
|
-
callAccessList: Optional list of user access objects specifying which users' call access should be deleted. If None, no specific user access is targeted.
|
1157
|
-
|
1158
|
-
Returns:
|
1159
|
-
A dictionary containing the server's response data from the delete operation.
|
1160
|
-
|
1161
|
-
Raises:
|
1162
|
-
HTTPError: If the HTTP request to delete users' access fails, an HTTPError will be raised.
|
1163
|
-
|
1164
|
-
Tags:
|
1165
|
-
delete, access-management, calls, important
|
1166
|
-
"""
|
1167
|
-
request_body = {
|
1168
|
-
"callAccessList": callAccessList,
|
1169
|
-
}
|
1170
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1171
|
-
url = f"{self.base_url}/v2/calls/users-access"
|
1172
|
-
query_params = {}
|
1173
|
-
response = self._delete(url, params=query_params)
|
1174
|
-
response.raise_for_status()
|
1175
|
-
return response.json()
|
1176
|
-
|
1177
|
-
def list_multiple_users(self, filter, cursor=None) -> dict[str, Any]:
|
1178
|
-
"""
|
1179
|
-
Retrieves a list of users based on a provided filter and optional pagination cursor.
|
1180
|
-
|
1181
|
-
Args:
|
1182
|
-
filter: The filter criteria for selecting users. Required.
|
1183
|
-
cursor: An optional pagination cursor indicating where to start retrieving users. Defaults to None.
|
1184
|
-
|
1185
|
-
Returns:
|
1186
|
-
A dictionary containing the list of users and associated metadata in JSON format.
|
1187
|
-
|
1188
|
-
Raises:
|
1189
|
-
ValueError: Raised if the required 'filter' parameter is missing.
|
1190
|
-
requests.HTTPError: Raised if the HTTP request fails or returns an error status.
|
1191
|
-
|
1192
|
-
Tags:
|
1193
|
-
list, users, async_job, batch, management, important
|
1194
|
-
"""
|
1195
|
-
if filter is None:
|
1196
|
-
raise ValueError("Missing required parameter 'filter'")
|
1197
|
-
request_body = {
|
1198
|
-
"cursor": cursor,
|
1199
|
-
"filter": filter,
|
1200
|
-
}
|
1201
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1202
|
-
url = f"{self.base_url}/v2/users/extensive"
|
1203
|
-
query_params = {}
|
1204
|
-
response = self._post(url, data=request_body, params=query_params)
|
1205
|
-
response.raise_for_status()
|
1206
|
-
return response.json()
|
1207
|
-
|
1208
|
-
def list_interaction_stats(self, filter, cursor=None) -> dict[str, Any]:
|
1209
|
-
"""
|
1210
|
-
Retrieves interaction statistics based on specified filter criteria, with optional pagination support.
|
1211
|
-
|
1212
|
-
Args:
|
1213
|
-
filter: The filter criteria used to select which interaction statistics to retrieve. Must not be None.
|
1214
|
-
cursor: An optional pagination cursor indicating the starting point for fetching the next set of results. Defaults to None.
|
1215
|
-
|
1216
|
-
Returns:
|
1217
|
-
A dictionary containing the interaction statistics data returned by the API.
|
1218
|
-
|
1219
|
-
Raises:
|
1220
|
-
ValueError: Raised if the 'filter' parameter is None.
|
1221
|
-
HTTPError: Raised if the HTTP request to the backend service fails.
|
1222
|
-
|
1223
|
-
Tags:
|
1224
|
-
list, interaction-stats, api, batch, important
|
1225
|
-
"""
|
1226
|
-
if filter is None:
|
1227
|
-
raise ValueError("Missing required parameter 'filter'")
|
1228
|
-
request_body = {
|
1229
|
-
"cursor": cursor,
|
1230
|
-
"filter": filter,
|
1231
|
-
}
|
1232
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1233
|
-
url = f"{self.base_url}/v2/stats/interaction"
|
1234
|
-
query_params = {}
|
1235
|
-
response = self._post(url, data=request_body, params=query_params)
|
1236
|
-
response.raise_for_status()
|
1237
|
-
return response.json()
|
1238
|
-
|
1239
|
-
def list_answered_scorecards(self, filter, cursor=None) -> dict[str, Any]:
|
1240
|
-
"""
|
1241
|
-
Retrieves a paginated list of answered scorecards based on the provided filter criteria.
|
1242
|
-
|
1243
|
-
Args:
|
1244
|
-
filter: A dictionary specifying the filtering conditions for the scorecards. This parameter is required.
|
1245
|
-
cursor: An optional string for pagination. If provided, retrieves the next page of results starting from this cursor.
|
1246
|
-
|
1247
|
-
Returns:
|
1248
|
-
A dictionary containing the JSON response with the list of answered scorecards and pagination details.
|
1249
|
-
|
1250
|
-
Raises:
|
1251
|
-
ValueError: Raised if the 'filter' parameter is None.
|
1252
|
-
requests.HTTPError: Raised if the HTTP request to the scorecards endpoint returns an unsuccessful status code.
|
1253
|
-
|
1254
|
-
Tags:
|
1255
|
-
list, scorecards, management, stats, paginated, important
|
1256
|
-
"""
|
1257
|
-
if filter is None:
|
1258
|
-
raise ValueError("Missing required parameter 'filter'")
|
1259
|
-
request_body = {
|
1260
|
-
"cursor": cursor,
|
1261
|
-
"filter": filter,
|
1262
|
-
}
|
1263
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1264
|
-
url = f"{self.base_url}/v2/stats/activity/scorecards"
|
1265
|
-
query_params = {}
|
1266
|
-
response = self._post(url, data=request_body, params=query_params)
|
1267
|
-
response.raise_for_status()
|
1268
|
-
return response.json()
|
1269
|
-
|
1270
|
-
def list_multiple_users_day_by_day_activity(
|
1271
|
-
self, filter, cursor=None
|
1272
|
-
) -> dict[str, Any]:
|
1273
|
-
"""
|
1274
|
-
Retrieves day-by-day activity statistics for multiple users based on a provided filter.
|
1275
|
-
|
1276
|
-
Args:
|
1277
|
-
filter: dict. The filter criteria specifying users or activity attributes to include in the statistics.
|
1278
|
-
cursor: str or None. An optional pagination cursor for retrieving the next set of results.
|
1279
|
-
|
1280
|
-
Returns:
|
1281
|
-
dict: A JSON-decoded dictionary containing the day-by-day activity statistics for the matching users.
|
1282
|
-
|
1283
|
-
Raises:
|
1284
|
-
ValueError: Raised if the required 'filter' parameter is not provided.
|
1285
|
-
HTTPError: Raised if the HTTP request to the server fails or returns an error status.
|
1286
|
-
|
1287
|
-
Tags:
|
1288
|
-
list, activity, user-management, stats, important
|
1289
|
-
"""
|
1290
|
-
if filter is None:
|
1291
|
-
raise ValueError("Missing required parameter 'filter'")
|
1292
|
-
request_body = {
|
1293
|
-
"cursor": cursor,
|
1294
|
-
"filter": filter,
|
1295
|
-
}
|
1296
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1297
|
-
url = f"{self.base_url}/v2/stats/activity/day-by-day"
|
1298
|
-
query_params = {}
|
1299
|
-
response = self._post(url, data=request_body, params=query_params)
|
1300
|
-
response.raise_for_status()
|
1301
|
-
return response.json()
|
1302
|
-
|
1303
|
-
def list_multiple_users_aggregate_activity(
|
1304
|
-
self, filter, cursor=None
|
1305
|
-
) -> dict[str, Any]:
|
1306
|
-
"""
|
1307
|
-
Aggregates and returns activity statistics for multiple users based on specified filters.
|
1308
|
-
|
1309
|
-
Args:
|
1310
|
-
filter: dict or compatible object specifying criteria to select users and activity types for aggregation. Required.
|
1311
|
-
cursor: Optional pagination token (str) to retrieve the next page of results. Default is None.
|
1312
|
-
|
1313
|
-
Returns:
|
1314
|
-
dict: A dictionary containing aggregated user activity statistics matching the specified filter and pagination settings.
|
1315
|
-
|
1316
|
-
Raises:
|
1317
|
-
ValueError: Raised if the 'filter' parameter is not provided.
|
1318
|
-
requests.HTTPError: Propagated if the underlying HTTP POST request fails with an HTTP error response.
|
1319
|
-
|
1320
|
-
Tags:
|
1321
|
-
list, aggregate, activity, user-management, batch, important
|
1322
|
-
"""
|
1323
|
-
if filter is None:
|
1324
|
-
raise ValueError("Missing required parameter 'filter'")
|
1325
|
-
request_body = {
|
1326
|
-
"cursor": cursor,
|
1327
|
-
"filter": filter,
|
1328
|
-
}
|
1329
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1330
|
-
url = f"{self.base_url}/v2/stats/activity/aggregate"
|
1331
|
-
query_params = {}
|
1332
|
-
response = self._post(url, data=request_body, params=query_params)
|
1333
|
-
response.raise_for_status()
|
1334
|
-
return response.json()
|
1335
|
-
|
1336
|
-
def list_multiple_users_aggregate_by_period(
|
1337
|
-
self, filter, aggregationPeriod, cursor=None
|
1338
|
-
) -> dict[str, Any]:
|
1339
|
-
"""
|
1340
|
-
Aggregates activity statistics for multiple users over a specified period using given filter criteria.
|
1341
|
-
|
1342
|
-
Args:
|
1343
|
-
filter: dict. Dictionary specifying the filtering criteria for selecting users whose activities will be aggregated.
|
1344
|
-
aggregationPeriod: str. Time period over which to aggregate user activity data (e.g., 'daily', 'weekly', 'monthly').
|
1345
|
-
cursor: Optional[str]. Pagination cursor to retrieve the next set of results; defaults to None.
|
1346
|
-
|
1347
|
-
Returns:
|
1348
|
-
dict. JSON response containing the aggregated user activity statistics by the specified period.
|
1349
|
-
|
1350
|
-
Raises:
|
1351
|
-
ValueError: Raised if 'filter' or 'aggregationPeriod' is None.
|
1352
|
-
HTTPError: Raised if the HTTP request to the aggregation endpoint fails.
|
1353
|
-
|
1354
|
-
Tags:
|
1355
|
-
list, aggregate, activity, users, batch, important
|
1356
|
-
"""
|
1357
|
-
if filter is None:
|
1358
|
-
raise ValueError("Missing required parameter 'filter'")
|
1359
|
-
if aggregationPeriod is None:
|
1360
|
-
raise ValueError("Missing required parameter 'aggregationPeriod'")
|
1361
|
-
request_body = {
|
1362
|
-
"cursor": cursor,
|
1363
|
-
"filter": filter,
|
1364
|
-
"aggregationPeriod": aggregationPeriod,
|
1365
|
-
}
|
1366
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1367
|
-
url = f"{self.base_url}/v2/stats/activity/aggregate-by-period"
|
1368
|
-
query_params = {}
|
1369
|
-
response = self._post(url, data=request_body, params=query_params)
|
1370
|
-
response.raise_for_status()
|
1371
|
-
return response.json()
|
1372
|
-
|
1373
|
-
def add_meeting(
|
1374
|
-
self, startTime, endTime, invitees, organizerEmail, title=None, externalId=None
|
1375
|
-
) -> dict[str, Any]:
|
1376
|
-
"""
|
1377
|
-
Creates a new meeting with the specified details and returns the server's response as a dictionary.
|
1378
|
-
|
1379
|
-
Args:
|
1380
|
-
startTime: The start time of the meeting, typically in ISO 8601 format (str or datetime). Required.
|
1381
|
-
endTime: The end time of the meeting, typically in ISO 8601 format (str or datetime). Required.
|
1382
|
-
invitees: A list of invitee email addresses or attendee objects for the meeting. Required.
|
1383
|
-
organizerEmail: The email address of the meeting organizer. Required.
|
1384
|
-
title: The title or subject of the meeting. Optional.
|
1385
|
-
externalId: An optional external identifier for the meeting, used for integrations or reference. Optional.
|
1386
|
-
|
1387
|
-
Returns:
|
1388
|
-
A dictionary containing the JSON response from the server with the details of the created meeting.
|
1389
|
-
|
1390
|
-
Raises:
|
1391
|
-
ValueError: If any required parameter ('startTime', 'endTime', 'invitees', or 'organizerEmail') is missing.
|
1392
|
-
requests.HTTPError: If the HTTP request to create the meeting fails (e.g., due to network error or server-side issue).
|
1393
|
-
|
1394
|
-
Tags:
|
1395
|
-
add, meeting, create, management, api, important
|
1396
|
-
"""
|
1397
|
-
if startTime is None:
|
1398
|
-
raise ValueError("Missing required parameter 'startTime'")
|
1399
|
-
if endTime is None:
|
1400
|
-
raise ValueError("Missing required parameter 'endTime'")
|
1401
|
-
if invitees is None:
|
1402
|
-
raise ValueError("Missing required parameter 'invitees'")
|
1403
|
-
if organizerEmail is None:
|
1404
|
-
raise ValueError("Missing required parameter 'organizerEmail'")
|
1405
|
-
request_body = {
|
1406
|
-
"startTime": startTime,
|
1407
|
-
"endTime": endTime,
|
1408
|
-
"title": title,
|
1409
|
-
"invitees": invitees,
|
1410
|
-
"externalId": externalId,
|
1411
|
-
"organizerEmail": organizerEmail,
|
1412
|
-
}
|
1413
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1414
|
-
url = f"{self.base_url}/v2/meetings"
|
1415
|
-
query_params = {}
|
1416
|
-
response = self._post(url, data=request_body, params=query_params)
|
1417
|
-
response.raise_for_status()
|
1418
|
-
return response.json()
|
1419
|
-
|
1420
|
-
def integration_status(self, emails=None) -> dict[str, Any]:
|
1421
|
-
"""
|
1422
|
-
Retrieves the integration status for specified email addresses via the meetings API.
|
1423
|
-
|
1424
|
-
Args:
|
1425
|
-
emails: Optional sequence of email addresses (list or similar) to check integration status for. If None, integration status for all accessible users may be returned.
|
1426
|
-
|
1427
|
-
Returns:
|
1428
|
-
A dictionary containing the integration status information for the given email addresses.
|
1429
|
-
|
1430
|
-
Raises:
|
1431
|
-
requests.HTTPError: If the HTTP request to the integration status endpoint returns an unsuccessful status code.
|
1432
|
-
|
1433
|
-
Tags:
|
1434
|
-
integration-status, status, check, api, async-job, important
|
1435
|
-
"""
|
1436
|
-
request_body = {
|
1437
|
-
"emails": emails,
|
1438
|
-
}
|
1439
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1440
|
-
url = f"{self.base_url}/v2/meetings/integration/status"
|
1441
|
-
query_params = {}
|
1442
|
-
response = self._post(url, data=request_body, params=query_params)
|
1443
|
-
response.raise_for_status()
|
1444
|
-
return response.json()
|
1445
|
-
|
1446
|
-
def integration_settings(self, integrationTypeSettings) -> dict[str, Any]:
|
1447
|
-
"""
|
1448
|
-
Sends integration type settings to the integration settings API endpoint and returns the server's response as a dictionary.
|
1449
|
-
|
1450
|
-
Args:
|
1451
|
-
integrationTypeSettings: A dictionary or object containing the integration type settings to be submitted to the integration settings API.
|
1452
|
-
|
1453
|
-
Returns:
|
1454
|
-
A dictionary containing the JSON response from the integration settings API endpoint.
|
1455
|
-
|
1456
|
-
Raises:
|
1457
|
-
ValueError: Raised if 'integrationTypeSettings' is None.
|
1458
|
-
requests.HTTPError: Raised if the HTTP request to the integration settings API fails.
|
1459
|
-
|
1460
|
-
Tags:
|
1461
|
-
integration-settings, submit, api, management, important
|
1462
|
-
"""
|
1463
|
-
if integrationTypeSettings is None:
|
1464
|
-
raise ValueError("Missing required parameter 'integrationTypeSettings'")
|
1465
|
-
request_body = {
|
1466
|
-
"integrationTypeSettings": integrationTypeSettings,
|
1467
|
-
}
|
1468
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1469
|
-
url = f"{self.base_url}/v2/integration-settings"
|
1470
|
-
query_params = {}
|
1471
|
-
response = self._post(url, data=request_body, params=query_params)
|
1472
|
-
response.raise_for_status()
|
1473
|
-
return response.json()
|
1474
|
-
|
1475
|
-
def get_flows_for_prospects(self, crmProspectsIds) -> dict[str, Any]:
|
1476
|
-
"""
|
1477
|
-
Fetches flow data for the specified CRM prospect IDs from the API.
|
1478
|
-
|
1479
|
-
Args:
|
1480
|
-
crmProspectsIds: A list of CRM prospect IDs for which flow data should be retrieved.
|
1481
|
-
|
1482
|
-
Returns:
|
1483
|
-
A dictionary containing the flow information for the provided CRM prospect IDs as returned by the API.
|
1484
|
-
|
1485
|
-
Raises:
|
1486
|
-
ValueError: Raised if 'crmProspectsIds' is None.
|
1487
|
-
requests.HTTPError: Raised if the HTTP request to the API fails with a bad status code.
|
1488
|
-
|
1489
|
-
Tags:
|
1490
|
-
get, flows, prospect-management, api, important
|
1491
|
-
"""
|
1492
|
-
if crmProspectsIds is None:
|
1493
|
-
raise ValueError("Missing required parameter 'crmProspectsIds'")
|
1494
|
-
request_body = {
|
1495
|
-
"crmProspectsIds": crmProspectsIds,
|
1496
|
-
}
|
1497
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1498
|
-
url = f"{self.base_url}/v2/flows/prospects"
|
1499
|
-
query_params = {}
|
1500
|
-
response = self._post(url, data=request_body, params=query_params)
|
1501
|
-
response.raise_for_status()
|
1502
|
-
return response.json()
|
1503
|
-
|
1504
|
-
def assign_prospects(
|
1505
|
-
self, crmProspectsIds, flowId, flowInstanceOwnerEmail
|
1506
|
-
) -> dict[str, Any]:
|
1507
|
-
"""
|
1508
|
-
Assigns a list of CRM prospect IDs to a specified flow instance and owner via an API POST request.
|
1509
|
-
|
1510
|
-
Args:
|
1511
|
-
crmProspectsIds: List of prospect IDs from the CRM to assign.
|
1512
|
-
flowId: Identifier of the target flow instance.
|
1513
|
-
flowInstanceOwnerEmail: Email address of the flow instance's owner.
|
1514
|
-
|
1515
|
-
Returns:
|
1516
|
-
Dictionary containing the API response data after assigning prospects.
|
1517
|
-
|
1518
|
-
Raises:
|
1519
|
-
ValueError: Raised if any of the required parameters ('crmProspectsIds', 'flowId', or 'flowInstanceOwnerEmail') is None.
|
1520
|
-
HTTPError: Raised if the API POST request returns an unsuccessful status code.
|
1521
|
-
|
1522
|
-
Tags:
|
1523
|
-
assign, prospects, api, batch, important, management
|
1524
|
-
"""
|
1525
|
-
if crmProspectsIds is None:
|
1526
|
-
raise ValueError("Missing required parameter 'crmProspectsIds'")
|
1527
|
-
if flowId is None:
|
1528
|
-
raise ValueError("Missing required parameter 'flowId'")
|
1529
|
-
if flowInstanceOwnerEmail is None:
|
1530
|
-
raise ValueError("Missing required parameter 'flowInstanceOwnerEmail'")
|
1531
|
-
request_body = {
|
1532
|
-
"crmProspectsIds": crmProspectsIds,
|
1533
|
-
"flowId": flowId,
|
1534
|
-
"flowInstanceOwnerEmail": flowInstanceOwnerEmail,
|
1535
|
-
}
|
1536
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1537
|
-
url = f"{self.base_url}/v2/flows/prospects/assign"
|
1538
|
-
query_params = {}
|
1539
|
-
response = self._post(url, data=request_body, params=query_params)
|
1540
|
-
response.raise_for_status()
|
1541
|
-
return response.json()
|
1542
|
-
|
1543
|
-
def add_digital_interaction(
|
1544
|
-
self,
|
1545
|
-
eventId,
|
1546
|
-
timestamp,
|
1547
|
-
eventType,
|
1548
|
-
content,
|
1549
|
-
sourceSystemName=None,
|
1550
|
-
sessionId=None,
|
1551
|
-
device=None,
|
1552
|
-
person=None,
|
1553
|
-
customFields=None,
|
1554
|
-
trackingId=None,
|
1555
|
-
) -> dict[str, Any]:
|
1556
|
-
"""
|
1557
|
-
Submits a digital interaction event record to the API with required metadata and content.
|
1558
|
-
|
1559
|
-
Args:
|
1560
|
-
eventId: str. Unique identifier of the event. Required.
|
1561
|
-
timestamp: str. ISO 8601 formatted date/time string for when the event occurred. Required.
|
1562
|
-
eventType: str. The type/category of the digital event. Required.
|
1563
|
-
content: dict. The main content or payload of the digital interaction. Required.
|
1564
|
-
sourceSystemName: str, optional. Name of the originating system for the event.
|
1565
|
-
sessionId: str, optional. Identifier for the user's session.
|
1566
|
-
device: str, optional. Description or ID of the user's device.
|
1567
|
-
person: dict, optional. Information about the person involved in the interaction.
|
1568
|
-
customFields: dict, optional. Additional custom fields associated with the event.
|
1569
|
-
trackingId: str, optional. Identifier for tracking the event across systems.
|
1570
|
-
|
1571
|
-
Returns:
|
1572
|
-
dict. Parsed JSON response from the API representing the stored digital interaction.
|
1573
|
-
|
1574
|
-
Raises:
|
1575
|
-
ValueError: If any of the required parameters ('eventId', 'timestamp', 'eventType', 'content') are missing.
|
1576
|
-
requests.HTTPError: If the API response status indicates an HTTP error.
|
1577
|
-
|
1578
|
-
Tags:
|
1579
|
-
add, digital-interaction, api, event, important
|
1580
|
-
"""
|
1581
|
-
if eventId is None:
|
1582
|
-
raise ValueError("Missing required parameter 'eventId'")
|
1583
|
-
if timestamp is None:
|
1584
|
-
raise ValueError("Missing required parameter 'timestamp'")
|
1585
|
-
if eventType is None:
|
1586
|
-
raise ValueError("Missing required parameter 'eventType'")
|
1587
|
-
if content is None:
|
1588
|
-
raise ValueError("Missing required parameter 'content'")
|
1589
|
-
request_body = {
|
1590
|
-
"eventId": eventId,
|
1591
|
-
"timestamp": timestamp,
|
1592
|
-
"eventType": eventType,
|
1593
|
-
"sourceSystemName": sourceSystemName,
|
1594
|
-
"sessionId": sessionId,
|
1595
|
-
"device": device,
|
1596
|
-
"content": content,
|
1597
|
-
"person": person,
|
1598
|
-
"customFields": customFields,
|
1599
|
-
"trackingId": trackingId,
|
1600
|
-
}
|
1601
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1602
|
-
url = f"{self.base_url}/v2/digital-interaction"
|
1603
|
-
query_params = {}
|
1604
|
-
response = self._post(url, data=request_body, params=query_params)
|
1605
|
-
response.raise_for_status()
|
1606
|
-
return response.json()
|
1607
|
-
|
1608
|
-
def purge_phone_number(self, phoneNumber) -> dict[str, Any]:
|
1609
|
-
"""
|
1610
|
-
Erases all data associated with the specified phone number via the data privacy API.
|
1611
|
-
|
1612
|
-
Args:
|
1613
|
-
phoneNumber: str. The phone number for which data should be purged.
|
1614
|
-
|
1615
|
-
Returns:
|
1616
|
-
dict. The JSON response from the API after requesting data erasure for the provided phone number.
|
1617
|
-
|
1618
|
-
Raises:
|
1619
|
-
ValueError: If the 'phoneNumber' parameter is None.
|
1620
|
-
requests.HTTPError: If the API request fails or returns an unsuccessful status code.
|
1621
|
-
|
1622
|
-
Tags:
|
1623
|
-
purge, data-privacy, erase, important
|
1624
|
-
"""
|
1625
|
-
if phoneNumber is None:
|
1626
|
-
raise ValueError("Missing required parameter 'phoneNumber'")
|
1627
|
-
url = f"{self.base_url}/v2/data-privacy/erase-data-for-phone-number"
|
1628
|
-
query_params = {
|
1629
|
-
k: v for k, v in [("phoneNumber", phoneNumber)] if v is not None
|
1630
|
-
}
|
1631
|
-
response = self._post(url, data={}, params=query_params)
|
1632
|
-
response.raise_for_status()
|
1633
|
-
return response.json()
|
1634
|
-
|
1635
|
-
def purge_email_address(self, emailAddress) -> dict[str, Any]:
|
1636
|
-
"""
|
1637
|
-
Permanently erases all data associated with the specified email address from the system.
|
1638
|
-
|
1639
|
-
Args:
|
1640
|
-
emailAddress: str. The email address whose data should be purged.
|
1641
|
-
|
1642
|
-
Returns:
|
1643
|
-
dict[str, Any]: The JSON response from the data privacy API after the purge operation.
|
1644
|
-
|
1645
|
-
Raises:
|
1646
|
-
ValueError: Raised if 'emailAddress' is None.
|
1647
|
-
requests.HTTPError: Raised if the underlying HTTP request fails or receives a non-success response status.
|
1648
|
-
|
1649
|
-
Tags:
|
1650
|
-
purge, erase, data-privacy, email, important
|
1651
|
-
"""
|
1652
|
-
if emailAddress is None:
|
1653
|
-
raise ValueError("Missing required parameter 'emailAddress'")
|
1654
|
-
url = f"{self.base_url}/v2/data-privacy/erase-data-for-email-address"
|
1655
|
-
query_params = {
|
1656
|
-
k: v for k, v in [("emailAddress", emailAddress)] if v is not None
|
1657
|
-
}
|
1658
|
-
response = self._post(url, data={}, params=query_params)
|
1659
|
-
response.raise_for_status()
|
1660
|
-
return response.json()
|
1661
|
-
|
1662
|
-
def list_crm_schema_fields(self, integrationId, objectType) -> dict[str, Any]:
|
1663
|
-
"""
|
1664
|
-
Retrieves the schema fields for a specified CRM object type associated with a given integration.
|
1665
|
-
|
1666
|
-
Args:
|
1667
|
-
integrationId: str. The unique identifier of the CRM integration for which to fetch schema fields.
|
1668
|
-
objectType: str. The type of CRM object (e.g., 'contact', 'deal') whose schema fields are to be listed.
|
1669
|
-
|
1670
|
-
Returns:
|
1671
|
-
dict[str, Any]: A dictionary containing the schema fields of the specified CRM object type.
|
1672
|
-
|
1673
|
-
Raises:
|
1674
|
-
ValueError: If 'integrationId' or 'objectType' is None.
|
1675
|
-
requests.HTTPError: If the HTTP request to the CRM API fails.
|
1676
|
-
|
1677
|
-
Tags:
|
1678
|
-
list, crm, schema, fields, integration, api, important
|
1679
|
-
"""
|
1680
|
-
if integrationId is None:
|
1681
|
-
raise ValueError("Missing required parameter 'integrationId'")
|
1682
|
-
if objectType is None:
|
1683
|
-
raise ValueError("Missing required parameter 'objectType'")
|
1684
|
-
url = f"{self.base_url}/v2/crm/entity-schema"
|
1685
|
-
query_params = {
|
1686
|
-
k: v
|
1687
|
-
for k, v in [("integrationId", integrationId), ("objectType", objectType)]
|
1688
|
-
if v is not None
|
1689
|
-
}
|
1690
|
-
response = self._get(url, params=query_params)
|
1691
|
-
response.raise_for_status()
|
1692
|
-
return response.json()
|
1693
|
-
|
1694
|
-
def upload_crm_schema_field(
|
1695
|
-
self, integrationId, objectType, items
|
1696
|
-
) -> dict[str, Any]:
|
1697
|
-
"""
|
1698
|
-
Uploads CRM entity schema fields to the integration service for the specified CRM object type.
|
1699
|
-
|
1700
|
-
Args:
|
1701
|
-
integrationId: str. The identifier of the CRM integration to which the schema fields will be uploaded.
|
1702
|
-
objectType: str. The type of CRM object (e.g., 'contact', 'lead') whose schema fields are being uploaded.
|
1703
|
-
items: list. A list of schema field definitions to be uploaded for the specified CRM object type.
|
1704
|
-
|
1705
|
-
Returns:
|
1706
|
-
dict. The JSON response from the integration service containing the result of the upload operation.
|
1707
|
-
|
1708
|
-
Raises:
|
1709
|
-
ValueError: Raised if any of the required parameters ('integrationId', 'objectType', or 'items') are missing or None.
|
1710
|
-
requests.HTTPError: Raised if the HTTP request to the integration service fails or returns an error status.
|
1711
|
-
|
1712
|
-
Tags:
|
1713
|
-
upload, crm, schema, fields, integration, important
|
1714
|
-
"""
|
1715
|
-
if integrationId is None:
|
1716
|
-
raise ValueError("Missing required parameter 'integrationId'")
|
1717
|
-
if objectType is None:
|
1718
|
-
raise ValueError("Missing required parameter 'objectType'")
|
1719
|
-
if items is None:
|
1720
|
-
raise ValueError("Missing required parameter 'items'")
|
1721
|
-
request_body = items
|
1722
|
-
url = f"{self.base_url}/v2/crm/entity-schema"
|
1723
|
-
query_params = {
|
1724
|
-
k: v
|
1725
|
-
for k, v in [("integrationId", integrationId), ("objectType", objectType)]
|
1726
|
-
if v is not None
|
1727
|
-
}
|
1728
|
-
response = self._post(url, data=request_body, params=query_params)
|
1729
|
-
response.raise_for_status()
|
1730
|
-
return response.json()
|
1731
|
-
|
1732
|
-
def get_crm_objects(
|
1733
|
-
self, integrationId, objectType, objectsCrmIds
|
1734
|
-
) -> dict[str, Any]:
|
1735
|
-
"""
|
1736
|
-
Retrieves CRM objects by their CRM IDs from a specified integration and object type.
|
1737
|
-
|
1738
|
-
Args:
|
1739
|
-
integrationId: str. The unique identifier of the CRM integration. Required.
|
1740
|
-
objectType: str. The type of CRM object to retrieve (e.g., 'contact', 'deal'). Required.
|
1741
|
-
objectsCrmIds: str. Comma-separated list of CRM object IDs to fetch. Required.
|
1742
|
-
|
1743
|
-
Returns:
|
1744
|
-
dict[str, Any]: A dictionary containing the retrieved CRM objects as returned by the API.
|
1745
|
-
|
1746
|
-
Raises:
|
1747
|
-
ValueError: If any of 'integrationId', 'objectType', or 'objectsCrmIds' parameters are missing.
|
1748
|
-
|
1749
|
-
Tags:
|
1750
|
-
get, crm, objects, integration, api, important
|
1751
|
-
"""
|
1752
|
-
if integrationId is None:
|
1753
|
-
raise ValueError("Missing required parameter 'integrationId'")
|
1754
|
-
if objectType is None:
|
1755
|
-
raise ValueError("Missing required parameter 'objectType'")
|
1756
|
-
if objectsCrmIds is None:
|
1757
|
-
raise ValueError("Missing required parameter 'objectsCrmIds'")
|
1758
|
-
url = f"{self.base_url}/v2/crm/entities"
|
1759
|
-
query_params = {
|
1760
|
-
k: v
|
1761
|
-
for k, v in [
|
1762
|
-
("integrationId", integrationId),
|
1763
|
-
("objectType", objectType),
|
1764
|
-
("objectsCrmIds", objectsCrmIds),
|
1765
|
-
]
|
1766
|
-
if v is not None
|
1767
|
-
}
|
1768
|
-
response = self._get(url, params=query_params)
|
1769
|
-
response.raise_for_status()
|
1770
|
-
return response.json()
|
1771
|
-
|
1772
|
-
def get_call_transcripts(self, filter, cursor=None) -> dict[str, Any]:
|
1773
|
-
"""
|
1774
|
-
Retrieves call transcripts based on the specified filter and optional pagination cursor.
|
1775
|
-
|
1776
|
-
Args:
|
1777
|
-
filter: A dictionary specifying the filtering criteria to select relevant call transcripts.
|
1778
|
-
cursor: An optional string representing the pagination cursor to fetch a specific page of results.
|
1779
|
-
|
1780
|
-
Returns:
|
1781
|
-
A dictionary containing the API response with the fetched call transcripts.
|
1782
|
-
|
1783
|
-
Raises:
|
1784
|
-
ValueError: Raised if the required 'filter' parameter is missing.
|
1785
|
-
requests.HTTPError: Raised if the HTTP request made to retrieve call transcripts fails with a non-success status code.
|
1786
|
-
|
1787
|
-
Tags:
|
1788
|
-
get, list, calls, transcripts, batch, management, important
|
1789
|
-
"""
|
1790
|
-
if filter is None:
|
1791
|
-
raise ValueError("Missing required parameter 'filter'")
|
1792
|
-
request_body = {
|
1793
|
-
"cursor": cursor,
|
1794
|
-
"filter": filter,
|
1795
|
-
}
|
1796
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1797
|
-
url = f"{self.base_url}/v2/calls/transcript"
|
1798
|
-
query_params = {}
|
1799
|
-
response = self._post(url, data=request_body, params=query_params)
|
1800
|
-
response.raise_for_status()
|
1801
|
-
return response.json()
|
1802
|
-
|
1803
|
-
def list_workspaces(
|
1804
|
-
self,
|
1805
|
-
) -> dict[str, Any]:
|
1806
|
-
"""
|
1807
|
-
Retrieves a list of all available workspaces from the API.
|
1808
|
-
|
1809
|
-
Returns:
|
1810
|
-
dict[str, Any]: A dictionary containing the details of the available workspaces as returned by the API.
|
1811
|
-
|
1812
|
-
Raises:
|
1813
|
-
requests.HTTPError: If the HTTP request to fetch the workspace list fails or returns an unsuccessful status code.
|
1814
|
-
|
1815
|
-
Tags:
|
1816
|
-
list, workspaces, api, retrieve, important
|
1817
|
-
"""
|
1818
|
-
url = f"{self.base_url}/v2/workspaces"
|
1819
|
-
query_params = {}
|
1820
|
-
response = self._get(url, params=query_params)
|
1821
|
-
response.raise_for_status()
|
1822
|
-
return response.json()
|
1823
|
-
|
1824
|
-
def list_users(self, cursor=None, includeAvatars=None) -> dict[str, Any]:
|
1825
|
-
"""
|
1826
|
-
Retrieves a paginated list of users from the API, with optional filtering by cursor and inclusion of avatar data.
|
1827
|
-
|
1828
|
-
Args:
|
1829
|
-
cursor: str or None. An optional pagination cursor to fetch the next set of users.
|
1830
|
-
includeAvatars: bool or None. Whether to include avatar data for each user in the response.
|
1831
|
-
|
1832
|
-
Returns:
|
1833
|
-
dict: The JSON response from the API containing user data, typically including users and pagination information.
|
1834
|
-
|
1835
|
-
Raises:
|
1836
|
-
requests.HTTPError: Raised if the HTTP request to the user listing endpoint returns an unsuccessful status code.
|
1837
|
-
|
1838
|
-
Tags:
|
1839
|
-
list, users, api, management, important
|
1840
|
-
"""
|
1841
|
-
url = f"{self.base_url}/v2/users"
|
1842
|
-
query_params = {
|
1843
|
-
k: v
|
1844
|
-
for k, v in [("cursor", cursor), ("includeAvatars", includeAvatars)]
|
1845
|
-
if v is not None
|
1846
|
-
}
|
1847
|
-
response = self._get(url, params=query_params)
|
1848
|
-
response.raise_for_status()
|
1849
|
-
return response.json()
|
1850
|
-
|
1851
|
-
def get_user(self, id) -> dict[str, Any]:
|
1852
|
-
"""
|
1853
|
-
Retrieves user information by user ID from the API.
|
1854
|
-
|
1855
|
-
Args:
|
1856
|
-
id: The unique identifier of the user to retrieve.
|
1857
|
-
|
1858
|
-
Returns:
|
1859
|
-
A dictionary containing user information returned by the API.
|
1860
|
-
|
1861
|
-
Raises:
|
1862
|
-
ValueError: If the 'id' parameter is None.
|
1863
|
-
requests.HTTPError: If the HTTP request to the user endpoint fails with a non-2xx status code.
|
1864
|
-
|
1865
|
-
Tags:
|
1866
|
-
get, user, api, fetch, important
|
1867
|
-
"""
|
1868
|
-
if id is None:
|
1869
|
-
raise ValueError("Missing required parameter 'id'")
|
1870
|
-
url = f"{self.base_url}/v2/users/{id}"
|
1871
|
-
query_params = {}
|
1872
|
-
response = self._get(url, params=query_params)
|
1873
|
-
response.raise_for_status()
|
1874
|
-
return response.json()
|
1875
|
-
|
1876
|
-
def get_user_history(self, id) -> dict[str, Any]:
|
1877
|
-
"""
|
1878
|
-
Retrieves the settings history for a specific user by user ID.
|
1879
|
-
|
1880
|
-
Args:
|
1881
|
-
id: The unique identifier of the user whose settings history is to be retrieved.
|
1882
|
-
|
1883
|
-
Returns:
|
1884
|
-
A dictionary containing the user's settings history as returned by the API.
|
1885
|
-
|
1886
|
-
Raises:
|
1887
|
-
ValueError: If the 'id' parameter is None.
|
1888
|
-
requests.HTTPError: If the HTTP request to the user settings history endpoint fails.
|
1889
|
-
|
1890
|
-
Tags:
|
1891
|
-
get, user-history, fetch, api, important
|
1892
|
-
"""
|
1893
|
-
if id is None:
|
1894
|
-
raise ValueError("Missing required parameter 'id'")
|
1895
|
-
url = f"{self.base_url}/v2/users/{id}/settings-history"
|
1896
|
-
query_params = {}
|
1897
|
-
response = self._get(url, params=query_params)
|
1898
|
-
response.raise_for_status()
|
1899
|
-
return response.json()
|
1900
|
-
|
1901
|
-
def list_trackers(self, workspaceId=None) -> dict[str, Any]:
|
1902
|
-
"""
|
1903
|
-
Retrieves a list of trackers for the specified workspace from the API.
|
1904
|
-
|
1905
|
-
Args:
|
1906
|
-
workspaceId: Optional; the ID of the workspace to filter trackers by. If None, retrieves trackers for all accessible workspaces.
|
1907
|
-
|
1908
|
-
Returns:
|
1909
|
-
A dictionary containing the tracker data returned by the API.
|
1910
|
-
|
1911
|
-
Raises:
|
1912
|
-
requests.HTTPError: Raised if the HTTP request to the API fails or returns an unsuccessful status code.
|
1913
|
-
|
1914
|
-
Tags:
|
1915
|
-
list, trackers, management, api, important
|
1916
|
-
"""
|
1917
|
-
url = f"{self.base_url}/v2/settings/trackers"
|
1918
|
-
query_params = {
|
1919
|
-
k: v for k, v in [("workspaceId", workspaceId)] if v is not None
|
1920
|
-
}
|
1921
|
-
response = self._get(url, params=query_params)
|
1922
|
-
response.raise_for_status()
|
1923
|
-
return response.json()
|
1924
|
-
|
1925
|
-
def list_scorecards(
|
1926
|
-
self,
|
1927
|
-
) -> dict[str, Any]:
|
1928
|
-
"""
|
1929
|
-
Retrieves a list of scorecard settings from the API.
|
1930
|
-
|
1931
|
-
Args:
|
1932
|
-
None: This function takes no arguments
|
1933
|
-
|
1934
|
-
Returns:
|
1935
|
-
A dictionary containing the scorecard settings as returned by the API.
|
1936
|
-
|
1937
|
-
Raises:
|
1938
|
-
HTTPError: If the HTTP request to the API fails or returns a non-success status code.
|
1939
|
-
|
1940
|
-
Tags:
|
1941
|
-
list, scorecards, settings, api, important
|
1942
|
-
"""
|
1943
|
-
url = f"{self.base_url}/v2/settings/scorecards"
|
1944
|
-
query_params = {}
|
1945
|
-
response = self._get(url, params=query_params)
|
1946
|
-
response.raise_for_status()
|
1947
|
-
return response.json()
|
1948
|
-
|
1949
|
-
def list_permission_profile_users(self, profileId) -> dict[str, Any]:
|
1950
|
-
"""
|
1951
|
-
Retrieves a list of users associated with a specified permission profile.
|
1952
|
-
|
1953
|
-
Args:
|
1954
|
-
profileId: The unique identifier of the permission profile for which to list associated users.
|
1955
|
-
|
1956
|
-
Returns:
|
1957
|
-
A dictionary containing information about users assigned to the given permission profile.
|
1958
|
-
|
1959
|
-
Raises:
|
1960
|
-
ValueError: Raised if the 'profileId' parameter is not provided.
|
1961
|
-
HTTPError: Raised if the HTTP request to the API endpoint fails due to an unsuccessful response status.
|
1962
|
-
|
1963
|
-
Tags:
|
1964
|
-
list, permission-profile, users, management, important
|
1965
|
-
"""
|
1966
|
-
if profileId is None:
|
1967
|
-
raise ValueError("Missing required parameter 'profileId'")
|
1968
|
-
url = f"{self.base_url}/v2/permission-profile/users"
|
1969
|
-
query_params = {k: v for k, v in [("profileId", profileId)] if v is not None}
|
1970
|
-
response = self._get(url, params=query_params)
|
1971
|
-
response.raise_for_status()
|
1972
|
-
return response.json()
|
1973
|
-
|
1974
|
-
def list_logs(
|
1975
|
-
self, logType, fromDateTime, toDateTime=None, cursor=None
|
1976
|
-
) -> dict[str, Any]:
|
1977
|
-
"""
|
1978
|
-
Retrieves a list of logs for the specified log type and time range, with optional cursor-based pagination.
|
1979
|
-
|
1980
|
-
Args:
|
1981
|
-
logType: str. The type of logs to retrieve. Required.
|
1982
|
-
fromDateTime: str. The start date and time (ISO 8601 format) for filtering logs. Required.
|
1983
|
-
toDateTime: str or None. The end date and time (ISO 8601 format) for filtering logs. Optional.
|
1984
|
-
cursor: str or None. A pagination cursor returned from a previous call to continue fetching logs. Optional.
|
1985
|
-
|
1986
|
-
Returns:
|
1987
|
-
dict. A dictionary containing the log records and pagination details as returned by the API.
|
1988
|
-
|
1989
|
-
Raises:
|
1990
|
-
ValueError: If 'logType' or 'fromDateTime' is not provided.
|
1991
|
-
requests.HTTPError: If the HTTP request fails or the API returns an error status.
|
1992
|
-
|
1993
|
-
Tags:
|
1994
|
-
list, logs, api, management, important
|
1995
|
-
"""
|
1996
|
-
if logType is None:
|
1997
|
-
raise ValueError("Missing required parameter 'logType'")
|
1998
|
-
if fromDateTime is None:
|
1999
|
-
raise ValueError("Missing required parameter 'fromDateTime'")
|
2000
|
-
url = f"{self.base_url}/v2/logs"
|
2001
|
-
query_params = {
|
2002
|
-
k: v
|
2003
|
-
for k, v in [
|
2004
|
-
("logType", logType),
|
2005
|
-
("fromDateTime", fromDateTime),
|
2006
|
-
("toDateTime", toDateTime),
|
2007
|
-
("cursor", cursor),
|
2008
|
-
]
|
2009
|
-
if v is not None
|
2010
|
-
}
|
2011
|
-
response = self._get(url, params=query_params)
|
2012
|
-
response.raise_for_status()
|
2013
|
-
return response.json()
|
2014
|
-
|
2015
|
-
def get_library_structure(self, workspaceId=None) -> dict[str, Any]:
|
2016
|
-
"""
|
2017
|
-
Retrieves the hierarchical structure of library folders, optionally filtered by workspace ID.
|
2018
|
-
|
2019
|
-
Args:
|
2020
|
-
workspaceId: Optional; a string representing the workspace identifier to filter the library folders. If None, retrieves folders across all available workspaces.
|
2021
|
-
|
2022
|
-
Returns:
|
2023
|
-
A dictionary containing the JSON response with the structure of library folders.
|
2024
|
-
|
2025
|
-
Raises:
|
2026
|
-
HTTPError: If the HTTP request to retrieve the library structure fails or an invalid response is received.
|
2027
|
-
|
2028
|
-
Tags:
|
2029
|
-
get, library, structure, folders, management, important
|
2030
|
-
"""
|
2031
|
-
url = f"{self.base_url}/v2/library/folders"
|
2032
|
-
query_params = {
|
2033
|
-
k: v for k, v in [("workspaceId", workspaceId)] if v is not None
|
2034
|
-
}
|
2035
|
-
response = self._get(url, params=query_params)
|
2036
|
-
response.raise_for_status()
|
2037
|
-
return response.json()
|
2038
|
-
|
2039
|
-
def get_calls_in_specific_folder(self, folderId=None) -> dict[str, Any]:
|
2040
|
-
"""
|
2041
|
-
Retrieves the list of calls contained within a specified folder from the remote library API.
|
2042
|
-
|
2043
|
-
Args:
|
2044
|
-
folderId: Optional; The ID of the folder to filter the calls. If None, retrieves calls from the default or root folder.
|
2045
|
-
|
2046
|
-
Returns:
|
2047
|
-
A dictionary containing the JSON response with the calls present in the specified folder.
|
2048
|
-
|
2049
|
-
Raises:
|
2050
|
-
requests.HTTPError: If the HTTP request to the remote API fails or returns an unsuccessful status code.
|
2051
|
-
|
2052
|
-
Tags:
|
2053
|
-
get, list, calls, folder, api, management, important
|
2054
|
-
"""
|
2055
|
-
url = f"{self.base_url}/v2/library/folder-content"
|
2056
|
-
query_params = {k: v for k, v in [("folderId", folderId)] if v is not None}
|
2057
|
-
response = self._get(url, params=query_params)
|
2058
|
-
response.raise_for_status()
|
2059
|
-
return response.json()
|
2060
|
-
|
2061
|
-
def list_flows(
|
2062
|
-
self, flowOwnerEmail, cursor=None, workspaceId=None
|
2063
|
-
) -> dict[str, Any]:
|
2064
|
-
"""
|
2065
|
-
Retrieves a list of flows owned by the specified user, with optional pagination and workspace filtering.
|
2066
|
-
|
2067
|
-
Args:
|
2068
|
-
flowOwnerEmail: str. The email address of the owner whose flows are to be listed. Required.
|
2069
|
-
cursor: str or None. A cursor for pagination to retrieve the next set of results. Optional.
|
2070
|
-
workspaceId: str or None. The workspace identifier to filter flows by workspace. Optional.
|
2071
|
-
|
2072
|
-
Returns:
|
2073
|
-
dict. The JSON response from the API containing flow details and pagination information.
|
2074
|
-
|
2075
|
-
Raises:
|
2076
|
-
ValueError: If 'flowOwnerEmail' is not provided.
|
2077
|
-
requests.HTTPError: If the API request fails or returns a non-successful status.
|
2078
|
-
|
2079
|
-
Tags:
|
2080
|
-
list, flows, management, api, important
|
2081
|
-
"""
|
2082
|
-
if flowOwnerEmail is None:
|
2083
|
-
raise ValueError("Missing required parameter 'flowOwnerEmail'")
|
2084
|
-
url = f"{self.base_url}/v2/flows"
|
2085
|
-
query_params = {
|
2086
|
-
k: v
|
2087
|
-
for k, v in [
|
2088
|
-
("flowOwnerEmail", flowOwnerEmail),
|
2089
|
-
("cursor", cursor),
|
2090
|
-
("workspaceId", workspaceId),
|
2091
|
-
]
|
2092
|
-
if v is not None
|
2093
|
-
}
|
2094
|
-
response = self._get(url, params=query_params)
|
2095
|
-
response.raise_for_status()
|
2096
|
-
return response.json()
|
2097
|
-
|
2098
|
-
def find_all_references_to_phone_number(self, phoneNumber) -> dict[str, Any]:
|
2099
|
-
"""
|
2100
|
-
Fetches all references to a specified phone number from the data privacy API.
|
2101
|
-
|
2102
|
-
Args:
|
2103
|
-
phoneNumber: str. The phone number for which to find all associated references. Must not be None.
|
2104
|
-
|
2105
|
-
Returns:
|
2106
|
-
dict[str, Any]: A dictionary containing all data references associated with the provided phone number.
|
2107
|
-
|
2108
|
-
Raises:
|
2109
|
-
ValueError: If the 'phoneNumber' parameter is None.
|
2110
|
-
HTTPError: If the HTTP request to the data privacy API fails, e.g., due to network issues or a non-2xx response.
|
2111
|
-
|
2112
|
-
Tags:
|
2113
|
-
find, list, phone-number, data-privacy, reference, important
|
2114
|
-
"""
|
2115
|
-
if phoneNumber is None:
|
2116
|
-
raise ValueError("Missing required parameter 'phoneNumber'")
|
2117
|
-
url = f"{self.base_url}/v2/data-privacy/data-for-phone-number"
|
2118
|
-
query_params = {
|
2119
|
-
k: v for k, v in [("phoneNumber", phoneNumber)] if v is not None
|
2120
|
-
}
|
2121
|
-
response = self._get(url, params=query_params)
|
2122
|
-
response.raise_for_status()
|
2123
|
-
return response.json()
|
2124
|
-
|
2125
|
-
def find_all_references_to_email_address(self, emailAddress) -> dict[str, Any]:
|
2126
|
-
"""
|
2127
|
-
Finds and returns all data references associated with a given email address.
|
2128
|
-
|
2129
|
-
Args:
|
2130
|
-
emailAddress: str. The email address for which to search for data references.
|
2131
|
-
|
2132
|
-
Returns:
|
2133
|
-
dict[str, Any]: A dictionary containing all data references related to the specified email address, as returned by the API.
|
2134
|
-
|
2135
|
-
Raises:
|
2136
|
-
ValueError: If 'emailAddress' is None.
|
2137
|
-
HTTPError: If the HTTP request to the data privacy API fails or returns an error response.
|
2138
|
-
|
2139
|
-
Tags:
|
2140
|
-
search, data-privacy, email, api, important
|
2141
|
-
"""
|
2142
|
-
if emailAddress is None:
|
2143
|
-
raise ValueError("Missing required parameter 'emailAddress'")
|
2144
|
-
url = f"{self.base_url}/v2/data-privacy/data-for-email-address"
|
2145
|
-
query_params = {
|
2146
|
-
k: v for k, v in [("emailAddress", emailAddress)] if v is not None
|
2147
|
-
}
|
2148
|
-
response = self._get(url, params=query_params)
|
2149
|
-
response.raise_for_status()
|
2150
|
-
return response.json()
|
2151
|
-
|
2152
|
-
def get_request_status(self, integrationId, clientRequestId) -> dict[str, Any]:
|
2153
|
-
"""
|
2154
|
-
Retrieves the status of a CRM request using the provided integration and client request IDs.
|
2155
|
-
|
2156
|
-
Args:
|
2157
|
-
integrationId: The unique identifier for the integration. Must not be None.
|
2158
|
-
clientRequestId: The unique identifier for the client request. Must not be None.
|
2159
|
-
|
2160
|
-
Returns:
|
2161
|
-
A dictionary containing the status details of the specified CRM request as returned by the API.
|
2162
|
-
|
2163
|
-
Raises:
|
2164
|
-
ValueError: Raised if either 'integrationId' or 'clientRequestId' is None.
|
2165
|
-
requests.HTTPError: Raised if the HTTP request to the CRM service returns an unsuccessful status code.
|
2166
|
-
|
2167
|
-
Tags:
|
2168
|
-
get, status, crm, request, sync, important
|
2169
|
-
"""
|
2170
|
-
if integrationId is None:
|
2171
|
-
raise ValueError("Missing required parameter 'integrationId'")
|
2172
|
-
if clientRequestId is None:
|
2173
|
-
raise ValueError("Missing required parameter 'clientRequestId'")
|
2174
|
-
url = f"{self.base_url}/v2/crm/request-status"
|
2175
|
-
query_params = {
|
2176
|
-
k: v
|
2177
|
-
for k, v in [
|
2178
|
-
("integrationId", integrationId),
|
2179
|
-
("clientRequestId", clientRequestId),
|
2180
|
-
]
|
2181
|
-
if v is not None
|
2182
|
-
}
|
2183
|
-
response = self._get(url, params=query_params)
|
2184
|
-
response.raise_for_status()
|
2185
|
-
return response.json()
|
2186
|
-
|
2187
|
-
def list_crmcalls_manual_association(
|
2188
|
-
self, fromDateTime=None, cursor=None
|
2189
|
-
) -> dict[str, Any]:
|
2190
|
-
"""
|
2191
|
-
Retrieves a list of manually associated CRM call records, with optional filtering by date and pagination.
|
2192
|
-
|
2193
|
-
Args:
|
2194
|
-
fromDateTime: Optional[str]. The starting ISO 8601 datetime string to filter calls created after this timestamp.
|
2195
|
-
cursor: Optional[str]. A pagination cursor for fetching the next page of results.
|
2196
|
-
|
2197
|
-
Returns:
|
2198
|
-
dict[str, Any]: A dictionary containing the response data for manually associated CRM calls, typically including call records and pagination metadata.
|
2199
|
-
|
2200
|
-
Raises:
|
2201
|
-
requests.HTTPError: Raised if the HTTP request to the remote API returns an unsuccessful status code.
|
2202
|
-
|
2203
|
-
Tags:
|
2204
|
-
list, crmcalls, management, async_job, important
|
2205
|
-
"""
|
2206
|
-
url = f"{self.base_url}/v2/calls/manual-crm-associations"
|
2207
|
-
query_params = {
|
2208
|
-
k: v
|
2209
|
-
for k, v in [("fromDateTime", fromDateTime), ("cursor", cursor)]
|
2210
|
-
if v is not None
|
2211
|
-
}
|
2212
|
-
response = self._get(url, params=query_params)
|
2213
|
-
response.raise_for_status()
|
2214
|
-
return response.json()
|
2215
|
-
|
2216
|
-
def list_permission_profile(self, workspaceId) -> dict[str, Any]:
|
2217
|
-
"""
|
2218
|
-
Retrieves the list of permission profiles for the specified workspace.
|
2219
|
-
|
2220
|
-
Args:
|
2221
|
-
workspaceId: The unique identifier of the workspace for which to list permission profiles.
|
2222
|
-
|
2223
|
-
Returns:
|
2224
|
-
A dictionary containing permission profile details for the given workspace.
|
2225
|
-
|
2226
|
-
Raises:
|
2227
|
-
ValueError: If the 'workspaceId' parameter is missing or None.
|
2228
|
-
HTTPError: If the HTTP request to the remote service fails or returns an error status.
|
2229
|
-
|
2230
|
-
Tags:
|
2231
|
-
list, permissions, profile-management, api, important
|
2232
|
-
"""
|
2233
|
-
if workspaceId is None:
|
2234
|
-
raise ValueError("Missing required parameter 'workspaceId'")
|
2235
|
-
url = f"{self.base_url}/v2/all-permission-profiles"
|
2236
|
-
query_params = {
|
2237
|
-
k: v for k, v in [("workspaceId", workspaceId)] if v is not None
|
2238
|
-
}
|
2239
|
-
response = self._get(url, params=query_params)
|
2240
|
-
response.raise_for_status()
|
2241
|
-
return response.json()
|
2242
|
-
|
2243
|
-
def list_tools(self):
|
2244
|
-
return [
|
2245
|
-
self.list_calls,
|
2246
|
-
self.add_call,
|
2247
|
-
self.get_call,
|
2248
|
-
self.list_calls_extensive,
|
2249
|
-
self.get_permission_profile,
|
2250
|
-
self.update_permission_profile,
|
2251
|
-
self.create_permission_profile,
|
2252
|
-
self.update_meeting,
|
2253
|
-
self.delete_meeting,
|
2254
|
-
self.content_viewed,
|
2255
|
-
self.content_shared,
|
2256
|
-
self.custom_action,
|
2257
|
-
self.list_generic_crm_integration,
|
2258
|
-
self.register_generic_crm_integration,
|
2259
|
-
self.delete_generic_crm_integration,
|
2260
|
-
self.add_users_access_to_calls,
|
2261
|
-
self.get_users_access_to_calls,
|
2262
|
-
self.delete_users_access_to_calls,
|
2263
|
-
self.list_multiple_users,
|
2264
|
-
self.list_interaction_stats,
|
2265
|
-
self.list_answered_scorecards,
|
2266
|
-
self.list_multiple_users_day_by_day_activity,
|
2267
|
-
self.list_multiple_users_aggregate_activity,
|
2268
|
-
self.list_multiple_users_aggregate_by_period,
|
2269
|
-
self.add_meeting,
|
2270
|
-
self.integration_status,
|
2271
|
-
self.integration_settings,
|
2272
|
-
self.get_flows_for_prospects,
|
2273
|
-
self.assign_prospects,
|
2274
|
-
self.add_digital_interaction,
|
2275
|
-
self.purge_phone_number,
|
2276
|
-
self.purge_email_address,
|
2277
|
-
self.list_crm_schema_fields,
|
2278
|
-
self.upload_crm_schema_field,
|
2279
|
-
self.get_crm_objects,
|
2280
|
-
self.get_call_transcripts,
|
2281
|
-
self.list_workspaces,
|
2282
|
-
self.list_users,
|
2283
|
-
self.get_user,
|
2284
|
-
self.get_user_history,
|
2285
|
-
self.list_trackers,
|
2286
|
-
self.list_scorecards,
|
2287
|
-
self.list_permission_profile_users,
|
2288
|
-
self.list_logs,
|
2289
|
-
self.get_library_structure,
|
2290
|
-
self.get_calls_in_specific_folder,
|
2291
|
-
self.list_flows,
|
2292
|
-
self.find_all_references_to_phone_number,
|
2293
|
-
self.find_all_references_to_email_address,
|
2294
|
-
self.get_request_status,
|
2295
|
-
self.list_crmcalls_manual_association,
|
2296
|
-
self.list_permission_profile,
|
2297
|
-
]
|