Skip to content

Commit 030c07d

Browse files
feat(api): api update
1 parent 00792da commit 030c07d

13 files changed

Lines changed: 166 additions & 37 deletions

.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-d5e464682bd08cc19d0c41aa783238846cdc1162a8765083bd5c7e3ca78655d5.yml
3-
openapi_spec_hash: 40b39b0a6fcd33ce59c96bec3ebb5985
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml
3+
openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca
44
config_hash: 5146b12344dae76238940989dac1e8a0

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ from finch.types.jobs import AutomatedAsyncJob, AutomatedCreateResponse, Automat
281281
Methods:
282282

283283
- <code title="post /jobs/automated">client.jobs.automated.<a href="./src/finch/resources/jobs/automated.py">create</a>(\*\*<a href="src/finch/types/jobs/automated_create_params.py">params</a>) -> <a href="./src/finch/types/jobs/automated_create_response.py">AutomatedCreateResponse</a></code>
284-
- <code title="get /jobs/automated/{job_id}">client.jobs.automated.<a href="./src/finch/resources/jobs/automated.py">retrieve</a>(job_id) -> <a href="./src/finch/types/jobs/automated_async_job.py">AutomatedAsyncJob</a></code>
284+
- <code title="get /jobs/automated/{job_id}">client.jobs.automated.<a href="./src/finch/resources/jobs/automated.py">retrieve</a>(job_id, \*\*<a href="src/finch/types/jobs/automated_retrieve_params.py">params</a>) -> <a href="./src/finch/types/jobs/automated_async_job.py">AutomatedAsyncJob</a></code>
285285
- <code title="get /jobs/automated">client.jobs.automated.<a href="./src/finch/resources/jobs/automated.py">list</a>(\*\*<a href="src/finch/types/jobs/automated_list_params.py">params</a>) -> <a href="./src/finch/types/jobs/automated_list_response.py">AutomatedListResponse</a></code>
286286

287287
## Manual
@@ -294,7 +294,7 @@ from finch.types.jobs import ManualAsyncJob
294294

295295
Methods:
296296

297-
- <code title="get /jobs/manual/{job_id}">client.jobs.manual.<a href="./src/finch/resources/jobs/manual.py">retrieve</a>(job_id) -> <a href="./src/finch/types/jobs/manual_async_job.py">ManualAsyncJob</a></code>
297+
- <code title="get /jobs/manual/{job_id}">client.jobs.manual.<a href="./src/finch/resources/jobs/manual.py">retrieve</a>(job_id, \*\*<a href="src/finch/types/jobs/manual_retrieve_params.py">params</a>) -> <a href="./src/finch/types/jobs/manual_async_job.py">ManualAsyncJob</a></code>
298298

299299
# Sandbox
300300

