intelligence-cloud 0.1.0__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.
- intelligence_cloud/__init__.py +62 -0
- intelligence_cloud/_base.py +75 -0
- intelligence_cloud/_generated.py +533 -0
- intelligence_cloud/_spec.py +334 -0
- intelligence_cloud/_version.py +1 -0
- intelligence_cloud/auth.py +142 -0
- intelligence_cloud/client.py +433 -0
- intelligence_cloud/data/spec.json +6391 -0
- intelligence_cloud/errors.py +179 -0
- intelligence_cloud/intelligence.py +292 -0
- intelligence_cloud/py.typed +0 -0
- intelligence_cloud/receiver.py +197 -0
- intelligence_cloud/resources.py +358 -0
- intelligence_cloud/workflows.py +791 -0
- intelligence_cloud-0.1.0.dist-info/METADATA +410 -0
- intelligence_cloud-0.1.0.dist-info/RECORD +18 -0
- intelligence_cloud-0.1.0.dist-info/WHEEL +4 -0
- intelligence_cloud-0.1.0.dist-info/licenses/LICENSE +22 -0
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
"""Generated from openapi.yaml by tools/generate.py. Do not edit by hand."""
|
|
2
|
+
# flake8: noqa
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from datetime import date, datetime
|
|
6
|
+
from typing import Any, Iterator, Mapping, Optional, Sequence, Union
|
|
7
|
+
|
|
8
|
+
from ._base import Namespace, Page
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AuthAPI(Namespace):
|
|
12
|
+
"""Authentication operations."""
|
|
13
|
+
|
|
14
|
+
def login(self, body: Mapping[str, Any]) -> Any:
|
|
15
|
+
"""Sign in. `POST /auth/login` (frontline_user)."""
|
|
16
|
+
return self._c._call('login', path={}, query={}, body=body)
|
|
17
|
+
|
|
18
|
+
def refresh(self, body: Mapping[str, Any]) -> Any:
|
|
19
|
+
"""Renew the access token. `POST /auth/refresh` (frontline_user)."""
|
|
20
|
+
return self._c._call('refresh', path={}, query={}, body=body)
|
|
21
|
+
|
|
22
|
+
def logout(self) -> Any:
|
|
23
|
+
"""Sign out. `POST /auth/logout` (frontline_user)."""
|
|
24
|
+
return self._c._call('logout', path={}, query={}, body=None)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ResellersAPI(Namespace):
|
|
28
|
+
"""Resellers operations."""
|
|
29
|
+
|
|
30
|
+
def get_reseller_branding(self, reseller_id: str) -> Any:
|
|
31
|
+
"""Read reseller branding. `GET /resellers/{resellerId}/branding` (reseller_admin)."""
|
|
32
|
+
return self._c._call('getResellerBranding', path={'resellerId': reseller_id}, query={}, body=None)
|
|
33
|
+
|
|
34
|
+
def update_reseller_branding(self, reseller_id: str, body: Mapping[str, Any]) -> Any:
|
|
35
|
+
"""Update reseller branding. `PATCH /resellers/{resellerId}/branding` (reseller_admin)."""
|
|
36
|
+
return self._c._call('updateResellerBranding', path={'resellerId': reseller_id}, query={}, body=body)
|
|
37
|
+
|
|
38
|
+
def get_reseller_smtp_settings(self, reseller_id: str) -> Any:
|
|
39
|
+
"""Read outbound email (SMTP) settings. `GET /resellers/{resellerId}/smtp-settings` (reseller_admin)."""
|
|
40
|
+
return self._c._call('getResellerSmtpSettings', path={'resellerId': reseller_id}, query={}, body=None)
|
|
41
|
+
|
|
42
|
+
def save_reseller_smtp_settings(self, reseller_id: str, body: Mapping[str, Any]) -> Any:
|
|
43
|
+
"""Save outbound email (SMTP) settings. `PATCH /resellers/{resellerId}/smtp-settings` (reseller_admin)."""
|
|
44
|
+
return self._c._call('saveResellerSmtpSettings', path={'resellerId': reseller_id}, query={}, body=body)
|
|
45
|
+
|
|
46
|
+
def delete_reseller_smtp_settings(self, reseller_id: str) -> Any:
|
|
47
|
+
"""Remove outbound email (SMTP) settings. `DELETE /resellers/{resellerId}/smtp-settings` (reseller_admin)."""
|
|
48
|
+
return self._c._call('deleteResellerSmtpSettings', path={'resellerId': reseller_id}, query={}, body=None)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class CompaniesAPI(Namespace):
|
|
52
|
+
"""Companies operations."""
|
|
53
|
+
|
|
54
|
+
def list_companies(self, reseller_id: str, *, search: Optional[str] = None, is_active: Optional[bool] = None, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
55
|
+
"""List customer companies. `GET /resellers/{resellerId}/companies` (reseller_admin)."""
|
|
56
|
+
return self._c._page('listCompanies', path={'resellerId': reseller_id}, query={'search': search, 'is_active': is_active, 'limit': limit, 'cursor': cursor}, body=None)
|
|
57
|
+
|
|
58
|
+
def iter_companies(self, reseller_id: str, *, search: Optional[str] = None, is_active: Optional[bool] = None) -> Iterator[Any]:
|
|
59
|
+
"""Every item of `list_companies`, following cursors 100 at a time."""
|
|
60
|
+
return self._c._iter('listCompanies', path={'resellerId': reseller_id}, query={'search': search, 'is_active': is_active})
|
|
61
|
+
|
|
62
|
+
def create_company(self, reseller_id: str, body: Mapping[str, Any]) -> Any:
|
|
63
|
+
"""Create a customer company. `POST /resellers/{resellerId}/companies` (reseller_admin)."""
|
|
64
|
+
return self._c._call('createCompany', path={'resellerId': reseller_id}, query={}, body=body)
|
|
65
|
+
|
|
66
|
+
def get_companies_mfa_summary(self, reseller_id: str) -> Any:
|
|
67
|
+
"""Read the MFA default for new companies. `GET /resellers/{resellerId}/companies/mfa` (reseller_admin)."""
|
|
68
|
+
return self._c._call('getCompaniesMfaSummary', path={'resellerId': reseller_id}, query={}, body=None)
|
|
69
|
+
|
|
70
|
+
def get_company(self, company_id: str) -> Any:
|
|
71
|
+
"""Read a company. `GET /companies/{companyId}` (reseller_admin)."""
|
|
72
|
+
return self._c._call('getCompany', path={'companyId': company_id}, query={}, body=None)
|
|
73
|
+
|
|
74
|
+
def update_company(self, company_id: str, body: Mapping[str, Any]) -> Any:
|
|
75
|
+
"""Update a company. `PATCH /companies/{companyId}` (reseller_admin)."""
|
|
76
|
+
return self._c._call('updateCompany', path={'companyId': company_id}, query={}, body=body)
|
|
77
|
+
|
|
78
|
+
def deactivate_company(self, company_id: str) -> Any:
|
|
79
|
+
"""Deactivate a company. `POST /companies/{companyId}/deactivate` (reseller_admin)."""
|
|
80
|
+
return self._c._call('deactivateCompany', path={'companyId': company_id}, query={}, body=None)
|
|
81
|
+
|
|
82
|
+
def reactivate_company(self, company_id: str) -> Any:
|
|
83
|
+
"""Reactivate a company. `POST /companies/{companyId}/reactivate` (reseller_admin)."""
|
|
84
|
+
return self._c._call('reactivateCompany', path={'companyId': company_id}, query={}, body=None)
|
|
85
|
+
|
|
86
|
+
def get_company_security_settings(self, company_id: str) -> Any:
|
|
87
|
+
"""Read a company's security settings. `GET /companies/{companyId}/security-settings` (reseller_admin)."""
|
|
88
|
+
return self._c._call('getCompanySecuritySettings', path={'companyId': company_id}, query={}, body=None)
|
|
89
|
+
|
|
90
|
+
def get_company_branding(self, company_id: str) -> Any:
|
|
91
|
+
"""Read company branding overrides. `GET /companies/{companyId}/branding` (reseller_admin)."""
|
|
92
|
+
return self._c._call('getCompanyBranding', path={'companyId': company_id}, query={}, body=None)
|
|
93
|
+
|
|
94
|
+
def update_company_branding(self, company_id: str, body: Mapping[str, Any]) -> Any:
|
|
95
|
+
"""Update company branding overrides. `PATCH /companies/{companyId}/branding` (reseller_admin)."""
|
|
96
|
+
return self._c._call('updateCompanyBranding', path={'companyId': company_id}, query={}, body=body)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class SsoAPI(Namespace):
|
|
100
|
+
"""Single sign-on operations."""
|
|
101
|
+
|
|
102
|
+
def list_company_domains(self, company_id: str) -> Any:
|
|
103
|
+
"""List claimed domains. `GET /companies/{companyId}/domains` (reseller_admin)."""
|
|
104
|
+
return self._c._call('listCompanyDomains', path={'companyId': company_id}, query={}, body=None)
|
|
105
|
+
|
|
106
|
+
def claim_company_domain(self, company_id: str, body: Mapping[str, Any]) -> Any:
|
|
107
|
+
"""Claim a domain. `POST /companies/{companyId}/domains` (reseller_admin)."""
|
|
108
|
+
return self._c._call('claimCompanyDomain', path={'companyId': company_id}, query={}, body=body)
|
|
109
|
+
|
|
110
|
+
def remove_company_domain(self, company_id: str, domain_id: str) -> Any:
|
|
111
|
+
"""Remove a domain claim. `DELETE /companies/{companyId}/domains/{domainId}` (reseller_admin)."""
|
|
112
|
+
return self._c._call('removeCompanyDomain', path={'companyId': company_id, 'domainId': domain_id}, query={}, body=None)
|
|
113
|
+
|
|
114
|
+
def list_domain_verifications(self, company_id: str, domain_id: str) -> Any:
|
|
115
|
+
"""List verification attempts. `GET /companies/{companyId}/domains/{domainId}/verifications` (reseller_admin)."""
|
|
116
|
+
return self._c._call('listDomainVerifications', path={'companyId': company_id, 'domainId': domain_id}, query={}, body=None)
|
|
117
|
+
|
|
118
|
+
def verify_domain(self, company_id: str, domain_id: str) -> Any:
|
|
119
|
+
"""Check the TXT record now. `POST /companies/{companyId}/domains/{domainId}/verifications` (reseller_admin)."""
|
|
120
|
+
return self._c._call('verifyDomain', path={'companyId': company_id, 'domainId': domain_id}, query={}, body=None)
|
|
121
|
+
|
|
122
|
+
def get_identity_provider(self, company_id: str) -> Any:
|
|
123
|
+
"""Read the identity provider connection. `GET /companies/{companyId}/identity-provider` (reseller_admin)."""
|
|
124
|
+
return self._c._call('getIdentityProvider', path={'companyId': company_id}, query={}, body=None)
|
|
125
|
+
|
|
126
|
+
def connect_identity_provider(self, company_id: str, body: Mapping[str, Any]) -> Any:
|
|
127
|
+
"""Connect an OpenID Connect provider. `POST /companies/{companyId}/identity-provider` (reseller_admin)."""
|
|
128
|
+
return self._c._call('connectIdentityProvider', path={'companyId': company_id}, query={}, body=body)
|
|
129
|
+
|
|
130
|
+
def disconnect_identity_provider(self, company_id: str) -> Any:
|
|
131
|
+
"""Disconnect the identity provider. `DELETE /companies/{companyId}/identity-provider` (reseller_admin)."""
|
|
132
|
+
return self._c._call('disconnectIdentityProvider', path={'companyId': company_id}, query={}, body=None)
|
|
133
|
+
|
|
134
|
+
def test_identity_provider(self, company_id: str) -> Any:
|
|
135
|
+
"""Test the identity provider connection. `POST /companies/{companyId}/identity-provider/test` (reseller_admin)."""
|
|
136
|
+
return self._c._call('testIdentityProvider', path={'companyId': company_id}, query={}, body=None)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class ProductsAPI(Namespace):
|
|
140
|
+
"""Products operations."""
|
|
141
|
+
|
|
142
|
+
def list_products(self) -> Any:
|
|
143
|
+
"""List products. `GET /products` (reseller_admin)."""
|
|
144
|
+
return self._c._call('listProducts', path={}, query={}, body=None)
|
|
145
|
+
|
|
146
|
+
def list_company_products(self, company_id: str) -> Any:
|
|
147
|
+
"""Company products. `GET /companies/{companyId}/products` (reseller_admin)."""
|
|
148
|
+
return self._c._call('listCompanyProducts', path={'companyId': company_id}, query={}, body=None)
|
|
149
|
+
|
|
150
|
+
def list_user_products(self, company_id: str, user_id: str) -> Any:
|
|
151
|
+
"""A user's products. `GET /companies/{companyId}/users/{userId}/products` (reseller_admin)."""
|
|
152
|
+
return self._c._call('listUserProducts', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
153
|
+
|
|
154
|
+
def enable_user_product(self, location_id: str, user_id: str, product_key: str) -> Any:
|
|
155
|
+
"""Turn a product on for a user. `POST /locations/{locationId}/users/{userId}/products/{productKey}/enable` (reseller_admin)."""
|
|
156
|
+
return self._c._call('enableUserProduct', path={'locationId': location_id, 'userId': user_id, 'productKey': product_key}, query={}, body=None)
|
|
157
|
+
|
|
158
|
+
def disable_user_product(self, location_id: str, user_id: str, product_key: str) -> Any:
|
|
159
|
+
"""Turn a product off for a user. `POST /locations/{locationId}/users/{userId}/products/{productKey}/disable` (reseller_admin)."""
|
|
160
|
+
return self._c._call('disableUserProduct', path={'locationId': location_id, 'userId': user_id, 'productKey': product_key}, query={}, body=None)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class LocationsAPI(Namespace):
|
|
164
|
+
"""Locations operations."""
|
|
165
|
+
|
|
166
|
+
def list_verticals(self) -> Any:
|
|
167
|
+
"""List industries. `GET /verticals` (reseller_admin)."""
|
|
168
|
+
return self._c._call('listVerticals', path={}, query={}, body=None)
|
|
169
|
+
|
|
170
|
+
def list_company_locations(self, company_id: str, *, search: Optional[str] = None, is_active: Optional[bool] = None, limit: Optional[int] = None, cursor: Optional[str] = None, offset: Optional[int] = None) -> Page:
|
|
171
|
+
"""List a company's locations. `GET /companies/{companyId}/locations` (reseller_admin)."""
|
|
172
|
+
return self._c._page('listCompanyLocations', path={'companyId': company_id}, query={'search': search, 'is_active': is_active, 'limit': limit, 'cursor': cursor, 'offset': offset}, body=None)
|
|
173
|
+
|
|
174
|
+
def iter_company_locations(self, company_id: str, *, search: Optional[str] = None, is_active: Optional[bool] = None, offset: Optional[int] = None) -> Iterator[Any]:
|
|
175
|
+
"""Every item of `list_company_locations`, following cursors 100 at a time."""
|
|
176
|
+
return self._c._iter('listCompanyLocations', path={'companyId': company_id}, query={'search': search, 'is_active': is_active, 'offset': offset})
|
|
177
|
+
|
|
178
|
+
def create_location(self, company_id: str, body: Mapping[str, Any]) -> Any:
|
|
179
|
+
"""Create a location. `POST /companies/{companyId}/locations` (reseller_admin)."""
|
|
180
|
+
return self._c._call('createLocation', path={'companyId': company_id}, query={}, body=body)
|
|
181
|
+
|
|
182
|
+
def get_location(self, company_id: str, location_id: str) -> Any:
|
|
183
|
+
"""Read a location. `GET /companies/{companyId}/locations/{locationId}` (reseller_admin)."""
|
|
184
|
+
return self._c._call('getLocation', path={'companyId': company_id, 'locationId': location_id}, query={}, body=None)
|
|
185
|
+
|
|
186
|
+
def update_location(self, company_id: str, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
187
|
+
"""Update a location. `PATCH /companies/{companyId}/locations/{locationId}` (reseller_admin)."""
|
|
188
|
+
return self._c._call('updateLocation', path={'companyId': company_id, 'locationId': location_id}, query={}, body=body)
|
|
189
|
+
|
|
190
|
+
def deactivate_location(self, company_id: str, location_id: str) -> Any:
|
|
191
|
+
"""Deactivate a location. `POST /companies/{companyId}/locations/{locationId}/deactivate` (reseller_admin)."""
|
|
192
|
+
return self._c._call('deactivateLocation', path={'companyId': company_id, 'locationId': location_id}, query={}, body=None)
|
|
193
|
+
|
|
194
|
+
def reactivate_location(self, company_id: str, location_id: str) -> Any:
|
|
195
|
+
"""Reactivate a location. `POST /companies/{companyId}/locations/{locationId}/reactivate` (reseller_admin)."""
|
|
196
|
+
return self._c._call('reactivateLocation', path={'companyId': company_id, 'locationId': location_id}, query={}, body=None)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class GroupsAPI(Namespace):
|
|
200
|
+
"""User groups operations."""
|
|
201
|
+
|
|
202
|
+
def list_user_groups(self, location_id: str, *, search: Optional[str] = None, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
203
|
+
"""List a location's groups. `GET /locations/{locationId}/user-groups` (reseller_admin)."""
|
|
204
|
+
return self._c._page('listUserGroups', path={'locationId': location_id}, query={'search': search, 'limit': limit, 'cursor': cursor}, body=None)
|
|
205
|
+
|
|
206
|
+
def iter_user_groups(self, location_id: str, *, search: Optional[str] = None) -> Iterator[Any]:
|
|
207
|
+
"""Every item of `list_user_groups`, following cursors 100 at a time."""
|
|
208
|
+
return self._c._iter('listUserGroups', path={'locationId': location_id}, query={'search': search})
|
|
209
|
+
|
|
210
|
+
def create_user_group(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
211
|
+
"""Create a group. `POST /locations/{locationId}/user-groups` (reseller_admin)."""
|
|
212
|
+
return self._c._call('createUserGroup', path={'locationId': location_id}, query={}, body=body)
|
|
213
|
+
|
|
214
|
+
def get_user_group(self, location_id: str, group_id: str) -> Any:
|
|
215
|
+
"""Read a group with its members. `GET /locations/{locationId}/user-groups/{groupId}` (reseller_admin)."""
|
|
216
|
+
return self._c._call('getUserGroup', path={'locationId': location_id, 'groupId': group_id}, query={}, body=None)
|
|
217
|
+
|
|
218
|
+
def update_user_group(self, location_id: str, group_id: str, body: Mapping[str, Any]) -> Any:
|
|
219
|
+
"""Rename a group or set its members. `PATCH /locations/{locationId}/user-groups/{groupId}` (reseller_admin)."""
|
|
220
|
+
return self._c._call('updateUserGroup', path={'locationId': location_id, 'groupId': group_id}, query={}, body=body)
|
|
221
|
+
|
|
222
|
+
def delete_user_group(self, location_id: str, group_id: str, *, force: Optional[bool] = None) -> Any:
|
|
223
|
+
"""Delete a group. `DELETE /locations/{locationId}/user-groups/{groupId}` (reseller_admin)."""
|
|
224
|
+
return self._c._call('deleteUserGroup', path={'locationId': location_id, 'groupId': group_id}, query={'force': force}, body=None)
|
|
225
|
+
|
|
226
|
+
def get_user_group_membership(self, location_id: str, user_id: str) -> Any:
|
|
227
|
+
"""A user's groups at a location. `GET /locations/{locationId}/users/{userId}/group-membership` (reseller_admin)."""
|
|
228
|
+
return self._c._call('getUserGroupMembership', path={'locationId': location_id, 'userId': user_id}, query={}, body=None)
|
|
229
|
+
|
|
230
|
+
def set_user_group_membership(self, location_id: str, user_id: str, body: Mapping[str, Any]) -> Any:
|
|
231
|
+
"""Set a user's groups at a location. `PUT /locations/{locationId}/users/{userId}/group-membership` (reseller_admin)."""
|
|
232
|
+
return self._c._call('setUserGroupMembership', path={'locationId': location_id, 'userId': user_id}, query={}, body=body)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
class ConnectorsAPI(Namespace):
|
|
236
|
+
"""Connectors operations."""
|
|
237
|
+
|
|
238
|
+
def list_connector_types(self) -> Any:
|
|
239
|
+
"""List connector types. `GET /connector-types` (reseller_admin)."""
|
|
240
|
+
return self._c._call('listConnectorTypes', path={}, query={}, body=None)
|
|
241
|
+
|
|
242
|
+
def test_connector(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
243
|
+
"""Dry-run a connector. `POST /locations/{locationId}/connectors/test` (reseller_admin)."""
|
|
244
|
+
return self._c._call('testConnector', path={'locationId': location_id}, query={}, body=body)
|
|
245
|
+
|
|
246
|
+
def list_location_connectors(self, location_id: str, *, search: Optional[str] = None, status: Optional[str] = None, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
247
|
+
"""List a location's connectors. `GET /locations/{locationId}/connectors` (reseller_admin)."""
|
|
248
|
+
return self._c._page('listLocationConnectors', path={'locationId': location_id}, query={'search': search, 'status': status, 'limit': limit, 'cursor': cursor}, body=None)
|
|
249
|
+
|
|
250
|
+
def iter_location_connectors(self, location_id: str, *, search: Optional[str] = None, status: Optional[str] = None) -> Iterator[Any]:
|
|
251
|
+
"""Every item of `list_location_connectors`, following cursors 100 at a time."""
|
|
252
|
+
return self._c._iter('listLocationConnectors', path={'locationId': location_id}, query={'search': search, 'status': status})
|
|
253
|
+
|
|
254
|
+
def create_connector(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
255
|
+
"""Create a connector. `POST /locations/{locationId}/connectors` (reseller_admin)."""
|
|
256
|
+
return self._c._call('createConnector', path={'locationId': location_id}, query={}, body=body)
|
|
257
|
+
|
|
258
|
+
def get_connector(self, location_id: str, connector_id: str) -> Any:
|
|
259
|
+
"""Read a connector. `GET /locations/{locationId}/connectors/{connectorId}` (reseller_admin)."""
|
|
260
|
+
return self._c._call('getConnector', path={'locationId': location_id, 'connectorId': connector_id}, query={}, body=None)
|
|
261
|
+
|
|
262
|
+
def update_connector(self, location_id: str, connector_id: str, body: Mapping[str, Any]) -> Any:
|
|
263
|
+
"""Update a connector. `PATCH /locations/{locationId}/connectors/{connectorId}` (reseller_admin)."""
|
|
264
|
+
return self._c._call('updateConnector', path={'locationId': location_id, 'connectorId': connector_id}, query={}, body=body)
|
|
265
|
+
|
|
266
|
+
def deactivate_connector(self, location_id: str, connector_id: str) -> Any:
|
|
267
|
+
"""Stop a connector. `POST /locations/{locationId}/connectors/{connectorId}/deactivate` (reseller_admin)."""
|
|
268
|
+
return self._c._call('deactivateConnector', path={'locationId': location_id, 'connectorId': connector_id}, query={}, body=None)
|
|
269
|
+
|
|
270
|
+
def reactivate_connector(self, location_id: str, connector_id: str) -> Any:
|
|
271
|
+
"""Restart a connector. `POST /locations/{locationId}/connectors/{connectorId}/reactivate` (reseller_admin)."""
|
|
272
|
+
return self._c._call('reactivateConnector', path={'locationId': location_id, 'connectorId': connector_id}, query={}, body=None)
|
|
273
|
+
|
|
274
|
+
def list_company_connectors(self, company_id: str, *, search: Optional[str] = None, status: Optional[str] = None, type: Optional[str] = None, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
275
|
+
"""List a company's connectors. `GET /companies/{companyId}/connectors` (reseller_admin)."""
|
|
276
|
+
return self._c._page('listCompanyConnectors', path={'companyId': company_id}, query={'search': search, 'status': status, 'type': type, 'limit': limit, 'cursor': cursor}, body=None)
|
|
277
|
+
|
|
278
|
+
def iter_company_connectors(self, company_id: str, *, search: Optional[str] = None, status: Optional[str] = None, type: Optional[str] = None) -> Iterator[Any]:
|
|
279
|
+
"""Every item of `list_company_connectors`, following cursors 100 at a time."""
|
|
280
|
+
return self._c._iter('listCompanyConnectors', path={'companyId': company_id}, query={'search': search, 'status': status, 'type': type})
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
class FirstAlertAPI(Namespace):
|
|
284
|
+
"""First Alert operations."""
|
|
285
|
+
|
|
286
|
+
def list_alert_rules(self, location_id: str, *, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
287
|
+
"""List a location's alert rules. `GET /locations/{locationId}/first-alert/rules` (reseller_admin)."""
|
|
288
|
+
return self._c._page('listAlertRules', path={'locationId': location_id}, query={'limit': limit, 'cursor': cursor}, body=None)
|
|
289
|
+
|
|
290
|
+
def iter_alert_rules(self, location_id: str) -> Iterator[Any]:
|
|
291
|
+
"""Every item of `list_alert_rules`, following cursors 100 at a time."""
|
|
292
|
+
return self._c._iter('listAlertRules', path={'locationId': location_id}, query={})
|
|
293
|
+
|
|
294
|
+
def create_alert_rule(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
295
|
+
"""Create an alert rule. `POST /locations/{locationId}/first-alert/rules` (reseller_admin)."""
|
|
296
|
+
return self._c._call('createAlertRule', path={'locationId': location_id}, query={}, body=body)
|
|
297
|
+
|
|
298
|
+
def get_alert_rule(self, location_id: str, rule_id: str) -> Any:
|
|
299
|
+
"""Read an alert rule. `GET /locations/{locationId}/first-alert/rules/{ruleId}` (reseller_admin)."""
|
|
300
|
+
return self._c._call('getAlertRule', path={'locationId': location_id, 'ruleId': rule_id}, query={}, body=None)
|
|
301
|
+
|
|
302
|
+
def update_alert_rule(self, location_id: str, rule_id: str, body: Mapping[str, Any]) -> Any:
|
|
303
|
+
"""Update an alert rule. `PATCH /locations/{locationId}/first-alert/rules/{ruleId}` (reseller_admin)."""
|
|
304
|
+
return self._c._call('updateAlertRule', path={'locationId': location_id, 'ruleId': rule_id}, query={}, body=body)
|
|
305
|
+
|
|
306
|
+
def delete_alert_rule(self, location_id: str, rule_id: str) -> Any:
|
|
307
|
+
"""Delete an alert rule. `DELETE /locations/{locationId}/first-alert/rules/{ruleId}` (reseller_admin)."""
|
|
308
|
+
return self._c._call('deleteAlertRule', path={'locationId': location_id, 'ruleId': rule_id}, query={}, body=None)
|
|
309
|
+
|
|
310
|
+
def duplicate_alert_rule(self, location_id: str, rule_id: str) -> Any:
|
|
311
|
+
"""Copy an alert rule. `POST /locations/{locationId}/first-alert/rules/{ruleId}/duplicate` (reseller_admin)."""
|
|
312
|
+
return self._c._call('duplicateAlertRule', path={'locationId': location_id, 'ruleId': rule_id}, query={}, body=None)
|
|
313
|
+
|
|
314
|
+
def get_first_alert_config(self, location_id: str) -> Any:
|
|
315
|
+
"""Read monitored numbers and the alert webhook. `GET /locations/{locationId}/first-alert/config` (reseller_admin)."""
|
|
316
|
+
return self._c._call('getFirstAlertConfig', path={'locationId': location_id}, query={}, body=None)
|
|
317
|
+
|
|
318
|
+
def save_first_alert_config(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
319
|
+
"""Set monitored numbers and the alert webhook. `PUT /locations/{locationId}/first-alert/config` (reseller_admin)."""
|
|
320
|
+
return self._c._call('saveFirstAlertConfig', path={'locationId': location_id}, query={}, body=body)
|
|
321
|
+
|
|
322
|
+
def test_first_alert_webhook(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
323
|
+
"""Test the alert webhook. `POST /locations/{locationId}/first-alert/config/test-webhook` (reseller_admin)."""
|
|
324
|
+
return self._c._call('testFirstAlertWebhook', path={'locationId': location_id}, query={}, body=body)
|
|
325
|
+
|
|
326
|
+
def get_alert_notification_preferences(self, location_id: str, user_id: str) -> Any:
|
|
327
|
+
"""Read a user's alert email and digest. `GET /locations/{locationId}/users/{userId}/first-alert/notification-preferences` (reseller_admin)."""
|
|
328
|
+
return self._c._call('getAlertNotificationPreferences', path={'locationId': location_id, 'userId': user_id}, query={}, body=None)
|
|
329
|
+
|
|
330
|
+
def set_alert_email_preferences(self, location_id: str, user_id: str, body: Mapping[str, Any]) -> Any:
|
|
331
|
+
"""Set a user's alert email. `PUT /locations/{locationId}/users/{userId}/first-alert/email-preferences` (reseller_admin)."""
|
|
332
|
+
return self._c._call('setAlertEmailPreferences', path={'locationId': location_id, 'userId': user_id}, query={}, body=body)
|
|
333
|
+
|
|
334
|
+
def set_alert_digest_preferences(self, location_id: str, user_id: str, body: Mapping[str, Any]) -> Any:
|
|
335
|
+
"""Set a user's alert digest. `PUT /locations/{locationId}/users/{userId}/first-alert/digest-preferences` (reseller_admin)."""
|
|
336
|
+
return self._c._call('setAlertDigestPreferences', path={'locationId': location_id, 'userId': user_id}, query={}, body=body)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class InsightsHubAPI(Namespace):
|
|
340
|
+
"""Insights Hub operations."""
|
|
341
|
+
|
|
342
|
+
def get_insights_hub_setup(self, location_id: str) -> Any:
|
|
343
|
+
"""Read Insights Hub setup. `GET /locations/{locationId}/insights-hub/setup` (reseller_admin)."""
|
|
344
|
+
return self._c._call('getInsightsHubSetup', path={'locationId': location_id}, query={}, body=None)
|
|
345
|
+
|
|
346
|
+
def save_insights_hub_setup(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
347
|
+
"""Save Insights Hub setup. `POST /locations/{locationId}/insights-hub/setup` (reseller_admin)."""
|
|
348
|
+
return self._c._call('saveInsightsHubSetup', path={'locationId': location_id}, query={}, body=body)
|
|
349
|
+
|
|
350
|
+
def update_insights_hub_setup(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
351
|
+
"""Update Insights Hub setup. `PATCH /locations/{locationId}/insights-hub/setup` (reseller_admin)."""
|
|
352
|
+
return self._c._call('updateInsightsHubSetup', path={'locationId': location_id}, query={}, body=body)
|
|
353
|
+
|
|
354
|
+
def get_insights_hub_config(self, location_id: str) -> Any:
|
|
355
|
+
"""Read Insights Hub coverage. `GET /locations/{locationId}/insights-hub/config` (reseller_admin)."""
|
|
356
|
+
return self._c._call('getInsightsHubConfig', path={'locationId': location_id}, query={}, body=None)
|
|
357
|
+
|
|
358
|
+
def update_insights_hub_config(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
359
|
+
"""Set Insights Hub coverage. `PATCH /locations/{locationId}/insights-hub/config` (reseller_admin)."""
|
|
360
|
+
return self._c._call('updateInsightsHubConfig', path={'locationId': location_id}, query={}, body=body)
|
|
361
|
+
|
|
362
|
+
def get_user_insights_hub_access(self, location_id: str, user_id: str) -> Any:
|
|
363
|
+
"""Check a user's Insights Hub access. `GET /locations/{locationId}/users/{userId}/insights-hub/access` (reseller_admin)."""
|
|
364
|
+
return self._c._call('getUserInsightsHubAccess', path={'locationId': location_id, 'userId': user_id}, query={}, body=None)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
class UsersAPI(Namespace):
|
|
368
|
+
"""Users operations."""
|
|
369
|
+
|
|
370
|
+
def list_company_users(self, company_id: str, *, search: Optional[str] = None, status: Optional[str] = None, role: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
371
|
+
"""List a company's users. `GET /companies/{companyId}/users` (reseller_admin)."""
|
|
372
|
+
return self._c._page('listCompanyUsers', path={'companyId': company_id}, query={'search': search, 'status': status, 'role': role, 'location_id': location_id, 'limit': limit, 'cursor': cursor}, body=None)
|
|
373
|
+
|
|
374
|
+
def iter_company_users(self, company_id: str, *, search: Optional[str] = None, status: Optional[str] = None, role: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None) -> Iterator[Any]:
|
|
375
|
+
"""Every item of `list_company_users`, following cursors 100 at a time."""
|
|
376
|
+
return self._c._iter('listCompanyUsers', path={'companyId': company_id}, query={'search': search, 'status': status, 'role': role, 'location_id': location_id})
|
|
377
|
+
|
|
378
|
+
def create_company_user(self, company_id: str, body: Mapping[str, Any]) -> Any:
|
|
379
|
+
"""Create a user. `POST /companies/{companyId}/users` (reseller_admin)."""
|
|
380
|
+
return self._c._call('createCompanyUser', path={'companyId': company_id}, query={}, body=body)
|
|
381
|
+
|
|
382
|
+
def get_company_user(self, company_id: str, user_id: str) -> Any:
|
|
383
|
+
"""Read a user. `GET /companies/{companyId}/users/{userId}` (reseller_admin)."""
|
|
384
|
+
return self._c._call('getCompanyUser', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
385
|
+
|
|
386
|
+
def update_company_user(self, company_id: str, user_id: str, body: Mapping[str, Any]) -> Any:
|
|
387
|
+
"""Update a user, role or locations. `PATCH /companies/{companyId}/users/{userId}` (reseller_admin)."""
|
|
388
|
+
return self._c._call('updateCompanyUser', path={'companyId': company_id, 'userId': user_id}, query={}, body=body)
|
|
389
|
+
|
|
390
|
+
def deactivate_company_user(self, company_id: str, user_id: str) -> Any:
|
|
391
|
+
"""Deactivate a user. `POST /companies/{companyId}/users/{userId}/deactivate` (reseller_admin)."""
|
|
392
|
+
return self._c._call('deactivateCompanyUser', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
393
|
+
|
|
394
|
+
def reactivate_company_user(self, company_id: str, user_id: str) -> Any:
|
|
395
|
+
"""Reactivate a user. `POST /companies/{companyId}/users/{userId}/reactivate` (reseller_admin)."""
|
|
396
|
+
return self._c._call('reactivateCompanyUser', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
397
|
+
|
|
398
|
+
def resend_invitation(self, company_id: str, user_id: str) -> Any:
|
|
399
|
+
"""Resend the invitation email. `POST /companies/{companyId}/users/{userId}/resend-invitation` (reseller_admin)."""
|
|
400
|
+
return self._c._call('resendInvitation', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
401
|
+
|
|
402
|
+
def reset_password(self, company_id: str, user_id: str) -> Any:
|
|
403
|
+
"""Send a password reset email. `POST /companies/{companyId}/users/{userId}/reset-password` (reseller_admin)."""
|
|
404
|
+
return self._c._call('resetPassword', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
405
|
+
|
|
406
|
+
def get_user_number_mappings(self, company_id: str, user_id: str) -> Any:
|
|
407
|
+
"""Read a user's numbers. `GET /companies/{companyId}/users/{userId}/connector-mappings` (reseller_admin)."""
|
|
408
|
+
return self._c._call('getUserNumberMappings', path={'companyId': company_id, 'userId': user_id}, query={}, body=None)
|
|
409
|
+
|
|
410
|
+
def set_user_number_mappings(self, company_id: str, user_id: str, body: Mapping[str, Any]) -> Any:
|
|
411
|
+
"""Set a user's numbers. `PUT /companies/{companyId}/users/{userId}/connector-mappings` (reseller_admin)."""
|
|
412
|
+
return self._c._call('setUserNumberMappings', path={'companyId': company_id, 'userId': user_id}, query={}, body=body)
|
|
413
|
+
|
|
414
|
+
def list_location_users(self, location_id: str, *, search: Optional[str] = None, status: Optional[str] = None, limit: Optional[int] = None, cursor: Optional[str] = None) -> Page:
|
|
415
|
+
"""List a location's users with products and groups. `GET /locations/{locationId}/users` (reseller_admin)."""
|
|
416
|
+
return self._c._page('listLocationUsers', path={'locationId': location_id}, query={'search': search, 'status': status, 'limit': limit, 'cursor': cursor}, body=None)
|
|
417
|
+
|
|
418
|
+
def iter_location_users(self, location_id: str, *, search: Optional[str] = None, status: Optional[str] = None) -> Iterator[Any]:
|
|
419
|
+
"""Every item of `list_location_users`, following cursors 100 at a time."""
|
|
420
|
+
return self._c._iter('listLocationUsers', path={'locationId': location_id}, query={'search': search, 'status': status})
|
|
421
|
+
|
|
422
|
+
def get_location_user(self, location_id: str, user_id: str) -> Any:
|
|
423
|
+
"""Read a user at a location. `GET /locations/{locationId}/users/{userId}` (reseller_admin)."""
|
|
424
|
+
return self._c._call('getLocationUser', path={'locationId': location_id, 'userId': user_id}, query={}, body=None)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
class AfterCallSettingsAPI(Namespace):
|
|
428
|
+
"""After Call settings operations."""
|
|
429
|
+
|
|
430
|
+
def get_user_after_call_settings(self, location_id: str, user_id: str) -> Any:
|
|
431
|
+
"""Read a user's After Call settings. `GET /locations/{locationId}/users/{userId}/after-call-settings` (reseller_admin)."""
|
|
432
|
+
return self._c._call('getUserAfterCallSettings', path={'locationId': location_id, 'userId': user_id}, query={}, body=None)
|
|
433
|
+
|
|
434
|
+
def update_user_after_call_settings(self, location_id: str, user_id: str, body: Mapping[str, Any]) -> Any:
|
|
435
|
+
"""Update a user's After Call settings. `PATCH /locations/{locationId}/users/{userId}/after-call-settings` (reseller_admin)."""
|
|
436
|
+
return self._c._call('updateUserAfterCallSettings', path={'locationId': location_id, 'userId': user_id}, query={}, body=body)
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
class AccountAPI(Namespace):
|
|
440
|
+
"""Account operations."""
|
|
441
|
+
|
|
442
|
+
def get_me(self) -> Any:
|
|
443
|
+
"""Who is signed in. `GET /me` (frontline_user)."""
|
|
444
|
+
return self._c._call('getMe', path={}, query={}, body=None)
|
|
445
|
+
|
|
446
|
+
def list_visible_locations(self, *, search: Optional[str] = None, is_active: Optional[bool] = None, company_id: Optional[str] = None, limit: Optional[int] = None, cursor: Optional[str] = None, offset: Optional[int] = None) -> Page:
|
|
447
|
+
"""Locations this login can see. `GET /locations` (frontline_user)."""
|
|
448
|
+
return self._c._page('listVisibleLocations', path={}, query={'search': search, 'is_active': is_active, 'company_id': company_id, 'limit': limit, 'cursor': cursor, 'offset': offset}, body=None)
|
|
449
|
+
|
|
450
|
+
def iter_visible_locations(self, *, search: Optional[str] = None, is_active: Optional[bool] = None, company_id: Optional[str] = None, offset: Optional[int] = None) -> Iterator[Any]:
|
|
451
|
+
"""Every item of `list_visible_locations`, following cursors 100 at a time."""
|
|
452
|
+
return self._c._iter('listVisibleLocations', path={}, query={'search': search, 'is_active': is_active, 'company_id': company_id, 'offset': offset})
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
class CallsAPI(Namespace):
|
|
456
|
+
"""Calls operations."""
|
|
457
|
+
|
|
458
|
+
def list_calls(self, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, status: Optional[str] = None, sentiment: Optional[str] = None, has_open_tasks: Optional[bool] = None, multi_leg: Optional[bool] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None, search: Optional[str] = None, cursor: Optional[str] = None, limit: Optional[int] = None) -> Page:
|
|
459
|
+
"""List calls. `GET /calls` (frontline_user)."""
|
|
460
|
+
return self._c._page('listCalls', path={}, query={'date_from': date_from, 'date_to': date_to, 'status': status, 'sentiment': sentiment, 'has_open_tasks': has_open_tasks, 'multi_leg': multi_leg, 'location_id': location_id, 'company_id': company_id, 'search': search, 'cursor': cursor, 'limit': limit}, body=None)
|
|
461
|
+
|
|
462
|
+
def iter_calls(self, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, status: Optional[str] = None, sentiment: Optional[str] = None, has_open_tasks: Optional[bool] = None, multi_leg: Optional[bool] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None, search: Optional[str] = None) -> Iterator[Any]:
|
|
463
|
+
"""Every item of `list_calls`, following cursors 100 at a time."""
|
|
464
|
+
return self._c._iter('listCalls', path={}, query={'date_from': date_from, 'date_to': date_to, 'status': status, 'sentiment': sentiment, 'has_open_tasks': has_open_tasks, 'multi_leg': multi_leg, 'location_id': location_id, 'company_id': company_id, 'search': search})
|
|
465
|
+
|
|
466
|
+
def get_call(self, call_id: str) -> Any:
|
|
467
|
+
"""Read a call. `GET /calls/{callId}` (frontline_user)."""
|
|
468
|
+
return self._c._call('getCall', path={'callId': call_id}, query={}, body=None)
|
|
469
|
+
|
|
470
|
+
def get_call_transcript(self, call_id: str) -> Any:
|
|
471
|
+
"""Read a call's transcript. `GET /calls/{callId}/transcript` (frontline_user)."""
|
|
472
|
+
return self._c._call('getCallTranscript', path={'callId': call_id}, query={}, body=None)
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
class AlertsAPI(Namespace):
|
|
476
|
+
"""Alerts operations."""
|
|
477
|
+
|
|
478
|
+
def list_alerts(self, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, keyword: Optional[str] = None, topic: Optional[str] = None, numbers: Optional[Union[str, Sequence[str]]] = None, sentiment: Optional[str] = None, search: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None, cursor: Optional[str] = None, limit: Optional[int] = None) -> Page:
|
|
479
|
+
"""List alerts. `GET /alerts` (frontline_user)."""
|
|
480
|
+
return self._c._page('listAlerts', path={}, query={'date_from': date_from, 'date_to': date_to, 'keyword': keyword, 'topic': topic, 'numbers': numbers, 'sentiment': sentiment, 'search': search, 'location_id': location_id, 'company_id': company_id, 'cursor': cursor, 'limit': limit}, body=None)
|
|
481
|
+
|
|
482
|
+
def iter_alerts(self, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, keyword: Optional[str] = None, topic: Optional[str] = None, numbers: Optional[Union[str, Sequence[str]]] = None, sentiment: Optional[str] = None, search: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None) -> Iterator[Any]:
|
|
483
|
+
"""Every item of `list_alerts`, following cursors 100 at a time."""
|
|
484
|
+
return self._c._iter('listAlerts', path={}, query={'date_from': date_from, 'date_to': date_to, 'keyword': keyword, 'topic': topic, 'numbers': numbers, 'sentiment': sentiment, 'search': search, 'location_id': location_id, 'company_id': company_id})
|
|
485
|
+
|
|
486
|
+
def get_alerts_dashboard(self, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None) -> Any:
|
|
487
|
+
"""Alert totals. `GET /alerts/dashboard` (frontline_user)."""
|
|
488
|
+
return self._c._call('getAlertsDashboard', path={}, query={'date_from': date_from, 'date_to': date_to, 'location_id': location_id, 'company_id': company_id}, body=None)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
class TasksAPI(Namespace):
|
|
492
|
+
"""Tasks operations."""
|
|
493
|
+
|
|
494
|
+
def list_tasks(self, *, status: Optional[str] = None, today_start: Optional[Union[str, datetime]] = None, call_id: Optional[str] = None, task_id: Optional[str] = None, due_on: Optional[Union[str, date]] = None, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, search: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None, cursor: Optional[str] = None, limit: Optional[int] = None) -> Page:
|
|
495
|
+
"""List tasks. `GET /tasks` (frontline_user)."""
|
|
496
|
+
return self._c._page('listTasks', path={}, query={'status': status, 'today_start': today_start, 'call_id': call_id, 'task_id': task_id, 'due_on': due_on, 'date_from': date_from, 'date_to': date_to, 'search': search, 'location_id': location_id, 'company_id': company_id, 'cursor': cursor, 'limit': limit}, body=None)
|
|
497
|
+
|
|
498
|
+
def iter_tasks(self, *, status: Optional[str] = None, today_start: Optional[Union[str, datetime]] = None, call_id: Optional[str] = None, task_id: Optional[str] = None, due_on: Optional[Union[str, date]] = None, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, search: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None) -> Iterator[Any]:
|
|
499
|
+
"""Every item of `list_tasks`, following cursors 100 at a time."""
|
|
500
|
+
return self._c._iter('listTasks', path={}, query={'status': status, 'today_start': today_start, 'call_id': call_id, 'task_id': task_id, 'due_on': due_on, 'date_from': date_from, 'date_to': date_to, 'search': search, 'location_id': location_id, 'company_id': company_id})
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
class InsightsAPI(Namespace):
|
|
504
|
+
"""Insights operations."""
|
|
505
|
+
|
|
506
|
+
def get_insights_dashboard(self, *, start: Union[str, datetime], end: Union[str, datetime], trending_limit: Optional[int] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None) -> Any:
|
|
507
|
+
"""Insights Hub dashboard. `GET /insights/dashboard` (frontline_user)."""
|
|
508
|
+
return self._c._call('getInsightsDashboard', path={}, query={'start': start, 'end': end, 'trending_limit': trending_limit, 'location_id': location_id, 'company_id': company_id}, body=None)
|
|
509
|
+
|
|
510
|
+
def list_topic_calls(self, slug: str, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, sentiment: Optional[str] = None, outcome: Optional[str] = None, search: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None, cursor: Optional[str] = None, limit: Optional[int] = None) -> Page:
|
|
511
|
+
"""Calls for one topic. `GET /insights/topics/{slug}/calls` (frontline_user)."""
|
|
512
|
+
return self._c._page('listTopicCalls', path={'slug': slug}, query={'date_from': date_from, 'date_to': date_to, 'sentiment': sentiment, 'outcome': outcome, 'search': search, 'location_id': location_id, 'company_id': company_id, 'cursor': cursor, 'limit': limit}, body=None)
|
|
513
|
+
|
|
514
|
+
def iter_topic_calls(self, slug: str, *, date_from: Optional[Union[str, datetime]] = None, date_to: Optional[Union[str, datetime]] = None, sentiment: Optional[str] = None, outcome: Optional[str] = None, search: Optional[str] = None, location_id: Optional[Union[str, Sequence[str]]] = None, company_id: Optional[str] = None) -> Iterator[Any]:
|
|
515
|
+
"""Every item of `list_topic_calls`, following cursors 100 at a time."""
|
|
516
|
+
return self._c._iter('listTopicCalls', path={'slug': slug}, query={'date_from': date_from, 'date_to': date_to, 'sentiment': sentiment, 'outcome': outcome, 'search': search, 'location_id': location_id, 'company_id': company_id})
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
class WebhooksAPI(Namespace):
|
|
520
|
+
"""Events and webhooks operations."""
|
|
521
|
+
|
|
522
|
+
def get_after_call_webhook(self, location_id: str) -> Any:
|
|
523
|
+
"""Read the After Call webhook. `GET /locations/{locationId}/after-call/automation` (reseller_admin)."""
|
|
524
|
+
return self._c._call('getAfterCallWebhook', path={'locationId': location_id}, query={}, body=None)
|
|
525
|
+
|
|
526
|
+
def save_after_call_webhook(self, location_id: str, body: Mapping[str, Any]) -> Any:
|
|
527
|
+
"""Set the After Call webhook. `PUT /locations/{locationId}/after-call/automation` (reseller_admin)."""
|
|
528
|
+
return self._c._call('saveAfterCallWebhook', path={'locationId': location_id}, query={}, body=body)
|
|
529
|
+
|
|
530
|
+
def test_after_call_webhook(self, location_id: str) -> Any:
|
|
531
|
+
"""Send a test After Call event. `POST /locations/{locationId}/after-call/automation/test` (reseller_admin)."""
|
|
532
|
+
return self._c._call('testAfterCallWebhook', path={'locationId': location_id}, query={}, body=None)
|
|
533
|
+
|