Skip to content

Commit 08974d3

Browse files
feat(api): api update
1 parent 2e947bc commit 08974d3

File tree

5 files changed

+113
-125
lines changed

5 files changed

+113
-125
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-0105d239fcaf84750c886dfa6c2cfbf2b2087f89a48f8827c4cbe28479ebfb13.yml
3-
openapi_spec_hash: 34895c3d3c137fb9f5a019ac5370afbb
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-b817e7a30a6366c063a8c9a334d5be281eb8d93e21acc8c8219d3bdc95043deb.yml
3+
openapi_spec_hash: d4cc4a5cba9f13986e38d148d330aa00
44
config_hash: 5c64f384746e7570c10f19fe241062a7

src/finch/resources/connect/sessions.py

Lines changed: 33 additions & 31 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, Query, Headers, NotGiven, not_given
11+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
1212
from ..._utils import maybe_transform, async_maybe_transform
1313
from ..._compat import cached_property
1414
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -44,12 +44,8 @@ def with_streaming_response(self) -> SessionsWithStreamingResponse:
4444
def new(
4545
self,
4646
*,
47-
customer_email: Optional[str],
4847
customer_id: str,
4948
customer_name: str,
50-
integration: Optional[session_new_params.Integration],
51-
manual: Optional[bool],
52-
minutes_to_expire: Optional[float],
5349
products: List[
5450
Literal[
5551
"benefits",
@@ -64,8 +60,12 @@ def new(
6460
"ssn",
6561
]
6662
],
67-
redirect_uri: Optional[str],
68-
sandbox: Optional[Literal["finch", "provider"]],
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,
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,21 +77,21 @@ def new(
7777
Create a new connect session for an employer
7878
7979
Args:
80-
customer_email: Email address of the customer
81-
8280
customer_id: Unique identifier for the customer
8381
8482
customer_name: Name of the customer
8583
84+
products: The Finch products to request access to
85+
86+
customer_email: Email address of the customer
87+
8688
integration: Integration configuration for the connect session
8789
8890
manual: Enable manual authentication mode
8991
9092
minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
9193
90 days)
9294
93-
products: The Finch products to request access to
94-
9595
redirect_uri: The URI to redirect to after the Connect flow is completed
9696
9797
sandbox: Sandbox mode for testing
@@ -108,13 +108,13 @@ def new(
108108
"/connect/sessions",
109109
body=maybe_transform(
110110
{
111-
"customer_email": customer_email,
112111
"customer_id": customer_id,
113112
"customer_name": customer_name,
113+
"products": products,
114+
"customer_email": customer_email,
114115
"integration": integration,
115116
"manual": manual,
116117
"minutes_to_expire": minutes_to_expire,
117-
"products": products,
118118
"redirect_uri": redirect_uri,
119119
"sandbox": sandbox,
120120
},
@@ -130,7 +130,7 @@ def reauthenticate(
130130
self,
131131
*,
132132
connection_id: str,
133-
minutes_to_expire: int,
133+
minutes_to_expire: int | Omit = omit,
134134
products: Optional[
135135
List[
136136
Literal[
@@ -146,8 +146,9 @@ def reauthenticate(
146146
"ssn",
147147
]
148148
]
149-
],
150-
redirect_uri: Optional[str],
149+
]
150+
| Omit = omit,
151+
redirect_uri: Optional[str] | Omit = omit,
151152
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
152153
# The extra values given here take precedence over values defined on the client or passed to this method.
153154
extra_headers: Headers | None = None,
@@ -217,12 +218,8 @@ def with_streaming_response(self) -> AsyncSessionsWithStreamingResponse:
217218
async def new(
218219
self,
219220
*,
220-
customer_email: Optional[str],
221221
customer_id: str,
222222
customer_name: str,
223-
integration: Optional[session_new_params.Integration],
224-
manual: Optional[bool],
225-
minutes_to_expire: Optional[float],
226223
products: List[
227224
Literal[
228225
"benefits",
@@ -237,8 +234,12 @@ async def new(
237234
"ssn",
238235
]
239236
],
240-
redirect_uri: Optional[str],
241-
sandbox: Optional[Literal["finch", "provider"]],
237+
customer_email: Optional[str] | Omit = omit,
238+
integration: Optional[session_new_params.Integration] | Omit = omit,
239+
manual: Optional[bool] | Omit = omit,
240+
minutes_to_expire: Optional[float] | Omit = omit,
241+
redirect_uri: Optional[str] | Omit = omit,
242+
sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
242243
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243244
# The extra values given here take precedence over values defined on the client or passed to this method.
244245
extra_headers: Headers | None = None,
@@ -250,21 +251,21 @@ async def new(
250251
Create a new connect session for an employer
251252
252253
Args:
253-
customer_email: Email address of the customer
254-
255254
customer_id: Unique identifier for the customer
256255
257256
customer_name: Name of the customer
258257
258+
products: The Finch products to request access to
259+
260+
customer_email: Email address of the customer
261+
259262
integration: Integration configuration for the connect session
260263
261264
manual: Enable manual authentication mode
262265
263266
minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
264267
90 days)
265268
266-
products: The Finch products to request access to
267-
268269
redirect_uri: The URI to redirect to after the Connect flow is completed
269270
270271
sandbox: Sandbox mode for testing
@@ -281,13 +282,13 @@ async def new(
281282
"/connect/sessions",
282283
body=await async_maybe_transform(
283284
{
284-
"customer_email": customer_email,
285285
"customer_id": customer_id,
286286
"customer_name": customer_name,
287+
"products": products,
288+
"customer_email": customer_email,
287289
"integration": integration,
288290
"manual": manual,
289291
"minutes_to_expire": minutes_to_expire,
290-
"products": products,
291292
"redirect_uri": redirect_uri,
292293
"sandbox": sandbox,
293294
},
@@ -303,7 +304,7 @@ async def reauthenticate(
303304
self,
304305
*,
305306
connection_id: str,
306-
minutes_to_expire: int,
307+
minutes_to_expire: int | Omit = omit,
307308
products: Optional[
308309
List[
309310
Literal[
@@ -319,8 +320,9 @@ async def reauthenticate(
319320
"ssn",
320321
]
321322
]
322-
],
323-
redirect_uri: Optional[str],
323+
]
324+
| Omit = omit,
325+
redirect_uri: Optional[str] | Omit = omit,
324326
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
325327
# The extra values given here take precedence over values defined on the client or passed to this method.
326328
extra_headers: Headers | None = None,

src/finch/types/connect/session_new_params.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,12 @@
99

1010

1111
class SessionNewParams(TypedDict, total=False):
12-
customer_email: Required[Optional[str]]
13-
"""Email address of the customer"""
14-
1512
customer_id: Required[str]
1613
"""Unique identifier for the customer"""
1714

1815
customer_name: Required[str]
1916
"""Name of the customer"""
2017

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-
"""
32-
3318
products: Required[
3419
List[
3520
Literal[
@@ -48,16 +33,31 @@ class SessionNewParams(TypedDict, total=False):
4833
]
4934
"""The Finch products to request access to"""
5035

51-
redirect_uri: Required[Optional[str]]
36+
customer_email: Optional[str]
37+
"""Email address of the customer"""
38+
39+
integration: Optional[Integration]
40+
"""Integration configuration for the connect session"""
41+
42+
manual: Optional[bool]
43+
"""Enable manual authentication mode"""
44+
45+
minutes_to_expire: Optional[float]
46+
"""
47+
The number of minutes until the session expires (defaults to 129,600, which is
48+
90 days)
49+
"""
50+
51+
redirect_uri: Optional[str]
5252
"""The URI to redirect to after the Connect flow is completed"""
5353

54-
sandbox: Required[Optional[Literal["finch", "provider"]]]
54+
sandbox: Optional[Literal["finch", "provider"]]
5555
"""Sandbox mode for testing"""
5656

5757

5858
class Integration(TypedDict, total=False):
59-
auth_method: Required[Optional[Literal["assisted", "credential", "oauth", "api_token"]]]
60-
"""The authentication method to use"""
61-
62-
provider: Required[Optional[str]]
59+
provider: Required[str]
6360
"""The provider to integrate with"""
61+
62+
auth_method: Optional[Literal["assisted", "credential", "oauth", "api_token"]]
63+
"""The authentication method to use"""

src/finch/types/connect/session_reauthenticate_params.py

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

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

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-
]
21+
products: Optional[
22+
List[
23+
Literal[
24+
"benefits",
25+
"company",
26+
"deduction",
27+
"directory",
28+
"documents",
29+
"employment",
30+
"individual",
31+
"payment",
32+
"pay_statement",
33+
"ssn",
3634
]
3735
]
3836
]
3937
"""The products to request access to (optional for reauthentication)"""
4038

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

0 commit comments

Comments
 (0)