@tryfinch/finch-api 5.16.0 → 5.17.1
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 +46 -0
- package/README.md +3 -3
- package/core.d.ts +6 -1
- package/core.d.ts.map +1 -1
- package/core.js +27 -10
- package/core.js.map +1 -1
- package/core.mjs +25 -9
- package/core.mjs.map +1 -1
- package/index.d.mts +22 -12
- package/index.d.ts +22 -12
- package/index.d.ts.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/index.mjs +6 -6
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/providers.d.ts +12 -0
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.js.map +1 -1
- package/resources/providers.mjs.map +1 -1
- package/resources/sandbox/connections/accounts.d.ts +3 -3
- package/resources/sandbox/connections/accounts.d.ts.map +1 -1
- package/resources/sandbox/connections/connections.d.ts +3 -3
- package/resources/sandbox/connections/connections.d.ts.map +1 -1
- package/resources/webhooks.d.ts +377 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +2 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -0
- package/resources/webhooks.mjs.map +1 -1
- package/src/core.ts +32 -13
- package/src/index.ts +22 -12
- package/src/resources/index.ts +13 -1
- package/src/resources/providers.ts +16 -0
- package/src/resources/sandbox/connections/accounts.ts +3 -3
- package/src/resources/sandbox/connections/connections.ts +3 -3
- package/src/resources/webhooks.ts +568 -2
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/index.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
3
|
export * from './shared';
|
|
4
|
+
export {
|
|
5
|
+
AccountUpdateEvent,
|
|
6
|
+
BaseWebhookEvent,
|
|
7
|
+
CompanyEvent,
|
|
8
|
+
DirectoryEvent,
|
|
9
|
+
EmploymentEvent,
|
|
10
|
+
IndividualEvent,
|
|
11
|
+
JobCompletionEvent,
|
|
12
|
+
PayStatementEvent,
|
|
13
|
+
PaymentEvent,
|
|
14
|
+
WebhookEvent,
|
|
15
|
+
Webhooks,
|
|
16
|
+
} from './webhooks';
|
|
4
17
|
export { CreateAccessTokenResponse, AccessTokenCreateParams, AccessTokens } from './access-tokens';
|
|
5
18
|
export { DisconnectResponse, Introspection, Account } from './account';
|
|
6
19
|
export { Income, Location, Money, HRIS } from './hris/hris';
|
|
@@ -12,4 +25,3 @@ export {
|
|
|
12
25
|
RequestForwarding,
|
|
13
26
|
} from './request-forwarding';
|
|
14
27
|
export { Sandbox } from './sandbox/sandbox';
|
|
15
|
-
export { Webhooks } from './webhooks';
|
|
@@ -352,6 +352,11 @@ export namespace Provider {
|
|
|
352
352
|
|
|
353
353
|
employee_deductions?: PayStatements.EmployeeDeductions;
|
|
354
354
|
|
|
355
|
+
employer_contributions?: PayStatements.EmployerContributions;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* [DEPRECATED] Use `employer_contributions` instead
|
|
359
|
+
*/
|
|
355
360
|
employer_deductions?: PayStatements.EmployerDeductions;
|
|
356
361
|
|
|
357
362
|
gross_pay?: boolean;
|
|
@@ -392,6 +397,17 @@ export namespace Provider {
|
|
|
392
397
|
type?: boolean;
|
|
393
398
|
}
|
|
394
399
|
|
|
400
|
+
export interface EmployerContributions {
|
|
401
|
+
amount?: boolean;
|
|
402
|
+
|
|
403
|
+
currency?: boolean;
|
|
404
|
+
|
|
405
|
+
name?: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* [DEPRECATED] Use `employer_contributions` instead
|
|
410
|
+
*/
|
|
395
411
|
export interface EmployerDeductions {
|
|
396
412
|
amount?: boolean;
|
|
397
413
|
|
|
@@ -36,7 +36,7 @@ export interface AccountCreateResponse {
|
|
|
36
36
|
|
|
37
37
|
account_id: string;
|
|
38
38
|
|
|
39
|
-
authentication_type: '
|
|
39
|
+
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
40
40
|
|
|
41
41
|
company_id: string;
|
|
42
42
|
|
|
@@ -48,7 +48,7 @@ export interface AccountCreateResponse {
|
|
|
48
48
|
export interface AccountUpdateResponse {
|
|
49
49
|
account_id: string;
|
|
50
50
|
|
|
51
|
-
authentication_type: '
|
|
51
|
+
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
52
52
|
|
|
53
53
|
company_id: string;
|
|
54
54
|
|
|
@@ -62,7 +62,7 @@ export interface AccountCreateParams {
|
|
|
62
62
|
|
|
63
63
|
provider_id: string;
|
|
64
64
|
|
|
65
|
-
authentication_type?: '
|
|
65
|
+
authentication_type?: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Optional, defaults to Organization products (`company`, `directory`,
|
|
@@ -24,7 +24,7 @@ export interface ConnectionCreateResponse {
|
|
|
24
24
|
|
|
25
25
|
account_id: string;
|
|
26
26
|
|
|
27
|
-
authentication_type: '
|
|
27
|
+
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
28
28
|
|
|
29
29
|
company_id: string;
|
|
30
30
|
|
|
@@ -36,13 +36,13 @@ export interface ConnectionCreateResponse {
|
|
|
36
36
|
export interface ConnectionCreateParams {
|
|
37
37
|
provider_id: string;
|
|
38
38
|
|
|
39
|
-
authentication_type?: '
|
|
39
|
+
authentication_type?: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Optional: the size of the employer to be created with this connection. Defaults
|
|
43
43
|
* to 20
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
employee_size?: number;
|
|
46
46
|
|
|
47
47
|
products?: Array<string>;
|
|
48
48
|
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
import { APIResource } from "../resource";
|
|
4
4
|
import { createHmac } from 'crypto';
|
|
5
5
|
import { getRequiredHeader, HeadersLike } from "../core";
|
|
6
|
+
import * as WebhooksAPI from "./webhooks";
|
|
7
|
+
import * as Shared from "./shared";
|
|
8
|
+
import * as BenefitsAPI from "./hris/benefits/benefits";
|
|
6
9
|
|
|
7
10
|
export class Webhooks extends APIResource {
|
|
8
11
|
/**
|
|
@@ -12,9 +15,9 @@ export class Webhooks extends APIResource {
|
|
|
12
15
|
payload: string,
|
|
13
16
|
headers: HeadersLike,
|
|
14
17
|
secret: string | undefined | null = this._client.webhookSecret,
|
|
15
|
-
):
|
|
18
|
+
): WebhookEvent {
|
|
16
19
|
this.verifySignature(payload, headers, secret);
|
|
17
|
-
return JSON.parse(payload);
|
|
20
|
+
return JSON.parse(payload) as WebhookEvent;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
private parseSecret(secret: string | null | undefined): Uint8Array {
|
|
@@ -138,3 +141,566 @@ export class Webhooks extends APIResource {
|
|
|
138
141
|
throw new Error('None of the given webhook signatures match the expected signature');
|
|
139
142
|
}
|
|
140
143
|
}
|
|
144
|
+
|
|
145
|
+
export interface AccountUpdateEvent extends BaseWebhookEvent {
|
|
146
|
+
data?: AccountUpdateEvent.Data;
|
|
147
|
+
|
|
148
|
+
event_type?: 'account.updated';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export namespace AccountUpdateEvent {
|
|
152
|
+
export interface Data {
|
|
153
|
+
authentication_method: Data.AuthenticationMethod;
|
|
154
|
+
|
|
155
|
+
status: Shared.ConnectionStatusType;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export namespace Data {
|
|
159
|
+
export interface AuthenticationMethod {
|
|
160
|
+
/**
|
|
161
|
+
* Each benefit type and their supported features. If the benefit type is not
|
|
162
|
+
* supported, the property will be null
|
|
163
|
+
*/
|
|
164
|
+
benefits_support?: BenefitsAPI.BenefitsSupport | null;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The supported data fields returned by our HR and payroll endpoints
|
|
168
|
+
*/
|
|
169
|
+
supported_fields?: AuthenticationMethod.SupportedFields | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The type of authentication method.
|
|
173
|
+
*/
|
|
174
|
+
type?: 'assisted' | 'credential' | 'api_token' | 'api_credential' | 'oauth';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export namespace AuthenticationMethod {
|
|
178
|
+
/**
|
|
179
|
+
* The supported data fields returned by our HR and payroll endpoints
|
|
180
|
+
*/
|
|
181
|
+
export interface SupportedFields {
|
|
182
|
+
company?: SupportedFields.Company;
|
|
183
|
+
|
|
184
|
+
directory?: SupportedFields.Directory;
|
|
185
|
+
|
|
186
|
+
employment?: SupportedFields.Employment;
|
|
187
|
+
|
|
188
|
+
individual?: SupportedFields.Individual;
|
|
189
|
+
|
|
190
|
+
pay_statement?: SupportedFields.PayStatement;
|
|
191
|
+
|
|
192
|
+
payment?: SupportedFields.Payment;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export namespace SupportedFields {
|
|
196
|
+
export interface Company {
|
|
197
|
+
id?: boolean;
|
|
198
|
+
|
|
199
|
+
accounts?: Company.Accounts;
|
|
200
|
+
|
|
201
|
+
departments?: Company.Departments;
|
|
202
|
+
|
|
203
|
+
ein?: boolean;
|
|
204
|
+
|
|
205
|
+
entity?: Company.Entity;
|
|
206
|
+
|
|
207
|
+
legal_name?: boolean;
|
|
208
|
+
|
|
209
|
+
locations?: Company.Locations;
|
|
210
|
+
|
|
211
|
+
primary_email?: boolean;
|
|
212
|
+
|
|
213
|
+
primary_phone_number?: boolean;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export namespace Company {
|
|
217
|
+
export interface Accounts {
|
|
218
|
+
account_name?: boolean;
|
|
219
|
+
|
|
220
|
+
account_number?: boolean;
|
|
221
|
+
|
|
222
|
+
account_type?: boolean;
|
|
223
|
+
|
|
224
|
+
institution_name?: boolean;
|
|
225
|
+
|
|
226
|
+
routing_number?: boolean;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface Departments {
|
|
230
|
+
name?: boolean;
|
|
231
|
+
|
|
232
|
+
parent?: Departments.Parent;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export namespace Departments {
|
|
236
|
+
export interface Parent {
|
|
237
|
+
name?: boolean;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface Entity {
|
|
242
|
+
subtype?: boolean;
|
|
243
|
+
|
|
244
|
+
type?: boolean;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface Locations {
|
|
248
|
+
city?: boolean;
|
|
249
|
+
|
|
250
|
+
country?: boolean;
|
|
251
|
+
|
|
252
|
+
line1?: boolean;
|
|
253
|
+
|
|
254
|
+
line2?: boolean;
|
|
255
|
+
|
|
256
|
+
postal_code?: boolean;
|
|
257
|
+
|
|
258
|
+
state?: boolean;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface Directory {
|
|
263
|
+
individuals?: Directory.Individuals;
|
|
264
|
+
|
|
265
|
+
paging?: Directory.Paging;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export namespace Directory {
|
|
269
|
+
export interface Individuals {
|
|
270
|
+
id?: boolean;
|
|
271
|
+
|
|
272
|
+
department?: boolean;
|
|
273
|
+
|
|
274
|
+
first_name?: boolean;
|
|
275
|
+
|
|
276
|
+
is_active?: boolean;
|
|
277
|
+
|
|
278
|
+
last_name?: boolean;
|
|
279
|
+
|
|
280
|
+
manager?: Individuals.Manager;
|
|
281
|
+
|
|
282
|
+
middle_name?: boolean;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export namespace Individuals {
|
|
286
|
+
export interface Manager {
|
|
287
|
+
id?: boolean;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface Paging {
|
|
292
|
+
count?: boolean;
|
|
293
|
+
|
|
294
|
+
offset?: boolean;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface Employment {
|
|
299
|
+
id?: boolean;
|
|
300
|
+
|
|
301
|
+
class_code?: boolean;
|
|
302
|
+
|
|
303
|
+
custom_fields?: boolean;
|
|
304
|
+
|
|
305
|
+
department?: Employment.Department;
|
|
306
|
+
|
|
307
|
+
employment?: Employment.Employment;
|
|
308
|
+
|
|
309
|
+
end_date?: boolean;
|
|
310
|
+
|
|
311
|
+
first_name?: boolean;
|
|
312
|
+
|
|
313
|
+
income?: Employment.Income;
|
|
314
|
+
|
|
315
|
+
income_history?: boolean;
|
|
316
|
+
|
|
317
|
+
is_active?: boolean;
|
|
318
|
+
|
|
319
|
+
last_name?: boolean;
|
|
320
|
+
|
|
321
|
+
location?: Employment.Location;
|
|
322
|
+
|
|
323
|
+
manager?: Employment.Manager;
|
|
324
|
+
|
|
325
|
+
middle_name?: boolean;
|
|
326
|
+
|
|
327
|
+
start_date?: boolean;
|
|
328
|
+
|
|
329
|
+
title?: boolean;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export namespace Employment {
|
|
333
|
+
export interface Department {
|
|
334
|
+
name?: boolean;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface Employment {
|
|
338
|
+
subtype?: boolean;
|
|
339
|
+
|
|
340
|
+
type?: boolean;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export interface Income {
|
|
344
|
+
amount?: boolean;
|
|
345
|
+
|
|
346
|
+
currency?: boolean;
|
|
347
|
+
|
|
348
|
+
unit?: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface Location {
|
|
352
|
+
city?: boolean;
|
|
353
|
+
|
|
354
|
+
country?: boolean;
|
|
355
|
+
|
|
356
|
+
line1?: boolean;
|
|
357
|
+
|
|
358
|
+
line2?: boolean;
|
|
359
|
+
|
|
360
|
+
postal_code?: boolean;
|
|
361
|
+
|
|
362
|
+
state?: boolean;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export interface Manager {
|
|
366
|
+
id?: boolean;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface Individual {
|
|
371
|
+
id?: boolean;
|
|
372
|
+
|
|
373
|
+
dob?: boolean;
|
|
374
|
+
|
|
375
|
+
emails?: Individual.Emails;
|
|
376
|
+
|
|
377
|
+
encrypted_ssn?: boolean;
|
|
378
|
+
|
|
379
|
+
ethnicity?: boolean;
|
|
380
|
+
|
|
381
|
+
first_name?: boolean;
|
|
382
|
+
|
|
383
|
+
gender?: boolean;
|
|
384
|
+
|
|
385
|
+
last_name?: boolean;
|
|
386
|
+
|
|
387
|
+
middle_name?: boolean;
|
|
388
|
+
|
|
389
|
+
phone_numbers?: Individual.PhoneNumbers;
|
|
390
|
+
|
|
391
|
+
preferred_name?: boolean;
|
|
392
|
+
|
|
393
|
+
residence?: Individual.Residence;
|
|
394
|
+
|
|
395
|
+
ssn?: boolean;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export namespace Individual {
|
|
399
|
+
export interface Emails {
|
|
400
|
+
data?: boolean;
|
|
401
|
+
|
|
402
|
+
type?: boolean;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export interface PhoneNumbers {
|
|
406
|
+
data?: boolean;
|
|
407
|
+
|
|
408
|
+
type?: boolean;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface Residence {
|
|
412
|
+
city?: boolean;
|
|
413
|
+
|
|
414
|
+
country?: boolean;
|
|
415
|
+
|
|
416
|
+
line1?: boolean;
|
|
417
|
+
|
|
418
|
+
line2?: boolean;
|
|
419
|
+
|
|
420
|
+
postal_code?: boolean;
|
|
421
|
+
|
|
422
|
+
state?: boolean;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface PayStatement {
|
|
427
|
+
paging?: PayStatement.Paging;
|
|
428
|
+
|
|
429
|
+
pay_statements?: PayStatement.PayStatements;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export namespace PayStatement {
|
|
433
|
+
export interface Paging {
|
|
434
|
+
count: boolean;
|
|
435
|
+
|
|
436
|
+
offset: boolean;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export interface PayStatements {
|
|
440
|
+
earnings?: PayStatements.Earnings;
|
|
441
|
+
|
|
442
|
+
employee_deductions?: PayStatements.EmployeeDeductions;
|
|
443
|
+
|
|
444
|
+
employer_contributions?: PayStatements.EmployerContributions;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* [DEPRECATED] Use `employer_contributions` instead
|
|
448
|
+
*/
|
|
449
|
+
employer_deductions?: PayStatements.EmployerDeductions;
|
|
450
|
+
|
|
451
|
+
gross_pay?: boolean;
|
|
452
|
+
|
|
453
|
+
individual_id?: boolean;
|
|
454
|
+
|
|
455
|
+
net_pay?: boolean;
|
|
456
|
+
|
|
457
|
+
payment_method?: boolean;
|
|
458
|
+
|
|
459
|
+
taxes?: PayStatements.Taxes;
|
|
460
|
+
|
|
461
|
+
total_hours?: boolean;
|
|
462
|
+
|
|
463
|
+
type?: boolean;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export namespace PayStatements {
|
|
467
|
+
export interface Earnings {
|
|
468
|
+
amount?: boolean;
|
|
469
|
+
|
|
470
|
+
currency?: boolean;
|
|
471
|
+
|
|
472
|
+
name?: boolean;
|
|
473
|
+
|
|
474
|
+
type?: boolean;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface EmployeeDeductions {
|
|
478
|
+
amount?: boolean;
|
|
479
|
+
|
|
480
|
+
currency?: boolean;
|
|
481
|
+
|
|
482
|
+
name?: boolean;
|
|
483
|
+
|
|
484
|
+
pre_tax?: boolean;
|
|
485
|
+
|
|
486
|
+
type?: boolean;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface EmployerContributions {
|
|
490
|
+
amount?: boolean;
|
|
491
|
+
|
|
492
|
+
currency?: boolean;
|
|
493
|
+
|
|
494
|
+
name?: boolean;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* [DEPRECATED] Use `employer_contributions` instead
|
|
499
|
+
*/
|
|
500
|
+
export interface EmployerDeductions {
|
|
501
|
+
amount?: boolean;
|
|
502
|
+
|
|
503
|
+
currency?: boolean;
|
|
504
|
+
|
|
505
|
+
name?: boolean;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface Taxes {
|
|
509
|
+
amount?: boolean;
|
|
510
|
+
|
|
511
|
+
currency?: boolean;
|
|
512
|
+
|
|
513
|
+
employer?: boolean;
|
|
514
|
+
|
|
515
|
+
name?: boolean;
|
|
516
|
+
|
|
517
|
+
type?: boolean;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface Payment {
|
|
523
|
+
id?: boolean;
|
|
524
|
+
|
|
525
|
+
company_debit?: boolean;
|
|
526
|
+
|
|
527
|
+
debit_date?: boolean;
|
|
528
|
+
|
|
529
|
+
employee_taxes?: boolean;
|
|
530
|
+
|
|
531
|
+
employer_taxes?: boolean;
|
|
532
|
+
|
|
533
|
+
gross_pay?: boolean;
|
|
534
|
+
|
|
535
|
+
individual_ids?: boolean;
|
|
536
|
+
|
|
537
|
+
net_pay?: boolean;
|
|
538
|
+
|
|
539
|
+
pay_date?: boolean;
|
|
540
|
+
|
|
541
|
+
pay_period?: Payment.PayPeriod;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export namespace Payment {
|
|
545
|
+
export interface PayPeriod {
|
|
546
|
+
end_date?: boolean;
|
|
547
|
+
|
|
548
|
+
start_date?: boolean;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export interface BaseWebhookEvent {
|
|
557
|
+
/**
|
|
558
|
+
* Unique Finch id of the employer account that was used to make this connection.
|
|
559
|
+
*/
|
|
560
|
+
account_id: string;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Unique Finch id of the company for which data has been updated.
|
|
564
|
+
*/
|
|
565
|
+
company_id: string;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export interface CompanyEvent extends BaseWebhookEvent {
|
|
569
|
+
data?: Record<string, unknown> | null;
|
|
570
|
+
|
|
571
|
+
event_type?: 'company.updated';
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface DirectoryEvent extends BaseWebhookEvent {
|
|
575
|
+
data?: DirectoryEvent.Data;
|
|
576
|
+
|
|
577
|
+
event_type?: 'directory.created' | 'directory.updated' | 'directory.deleted';
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export namespace DirectoryEvent {
|
|
581
|
+
export interface Data {
|
|
582
|
+
/**
|
|
583
|
+
* The ID of the individual related to the event.
|
|
584
|
+
*/
|
|
585
|
+
individual_id?: string;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export interface EmploymentEvent extends BaseWebhookEvent {
|
|
590
|
+
data?: EmploymentEvent.Data;
|
|
591
|
+
|
|
592
|
+
event_type?: 'employment.created' | 'employment.updated' | 'employment.deleted';
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export namespace EmploymentEvent {
|
|
596
|
+
export interface Data {
|
|
597
|
+
/**
|
|
598
|
+
* The ID of the individual related to the event.
|
|
599
|
+
*/
|
|
600
|
+
individual_id?: string;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export interface IndividualEvent extends BaseWebhookEvent {
|
|
605
|
+
data?: IndividualEvent.Data;
|
|
606
|
+
|
|
607
|
+
event_type?: 'individual.created' | 'individual.updated' | 'individual.deleted';
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export namespace IndividualEvent {
|
|
611
|
+
export interface Data {
|
|
612
|
+
/**
|
|
613
|
+
* The ID of the individual related to the event.
|
|
614
|
+
*/
|
|
615
|
+
individual_id?: string;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export interface JobCompletionEvent extends BaseWebhookEvent {
|
|
620
|
+
data?: JobCompletionEvent.Data;
|
|
621
|
+
|
|
622
|
+
event_type?:
|
|
623
|
+
| 'job.benefit_create.updated'
|
|
624
|
+
| 'job.benefit_enroll.updated'
|
|
625
|
+
| 'job.benefit_register.updated'
|
|
626
|
+
| 'job.benefit_unenroll.updated'
|
|
627
|
+
| 'job.benefit_update.updated'
|
|
628
|
+
| 'job.data_sync_all.updated';
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
export namespace JobCompletionEvent {
|
|
632
|
+
export interface Data {
|
|
633
|
+
/**
|
|
634
|
+
* The id of the job which has completed.
|
|
635
|
+
*/
|
|
636
|
+
job_id: string;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* The url to query the result of the job.
|
|
640
|
+
*/
|
|
641
|
+
job_url: string;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export interface PayStatementEvent extends BaseWebhookEvent {
|
|
646
|
+
data?: PayStatementEvent.Data;
|
|
647
|
+
|
|
648
|
+
event_type?: 'pay_statement.created' | 'pay_statement.updated' | 'pay_statement.deleted';
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export namespace PayStatementEvent {
|
|
652
|
+
export interface Data {
|
|
653
|
+
/**
|
|
654
|
+
* The ID of the individual associated with the pay statement.
|
|
655
|
+
*/
|
|
656
|
+
individual_id?: string;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* The ID of the payment associated with the pay statement.
|
|
660
|
+
*/
|
|
661
|
+
payment_id?: string;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export interface PaymentEvent extends BaseWebhookEvent {
|
|
666
|
+
data?: PaymentEvent.Data;
|
|
667
|
+
|
|
668
|
+
event_type?: 'payment.created' | 'payment.updated' | 'payment.deleted';
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export namespace PaymentEvent {
|
|
672
|
+
export interface Data {
|
|
673
|
+
/**
|
|
674
|
+
* The date of the payment.
|
|
675
|
+
*/
|
|
676
|
+
pay_date: string;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The ID of the payment.
|
|
680
|
+
*/
|
|
681
|
+
payment_id: string;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export type WebhookEvent =
|
|
686
|
+
| AccountUpdateEvent
|
|
687
|
+
| JobCompletionEvent
|
|
688
|
+
| CompanyEvent
|
|
689
|
+
| DirectoryEvent
|
|
690
|
+
| EmploymentEvent
|
|
691
|
+
| IndividualEvent
|
|
692
|
+
| PaymentEvent
|
|
693
|
+
| PayStatementEvent;
|
|
694
|
+
|
|
695
|
+
export namespace Webhooks {
|
|
696
|
+
export import AccountUpdateEvent = WebhooksAPI.AccountUpdateEvent;
|
|
697
|
+
export import BaseWebhookEvent = WebhooksAPI.BaseWebhookEvent;
|
|
698
|
+
export import CompanyEvent = WebhooksAPI.CompanyEvent;
|
|
699
|
+
export import DirectoryEvent = WebhooksAPI.DirectoryEvent;
|
|
700
|
+
export import EmploymentEvent = WebhooksAPI.EmploymentEvent;
|
|
701
|
+
export import IndividualEvent = WebhooksAPI.IndividualEvent;
|
|
702
|
+
export import JobCompletionEvent = WebhooksAPI.JobCompletionEvent;
|
|
703
|
+
export import PayStatementEvent = WebhooksAPI.PayStatementEvent;
|
|
704
|
+
export import PaymentEvent = WebhooksAPI.PaymentEvent;
|
|
705
|
+
export import WebhookEvent = WebhooksAPI.WebhookEvent;
|
|
706
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '5.
|
|
1
|
+
export const VERSION = '5.17.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "5.
|
|
1
|
+
export declare const VERSION = "5.17.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '5.
|
|
1
|
+
export const VERSION = '5.17.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|