@tryfinch/finch-api 6.27.0 → 6.29.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 +65 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.ts +8 -0
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +8 -0
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +8 -0
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/hris/benefits/benefits.d.ts +73 -0
- package/resources/hris/benefits/benefits.d.ts.map +1 -1
- package/resources/hris/benefits/benefits.js +23 -0
- package/resources/hris/benefits/benefits.js.map +1 -1
- package/resources/hris/benefits/benefits.mjs +23 -0
- package/resources/hris/benefits/benefits.mjs.map +1 -1
- package/resources/hris/benefits/individuals.d.ts +35 -0
- package/resources/hris/benefits/individuals.d.ts.map +1 -1
- package/resources/hris/benefits/individuals.js +8 -0
- package/resources/hris/benefits/individuals.js.map +1 -1
- package/resources/hris/benefits/individuals.mjs +8 -0
- package/resources/hris/benefits/individuals.mjs.map +1 -1
- package/resources/hris/company/company.d.ts +15 -10
- package/resources/hris/company/company.d.ts.map +1 -1
- package/resources/hris/company/company.js +5 -0
- package/resources/hris/company/company.js.map +1 -1
- package/resources/hris/company/company.mjs +5 -0
- package/resources/hris/company/company.mjs.map +1 -1
- package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts +8 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts.map +1 -1
- package/resources/hris/company/pay-statement-item/pay-statement-item.js.map +1 -1
- package/resources/hris/company/pay-statement-item/pay-statement-item.mjs.map +1 -1
- package/resources/hris/company/pay-statement-item/rules.d.ts +30 -0
- package/resources/hris/company/pay-statement-item/rules.d.ts.map +1 -1
- package/resources/hris/company/pay-statement-item/rules.js +16 -0
- package/resources/hris/company/pay-statement-item/rules.js.map +1 -1
- package/resources/hris/company/pay-statement-item/rules.mjs +16 -0
- package/resources/hris/company/pay-statement-item/rules.mjs.map +1 -1
- package/resources/hris/directory.d.ts +16 -8
- package/resources/hris/directory.d.ts.map +1 -1
- package/resources/hris/directory.js.map +1 -1
- package/resources/hris/directory.mjs.map +1 -1
- package/resources/hris/documents.d.ts +12 -0
- package/resources/hris/documents.d.ts.map +1 -1
- package/resources/hris/documents.js +7 -0
- package/resources/hris/documents.js.map +1 -1
- package/resources/hris/documents.mjs +7 -0
- package/resources/hris/documents.mjs.map +1 -1
- package/resources/hris/employments.d.ts +122 -103
- package/resources/hris/employments.d.ts.map +1 -1
- package/resources/hris/employments.js +10 -0
- package/resources/hris/employments.js.map +1 -1
- package/resources/hris/employments.mjs +10 -0
- package/resources/hris/employments.mjs.map +1 -1
- package/resources/hris/hris.d.ts +12 -12
- package/resources/hris/hris.d.ts.map +1 -1
- package/resources/hris/individuals.d.ts +73 -56
- package/resources/hris/individuals.d.ts.map +1 -1
- package/resources/hris/individuals.js.map +1 -1
- package/resources/hris/individuals.mjs.map +1 -1
- package/resources/hris/pay-statements.d.ts +17 -1
- package/resources/hris/pay-statements.d.ts.map +1 -1
- package/resources/hris/pay-statements.js +16 -0
- package/resources/hris/pay-statements.js.map +1 -1
- package/resources/hris/pay-statements.mjs +16 -0
- package/resources/hris/pay-statements.mjs.map +1 -1
- package/resources/hris/payments.d.ts +11 -0
- package/resources/hris/payments.d.ts.map +1 -1
- package/resources/hris/payments.js +11 -0
- package/resources/hris/payments.js.map +1 -1
- package/resources/hris/payments.mjs +11 -0
- package/resources/hris/payments.mjs.map +1 -1
- package/resources/request-forwarding.d.ts +10 -0
- package/resources/request-forwarding.d.ts.map +1 -1
- package/resources/request-forwarding.js +10 -0
- package/resources/request-forwarding.js.map +1 -1
- package/resources/request-forwarding.mjs +10 -0
- package/resources/request-forwarding.mjs.map +1 -1
- package/resources/sandbox/company.d.ts +23 -0
- package/resources/sandbox/company.d.ts.map +1 -1
- package/resources/sandbox/company.js +23 -0
- package/resources/sandbox/company.js.map +1 -1
- package/resources/sandbox/company.mjs +23 -0
- package/resources/sandbox/company.mjs.map +1 -1
- package/resources/sandbox/connections/accounts.d.ts +17 -0
- package/resources/sandbox/connections/accounts.d.ts.map +1 -1
- package/resources/sandbox/connections/accounts.js +9 -0
- package/resources/sandbox/connections/accounts.js.map +1 -1
- package/resources/sandbox/connections/accounts.mjs +9 -0
- package/resources/sandbox/connections/accounts.mjs.map +1 -1
- package/resources/sandbox/connections/connections.d.ts +7 -0
- package/resources/sandbox/connections/connections.d.ts.map +1 -1
- package/resources/sandbox/connections/connections.js +7 -0
- package/resources/sandbox/connections/connections.js.map +1 -1
- package/resources/sandbox/connections/connections.mjs +7 -0
- package/resources/sandbox/connections/connections.mjs.map +1 -1
- package/resources/sandbox/directory.d.ts +7 -0
- package/resources/sandbox/directory.d.ts.map +1 -1
- package/resources/sandbox/directory.js.map +1 -1
- package/resources/sandbox/directory.mjs.map +1 -1
- package/resources/sandbox/employment.d.ts +7 -0
- package/resources/sandbox/employment.d.ts.map +1 -1
- package/resources/sandbox/employment.js.map +1 -1
- package/resources/sandbox/employment.mjs.map +1 -1
- package/resources/sandbox/individual.d.ts +7 -0
- package/resources/sandbox/individual.d.ts.map +1 -1
- package/resources/sandbox/individual.js.map +1 -1
- package/resources/sandbox/individual.mjs.map +1 -1
- package/resources/sandbox/jobs/configuration.d.ts +15 -0
- package/resources/sandbox/jobs/configuration.d.ts.map +1 -1
- package/resources/sandbox/jobs/configuration.js +15 -0
- package/resources/sandbox/jobs/configuration.js.map +1 -1
- package/resources/sandbox/jobs/configuration.mjs +15 -0
- package/resources/sandbox/jobs/configuration.mjs.map +1 -1
- package/resources/sandbox/jobs/jobs.d.ts +7 -0
- package/resources/sandbox/jobs/jobs.d.ts.map +1 -1
- package/resources/sandbox/jobs/jobs.js +7 -0
- package/resources/sandbox/jobs/jobs.js.map +1 -1
- package/resources/sandbox/jobs/jobs.mjs +7 -0
- package/resources/sandbox/jobs/jobs.mjs.map +1 -1
- package/resources/sandbox/payment.d.ts +20 -1
- package/resources/sandbox/payment.d.ts.map +1 -1
- package/resources/sandbox/payment.js.map +1 -1
- package/resources/sandbox/payment.mjs.map +1 -1
- package/resources/shared.d.ts +4 -4
- package/resources/shared.d.ts.map +1 -1
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +3 -3
- package/src/_shims/index.mjs +1 -1
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +5 -5
- package/src/error.ts +1 -1
- package/src/index.ts +20 -20
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +3 -3
- package/src/resource.ts +1 -1
- package/src/resources/access-tokens.ts +10 -2
- package/src/resources/account.ts +3 -3
- package/src/resources/connect/connect.ts +3 -3
- package/src/resources/connect/index.ts +2 -2
- package/src/resources/connect/sessions.ts +2 -2
- package/src/resources/connect.ts +1 -1
- package/src/resources/hris/benefits/benefits.ts +91 -8
- package/src/resources/hris/benefits/index.ts +2 -2
- package/src/resources/hris/benefits/individuals.ts +40 -5
- package/src/resources/hris/benefits.ts +1 -1
- package/src/resources/hris/company/company.ts +20 -15
- package/src/resources/hris/company/index.ts +2 -2
- package/src/resources/hris/company/pay-statement-item/index.ts +2 -2
- package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +14 -6
- package/src/resources/hris/company/pay-statement-item/rules.ts +34 -4
- package/src/resources/hris/company/pay-statement-item.ts +1 -1
- package/src/resources/hris/company.ts +1 -1
- package/src/resources/hris/directory.ts +20 -12
- package/src/resources/hris/documents.ts +16 -4
- package/src/resources/hris/employments.ts +143 -119
- package/src/resources/hris/hris.ts +31 -31
- package/src/resources/hris/index.ts +9 -9
- package/src/resources/hris/individuals.ts +101 -79
- package/src/resources/hris/pay-statements.ts +23 -7
- package/src/resources/hris/payments.ts +15 -4
- package/src/resources/hris.ts +1 -1
- package/src/resources/index.ts +11 -11
- package/src/resources/jobs/automated.ts +3 -3
- package/src/resources/jobs/index.ts +3 -3
- package/src/resources/jobs/jobs.ts +5 -5
- package/src/resources/jobs/manual.ts +2 -2
- package/src/resources/jobs.ts +1 -1
- package/src/resources/payroll/index.ts +2 -2
- package/src/resources/payroll/pay-groups.ts +4 -4
- package/src/resources/payroll/payroll.ts +3 -3
- package/src/resources/payroll.ts +1 -1
- package/src/resources/providers.ts +4 -4
- package/src/resources/request-forwarding.ts +12 -2
- package/src/resources/sandbox/company.ts +26 -3
- package/src/resources/sandbox/connections/accounts.ts +21 -4
- package/src/resources/sandbox/connections/connections.ts +11 -4
- package/src/resources/sandbox/connections/index.ts +2 -2
- package/src/resources/sandbox/connections.ts +1 -1
- package/src/resources/sandbox/directory.ts +11 -4
- package/src/resources/sandbox/employment.ts +11 -4
- package/src/resources/sandbox/index.ts +8 -8
- package/src/resources/sandbox/individual.ts +11 -4
- package/src/resources/sandbox/jobs/configuration.ts +17 -2
- package/src/resources/sandbox/jobs/index.ts +2 -2
- package/src/resources/sandbox/jobs/jobs.ts +11 -4
- package/src/resources/sandbox/jobs.ts +1 -1
- package/src/resources/sandbox/payment.ts +25 -6
- package/src/resources/sandbox/sandbox.ts +15 -15
- package/src/resources/sandbox.ts +1 -1
- package/src/resources/shared.ts +4 -4
- package/src/resources/webhooks.ts +4 -4
- package/src/resources.ts +1 -1
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import * as HRISAPI from
|
|
7
|
-
import { ResponsesPage } from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../core.js";
|
|
5
|
+
import * as Core from "../../core.js";
|
|
6
|
+
import * as HRISAPI from "./hris.js";
|
|
7
|
+
import { ResponsesPage } from "../../pagination.js";
|
|
8
8
|
|
|
9
9
|
export class Individuals extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Read individual data, excluding income and employment data
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Automatically fetches more pages as needed.
|
|
16
|
+
* for await (const individualResponse of client.hris.individuals.retrieveMany()) {
|
|
17
|
+
* // ...
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
retrieveMany(
|
|
14
22
|
body?: IndividualRetrieveManyParams,
|
|
@@ -32,95 +40,109 @@ export class Individuals extends APIResource {
|
|
|
32
40
|
|
|
33
41
|
export class IndividualResponsesPage extends ResponsesPage<IndividualResponse> {}
|
|
34
42
|
|
|
35
|
-
export
|
|
36
|
-
/**
|
|
37
|
-
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
38
|
-
*/
|
|
39
|
-
id?: string;
|
|
40
|
-
|
|
41
|
-
dob?: string | null;
|
|
43
|
+
export type Individual = Individual.UnionMember0 | Individual.BatchError;
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
45
|
+
export namespace Individual {
|
|
46
|
+
export interface UnionMember0 {
|
|
47
|
+
/**
|
|
48
|
+
* A stable Finch `id` (UUID v4) for an individual in the company.
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
|
|
52
|
+
dob: string | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The EEOC-defined ethnicity of the individual.
|
|
56
|
+
*/
|
|
57
|
+
ethnicity:
|
|
58
|
+
| 'asian'
|
|
59
|
+
| 'white'
|
|
60
|
+
| 'black_or_african_american'
|
|
61
|
+
| 'native_hawaiian_or_pacific_islander'
|
|
62
|
+
| 'american_indian_or_alaska_native'
|
|
63
|
+
| 'hispanic_or_latino'
|
|
64
|
+
| 'two_or_more_races'
|
|
65
|
+
| 'decline_to_specify'
|
|
66
|
+
| null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The legal first name of the individual.
|
|
70
|
+
*/
|
|
71
|
+
first_name: string | null;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The gender of the individual.
|
|
75
|
+
*/
|
|
76
|
+
gender: 'female' | 'male' | 'other' | 'decline_to_specify' | null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The legal last name of the individual.
|
|
80
|
+
*/
|
|
81
|
+
last_name: string | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The legal middle name of the individual.
|
|
85
|
+
*/
|
|
86
|
+
middle_name: string | null;
|
|
87
|
+
|
|
88
|
+
phone_numbers: Array<UnionMember0.PhoneNumber | null> | null;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The preferred name of the individual.
|
|
92
|
+
*/
|
|
93
|
+
preferred_name: string | null;
|
|
94
|
+
|
|
95
|
+
residence: HRISAPI.Location | null;
|
|
96
|
+
|
|
97
|
+
emails?: Array<UnionMember0.Email> | null;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Social Security Number of the individual in **encrypted** format. This field is
|
|
101
|
+
* only available with the `ssn` scope enabled and the
|
|
102
|
+
* `options: { include: ['ssn'] }` param set in the body.
|
|
103
|
+
*/
|
|
104
|
+
encrypted_ssn?: string | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Social Security Number of the individual. This field is only available with the
|
|
108
|
+
* `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
|
|
109
|
+
* body.
|
|
110
|
+
* [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
|
|
111
|
+
*/
|
|
112
|
+
ssn?: string | null;
|
|
113
|
+
}
|
|
85
114
|
|
|
86
|
-
|
|
115
|
+
export namespace UnionMember0 {
|
|
116
|
+
export interface PhoneNumber {
|
|
117
|
+
data: string | null;
|
|
87
118
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
preferred_name?: string | null;
|
|
119
|
+
type: 'work' | 'personal' | null;
|
|
120
|
+
}
|
|
92
121
|
|
|
93
|
-
|
|
122
|
+
export interface Email {
|
|
123
|
+
data: string;
|
|
94
124
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
* body.
|
|
99
|
-
* [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
|
|
100
|
-
*/
|
|
101
|
-
ssn?: string | null;
|
|
102
|
-
}
|
|
125
|
+
type: 'work' | 'personal' | null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
103
128
|
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
data?: string;
|
|
129
|
+
export interface BatchError {
|
|
130
|
+
code: number;
|
|
107
131
|
|
|
108
|
-
|
|
109
|
-
}
|
|
132
|
+
message: string;
|
|
110
133
|
|
|
111
|
-
|
|
112
|
-
data?: string | null;
|
|
134
|
+
name: string;
|
|
113
135
|
|
|
114
|
-
|
|
136
|
+
finch_code?: string;
|
|
115
137
|
}
|
|
116
138
|
}
|
|
117
139
|
|
|
118
140
|
export interface IndividualResponse {
|
|
119
|
-
body
|
|
141
|
+
body: Individual;
|
|
120
142
|
|
|
121
|
-
code
|
|
143
|
+
code: number;
|
|
122
144
|
|
|
123
|
-
individual_id
|
|
145
|
+
individual_id: string;
|
|
124
146
|
}
|
|
125
147
|
|
|
126
148
|
export interface IndividualRetrieveManyParams {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
5
|
-
import * as Shared from
|
|
6
|
-
import * as HRISAPI from
|
|
7
|
-
import * as BenefitsAPI from
|
|
8
|
-
import { ResponsesPage } from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as Core from "../../core.js";
|
|
5
|
+
import * as Shared from "../shared.js";
|
|
6
|
+
import * as HRISAPI from "./hris.js";
|
|
7
|
+
import * as BenefitsAPI from "./benefits/benefits.js";
|
|
8
|
+
import { ResponsesPage } from "../../pagination.js";
|
|
9
9
|
|
|
10
10
|
export class PayStatements extends APIResource {
|
|
11
11
|
/**
|
|
@@ -13,6 +13,22 @@ export class PayStatements extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* Deduction and contribution types are supported by the payroll systems that
|
|
15
15
|
* supports Benefits.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Automatically fetches more pages as needed.
|
|
20
|
+
* for await (const payStatementResponse of client.hris.payStatements.retrieveMany(
|
|
21
|
+
* {
|
|
22
|
+
* requests: [
|
|
23
|
+
* {
|
|
24
|
+
* payment_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
25
|
+
* },
|
|
26
|
+
* ],
|
|
27
|
+
* },
|
|
28
|
+
* )) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
16
32
|
*/
|
|
17
33
|
retrieveMany(
|
|
18
34
|
body: PayStatementRetrieveManyParams,
|
|
@@ -53,7 +69,7 @@ export interface PayStatement {
|
|
|
53
69
|
/**
|
|
54
70
|
* The payment method.
|
|
55
71
|
*/
|
|
56
|
-
payment_method?: 'check' | 'direct_deposit' | null;
|
|
72
|
+
payment_method?: 'check' | 'direct_deposit' | 'other' | null;
|
|
57
73
|
|
|
58
74
|
/**
|
|
59
75
|
* The array of taxes objects associated with this pay statement.
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
5
|
-
import * as HRISAPI from
|
|
6
|
-
import { SinglePage } from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as Core from "../../core.js";
|
|
5
|
+
import * as HRISAPI from "./hris.js";
|
|
6
|
+
import { SinglePage } from "../../pagination.js";
|
|
7
7
|
|
|
8
8
|
export class Payments extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Read payroll and contractor related payments by the company.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const payment of client.hris.payments.list({
|
|
16
|
+
* end_date: '2021-01-01',
|
|
17
|
+
* start_date: '2021-01-01',
|
|
18
|
+
* })) {
|
|
19
|
+
* // ...
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
11
22
|
*/
|
|
12
23
|
list(
|
|
13
24
|
query: PaymentListParams,
|
package/src/resources/hris.ts
CHANGED
package/src/resources/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export * from
|
|
4
|
-
export { AccessTokens, type CreateAccessTokenResponse, type AccessTokenCreateParams } from
|
|
5
|
-
export { Account, type DisconnectResponse, type Introspection } from
|
|
6
|
-
export { Connect } from
|
|
7
|
-
export { HRIS, type Income, type Location, type Money } from
|
|
8
|
-
export { Jobs } from
|
|
9
|
-
export { Payroll } from
|
|
10
|
-
export { ProvidersSinglePage, Providers, type Provider } from
|
|
3
|
+
export * from "./shared.js";
|
|
4
|
+
export { AccessTokens, type CreateAccessTokenResponse, type AccessTokenCreateParams } from "./access-tokens.js";
|
|
5
|
+
export { Account, type DisconnectResponse, type Introspection } from "./account.js";
|
|
6
|
+
export { Connect } from "./connect/connect.js";
|
|
7
|
+
export { HRIS, type Income, type Location, type Money } from "./hris/hris.js";
|
|
8
|
+
export { Jobs } from "./jobs/jobs.js";
|
|
9
|
+
export { Payroll } from "./payroll/payroll.js";
|
|
10
|
+
export { ProvidersSinglePage, Providers, type Provider } from "./providers.js";
|
|
11
11
|
export {
|
|
12
12
|
RequestForwarding,
|
|
13
13
|
type RequestForwardingForwardResponse,
|
|
14
14
|
type RequestForwardingForwardParams,
|
|
15
|
-
} from
|
|
16
|
-
export { Sandbox } from
|
|
15
|
+
} from "./request-forwarding.js";
|
|
16
|
+
export { Sandbox } from "./sandbox/sandbox.js";
|
|
17
17
|
export {
|
|
18
18
|
Webhooks,
|
|
19
19
|
type AccountUpdateEvent,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
type PayStatementEvent,
|
|
27
27
|
type PaymentEvent,
|
|
28
28
|
type WebhookEvent,
|
|
29
|
-
} from
|
|
29
|
+
} from "./webhooks.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../core.js";
|
|
5
|
+
import * as Core from "../../core.js";
|
|
6
6
|
|
|
7
7
|
export class Automated extends APIResource {
|
|
8
8
|
/**
|
|
@@ -7,6 +7,6 @@ export {
|
|
|
7
7
|
type AutomatedListResponse,
|
|
8
8
|
type AutomatedCreateParams,
|
|
9
9
|
type AutomatedListParams,
|
|
10
|
-
} from
|
|
11
|
-
export { Jobs } from
|
|
12
|
-
export { Manual, type ManualAsyncJob } from
|
|
10
|
+
} from "./automated.js";
|
|
11
|
+
export { Jobs } from "./jobs.js";
|
|
12
|
+
export { Manual, type ManualAsyncJob } from "./manual.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as AutomatedAPI from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as AutomatedAPI from "./automated.js";
|
|
5
5
|
import {
|
|
6
6
|
Automated,
|
|
7
7
|
AutomatedAsyncJob,
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
AutomatedCreateResponse,
|
|
10
10
|
AutomatedListParams,
|
|
11
11
|
AutomatedListResponse,
|
|
12
|
-
} from
|
|
13
|
-
import * as ManualAPI from
|
|
14
|
-
import { Manual, ManualAsyncJob } from
|
|
12
|
+
} from "./automated.js";
|
|
13
|
+
import * as ManualAPI from "./manual.js";
|
|
14
|
+
import { Manual, ManualAsyncJob } from "./manual.js";
|
|
15
15
|
|
|
16
16
|
export class Jobs extends APIResource {
|
|
17
17
|
automated: AutomatedAPI.Automated = new AutomatedAPI.Automated(this._client);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as Core from "../../core.js";
|
|
5
5
|
|
|
6
6
|
export class Manual extends APIResource {
|
|
7
7
|
/**
|
package/src/resources/jobs.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import { SinglePage } from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../core.js";
|
|
5
|
+
import * as Core from "../../core.js";
|
|
6
|
+
import { SinglePage } from "../../pagination.js";
|
|
7
7
|
|
|
8
8
|
export class PayGroups extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as PayGroupsAPI from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as PayGroupsAPI from "./pay-groups.js";
|
|
5
5
|
import {
|
|
6
6
|
PayGroupListParams,
|
|
7
7
|
PayGroupListResponse,
|
|
8
8
|
PayGroupListResponsesSinglePage,
|
|
9
9
|
PayGroupRetrieveResponse,
|
|
10
10
|
PayGroups,
|
|
11
|
-
} from
|
|
11
|
+
} from "./pay-groups.js";
|
|
12
12
|
|
|
13
13
|
export class Payroll extends APIResource {
|
|
14
14
|
payGroups: PayGroupsAPI.PayGroups = new PayGroupsAPI.PayGroups(this._client);
|
package/src/resources/payroll.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
5
|
-
import * as BenefitsAPI from
|
|
6
|
-
import { SinglePage } from
|
|
3
|
+
import { APIResource } from "../resource.js";
|
|
4
|
+
import * as Core from "../core.js";
|
|
5
|
+
import * as BenefitsAPI from "./hris/benefits/benefits.js";
|
|
6
|
+
import { SinglePage } from "../pagination.js";
|
|
7
7
|
|
|
8
8
|
export class Providers extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
3
|
+
import { APIResource } from "../resource.js";
|
|
4
|
+
import * as Core from "../core.js";
|
|
5
5
|
|
|
6
6
|
export class RequestForwarding extends APIResource {
|
|
7
7
|
/**
|
|
@@ -9,6 +9,16 @@ export class RequestForwarding extends APIResource {
|
|
|
9
9
|
* Finch’s unified API doesn’t have a data model that cleanly fits your needs, then
|
|
10
10
|
* Forward allows you to push or pull data models directly against an integration’s
|
|
11
11
|
* API.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.requestForwarding.forward({
|
|
16
|
+
* method: 'POST',
|
|
17
|
+
* route: '/people/search',
|
|
18
|
+
* headers: { 'content-type': 'application/json' },
|
|
19
|
+
* params: { showInactive: true, humanReadable: true },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
12
22
|
*/
|
|
13
23
|
forward(
|
|
14
24
|
body: RequestForwardingForwardParams,
|
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
5
|
-
import * as HRISAPI from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import * as Core from "../../core.js";
|
|
5
|
+
import * as HRISAPI from "../hris/hris.js";
|
|
6
6
|
|
|
7
7
|
export class Company extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Update a sandbox company's data
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const company = await client.sandbox.company.update({
|
|
14
|
+
* accounts: [{}],
|
|
15
|
+
* departments: [{}],
|
|
16
|
+
* ein: 'ein',
|
|
17
|
+
* entity: {},
|
|
18
|
+
* legal_name: 'legal_name',
|
|
19
|
+
* locations: [
|
|
20
|
+
* {
|
|
21
|
+
* city: 'city',
|
|
22
|
+
* country: 'country',
|
|
23
|
+
* line1: 'line1',
|
|
24
|
+
* line2: 'line2',
|
|
25
|
+
* postal_code: 'postal_code',
|
|
26
|
+
* state: 'state',
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* primary_email: 'dev@stainless.com',
|
|
30
|
+
* primary_phone_number: 'primary_phone_number',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
10
33
|
*/
|
|
11
34
|
update(body: CompanyUpdateParams, options?: Core.RequestOptions): Core.APIPromise<CompanyUpdateResponse> {
|
|
12
35
|
return this._client.put('/sandbox/company', { body, ...options });
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import * as Shared from
|
|
3
|
+
import { APIResource } from "../../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../../core.js";
|
|
5
|
+
import * as Core from "../../../core.js";
|
|
6
|
+
import * as Shared from "../../shared.js";
|
|
7
7
|
|
|
8
8
|
export class Accounts extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create a new account for an existing connection (company/provider pair)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const account =
|
|
15
|
+
* await client.sandbox.connections.accounts.create({
|
|
16
|
+
* company_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* provider_id: 'provider_id',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
11
20
|
*/
|
|
12
21
|
create(body: AccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<AccountCreateResponse> {
|
|
13
22
|
return this._client.post('/sandbox/connections/accounts', { body, ...options });
|
|
@@ -16,6 +25,14 @@ export class Accounts extends APIResource {
|
|
|
16
25
|
/**
|
|
17
26
|
* Update an existing sandbox account. Change the connection status to understand
|
|
18
27
|
* how the Finch API responds.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const account =
|
|
32
|
+
* await client.sandbox.connections.accounts.update({
|
|
33
|
+
* connection_status: 'reauth',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
19
36
|
*/
|
|
20
37
|
update(body?: AccountUpdateParams, options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
|
|
21
38
|
update(options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import * as Core from
|
|
5
|
-
import * as AccountsAPI from
|
|
3
|
+
import { APIResource } from "../../../resource.js";
|
|
4
|
+
import * as Core from "../../../core.js";
|
|
5
|
+
import * as AccountsAPI from "./accounts.js";
|
|
6
6
|
import {
|
|
7
7
|
AccountCreateParams,
|
|
8
8
|
AccountCreateResponse,
|
|
9
9
|
AccountUpdateParams,
|
|
10
10
|
AccountUpdateResponse,
|
|
11
11
|
Accounts,
|
|
12
|
-
} from
|
|
12
|
+
} from "./accounts.js";
|
|
13
13
|
|
|
14
14
|
export class Connections extends APIResource {
|
|
15
15
|
accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Create a new connection (new company/provider pair) with a new account
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const connection = await client.sandbox.connections.create({
|
|
23
|
+
* provider_id: 'provider_id',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
19
26
|
*/
|
|
20
27
|
create(
|
|
21
28
|
body: ConnectionCreateParams,
|
|
@@ -6,5 +6,5 @@ export {
|
|
|
6
6
|
type AccountUpdateResponse,
|
|
7
7
|
type AccountCreateParams,
|
|
8
8
|
type AccountUpdateParams,
|
|
9
|
-
} from
|
|
10
|
-
export { Connections, type ConnectionCreateResponse, type ConnectionCreateParams } from
|
|
9
|
+
} from "./accounts.js";
|
|
10
|
+
export { Connections, type ConnectionCreateResponse, type ConnectionCreateParams } from "./connections.js";
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import { isRequestOptions } from
|
|
5
|
-
import * as Core from
|
|
6
|
-
import * as HRISAPI from
|
|
3
|
+
import { APIResource } from "../../resource.js";
|
|
4
|
+
import { isRequestOptions } from "../../core.js";
|
|
5
|
+
import * as Core from "../../core.js";
|
|
6
|
+
import * as HRISAPI from "../hris/hris.js";
|
|
7
7
|
|
|
8
8
|
export class Directory extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Add new individuals to a sandbox company
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const directories = await client.sandbox.directory.create([
|
|
15
|
+
* {},
|
|
16
|
+
* ]);
|
|
17
|
+
* ```
|
|
11
18
|
*/
|
|
12
19
|
create(
|
|
13
20
|
body?: DirectoryCreateParams,
|