@tryfinch/finch-api 6.21.0 → 6.22.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 +41 -0
- package/core.d.ts +11 -0
- package/core.d.ts.map +1 -1
- package/core.js +1 -1
- package/core.js.map +1 -1
- package/core.mjs +1 -1
- package/core.mjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +4 -9
- package/index.js.map +1 -1
- package/index.mjs +4 -9
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.js +6 -6
- package/pagination.js.map +1 -1
- package/pagination.mjs +6 -6
- package/pagination.mjs.map +1 -1
- package/resources/hris/benefits/benefits.d.ts +18 -0
- package/resources/hris/benefits/benefits.d.ts.map +1 -1
- package/resources/hris/benefits/benefits.js.map +1 -1
- package/resources/hris/benefits/benefits.mjs.map +1 -1
- package/resources/hris/benefits/individuals.d.ts +8 -1
- package/resources/hris/benefits/individuals.d.ts.map +1 -1
- package/resources/hris/benefits/individuals.js.map +1 -1
- package/resources/hris/benefits/individuals.mjs.map +1 -1
- package/resources/hris/company/company.d.ts +111 -0
- package/resources/hris/company/company.d.ts.map +1 -0
- package/resources/hris/company/company.js +46 -0
- package/resources/hris/company/company.js.map +1 -0
- package/resources/hris/company/company.mjs +19 -0
- package/resources/hris/company/company.mjs.map +1 -0
- package/resources/hris/company/index.d.ts +3 -0
- package/resources/hris/company/index.d.ts.map +1 -0
- package/resources/hris/company/index.js +10 -0
- package/resources/hris/company/index.js.map +1 -0
- package/resources/hris/company/index.mjs +4 -0
- package/resources/hris/company/index.mjs.map +1 -0
- package/resources/hris/company/pay-statement-item/index.d.ts +3 -0
- package/resources/hris/company/pay-statement-item/index.d.ts.map +1 -0
- package/resources/hris/company/pay-statement-item/index.js +11 -0
- package/resources/hris/company/pay-statement-item/index.js.map +1 -0
- package/resources/hris/company/pay-statement-item/index.mjs +4 -0
- package/resources/hris/company/pay-statement-item/index.mjs.map +1 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts +87 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts.map +1 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.js +55 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.js.map +1 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.mjs +27 -0
- package/resources/hris/company/pay-statement-item/pay-statement-item.mjs.map +1 -0
- package/resources/hris/company/pay-statement-item/rules.d.ts +333 -0
- package/resources/hris/company/pay-statement-item/rules.d.ts.map +1 -0
- package/resources/hris/company/pay-statement-item/rules.js +41 -0
- package/resources/hris/company/pay-statement-item/rules.js.map +1 -0
- package/resources/hris/company/pay-statement-item/rules.mjs +36 -0
- package/resources/hris/company/pay-statement-item/rules.mjs.map +1 -0
- package/resources/hris/company/pay-statement-item.d.ts +2 -0
- package/resources/hris/company/pay-statement-item.d.ts.map +1 -0
- package/resources/hris/company/pay-statement-item.js +19 -0
- package/resources/hris/company/pay-statement-item.js.map +1 -0
- package/resources/hris/company/pay-statement-item.mjs +3 -0
- package/resources/hris/company/pay-statement-item.mjs.map +1 -0
- package/resources/hris/company.d.ts +1 -106
- package/resources/hris/company.d.ts.map +1 -1
- package/resources/hris/company.js +15 -11
- package/resources/hris/company.js.map +1 -1
- package/resources/hris/company.mjs +1 -9
- package/resources/hris/company.mjs.map +1 -1
- package/resources/hris/directory.d.ts +1 -1
- package/resources/hris/employments.d.ts +8 -3
- package/resources/hris/employments.d.ts.map +1 -1
- package/resources/hris/employments.js.map +1 -1
- package/resources/hris/employments.mjs.map +1 -1
- package/resources/hris/hris.d.ts +2 -2
- package/resources/hris/hris.d.ts.map +1 -1
- package/resources/hris/hris.js +2 -2
- package/resources/hris/hris.js.map +1 -1
- package/resources/hris/hris.mjs +2 -2
- package/resources/hris/hris.mjs.map +1 -1
- package/resources/hris/index.d.ts +1 -1
- package/resources/hris/index.d.ts.map +1 -1
- package/resources/hris/index.js +2 -2
- package/resources/hris/index.js.map +1 -1
- package/resources/hris/index.mjs +1 -1
- package/src/core.ts +15 -1
- package/src/index.ts +4 -11
- package/src/pagination.ts +6 -6
- package/src/resources/hris/benefits/benefits.ts +19 -0
- package/src/resources/hris/benefits/individuals.ts +9 -1
- package/src/resources/hris/company/company.ts +160 -0
- package/src/resources/hris/company/index.ts +9 -0
- package/src/resources/hris/company/pay-statement-item/index.ts +18 -0
- package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +148 -0
- package/src/resources/hris/company/pay-statement-item/rules.ts +440 -0
- package/src/resources/hris/company/pay-statement-item.ts +3 -0
- package/src/resources/hris/company.ts +1 -137
- package/src/resources/hris/directory.ts +1 -1
- package/src/resources/hris/employments.ts +8 -3
- package/src/resources/hris/hris.ts +2 -2
- package/src/resources/hris/index.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { CompanyResource, type Company } from './company';
|
|
4
|
+
export {
|
|
5
|
+
PayStatementItemListResponsesPage,
|
|
6
|
+
PayStatementItem,
|
|
7
|
+
type PayStatementItemListResponse,
|
|
8
|
+
type PayStatementItemListParams,
|
|
9
|
+
} from './pay-statement-item/index';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
PayStatementItemListResponsesPage,
|
|
5
|
+
PayStatementItem,
|
|
6
|
+
type PayStatementItemListResponse,
|
|
7
|
+
type PayStatementItemListParams,
|
|
8
|
+
} from './pay-statement-item';
|
|
9
|
+
export {
|
|
10
|
+
RuleListResponsesPage,
|
|
11
|
+
Rules,
|
|
12
|
+
type RuleCreateResponse,
|
|
13
|
+
type RuleUpdateResponse,
|
|
14
|
+
type RuleListResponse,
|
|
15
|
+
type RuleDeleteResponse,
|
|
16
|
+
type RuleCreateParams,
|
|
17
|
+
type RuleUpdateParams,
|
|
18
|
+
} from './rules';
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../../../core';
|
|
5
|
+
import * as Core from '../../../../core';
|
|
6
|
+
import * as RulesAPI from './rules';
|
|
7
|
+
import {
|
|
8
|
+
RuleCreateParams,
|
|
9
|
+
RuleCreateResponse,
|
|
10
|
+
RuleDeleteResponse,
|
|
11
|
+
RuleListResponse,
|
|
12
|
+
RuleListResponsesPage,
|
|
13
|
+
RuleUpdateParams,
|
|
14
|
+
RuleUpdateResponse,
|
|
15
|
+
Rules,
|
|
16
|
+
} from './rules';
|
|
17
|
+
import { ResponsesPage } from '../../../../pagination';
|
|
18
|
+
|
|
19
|
+
export class PayStatementItem extends APIResource {
|
|
20
|
+
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
24
|
+
* historical support will be added soon Retrieve a list of detailed pay statement
|
|
25
|
+
* items for the access token's connection account.
|
|
26
|
+
*/
|
|
27
|
+
list(
|
|
28
|
+
query?: PayStatementItemListParams,
|
|
29
|
+
options?: Core.RequestOptions,
|
|
30
|
+
): Core.PagePromise<PayStatementItemListResponsesPage, PayStatementItemListResponse>;
|
|
31
|
+
list(
|
|
32
|
+
options?: Core.RequestOptions,
|
|
33
|
+
): Core.PagePromise<PayStatementItemListResponsesPage, PayStatementItemListResponse>;
|
|
34
|
+
list(
|
|
35
|
+
query: PayStatementItemListParams | Core.RequestOptions = {},
|
|
36
|
+
options?: Core.RequestOptions,
|
|
37
|
+
): Core.PagePromise<PayStatementItemListResponsesPage, PayStatementItemListResponse> {
|
|
38
|
+
if (isRequestOptions(query)) {
|
|
39
|
+
return this.list({}, query);
|
|
40
|
+
}
|
|
41
|
+
return this._client.getAPIList('/employer/pay-statement-item', PayStatementItemListResponsesPage, {
|
|
42
|
+
query,
|
|
43
|
+
...options,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class PayStatementItemListResponsesPage extends ResponsesPage<PayStatementItemListResponse> {}
|
|
49
|
+
|
|
50
|
+
export interface PayStatementItemListResponse {
|
|
51
|
+
/**
|
|
52
|
+
* The attributes of the pay statement item.
|
|
53
|
+
*/
|
|
54
|
+
attributes?: PayStatementItemListResponse.Attributes;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The category of the pay statement item.
|
|
58
|
+
*/
|
|
59
|
+
category?: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The name of the pay statement item.
|
|
63
|
+
*/
|
|
64
|
+
name?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export namespace PayStatementItemListResponse {
|
|
68
|
+
/**
|
|
69
|
+
* The attributes of the pay statement item.
|
|
70
|
+
*/
|
|
71
|
+
export interface Attributes {
|
|
72
|
+
/**
|
|
73
|
+
* `true` if the amount is paid by the employers. This field is only available for
|
|
74
|
+
* taxes.
|
|
75
|
+
*/
|
|
76
|
+
employer?: boolean | null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The metadata of the pay statement item derived by the rules engine if available.
|
|
80
|
+
* Each attribute will be a key-value pair defined by a rule.
|
|
81
|
+
*/
|
|
82
|
+
metadata?: unknown | null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* `true` if the pay statement item is pre-tax. This field is only available for
|
|
86
|
+
* employee deductions.
|
|
87
|
+
*/
|
|
88
|
+
pre_tax?: boolean | null;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The type of the pay statement item.
|
|
92
|
+
*/
|
|
93
|
+
type?: string | null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface PayStatementItemListParams {
|
|
98
|
+
/**
|
|
99
|
+
* Comma-delimited list of pay statement item categories to filter on. If empty,
|
|
100
|
+
* defaults to all categories.
|
|
101
|
+
*/
|
|
102
|
+
categories?: Array<'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The end date to retrieve pay statement items by via their last seen pay date in
|
|
106
|
+
* `YYYY-MM-DD` format.
|
|
107
|
+
*/
|
|
108
|
+
end_date?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Case-insensitive partial match search by pay statement item name.
|
|
112
|
+
*/
|
|
113
|
+
name?: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The start date to retrieve pay statement items by via their last seen pay date
|
|
117
|
+
* (inclusive) in `YYYY-MM-DD` format.
|
|
118
|
+
*/
|
|
119
|
+
start_date?: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* String search by pay statement item type.
|
|
123
|
+
*/
|
|
124
|
+
type?: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
PayStatementItem.PayStatementItemListResponsesPage = PayStatementItemListResponsesPage;
|
|
128
|
+
PayStatementItem.Rules = Rules;
|
|
129
|
+
PayStatementItem.RuleListResponsesPage = RuleListResponsesPage;
|
|
130
|
+
|
|
131
|
+
export declare namespace PayStatementItem {
|
|
132
|
+
export {
|
|
133
|
+
type PayStatementItemListResponse as PayStatementItemListResponse,
|
|
134
|
+
PayStatementItemListResponsesPage as PayStatementItemListResponsesPage,
|
|
135
|
+
type PayStatementItemListParams as PayStatementItemListParams,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
Rules as Rules,
|
|
140
|
+
type RuleCreateResponse as RuleCreateResponse,
|
|
141
|
+
type RuleUpdateResponse as RuleUpdateResponse,
|
|
142
|
+
type RuleListResponse as RuleListResponse,
|
|
143
|
+
type RuleDeleteResponse as RuleDeleteResponse,
|
|
144
|
+
RuleListResponsesPage as RuleListResponsesPage,
|
|
145
|
+
type RuleCreateParams as RuleCreateParams,
|
|
146
|
+
type RuleUpdateParams as RuleUpdateParams,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../../../core';
|
|
5
|
+
import * as Core from '../../../../core';
|
|
6
|
+
import { ResponsesPage } from '../../../../pagination';
|
|
7
|
+
|
|
8
|
+
export class Rules extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
11
|
+
* historical support will be added soon Custom rules can be created to associate
|
|
12
|
+
* specific attributes to pay statement items depending on the use case. For
|
|
13
|
+
* example, pay statement items that meet certain conditions can be labeled as a
|
|
14
|
+
* pre-tax 401k. This metadata can be retrieved where pay statement item
|
|
15
|
+
* information is available.
|
|
16
|
+
*/
|
|
17
|
+
create(body?: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
|
|
18
|
+
create(options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
|
|
19
|
+
create(
|
|
20
|
+
body: RuleCreateParams | Core.RequestOptions = {},
|
|
21
|
+
options?: Core.RequestOptions,
|
|
22
|
+
): Core.APIPromise<RuleCreateResponse> {
|
|
23
|
+
if (isRequestOptions(body)) {
|
|
24
|
+
return this.create({}, body);
|
|
25
|
+
}
|
|
26
|
+
return this._client.post('/employer/pay-statement-item/rule', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
31
|
+
* historical support will be added soon Update a rule for a pay statement item.
|
|
32
|
+
*/
|
|
33
|
+
update(
|
|
34
|
+
ruleId: string,
|
|
35
|
+
body?: RuleUpdateParams,
|
|
36
|
+
options?: Core.RequestOptions,
|
|
37
|
+
): Core.APIPromise<RuleUpdateResponse>;
|
|
38
|
+
update(ruleId: string, options?: Core.RequestOptions): Core.APIPromise<RuleUpdateResponse>;
|
|
39
|
+
update(
|
|
40
|
+
ruleId: string,
|
|
41
|
+
body: RuleUpdateParams | Core.RequestOptions = {},
|
|
42
|
+
options?: Core.RequestOptions,
|
|
43
|
+
): Core.APIPromise<RuleUpdateResponse> {
|
|
44
|
+
if (isRequestOptions(body)) {
|
|
45
|
+
return this.update(ruleId, {}, body);
|
|
46
|
+
}
|
|
47
|
+
return this._client.put(`/employer/pay-statement-item/rule/${ruleId}`, { body, ...options });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
52
|
+
* historical support will be added soon List all rules of a connection account.
|
|
53
|
+
*/
|
|
54
|
+
list(options?: Core.RequestOptions): Core.PagePromise<RuleListResponsesPage, RuleListResponse> {
|
|
55
|
+
return this._client.getAPIList('/employer/pay-statement-item/rule', RuleListResponsesPage, options);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
|
|
60
|
+
* historical support will be added soon Delete a rule for a pay statement item.
|
|
61
|
+
*/
|
|
62
|
+
delete(ruleId: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
|
|
63
|
+
return this._client.delete(`/employer/pay-statement-item/rule/${ruleId}`, options);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class RuleListResponsesPage extends ResponsesPage<RuleListResponse> {}
|
|
68
|
+
|
|
69
|
+
export interface RuleCreateResponse {
|
|
70
|
+
/**
|
|
71
|
+
* Finch id (uuidv4) for the rule.
|
|
72
|
+
*/
|
|
73
|
+
id?: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Specifies the fields to be applied when the condition is met.
|
|
77
|
+
*/
|
|
78
|
+
attributes?: RuleCreateResponse.Attributes;
|
|
79
|
+
|
|
80
|
+
conditions?: Array<RuleCreateResponse.Condition>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The datetime when the rule was created.
|
|
84
|
+
*/
|
|
85
|
+
created_at?: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Specifies when the rules should stop applying rules based on the date.
|
|
89
|
+
*/
|
|
90
|
+
effective_end_date?: string | null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Specifies when the rule should begin applying based on the date.
|
|
94
|
+
*/
|
|
95
|
+
effective_start_date?: string | null;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The entity type to which the rule is applied.
|
|
99
|
+
*/
|
|
100
|
+
entity_type?: 'pay_statement_item';
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The priority of the rule.
|
|
104
|
+
*/
|
|
105
|
+
priority?: number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The datetime when the rule was last updated.
|
|
109
|
+
*/
|
|
110
|
+
updated_at?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace RuleCreateResponse {
|
|
114
|
+
/**
|
|
115
|
+
* Specifies the fields to be applied when the condition is met.
|
|
116
|
+
*/
|
|
117
|
+
export interface Attributes {
|
|
118
|
+
/**
|
|
119
|
+
* The metadata to be attached in the entity. It is a key-value pairs where the
|
|
120
|
+
* values can be of any type (string, number, boolean, object, array, etc.).
|
|
121
|
+
*/
|
|
122
|
+
metadata?: Record<string, unknown>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface Condition {
|
|
126
|
+
/**
|
|
127
|
+
* The field to be checked in the rule.
|
|
128
|
+
*/
|
|
129
|
+
field?: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The operator to be used in the rule.
|
|
133
|
+
*/
|
|
134
|
+
operator?: 'equals';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The value of the field to be checked in the rule.
|
|
138
|
+
*/
|
|
139
|
+
value?: string;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface RuleUpdateResponse {
|
|
144
|
+
/**
|
|
145
|
+
* Finch id (uuidv4) for the rule.
|
|
146
|
+
*/
|
|
147
|
+
id?: string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Specifies the fields to be applied when the condition is met.
|
|
151
|
+
*/
|
|
152
|
+
attributes?: RuleUpdateResponse.Attributes;
|
|
153
|
+
|
|
154
|
+
conditions?: Array<RuleUpdateResponse.Condition>;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The datetime when the rule was created.
|
|
158
|
+
*/
|
|
159
|
+
created_at?: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Specifies when the rules should stop applying rules based on the date.
|
|
163
|
+
*/
|
|
164
|
+
effective_end_date?: string | null;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Specifies when the rule should begin applying based on the date.
|
|
168
|
+
*/
|
|
169
|
+
effective_start_date?: string | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The entity type to which the rule is applied.
|
|
173
|
+
*/
|
|
174
|
+
entity_type?: 'pay_statement_item';
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The priority of the rule.
|
|
178
|
+
*/
|
|
179
|
+
priority?: number;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The datetime when the rule was last updated.
|
|
183
|
+
*/
|
|
184
|
+
updated_at?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export namespace RuleUpdateResponse {
|
|
188
|
+
/**
|
|
189
|
+
* Specifies the fields to be applied when the condition is met.
|
|
190
|
+
*/
|
|
191
|
+
export interface Attributes {
|
|
192
|
+
/**
|
|
193
|
+
* The metadata to be attached in the entity. It is a key-value pairs where the
|
|
194
|
+
* values can be of any type (string, number, boolean, object, array, etc.).
|
|
195
|
+
*/
|
|
196
|
+
metadata?: Record<string, unknown>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface Condition {
|
|
200
|
+
/**
|
|
201
|
+
* The field to be checked in the rule.
|
|
202
|
+
*/
|
|
203
|
+
field?: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The operator to be used in the rule.
|
|
207
|
+
*/
|
|
208
|
+
operator?: 'equals';
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The value of the field to be checked in the rule.
|
|
212
|
+
*/
|
|
213
|
+
value?: string;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface RuleListResponse {
|
|
218
|
+
/**
|
|
219
|
+
* Finch id (uuidv4) for the rule.
|
|
220
|
+
*/
|
|
221
|
+
id?: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Specifies the fields to be applied when the condition is met.
|
|
225
|
+
*/
|
|
226
|
+
attributes?: RuleListResponse.Attributes;
|
|
227
|
+
|
|
228
|
+
conditions?: Array<RuleListResponse.Condition>;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The datetime when the rule was created.
|
|
232
|
+
*/
|
|
233
|
+
created_at?: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Specifies when the rules should stop applying rules based on the date.
|
|
237
|
+
*/
|
|
238
|
+
effective_end_date?: string | null;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Specifies when the rule should begin applying based on the date.
|
|
242
|
+
*/
|
|
243
|
+
effective_start_date?: string | null;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* The entity type to which the rule is applied.
|
|
247
|
+
*/
|
|
248
|
+
entity_type?: 'pay_statement_item';
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The priority of the rule.
|
|
252
|
+
*/
|
|
253
|
+
priority?: number;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The datetime when the rule was last updated.
|
|
257
|
+
*/
|
|
258
|
+
updated_at?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export namespace RuleListResponse {
|
|
262
|
+
/**
|
|
263
|
+
* Specifies the fields to be applied when the condition is met.
|
|
264
|
+
*/
|
|
265
|
+
export interface Attributes {
|
|
266
|
+
/**
|
|
267
|
+
* The metadata to be attached in the entity. It is a key-value pairs where the
|
|
268
|
+
* values can be of any type (string, number, boolean, object, array, etc.).
|
|
269
|
+
*/
|
|
270
|
+
metadata?: Record<string, unknown>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface Condition {
|
|
274
|
+
/**
|
|
275
|
+
* The field to be checked in the rule.
|
|
276
|
+
*/
|
|
277
|
+
field?: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* The operator to be used in the rule.
|
|
281
|
+
*/
|
|
282
|
+
operator?: 'equals';
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The value of the field to be checked in the rule.
|
|
286
|
+
*/
|
|
287
|
+
value?: string;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface RuleDeleteResponse {
|
|
292
|
+
/**
|
|
293
|
+
* Finch id (uuidv4) for the rule.
|
|
294
|
+
*/
|
|
295
|
+
id?: string;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Specifies the fields to be applied when the condition is met.
|
|
299
|
+
*/
|
|
300
|
+
attributes?: RuleDeleteResponse.Attributes;
|
|
301
|
+
|
|
302
|
+
conditions?: Array<RuleDeleteResponse.Condition>;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The datetime when the rule was created.
|
|
306
|
+
*/
|
|
307
|
+
created_at?: string;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* The datetime when the rule was deleted.
|
|
311
|
+
*/
|
|
312
|
+
deleted_at?: string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Specifies when the rules should stop applying rules based on the date.
|
|
316
|
+
*/
|
|
317
|
+
effective_end_date?: string | null;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Specifies when the rule should begin applying based on the date.
|
|
321
|
+
*/
|
|
322
|
+
effective_start_date?: string | null;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* The entity type to which the rule is applied.
|
|
326
|
+
*/
|
|
327
|
+
entity_type?: 'pay_statement_item';
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* The priority of the rule.
|
|
331
|
+
*/
|
|
332
|
+
priority?: number;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* The datetime when the rule was last updated.
|
|
336
|
+
*/
|
|
337
|
+
updated_at?: string;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export namespace RuleDeleteResponse {
|
|
341
|
+
/**
|
|
342
|
+
* Specifies the fields to be applied when the condition is met.
|
|
343
|
+
*/
|
|
344
|
+
export interface Attributes {
|
|
345
|
+
/**
|
|
346
|
+
* The metadata to be attached in the entity. It is a key-value pairs where the
|
|
347
|
+
* values can be of any type (string, number, boolean, object, array, etc.).
|
|
348
|
+
*/
|
|
349
|
+
metadata?: Record<string, unknown>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface Condition {
|
|
353
|
+
/**
|
|
354
|
+
* The field to be checked in the rule.
|
|
355
|
+
*/
|
|
356
|
+
field?: string;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* The operator to be used in the rule.
|
|
360
|
+
*/
|
|
361
|
+
operator?: 'equals';
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The value of the field to be checked in the rule.
|
|
365
|
+
*/
|
|
366
|
+
value?: string;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface RuleCreateParams {
|
|
371
|
+
/**
|
|
372
|
+
* Specifies the fields to be applied when the condition is met.
|
|
373
|
+
*/
|
|
374
|
+
attributes?: RuleCreateParams.Attributes;
|
|
375
|
+
|
|
376
|
+
conditions?: Array<RuleCreateParams.Condition>;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Specifies when the rules should stop applying rules based on the date.
|
|
380
|
+
*/
|
|
381
|
+
effective_end_date?: string | null;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Specifies when the rule should begin applying based on the date.
|
|
385
|
+
*/
|
|
386
|
+
effective_start_date?: string | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* The entity type to which the rule is applied.
|
|
390
|
+
*/
|
|
391
|
+
entity_type?: 'pay_statement_item';
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export namespace RuleCreateParams {
|
|
395
|
+
/**
|
|
396
|
+
* Specifies the fields to be applied when the condition is met.
|
|
397
|
+
*/
|
|
398
|
+
export interface Attributes {
|
|
399
|
+
/**
|
|
400
|
+
* The metadata to be attached in the entity. It is a key-value pairs where the
|
|
401
|
+
* values can be of any type (string, number, boolean, object, array, etc.).
|
|
402
|
+
*/
|
|
403
|
+
metadata?: Record<string, unknown>;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export interface Condition {
|
|
407
|
+
/**
|
|
408
|
+
* The field to be checked in the rule.
|
|
409
|
+
*/
|
|
410
|
+
field?: string;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* The operator to be used in the rule.
|
|
414
|
+
*/
|
|
415
|
+
operator?: 'equals';
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The value of the field to be checked in the rule.
|
|
419
|
+
*/
|
|
420
|
+
value?: string;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface RuleUpdateParams {
|
|
425
|
+
optionalProperty?: unknown;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
Rules.RuleListResponsesPage = RuleListResponsesPage;
|
|
429
|
+
|
|
430
|
+
export declare namespace Rules {
|
|
431
|
+
export {
|
|
432
|
+
type RuleCreateResponse as RuleCreateResponse,
|
|
433
|
+
type RuleUpdateResponse as RuleUpdateResponse,
|
|
434
|
+
type RuleListResponse as RuleListResponse,
|
|
435
|
+
type RuleDeleteResponse as RuleDeleteResponse,
|
|
436
|
+
RuleListResponsesPage as RuleListResponsesPage,
|
|
437
|
+
type RuleCreateParams as RuleCreateParams,
|
|
438
|
+
type RuleUpdateParams as RuleUpdateParams,
|
|
439
|
+
};
|
|
440
|
+
}
|