22
33from __future__ import annotations
44
5- from typing import Dict , Union , Optional
5+ from typing import Dict , List , Union , Optional
66from typing_extensions import Literal
77
88import httpx
@@ -50,9 +50,9 @@ def create(
5050 self ,
5151 provider : Literal ["notion" , "google-drive" , "onedrive" ],
5252 * ,
53- end_user_id : str | NotGiven = NOT_GIVEN ,
54- redirect_url : str | NotGiven = NOT_GIVEN ,
53+ container_tags : List [str ] | NotGiven = NOT_GIVEN ,
5554 metadata : Optional [Dict [str , Union [str , float , bool ]]] | NotGiven = NOT_GIVEN ,
55+ redirect_url : str | NotGiven = NOT_GIVEN ,
5656 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757 # The extra values given here take precedence over values defined on the client or passed to this method.
5858 extra_headers : Headers | None = None ,
@@ -76,19 +76,16 @@ def create(
7676 raise ValueError (f"Expected a non-empty value for `provider` but received { provider !r} " )
7777 return self ._post (
7878 f"/v3/connections/{ provider } " ,
79- body = maybe_transform ({"metadata" : metadata }, connection_create_params .ConnectionCreateParams ),
79+ body = maybe_transform (
80+ {
81+ "container_tags" : container_tags ,
82+ "metadata" : metadata ,
83+ "redirect_url" : redirect_url ,
84+ },
85+ connection_create_params .ConnectionCreateParams ,
86+ ),
8087 options = make_request_options (
81- extra_headers = extra_headers ,
82- extra_query = extra_query ,
83- extra_body = extra_body ,
84- timeout = timeout ,
85- query = maybe_transform (
86- {
87- "end_user_id" : end_user_id ,
88- "redirect_url" : redirect_url ,
89- },
90- connection_create_params .ConnectionCreateParams ,
91- ),
88+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
9289 ),
9390 cast_to = ConnectionCreateResponse ,
9491 )
@@ -186,9 +183,9 @@ async def create(
186183 self ,
187184 provider : Literal ["notion" , "google-drive" , "onedrive" ],
188185 * ,
189- end_user_id : str | NotGiven = NOT_GIVEN ,
190- redirect_url : str | NotGiven = NOT_GIVEN ,
186+ container_tags : List [str ] | NotGiven = NOT_GIVEN ,
191187 metadata : Optional [Dict [str , Union [str , float , bool ]]] | NotGiven = NOT_GIVEN ,
188+ redirect_url : str | NotGiven = NOT_GIVEN ,
192189 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
193190 # The extra values given here take precedence over values defined on the client or passed to this method.
194191 extra_headers : Headers | None = None ,
@@ -212,19 +209,16 @@ async def create(
212209 raise ValueError (f"Expected a non-empty value for `provider` but received { provider !r} " )
213210 return await self ._post (
214211 f"/v3/connections/{ provider } " ,
215- body = await async_maybe_transform ({"metadata" : metadata }, connection_create_params .ConnectionCreateParams ),
212+ body = await async_maybe_transform (
213+ {
214+ "container_tags" : container_tags ,
215+ "metadata" : metadata ,
216+ "redirect_url" : redirect_url ,
217+ },
218+ connection_create_params .ConnectionCreateParams ,
219+ ),
216220 options = make_request_options (
217- extra_headers = extra_headers ,
218- extra_query = extra_query ,
219- extra_body = extra_body ,
220- timeout = timeout ,
221- query = await async_maybe_transform (
222- {
223- "end_user_id" : end_user_id ,
224- "redirect_url" : redirect_url ,
225- },
226- connection_create_params .ConnectionCreateParams ,
227- ),
221+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
228222 ),
229223 cast_to = ConnectionCreateResponse ,
230224 )
0 commit comments