Skip to content

Commit 930a833

Browse files
committed
Release 2.2.0
1 parent 49368ce commit 930a833

21 files changed

+164
-550
lines changed

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.1.0"
6+
version = "2.2.0"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 21 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ client.mcp_server.set_strata_auth(
605605
strata_id="strataId",
606606
server_name=McpServerName.AFFINITY,
607607
auth_data=ApiKeyAuth(
608-
token="token",
608+
api_key="api_key",
609609
),
610610
)
611611

@@ -1227,7 +1227,7 @@ client = Klavis(
12271227
client.mcp_server.set_instance_auth(
12281228
instance_id="instanceId",
12291229
auth_data=ApiKeyAuth(
1230-
token="token",
1230+
api_key="api_key",
12311231
),
12321232
)
12331233

@@ -4406,6 +4406,7 @@ Start QuickBooks OAuth flow
44064406
Parameters:
44074407
- instance_id: Identifier for the instance requesting authorization
44084408
- client_id: Optional client ID for white labeling
4409+
- environment: QuickBooks environment to authorize ('sandbox' default)
44094410
- scope: Optional scopes to request (space-separated). Default is 'com.intuit.quickbooks.accounting'
44104411
- redirect_url: Optional URL to redirect to after authorization completes
44114412
</dd>
@@ -4461,6 +4462,14 @@ client.quickbooks_oauth.authorize_quick_books(
44614462
<dl>
44624463
<dd>
44634464

4465+
**environment:** `typing.Optional[Environment]` — QuickBooks environment to authorize ('sandbox' or 'production')
4466+
4467+
</dd>
4468+
</dl>
4469+
4470+
<dl>
4471+
<dd>
4472+
44644473
**scope:** `typing.Optional[str]` — Optional OAuth scopes to request (space-separated string)
44654474

44664475
</dd>
@@ -4509,6 +4518,7 @@ Parameters:
45094518
- client_id: Optional client ID for white labeling
45104519
- scope: Optional scopes to request (space-separated)
45114520
- redirect_url: Optional URL to redirect to after authorization completes
4521+
- subdomain: Zendesk subdomain for the account being connected
45124522
</dd>
45134523
</dl>
45144524
</dd>
@@ -4530,6 +4540,7 @@ client = Klavis(
45304540
)
45314541
client.zendesk_oauth.authorize_zendesk(
45324542
instance_id="instance_id",
4543+
subdomain="subdomain",
45334544
)
45344545

45354546
```
@@ -4554,6 +4565,14 @@ client.zendesk_oauth.authorize_zendesk(
45544565
<dl>
45554566
<dd>
45564567

4568+
**subdomain:** `str` — Zendesk subdomain for the account being connected (e.g., 'mycompany' for mycompany.zendesk.com)
4569+
4570+
</dd>
4571+
</dl>
4572+
4573+
<dl>
4574+
<dd>
4575+
45574576
**client_id:** `typing.Optional[str]` — Client ID for white labeling, if not provided will use default credentials
45584577

45594578
</dd>
@@ -4779,105 +4798,6 @@ client.calcom_oauth.authorize_calcom(
47794798
</dl>
47804799

47814800

4782-
</dd>
4783-
</dl>
4784-
</details>
4785-
4786-
<details><summary><code>client.calcom_oauth.<a href="src/klavis/calcom_oauth/client.py">calcom_client_credentials_auth</a>(...)</code></summary>
4787-
<dl>
4788-
<dd>
4789-
4790-
#### 📝 Description
4791-
4792-
<dl>
4793-
<dd>
4794-
4795-
<dl>
4796-
<dd>
4797-
4798-
Authenticate using Cal.com OAuth client credentials flow for platform-level API access
4799-
4800-
This endpoint is used for:
4801-
- Managing managed users
4802-
- Creating OAuth client webhooks
4803-
- Refreshing managed user tokens
4804-
- Managing organization teams and memberships
4805-
4806-
Parameters:
4807-
- instance_id: Identifier for the instance requesting authentication
4808-
- x-cal-client-id: OAuth client ID (header)
4809-
- x-cal-secret-key: OAuth client secret (header)
4810-
</dd>
4811-
</dl>
4812-
</dd>
4813-
</dl>
4814-
4815-
#### 🔌 Usage
4816-
4817-
<dl>
4818-
<dd>
4819-
4820-
<dl>
4821-
<dd>
4822-
4823-
```python
4824-
from klavis import Klavis
4825-
4826-
client = Klavis(
4827-
api_key="YOUR_API_KEY",
4828-
)
4829-
client.calcom_oauth.calcom_client_credentials_auth(
4830-
cal_client_id="x-cal-client-id",
4831-
cal_secret_key="x-cal-secret-key",
4832-
instance_id="instance_id",
4833-
)
4834-
4835-
```
4836-
</dd>
4837-
</dl>
4838-
</dd>
4839-
</dl>
4840-
4841-
#### ⚙️ Parameters
4842-
4843-
<dl>
4844-
<dd>
4845-
4846-
<dl>
4847-
<dd>
4848-
4849-
**instance_id:** `str` — Unique identifier for the client instance
4850-
4851-
</dd>
4852-
</dl>
4853-
4854-
<dl>
4855-
<dd>
4856-
4857-
**cal_client_id:** `str` — Cal.com OAuth client ID
4858-
4859-
</dd>
4860-
</dl>
4861-
4862-
<dl>
4863-
<dd>
4864-
4865-
**cal_secret_key:** `str` — Cal.com OAuth client secret
4866-
4867-
</dd>
4868-
</dl>
4869-
4870-
<dl>
4871-
<dd>
4872-
4873-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
4874-
4875-
</dd>
4876-
</dl>
4877-
</dd>
4878-
</dl>
4879-
4880-
48814801
</dd>
48824802
</dl>
48834803
</details>

src/klavis/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
from .types import (
66
ApiKeyAuth,
7-
CalcomOAuthErrorResponse,
8-
CalcomOAuthSuccessResponse,
97
CallToolResponse,
108
CallToolResult,
119
ConnectionType,
@@ -37,7 +35,7 @@
3735
ValidationErrorLocItem,
3836
WhiteLabelingResponse,
3937
)
40-
from .errors import BadRequestError, UnprocessableEntityError
38+
from .errors import UnprocessableEntityError
4139
from . import (
4240
airtable_oauth,
4341
asana_oauth,
@@ -86,22 +84,21 @@
8684
from .client import AsyncKlavis, Klavis
8785
from .environment import KlavisEnvironment
8886
from .mcp_server import Authdata, DeleteServersFromStrataMcpServerStrataStrataIdServersDeleteRequestServersItem, Servers
87+
from .quickbooks_oauth import Environment
8988
from .version import __version__
9089

9190
__all__ = [
9291
"ApiKeyAuth",
9392
"AsyncKlavis",
9493
"Authdata",
95-
"BadRequestError",
96-
"CalcomOAuthErrorResponse",
97-
"CalcomOAuthSuccessResponse",
9894
"CallToolResponse",
9995
"CallToolResult",
10096
"ConnectionType",
10197
"CreateSelfHostedServerResponse",
10298
"CreateServerResponse",
10399
"DeleteServersFromStrataMcpServerStrataStrataIdServersDeleteRequestServersItem",
104100
"DeleteUserResponse",
101+
"Environment",
105102
"ExtendedMcpServer",
106103
"ExternalServerInfo",
107104
"ExternalServerRequest",

src/klavis/calcom_oauth/client.py

Lines changed: 0 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
66
from ..core.request_options import RequestOptions
7-
from ..types.calcom_o_auth_success_response import CalcomOAuthSuccessResponse
87
from .raw_client import AsyncRawCalcomOauthClient, RawCalcomOauthClient
98

109

@@ -74,68 +73,6 @@ def authorize_calcom(
7473
)
7574
return _response.data
7675

77-
def calcom_client_credentials_auth(
78-
self,
79-
*,
80-
instance_id: str,
81-
cal_client_id: str,
82-
cal_secret_key: str,
83-
request_options: typing.Optional[RequestOptions] = None,
84-
) -> CalcomOAuthSuccessResponse:
85-
"""
86-
Authenticate using Cal.com OAuth client credentials flow for platform-level API access
87-
88-
This endpoint is used for:
89-
- Managing managed users
90-
- Creating OAuth client webhooks
91-
- Refreshing managed user tokens
92-
- Managing organization teams and memberships
93-
94-
Parameters:
95-
- instance_id: Identifier for the instance requesting authentication
96-
- x-cal-client-id: OAuth client ID (header)
97-
- x-cal-secret-key: OAuth client secret (header)
98-
99-
Parameters
100-
----------
101-
instance_id : str
102-
Unique identifier for the client instance
103-
104-
cal_client_id : str
105-
Cal.com OAuth client ID
106-
107-
cal_secret_key : str
108-
Cal.com OAuth client secret
109-
110-
request_options : typing.Optional[RequestOptions]
111-
Request-specific configuration.
112-
113-
Returns
114-
-------
115-
CalcomOAuthSuccessResponse
116-
Successful Response
117-
118-
Examples
119-
--------
120-
from klavis import Klavis
121-
122-
client = Klavis(
123-
api_key="YOUR_API_KEY",
124-
)
125-
client.calcom_oauth.calcom_client_credentials_auth(
126-
cal_client_id="x-cal-client-id",
127-
cal_secret_key="x-cal-secret-key",
128-
instance_id="instance_id",
129-
)
130-
"""
131-
_response = self._raw_client.calcom_client_credentials_auth(
132-
instance_id=instance_id,
133-
cal_client_id=cal_client_id,
134-
cal_secret_key=cal_secret_key,
135-
request_options=request_options,
136-
)
137-
return _response.data
138-
13976

14077
class AsyncCalcomOauthClient:
14178
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -210,73 +147,3 @@ async def main() -> None:
210147
instance_id=instance_id, client_id=client_id, redirect_url=redirect_url, request_options=request_options
211148
)
212149
return _response.data
213-
214-
async def calcom_client_credentials_auth(
215-
self,
216-
*,
217-
instance_id: str,
218-
cal_client_id: str,
219-
cal_secret_key: str,
220-
request_options: typing.Optional[RequestOptions] = None,
221-
) -> CalcomOAuthSuccessResponse:
222-
"""
223-
Authenticate using Cal.com OAuth client credentials flow for platform-level API access
224-
225-
This endpoint is used for:
226-
- Managing managed users
227-
- Creating OAuth client webhooks
228-
- Refreshing managed user tokens
229-
- Managing organization teams and memberships
230-
231-
Parameters:
232-
- instance_id: Identifier for the instance requesting authentication
233-
- x-cal-client-id: OAuth client ID (header)
234-
- x-cal-secret-key: OAuth client secret (header)
235-
236-
Parameters
237-
----------
238-
instance_id : str
239-
Unique identifier for the client instance
240-
241-
cal_client_id : str
242-
Cal.com OAuth client ID
243-
244-
cal_secret_key : str
245-
Cal.com OAuth client secret
246-
247-
request_options : typing.Optional[RequestOptions]
248-
Request-specific configuration.
249-
250-
Returns
251-
-------
252-
CalcomOAuthSuccessResponse
253-
Successful Response
254-
255-
Examples
256-
--------
257-
import asyncio
258-
259-
from klavis import AsyncKlavis
260-
261-
client = AsyncKlavis(
262-
api_key="YOUR_API_KEY",
263-
)
264-
265-
266-
async def main() -> None:
267-
await client.calcom_oauth.calcom_client_credentials_auth(
268-
cal_client_id="x-cal-client-id",
269-
cal_secret_key="x-cal-secret-key",
270-
instance_id="instance_id",
271-
)
272-
273-
274-
asyncio.run(main())
275-
"""
276-
_response = await self._raw_client.calcom_client_credentials_auth(
277-
instance_id=instance_id,
278-
cal_client_id=cal_client_id,
279-
cal_secret_key=cal_secret_key,
280-
request_options=request_options,
281-
)
282-
return _response.data

0 commit comments

Comments
 (0)