@tryfinch/finch-api 6.15.0 → 6.16.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 +31 -0
- package/core.d.ts.map +1 -1
- package/core.js +12 -6
- package/core.js.map +1 -1
- package/core.mjs +12 -6
- package/core.mjs.map +1 -1
- package/index.d.mts +6 -6
- package/index.d.ts +6 -6
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/pagination.d.ts.map +1 -1
- package/pagination.js +16 -2
- package/pagination.js.map +1 -1
- package/pagination.mjs +16 -2
- package/pagination.mjs.map +1 -1
- package/resources/access-tokens.d.ts +2 -2
- package/resources/account.d.ts +3 -3
- package/resources/connect/sessions.d.ts +2 -2
- package/resources/hris/employments.d.ts +1 -1
- package/resources/jobs/automated.d.ts +26 -6
- package/resources/jobs/automated.d.ts.map +1 -1
- package/resources/jobs/automated.js.map +1 -1
- package/resources/jobs/automated.mjs.map +1 -1
- package/resources/sandbox/connections/accounts.d.ts +4 -4
- package/resources/sandbox/connections/connections.d.ts +2 -2
- package/resources/webhooks.d.ts +2 -2
- package/src/core.ts +14 -6
- package/src/index.ts +6 -6
- package/src/pagination.ts +20 -2
- package/src/resources/access-tokens.ts +2 -2
- package/src/resources/account.ts +3 -3
- package/src/resources/connect/sessions.ts +2 -2
- package/src/resources/hris/employments.ts +1 -1
- package/src/resources/jobs/automated.ts +29 -6
- package/src/resources/sandbox/connections/accounts.ts +4 -4
- package/src/resources/sandbox/connections/connections.ts +2 -2
- package/src/resources/webhooks.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/pagination.js
CHANGED
|
@@ -73,7 +73,14 @@ class IndividualsPage extends core_1.AbstractPage {
|
|
|
73
73
|
}
|
|
74
74
|
const length = this.getPaginatedItems().length;
|
|
75
75
|
const currentCount = offset + length;
|
|
76
|
-
|
|
76
|
+
const totalCount = this.paging.count;
|
|
77
|
+
if (!totalCount) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
if (currentCount < totalCount) {
|
|
81
|
+
return { params: { offset: currentCount } };
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
exports.IndividualsPage = IndividualsPage;
|
|
@@ -105,7 +112,14 @@ class Page extends core_1.AbstractPage {
|
|
|
105
112
|
}
|
|
106
113
|
const length = this.getPaginatedItems().length;
|
|
107
114
|
const currentCount = offset + length;
|
|
108
|
-
|
|
115
|
+
const totalCount = this.paging.count;
|
|
116
|
+
if (!totalCount) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
if (currentCount < totalCount) {
|
|
120
|
+
return { params: { offset: currentCount } };
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
109
123
|
}
|
|
110
124
|
}
|
|
111
125
|
exports.Page = Page;
|
package/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAA0F;AAM1F,MAAa,UAAiB,SAAQ,mBAAkB;IAGtD,YACE,MAAiB,EACjB,QAAkB,EAClB,IAA8B,EAC9B,OAA4B;QAE5B,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IAC1B,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IAC1B,CAAC;IAED,kDAAkD;IAClD;;;OAGG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9BD,gCA8BC;AAMD,MAAa,aAAoB,SAAQ,mBAAkB;IAGzD,YACE,MAAiB,EACjB,QAAkB,E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QACrC,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QAED,IAAI,YAAY,GAAG,UAAU,EAAE;YAC7B,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC;SAC7C;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9CD,oBA8CC"}
|
package/pagination.mjs
CHANGED
|
@@ -68,7 +68,14 @@ export class IndividualsPage extends AbstractPage {
|
|
|
68
68
|
}
|
|
69
69
|
const length = this.getPaginatedItems().length;
|
|
70
70
|
const currentCount = offset + length;
|
|
71
|
-
|
|
71
|
+
const totalCount = this.paging.count;
|
|
72
|
+
if (!totalCount) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
if (currentCount < totalCount) {
|
|
76
|
+
return { params: { offset: currentCount } };
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
72
79
|
}
|
|
73
80
|
}
|
|
74
81
|
export class Page extends AbstractPage {
|
|
@@ -99,7 +106,14 @@ export class Page extends AbstractPage {
|
|
|
99
106
|
}
|
|
100
107
|
const length = this.getPaginatedItems().length;
|
|
101
108
|
const currentCount = offset + length;
|
|
102
|
-
|
|
109
|
+
const totalCount = this.paging.count;
|
|
110
|
+
if (!totalCount) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
if (currentCount < totalCount) {
|
|
114
|
+
return { params: { offset: currentCount } };
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
103
117
|
}
|
|
104
118
|
}
|
|
105
119
|
//# sourceMappingURL=pagination.mjs.map
|
package/pagination.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.mjs","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,YAAY,EAAsD;AAM3E,MAAM,OAAO,UAAiB,SAAQ,YAAkB;IAGtD,YACE,MAAiB,EACjB,QAAkB,EAClB,IAA8B,E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I,CAAC,MAAM,CAAC,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC7C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAAY;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAClC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,IAAI,CAAC;SACb;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC;QAC/C,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;QAErC,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QACrC,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QAED,IAAI,YAAY,GAAG,UAAU,EAAE;YAC7B,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC;SAC7C;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -12,7 +12,7 @@ export interface CreateAccessTokenResponse {
|
|
|
12
12
|
*/
|
|
13
13
|
access_token: string;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated
|
|
15
|
+
* @deprecated [DEPRECATED] Use `connection_id` to identify the connection instead
|
|
16
16
|
* of this account ID.
|
|
17
17
|
*/
|
|
18
18
|
account_id: string;
|
|
@@ -21,7 +21,7 @@ export interface CreateAccessTokenResponse {
|
|
|
21
21
|
*/
|
|
22
22
|
client_type: 'production' | 'development' | 'sandbox';
|
|
23
23
|
/**
|
|
24
|
-
* @deprecated
|
|
24
|
+
* @deprecated [DEPRECATED] Use `connection_id` to identify the connection instead
|
|
25
25
|
* of this company ID.
|
|
26
26
|
*/
|
|
27
27
|
company_id: string;
|
package/resources/account.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface DisconnectResponse {
|
|
|
19
19
|
}
|
|
20
20
|
export interface Introspection {
|
|
21
21
|
/**
|
|
22
|
-
* @deprecated
|
|
22
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate tokens with a Finch
|
|
23
23
|
* connection instead of this account ID.
|
|
24
24
|
*/
|
|
25
25
|
account_id: string;
|
|
@@ -33,7 +33,7 @@ export interface Introspection {
|
|
|
33
33
|
*/
|
|
34
34
|
client_type: 'production' | 'development' | 'sandbox';
|
|
35
35
|
/**
|
|
36
|
-
* @deprecated
|
|
36
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate tokens with a Finch
|
|
37
37
|
* connection instead of this company ID.
|
|
38
38
|
*/
|
|
39
39
|
company_id: string;
|
|
@@ -71,7 +71,7 @@ export interface Introspection {
|
|
|
71
71
|
*/
|
|
72
72
|
manual: boolean;
|
|
73
73
|
/**
|
|
74
|
-
* @deprecated
|
|
74
|
+
* @deprecated [DEPRECATED] Use `provider_id` to identify the provider instead of
|
|
75
75
|
* this payroll provider ID.
|
|
76
76
|
*/
|
|
77
77
|
payroll_provider_id: string;
|
|
@@ -38,7 +38,7 @@ export interface SessionNewParams {
|
|
|
38
38
|
integration?: SessionNewParams.Integration | null;
|
|
39
39
|
manual?: boolean | null;
|
|
40
40
|
/**
|
|
41
|
-
* The number of minutes until the session expires (defaults to
|
|
41
|
+
* The number of minutes until the session expires (defaults to 43,200, which is 30
|
|
42
42
|
* days)
|
|
43
43
|
*/
|
|
44
44
|
minutes_to_expire?: number | null;
|
|
@@ -57,7 +57,7 @@ export interface SessionReauthenticateParams {
|
|
|
57
57
|
*/
|
|
58
58
|
connection_id: string;
|
|
59
59
|
/**
|
|
60
|
-
* The number of minutes until the session expires (defaults to
|
|
60
|
+
* The number of minutes until the session expires (defaults to 43,200, which is 30
|
|
61
61
|
* days)
|
|
62
62
|
*/
|
|
63
63
|
minutes_to_expire?: number | null;
|
|
@@ -52,6 +52,10 @@ export interface AutomatedAsyncJob {
|
|
|
52
52
|
* The url that can be used to retrieve the job status
|
|
53
53
|
*/
|
|
54
54
|
job_url: string;
|
|
55
|
+
/**
|
|
56
|
+
* The input parameters for the job.
|
|
57
|
+
*/
|
|
58
|
+
params: AutomatedAsyncJob.Params | null;
|
|
55
59
|
/**
|
|
56
60
|
* The datetime a job is scheduled to be run. For scheduled jobs, this datetime can
|
|
57
61
|
* be in the future if the job has not yet been enqueued. For ad-hoc jobs, this
|
|
@@ -64,9 +68,20 @@ export interface AutomatedAsyncJob {
|
|
|
64
68
|
started_at: string | null;
|
|
65
69
|
status: 'pending' | 'in_progress' | 'complete' | 'error' | 'reauth_error' | 'permissions_error';
|
|
66
70
|
/**
|
|
67
|
-
*
|
|
71
|
+
* The type of automated job
|
|
68
72
|
*/
|
|
69
|
-
type: 'data_sync_all';
|
|
73
|
+
type: 'data_sync_all' | 'w4_form_employee_sync';
|
|
74
|
+
}
|
|
75
|
+
export declare namespace AutomatedAsyncJob {
|
|
76
|
+
/**
|
|
77
|
+
* The input parameters for the job.
|
|
78
|
+
*/
|
|
79
|
+
interface Params {
|
|
80
|
+
/**
|
|
81
|
+
* The ID of the individual that the job was completed for.
|
|
82
|
+
*/
|
|
83
|
+
individual_id?: string;
|
|
84
|
+
}
|
|
70
85
|
}
|
|
71
86
|
export interface AutomatedCreateResponse {
|
|
72
87
|
/**
|
|
@@ -95,15 +110,20 @@ export declare namespace AutomatedCreateParams {
|
|
|
95
110
|
type: 'data_sync_all';
|
|
96
111
|
}
|
|
97
112
|
interface W4FormEmployeeSync {
|
|
98
|
-
|
|
99
|
-
* The unique ID of the individual for W-4 data sync.
|
|
100
|
-
*/
|
|
101
|
-
individual_id: string;
|
|
113
|
+
params: W4FormEmployeeSync.Params;
|
|
102
114
|
/**
|
|
103
115
|
* The type of job to start.
|
|
104
116
|
*/
|
|
105
117
|
type: 'w4_form_employee_sync';
|
|
106
118
|
}
|
|
119
|
+
namespace W4FormEmployeeSync {
|
|
120
|
+
interface Params {
|
|
121
|
+
/**
|
|
122
|
+
* The unique ID of the individual for W-4 data sync.
|
|
123
|
+
*/
|
|
124
|
+
individual_id: string;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
107
127
|
}
|
|
108
128
|
export interface AutomatedListParams extends PageParams {
|
|
109
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automated.d.ts","sourceRoot":"","sources":["../../src/resources/jobs/automated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAI3C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAI1F;;;;OAIG;IACH,IAAI,CACF,KAAK,CAAC,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;IAC9D,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;CAUjG;AAED,qBAAa,sBAAuB,SAAQ,IAAI,CAAC,iBAAiB,CAAC;CAAG;AAEtE,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;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ated.js","sourceRoot":"","sources":["../../src/resources/jobs/automated.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAE9C,oDAAyD;AAEzD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAYD,IAAI,CACF,QAAmD,EAAE,EACrD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;CACF;AAlDD,8BAkDC;AAED,MAAa,sBAAuB,SAAQ,iBAAuB;CAAG;AAAtE,wDAAsE;AAqHtE,SAAS,CAAC,sBAAsB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automated.mjs","sourceRoot":"","sources":["../../src/resources/jobs/automated.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAA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A6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,IAAuB;CAAG;AAqHtE,SAAS,CAAC,sBAAsB,GAAG,sBAAsB,CAAC"}
|
|
@@ -16,13 +16,13 @@ export declare class Accounts extends APIResource {
|
|
|
16
16
|
export interface AccountCreateResponse {
|
|
17
17
|
access_token: string;
|
|
18
18
|
/**
|
|
19
|
-
* @deprecated
|
|
19
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
20
20
|
* access token
|
|
21
21
|
*/
|
|
22
22
|
account_id: string;
|
|
23
23
|
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
24
24
|
/**
|
|
25
|
-
* @deprecated
|
|
25
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
26
26
|
* access token
|
|
27
27
|
*/
|
|
28
28
|
company_id: string;
|
|
@@ -38,13 +38,13 @@ export interface AccountCreateResponse {
|
|
|
38
38
|
}
|
|
39
39
|
export interface AccountUpdateResponse {
|
|
40
40
|
/**
|
|
41
|
-
* @deprecated
|
|
41
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
42
42
|
* access token
|
|
43
43
|
*/
|
|
44
44
|
account_id: string;
|
|
45
45
|
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
46
46
|
/**
|
|
47
|
-
* @deprecated
|
|
47
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
48
48
|
* access token
|
|
49
49
|
*/
|
|
50
50
|
company_id: string;
|
|
@@ -12,13 +12,13 @@ export declare class Connections extends APIResource {
|
|
|
12
12
|
export interface ConnectionCreateResponse {
|
|
13
13
|
access_token: string;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated
|
|
15
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
16
16
|
* access token
|
|
17
17
|
*/
|
|
18
18
|
account_id: string;
|
|
19
19
|
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
20
20
|
/**
|
|
21
|
-
* @deprecated
|
|
21
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
22
22
|
* access token
|
|
23
23
|
*/
|
|
24
24
|
company_id: string;
|
package/resources/webhooks.d.ts
CHANGED
|
@@ -283,13 +283,13 @@ export declare namespace AccountUpdateEvent {
|
|
|
283
283
|
}
|
|
284
284
|
export interface BaseWebhookEvent {
|
|
285
285
|
/**
|
|
286
|
-
* @deprecated
|
|
286
|
+
* @deprecated [DEPRECATED] Unique Finch ID of the employer account used to make
|
|
287
287
|
* this connection. Use `connection_id` instead to identify the connection
|
|
288
288
|
* associated with this event.
|
|
289
289
|
*/
|
|
290
290
|
account_id: string;
|
|
291
291
|
/**
|
|
292
|
-
* @deprecated
|
|
292
|
+
* @deprecated [DEPRECATED] Unique Finch ID of the company for which data has been
|
|
293
293
|
* updated. Use `connection_id` instead to identify the connection associated with
|
|
294
294
|
* this event.
|
|
295
295
|
*/
|
package/src/core.ts
CHANGED
|
@@ -280,6 +280,7 @@ export abstract class APIClient {
|
|
|
280
280
|
options: FinalRequestOptions<Req>,
|
|
281
281
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
282
282
|
): { req: RequestInit; url: string; timeout: number } {
|
|
283
|
+
options = { ...options };
|
|
283
284
|
const { method, path, query, headers: headers = {} } = options;
|
|
284
285
|
|
|
285
286
|
const body =
|
|
@@ -292,9 +293,9 @@ export abstract class APIClient {
|
|
|
292
293
|
|
|
293
294
|
const url = this.buildURL(path!, query);
|
|
294
295
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
295
|
-
|
|
296
|
+
options.timeout = options.timeout ?? this.timeout;
|
|
296
297
|
const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
|
|
297
|
-
const minAgentTimeout = timeout + 1000;
|
|
298
|
+
const minAgentTimeout = options.timeout + 1000;
|
|
298
299
|
if (
|
|
299
300
|
typeof (httpAgent as any)?.options?.timeout === 'number' &&
|
|
300
301
|
minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
|
|
@@ -323,7 +324,7 @@ export abstract class APIClient {
|
|
|
323
324
|
signal: options.signal ?? null,
|
|
324
325
|
};
|
|
325
326
|
|
|
326
|
-
return { req, url, timeout };
|
|
327
|
+
return { req, url, timeout: options.timeout };
|
|
327
328
|
}
|
|
328
329
|
|
|
329
330
|
private buildHeaders({
|
|
@@ -351,15 +352,22 @@ export abstract class APIClient {
|
|
|
351
352
|
delete reqHeaders['content-type'];
|
|
352
353
|
}
|
|
353
354
|
|
|
354
|
-
// Don't set
|
|
355
|
-
//
|
|
356
|
-
//
|
|
355
|
+
// Don't set theses headers if they were already set or removed through default headers or by the caller.
|
|
356
|
+
// We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to account
|
|
357
|
+
// for the removal case.
|
|
357
358
|
if (
|
|
358
359
|
getHeader(defaultHeaders, 'x-stainless-retry-count') === undefined &&
|
|
359
360
|
getHeader(headers, 'x-stainless-retry-count') === undefined
|
|
360
361
|
) {
|
|
361
362
|
reqHeaders['x-stainless-retry-count'] = String(retryCount);
|
|
362
363
|
}
|
|
364
|
+
if (
|
|
365
|
+
getHeader(defaultHeaders, 'x-stainless-timeout') === undefined &&
|
|
366
|
+
getHeader(headers, 'x-stainless-timeout') === undefined &&
|
|
367
|
+
options.timeout
|
|
368
|
+
) {
|
|
369
|
+
reqHeaders['x-stainless-timeout'] = String(options.timeout);
|
|
370
|
+
}
|
|
363
371
|
|
|
364
372
|
this.validateHeaders(reqHeaders, headers);
|
|
365
373
|
|
package/src/index.ts
CHANGED
|
@@ -74,7 +74,7 @@ export interface ClientOptions {
|
|
|
74
74
|
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
75
75
|
* much longer than this timeout before the promise succeeds or fails.
|
|
76
76
|
*/
|
|
77
|
-
timeout?: number;
|
|
77
|
+
timeout?: number | undefined;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* An HTTP agent used to manage HTTP(S) connections.
|
|
@@ -82,7 +82,7 @@ export interface ClientOptions {
|
|
|
82
82
|
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
83
83
|
* otherwise no agent is used.
|
|
84
84
|
*/
|
|
85
|
-
httpAgent?: Agent;
|
|
85
|
+
httpAgent?: Agent | undefined;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Specify a custom `fetch` function implementation.
|
|
@@ -98,7 +98,7 @@ export interface ClientOptions {
|
|
|
98
98
|
*
|
|
99
99
|
* @default 2
|
|
100
100
|
*/
|
|
101
|
-
maxRetries?: number;
|
|
101
|
+
maxRetries?: number | undefined;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Default headers to include with every request to the API.
|
|
@@ -106,7 +106,7 @@ export interface ClientOptions {
|
|
|
106
106
|
* These can be removed in individual requests by explicitly setting the
|
|
107
107
|
* header to `undefined` or `null` in request options.
|
|
108
108
|
*/
|
|
109
|
-
defaultHeaders?: Core.Headers;
|
|
109
|
+
defaultHeaders?: Core.Headers | undefined;
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* Default query parameters to include with every request to the API.
|
|
@@ -114,13 +114,13 @@ export interface ClientOptions {
|
|
|
114
114
|
* These can be removed in individual requests by explicitly setting the
|
|
115
115
|
* param to `undefined` in request options.
|
|
116
116
|
*/
|
|
117
|
-
defaultQuery?: Core.DefaultQuery;
|
|
117
|
+
defaultQuery?: Core.DefaultQuery | undefined;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
|
|
121
121
|
* Only set this option to `true` if you understand the risks and have appropriate mitigations in place.
|
|
122
122
|
*/
|
|
123
|
-
dangerouslyAllowBrowser?: boolean;
|
|
123
|
+
dangerouslyAllowBrowser?: boolean | undefined;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
package/src/pagination.ts
CHANGED
|
@@ -141,7 +141,16 @@ export class IndividualsPage
|
|
|
141
141
|
const length = this.getPaginatedItems().length;
|
|
142
142
|
const currentCount = offset + length;
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
const totalCount = this.paging.count;
|
|
145
|
+
if (!totalCount) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (currentCount < totalCount) {
|
|
150
|
+
return { params: { offset: currentCount } };
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return null;
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
156
|
|
|
@@ -198,6 +207,15 @@ export class Page<Item> extends AbstractPage<Item> implements PageResponse<Item>
|
|
|
198
207
|
const length = this.getPaginatedItems().length;
|
|
199
208
|
const currentCount = offset + length;
|
|
200
209
|
|
|
201
|
-
|
|
210
|
+
const totalCount = this.paging.count;
|
|
211
|
+
if (!totalCount) {
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (currentCount < totalCount) {
|
|
216
|
+
return { params: { offset: currentCount } };
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return null;
|
|
202
220
|
}
|
|
203
221
|
}
|
|
@@ -45,7 +45,7 @@ export interface CreateAccessTokenResponse {
|
|
|
45
45
|
access_token: string;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* @deprecated
|
|
48
|
+
* @deprecated [DEPRECATED] Use `connection_id` to identify the connection instead
|
|
49
49
|
* of this account ID.
|
|
50
50
|
*/
|
|
51
51
|
account_id: string;
|
|
@@ -56,7 +56,7 @@ export interface CreateAccessTokenResponse {
|
|
|
56
56
|
client_type: 'production' | 'development' | 'sandbox';
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* @deprecated
|
|
59
|
+
* @deprecated [DEPRECATED] Use `connection_id` to identify the connection instead
|
|
60
60
|
* of this company ID.
|
|
61
61
|
*/
|
|
62
62
|
company_id: string;
|
package/src/resources/account.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface DisconnectResponse {
|
|
|
29
29
|
|
|
30
30
|
export interface Introspection {
|
|
31
31
|
/**
|
|
32
|
-
* @deprecated
|
|
32
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate tokens with a Finch
|
|
33
33
|
* connection instead of this account ID.
|
|
34
34
|
*/
|
|
35
35
|
account_id: string;
|
|
@@ -47,7 +47,7 @@ export interface Introspection {
|
|
|
47
47
|
client_type: 'production' | 'development' | 'sandbox';
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* @deprecated
|
|
50
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate tokens with a Finch
|
|
51
51
|
* connection instead of this company ID.
|
|
52
52
|
*/
|
|
53
53
|
company_id: string;
|
|
@@ -93,7 +93,7 @@ export interface Introspection {
|
|
|
93
93
|
manual: boolean;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* @deprecated
|
|
96
|
+
* @deprecated [DEPRECATED] Use `provider_id` to identify the provider instead of
|
|
97
97
|
* this payroll provider ID.
|
|
98
98
|
*/
|
|
99
99
|
payroll_provider_id: string;
|
|
@@ -62,7 +62,7 @@ export interface SessionNewParams {
|
|
|
62
62
|
manual?: boolean | null;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* The number of minutes until the session expires (defaults to
|
|
65
|
+
* The number of minutes until the session expires (defaults to 43,200, which is 30
|
|
66
66
|
* days)
|
|
67
67
|
*/
|
|
68
68
|
minutes_to_expire?: number | null;
|
|
@@ -87,7 +87,7 @@ export interface SessionReauthenticateParams {
|
|
|
87
87
|
connection_id: string;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* The number of minutes until the session expires (defaults to
|
|
90
|
+
* The number of minutes until the session expires (defaults to 43,200, which is 30
|
|
91
91
|
* days)
|
|
92
92
|
*/
|
|
93
93
|
minutes_to_expire?: number | null;
|
|
@@ -82,6 +82,11 @@ export interface AutomatedAsyncJob {
|
|
|
82
82
|
*/
|
|
83
83
|
job_url: string;
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* The input parameters for the job.
|
|
87
|
+
*/
|
|
88
|
+
params: AutomatedAsyncJob.Params | null;
|
|
89
|
+
|
|
85
90
|
/**
|
|
86
91
|
* The datetime a job is scheduled to be run. For scheduled jobs, this datetime can
|
|
87
92
|
* be in the future if the job has not yet been enqueued. For ad-hoc jobs, this
|
|
@@ -97,9 +102,21 @@ export interface AutomatedAsyncJob {
|
|
|
97
102
|
status: 'pending' | 'in_progress' | 'complete' | 'error' | 'reauth_error' | 'permissions_error';
|
|
98
103
|
|
|
99
104
|
/**
|
|
100
|
-
*
|
|
105
|
+
* The type of automated job
|
|
101
106
|
*/
|
|
102
|
-
type: 'data_sync_all';
|
|
107
|
+
type: 'data_sync_all' | 'w4_form_employee_sync';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export namespace AutomatedAsyncJob {
|
|
111
|
+
/**
|
|
112
|
+
* The input parameters for the job.
|
|
113
|
+
*/
|
|
114
|
+
export interface Params {
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the individual that the job was completed for.
|
|
117
|
+
*/
|
|
118
|
+
individual_id?: string;
|
|
119
|
+
}
|
|
103
120
|
}
|
|
104
121
|
|
|
105
122
|
export interface AutomatedCreateResponse {
|
|
@@ -137,16 +154,22 @@ export declare namespace AutomatedCreateParams {
|
|
|
137
154
|
}
|
|
138
155
|
|
|
139
156
|
export interface W4FormEmployeeSync {
|
|
140
|
-
|
|
141
|
-
* The unique ID of the individual for W-4 data sync.
|
|
142
|
-
*/
|
|
143
|
-
individual_id: string;
|
|
157
|
+
params: W4FormEmployeeSync.Params;
|
|
144
158
|
|
|
145
159
|
/**
|
|
146
160
|
* The type of job to start.
|
|
147
161
|
*/
|
|
148
162
|
type: 'w4_form_employee_sync';
|
|
149
163
|
}
|
|
164
|
+
|
|
165
|
+
export namespace W4FormEmployeeSync {
|
|
166
|
+
export interface Params {
|
|
167
|
+
/**
|
|
168
|
+
* The unique ID of the individual for W-4 data sync.
|
|
169
|
+
*/
|
|
170
|
+
individual_id: string;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
150
173
|
}
|
|
151
174
|
|
|
152
175
|
export interface AutomatedListParams extends PageParams {}
|
|
@@ -34,7 +34,7 @@ export interface AccountCreateResponse {
|
|
|
34
34
|
access_token: string;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @deprecated
|
|
37
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
38
38
|
* access token
|
|
39
39
|
*/
|
|
40
40
|
account_id: string;
|
|
@@ -42,7 +42,7 @@ export interface AccountCreateResponse {
|
|
|
42
42
|
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* @deprecated
|
|
45
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
46
46
|
* access token
|
|
47
47
|
*/
|
|
48
48
|
company_id: string;
|
|
@@ -62,7 +62,7 @@ export interface AccountCreateResponse {
|
|
|
62
62
|
|
|
63
63
|
export interface AccountUpdateResponse {
|
|
64
64
|
/**
|
|
65
|
-
* @deprecated
|
|
65
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
66
66
|
* access token
|
|
67
67
|
*/
|
|
68
68
|
account_id: string;
|
|
@@ -70,7 +70,7 @@ export interface AccountUpdateResponse {
|
|
|
70
70
|
authentication_type: 'credential' | 'api_token' | 'oauth' | 'assisted';
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* @deprecated
|
|
73
|
+
* @deprecated [DEPRECATED] Use `connection_id` to associate a connection with an
|
|
74
74
|
* access token
|
|
75
75
|
*/
|
|
76
76
|
company_id: string;
|