Skip to content

chore(internal): codegen related update #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2024
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
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 37
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0b6874fdff2a5ed63c4e84830811f10a91e10e9c3e300a33f25422ad0afb945b.yml
configured_endpoints: 39
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e915b33a18d4e6592966587ef174bbfe316edd9bc1fd7c17f86f372089bf80eb.yml
15 changes: 15 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,18 @@ Methods:

- <code title="get /employer/pay-groups/{pay_group_id}">client.payroll.pay_groups.<a href="./src/finch/resources/payroll/pay_groups.py">retrieve</a>(pay_group_id) -> <a href="./src/finch/types/payroll/pay_group_retrieve_response.py">PayGroupRetrieveResponse</a></code>
- <code title="get /employer/pay-groups">client.payroll.pay_groups.<a href="./src/finch/resources/payroll/pay_groups.py">list</a>(\*\*<a href="src/finch/types/payroll/pay_group_list_params.py">params</a>) -> <a href="./src/finch/types/payroll/pay_group_list_response.py">SyncSinglePage[PayGroupListResponse]</a></code>

# Connect

## Sessions

Types:

```python
from finch.types.connect import SessionNewResponse, SessionReauthenticateResponse
```

Methods:

- <code title="post /connect/sessions">client.connect.sessions.<a href="./src/finch/resources/connect/sessions.py">new</a>(\*\*<a href="src/finch/types/connect/session_new_params.py">params</a>) -> <a href="./src/finch/types/connect/session_new_response.py">SessionNewResponse</a></code>
- <code title="post /connect/sessions/reauthenticate">client.connect.sessions.<a href="./src/finch/resources/connect/sessions.py">reauthenticate</a>(\*\*<a href="src/finch/types/connect/session_reauthenticate_params.py">params</a>) -> <a href="./src/finch/types/connect/session_reauthenticate_response.py">SessionReauthenticateResponse</a></code>
8 changes: 8 additions & 0 deletions src/finch/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Finch(SyncAPIClient):
jobs: resources.Jobs
sandbox: resources.Sandbox
payroll: resources.Payroll
connect: resources.Connect
with_raw_response: FinchWithRawResponse
with_streaming_response: FinchWithStreamedResponse

