@ -1 +1 @@
|
||||
""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501
|
||||
""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,21 +25,25 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -63,23 +72,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
|
||||
""" # noqa: E501
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -90,15 +104,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
|
||||
""" # noqa: E501
|
||||
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/session/{token}".format(
|
||||
client.base_url,
|
||||
token=token,
|
||||
) # noqa: E501
|
||||
url = "{}/user/session/{token}".format(client.base_url, token=token,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Session.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Session.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -72,25 +91,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Session, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Session, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Session, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -101,15 +138,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
token: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Session, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Session, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
token=token,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/users/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,25 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -72,27 +91,45 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -103,17 +140,26 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,14 +9,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users-extended/{id}".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
url = "{}/users-extended/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -26,27 +34,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -56,12 +64,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -74,27 +91,45 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -105,17 +140,26 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
id: str,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
id=id,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -8,12 +8,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/front-hash".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/front-hash".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -23,25 +25,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = response.text
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = response.text
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -51,10 +55,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,21 +74,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[str, Error]]:
|
||||
|
||||
) -> Optional[Union[str, Error]] :
|
||||
"""This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[str, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -92,13 +105,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[str, Error]]:
|
||||
|
||||
) -> Optional[Union[str, Error]] :
|
||||
"""This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/onboarding".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/onboarding".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Onboarding.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Onboarding.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,21 +75,27 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Onboarding, Error]]:
|
||||
|
||||
) -> Optional[Union[Onboarding, Error]] :
|
||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -93,13 +106,16 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Onboarding, Error]]:
|
||||
|
||||
) -> Optional[Union[Onboarding, Error]] :
|
||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,25 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -68,22 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -94,14 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -9,12 +9,14 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/extended".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user/extended".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -24,27 +26,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,10 +56,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,22 +75,28 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUser, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -96,14 +107,17 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
|
||||
) -> Optional[Union[ExtendedUser, Error]] :
|
||||
"""Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/users".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[UserResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = UserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[UserResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = UserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,33 +142,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[UserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[UserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[UserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[UserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,33 +10,56 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users-extended".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
url = "{}/users-extended".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -46,27 +69,27 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -76,16 +99,37 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -98,33 +142,75 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -135,19 +221,40 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[ExtendedUserResultsPage, Error]] :
|
||||
"""This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
@ -10,13 +10,22 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
url = "{}/user".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -30,22 +39,23 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return Error.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -55,12 +65,21 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -73,25 +92,43 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[User, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -102,15 +139,24 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
body: UpdateUser,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[User, Error]]:
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[User, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
body=body,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
||||
Reference in New Issue
Block a user