@thera-hr/api-sdk 0.0.1-prerelease2886-dev-2 → 0.0.1-prerelease2888-dev-3
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/api/resources/api/client/Client.d.ts +3 -0
- package/api/resources/api/client/Client.js +9 -4
- package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
- package/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
- package/api/resources/api/resources/external/client/Client.d.ts +19 -0
- package/api/resources/api/resources/external/client/Client.js +17 -0
- package/api/resources/api/resources/external/client/index.d.ts +1 -0
- package/api/resources/api/resources/external/client/index.js +2 -0
- package/api/resources/api/resources/external/index.d.ts +2 -0
- package/api/resources/api/resources/external/index.js +18 -0
- package/api/resources/api/resources/external/resources/externalApi/client/Client.d.ts +68 -0
- package/api/resources/api/resources/external/resources/externalApi/client/Client.js +155 -0
- package/api/resources/api/resources/external/resources/externalApi/client/index.d.ts +1 -0
- package/api/resources/api/resources/external/resources/externalApi/client/index.js +2 -0
- package/api/resources/api/resources/external/resources/externalApi/index.d.ts +2 -0
- package/api/resources/api/resources/external/resources/externalApi/index.js +18 -0
- package/api/resources/api/resources/external/resources/externalApi/types/AddEorUser.d.ts +9 -0
- package/api/resources/api/resources/{thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts → external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts} +6 -9
- package/api/resources/api/resources/{thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts → external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts} +2 -2
- package/api/resources/api/resources/external/resources/externalApi/types/index.d.ts +3 -0
- package/api/resources/api/resources/external/resources/externalApi/types/index.js +19 -0
- package/api/resources/api/resources/external/resources/index.d.ts +2 -0
- package/api/resources/api/resources/external/resources/index.js +41 -0
- package/api/resources/api/resources/index.d.ts +1 -0
- package/api/resources/api/resources/index.js +2 -1
- package/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
- package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +33 -33
- package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +23 -23
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +8 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +26 -19
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.d.ts +4 -4
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +9 -9
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByEmailResponse.d.ts → GetEorEmployeeByUserIdResponse.d.ts} +1 -1
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +1 -1
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +0 -25
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -77
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +0 -1
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +0 -2
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +0 -2
- package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
- package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.d.ts +1 -2
- package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +11 -15
- package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/requests/GetAllTimeTrackingRequest.d.ts +1 -3
- package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
- package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
- package/dist/api/resources/api/client/Client.d.ts +3 -0
- package/dist/api/resources/api/client/Client.js +9 -4
- package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
- package/dist/api/resources/api/resources/external/client/Client.d.ts +19 -0
- package/dist/api/resources/api/resources/external/client/Client.js +17 -0
- package/dist/api/resources/api/resources/external/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/external/client/index.js +2 -0
- package/dist/api/resources/api/resources/external/index.d.ts +2 -0
- package/dist/api/resources/api/resources/external/index.js +18 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.d.ts +68 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +155 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/client/index.js +2 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/index.d.ts +2 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/index.js +18 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/types/AddEorUser.d.ts +9 -0
- package/dist/api/resources/api/resources/{thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts → external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts} +6 -9
- package/dist/api/resources/api/resources/{thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts → external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts} +2 -2
- package/dist/api/resources/api/resources/external/resources/externalApi/types/index.d.ts +3 -0
- package/dist/api/resources/api/resources/external/resources/externalApi/types/index.js +19 -0
- package/dist/api/resources/api/resources/external/resources/index.d.ts +2 -0
- package/dist/api/resources/api/resources/external/resources/index.js +41 -0
- package/dist/api/resources/api/resources/index.d.ts +1 -0
- package/dist/api/resources/api/resources/index.js +2 -1
- package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
- package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +33 -33
- package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +23 -23
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +8 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +26 -19
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.d.ts +4 -4
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +9 -9
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByEmailResponse.d.ts → GetEorEmployeeByUserIdResponse.d.ts} +1 -1
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +0 -25
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -77
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +0 -1
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +0 -2
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +0 -2
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
- package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.d.ts +1 -2
- package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +11 -15
- package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/requests/GetAllTimeTrackingRequest.d.ts +1 -3
- package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
- package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
- package/dist/serialization/resources/api/resources/external/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/external/index.js +17 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/index.js +17 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/AddEorUser.d.ts +15 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/AddEorUser.js +46 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +22 -0
- package/{serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js → dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js} +10 -11
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts +12 -0
- package/{serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js → dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.js} +4 -4
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/index.d.ts +3 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/index.js +19 -0
- package/dist/serialization/resources/api/resources/external/resources/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/external/resources/index.js +41 -0
- package/dist/serialization/resources/api/resources/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/index.js +2 -1
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByEmailResponse.d.ts → GetEorEmployeeByUserIdResponse.d.ts} +2 -2
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByEmailResponse.js → GetEorEmployeeByUserIdResponse.js} +2 -2
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +1 -1
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +1 -1
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +0 -2
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +0 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +94 -84
- package/serialization/resources/api/resources/external/index.d.ts +1 -0
- package/serialization/resources/api/resources/external/index.js +17 -0
- package/serialization/resources/api/resources/external/resources/externalApi/index.d.ts +1 -0
- package/serialization/resources/api/resources/external/resources/externalApi/index.js +17 -0
- package/serialization/resources/api/resources/external/resources/externalApi/types/AddEorUser.d.ts +15 -0
- package/serialization/resources/api/resources/external/resources/externalApi/types/AddEorUser.js +46 -0
- package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +22 -0
- package/{dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js → serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js} +10 -11
- package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts +12 -0
- package/{dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js → serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.js} +4 -4
- package/serialization/resources/api/resources/external/resources/externalApi/types/index.d.ts +3 -0
- package/serialization/resources/api/resources/external/resources/externalApi/types/index.js +19 -0
- package/serialization/resources/api/resources/external/resources/index.d.ts +2 -0
- package/serialization/resources/api/resources/external/resources/index.js +41 -0
- package/serialization/resources/api/resources/index.d.ts +1 -0
- package/serialization/resources/api/resources/index.js +2 -1
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByEmailResponse.d.ts → GetEorEmployeeByUserIdResponse.d.ts} +2 -2
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByEmailResponse.js → GetEorEmployeeByUserIdResponse.js} +2 -2
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +1 -1
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +1 -1
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +0 -2
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +0 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.d.ts +0 -27
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.d.ts +0 -27
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts +0 -23
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts +0 -12
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts +0 -23
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts +0 -12
- /package/api/resources/api/resources/{thera/resources/eor/resources/eorTrackerApi/types/GetEorEmployeeByEmailResponse.js → external/resources/externalApi/types/AddEorUser.js} +0 -0
- /package/api/resources/api/resources/{thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.js → external/resources/externalApi/types/ExternalCreateContractorRequestV2.js} +0 -0
- /package/api/resources/api/resources/{thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js → external/resources/externalApi/types/ExternalSuccessResponseV2.js} +0 -0
- /package/api/resources/api/resources/thera/resources/{misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js → eor/resources/eorTrackerApi/types/GetEorEmployeeByUserIdResponse.js} +0 -0
- /package/dist/api/resources/api/resources/{thera/resources/eor/resources/eorTrackerApi/types/GetEorEmployeeByEmailResponse.js → external/resources/externalApi/types/AddEorUser.js} +0 -0
- /package/dist/api/resources/api/resources/{thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.js → external/resources/externalApi/types/ExternalCreateContractorRequestV2.js} +0 -0
- /package/dist/api/resources/api/resources/{thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js → external/resources/externalApi/types/ExternalSuccessResponseV2.js} +0 -0
- /package/dist/api/resources/api/resources/thera/resources/{misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js → eor/resources/eorTrackerApi/types/GetEorEmployeeByUserIdResponse.js} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../../../../../core";
|
|
5
|
+
import * as TheraApi from "../../../../../../../index";
|
|
6
|
+
export declare namespace ExternalApi {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
/** Specify a custom URL to connect the client to. */
|
|
10
|
+
baseUrl?: core.Supplier<string>;
|
|
11
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
15
|
+
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Additional headers to include in the request. */
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class ExternalApi {
|
|
25
|
+
protected readonly _options: ExternalApi.Options;
|
|
26
|
+
constructor(_options: ExternalApi.Options);
|
|
27
|
+
/**
|
|
28
|
+
* @param {TheraApi.api.external.ExternalCreateContractorRequestV2} request
|
|
29
|
+
* @param {ExternalApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.api.external.externalApi.createContractorV2({
|
|
33
|
+
* email: "string",
|
|
34
|
+
* firstName: "string",
|
|
35
|
+
* lastName: "string",
|
|
36
|
+
* country: "string",
|
|
37
|
+
* currency: "string",
|
|
38
|
+
* wageType: "HOURLY",
|
|
39
|
+
* payCycle: {
|
|
40
|
+
* timezone: "string",
|
|
41
|
+
* cycleStartDate: "2023-01-15",
|
|
42
|
+
* cycleEnd: {
|
|
43
|
+
* type: "weekly"
|
|
44
|
+
* },
|
|
45
|
+
* paymentDueDays: 1,
|
|
46
|
+
* firstPayDate: "2023-01-15",
|
|
47
|
+
* lastPayDate: "2023-01-15",
|
|
48
|
+
* firstPayTotal: 1000000,
|
|
49
|
+
* lastPayTotal: 1000000,
|
|
50
|
+
* itemRecurrencesById: {
|
|
51
|
+
* "string": {
|
|
52
|
+
* itemType: "EXPENSE",
|
|
53
|
+
* description: "string",
|
|
54
|
+
* amount: 1000000,
|
|
55
|
+
* firstInvoiceDate: "2023-01-15",
|
|
56
|
+
* paymentCurrency: "string",
|
|
57
|
+
* deletedDateTime: {
|
|
58
|
+
* "key": "value"
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* },
|
|
63
|
+
* contractType: "FIXED_RATE"
|
|
64
|
+
* })
|
|
65
|
+
*/
|
|
66
|
+
createContractorV2(request: TheraApi.api.external.ExternalCreateContractorRequestV2, requestOptions?: ExternalApi.RequestOptions): Promise<TheraApi.api.external.ExternalSuccessResponseV2>;
|
|
67
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.ExternalApi = void 0;
|
|
52
|
+
const core = __importStar(require("../../../../../../../../core"));
|
|
53
|
+
const serializers = __importStar(require("../../../../../../../../serialization/index"));
|
|
54
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
55
|
+
const errors = __importStar(require("../../../../../../../../errors/index"));
|
|
56
|
+
class ExternalApi {
|
|
57
|
+
constructor(_options) {
|
|
58
|
+
this._options = _options;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @param {TheraApi.api.external.ExternalCreateContractorRequestV2} request
|
|
62
|
+
* @param {ExternalApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.api.external.externalApi.createContractorV2({
|
|
66
|
+
* email: "string",
|
|
67
|
+
* firstName: "string",
|
|
68
|
+
* lastName: "string",
|
|
69
|
+
* country: "string",
|
|
70
|
+
* currency: "string",
|
|
71
|
+
* wageType: "HOURLY",
|
|
72
|
+
* payCycle: {
|
|
73
|
+
* timezone: "string",
|
|
74
|
+
* cycleStartDate: "2023-01-15",
|
|
75
|
+
* cycleEnd: {
|
|
76
|
+
* type: "weekly"
|
|
77
|
+
* },
|
|
78
|
+
* paymentDueDays: 1,
|
|
79
|
+
* firstPayDate: "2023-01-15",
|
|
80
|
+
* lastPayDate: "2023-01-15",
|
|
81
|
+
* firstPayTotal: 1000000,
|
|
82
|
+
* lastPayTotal: 1000000,
|
|
83
|
+
* itemRecurrencesById: {
|
|
84
|
+
* "string": {
|
|
85
|
+
* itemType: "EXPENSE",
|
|
86
|
+
* description: "string",
|
|
87
|
+
* amount: 1000000,
|
|
88
|
+
* firstInvoiceDate: "2023-01-15",
|
|
89
|
+
* paymentCurrency: "string",
|
|
90
|
+
* deletedDateTime: {
|
|
91
|
+
* "key": "value"
|
|
92
|
+
* }
|
|
93
|
+
* }
|
|
94
|
+
* }
|
|
95
|
+
* },
|
|
96
|
+
* contractType: "FIXED_RATE"
|
|
97
|
+
* })
|
|
98
|
+
*/
|
|
99
|
+
createContractorV2(request, requestOptions) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
var _a;
|
|
102
|
+
const _response = yield core.fetcher({
|
|
103
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/external/v2/contractor"),
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
106
|
+
contentType: "application/json",
|
|
107
|
+
requestType: "json",
|
|
108
|
+
body: serializers.api.external.ExternalCreateContractorRequestV2.jsonOrThrow(request, {
|
|
109
|
+
unrecognizedObjectKeys: "strip",
|
|
110
|
+
}),
|
|
111
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
112
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
113
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
114
|
+
});
|
|
115
|
+
if (_response.ok) {
|
|
116
|
+
return serializers.api.external.ExternalSuccessResponseV2.parseOrThrow(_response.body, {
|
|
117
|
+
unrecognizedObjectKeys: "passthrough",
|
|
118
|
+
allowUnrecognizedUnionMembers: true,
|
|
119
|
+
allowUnrecognizedEnumValues: true,
|
|
120
|
+
skipValidation: true,
|
|
121
|
+
breadcrumbsPrefix: ["response"],
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (_response.error.reason === "status-code") {
|
|
125
|
+
throw new errors.TheraApiError({
|
|
126
|
+
statusCode: _response.error.statusCode,
|
|
127
|
+
body: _response.error.body,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
switch (_response.error.reason) {
|
|
131
|
+
case "non-json":
|
|
132
|
+
throw new errors.TheraApiError({
|
|
133
|
+
statusCode: _response.error.statusCode,
|
|
134
|
+
body: _response.error.rawBody,
|
|
135
|
+
});
|
|
136
|
+
case "timeout":
|
|
137
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /external/v2/contractor.");
|
|
138
|
+
case "unknown":
|
|
139
|
+
throw new errors.TheraApiError({
|
|
140
|
+
message: _response.error.errorMessage,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
_getAuthorizationHeader() {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
148
|
+
if (bearer != null) {
|
|
149
|
+
return `Bearer ${bearer}`;
|
|
150
|
+
}
|
|
151
|
+
return undefined;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.ExternalApi = ExternalApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as TheraApi from "
|
|
5
|
-
export interface
|
|
4
|
+
import * as TheraApi from "../../../../../../../index";
|
|
5
|
+
export interface ExternalCreateContractorRequestV2 {
|
|
6
|
+
email: string;
|
|
6
7
|
firstName: string;
|
|
7
8
|
lastName: string;
|
|
8
|
-
email: string;
|
|
9
9
|
country: string;
|
|
10
|
-
companyId: string;
|
|
11
|
-
teamId?: string;
|
|
12
|
-
jobTitle: string;
|
|
13
|
-
startDate: string;
|
|
14
|
-
rate: number;
|
|
15
|
-
wageType: TheraApi.model.thera.WageType;
|
|
16
10
|
currency: string;
|
|
11
|
+
wageType: TheraApi.model.thera.WageType;
|
|
12
|
+
payCycle: TheraApi.model.thera.PayCycle;
|
|
13
|
+
contractType: TheraApi.model.thera.ContractType;
|
|
17
14
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ExternalCreateContractorRequestV2"), exports);
|
|
18
|
+
__exportStar(require("./AddEorUser"), exports);
|
|
19
|
+
__exportStar(require("./ExternalSuccessResponseV2"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.externalApi = void 0;
|
|
40
|
+
exports.externalApi = __importStar(require("./externalApi"));
|
|
41
|
+
__exportStar(require("./externalApi/types"), exports);
|
|
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.zeal = exports.thera = exports.services = exports.response = exports.request = exports.oneschema = exports.dev = exports.aiprise = void 0;
|
|
36
|
+
exports.zeal = exports.thera = exports.services = exports.response = exports.request = exports.oneschema = exports.external = exports.dev = exports.aiprise = void 0;
|
|
37
37
|
exports.aiprise = __importStar(require("./aiprise"));
|
|
38
38
|
exports.dev = __importStar(require("./dev"));
|
|
39
|
+
exports.external = __importStar(require("./external"));
|
|
39
40
|
exports.oneschema = __importStar(require("./oneschema"));
|
|
40
41
|
exports.request = __importStar(require("./request"));
|
|
41
42
|
exports.response = __importStar(require("./response"));
|
|
@@ -74,7 +74,7 @@ class File_ {
|
|
|
74
74
|
const _response = yield core.fetcher({
|
|
75
75
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/${encodeURIComponent(contractId)}/generic-document`),
|
|
76
76
|
method: "POST",
|
|
77
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
77
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
requestType: "json",
|
|
80
80
|
body: serializers.api.services.AttachDocumentToEmploymentRequest.jsonOrThrow(request, {
|
|
@@ -125,7 +125,7 @@ class File_ {
|
|
|
125
125
|
const _response = yield core.fetcher({
|
|
126
126
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/${encodeURIComponent(contractId)}/generic-document/${encodeURIComponent(s3Key)}`),
|
|
127
127
|
method: "DELETE",
|
|
128
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
128
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
129
129
|
contentType: "application/json",
|
|
130
130
|
requestType: "json",
|
|
131
131
|
body: serializers.api.services.DeleteDocumentFromEmploymentRequest.jsonOrThrow(request, {
|
|
@@ -173,7 +173,7 @@ class File_ {
|
|
|
173
173
|
const _response = yield core.fetcher({
|
|
174
174
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/${encodeURIComponent(contractId)}/generic-document/${encodeURIComponent(s3Key)}/file-url`),
|
|
175
175
|
method: "GET",
|
|
176
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
176
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
177
177
|
contentType: "application/json",
|
|
178
178
|
requestType: "json",
|
|
179
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -224,7 +224,7 @@ class File_ {
|
|
|
224
224
|
const _response = yield core.fetcher({
|
|
225
225
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/eor/${encodeURIComponent(contractId)}/payslips/${encodeURIComponent(s3Key)}/fileUrl`),
|
|
226
226
|
method: "GET",
|
|
227
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
227
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
228
228
|
contentType: "application/json",
|
|
229
229
|
requestType: "json",
|
|
230
230
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -275,7 +275,7 @@ class File_ {
|
|
|
275
275
|
const _response = yield core.fetcher({
|
|
276
276
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/companies/${encodeURIComponent(companyId)}/contracts/eor/pay-in/${encodeURIComponent(s3Key)}/file-url`),
|
|
277
277
|
method: "GET",
|
|
278
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
278
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
279
279
|
contentType: "application/json",
|
|
280
280
|
requestType: "json",
|
|
281
281
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -77,7 +77,7 @@ class AccountingApi {
|
|
|
77
77
|
const _response = yield core.fetcher({
|
|
78
78
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/accounting/settings`),
|
|
79
79
|
method: "PUT",
|
|
80
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
80
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
body: serializers.api.thera.accounting.ModifyAccountingIntegrationSetting.jsonOrThrow(request, {
|
|
@@ -124,7 +124,7 @@ class AccountingApi {
|
|
|
124
124
|
const _response = yield core.fetcher({
|
|
125
125
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/accounting/info`),
|
|
126
126
|
method: "GET",
|
|
127
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
127
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
128
128
|
contentType: "application/json",
|
|
129
129
|
requestType: "json",
|
|
130
130
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -174,7 +174,7 @@ class AccountingApi {
|
|
|
174
174
|
const _response = yield core.fetcher({
|
|
175
175
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/accounting/account-mapping`),
|
|
176
176
|
method: "GET",
|
|
177
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
177
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
178
178
|
contentType: "application/json",
|
|
179
179
|
requestType: "json",
|
|
180
180
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -227,7 +227,7 @@ class AccountingApi {
|
|
|
227
227
|
const _response = yield core.fetcher({
|
|
228
228
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `companies/${encodeURIComponent(companyId)}/accounting/authorize`),
|
|
229
229
|
method: "POST",
|
|
230
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-
|
|
230
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2888-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2888-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
231
231
|
contentType: "application/json",
|
|
232
232
|
requestType: "json",
|
|
233
233
|
body: serializers.api.thera.accounting.CompleteAccountingIntegrationAuth.jsonOrThrow(request, {
|