@tryfinch/finch-api 1.0.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/.eslintrc.js +10 -0
- package/.github/workflows/publish-npm.yml +28 -0
- package/.github/workflows/release-doctor.yml +20 -0
- package/.github/workflows/release.yml +38 -0
- package/.prettierrc +6 -0
- package/.release-please-manifest.json +3 -0
- package/.stats.yml +1 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE +201 -0
- package/README.md +220 -0
- package/api.md +186 -0
- package/bin/check-release-environment +25 -0
- package/bin/check-test-server +50 -0
- package/bin/publish-npm +6 -0
- package/build +12 -0
- package/check-version.ts +18 -0
- package/core.ts +926 -0
- package/dist/cjs/check-version.d.ts +2 -0
- package/dist/cjs/check-version.d.ts.map +1 -0
- package/dist/cjs/check-version.js +23 -0
- package/dist/cjs/check-version.js.map +1 -0
- package/dist/cjs/core.d.ts +268 -0
- package/dist/cjs/core.d.ts.map +1 -0
- package/dist/cjs/core.js +994 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/fetch-polyfill.d.ts +6 -0
- package/dist/cjs/fetch-polyfill.d.ts.map +1 -0
- package/dist/cjs/fetch-polyfill.js +57 -0
- package/dist/cjs/fetch-polyfill.js.map +1 -0
- package/dist/cjs/index.d.ts +115 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +198 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/pagination.d.ts +166 -0
- package/dist/cjs/pagination.d.ts.map +1 -0
- package/dist/cjs/pagination.js +215 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/resource.d.ts +12 -0
- package/dist/cjs/resource.d.ts.map +1 -0
- package/dist/cjs/resource.js +17 -0
- package/dist/cjs/resource.js.map +1 -0
- package/dist/cjs/resources/account.d.ts +49 -0
- package/dist/cjs/resources/account.d.ts.map +1 -0
- package/dist/cjs/resources/account.js +23 -0
- package/dist/cjs/resources/account.js.map +1 -0
- package/dist/cjs/resources/ats/applications.d.ts +31 -0
- package/dist/cjs/resources/ats/applications.d.ts.map +1 -0
- package/dist/cjs/resources/ats/applications.js +27 -0
- package/dist/cjs/resources/ats/applications.js.map +1 -0
- package/dist/cjs/resources/ats/ats.d.ts +14 -0
- package/dist/cjs/resources/ats/ats.d.ts.map +1 -0
- package/dist/cjs/resources/ats/ats.js +22 -0
- package/dist/cjs/resources/ats/ats.js.map +1 -0
- package/dist/cjs/resources/ats/candidates.d.ts +45 -0
- package/dist/cjs/resources/ats/candidates.d.ts.map +1 -0
- package/dist/cjs/resources/ats/candidates.js +24 -0
- package/dist/cjs/resources/ats/candidates.js.map +1 -0
- package/dist/cjs/resources/ats/index.d.ts +6 -0
- package/dist/cjs/resources/ats/index.d.ts.map +1 -0
- package/dist/cjs/resources/ats/index.js +12 -0
- package/dist/cjs/resources/ats/index.js.map +1 -0
- package/dist/cjs/resources/ats/jobs.d.ts +42 -0
- package/dist/cjs/resources/ats/jobs.d.ts.map +1 -0
- package/dist/cjs/resources/ats/jobs.js +23 -0
- package/dist/cjs/resources/ats/jobs.js.map +1 -0
- package/dist/cjs/resources/ats/offers.d.ts +34 -0
- package/dist/cjs/resources/ats/offers.d.ts.map +1 -0
- package/dist/cjs/resources/ats/offers.js +23 -0
- package/dist/cjs/resources/ats/offers.js.map +1 -0
- package/dist/cjs/resources/ats/stages.d.ts +23 -0
- package/dist/cjs/resources/ats/stages.d.ts.map +1 -0
- package/dist/cjs/resources/ats/stages.js +21 -0
- package/dist/cjs/resources/ats/stages.js.map +1 -0
- package/dist/cjs/resources/hris/benefits/benefits.d.ts +155 -0
- package/dist/cjs/resources/hris/benefits/benefits.d.ts.map +1 -0
- package/dist/cjs/resources/hris/benefits/benefits.js +57 -0
- package/dist/cjs/resources/hris/benefits/benefits.js.map +1 -0
- package/dist/cjs/resources/hris/benefits/index.d.ts +26 -0
- package/dist/cjs/resources/hris/benefits/index.d.ts.map +1 -0
- package/dist/cjs/resources/hris/benefits/index.js +42 -0
- package/dist/cjs/resources/hris/benefits/index.js.map +1 -0
- package/dist/cjs/resources/hris/benefits/individuals.d.ts +163 -0
- package/dist/cjs/resources/hris/benefits/individuals.d.ts.map +1 -0
- package/dist/cjs/resources/hris/benefits/individuals.js +68 -0
- package/dist/cjs/resources/hris/benefits/individuals.js.map +1 -0
- package/dist/cjs/resources/hris/company.d.ts +104 -0
- package/dist/cjs/resources/hris/company.d.ts.map +1 -0
- package/dist/cjs/resources/hris/company.js +15 -0
- package/dist/cjs/resources/hris/company.js.map +1 -0
- package/dist/cjs/resources/hris/directory.d.ts +65 -0
- package/dist/cjs/resources/hris/directory.d.ts.map +1 -0
- package/dist/cjs/resources/hris/directory.js +21 -0
- package/dist/cjs/resources/hris/directory.js.map +1 -0
- package/dist/cjs/resources/hris/hris.d.ts +95 -0
- package/dist/cjs/resources/hris/hris.d.ts.map +1 -0
- package/dist/cjs/resources/hris/hris.js +24 -0
- package/dist/cjs/resources/hris/hris.js.map +1 -0
- package/dist/cjs/resources/hris/index.d.ts +31 -0
- package/dist/cjs/resources/hris/index.d.ts.map +1 -0
- package/dist/cjs/resources/hris/index.js +44 -0
- package/dist/cjs/resources/hris/index.js.map +1 -0
- package/dist/cjs/resources/hris/individuals/employment-data.d.ts +151 -0
- package/dist/cjs/resources/hris/individuals/employment-data.d.ts.map +1 -0
- package/dist/cjs/resources/hris/individuals/employment-data.js +26 -0
- package/dist/cjs/resources/hris/individuals/employment-data.js.map +1 -0
- package/dist/cjs/resources/hris/individuals/index.d.ts +13 -0
- package/dist/cjs/resources/hris/individuals/index.d.ts.map +1 -0
- package/dist/cjs/resources/hris/individuals/index.js +28 -0
- package/dist/cjs/resources/hris/individuals/index.js.map +1 -0
- package/dist/cjs/resources/hris/individuals/individuals.d.ts +86 -0
- package/dist/cjs/resources/hris/individuals/individuals.d.ts.map +1 -0
- package/dist/cjs/resources/hris/individuals/individuals.js +28 -0
- package/dist/cjs/resources/hris/individuals/individuals.js.map +1 -0
- package/dist/cjs/resources/hris/pay-statements.d.ts +201 -0
- package/dist/cjs/resources/hris/pay-statements.d.ts.map +1 -0
- package/dist/cjs/resources/hris/pay-statements.js +25 -0
- package/dist/cjs/resources/hris/pay-statements.js.map +1 -0
- package/dist/cjs/resources/hris/payments.d.ts +54 -0
- package/dist/cjs/resources/hris/payments.d.ts.map +1 -0
- package/dist/cjs/resources/hris/payments.js +18 -0
- package/dist/cjs/resources/hris/payments.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +5 -0
- package/dist/cjs/resources/index.d.ts.map +1 -0
- package/dist/cjs/resources/index.js +39 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/providers.d.ts +46 -0
- package/dist/cjs/resources/providers.d.ts.map +1 -0
- package/dist/cjs/resources/providers.js +18 -0
- package/dist/cjs/resources/providers.js.map +1 -0
- package/dist/cjs/resources/top-level.d.ts +2 -0
- package/dist/cjs/resources/top-level.d.ts.map +1 -0
- package/dist/cjs/resources/top-level.js +4 -0
- package/dist/cjs/resources/top-level.js.map +1 -0
- package/dist/cjs/tests/api-resources/account.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/account.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/account.test.js +66 -0
- package/dist/cjs/tests/api-resources/account.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ats/applications.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/ats/applications.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/ats/applications.test.js +73 -0
- package/dist/cjs/tests/api-resources/ats/applications.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ats/candidates.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/ats/candidates.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/ats/candidates.test.js +73 -0
- package/dist/cjs/tests/api-resources/ats/candidates.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ats/jobs.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/ats/jobs.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/ats/jobs.test.js +73 -0
- package/dist/cjs/tests/api-resources/ats/jobs.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ats/offers.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/ats/offers.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/ats/offers.test.js +73 -0
- package/dist/cjs/tests/api-resources/ats/offers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ats/stages.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/ats/stages.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/ats/stages.test.js +55 -0
- package/dist/cjs/tests/api-resources/ats/stages.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/benefits/benefits.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/benefits/benefits.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/benefits/benefits.test.js +116 -0
- package/dist/cjs/tests/api-resources/hris/benefits/benefits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/benefits/individuals.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/benefits/individuals.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/benefits/individuals.test.js +103 -0
- package/dist/cjs/tests/api-resources/hris/benefits/individuals.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/company.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/company.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/company.test.js +55 -0
- package/dist/cjs/tests/api-resources/hris/company.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/directory.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/directory.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/directory.test.js +62 -0
- package/dist/cjs/tests/api-resources/hris/directory.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/individuals/employment-data.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/individuals/employment-data.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/individuals/employment-data.test.js +56 -0
- package/dist/cjs/tests/api-resources/hris/individuals/employment-data.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/individuals/individuals.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/individuals/individuals.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/individuals/individuals.test.js +68 -0
- package/dist/cjs/tests/api-resources/hris/individuals/individuals.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/pay-statements.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/pay-statements.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/pay-statements.test.js +64 -0
- package/dist/cjs/tests/api-resources/hris/pay-statements.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/hris/payments.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/hris/payments.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/hris/payments.test.js +52 -0
- package/dist/cjs/tests/api-resources/hris/payments.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/providers.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/providers.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/providers.test.js +55 -0
- package/dist/cjs/tests/api-resources/providers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.d.ts +2 -0
- package/dist/cjs/tests/api-resources/top-level.test.d.ts.map +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.js +52 -0
- package/dist/cjs/tests/api-resources/top-level.test.js.map +1 -0
- package/dist/cjs/tests/form.test.d.ts +2 -0
- package/dist/cjs/tests/form.test.d.ts.map +1 -0
- package/dist/cjs/tests/form.test.js +61 -0
- package/dist/cjs/tests/form.test.js.map +1 -0
- package/dist/cjs/tests/index.test.d.ts +2 -0
- package/dist/cjs/tests/index.test.d.ts.map +1 -0
- package/dist/cjs/tests/index.test.js +34 -0
- package/dist/cjs/tests/index.test.js.map +1 -0
- package/dist/cjs/tests/responses.test.d.ts +2 -0
- package/dist/cjs/tests/responses.test.d.ts.map +1 -0
- package/dist/cjs/tests/responses.test.js +60 -0
- package/dist/cjs/tests/responses.test.js.map +1 -0
- package/dist/cjs/version.d.ts +2 -0
- package/dist/cjs/version.d.ts.map +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/version.js.map +1 -0
- package/fetch-polyfill.ts +69 -0
- package/index.ts +212 -0
- package/jest.config.js +8 -0
- package/package.json +47 -0
- package/pagination.ts +401 -0
- package/release-please-config.json +12 -0
- package/resource.ts +24 -0
- package/resources/account.ts +63 -0
- package/resources/ats/applications.ts +55 -0
- package/resources/ats/ats.ts +16 -0
- package/resources/ats/candidates.ts +74 -0
- package/resources/ats/index.ts +7 -0
- package/resources/ats/jobs.ts +70 -0
- package/resources/ats/offers.ts +57 -0
- package/resources/ats/stages.ts +31 -0
- package/resources/hris/benefits/benefits.ts +214 -0
- package/resources/hris/benefits/index.ts +27 -0
- package/resources/hris/benefits/individuals.ts +234 -0
- package/resources/hris/company.ts +127 -0
- package/resources/hris/directory.ts +87 -0
- package/resources/hris/hris.ts +113 -0
- package/resources/hris/index.ts +32 -0
- package/resources/hris/individuals/employment-data.ts +188 -0
- package/resources/hris/individuals/index.ts +14 -0
- package/resources/hris/individuals/individuals.ts +128 -0
- package/resources/hris/pay-statements.ts +251 -0
- package/resources/hris/payments.ts +73 -0
- package/resources/index.ts +6 -0
- package/resources/providers.ts +59 -0
- package/resources/top-level.ts +3 -0
- package/tests/api-resources/account.test.ts +29 -0
- package/tests/api-resources/ats/applications.test.ts +36 -0
- package/tests/api-resources/ats/candidates.test.ts +36 -0
- package/tests/api-resources/ats/jobs.test.ts +36 -0
- package/tests/api-resources/ats/offers.test.ts +36 -0
- package/tests/api-resources/ats/stages.test.ts +18 -0
- package/tests/api-resources/hris/benefits/benefits.test.ts +79 -0
- package/tests/api-resources/hris/benefits/individuals.test.ts +66 -0
- package/tests/api-resources/hris/company.test.ts +18 -0
- package/tests/api-resources/hris/directory.test.ts +25 -0
- package/tests/api-resources/hris/individuals/employment-data.test.ts +19 -0
- package/tests/api-resources/hris/individuals/individuals.test.ts +31 -0
- package/tests/api-resources/hris/pay-statements.test.ts +27 -0
- package/tests/api-resources/hris/payments.test.ts +15 -0
- package/tests/api-resources/providers.test.ts +18 -0
- package/tests/api-resources/top-level.test.ts +15 -0
- package/tests/form.test.ts +27 -0
- package/tests/index.test.ts +34 -0
- package/tests/responses.test.ts +25 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +39 -0
- package/typings/digest-fetch/index.d.ts +33 -0
- package/version.ts +1 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import * as HRIS from '~/resources/hris';
|
|
6
|
+
|
|
7
|
+
export class CompanyResource extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Read basic company data
|
|
10
|
+
*/
|
|
11
|
+
retrieve(options?: Core.RequestOptions): Promise<Core.APIResponse<Company>> {
|
|
12
|
+
return this.get('/employer/company', options);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Company {
|
|
17
|
+
/**
|
|
18
|
+
* An array of bank account objects associated with the payroll/HRIS system.
|
|
19
|
+
*/
|
|
20
|
+
accounts: Array<Company.Accounts> | null;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The array of company departments.
|
|
24
|
+
*/
|
|
25
|
+
departments: Array<Company.Departments | null> | null;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The employer identification number.
|
|
29
|
+
*/
|
|
30
|
+
ein: string | null;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The entity type object.
|
|
34
|
+
*/
|
|
35
|
+
entity: Company.Entity | null;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A stable Finch `id` (UUID v4) for the company.
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The legal name of the company.
|
|
44
|
+
*/
|
|
45
|
+
legal_name: string | null;
|
|
46
|
+
|
|
47
|
+
locations: Array<HRIS.Location | null> | null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The email of the main administrator on the account.
|
|
51
|
+
*/
|
|
52
|
+
primary_email: string | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The phone number of the main administrator on the account. Format: `XXXXXXXXXX`
|
|
56
|
+
*/
|
|
57
|
+
primary_phone_number: string | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export namespace Company {
|
|
61
|
+
/**
|
|
62
|
+
* The entity type object.
|
|
63
|
+
*/
|
|
64
|
+
export interface Entity {
|
|
65
|
+
/**
|
|
66
|
+
* The tax payer subtype of the company.
|
|
67
|
+
*/
|
|
68
|
+
subtype?: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The tax payer type of the company.
|
|
72
|
+
*/
|
|
73
|
+
type?: 'llc' | 'corporation' | 'sole_proprietor' | 'non_profit' | 'partnership' | 'cooperative' | null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Departments {
|
|
77
|
+
/**
|
|
78
|
+
* The department name.
|
|
79
|
+
*/
|
|
80
|
+
name?: string | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The parent department, if present.
|
|
84
|
+
*/
|
|
85
|
+
parent?: Departments.Parent | null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export namespace Departments {
|
|
89
|
+
/**
|
|
90
|
+
* The parent department, if present.
|
|
91
|
+
*/
|
|
92
|
+
export interface Parent {
|
|
93
|
+
/**
|
|
94
|
+
* The parent department's name.
|
|
95
|
+
*/
|
|
96
|
+
name?: string | null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface Accounts {
|
|
101
|
+
/**
|
|
102
|
+
* The name of the bank associated in the payroll/HRIS system.
|
|
103
|
+
*/
|
|
104
|
+
account_name?: string | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 10-12 digit number to specify the bank account
|
|
108
|
+
*/
|
|
109
|
+
account_number?: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The type of bank account.
|
|
113
|
+
*/
|
|
114
|
+
account_type?: 'checking' | 'savings' | null;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Name of the banking institution.
|
|
118
|
+
*/
|
|
119
|
+
institution_name?: string | null;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* A nine-digit code that's based on the U.S. Bank location where your account was
|
|
123
|
+
* opened.
|
|
124
|
+
*/
|
|
125
|
+
routing_number?: string | null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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 { IndividualsPage, IndividualsPageParams } from '~/pagination';
|
|
7
|
+
|
|
8
|
+
export class Directory extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Read company directory and organization structure
|
|
11
|
+
*/
|
|
12
|
+
listIndividuals(
|
|
13
|
+
query?: DirectoryListIndividualsParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.PagePromise<IndividualsPage>;
|
|
16
|
+
listIndividuals(options?: Core.RequestOptions): Core.PagePromise<IndividualsPage>;
|
|
17
|
+
listIndividuals(
|
|
18
|
+
query: DirectoryListIndividualsParams | Core.RequestOptions = {},
|
|
19
|
+
options?: Core.RequestOptions,
|
|
20
|
+
): Core.PagePromise<IndividualsPage> {
|
|
21
|
+
if (isRequestOptions(query)) {
|
|
22
|
+
return this.listIndividuals({}, query);
|
|
23
|
+
}
|
|
24
|
+
return this.getAPIList('/employer/directory', IndividualsPage, { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IndividualInDirectory {
|
|
29
|
+
/**
|
|
30
|
+
* The department object.
|
|
31
|
+
*/
|
|
32
|
+
department?: IndividualInDirectory.Department | null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The legal first name of the individual.
|
|
36
|
+
*/
|
|
37
|
+
first_name?: string | null;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A stable Finch id (UUID v4) for an individual in the company.
|
|
41
|
+
*/
|
|
42
|
+
id?: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* `true` if the individual is an active employee or contractor at the company.
|
|
46
|
+
*/
|
|
47
|
+
is_active?: boolean | null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The legal last name of the individual.
|
|
51
|
+
*/
|
|
52
|
+
last_name?: string | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The manager object.
|
|
56
|
+
*/
|
|
57
|
+
manager?: IndividualInDirectory.Manager | null;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The legal middle name of the individual.
|
|
61
|
+
*/
|
|
62
|
+
middle_name?: string | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export namespace IndividualInDirectory {
|
|
66
|
+
/**
|
|
67
|
+
* The manager object.
|
|
68
|
+
*/
|
|
69
|
+
export interface Manager {
|
|
70
|
+
/**
|
|
71
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
72
|
+
*/
|
|
73
|
+
id?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The department object.
|
|
78
|
+
*/
|
|
79
|
+
export interface Department {
|
|
80
|
+
/**
|
|
81
|
+
* The name of the department.
|
|
82
|
+
*/
|
|
83
|
+
name?: string | null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface DirectoryListIndividualsParams extends IndividualsPageParams {}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '~/resource';
|
|
4
|
+
import { CompanyResource } from './company';
|
|
5
|
+
import { Payments } from './payments';
|
|
6
|
+
import { PayStatements } from './pay-statements';
|
|
7
|
+
import { Directory } from './directory';
|
|
8
|
+
import { Individuals } from './individuals/individuals';
|
|
9
|
+
import { Benefits } from './benefits/benefits';
|
|
10
|
+
|
|
11
|
+
export class HRIS extends APIResource {
|
|
12
|
+
company: CompanyResource = new CompanyResource(this.client);
|
|
13
|
+
payments: Payments = new Payments(this.client);
|
|
14
|
+
payStatements: PayStatements = new PayStatements(this.client);
|
|
15
|
+
directory: Directory = new Directory(this.client);
|
|
16
|
+
individuals: Individuals = new Individuals(this.client);
|
|
17
|
+
benefits: Benefits = new Benefits(this.client);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The employee's income as reported by the provider. This may not always be
|
|
22
|
+
* annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
|
|
23
|
+
* depending on what information the provider returns.
|
|
24
|
+
*/
|
|
25
|
+
export interface Income {
|
|
26
|
+
/**
|
|
27
|
+
* The income amount in cents.
|
|
28
|
+
*/
|
|
29
|
+
amount?: number | null;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The currency code.
|
|
33
|
+
*/
|
|
34
|
+
currency?: string | null;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The date the income amount went into effect.
|
|
38
|
+
*/
|
|
39
|
+
effective_date?: string | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The income unit of payment. Options: `yearly`, `quarterly`, `monthly`,
|
|
43
|
+
* `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.
|
|
44
|
+
*/
|
|
45
|
+
unit?:
|
|
46
|
+
| 'yearly'
|
|
47
|
+
| 'quarterly'
|
|
48
|
+
| 'monthly'
|
|
49
|
+
| 'semi_monthly'
|
|
50
|
+
| 'bi_weekly'
|
|
51
|
+
| 'weekly'
|
|
52
|
+
| 'daily'
|
|
53
|
+
| 'hourly'
|
|
54
|
+
| 'fixed'
|
|
55
|
+
| null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface Location {
|
|
59
|
+
/**
|
|
60
|
+
* City, district, suburb, town, or village.
|
|
61
|
+
*/
|
|
62
|
+
city?: string | null;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The 2-letter ISO 3166 country code.
|
|
66
|
+
*/
|
|
67
|
+
country?: string | null;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Street address or PO box.
|
|
71
|
+
*/
|
|
72
|
+
line1?: string | null;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Apartment, suite, unit, or building.
|
|
76
|
+
*/
|
|
77
|
+
line2?: string | null;
|
|
78
|
+
|
|
79
|
+
name?: string | null;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The postal code or zip code.
|
|
83
|
+
*/
|
|
84
|
+
postal_code?: string | null;
|
|
85
|
+
|
|
86
|
+
source_id?: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The state code.
|
|
90
|
+
*/
|
|
91
|
+
state?: string | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface Money {
|
|
95
|
+
/**
|
|
96
|
+
* Amount for money object (in cents)
|
|
97
|
+
*/
|
|
98
|
+
amount?: number;
|
|
99
|
+
|
|
100
|
+
currency?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface Paging {
|
|
104
|
+
/**
|
|
105
|
+
* The total number of elements for the entire query (not just the given page)
|
|
106
|
+
*/
|
|
107
|
+
count?: number;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The current start index of the returned list of elements
|
|
111
|
+
*/
|
|
112
|
+
offset?: number;
|
|
113
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
BenefitFrequency,
|
|
5
|
+
BenefitType,
|
|
6
|
+
BenfitContribution,
|
|
7
|
+
CompanyBenefit,
|
|
8
|
+
CreateCompanyBenefitsResponse,
|
|
9
|
+
SupportedBenefit,
|
|
10
|
+
UpdateCompanyBenefitResponse,
|
|
11
|
+
BenefitCreateParams,
|
|
12
|
+
BenefitUpdateParams,
|
|
13
|
+
CompanyBenefitsSinglePage,
|
|
14
|
+
SupportedBenefitsSinglePage,
|
|
15
|
+
} from './benefits';
|
|
16
|
+
export { Company } from './company';
|
|
17
|
+
export { Income, Location, Money, Paging } from './hris';
|
|
18
|
+
export {
|
|
19
|
+
Individual,
|
|
20
|
+
IndividualResponse,
|
|
21
|
+
IndividualRetrieveManyParams,
|
|
22
|
+
IndividualResponsesResponsesPage,
|
|
23
|
+
} from './individuals';
|
|
24
|
+
export { IndividualInDirectory, DirectoryListIndividualsParams } from './directory';
|
|
25
|
+
export {
|
|
26
|
+
PayStatement,
|
|
27
|
+
PayStatementResponse,
|
|
28
|
+
PayStatementResponseBody,
|
|
29
|
+
PayStatementRetrieveManyParams,
|
|
30
|
+
PayStatementResponsesResponsesPage,
|
|
31
|
+
} from './pay-statements';
|
|
32
|
+
export { Payment, PaymentListParams, PaymentsSinglePage } from './payments';
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import * as HRIS from '~/resources/hris';
|
|
6
|
+
import { ResponsesPage } from '~/pagination';
|
|
7
|
+
|
|
8
|
+
export class EmploymentData extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Read individual employment and income data
|
|
11
|
+
*
|
|
12
|
+
* Note: Income information is returned as reported by the provider. This may not
|
|
13
|
+
* always be annualized income, but may be in units of bi-weekly, semi-monthly,
|
|
14
|
+
* daily, etc, depending on what information the provider returns.
|
|
15
|
+
*/
|
|
16
|
+
retrieveMany(
|
|
17
|
+
body: EmploymentDataRetrieveManyParams,
|
|
18
|
+
options?: Core.RequestOptions,
|
|
19
|
+
): Core.PagePromise<EmploymentDataResponsesResponsesPage> {
|
|
20
|
+
return this.getAPIList('/employer/employment', EmploymentDataResponsesResponsesPage, {
|
|
21
|
+
body,
|
|
22
|
+
method: 'post',
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class EmploymentDataResponsesResponsesPage extends ResponsesPage<EmploymentDataResponse> {}
|
|
29
|
+
|
|
30
|
+
export interface EmploymentData {
|
|
31
|
+
/**
|
|
32
|
+
* Worker's compensation classification code for this employee
|
|
33
|
+
*/
|
|
34
|
+
class_code?: string | null;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The department object.
|
|
38
|
+
*/
|
|
39
|
+
department?: EmploymentData.Department | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The employment object.
|
|
43
|
+
*/
|
|
44
|
+
employment?: EmploymentData.Employment | null;
|
|
45
|
+
|
|
46
|
+
end_date?: string | null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The legal first name of the individual.
|
|
50
|
+
*/
|
|
51
|
+
first_name?: string | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* string A stable Finch `id` (UUID v4) for an individual in the company.
|
|
55
|
+
*/
|
|
56
|
+
id?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The employee's income as reported by the provider. This may not always be
|
|
60
|
+
* annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
|
|
61
|
+
* depending on what information the provider returns.
|
|
62
|
+
*/
|
|
63
|
+
income?: HRIS.Income | null;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The array of income history.
|
|
67
|
+
*/
|
|
68
|
+
income_history?: Array<HRIS.Income | null> | null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* `true` if the individual an an active employee or contractor at the company.
|
|
72
|
+
*/
|
|
73
|
+
is_active?: boolean | null;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The legal last name of the individual.
|
|
77
|
+
*/
|
|
78
|
+
last_name?: string | null;
|
|
79
|
+
|
|
80
|
+
location?: HRIS.Location | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The manager object representing the manager of the individual within the org.
|
|
84
|
+
*/
|
|
85
|
+
manager?: EmploymentData.Manager | null;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The legal middle name of the individual.
|
|
89
|
+
*/
|
|
90
|
+
middle_name?: string | null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Note: This property is only available if enabled for your account. Please reach
|
|
94
|
+
* out to your Finch representative if you would like access.
|
|
95
|
+
*/
|
|
96
|
+
pay_group_ids?: Array<string> | null;
|
|
97
|
+
|
|
98
|
+
start_date?: string | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The current title of the individual.
|
|
102
|
+
*/
|
|
103
|
+
title?: string | null;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Note: This property is only available if enabled for your account. Please reach
|
|
107
|
+
* out to your Finch representative if you would like access.
|
|
108
|
+
*/
|
|
109
|
+
work_id?: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Note: This property is only available if enabled for your account. Please reach
|
|
113
|
+
* out to your Finch representative if you would like access.
|
|
114
|
+
*/
|
|
115
|
+
work_id_2?: string | null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export namespace EmploymentData {
|
|
119
|
+
/**
|
|
120
|
+
* The manager object representing the manager of the individual within the org.
|
|
121
|
+
*/
|
|
122
|
+
export interface Manager {
|
|
123
|
+
/**
|
|
124
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
125
|
+
*/
|
|
126
|
+
id?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The department object.
|
|
131
|
+
*/
|
|
132
|
+
export interface Department {
|
|
133
|
+
/**
|
|
134
|
+
* The name of the department associated with the individual.
|
|
135
|
+
*/
|
|
136
|
+
name?: string | null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The employment object.
|
|
141
|
+
*/
|
|
142
|
+
export interface Employment {
|
|
143
|
+
/**
|
|
144
|
+
* The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
|
|
145
|
+
*/
|
|
146
|
+
subtype?: 'full_time' | 'intern' | 'part_time' | 'temp' | 'seasonal' | 'individual_contractor' | null;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The main employment type of the individual.
|
|
150
|
+
*/
|
|
151
|
+
type?: 'employee' | 'contractor' | null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface EmploymentDataResponse {
|
|
156
|
+
body?: EmploymentData;
|
|
157
|
+
|
|
158
|
+
code?: number;
|
|
159
|
+
|
|
160
|
+
individual_id?: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface EmploymentDataRetrieveManyParams {
|
|
164
|
+
/**
|
|
165
|
+
* The array of batch requests.
|
|
166
|
+
*/
|
|
167
|
+
requests: Array<EmploymentDataRetrieveManyParams.Requests>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export namespace EmploymentDataRetrieveManyParams {
|
|
171
|
+
export interface Requests {
|
|
172
|
+
/**
|
|
173
|
+
* A stable Finch `id` (UUID v4) for an individual in the company. There is no
|
|
174
|
+
* limit to the number of `individual_id` to send per request. It is preferantial
|
|
175
|
+
* to send all ids in a single request for Finch to optimize provider rate-limits.
|
|
176
|
+
*/
|
|
177
|
+
individual_id: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface Requests {
|
|
181
|
+
/**
|
|
182
|
+
* A stable Finch `id` (UUID v4) for an individual in the company. There is no
|
|
183
|
+
* limit to the number of `individual_id` to send per request. It is preferantial
|
|
184
|
+
* to send all ids in a single request for Finch to optimize provider rate-limits.
|
|
185
|
+
*/
|
|
186
|
+
individual_id: string;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
EmploymentData,
|
|
5
|
+
EmploymentDataResponse,
|
|
6
|
+
EmploymentDataRetrieveManyParams,
|
|
7
|
+
EmploymentDataResponsesResponsesPage,
|
|
8
|
+
} from './employment-data';
|
|
9
|
+
export {
|
|
10
|
+
Individual,
|
|
11
|
+
IndividualResponse,
|
|
12
|
+
IndividualRetrieveManyParams,
|
|
13
|
+
IndividualResponsesResponsesPage,
|
|
14
|
+
} from './individuals';
|
|
@@ -0,0 +1,128 @@
|
|
|
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 HRIS from '~/resources/hris';
|
|
7
|
+
import { EmploymentData } from './employment-data';
|
|
8
|
+
import { ResponsesPage } from '~/pagination';
|
|
9
|
+
|
|
10
|
+
export class Individuals extends APIResource {
|
|
11
|
+
employmentData: EmploymentData = new EmploymentData(this.client);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Read individual data, excluding income and employment data
|
|
15
|
+
*/
|
|
16
|
+
retrieveMany(
|
|
17
|
+
body?: IndividualRetrieveManyParams,
|
|
18
|
+
options?: Core.RequestOptions,
|
|
19
|
+
): Core.PagePromise<IndividualResponsesResponsesPage>;
|
|
20
|
+
retrieveMany(options?: Core.RequestOptions): Core.PagePromise<IndividualResponsesResponsesPage>;
|
|
21
|
+
retrieveMany(
|
|
22
|
+
body: IndividualRetrieveManyParams | Core.RequestOptions = {},
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.PagePromise<IndividualResponsesResponsesPage> {
|
|
25
|
+
if (isRequestOptions(body)) {
|
|
26
|
+
return this.retrieveMany({}, body);
|
|
27
|
+
}
|
|
28
|
+
return this.getAPIList('/employer/individual', IndividualResponsesResponsesPage, {
|
|
29
|
+
body,
|
|
30
|
+
method: 'post',
|
|
31
|
+
...options,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class IndividualResponsesResponsesPage extends ResponsesPage<IndividualResponse> {}
|
|
37
|
+
|
|
38
|
+
export interface Individual {
|
|
39
|
+
dob?: string | null;
|
|
40
|
+
|
|
41
|
+
emails?: Array<Individual.Emails> | null;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The legal first name of the individual.
|
|
45
|
+
*/
|
|
46
|
+
first_name?: string | null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The gender of the individual.
|
|
50
|
+
*/
|
|
51
|
+
gender?: 'female' | 'male' | 'other' | 'decline_to_specify' | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
55
|
+
*/
|
|
56
|
+
id?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The legal last name of the individual.
|
|
60
|
+
*/
|
|
61
|
+
last_name?: string | null;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The legal middle name of the individual.
|
|
65
|
+
*/
|
|
66
|
+
middle_name?: string | null;
|
|
67
|
+
|
|
68
|
+
phone_numbers?: Array<Individual.PhoneNumbers | null> | null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The preferred name of the individual.
|
|
72
|
+
*/
|
|
73
|
+
preferred_name?: string | null;
|
|
74
|
+
|
|
75
|
+
residence?: HRIS.Location | null;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Note: This property is only available if enabled for your account. Please reach
|
|
79
|
+
* out to your Finch representative if you would like access.
|
|
80
|
+
*/
|
|
81
|
+
ssn?: string | null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Individual {
|
|
85
|
+
export interface Emails {
|
|
86
|
+
data?: string;
|
|
87
|
+
|
|
88
|
+
type?: 'work' | 'personal';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface PhoneNumbers {
|
|
92
|
+
data?: string | null;
|
|
93
|
+
|
|
94
|
+
type?: 'work' | 'personal' | null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface IndividualResponse {
|
|
99
|
+
body?: Individual;
|
|
100
|
+
|
|
101
|
+
code?: number;
|
|
102
|
+
|
|
103
|
+
individual_id?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface IndividualRetrieveManyParams {
|
|
107
|
+
options?: IndividualRetrieveManyParams.Options | null;
|
|
108
|
+
|
|
109
|
+
requests?: Array<IndividualRetrieveManyParams.Requests>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export namespace IndividualRetrieveManyParams {
|
|
113
|
+
export interface Requests {
|
|
114
|
+
individual_id?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface Options {
|
|
118
|
+
include?: Array<string>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface Options {
|
|
122
|
+
include?: Array<string>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface Requests {
|
|
126
|
+
individual_id?: string;
|
|
127
|
+
}
|
|
128
|
+
}
|