universal-mcp 0.1.8rc3__py3-none-any.whl → 0.1.9rc1__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.
Files changed (61) hide show
  1. universal_mcp/applications/__init__.py +7 -2
  2. universal_mcp/applications/ahrefs/README.md +76 -0
  3. universal_mcp/applications/ahrefs/__init__.py +0 -0
  4. universal_mcp/applications/ahrefs/app.py +2291 -0
  5. universal_mcp/applications/application.py +202 -87
  6. universal_mcp/applications/cal_com_v2/README.md +175 -0
  7. universal_mcp/applications/cal_com_v2/__init__.py +0 -0
  8. universal_mcp/applications/cal_com_v2/app.py +4735 -0
  9. universal_mcp/applications/calendly/app.py +0 -12
  10. universal_mcp/applications/clickup/README.md +160 -0
  11. universal_mcp/applications/clickup/__init__.py +0 -0
  12. universal_mcp/applications/clickup/app.py +4359 -0
  13. universal_mcp/applications/coda/app.py +0 -33
  14. universal_mcp/applications/e2b/app.py +2 -28
  15. universal_mcp/applications/figma/README.md +74 -0
  16. universal_mcp/applications/figma/__init__.py +0 -0
  17. universal_mcp/applications/figma/app.py +1261 -0
  18. universal_mcp/applications/firecrawl/app.py +2 -32
  19. universal_mcp/applications/google_calendar/app.py +0 -11
  20. universal_mcp/applications/google_docs/app.py +0 -18
  21. universal_mcp/applications/google_drive/app.py +0 -17
  22. universal_mcp/applications/google_mail/app.py +0 -16
  23. universal_mcp/applications/google_sheet/app.py +0 -18
  24. universal_mcp/applications/hashnode/app.py +77 -0
  25. universal_mcp/applications/hashnode/prompt.md +21 -0
  26. universal_mcp/applications/mailchimp/README.md +306 -0
  27. universal_mcp/applications/mailchimp/__init__.py +0 -0
  28. universal_mcp/applications/mailchimp/app.py +8883 -0
  29. universal_mcp/applications/markitdown/app.py +2 -2
  30. universal_mcp/applications/perplexity/app.py +0 -35
  31. universal_mcp/applications/replicate/README.md +53 -0
  32. universal_mcp/applications/replicate/app.py +969 -0
  33. universal_mcp/applications/resend/app.py +0 -18
  34. universal_mcp/applications/retell_ai/README.md +46 -0
  35. universal_mcp/applications/retell_ai/__init__.py +0 -0
  36. universal_mcp/applications/retell_ai/app.py +316 -0
  37. universal_mcp/applications/rocketlane/README.md +42 -0
  38. universal_mcp/applications/rocketlane/__init__.py +0 -0
  39. universal_mcp/applications/rocketlane/app.py +180 -0
  40. universal_mcp/applications/serpapi/app.py +2 -28
  41. universal_mcp/applications/spotify/README.md +116 -0
  42. universal_mcp/applications/spotify/__init__.py +0 -0
  43. universal_mcp/applications/spotify/app.py +2231 -0
  44. universal_mcp/applications/supabase/README.md +112 -0
  45. universal_mcp/applications/supabase/__init__.py +0 -0
  46. universal_mcp/applications/supabase/app.py +2644 -0
  47. universal_mcp/applications/tavily/app.py +0 -20
  48. universal_mcp/applications/wrike/app.py +0 -12
  49. universal_mcp/applications/youtube/app.py +0 -18
  50. universal_mcp/integrations/agentr.py +27 -4
  51. universal_mcp/integrations/integration.py +14 -6
  52. universal_mcp/servers/server.py +3 -6
  53. universal_mcp/stores/store.py +7 -0
  54. universal_mcp/tools/tools.py +2 -2
  55. universal_mcp/utils/docstring_parser.py +171 -104
  56. universal_mcp/utils/installation.py +199 -8
  57. {universal_mcp-0.1.8rc3.dist-info → universal_mcp-0.1.9rc1.dist-info}/METADATA +2 -1
  58. universal_mcp-0.1.9rc1.dist-info/RECORD +106 -0
  59. universal_mcp-0.1.8rc3.dist-info/RECORD +0 -75
  60. {universal_mcp-0.1.8rc3.dist-info → universal_mcp-0.1.9rc1.dist-info}/WHEEL +0 -0
  61. {universal_mcp-0.1.8rc3.dist-info → universal_mcp-0.1.9rc1.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,4735 @@
1
+ from typing import Any
2
+
3
+ from universal_mcp.applications import APIApplication
4
+ from universal_mcp.integrations import Integration
5
+
6
+
7
+ class CalComV2App(APIApplication):
8
+ def __init__(self, integration: Integration = None, **kwargs) -> None:
9
+ super().__init__(name='cal-com-v2', integration=integration, **kwargs)
10
+ self.base_url = "https://api.cal.com"
11
+
12
+ def cal_provider_controller_verify_client_id(self, clientId) -> dict[str, Any]:
13
+ """
14
+ Verifies the validity of the provided client ID by sending a GET request to the provider verification endpoint.
15
+
16
+ Args:
17
+ clientId: str. The unique identifier of the client to verify.
18
+
19
+ Returns:
20
+ dict[str, Any]: A dictionary containing the provider data associated with the specified client ID as returned by the API.
21
+
22
+ Raises:
23
+ ValueError: Raised if 'clientId' is None.
24
+ requests.HTTPError: Raised if the HTTP request to the provider verification endpoint fails with an error status.
25
+
26
+ Tags:
27
+ verify, provider, api, sync
28
+ """
29
+ if clientId is None:
30
+ raise ValueError("Missing required parameter 'clientId'")
31
+ url = f"{self.base_url}/v2/provider/{clientId}"
32
+ query_params = {}
33
+ response = self._get(url, params=query_params)
34
+ response.raise_for_status()
35
+ return response.json()
36
+
37
+
38
+ def cal_provider_controller_verify_access_token(self, clientId) -> dict[str, Any]:
39
+ """
40
+ Verifies the validity of a provider's access token for the specified client ID by making an authenticated request to the provider API.
41
+
42
+ Args:
43
+ clientId: str. The unique identifier of the client whose access token should be verified.
44
+
45
+ Returns:
46
+ dict[str, Any]: The JSON response containing the verification result and related access token details from the provider API.
47
+
48
+ Raises:
49
+ ValueError: Raised if 'clientId' is None.
50
+ requests.exceptions.HTTPError: Raised if the HTTP request to the provider API fails with an error status.
51
+
52
+ Tags:
53
+ verify, access-token, controller, provider, api
54
+ """
55
+ if clientId is None:
56
+ raise ValueError("Missing required parameter 'clientId'")
57
+ url = f"{self.base_url}/v2/provider/{clientId}/access-token"
58
+ query_params = {}
59
+ response = self._get(url, params=query_params)
60
+ response.raise_for_status()
61
+ return response.json()
62
+
63
+ def gcal_controller_redirect(self, ) -> dict[str, Any]:
64
+ """
65
+ Retrieves the Google Calendar OAuth authorization URL by making a GET request to the API and returns the response as a dictionary.
66
+
67
+ Returns:
68
+ dict[str, Any]: Dictionary containing the OAuth authorization URL and related response data from the API.
69
+
70
+ Raises:
71
+ HTTPError: If the API response contains an HTTP error status code, an HTTPError is raised by response.raise_for_status().
72
+
73
+ Tags:
74
+ gcal, oauth, redirect, get, api, controller
75
+ """
76
+ url = f"{self.base_url}/v2/gcal/oauth/auth-url"
77
+ query_params = {}
78
+ response = self._get(url, params=query_params)
79
+ response.raise_for_status()
80
+ return response.json()
81
+
82
+ def gcal_controller_save(self, state, code) -> dict[str, Any]:
83
+ """
84
+ Saves Google Calendar OAuth credentials by exchanging the provided state and code via an authenticated API request.
85
+
86
+ Args:
87
+ state: The OAuth state parameter returned from the authorization flow (str).
88
+ code: The authorization code received from Google after user consent (str).
89
+
90
+ Returns:
91
+ A dictionary containing the response data from the Google Calendar OAuth save endpoint.
92
+
93
+ Raises:
94
+ ValueError: If either 'state' or 'code' is None.
95
+ requests.HTTPError: If the API request returns an unsuccessful status code.
96
+
97
+ Tags:
98
+ gcal, oauth, save, controller, api-call
99
+ """
100
+ if state is None:
101
+ raise ValueError("Missing required parameter 'state'")
102
+ if code is None:
103
+ raise ValueError("Missing required parameter 'code'")
104
+ url = f"{self.base_url}/v2/gcal/oauth/save"
105
+ query_params = {k: v for k, v in [('state', state), ('code', code)] if v is not None}
106
+ response = self._get(url, params=query_params)
107
+ response.raise_for_status()
108
+ return response.json()
109
+
110
+ def gcal_controller_check(self, ) -> dict[str, Any]:
111
+ """
112
+ Checks the connection status of Google Calendar integration via the API.
113
+
114
+ Returns:
115
+ A dictionary containing the status and details of the Google Calendar integration as returned by the API.
116
+
117
+ Raises:
118
+ HTTPError: If the HTTP request to the Google Calendar check endpoint returns an unsuccessful status code.
119
+
120
+ Tags:
121
+ check, status, gcal, integration
122
+ """
123
+ url = f"{self.base_url}/v2/gcal/check"
124
+ query_params = {}
125
+ response = self._get(url, params=query_params)
126
+ response.raise_for_status()
127
+ return response.json()
128
+
129
+ def oauth_client_users_controller_get_managed_users(self, clientId, limit=None) -> dict[str, Any]:
130
+ """
131
+ Retrieves a list of managed users for a specified OAuth client.
132
+
133
+ Args:
134
+ clientId: The unique identifier of the OAuth client whose managed users are to be retrieved.
135
+ limit: Optional maximum number of users to return. If None, the default server-side limit is used.
136
+
137
+ Returns:
138
+ A dictionary containing the list of managed users and associated metadata returned by the API.
139
+
140
+ Raises:
141
+ ValueError: If the required parameter 'clientId' is not provided.
142
+ requests.HTTPError: If the HTTP request to the API fails or returns a non-success status code.
143
+
144
+ Tags:
145
+ list, users, management, api
146
+ """
147
+ if clientId is None:
148
+ raise ValueError("Missing required parameter 'clientId'")
149
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/users"
150
+ query_params = {k: v for k, v in [('limit', limit)] if v is not None}
151
+ response = self._get(url, params=query_params)
152
+ response.raise_for_status()
153
+ return response.json()
154
+
155
+ def oauth_client_users_controller_create_user(self, clientId, email, name, timeFormat=None, weekStart=None, timeZone=None, locale=None, avatarUrl=None) -> dict[str, Any]:
156
+ """
157
+ Creates a new user for a specified OAuth client by sending user details to the OAuth service.
158
+
159
+ Args:
160
+ clientId: str. The ID of the OAuth client for which the user is to be created. Required.
161
+ email: str. The email address of the user to be created. Required.
162
+ name: str. The name of the user to be created. Required.
163
+ timeFormat: Optional[str]. The preferred time format for the user, if any.
164
+ weekStart: Optional[str]. The day the user's week starts on, if specified.
165
+ timeZone: Optional[str]. The user's preferred time zone, if specified.
166
+ locale: Optional[str]. The locale setting for the user, if specified.
167
+ avatarUrl: Optional[str]. URL for the user's avatar image, if specified.
168
+
169
+ Returns:
170
+ dict[str, Any]: A dictionary containing the details of the created user as returned by the OAuth service.
171
+
172
+ Raises:
173
+ ValueError: If any of the required parameters (clientId, email, or name) are missing.
174
+ requests.HTTPError: If the HTTP request to create the user fails (e.g., due to client or server error).
175
+
176
+ Tags:
177
+ create, user-management, oauth, api-call
178
+ """
179
+ if clientId is None:
180
+ raise ValueError("Missing required parameter 'clientId'")
181
+ if email is None:
182
+ raise ValueError("Missing required parameter 'email'")
183
+ if name is None:
184
+ raise ValueError("Missing required parameter 'name'")
185
+ request_body = {
186
+ 'email': email,
187
+ 'name': name,
188
+ 'timeFormat': timeFormat,
189
+ 'weekStart': weekStart,
190
+ 'timeZone': timeZone,
191
+ 'locale': locale,
192
+ 'avatarUrl': avatarUrl,
193
+ }
194
+ request_body = {k: v for k, v in request_body.items() if v is not None}
195
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/users"
196
+ query_params = {}
197
+ response = self._post(url, data=request_body, params=query_params)
198
+ response.raise_for_status()
199
+ return response.json()
200
+
201
+ def oauth_client_users_controller_get_user_by_id(self, clientId, userId) -> dict[str, Any]:
202
+ """
203
+ Retrieves user information for a specific OAuth client and user ID.
204
+
205
+ Args:
206
+ clientId: The unique identifier of the OAuth client. Must not be None.
207
+ userId: The unique identifier of the user. Must not be None.
208
+
209
+ Returns:
210
+ A dictionary containing user information retrieved from the OAuth client's user endpoint.
211
+
212
+ Raises:
213
+ ValueError: Raised if either 'clientId' or 'userId' is None.
214
+ requests.HTTPError: Raised if the HTTP request to the API endpoint fails with an error status.
215
+
216
+ Tags:
217
+ get, user, oauth-client, api
218
+ """
219
+ if clientId is None:
220
+ raise ValueError("Missing required parameter 'clientId'")
221
+ if userId is None:
222
+ raise ValueError("Missing required parameter 'userId'")
223
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/users/{userId}"
224
+ query_params = {}
225
+ response = self._get(url, params=query_params)
226
+ response.raise_for_status()
227
+ return response.json()
228
+
229
+ def oauth_client_users_controller_update_user(self, clientId, userId, email=None, name=None, timeFormat=None, defaultScheduleId=None, weekStart=None, timeZone=None, locale=None, avatarUrl=None) -> dict[str, Any]:
230
+ """
231
+ Updates a user's details for a specific OAuth client by sending a PATCH request with provided user information.
232
+
233
+ Args:
234
+ clientId: str. The unique identifier of the OAuth client. Required.
235
+ userId: str. The unique identifier of the user to be updated. Required.
236
+ email: str, optional. The new email address of the user.
237
+ name: str, optional. The new name of the user.
238
+ timeFormat: str, optional. The preferred time format for the user (e.g., '12h' or '24h').
239
+ defaultScheduleId: str, optional. The default schedule identifier for the user.
240
+ weekStart: str or int, optional. The preferred starting day of the week for the user, e.g., 'Monday' or 1.
241
+ timeZone: str, optional. The time zone for the user.
242
+ locale: str, optional. The locale/language preference for the user.
243
+ avatarUrl: str, optional. The URL of the user's avatar image.
244
+
245
+ Returns:
246
+ dict. The updated user information as returned by the API.
247
+
248
+ Raises:
249
+ ValueError: If 'clientId' or 'userId' is None.
250
+ requests.HTTPError: If the PATCH request to the API fails or returns an unsuccessful status code.
251
+
252
+ Tags:
253
+ update, user-management, oauth-client, api, patch
254
+ """
255
+ if clientId is None:
256
+ raise ValueError("Missing required parameter 'clientId'")
257
+ if userId is None:
258
+ raise ValueError("Missing required parameter 'userId'")
259
+ request_body = {
260
+ 'email': email,
261
+ 'name': name,
262
+ 'timeFormat': timeFormat,
263
+ 'defaultScheduleId': defaultScheduleId,
264
+ 'weekStart': weekStart,
265
+ 'timeZone': timeZone,
266
+ 'locale': locale,
267
+ 'avatarUrl': avatarUrl,
268
+ }
269
+ request_body = {k: v for k, v in request_body.items() if v is not None}
270
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/users/{userId}"
271
+ query_params = {}
272
+ response = self._patch(url, data=request_body, params=query_params)
273
+ response.raise_for_status()
274
+ return response.json()
275
+
276
+ def oauth_client_users_controller_delete_user(self, clientId, userId) -> dict[str, Any]:
277
+ """
278
+ Deletes a specific user associated with an OAuth client by client and user ID.
279
+
280
+ Args:
281
+ clientId: str. The unique identifier of the OAuth client whose user is to be deleted.
282
+ userId: str. The unique identifier of the user to be deleted from the OAuth client.
283
+
284
+ Returns:
285
+ dict. The server's response as a dictionary after deleting the user.
286
+
287
+ Raises:
288
+ ValueError: Raised if clientId or userId is None.
289
+ requests.HTTPError: Raised if the HTTP request fails or returns an error status.
290
+
291
+ Tags:
292
+ delete, oauth-client, user-management, api
293
+ """
294
+ if clientId is None:
295
+ raise ValueError("Missing required parameter 'clientId'")
296
+ if userId is None:
297
+ raise ValueError("Missing required parameter 'userId'")
298
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/users/{userId}"
299
+ query_params = {}
300
+ response = self._delete(url, params=query_params)
301
+ response.raise_for_status()
302
+ return response.json()
303
+
304
+ def oauth_client_users_controller_force_refresh(self, clientId, userId) -> dict[str, Any]:
305
+ """
306
+ Forces a token refresh for a specific OAuth client user by issuing a POST request to the relevant API endpoint.
307
+
308
+ Args:
309
+ clientId: str. The unique identifier of the OAuth client whose user token needs to be refreshed.
310
+ userId: str. The unique identifier of the user associated with the OAuth client.
311
+
312
+ Returns:
313
+ dict[str, Any]: The JSON response from the API containing the result of the force refresh operation.
314
+
315
+ Raises:
316
+ ValueError: Raised if either 'clientId' or 'userId' is None.
317
+ requests.HTTPError: Raised if the API response contains an HTTP error status.
318
+
319
+ Tags:
320
+ force-refresh, oauth-client, user-management, api
321
+ """
322
+ if clientId is None:
323
+ raise ValueError("Missing required parameter 'clientId'")
324
+ if userId is None:
325
+ raise ValueError("Missing required parameter 'userId'")
326
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/users/{userId}/force-refresh"
327
+ query_params = {}
328
+ response = self._post(url, data={}, params=query_params)
329
+ response.raise_for_status()
330
+ return response.json()
331
+
332
+ def oauth_flow_controller_refresh_tokens(self, clientId, refreshToken) -> dict[str, Any]:
333
+ """
334
+ Requests a new access token using the provided client ID and refresh token through the OAuth flow.
335
+
336
+ Args:
337
+ clientId: str. The unique client identifier for the OAuth application.
338
+ refreshToken: str. The refresh token used to obtain a new access token.
339
+
340
+ Returns:
341
+ dict[str, Any]: The JSON response containing the new access token and related metadata.
342
+
343
+ Raises:
344
+ ValueError: Raised if either 'clientId' or 'refreshToken' is None.
345
+ requests.HTTPError: Raised if the HTTP request to refresh the token fails (non-2xx response).
346
+
347
+ Tags:
348
+ oauth, refresh, token-management, api
349
+ """
350
+ if clientId is None:
351
+ raise ValueError("Missing required parameter 'clientId'")
352
+ if refreshToken is None:
353
+ raise ValueError("Missing required parameter 'refreshToken'")
354
+ request_body = {
355
+ 'refreshToken': refreshToken,
356
+ }
357
+ request_body = {k: v for k, v in request_body.items() if v is not None}
358
+ url = f"{self.base_url}/v2/oauth/{clientId}/refresh"
359
+ query_params = {}
360
+ response = self._post(url, data=request_body, params=query_params)
361
+ response.raise_for_status()
362
+ return response.json()
363
+
364
+ def oauth_client_webhooks_controller_create_oauth_client_webhook(self, clientId, active, subscriberUrl, triggers, payloadTemplate=None, secret=None) -> dict[str, Any]:
365
+ """
366
+ Creates a new webhook for an OAuth client with the specified configuration parameters.
367
+
368
+ Args:
369
+ clientId: str. The unique identifier of the OAuth client for which the webhook is created.
370
+ active: bool. Specifies whether the webhook should be active upon creation.
371
+ subscriberUrl: str. The URL to which webhook notifications will be sent.
372
+ triggers: list. A list of event triggers that determine when the webhook will be invoked.
373
+ payloadTemplate: Optional[str]. An optional template for customizing the webhook payload.
374
+ secret: Optional[str]. An optional secret used to sign webhook payloads for verification.
375
+
376
+ Returns:
377
+ dict[str, Any]: A dictionary containing the details of the created webhook, as returned by the server.
378
+
379
+ Raises:
380
+ ValueError: If any of the required parameters ('clientId', 'active', 'subscriberUrl', 'triggers') is missing or None.
381
+ requests.HTTPError: If the HTTP request to create the webhook fails or returns an error response.
382
+
383
+ Tags:
384
+ create, webhook, oauth-client, api, management
385
+ """
386
+ if clientId is None:
387
+ raise ValueError("Missing required parameter 'clientId'")
388
+ if active is None:
389
+ raise ValueError("Missing required parameter 'active'")
390
+ if subscriberUrl is None:
391
+ raise ValueError("Missing required parameter 'subscriberUrl'")
392
+ if triggers is None:
393
+ raise ValueError("Missing required parameter 'triggers'")
394
+ request_body = {
395
+ 'payloadTemplate': payloadTemplate,
396
+ 'active': active,
397
+ 'subscriberUrl': subscriberUrl,
398
+ 'triggers': triggers,
399
+ 'secret': secret,
400
+ }
401
+ request_body = {k: v for k, v in request_body.items() if v is not None}
402
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/webhooks"
403
+ query_params = {}
404
+ response = self._post(url, data=request_body, params=query_params)
405
+ response.raise_for_status()
406
+ return response.json()
407
+
408
+ def oauth_client_webhooks_controller_get_oauth_client_webhooks(self, clientId, take=None, skip=None) -> dict[str, Any]:
409
+ """
410
+ Retrieves a list of webhook configurations associated with a specified OAuth client.
411
+
412
+ Args:
413
+ clientId: str. The unique identifier of the OAuth client whose webhooks are to be fetched.
414
+ take: Optional[int]. The maximum number of webhook records to return. Used for pagination.
415
+ skip: Optional[int]. The number of webhook records to skip before returning results. Used for pagination.
416
+
417
+ Returns:
418
+ dict[str, Any]: A dictionary containing the webhook configurations for the specified OAuth client.
419
+
420
+ Raises:
421
+ ValueError: Raised if the required parameter 'clientId' is not provided.
422
+ requests.HTTPError: Raised if the HTTP request to the web service fails or returns an error status code.
423
+
424
+ Tags:
425
+ list, webhook-management, oauth-client, fetch
426
+ """
427
+ if clientId is None:
428
+ raise ValueError("Missing required parameter 'clientId'")
429
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/webhooks"
430
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
431
+ response = self._get(url, params=query_params)
432
+ response.raise_for_status()
433
+ return response.json()
434
+
435
+ def oauth_client_webhooks_controller_delete_all_oauth_client_webhooks(self, clientId) -> dict[str, Any]:
436
+ """
437
+ Deletes all OAuth client webhooks for the specified client ID.
438
+
439
+ Args:
440
+ clientId: str. The unique identifier of the OAuth client whose webhooks are to be deleted.
441
+
442
+ Returns:
443
+ dict[str, Any]: A dictionary containing the server response data after deleting the webhooks.
444
+
445
+ Raises:
446
+ ValueError: Raised if the required parameter 'clientId' is None.
447
+ requests.HTTPError: Raised if the HTTP request to delete the webhooks fails with an unsuccessful status code.
448
+
449
+ Tags:
450
+ delete, webhooks, oauth-client, management
451
+ """
452
+ if clientId is None:
453
+ raise ValueError("Missing required parameter 'clientId'")
454
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/webhooks"
455
+ query_params = {}
456
+ response = self._delete(url, params=query_params)
457
+ response.raise_for_status()
458
+ return response.json()
459
+
460
+ def oauth_client_webhooks_controller_update_oauth_client_webhook(self, clientId, webhookId, payloadTemplate=None, active=None, subscriberUrl=None, triggers=None, secret=None) -> dict[str, Any]:
461
+ """
462
+ Updates an existing OAuth client webhook with new configuration parameters.
463
+
464
+ Args:
465
+ clientId: str. The unique identifier of the OAuth client whose webhook is being updated. Required.
466
+ webhookId: str. The unique identifier of the webhook to update. Required.
467
+ payloadTemplate: Optional[str]. The template for the webhook payload, if updating.
468
+ active: Optional[bool]. Whether the webhook should be active. Pass True to activate, False to deactivate.
469
+ subscriberUrl: Optional[str]. The URL that will receive webhook events.
470
+ triggers: Optional[list[str]]. A list of trigger event types for which the webhook should fire.
471
+ secret: Optional[str]. Shared secret used to sign webhook payloads for verification.
472
+
473
+ Returns:
474
+ dict[str, Any]: A dictionary containing the updated webhook configuration as returned by the API.
475
+
476
+ Raises:
477
+ ValueError: If either 'clientId' or 'webhookId' is not provided.
478
+ requests.HTTPError: If the HTTP request to update the webhook fails (e.g., network or API error).
479
+
480
+ Tags:
481
+ update, webhook, oauth-client, management
482
+ """
483
+ if clientId is None:
484
+ raise ValueError("Missing required parameter 'clientId'")
485
+ if webhookId is None:
486
+ raise ValueError("Missing required parameter 'webhookId'")
487
+ request_body = {
488
+ 'payloadTemplate': payloadTemplate,
489
+ 'active': active,
490
+ 'subscriberUrl': subscriberUrl,
491
+ 'triggers': triggers,
492
+ 'secret': secret,
493
+ }
494
+ request_body = {k: v for k, v in request_body.items() if v is not None}
495
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/webhooks/{webhookId}"
496
+ query_params = {}
497
+ response = self._patch(url, data=request_body, params=query_params)
498
+ response.raise_for_status()
499
+ return response.json()
500
+
501
+ def oauth_client_webhooks_controller_get_oauth_client_webhook(self, clientId, webhookId) -> dict[str, Any]:
502
+ """
503
+ Retrieves the details of a specific OAuth client webhook by client and webhook ID.
504
+
505
+ Args:
506
+ clientId: str. The unique identifier of the OAuth client whose webhook is to be retrieved.
507
+ webhookId: str. The unique identifier of the webhook associated with the specified OAuth client.
508
+
509
+ Returns:
510
+ dict[str, Any]: A dictionary containing the details of the requested OAuth client webhook as returned by the API.
511
+
512
+ Raises:
513
+ ValueError: Raised if either 'clientId' or 'webhookId' is None.
514
+ requests.HTTPError: Raised if the HTTP request to fetch the webhook details fails (non-2xx response).
515
+
516
+ Tags:
517
+ get, webhook, oauth-client, retrieve, api
518
+ """
519
+ if clientId is None:
520
+ raise ValueError("Missing required parameter 'clientId'")
521
+ if webhookId is None:
522
+ raise ValueError("Missing required parameter 'webhookId'")
523
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/webhooks/{webhookId}"
524
+ query_params = {}
525
+ response = self._get(url, params=query_params)
526
+ response.raise_for_status()
527
+ return response.json()
528
+
529
+ def oauth_client_webhooks_controller_delete_oauth_client_webhook(self, clientId, webhookId) -> dict[str, Any]:
530
+ """
531
+ Deletes a specific webhook associated with an OAuth client.
532
+
533
+ Args:
534
+ clientId: str. Unique identifier of the OAuth client whose webhook will be deleted.
535
+ webhookId: str. Unique identifier of the webhook to delete.
536
+
537
+ Returns:
538
+ dict. The response from the server, parsed as a JSON-compatible dictionary.
539
+
540
+ Raises:
541
+ ValueError: Raised if either 'clientId' or 'webhookId' is not provided.
542
+ requests.HTTPError: Raised if the server returns an unsuccessful HTTP response status.
543
+
544
+ Tags:
545
+ delete, webhook, oauth-client, async_job, management
546
+ """
547
+ if clientId is None:
548
+ raise ValueError("Missing required parameter 'clientId'")
549
+ if webhookId is None:
550
+ raise ValueError("Missing required parameter 'webhookId'")
551
+ url = f"{self.base_url}/v2/oauth-clients/{clientId}/webhooks/{webhookId}"
552
+ query_params = {}
553
+ response = self._delete(url, params=query_params)
554
+ response.raise_for_status()
555
+ return response.json()
556
+
557
+ def organizations_attributes_controller_get_organization_attributes(self, orgId, take=None, skip=None) -> dict[str, Any]:
558
+ """
559
+ Retrieves the attributes of a specified organization using its organization ID, with optional pagination parameters.
560
+
561
+ Args:
562
+ orgId: str. The unique identifier of the organization whose attributes are to be retrieved.
563
+ take: Optional[int]. The maximum number of attributes to return. Defaults to None.
564
+ skip: Optional[int]. The number of attributes to skip before starting to collect the result set. Defaults to None.
565
+
566
+ Returns:
567
+ dict[str, Any]: A dictionary containing the organization's attributes as returned by the API.
568
+
569
+ Raises:
570
+ ValueError: If 'orgId' is None.
571
+ HTTPError: If the HTTP request to the API fails or returns an unsuccessful status code.
572
+
573
+ Tags:
574
+ get, organization, attributes, api
575
+ """
576
+ if orgId is None:
577
+ raise ValueError("Missing required parameter 'orgId'")
578
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes"
579
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
580
+ response = self._get(url, params=query_params)
581
+ response.raise_for_status()
582
+ return response.json()
583
+
584
+ def organizations_attributes_controller_create_organization_attribute(self, orgId, name, slug, type, options, enabled=None) -> dict[str, Any]:
585
+ """
586
+ Creates a new organization attribute by sending a POST request with the specified parameters to the organization's attributes endpoint.
587
+
588
+ Args:
589
+ orgId: str. Unique identifier of the organization. Required.
590
+ name: str. Name of the attribute to create. Required.
591
+ slug: str. URL-friendly, unique identifier for the attribute. Required.
592
+ type: str. Data type of the attribute (e.g., 'string', 'number'). Required.
593
+ options: Any. Allowed options or configuration for the attribute. Required.
594
+ enabled: bool or None. Specifies whether the attribute is enabled. Optional; defaults to None.
595
+
596
+ Returns:
597
+ dict. JSON response from the API containing details of the created organization attribute.
598
+
599
+ Raises:
600
+ ValueError: If any of the required parameters ('orgId', 'name', 'slug', 'type', or 'options') is None.
601
+ requests.HTTPError: If the HTTP request to the API endpoint fails or returns an error status code.
602
+
603
+ Tags:
604
+ create, attribute-management, organization, api, http
605
+ """
606
+ if orgId is None:
607
+ raise ValueError("Missing required parameter 'orgId'")
608
+ if name is None:
609
+ raise ValueError("Missing required parameter 'name'")
610
+ if slug is None:
611
+ raise ValueError("Missing required parameter 'slug'")
612
+ if type is None:
613
+ raise ValueError("Missing required parameter 'type'")
614
+ if options is None:
615
+ raise ValueError("Missing required parameter 'options'")
616
+ request_body = {
617
+ 'name': name,
618
+ 'slug': slug,
619
+ 'type': type,
620
+ 'options': options,
621
+ 'enabled': enabled,
622
+ }
623
+ request_body = {k: v for k, v in request_body.items() if v is not None}
624
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes"
625
+ query_params = {}
626
+ response = self._post(url, data=request_body, params=query_params)
627
+ response.raise_for_status()
628
+ return response.json()
629
+
630
+ def organizations_attributes_controller_get_organization_attribute(self, orgId, attributeId) -> dict[str, Any]:
631
+ """
632
+ Retrieves a specific attribute for an organization by organization and attribute IDs.
633
+
634
+ Args:
635
+ orgId: The unique identifier of the organization whose attribute is to be retrieved.
636
+ attributeId: The unique identifier of the attribute to fetch for the specified organization.
637
+
638
+ Returns:
639
+ A dictionary containing the organization's attribute details as returned by the API.
640
+
641
+ Raises:
642
+ ValueError: Raised if 'orgId' or 'attributeId' is not provided.
643
+ requests.HTTPError: Raised if the HTTP request to the API fails or returns an error response.
644
+
645
+ Tags:
646
+ get, organization, attribute, management
647
+ """
648
+ if orgId is None:
649
+ raise ValueError("Missing required parameter 'orgId'")
650
+ if attributeId is None:
651
+ raise ValueError("Missing required parameter 'attributeId'")
652
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}"
653
+ query_params = {}
654
+ response = self._get(url, params=query_params)
655
+ response.raise_for_status()
656
+ return response.json()
657
+
658
+ def organizations_attributes_controller_update_organization_attribute(self, orgId, attributeId, name=None, slug=None, type=None, enabled=None) -> dict[str, Any]:
659
+ """
660
+ Updates a specific attribute of an organization using the provided parameters.
661
+
662
+ Args:
663
+ orgId: str. The unique identifier of the organization whose attribute is to be updated.
664
+ attributeId: str. The unique identifier of the attribute to update within the organization.
665
+ name: str, optional. The new name for the attribute. If None, the name will not be changed.
666
+ slug: str, optional. The new slug for the attribute. If None, the slug will not be changed.
667
+ type: str, optional. The new type for the attribute. If None, the type will not be changed.
668
+ enabled: bool, optional. The enabled status for the attribute. If None, the enabled status will not be changed.
669
+
670
+ Returns:
671
+ dict[str, Any]: The updated organization attribute as returned by the API.
672
+
673
+ Raises:
674
+ ValueError: Raised if 'orgId' or 'attributeId' is None.
675
+ requests.HTTPError: Raised if the API request fails with an unsuccessful HTTP status code.
676
+
677
+ Tags:
678
+ update, organization-attribute, management, api
679
+ """
680
+ if orgId is None:
681
+ raise ValueError("Missing required parameter 'orgId'")
682
+ if attributeId is None:
683
+ raise ValueError("Missing required parameter 'attributeId'")
684
+ request_body = {
685
+ 'name': name,
686
+ 'slug': slug,
687
+ 'type': type,
688
+ 'enabled': enabled,
689
+ }
690
+ request_body = {k: v for k, v in request_body.items() if v is not None}
691
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}"
692
+ query_params = {}
693
+ response = self._patch(url, data=request_body, params=query_params)
694
+ response.raise_for_status()
695
+ return response.json()
696
+
697
+ def organizations_attributes_controller_delete_organization_attribute(self, orgId, attributeId) -> dict[str, Any]:
698
+ """
699
+ Deletes an attribute from a specific organization by its organization ID and attribute ID.
700
+
701
+ Args:
702
+ orgId: str. Unique identifier of the organization whose attribute is to be deleted.
703
+ attributeId: str. Unique identifier of the attribute to delete.
704
+
705
+ Returns:
706
+ dict[str, Any]: The JSON response from the API after deleting the attribute.
707
+
708
+ Raises:
709
+ ValueError: Raised if either 'orgId' or 'attributeId' is None.
710
+ requests.HTTPError: Raised if the HTTP request to delete the attribute fails (non-success status code).
711
+
712
+ Tags:
713
+ delete, organization, attribute-management, api
714
+ """
715
+ if orgId is None:
716
+ raise ValueError("Missing required parameter 'orgId'")
717
+ if attributeId is None:
718
+ raise ValueError("Missing required parameter 'attributeId'")
719
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}"
720
+ query_params = {}
721
+ response = self._delete(url, params=query_params)
722
+ response.raise_for_status()
723
+ return response.json()
724
+
725
+ def organizations_options_attributes_controller_create_organization_attribute_option(self, orgId, attributeId, value, slug) -> dict[str, Any]:
726
+ """
727
+ Creates a new attribute option for a specific organization attribute.
728
+
729
+ Args:
730
+ orgId: str. The unique identifier of the organization.
731
+ attributeId: str. The unique identifier of the attribute to which the option will be added.
732
+ value: str. The display value for the attribute option to be created.
733
+ slug: str. The slug (unique, URL-friendly identifier) for the attribute option.
734
+
735
+ Returns:
736
+ dict[str, Any]: A dictionary containing the created attribute option's details as returned by the API.
737
+
738
+ Raises:
739
+ ValueError: Raised if any of 'orgId', 'attributeId', 'value', or 'slug' is None.
740
+ requests.HTTPError: Raised if the API request fails or returns an error response.
741
+
742
+ Tags:
743
+ create, attribute-option, organization, controller, api
744
+ """
745
+ if orgId is None:
746
+ raise ValueError("Missing required parameter 'orgId'")
747
+ if attributeId is None:
748
+ raise ValueError("Missing required parameter 'attributeId'")
749
+ if value is None:
750
+ raise ValueError("Missing required parameter 'value'")
751
+ if slug is None:
752
+ raise ValueError("Missing required parameter 'slug'")
753
+ request_body = {
754
+ 'value': value,
755
+ 'slug': slug,
756
+ }
757
+ request_body = {k: v for k, v in request_body.items() if v is not None}
758
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}/options"
759
+ query_params = {}
760
+ response = self._post(url, data=request_body, params=query_params)
761
+ response.raise_for_status()
762
+ return response.json()
763
+
764
+ def organizations_options_attributes_controller_get_organization_attribute_options(self, orgId, attributeId) -> dict[str, Any]:
765
+ """
766
+ Retrieves the available options for a specific organization attribute by organization and attribute IDs.
767
+
768
+ Args:
769
+ orgId: The unique identifier of the organization whose attribute options are to be retrieved.
770
+ attributeId: The unique identifier of the attribute for which options are to be listed.
771
+
772
+ Returns:
773
+ A dictionary representing the JSON response containing the list of attribute options for the specified organization and attribute.
774
+
775
+ Raises:
776
+ ValueError: Raised if either 'orgId' or 'attributeId' is None.
777
+ requests.HTTPError: Raised if the HTTP request to the API fails with a non-successful status code.
778
+
779
+ Tags:
780
+ get, list, organization, attributes, options, api
781
+ """
782
+ if orgId is None:
783
+ raise ValueError("Missing required parameter 'orgId'")
784
+ if attributeId is None:
785
+ raise ValueError("Missing required parameter 'attributeId'")
786
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}/options"
787
+ query_params = {}
788
+ response = self._get(url, params=query_params)
789
+ response.raise_for_status()
790
+ return response.json()
791
+
792
+ def organizations_options_attributes_controller_delete_organization_attribute_option(self, orgId, attributeId, optionId) -> dict[str, Any]:
793
+ """
794
+ Deletes a specific attribute option from an organization's attributes via the API.
795
+
796
+ Args:
797
+ orgId: str. The unique identifier of the organization.
798
+ attributeId: str. The unique identifier of the attribute within the organization.
799
+ optionId: str. The unique identifier of the attribute option to be deleted.
800
+
801
+ Returns:
802
+ dict[str, Any]: The JSON response from the API after successfully deleting the attribute option.
803
+
804
+ Raises:
805
+ ValueError: Raised if any of the required parameters ('orgId', 'attributeId', or 'optionId') are None.
806
+ requests.HTTPError: Raised if the API request fails with an HTTP error status.
807
+
808
+ Tags:
809
+ delete, attribute-option, organization, api
810
+ """
811
+ if orgId is None:
812
+ raise ValueError("Missing required parameter 'orgId'")
813
+ if attributeId is None:
814
+ raise ValueError("Missing required parameter 'attributeId'")
815
+ if optionId is None:
816
+ raise ValueError("Missing required parameter 'optionId'")
817
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}"
818
+ query_params = {}
819
+ response = self._delete(url, params=query_params)
820
+ response.raise_for_status()
821
+ return response.json()
822
+
823
+ def organizations_options_attributes_controller_update_organization_attribute_option(self, orgId, attributeId, optionId, value=None, slug=None) -> dict[str, Any]:
824
+ """
825
+ Updates an existing organization attribute option with new values for 'value' and/or 'slug'.
826
+
827
+ Args:
828
+ orgId: str. Unique identifier for the organization. Required.
829
+ attributeId: str. Unique identifier for the attribute within the organization. Required.
830
+ optionId: str. Unique identifier for the attribute option to update. Required.
831
+ value: Optional[str]. New value for the attribute option. If None, the value is not updated.
832
+ slug: Optional[str]. New slug for the attribute option. If None, the slug is not updated.
833
+
834
+ Returns:
835
+ dict[str, Any]: The updated organization attribute option as returned by the API.
836
+
837
+ Raises:
838
+ ValueError: If 'orgId', 'attributeId', or 'optionId' is None.
839
+ requests.HTTPError: If the HTTP PATCH request fails or the server returns an error.
840
+
841
+ Tags:
842
+ update, attribute-option, organization, api
843
+ """
844
+ if orgId is None:
845
+ raise ValueError("Missing required parameter 'orgId'")
846
+ if attributeId is None:
847
+ raise ValueError("Missing required parameter 'attributeId'")
848
+ if optionId is None:
849
+ raise ValueError("Missing required parameter 'optionId'")
850
+ request_body = {
851
+ 'value': value,
852
+ 'slug': slug,
853
+ }
854
+ request_body = {k: v for k, v in request_body.items() if v is not None}
855
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}"
856
+ query_params = {}
857
+ response = self._patch(url, data=request_body, params=query_params)
858
+ response.raise_for_status()
859
+ return response.json()
860
+
861
+ def organizations_options_attributes_controller_assign_organization_attribute_option_to_user(self, orgId, userId, attributeId, value=None, attributeOptionId=None) -> dict[str, Any]:
862
+ """
863
+ Assigns a specific organization attribute option to a user within the given organization.
864
+
865
+ Args:
866
+ orgId: str. The unique identifier of the organization.
867
+ userId: str. The unique identifier of the user to whom the attribute option is being assigned.
868
+ attributeId: str. The unique identifier of the attribute being assigned.
869
+ value: Optional[Any]. The value to assign to the attribute, if applicable. Defaults to None.
870
+ attributeOptionId: Optional[Any]. The ID of the attribute option to assign, if applicable. Defaults to None.
871
+
872
+ Returns:
873
+ dict[str, Any]: The JSON response from the API confirming assignment of the attribute option to the user.
874
+
875
+ Raises:
876
+ ValueError: Raised if any of the required parameters ('orgId', 'userId', or 'attributeId') are missing.
877
+ requests.HTTPError: Raised if the HTTP request to the API fails (non-successful status code).
878
+
879
+ Tags:
880
+ assign, organization-attributes, controller, user-management, api
881
+ """
882
+ if orgId is None:
883
+ raise ValueError("Missing required parameter 'orgId'")
884
+ if userId is None:
885
+ raise ValueError("Missing required parameter 'userId'")
886
+ if attributeId is None:
887
+ raise ValueError("Missing required parameter 'attributeId'")
888
+ request_body = {
889
+ 'value': value,
890
+ 'attributeOptionId': attributeOptionId,
891
+ 'attributeId': attributeId,
892
+ }
893
+ request_body = {k: v for k, v in request_body.items() if v is not None}
894
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/options/{userId}"
895
+ query_params = {}
896
+ response = self._post(url, data=request_body, params=query_params)
897
+ response.raise_for_status()
898
+ return response.json()
899
+
900
+ def organizations_options_attributes_controller_get_organization_attribute_options_for_user(self, orgId, userId) -> dict[str, Any]:
901
+ """
902
+ Retrieves available attribute options for a user within a specified organization.
903
+
904
+ Args:
905
+ orgId: The unique identifier of the organization whose attribute options are to be retrieved.
906
+ userId: The unique identifier of the user for whom the organization attribute options are being requested.
907
+
908
+ Returns:
909
+ A dictionary containing the attribute options available to the specified user within the given organization.
910
+
911
+ Raises:
912
+ ValueError: Raised if 'orgId' or 'userId' is None.
913
+ requests.HTTPError: Raised if the HTTP request to the attribute options endpoint fails.
914
+
915
+ Tags:
916
+ get, organization, attributes, user, sync, api
917
+ """
918
+ if orgId is None:
919
+ raise ValueError("Missing required parameter 'orgId'")
920
+ if userId is None:
921
+ raise ValueError("Missing required parameter 'userId'")
922
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/options/{userId}"
923
+ query_params = {}
924
+ response = self._get(url, params=query_params)
925
+ response.raise_for_status()
926
+ return response.json()
927
+
928
+ def organizations_options_attributes_controller_unassign_organization_attribute_option_from_user(self, orgId, userId, attributeOptionId) -> dict[str, Any]:
929
+ """
930
+ Unassigns a specific organization attribute option from a user within the given organization.
931
+
932
+ Args:
933
+ orgId: str. The unique identifier of the organization.
934
+ userId: str. The unique identifier of the user from whom the attribute option will be unassigned.
935
+ attributeOptionId: str. The unique identifier of the attribute option to be removed from the user.
936
+
937
+ Returns:
938
+ dict[str, Any]: A dictionary containing the server's response data following the unassignment action.
939
+
940
+ Raises:
941
+ ValueError: Raised if any of the required parameters ('orgId', 'userId', or 'attributeOptionId') are missing or None.
942
+ requests.HTTPError: Raised if the server returns an unsuccessful HTTP response status.
943
+
944
+ Tags:
945
+ unassign, organization-management, attribute-option, user-management, delete
946
+ """
947
+ if orgId is None:
948
+ raise ValueError("Missing required parameter 'orgId'")
949
+ if userId is None:
950
+ raise ValueError("Missing required parameter 'userId'")
951
+ if attributeOptionId is None:
952
+ raise ValueError("Missing required parameter 'attributeOptionId'")
953
+ url = f"{self.base_url}/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}"
954
+ query_params = {}
955
+ response = self._delete(url, params=query_params)
956
+ response.raise_for_status()
957
+ return response.json()
958
+
959
+ def organizations_event_types_controller_create_team_event_type(self, orgId, teamId, lengthInMinutes, lengthInMinutesOptions, title, slug, schedulingType, hosts, description=None, locations=None, bookingFields=None, disableGuests=None, slotInterval=None, minimumBookingNotice=None, beforeEventBuffer=None, afterEventBuffer=None, scheduleId=None, bookingLimitsCount=None, onlyShowFirstAvailableSlot=None, bookingLimitsDuration=None, bookingWindow=None, offsetStart=None, bookerLayouts=None, confirmationPolicy=None, recurrence=None, requiresBookerEmailVerification=None, hideCalendarNotes=None, lockTimeZoneToggleOnBookingPage=None, color=None, seats=None, customName=None, destinationCalendar=None, useDestinationCalendarEmail=None, hideCalendarEventDetails=None, successRedirectUrl=None, assignAllTeamMembers=None) -> dict[str, Any]:
960
+ """
961
+ Creates a new event type for a specified team within an organization.
962
+
963
+ Args:
964
+ orgId: str. The unique identifier of the organization.
965
+ teamId: str. The unique identifier of the team.
966
+ lengthInMinutes: int. Duration of the event type in minutes.
967
+ lengthInMinutesOptions: list. Available duration options for the event type in minutes.
968
+ title: str. Title of the event type.
969
+ slug: str. URL-friendly string identifier for the event type.
970
+ schedulingType: str. Type of scheduling used for the event (e.g., collective, round-robin).
971
+ hosts: list. List of user IDs or host information for the event.
972
+ description: Optional[str]. Description of the event type.
973
+ locations: Optional[list]. Possible locations where the event can take place.
974
+ bookingFields: Optional[list]. Additional fields the booker must fill out.
975
+ disableGuests: Optional[bool]. If True, guests are not allowed.
976
+ slotInterval: Optional[int]. Interval in minutes between available booking slots.
977
+ minimumBookingNotice: Optional[int]. Minimum notice in minutes required before booking.
978
+ beforeEventBuffer: Optional[int]. Buffer time in minutes before the event starts.
979
+ afterEventBuffer: Optional[int]. Buffer time in minutes after the event ends.
980
+ scheduleId: Optional[str]. Identifier for a specific schedule to associate with the event.
981
+ bookingLimitsCount: Optional[int]. Maximum number of bookings allowed within the limit window.
982
+ onlyShowFirstAvailableSlot: Optional[bool]. If True, only the first available slot is shown.
983
+ bookingLimitsDuration: Optional[int]. Duration in minutes for which booking limits apply.
984
+ bookingWindow: Optional[int]. Number of days ahead for which bookings can be made.
985
+ offsetStart: Optional[int]. Offset in minutes from the start of the working day for the first slot.
986
+ bookerLayouts: Optional[list]. Custom layouts shown to the booker.
987
+ confirmationPolicy: Optional[dict]. Rules or settings for confirming bookings.
988
+ recurrence: Optional[dict]. Recurrence rules for the event type.
989
+ requiresBookerEmailVerification: Optional[bool]. If True, booker's email must be verified.
990
+ hideCalendarNotes: Optional[bool]. If True, calendar notes are hidden from the booker.
991
+ lockTimeZoneToggleOnBookingPage: Optional[bool]. If True, disables time zone switching for bookers.
992
+ color: Optional[str]. Color code or identifier for the event type.
993
+ seats: Optional[int]. Number of available seats per event.
994
+ customName: Optional[str]. Custom display name for the event type.
995
+ destinationCalendar: Optional[str]. Calendar to which booked events are added.
996
+ useDestinationCalendarEmail: Optional[bool]. If True, uses destination calendar email for event notifications.
997
+ hideCalendarEventDetails: Optional[bool]. If True, hides event details in the calendar entry.
998
+ successRedirectUrl: Optional[str]. URL to redirect users after successful booking.
999
+ assignAllTeamMembers: Optional[bool]. If True, assigns all team members as hosts for the event.
1000
+
1001
+ Returns:
1002
+ dict[str, Any]: Details of the newly created team event type as returned by the API.
1003
+
1004
+ Raises:
1005
+ ValueError: If any required parameter (orgId, teamId, lengthInMinutes, lengthInMinutesOptions, title, slug, schedulingType, hosts) is missing or None.
1006
+ HTTPError: If the API request fails or returns a non-success status code.
1007
+
1008
+ Tags:
1009
+ create, event-type, team, organization, management, api
1010
+ """
1011
+ if orgId is None:
1012
+ raise ValueError("Missing required parameter 'orgId'")
1013
+ if teamId is None:
1014
+ raise ValueError("Missing required parameter 'teamId'")
1015
+ if lengthInMinutes is None:
1016
+ raise ValueError("Missing required parameter 'lengthInMinutes'")
1017
+ if lengthInMinutesOptions is None:
1018
+ raise ValueError("Missing required parameter 'lengthInMinutesOptions'")
1019
+ if title is None:
1020
+ raise ValueError("Missing required parameter 'title'")
1021
+ if slug is None:
1022
+ raise ValueError("Missing required parameter 'slug'")
1023
+ if schedulingType is None:
1024
+ raise ValueError("Missing required parameter 'schedulingType'")
1025
+ if hosts is None:
1026
+ raise ValueError("Missing required parameter 'hosts'")
1027
+ request_body = {
1028
+ 'lengthInMinutes': lengthInMinutes,
1029
+ 'lengthInMinutesOptions': lengthInMinutesOptions,
1030
+ 'title': title,
1031
+ 'slug': slug,
1032
+ 'description': description,
1033
+ 'locations': locations,
1034
+ 'bookingFields': bookingFields,
1035
+ 'disableGuests': disableGuests,
1036
+ 'slotInterval': slotInterval,
1037
+ 'minimumBookingNotice': minimumBookingNotice,
1038
+ 'beforeEventBuffer': beforeEventBuffer,
1039
+ 'afterEventBuffer': afterEventBuffer,
1040
+ 'scheduleId': scheduleId,
1041
+ 'bookingLimitsCount': bookingLimitsCount,
1042
+ 'onlyShowFirstAvailableSlot': onlyShowFirstAvailableSlot,
1043
+ 'bookingLimitsDuration': bookingLimitsDuration,
1044
+ 'bookingWindow': bookingWindow,
1045
+ 'offsetStart': offsetStart,
1046
+ 'bookerLayouts': bookerLayouts,
1047
+ 'confirmationPolicy': confirmationPolicy,
1048
+ 'recurrence': recurrence,
1049
+ 'requiresBookerEmailVerification': requiresBookerEmailVerification,
1050
+ 'hideCalendarNotes': hideCalendarNotes,
1051
+ 'lockTimeZoneToggleOnBookingPage': lockTimeZoneToggleOnBookingPage,
1052
+ 'color': color,
1053
+ 'seats': seats,
1054
+ 'customName': customName,
1055
+ 'destinationCalendar': destinationCalendar,
1056
+ 'useDestinationCalendarEmail': useDestinationCalendarEmail,
1057
+ 'hideCalendarEventDetails': hideCalendarEventDetails,
1058
+ 'successRedirectUrl': successRedirectUrl,
1059
+ 'schedulingType': schedulingType,
1060
+ 'hosts': hosts,
1061
+ 'assignAllTeamMembers': assignAllTeamMembers,
1062
+ }
1063
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1064
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/event-types"
1065
+ query_params = {}
1066
+ response = self._post(url, data=request_body, params=query_params)
1067
+ response.raise_for_status()
1068
+ return response.json()
1069
+
1070
+ def organizations_event_types_controller_get_team_event_types(self, orgId, teamId, eventSlug=None) -> dict[str, Any]:
1071
+ """
1072
+ Retrieves the event types available for a specific team within an organization.
1073
+
1074
+ Args:
1075
+ orgId: str. The unique identifier of the organization. Required.
1076
+ teamId: str. The unique identifier of the team within the organization. Required.
1077
+ eventSlug: str or None. Optional slug to filter event types by a specific event. Defaults to None.
1078
+
1079
+ Returns:
1080
+ dict[str, Any]: A dictionary containing the team event types as returned by the API.
1081
+
1082
+ Raises:
1083
+ ValueError: If 'orgId' or 'teamId' is not provided.
1084
+ requests.HTTPError: If the API request to retrieve event types fails with an HTTP error response.
1085
+
1086
+ Tags:
1087
+ get, event-types, team, organization, api
1088
+ """
1089
+ if orgId is None:
1090
+ raise ValueError("Missing required parameter 'orgId'")
1091
+ if teamId is None:
1092
+ raise ValueError("Missing required parameter 'teamId'")
1093
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/event-types"
1094
+ query_params = {k: v for k, v in [('eventSlug', eventSlug)] if v is not None}
1095
+ response = self._get(url, params=query_params)
1096
+ response.raise_for_status()
1097
+ return response.json()
1098
+
1099
+ def organizations_event_types_controller_get_team_event_type(self, orgId, teamId, eventTypeId) -> dict[str, Any]:
1100
+ """
1101
+ Retrieves detailed information about a specific event type within a team for a given organization.
1102
+
1103
+ Args:
1104
+ orgId: The unique identifier of the organization.
1105
+ teamId: The unique identifier of the team within the organization.
1106
+ eventTypeId: The unique identifier of the event type to retrieve.
1107
+
1108
+ Returns:
1109
+ A dictionary containing the event type details as returned by the API.
1110
+
1111
+ Raises:
1112
+ ValueError: If any of 'orgId', 'teamId', or 'eventTypeId' is None.
1113
+ requests.HTTPError: If the HTTP request to the backend API fails with a non-success response.
1114
+
1115
+ Tags:
1116
+ get, event-type, team, organization, api
1117
+ """
1118
+ if orgId is None:
1119
+ raise ValueError("Missing required parameter 'orgId'")
1120
+ if teamId is None:
1121
+ raise ValueError("Missing required parameter 'teamId'")
1122
+ if eventTypeId is None:
1123
+ raise ValueError("Missing required parameter 'eventTypeId'")
1124
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}"
1125
+ query_params = {}
1126
+ response = self._get(url, params=query_params)
1127
+ response.raise_for_status()
1128
+ return response.json()
1129
+
1130
+ def organizations_event_types_controller_create_phone_call(self, orgId, teamId, eventTypeId, yourPhoneNumber, numberToCall, calApiKey, enabled, templateType, schedulerName=None, guestName=None, guestEmail=None, guestCompany=None, beginMessage=None, generalPrompt=None) -> dict[str, Any]:
1131
+ """
1132
+ Creates a phone call event type for a specific organization, team, and event type using provided phone and template details.
1133
+
1134
+ Args:
1135
+ orgId: The unique identifier of the organization.
1136
+ teamId: The unique identifier of the team within the organization.
1137
+ eventTypeId: The unique identifier of the event type to attach the phone call event to.
1138
+ yourPhoneNumber: The phone number initiating the call.
1139
+ numberToCall: The recipient's phone number.
1140
+ calApiKey: API key used to authorize the calendar integration for the call event.
1141
+ enabled: Boolean indicating whether the phone call event is enabled.
1142
+ templateType: The type of template to use for the phone call event.
1143
+ schedulerName: Optional; the name of the scheduler initiating the call.
1144
+ guestName: Optional; the name of the guest being called.
1145
+ guestEmail: Optional; the email address of the guest being called.
1146
+ guestCompany: Optional; the company name of the guest being called.
1147
+ beginMessage: Optional; message to be played or sent at the start of the call.
1148
+ generalPrompt: Optional; a general prompt message for the call.
1149
+
1150
+ Returns:
1151
+ A dictionary containing the details and status of the created phone call event type as returned by the backend API.
1152
+
1153
+ Raises:
1154
+ ValueError: Raised if any of the required parameters (orgId, teamId, eventTypeId, yourPhoneNumber, numberToCall, calApiKey, enabled, or templateType) are missing or None.
1155
+ requests.HTTPError: Raised if the API request fails or returns an unsuccessful status code.
1156
+
1157
+ Tags:
1158
+ create, event-type, phone-call, management, api
1159
+ """
1160
+ if orgId is None:
1161
+ raise ValueError("Missing required parameter 'orgId'")
1162
+ if teamId is None:
1163
+ raise ValueError("Missing required parameter 'teamId'")
1164
+ if eventTypeId is None:
1165
+ raise ValueError("Missing required parameter 'eventTypeId'")
1166
+ if yourPhoneNumber is None:
1167
+ raise ValueError("Missing required parameter 'yourPhoneNumber'")
1168
+ if numberToCall is None:
1169
+ raise ValueError("Missing required parameter 'numberToCall'")
1170
+ if calApiKey is None:
1171
+ raise ValueError("Missing required parameter 'calApiKey'")
1172
+ if enabled is None:
1173
+ raise ValueError("Missing required parameter 'enabled'")
1174
+ if templateType is None:
1175
+ raise ValueError("Missing required parameter 'templateType'")
1176
+ request_body = {
1177
+ 'yourPhoneNumber': yourPhoneNumber,
1178
+ 'numberToCall': numberToCall,
1179
+ 'calApiKey': calApiKey,
1180
+ 'enabled': enabled,
1181
+ 'templateType': templateType,
1182
+ 'schedulerName': schedulerName,
1183
+ 'guestName': guestName,
1184
+ 'guestEmail': guestEmail,
1185
+ 'guestCompany': guestCompany,
1186
+ 'beginMessage': beginMessage,
1187
+ 'generalPrompt': generalPrompt,
1188
+ }
1189
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1190
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call"
1191
+ query_params = {}
1192
+ response = self._post(url, data=request_body, params=query_params)
1193
+ response.raise_for_status()
1194
+ return response.json()
1195
+
1196
+ def organizations_event_types_controller_get_teams_event_types(self, orgId, take=None, skip=None) -> dict[str, Any]:
1197
+ """
1198
+ Retrieves a list of event types associated with all teams in a specified organization.
1199
+
1200
+ Args:
1201
+ orgId: str. The unique identifier of the organization whose teams' event types are to be fetched.
1202
+ take: Optional[int]. The maximum number of event types to return. Used for pagination. Defaults to None.
1203
+ skip: Optional[int]. The number of event types to skip before starting to collect the result set. Used for pagination. Defaults to None.
1204
+
1205
+ Returns:
1206
+ dict[str, Any]: The JSON-parsed response containing event type information for all teams within the specified organization.
1207
+
1208
+ Raises:
1209
+ ValueError: If 'orgId' is not provided.
1210
+ requests.HTTPError: If the HTTP request to the API endpoint fails.
1211
+
1212
+ Tags:
1213
+ get, event-types, teams, organization, api
1214
+ """
1215
+ if orgId is None:
1216
+ raise ValueError("Missing required parameter 'orgId'")
1217
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/event-types"
1218
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
1219
+ response = self._get(url, params=query_params)
1220
+ response.raise_for_status()
1221
+ return response.json()
1222
+
1223
+ def organizations_memberships_controller_get_all_memberships(self, orgId, take=None, skip=None) -> dict[str, Any]:
1224
+ """
1225
+ Retrieves all membership records for a specified organization, with optional pagination.
1226
+
1227
+ Args:
1228
+ orgId: str. The unique identifier of the organization for which to retrieve memberships.
1229
+ take: Optional[int]. The maximum number of membership records to return. Used for pagination.
1230
+ skip: Optional[int]. The number of membership records to skip before starting to collect the result set. Used for pagination.
1231
+
1232
+ Returns:
1233
+ dict[str, Any]: A dictionary containing the membership records and related metadata returned by the API.
1234
+
1235
+ Raises:
1236
+ ValueError: Raised if 'orgId' is not provided.
1237
+ requests.HTTPError: Raised if the HTTP request to the memberships API endpoint fails.
1238
+
1239
+ Tags:
1240
+ list, memberships, organization, api, management
1241
+ """
1242
+ if orgId is None:
1243
+ raise ValueError("Missing required parameter 'orgId'")
1244
+ url = f"{self.base_url}/v2/organizations/{orgId}/memberships"
1245
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
1246
+ response = self._get(url, params=query_params)
1247
+ response.raise_for_status()
1248
+ return response.json()
1249
+
1250
+ def organizations_memberships_controller_create_membership(self, orgId, userId, role, accepted=None, disableImpersonation=None) -> dict[str, Any]:
1251
+ """
1252
+ Creates a new organization membership by sending a POST request with the specified user ID, role, and optional parameters.
1253
+
1254
+ Args:
1255
+ orgId: str. The unique identifier of the organization in which to create the membership. Required.
1256
+ userId: str. The unique identifier of the user to be added as a member. Required.
1257
+ role: str. The role to assign to the user within the organization. Required.
1258
+ accepted: bool or None. Indicates whether the membership is pre-accepted. Optional.
1259
+ disableImpersonation: bool or None. If True, prevents impersonation for this membership. Optional.
1260
+
1261
+ Returns:
1262
+ dict[str, Any]: The JSON response containing details of the newly created membership.
1263
+
1264
+ Raises:
1265
+ ValueError: Raised if 'orgId', 'userId', or 'role' is not provided.
1266
+ requests.HTTPError: Raised if the HTTP request to create the membership fails.
1267
+
1268
+ Tags:
1269
+ create, membership, organization, post, api
1270
+ """
1271
+ if orgId is None:
1272
+ raise ValueError("Missing required parameter 'orgId'")
1273
+ if userId is None:
1274
+ raise ValueError("Missing required parameter 'userId'")
1275
+ if role is None:
1276
+ raise ValueError("Missing required parameter 'role'")
1277
+ request_body = {
1278
+ 'userId': userId,
1279
+ 'accepted': accepted,
1280
+ 'role': role,
1281
+ 'disableImpersonation': disableImpersonation,
1282
+ }
1283
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1284
+ url = f"{self.base_url}/v2/organizations/{orgId}/memberships"
1285
+ query_params = {}
1286
+ response = self._post(url, data=request_body, params=query_params)
1287
+ response.raise_for_status()
1288
+ return response.json()
1289
+
1290
+ def organizations_memberships_controller_get_org_membership(self, orgId, membershipId) -> dict[str, Any]:
1291
+ """
1292
+ Retrieves the details of a specific organization membership by organization and membership IDs.
1293
+
1294
+ Args:
1295
+ orgId: str. The unique identifier of the organization.
1296
+ membershipId: str. The unique identifier of the membership within the organization.
1297
+
1298
+ Returns:
1299
+ dict[str, Any]: A dictionary containing the membership details as returned by the API.
1300
+
1301
+ Raises:
1302
+ ValueError: Raised if either 'orgId' or 'membershipId' is None.
1303
+ requests.HTTPError: Raised if the HTTP request to the API fails or returns a non-success status code.
1304
+
1305
+ Tags:
1306
+ get, membership, organizations, api
1307
+ """
1308
+ if orgId is None:
1309
+ raise ValueError("Missing required parameter 'orgId'")
1310
+ if membershipId is None:
1311
+ raise ValueError("Missing required parameter 'membershipId'")
1312
+ url = f"{self.base_url}/v2/organizations/{orgId}/memberships/{membershipId}"
1313
+ query_params = {}
1314
+ response = self._get(url, params=query_params)
1315
+ response.raise_for_status()
1316
+ return response.json()
1317
+
1318
+ def organizations_memberships_controller_delete_membership(self, orgId, membershipId) -> dict[str, Any]:
1319
+ """
1320
+ Deletes a membership from an organization using the specified organization and membership IDs.
1321
+
1322
+ Args:
1323
+ orgId: str. The unique identifier of the organization.
1324
+ membershipId: str. The unique identifier of the membership to be deleted.
1325
+
1326
+ Returns:
1327
+ dict[str, Any]: The JSON response from the API after deleting the membership.
1328
+
1329
+ Raises:
1330
+ ValueError: Raised if 'orgId' or 'membershipId' is None.
1331
+ requests.HTTPError: Raised if the HTTP request for deleting the membership fails.
1332
+
1333
+ Tags:
1334
+ delete, membership, organizations, api
1335
+ """
1336
+ if orgId is None:
1337
+ raise ValueError("Missing required parameter 'orgId'")
1338
+ if membershipId is None:
1339
+ raise ValueError("Missing required parameter 'membershipId'")
1340
+ url = f"{self.base_url}/v2/organizations/{orgId}/memberships/{membershipId}"
1341
+ query_params = {}
1342
+ response = self._delete(url, params=query_params)
1343
+ response.raise_for_status()
1344
+ return response.json()
1345
+
1346
+ def organizations_memberships_controller_update_membership(self, orgId, membershipId, accepted=None, role=None, disableImpersonation=None) -> dict[str, Any]:
1347
+ """
1348
+ Updates an organization's membership with specified fields such as acceptance status, role, or impersonation settings.
1349
+
1350
+ Args:
1351
+ orgId: str. Unique identifier of the organization whose membership is being updated. Required.
1352
+ membershipId: str. Unique identifier of the membership to update. Required.
1353
+ accepted: Optional[bool]. Indicates whether the membership invitation is accepted or not.
1354
+ role: Optional[str]. The new role to assign to the membership.
1355
+ disableImpersonation: Optional[bool]. If True, disables impersonation for this membership.
1356
+
1357
+ Returns:
1358
+ dict[str, Any]: The JSON response from the API containing the updated membership details.
1359
+
1360
+ Raises:
1361
+ ValueError: Raised if 'orgId' or 'membershipId' is not provided.
1362
+ requests.exceptions.HTTPError: Raised if the API response contains an HTTP error status.
1363
+
1364
+ Tags:
1365
+ update, membership, organization, api
1366
+ """
1367
+ if orgId is None:
1368
+ raise ValueError("Missing required parameter 'orgId'")
1369
+ if membershipId is None:
1370
+ raise ValueError("Missing required parameter 'membershipId'")
1371
+ request_body = {
1372
+ 'accepted': accepted,
1373
+ 'role': role,
1374
+ 'disableImpersonation': disableImpersonation,
1375
+ }
1376
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1377
+ url = f"{self.base_url}/v2/organizations/{orgId}/memberships/{membershipId}"
1378
+ query_params = {}
1379
+ response = self._patch(url, data=request_body, params=query_params)
1380
+ response.raise_for_status()
1381
+ return response.json()
1382
+
1383
+ def organizations_schedules_controller_get_organization_schedules(self, orgId, take=None, skip=None) -> dict[str, Any]:
1384
+ """
1385
+ Retrieves a paginated list of schedules for the specified organization.
1386
+
1387
+ Args:
1388
+ orgId: str. The unique identifier of the organization whose schedules are to be retrieved.
1389
+ take: Optional[int]. The maximum number of schedule items to return. If None, a default server limit is used.
1390
+ skip: Optional[int]. The number of schedule items to skip before starting to collect the result set. Useful for pagination.
1391
+
1392
+ Returns:
1393
+ dict[str, Any]: A dictionary containing the organization's schedules and related pagination metadata.
1394
+
1395
+ Raises:
1396
+ ValueError: Raised if 'orgId' is None.
1397
+ requests.HTTPError: Raised if the HTTP request fails or the server responds with an error status.
1398
+
1399
+ Tags:
1400
+ get, list, schedules, organization, pagination, management
1401
+ """
1402
+ if orgId is None:
1403
+ raise ValueError("Missing required parameter 'orgId'")
1404
+ url = f"{self.base_url}/v2/organizations/{orgId}/schedules"
1405
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
1406
+ response = self._get(url, params=query_params)
1407
+ response.raise_for_status()
1408
+ return response.json()
1409
+
1410
+ def organizations_schedules_controller_create_user_schedule(self, orgId, userId, name, timeZone, isDefault, availability=None, overrides=None) -> dict[str, Any]:
1411
+ """
1412
+ Creates a new user schedule for a specified user within an organization.
1413
+
1414
+ Args:
1415
+ orgId: str. The ID of the organization to which the user belongs.
1416
+ userId: str. The ID of the user for whom the schedule is being created.
1417
+ name: str. The name of the schedule.
1418
+ timeZone: str. The time zone for the schedule (e.g., 'America/New_York').
1419
+ isDefault: bool. Indicates whether this schedule is the user's default schedule.
1420
+ availability: Optional[list[dict]]. A list describing the user's general availability blocks. Defaults to None.
1421
+ overrides: Optional[list[dict]]. A list of schedule override entries for exceptions or special rules. Defaults to None.
1422
+
1423
+ Returns:
1424
+ dict[str, Any]: The newly created schedule as a dictionary parsed from the API response.
1425
+
1426
+ Raises:
1427
+ ValueError: If any required parameter ('orgId', 'userId', 'name', 'timeZone', or 'isDefault') is missing or None.
1428
+ requests.HTTPError: If the HTTP request to the API fails or returns an unsuccessful status code.
1429
+
1430
+ Tags:
1431
+ create, schedule-management, user, organization, api
1432
+ """
1433
+ if orgId is None:
1434
+ raise ValueError("Missing required parameter 'orgId'")
1435
+ if userId is None:
1436
+ raise ValueError("Missing required parameter 'userId'")
1437
+ if name is None:
1438
+ raise ValueError("Missing required parameter 'name'")
1439
+ if timeZone is None:
1440
+ raise ValueError("Missing required parameter 'timeZone'")
1441
+ if isDefault is None:
1442
+ raise ValueError("Missing required parameter 'isDefault'")
1443
+ request_body = {
1444
+ 'name': name,
1445
+ 'timeZone': timeZone,
1446
+ 'availability': availability,
1447
+ 'isDefault': isDefault,
1448
+ 'overrides': overrides,
1449
+ }
1450
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1451
+ url = f"{self.base_url}/v2/organizations/{orgId}/users/{userId}/schedules"
1452
+ query_params = {}
1453
+ response = self._post(url, data=request_body, params=query_params)
1454
+ response.raise_for_status()
1455
+ return response.json()
1456
+
1457
+ def organizations_schedules_controller_get_user_schedules(self, orgId, userId) -> dict[str, Any]:
1458
+ """
1459
+ Retrieves the schedule data for a specific user within an organization.
1460
+
1461
+ Args:
1462
+ orgId: The unique identifier of the organization.
1463
+ userId: The unique identifier of the user whose schedules are to be fetched.
1464
+
1465
+ Returns:
1466
+ A dictionary containing the user's schedules from the organization's scheduling API.
1467
+
1468
+ Raises:
1469
+ ValueError: Raised if either 'orgId' or 'userId' is None.
1470
+ requests.HTTPError: Raised if the HTTP request to the schedules API returns an unsuccessful status code.
1471
+
1472
+ Tags:
1473
+ get, schedules, user, organization, api
1474
+ """
1475
+ if orgId is None:
1476
+ raise ValueError("Missing required parameter 'orgId'")
1477
+ if userId is None:
1478
+ raise ValueError("Missing required parameter 'userId'")
1479
+ url = f"{self.base_url}/v2/organizations/{orgId}/users/{userId}/schedules"
1480
+ query_params = {}
1481
+ response = self._get(url, params=query_params)
1482
+ response.raise_for_status()
1483
+ return response.json()
1484
+
1485
+ def organizations_schedules_controller_get_user_schedule(self, orgId, userId, scheduleId) -> dict[str, Any]:
1486
+ """
1487
+ Retrieves a specific user's schedule from an organization by schedule ID.
1488
+
1489
+ Args:
1490
+ orgId: str. The unique identifier of the organization.
1491
+ userId: str. The unique identifier of the user within the organization.
1492
+ scheduleId: str. The unique identifier of the schedule to retrieve.
1493
+
1494
+ Returns:
1495
+ dict[str, Any]: The JSON response containing details of the user's schedule.
1496
+
1497
+ Raises:
1498
+ ValueError: If any of the required parameters ('orgId', 'userId', or 'scheduleId') is None.
1499
+ requests.HTTPError: If the HTTP request to the schedule service fails (non-2xx response).
1500
+
1501
+ Tags:
1502
+ get, schedules, user-management, organization
1503
+ """
1504
+ if orgId is None:
1505
+ raise ValueError("Missing required parameter 'orgId'")
1506
+ if userId is None:
1507
+ raise ValueError("Missing required parameter 'userId'")
1508
+ if scheduleId is None:
1509
+ raise ValueError("Missing required parameter 'scheduleId'")
1510
+ url = f"{self.base_url}/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}"
1511
+ query_params = {}
1512
+ response = self._get(url, params=query_params)
1513
+ response.raise_for_status()
1514
+ return response.json()
1515
+
1516
+ def organizations_schedules_controller_update_user_schedule(self, orgId, userId, scheduleId, name=None, timeZone=None, availability=None, isDefault=None, overrides=None) -> dict[str, Any]:
1517
+ """
1518
+ Updates a user's schedule within an organization with the provided details.
1519
+
1520
+ Args:
1521
+ orgId: The unique identifier of the organization.
1522
+ userId: The unique identifier of the user whose schedule is being updated.
1523
+ scheduleId: The unique identifier of the schedule to update.
1524
+ name: Optional. The name to assign to the schedule.
1525
+ timeZone: Optional. The time zone associated with the schedule.
1526
+ availability: Optional. The user's availability information for the schedule.
1527
+ isDefault: Optional. Whether this schedule should be set as the default for the user.
1528
+ overrides: Optional. Any specific overrides to apply to the schedule.
1529
+
1530
+ Returns:
1531
+ A dictionary representing the updated schedule data as returned by the API.
1532
+
1533
+ Raises:
1534
+ ValueError: If any of 'orgId', 'userId', or 'scheduleId' is None.
1535
+ requests.HTTPError: If the HTTP PATCH request fails or returns an error response.
1536
+
1537
+ Tags:
1538
+ update, schedule-management, user, organization, async_job
1539
+ """
1540
+ if orgId is None:
1541
+ raise ValueError("Missing required parameter 'orgId'")
1542
+ if userId is None:
1543
+ raise ValueError("Missing required parameter 'userId'")
1544
+ if scheduleId is None:
1545
+ raise ValueError("Missing required parameter 'scheduleId'")
1546
+ request_body = {
1547
+ 'name': name,
1548
+ 'timeZone': timeZone,
1549
+ 'availability': availability,
1550
+ 'isDefault': isDefault,
1551
+ 'overrides': overrides,
1552
+ }
1553
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1554
+ url = f"{self.base_url}/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}"
1555
+ query_params = {}
1556
+ response = self._patch(url, data=request_body, params=query_params)
1557
+ response.raise_for_status()
1558
+ return response.json()
1559
+
1560
+ def organizations_schedules_controller_delete_user_schedule(self, orgId, userId, scheduleId) -> dict[str, Any]:
1561
+ """
1562
+ Deletes a specific user schedule from an organization by schedule ID.
1563
+
1564
+ Args:
1565
+ orgId: str. Unique identifier of the organization.
1566
+ userId: str. Unique identifier of the user whose schedule is to be deleted.
1567
+ scheduleId: str. Unique identifier of the schedule to delete.
1568
+
1569
+ Returns:
1570
+ dict[str, Any]: The server's JSON response confirming deletion or providing additional details.
1571
+
1572
+ Raises:
1573
+ ValueError: Raised if 'orgId', 'userId', or 'scheduleId' is None.
1574
+ requests.HTTPError: Raised if the HTTP request to delete the schedule fails with a client or server error.
1575
+
1576
+ Tags:
1577
+ delete, schedule-management, user-management, organization
1578
+ """
1579
+ if orgId is None:
1580
+ raise ValueError("Missing required parameter 'orgId'")
1581
+ if userId is None:
1582
+ raise ValueError("Missing required parameter 'userId'")
1583
+ if scheduleId is None:
1584
+ raise ValueError("Missing required parameter 'scheduleId'")
1585
+ url = f"{self.base_url}/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}"
1586
+ query_params = {}
1587
+ response = self._delete(url, params=query_params)
1588
+ response.raise_for_status()
1589
+ return response.json()
1590
+
1591
+ def organizations_teams_controller_get_all_teams(self, orgId, take=None, skip=None) -> dict[str, Any]:
1592
+ """
1593
+ Retrieves a list of teams for a specified organization, with optional pagination.
1594
+
1595
+ Args:
1596
+ orgId: str. The unique identifier of the organization for which to fetch teams.
1597
+ take: Optional[int]. The maximum number of teams to return. If None, the server default is used.
1598
+ skip: Optional[int]. The number of teams to skip before starting to collect the result set. If None, no teams are skipped.
1599
+
1600
+ Returns:
1601
+ dict[str, Any]: A dictionary containing the list of teams and related metadata as returned by the API.
1602
+
1603
+ Raises:
1604
+ ValueError: If 'orgId' is None.
1605
+ HTTPError: If the API request results in an HTTP error status code.
1606
+
1607
+ Tags:
1608
+ list, teams, organization, async_job, management
1609
+ """
1610
+ if orgId is None:
1611
+ raise ValueError("Missing required parameter 'orgId'")
1612
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams"
1613
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
1614
+ response = self._get(url, params=query_params)
1615
+ response.raise_for_status()
1616
+ return response.json()
1617
+
1618
+ def organizations_teams_controller_create_team(self, orgId, name, slug=None, logoUrl=None, calVideoLogo=None, appLogo=None, appIconLogo=None, bio=None, hideBranding=None, isPrivate=None, hideBookATeamMember=None, metadata=None, theme=None, brandColor=None, darkBrandColor=None, bannerUrl=None, timeFormat=None, timeZone=None, weekStart=None, autoAcceptCreator=None) -> dict[str, Any]:
1619
+ """
1620
+ Creates a new team within the specified organization with customizable details and branding options.
1621
+
1622
+ Args:
1623
+ orgId: str. Unique identifier of the organization in which to create the team. Required.
1624
+ name: str. Name of the team to create. Required.
1625
+ slug: str, optional. Custom slug or URL segment for the team.
1626
+ logoUrl: str, optional. URL to the team's logo image.
1627
+ calVideoLogo: str, optional. URL to the team's calendar video logo.
1628
+ appLogo: str, optional. URL to the team's application logo.
1629
+ appIconLogo: str, optional. URL to the team's application icon logo.
1630
+ bio: str, optional. Short biography or description for the team.
1631
+ hideBranding: bool, optional. If True, hides team branding in external views.
1632
+ isPrivate: bool, optional. If True, sets the team as private.
1633
+ hideBookATeamMember: bool, optional. Determines whether 'Book a Team Member' feature is hidden.
1634
+ metadata: dict, optional. Additional structured metadata for the team.
1635
+ theme: str, optional. Name of the visual theme to apply to the team.
1636
+ brandColor: str, optional. Primary brand color in hex format.
1637
+ darkBrandColor: str, optional. Dark mode brand color in hex format.
1638
+ bannerUrl: str, optional. URL to the team's banner image.
1639
+ timeFormat: str, optional. Preferred time display format for the team.
1640
+ timeZone: str, optional. Time zone identifier for the team.
1641
+ weekStart: str, optional. Specifies which day the team's calendar week should start on.
1642
+ autoAcceptCreator: bool, optional. If True, automatically accepts the team creator.
1643
+
1644
+ Returns:
1645
+ dict. JSON response containing details of the newly created team.
1646
+
1647
+ Raises:
1648
+ ValueError: Raised when a required parameter ('orgId' or 'name') is missing.
1649
+ requests.HTTPError: Raised if the HTTP request to create the team fails (e.g., due to invalid input or server error).
1650
+
1651
+ Tags:
1652
+ create, teams, organization, management, api
1653
+ """
1654
+ if orgId is None:
1655
+ raise ValueError("Missing required parameter 'orgId'")
1656
+ if name is None:
1657
+ raise ValueError("Missing required parameter 'name'")
1658
+ request_body = {
1659
+ 'name': name,
1660
+ 'slug': slug,
1661
+ 'logoUrl': logoUrl,
1662
+ 'calVideoLogo': calVideoLogo,
1663
+ 'appLogo': appLogo,
1664
+ 'appIconLogo': appIconLogo,
1665
+ 'bio': bio,
1666
+ 'hideBranding': hideBranding,
1667
+ 'isPrivate': isPrivate,
1668
+ 'hideBookATeamMember': hideBookATeamMember,
1669
+ 'metadata': metadata,
1670
+ 'theme': theme,
1671
+ 'brandColor': brandColor,
1672
+ 'darkBrandColor': darkBrandColor,
1673
+ 'bannerUrl': bannerUrl,
1674
+ 'timeFormat': timeFormat,
1675
+ 'timeZone': timeZone,
1676
+ 'weekStart': weekStart,
1677
+ 'autoAcceptCreator': autoAcceptCreator,
1678
+ }
1679
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1680
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams"
1681
+ query_params = {}
1682
+ response = self._post(url, data=request_body, params=query_params)
1683
+ response.raise_for_status()
1684
+ return response.json()
1685
+
1686
+ def organizations_teams_controller_get_my_teams(self, orgId, take=None, skip=None) -> dict[str, Any]:
1687
+ """
1688
+ Retrieves the list of teams for the current user within a specified organization.
1689
+
1690
+ Args:
1691
+ orgId: str. The unique identifier of the organization. Must not be None.
1692
+ take: Optional[int]. The maximum number of teams to return. Used for pagination.
1693
+ skip: Optional[int]. The number of teams to skip before starting to collect the result set. Used for pagination.
1694
+
1695
+ Returns:
1696
+ dict[str, Any]: A dictionary containing the user's teams in the specified organization as returned by the API.
1697
+
1698
+ Raises:
1699
+ ValueError: If 'orgId' is None.
1700
+ requests.HTTPError: If the HTTP request fails or returns a non-success status code.
1701
+
1702
+ Tags:
1703
+ list, teams, organization, management, api
1704
+ """
1705
+ if orgId is None:
1706
+ raise ValueError("Missing required parameter 'orgId'")
1707
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/me"
1708
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
1709
+ response = self._get(url, params=query_params)
1710
+ response.raise_for_status()
1711
+ return response.json()
1712
+
1713
+ def organizations_teams_controller_get_team(self, orgId, teamId) -> dict[str, Any]:
1714
+ """
1715
+ Retrieves detailed information about a specific team within an organization by team and organization ID.
1716
+
1717
+ Args:
1718
+ orgId: The unique identifier of the organization containing the team. Must not be None.
1719
+ teamId: The unique identifier of the team to retrieve. Must not be None.
1720
+
1721
+ Returns:
1722
+ A dictionary containing the team's details as returned from the API endpoint.
1723
+
1724
+ Raises:
1725
+ ValueError: Raised if either 'orgId' or 'teamId' is None.
1726
+ requests.HTTPError: Raised if the HTTP request to the API endpoint fails.
1727
+
1728
+ Tags:
1729
+ get, team, organizations, api
1730
+ """
1731
+ if orgId is None:
1732
+ raise ValueError("Missing required parameter 'orgId'")
1733
+ if teamId is None:
1734
+ raise ValueError("Missing required parameter 'teamId'")
1735
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}"
1736
+ query_params = {}
1737
+ response = self._get(url, params=query_params)
1738
+ response.raise_for_status()
1739
+ return response.json()
1740
+
1741
+ def organizations_teams_controller_delete_team(self, orgId, teamId) -> dict[str, Any]:
1742
+ """
1743
+ Deletes a specific team from an organization by its organization and team IDs.
1744
+
1745
+ Args:
1746
+ orgId: str. The unique identifier of the organization containing the team to delete.
1747
+ teamId: str. The unique identifier of the team to be deleted.
1748
+
1749
+ Returns:
1750
+ dict[str, Any]: The JSON response from the API after the team is deleted.
1751
+
1752
+ Raises:
1753
+ ValueError: Raised when 'orgId' or 'teamId' is None.
1754
+ requests.HTTPError: Raised if the HTTP request to delete the team fails.
1755
+
1756
+ Tags:
1757
+ delete, team-management, organizations, api-call
1758
+ """
1759
+ if orgId is None:
1760
+ raise ValueError("Missing required parameter 'orgId'")
1761
+ if teamId is None:
1762
+ raise ValueError("Missing required parameter 'teamId'")
1763
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}"
1764
+ query_params = {}
1765
+ response = self._delete(url, params=query_params)
1766
+ response.raise_for_status()
1767
+ return response.json()
1768
+
1769
+ def organizations_teams_controller_update_team(self, orgId, teamId, name=None, slug=None, logoUrl=None, calVideoLogo=None, appLogo=None, appIconLogo=None, bio=None, hideBranding=None, isPrivate=None, hideBookATeamMember=None, metadata=None, theme=None, brandColor=None, darkBrandColor=None, bannerUrl=None, timeFormat=None, timeZone=None, weekStart=None, bookingLimits=None, includeManagedEventsInLimits=None) -> dict[str, Any]:
1770
+ """
1771
+ Updates the details of an existing team in an organization with the specified parameters.
1772
+
1773
+ Args:
1774
+ orgId: str. The unique identifier of the organization. Required.
1775
+ teamId: str. The unique identifier of the team to update. Required.
1776
+ name: str, optional. The name of the team.
1777
+ slug: str, optional. A unique URL-friendly identifier for the team.
1778
+ logoUrl: str, optional. URL for the team's logo.
1779
+ calVideoLogo: str, optional. URL for the team's Calendly video logo.
1780
+ appLogo: str, optional. URL for the team's app logo.
1781
+ appIconLogo: str, optional. URL for the team's app icon logo.
1782
+ bio: str, optional. A brief biography or description of the team.
1783
+ hideBranding: bool, optional. Whether to hide the team's branding.
1784
+ isPrivate: bool, optional. Whether the team is private.
1785
+ hideBookATeamMember: bool, optional. Whether to hide the option to book a team member.
1786
+ metadata: dict or None, optional. Additional metadata for the team.
1787
+ theme: str, optional. UI theme identifier for the team.
1788
+ brandColor: str, optional. Brand color in HEX or CSS format.
1789
+ darkBrandColor: str, optional. Brand color used for dark themes.
1790
+ bannerUrl: str, optional. URL for the team's banner image.
1791
+ timeFormat: str, optional. Preferred time format for the team.
1792
+ timeZone: str, optional. Time zone associated with the team.
1793
+ weekStart: str or int, optional. First day of the week for the team's schedule.
1794
+ bookingLimits: dict or None, optional. Booking limits settings for the team.
1795
+ includeManagedEventsInLimits: bool, optional. Whether to include managed events in booking limits.
1796
+
1797
+ Returns:
1798
+ dict[str, Any]: The updated team data as returned by the API.
1799
+
1800
+ Raises:
1801
+ ValueError: If 'orgId' or 'teamId' is None.
1802
+ requests.HTTPError: If the API request fails due to an HTTP error.
1803
+
1804
+ Tags:
1805
+ update, team-management, organization, api, patch
1806
+ """
1807
+ if orgId is None:
1808
+ raise ValueError("Missing required parameter 'orgId'")
1809
+ if teamId is None:
1810
+ raise ValueError("Missing required parameter 'teamId'")
1811
+ request_body = {
1812
+ 'name': name,
1813
+ 'slug': slug,
1814
+ 'logoUrl': logoUrl,
1815
+ 'calVideoLogo': calVideoLogo,
1816
+ 'appLogo': appLogo,
1817
+ 'appIconLogo': appIconLogo,
1818
+ 'bio': bio,
1819
+ 'hideBranding': hideBranding,
1820
+ 'isPrivate': isPrivate,
1821
+ 'hideBookATeamMember': hideBookATeamMember,
1822
+ 'metadata': metadata,
1823
+ 'theme': theme,
1824
+ 'brandColor': brandColor,
1825
+ 'darkBrandColor': darkBrandColor,
1826
+ 'bannerUrl': bannerUrl,
1827
+ 'timeFormat': timeFormat,
1828
+ 'timeZone': timeZone,
1829
+ 'weekStart': weekStart,
1830
+ 'bookingLimits': bookingLimits,
1831
+ 'includeManagedEventsInLimits': includeManagedEventsInLimits,
1832
+ }
1833
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1834
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}"
1835
+ query_params = {}
1836
+ response = self._patch(url, data=request_body, params=query_params)
1837
+ response.raise_for_status()
1838
+ return response.json()
1839
+
1840
+ def organizations_teams_memberships_controller_get_all_org_team_memberships(self, orgId, teamId, take=None, skip=None) -> dict[str, Any]:
1841
+ """
1842
+ Retrieves all memberships for a specific team within an organization, with optional pagination.
1843
+
1844
+ Args:
1845
+ orgId: The unique identifier of the organization.
1846
+ teamId: The unique identifier of the team within the organization.
1847
+ take: Optional; the maximum number of memberships to return.
1848
+ skip: Optional; the number of memberships to skip before starting to collect the result set.
1849
+
1850
+ Returns:
1851
+ A dictionary containing the list of team membership records and associated metadata.
1852
+
1853
+ Raises:
1854
+ ValueError: Raised if 'orgId' or 'teamId' is not provided.
1855
+ requests.HTTPError: Raised if the HTTP request to the API fails with an error status.
1856
+
1857
+ Tags:
1858
+ list, memberships, organization, team, api, fetch
1859
+ """
1860
+ if orgId is None:
1861
+ raise ValueError("Missing required parameter 'orgId'")
1862
+ if teamId is None:
1863
+ raise ValueError("Missing required parameter 'teamId'")
1864
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/memberships"
1865
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
1866
+ response = self._get(url, params=query_params)
1867
+ response.raise_for_status()
1868
+ return response.json()
1869
+
1870
+ def organizations_teams_memberships_controller_create_org_team_membership(self, orgId, teamId, userId, role, accepted=None, disableImpersonation=None) -> dict[str, Any]:
1871
+ """
1872
+ Creates a team membership for a user within an organization, assigning a specified role and optional attributes.
1873
+
1874
+ Args:
1875
+ orgId: str. The unique identifier of the organization.
1876
+ teamId: str. The unique identifier of the team within the organization.
1877
+ userId: str. The unique identifier of the user to add as a team member.
1878
+ role: str. The role to assign to the user within the team.
1879
+ accepted: Optional[bool]. Indicates whether the user has accepted the team membership. Defaults to None.
1880
+ disableImpersonation: Optional[bool]. Whether to disable impersonation for this membership. Defaults to None.
1881
+
1882
+ Returns:
1883
+ dict[str, Any]: The JSON-decoded response representing the created team membership.
1884
+
1885
+ Raises:
1886
+ ValueError: If any of orgId, teamId, userId, or role is None.
1887
+ requests.HTTPError: If the HTTP request to create the membership fails.
1888
+
1889
+ Tags:
1890
+ create, membership, organization, team, management, api
1891
+ """
1892
+ if orgId is None:
1893
+ raise ValueError("Missing required parameter 'orgId'")
1894
+ if teamId is None:
1895
+ raise ValueError("Missing required parameter 'teamId'")
1896
+ if userId is None:
1897
+ raise ValueError("Missing required parameter 'userId'")
1898
+ if role is None:
1899
+ raise ValueError("Missing required parameter 'role'")
1900
+ request_body = {
1901
+ 'userId': userId,
1902
+ 'accepted': accepted,
1903
+ 'role': role,
1904
+ 'disableImpersonation': disableImpersonation,
1905
+ }
1906
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1907
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/memberships"
1908
+ query_params = {}
1909
+ response = self._post(url, data=request_body, params=query_params)
1910
+ response.raise_for_status()
1911
+ return response.json()
1912
+
1913
+ def organizations_teams_memberships_controller_get_org_team_membership(self, orgId, teamId, membershipId) -> dict[str, Any]:
1914
+ """
1915
+ Retrieve details of a specific team membership within an organization.
1916
+
1917
+ Args:
1918
+ orgId: str. Unique identifier of the organization.
1919
+ teamId: str. Unique identifier of the team within the organization.
1920
+ membershipId: str. Unique identifier of the membership to retrieve.
1921
+
1922
+ Returns:
1923
+ dict. A dictionary containing the details of the team membership.
1924
+
1925
+ Raises:
1926
+ ValueError: Raised if any of the required parameters ('orgId', 'teamId', or 'membershipId') are None.
1927
+ HTTPError: Raised if the HTTP request to the API endpoint returns an unsuccessful status code.
1928
+
1929
+ Tags:
1930
+ get, membership, organization, team, api
1931
+ """
1932
+ if orgId is None:
1933
+ raise ValueError("Missing required parameter 'orgId'")
1934
+ if teamId is None:
1935
+ raise ValueError("Missing required parameter 'teamId'")
1936
+ if membershipId is None:
1937
+ raise ValueError("Missing required parameter 'membershipId'")
1938
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}"
1939
+ query_params = {}
1940
+ response = self._get(url, params=query_params)
1941
+ response.raise_for_status()
1942
+ return response.json()
1943
+
1944
+ def organizations_teams_memberships_controller_delete_org_team_membership(self, orgId, teamId, membershipId) -> dict[str, Any]:
1945
+ """
1946
+ Deletes a specific team membership from an organization by its identifiers.
1947
+
1948
+ Args:
1949
+ orgId: The unique identifier of the organization containing the team.
1950
+ teamId: The unique identifier of the team from which the membership will be deleted.
1951
+ membershipId: The unique identifier of the membership to be deleted.
1952
+
1953
+ Returns:
1954
+ A dictionary containing the response data from the delete operation.
1955
+
1956
+ Raises:
1957
+ ValueError: Raised if any of 'orgId', 'teamId', or 'membershipId' is None.
1958
+ requests.HTTPError: Raised if the HTTP request to delete the membership fails (non-success status code).
1959
+
1960
+ Tags:
1961
+ delete, membership, organizations, teams, api-call
1962
+ """
1963
+ if orgId is None:
1964
+ raise ValueError("Missing required parameter 'orgId'")
1965
+ if teamId is None:
1966
+ raise ValueError("Missing required parameter 'teamId'")
1967
+ if membershipId is None:
1968
+ raise ValueError("Missing required parameter 'membershipId'")
1969
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}"
1970
+ query_params = {}
1971
+ response = self._delete(url, params=query_params)
1972
+ response.raise_for_status()
1973
+ return response.json()
1974
+
1975
+ def organizations_teams_memberships_controller_update_org_team_membership(self, orgId, teamId, membershipId, accepted=None, role=None, disableImpersonation=None) -> dict[str, Any]:
1976
+ """
1977
+ Updates a specific team membership within an organization, modifying attributes such as acceptance status, role, and impersonation settings.
1978
+
1979
+ Args:
1980
+ orgId: str. Unique identifier of the organization.
1981
+ teamId: str. Unique identifier of the team within the organization.
1982
+ membershipId: str. Unique identifier of the membership to update.
1983
+ accepted: Optional[bool]. If provided, sets whether the membership is accepted.
1984
+ role: Optional[str]. If provided, updates the role of the member within the team.
1985
+ disableImpersonation: Optional[bool]. If provided, enables or disables impersonation for the membership.
1986
+
1987
+ Returns:
1988
+ dict[str, Any]: The updated membership information as returned by the API.
1989
+
1990
+ Raises:
1991
+ ValueError: Raised if any of the required parameters 'orgId', 'teamId', or 'membershipId' are missing.
1992
+ requests.HTTPError: Raised if the HTTP PATCH request to the server fails or returns an error response.
1993
+
1994
+ Tags:
1995
+ update, membership, team, organization, api, management
1996
+ """
1997
+ if orgId is None:
1998
+ raise ValueError("Missing required parameter 'orgId'")
1999
+ if teamId is None:
2000
+ raise ValueError("Missing required parameter 'teamId'")
2001
+ if membershipId is None:
2002
+ raise ValueError("Missing required parameter 'membershipId'")
2003
+ request_body = {
2004
+ 'accepted': accepted,
2005
+ 'role': role,
2006
+ 'disableImpersonation': disableImpersonation,
2007
+ }
2008
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2009
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}"
2010
+ query_params = {}
2011
+ response = self._patch(url, data=request_body, params=query_params)
2012
+ response.raise_for_status()
2013
+ return response.json()
2014
+
2015
+ def organizations_teams_schedules_controller_get_user_schedules(self, orgId, teamId, userId) -> dict[str, Any]:
2016
+ """
2017
+ Retrieves the schedule information for a specific user within a team and organization.
2018
+
2019
+ Args:
2020
+ orgId: The unique identifier of the organization.
2021
+ teamId: The unique identifier of the team within the organization.
2022
+ userId: The unique identifier of the user whose schedules are to be retrieved.
2023
+
2024
+ Returns:
2025
+ A dictionary containing the schedule details for the specified user.
2026
+
2027
+ Raises:
2028
+ ValueError: Raised if any of the required parameters ('orgId', 'teamId', or 'userId') are None.
2029
+ requests.HTTPError: Raised if the HTTP request to retrieve user schedules fails.
2030
+
2031
+ Tags:
2032
+ get, user-schedules, team, organization, api
2033
+ """
2034
+ if orgId is None:
2035
+ raise ValueError("Missing required parameter 'orgId'")
2036
+ if teamId is None:
2037
+ raise ValueError("Missing required parameter 'teamId'")
2038
+ if userId is None:
2039
+ raise ValueError("Missing required parameter 'userId'")
2040
+ url = f"{self.base_url}/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules"
2041
+ query_params = {}
2042
+ response = self._get(url, params=query_params)
2043
+ response.raise_for_status()
2044
+ return response.json()
2045
+
2046
+ def organizations_users_controller_get_organizations_users(self, orgId, take=None, skip=None, emails=None) -> dict[str, Any]:
2047
+ """
2048
+ Retrieves a list of user information for a given organization, with optional filtering and pagination.
2049
+
2050
+ Args:
2051
+ orgId: str. Unique identifier of the organization whose users are being retrieved.
2052
+ take: Optional[int]. Limits the number of users returned in the response.
2053
+ skip: Optional[int]. Number of users to skip from the start of the result set (useful for pagination).
2054
+ emails: Optional[str or list]. Filter returned users by one or more email addresses.
2055
+
2056
+ Returns:
2057
+ dict[str, Any]: A dictionary containing user information for the specified organization, as returned by the API.
2058
+
2059
+ Raises:
2060
+ ValueError: If the required parameter 'orgId' is not provided.
2061
+ requests.HTTPError: If the HTTP request to the API fails with a non-success status code.
2062
+
2063
+ Tags:
2064
+ list, users, organizations, api, pagination, filtering
2065
+ """
2066
+ if orgId is None:
2067
+ raise ValueError("Missing required parameter 'orgId'")
2068
+ url = f"{self.base_url}/v2/organizations/{orgId}/users"
2069
+ query_params = {k: v for k, v in [('take', take), ('skip', skip), ('emails', emails)] if v is not None}
2070
+ response = self._get(url, params=query_params)
2071
+ response.raise_for_status()
2072
+ return response.json()
2073
+
2074
+ def organizations_users_controller_create_organization_user(self, orgId, email, username=None, weekday=None, brandColor=None, darkBrandColor=None, hideBranding=None, timeZone=None, theme=None, appTheme=None, timeFormat=None, defaultScheduleId=None, locale=None, avatarUrl=None, organizationRole=None, autoAccept=None) -> dict[str, Any]:
2075
+ """
2076
+ Creates a new user within a specified organization by sending a POST request with the provided user details.
2077
+
2078
+ Args:
2079
+ orgId: str. Unique identifier of the organization.
2080
+ email: str. Email address of the user to be created.
2081
+ username: str, optional. Username for the new user.
2082
+ weekday: str, optional. Preferred start day of the week for the user.
2083
+ brandColor: str, optional. Brand color associated with the user or organization.
2084
+ darkBrandColor: str, optional. Dark theme brand color.
2085
+ hideBranding: bool, optional. Whether to hide branding for the user.
2086
+ timeZone: str, optional. Time zone for the user.
2087
+ theme: str, optional. Theme for the user interface.
2088
+ appTheme: str, optional. Application theme for the user.
2089
+ timeFormat: str, optional. Time format preference (e.g., 12-hour or 24-hour).
2090
+ defaultScheduleId: str, optional. Default schedule identifier for the user.
2091
+ locale: str, optional. Locale for language and region settings.
2092
+ avatarUrl: str, optional. URL to the user's avatar image.
2093
+ organizationRole: str, optional. Role of the user within the organization.
2094
+ autoAccept: bool, optional. If set, user auto-accepts invitations and requests.
2095
+
2096
+ Returns:
2097
+ dict. JSON response containing the details of the newly created organization user.
2098
+
2099
+ Raises:
2100
+ ValueError: If the required parameter 'orgId' or 'email' is missing.
2101
+ requests.HTTPError: If the HTTP request to the server fails or returns a non-success status code.
2102
+
2103
+ Tags:
2104
+ create, organization-user, management, api
2105
+ """
2106
+ if orgId is None:
2107
+ raise ValueError("Missing required parameter 'orgId'")
2108
+ if email is None:
2109
+ raise ValueError("Missing required parameter 'email'")
2110
+ request_body = {
2111
+ 'email': email,
2112
+ 'username': username,
2113
+ 'weekday': weekday,
2114
+ 'brandColor': brandColor,
2115
+ 'darkBrandColor': darkBrandColor,
2116
+ 'hideBranding': hideBranding,
2117
+ 'timeZone': timeZone,
2118
+ 'theme': theme,
2119
+ 'appTheme': appTheme,
2120
+ 'timeFormat': timeFormat,
2121
+ 'defaultScheduleId': defaultScheduleId,
2122
+ 'locale': locale,
2123
+ 'avatarUrl': avatarUrl,
2124
+ 'organizationRole': organizationRole,
2125
+ 'autoAccept': autoAccept,
2126
+ }
2127
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2128
+ url = f"{self.base_url}/v2/organizations/{orgId}/users"
2129
+ query_params = {}
2130
+ response = self._post(url, data=request_body, params=query_params)
2131
+ response.raise_for_status()
2132
+ return response.json()
2133
+
2134
+ def organizations_users_controller_delete_organization_user(self, orgId, userId) -> dict[str, Any]:
2135
+ """
2136
+ Deletes a user from the specified organization.
2137
+
2138
+ Args:
2139
+ orgId: The unique identifier of the organization from which the user will be removed.
2140
+ userId: The unique identifier of the user to delete from the organization.
2141
+
2142
+ Returns:
2143
+ A dictionary containing the JSON response from the delete operation.
2144
+
2145
+ Raises:
2146
+ ValueError: Raised if either 'orgId' or 'userId' is None.
2147
+ requests.HTTPError: Raised if the HTTP request to delete the user fails.
2148
+
2149
+ Tags:
2150
+ delete, organization-user, management
2151
+ """
2152
+ if orgId is None:
2153
+ raise ValueError("Missing required parameter 'orgId'")
2154
+ if userId is None:
2155
+ raise ValueError("Missing required parameter 'userId'")
2156
+ url = f"{self.base_url}/v2/organizations/{orgId}/users/{userId}"
2157
+ query_params = {}
2158
+ response = self._delete(url, params=query_params)
2159
+ response.raise_for_status()
2160
+ return response.json()
2161
+
2162
+ def organizations_webhooks_controller_get_all_organization_webhooks(self, orgId, take=None, skip=None) -> dict[str, Any]:
2163
+ """
2164
+ Retrieves all webhooks configured for the specified organization, with optional pagination.
2165
+
2166
+ Args:
2167
+ orgId: str. The unique identifier of the organization for which to fetch webhooks.
2168
+ take: Optional[int]. The maximum number of webhooks to retrieve. Used for pagination.
2169
+ skip: Optional[int]. The number of webhooks to skip before starting to collect the result set. Used for pagination.
2170
+
2171
+ Returns:
2172
+ dict[str, Any]: A dictionary containing webhook information for the specified organization.
2173
+
2174
+ Raises:
2175
+ ValueError: Raised if the 'orgId' parameter is None.
2176
+ requests.HTTPError: Raised if the HTTP request to fetch webhooks fails (e.g., network issues, 4xx/5xx HTTP response).
2177
+
2178
+ Tags:
2179
+ list, webhooks, organization-management, api
2180
+ """
2181
+ if orgId is None:
2182
+ raise ValueError("Missing required parameter 'orgId'")
2183
+ url = f"{self.base_url}/v2/organizations/{orgId}/webhooks"
2184
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
2185
+ response = self._get(url, params=query_params)
2186
+ response.raise_for_status()
2187
+ return response.json()
2188
+
2189
+ def organizations_webhooks_controller_create_organization_webhook(self, orgId, active, subscriberUrl, triggers, payloadTemplate=None, secret=None) -> dict[str, Any]:
2190
+ """
2191
+ Creates a new webhook for an organization with specified parameters.
2192
+
2193
+ Args:
2194
+ orgId: str. The unique identifier of the organization for which the webhook is being created.
2195
+ active: bool. Indicates whether the webhook should be active upon creation.
2196
+ subscriberUrl: str. The URL where webhook payloads will be delivered.
2197
+ triggers: list. The list of event triggers that will cause the webhook to fire.
2198
+ payloadTemplate: Optional[str]. A custom template for the webhook payload. If not provided, a default template is used.
2199
+ secret: Optional[str]. A secret used to sign webhook payloads for added security.
2200
+
2201
+ Returns:
2202
+ dict[str, Any]: The JSON response containing details of the created webhook.
2203
+
2204
+ Raises:
2205
+ ValueError: Raised if any of the required parameters ('orgId', 'active', 'subscriberUrl', 'triggers') are missing.
2206
+ requests.HTTPError: Raised if the HTTP request to create the webhook fails (non-success response from the API).
2207
+
2208
+ Tags:
2209
+ create, webhook, organization, api
2210
+ """
2211
+ if orgId is None:
2212
+ raise ValueError("Missing required parameter 'orgId'")
2213
+ if active is None:
2214
+ raise ValueError("Missing required parameter 'active'")
2215
+ if subscriberUrl is None:
2216
+ raise ValueError("Missing required parameter 'subscriberUrl'")
2217
+ if triggers is None:
2218
+ raise ValueError("Missing required parameter 'triggers'")
2219
+ request_body = {
2220
+ 'payloadTemplate': payloadTemplate,
2221
+ 'active': active,
2222
+ 'subscriberUrl': subscriberUrl,
2223
+ 'triggers': triggers,
2224
+ 'secret': secret,
2225
+ }
2226
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2227
+ url = f"{self.base_url}/v2/organizations/{orgId}/webhooks"
2228
+ query_params = {}
2229
+ response = self._post(url, data=request_body, params=query_params)
2230
+ response.raise_for_status()
2231
+ return response.json()
2232
+
2233
+ def organizations_webhooks_controller_get_organization_webhook(self, orgId, webhookId) -> dict[str, Any]:
2234
+ """
2235
+ Retrieves details for a specific webhook associated with an organization.
2236
+
2237
+ Args:
2238
+ orgId: The unique identifier of the organization whose webhook is to be retrieved.
2239
+ webhookId: The unique identifier of the webhook within the specified organization.
2240
+
2241
+ Returns:
2242
+ A dictionary containing the details of the requested webhook.
2243
+
2244
+ Raises:
2245
+ ValueError: Raised if 'orgId' or 'webhookId' is None.
2246
+ requests.HTTPError: Raised if the HTTP request to the API endpoint fails.
2247
+
2248
+ Tags:
2249
+ get, webhooks, organization, api
2250
+ """
2251
+ if orgId is None:
2252
+ raise ValueError("Missing required parameter 'orgId'")
2253
+ if webhookId is None:
2254
+ raise ValueError("Missing required parameter 'webhookId'")
2255
+ url = f"{self.base_url}/v2/organizations/{orgId}/webhooks/{webhookId}"
2256
+ query_params = {}
2257
+ response = self._get(url, params=query_params)
2258
+ response.raise_for_status()
2259
+ return response.json()
2260
+
2261
+ def organizations_webhooks_controller_delete_webhook(self, orgId, webhookId) -> dict[str, Any]:
2262
+ """
2263
+ Deletes a webhook from the specified organization by its webhook ID.
2264
+
2265
+ Args:
2266
+ orgId: str. The unique identifier of the organization from which the webhook will be deleted.
2267
+ webhookId: str. The unique identifier of the webhook to delete.
2268
+
2269
+ Returns:
2270
+ dict[str, Any]: The API response as a dictionary containing the result of the deletion operation.
2271
+
2272
+ Raises:
2273
+ ValueError: Raised if 'orgId' or 'webhookId' is None.
2274
+ requests.HTTPError: Raised if the HTTP request for webhook deletion fails with an error status code.
2275
+
2276
+ Tags:
2277
+ delete, webhook, organization, api
2278
+ """
2279
+ if orgId is None:
2280
+ raise ValueError("Missing required parameter 'orgId'")
2281
+ if webhookId is None:
2282
+ raise ValueError("Missing required parameter 'webhookId'")
2283
+ url = f"{self.base_url}/v2/organizations/{orgId}/webhooks/{webhookId}"
2284
+ query_params = {}
2285
+ response = self._delete(url, params=query_params)
2286
+ response.raise_for_status()
2287
+ return response.json()
2288
+
2289
+ def organizations_webhooks_controller_update_org_webhook(self, orgId, webhookId, payloadTemplate=None, active=None, subscriberUrl=None, triggers=None, secret=None) -> dict[str, Any]:
2290
+ """
2291
+ Updates an organization's webhook configuration.
2292
+
2293
+ Args:
2294
+ orgId: String identifier of the organization. Required.
2295
+ webhookId: String identifier of the webhook to update. Required.
2296
+ payloadTemplate: Optional template that defines the structure of the webhook payload.
2297
+ active: Optional boolean flag indicating whether the webhook is active.
2298
+ subscriberUrl: Optional URL where webhook notifications will be sent.
2299
+ triggers: Optional list of events that will trigger the webhook.
2300
+ secret: Optional secret key used to validate webhook requests.
2301
+
2302
+ Returns:
2303
+ Dictionary containing the updated webhook configuration details.
2304
+
2305
+ Raises:
2306
+ ValueError: When required parameters 'orgId' or 'webhookId' are None.
2307
+ HTTPError: When the API request fails.
2308
+
2309
+ Tags:
2310
+ update, webhook, organization, management
2311
+ """
2312
+ if orgId is None:
2313
+ raise ValueError("Missing required parameter 'orgId'")
2314
+ if webhookId is None:
2315
+ raise ValueError("Missing required parameter 'webhookId'")
2316
+ request_body = {
2317
+ 'payloadTemplate': payloadTemplate,
2318
+ 'active': active,
2319
+ 'subscriberUrl': subscriberUrl,
2320
+ 'triggers': triggers,
2321
+ 'secret': secret,
2322
+ }
2323
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2324
+ url = f"{self.base_url}/v2/organizations/{orgId}/webhooks/{webhookId}"
2325
+ query_params = {}
2326
+ response = self._patch(url, data=request_body, params=query_params)
2327
+ response.raise_for_status()
2328
+ return response.json()
2329
+
2330
+ def bookings_controller_2024_08_13_get_bookings(self, status=None, attendeeEmail=None, attendeeName=None, eventTypeIds=None, eventTypeId=None, teamsIds=None, teamId=None, afterStart=None, beforeEnd=None, sortStart=None, sortEnd=None, sortCreated=None, take=None, skip=None) -> dict[str, Any]:
2331
+ """
2332
+ Retrieves a list of bookings filtered by various query parameters such as status, attendee details, event type, team, and date ranges.
2333
+
2334
+ Args:
2335
+ status: Optional; filter bookings by status (e.g., 'confirmed', 'canceled').
2336
+ attendeeEmail: Optional; filter bookings by the attendee's email address.
2337
+ attendeeName: Optional; filter bookings by the attendee's name.
2338
+ eventTypeIds: Optional; filter bookings by a list of event type IDs.
2339
+ eventTypeId: Optional; filter bookings by a specific event type ID.
2340
+ teamsIds: Optional; filter bookings by a list of team IDs.
2341
+ teamId: Optional; filter bookings by a specific team ID.
2342
+ afterStart: Optional; filter bookings with a start date/time after this value (ISO 8601 format or timestamp).
2343
+ beforeEnd: Optional; filter bookings with an end date/time before this value (ISO 8601 format or timestamp).
2344
+ sortStart: Optional; specify sorting by start time ('asc' or 'desc').
2345
+ sortEnd: Optional; specify sorting by end time ('asc' or 'desc').
2346
+ sortCreated: Optional; specify sorting by creation time ('asc' or 'desc').
2347
+ take: Optional; limit on the number of bookings to return.
2348
+ skip: Optional; number of bookings to skip for pagination.
2349
+
2350
+ Returns:
2351
+ dict[str, Any]: A dictionary containing the retrieved bookings and related metadata.
2352
+
2353
+ Raises:
2354
+ HTTPError: If the HTTP request to the bookings API fails or returns an error status code.
2355
+
2356
+ Tags:
2357
+ list, bookings, filter, api
2358
+ """
2359
+ url = f"{self.base_url}/v2/bookings"
2360
+ query_params = {k: v for k, v in [('status', status), ('attendeeEmail', attendeeEmail), ('attendeeName', attendeeName), ('eventTypeIds', eventTypeIds), ('eventTypeId', eventTypeId), ('teamsIds', teamsIds), ('teamId', teamId), ('afterStart', afterStart), ('beforeEnd', beforeEnd), ('sortStart', sortStart), ('sortEnd', sortEnd), ('sortCreated', sortCreated), ('take', take), ('skip', skip)] if v is not None}
2361
+ response = self._get(url, params=query_params)
2362
+ response.raise_for_status()
2363
+ return response.json()
2364
+
2365
+ def bookings_controller_2024_08_13_get_booking(self, bookingUid) -> dict[str, Any]:
2366
+ """
2367
+ Retrieves the details of a booking by its unique identifier.
2368
+
2369
+ Args:
2370
+ bookingUid: str. The unique identifier of the booking to retrieve.
2371
+
2372
+ Returns:
2373
+ dict. A dictionary containing the booking details retrieved from the API.
2374
+
2375
+ Raises:
2376
+ ValueError: If 'bookingUid' is None.
2377
+ requests.HTTPError: If the HTTP request to the bookings API fails or returns an error response.
2378
+
2379
+ Tags:
2380
+ get, booking, api, controller
2381
+ """
2382
+ if bookingUid is None:
2383
+ raise ValueError("Missing required parameter 'bookingUid'")
2384
+ url = f"{self.base_url}/v2/bookings/{bookingUid}"
2385
+ query_params = {}
2386
+ response = self._get(url, params=query_params)
2387
+ response.raise_for_status()
2388
+ return response.json()
2389
+
2390
+ def bookings_controller_2024_08_13_reschedule_booking(self, bookingUid) -> dict[str, Any]:
2391
+ """
2392
+ Reschedules an existing booking by sending a reschedule request for the specified booking UID.
2393
+
2394
+ Args:
2395
+ bookingUid: str. The unique identifier of the booking to be rescheduled.
2396
+
2397
+ Returns:
2398
+ dict. A dictionary containing the response data for the rescheduled booking.
2399
+
2400
+ Raises:
2401
+ ValueError: Raised when the required parameter 'bookingUid' is missing or None.
2402
+ HTTPError: Raised if the HTTP request to the reschedule endpoint fails.
2403
+
2404
+ Tags:
2405
+ reschedule, bookings, controller, api
2406
+ """
2407
+ if bookingUid is None:
2408
+ raise ValueError("Missing required parameter 'bookingUid'")
2409
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/reschedule"
2410
+ query_params = {}
2411
+ response = self._post(url, data={}, params=query_params)
2412
+ response.raise_for_status()
2413
+ return response.json()
2414
+
2415
+ def bookings_controller_2024_08_13_cancel_booking(self, bookingUid) -> dict[str, Any]:
2416
+ """
2417
+ Cancels an existing booking identified by the provided booking UID.
2418
+
2419
+ Args:
2420
+ bookingUid: str. The unique identifier of the booking to cancel.
2421
+
2422
+ Returns:
2423
+ dict. JSON response from the API confirming the booking has been cancelled or providing error details.
2424
+
2425
+ Raises:
2426
+ ValueError: If 'bookingUid' is None.
2427
+ requests.HTTPError: If the HTTP request to cancel the booking fails.
2428
+
2429
+ Tags:
2430
+ cancel, booking, api
2431
+ """
2432
+ if bookingUid is None:
2433
+ raise ValueError("Missing required parameter 'bookingUid'")
2434
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/cancel"
2435
+ query_params = {}
2436
+ response = self._post(url, data={}, params=query_params)
2437
+ response.raise_for_status()
2438
+ return response.json()
2439
+
2440
+ def bookings_controller_2024_08_13_mark_no_show(self, bookingUid, host=None, attendees=None) -> dict[str, Any]:
2441
+ """
2442
+ Marks a booking as a no-show (absent) for the specified booking UID, optionally specifying host and attendee information.
2443
+
2444
+ Args:
2445
+ bookingUid: str. The unique identifier for the booking to be marked as absent. Required.
2446
+ host: Optional[Any]. Host information to associate with the no-show event. Defaults to None.
2447
+ attendees: Optional[Any]. Attendee information to associate with the no-show event. Defaults to None.
2448
+
2449
+ Returns:
2450
+ dict[str, Any]: The parsed JSON response from the backend service after marking the booking as absent.
2451
+
2452
+ Raises:
2453
+ ValueError: If 'bookingUid' is None.
2454
+ requests.HTTPError: If the HTTP request to mark the booking as absent fails (non-2xx response).
2455
+
2456
+ Tags:
2457
+ mark, booking, no-show, management, api
2458
+ """
2459
+ if bookingUid is None:
2460
+ raise ValueError("Missing required parameter 'bookingUid'")
2461
+ request_body = {
2462
+ 'host': host,
2463
+ 'attendees': attendees,
2464
+ }
2465
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2466
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/mark-absent"
2467
+ query_params = {}
2468
+ response = self._post(url, data=request_body, params=query_params)
2469
+ response.raise_for_status()
2470
+ return response.json()
2471
+
2472
+ def bookings_controller_2024_08_13_reassign_booking(self, bookingUid) -> dict[str, Any]:
2473
+ """
2474
+ Reassigns an existing booking identified by its unique identifier.
2475
+
2476
+ Args:
2477
+ bookingUid: str. The unique identifier of the booking to be reassigned. Must not be None.
2478
+
2479
+ Returns:
2480
+ dict. The response data from the reassignment request as a dictionary.
2481
+
2482
+ Raises:
2483
+ ValueError: If 'bookingUid' is None.
2484
+ requests.HTTPError: If the HTTP reassignment request fails.
2485
+
2486
+ Tags:
2487
+ reassign, booking, controller, api
2488
+ """
2489
+ if bookingUid is None:
2490
+ raise ValueError("Missing required parameter 'bookingUid'")
2491
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/reassign"
2492
+ query_params = {}
2493
+ response = self._post(url, data={}, params=query_params)
2494
+ response.raise_for_status()
2495
+ return response.json()
2496
+
2497
+ def bookings_controller_2024_08_13_reassign_booking_to_user(self, bookingUid, userId, reason=None) -> dict[str, Any]:
2498
+ """
2499
+ Reassigns a booking to a different user with an optional reason.
2500
+
2501
+ Args:
2502
+ bookingUid: str. The unique identifier of the booking to be reassigned.
2503
+ userId: str. The unique identifier of the user to whom the booking will be reassigned.
2504
+ reason: Optional[str]. The reason for reassigning the booking. Defaults to None.
2505
+
2506
+ Returns:
2507
+ dict[str, Any]: The JSON response from the booking reassignment API containing updated booking information.
2508
+
2509
+ Raises:
2510
+ ValueError: Raised if 'bookingUid' or 'userId' is None.
2511
+ requests.HTTPError: Raised if the HTTP request to reassign the booking fails.
2512
+
2513
+ Tags:
2514
+ reassign, booking, api, management
2515
+ """
2516
+ if bookingUid is None:
2517
+ raise ValueError("Missing required parameter 'bookingUid'")
2518
+ if userId is None:
2519
+ raise ValueError("Missing required parameter 'userId'")
2520
+ request_body = {
2521
+ 'reason': reason,
2522
+ }
2523
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2524
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/reassign/{userId}"
2525
+ query_params = {}
2526
+ response = self._post(url, data=request_body, params=query_params)
2527
+ response.raise_for_status()
2528
+ return response.json()
2529
+
2530
+ def bookings_controller_2024_08_13_confirm_booking(self, bookingUid) -> dict[str, Any]:
2531
+ """
2532
+ Confirms a booking identified by its unique UID via a POST request to the bookings API.
2533
+
2534
+ Args:
2535
+ bookingUid: str. The unique identifier of the booking to confirm.
2536
+
2537
+ Returns:
2538
+ dict. The JSON response from the bookings API after confirming the booking.
2539
+
2540
+ Raises:
2541
+ ValueError: If 'bookingUid' is None.
2542
+ HTTPError: If the HTTP request to the bookings API fails with a non-success status code.
2543
+
2544
+ Tags:
2545
+ confirm, booking, api, post
2546
+ """
2547
+ if bookingUid is None:
2548
+ raise ValueError("Missing required parameter 'bookingUid'")
2549
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/confirm"
2550
+ query_params = {}
2551
+ response = self._post(url, data={}, params=query_params)
2552
+ response.raise_for_status()
2553
+ return response.json()
2554
+
2555
+ def bookings_controller_2024_08_13_decline_booking(self, bookingUid, reason=None) -> dict[str, Any]:
2556
+ """
2557
+ Declines a booking identified by its unique UID, providing an optional reason for the decline.
2558
+
2559
+ Args:
2560
+ bookingUid: str. The unique identifier for the booking to be declined. Must not be None.
2561
+ reason: Optional[str]. The reason for declining the booking. If not provided, the decline will proceed without a reason.
2562
+
2563
+ Returns:
2564
+ dict[str, Any]: A dictionary containing the response data from the booking decline operation.
2565
+
2566
+ Raises:
2567
+ ValueError: Raised if 'bookingUid' is None, indicating a required parameter is missing.
2568
+ requests.HTTPError: Raised if the HTTP request to the backend API fails or returns an unsuccessful status code.
2569
+
2570
+ Tags:
2571
+ decline, booking, management, api
2572
+ """
2573
+ if bookingUid is None:
2574
+ raise ValueError("Missing required parameter 'bookingUid'")
2575
+ request_body = {
2576
+ 'reason': reason,
2577
+ }
2578
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2579
+ url = f"{self.base_url}/v2/bookings/{bookingUid}/decline"
2580
+ query_params = {}
2581
+ response = self._post(url, data=request_body, params=query_params)
2582
+ response.raise_for_status()
2583
+ return response.json()
2584
+
2585
+ def calendars_controller_create_ics_feed(self, urls, readOnly=None) -> dict[str, Any]:
2586
+ """
2587
+ Creates or updates an ICS feed for multiple calendar URLs with optional read-only access.
2588
+
2589
+ Args:
2590
+ urls: list[str]. A list of calendar URLs to include in the ICS feed. This parameter is required.
2591
+ readOnly: bool or None. If set to True, the ICS feed will be created with read-only permissions. If None, the default server behavior is applied.
2592
+
2593
+ Returns:
2594
+ dict[str, Any]: A dictionary containing the server response data for the created or updated ICS feed.
2595
+
2596
+ Raises:
2597
+ ValueError: Raised if the required parameter 'urls' is not provided.
2598
+ requests.HTTPError: Raised if the HTTP response from the server indicates an unsuccessful status code.
2599
+
2600
+ Tags:
2601
+ create, calendars, ics-feed, management
2602
+ """
2603
+ if urls is None:
2604
+ raise ValueError("Missing required parameter 'urls'")
2605
+ request_body = {
2606
+ 'urls': urls,
2607
+ 'readOnly': readOnly,
2608
+ }
2609
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2610
+ url = f"{self.base_url}/v2/calendars/ics-feed/save"
2611
+ query_params = {}
2612
+ response = self._post(url, data=request_body, params=query_params)
2613
+ response.raise_for_status()
2614
+ return response.json()
2615
+
2616
+ def calendars_controller_check_ics_feed(self, ) -> dict[str, Any]:
2617
+ """
2618
+ Checks the status and validity of the ICS calendar feed using the calendar service API.
2619
+
2620
+ Args:
2621
+ None: This function takes no arguments
2622
+
2623
+ Returns:
2624
+ A dictionary containing the result of the ICS feed check, including status and any relevant information returned by the API.
2625
+
2626
+ Raises:
2627
+ requests.HTTPError: If the HTTP request to the ICS feed check endpoint returns an unsuccessful status code.
2628
+
2629
+ Tags:
2630
+ check, calendar, ics-feed, api
2631
+ """
2632
+ url = f"{self.base_url}/v2/calendars/ics-feed/check"
2633
+ query_params = {}
2634
+ response = self._get(url, params=query_params)
2635
+ response.raise_for_status()
2636
+ return response.json()
2637
+
2638
+ def calendars_controller_get_busy_times(self, loggedInUsersTz, credentialId, externalId, dateFrom=None, dateTo=None) -> dict[str, Any]:
2639
+ """
2640
+ Fetches the busy time slots from a calendar provider for a specified external calendar within an optional date range.
2641
+
2642
+ Args:
2643
+ loggedInUsersTz: str. The timezone of the logged-in user (IANA timezone name, e.g., 'America/New_York').
2644
+ credentialId: str. The unique identifier for the user's calendar credential.
2645
+ externalId: str. The unique identifier for the external calendar whose busy times are being fetched.
2646
+ dateFrom: str or None. Optional start date (ISO 8601 format) for the query range. If not specified, busy times are fetched without a lower bound.
2647
+ dateTo: str or None. Optional end date (ISO 8601 format) for the query range. If not specified, busy times are fetched without an upper bound.
2648
+
2649
+ Returns:
2650
+ dict. A dictionary containing the busy time slots information as returned by the calendar provider's API.
2651
+
2652
+ Raises:
2653
+ ValueError: If any of the required parameters ('loggedInUsersTz', 'credentialId', or 'externalId') are missing or None.
2654
+ requests.HTTPError: If the HTTP request to the calendar API fails or returns an error status.
2655
+
2656
+ Tags:
2657
+ get, calendar, busy-times, external-api, query
2658
+ """
2659
+ if loggedInUsersTz is None:
2660
+ raise ValueError("Missing required parameter 'loggedInUsersTz'")
2661
+ if credentialId is None:
2662
+ raise ValueError("Missing required parameter 'credentialId'")
2663
+ if externalId is None:
2664
+ raise ValueError("Missing required parameter 'externalId'")
2665
+ url = f"{self.base_url}/v2/calendars/busy-times"
2666
+ query_params = {k: v for k, v in [('loggedInUsersTz', loggedInUsersTz), ('dateFrom', dateFrom), ('dateTo', dateTo), ('credentialId', credentialId), ('externalId', externalId)] if v is not None}
2667
+ response = self._get(url, params=query_params)
2668
+ response.raise_for_status()
2669
+ return response.json()
2670
+
2671
+ def calendars_controller_get_calendars(self, ) -> dict[str, Any]:
2672
+ """
2673
+ Retrieves a list of available calendars from the API endpoint.
2674
+
2675
+ Args:
2676
+ None: This function takes no arguments
2677
+
2678
+ Returns:
2679
+ A dictionary containing the JSON response with calendar data.
2680
+
2681
+ Raises:
2682
+ requests.HTTPError: If the HTTP request to the calendars endpoint returns an unsuccessful status code.
2683
+
2684
+ Tags:
2685
+ get, list, calendars, api
2686
+ """
2687
+ url = f"{self.base_url}/v2/calendars"
2688
+ query_params = {}
2689
+ response = self._get(url, params=query_params)
2690
+ response.raise_for_status()
2691
+ return response.json()
2692
+
2693
+ def calendars_controller_redirect(self, calendar) -> dict[str, Any]:
2694
+ """
2695
+ Redirects to the calendar connection endpoint and returns the response as a dictionary.
2696
+
2697
+ Args:
2698
+ calendar: str. The unique identifier of the calendar to connect.
2699
+
2700
+ Returns:
2701
+ dict[str, Any]: A dictionary containing the JSON response from the calendar connection endpoint.
2702
+
2703
+ Raises:
2704
+ ValueError: Raised when the 'calendar' parameter is None.
2705
+ requests.HTTPError: Raised if the HTTP request to the connection endpoint fails.
2706
+
2707
+ Tags:
2708
+ redirect, calendar, controller, api
2709
+ """
2710
+ if calendar is None:
2711
+ raise ValueError("Missing required parameter 'calendar'")
2712
+ url = f"{self.base_url}/v2/calendars/{calendar}/connect"
2713
+ query_params = {}
2714
+ response = self._get(url, params=query_params)
2715
+ response.raise_for_status()
2716
+ return response.json()
2717
+
2718
+ def calendars_controller_save(self, calendar, state, code) -> Any:
2719
+ """
2720
+ Saves the state of a specified calendar by sending a request to the API endpoint with given parameters.
2721
+
2722
+ Args:
2723
+ calendar: The identifier of the calendar to be saved.
2724
+ state: The state information to save for the calendar.
2725
+ code: The authorization or access code required for saving the calendar.
2726
+
2727
+ Returns:
2728
+ The parsed JSON response from the API containing the result of the save operation.
2729
+
2730
+ Raises:
2731
+ ValueError: Raised if any of the required parameters ('calendar', 'state', or 'code') is None.
2732
+ requests.exceptions.HTTPError: Raised if the HTTP request to the API endpoint fails or returns an unsuccessful status.
2733
+
2734
+ Tags:
2735
+ save, calendar-management, api-call
2736
+ """
2737
+ if calendar is None:
2738
+ raise ValueError("Missing required parameter 'calendar'")
2739
+ if state is None:
2740
+ raise ValueError("Missing required parameter 'state'")
2741
+ if code is None:
2742
+ raise ValueError("Missing required parameter 'code'")
2743
+ url = f"{self.base_url}/v2/calendars/{calendar}/save"
2744
+ query_params = {k: v for k, v in [('state', state), ('code', code)] if v is not None}
2745
+ response = self._get(url, params=query_params)
2746
+ response.raise_for_status()
2747
+ return response.json()
2748
+
2749
+ def calendars_controller_sync_credentials(self, calendar) -> Any:
2750
+ """
2751
+ Synchronizes calendar credentials by sending a POST request for the specified calendar.
2752
+
2753
+ Args:
2754
+ calendar: The unique identifier or name of the calendar to synchronize credentials for.
2755
+
2756
+ Returns:
2757
+ A JSON object containing the response data from the calendar credentials synchronization request.
2758
+
2759
+ Raises:
2760
+ ValueError: Raised if the 'calendar' parameter is None.
2761
+ HTTPError: Raised if the HTTP request returns an unsuccessful status code.
2762
+
2763
+ Tags:
2764
+ sync, credentials, calendar
2765
+ """
2766
+ if calendar is None:
2767
+ raise ValueError("Missing required parameter 'calendar'")
2768
+ url = f"{self.base_url}/v2/calendars/{calendar}/credentials"
2769
+ query_params = {}
2770
+ response = self._post(url, data={}, params=query_params)
2771
+ response.raise_for_status()
2772
+ return response.json()
2773
+
2774
+ def calendars_controller_check(self, calendar) -> dict[str, Any]:
2775
+ """
2776
+ Checks the status or validity of a specified calendar by making a GET request to the corresponding API endpoint.
2777
+
2778
+ Args:
2779
+ calendar: str. The identifier of the calendar to check.
2780
+
2781
+ Returns:
2782
+ dict[str, Any]: A dictionary containing the response data from the API regarding the specified calendar.
2783
+
2784
+ Raises:
2785
+ ValueError: If 'calendar' is None.
2786
+ HTTPError: If the HTTP request to the API fails or returns an unsuccessful status code.
2787
+
2788
+ Tags:
2789
+ check, calendar, api
2790
+ """
2791
+ if calendar is None:
2792
+ raise ValueError("Missing required parameter 'calendar'")
2793
+ url = f"{self.base_url}/v2/calendars/{calendar}/check"
2794
+ query_params = {}
2795
+ response = self._get(url, params=query_params)
2796
+ response.raise_for_status()
2797
+ return response.json()
2798
+
2799
+ def calendars_controller_delete_calendar_credentials(self, calendar, id) -> dict[str, Any]:
2800
+ """
2801
+ Disconnects and deletes calendar credentials for a specified calendar by sending a POST request to the external service.
2802
+
2803
+ Args:
2804
+ calendar: str. The identifier of the calendar for which credentials should be deleted.
2805
+ id: str. The credential or user ID to be removed from the calendar.
2806
+
2807
+ Returns:
2808
+ dict[str, Any]: The JSON response from the external service indicating the result of the disconnection operation.
2809
+
2810
+ Raises:
2811
+ ValueError: Raised if either 'calendar' or 'id' is None.
2812
+ requests.HTTPError: Raised if the HTTP request to disconnect calendar credentials returns an unsuccessful status code.
2813
+
2814
+ Tags:
2815
+ delete, calendar, credentials, management
2816
+ """
2817
+ if calendar is None:
2818
+ raise ValueError("Missing required parameter 'calendar'")
2819
+ if id is None:
2820
+ raise ValueError("Missing required parameter 'id'")
2821
+ request_body = {
2822
+ 'id': id,
2823
+ }
2824
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2825
+ url = f"{self.base_url}/v2/calendars/{calendar}/disconnect"
2826
+ query_params = {}
2827
+ response = self._post(url, data=request_body, params=query_params)
2828
+ response.raise_for_status()
2829
+ return response.json()
2830
+
2831
+ def conferencing_controller_connect(self, app) -> dict[str, Any]:
2832
+ """
2833
+ Connects to the conferencing service for the specified application and returns the response data.
2834
+
2835
+ Args:
2836
+ app: The application identifier to connect conferencing for. Must not be None.
2837
+
2838
+ Returns:
2839
+ A dictionary containing the JSON response data from the conferencing connect endpoint.
2840
+
2841
+ Raises:
2842
+ ValueError: If 'app' is None.
2843
+ requests.HTTPError: If the HTTP request returns an unsuccessful status code.
2844
+
2845
+ Tags:
2846
+ connect, conferencing, api, async-job
2847
+ """
2848
+ if app is None:
2849
+ raise ValueError("Missing required parameter 'app'")
2850
+ url = f"{self.base_url}/v2/conferencing/{app}/connect"
2851
+ query_params = {}
2852
+ response = self._post(url, data={}, params=query_params)
2853
+ response.raise_for_status()
2854
+ return response.json()
2855
+
2856
+ def conferencing_controller_redirect(self, app, returnTo, onErrorReturnTo) -> dict[str, Any]:
2857
+ """
2858
+ Constructs and requests an OAuth conferencing redirect URL for the specified app, handling success and error redirects.
2859
+
2860
+ Args:
2861
+ app: str. The identifier of the conferencing application to initiate the OAuth flow for.
2862
+ returnTo: str. The URL to redirect to upon successful authentication.
2863
+ onErrorReturnTo: str. The URL to redirect to if authentication fails.
2864
+
2865
+ Returns:
2866
+ dict[str, Any]: A dictionary containing the JSON response from the OAuth URL endpoint.
2867
+
2868
+ Raises:
2869
+ ValueError: If any of the required parameters ('app', 'returnTo', 'onErrorReturnTo') are None.
2870
+ requests.HTTPError: If the HTTP response indicates an unsuccessful status code.
2871
+
2872
+ Tags:
2873
+ conferencing, redirect, oauth, controller, api
2874
+ """
2875
+ if app is None:
2876
+ raise ValueError("Missing required parameter 'app'")
2877
+ if returnTo is None:
2878
+ raise ValueError("Missing required parameter 'returnTo'")
2879
+ if onErrorReturnTo is None:
2880
+ raise ValueError("Missing required parameter 'onErrorReturnTo'")
2881
+ url = f"{self.base_url}/v2/conferencing/{app}/oauth/auth-url"
2882
+ query_params = {k: v for k, v in [('returnTo', returnTo), ('onErrorReturnTo', onErrorReturnTo)] if v is not None}
2883
+ response = self._get(url, params=query_params)
2884
+ response.raise_for_status()
2885
+ return response.json()
2886
+
2887
+ def conferencing_controller_save(self, app, state, code) -> Any:
2888
+ """
2889
+ Handles an OAuth callback by sending the provided authorization code and state to the conferencing app's endpoint and returns the resulting authentication data.
2890
+
2891
+ Args:
2892
+ app: str. The identifier for the conferencing application (e.g., 'zoom', 'teams').
2893
+ state: str. The state parameter received during the OAuth callback, used to validate the OAuth flow.
2894
+ code: str. The authorization code received from the OAuth provider to exchange for tokens.
2895
+
2896
+ Returns:
2897
+ dict. The JSON response from the conferencing provider containing authentication or user information.
2898
+
2899
+ Raises:
2900
+ ValueError: If any of 'app', 'state', or 'code' parameters are None.
2901
+ requests.HTTPError: If the HTTP request to the OAuth callback endpoint fails.
2902
+
2903
+ Tags:
2904
+ conferencing, oauth, controller, save, authentication
2905
+ """
2906
+ if app is None:
2907
+ raise ValueError("Missing required parameter 'app'")
2908
+ if state is None:
2909
+ raise ValueError("Missing required parameter 'state'")
2910
+ if code is None:
2911
+ raise ValueError("Missing required parameter 'code'")
2912
+ url = f"{self.base_url}/v2/conferencing/{app}/oauth/callback"
2913
+ query_params = {k: v for k, v in [('state', state), ('code', code)] if v is not None}
2914
+ response = self._get(url, params=query_params)
2915
+ response.raise_for_status()
2916
+ return response.json()
2917
+
2918
+ def conferencing_controller_list_installed_conferencing_apps(self, ) -> dict[str, Any]:
2919
+ """
2920
+ Retrieves a list of all installed conferencing applications from the conferencing API endpoint.
2921
+
2922
+ Args:
2923
+ None: This function takes no arguments
2924
+
2925
+ Returns:
2926
+ A dictionary containing details of the installed conferencing applications as returned by the API.
2927
+
2928
+ Raises:
2929
+ HTTPError: If the HTTP request to the conferencing API endpoint fails or returns an unsuccessful status code.
2930
+
2931
+ Tags:
2932
+ list, conferencing, api
2933
+ """
2934
+ url = f"{self.base_url}/v2/conferencing"
2935
+ query_params = {}
2936
+ response = self._get(url, params=query_params)
2937
+ response.raise_for_status()
2938
+ return response.json()
2939
+
2940
+ def conferencing_controller_default(self, app) -> dict[str, Any]:
2941
+ """
2942
+ Retrieves the default conferencing configuration for a specified application.
2943
+
2944
+ Args:
2945
+ app: str. The identifier of the application whose default conferencing configuration is to be fetched.
2946
+
2947
+ Returns:
2948
+ dict[str, Any]: The default conferencing configuration for the given application as a dictionary.
2949
+
2950
+ Raises:
2951
+ ValueError: If the 'app' parameter is None.
2952
+ requests.HTTPError: If the HTTP request to fetch the default conferencing configuration fails.
2953
+
2954
+ Tags:
2955
+ retrieve, conferencing, default, management
2956
+ """
2957
+ if app is None:
2958
+ raise ValueError("Missing required parameter 'app'")
2959
+ url = f"{self.base_url}/v2/conferencing/{app}/default"
2960
+ query_params = {}
2961
+ response = self._post(url, data={}, params=query_params)
2962
+ response.raise_for_status()
2963
+ return response.json()
2964
+
2965
+ def conferencing_controller_get_default(self, ) -> dict[str, Any]:
2966
+ """
2967
+ Retrieves the default conferencing settings from the server.
2968
+
2969
+ Args:
2970
+ None: This function takes no arguments
2971
+
2972
+ Returns:
2973
+ A dictionary containing the default conferencing settings as returned by the API.
2974
+
2975
+ Raises:
2976
+ requests.HTTPError: If the HTTP request to fetch the default conferencing settings fails or an error response is returned.
2977
+
2978
+ Tags:
2979
+ get, conferencing, settings
2980
+ """
2981
+ url = f"{self.base_url}/v2/conferencing/default"
2982
+ query_params = {}
2983
+ response = self._get(url, params=query_params)
2984
+ response.raise_for_status()
2985
+ return response.json()
2986
+
2987
+ def conferencing_controller_disconnect(self, app) -> dict[str, Any]:
2988
+ """
2989
+ Disconnects an active conferencing session for the specified application.
2990
+
2991
+ Args:
2992
+ app: str. The unique identifier of the application for which the conferencing session should be disconnected.
2993
+
2994
+ Returns:
2995
+ dict. A dictionary containing the server's JSON response to the disconnect operation.
2996
+
2997
+ Raises:
2998
+ ValueError: Raised if the 'app' parameter is None.
2999
+ requests.HTTPError: Raised if the HTTP request to disconnect the conferencing session fails.
3000
+
3001
+ Tags:
3002
+ disconnect, conferencing, management
3003
+ """
3004
+ if app is None:
3005
+ raise ValueError("Missing required parameter 'app'")
3006
+ url = f"{self.base_url}/v2/conferencing/{app}/disconnect"
3007
+ query_params = {}
3008
+ response = self._delete(url, params=query_params)
3009
+ response.raise_for_status()
3010
+ return response.json()
3011
+
3012
+ def destination_calendars_controller_update_destination_calendars(self, integration, externalId) -> dict[str, Any]:
3013
+ """
3014
+ Updates destination calendar information using the provided integration and external ID.
3015
+
3016
+ Args:
3017
+ integration: Integration identifier or data required for updating the destination calendar.
3018
+ externalId: External identifier associated with the destination calendar.
3019
+
3020
+ Returns:
3021
+ A dictionary containing the JSON response from the updated destination calendar API.
3022
+
3023
+ Raises:
3024
+ ValueError: Raised if 'integration' or 'externalId' is None.
3025
+ requests.HTTPError: Raised if the HTTP request for updating the destination calendar fails.
3026
+
3027
+ Tags:
3028
+ update, destination-calendars, calendar-management, api
3029
+ """
3030
+ if integration is None:
3031
+ raise ValueError("Missing required parameter 'integration'")
3032
+ if externalId is None:
3033
+ raise ValueError("Missing required parameter 'externalId'")
3034
+ request_body = {
3035
+ 'integration': integration,
3036
+ 'externalId': externalId,
3037
+ }
3038
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3039
+ url = f"{self.base_url}/v2/destination-calendars"
3040
+ query_params = {}
3041
+ response = self._put(url, data=request_body, params=query_params)
3042
+ response.raise_for_status()
3043
+ return response.json()
3044
+
3045
+ def event_types_controller_2024_06_14_get_event_types(self, username=None, eventSlug=None, usernames=None, orgSlug=None, orgId=None) -> dict[str, Any]:
3046
+ """
3047
+ Retrieves a list of event types from the API using optional filtering parameters.
3048
+
3049
+ Args:
3050
+ username: Optional; a string specifying a single username to filter event types by user.
3051
+ eventSlug: Optional; a string specifying a particular event slug to filter event types.
3052
+ usernames: Optional; a list or string of usernames to filter event types by multiple users.
3053
+ orgSlug: Optional; a string specifying the organization slug to filter event types by organization.
3054
+ orgId: Optional; an integer or string specifying the organization ID to filter event types.
3055
+
3056
+ Returns:
3057
+ A dictionary containing the JSON response from the API with the filtered list of event types.
3058
+
3059
+ Raises:
3060
+ requests.HTTPError: If the HTTP request to the API fails or returns an error response.
3061
+
3062
+ Tags:
3063
+ get, list, event-types, api, filter
3064
+ """
3065
+ url = f"{self.base_url}/v2/event-types"
3066
+ query_params = {k: v for k, v in [('username', username), ('eventSlug', eventSlug), ('usernames', usernames), ('orgSlug', orgSlug), ('orgId', orgId)] if v is not None}
3067
+ response = self._get(url, params=query_params)
3068
+ response.raise_for_status()
3069
+ return response.json()
3070
+
3071
+ def event_types_controller_2024_06_14_get_event_type_by_id(self, eventTypeId) -> dict[str, Any]:
3072
+ """
3073
+ Retrieves detailed information for a specific event type by its unique identifier.
3074
+
3075
+ Args:
3076
+ eventTypeId: str. The unique identifier of the event type to retrieve. Must not be None.
3077
+
3078
+ Returns:
3079
+ dict[str, Any]: A dictionary containing the event type details as returned from the API.
3080
+
3081
+ Raises:
3082
+ ValueError: Raised if 'eventTypeId' is None.
3083
+ requests.HTTPError: Raised if the API response indicates an HTTP error.
3084
+
3085
+ Tags:
3086
+ get, event-type, api
3087
+ """
3088
+ if eventTypeId is None:
3089
+ raise ValueError("Missing required parameter 'eventTypeId'")
3090
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}"
3091
+ query_params = {}
3092
+ response = self._get(url, params=query_params)
3093
+ response.raise_for_status()
3094
+ return response.json()
3095
+
3096
+ def event_types_controller_2024_06_14_delete_event_type(self, eventTypeId) -> dict[str, Any]:
3097
+ """
3098
+ Deletes an event type specified by its ID from the event types resource.
3099
+
3100
+ Args:
3101
+ eventTypeId: str. The unique identifier of the event type to be deleted.
3102
+
3103
+ Returns:
3104
+ dict. Parsed JSON response from the API indicating the status or result of the delete operation.
3105
+
3106
+ Raises:
3107
+ ValueError: Raised if 'eventTypeId' is None.
3108
+ HTTPError: Raised if the HTTP request to delete the event type fails with a non-success status code.
3109
+
3110
+ Tags:
3111
+ delete, event-type, api
3112
+ """
3113
+ if eventTypeId is None:
3114
+ raise ValueError("Missing required parameter 'eventTypeId'")
3115
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}"
3116
+ query_params = {}
3117
+ response = self._delete(url, params=query_params)
3118
+ response.raise_for_status()
3119
+ return response.json()
3120
+
3121
+ def event_type_webhooks_controller_create_event_type_webhook(self, eventTypeId, active, subscriberUrl, triggers, payloadTemplate=None, secret=None) -> dict[str, Any]:
3122
+ """
3123
+ Creates a new webhook for a specific event type, registering a subscriber endpoint to receive event notifications based on defined triggers.
3124
+
3125
+ Args:
3126
+ eventTypeId: str. Unique identifier of the event type for which the webhook will be created.
3127
+ active: bool. Indicates whether the webhook should be active upon creation.
3128
+ subscriberUrl: str. URL of the subscriber endpoint that will receive webhook event notifications.
3129
+ triggers: list. List of event triggers that determine when the webhook will be invoked.
3130
+ payloadTemplate: Optional[str]. Custom template for the webhook payload. Defaults to None.
3131
+ secret: Optional[str]. Secret used for validating webhook requests. Defaults to None.
3132
+
3133
+ Returns:
3134
+ dict. JSON response containing details of the created webhook.
3135
+
3136
+ Raises:
3137
+ ValueError: Raised if any required parameter (eventTypeId, active, subscriberUrl, or triggers) is missing.
3138
+ requests.HTTPError: Raised if the HTTP request to create the webhook fails with an error response.
3139
+
3140
+ Tags:
3141
+ create, webhook, event-type, management
3142
+ """
3143
+ if eventTypeId is None:
3144
+ raise ValueError("Missing required parameter 'eventTypeId'")
3145
+ if active is None:
3146
+ raise ValueError("Missing required parameter 'active'")
3147
+ if subscriberUrl is None:
3148
+ raise ValueError("Missing required parameter 'subscriberUrl'")
3149
+ if triggers is None:
3150
+ raise ValueError("Missing required parameter 'triggers'")
3151
+ request_body = {
3152
+ 'payloadTemplate': payloadTemplate,
3153
+ 'active': active,
3154
+ 'subscriberUrl': subscriberUrl,
3155
+ 'triggers': triggers,
3156
+ 'secret': secret,
3157
+ }
3158
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3159
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}/webhooks"
3160
+ query_params = {}
3161
+ response = self._post(url, data=request_body, params=query_params)
3162
+ response.raise_for_status()
3163
+ return response.json()
3164
+
3165
+ def event_type_webhooks_controller_get_event_type_webhooks(self, eventTypeId, take=None, skip=None) -> dict[str, Any]:
3166
+ """
3167
+ Retrieves a list of webhooks associated with a specific event type, supporting optional pagination.
3168
+
3169
+ Args:
3170
+ eventTypeId: str. The unique identifier for the event type whose webhooks are to be fetched. Required.
3171
+ take: Optional[int]. The maximum number of webhooks to return. Used for pagination.
3172
+ skip: Optional[int]. The number of webhooks to skip before starting to collect the result set. Used for pagination.
3173
+
3174
+ Returns:
3175
+ dict[str, Any]: A dictionary containing details of the webhooks associated with the specified event type.
3176
+
3177
+ Raises:
3178
+ ValueError: Raised if 'eventTypeId' is None.
3179
+ requests.HTTPError: Raised if the HTTP request to fetch webhooks fails (e.g., due to non-2xx response).
3180
+
3181
+ Tags:
3182
+ list, webhooks, event-type, api, pagination
3183
+ """
3184
+ if eventTypeId is None:
3185
+ raise ValueError("Missing required parameter 'eventTypeId'")
3186
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}/webhooks"
3187
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
3188
+ response = self._get(url, params=query_params)
3189
+ response.raise_for_status()
3190
+ return response.json()
3191
+
3192
+ def event_type_webhooks_controller_delete_all_event_type_webhooks(self, eventTypeId) -> dict[str, Any]:
3193
+ """
3194
+ Deletes all webhooks associated with a specific event type.
3195
+
3196
+ Args:
3197
+ eventTypeId: str. Unique identifier for the event type whose webhooks are to be deleted.
3198
+
3199
+ Returns:
3200
+ dict[str, Any]: A dictionary representing the response content from the API after deleting the webhooks.
3201
+
3202
+ Raises:
3203
+ ValueError: Raised if 'eventTypeId' is None.
3204
+ HTTPError: Raised if the HTTP response indicates an error status.
3205
+
3206
+ Tags:
3207
+ delete, webhooks, event-type, api, management
3208
+ """
3209
+ if eventTypeId is None:
3210
+ raise ValueError("Missing required parameter 'eventTypeId'")
3211
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}/webhooks"
3212
+ query_params = {}
3213
+ response = self._delete(url, params=query_params)
3214
+ response.raise_for_status()
3215
+ return response.json()
3216
+
3217
+ def event_type_webhooks_controller_update_event_type_webhook(self, eventTypeId, webhookId, payloadTemplate=None, active=None, subscriberUrl=None, triggers=None, secret=None) -> dict[str, Any]:
3218
+ """
3219
+ Updates an existing webhook for a specific event type with the provided parameters.
3220
+
3221
+ Args:
3222
+ eventTypeId: str. Unique identifier for the event type whose webhook is to be updated. Required.
3223
+ webhookId: str. Unique identifier for the webhook to update. Required.
3224
+ payloadTemplate: Optional[str]. Custom payload template configuration for the webhook.
3225
+ active: Optional[bool]. Indicates whether the webhook should be active.
3226
+ subscriberUrl: Optional[str]. The URL that will receive event callbacks.
3227
+ triggers: Optional[list]. List of event triggers that activate this webhook.
3228
+ secret: Optional[str]. Secret key used to sign webhook payloads for verification.
3229
+
3230
+ Returns:
3231
+ dict[str, Any]: A dictionary representing the updated webhook resource as returned by the API.
3232
+
3233
+ Raises:
3234
+ ValueError: Raised if required parameters 'eventTypeId' or 'webhookId' are missing.
3235
+ requests.HTTPError: Raised if the API request fails or returns an unsuccessful status code.
3236
+
3237
+ Tags:
3238
+ update, webhook, management, event-type, api
3239
+ """
3240
+ if eventTypeId is None:
3241
+ raise ValueError("Missing required parameter 'eventTypeId'")
3242
+ if webhookId is None:
3243
+ raise ValueError("Missing required parameter 'webhookId'")
3244
+ request_body = {
3245
+ 'payloadTemplate': payloadTemplate,
3246
+ 'active': active,
3247
+ 'subscriberUrl': subscriberUrl,
3248
+ 'triggers': triggers,
3249
+ 'secret': secret,
3250
+ }
3251
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3252
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}/webhooks/{webhookId}"
3253
+ query_params = {}
3254
+ response = self._patch(url, data=request_body, params=query_params)
3255
+ response.raise_for_status()
3256
+ return response.json()
3257
+
3258
+ def event_type_webhooks_controller_get_event_type_webhook(self, eventTypeId, webhookId) -> dict[str, Any]:
3259
+ """
3260
+ Retrieves details of a specific webhook configured for a given event type.
3261
+
3262
+ Args:
3263
+ eventTypeId: The unique identifier of the event type for which the webhook is configured.
3264
+ webhookId: The unique identifier of the webhook to retrieve.
3265
+
3266
+ Returns:
3267
+ A dictionary containing the webhook details associated with the specified event type.
3268
+
3269
+ Raises:
3270
+ ValueError: Raised if either 'eventTypeId' or 'webhookId' is not provided (i.e., is None).
3271
+ requests.HTTPError: Raised if the HTTP request to retrieve the webhook details fails.
3272
+
3273
+ Tags:
3274
+ get, webhook, event-type, management
3275
+ """
3276
+ if eventTypeId is None:
3277
+ raise ValueError("Missing required parameter 'eventTypeId'")
3278
+ if webhookId is None:
3279
+ raise ValueError("Missing required parameter 'webhookId'")
3280
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}/webhooks/{webhookId}"
3281
+ query_params = {}
3282
+ response = self._get(url, params=query_params)
3283
+ response.raise_for_status()
3284
+ return response.json()
3285
+
3286
+ def event_type_webhooks_controller_delete_event_type_webhook(self, eventTypeId, webhookId) -> dict[str, Any]:
3287
+ """
3288
+ Deletes a webhook associated with a specific event type by sending a DELETE request to the corresponding API endpoint.
3289
+
3290
+ Args:
3291
+ eventTypeId: The unique identifier of the event type whose webhook should be deleted.
3292
+ webhookId: The unique identifier of the webhook to be deleted.
3293
+
3294
+ Returns:
3295
+ A dictionary containing the API response data after successfully deleting the webhook.
3296
+
3297
+ Raises:
3298
+ ValueError: Raised if either 'eventTypeId' or 'webhookId' is None.
3299
+ requests.HTTPError: Raised if the HTTP request to delete the webhook fails (non-2xx status code).
3300
+
3301
+ Tags:
3302
+ delete, webhook, event-type, api, management
3303
+ """
3304
+ if eventTypeId is None:
3305
+ raise ValueError("Missing required parameter 'eventTypeId'")
3306
+ if webhookId is None:
3307
+ raise ValueError("Missing required parameter 'webhookId'")
3308
+ url = f"{self.base_url}/v2/event-types/{eventTypeId}/webhooks/{webhookId}"
3309
+ query_params = {}
3310
+ response = self._delete(url, params=query_params)
3311
+ response.raise_for_status()
3312
+ return response.json()
3313
+
3314
+ def me_controller_get_me(self, ) -> dict[str, Any]:
3315
+ """
3316
+ Retrieves the authenticated user's profile information from the API.
3317
+
3318
+ Returns:
3319
+ dict[str, Any]: A dictionary containing the user's profile details as returned by the API.
3320
+
3321
+ Raises:
3322
+ requests.HTTPError: If the HTTP request to retrieve the user profile fails or returns a non-success status code.
3323
+
3324
+ Tags:
3325
+ get, user, profile, api
3326
+ """
3327
+ url = f"{self.base_url}/v2/me"
3328
+ query_params = {}
3329
+ response = self._get(url, params=query_params)
3330
+ response.raise_for_status()
3331
+ return response.json()
3332
+
3333
+ def me_controller_update_me(self, email=None, name=None, timeFormat=None, defaultScheduleId=None, weekStart=None, timeZone=None, locale=None, avatarUrl=None) -> dict[str, Any]:
3334
+ """
3335
+ Updates the current user's profile information with the provided fields.
3336
+
3337
+ Args:
3338
+ email: Optional[str]. The new email address to update for the user.
3339
+ name: Optional[str]. The new display name for the user.
3340
+ timeFormat: Optional[str]. The preferred time format (e.g., '24h' or '12h') for the user.
3341
+ defaultScheduleId: Optional[str]. The default schedule identifier to assign to the user.
3342
+ weekStart: Optional[str]. The desired start day of the week (e.g., 'Monday').
3343
+ timeZone: Optional[str]. The user's preferred time zone.
3344
+ locale: Optional[str]. The user's preferred locale (e.g., 'en-US').
3345
+ avatarUrl: Optional[str]. URL for the new avatar image for the user.
3346
+
3347
+ Returns:
3348
+ dict[str, Any]: The updated user profile information as returned by the API.
3349
+
3350
+ Raises:
3351
+ requests.HTTPError: If the server returns an unsuccessful status code or the request fails.
3352
+
3353
+ Tags:
3354
+ update, profile, user, controller, api
3355
+ """
3356
+ request_body = {
3357
+ 'email': email,
3358
+ 'name': name,
3359
+ 'timeFormat': timeFormat,
3360
+ 'defaultScheduleId': defaultScheduleId,
3361
+ 'weekStart': weekStart,
3362
+ 'timeZone': timeZone,
3363
+ 'locale': locale,
3364
+ 'avatarUrl': avatarUrl,
3365
+ }
3366
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3367
+ url = f"{self.base_url}/v2/me"
3368
+ query_params = {}
3369
+ response = self._patch(url, data=request_body, params=query_params)
3370
+ response.raise_for_status()
3371
+ return response.json()
3372
+
3373
+ def schedules_controller_2024_06_11_create_schedule(self, name, timeZone, isDefault, availability=None, overrides=None) -> dict[str, Any]:
3374
+ """
3375
+ Creates a new schedule with the specified name, time zone, and settings.
3376
+
3377
+ Args:
3378
+ name: str. The name for the new schedule. Must not be None.
3379
+ timeZone: str. The IANA time zone identifier for the schedule. Must not be None.
3380
+ isDefault: bool. Indicates if this schedule is the default. Must not be None.
3381
+ availability: Optional[list[dict]]. The standard availability blocks for the schedule, or None.
3382
+ overrides: Optional[list[dict]]. Override rules to apply to this schedule, or None.
3383
+
3384
+ Returns:
3385
+ dict. The API response containing details of the newly created schedule.
3386
+
3387
+ Raises:
3388
+ ValueError: If any of the required parameters ('name', 'timeZone', or 'isDefault') are None.
3389
+ requests.HTTPError: If the API request to create the schedule fails (e.g., non-2xx response).
3390
+
3391
+ Tags:
3392
+ create, schedule, management, api
3393
+ """
3394
+ if name is None:
3395
+ raise ValueError("Missing required parameter 'name'")
3396
+ if timeZone is None:
3397
+ raise ValueError("Missing required parameter 'timeZone'")
3398
+ if isDefault is None:
3399
+ raise ValueError("Missing required parameter 'isDefault'")
3400
+ request_body = {
3401
+ 'name': name,
3402
+ 'timeZone': timeZone,
3403
+ 'availability': availability,
3404
+ 'isDefault': isDefault,
3405
+ 'overrides': overrides,
3406
+ }
3407
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3408
+ url = f"{self.base_url}/v2/schedules"
3409
+ query_params = {}
3410
+ response = self._post(url, data=request_body, params=query_params)
3411
+ response.raise_for_status()
3412
+ return response.json()
3413
+
3414
+ def schedules_controller_2024_06_11_get_schedules(self, ) -> dict[str, Any]:
3415
+ """
3416
+ Retrieves the current list of schedules from the remote API.
3417
+
3418
+ Returns:
3419
+ A dictionary containing the API response data for all schedules.
3420
+
3421
+ Raises:
3422
+ HTTPError: If the HTTP request to retrieve schedules fails or returns an unsuccessful status code.
3423
+
3424
+ Tags:
3425
+ get, list, schedules, api
3426
+ """
3427
+ url = f"{self.base_url}/v2/schedules"
3428
+ query_params = {}
3429
+ response = self._get(url, params=query_params)
3430
+ response.raise_for_status()
3431
+ return response.json()
3432
+
3433
+ def schedules_controller_2024_06_11_get_default_schedule(self, ) -> dict[str, Any]:
3434
+ """
3435
+ Retrieves the default schedule configuration from the API.
3436
+
3437
+ Returns:
3438
+ A dictionary containing the default schedule configuration returned by the API.
3439
+
3440
+ Raises:
3441
+ HTTPError: If the HTTP request to the API endpoint fails or returns an unsuccessful status code.
3442
+
3443
+ Tags:
3444
+ get, schedule, api, management
3445
+ """
3446
+ url = f"{self.base_url}/v2/schedules/default"
3447
+ query_params = {}
3448
+ response = self._get(url, params=query_params)
3449
+ response.raise_for_status()
3450
+ return response.json()
3451
+
3452
+ def schedules_controller_2024_06_11_get_schedule(self, scheduleId) -> dict[str, Any]:
3453
+ """
3454
+ Retrieves the details of a specific schedule by its ID.
3455
+
3456
+ Args:
3457
+ scheduleId: The unique identifier of the schedule to retrieve.
3458
+
3459
+ Returns:
3460
+ A dictionary containing the schedule details as returned by the API.
3461
+
3462
+ Raises:
3463
+ ValueError: If the required parameter 'scheduleId' is not provided.
3464
+ requests.HTTPError: If the HTTP request to fetch the schedule fails due to a non-success status code.
3465
+
3466
+ Tags:
3467
+ get, schedule, fetch, api
3468
+ """
3469
+ if scheduleId is None:
3470
+ raise ValueError("Missing required parameter 'scheduleId'")
3471
+ url = f"{self.base_url}/v2/schedules/{scheduleId}"
3472
+ query_params = {}
3473
+ response = self._get(url, params=query_params)
3474
+ response.raise_for_status()
3475
+ return response.json()
3476
+
3477
+ def schedules_controller_2024_06_11_update_schedule(self, scheduleId, name=None, timeZone=None, availability=None, isDefault=None, overrides=None) -> dict[str, Any]:
3478
+ """
3479
+ Updates an existing schedule with new details such as name, time zone, availability, default status, or overrides.
3480
+
3481
+ Args:
3482
+ scheduleId: str. The unique identifier of the schedule to update. Required.
3483
+ name: str, optional. The new name of the schedule.
3484
+ timeZone: str, optional. The time zone of the schedule (e.g., 'America/New_York').
3485
+ availability: Any, optional. The updated availability settings for the schedule.
3486
+ isDefault: bool, optional. Whether this schedule should be set as the default.
3487
+ overrides: Any, optional. A list or mapping of overrides to apply to the schedule.
3488
+
3489
+ Returns:
3490
+ dict. The updated schedule object returned by the API.
3491
+
3492
+ Raises:
3493
+ ValueError: If 'scheduleId' is not provided.
3494
+ requests.HTTPError: If the HTTP request to update the schedule fails (non-success status code).
3495
+
3496
+ Tags:
3497
+ update, schedules, management, api, patch
3498
+ """
3499
+ if scheduleId is None:
3500
+ raise ValueError("Missing required parameter 'scheduleId'")
3501
+ request_body = {
3502
+ 'name': name,
3503
+ 'timeZone': timeZone,
3504
+ 'availability': availability,
3505
+ 'isDefault': isDefault,
3506
+ 'overrides': overrides,
3507
+ }
3508
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3509
+ url = f"{self.base_url}/v2/schedules/{scheduleId}"
3510
+ query_params = {}
3511
+ response = self._patch(url, data=request_body, params=query_params)
3512
+ response.raise_for_status()
3513
+ return response.json()
3514
+
3515
+ def schedules_controller_2024_06_11_delete_schedule(self, scheduleId) -> dict[str, Any]:
3516
+ """
3517
+ Deletes a schedule by its unique identifier.
3518
+
3519
+ Args:
3520
+ scheduleId: str. The unique identifier of the schedule to delete.
3521
+
3522
+ Returns:
3523
+ dict[str, Any]: The server response parsed as a dictionary containing the deletion result.
3524
+
3525
+ Raises:
3526
+ ValueError: If 'scheduleId' is None.
3527
+ HTTPError: If the HTTP request to delete the schedule fails.
3528
+
3529
+ Tags:
3530
+ delete, schedule, management
3531
+ """
3532
+ if scheduleId is None:
3533
+ raise ValueError("Missing required parameter 'scheduleId'")
3534
+ url = f"{self.base_url}/v2/schedules/{scheduleId}"
3535
+ query_params = {}
3536
+ response = self._delete(url, params=query_params)
3537
+ response.raise_for_status()
3538
+ return response.json()
3539
+
3540
+ def selected_calendars_controller_add_selected_calendar(self, integration, externalId, credentialId) -> dict[str, Any]:
3541
+ """
3542
+ Adds a selected calendar to the user's account using the specified integration, external calendar ID, and credential ID.
3543
+
3544
+ Args:
3545
+ integration: The name or type of the calendar integration service (e.g., 'google', 'outlook').
3546
+ externalId: The external ID of the calendar to add, as provided by the integration service.
3547
+ credentialId: The credential identifier used to authenticate with the calendar integration.
3548
+
3549
+ Returns:
3550
+ A dictionary containing the details of the created selected calendar as returned by the API.
3551
+
3552
+ Raises:
3553
+ ValueError: Raised if any of the required parameters ('integration', 'externalId', 'credentialId') are None.
3554
+ requests.HTTPError: Raised if the HTTP request to the API fails or returns an error status code.
3555
+
3556
+ Tags:
3557
+ add, calendar, integration, controller
3558
+ """
3559
+ if integration is None:
3560
+ raise ValueError("Missing required parameter 'integration'")
3561
+ if externalId is None:
3562
+ raise ValueError("Missing required parameter 'externalId'")
3563
+ if credentialId is None:
3564
+ raise ValueError("Missing required parameter 'credentialId'")
3565
+ request_body = {
3566
+ 'integration': integration,
3567
+ 'externalId': externalId,
3568
+ 'credentialId': credentialId,
3569
+ }
3570
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3571
+ url = f"{self.base_url}/v2/selected-calendars"
3572
+ query_params = {}
3573
+ response = self._post(url, data=request_body, params=query_params)
3574
+ response.raise_for_status()
3575
+ return response.json()
3576
+
3577
+ def selected_calendars_controller_remove_selected_calendar(self, integration, externalId, credentialId) -> dict[str, Any]:
3578
+ """
3579
+ Removes a selected calendar integration by sending a DELETE request with the provided identifiers.
3580
+
3581
+ Args:
3582
+ integration: str. The integration type or name associated with the selected calendar to be removed.
3583
+ externalId: str. The external identifier of the calendar to be removed.
3584
+ credentialId: str. The identifier for the credentials associated with the calendar integration.
3585
+
3586
+ Returns:
3587
+ dict[str, Any]: The server response as a dictionary containing the result of the removal operation.
3588
+
3589
+ Raises:
3590
+ ValueError: Raised if any of the required parameters ('integration', 'externalId', or 'credentialId') are missing.
3591
+ requests.HTTPError: Raised if the HTTP request to remove the selected calendar fails (e.g., network errors, server errors).
3592
+
3593
+ Tags:
3594
+ remove, selected-calendar, controller, integration, delete
3595
+ """
3596
+ if integration is None:
3597
+ raise ValueError("Missing required parameter 'integration'")
3598
+ if externalId is None:
3599
+ raise ValueError("Missing required parameter 'externalId'")
3600
+ if credentialId is None:
3601
+ raise ValueError("Missing required parameter 'credentialId'")
3602
+ url = f"{self.base_url}/v2/selected-calendars"
3603
+ query_params = {k: v for k, v in [('integration', integration), ('externalId', externalId), ('credentialId', credentialId)] if v is not None}
3604
+ response = self._delete(url, params=query_params)
3605
+ response.raise_for_status()
3606
+ return response.json()
3607
+
3608
+ def slots_controller_reserve_slot(self, eventTypeId, slotUtcStartDate, slotUtcEndDate, bookingUid=None) -> dict[str, Any]:
3609
+ """
3610
+ Reserves a timeslot for a specified event type and returns the reservation details.
3611
+
3612
+ Args:
3613
+ eventTypeId: Unique identifier for the event type to reserve a slot for. Must not be None.
3614
+ slotUtcStartDate: UTC start datetime for the slot to be reserved. Must not be None.
3615
+ slotUtcEndDate: UTC end datetime for the slot to be reserved. Must not be None.
3616
+ bookingUid: Optional. Unique identifier of an existing booking to associate with the slot. If not provided, a new reservation is created.
3617
+
3618
+ Returns:
3619
+ A dictionary containing the details of the reserved slot as returned by the API.
3620
+
3621
+ Raises:
3622
+ ValueError: If any of the required parameters ('eventTypeId', 'slotUtcStartDate', 'slotUtcEndDate') are None.
3623
+ requests.HTTPError: If the HTTP request to reserve the slot fails or an unsuccessful status code is returned.
3624
+
3625
+ Tags:
3626
+ reserve, slot, event-management, api, important
3627
+ """
3628
+ if eventTypeId is None:
3629
+ raise ValueError("Missing required parameter 'eventTypeId'")
3630
+ if slotUtcStartDate is None:
3631
+ raise ValueError("Missing required parameter 'slotUtcStartDate'")
3632
+ if slotUtcEndDate is None:
3633
+ raise ValueError("Missing required parameter 'slotUtcEndDate'")
3634
+ request_body = {
3635
+ 'eventTypeId': eventTypeId,
3636
+ 'slotUtcStartDate': slotUtcStartDate,
3637
+ 'slotUtcEndDate': slotUtcEndDate,
3638
+ 'bookingUid': bookingUid,
3639
+ }
3640
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3641
+ url = f"{self.base_url}/v2/slots/reserve"
3642
+ query_params = {}
3643
+ response = self._post(url, data=request_body, params=query_params)
3644
+ response.raise_for_status()
3645
+ return response.json()
3646
+
3647
+ def slots_controller_delete_selected_slot(self, uid) -> dict[str, Any]:
3648
+ """
3649
+ Deletes the selected slot identified by the given UID using a DELETE request to the slots API.
3650
+
3651
+ Args:
3652
+ uid: str. Unique identifier of the slot to be deleted. Must not be None.
3653
+
3654
+ Returns:
3655
+ dict[str, Any]: JSON response from the API indicating the result of the deletion operation.
3656
+
3657
+ Raises:
3658
+ ValueError: If 'uid' is None.
3659
+ requests.HTTPError: If the HTTP request to the API fails (e.g., network error, 4XX/5XX HTTP status).
3660
+
3661
+ Tags:
3662
+ delete, slots, api, management
3663
+ """
3664
+ if uid is None:
3665
+ raise ValueError("Missing required parameter 'uid'")
3666
+ url = f"{self.base_url}/v2/slots/selected-slot"
3667
+ query_params = {k: v for k, v in [('uid', uid)] if v is not None}
3668
+ response = self._delete(url, params=query_params)
3669
+ response.raise_for_status()
3670
+ return response.json()
3671
+
3672
+ def slots_controller_get_available_slots(self, startTime, endTime, eventTypeId, eventTypeSlug=None, usernameList=None, duration=None, rescheduleUid=None, timeZone=None, orgSlug=None, slotFormat=None) -> dict[str, Any]:
3673
+ """
3674
+ Fetches available time slots for a specified event type between given start and end times, with optional filters such as users, duration, timezone, and organization.
3675
+
3676
+ Args:
3677
+ startTime: str. The start datetime (ISO 8601 format) to search for available slots. Required.
3678
+ endTime: str. The end datetime (ISO 8601 format) to search for available slots. Required.
3679
+ eventTypeId: str. The unique identifier of the event type to check slots for. Required.
3680
+ eventTypeSlug: str, optional. Slug identifier for the event type.
3681
+ usernameList: list[str], optional. List of usernames to restrict slot availability to specific users.
3682
+ duration: int, optional. Desired slot duration in minutes.
3683
+ rescheduleUid: str, optional. Unique identifier if rescheduling an existing event.
3684
+ timeZone: str, optional. IANA timezone name (e.g., 'America/New_York').
3685
+ orgSlug: str, optional. Slug identifier for the organization context.
3686
+ slotFormat: str, optional. Desired format for slot output.
3687
+
3688
+ Returns:
3689
+ dict. JSON response containing available slots and related metadata for the specified criteria.
3690
+
3691
+ Raises:
3692
+ ValueError: If any of the required parameters ('startTime', 'endTime', 'eventTypeId') are missing.
3693
+ requests.HTTPError: If the HTTP request to fetch slots fails with an error response.
3694
+
3695
+ Tags:
3696
+ list, slots, available, search, async_job, management, important
3697
+ """
3698
+ if startTime is None:
3699
+ raise ValueError("Missing required parameter 'startTime'")
3700
+ if endTime is None:
3701
+ raise ValueError("Missing required parameter 'endTime'")
3702
+ if eventTypeId is None:
3703
+ raise ValueError("Missing required parameter 'eventTypeId'")
3704
+ url = f"{self.base_url}/v2/slots/available"
3705
+ query_params = {k: v for k, v in [('startTime', startTime), ('endTime', endTime), ('eventTypeId', eventTypeId), ('eventTypeSlug', eventTypeSlug), ('usernameList', usernameList), ('duration', duration), ('rescheduleUid', rescheduleUid), ('timeZone', timeZone), ('orgSlug', orgSlug), ('slotFormat', slotFormat)] if v is not None}
3706
+ response = self._get(url, params=query_params)
3707
+ response.raise_for_status()
3708
+ return response.json()
3709
+
3710
+ def stripe_controller_redirect(self, ) -> dict[str, Any]:
3711
+ """
3712
+ Initiates a redirect to the Stripe Connect endpoint and returns the response as a JSON dictionary.
3713
+
3714
+ Returns:
3715
+ dict[str, Any]: The parsed JSON response from the Stripe Connect endpoint.
3716
+
3717
+ Raises:
3718
+ HTTPError: Raised if the HTTP request to the Stripe Connect endpoint returns an unsuccessful status code.
3719
+
3720
+ Tags:
3721
+ stripe, redirect, controller, api-call
3722
+ """
3723
+ url = f"{self.base_url}/v2/stripe/connect"
3724
+ query_params = {}
3725
+ response = self._get(url, params=query_params)
3726
+ response.raise_for_status()
3727
+ return response.json()
3728
+
3729
+ def stripe_controller_save(self, state, code) -> dict[str, Any]:
3730
+ """
3731
+ Saves the Stripe connection state and authorization code by making a request to the Stripe save endpoint.
3732
+
3733
+ Args:
3734
+ state: The OAuth state parameter used to validate the Stripe connection (str, required).
3735
+ code: The authorization code received from Stripe after user authentication (str, required).
3736
+
3737
+ Returns:
3738
+ A dictionary containing the JSON response from the Stripe save endpoint.
3739
+
3740
+ Raises:
3741
+ ValueError: Raised if 'state' or 'code' is None.
3742
+
3743
+ Tags:
3744
+ stripe, save, api, management
3745
+ """
3746
+ if state is None:
3747
+ raise ValueError("Missing required parameter 'state'")
3748
+ if code is None:
3749
+ raise ValueError("Missing required parameter 'code'")
3750
+ url = f"{self.base_url}/v2/stripe/save"
3751
+ query_params = {k: v for k, v in [('state', state), ('code', code)] if v is not None}
3752
+ response = self._get(url, params=query_params)
3753
+ response.raise_for_status()
3754
+ return response.json()
3755
+
3756
+ def stripe_controller_check(self, ) -> dict[str, Any]:
3757
+ """
3758
+ Checks the Stripe integration status by querying the Stripe check endpoint and returns the response as a dictionary.
3759
+
3760
+ Args:
3761
+ None: This function takes no arguments
3762
+
3763
+ Returns:
3764
+ A dictionary containing the response data from the Stripe check endpoint.
3765
+
3766
+ Raises:
3767
+ requests.exceptions.HTTPError: If the HTTP request to the Stripe check endpoint returns an unsuccessful status code.
3768
+ requests.exceptions.RequestException: For errors during the HTTP request, such as network issues or timeouts.
3769
+
3770
+ Tags:
3771
+ check, stripe, status, api
3772
+ """
3773
+ url = f"{self.base_url}/v2/stripe/check"
3774
+ query_params = {}
3775
+ response = self._get(url, params=query_params)
3776
+ response.raise_for_status()
3777
+ return response.json()
3778
+
3779
+ def stripe_controller_check_team_stripe_connection(self, teamId) -> dict[str, Any]:
3780
+ """
3781
+ Checks whether a Stripe connection exists for the specified team by making a GET request to the Stripe service endpoint.
3782
+
3783
+ Args:
3784
+ teamId: str. The unique identifier of the team for which to check the Stripe connection.
3785
+
3786
+ Returns:
3787
+ dict[str, Any]: The JSON response from the Stripe check endpoint containing the connection status details.
3788
+
3789
+ Raises:
3790
+ ValueError: Raised if 'teamId' is None.
3791
+ requests.HTTPError: Raised if the HTTP request to the Stripe endpoint fails.
3792
+
3793
+ Tags:
3794
+ check, stripe, team, api
3795
+ """
3796
+ if teamId is None:
3797
+ raise ValueError("Missing required parameter 'teamId'")
3798
+ url = f"{self.base_url}/v2/stripe/check/{teamId}"
3799
+ query_params = {}
3800
+ response = self._get(url, params=query_params)
3801
+ response.raise_for_status()
3802
+ return response.json()
3803
+
3804
+ def teams_controller_create_team(self, name, slug=None, logoUrl=None, calVideoLogo=None, appLogo=None, appIconLogo=None, bio=None, hideBranding=None, isPrivate=None, hideBookATeamMember=None, metadata=None, theme=None, brandColor=None, darkBrandColor=None, bannerUrl=None, timeFormat=None, timeZone=None, weekStart=None, autoAcceptCreator=None) -> dict[str, Any]:
3805
+ """
3806
+ Creates a new team with the specified attributes and returns the created team's details as a dictionary.
3807
+
3808
+ Args:
3809
+ name: str. The name of the team to create. Required.
3810
+ slug: str or None. Optional team slug (short identifier).
3811
+ logoUrl: str or None. Optional URL to the team's logo.
3812
+ calVideoLogo: str or None. Optional URL to the calendar video logo.
3813
+ appLogo: str or None. Optional URL to the app logo.
3814
+ appIconLogo: str or None. Optional URL to the app icon logo.
3815
+ bio: str or None. Optional biography or description of the team.
3816
+ hideBranding: bool or None. Whether to hide branding. Optional.
3817
+ isPrivate: bool or None. Whether the team is private. Optional.
3818
+ hideBookATeamMember: bool or None. Whether to hide the 'Book a Team Member' option. Optional.
3819
+ metadata: dict or None. Optional metadata for the team.
3820
+ theme: str or None. Optional theme identifier.
3821
+ brandColor: str or None. Optional brand color in hex format.
3822
+ darkBrandColor: str or None. Optional dark brand color in hex format.
3823
+ bannerUrl: str or None. Optional URL to the team's banner image.
3824
+ timeFormat: str or None. Optional preferred time format (e.g., '12h', '24h').
3825
+ timeZone: str or None. Optional primary time zone for the team.
3826
+ weekStart: str or None. Optional day the week starts on (e.g., 'Monday').
3827
+ autoAcceptCreator: bool or None. Whether to auto-accept the team creator.
3828
+
3829
+ Returns:
3830
+ dict. A dictionary containing details of the newly created team as returned by the API.
3831
+
3832
+ Raises:
3833
+ ValueError: If the required parameter 'name' is not provided.
3834
+ requests.HTTPError: If the API response indicates an error (non-2xx status code).
3835
+
3836
+ Tags:
3837
+ create, team-management, api, important
3838
+ """
3839
+ if name is None:
3840
+ raise ValueError("Missing required parameter 'name'")
3841
+ request_body = {
3842
+ 'name': name,
3843
+ 'slug': slug,
3844
+ 'logoUrl': logoUrl,
3845
+ 'calVideoLogo': calVideoLogo,
3846
+ 'appLogo': appLogo,
3847
+ 'appIconLogo': appIconLogo,
3848
+ 'bio': bio,
3849
+ 'hideBranding': hideBranding,
3850
+ 'isPrivate': isPrivate,
3851
+ 'hideBookATeamMember': hideBookATeamMember,
3852
+ 'metadata': metadata,
3853
+ 'theme': theme,
3854
+ 'brandColor': brandColor,
3855
+ 'darkBrandColor': darkBrandColor,
3856
+ 'bannerUrl': bannerUrl,
3857
+ 'timeFormat': timeFormat,
3858
+ 'timeZone': timeZone,
3859
+ 'weekStart': weekStart,
3860
+ 'autoAcceptCreator': autoAcceptCreator,
3861
+ }
3862
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3863
+ url = f"{self.base_url}/v2/teams"
3864
+ query_params = {}
3865
+ response = self._post(url, data=request_body, params=query_params)
3866
+ response.raise_for_status()
3867
+ return response.json()
3868
+
3869
+ def teams_controller_get_teams(self, ) -> dict[str, Any]:
3870
+ """
3871
+ Retrieves a list of teams from the API using a GET request.
3872
+
3873
+ Args:
3874
+ None: This function takes no arguments
3875
+
3876
+ Returns:
3877
+ dict[str, Any]: The parsed JSON response containing the list of teams and associated data.
3878
+
3879
+ Raises:
3880
+ requests.HTTPError: If the HTTP request returned an unsuccessful status code.
3881
+
3882
+ Tags:
3883
+ get, teams, api-call, list, important
3884
+ """
3885
+ url = f"{self.base_url}/v2/teams"
3886
+ query_params = {}
3887
+ response = self._get(url, params=query_params)
3888
+ response.raise_for_status()
3889
+ return response.json()
3890
+
3891
+ def teams_controller_get_team(self, teamId) -> dict[str, Any]:
3892
+ """
3893
+ Retrieves details about a specific team by its unique identifier.
3894
+
3895
+ Args:
3896
+ teamId: str. The unique identifier of the team to retrieve.
3897
+
3898
+ Returns:
3899
+ dict[str, Any]: A dictionary containing the team's details as returned by the API.
3900
+
3901
+ Raises:
3902
+ ValueError: If the 'teamId' parameter is None.
3903
+ requests.exceptions.HTTPError: If the HTTP request to retrieve the team details fails.
3904
+
3905
+ Tags:
3906
+ get, team, management, api, important
3907
+ """
3908
+ if teamId is None:
3909
+ raise ValueError("Missing required parameter 'teamId'")
3910
+ url = f"{self.base_url}/v2/teams/{teamId}"
3911
+ query_params = {}
3912
+ response = self._get(url, params=query_params)
3913
+ response.raise_for_status()
3914
+ return response.json()
3915
+
3916
+ def teams_controller_update_team(self, teamId, name=None, slug=None, logoUrl=None, calVideoLogo=None, appLogo=None, appIconLogo=None, bio=None, hideBranding=None, isPrivate=None, hideBookATeamMember=None, metadata=None, theme=None, brandColor=None, darkBrandColor=None, bannerUrl=None, timeFormat=None, timeZone=None, weekStart=None, bookingLimits=None, includeManagedEventsInLimits=None) -> dict[str, Any]:
3917
+ """
3918
+ Updates the details of an existing team with the provided attributes.
3919
+
3920
+ Args:
3921
+ teamId: str. The unique identifier of the team to update. Required.
3922
+ name: str, optional. The display name for the team.
3923
+ slug: str, optional. URL-friendly team identifier.
3924
+ logoUrl: str, optional. URL of the team's primary logo.
3925
+ calVideoLogo: str, optional. URL of the team's logo for calendar video integrations.
3926
+ appLogo: str, optional. URL of the team's logo for app displays.
3927
+ appIconLogo: str, optional. URL of the team's icon logo for apps.
3928
+ bio: str, optional. Text description or biography for the team.
3929
+ hideBranding: bool, optional. Whether to hide all branding for the team.
3930
+ isPrivate: bool, optional. Whether the team is private.
3931
+ hideBookATeamMember: bool, optional. Whether to hide the 'Book a Team Member' option.
3932
+ metadata: dict, optional. Custom metadata associated with the team.
3933
+ theme: str, optional. Identifier or configuration for the team's visual theme.
3934
+ brandColor: str, optional. Hex color code for the default brand color.
3935
+ darkBrandColor: str, optional. Hex color code for the brand color in dark mode.
3936
+ bannerUrl: str, optional. URL for the team's banner image.
3937
+ timeFormat: str, optional. Preferred time display format (e.g., '24h' or '12h').
3938
+ timeZone: str, optional. Default time zone for the team.
3939
+ weekStart: str, optional. Day of the week the team's calendar should start on.
3940
+ bookingLimits: dict, optional. Limits on bookings for the team.
3941
+ includeManagedEventsInLimits: bool, optional. Whether managed events are included in booking limits.
3942
+
3943
+ Returns:
3944
+ dict[str, Any]: A dictionary containing the updated team details as returned by the backend API.
3945
+
3946
+ Raises:
3947
+ ValueError: If 'teamId' is not provided.
3948
+ requests.HTTPError: If the API request fails or returns an error response.
3949
+
3950
+ Tags:
3951
+ update, team, management, api, patch
3952
+ """
3953
+ if teamId is None:
3954
+ raise ValueError("Missing required parameter 'teamId'")
3955
+ request_body = {
3956
+ 'name': name,
3957
+ 'slug': slug,
3958
+ 'logoUrl': logoUrl,
3959
+ 'calVideoLogo': calVideoLogo,
3960
+ 'appLogo': appLogo,
3961
+ 'appIconLogo': appIconLogo,
3962
+ 'bio': bio,
3963
+ 'hideBranding': hideBranding,
3964
+ 'isPrivate': isPrivate,
3965
+ 'hideBookATeamMember': hideBookATeamMember,
3966
+ 'metadata': metadata,
3967
+ 'theme': theme,
3968
+ 'brandColor': brandColor,
3969
+ 'darkBrandColor': darkBrandColor,
3970
+ 'bannerUrl': bannerUrl,
3971
+ 'timeFormat': timeFormat,
3972
+ 'timeZone': timeZone,
3973
+ 'weekStart': weekStart,
3974
+ 'bookingLimits': bookingLimits,
3975
+ 'includeManagedEventsInLimits': includeManagedEventsInLimits,
3976
+ }
3977
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3978
+ url = f"{self.base_url}/v2/teams/{teamId}"
3979
+ query_params = {}
3980
+ response = self._patch(url, data=request_body, params=query_params)
3981
+ response.raise_for_status()
3982
+ return response.json()
3983
+
3984
+ def teams_controller_delete_team(self, teamId) -> dict[str, Any]:
3985
+ """
3986
+ Deletes a team by its unique identifier using an HTTP DELETE request.
3987
+
3988
+ Args:
3989
+ teamId: The unique identifier of the team to be deleted. Must not be None.
3990
+
3991
+ Returns:
3992
+ A dictionary containing the response data from the API upon successful deletion of the team.
3993
+
3994
+ Raises:
3995
+ ValueError: If 'teamId' is None.
3996
+ requests.HTTPError: If the HTTP request fails or the response status code indicates an error.
3997
+
3998
+ Tags:
3999
+ delete, team-management, api
4000
+ """
4001
+ if teamId is None:
4002
+ raise ValueError("Missing required parameter 'teamId'")
4003
+ url = f"{self.base_url}/v2/teams/{teamId}"
4004
+ query_params = {}
4005
+ response = self._delete(url, params=query_params)
4006
+ response.raise_for_status()
4007
+ return response.json()
4008
+
4009
+ def teams_event_types_controller_create_team_event_type(self, teamId, lengthInMinutes, lengthInMinutesOptions, title, slug, schedulingType, hosts, description=None, locations=None, bookingFields=None, disableGuests=None, slotInterval=None, minimumBookingNotice=None, beforeEventBuffer=None, afterEventBuffer=None, scheduleId=None, bookingLimitsCount=None, onlyShowFirstAvailableSlot=None, bookingLimitsDuration=None, bookingWindow=None, offsetStart=None, bookerLayouts=None, confirmationPolicy=None, recurrence=None, requiresBookerEmailVerification=None, hideCalendarNotes=None, lockTimeZoneToggleOnBookingPage=None, color=None, seats=None, customName=None, destinationCalendar=None, useDestinationCalendarEmail=None, hideCalendarEventDetails=None, successRedirectUrl=None, assignAllTeamMembers=None) -> dict[str, Any]:
4010
+ """
4011
+ Creates a new team event type by sending a POST request with the specified configuration parameters.
4012
+
4013
+ Args:
4014
+ teamId: str. Unique identifier of the team for which the event type is being created.
4015
+ lengthInMinutes: int. Default duration of the event in minutes.
4016
+ lengthInMinutesOptions: list[int]. List of allowed event durations (in minutes).
4017
+ title: str. Title of the event type.
4018
+ slug: str. URL-friendly unique string identifier for the event type.
4019
+ schedulingType: str. The method or policy by which the event can be scheduled.
4020
+ hosts: list[str] or list[int]. Identifiers of team members who will host the event.
4021
+ description: str, optional. Description of the event type.
4022
+ locations: list[dict] or None, optional. Possible locations for the event.
4023
+ bookingFields: list[dict] or None, optional. Additional custom fields required during booking.
4024
+ disableGuests: bool or None, optional. Whether to disable guest addition for the event.
4025
+ slotInterval: int or None, optional. Interval in minutes between possible time slots.
4026
+ minimumBookingNotice: int or None, optional. Minimum notice (in minutes) required to book the event.
4027
+ beforeEventBuffer: int or None, optional. Buffer time (in minutes) before the event.
4028
+ afterEventBuffer: int or None, optional. Buffer time (in minutes) after the event.
4029
+ scheduleId: str or None, optional. Identifier of the associated schedule.
4030
+ bookingLimitsCount: int or None, optional. Maximum number of bookings allowed.
4031
+ onlyShowFirstAvailableSlot: bool or None, optional. Show only the first available slot to bookers.
4032
+ bookingLimitsDuration: int or None, optional. Booking window duration limit.
4033
+ bookingWindow: int or None, optional. Number of days in advance users can book.
4034
+ offsetStart: int or None, optional. Offset (in minutes) applied to the event’s start time.
4035
+ bookerLayouts: list[dict] or None, optional. Custom layouts for booker-facing forms.
4036
+ confirmationPolicy: dict or None, optional. Policies governing booking confirmations.
4037
+ recurrence: dict or None, optional. Recurrence rules for repeated bookings.
4038
+ requiresBookerEmailVerification: bool or None, optional. Whether email verification is required for bookers.
4039
+ hideCalendarNotes: bool or None, optional. Whether to hide calendar notes from bookers.
4040
+ lockTimeZoneToggleOnBookingPage: bool or None, optional. Lock the time zone toggle on the booking page.
4041
+ color: str or None, optional. Color code associated with the event type.
4042
+ seats: int or None, optional. Maximum number of seats available per event.
4043
+ customName: str or None, optional. Custom label or name for the event type.
4044
+ destinationCalendar: str or None, optional. Calendar to which bookings should be added.
4045
+ useDestinationCalendarEmail: bool or None, optional. Use calendar email as booking reference.
4046
+ hideCalendarEventDetails: bool or None, optional. Hide calendar event details from participants.
4047
+ successRedirectUrl: str or None, optional. Redirect URL after successful booking.
4048
+ assignAllTeamMembers: bool or None, optional. Assign all current team members as hosts.
4049
+
4050
+ Returns:
4051
+ dict[str, Any]: The JSON response from the server containing details of the created event type.
4052
+
4053
+ Raises:
4054
+ ValueError: Raised if any of the required parameters ('teamId', 'lengthInMinutes', 'lengthInMinutesOptions', 'title', 'slug', 'schedulingType', or 'hosts') are missing or None.
4055
+ HTTPError: Raised if the HTTP request to create the event type fails with an error response from the server.
4056
+
4057
+ Tags:
4058
+ create, event-type, team, api, management
4059
+ """
4060
+ if teamId is None:
4061
+ raise ValueError("Missing required parameter 'teamId'")
4062
+ if lengthInMinutes is None:
4063
+ raise ValueError("Missing required parameter 'lengthInMinutes'")
4064
+ if lengthInMinutesOptions is None:
4065
+ raise ValueError("Missing required parameter 'lengthInMinutesOptions'")
4066
+ if title is None:
4067
+ raise ValueError("Missing required parameter 'title'")
4068
+ if slug is None:
4069
+ raise ValueError("Missing required parameter 'slug'")
4070
+ if schedulingType is None:
4071
+ raise ValueError("Missing required parameter 'schedulingType'")
4072
+ if hosts is None:
4073
+ raise ValueError("Missing required parameter 'hosts'")
4074
+ request_body = {
4075
+ 'lengthInMinutes': lengthInMinutes,
4076
+ 'lengthInMinutesOptions': lengthInMinutesOptions,
4077
+ 'title': title,
4078
+ 'slug': slug,
4079
+ 'description': description,
4080
+ 'locations': locations,
4081
+ 'bookingFields': bookingFields,
4082
+ 'disableGuests': disableGuests,
4083
+ 'slotInterval': slotInterval,
4084
+ 'minimumBookingNotice': minimumBookingNotice,
4085
+ 'beforeEventBuffer': beforeEventBuffer,
4086
+ 'afterEventBuffer': afterEventBuffer,
4087
+ 'scheduleId': scheduleId,
4088
+ 'bookingLimitsCount': bookingLimitsCount,
4089
+ 'onlyShowFirstAvailableSlot': onlyShowFirstAvailableSlot,
4090
+ 'bookingLimitsDuration': bookingLimitsDuration,
4091
+ 'bookingWindow': bookingWindow,
4092
+ 'offsetStart': offsetStart,
4093
+ 'bookerLayouts': bookerLayouts,
4094
+ 'confirmationPolicy': confirmationPolicy,
4095
+ 'recurrence': recurrence,
4096
+ 'requiresBookerEmailVerification': requiresBookerEmailVerification,
4097
+ 'hideCalendarNotes': hideCalendarNotes,
4098
+ 'lockTimeZoneToggleOnBookingPage': lockTimeZoneToggleOnBookingPage,
4099
+ 'color': color,
4100
+ 'seats': seats,
4101
+ 'customName': customName,
4102
+ 'destinationCalendar': destinationCalendar,
4103
+ 'useDestinationCalendarEmail': useDestinationCalendarEmail,
4104
+ 'hideCalendarEventDetails': hideCalendarEventDetails,
4105
+ 'successRedirectUrl': successRedirectUrl,
4106
+ 'schedulingType': schedulingType,
4107
+ 'hosts': hosts,
4108
+ 'assignAllTeamMembers': assignAllTeamMembers,
4109
+ }
4110
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4111
+ url = f"{self.base_url}/v2/teams/{teamId}/event-types"
4112
+ query_params = {}
4113
+ response = self._post(url, data=request_body, params=query_params)
4114
+ response.raise_for_status()
4115
+ return response.json()
4116
+
4117
+ def teams_event_types_controller_get_team_event_types(self, teamId, eventSlug=None) -> dict[str, Any]:
4118
+ """
4119
+ Retrieves event type details for a specified team, optionally filtering by event slug.
4120
+
4121
+ Args:
4122
+ teamId: Unique identifier of the team for which to retrieve event types. Must not be None.
4123
+ eventSlug: Optional slug to filter event types by a specific event. Defaults to None.
4124
+
4125
+ Returns:
4126
+ Dictionary containing event type details for the specified team, as parsed from the API response JSON.
4127
+
4128
+ Raises:
4129
+ ValueError: If 'teamId' is not provided (None).
4130
+ requests.HTTPError: If the HTTP request to the event types endpoint returns an unsuccessful status code.
4131
+
4132
+ Tags:
4133
+ get, list, event-types, team, api
4134
+ """
4135
+ if teamId is None:
4136
+ raise ValueError("Missing required parameter 'teamId'")
4137
+ url = f"{self.base_url}/v2/teams/{teamId}/event-types"
4138
+ query_params = {k: v for k, v in [('eventSlug', eventSlug)] if v is not None}
4139
+ response = self._get(url, params=query_params)
4140
+ response.raise_for_status()
4141
+ return response.json()
4142
+
4143
+ def teams_event_types_controller_get_team_event_type(self, teamId, eventTypeId) -> dict[str, Any]:
4144
+ """
4145
+ Retrieves details of a specific event type for a given team.
4146
+
4147
+ Args:
4148
+ teamId: str. Unique identifier of the team whose event type is to be retrieved.
4149
+ eventTypeId: str. Unique identifier of the event type to retrieve.
4150
+
4151
+ Returns:
4152
+ dict. A dictionary containing details of the specified event type.
4153
+
4154
+ Raises:
4155
+ ValueError: Raised if 'teamId' or 'eventTypeId' is None.
4156
+ HTTPError: Raised if the request to the API endpoint returns an unsuccessful status code.
4157
+
4158
+ Tags:
4159
+ get, event-type, team, api, management
4160
+ """
4161
+ if teamId is None:
4162
+ raise ValueError("Missing required parameter 'teamId'")
4163
+ if eventTypeId is None:
4164
+ raise ValueError("Missing required parameter 'eventTypeId'")
4165
+ url = f"{self.base_url}/v2/teams/{teamId}/event-types/{eventTypeId}"
4166
+ query_params = {}
4167
+ response = self._get(url, params=query_params)
4168
+ response.raise_for_status()
4169
+ return response.json()
4170
+
4171
+ def teams_event_types_controller_delete_team_event_type(self, teamId, eventTypeId) -> dict[str, Any]:
4172
+ """
4173
+ Deletes an event type from a specified team using the given team and event type IDs.
4174
+
4175
+ Args:
4176
+ teamId: The unique identifier of the team from which the event type will be deleted.
4177
+ eventTypeId: The unique identifier of the event type to delete from the team.
4178
+
4179
+ Returns:
4180
+ A dictionary containing the API response data as parsed from JSON.
4181
+
4182
+ Raises:
4183
+ ValueError: Raised if either 'teamId' or 'eventTypeId' parameters are not provided.
4184
+ HTTPError: Raised if the HTTP request fails or the server responds with an error status code.
4185
+
4186
+ Tags:
4187
+ delete, event-type, team-management, api
4188
+ """
4189
+ if teamId is None:
4190
+ raise ValueError("Missing required parameter 'teamId'")
4191
+ if eventTypeId is None:
4192
+ raise ValueError("Missing required parameter 'eventTypeId'")
4193
+ url = f"{self.base_url}/v2/teams/{teamId}/event-types/{eventTypeId}"
4194
+ query_params = {}
4195
+ response = self._delete(url, params=query_params)
4196
+ response.raise_for_status()
4197
+ return response.json()
4198
+
4199
+ def teams_event_types_controller_create_phone_call(self, teamId, eventTypeId, yourPhoneNumber, numberToCall, calApiKey, enabled, templateType, schedulerName=None, guestName=None, guestEmail=None, guestCompany=None, beginMessage=None, generalPrompt=None) -> dict[str, Any]:
4200
+ """
4201
+ Creates a new phone call event type for a specific team and event type by sending a POST request with the provided call and template details.
4202
+
4203
+ Args:
4204
+ teamId: str. Unique identifier of the team for which the phone call event type is being created.
4205
+ eventTypeId: str. Unique identifier of the event type under which the phone call is created.
4206
+ yourPhoneNumber: str. Phone number to initiate the call from.
4207
+ numberToCall: str. Phone number to be called.
4208
+ calApiKey: str. API key for the Cal service to authorize the call.
4209
+ enabled: bool. Whether this phone call event type is enabled.
4210
+ templateType: str. The type of template used for the call.
4211
+ schedulerName: Optional[str]. Name of the scheduler initiating the call.
4212
+ guestName: Optional[str]. Name of the guest associated with the call.
4213
+ guestEmail: Optional[str]. Email of the guest.
4214
+ guestCompany: Optional[str]. Company name of the guest.
4215
+ beginMessage: Optional[str]. Message to play or deliver at the start of the call.
4216
+ generalPrompt: Optional[str]. General prompt or instruction for the call.
4217
+
4218
+ Returns:
4219
+ dict[str, Any]: A dictionary containing the JSON response from the server with details of the created phone call event type.
4220
+
4221
+ Raises:
4222
+ ValueError: If any of the required parameters (teamId, eventTypeId, yourPhoneNumber, numberToCall, calApiKey, enabled, or templateType) are missing or None.
4223
+ requests.HTTPError: If the HTTP request to the server returns an unsuccessful status code.
4224
+
4225
+ Tags:
4226
+ create, event-type, phone-call, teams, api, management
4227
+ """
4228
+ if teamId is None:
4229
+ raise ValueError("Missing required parameter 'teamId'")
4230
+ if eventTypeId is None:
4231
+ raise ValueError("Missing required parameter 'eventTypeId'")
4232
+ if yourPhoneNumber is None:
4233
+ raise ValueError("Missing required parameter 'yourPhoneNumber'")
4234
+ if numberToCall is None:
4235
+ raise ValueError("Missing required parameter 'numberToCall'")
4236
+ if calApiKey is None:
4237
+ raise ValueError("Missing required parameter 'calApiKey'")
4238
+ if enabled is None:
4239
+ raise ValueError("Missing required parameter 'enabled'")
4240
+ if templateType is None:
4241
+ raise ValueError("Missing required parameter 'templateType'")
4242
+ request_body = {
4243
+ 'yourPhoneNumber': yourPhoneNumber,
4244
+ 'numberToCall': numberToCall,
4245
+ 'calApiKey': calApiKey,
4246
+ 'enabled': enabled,
4247
+ 'templateType': templateType,
4248
+ 'schedulerName': schedulerName,
4249
+ 'guestName': guestName,
4250
+ 'guestEmail': guestEmail,
4251
+ 'guestCompany': guestCompany,
4252
+ 'beginMessage': beginMessage,
4253
+ 'generalPrompt': generalPrompt,
4254
+ }
4255
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4256
+ url = f"{self.base_url}/v2/teams/{teamId}/event-types/{eventTypeId}/create-phone-call"
4257
+ query_params = {}
4258
+ response = self._post(url, data=request_body, params=query_params)
4259
+ response.raise_for_status()
4260
+ return response.json()
4261
+
4262
+ def teams_memberships_controller_create_team_membership(self, teamId, userId, accepted=None, role=None, disableImpersonation=None) -> dict[str, Any]:
4263
+ """
4264
+ Creates a membership for a user in the specified team with optional role, acceptance, and impersonation settings.
4265
+
4266
+ Args:
4267
+ teamId: str. The unique identifier of the team to which the user will be added.
4268
+ userId: str. The unique identifier of the user to be added as a member to the team.
4269
+ accepted: Optional[bool]. Whether the membership is pre-accepted (if applicable).
4270
+ role: Optional[str]. The role to assign to the user within the team (e.g., 'member', 'admin').
4271
+ disableImpersonation: Optional[bool]. If True, disables impersonation capabilities for this membership.
4272
+
4273
+ Returns:
4274
+ dict[str, Any]: The JSON-decoded server response representing the created team membership details.
4275
+
4276
+ Raises:
4277
+ ValueError: If 'teamId' or 'userId' is None.
4278
+ requests.HTTPError: If the HTTP request fails or returns an unsuccessful status code.
4279
+
4280
+ Tags:
4281
+ create, team-membership, management
4282
+ """
4283
+ if teamId is None:
4284
+ raise ValueError("Missing required parameter 'teamId'")
4285
+ if userId is None:
4286
+ raise ValueError("Missing required parameter 'userId'")
4287
+ request_body = {
4288
+ 'userId': userId,
4289
+ 'accepted': accepted,
4290
+ 'role': role,
4291
+ 'disableImpersonation': disableImpersonation,
4292
+ }
4293
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4294
+ url = f"{self.base_url}/v2/teams/{teamId}/memberships"
4295
+ query_params = {}
4296
+ response = self._post(url, data=request_body, params=query_params)
4297
+ response.raise_for_status()
4298
+ return response.json()
4299
+
4300
+ def teams_memberships_controller_get_team_memberships(self, teamId, take=None, skip=None) -> dict[str, Any]:
4301
+ """
4302
+ Retrieves the list of team memberships for a specified team, supporting optional pagination.
4303
+
4304
+ Args:
4305
+ teamId: str. The unique identifier of the team for which memberships are requested.
4306
+ take: Optional[int]. The maximum number of team memberships to return.
4307
+ skip: Optional[int]. The number of team memberships to skip before retrieving the results.
4308
+
4309
+ Returns:
4310
+ dict[str, Any]: A dictionary containing team membership information as returned by the API.
4311
+
4312
+ Raises:
4313
+ ValueError: Raised if the 'teamId' parameter is not provided.
4314
+ requests.HTTPError: Raised if the HTTP request to retrieve memberships fails (e.g., network issues, non-2xx response).
4315
+
4316
+ Tags:
4317
+ list, team-memberships, management, api
4318
+ """
4319
+ if teamId is None:
4320
+ raise ValueError("Missing required parameter 'teamId'")
4321
+ url = f"{self.base_url}/v2/teams/{teamId}/memberships"
4322
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
4323
+ response = self._get(url, params=query_params)
4324
+ response.raise_for_status()
4325
+ return response.json()
4326
+
4327
+ def teams_memberships_controller_get_team_membership(self, teamId, membershipId) -> dict[str, Any]:
4328
+ """
4329
+ Retrieves a specific team membership's details by team and membership ID.
4330
+
4331
+ Args:
4332
+ teamId: The unique identifier of the team whose membership information is to be retrieved.
4333
+ membershipId: The unique identifier of the membership within the specified team.
4334
+
4335
+ Returns:
4336
+ A dictionary containing the membership details as returned from the API.
4337
+
4338
+ Raises:
4339
+ ValueError: Raised if either 'teamId' or 'membershipId' is None.
4340
+ requests.HTTPError: Raised if the HTTP request to the team's membership API endpoint fails.
4341
+
4342
+ Tags:
4343
+ get, team, membership, api
4344
+ """
4345
+ if teamId is None:
4346
+ raise ValueError("Missing required parameter 'teamId'")
4347
+ if membershipId is None:
4348
+ raise ValueError("Missing required parameter 'membershipId'")
4349
+ url = f"{self.base_url}/v2/teams/{teamId}/memberships/{membershipId}"
4350
+ query_params = {}
4351
+ response = self._get(url, params=query_params)
4352
+ response.raise_for_status()
4353
+ return response.json()
4354
+
4355
+ def teams_memberships_controller_update_team_membership(self, teamId, membershipId, accepted=None, role=None, disableImpersonation=None) -> dict[str, Any]:
4356
+ """
4357
+ Updates a team membership's properties, such as acceptance status, role, or impersonation settings, for a given team and membership ID.
4358
+
4359
+ Args:
4360
+ teamId: str. The unique identifier of the team whose membership is to be updated.
4361
+ membershipId: str. The unique identifier of the specific membership to update.
4362
+ accepted: Optional[bool]. Whether the membership is accepted. If None, this property is not updated.
4363
+ role: Optional[str]. The new role to assign to the membership. If None, this property is not updated.
4364
+ disableImpersonation: Optional[bool]. Whether to disable impersonation for the member. If None, this property is not updated.
4365
+
4366
+ Returns:
4367
+ dict[str, Any]: The updated team membership information as a JSON-compatible dictionary.
4368
+
4369
+ Raises:
4370
+ ValueError: Raised if 'teamId' or 'membershipId' parameters are missing.
4371
+ requests.HTTPError: Raised if the HTTP request to update the team membership fails.
4372
+
4373
+ Tags:
4374
+ update, team-membership, management, async_job
4375
+ """
4376
+ if teamId is None:
4377
+ raise ValueError("Missing required parameter 'teamId'")
4378
+ if membershipId is None:
4379
+ raise ValueError("Missing required parameter 'membershipId'")
4380
+ request_body = {
4381
+ 'accepted': accepted,
4382
+ 'role': role,
4383
+ 'disableImpersonation': disableImpersonation,
4384
+ }
4385
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4386
+ url = f"{self.base_url}/v2/teams/{teamId}/memberships/{membershipId}"
4387
+ query_params = {}
4388
+ response = self._patch(url, data=request_body, params=query_params)
4389
+ response.raise_for_status()
4390
+ return response.json()
4391
+
4392
+ def teams_memberships_controller_delete_team_membership(self, teamId, membershipId) -> dict[str, Any]:
4393
+ """
4394
+ Deletes a specific team membership by membership and team identifiers.
4395
+
4396
+ Args:
4397
+ teamId: The unique identifier of the team containing the membership to be deleted.
4398
+ membershipId: The unique identifier of the membership to delete from the team.
4399
+
4400
+ Returns:
4401
+ A dictionary containing the API response data after deleting the team membership.
4402
+
4403
+ Raises:
4404
+ ValueError: Raised if 'teamId' or 'membershipId' is None.
4405
+ HTTPError: Raised if the HTTP request to the API fails or returns an unsuccessful status code.
4406
+
4407
+ Tags:
4408
+ delete, membership-management, team, api
4409
+ """
4410
+ if teamId is None:
4411
+ raise ValueError("Missing required parameter 'teamId'")
4412
+ if membershipId is None:
4413
+ raise ValueError("Missing required parameter 'membershipId'")
4414
+ url = f"{self.base_url}/v2/teams/{teamId}/memberships/{membershipId}"
4415
+ query_params = {}
4416
+ response = self._delete(url, params=query_params)
4417
+ response.raise_for_status()
4418
+ return response.json()
4419
+
4420
+ def timezones_controller_get_time_zones(self, ) -> dict[str, Any]:
4421
+ """
4422
+ Retrieves the list of available time zones from the API.
4423
+
4424
+ Args:
4425
+ None: This function takes no arguments
4426
+
4427
+ Returns:
4428
+ dict: A dictionary containing time zone information as returned by the API.
4429
+
4430
+ Raises:
4431
+ HTTPError: If the API request fails or returns an unsuccessful HTTP status code.
4432
+
4433
+ Tags:
4434
+ get, timezones, api, list
4435
+ """
4436
+ url = f"{self.base_url}/v2/timezones"
4437
+ query_params = {}
4438
+ response = self._get(url, params=query_params)
4439
+ response.raise_for_status()
4440
+ return response.json()
4441
+
4442
+ def webhooks_controller_create_webhook(self, active, subscriberUrl, triggers, payloadTemplate=None, secret=None) -> dict[str, Any]:
4443
+ """
4444
+ Creates a new webhook subscription with the specified configuration.
4445
+
4446
+ Args:
4447
+ active: bool. Specifies whether the webhook should be active upon creation.
4448
+ subscriberUrl: str. The URL to which webhook events will be delivered.
4449
+ triggers: list. The list of event triggers that will invoke the webhook.
4450
+ payloadTemplate: str or None. Optional JSON template for customizing the event payload. Defaults to None.
4451
+ secret: str or None. Optional secret for signing webhook payloads. Defaults to None.
4452
+
4453
+ Returns:
4454
+ dict. A dictionary containing the created webhook's details as returned by the API.
4455
+
4456
+ Raises:
4457
+ ValueError: Raised if any required parameter ('active', 'subscriberUrl', or 'triggers') is missing.
4458
+ requests.HTTPError: Raised if the webhook creation request fails with an HTTP error status.
4459
+
4460
+ Tags:
4461
+ create, webhook, management, api
4462
+ """
4463
+ if active is None:
4464
+ raise ValueError("Missing required parameter 'active'")
4465
+ if subscriberUrl is None:
4466
+ raise ValueError("Missing required parameter 'subscriberUrl'")
4467
+ if triggers is None:
4468
+ raise ValueError("Missing required parameter 'triggers'")
4469
+ request_body = {
4470
+ 'payloadTemplate': payloadTemplate,
4471
+ 'active': active,
4472
+ 'subscriberUrl': subscriberUrl,
4473
+ 'triggers': triggers,
4474
+ 'secret': secret,
4475
+ }
4476
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4477
+ url = f"{self.base_url}/v2/webhooks"
4478
+ query_params = {}
4479
+ response = self._post(url, data=request_body, params=query_params)
4480
+ response.raise_for_status()
4481
+ return response.json()
4482
+
4483
+ def webhooks_controller_get_webhooks(self, take=None, skip=None) -> dict[str, Any]:
4484
+ """
4485
+ Retrieves a list of registered webhooks from the API with optional pagination parameters.
4486
+
4487
+ Args:
4488
+ take: Optional; int. The maximum number of webhooks to retrieve. If None, the API default is used.
4489
+ skip: Optional; int. The number of webhooks to skip from the beginning of the list. If None, no webhooks are skipped.
4490
+
4491
+ Returns:
4492
+ dict[str, Any]: A dictionary containing the list of webhooks and related metadata as returned by the API.
4493
+
4494
+ Raises:
4495
+ requests.HTTPError: Raised if the HTTP request to the API fails or returns an error status code.
4496
+
4497
+ Tags:
4498
+ list, webhooks, get, api, batch
4499
+ """
4500
+ url = f"{self.base_url}/v2/webhooks"
4501
+ query_params = {k: v for k, v in [('take', take), ('skip', skip)] if v is not None}
4502
+ response = self._get(url, params=query_params)
4503
+ response.raise_for_status()
4504
+ return response.json()
4505
+
4506
+ def webhooks_controller_update_webhook(self, webhookId, payloadTemplate=None, active=None, subscriberUrl=None, triggers=None, secret=None) -> dict[str, Any]:
4507
+ """
4508
+ Updates the specified webhook's configuration with provided parameters.
4509
+
4510
+ Args:
4511
+ webhookId: str. Unique identifier of the webhook to update. Required.
4512
+ payloadTemplate: Optional[str]. Custom payload template to use for webhook requests.
4513
+ active: Optional[bool]. Specifies whether the webhook should be active.
4514
+ subscriberUrl: Optional[str]. URL to which the webhook sends notifications.
4515
+ triggers: Optional[list]. List of events that trigger the webhook.
4516
+ secret: Optional[str]. Secret key used for webhook security validation.
4517
+
4518
+ Returns:
4519
+ dict[str, Any]: A dictionary containing the updated webhook's details as returned by the API.
4520
+
4521
+ Raises:
4522
+ ValueError: Raised if 'webhookId' is None.
4523
+ requests.HTTPError: Raised if the underlying HTTP request fails (non-2XX response).
4524
+
4525
+ Tags:
4526
+ update, webhook, management, api
4527
+ """
4528
+ if webhookId is None:
4529
+ raise ValueError("Missing required parameter 'webhookId'")
4530
+ request_body = {
4531
+ 'payloadTemplate': payloadTemplate,
4532
+ 'active': active,
4533
+ 'subscriberUrl': subscriberUrl,
4534
+ 'triggers': triggers,
4535
+ 'secret': secret,
4536
+ }
4537
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4538
+ url = f"{self.base_url}/v2/webhooks/{webhookId}"
4539
+ query_params = {}
4540
+ response = self._patch(url, data=request_body, params=query_params)
4541
+ response.raise_for_status()
4542
+ return response.json()
4543
+
4544
+ def webhooks_controller_get_webhook(self, webhookId) -> dict[str, Any]:
4545
+ """
4546
+ Retrieves details of a specific webhook using its unique identifier.
4547
+
4548
+ Args:
4549
+ webhookId: The unique identifier (str) of the webhook to retrieve. Must not be None.
4550
+
4551
+ Returns:
4552
+ A dictionary containing the webhook's details as returned by the server.
4553
+
4554
+ Raises:
4555
+ ValueError: If 'webhookId' is None.
4556
+ requests.HTTPError: If the HTTP request to retrieve the webhook fails.
4557
+
4558
+ Tags:
4559
+ get, webhook, fetch, api
4560
+ """
4561
+ if webhookId is None:
4562
+ raise ValueError("Missing required parameter 'webhookId'")
4563
+ url = f"{self.base_url}/v2/webhooks/{webhookId}"
4564
+ query_params = {}
4565
+ response = self._get(url, params=query_params)
4566
+ response.raise_for_status()
4567
+ return response.json()
4568
+
4569
+ def webhooks_controller_delete_webhook(self, webhookId) -> dict[str, Any]:
4570
+ """
4571
+ Deletes a webhook by its unique identifier.
4572
+
4573
+ Args:
4574
+ webhookId: str. The unique identifier of the webhook to be deleted.
4575
+
4576
+ Returns:
4577
+ dict. The response from the server as a JSON-decoded dictionary containing information about the deleted webhook.
4578
+
4579
+ Raises:
4580
+ ValueError: If 'webhookId' is None.
4581
+ requests.HTTPError: If the HTTP request to delete the webhook fails.
4582
+
4583
+ Tags:
4584
+ delete, webhook, management
4585
+ """
4586
+ if webhookId is None:
4587
+ raise ValueError("Missing required parameter 'webhookId'")
4588
+ url = f"{self.base_url}/v2/webhooks/{webhookId}"
4589
+ query_params = {}
4590
+ response = self._delete(url, params=query_params)
4591
+ response.raise_for_status()
4592
+ return response.json()
4593
+
4594
+ def list_tools(self):
4595
+ return [
4596
+ self.cal_provider_controller_verify_client_id,
4597
+ self.cal_provider_controller_verify_access_token,
4598
+ self.gcal_controller_redirect,
4599
+ self.gcal_controller_save,
4600
+ self.gcal_controller_check,
4601
+ self.oauth_client_users_controller_get_managed_users,
4602
+ self.oauth_client_users_controller_create_user,
4603
+ self.oauth_client_users_controller_get_user_by_id,
4604
+ self.oauth_client_users_controller_update_user,
4605
+ self.oauth_client_users_controller_delete_user,
4606
+ self.oauth_client_users_controller_force_refresh,
4607
+ self.oauth_flow_controller_refresh_tokens,
4608
+ self.oauth_client_webhooks_controller_create_oauth_client_webhook,
4609
+ self.oauth_client_webhooks_controller_get_oauth_client_webhooks,
4610
+ self.oauth_client_webhooks_controller_delete_all_oauth_client_webhooks,
4611
+ self.oauth_client_webhooks_controller_update_oauth_client_webhook,
4612
+ self.oauth_client_webhooks_controller_get_oauth_client_webhook,
4613
+ self.oauth_client_webhooks_controller_delete_oauth_client_webhook,
4614
+ self.organizations_attributes_controller_get_organization_attributes,
4615
+ self.organizations_attributes_controller_create_organization_attribute,
4616
+ self.organizations_attributes_controller_get_organization_attribute,
4617
+ self.organizations_attributes_controller_update_organization_attribute,
4618
+ self.organizations_attributes_controller_delete_organization_attribute,
4619
+ self.organizations_options_attributes_controller_create_organization_attribute_option,
4620
+ self.organizations_options_attributes_controller_get_organization_attribute_options,
4621
+ self.organizations_options_attributes_controller_delete_organization_attribute_option,
4622
+ self.organizations_options_attributes_controller_update_organization_attribute_option,
4623
+ self.organizations_options_attributes_controller_assign_organization_attribute_option_to_user,
4624
+ self.organizations_options_attributes_controller_get_organization_attribute_options_for_user,
4625
+ self.organizations_options_attributes_controller_unassign_organization_attribute_option_from_user,
4626
+ self.organizations_event_types_controller_create_team_event_type,
4627
+ self.organizations_event_types_controller_get_team_event_types,
4628
+ self.organizations_event_types_controller_get_team_event_type,
4629
+ self.organizations_event_types_controller_create_phone_call,
4630
+ self.organizations_event_types_controller_get_teams_event_types,
4631
+ self.organizations_memberships_controller_get_all_memberships,
4632
+ self.organizations_memberships_controller_create_membership,
4633
+ self.organizations_memberships_controller_get_org_membership,
4634
+ self.organizations_memberships_controller_delete_membership,
4635
+ self.organizations_memberships_controller_update_membership,
4636
+ self.organizations_schedules_controller_get_organization_schedules,
4637
+ self.organizations_schedules_controller_create_user_schedule,
4638
+ self.organizations_schedules_controller_get_user_schedules,
4639
+ self.organizations_schedules_controller_get_user_schedule,
4640
+ self.organizations_schedules_controller_update_user_schedule,
4641
+ self.organizations_schedules_controller_delete_user_schedule,
4642
+ self.organizations_teams_controller_get_all_teams,
4643
+ self.organizations_teams_controller_create_team,
4644
+ self.organizations_teams_controller_get_my_teams,
4645
+ self.organizations_teams_controller_get_team,
4646
+ self.organizations_teams_controller_delete_team,
4647
+ self.organizations_teams_controller_update_team,
4648
+ self.organizations_teams_memberships_controller_get_all_org_team_memberships,
4649
+ self.organizations_teams_memberships_controller_create_org_team_membership,
4650
+ self.organizations_teams_memberships_controller_get_org_team_membership,
4651
+ self.organizations_teams_memberships_controller_delete_org_team_membership,
4652
+ self.organizations_teams_memberships_controller_update_org_team_membership,
4653
+ self.organizations_teams_schedules_controller_get_user_schedules,
4654
+ self.organizations_users_controller_get_organizations_users,
4655
+ self.organizations_users_controller_create_organization_user,
4656
+ self.organizations_users_controller_delete_organization_user,
4657
+ self.organizations_webhooks_controller_get_all_organization_webhooks,
4658
+ self.organizations_webhooks_controller_create_organization_webhook,
4659
+ self.organizations_webhooks_controller_get_organization_webhook,
4660
+ self.organizations_webhooks_controller_delete_webhook,
4661
+ self.organizations_webhooks_controller_update_org_webhook,
4662
+ self.bookings_controller_2024_08_13_get_bookings,
4663
+ self.bookings_controller_2024_08_13_get_booking,
4664
+ self.bookings_controller_2024_08_13_reschedule_booking,
4665
+ self.bookings_controller_2024_08_13_cancel_booking,
4666
+ self.bookings_controller_2024_08_13_mark_no_show,
4667
+ self.bookings_controller_2024_08_13_reassign_booking,
4668
+ self.bookings_controller_2024_08_13_reassign_booking_to_user,
4669
+ self.bookings_controller_2024_08_13_confirm_booking,
4670
+ self.bookings_controller_2024_08_13_decline_booking,
4671
+ self.calendars_controller_create_ics_feed,
4672
+ self.calendars_controller_check_ics_feed,
4673
+ self.calendars_controller_get_busy_times,
4674
+ self.calendars_controller_get_calendars,
4675
+ self.calendars_controller_redirect,
4676
+ self.calendars_controller_save,
4677
+ self.calendars_controller_sync_credentials,
4678
+ self.calendars_controller_check,
4679
+ self.calendars_controller_delete_calendar_credentials,
4680
+ self.conferencing_controller_connect,
4681
+ self.conferencing_controller_redirect,
4682
+ self.conferencing_controller_save,
4683
+ self.conferencing_controller_list_installed_conferencing_apps,
4684
+ self.conferencing_controller_default,
4685
+ self.conferencing_controller_get_default,
4686
+ self.conferencing_controller_disconnect,
4687
+ self.destination_calendars_controller_update_destination_calendars,
4688
+ self.event_types_controller_2024_06_14_get_event_types,
4689
+ self.event_types_controller_2024_06_14_get_event_type_by_id,
4690
+ self.event_types_controller_2024_06_14_delete_event_type,
4691
+ self.event_type_webhooks_controller_create_event_type_webhook,
4692
+ self.event_type_webhooks_controller_get_event_type_webhooks,
4693
+ self.event_type_webhooks_controller_delete_all_event_type_webhooks,
4694
+ self.event_type_webhooks_controller_update_event_type_webhook,
4695
+ self.event_type_webhooks_controller_get_event_type_webhook,
4696
+ self.event_type_webhooks_controller_delete_event_type_webhook,
4697
+ self.me_controller_get_me,
4698
+ self.me_controller_update_me,
4699
+ self.schedules_controller_2024_06_11_create_schedule,
4700
+ self.schedules_controller_2024_06_11_get_schedules,
4701
+ self.schedules_controller_2024_06_11_get_default_schedule,
4702
+ self.schedules_controller_2024_06_11_get_schedule,
4703
+ self.schedules_controller_2024_06_11_update_schedule,
4704
+ self.schedules_controller_2024_06_11_delete_schedule,
4705
+ self.selected_calendars_controller_add_selected_calendar,
4706
+ self.selected_calendars_controller_remove_selected_calendar,
4707
+ self.slots_controller_reserve_slot,
4708
+ self.slots_controller_delete_selected_slot,
4709
+ self.slots_controller_get_available_slots,
4710
+ self.stripe_controller_redirect,
4711
+ self.stripe_controller_save,
4712
+ self.stripe_controller_check,
4713
+ self.stripe_controller_check_team_stripe_connection,
4714
+ self.teams_controller_create_team,
4715
+ self.teams_controller_get_teams,
4716
+ self.teams_controller_get_team,
4717
+ self.teams_controller_update_team,
4718
+ self.teams_controller_delete_team,
4719
+ self.teams_event_types_controller_create_team_event_type,
4720
+ self.teams_event_types_controller_get_team_event_types,
4721
+ self.teams_event_types_controller_get_team_event_type,
4722
+ self.teams_event_types_controller_delete_team_event_type,
4723
+ self.teams_event_types_controller_create_phone_call,
4724
+ self.teams_memberships_controller_create_team_membership,
4725
+ self.teams_memberships_controller_get_team_memberships,
4726
+ self.teams_memberships_controller_get_team_membership,
4727
+ self.teams_memberships_controller_update_team_membership,
4728
+ self.teams_memberships_controller_delete_team_membership,
4729
+ self.timezones_controller_get_time_zones,
4730
+ self.webhooks_controller_create_webhook,
4731
+ self.webhooks_controller_get_webhooks,
4732
+ self.webhooks_controller_update_webhook,
4733
+ self.webhooks_controller_get_webhook,
4734
+ self.webhooks_controller_delete_webhook
4735
+ ]