@tryfinch/finch-api 6.27.0 → 6.28.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 +42 -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 +16 -0
- 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 +19 -0
- 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/resources/access-tokens.ts +8 -0
- package/src/resources/hris/benefits/benefits.ts +83 -0
- package/src/resources/hris/benefits/individuals.ts +35 -0
- package/src/resources/hris/company/company.ts +15 -10
- package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +8 -0
- package/src/resources/hris/company/pay-statement-item/rules.ts +30 -0
- package/src/resources/hris/directory.ts +16 -8
- package/src/resources/hris/documents.ts +12 -0
- package/src/resources/hris/employments.ts +139 -115
- package/src/resources/hris/hris.ts +14 -14
- package/src/resources/hris/individuals.ts +96 -74
- package/src/resources/hris/pay-statements.ts +16 -0
- package/src/resources/hris/payments.ts +11 -0
- package/src/resources/request-forwarding.ts +10 -0
- package/src/resources/sandbox/company.ts +23 -0
- package/src/resources/sandbox/connections/accounts.ts +17 -0
- package/src/resources/sandbox/connections/connections.ts +7 -0
- package/src/resources/sandbox/directory.ts +7 -0
- package/src/resources/sandbox/employment.ts +7 -0
- package/src/resources/sandbox/individual.ts +7 -0
- package/src/resources/sandbox/jobs/configuration.ts +15 -0
- package/src/resources/sandbox/jobs/jobs.ts +7 -0
- package/src/resources/sandbox/payment.ts +19 -0
- package/src/resources/shared.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.mjs","sourceRoot":"","sources":["../../src/resources/sandbox/payment.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAK3B,MAAM,OAAO,OAAQ,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"payment.mjs","sourceRoot":"","sources":["../../src/resources/sandbox/payment.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAK3B,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAyBtC,MAAM,CACJ,OAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -53,12 +53,12 @@ export interface OperationSupportMatrix {
|
|
|
53
53
|
}
|
|
54
54
|
export interface Paging {
|
|
55
55
|
/**
|
|
56
|
-
* The
|
|
56
|
+
* The current start index of the returned list of elements
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
offset: number;
|
|
59
59
|
/**
|
|
60
|
-
* The
|
|
60
|
+
* The total number of elements for the entire query (not just the given page)
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
count?: number;
|
|
63
63
|
}
|
|
64
64
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,YAAY,GACZ,WAAW,GACX,wBAAwB,GACxB,mBAAmB,GACnB,QAAQ,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GACxB,WAAW,GACX,wBAAwB,GACxB,2BAA2B,GAC3B,oBAAoB,CAAC;AAEzB,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,YAAY,GACZ,WAAW,GACX,wBAAwB,GACxB,mBAAmB,GACnB,QAAQ,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GACxB,WAAW,GACX,wBAAwB,GACxB,2BAA2B,GAC3B,oBAAoB,CAAC;AAEzB,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -6,6 +6,14 @@ import * as Core from '../core';
|
|
|
6
6
|
export class AccessTokens extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Exchange the authorization code for an access token
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const createAccessTokenResponse =
|
|
13
|
+
* await client.accessTokens.create({
|
|
14
|
+
* code: '<your_authorization_code>',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
create(
|
|
11
19
|
body: AccessTokenCreateParams,
|
|
@@ -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.
|
|
@@ -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,
|
|
@@ -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'
|
|
@@ -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,
|
|
@@ -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);
|
|
@@ -8,6 +8,14 @@ import { IndividualsPage, type IndividualsPageParams } from '../../pagination';
|
|
|
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
|
|
|
@@ -9,6 +9,11 @@ export class Documents extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* **Beta:** This endpoint is in beta and may change. Retrieve a list of
|
|
11
11
|
* company-wide documents.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const documents = await client.hris.documents.list();
|
|
16
|
+
* ```
|
|
12
17
|
*/
|
|
13
18
|
list(query?: DocumentListParams, options?: Core.RequestOptions): Core.APIPromise<DocumentListResponse>;
|
|
14
19
|
list(options?: Core.RequestOptions): Core.APIPromise<DocumentListResponse>;
|
|
@@ -25,6 +30,13 @@ export class Documents extends APIResource {
|
|
|
25
30
|
/**
|
|
26
31
|
* **Beta:** This endpoint is in beta and may change. Retrieve details of a
|
|
27
32
|
* specific document by its ID.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const response = await client.hris.documents.retreive(
|
|
37
|
+
* 'document_id',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
28
40
|
*/
|
|
29
41
|
retreive(documentId: string, options?: Core.RequestOptions): Core.APIPromise<DocumentRetreiveResponse> {
|
|
30
42
|
return this._client.get(`/employer/documents/${documentId}`, options);
|