Skip to content

Commit b06ae64

Browse files
fix(types): correct items type for individuals arg in enroll_many (#15)
1 parent bedcf30 commit b06ae64

15 files changed

+165
-43
lines changed

src/finch/resources/ats/applications.py

+24-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ def retrieve(
2424
extra_body: Body | None = None,
2525
timeout: float | None | NotGiven = NOT_GIVEN,
2626
) -> Application:
27-
"""Gets an application from an organization."""
27+
"""
28+
Gets an application from an organization.
29+
30+
Args:
31+
extra_headers: Send extra headers
32+
33+
extra_query: Add additional query parameters to the request
34+
35+
extra_body: Add additional JSON properties to the request
36+
37+
timeout: Override the client-level default timeout for this request, in seconds
38+
"""
2839
return self._get(
2940
f"/ats/applications/{application_id}",
3041
options=make_request_options(
@@ -93,7 +104,18 @@ async def retrieve(
93104
extra_body: Body | None = None,
94105
timeout: float | None | NotGiven = NOT_GIVEN,
95106
) -> Application:
96-
"""Gets an application from an organization."""
107+
"""
108+
Gets an application from an organization.
109+
110+
Args:
111+
extra_headers: Send extra headers
112+
113+
extra_query: Add additional query parameters to the request
114+
115+
extra_body: Add additional JSON properties to the request
116+
117+
timeout: Override the client-level default timeout for this request, in seconds
118+
"""
97119
return await self._get(
98120
f"/ats/applications/{application_id}",
99121
options=make_request_options(

src/finch/resources/ats/candidates.py

+18
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ def retrieve(
2828
2929
A candidate represents an individual
3030
associated with one or more applications.
31+
32+
Args:
33+
extra_headers: Send extra headers
34+
35+
extra_query: Add additional query parameters to the request
36+
37+
extra_body: Add additional JSON properties to the request
38+
39+
timeout: Override the client-level default timeout for this request, in seconds
3140
"""
3241
return self._get(
3342
f"/ats/candidates/{candidate_id}",
@@ -103,6 +112,15 @@ async def retrieve(
103112
104113
A candidate represents an individual
105114
associated with one or more applications.
115+
116+
Args:
117+
extra_headers: Send extra headers
118+
119+
extra_query: Add additional query parameters to the request
120+
121+
extra_body: Add additional JSON properties to the request
122+
123+
timeout: Override the client-level default timeout for this request, in seconds
106124
"""
107125
return await self._get(
108126
f"/ats/candidates/{candidate_id}",

src/finch/resources/ats/jobs.py

+24-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ def retrieve(
2424
extra_body: Body | None = None,
2525
timeout: float | None | NotGiven = NOT_GIVEN,
2626
) -> Job:
27-
"""Gets a job from an organization."""
27+
"""
28+
Gets a job from an organization.
29+
30+
Args:
31+
extra_headers: Send extra headers
32+
33+
extra_query: Add additional query parameters to the request
34+
35+
extra_body: Add additional JSON properties to the request
36+
37+
timeout: Override the client-level default timeout for this request, in seconds
38+
"""
2839
return self._get(
2940
f"/ats/jobs/{job_id}",
3041
options=make_request_options(
@@ -93,7 +104,18 @@ async def retrieve(
93104
extra_body: Body | None = None,
94105
timeout: float | None | NotGiven = NOT_GIVEN,
95106
) -> Job:
96-
"""Gets a job from an organization."""
107+
"""
108+
Gets a job from an organization.
109+
110+
Args:
111+
extra_headers: Send extra headers
112+
113+
extra_query: Add additional query parameters to the request
114+
115+
extra_body: Add additional JSON properties to the request
116+
117+
timeout: Override the client-level default timeout for this request, in seconds
118+
"""
97119
return await self._get(
98120
f"/ats/jobs/{job_id}",
99121
options=make_request_options(

src/finch/resources/ats/offers.py

+24-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ def retrieve(
2424
extra_body: Body | None = None,
2525
timeout: float | None | NotGiven = NOT_GIVEN,
2626
) -> Offer:
27-
"""Get a single offer from an organization."""
27+
"""
28+
Get a single offer from an organization.
29+
30+
Args:
31+
extra_headers: Send extra headers
32+
33+
extra_query: Add additional query parameters to the request
34+
35+
extra_body: Add additional JSON properties to the request
36+
37+
timeout: Override the client-level default timeout for this request, in seconds
38+
"""
2839
return self._get(
2940
f"/ats/offers/{offer_id}",
3041
options=make_request_options(
@@ -93,7 +104,18 @@ async def retrieve(
93104
extra_body: Body | None = None,
94105
timeout: float | None | NotGiven = NOT_GIVEN,
95106
) -> Offer:
96-
"""Get a single offer from an organization."""
107+
"""
108+
Get a single offer from an organization.
109+
110+
Args:
111+
extra_headers: Send extra headers
112+
113+
extra_query: Add additional query parameters to the request
114+
115+
extra_body: Add additional JSON properties to the request
116+
117+
timeout: Override the client-level default timeout for this request, in seconds
118+
"""
97119
return await self._get(
98120
f"/ats/offers/{offer_id}",
99121
options=make_request_options(

src/finch/resources/hris/benefits/benefits.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ def create(
6868
"/employer/benefits",
6969
body=maybe_transform(
7070
{
71-
"type": type,
7271
"description": description,
7372
"frequency": frequency,
73+
"type": type,
7474
},
7575
benefit_create_params.BenefitCreateParams,
7676
),
@@ -95,6 +95,15 @@ def retrieve(
9595
**Availability: Automated Benefits providers only**
9696
9797
Lists benefit information for a given benefit
98+
99+
Args:
100+
extra_headers: Send extra headers
101+
102+
extra_query: Add additional query parameters to the request
103+
104+
extra_body: Add additional JSON properties to the request
105+
106+
timeout: Override the client-level default timeout for this request, in seconds
98107
"""
99108
return self._get(
100109
f"/employer/benefits/{benefit_id}",
@@ -232,9 +241,9 @@ async def create(
232241
"/employer/benefits",
233242
body=maybe_transform(
234243
{
235-
"type": type,
236244
"description": description,
237245
"frequency": frequency,
246+
"type": type,
238247
},
239248
benefit_create_params.BenefitCreateParams,
240249
),
@@ -259,6 +268,15 @@ async def retrieve(
259268
**Availability: Automated Benefits providers only**
260269
261270
Lists benefit information for a given benefit
271+
272+
Args:
273+
extra_headers: Send extra headers
274+
275+
extra_query: Add additional query parameters to the request
276+
277+
extra_body: Add additional JSON properties to the request
278+
279+
timeout: Override the client-level default timeout for this request, in seconds
262280
"""
263281
return await self._get(
264282
f"/employer/benefits/{benefit_id}",

src/finch/resources/hris/benefits/individuals.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def enroll_many(
2727
self,
2828
benefit_id: str,
2929
*,
30-
individuals: List[individual_enroll_many_params.IndividualEnrollManyParam],
30+
individuals: List[individual_enroll_many_params.Individual],
3131
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3232
# The extra values given here take precedence over values defined on the client or passed to this method.
3333
extra_headers: Headers | None = None,
@@ -84,6 +84,15 @@ def enrolled_ids(
8484
**Availability: Automated Benefits providers only**
8585
8686
Lists individuals currently enrolled in a given benefit.
87+
88+
Args:
89+
extra_headers: Send extra headers
90+
91+
extra_query: Add additional query parameters to the request
92+
93+
extra_body: Add additional JSON properties to the request
94+
95+
timeout: Override the client-level default timeout for this request, in seconds
8796
"""
8897
return self._get(
8998
f"/employer/benefits/{benefit_id}/enrolled",
@@ -185,7 +194,7 @@ def enroll_many(
185194
self,
186195
benefit_id: str,
187196
*,
188-
individuals: List[individual_enroll_many_params.IndividualEnrollManyParam],
197+
individuals: List[individual_enroll_many_params.Individual],
189198
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
190199
# The extra values given here take precedence over values defined on the client or passed to this method.
191200
extra_headers: Headers | None = None,
@@ -242,6 +251,15 @@ async def enrolled_ids(
242251
**Availability: Automated Benefits providers only**
243252
244253
Lists individuals currently enrolled in a given benefit.
254+
255+
Args:
256+
extra_headers: Send extra headers
257+
258+
extra_query: Add additional query parameters to the request
259+
260+
extra_body: Add additional JSON properties to the request
261+
262+
timeout: Override the client-level default timeout for this request, in seconds
245263
"""
246264
return await self._get(
247265
f"/employer/benefits/{benefit_id}/enrolled",

src/finch/resources/hris/individuals/individuals.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def retrieve_many(
5454
page=SyncResponsesPage[IndividualResponse],
5555
body=maybe_transform(
5656
{
57-
"requests": requests,
5857
"options": options,
58+
"requests": requests,
5959
},
6060
individual_retrieve_many_params.IndividualRetrieveManyParams,
6161
),
@@ -103,8 +103,8 @@ def retrieve_many(
103103
page=AsyncResponsesPage[IndividualResponse],
104104
body=maybe_transform(
105105
{
106-
"requests": requests,
107106
"options": options,
107+
"requests": requests,
108108
},
109109
individual_retrieve_many_params.IndividualRetrieveManyParams,
110110
),

src/finch/resources/hris/payments.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def list(
5656
timeout=timeout,
5757
query=maybe_transform(
5858
{
59-
"start_date": start_date,
6059
"end_date": end_date,
60+
"start_date": start_date,
6161
},
6262
payment_list_params.PaymentListParams,
6363
),
@@ -107,8 +107,8 @@ def list(
107107
timeout=timeout,
108108
query=maybe_transform(
109109
{
110-
"start_date": start_date,
111110
"end_date": end_date,
111+
"start_date": start_date,
112112
},
113113
payment_list_params.PaymentListParams,
114114
),

src/finch/types/hris/benefits/individual_enroll_many_params.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
from __future__ import annotations
44

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

8-
__all__ = ["IndividualEnrollManyParam"]
8+
__all__ = ["IndividualEnrollManyParams", "Individual"]
99

1010

11-
class IndividualEnrollManyParam(TypedDict, total=False):
11+
class IndividualEnrollManyParams(TypedDict, total=False):
12+
individuals: Required[List[Individual]]
13+
"""Array of the individual_id to enroll and a configuration object."""
14+
15+
16+
class Individual(TypedDict, total=False):
1217
configuration: object
1318

1419
individual_id: str
1520
"""Finch id (uuidv4) for the individual to enroll"""
16-
17-
18-
IndividualEnrollManyParams = List[IndividualEnrollManyParam]

src/finch/types/hris/individual_retrieve_many_params.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
from typing import List, Optional
66
from typing_extensions import TypedDict
77

8-
__all__ = ["IndividualRetrieveManyParams", "Request", "Options"]
8+
__all__ = ["IndividualRetrieveManyParams", "Options", "Request"]
99

1010

11-
class Request(TypedDict, total=False):
12-
individual_id: str
11+
class IndividualRetrieveManyParams(TypedDict, total=False):
12+
options: Optional[Options]
13+
14+
requests: List[Request]
1315

1416

1517
class Options(TypedDict, total=False):
1618
include: List[str]
1719

1820

19-
class IndividualRetrieveManyParams(TypedDict, total=False):
20-
options: Optional[Options]
21-
22-
requests: List[Request]
21+
class Request(TypedDict, total=False):
22+
individual_id: str

src/finch/types/hris/individuals/employment_data_retrieve_many_params.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
__all__ = ["EmploymentDataRetrieveManyParams", "Request"]
99

1010

11+
class EmploymentDataRetrieveManyParams(TypedDict, total=False):
12+
requests: Required[List[Request]]
13+
"""The array of batch requests."""
14+
15+
1116
class Request(TypedDict, total=False):
1217
individual_id: Required[str]
1318
"""A stable Finch `id` (UUID v4) for an individual in the company.
@@ -16,8 +21,3 @@ class Request(TypedDict, total=False):
1621
preferantial to send all ids in a single request for Finch to optimize provider
1722
rate-limits.
1823
"""
19-
20-
21-
class EmploymentDataRetrieveManyParams(TypedDict, total=False):
22-
requests: Required[List[Request]]
23-
"""The array of batch requests."""

src/finch/types/hris/pay_statement_retrieve_many_params.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
__all__ = ["PayStatementRetrieveManyParams", "Request"]
99

1010

11+
class PayStatementRetrieveManyParams(TypedDict, total=False):
12+
requests: Required[List[Request]]
13+
"""The array of batch requests."""
14+
15+
1116
class Request(TypedDict, total=False):
1217
payment_id: Required[str]
1318
"""A stable Finch `id` (UUID v4) for a payment."""
@@ -17,8 +22,3 @@ class Request(TypedDict, total=False):
1722

1823
offset: int
1924
"""Index to start from."""
20-
21-
22-
class PayStatementRetrieveManyParams(TypedDict, total=False):
23-
requests: Required[List[Request]]
24-
"""The array of batch requests."""

0 commit comments

Comments
 (0)