@tryfinch/finch-api 5.14.3 → 5.15.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 +22 -0
- package/LICENSE +1 -1
- package/_shims/index.d.ts +1 -1
- package/_shims/registry.d.ts +1 -1
- package/_shims/registry.d.ts.map +1 -1
- package/core.d.ts +12 -12
- package/core.d.ts.map +1 -1
- package/core.js +39 -13
- package/core.js.map +1 -1
- package/core.mjs +39 -13
- package/core.mjs.map +1 -1
- package/index.d.mts +15 -0
- package/index.d.ts +15 -0
- package/index.d.ts.map +1 -1
- package/index.js +15 -2
- package/index.js.map +1 -1
- package/index.mjs +15 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.ts +23 -0
- package/resources/access-tokens.d.ts.map +1 -0
- package/resources/access-tokens.js +17 -0
- package/resources/access-tokens.js.map +1 -0
- package/resources/access-tokens.mjs +13 -0
- package/resources/access-tokens.mjs.map +1 -0
- package/resources/account.d.ts +14 -0
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js.map +1 -1
- package/resources/account.mjs.map +1 -1
- package/resources/auth.d.ts +20 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +17 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +13 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/sandbox/company.d.ts +195 -0
- package/resources/sandbox/company.d.ts.map +1 -0
- package/resources/sandbox/company.js +17 -0
- package/resources/sandbox/company.js.map +1 -0
- package/resources/sandbox/company.mjs +13 -0
- package/resources/sandbox/company.mjs.map +1 -0
- package/resources/sandbox/connections/accounts.d.ts +51 -0
- package/resources/sandbox/connections/accounts.d.ts.map +1 -0
- package/resources/sandbox/connections/accounts.js +24 -0
- package/resources/sandbox/connections/accounts.js.map +1 -0
- package/resources/sandbox/connections/accounts.mjs +20 -0
- package/resources/sandbox/connections/accounts.mjs.map +1 -0
- package/resources/sandbox/connections/connections.d.ts +39 -0
- package/resources/sandbox/connections/connections.d.ts.map +1 -0
- package/resources/sandbox/connections/connections.js +46 -0
- package/resources/sandbox/connections/connections.js.map +1 -0
- package/resources/sandbox/connections/connections.mjs +19 -0
- package/resources/sandbox/connections/connections.mjs.map +1 -0
- package/resources/sandbox/connections/index.d.ts +3 -0
- package/resources/sandbox/connections/index.d.ts.map +1 -0
- package/resources/sandbox/connections/index.js +9 -0
- package/resources/sandbox/connections/index.js.map +1 -0
- package/resources/sandbox/connections/index.mjs +4 -0
- package/resources/sandbox/connections/index.mjs.map +1 -0
- package/resources/sandbox/directory.d.ts +156 -0
- package/resources/sandbox/directory.d.ts.map +1 -0
- package/resources/sandbox/directory.js +17 -0
- package/resources/sandbox/directory.js.map +1 -0
- package/resources/sandbox/directory.mjs +13 -0
- package/resources/sandbox/directory.mjs.map +1 -0
- package/resources/sandbox/employment.d.ts +216 -0
- package/resources/sandbox/employment.d.ts.map +1 -0
- package/resources/sandbox/employment.js +18 -0
- package/resources/sandbox/employment.js.map +1 -0
- package/resources/sandbox/employment.mjs +14 -0
- package/resources/sandbox/employment.mjs.map +1 -0
- package/resources/sandbox/index.d.ts +9 -0
- package/resources/sandbox/index.d.ts.map +1 -0
- package/resources/sandbox/index.js +21 -0
- package/resources/sandbox/index.js.map +1 -0
- package/resources/sandbox/index.mjs +10 -0
- package/resources/sandbox/index.mjs.map +1 -0
- package/resources/sandbox/individual.d.ts +124 -0
- package/resources/sandbox/individual.d.ts.map +1 -0
- package/resources/sandbox/individual.js +18 -0
- package/resources/sandbox/individual.js.map +1 -0
- package/resources/sandbox/individual.mjs +14 -0
- package/resources/sandbox/individual.mjs.map +1 -0
- package/resources/sandbox/jobs/configuration.d.ts +28 -0
- package/resources/sandbox/jobs/configuration.d.ts.map +1 -0
- package/resources/sandbox/jobs/configuration.js +23 -0
- package/resources/sandbox/jobs/configuration.js.map +1 -0
- package/resources/sandbox/jobs/configuration.mjs +19 -0
- package/resources/sandbox/jobs/configuration.mjs.map +1 -0
- package/resources/sandbox/jobs/index.d.ts +3 -0
- package/resources/sandbox/jobs/index.d.ts.map +1 -0
- package/resources/sandbox/jobs/index.js +9 -0
- package/resources/sandbox/jobs/index.js.map +1 -0
- package/resources/sandbox/jobs/index.mjs +4 -0
- package/resources/sandbox/jobs/index.mjs.map +1 -0
- package/resources/sandbox/jobs/jobs.d.ts +12 -0
- package/resources/sandbox/jobs/jobs.d.ts.map +1 -0
- package/resources/sandbox/jobs/jobs.js +40 -0
- package/resources/sandbox/jobs/jobs.js.map +1 -0
- package/resources/sandbox/jobs/jobs.mjs +13 -0
- package/resources/sandbox/jobs/jobs.mjs.map +1 -0
- package/resources/sandbox/payment.d.ts +154 -0
- package/resources/sandbox/payment.d.ts.map +1 -0
- package/resources/sandbox/payment.js +18 -0
- package/resources/sandbox/payment.js.map +1 -0
- package/resources/sandbox/payment.mjs +14 -0
- package/resources/sandbox/payment.mjs.map +1 -0
- package/resources/sandbox/sandbox.d.ts +39 -0
- package/resources/sandbox/sandbox.d.ts.map +1 -0
- package/resources/sandbox/sandbox.js +58 -0
- package/resources/sandbox/sandbox.js.map +1 -0
- package/resources/sandbox/sandbox.mjs +31 -0
- package/resources/sandbox/sandbox.mjs.map +1 -0
- package/resources/shared.d.ts +1 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/_shims/index.d.ts +1 -1
- package/src/_shims/node-runtime.ts +1 -1
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +1 -1
- package/src/core.ts +65 -30
- package/src/index.ts +23 -2
- package/src/lib/.keep +4 -0
- package/src/resources/access-tokens.ts +36 -0
- package/src/resources/account.ts +19 -0
- package/src/resources/auth.ts +32 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/sandbox/company.ts +252 -0
- package/src/resources/sandbox/connections/accounts.ts +83 -0
- package/src/resources/sandbox/connections/connections.ts +58 -0
- package/src/resources/sandbox/connections/index.ts +10 -0
- package/src/resources/sandbox/directory.ts +210 -0
- package/src/resources/sandbox/employment.ts +279 -0
- package/src/resources/sandbox/index.ts +10 -0
- package/src/resources/sandbox/individual.ts +193 -0
- package/src/resources/sandbox/jobs/configuration.ts +44 -0
- package/src/resources/sandbox/jobs/index.ts +9 -0
- package/src/resources/sandbox/jobs/jobs.ts +15 -0
- package/src/resources/sandbox/payment.ts +215 -0
- package/src/resources/sandbox/sandbox.ts +42 -0
- package/src/resources/shared.ts +8 -0
- package/src/uploads.ts +2 -2
- package/src/version.ts +1 -1
- package/uploads.d.ts +2 -2
- package/uploads.d.ts.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../../core";
|
|
4
|
+
import { APIResource } from "../../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../../core";
|
|
6
|
+
import * as AccountsAPI from "./accounts";
|
|
7
|
+
import * as Shared from "../../shared";
|
|
8
|
+
|
|
9
|
+
export class Accounts extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a new account for an existing connection (company/provider pair)
|
|
12
|
+
*/
|
|
13
|
+
create(body: AccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<AccountCreateResponse> {
|
|
14
|
+
return this._client.post('/sandbox/connections/accounts', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Update an existing sandbox account. Change the connection status to understand
|
|
19
|
+
* how the Finch API responds.
|
|
20
|
+
*/
|
|
21
|
+
update(body?: AccountUpdateParams, options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
|
|
22
|
+
update(options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
|
|
23
|
+
update(
|
|
24
|
+
body: AccountUpdateParams | Core.RequestOptions = {},
|
|
25
|
+
options?: Core.RequestOptions,
|
|
26
|
+
): Core.APIPromise<AccountUpdateResponse> {
|
|
27
|
+
if (isRequestOptions(body)) {
|
|
28
|
+
return this.update({}, body);
|
|
29
|
+
}
|
|
30
|
+
return this._client.put('/sandbox/connections/accounts', { body, ...options });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface AccountCreateResponse {
|
|
35
|
+
access_token: string;
|
|
36
|
+
|
|
37
|
+
account_id: string;
|
|
38
|
+
|
|
39
|
+
authentication_type: 'credentials' | 'api_token' | 'oauth' | 'assisted';
|
|
40
|
+
|
|
41
|
+
company_id: string;
|
|
42
|
+
|
|
43
|
+
products: Array<string>;
|
|
44
|
+
|
|
45
|
+
provider_id: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface AccountUpdateResponse {
|
|
49
|
+
account_id: string;
|
|
50
|
+
|
|
51
|
+
authentication_type: 'credentials' | 'api_token' | 'oauth' | 'assisted';
|
|
52
|
+
|
|
53
|
+
company_id: string;
|
|
54
|
+
|
|
55
|
+
products: Array<string>;
|
|
56
|
+
|
|
57
|
+
provider_id: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface AccountCreateParams {
|
|
61
|
+
company_id: string;
|
|
62
|
+
|
|
63
|
+
provider_id: string;
|
|
64
|
+
|
|
65
|
+
authentication_type?: 'credentials' | 'api_token' | 'oauth' | 'assisted';
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Optional, defaults to Organization products (`company`, `directory`,
|
|
69
|
+
* `employment`, `individual`)
|
|
70
|
+
*/
|
|
71
|
+
products?: Array<string>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface AccountUpdateParams {
|
|
75
|
+
connection_status?: Shared.IntrospectResponseConnectionStatus;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export namespace Accounts {
|
|
79
|
+
export import AccountCreateResponse = AccountsAPI.AccountCreateResponse;
|
|
80
|
+
export import AccountUpdateResponse = AccountsAPI.AccountUpdateResponse;
|
|
81
|
+
export import AccountCreateParams = AccountsAPI.AccountCreateParams;
|
|
82
|
+
export import AccountUpdateParams = AccountsAPI.AccountUpdateParams;
|
|
83
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../../core";
|
|
4
|
+
import { APIResource } from "../../../resource";
|
|
5
|
+
import * as ConnectionsAPI from "./connections";
|
|
6
|
+
import * as AccountsAPI from "./accounts";
|
|
7
|
+
|
|
8
|
+
export class Connections extends APIResource {
|
|
9
|
+
accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Create a new connection (new company/provider pair) with a new account
|
|
13
|
+
*/
|
|
14
|
+
create(
|
|
15
|
+
body: ConnectionCreateParams,
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.APIPromise<ConnectionCreateResponse> {
|
|
18
|
+
return this._client.post('/sandbox/connections', { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ConnectionCreateResponse {
|
|
23
|
+
access_token: string;
|
|
24
|
+
|
|
25
|
+
account_id: string;
|
|
26
|
+
|
|
27
|
+
authentication_type: 'credentials' | 'api_token' | 'oauth' | 'assisted';
|
|
28
|
+
|
|
29
|
+
company_id: string;
|
|
30
|
+
|
|
31
|
+
products: Array<string>;
|
|
32
|
+
|
|
33
|
+
provider_id: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ConnectionCreateParams {
|
|
37
|
+
provider_id: string;
|
|
38
|
+
|
|
39
|
+
authentication_type?: 'credentials' | 'api_token' | 'oauth' | 'assisted';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional: the size of the employer to be created with this connection. Defaults
|
|
43
|
+
* to 20
|
|
44
|
+
*/
|
|
45
|
+
employer_size?: number;
|
|
46
|
+
|
|
47
|
+
products?: Array<string>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export namespace Connections {
|
|
51
|
+
export import ConnectionCreateResponse = ConnectionsAPI.ConnectionCreateResponse;
|
|
52
|
+
export import ConnectionCreateParams = ConnectionsAPI.ConnectionCreateParams;
|
|
53
|
+
export import Accounts = AccountsAPI.Accounts;
|
|
54
|
+
export import AccountCreateResponse = AccountsAPI.AccountCreateResponse;
|
|
55
|
+
export import AccountUpdateResponse = AccountsAPI.AccountUpdateResponse;
|
|
56
|
+
export import AccountCreateParams = AccountsAPI.AccountCreateParams;
|
|
57
|
+
export import AccountUpdateParams = AccountsAPI.AccountUpdateParams;
|
|
58
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
AccountCreateResponse,
|
|
5
|
+
AccountUpdateResponse,
|
|
6
|
+
AccountCreateParams,
|
|
7
|
+
AccountUpdateParams,
|
|
8
|
+
Accounts,
|
|
9
|
+
} from './accounts';
|
|
10
|
+
export { ConnectionCreateResponse, ConnectionCreateParams, Connections } from './connections';
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import * as DirectoryAPI from "./directory";
|
|
6
|
+
import * as HRISAPI from "../hris/hris";
|
|
7
|
+
|
|
8
|
+
export class Directory extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Add new individuals to a sandbox company
|
|
11
|
+
*/
|
|
12
|
+
create(
|
|
13
|
+
body: DirectoryCreateParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.APIPromise<DirectoryCreateResponse> {
|
|
16
|
+
return this._client.post('/sandbox/directory', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The individuals which were created
|
|
22
|
+
*/
|
|
23
|
+
export type DirectoryCreateResponse = Array<unknown>;
|
|
24
|
+
|
|
25
|
+
export type DirectoryCreateParams = Array<DirectoryCreateParams.Body>;
|
|
26
|
+
|
|
27
|
+
export namespace DirectoryCreateParams {
|
|
28
|
+
export interface Body {
|
|
29
|
+
/**
|
|
30
|
+
* Worker's compensation classification code for this employee
|
|
31
|
+
*/
|
|
32
|
+
class_code?: string | null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Custom fields for the individual. These are fields which are defined by the
|
|
36
|
+
* employer in the system. Custom fields are not currently supported for assisted
|
|
37
|
+
* connections.
|
|
38
|
+
*/
|
|
39
|
+
custom_fields?: Array<Body.CustomField>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The department object.
|
|
43
|
+
*/
|
|
44
|
+
department?: Body.Department | null;
|
|
45
|
+
|
|
46
|
+
dob?: string | null;
|
|
47
|
+
|
|
48
|
+
emails?: Array<Body.Email> | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The employment object.
|
|
52
|
+
*/
|
|
53
|
+
employment?: Body.Employment | null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Social Security Number of the individual in **encrypted** format. This field is
|
|
57
|
+
* only available with the `ssn` scope enabled and the
|
|
58
|
+
* `options: { include: ['ssn'] }` param set in the body.
|
|
59
|
+
*/
|
|
60
|
+
encrypted_ssn?: string | null;
|
|
61
|
+
|
|
62
|
+
end_date?: string | null;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The EEOC-defined ethnicity of the individual.
|
|
66
|
+
*/
|
|
67
|
+
ethnicity?:
|
|
68
|
+
| 'asian'
|
|
69
|
+
| 'white'
|
|
70
|
+
| 'black_or_african_american'
|
|
71
|
+
| 'native_hawaiian_or_pacific_islander'
|
|
72
|
+
| 'american_indian_or_alaska_native'
|
|
73
|
+
| 'hispanic_or_latino'
|
|
74
|
+
| 'two_or_more_races'
|
|
75
|
+
| 'decline_to_specify'
|
|
76
|
+
| null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The legal first name of the individual.
|
|
80
|
+
*/
|
|
81
|
+
first_name?: string | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The gender of the individual.
|
|
85
|
+
*/
|
|
86
|
+
gender?: 'female' | 'male' | 'other' | 'decline_to_specify' | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The employee's income as reported by the provider. This may not always be
|
|
90
|
+
* annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
|
|
91
|
+
* depending on what information the provider returns.
|
|
92
|
+
*/
|
|
93
|
+
income?: HRISAPI.Income | null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The array of income history.
|
|
97
|
+
*/
|
|
98
|
+
income_history?: Array<HRISAPI.Income | null> | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* `true` if the individual an an active employee or contractor at the company.
|
|
102
|
+
*/
|
|
103
|
+
is_active?: boolean | null;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The legal last name of the individual.
|
|
107
|
+
*/
|
|
108
|
+
last_name?: string | null;
|
|
109
|
+
|
|
110
|
+
location?: HRISAPI.Location | null;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The manager object representing the manager of the individual within the org.
|
|
114
|
+
*/
|
|
115
|
+
manager?: Body.Manager | null;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The legal middle name of the individual.
|
|
119
|
+
*/
|
|
120
|
+
middle_name?: string | null;
|
|
121
|
+
|
|
122
|
+
phone_numbers?: Array<Body.PhoneNumber | null> | null;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The preferred name of the individual.
|
|
126
|
+
*/
|
|
127
|
+
preferred_name?: string | null;
|
|
128
|
+
|
|
129
|
+
residence?: HRISAPI.Location | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The source system's unique employment identifier for this individual
|
|
133
|
+
*/
|
|
134
|
+
source_id?: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Social Security Number of the individual. This field is only available with the
|
|
138
|
+
* `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
|
|
139
|
+
* body.
|
|
140
|
+
*/
|
|
141
|
+
ssn?: string | null;
|
|
142
|
+
|
|
143
|
+
start_date?: string | null;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The current title of the individual.
|
|
147
|
+
*/
|
|
148
|
+
title?: string | null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export namespace Body {
|
|
152
|
+
export interface CustomField {
|
|
153
|
+
name?: string | null;
|
|
154
|
+
|
|
155
|
+
value?: unknown;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The department object.
|
|
160
|
+
*/
|
|
161
|
+
export interface Department {
|
|
162
|
+
/**
|
|
163
|
+
* The name of the department associated with the individual.
|
|
164
|
+
*/
|
|
165
|
+
name?: string | null;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface Email {
|
|
169
|
+
data?: string;
|
|
170
|
+
|
|
171
|
+
type?: 'work' | 'personal';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The employment object.
|
|
176
|
+
*/
|
|
177
|
+
export interface Employment {
|
|
178
|
+
/**
|
|
179
|
+
* The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
|
|
180
|
+
*/
|
|
181
|
+
subtype?: 'full_time' | 'intern' | 'part_time' | 'temp' | 'seasonal' | 'individual_contractor' | null;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The main employment type of the individual.
|
|
185
|
+
*/
|
|
186
|
+
type?: 'employee' | 'contractor' | null;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The manager object representing the manager of the individual within the org.
|
|
191
|
+
*/
|
|
192
|
+
export interface Manager {
|
|
193
|
+
/**
|
|
194
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
195
|
+
*/
|
|
196
|
+
id?: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface PhoneNumber {
|
|
200
|
+
data?: string;
|
|
201
|
+
|
|
202
|
+
type?: 'work' | 'personal';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export namespace Directory {
|
|
208
|
+
export import DirectoryCreateResponse = DirectoryAPI.DirectoryCreateResponse;
|
|
209
|
+
export import DirectoryCreateParams = DirectoryAPI.DirectoryCreateParams;
|
|
210
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../core";
|
|
6
|
+
import * as EmploymentAPI from "./employment";
|
|
7
|
+
import * as HRISAPI from "../hris/hris";
|
|
8
|
+
|
|
9
|
+
export class Employment extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Update sandbox employment
|
|
12
|
+
*/
|
|
13
|
+
update(
|
|
14
|
+
individualId: string,
|
|
15
|
+
body?: EmploymentUpdateParams,
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.APIPromise<EmploymentUpdateResponse>;
|
|
18
|
+
update(individualId: string, options?: Core.RequestOptions): Core.APIPromise<EmploymentUpdateResponse>;
|
|
19
|
+
update(
|
|
20
|
+
individualId: string,
|
|
21
|
+
body: EmploymentUpdateParams | Core.RequestOptions = {},
|
|
22
|
+
options?: Core.RequestOptions,
|
|
23
|
+
): Core.APIPromise<EmploymentUpdateResponse> {
|
|
24
|
+
if (isRequestOptions(body)) {
|
|
25
|
+
return this.update(individualId, {}, body);
|
|
26
|
+
}
|
|
27
|
+
return this._client.put(`/sandbox/employment/${individualId}`, { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface EmploymentUpdateResponse {
|
|
32
|
+
/**
|
|
33
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Worker's compensation classification code for this employee
|
|
39
|
+
*/
|
|
40
|
+
class_code?: string | null;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Custom fields for the individual. These are fields which are defined by the
|
|
44
|
+
* employer in the system. Custom fields are not currently supported for assisted
|
|
45
|
+
* connections.
|
|
46
|
+
*/
|
|
47
|
+
custom_fields?: Array<EmploymentUpdateResponse.CustomField>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The department object.
|
|
51
|
+
*/
|
|
52
|
+
department?: EmploymentUpdateResponse.Department | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The employment object.
|
|
56
|
+
*/
|
|
57
|
+
employment?: EmploymentUpdateResponse.Employment | null;
|
|
58
|
+
|
|
59
|
+
end_date?: string | null;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The legal first name of the individual.
|
|
63
|
+
*/
|
|
64
|
+
first_name?: string | null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The employee's income as reported by the provider. This may not always be
|
|
68
|
+
* annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
|
|
69
|
+
* depending on what information the provider returns.
|
|
70
|
+
*/
|
|
71
|
+
income?: HRISAPI.Income | null;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The array of income history.
|
|
75
|
+
*/
|
|
76
|
+
income_history?: Array<HRISAPI.Income | null> | null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* `true` if the individual an an active employee or contractor at the company.
|
|
80
|
+
*/
|
|
81
|
+
is_active?: boolean | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The legal last name of the individual.
|
|
85
|
+
*/
|
|
86
|
+
last_name?: string | null;
|
|
87
|
+
|
|
88
|
+
location?: HRISAPI.Location | null;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The manager object representing the manager of the individual within the org.
|
|
92
|
+
*/
|
|
93
|
+
manager?: EmploymentUpdateResponse.Manager | null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The legal middle name of the individual.
|
|
97
|
+
*/
|
|
98
|
+
middle_name?: string | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The source system's unique employment identifier for this individual
|
|
102
|
+
*/
|
|
103
|
+
source_id?: string;
|
|
104
|
+
|
|
105
|
+
start_date?: string | null;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The current title of the individual.
|
|
109
|
+
*/
|
|
110
|
+
title?: string | null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace EmploymentUpdateResponse {
|
|
114
|
+
export interface CustomField {
|
|
115
|
+
name?: string | null;
|
|
116
|
+
|
|
117
|
+
value?: unknown;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The department object.
|
|
122
|
+
*/
|
|
123
|
+
export interface Department {
|
|
124
|
+
/**
|
|
125
|
+
* The name of the department associated with the individual.
|
|
126
|
+
*/
|
|
127
|
+
name?: string | null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The employment object.
|
|
132
|
+
*/
|
|
133
|
+
export interface Employment {
|
|
134
|
+
/**
|
|
135
|
+
* The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
|
|
136
|
+
*/
|
|
137
|
+
subtype?: 'full_time' | 'intern' | 'part_time' | 'temp' | 'seasonal' | 'individual_contractor' | null;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The main employment type of the individual.
|
|
141
|
+
*/
|
|
142
|
+
type?: 'employee' | 'contractor' | null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The manager object representing the manager of the individual within the org.
|
|
147
|
+
*/
|
|
148
|
+
export interface Manager {
|
|
149
|
+
/**
|
|
150
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
151
|
+
*/
|
|
152
|
+
id?: string;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface EmploymentUpdateParams {
|
|
157
|
+
/**
|
|
158
|
+
* Worker's compensation classification code for this employee
|
|
159
|
+
*/
|
|
160
|
+
class_code?: string | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Custom fields for the individual. These are fields which are defined by the
|
|
164
|
+
* employer in the system. Custom fields are not currently supported for assisted
|
|
165
|
+
* connections.
|
|
166
|
+
*/
|
|
167
|
+
custom_fields?: Array<EmploymentUpdateParams.CustomField>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The department object.
|
|
171
|
+
*/
|
|
172
|
+
department?: EmploymentUpdateParams.Department | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The employment object.
|
|
176
|
+
*/
|
|
177
|
+
employment?: EmploymentUpdateParams.Employment | null;
|
|
178
|
+
|
|
179
|
+
end_date?: string | null;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The legal first name of the individual.
|
|
183
|
+
*/
|
|
184
|
+
first_name?: string | null;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The employee's income as reported by the provider. This may not always be
|
|
188
|
+
* annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
|
|
189
|
+
* depending on what information the provider returns.
|
|
190
|
+
*/
|
|
191
|
+
income?: HRISAPI.Income | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The array of income history.
|
|
195
|
+
*/
|
|
196
|
+
income_history?: Array<HRISAPI.Income | null> | null;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* `true` if the individual an an active employee or contractor at the company.
|
|
200
|
+
*/
|
|
201
|
+
is_active?: boolean | null;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The legal last name of the individual.
|
|
205
|
+
*/
|
|
206
|
+
last_name?: string | null;
|
|
207
|
+
|
|
208
|
+
location?: HRISAPI.Location | null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The manager object representing the manager of the individual within the org.
|
|
212
|
+
*/
|
|
213
|
+
manager?: EmploymentUpdateParams.Manager | null;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The legal middle name of the individual.
|
|
217
|
+
*/
|
|
218
|
+
middle_name?: string | null;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The source system's unique employment identifier for this individual
|
|
222
|
+
*/
|
|
223
|
+
source_id?: string;
|
|
224
|
+
|
|
225
|
+
start_date?: string | null;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The current title of the individual.
|
|
229
|
+
*/
|
|
230
|
+
title?: string | null;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export namespace EmploymentUpdateParams {
|
|
234
|
+
export interface CustomField {
|
|
235
|
+
name?: string | null;
|
|
236
|
+
|
|
237
|
+
value?: unknown;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* The department object.
|
|
242
|
+
*/
|
|
243
|
+
export interface Department {
|
|
244
|
+
/**
|
|
245
|
+
* The name of the department associated with the individual.
|
|
246
|
+
*/
|
|
247
|
+
name?: string | null;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The employment object.
|
|
252
|
+
*/
|
|
253
|
+
export interface Employment {
|
|
254
|
+
/**
|
|
255
|
+
* The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
|
|
256
|
+
*/
|
|
257
|
+
subtype?: 'full_time' | 'intern' | 'part_time' | 'temp' | 'seasonal' | 'individual_contractor' | null;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The main employment type of the individual.
|
|
261
|
+
*/
|
|
262
|
+
type?: 'employee' | 'contractor' | null;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The manager object representing the manager of the individual within the org.
|
|
267
|
+
*/
|
|
268
|
+
export interface Manager {
|
|
269
|
+
/**
|
|
270
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
271
|
+
*/
|
|
272
|
+
id?: string;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export namespace Employment {
|
|
277
|
+
export import EmploymentUpdateResponse = EmploymentAPI.EmploymentUpdateResponse;
|
|
278
|
+
export import EmploymentUpdateParams = EmploymentAPI.EmploymentUpdateParams;
|
|
279
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
export { CompanyUpdateResponse, CompanyUpdateParams, Company } from './company';
|
|
4
|
+
export { ConnectionCreateResponse, ConnectionCreateParams, Connections } from './connections/index';
|
|
5
|
+
export { DirectoryCreateResponse, DirectoryCreateParams, Directory } from './directory';
|
|
6
|
+
export { EmploymentUpdateResponse, EmploymentUpdateParams, Employment } from './employment';
|
|
7
|
+
export { IndividualUpdateResponse, IndividualUpdateParams, Individual } from './individual';
|
|
8
|
+
export { Jobs } from './jobs/index';
|
|
9
|
+
export { PaymentCreateResponse, PaymentCreateParams, Payment } from './payment';
|
|
10
|
+
export { Sandbox } from './sandbox';
|