@tryfinch/finch-api 5.14.3 → 5.16.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +1 -1
  3. package/_shims/index.d.ts +1 -1
  4. package/_shims/registry.d.ts +1 -1
  5. package/_shims/registry.d.ts.map +1 -1
  6. package/core.d.ts +14 -12
  7. package/core.d.ts.map +1 -1
  8. package/core.js +43 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +43 -15
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +27 -1
  13. package/index.d.ts +27 -1
  14. package/index.d.ts.map +1 -1
  15. package/index.js +50 -5
  16. package/index.js.map +1 -1
  17. package/index.mjs +50 -5
  18. package/index.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/access-tokens.d.ts +23 -0
  21. package/resources/access-tokens.d.ts.map +1 -0
  22. package/resources/access-tokens.js +17 -0
  23. package/resources/access-tokens.js.map +1 -0
  24. package/resources/access-tokens.mjs +13 -0
  25. package/resources/access-tokens.mjs.map +1 -0
  26. package/resources/account.d.ts +14 -0
  27. package/resources/account.d.ts.map +1 -1
  28. package/resources/account.js.map +1 -1
  29. package/resources/account.mjs.map +1 -1
  30. package/resources/index.d.ts +2 -0
  31. package/resources/index.d.ts.map +1 -1
  32. package/resources/index.js +5 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs +2 -0
  35. package/resources/index.mjs.map +1 -1
  36. package/resources/sandbox/company.d.ts +195 -0
  37. package/resources/sandbox/company.d.ts.map +1 -0
  38. package/resources/sandbox/company.js +17 -0
  39. package/resources/sandbox/company.js.map +1 -0
  40. package/resources/sandbox/company.mjs +13 -0
  41. package/resources/sandbox/company.mjs.map +1 -0
  42. package/resources/sandbox/connections/accounts.d.ts +51 -0
  43. package/resources/sandbox/connections/accounts.d.ts.map +1 -0
  44. package/resources/sandbox/connections/accounts.js +24 -0
  45. package/resources/sandbox/connections/accounts.js.map +1 -0
  46. package/resources/sandbox/connections/accounts.mjs +20 -0
  47. package/resources/sandbox/connections/accounts.mjs.map +1 -0
  48. package/resources/sandbox/connections/connections.d.ts +39 -0
  49. package/resources/sandbox/connections/connections.d.ts.map +1 -0
  50. package/resources/sandbox/connections/connections.js +46 -0
  51. package/resources/sandbox/connections/connections.js.map +1 -0
  52. package/resources/sandbox/connections/connections.mjs +19 -0
  53. package/resources/sandbox/connections/connections.mjs.map +1 -0
  54. package/resources/sandbox/connections/index.d.ts +3 -0
  55. package/resources/sandbox/connections/index.d.ts.map +1 -0
  56. package/resources/sandbox/connections/index.js +9 -0
  57. package/resources/sandbox/connections/index.js.map +1 -0
  58. package/resources/sandbox/connections/index.mjs +4 -0
  59. package/resources/sandbox/connections/index.mjs.map +1 -0
  60. package/resources/sandbox/directory.d.ts +156 -0
  61. package/resources/sandbox/directory.d.ts.map +1 -0
  62. package/resources/sandbox/directory.js +17 -0
  63. package/resources/sandbox/directory.js.map +1 -0
  64. package/resources/sandbox/directory.mjs +13 -0
  65. package/resources/sandbox/directory.mjs.map +1 -0
  66. package/resources/sandbox/employment.d.ts +216 -0
  67. package/resources/sandbox/employment.d.ts.map +1 -0
  68. package/resources/sandbox/employment.js +18 -0
  69. package/resources/sandbox/employment.js.map +1 -0
  70. package/resources/sandbox/employment.mjs +14 -0
  71. package/resources/sandbox/employment.mjs.map +1 -0
  72. package/resources/sandbox/index.d.ts +9 -0
  73. package/resources/sandbox/index.d.ts.map +1 -0
  74. package/resources/sandbox/index.js +21 -0
  75. package/resources/sandbox/index.js.map +1 -0
  76. package/resources/sandbox/index.mjs +10 -0
  77. package/resources/sandbox/index.mjs.map +1 -0
  78. package/resources/sandbox/individual.d.ts +124 -0
  79. package/resources/sandbox/individual.d.ts.map +1 -0
  80. package/resources/sandbox/individual.js +18 -0
  81. package/resources/sandbox/individual.js.map +1 -0
  82. package/resources/sandbox/individual.mjs +14 -0
  83. package/resources/sandbox/individual.mjs.map +1 -0
  84. package/resources/sandbox/jobs/configuration.d.ts +28 -0
  85. package/resources/sandbox/jobs/configuration.d.ts.map +1 -0
  86. package/resources/sandbox/jobs/configuration.js +23 -0
  87. package/resources/sandbox/jobs/configuration.js.map +1 -0
  88. package/resources/sandbox/jobs/configuration.mjs +19 -0
  89. package/resources/sandbox/jobs/configuration.mjs.map +1 -0
  90. package/resources/sandbox/jobs/index.d.ts +3 -0
  91. package/resources/sandbox/jobs/index.d.ts.map +1 -0
  92. package/resources/sandbox/jobs/index.js +9 -0
  93. package/resources/sandbox/jobs/index.js.map +1 -0
  94. package/resources/sandbox/jobs/index.mjs +4 -0
  95. package/resources/sandbox/jobs/index.mjs.map +1 -0
  96. package/resources/sandbox/jobs/jobs.d.ts +12 -0
  97. package/resources/sandbox/jobs/jobs.d.ts.map +1 -0
  98. package/resources/sandbox/jobs/jobs.js +40 -0
  99. package/resources/sandbox/jobs/jobs.js.map +1 -0
  100. package/resources/sandbox/jobs/jobs.mjs +13 -0
  101. package/resources/sandbox/jobs/jobs.mjs.map +1 -0
  102. package/resources/sandbox/payment.d.ts +154 -0
  103. package/resources/sandbox/payment.d.ts.map +1 -0
  104. package/resources/sandbox/payment.js +18 -0
  105. package/resources/sandbox/payment.js.map +1 -0
  106. package/resources/sandbox/payment.mjs +14 -0
  107. package/resources/sandbox/payment.mjs.map +1 -0
  108. package/resources/sandbox/sandbox.d.ts +39 -0
  109. package/resources/sandbox/sandbox.d.ts.map +1 -0
  110. package/resources/sandbox/sandbox.js +58 -0
  111. package/resources/sandbox/sandbox.js.map +1 -0
  112. package/resources/sandbox/sandbox.mjs +31 -0
  113. package/resources/sandbox/sandbox.mjs.map +1 -0
  114. package/resources/shared.d.ts +1 -0
  115. package/resources/shared.d.ts.map +1 -1
  116. package/src/_shims/index.d.ts +1 -1
  117. package/src/_shims/node-runtime.ts +1 -1
  118. package/src/_shims/registry.ts +1 -1
  119. package/src/_shims/web-runtime.ts +1 -1
  120. package/src/core.ts +69 -32
  121. package/src/index.ts +76 -4
  122. package/src/lib/.keep +4 -0
  123. package/src/resources/access-tokens.ts +36 -0
  124. package/src/resources/account.ts +19 -0
  125. package/src/resources/index.ts +2 -0
  126. package/src/resources/sandbox/company.ts +252 -0
  127. package/src/resources/sandbox/connections/accounts.ts +83 -0
  128. package/src/resources/sandbox/connections/connections.ts +58 -0
  129. package/src/resources/sandbox/connections/index.ts +10 -0
  130. package/src/resources/sandbox/directory.ts +210 -0
  131. package/src/resources/sandbox/employment.ts +279 -0
  132. package/src/resources/sandbox/index.ts +10 -0
  133. package/src/resources/sandbox/individual.ts +193 -0
  134. package/src/resources/sandbox/jobs/configuration.ts +44 -0
  135. package/src/resources/sandbox/jobs/index.ts +9 -0
  136. package/src/resources/sandbox/jobs/jobs.ts +15 -0
  137. package/src/resources/sandbox/payment.ts +215 -0
  138. package/src/resources/sandbox/sandbox.ts +42 -0
  139. package/src/resources/shared.ts +8 -0
  140. package/src/uploads.ts +2 -2
  141. package/src/version.ts +1 -1
  142. package/uploads.d.ts +2 -2
  143. package/uploads.d.ts.map +1 -1
  144. package/version.d.ts +1 -1
  145. package/version.js +1 -1
  146. package/version.mjs +1 -1
