Skip to content

Commit e6290d5

Browse files
Release 2.13.2
1 parent 222cad3 commit e6290d5

File tree

18 files changed

+808
-30
lines changed

18 files changed

+808
-30
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ The Klavis Python library provides convenient access to the Klavis APIs from Pyt
77

88
## Table of Contents
99

10+
- [Table of Contents](#table-of-contents)
11+
- [Installation](#installation)
12+
- [Reference](#reference)
13+
- [Usage](#usage)
14+
- [Async Client](#async-client)
15+
- [Exception Handling](#exception-handling)
16+
- [Advanced](#advanced)
17+
- [Access Raw Response Data](#access-raw-response-data)
18+
- [Retries](#retries)
19+
- [Timeouts](#timeouts)
20+
- [Custom Client](#custom-client)
21+
- [Contributing](#contributing)
22+
23+
## Table of Contents
24+
1025
- [Installation](#installation)
1126
- [Reference](#reference)
1227
- [Usage](#usage)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "klavis"
33

44
[tool.poetry]
55
name = "klavis"
6-
version = "2.12.2"
6+
version = "2.13.2"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6991,3 +6991,143 @@ client.teams_oauth.refresh_token(
69916991
</dl>
69926992
</details>
69936993

6994+
## ZoomOauth
6995+
<details><summary><code>client.zoom_oauth.<a href="src/klavis/zoom_oauth/client.py">authorize_zoom</a>(...)</code></summary>
6996+
<dl>
6997+
<dd>
6998+
6999+
#### 🔌 Usage
7000+
7001+
<dl>
7002+
<dd>
7003+
7004+
<dl>
7005+
<dd>
7006+
7007+
```python
7008+
from klavis import Klavis
7009+
7010+
client = Klavis(
7011+
api_key="YOUR_API_KEY",
7012+
)
7013+
client.zoom_oauth.authorize_zoom(
7014+
instance_id="instance_id",
7015+
client_id="client_id",
7016+
scope="scope",
7017+
redirect_url="redirect_url",
7018+
)
7019+
7020+
```
7021+
</dd>
7022+
</dl>
7023+
</dd>
7024+
</dl>
7025+
7026+
#### ⚙️ Parameters
7027+
7028+
<dl>
7029+
<dd>
7030+
7031+
<dl>
7032+
<dd>
7033+
7034+
**instance_id:** `str` — Unique identifier for the client instance requesting authorization
7035+
7036+
</dd>
7037+
</dl>
7038+
7039+
<dl>
7040+
<dd>
7041+
7042+
**client_id:** `typing.Optional[str]` — Client ID for white labeling, if not provided will use default credentials
7043+
7044+
</dd>
7045+
</dl>
7046+
7047+
<dl>
7048+
<dd>
7049+
7050+
**scope:** `typing.Optional[str]` — Optional OAuth scopes to request (space-separated string)
7051+
7052+
</dd>
7053+
</dl>
7054+
7055+
<dl>
7056+
<dd>
7057+
7058+
**redirect_url:** `typing.Optional[str]` — Optional URL to redirect to after authorization completes
7059+
7060+
</dd>
7061+
</dl>
7062+
7063+
<dl>
7064+
<dd>
7065+
7066+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
7067+
7068+
</dd>
7069+
</dl>
7070+
</dd>
7071+
</dl>
7072+
7073+
7074+
</dd>
7075+
</dl>
7076+
</details>
7077+
7078+
<details><summary><code>client.zoom_oauth.<a href="src/klavis/zoom_oauth/client.py">refresh_token</a>(...)</code></summary>
7079+
<dl>
7080+
<dd>
7081+
7082+
#### 🔌 Usage
7083+
7084+
<dl>
7085+
<dd>
7086+
7087+
<dl>
7088+
<dd>
7089+
7090+
```python
7091+
from klavis import Klavis
7092+
7093+
client = Klavis(
7094+
api_key="YOUR_API_KEY",
7095+
)
7096+
client.zoom_oauth.refresh_token(
7097+
instance_id="instance_id",
7098+
)
7099+
7100+
```
7101+
</dd>
7102+
</dl>
7103+
</dd>
7104+
</dl>
7105+
7106+
#### ⚙️ Parameters
7107+
7108+
<dl>
7109+
<dd>
7110+
7111+
<dl>
7112+
<dd>
7113+
7114+
**instance_id:** `str` — Instance ID for which to refresh the token
7115+
7116+
</dd>
7117+
</dl>
7118+
7119+
<dl>
7120+
<dd>
7121+
7122+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
7123+
7124+
</dd>
7125+
</dl>
7126+
</dd>
7127+
</dl>
7128+
7129+
7130+
</dd>
7131+
</dl>
7132+
</details>
7133+

src/klavis/__init__.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,21 @@
4444
ValidationError,
4545
ValidationErrorLocItem,
4646
WhiteLabelingResponse,
47+
ZoomOAuthErrorResponse,
48+
ZoomOAuthSuccessResponse,
4749
)
4850
from .errors import BadRequestError, UnprocessableEntityError
49-
from . import mcp_server, mscalendar_oauth, oauth, onedrive_oauth, outlook_oauth, teams_oauth, user, white_labeling
51+
from . import (
52+
mcp_server,
53+
mscalendar_oauth,
54+
oauth,
55+
onedrive_oauth,
56+
outlook_oauth,
57+
teams_oauth,
58+
user,
59+
white_labeling,
60+
zoom_oauth,
61+
)
5062
from .client import AsyncKlavis, Klavis
5163
from .environment import KlavisEnvironment
5264
from .mcp_server import (
@@ -107,6 +119,8 @@
107119
"ValidationError": ".types",
108120
"ValidationErrorLocItem": ".types",
109121
"WhiteLabelingResponse": ".types",
122+
"ZoomOAuthErrorResponse": ".types",
123+
"ZoomOAuthSuccessResponse": ".types",
110124
"__version__": ".version",
111125
"mcp_server": ".mcp_server",
112126
"mscalendar_oauth": ".mscalendar_oauth",
@@ -116,6 +130,7 @@
116130
"teams_oauth": ".teams_oauth",
117131
"user": ".user",
118132
"white_labeling": ".white_labeling",
133+
"zoom_oauth": ".zoom_oauth",
119134
}
120135

121136

@@ -189,6 +204,8 @@ def __dir__():
189204
"ValidationError",
190205
"ValidationErrorLocItem",
191206
"WhiteLabelingResponse",
207+
"ZoomOAuthErrorResponse",
208+
"ZoomOAuthSuccessResponse",
192209
"__version__",
193210
"mcp_server",
194211
"mscalendar_oauth",
@@ -198,4 +215,5 @@ def __dir__():
198215
"teams_oauth",
199216
"user",
200217
"white_labeling",
218+
"zoom_oauth",
201219
]

src/klavis/client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .teams_oauth.client import AsyncTeamsOauthClient, TeamsOauthClient
1818
from .user.client import AsyncUserClient, UserClient
1919
from .white_labeling.client import AsyncWhiteLabelingClient, WhiteLabelingClient
20+
from .zoom_oauth.client import AsyncZoomOauthClient, ZoomOauthClient
2021

2122

2223
class Klavis:
@@ -92,6 +93,7 @@ def __init__(
9293
self._outlook_oauth: typing.Optional[OutlookOauthClient] = None
9394
self._mscalendar_oauth: typing.Optional[MscalendarOauthClient] = None
9495
self._teams_oauth: typing.Optional[TeamsOauthClient] = None
96+
self._zoom_oauth: typing.Optional[ZoomOauthClient] = None
9597

9698
@property
9799
def mcp_server(self):
@@ -157,6 +159,14 @@ def teams_oauth(self):
157159
self._teams_oauth = TeamsOauthClient(client_wrapper=self._client_wrapper)
158160
return self._teams_oauth
159161

162+
@property
163+
def zoom_oauth(self):
164+
if self._zoom_oauth is None:
165+
from .zoom_oauth.client import ZoomOauthClient # noqa: E402
166+
167+
self._zoom_oauth = ZoomOauthClient(client_wrapper=self._client_wrapper)
168+
return self._zoom_oauth
169+
160170

161171
class AsyncKlavis:
162172
"""
@@ -231,6 +241,7 @@ def __init__(
231241
self._outlook_oauth: typing.Optional[AsyncOutlookOauthClient] = None
232242
self._mscalendar_oauth: typing.Optional[AsyncMscalendarOauthClient] = None
233243
self._teams_oauth: typing.Optional[AsyncTeamsOauthClient] = None
244+
self._zoom_oauth: typing.Optional[AsyncZoomOauthClient] = None
234245

235246
@property
236247
def mcp_server(self):
@@ -296,6 +307,14 @@ def teams_oauth(self):
296307
self._teams_oauth = AsyncTeamsOauthClient(client_wrapper=self._client_wrapper)
297308
return self._teams_oauth
298309

310+
@property
311+
def zoom_oauth(self):
312+
if self._zoom_oauth is None:
313+
from .zoom_oauth.client import AsyncZoomOauthClient # noqa: E402
314+
315+
self._zoom_oauth = AsyncZoomOauthClient(client_wrapper=self._client_wrapper)
316+
return self._zoom_oauth
317+
299318

300319
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: KlavisEnvironment) -> str:
301320
if base_url is not None:

src/klavis/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "klavis/2.12.2",
25+
"User-Agent": "klavis/2.13.2",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "klavis",
28-
"X-Fern-SDK-Version": "2.12.2",
28+
"X-Fern-SDK-Version": "2.13.2",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
api_key = self._get_api_key()

src/klavis/errors/bad_request_error.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
import typing
44

55
from ..core.api_error import ApiError
6-
from ..types.azure_ado_auth_error_response import AzureAdoAuthErrorResponse
76

87

98
class BadRequestError(ApiError):
10-
def __init__(self, body: AzureAdoAuthErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
9+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
1110
super().__init__(status_code=400, headers=headers, body=body)

src/klavis/mscalendar_oauth/raw_client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from ..core.request_options import RequestOptions
1111
from ..errors.bad_request_error import BadRequestError
1212
from ..errors.unprocessable_entity_error import UnprocessableEntityError
13-
from ..types.azure_ado_auth_error_response import AzureAdoAuthErrorResponse
1413
from ..types.azure_ado_auth_success_response import AzureAdoAuthSuccessResponse
1514
from ..types.http_validation_error import HttpValidationError
1615

@@ -129,9 +128,9 @@ def refresh_token(
129128
raise BadRequestError(
130129
headers=dict(_response.headers),
131130
body=typing.cast(
132-
AzureAdoAuthErrorResponse,
131+
typing.Optional[typing.Any],
133132
parse_obj_as(
134-
type_=AzureAdoAuthErrorResponse, # type: ignore
133+
type_=typing.Optional[typing.Any], # type: ignore
135134
object_=_response.json(),
136135
),
137136
),
@@ -267,9 +266,9 @@ async def refresh_token(
267266
raise BadRequestError(
268267
headers=dict(_response.headers),
269268
body=typing.cast(
270-
AzureAdoAuthErrorResponse,
269+
typing.Optional[typing.Any],
271270
parse_obj_as(
272-
type_=AzureAdoAuthErrorResponse, # type: ignore
271+
type_=typing.Optional[typing.Any], # type: ignore
273272
object_=_response.json(),
274273
),
275274
),

src/klavis/onedrive_oauth/raw_client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from ..core.request_options import RequestOptions
1111
from ..errors.bad_request_error import BadRequestError
1212
from ..errors.unprocessable_entity_error import UnprocessableEntityError
13-
from ..types.azure_ado_auth_error_response import AzureAdoAuthErrorResponse
1413
from ..types.azure_ado_auth_success_response import AzureAdoAuthSuccessResponse
1514
from ..types.http_validation_error import HttpValidationError
1615

@@ -58,9 +57,9 @@ def refresh_token(
5857
raise BadRequestError(
5958
headers=dict(_response.headers),
6059
body=typing.cast(
61-
AzureAdoAuthErrorResponse,
60+
typing.Optional[typing.Any],
6261
parse_obj_as(
63-
type_=AzureAdoAuthErrorResponse, # type: ignore
62+
type_=typing.Optional[typing.Any], # type: ignore
6463
object_=_response.json(),
6564
),
6665
),
@@ -125,9 +124,9 @@ async def refresh_token(
125124
raise BadRequestError(
126125
headers=dict(_response.headers),
127126
body=typing.cast(
128-
AzureAdoAuthErrorResponse,
127+
typing.Optional[typing.Any],
129128
parse_obj_as(
130-
type_=AzureAdoAuthErrorResponse, # type: ignore
129+
type_=typing.Optional[typing.Any], # type: ignore
131130
object_=_response.json(),
132131
),
133132
),

0 commit comments

Comments
 (0)