@tryfinch/finch-api 6.26.0 → 6.28.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 +56 -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 +9 -1
- 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 +16 -0
- 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 +19 -0
- 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/resources/access-tokens.ts +8 -0
- package/src/resources/hris/benefits/benefits.ts +83 -0
- package/src/resources/hris/benefits/individuals.ts +35 -0
- package/src/resources/hris/company/company.ts +15 -10
- package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +9 -1
- package/src/resources/hris/company/pay-statement-item/rules.ts +30 -0
- package/src/resources/hris/directory.ts +16 -8
- package/src/resources/hris/documents.ts +12 -0
- package/src/resources/hris/employments.ts +139 -115
- package/src/resources/hris/hris.ts +14 -14
- package/src/resources/hris/individuals.ts +96 -74
- package/src/resources/hris/pay-statements.ts +16 -0
- package/src/resources/hris/payments.ts +11 -0
- package/src/resources/request-forwarding.ts +10 -0
- package/src/resources/sandbox/company.ts +23 -0
- package/src/resources/sandbox/connections/accounts.ts +17 -0
- package/src/resources/sandbox/connections/connections.ts +7 -0
- package/src/resources/sandbox/directory.ts +7 -0
- package/src/resources/sandbox/employment.ts +7 -0
- package/src/resources/sandbox/individual.ts +7 -0
- package/src/resources/sandbox/jobs/configuration.ts +15 -0
- package/src/resources/sandbox/jobs/jobs.ts +7 -0
- package/src/resources/sandbox/payment.ts +19 -0
- package/src/resources/shared.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
|
@@ -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,
|
|
@@ -8,6 +8,17 @@ import { SinglePage } from '../../pagination';
|
|
|
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,
|
|
@@ -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,
|
|
@@ -7,6 +7,29 @@ import * as HRISAPI from '../hris/hris';
|
|
|
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 });
|
|
@@ -8,6 +8,15 @@ import * as Shared from '../../shared';
|
|
|
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>;
|
|
@@ -16,6 +16,13 @@ export class Connections extends APIResource {
|
|
|
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,
|
|
@@ -8,6 +8,13 @@ import * as HRISAPI from '../hris/hris';
|
|
|
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,
|
|
@@ -8,6 +8,13 @@ import * as HRISAPI from '../hris/hris';
|
|
|
8
8
|
export class Employment extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Update sandbox employment
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const employment = await client.sandbox.employment.update(
|
|
15
|
+
* 'individual_id',
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
11
18
|
*/
|
|
12
19
|
update(
|
|
13
20
|
individualId: string,
|
|
@@ -8,6 +8,13 @@ import * as HRISAPI from '../hris/hris';
|
|
|
8
8
|
export class Individual extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Update sandbox individual
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const individual = await client.sandbox.individual.update(
|
|
15
|
+
* 'individual_id',
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
11
18
|
*/
|
|
12
19
|
update(
|
|
13
20
|
individualId: string,
|
|
@@ -6,6 +6,12 @@ import * as Core from '../../../core';
|
|
|
6
6
|
export class Configuration extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Get configurations for sandbox jobs
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const sandboxJobConfigurations =
|
|
13
|
+
* await client.sandbox.jobs.configuration.retrieve();
|
|
14
|
+
* ```
|
|
9
15
|
*/
|
|
10
16
|
retrieve(options?: Core.RequestOptions): Core.APIPromise<ConfigurationRetrieveResponse> {
|
|
11
17
|
return this._client.get('/sandbox/jobs/configuration', options);
|
|
@@ -13,6 +19,15 @@ export class Configuration extends APIResource {
|
|
|
13
19
|
|
|
14
20
|
/**
|
|
15
21
|
* Update configurations for sandbox jobs
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const sandboxJobConfiguration =
|
|
26
|
+
* await client.sandbox.jobs.configuration.update({
|
|
27
|
+
* completion_status: 'complete',
|
|
28
|
+
* type: 'data_sync_all',
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
16
31
|
*/
|
|
17
32
|
update(
|
|
18
33
|
body: ConfigurationUpdateParams,
|
|
@@ -15,6 +15,13 @@ export class Jobs extends APIResource {
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Enqueue a new sandbox job
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const job = await client.sandbox.jobs.create({
|
|
22
|
+
* type: 'data_sync_all',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
18
25
|
*/
|
|
19
26
|
create(body: JobCreateParams, options?: Core.RequestOptions): Core.APIPromise<JobCreateResponse> {
|
|
20
27
|
return this._client.post('/sandbox/jobs', { body, ...options });
|
|
@@ -9,6 +9,25 @@ import * as BenefitsAPI from '../hris/benefits/benefits';
|
|
|
9
9
|
export class Payment extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Add a new sandbox payment
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const payment = await client.sandbox.payment.create({
|
|
16
|
+
* pay_statements: [
|
|
17
|
+
* {
|
|
18
|
+
* individual_id: 'b2338cfb-472f-4f72-9faa-e028c083144a',
|
|
19
|
+
* employee_deductions: [
|
|
20
|
+
* {
|
|
21
|
+
* name: '401k test',
|
|
22
|
+
* type: '401k',
|
|
23
|
+
* amount: 2000,
|
|
24
|
+
* currency: 'usd',
|
|
25
|
+
* },
|
|
26
|
+
* ],
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
12
31
|
*/
|
|
13
32
|
create(body?: PaymentCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentCreateResponse>;
|
|
14
33
|
create(options?: Core.RequestOptions): Core.APIPromise<PaymentCreateResponse>;
|
package/src/resources/shared.ts
CHANGED
|
@@ -71,12 +71,12 @@ export interface OperationSupportMatrix {
|
|
|
71
71
|
|
|
72
72
|
export interface Paging {
|
|
73
73
|
/**
|
|
74
|
-
* The
|
|
74
|
+
* The current start index of the returned list of elements
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
offset: number;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* The
|
|
79
|
+
* The total number of elements for the entire query (not just the given page)
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
count?: number;
|
|
82
82
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.28.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.28.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.28.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|