@@ -0,0 +1,252 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+
3
+ import * as Core from "../../core";
4
+ import { APIResource } from "../../resource";
5
+ import * as CompanyAPI from "./company";
6
+ import * as HRISAPI from "../hris/hris";
7
+
8
+ export class Company extends APIResource {
9
+ /**
10
+ * Update a sandbox company's data
11
+ */
12
+ update(body: CompanyUpdateParams, options?: Core.RequestOptions): Core.APIPromise<CompanyUpdateResponse> {
13
+ return this._client.put('/sandbox/company', { body, ...options });
14
+ }
15
+ }
16
+
17
+ export interface CompanyUpdateResponse {
18
+ /**
19
+ * An array of bank account objects associated with the payroll/HRIS system.
20
+ */
21
+ accounts: Array<CompanyUpdateResponse.Account> | null;
22
+
23
+ /**
24
+ * The array of company departments.
25
+ */
26
+ departments: Array<CompanyUpdateResponse.Department | null> | null;
27
+
28
+ /**
29
+ * The employer identification number.
30
+ */
31
+ ein: string | null;
32
+
33
+ /**
34
+ * The entity type object.
35
+ */
36
+ entity: CompanyUpdateResponse.Entity | null;
37
+
38
+ /**
39
+ * The legal name of the company.
40
+ */
41
+ legal_name: string | null;
42
+
43
+ locations: Array<HRISAPI.Location | null> | null;
44
+
45
+ /**
46
+ * The email of the main administrator on the account.
47
+ */
48
+ primary_email: string | null;
49
+
50
+ /**
51
+ * The phone number of the main administrator on the account. Format: `XXXXXXXXXX`
52
+ */
53
+ primary_phone_number: string | null;
54
+ }
55
+
56
+ export namespace CompanyUpdateResponse {
57
+ export interface Account {
58
+ /**
59
+ * The name of the bank associated in the payroll/HRIS system.
60
+ */
61
+ account_name?: string | null;
62
+
63
+ /**
64
+ * 10-12 digit number to specify the bank account
65
+ */
66
+ account_number?: string | null;
67
+
68
+ /**
69
+ * The type of bank account.
70
+ */
71
+ account_type?: 'checking' | 'savings' | null;
72
+
73
+ /**
74
+ * Name of the banking institution.
75
+ */
76
+ institution_name?: string | null;
77
+
78
+ /**
79
+ * A nine-digit code that's based on the U.S. Bank location where your account was
80
+ * opened.
81
+ */
82
+ routing_number?: string | null;
83
+ }
84
+
85
+ export interface Department {
86
+ /**
87
+ * The department name.
88
+ */
89
+ name?: string | null;
90
+
91
+ /**
92
+ * The parent department, if present.
93
+ */
94
+ parent?: Department.Parent | null;
95
+ }
96
+
97
+ export namespace Department {
98
+ /**
99
+ * The parent department, if present.
100
+ */
101
+ export interface Parent {
102
+ /**
103
+ * The parent department's name.
104
+ */
105
+ name?: string | null;
106
+ }
107
+ }
108
+
109
+ /**
110
+ * The entity type object.
111
+ */
112
+ export interface Entity {
113
+ /**
114
+ * The tax payer subtype of the company.
115
+ */
116
+ subtype?: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
117
+
118
+ /**
119
+ * The tax payer type of the company.
120
+ */
121
+ type?:
122
+ | 'llc'
123
+ | 'lp'
124
+ | 'corporation'
125
+ | 'sole_proprietor'
126
+ | 'non_profit'
127
+ | 'partnership'
128
+ | 'cooperative'
129
+ | null;
130
+ }
131
+ }
132
+
133
+ export interface CompanyUpdateParams {
134
+ /**
135
+ * An array of bank account objects associated with the payroll/HRIS system.
136
+ */
137
+ accounts: Array<CompanyUpdateParams.Account> | null;
138
+
139
+ /**
140
+ * The array of company departments.
141
+ */
142
+ departments: Array<CompanyUpdateParams.Department | null> | null;
143
+
144
+ /**
145
+ * The employer identification number.
146
+ */
147
+ ein: string | null;
148
+
149
+ /**
150
+ * The entity type object.
151
+ */
152
+ entity: CompanyUpdateParams.Entity | null;
153
+
154
+ /**
155
+ * The legal name of the company.
156
+ */
157
+ legal_name: string | null;
158
+
159
+ locations: Array<HRISAPI.Location | null> | null;
160
+
161
+ /**
162
+ * The email of the main administrator on the account.
163
+ */
164
+ primary_email: string | null;
165
+
166
+ /**
167
+ * The phone number of the main administrator on the account. Format: `XXXXXXXXXX`
168
+ */
169
+ primary_phone_number: string | null;
170
+ }
171
+
172
+ export namespace CompanyUpdateParams {
173
+ export interface Account {
174
+ /**
175
+ * The name of the bank associated in the payroll/HRIS system.
176
+ */
177
+ account_name?: string | null;
178
+
179
+ /**
180
+ * 10-12 digit number to specify the bank account
181
+ */
182
+ account_number?: string | null;
183
+
184
+ /**
185
+ * The type of bank account.
186
+ */
187
+ account_type?: 'checking' | 'savings' | null;
188
+
189
+ /**
190
+ * Name of the banking institution.
191
+ */
192
+ institution_name?: string | null;
193
+
194
+ /**
195
+ * A nine-digit code that's based on the U.S. Bank location where your account was
196
+ * opened.
197
+ */
198
+ routing_number?: string | null;
199
+ }
200
+
201
+ export interface Department {
202
+ /**
203
+ * The department name.
204
+ */
205
+ name?: string | null;
206
+
207
+ /**
208
+ * The parent department, if present.
209
+ */
210
+ parent?: Department.Parent | null;
211
+ }
212
+
213
+ export namespace Department {
214
+ /**
215
+ * The parent department, if present.
216
+ */
217
+ export interface Parent {
218
+ /**
219
+ * The parent department's name.
220
+ */
221
+ name?: string | null;
222
+ }
223
+ }
224
+
225
+ /**
226
+ * The entity type object.
227
+ */
228
+ export interface Entity {
229
+ /**
230
+ * The tax payer subtype of the company.
231
+ */
232
+ subtype?: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
233
+
234
+ /**
235
+ * The tax payer type of the company.
236
+ */
237
+ type?:
238
+ | 'llc'
239
+ | 'lp'
240
+ | 'corporation'
241
+ | 'sole_proprietor'
242
+ | 'non_profit'
243
+ | 'partnership'
244
+ | 'cooperative'
245
+ | null;
246
+ }
247
+ }
248
+
249
+ export namespace Company {
250
+ export import CompanyUpdateResponse = CompanyAPI.CompanyUpdateResponse;
251
+ export import CompanyUpdateParams = CompanyAPI.CompanyUpdateParams;
252
+ }
@@ -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.ConnectionStatusType;
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
+ }