@tryfinch/finch-api 3.0.0 → 3.1.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 +167 -0
- package/LICENSE +201 -0
- package/README.md +225 -0
- package/core.d.ts +5 -1
- package/core.d.ts.map +1 -1
- package/core.js +45 -11
- package/core.js.map +1 -1
- package/core.mjs +46 -12
- package/core.mjs.map +1 -1
- package/error.d.ts +4 -0
- package/error.d.ts.map +1 -1
- package/error.js +8 -0
- package/error.js.map +1 -1
- package/error.mjs +6 -0
- package/error.mjs.map +1 -1
- package/index.d.mts +9 -0
- package/index.d.ts +9 -0
- package/index.d.ts.map +1 -1
- package/index.js +4 -0
- package/index.js.map +1 -1
- package/index.mjs +3 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/_shims/fileFromPath.node.ts +1 -1
- package/src/_shims/fileFromPath.ts +1 -1
- package/src/_shims/getMultipartRequestOptions.node.ts +1 -1
- package/src/_shims/getMultipartRequestOptions.ts +1 -1
- package/src/core.ts +47 -11
- package/src/error.ts +8 -0
- package/src/index.ts +12 -1
- package/src/resources/account.ts +3 -3
- package/src/resources/ats/applications.ts +6 -6
- package/src/resources/ats/ats.ts +2 -2
- package/src/resources/ats/candidates.ts +5 -5
- package/src/resources/ats/jobs.ts +5 -5
- package/src/resources/ats/offers.ts +5 -5
- package/src/resources/ats/stages.ts +4 -4
- package/src/resources/hris/benefits/benefits.ts +5 -5
- package/src/resources/hris/benefits/individuals.ts +6 -6
- package/src/resources/hris/company.ts +4 -4
- package/src/resources/hris/directory.ts +5 -5
- package/src/resources/hris/hris.ts +2 -2
- package/src/resources/hris/individuals/employment-data.ts +5 -5
- package/src/resources/hris/individuals/individuals.ts +6 -6
- package/src/resources/hris/pay-statements.ts +6 -6
- package/src/resources/hris/payments.ts +5 -5
- package/src/resources/providers.ts +4 -4
- package/src/streaming.ts +146 -76
- package/src/uploads.ts +10 -9
- package/src/version.ts +1 -1
- package/streaming.d.ts.map +1 -1
- package/streaming.js +115 -57
- package/streaming.js.map +1 -1
- package/streaming.mjs +115 -57
- package/streaming.mjs.map +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +2 -1
- package/uploads.js.map +1 -1
- package/uploads.mjs +2 -1
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/index.js
CHANGED
|
@@ -51,6 +51,7 @@ exports.fileFromPath =
|
|
|
51
51
|
exports.RateLimitError =
|
|
52
52
|
exports.ConflictError =
|
|
53
53
|
exports.NotFoundError =
|
|
54
|
+
exports.APIUserAbortError =
|
|
54
55
|
exports.APIConnectionTimeoutError =
|
|
55
56
|
exports.APIConnectionError =
|
|
56
57
|
exports.APIError =
|
|
@@ -75,6 +76,7 @@ class Finch extends Core.APIClient {
|
|
|
75
76
|
timeout: options.timeout,
|
|
76
77
|
httpAgent: options.httpAgent,
|
|
77
78
|
maxRetries: options.maxRetries,
|
|
79
|
+
fetch: options.fetch,
|
|
78
80
|
});
|
|
79
81
|
this.ats = new API.ATS(this);
|
|
80
82
|
this.hris = new API.HRIS(this);
|
|
@@ -171,6 +173,7 @@ exports.Finch = Finch;
|
|
|
171
173
|
Finch.APIError = Errors.APIError;
|
|
172
174
|
Finch.APIConnectionError = Errors.APIConnectionError;
|
|
173
175
|
Finch.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
176
|
+
Finch.APIUserAbortError = Errors.APIUserAbortError;
|
|
174
177
|
Finch.NotFoundError = Errors.NotFoundError;
|
|
175
178
|
Finch.ConflictError = Errors.ConflictError;
|
|
176
179
|
Finch.RateLimitError = Errors.RateLimitError;
|
|
@@ -182,6 +185,7 @@ Finch.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
|
182
185
|
(exports.APIError = Errors.APIError),
|
|
183
186
|
(exports.APIConnectionError = Errors.APIConnectionError),
|
|
184
187
|
(exports.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError),
|
|
188
|
+
(exports.APIUserAbortError = Errors.APIUserAbortError),
|
|
185
189
|
(exports.NotFoundError = Errors.NotFoundError),
|
|
186
190
|
(exports.ConflictError = Errors.ConflictError),
|
|
187
191
|
(exports.RateLimitError = Errors.RateLimitError),
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAErD,uCAAyB;AACzB,gDAA+B;AAC/B,4DAA2C;AAC3C,0DAAyC;AACzC,mDAAkC;AAElC,sDAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAErD,uCAAyB;AACzB,gDAA+B;AAC/B,4DAA2C;AAC3C,0DAAyC;AACzC,mDAAkC;AAElC,sDAAqC;AAmErC,kCAAkC;AAClC,MAAa,KAAM,SAAQ,IAAI,CAAC,SAAS;IAOvC,YAAY,MAAe;QACzB,MAAM,OAAO,GAAW;YACtB,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,0BAA0B;YACnC,GAAG,MAAM;SACV,CAAC;QAEF,KAAK,CAAC;YACJ,OAAO,EAAE,OAAO,CAAC,OAAQ;YACzB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QAQL,QAAG,GAAY,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,SAAI,GAAa,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,cAAS,GAAkB,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC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GAAG,UAAU,CAAC,QAAQ,CAAC;IAI/B,gBAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IAInC,SAAG,GAAG,GAAG,CAAC,GAAG,CAAC;IAEd,UAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAMhB,eAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAE1B,yBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAE9C,aAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AAGtC,CAAC,EA9CgB,KAAK,GAAL,aAAK,KAAL,aAAK,QA8CrB;AAED,kBAAe,KAAK,CAAC"}
|
package/index.mjs
CHANGED
|
@@ -18,6 +18,7 @@ export class Finch extends Core.APIClient {
|
|
|
18
18
|
timeout: options.timeout,
|
|
19
19
|
httpAgent: options.httpAgent,
|
|
20
20
|
maxRetries: options.maxRetries,
|
|
21
|
+
fetch: options.fetch,
|
|
21
22
|
});
|
|
22
23
|
this.ats = new API.ATS(this);
|
|
23
24
|
this.hris = new API.HRIS(this);
|
|
@@ -113,6 +114,7 @@ export class Finch extends Core.APIClient {
|
|
|
113
114
|
Finch.APIError = Errors.APIError;
|
|
114
115
|
Finch.APIConnectionError = Errors.APIConnectionError;
|
|
115
116
|
Finch.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
117
|
+
Finch.APIUserAbortError = Errors.APIUserAbortError;
|
|
116
118
|
Finch.NotFoundError = Errors.NotFoundError;
|
|
117
119
|
Finch.ConflictError = Errors.ConflictError;
|
|
118
120
|
Finch.RateLimitError = Errors.RateLimitError;
|
|
@@ -125,6 +127,7 @@ export const {
|
|
|
125
127
|
APIError,
|
|
126
128
|
APIConnectionError,
|
|
127
129
|
APIConnectionTimeoutError,
|
|
130
|
+
APIUserAbortError,
|
|
128
131
|
NotFoundError,
|
|
129
132
|
ConflictError,
|
|
130
133
|
RateLimitError,
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceR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
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { fileFromPath as _fileFromPath } from 'formdata-node/file-from-path';
|
|
6
|
-
import type { File, FilePropertyBag } from './formdata.node';
|
|
6
|
+
import type { File, FilePropertyBag } from './formdata.node.js';
|
|
7
7
|
|
|
8
8
|
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { FormData } from './formdata.node';
|
|
5
|
+
import { FormData } from './formdata.node.js';
|
|
6
6
|
import type { RequestOptions } from '../core';
|
|
7
7
|
import { Readable } from 'node:stream';
|
|
8
8
|
import { FormDataEncoder } from 'form-data-encoder';
|
package/src/core.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as qs from 'qs';
|
|
2
2
|
import { VERSION } from './version';
|
|
3
3
|
import { Stream } from './streaming';
|
|
4
|
-
import { APIError, APIConnectionError, APIConnectionTimeoutError } from './error';
|
|
5
|
-
import type { Readable } from '
|
|
6
|
-
import { getDefaultAgent, type Agent } from '
|
|
4
|
+
import { APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError } from './error';
|
|
5
|
+
import type { Readable } from './_shims/node-readable';
|
|
6
|
+
import { getDefaultAgent, type Agent } from './_shims/agent';
|
|
7
7
|
import {
|
|
8
8
|
fetch,
|
|
9
9
|
isPolyfilled as fetchIsPolyfilled,
|
|
10
10
|
type RequestInfo,
|
|
11
11
|
type RequestInit,
|
|
12
12
|
type Response,
|
|
13
|
-
} from '
|
|
13
|
+
} from './_shims/fetch.js';
|
|
14
14
|
import { isMultipartBody } from './uploads';
|
|
15
15
|
export {
|
|
16
16
|
maybeMultipartFormRequestOptions,
|
|
@@ -21,7 +21,7 @@ export {
|
|
|
21
21
|
|
|
22
22
|
const MAX_RETRIES = 2;
|
|
23
23
|
|
|
24
|
-
type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
24
|
+
export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
25
25
|
|
|
26
26
|
export abstract class APIClient {
|
|
27
27
|
baseURL: string;
|
|
@@ -37,18 +37,20 @@ export abstract class APIClient {
|
|
|
37
37
|
maxRetries,
|
|
38
38
|
timeout = 60 * 1000, // 60s
|
|
39
39
|
httpAgent,
|
|
40
|
+
fetch: overridenFetch,
|
|
40
41
|
}: {
|
|
41
42
|
baseURL: string;
|
|
42
43
|
maxRetries?: number | undefined;
|
|
43
44
|
timeout: number | undefined;
|
|
44
45
|
httpAgent: Agent | undefined;
|
|
46
|
+
fetch: Fetch | undefined;
|
|
45
47
|
}) {
|
|
46
48
|
this.baseURL = baseURL;
|
|
47
49
|
this.maxRetries = validatePositiveInteger('maxRetries', maxRetries ?? MAX_RETRIES);
|
|
48
50
|
this.timeout = validatePositiveInteger('timeout', timeout);
|
|
49
51
|
this.httpAgent = httpAgent;
|
|
50
52
|
|
|
51
|
-
this.fetch = fetch;
|
|
53
|
+
this.fetch = overridenFetch ?? fetch;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
protected authHeaders(): Headers {
|
|
@@ -120,6 +122,20 @@ export abstract class APIClient {
|
|
|
120
122
|
return this.requestAPIList(Page, { method: 'get', path, ...opts });
|
|
121
123
|
}
|
|
122
124
|
|
|
125
|
+
private calculateContentLength(body: unknown): string | null {
|
|
126
|
+
if (typeof body === 'string') {
|
|
127
|
+
if (typeof Buffer !== 'undefined') {
|
|
128
|
+
return Buffer.byteLength(body, 'utf8').toString();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const encoder = new TextEncoder();
|
|
132
|
+
const encoded = encoder.encode(body);
|
|
133
|
+
return encoded.length.toString();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
|
|
123
139
|
buildRequest<Req extends {}>(
|
|
124
140
|
options: FinalRequestOptions<Req>,
|
|
125
141
|
): { req: RequestInit; url: string; timeout: number } {
|
|
@@ -129,12 +145,20 @@ export abstract class APIClient {
|
|
|
129
145
|
isMultipartBody(options.body) ? options.body.body
|
|
130
146
|
: options.body ? JSON.stringify(options.body, null, 2)
|
|
131
147
|
: null;
|
|
132
|
-
const contentLength =
|
|
148
|
+
const contentLength = this.calculateContentLength(body);
|
|
133
149
|
|
|
134
150
|
const url = this.buildURL(path!, query);
|
|
135
|
-
|
|
151
|
+
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
136
152
|
const timeout = options.timeout ?? this.timeout;
|
|
137
|
-
|
|
153
|
+
const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
|
|
154
|
+
const minAgentTimeout = timeout + 1000;
|
|
155
|
+
if ((httpAgent as any)?.options && minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)) {
|
|
156
|
+
// Allow any given request to bump our agent active socket timeout.
|
|
157
|
+
// This may seem strange, but leaking active sockets should be rare and not particularly problematic,
|
|
158
|
+
// and without mutating agent we would need to create more of them.
|
|
159
|
+
// This tradeoff optimizes for performance.
|
|
160
|
+
(httpAgent as any).options.timeout = minAgentTimeout;
|
|
161
|
+
}
|
|
138
162
|
|
|
139
163
|
if (this.idempotencyHeader && method !== 'get') {
|
|
140
164
|
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
|
|
@@ -159,6 +183,9 @@ export abstract class APIClient {
|
|
|
159
183
|
...(body && { body: body as any }),
|
|
160
184
|
headers: reqHeaders,
|
|
161
185
|
...(httpAgent && { agent: httpAgent }),
|
|
186
|
+
// @ts-ignore node-fetch uses a custom AbortSignal type that is
|
|
187
|
+
// not compatible with standard web types
|
|
188
|
+
signal: options.signal ?? null,
|
|
162
189
|
};
|
|
163
190
|
|
|
164
191
|
this.validateHeaders(reqHeaders, headers);
|
|
@@ -196,8 +223,15 @@ export abstract class APIClient {
|
|
|
196
223
|
const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
|
|
197
224
|
|
|
198
225
|
if (response instanceof Error) {
|
|
199
|
-
if (
|
|
200
|
-
|
|
226
|
+
if (options.signal?.aborted) {
|
|
227
|
+
throw new APIUserAbortError();
|
|
228
|
+
}
|
|
229
|
+
if (retriesRemaining) {
|
|
230
|
+
return this.retryRequest(options, retriesRemaining);
|
|
231
|
+
}
|
|
232
|
+
if (response.name === 'AbortError') {
|
|
233
|
+
throw new APIConnectionTimeoutError();
|
|
234
|
+
}
|
|
201
235
|
throw new APIConnectionError({ cause: response });
|
|
202
236
|
}
|
|
203
237
|
|
|
@@ -537,6 +571,7 @@ export type RequestOptions<Req extends {} = Record<string, unknown> | Readable>
|
|
|
537
571
|
stream?: boolean | undefined;
|
|
538
572
|
timeout?: number;
|
|
539
573
|
httpAgent?: Agent;
|
|
574
|
+
signal?: AbortSignal | undefined | null;
|
|
540
575
|
idempotencyKey?: string;
|
|
541
576
|
};
|
|
542
577
|
|
|
@@ -554,6 +589,7 @@ const requestOptionsKeys: KeysEnum<RequestOptions> = {
|
|
|
554
589
|
stream: true,
|
|
555
590
|
timeout: true,
|
|
556
591
|
httpAgent: true,
|
|
592
|
+
signal: true,
|
|
557
593
|
idempotencyKey: true,
|
|
558
594
|
};
|
|
559
595
|
|
package/src/error.ts
CHANGED
|
@@ -67,6 +67,14 @@ export class APIError extends Error {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
export class APIUserAbortError extends APIError {
|
|
71
|
+
override readonly status: undefined = undefined;
|
|
72
|
+
|
|
73
|
+
constructor({ message }: { message?: string } = {}) {
|
|
74
|
+
super(undefined, undefined, message || 'Request was aborted.', undefined);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
export class APIConnectionError extends APIError {
|
|
71
79
|
override readonly status: undefined = undefined;
|
|
72
80
|
|
package/src/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as Core from './core';
|
|
|
5
5
|
import * as Pagination from './pagination';
|
|
6
6
|
import * as API from './resources/index';
|
|
7
7
|
import * as Errors from './error';
|
|
8
|
-
import type { Agent } from '
|
|
8
|
+
import type { Agent } from './_shims/agent';
|
|
9
9
|
import * as Uploads from './uploads';
|
|
10
10
|
|
|
11
11
|
type Config = {
|
|
@@ -36,6 +36,14 @@ type Config = {
|
|
|
36
36
|
*/
|
|
37
37
|
httpAgent?: Agent;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Specify a custom `fetch` function implementation.
|
|
41
|
+
*
|
|
42
|
+
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
43
|
+
* defined globally.
|
|
44
|
+
*/
|
|
45
|
+
fetch?: Core.Fetch | undefined;
|
|
46
|
+
|
|
39
47
|
/**
|
|
40
48
|
* The maximum number of times that the client will retry a request in case of a
|
|
41
49
|
* temporary failure, like a network error or a 5XX error from the server.
|
|
@@ -85,6 +93,7 @@ export class Finch extends Core.APIClient {
|
|
|
85
93
|
timeout: options.timeout,
|
|
86
94
|
httpAgent: options.httpAgent,
|
|
87
95
|
maxRetries: options.maxRetries,
|
|
96
|
+
fetch: options.fetch,
|
|
88
97
|
});
|
|
89
98
|
this.accessToken = options.accessToken || null;
|
|
90
99
|
this._options = options;
|
|
@@ -192,6 +201,7 @@ export class Finch extends Core.APIClient {
|
|
|
192
201
|
static APIError = Errors.APIError;
|
|
193
202
|
static APIConnectionError = Errors.APIConnectionError;
|
|
194
203
|
static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
204
|
+
static APIUserAbortError = Errors.APIUserAbortError;
|
|
195
205
|
static NotFoundError = Errors.NotFoundError;
|
|
196
206
|
static ConflictError = Errors.ConflictError;
|
|
197
207
|
static RateLimitError = Errors.RateLimitError;
|
|
@@ -206,6 +216,7 @@ export const {
|
|
|
206
216
|
APIError,
|
|
207
217
|
APIConnectionError,
|
|
208
218
|
APIConnectionTimeoutError,
|
|
219
|
+
APIUserAbortError,
|
|
209
220
|
NotFoundError,
|
|
210
221
|
ConflictError,
|
|
211
222
|
RateLimitError,
|
package/src/resources/account.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as API from '
|
|
3
|
+
import * as Core from '../core';
|
|
4
|
+
import { APIResource } from '../resource';
|
|
5
|
+
import * as API from '.';
|
|
6
6
|
|
|
7
7
|
export class Account extends APIResource {
|
|
8
8
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as Stages from '
|
|
7
|
-
import * as API from '
|
|
8
|
-
import { ApplicationsPage, ApplicationsPageParams } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as Stages from './stages';
|
|
7
|
+
import * as API from '.';
|
|
8
|
+
import { ApplicationsPage, ApplicationsPageParams } from '../../pagination';
|
|
9
9
|
|
|
10
10
|
export class Applications extends APIResource {
|
|
11
11
|
/**
|
package/src/resources/ats/ats.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
4
|
import { Candidates } from './candidates';
|
|
5
5
|
import { Applications } from './applications';
|
|
6
6
|
import { Stages } from './stages';
|
|
7
7
|
import { Jobs } from './jobs';
|
|
8
8
|
import { Offers } from './offers';
|
|
9
|
-
import * as API from '
|
|
9
|
+
import * as API from '.';
|
|
10
10
|
|
|
11
11
|
export class ATS extends APIResource {
|
|
12
12
|
candidates: Candidates = new Candidates(this.client);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from '
|
|
7
|
-
import { CandidatesPage, CandidatesPageParams } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as API from '.';
|
|
7
|
+
import { CandidatesPage, CandidatesPageParams } from '../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Candidates extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from '
|
|
7
|
-
import { JobsPage, JobsPageParams } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as API from '.';
|
|
7
|
+
import { JobsPage, JobsPageParams } from '../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Jobs extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from '
|
|
7
|
-
import { OffersPage, OffersPageParams } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as API from '.';
|
|
7
|
+
import { OffersPage, OffersPageParams } from '../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Offers extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as API from '
|
|
6
|
-
import { SinglePage } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import * as API from '.';
|
|
6
|
+
import { SinglePage } from '../../pagination';
|
|
7
7
|
|
|
8
8
|
export class Stages extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../../core';
|
|
6
6
|
import { Individuals } from './individuals';
|
|
7
|
-
import * as API from '
|
|
8
|
-
import { SinglePage } from '
|
|
7
|
+
import * as API from '.';
|
|
8
|
+
import { SinglePage } from '../../../pagination';
|
|
9
9
|
|
|
10
10
|
export class Benefits extends APIResource {
|
|
11
11
|
individuals: Individuals = new Individuals(this.client);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as Benefits from '
|
|
7
|
-
import * as API from '
|
|
8
|
-
import { SinglePage } from '
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../../core';
|
|
6
|
+
import * as Benefits from './index';
|
|
7
|
+
import * as API from '.';
|
|
8
|
+
import { SinglePage } from '../../../pagination';
|
|
9
9
|
|
|
10
10
|
export class Individuals extends APIResource {
|
|
11
11
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as HRIS from '
|
|
6
|
-
import * as API from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import * as HRIS from './index';
|
|
6
|
+
import * as API from '.';
|
|
7
7
|
|
|
8
8
|
export class CompanyResource extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from '
|
|
7
|
-
import { IndividualsPage, IndividualsPageParams } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as API from '.';
|
|
7
|
+
import { IndividualsPage, IndividualsPageParams } from '../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Directory extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
4
|
import { CompanyResource } from './company';
|
|
5
5
|
import { Payments } from './payments';
|
|
6
6
|
import { PayStatements } from './pay-statements';
|
|
7
7
|
import { Directory } from './directory';
|
|
8
8
|
import { Individuals } from './individuals/individuals';
|
|
9
9
|
import { Benefits } from './benefits/benefits';
|
|
10
|
-
import * as API from '
|
|
10
|
+
import * as API from '.';
|
|
11
11
|
|
|
12
12
|
export class HRIS extends APIResource {
|
|
13
13
|
company: CompanyResource = new CompanyResource(this.client);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as HRIS from '
|
|
6
|
-
import * as API from '
|
|
7
|
-
import { ResponsesPage } from '
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import * as HRIS from '../index';
|
|
6
|
+
import * as API from '.';
|
|
7
|
+
import { ResponsesPage } from '../../../pagination';
|
|
8
8
|
|
|
9
9
|
export class EmploymentData extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as HRIS from '
|
|
3
|
+
import * as Core from '../../../core';
|
|
4
|
+
import { APIResource } from '../../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../../core';
|
|
6
|
+
import * as HRIS from '../index';
|
|
7
7
|
import { EmploymentData } from './employment-data';
|
|
8
|
-
import * as API from '
|
|
9
|
-
import { ResponsesPage } from '
|
|
8
|
+
import * as API from '.';
|
|
9
|
+
import { ResponsesPage } from '../../../pagination';
|
|
10
10
|
|
|
11
11
|
export class Individuals extends APIResource {
|
|
12
12
|
employmentData: EmploymentData = new EmploymentData(this.client);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as HRIS from '
|
|
6
|
-
import * as Benefits from '
|
|
7
|
-
import * as API from '
|
|
8
|
-
import { ResponsesPage } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import * as HRIS from './index';
|
|
6
|
+
import * as Benefits from './benefits/index';
|
|
7
|
+
import * as API from '.';
|
|
8
|
+
import { ResponsesPage } from '../../pagination';
|
|
9
9
|
|
|
10
10
|
export class PayStatements extends APIResource {
|
|
11
11
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as HRIS from '
|
|
6
|
-
import * as API from '
|
|
7
|
-
import { SinglePage } from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import * as HRIS from './index';
|
|
6
|
+
import * as API from '.';
|
|
7
|
+
import { SinglePage } from '../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Payments extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as API from '
|
|
6
|
-
import { SinglePage } from '
|
|
3
|
+
import * as Core from '../core';
|
|
4
|
+
import { APIResource } from '../resource';
|
|
5
|
+
import * as API from '.';
|
|
6
|
+
import { SinglePage } from '../pagination';
|
|
7
7
|
|
|
8
8
|
export class Providers extends APIResource {
|
|
9
9
|
/**
|