src/finch/resources/jobs/automated.py

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ..._compat import cached_property
1313
from ..._resource import SyncAPIResource, AsyncAPIResource
1414
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
15-
from ...types.jobs import automated_list_params, automated_create_params
15+
from ...types.jobs import automated_list_params, automated_create_params, automated_retrieve_params
1616
from ..._base_client import make_request_options
1717
from ...types.jobs.automated_async_job import AutomatedAsyncJob
1818
from ...types.jobs.automated_list_response import AutomatedListResponse
@@ -156,6 +156,7 @@ def retrieve(
156156
self,
157157
job_id: str,
158158
*,
159+
entity_id: str | NotGiven = NOT_GIVEN,
159160
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
160161
# The extra values given here take precedence over values defined on the client or passed to this method.
161162
extra_headers: Headers | None = None,
@@ -167,6 +168,10 @@ def retrieve(
167168
Get an automated job by `job_id`.
168169
169170
Args:
171+
entity_id: The entity ID to use when authenticating with a multi-account token. Required
172+
when using a multi-account token to specify which entity's data to access.
173+
Example: `123e4567-e89b-12d3-a456-426614174000`
174+
170175
extra_headers: Send extra headers
171176
172177
extra_query: Add additional query parameters to the request
@@ -180,14 +185,19 @@ def retrieve(
180185
return self._get(
181186
f"/jobs/automated/{job_id}",
182187
options=make_request_options(
183-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
188+
extra_headers=extra_headers,
189+
extra_query=extra_query,
190+
extra_body=extra_body,
191+
timeout=timeout,
192+
query=maybe_transform({"entity_id": entity_id}, automated_retrieve_params.AutomatedRetrieveParams),
184193
),
185194
cast_to=AutomatedAsyncJob,
186195
)
187196

188197
def list(
189198
self,
190199
*,
200+
entity_id: str | NotGiven = NOT_GIVEN,
191201
limit: int | NotGiven = NOT_GIVEN,
192202
offset: int | NotGiven = NOT_GIVEN,
193203
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -204,6 +214,10 @@ def list(
204214
as data syncs, only the next scheduled job is shown.
205215
206216
Args:
217+
entity_id: The entity ID to use when authenticating with a multi-account token. Required
218+
when using a multi-account token to specify which entity's data to access.
219+
Example: `123e4567-e89b-12d3-a456-426614174000`
220+
207221
limit: Number of items to return
208222
209223
offset: Index to start from (defaults to 0)
@@ -225,6 +239,7 @@ def list(
225239
timeout=timeout,
226240
query=maybe_transform(
227241
{
242+
"entity_id": entity_id,
228243
"limit": limit,
229244
"offset": offset,
230245
},
@@ -370,6 +385,7 @@ async def retrieve(
370385
self,
371386
job_id: str,
372387
*,
388+
entity_id: str | NotGiven = NOT_GIVEN,
373389
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
374390
# The extra values given here take precedence over values defined on the client or passed to this method.
375391
extra_headers: Headers | None = None,
@@ -381,6 +397,10 @@ async def retrieve(
381397
Get an automated job by `job_id`.
382398
383399
Args:
400+
entity_id: The entity ID to use when authenticating with a multi-account token. Required
401+
when using a multi-account token to specify which entity's data to access.
402+
Example: `123e4567-e89b-12d3-a456-426614174000`
403+
384404
extra_headers: Send extra headers
385405
386406
extra_query: Add additional query parameters to the request
@@ -394,14 +414,21 @@ async def retrieve(
394414
return await self._get(
395415
f"/jobs/automated/{job_id}",
396416
options=make_request_options(
397-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
417+
extra_headers=extra_headers,
418+
extra_query=extra_query,
419+
extra_body=extra_body,
420+
timeout=timeout,
421+
query=await async_maybe_transform(
422+
{"entity_id": entity_id}, automated_retrieve_params.AutomatedRetrieveParams
423+
),
398424
),
399425
cast_to=AutomatedAsyncJob,
400426
)
401427

402428
async def list(
403429
self,
404430
*,
431+
entity_id: str | NotGiven = NOT_GIVEN,
405432
limit: int | NotGiven = NOT_GIVEN,
406433
offset: int | NotGiven = NOT_GIVEN,
407434
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -418,6 +445,10 @@ async def list(
418445
as data syncs, only the next scheduled job is shown.
419446
420447
Args:
448+
entity_id: The entity ID to use when authenticating with a multi-account token. Required
449+
when using a multi-account token to specify which entity's data to access.
450+
Example: `123e4567-e89b-12d3-a456-426614174000`
451+
421452
limit: Number of items to return
422453
423454
offset: Index to start from (defaults to 0)
@@ -439,6 +470,7 @@ async def list(
439470
timeout=timeout,
440471
query=await async_maybe_transform(
441472
{
473+
"entity_id": entity_id,
442474
"limit": limit,
443475
"offset": offset,
444476
},

src/finch/resources/jobs/manual.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77
from ... import _legacy_response
88
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
9+
from ..._utils import maybe_transform, async_maybe_transform
910
from ..._compat import cached_property
1011
from ..._resource import SyncAPIResource, AsyncAPIResource
1112
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
13+
from ...types.jobs import manual_retrieve_params
1214
from ..._base_client import make_request_options
1315
from ...types.jobs.manual_async_job import ManualAsyncJob
1416

@@ -39,6 +41,7 @@ def retrieve(
3941
self,
4042
job_id: str,
4143
*,
44+
entity_id: str | NotGiven = NOT_GIVEN,
4245
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4346
# The extra values given here take precedence over values defined on the client or passed to this method.
4447
extra_headers: Headers | None = None,
@@ -52,6 +55,10 @@ def retrieve(
5255
Assisted Benefits jobs.
5356
5457
Args:
58+
entity_id: The entity ID to use when authenticating with a multi-account token. Required
59+
when using a multi-account token to specify which entity's data to access.
60+
Example: `123e4567-e89b-12d3-a456-426614174000`
61+
5562
extra_headers: Send extra headers
5663
5764
extra_query: Add additional query parameters to the request
@@ -65,7 +72,11 @@ def retrieve(
6572
return self._get(
6673
f"/jobs/manual/{job_id}",
6774
options=make_request_options(
68-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
75+
extra_headers=extra_headers,
76+
extra_query=extra_query,
77+
extra_body=extra_body,
78+
timeout=timeout,
79+
query=maybe_transform({"entity_id": entity_id}, manual_retrieve_params.ManualRetrieveParams),
6980
),
7081
cast_to=ManualAsyncJob,
7182
)
@@ -95,6 +106,7 @@ async def retrieve(
95106
self,
96107
job_id: str,
97108
*,
109+
entity_id: str | NotGiven = NOT_GIVEN,
98110
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
99111
# The extra values given here take precedence over values defined on the client or passed to this method.
100112
extra_headers: Headers | None = None,
@@ -108,6 +120,10 @@ async def retrieve(
108120
Assisted Benefits jobs.
109121
110122
Args:
123+
entity_id: The entity ID to use when authenticating with a multi-account token. Required
124+
when using a multi-account token to specify which entity's data to access.
125+
Example: `123e4567-e89b-12d3-a456-426614174000`
126+
111127
extra_headers: Send extra headers
112128
113129
extra_query: Add additional query parameters to the request
@@ -121,7 +137,13 @@ async def retrieve(
121137
return await self._get(
122138
f"/jobs/manual/{job_id}",
123139
options=make_request_options(
124-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
140+
extra_headers=extra_headers,
141+
extra_query=extra_query,
142+
extra_body=extra_body,
143+
timeout=timeout,
144+
query=await async_maybe_transform(
145+
{"entity_id": entity_id}, manual_retrieve_params.ManualRetrieveParams
146+
),
125147
),
126148
cast_to=ManualAsyncJob,
127149
)

src/finch/resources/request_forwarding.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def forward(
5757
"""The Forward API allows you to make direct requests to an employment system.
5858
5959
If
60-
Finchs unified API doesnt have a data model that cleanly fits your needs, then
61-
Forward allows you to push or pull data models directly against an integrations
60+
Finch's unified API doesn't have a data model that cleanly fits your needs, then
61+
Forward allows you to push or pull data models directly against an integration's
6262
API.
6363
6464
Args:
@@ -144,8 +144,8 @@ async def forward(
144144
"""The Forward API allows you to make direct requests to an employment system.
145145
146146
If
147-
Finchs unified API doesnt have a data model that cleanly fits your needs, then
148-
Forward allows you to push or pull data models directly against an integrations
147+
Finch's unified API doesn't have a data model that cleanly fits your needs, then
148+
Forward allows you to push or pull data models directly against an integration's
149149
API.
150150
151151
Args:

src/finch/types/disconnect_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
class DisconnectResponse(BaseModel):
99
status: str
10-
"""If the request is successful, Finch will return success (HTTP 200 status)."""
10+
"""If the request is successful, Finch will return "success" (HTTP 200 status)."""

src/finch/types/jobs/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from .manual_async_job import ManualAsyncJob as ManualAsyncJob
66
from .automated_async_job import AutomatedAsyncJob as AutomatedAsyncJob
77
from .automated_list_params import AutomatedListParams as AutomatedListParams
8+
from .manual_retrieve_params import ManualRetrieveParams as ManualRetrieveParams
89
from .automated_create_params import AutomatedCreateParams as AutomatedCreateParams
910
from .automated_list_response import AutomatedListResponse as AutomatedListResponse
1011
from .automated_create_response import AutomatedCreateResponse as AutomatedCreateResponse
12+
from .automated_retrieve_params import AutomatedRetrieveParams as AutomatedRetrieveParams

src/finch/types/jobs/automated_list_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99

1010
class AutomatedListParams(TypedDict, total=False):
11+
entity_id: str
12+
"""The entity ID to use when authenticating with a multi-account token.
13+
14+
Required when using a multi-account token to specify which entity's data to
15+
access. Example: `123e4567-e89b-12d3-a456-426614174000`
16+
"""
17+
1118
limit: int
1219
"""Number of items to return"""
1320

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
__all__ = ["AutomatedRetrieveParams"]
8+
9+
10+
class AutomatedRetrieveParams(TypedDict, total=False):
11+
entity_id: str
12+
"""The entity ID to use when authenticating with a multi-account token.
13+
14+
Required when using a multi-account token to specify which entity's data to
15+
access. Example: `123e4567-e89b-12d3-a456-426614174000`
16+
"""
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
__all__ = ["ManualRetrieveParams"]
8+
9+
10+
class ManualRetrieveParams(TypedDict, total=False):
11+
entity_id: str
12+
"""The entity ID to use when authenticating with a multi-account token.
13+
14+
Required when using a multi-account token to specify which entity's data to
15+
access. Example: `123e4567-e89b-12d3-a456-426614174000`
16+
"""

0 commit comments

Comments
 (0)