Skip to content

Commit 208ed5d

Browse files
chore(internal): codegen related update (#501)
1 parent 0668b78 commit 208ed5d

14 files changed

+845
-2
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 37
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0b6874fdff2a5ed63c4e84830811f10a91e10e9c3e300a33f25422ad0afb945b.yml
1+
configured_endpoints: 39
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e915b33a18d4e6592966587ef174bbfe316edd9bc1fd7c17f86f372089bf80eb.yml

api.md

+15
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,18 @@ Methods:
354354

355355
- <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>
356356
- <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>
357+
358+
# Connect
359+
360+
## Sessions
361+
362+
Types:
363+
364+
```python
365+
from finch.types.connect import SessionNewResponse, SessionReauthenticateResponse
366+
```
367+
368+
Methods:
369+
370+
- <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>
371+
- <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>

src/finch/_client.py

+8
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class Finch(SyncAPIClient):
6060
jobs: resources.Jobs
6161
sandbox: resources.Sandbox
6262
payroll: resources.Payroll
63+
connect: resources.Connect
6364
with_raw_response: FinchWithRawResponse
6465
with_streaming_response: FinchWithStreamedResponse
6566

@@ -163,6 +164,7 @@ def __init__(
163164
self.jobs = resources.Jobs(self)
164165
self.sandbox = resources.Sandbox(self)
165166
self.payroll = resources.Payroll(self)
167+
self.connect = resources.Connect(self)
166168
self.with_raw_response = FinchWithRawResponse(self)
167169
self.with_streaming_response = FinchWithStreamedResponse(self)
168170

@@ -346,6 +348,7 @@ class AsyncFinch(AsyncAPIClient):
346348
jobs: resources.AsyncJobs
347349
sandbox: resources.AsyncSandbox
348350
payroll: resources.AsyncPayroll
351+
connect: resources.AsyncConnect
349352
with_raw_response: AsyncFinchWithRawResponse
350353
with_streaming_response: AsyncFinchWithStreamedResponse
351354

@@ -449,6 +452,7 @@ def __init__(
449452
self.jobs = resources.AsyncJobs(self)
450453
self.sandbox = resources.AsyncSandbox(self)
451454
self.payroll = resources.AsyncPayroll(self)
455+
self.connect = resources.AsyncConnect(self)
452456
self.with_raw_response = AsyncFinchWithRawResponse(self)
453457
self.with_streaming_response = AsyncFinchWithStreamedResponse(self)
454458

@@ -633,6 +637,7 @@ def __init__(self, client: Finch) -> None:
633637
self.jobs = resources.JobsWithRawResponse(client.jobs)
634638
self.sandbox = resources.SandboxWithRawResponse(client.sandbox)
635639
self.payroll = resources.PayrollWithRawResponse(client.payroll)
640+
self.connect = resources.ConnectWithRawResponse(client.connect)
636641

637642

638643
class AsyncFinchWithRawResponse:
@@ -645,6 +650,7 @@ def __init__(self, client: AsyncFinch) -> None:
645650
self.jobs = resources.AsyncJobsWithRawResponse(client.jobs)
646651
self.sandbox = resources.AsyncSandboxWithRawResponse(client.sandbox)
647652
self.payroll = resources.AsyncPayrollWithRawResponse(client.payroll)
653+
self.connect = resources.AsyncConnectWithRawResponse(client.connect)
648654

649655

650656
class FinchWithStreamedResponse:
@@ -657,6 +663,7 @@ def __init__(self, client: Finch) -> None:
657663
self.jobs = resources.JobsWithStreamingResponse(client.jobs)
658664
self.sandbox = resources.SandboxWithStreamingResponse(client.sandbox)
659665
self.payroll = resources.PayrollWithStreamingResponse(client.payroll)
666+
self.connect = resources.ConnectWithStreamingResponse(client.connect)
660667

661668

662669
class AsyncFinchWithStreamedResponse:
@@ -669,6 +676,7 @@ def __init__(self, client: AsyncFinch) -> None:
669676
self.jobs = resources.AsyncJobsWithStreamingResponse(client.jobs)
670677
self.sandbox = resources.AsyncSandboxWithStreamingResponse(client.sandbox)
671678
self.payroll = resources.AsyncPayrollWithStreamingResponse(client.payroll)
679+
self.connect = resources.AsyncConnectWithStreamingResponse(client.connect)
672680

673681

674682
Client = Finch

src/finch/resources/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
AccountWithStreamingResponse,
2525
AsyncAccountWithStreamingResponse,
2626
)
27+
from .connect import (
28+
Connect,
29+
AsyncConnect,
30+
ConnectWithRawResponse,
31+
AsyncConnectWithRawResponse,
32+
ConnectWithStreamingResponse,
33+
AsyncConnectWithStreamingResponse,
34+
)
2735
from .payroll import (
2836
Payroll,
2937
AsyncPayroll,
@@ -114,4 +122,10 @@
114122
"AsyncPayrollWithRawResponse",
115123
"PayrollWithStreamingResponse",
116124
"AsyncPayrollWithStreamingResponse",
125+
"Connect",
126+
"AsyncConnect",
127+
"ConnectWithRawResponse",
128+
"AsyncConnectWithRawResponse",
129+
"ConnectWithStreamingResponse",
130+
"AsyncConnectWithStreamingResponse",
117131
]
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .connect import (
4+
Connect,
5+
AsyncConnect,
6+
ConnectWithRawResponse,
7+
AsyncConnectWithRawResponse,
8+
ConnectWithStreamingResponse,
9+
AsyncConnectWithStreamingResponse,
10+
)
11+
from .sessions import (
12+
Sessions,
13+
AsyncSessions,
14+
SessionsWithRawResponse,
15+
AsyncSessionsWithRawResponse,
16+
SessionsWithStreamingResponse,
17+
AsyncSessionsWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"Sessions",
22+
"AsyncSessions",
23+
"SessionsWithRawResponse",
24+
"AsyncSessionsWithRawResponse",
25+
"SessionsWithStreamingResponse",
26+
"AsyncSessionsWithStreamingResponse",
27+
"Connect",
28+
"AsyncConnect",
29+
"ConnectWithRawResponse",
30+
"AsyncConnectWithRawResponse",
31+
"ConnectWithStreamingResponse",
32+
"AsyncConnectWithStreamingResponse",
33+
]
+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from .sessions import (
6+
Sessions,
7+
AsyncSessions,
8+
SessionsWithRawResponse,
9+
AsyncSessionsWithRawResponse,
10+
SessionsWithStreamingResponse,
11+
AsyncSessionsWithStreamingResponse,
12+
)
13+
from ..._compat import cached_property
14+
from ..._resource import SyncAPIResource, AsyncAPIResource
15+
16+
__all__ = ["Connect", "AsyncConnect"]
17+
18+
19+
class Connect(SyncAPIResource):
20+
@cached_property
21+
def sessions(self) -> Sessions:
22+
return Sessions(self._client)
23+
24+
@cached_property
25+
def with_raw_response(self) -> ConnectWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return the
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
31+
"""
32+
return ConnectWithRawResponse(self)
33+
34+
@cached_property
35+
def with_streaming_response(self) -> ConnectWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
40+
"""
41+
return ConnectWithStreamingResponse(self)
42+
43+
44+
class AsyncConnect(AsyncAPIResource):
45+
@cached_property
46+
def sessions(self) -> AsyncSessions:
47+
return AsyncSessions(self._client)
48+
49+
@cached_property
50+
def with_raw_response(self) -> AsyncConnectWithRawResponse:
51+
"""
52+
This property can be used as a prefix for any HTTP method call to return the
53+
the raw response object instead of the parsed content.
54+
55+
For more information, see https://www.github.com/Finch-API/finch-api-python#accessing-raw-response-data-eg-headers
56+
"""
57+
return AsyncConnectWithRawResponse(self)
58+
59+
@cached_property
60+
def with_streaming_response(self) -> AsyncConnectWithStreamingResponse:
61+
"""
62+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63+
64+
For more information, see https://www.github.com/Finch-API/finch-api-python#with_streaming_response
65+
"""
66+
return AsyncConnectWithStreamingResponse(self)
67+
68+
69+
class ConnectWithRawResponse:
70+
def __init__(self, connect: Connect) -> None:
71+
self._connect = connect
72+
73+
@cached_property
74+
def sessions(self) -> SessionsWithRawResponse:
75+
return SessionsWithRawResponse(self._connect.sessions)
76+
77+
78+
class AsyncConnectWithRawResponse:
79+
def __init__(self, connect: AsyncConnect) -> None:
80+
self._connect = connect
81+
82+
@cached_property
83+
def sessions(self) -> AsyncSessionsWithRawResponse:
84+
return AsyncSessionsWithRawResponse(self._connect.sessions)
85+
86+
87+
class ConnectWithStreamingResponse:
88+
def __init__(self, connect: Connect) -> None:
89+
self._connect = connect
90+
91+
@cached_property
92+
def sessions(self) -> SessionsWithStreamingResponse:
93+
return SessionsWithStreamingResponse(self._connect.sessions)
94+
95+
96+
class AsyncConnectWithStreamingResponse:
97+
def __init__(self, connect: AsyncConnect) -> None:
98+
self._connect = connect
99+
100+
@cached_property
101+
def sessions(self) -> AsyncSessionsWithStreamingResponse:
102+
return AsyncSessionsWithStreamingResponse(self._connect.sessions)

0 commit comments

Comments
 (0)