Skip to content

Commit 2e8eab2

Browse files
feat(api): api update
1 parent dc3417c commit 2e8eab2

13 files changed

Lines changed: 66 additions & 54 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 48
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-3cd1346947fabfca2aa9c6f821170c8d945a82667fb20a15644d5c77f8e98c10.yml
3-
openapi_spec_hash: 642e04e90d37c0e4875d154abd06eb54
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-a6b05e51c46366a54466c2009f5fdde74e0fa40bbcc6568601a4e3342dd16937.yml
3+
openapi_spec_hash: 084797c220144df17d98eb984dd4cba2
44
config_hash: 9ae56f40cec7304896138bfad5caf748

src/finch/resources/hris/directory.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def list(
5959
Args:
6060
entity_ids: The entity IDs to specify which entities' data to access.
6161
62-
limit: Number of employees to return (defaults to all)
62+
limit: Number of employees to return (defaults to 100, maximum 10000)
6363
6464
offset: Index to start from (defaults to 0)
6565
@@ -112,7 +112,7 @@ def list_individuals(
112112
Args:
113113
entity_ids: The entity IDs to specify which entities' data to access.
114114
115-
limit: Number of employees to return (defaults to all)
115+
limit: Number of employees to return (defaults to 100, maximum 10000)
116116
117117
offset: Index to start from (defaults to 0)
118118
@@ -174,7 +174,7 @@ def list(
174174
Args:
175175
entity_ids: The entity IDs to specify which entities' data to access.
176176
177-
limit: Number of employees to return (defaults to all)
177+
limit: Number of employees to return (defaults to 100, maximum 10000)
178178
179179
offset: Index to start from (defaults to 0)
180180
@@ -227,7 +227,7 @@ def list_individuals(
227227
Args:
228228
entity_ids: The entity IDs to specify which entities' data to access.
229229
230-
limit: Number of employees to return (defaults to all)
230+
limit: Number of employees to return (defaults to 100, maximum 10000)
231231
232232
offset: Index to start from (defaults to 0)
233233

src/finch/resources/hris/employments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def retrieve_many(
5656
Read individual employment and income data
5757
5858
Args:
59-
requests: The array of batch requests.
59+
requests: The array of batch requests. Maximum 10000 items per request.
6060
6161
entity_ids: The entity IDs to specify which entities' data to access.
6262
@@ -123,7 +123,7 @@ def retrieve_many(
123123
Read individual employment and income data
124124
125125
Args:
126-
requests: The array of batch requests.
126+
requests: The array of batch requests. Maximum 10000 items per request.
127127
128128
entity_ids: The entity IDs to specify which entities' data to access.
129129

src/finch/resources/hris/individuals.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def with_streaming_response(self) -> IndividualsWithStreamingResponse:
4343
def retrieve_many(
4444
self,
4545
*,
46+
requests: Iterable[individual_retrieve_many_params.Request],
4647
entity_ids: SequenceNotStr[str] | Omit = omit,
4748
options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
48-
requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
4949
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5050
# The extra values given here take precedence over values defined on the client or passed to this method.
5151
extra_headers: Headers | None = None,
@@ -57,6 +57,8 @@ def retrieve_many(
5757
Read individual data, excluding income and employment data
5858
5959
Args:
60+
requests: The array of batch requests. Maximum 10000 items per request.
61+
6062
entity_ids: The entity IDs to specify which entities' data to access.
6163
6264
extra_headers: Send extra headers
@@ -72,8 +74,8 @@ def retrieve_many(
7274
page=SyncResponsesPage[IndividualResponse],
7375
body=maybe_transform(
7476
{
75-
"options": options,
7677
"requests": requests,
78+
"options": options,
7779
},
7880
individual_retrieve_many_params.IndividualRetrieveManyParams,
7981
),
@@ -115,9 +117,9 @@ def with_streaming_response(self) -> AsyncIndividualsWithStreamingResponse:
115117
def retrieve_many(
116118
self,
117119
*,
120+
requests: Iterable[individual_retrieve_many_params.Request],
118121
entity_ids: SequenceNotStr[str] | Omit = omit,
119122
options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
120-
requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
121123
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122124
# The extra values given here take precedence over values defined on the client or passed to this method.
123125
extra_headers: Headers | None = None,
@@ -129,6 +131,8 @@ def retrieve_many(
129131
Read individual data, excluding income and employment data
130132
131133
Args:
134+
requests: The array of batch requests. Maximum 10000 items per request.
135+
132136
entity_ids: The entity IDs to specify which entities' data to access.
133137
134138
extra_headers: Send extra headers
@@ -144,8 +148,8 @@ def retrieve_many(
144148
page=AsyncResponsesPage[IndividualResponse],
145149
body=maybe_transform(
146150
{
147-
"options": options,
148151
"requests": requests,
152+
"options": options,
149153
},
150154
individual_retrieve_many_params.IndividualRetrieveManyParams,
151155
),

src/finch/resources/hris/pay_statements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def retrieve_many(
5959
supports Benefits.
6060
6161
Args:
62-
requests: The array of batch requests.
62+
requests: The array of batch requests. Maximum 10 payment_ids per request.
6363
6464
entity_ids: The entity IDs to specify which entities' data to access.
6565
@@ -131,7 +131,7 @@ def retrieve_many(
131131
supports Benefits.
132132
133133
Args:
134-
requests: The array of batch requests.
134+
requests: The array of batch requests. Maximum 10 payment_ids per request.
135135
136136
entity_ids: The entity IDs to specify which entities' data to access.
137137

src/finch/types/hris/directory_list_individuals_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DirectoryListIndividualsParams(TypedDict, total=False):
1414
"""The entity IDs to specify which entities' data to access."""
1515

1616
limit: int
17-
"""Number of employees to return (defaults to all)"""
17+
"""Number of employees to return (defaults to 100, maximum 10000)"""
1818

1919
offset: int
2020
"""Index to start from (defaults to 0)"""

src/finch/types/hris/directory_list_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DirectoryListParams(TypedDict, total=False):
1414
"""The entity IDs to specify which entities' data to access."""
1515

1616
limit: int
17-
"""Number of employees to return (defaults to all)"""
17+
"""Number of employees to return (defaults to 100, maximum 10000)"""
1818

1919
offset: int
2020
"""Index to start from (defaults to 0)"""

src/finch/types/hris/employment_retrieve_many_params.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@
1212

1313
class EmploymentRetrieveManyParams(TypedDict, total=False):
1414
requests: Required[Iterable[Request]]
15-
"""The array of batch requests."""
15+
"""The array of batch requests. Maximum 10000 items per request."""
1616

1717
entity_ids: SequenceNotStr[str]
1818
"""The entity IDs to specify which entities' data to access."""
1919

2020

2121
class Request(TypedDict, total=False):
2222
individual_id: Required[str]
23-
"""A stable Finch `id` (UUID v4) for an individual in the company.
24-
25-
There is no limit to the number of `individual_id` to send per request. It is
26-
preferantial to send all ids in a single request for Finch to optimize provider
27-
rate-limits.
28-
"""
23+
"""A stable Finch `id` (UUID v4) for an individual in the company."""

src/finch/types/hris/individual_retrieve_many_params.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
from __future__ import annotations
44

55
from typing import Iterable, Optional
6-
from typing_extensions import TypedDict
6+
from typing_extensions import Required, TypedDict
77

88
from ..._types import SequenceNotStr
99

10-
__all__ = ["IndividualRetrieveManyParams", "Options", "Request"]
10+
__all__ = ["IndividualRetrieveManyParams", "Request", "Options"]
1111

1212

1313
class IndividualRetrieveManyParams(TypedDict, total=False):
14+
requests: Required[Iterable[Request]]
15+
"""The array of batch requests. Maximum 10000 items per request."""
16+
1417
entity_ids: SequenceNotStr[str]
1518
"""The entity IDs to specify which entities' data to access."""
1619

1720
options: Optional[Options]
1821

19-
requests: Iterable[Request]
22+
23+
class Request(TypedDict, total=False):
24+
individual_id: Required[str]
2025

2126

2227
class Options(TypedDict, total=False):
2328
include: SequenceNotStr[str]
24-
25-
26-
class Request(TypedDict, total=False):
27-
individual_id: str

src/finch/types/hris/pay_statement_retrieve_many_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class PayStatementRetrieveManyParams(TypedDict, total=False):
1414
requests: Required[Iterable[Request]]
15-
"""The array of batch requests."""
15+
"""The array of batch requests. Maximum 10 payment_ids per request."""
1616

1717
entity_ids: SequenceNotStr[str]
1818
"""The entity IDs to specify which entities' data to access."""
@@ -23,7 +23,7 @@ class Request(TypedDict, total=False):
2323
"""A stable Finch `id` (UUID v4) for a payment."""
2424

2525
limit: int
26-
"""Number of pay statements to return (defaults to all)."""
26+
"""Number of pay statements to return (defaults to 100, maximum 5000)."""
2727

2828
offset: int
2929
"""Index to start from."""

0 commit comments

Comments
 (0)