Skip to content

Commit ea96424

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): codegen related update (#501)
1 parent 7231d10 commit ea96424

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
@@ -366,3 +366,18 @@ Methods:
366366

367367
- <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>
368368
- <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>
369+
370+
# Connect
371+
372+
## Sessions
373+
374+
Types:
375+
376+
```python
377+
from finch.types.connect import SessionNewResponse, SessionReauthenticateResponse
378+
```
379+
380+
Methods:
381+
382+
- <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>
383+
- <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
@@ -61,6 +61,7 @@ class Finch(SyncAPIClient):
6161
jobs: resources.Jobs
6262
sandbox: resources.Sandbox
6363
payroll: resources.Payroll
64+
connect: resources.Connect
6465
with_raw_response: FinchWithRawResponse
6566
with_streaming_response: FinchWithStreamedResponse
6667

@@ -165,6 +166,7 @@ def __init__(
165166
self.jobs = resources.Jobs(self)
166167
self.sandbox = resources.Sandbox(self)
167168
self.payroll = resources.Payroll(self)
169+
self.connect = resources.Connect(self)
168170
self.with_raw_response = FinchWithRawResponse(self)
169171
self.with_streaming_response = FinchWithStreamedResponse(self)
170172

@@ -413,6 +415,7 @@ class AsyncFinch(AsyncAPIClient):
413415
jobs: resources.AsyncJobs
414416
sandbox: resources.AsyncSandbox
415417
payroll: resources.AsyncPayroll
418+
connect: resources.AsyncConnect
416419
with_raw_response: AsyncFinchWithRawResponse
417420
with_streaming_response: AsyncFinchWithStreamedResponse
418421

@@ -517,6 +520,7 @@ def __init__(
517520
self.jobs = resources.AsyncJobs(self)
518521
self.sandbox = resources.AsyncSandbox(self)
519522
self.payroll = resources.AsyncPayroll(self)
523+
self.connect = resources.AsyncConnect(self)
520524
self.with_raw_response = AsyncFinchWithRawResponse(self)
521525
self.with_streaming_response = AsyncFinchWithStreamedResponse(self)
522526

@@ -765,6 +769,7 @@ def __init__(self, client: Finch) -> None:
765769
self.jobs = resources.JobsWithRawResponse(client.jobs)
766770
self.sandbox = resources.SandboxWithRawResponse(client.sandbox)
767771
self.payroll = resources.PayrollWithRawResponse(client.payroll)
772+
self.connect = resources.ConnectWithRawResponse(client.connect)
768773

769774

770775
class AsyncFinchWithRawResponse:
@@ -777,6 +782,7 @@ def __init__(self, client: AsyncFinch) -> None:
777782
self.jobs = resources.AsyncJobsWithRawResponse(client.jobs)
778783
self.sandbox = resources.AsyncSandboxWithRawResponse(client.sandbox)
779784
self.payroll = resources.AsyncPayrollWithRawResponse(client.payroll)
785+
self.connect = resources.AsyncConnectWithRawResponse(client.connect)
780786

781787

782788
class FinchWithStreamedResponse:
@@ -789,6 +795,7 @@ def __init__(self, client: Finch) -> None:
789795
self.jobs = resources.JobsWithStreamingResponse(client.jobs)
790796
self.sandbox = resources.SandboxWithStreamingResponse(client.sandbox)
791797
self.payroll = resources.PayrollWithStreamingResponse(client.payroll)
798+
self.connect = resources.ConnectWithStreamingResponse(client.connect)
792799

793800

794801
class AsyncFinchWithStreamedResponse:
@@ -801,6 +808,7 @@ def __init__(self, client: AsyncFinch) -> None:
801808
self.jobs = resources.AsyncJobsWithStreamingResponse(client.jobs)
802809
self.sandbox = resources.AsyncSandboxWithStreamingResponse(client.sandbox)
803810
self.payroll = resources.AsyncPayrollWithStreamingResponse(client.payroll)
811+
self.connect = resources.AsyncConnectWithStreamingResponse(client.connect)
804812

805813

806814
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,
@@ -117,4 +125,10 @@
117125
"AsyncPayrollWithRawResponse",
118126
"PayrollWithStreamingResponse",
119127
"AsyncPayrollWithStreamingResponse",
128+
"Connect",
129+
"AsyncConnect",
130+
"ConnectWithRawResponse",
131+
"AsyncConnectWithRawResponse",
132+
"ConnectWithStreamingResponse",
133+
"AsyncConnectWithStreamingResponse",
120134
]
+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)