@tryfinch/finch-api 6.26.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 +56 -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 +9 -1
- 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 +9 -1
- 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
|
@@ -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);
|
|
@@ -8,6 +8,16 @@ import { ResponsesPage } from '../../pagination';
|
|
|
8
8
|
export class Employments extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Read individual employment and income data
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const employmentDataResponse of client.hris.employments.retrieveMany(
|
|
16
|
+
* { requests: [{ individual_id: 'individual_id' }] },
|
|
17
|
+
* )) {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
11
21
|
*/
|
|
12
22
|
retrieveMany(
|
|
13
23
|
body: EmploymentRetrieveManyParams,
|
|
@@ -23,161 +33,175 @@ export class Employments extends APIResource {
|
|
|
23
33
|
|
|
24
34
|
export class EmploymentDataResponsesPage extends ResponsesPage<EmploymentDataResponse> {}
|
|
25
35
|
|
|
26
|
-
export
|
|
27
|
-
/**
|
|
28
|
-
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
29
|
-
*/
|
|
30
|
-
id?: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Worker's compensation classification code for this employee
|
|
34
|
-
*/
|
|
35
|
-
class_code?: string | null;
|
|
36
|
+
export type EmploymentData = EmploymentData.UnionMember0 | EmploymentData.BatchError;
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The department object.
|
|
45
|
-
*/
|
|
46
|
-
department?: EmploymentData.Department | null;
|
|
38
|
+
export namespace EmploymentData {
|
|
39
|
+
export interface UnionMember0 {
|
|
40
|
+
/**
|
|
41
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Worker's compensation classification code for this employee
|
|
47
|
+
*/
|
|
48
|
+
class_code: string | null;
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
| 'active'
|
|
59
|
-
| 'deceased'
|
|
60
|
-
| 'leave'
|
|
61
|
-
| 'onboarding'
|
|
62
|
-
| 'prehire'
|
|
63
|
-
| 'retired'
|
|
64
|
-
| 'terminated'
|
|
65
|
-
| null;
|
|
66
|
-
|
|
67
|
-
end_date?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Custom fields for the individual. These are fields which are defined by the
|
|
52
|
+
* employer in the system.
|
|
53
|
+
*/
|
|
54
|
+
custom_fields: Array<UnionMember0.CustomField> | null;
|
|
68
55
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The department object.
|
|
58
|
+
*/
|
|
59
|
+
department: UnionMember0.Department | null;
|
|
73
60
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
income?: HRISAPI.Income | null;
|
|
61
|
+
/**
|
|
62
|
+
* The employment object.
|
|
63
|
+
*/
|
|
64
|
+
employment: UnionMember0.Employment | null;
|
|
80
65
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
/**
|
|
67
|
+
* The detailed employment status of the individual. Available options: `active`,
|
|
68
|
+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
|
|
69
|
+
*/
|
|
70
|
+
employment_status:
|
|
71
|
+
| 'active'
|
|
72
|
+
| 'deceased'
|
|
73
|
+
| 'leave'
|
|
74
|
+
| 'onboarding'
|
|
75
|
+
| 'prehire'
|
|
76
|
+
| 'retired'
|
|
77
|
+
| 'terminated'
|
|
78
|
+
| null;
|
|
79
|
+
|
|
80
|
+
end_date: string | null;
|
|
85
81
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
/**
|
|
83
|
+
* The legal first name of the individual.
|
|
84
|
+
*/
|
|
85
|
+
first_name: string | null;
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
/**
|
|
88
|
+
* `true` if the individual an an active employee or contractor at the company.
|
|
89
|
+
*/
|
|
90
|
+
is_active: boolean | null;
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
/**
|
|
93
|
+
* The legal last name of the individual.
|
|
94
|
+
*/
|
|
95
|
+
last_name: string | null;
|
|
97
96
|
|
|
98
|
-
|
|
97
|
+
latest_rehire_date: string | null;
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
* The manager object representing the manager of the individual within the org.
|
|
102
|
-
*/
|
|
103
|
-
manager?: EmploymentData.Manager | null;
|
|
99
|
+
location: HRISAPI.Location | null;
|
|
104
100
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
/**
|
|
102
|
+
* The manager object representing the manager of the individual within the org.
|
|
103
|
+
*/
|
|
104
|
+
manager: UnionMember0.Manager | null;
|
|
109
105
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
/**
|
|
107
|
+
* The legal middle name of the individual.
|
|
108
|
+
*/
|
|
109
|
+
middle_name: string | null;
|
|
114
110
|
|
|
115
|
-
|
|
111
|
+
/**
|
|
112
|
+
* The source system's unique employment identifier for this individual
|
|
113
|
+
*/
|
|
114
|
+
source_id: string | null;
|
|
116
115
|
|
|
117
|
-
|
|
118
|
-
* The current title of the individual.
|
|
119
|
-
*/
|
|
120
|
-
title?: string | null;
|
|
116
|
+
start_date: string | null;
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
118
|
+
/**
|
|
119
|
+
* The current title of the individual.
|
|
120
|
+
*/
|
|
121
|
+
title: string | null;
|
|
127
122
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated This field is deprecated in favour of `source_id`
|
|
125
|
+
*/
|
|
126
|
+
work_id: string | null;
|
|
131
127
|
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
/**
|
|
129
|
+
* The employee's income as reported by the provider. This may not always be
|
|
130
|
+
* annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
|
|
131
|
+
* depending on what information the provider returns.
|
|
132
|
+
*/
|
|
133
|
+
income?: HRISAPI.Income | null;
|
|
134
134
|
|
|
135
|
-
/**
|
|
136
|
-
* The department object.
|
|
137
|
-
*/
|
|
138
|
-
export interface Department {
|
|
139
135
|
/**
|
|
140
|
-
* The
|
|
136
|
+
* The array of income history.
|
|
141
137
|
*/
|
|
142
|
-
|
|
138
|
+
income_history?: Array<HRISAPI.Income | null> | null;
|
|
143
139
|
}
|
|
144
140
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
export namespace UnionMember0 {
|
|
142
|
+
export interface CustomField {
|
|
143
|
+
name?: string;
|
|
144
|
+
|
|
145
|
+
value?: string | Array<unknown> | unknown | number | boolean | null;
|
|
146
|
+
}
|
|
147
|
+
|
|
149
148
|
/**
|
|
150
|
-
* The
|
|
151
|
-
* `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
|
|
149
|
+
* The department object.
|
|
152
150
|
*/
|
|
153
|
-
|
|
151
|
+
export interface Department {
|
|
152
|
+
/**
|
|
153
|
+
* The name of the department associated with the individual.
|
|
154
|
+
*/
|
|
155
|
+
name: string | null;
|
|
156
|
+
}
|
|
154
157
|
|
|
155
158
|
/**
|
|
156
|
-
* The
|
|
159
|
+
* The employment object.
|
|
157
160
|
*/
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
export interface Employment {
|
|
162
|
+
/**
|
|
163
|
+
* The secondary employment type of the individual. Options: `full_time`,
|
|
164
|
+
* `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
|
|
165
|
+
*/
|
|
166
|
+
subtype: 'full_time' | 'intern' | 'part_time' | 'temp' | 'seasonal' | 'individual_contractor' | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The main employment type of the individual.
|
|
170
|
+
*/
|
|
171
|
+
type: 'employee' | 'contractor' | null;
|
|
172
|
+
}
|
|
160
173
|
|
|
161
|
-
/**
|
|
162
|
-
* The manager object representing the manager of the individual within the org.
|
|
163
|
-
*/
|
|
164
|
-
export interface Manager {
|
|
165
174
|
/**
|
|
166
|
-
*
|
|
175
|
+
* The manager object representing the manager of the individual within the org.
|
|
167
176
|
*/
|
|
168
|
-
|
|
177
|
+
export interface Manager {
|
|
178
|
+
/**
|
|
179
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
180
|
+
*/
|
|
181
|
+
id: string;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface BatchError {
|
|
186
|
+
code: number;
|
|
187
|
+
|
|
188
|
+
message: string;
|
|
189
|
+
|
|
190
|
+
name: string;
|
|
191
|
+
|
|
192
|
+
finch_code?: string;
|
|
169
193
|
}
|
|
170
194
|
}
|
|
171
195
|
|
|
172
196
|
export interface EmploymentDataResponse {
|
|
173
|
-
body
|
|
197
|
+
body: EmploymentData;
|
|
174
198
|
|
|
175
|
-
code
|
|
199
|
+
code: number;
|
|
176
200
|
|
|
177
201
|
/**
|
|
178
202
|
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
179
203
|
*/
|
|
180
|
-
individual_id
|
|
204
|
+
individual_id: string;
|
|
181
205
|
}
|
|
182
206
|
|
|
183
207
|
export interface EmploymentRetrieveManyParams {
|
|
@@ -88,23 +88,23 @@ export interface Income {
|
|
|
88
88
|
/**
|
|
89
89
|
* The income amount in cents.
|
|
90
90
|
*/
|
|
91
|
-
amount
|
|
91
|
+
amount: number | null;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* The currency code.
|
|
95
95
|
*/
|
|
96
|
-
currency
|
|
96
|
+
currency: string | null;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* The date the income amount went into effect.
|
|
100
100
|
*/
|
|
101
|
-
effective_date
|
|
101
|
+
effective_date: string | null;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* The income unit of payment. Options: `yearly`, `quarterly`, `monthly`,
|
|
105
105
|
* `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.
|
|
106
106
|
*/
|
|
107
|
-
unit
|
|
107
|
+
unit:
|
|
108
108
|
| 'yearly'
|
|
109
109
|
| 'quarterly'
|
|
110
110
|
| 'monthly'
|
|
@@ -121,36 +121,36 @@ export interface Location {
|
|
|
121
121
|
/**
|
|
122
122
|
* City, district, suburb, town, or village.
|
|
123
123
|
*/
|
|
124
|
-
city
|
|
124
|
+
city: string | null;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* The 2-letter ISO 3166 country code.
|
|
128
128
|
*/
|
|
129
|
-
country
|
|
129
|
+
country: string | null;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* Street address or PO box.
|
|
133
133
|
*/
|
|
134
|
-
line1
|
|
134
|
+
line1: string | null;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* Apartment, suite, unit, or building.
|
|
138
138
|
*/
|
|
139
|
-
line2
|
|
140
|
-
|
|
141
|
-
name?: string | null;
|
|
139
|
+
line2: string | null;
|
|
142
140
|
|
|
143
141
|
/**
|
|
144
142
|
* The postal code or zip code.
|
|
145
143
|
*/
|
|
146
|
-
postal_code
|
|
147
|
-
|
|
148
|
-
source_id?: string | null;
|
|
144
|
+
postal_code: string | null;
|
|
149
145
|
|
|
150
146
|
/**
|
|
151
147
|
* The state code.
|
|
152
148
|
*/
|
|
153
|
-
state
|
|
149
|
+
state: string | null;
|
|
150
|
+
|
|
151
|
+
name?: string | null;
|
|
152
|
+
|
|
153
|
+
source_id?: string | null;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
export interface Money {
|
|
@@ -9,6 +9,14 @@ import { ResponsesPage } from '../../pagination';
|
|
|
9
9
|
export class Individuals extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Read individual data, excluding income and employment data
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Automatically fetches more pages as needed.
|
|
16
|
+
* for await (const individualResponse of client.hris.individuals.retrieveMany()) {
|
|
17
|
+
* // ...
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
retrieveMany(
|
|
14
22
|
body?: IndividualRetrieveManyParams,
|
|
@@ -32,95 +40,109 @@ export class Individuals extends APIResource {
|
|
|
32
40
|
|
|
33
41
|
export class IndividualResponsesPage extends ResponsesPage<IndividualResponse> {}
|
|
34
42
|
|
|
35
|
-
export
|
|
36
|
-
/**
|
|
37
|
-
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
38
|
-
*/
|
|
39
|
-
id?: string;
|
|
40
|
-
|
|
41
|
-
dob?: string | null;
|
|
43
|
+
export type Individual = Individual.UnionMember0 | Individual.BatchError;
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
45
|
+
export namespace Individual {
|
|
46
|
+
export interface UnionMember0 {
|
|
47
|
+
/**
|
|
48
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
|
|
52
|
+
dob: string | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The EEOC-defined ethnicity of the individual.
|
|
56
|
+
*/
|
|
57
|
+
ethnicity:
|
|
58
|
+
| 'asian'
|
|
59
|
+
| 'white'
|
|
60
|
+
| 'black_or_african_american'
|
|
61
|
+
| 'native_hawaiian_or_pacific_islander'
|
|
62
|
+
| 'american_indian_or_alaska_native'
|
|
63
|
+
| 'hispanic_or_latino'
|
|
64
|
+
| 'two_or_more_races'
|
|
65
|
+
| 'decline_to_specify'
|
|
66
|
+
| null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The legal first name of the individual.
|
|
70
|
+
*/
|
|
71
|
+
first_name: string | null;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The gender of the individual.
|
|
75
|
+
*/
|
|
76
|
+
gender: 'female' | 'male' | 'other' | 'decline_to_specify' | null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The legal last name of the individual.
|
|
80
|
+
*/
|
|
81
|
+
last_name: string | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The legal middle name of the individual.
|
|
85
|
+
*/
|
|
86
|
+
middle_name: string | null;
|
|
87
|
+
|
|
88
|
+
phone_numbers: Array<UnionMember0.PhoneNumber | null> | null;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The preferred name of the individual.
|
|
92
|
+
*/
|
|
93
|
+
preferred_name: string | null;
|
|
94
|
+
|
|
95
|
+
residence: HRISAPI.Location | null;
|
|
96
|
+
|
|
97
|
+
emails?: Array<UnionMember0.Email> | null;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Social Security Number of the individual in **encrypted** format. This field is
|
|
101
|
+
* only available with the `ssn` scope enabled and the
|
|
102
|
+
* `options: { include: ['ssn'] }` param set in the body.
|
|
103
|
+
*/
|
|
104
|
+
encrypted_ssn?: string | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Social Security Number of the individual. This field is only available with the
|
|
108
|
+
* `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
|
|
109
|
+
* body.
|
|
110
|
+
* [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
|
|
111
|
+
*/
|
|
112
|
+
ssn?: string | null;
|
|
113
|
+
}
|
|
85
114
|
|
|
86
|
-
|
|
115
|
+
export namespace UnionMember0 {
|
|
116
|
+
export interface PhoneNumber {
|
|
117
|
+
data: string | null;
|
|
87
118
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
preferred_name?: string | null;
|
|
119
|
+
type: 'work' | 'personal' | null;
|
|
120
|
+
}
|
|
92
121
|
|
|
93
|
-
|
|
122
|
+
export interface Email {
|
|
123
|
+
data: string;
|
|
94
124
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
* body.
|
|
99
|
-
* [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
|
|
100
|
-
*/
|
|
101
|
-
ssn?: string | null;
|
|
102
|
-
}
|
|
125
|
+
type: 'work' | 'personal' | null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
103
128
|
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
data?: string;
|
|
129
|
+
export interface BatchError {
|
|
130
|
+
code: number;
|
|
107
131
|
|
|
108
|
-
|
|
109
|
-
}
|
|
132
|
+
message: string;
|
|
110
133
|
|
|
111
|
-
|
|
112
|
-
data?: string | null;
|
|
134
|
+
name: string;
|
|
113
135
|
|
|
114
|
-
|
|
136
|
+
finch_code?: string;
|
|
115
137
|
}
|
|
116
138
|
}
|
|
117
139
|
|
|
118
140
|
export interface IndividualResponse {
|
|
119
|
-
body
|
|
141
|
+
body: Individual;
|
|
120
142
|
|
|
121
|
-
code
|
|
143
|
+
code: number;
|
|
122
144
|
|
|
123
|
-
individual_id
|
|
145
|
+
individual_id: string;
|
|
124
146
|
}
|
|
125
147
|
|
|
126
148
|
export interface IndividualRetrieveManyParams {
|