@tryfinch/finch-api 6.27.0 → 6.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.ts +8 -0
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +8 -0
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +8 -0
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/hris/benefits/benefits.d.ts +73 -0
- package/resources/hris/benefits/benefits.d.ts.map +1 -1
- package/resources/hris/benefits/benefits.js +23 -0
- package/resources/hris/benefits/benefits.js.map +1 -1
- package/resources/hris/benefits/benefits.mjs +23 -0
- package/resources/hris/benefits/benefits.mjs.map +1 -1
- package/resources/hris/benefits/individuals.d.ts +35 -0
- package/resources/hris/benefits/individuals.d.ts.map +1 -1
- package/resources/hris/benefits/individuals.js +8 -0
- package/resources/hris/benefits/individuals.js.map +1 -1
- package/resources/hris/benefits/individuals.mjs +8 -0
- package/resources/hris/benefits/individuals.mjs.map +1 -1
- package/resources/hris/company/company.d.ts +15 -10
- package/resources/hris/company/company.d.ts.map +1 -1
- package/resources/hris/company/company.js +5 -0
- package/resources/hris/company/company.js.map +1 -1
- package/resources/hris/company/company.mjs +5 -0
- package/resources/hris/company/company.mjs.map +1 -1
- package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts +8 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts.map +1 -1
- package/resources/hris/company/pay-statement-item/pay-statement-item.js.map +1 -1
- package/resources/hris/company/pay-statement-item/pay-statement-item.mjs.map +1 -1
- package/resources/hris/company/pay-statement-item/rules.d.ts +30 -0
- package/resources/hris/company/pay-statement-item/rules.d.ts.map +1 -1
- package/resources/hris/company/pay-statement-item/rules.js +16 -0
- package/resources/hris/company/pay-statement-item/rules.js.map +1 -1
- package/resources/hris/company/pay-statement-item/rules.mjs +16 -0
- package/resources/hris/company/pay-statement-item/rules.mjs.map +1 -1
- package/resources/hris/directory.d.ts +16 -8
- package/resources/hris/directory.d.ts.map +1 -1
- package/resources/hris/directory.js.map +1 -1
- package/resources/hris/directory.mjs.map +1 -1
- package/resources/hris/documents.d.ts +12 -0
- package/resources/hris/documents.d.ts.map +1 -1
- package/resources/hris/documents.js +7 -0
- package/resources/hris/documents.js.map +1 -1
- package/resources/hris/documents.mjs +7 -0
- package/resources/hris/documents.mjs.map +1 -1
- package/resources/hris/employments.d.ts +122 -103
- package/resources/hris/employments.d.ts.map +1 -1
- package/resources/hris/employments.js +10 -0
- package/resources/hris/employments.js.map +1 -1
- package/resources/hris/employments.mjs +10 -0
- package/resources/hris/employments.mjs.map +1 -1
- package/resources/hris/hris.d.ts +12 -12
- package/resources/hris/hris.d.ts.map +1 -1
- package/resources/hris/individuals.d.ts +73 -56
- package/resources/hris/individuals.d.ts.map +1 -1
- package/resources/hris/individuals.js.map +1 -1
- package/resources/hris/individuals.mjs.map +1 -1
- package/resources/hris/pay-statements.d.ts +17 -1
- package/resources/hris/pay-statements.d.ts.map +1 -1
- package/resources/hris/pay-statements.js +16 -0
- package/resources/hris/pay-statements.js.map +1 -1
- package/resources/hris/pay-statements.mjs +16 -0
- package/resources/hris/pay-statements.mjs.map +1 -1
- package/resources/hris/payments.d.ts +11 -0
- package/resources/hris/payments.d.ts.map +1 -1
- package/resources/hris/payments.js +11 -0
- package/resources/hris/payments.js.map +1 -1
- package/resources/hris/payments.mjs +11 -0
- package/resources/hris/payments.mjs.map +1 -1
- package/resources/request-forwarding.d.ts +10 -0
- package/resources/request-forwarding.d.ts.map +1 -1
- package/resources/request-forwarding.js +10 -0
- package/resources/request-forwarding.js.map +1 -1
- package/resources/request-forwarding.mjs +10 -0
- package/resources/request-forwarding.mjs.map +1 -1
- package/resources/sandbox/company.d.ts +23 -0
- package/resources/sandbox/company.d.ts.map +1 -1
- package/resources/sandbox/company.js +23 -0
- package/resources/sandbox/company.js.map +1 -1
- package/resources/sandbox/company.mjs +23 -0
- package/resources/sandbox/company.mjs.map +1 -1
- package/resources/sandbox/connections/accounts.d.ts +17 -0
- package/resources/sandbox/connections/accounts.d.ts.map +1 -1
- package/resources/sandbox/connections/accounts.js +9 -0
- package/resources/sandbox/connections/accounts.js.map +1 -1
- package/resources/sandbox/connections/accounts.mjs +9 -0
- package/resources/sandbox/connections/accounts.mjs.map +1 -1
- package/resources/sandbox/connections/connections.d.ts +7 -0
- package/resources/sandbox/connections/connections.d.ts.map +1 -1
- package/resources/sandbox/connections/connections.js +7 -0
- package/resources/sandbox/connections/connections.js.map +1 -1
- package/resources/sandbox/connections/connections.mjs +7 -0
- package/resources/sandbox/connections/connections.mjs.map +1 -1
- package/resources/sandbox/directory.d.ts +7 -0
- package/resources/sandbox/directory.d.ts.map +1 -1
- package/resources/sandbox/directory.js.map +1 -1
- package/resources/sandbox/directory.mjs.map +1 -1
- package/resources/sandbox/employment.d.ts +7 -0
- package/resources/sandbox/employment.d.ts.map +1 -1
- package/resources/sandbox/employment.js.map +1 -1
- package/resources/sandbox/employment.mjs.map +1 -1
- package/resources/sandbox/individual.d.ts +7 -0
- package/resources/sandbox/individual.d.ts.map +1 -1
- package/resources/sandbox/individual.js.map +1 -1
- package/resources/sandbox/individual.mjs.map +1 -1
- package/resources/sandbox/jobs/configuration.d.ts +15 -0
- package/resources/sandbox/jobs/configuration.d.ts.map +1 -1
- package/resources/sandbox/jobs/configuration.js +15 -0
- package/resources/sandbox/jobs/configuration.js.map +1 -1
- package/resources/sandbox/jobs/configuration.mjs +15 -0
- package/resources/sandbox/jobs/configuration.mjs.map +1 -1
- package/resources/sandbox/jobs/jobs.d.ts +7 -0
- package/resources/sandbox/jobs/jobs.d.ts.map +1 -1
- package/resources/sandbox/jobs/jobs.js +7 -0
- package/resources/sandbox/jobs/jobs.js.map +1 -1
- package/resources/sandbox/jobs/jobs.mjs +7 -0
- package/resources/sandbox/jobs/jobs.mjs.map +1 -1
- package/resources/sandbox/payment.d.ts +20 -1
- package/resources/sandbox/payment.d.ts.map +1 -1
- package/resources/sandbox/payment.js.map +1 -1
- package/resources/sandbox/payment.mjs.map +1 -1
- package/resources/shared.d.ts +4 -4
- package/resources/shared.d.ts.map +1 -1
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +3 -3
- package/src/_shims/index.mjs +1 -1
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +5 -5
- package/src/error.ts +1 -1
- package/src/index.ts +20 -20
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +3 -3
- package/src/resource.ts +1 -1
- package/src/resources/access-tokens.ts +10 -2
- package/src/resources/account.ts +3 -3
- package/src/resources/connect/connect.ts +3 -3
- package/src/resources/connect/index.ts +2 -2
- package/src/resources/connect/sessions.ts +2 -2
- package/src/resources/connect.ts +1 -1
- package/src/resources/hris/benefits/benefits.ts +91 -8
- package/src/resources/hris/benefits/index.ts +2 -2
- package/src/resources/hris/benefits/individuals.ts +40 -5
- package/src/resources/hris/benefits.ts +1 -1
- package/src/resources/hris/company/company.ts +20 -15
- package/src/resources/hris/company/index.ts +2 -2
- package/src/resources/hris/company/pay-statement-item/index.ts +2 -2
- package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +14 -6
- package/src/resources/hris/company/pay-statement-item/rules.ts +34 -4
- package/src/resources/hris/company/pay-statement-item.ts +1 -1
- package/src/resources/hris/company.ts +1 -1
- package/src/resources/hris/directory.ts +20 -12
- package/src/resources/hris/documents.ts +16 -4
- package/src/resources/hris/employments.ts +143 -119
- package/src/resources/hris/hris.ts +31 -31
- package/src/resources/hris/index.ts +9 -9
- package/src/resources/hris/individuals.ts +101 -79
- package/src/resources/hris/pay-statements.ts +23 -7
- package/src/resources/hris/payments.ts +15 -4
- package/src/resources/hris.ts +1 -1
- package/src/resources/index.ts +11 -11
- package/src/resources/jobs/automated.ts +3 -3
- package/src/resources/jobs/index.ts +3 -3
- package/src/resources/jobs/jobs.ts +5 -5
- package/src/resources/jobs/manual.ts +2 -2
- package/src/resources/jobs.ts +1 -1
- package/src/resources/payroll/index.ts +2 -2
- package/src/resources/payroll/pay-groups.ts +4 -4
- package/src/resources/payroll/payroll.ts +3 -3
- package/src/resources/payroll.ts +1 -1
- package/src/resources/providers.ts +4 -4
- package/src/resources/request-forwarding.ts +12 -2
- package/src/resources/sandbox/company.ts +26 -3
- package/src/resources/sandbox/connections/accounts.ts +21 -4
- package/src/resources/sandbox/connections/connections.ts +11 -4
- package/src/resources/sandbox/connections/index.ts +2 -2
- package/src/resources/sandbox/connections.ts +1 -1
- package/src/resources/sandbox/directory.ts +11 -4
- package/src/resources/sandbox/employment.ts +11 -4
- package/src/resources/sandbox/index.ts +8 -8
- package/src/resources/sandbox/individual.ts +11 -4
- package/src/resources/sandbox/jobs/configuration.ts +17 -2
- package/src/resources/sandbox/jobs/index.ts +2 -2
- package/src/resources/sandbox/jobs/jobs.ts +11 -4
- package/src/resources/sandbox/jobs.ts +1 -1
- package/src/resources/sandbox/payment.ts +25 -6
- package/src/resources/sandbox/sandbox.ts +15 -15
- package/src/resources/sandbox.ts +1 -1
- package/src/resources/shared.ts +4 -4
- package/src/resources/webhooks.ts +4 -4
- package/src/resources.ts +1 -1
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as SessionsAPI from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as SessionsAPI from "./sessions.js";
|
|
5
5
|
import {
|
|
6
6
|
SessionNewParams,
|
|
7
7
|
SessionNewResponse,
|
|
8
8
|
SessionReauthenticateParams,
|
|
9
9
|
SessionReauthenticateResponse,
|
|
10
10
|
Sessions,
|
|
11
|
-
} from
|
|
11
|
+
} from "./sessions.js";
|
|
12
12
|
|
|
13
13
|
export class Connect extends APIResource {
|
|
14
14
|
sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Connect } from
|
|
3
|
+
export { Connect } from "./connect.js";
|
|
4
4
|
export {
|
|
5
5
|
Sessions,
|
|
6
6
|
type SessionNewResponse,
|
|
7
7
|
type SessionReauthenticateResponse,
|
|
8
8
|
type SessionNewParams,
|
|
9
9
|
type SessionReauthenticateParams,
|
|
10
|
-
} from
|
|
10
|
+
} from "./sessions.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as Core from "../../core.js";
|
|
5
5
|
|
|
6
6
|
export class Sessions extends APIResource {
|
|
7
7
|
/**
|
package/src/resources/connect.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import * as BenefitsAPI from
|
|
7
|
-
import * as Shared from
|
|
8
|
-
import * as IndividualsAPI from
|
|
3
|
+
import { APIResource } from "../../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../../core.js";
|
|
5
|
+
import * as Core from "../../../core.js";
|
|
6
|
+
import * as BenefitsAPI from "./benefits.js";
|
|
7
|
+
import * as Shared from "../../shared.js";
|
|
8
|
+
import * as IndividualsAPI from "./individuals.js";
|
|
9
9
|
import {
|
|
10
10
|
EnrolledIndividualBenefitResponse,
|
|
11
11
|
IndividualBenefit,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
IndividualUnenrollManyParams,
|
|
17
17
|
Individuals,
|
|
18
18
|
UnenrolledIndividualBenefitResponse,
|
|
19
|
-
} from
|
|
20
|
-
import { SinglePage } from
|
|
19
|
+
} from "./individuals.js";
|
|
20
|
+
import { SinglePage } from "../../../pagination.js";
|
|
21
21
|
|
|
22
22
|
export class Benefits extends APIResource {
|
|
23
23
|
individuals: IndividualsAPI.Individuals = new IndividualsAPI.Individuals(this._client);
|
|
@@ -25,6 +25,12 @@ export class Benefits extends APIResource {
|
|
|
25
25
|
/**
|
|
26
26
|
* Creates a new company-wide deduction or contribution. Please use the
|
|
27
27
|
* `/providers` endpoint to view available types for each provider.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const createCompanyBenefitsResponse =
|
|
32
|
+
* await client.hris.benefits.create();
|
|
33
|
+
* ```
|
|
28
34
|
*/
|
|
29
35
|
create(
|
|
30
36
|
body?: BenefitCreateParams,
|
|
@@ -43,6 +49,13 @@ export class Benefits extends APIResource {
|
|
|
43
49
|
|
|
44
50
|
/**
|
|
45
51
|
* Lists deductions and contributions information for a given item
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const companyBenefit = await client.hris.benefits.retrieve(
|
|
56
|
+
* 'benefit_id',
|
|
57
|
+
* );
|
|
58
|
+
* ```
|
|
46
59
|
*/
|
|
47
60
|
retrieve(benefitId: string, options?: Core.RequestOptions): Core.APIPromise<CompanyBenefit> {
|
|
48
61
|
return this._client.get(`/employer/benefits/${benefitId}`, options);
|
|
@@ -50,6 +63,12 @@ export class Benefits extends APIResource {
|
|
|
50
63
|
|
|
51
64
|
/**
|
|
52
65
|
* Updates an existing company-wide deduction or contribution
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const updateCompanyBenefitResponse =
|
|
70
|
+
* await client.hris.benefits.update('benefit_id');
|
|
71
|
+
* ```
|
|
53
72
|
*/
|
|
54
73
|
update(
|
|
55
74
|
benefitId: string,
|
|
@@ -70,6 +89,14 @@ export class Benefits extends APIResource {
|
|
|
70
89
|
|
|
71
90
|
/**
|
|
72
91
|
* List all company-wide deductions and contributions.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* // Automatically fetches more pages as needed.
|
|
96
|
+
* for await (const companyBenefit of client.hris.benefits.list()) {
|
|
97
|
+
* // ...
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
73
100
|
*/
|
|
74
101
|
list(options?: Core.RequestOptions): Core.PagePromise<CompanyBenefitsSinglePage, CompanyBenefit> {
|
|
75
102
|
return this._client.getAPIList('/employer/benefits', CompanyBenefitsSinglePage, options);
|
|
@@ -77,6 +104,14 @@ export class Benefits extends APIResource {
|
|
|
77
104
|
|
|
78
105
|
/**
|
|
79
106
|
* Get deductions metadata
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Automatically fetches more pages as needed.
|
|
111
|
+
* for await (const benefitListSupportedBenefitsResponse of client.hris.benefits.listSupportedBenefits()) {
|
|
112
|
+
* // ...
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
80
115
|
*/
|
|
81
116
|
listSupportedBenefits(
|
|
82
117
|
options?: Core.RequestOptions,
|
|
@@ -219,6 +254,11 @@ export interface CompanyBenefit {
|
|
|
219
254
|
*/
|
|
220
255
|
benefit_id: string;
|
|
221
256
|
|
|
257
|
+
/**
|
|
258
|
+
* The company match for this benefit.
|
|
259
|
+
*/
|
|
260
|
+
company_contribution: CompanyBenefit.CompanyContribution | null;
|
|
261
|
+
|
|
222
262
|
description: string | null;
|
|
223
263
|
|
|
224
264
|
/**
|
|
@@ -232,6 +272,25 @@ export interface CompanyBenefit {
|
|
|
232
272
|
type: BenefitType | null;
|
|
233
273
|
}
|
|
234
274
|
|
|
275
|
+
export namespace CompanyBenefit {
|
|
276
|
+
/**
|
|
277
|
+
* The company match for this benefit.
|
|
278
|
+
*/
|
|
279
|
+
export interface CompanyContribution {
|
|
280
|
+
tiers?: Array<CompanyContribution.Tier>;
|
|
281
|
+
|
|
282
|
+
type?: 'match';
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export namespace CompanyContribution {
|
|
286
|
+
export interface Tier {
|
|
287
|
+
match?: number;
|
|
288
|
+
|
|
289
|
+
threshold?: number;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
235
294
|
export interface CreateCompanyBenefitsResponse {
|
|
236
295
|
/**
|
|
237
296
|
* The id of the benefit.
|
|
@@ -338,6 +397,11 @@ export interface BenefitListSupportedBenefitsResponse {
|
|
|
338
397
|
export type BenfitContribution = BenefitContribution | null;
|
|
339
398
|
|
|
340
399
|
export interface BenefitCreateParams {
|
|
400
|
+
/**
|
|
401
|
+
* The company match for this benefit.
|
|
402
|
+
*/
|
|
403
|
+
company_contribution?: BenefitCreateParams.CompanyContribution | null;
|
|
404
|
+
|
|
341
405
|
/**
|
|
342
406
|
* Name of the benefit as it appears in the provider and pay statements. Recommend
|
|
343
407
|
* limiting this to <30 characters due to limitations in specific providers (e.g.
|
|
@@ -356,6 +420,25 @@ export interface BenefitCreateParams {
|
|
|
356
420
|
type?: BenefitType | null;
|
|
357
421
|
}
|
|
358
422
|
|
|
423
|
+
export namespace BenefitCreateParams {
|
|
424
|
+
/**
|
|
425
|
+
* The company match for this benefit.
|
|
426
|
+
*/
|
|
427
|
+
export interface CompanyContribution {
|
|
428
|
+
tiers?: Array<CompanyContribution.Tier>;
|
|
429
|
+
|
|
430
|
+
type?: 'match';
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export namespace CompanyContribution {
|
|
434
|
+
export interface Tier {
|
|
435
|
+
match?: number;
|
|
436
|
+
|
|
437
|
+
threshold?: number;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
359
442
|
export interface BenefitUpdateParams {
|
|
360
443
|
/**
|
|
361
444
|
* Updated name or description.
|
|
@@ -18,7 +18,7 @@ export {
|
|
|
18
18
|
type BenfitContribution,
|
|
19
19
|
type BenefitCreateParams,
|
|
20
20
|
type BenefitUpdateParams,
|
|
21
|
-
} from
|
|
21
|
+
} from "./benefits.js";
|
|
22
22
|
export {
|
|
23
23
|
IndividualBenefitsSinglePage,
|
|
24
24
|
Individuals,
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
type IndividualEnrollManyParams,
|
|
30
30
|
type IndividualRetrieveManyBenefitsParams,
|
|
31
31
|
type IndividualUnenrollManyParams,
|
|
32
|
-
} from
|
|
32
|
+
} from "./individuals.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import * as BenefitsAPI from
|
|
7
|
-
import { SinglePage } from
|
|
3
|
+
import { APIResource } from "../../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../../core.js";
|
|
5
|
+
import * as Core from "../../../core.js";
|
|
6
|
+
import * as BenefitsAPI from "./benefits.js";
|
|
7
|
+
import { SinglePage } from "../../../pagination.js";
|
|
8
8
|
|
|
9
9
|
export class Individuals extends APIResource {
|
|
10
10
|
/**
|
|
@@ -12,6 +12,15 @@ export class Individuals extends APIResource {
|
|
|
12
12
|
* operation. If the employee is already enrolled, the enrollment amounts will be
|
|
13
13
|
* adjusted. Making the same request multiple times will not create new
|
|
14
14
|
* enrollments, but will continue to set the state of the existing enrollment.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const enrolledIndividualBenefitResponse =
|
|
19
|
+
* await client.hris.benefits.individuals.enrollMany(
|
|
20
|
+
* 'benefit_id',
|
|
21
|
+
* [{}],
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
15
24
|
*/
|
|
16
25
|
enrollMany(
|
|
17
26
|
benefitId: string,
|
|
@@ -35,6 +44,14 @@ export class Individuals extends APIResource {
|
|
|
35
44
|
|
|
36
45
|
/**
|
|
37
46
|
* Lists individuals currently enrolled in a given deduction.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const response =
|
|
51
|
+
* await client.hris.benefits.individuals.enrolledIds(
|
|
52
|
+
* 'benefit_id',
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
38
55
|
*/
|
|
39
56
|
enrolledIds(
|
|
40
57
|
benefitId: string,
|
|
@@ -45,6 +62,16 @@ export class Individuals extends APIResource {
|
|
|
45
62
|
|
|
46
63
|
/**
|
|
47
64
|
* Get enrollment information for the given individuals.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* // Automatically fetches more pages as needed.
|
|
69
|
+
* for await (const individualBenefit of client.hris.benefits.individuals.retrieveManyBenefits(
|
|
70
|
+
* 'benefit_id',
|
|
71
|
+
* )) {
|
|
72
|
+
* // ...
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
48
75
|
*/
|
|
49
76
|
retrieveManyBenefits(
|
|
50
77
|
benefitId: string,
|
|
@@ -72,6 +99,14 @@ export class Individuals extends APIResource {
|
|
|
72
99
|
|
|
73
100
|
/**
|
|
74
101
|
* Unenroll individuals from a deduction or contribution
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const unenrolledIndividualBenefitResponse =
|
|
106
|
+
* await client.hris.benefits.individuals.unenrollMany(
|
|
107
|
+
* 'benefit_id',
|
|
108
|
+
* );
|
|
109
|
+
* ```
|
|
75
110
|
*/
|
|
76
111
|
unenrollMany(
|
|
77
112
|
benefitId: string,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
5
|
-
import * as HRISAPI from
|
|
6
|
-
import * as PayStatementItemAPI from
|
|
3
|
+
import { APIResource } from "../../../resource.js";
|
|
4
|
+
import * as Core from "../../../core.js";
|
|
5
|
+
import * as HRISAPI from "../hris.js";
|
|
6
|
+
import * as PayStatementItemAPI from "./pay-statement-item/pay-statement-item.js";
|
|
7
7
|
import {
|
|
8
8
|
PayStatementItem,
|
|
9
9
|
PayStatementItemListParams,
|
|
10
10
|
PayStatementItemListResponse,
|
|
11
11
|
PayStatementItemListResponsesPage,
|
|
12
|
-
} from
|
|
12
|
+
} from "./pay-statement-item/pay-statement-item.js";
|
|
13
13
|
|
|
14
14
|
export class CompanyResource extends APIResource {
|
|
15
15
|
payStatementItem: PayStatementItemAPI.PayStatementItem = new PayStatementItemAPI.PayStatementItem(
|
|
@@ -18,6 +18,11 @@ export class CompanyResource extends APIResource {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Read basic company data
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const company = await client.hris.company.retrieve();
|
|
25
|
+
* ```
|
|
21
26
|
*/
|
|
22
27
|
retrieve(options?: Core.RequestOptions): Core.APIPromise<Company> {
|
|
23
28
|
return this._client.get('/employer/company', options);
|
|
@@ -74,40 +79,40 @@ export namespace Company {
|
|
|
74
79
|
/**
|
|
75
80
|
* The name of the bank associated in the payroll/HRIS system.
|
|
76
81
|
*/
|
|
77
|
-
account_name
|
|
82
|
+
account_name: string | null;
|
|
78
83
|
|
|
79
84
|
/**
|
|
80
85
|
* 10-12 digit number to specify the bank account
|
|
81
86
|
*/
|
|
82
|
-
account_number
|
|
87
|
+
account_number: string | null;
|
|
83
88
|
|
|
84
89
|
/**
|
|
85
90
|
* The type of bank account.
|
|
86
91
|
*/
|
|
87
|
-
account_type
|
|
92
|
+
account_type: 'checking' | 'savings' | null;
|
|
88
93
|
|
|
89
94
|
/**
|
|
90
95
|
* Name of the banking institution.
|
|
91
96
|
*/
|
|
92
|
-
institution_name
|
|
97
|
+
institution_name: string | null;
|
|
93
98
|
|
|
94
99
|
/**
|
|
95
100
|
* A nine-digit code that's based on the U.S. Bank location where your account was
|
|
96
101
|
* opened.
|
|
97
102
|
*/
|
|
98
|
-
routing_number
|
|
103
|
+
routing_number: string | null;
|
|
99
104
|
}
|
|
100
105
|
|
|
101
106
|
export interface Department {
|
|
102
107
|
/**
|
|
103
108
|
* The department name.
|
|
104
109
|
*/
|
|
105
|
-
name
|
|
110
|
+
name: string | null;
|
|
106
111
|
|
|
107
112
|
/**
|
|
108
113
|
* The parent department, if present.
|
|
109
114
|
*/
|
|
110
|
-
parent
|
|
115
|
+
parent: Department.Parent | null;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
export namespace Department {
|
|
@@ -118,7 +123,7 @@ export namespace Company {
|
|
|
118
123
|
/**
|
|
119
124
|
* The parent department's name.
|
|
120
125
|
*/
|
|
121
|
-
name
|
|
126
|
+
name: string | null;
|
|
122
127
|
}
|
|
123
128
|
}
|
|
124
129
|
|
|
@@ -129,12 +134,12 @@ export namespace Company {
|
|
|
129
134
|
/**
|
|
130
135
|
* The tax payer subtype of the company.
|
|
131
136
|
*/
|
|
132
|
-
subtype
|
|
137
|
+
subtype: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
|
|
133
138
|
|
|
134
139
|
/**
|
|
135
140
|
* The tax payer type of the company.
|
|
136
141
|
*/
|
|
137
|
-
type
|
|
142
|
+
type:
|
|
138
143
|
| 'llc'
|
|
139
144
|
| 'lp'
|
|
140
145
|
| 'corporation'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { CompanyResource, type Company } from
|
|
3
|
+
export { CompanyResource, type Company } from "./company.js";
|
|
4
4
|
export {
|
|
5
5
|
PayStatementItemListResponsesPage,
|
|
6
6
|
PayStatementItem,
|
|
7
7
|
type PayStatementItemListResponse,
|
|
8
8
|
type PayStatementItemListParams,
|
|
9
|
-
} from
|
|
9
|
+
} from "./pay-statement-item/index.js";
|
|
@@ -5,7 +5,7 @@ export {
|
|
|
5
5
|
PayStatementItem,
|
|
6
6
|
type PayStatementItemListResponse,
|
|
7
7
|
type PayStatementItemListParams,
|
|
8
|
-
} from
|
|
8
|
+
} from "./pay-statement-item.js";
|
|
9
9
|
export {
|
|
10
10
|
RuleListResponsesPage,
|
|
11
11
|
Rules,
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
type RuleDeleteResponse,
|
|
16
16
|
type RuleCreateParams,
|
|
17
17
|
type RuleUpdateParams,
|
|
18
|
-
} from
|
|
18
|
+
} from "./rules.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import * as RulesAPI from
|
|
3
|
+
import { APIResource } from "../../../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../../../core.js";
|
|
5
|
+
import * as Core from "../../../../core.js";
|
|
6
|
+
import * as RulesAPI from "./rules.js";
|
|
7
7
|
import {
|
|
8
8
|
RuleCreateParams,
|
|
9
9
|
RuleCreateResponse,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
RuleUpdateParams,
|
|
14
14
|
RuleUpdateResponse,
|
|
15
15
|
Rules,
|
|
16
|
-
} from
|
|
17
|
-
import { ResponsesPage } from
|
|
16
|
+
} from "./rules.js";
|
|
17
|
+
import { ResponsesPage } from "../../../../pagination.js";
|
|
18
18
|
|
|
19
19
|
export class PayStatementItem extends APIResource {
|
|
20
20
|
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
|
|
@@ -23,6 +23,14 @@ export class PayStatementItem extends APIResource {
|
|
|
23
23
|
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
24
24
|
* historical support will be added soon Retrieve a list of detailed pay statement
|
|
25
25
|
* items for the access token's connection account.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Automatically fetches more pages as needed.
|
|
30
|
+
* for await (const payStatementItemListResponse of client.hris.company.payStatementItem.list()) {
|
|
31
|
+
* // ...
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
26
34
|
*/
|
|
27
35
|
list(
|
|
28
36
|
query?: PayStatementItemListParams,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import { ResponsesPage } from
|
|
3
|
+
import { APIResource } from "../../../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../../../core.js";
|
|
5
|
+
import * as Core from "../../../../core.js";
|
|
6
|
+
import { ResponsesPage } from "../../../../pagination.js";
|
|
7
7
|
|
|
8
8
|
export class Rules extends APIResource {
|
|
9
9
|
/**
|
|
@@ -13,6 +13,12 @@ export class Rules extends APIResource {
|
|
|
13
13
|
* example, pay statement items that meet certain conditions can be labeled as a
|
|
14
14
|
* pre-tax 401k. This metadata can be retrieved where pay statement item
|
|
15
15
|
* information is available.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const rule =
|
|
20
|
+
* await client.hris.company.payStatementItem.rules.create();
|
|
21
|
+
* ```
|
|
16
22
|
*/
|
|
17
23
|
create(body?: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
|
|
18
24
|
create(options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
|
|
@@ -29,6 +35,14 @@ export class Rules extends APIResource {
|
|
|
29
35
|
/**
|
|
30
36
|
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
31
37
|
* historical support will be added soon Update a rule for a pay statement item.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const rule =
|
|
42
|
+
* await client.hris.company.payStatementItem.rules.update(
|
|
43
|
+
* 'rule_id',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
32
46
|
*/
|
|
33
47
|
update(
|
|
34
48
|
ruleId: string,
|
|
@@ -50,6 +64,14 @@ export class Rules extends APIResource {
|
|
|
50
64
|
/**
|
|
51
65
|
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
52
66
|
* historical support will be added soon List all rules of a connection account.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Automatically fetches more pages as needed.
|
|
71
|
+
* for await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) {
|
|
72
|
+
* // ...
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
53
75
|
*/
|
|
54
76
|
list(options?: Core.RequestOptions): Core.PagePromise<RuleListResponsesPage, RuleListResponse> {
|
|
55
77
|
return this._client.getAPIList('/employer/pay-statement-item/rule', RuleListResponsesPage, options);
|
|
@@ -58,6 +80,14 @@ export class Rules extends APIResource {
|
|
|
58
80
|
/**
|
|
59
81
|
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
60
82
|
* historical support will be added soon Delete a rule for a pay statement item.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const rule =
|
|
87
|
+
* await client.hris.company.payStatementItem.rules.delete(
|
|
88
|
+
* 'rule_id',
|
|
89
|
+
* );
|
|
90
|
+
* ```
|
|
61
91
|
*/
|
|
62
92
|
delete(ruleId: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
|
|
63
93
|
return this._client.delete(`/employer/pay-statement-item/rule/${ruleId}`, options);
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import { IndividualsPage, type IndividualsPageParams } from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../core.js";
|
|
5
|
+
import * as Core from "../../core.js";
|
|
6
|
+
import { IndividualsPage, type IndividualsPageParams } from "../../pagination.js";
|
|
7
7
|
|
|
8
8
|
export class Directory extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Read company directory and organization structure
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const individualInDirectory of client.hris.directory.list()) {
|
|
16
|
+
* // ...
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
11
19
|
*/
|
|
12
20
|
list(
|
|
13
21
|
query?: DirectoryListParams,
|
|
@@ -34,37 +42,37 @@ export interface IndividualInDirectory {
|
|
|
34
42
|
/**
|
|
35
43
|
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
36
44
|
*/
|
|
37
|
-
id
|
|
45
|
+
id: string;
|
|
38
46
|
|
|
39
47
|
/**
|
|
40
48
|
* The department object.
|
|
41
49
|
*/
|
|
42
|
-
department
|
|
50
|
+
department: IndividualInDirectory.Department | null;
|
|
43
51
|
|
|
44
52
|
/**
|
|
45
53
|
* The legal first name of the individual.
|
|
46
54
|
*/
|
|
47
|
-
first_name
|
|
55
|
+
first_name: string | null;
|
|
48
56
|
|
|
49
57
|
/**
|
|
50
58
|
* `true` if the individual is an active employee or contractor at the company.
|
|
51
59
|
*/
|
|
52
|
-
is_active
|
|
60
|
+
is_active: boolean | null;
|
|
53
61
|
|
|
54
62
|
/**
|
|
55
63
|
* The legal last name of the individual.
|
|
56
64
|
*/
|
|
57
|
-
last_name
|
|
65
|
+
last_name: string | null;
|
|
58
66
|
|
|
59
67
|
/**
|
|
60
68
|
* The manager object.
|
|
61
69
|
*/
|
|
62
|
-
manager
|
|
70
|
+
manager: IndividualInDirectory.Manager | null;
|
|
63
71
|
|
|
64
72
|
/**
|
|
65
73
|
* The legal middle name of the individual.
|
|
66
74
|
*/
|
|
67
|
-
middle_name
|
|
75
|
+
middle_name: string | null;
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
export namespace IndividualInDirectory {
|
|
@@ -85,7 +93,7 @@ export namespace IndividualInDirectory {
|
|
|
85
93
|
/**
|
|
86
94
|
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
87
95
|
*/
|
|
88
|
-
id
|
|
96
|
+
id: string;
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
|