Expand Down Expand Up @@ -163,6 +164,7 @@ def __init__(
self.jobs = resources.Jobs(self)
self.sandbox = resources.Sandbox(self)
self.payroll = resources.Payroll(self)
self.connect = resources.Connect(self)
self.with_raw_response = FinchWithRawResponse(self)
self.with_streaming_response = FinchWithStreamedResponse(self)

Expand Down Expand Up @@ -346,6 +348,7 @@ class AsyncFinch(AsyncAPIClient):
jobs: resources.AsyncJobs
sandbox: resources.AsyncSandbox
payroll: resources.AsyncPayroll
connect: resources.AsyncConnect
with_raw_response: AsyncFinchWithRawResponse
with_streaming_response: AsyncFinchWithStreamedResponse

Expand Down Expand Up @@ -449,6 +452,7 @@ def __init__(
self.jobs = resources.AsyncJobs(self)
self.sandbox = resources.AsyncSandbox(self)
self.payroll = resources.AsyncPayroll(self)
self.connect = resources.AsyncConnect(self)
self.with_raw_response = AsyncFinchWithRawResponse(self)
self.with_streaming_response = AsyncFinchWithStreamedResponse(self)

Expand Down Expand Up @@ -633,6 +637,7 @@ def __init__(self, client: Finch) -> None:
self.jobs = resources.JobsWithRawResponse(client.jobs)
self.sandbox = resources.SandboxWithRawResponse(client.sandbox)
self.payroll = resources.PayrollWithRawResponse(client.payroll)
self.connect = resources.ConnectWithRawResponse(client.connect)


class AsyncFinchWithRawResponse:
Expand All @@ -645,6 +650,7 @@ def __init__(self, client: AsyncFinch) -> None:
self.jobs = resources.AsyncJobsWithRawResponse(client.jobs)
self.sandbox = resources.AsyncSandboxWithRawResponse(client.sandbox)
self.payroll = resources.AsyncPayrollWithRawResponse(client.payroll)
self.connect = resources.AsyncConnectWithRawResponse(client.connect)


class FinchWithStreamedResponse:
Expand All @@ -657,6 +663,7 @@ def __init__(self, client: Finch) -> None:
self.jobs = resources.JobsWithStreamingResponse(client.jobs)
self.sandbox = resources.SandboxWithStreamingResponse(client.sandbox)
self.payroll = resources.PayrollWithStreamingResponse(client.payroll)
self.connect = resources.ConnectWithStreamingResponse(client.connect)


class AsyncFinchWithStreamedResponse:
Expand All @@ -669,6 +676,7 @@ def __init__(self, client: AsyncFinch) -> None:
self.jobs = resources.AsyncJobsWithStreamingResponse(client.jobs)
self.sandbox = resources.AsyncSandboxWithStreamingResponse(client.sandbox)
self.payroll = resources.AsyncPayrollWithStreamingResponse(client.payroll)
self.connect = resources.AsyncConnectWithStreamingResponse(client.connect)


Client = Finch
Expand Down
14 changes: 14 additions & 0 deletions src/finch/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
AccountWithStreamingResponse,
AsyncAccountWithStreamingResponse,
)
from .connect import (
Connect,
AsyncConnect,
ConnectWithRawResponse,
AsyncConnectWithRawResponse,
ConnectWithStreamingResponse,
AsyncConnectWithStreamingResponse,
)
from .payroll import (
Payroll,
AsyncPayroll,
Expand Down Expand Up @@ -114,4 +122,10 @@
"AsyncPayrollWithRawResponse",
"PayrollWithStreamingResponse",
"AsyncPayrollWithStreamingResponse",
"Connect",
"AsyncConnect",
"ConnectWithRawResponse",
"AsyncConnectWithRawResponse",
"ConnectWithStreamingResponse",
"AsyncConnectWithStreamingResponse",
]
33 changes: 33 additions & 0 deletions src/finch/resources/connect/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .connect import (
Connect,
AsyncConnect,
ConnectWithRawResponse,
AsyncConnectWithRawResponse,
ConnectWithStreamingResponse,
AsyncConnectWithStreamingResponse,
)
from .sessions import (
Sessions,
AsyncSessions,
SessionsWithRawResponse,
AsyncSessionsWithRawResponse,
SessionsWithStreamingResponse,
AsyncSessionsWithStreamingResponse,
)

__all__ = [
"Sessions",
"AsyncSessions",
"SessionsWithRawResponse",
"AsyncSessionsWithRawResponse",
"SessionsWithStreamingResponse",
"AsyncSessionsWithStreamingResponse",
"Connect",
"AsyncConnect",
"ConnectWithRawResponse",
"AsyncConnectWithRawResponse",
"ConnectWithStreamingResponse",
"AsyncConnectWithStreamingResponse",
]
102 changes: 102 additions & 0 deletions src/finch/resources/connect/connect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from .sessions import (
Sessions,
AsyncSessions,
SessionsWithRawResponse,
AsyncSessionsWithRawResponse,
SessionsWithStreamingResponse,
AsyncSessionsWithStreamingResponse,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource

__all__ = ["Connect", "AsyncConnect"]


class Connect(SyncAPIResource):
@cached_property
def sessions(self) -> Sessions:
return Sessions(self._client)

@cached_property
def with_raw_response(self) -> ConnectWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
"""
return ConnectWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> ConnectWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
"""
return ConnectWithStreamingResponse(self)


class AsyncConnect(AsyncAPIResource):
@cached_property
def sessions(self) -> AsyncSessions:
return AsyncSessions(self._client)

@cached_property
def with_raw_response(self) -> AsyncConnectWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
"""
return AsyncConnectWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncConnectWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
"""
return AsyncConnectWithStreamingResponse(self)


class ConnectWithRawResponse:
def __init__(self, connect: Connect) -> None:
self._connect = connect

@cached_property
def sessions(self) -> SessionsWithRawResponse:
return SessionsWithRawResponse(self._connect.sessions)


class AsyncConnectWithRawResponse:
def __init__(self, connect: AsyncConnect) -> None:
self._connect = connect

@cached_property
def sessions(self) -> AsyncSessionsWithRawResponse:
return AsyncSessionsWithRawResponse(self._connect.sessions)


class ConnectWithStreamingResponse:
def __init__(self, connect: Connect) -> None:
self._connect = connect

@cached_property
def sessions(self) -> SessionsWithStreamingResponse:
return SessionsWithStreamingResponse(self._connect.sessions)


class AsyncConnectWithStreamingResponse:
def __init__(self, connect: AsyncConnect) -> None:
self._connect = connect

@cached_property
def sessions(self) -> AsyncSessionsWithStreamingResponse:
return AsyncSessionsWithStreamingResponse(self._connect.sessions)
Loading