Skip to content

Commit 3b99127

Browse files
feat(api): api update
1 parent c1e5e28 commit 3b99127

File tree

5 files changed

+178
-124
lines changed

5 files changed

+178
-124
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-199a2fd8b7387b0648e88b5942a8248895373a561aff663389982073e55c8eb5.yml
3-
openapi_spec_hash: 7415c1faca5f2e873824893b140650f1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5f9c0770c8be0fa779cbb640c25043cc1d5514236b8d0d6791c822dd7e00ffe6.yml
3+
openapi_spec_hash: d8df70c1dc1ba1ebcd572c1fab58eec6
44
config_hash: 6d3585c0032e08d723d077d660fc8448

src/finch/resources/connect/sessions.py

Lines changed: 71 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import httpx
99

1010
from ... import _legacy_response
11-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11+
from ..._types import Body, Query, Headers, NotGiven, not_given
1212
from ..._utils import maybe_transform, async_maybe_transform
1313
from ..._compat import cached_property
1414
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -44,28 +44,28 @@ def with_streaming_response(self) -> SessionsWithStreamingResponse:
4444
def new(
4545
self,
4646
*,
47+
customer_email: Optional[str],
4748
customer_id: str,
4849
customer_name: str,
50+
integration: Optional[session_new_params.Integration],
51+
manual: Optional[bool],
52+
minutes_to_expire: Optional[float],
4953
products: List[
5054
Literal[
55+
"benefits",
5156
"company",
57+
"deduction",
5258
"directory",
53-
"individual",
59+
"documents",
5460
"employment",
61+
"individual",
5562
"payment",
5663
"pay_statement",
57-
"benefits",
5864
"ssn",
59-
"deduction",
60-
"documents",
6165
]
6266
],
63-
customer_email: Optional[str] | Omit = omit,
64-
integration: Optional[session_new_params.Integration] | Omit = omit,
65-
manual: Optional[bool] | Omit = omit,
66-
minutes_to_expire: Optional[float] | Omit = omit,
67-
redirect_uri: Optional[str] | Omit = omit,
68-
sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
67+
redirect_uri: Optional[str],
68+
sandbox: Optional[Literal["finch", "provider"]],
6969
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7070
# The extra values given here take precedence over values defined on the client or passed to this method.
7171
extra_headers: Headers | None = None,
@@ -77,9 +77,25 @@ def new(
7777
Create a new connect session for an employer
7878
7979
Args:
80+
customer_email: Email address of the customer
81+
82+
customer_id: Unique identifier for the customer
83+
84+
customer_name: Name of the customer
85+
86+
integration: Integration configuration for the connect session
87+
88+
manual: Enable manual authentication mode
89+
8090
minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
8191
90 days)
8292
93+
products: The Finch products to request access to
94+
95+
redirect_uri: The URI to redirect to after the Connect flow is completed
96+
97+
sandbox: Sandbox mode for testing
98+
8399
extra_headers: Send extra headers
84100
85101
extra_query: Add additional query parameters to the request
@@ -92,13 +108,13 @@ def new(
92108
"/connect/sessions",
93109
body=maybe_transform(
94110
{
111+
"customer_email": customer_email,
95112
"customer_id": customer_id,
96113
"customer_name": customer_name,
97-
"products": products,
98-
"customer_email": customer_email,
99114
"integration": integration,
100115
"manual": manual,
101116
"minutes_to_expire": minutes_to_expire,
117+
"products": products,
102118
"redirect_uri": redirect_uri,
103119
"sandbox": sandbox,
104120
},
@@ -114,25 +130,24 @@ def reauthenticate(
114130
self,
115131
*,
116132
connection_id: str,
117-
minutes_to_expire: Optional[int] | Omit = omit,
133+
minutes_to_expire: int,
118134
products: Optional[
119135
List[
120136
Literal[
137+
"benefits",
121138
"company",
139+
"deduction",
122140
"directory",
123-
"individual",
141+
"documents",
124142
"employment",
143+
"individual",
125144
"payment",
126145
"pay_statement",
127-
"benefits",
128146
"ssn",
129-
"deduction",
130-
"documents",
131147
]
132148
]
133-
]
134-
| Omit = omit,
135-
redirect_uri: Optional[str] | Omit = omit,
149+
],
150+
redirect_uri: Optional[str],
136151
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
137152
# The extra values given here take precedence over values defined on the client or passed to this method.
138153
extra_headers: Headers | None = None,
@@ -202,28 +217,28 @@ def with_streaming_response(self) -> AsyncSessionsWithStreamingResponse:
202217
async def new(
203218
self,
204219
*,
220+
customer_email: Optional[str],
205221
customer_id: str,
206222
customer_name: str,
223+
integration: Optional[session_new_params.Integration],
224+
manual: Optional[bool],
225+
minutes_to_expire: Optional[float],
207226
products: List[
208227
Literal[
228+
"benefits",
209229
"company",
230+
"deduction",
210231
"directory",
211-
"individual",
232+
"documents",
212233
"employment",
234+
"individual",
213235
"payment",
214236
"pay_statement",
215-
"benefits",
216237
"ssn",
217-
"deduction",
218-
"documents",
219238
]
220239
],
221-
customer_email: Optional[str] | Omit = omit,
222-
integration: Optional[session_new_params.Integration] | Omit = omit,
223-
manual: Optional[bool] | Omit = omit,
224-
minutes_to_expire: Optional[float] | Omit = omit,
225-
redirect_uri: Optional[str] | Omit = omit,
226-
sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
240+
redirect_uri: Optional[str],
241+
sandbox: Optional[Literal["finch", "provider"]],
227242
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228243
# The extra values given here take precedence over values defined on the client or passed to this method.
229244
extra_headers: Headers | None = None,
@@ -235,9 +250,25 @@ async def new(
235250
Create a new connect session for an employer
236251
237252
Args:
253+
customer_email: Email address of the customer
254+
255+
customer_id: Unique identifier for the customer
256+
257+
customer_name: Name of the customer
258+
259+
integration: Integration configuration for the connect session
260+
261+
manual: Enable manual authentication mode
262+
238263
minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
239264
90 days)
240265
266+
products: The Finch products to request access to
267+
268+
redirect_uri: The URI to redirect to after the Connect flow is completed
269+
270+
sandbox: Sandbox mode for testing
271+
241272
extra_headers: Send extra headers
242273
243274
extra_query: Add additional query parameters to the request
@@ -250,13 +281,13 @@ async def new(
250281
"/connect/sessions",
251282
body=await async_maybe_transform(
252283
{
284+
"customer_email": customer_email,
253285
"customer_id": customer_id,
254286
"customer_name": customer_name,
255-
"products": products,
256-
"customer_email": customer_email,
257287
"integration": integration,
258288
"manual": manual,
259289
"minutes_to_expire": minutes_to_expire,
290+
"products": products,
260291
"redirect_uri": redirect_uri,
261292
"sandbox": sandbox,
262293
},
@@ -272,25 +303,24 @@ async def reauthenticate(
272303
self,
273304
*,
274305
connection_id: str,
275-
minutes_to_expire: Optional[int] | Omit = omit,
306+
minutes_to_expire: int,
276307
products: Optional[
277308
List[
278309
Literal[
310+
"benefits",
279311
"company",
312+
"deduction",
280313
"directory",
281-
"individual",
314+
"documents",
282315
"employment",
316+
"individual",
283317
"payment",
284318
"pay_statement",
285-
"benefits",
286319
"ssn",
287-
"deduction",
288-
"documents",
289320
]
290321
]
291-
]
292-
| Omit = omit,
293-
redirect_uri: Optional[str] | Omit = omit,
322+
],
323+
redirect_uri: Optional[str],
294324
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
295325
# The extra values given here take precedence over values defined on the client or passed to this method.
296326
extra_headers: Headers | None = None,

src/finch/types/connect/session_new_params.py

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,55 @@
99

1010

1111
class SessionNewParams(TypedDict, total=False):
12+
customer_email: Required[Optional[str]]
13+
"""Email address of the customer"""
14+
1215
customer_id: Required[str]
16+
"""Unique identifier for the customer"""
1317

1418
customer_name: Required[str]
19+
"""Name of the customer"""
20+
21+
integration: Required[Optional[Integration]]
22+
"""Integration configuration for the connect session"""
23+
24+
manual: Required[Optional[bool]]
25+
"""Enable manual authentication mode"""
26+
27+
minutes_to_expire: Required[Optional[float]]
28+
"""
29+
The number of minutes until the session expires (defaults to 129,600, which is
30+
90 days)
31+
"""
1532

1633
products: Required[
1734
List[
1835
Literal[
36+
"benefits",
1937
"company",
38+
"deduction",
2039
"directory",
21-
"individual",
40+
"documents",
2241
"employment",
42+
"individual",
2343
"payment",
2444
"pay_statement",
25-
"benefits",
2645
"ssn",
27-
"deduction",
28-
"documents",
2946
]
3047
]
3148
]
49+
"""The Finch products to request access to"""
3250

33-
customer_email: Optional[str]
34-
35-
integration: Optional[Integration]
36-
37-
manual: Optional[bool]
38-
39-
minutes_to_expire: Optional[float]
40-
"""
41-
The number of minutes until the session expires (defaults to 129,600, which is
42-
90 days)
43-
"""
44-
45-
redirect_uri: Optional[str]
51+
redirect_uri: Required[Optional[str]]
52+
"""The URI to redirect to after the Connect flow is completed"""
4653

47-
sandbox: Optional[Literal["finch", "provider"]]
54+
sandbox: Required[Optional[Literal["finch", "provider"]]]
55+
"""Sandbox mode for testing"""
4856

4957

5058
class Integration(TypedDict, total=False):
51-
auth_method: Optional[Literal["assisted", "credential", "oauth", "api_token"]]
59+
auth_method: Required[Optional[Literal["assisted", "credential", "oauth", "api_token"]]]
60+
"""The authentication method to use"""
5261

53-
provider: Optional[str]
62+
provider: Required[Optional[str]]
63+
"""The provider to integrate with"""

src/finch/types/connect/session_reauthenticate_params.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,31 @@ class SessionReauthenticateParams(TypedDict, total=False):
1212
connection_id: Required[str]
1313
"""The ID of the existing connection to reauthenticate"""
1414

15-
minutes_to_expire: Optional[int]
15+
minutes_to_expire: Required[int]
1616
"""
1717
The number of minutes until the session expires (defaults to 43,200, which is 30
1818
days)
1919
"""
2020

21-
products: Optional[
22-
List[
23-
Literal[
24-
"company",
25-
"directory",
26-
"individual",
27-
"employment",
28-
"payment",
29-
"pay_statement",
30-
"benefits",
31-
"ssn",
32-
"deduction",
33-
"documents",
21+
products: Required[
22+
Optional[
23+
List[
24+
Literal[
25+
"benefits",
26+
"company",
27+
"deduction",
28+
"directory",
29+
"documents",
30+
"employment",
31+
"individual",
32+
"payment",
33+
"pay_statement",
34+
"ssn",
35+
]
3436
]
3537
]
3638
]
3739
"""The products to request access to (optional for reauthentication)"""
3840

39-
redirect_uri: Optional[str]
41+
redirect_uri: Required[Optional[str]]
4042
"""The URI to redirect to after the Connect flow is completed"""

0 commit comments

Comments
 (0)