Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/everyrow/generated/api/health/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Contains endpoint functions for accessing the API"""
123 changes: 123 additions & 0 deletions src/everyrow/generated/api/health/health_health_get.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
from http import HTTPStatus
from typing import Any

import httpx

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.health_response import HealthResponse
from ...types import Response


def _get_kwargs() -> dict[str, Any]:
_kwargs: dict[str, Any] = {
"method": "get",
"url": "/health",
}

return _kwargs


def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> HealthResponse | None:
if response.status_code == 200:
response_200 = HealthResponse.from_dict(response.json())

return response_200

if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None


def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[HealthResponse]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
headers=response.headers,
parsed=_parse_response(client=client, response=response),
)


def sync_detailed(
*,
client: AuthenticatedClient | Client,
) -> Response[HealthResponse]:
"""Health

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[HealthResponse]
"""

kwargs = _get_kwargs()

response = client.get_httpx_client().request(
**kwargs,
)

return _build_response(client=client, response=response)


def sync(
*,
client: AuthenticatedClient | Client,
) -> HealthResponse | None:
"""Health

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
HealthResponse
"""

return sync_detailed(
client=client,
).parsed


async def asyncio_detailed(
*,
client: AuthenticatedClient | Client,
) -> Response[HealthResponse]:
"""Health

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[HealthResponse]
"""

kwargs = _get_kwargs()

response = await client.get_async_httpx_client().request(**kwargs)

return _build_response(client=client, response=response)


async def asyncio(
*,
client: AuthenticatedClient | Client,
) -> HealthResponse | None:
"""Health

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
HealthResponse
"""

return (
await asyncio_detailed(
client=client,
)
).parsed
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
from ...models.error_response import ErrorResponse
from ...models.insufficient_balance_error import InsufficientBalanceError
from ...models.operation_response import OperationResponse
from ...types import Response
from ...types import UNSET, Response, Unset


def _get_kwargs(
*,
body: AgentMapOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_cohort_source, Unset):
headers["X-Cohort-Source"] = x_cohort_source

_kwargs: dict[str, Any] = {
"method": "post",
Expand Down Expand Up @@ -70,6 +73,7 @@ def sync_detailed(
*,
client: AuthenticatedClient,
body: AgentMapOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> Response[ErrorResponse | InsufficientBalanceError | OperationResponse]:
"""Parallel AI research agents

Expand All @@ -82,6 +86,7 @@ def sync_detailed(
`include_research`

Args:
x_cohort_source (None | str | Unset):
body (AgentMapOperation):

Raises:
Expand All @@ -94,6 +99,7 @@ def sync_detailed(

kwargs = _get_kwargs(
body=body,
x_cohort_source=x_cohort_source,
)

response = client.get_httpx_client().request(
Expand All @@ -107,6 +113,7 @@ def sync(
*,
client: AuthenticatedClient,
body: AgentMapOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> ErrorResponse | InsufficientBalanceError | OperationResponse | None:
"""Parallel AI research agents

Expand All @@ -119,6 +126,7 @@ def sync(
`include_research`

Args:
x_cohort_source (None | str | Unset):
body (AgentMapOperation):

Raises:
Expand All @@ -132,13 +140,15 @@ def sync(
return sync_detailed(
client=client,
body=body,
x_cohort_source=x_cohort_source,
).parsed


async def asyncio_detailed(
*,
client: AuthenticatedClient,
body: AgentMapOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> Response[ErrorResponse | InsufficientBalanceError | OperationResponse]:
"""Parallel AI research agents

Expand All @@ -151,6 +161,7 @@ async def asyncio_detailed(
`include_research`

Args:
x_cohort_source (None | str | Unset):
body (AgentMapOperation):

Raises:
Expand All @@ -163,6 +174,7 @@ async def asyncio_detailed(

kwargs = _get_kwargs(
body=body,
x_cohort_source=x_cohort_source,
)

response = await client.get_async_httpx_client().request(**kwargs)
Expand All @@ -174,6 +186,7 @@ async def asyncio(
*,
client: AuthenticatedClient,
body: AgentMapOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> ErrorResponse | InsufficientBalanceError | OperationResponse | None:
"""Parallel AI research agents

Expand All @@ -186,6 +199,7 @@ async def asyncio(
`include_research`

Args:
x_cohort_source (None | str | Unset):
body (AgentMapOperation):

Raises:
Expand All @@ -200,5 +214,6 @@ async def asyncio(
await asyncio_detailed(
client=client,
body=body,
x_cohort_source=x_cohort_source,
)
).parsed
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
from ...models.error_response import ErrorResponse
from ...models.insufficient_balance_error import InsufficientBalanceError
from ...models.operation_response import OperationResponse
from ...types import Response
from ...types import UNSET, Response, Unset


def _get_kwargs(
*,
body: DedupeOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
if not isinstance(x_cohort_source, Unset):
headers["X-Cohort-Source"] = x_cohort_source

_kwargs: dict[str, Any] = {
"method": "post",
Expand Down Expand Up @@ -70,12 +73,14 @@ def sync_detailed(
*,
client: AuthenticatedClient,
body: DedupeOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> Response[ErrorResponse | InsufficientBalanceError | OperationResponse]:
"""AI-powered deduplication

Use AI to identify and remove duplicate rows based on the equivalence relation.

Args:
x_cohort_source (None | str | Unset):
body (DedupeOperation):

Raises:
Expand All @@ -88,6 +93,7 @@ def sync_detailed(

kwargs = _get_kwargs(
body=body,
x_cohort_source=x_cohort_source,
)

response = client.get_httpx_client().request(
Expand All @@ -101,12 +107,14 @@ def sync(
*,
client: AuthenticatedClient,
body: DedupeOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> ErrorResponse | InsufficientBalanceError | OperationResponse | None:
"""AI-powered deduplication

Use AI to identify and remove duplicate rows based on the equivalence relation.

Args:
x_cohort_source (None | str | Unset):
body (DedupeOperation):

Raises:
Expand All @@ -120,19 +128,22 @@ def sync(
return sync_detailed(
client=client,
body=body,
x_cohort_source=x_cohort_source,
).parsed


async def asyncio_detailed(
*,
client: AuthenticatedClient,
body: DedupeOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> Response[ErrorResponse | InsufficientBalanceError | OperationResponse]:
"""AI-powered deduplication

Use AI to identify and remove duplicate rows based on the equivalence relation.

Args:
x_cohort_source (None | str | Unset):
body (DedupeOperation):

Raises:
Expand All @@ -145,6 +156,7 @@ async def asyncio_detailed(

kwargs = _get_kwargs(
body=body,
x_cohort_source=x_cohort_source,
)

response = await client.get_async_httpx_client().request(**kwargs)
Expand All @@ -156,12 +168,14 @@ async def asyncio(
*,
client: AuthenticatedClient,
body: DedupeOperation,
x_cohort_source: None | str | Unset = UNSET,
) -> ErrorResponse | InsufficientBalanceError | OperationResponse | None:
"""AI-powered deduplication

Use AI to identify and remove duplicate rows based on the equivalence relation.

Args:
x_cohort_source (None | str | Unset):
body (DedupeOperation):

Raises:
Expand All @@ -176,5 +190,6 @@ async def asyncio(
await asyncio_detailed(
client=client,
body=body,
x_cohort_source=x_cohort_source,
)
).parsed
Loading