@thera-hr/api-sdk 0.0.1520 → 0.0.1547
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/resources/services/resources/file/client/Client.js +4 -4
- package/api/resources/api/resources/test/resources/invoices/client/Client.js +1 -1
- package/api/resources/api/resources/thera/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/client/Client.js +7 -2
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +4 -4
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +2 -2
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +2 -2
- package/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +17 -0
- package/api/resources/api/resources/thera/resources/employment/client/Client.js +17 -0
- package/api/resources/api/resources/thera/resources/employment/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/employment/client/index.js +2 -0
- package/api/resources/api/resources/thera/resources/employment/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/employment/index.js +18 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +20 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +109 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.js +2 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +18 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +9 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +10 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +11 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +9 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/api/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/index.js +2 -1
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +1 -1
- package/api/resources/db/resources/user/types/EmployeeInformation.d.ts +1 -0
- package/dist/api/resources/api/resources/services/resources/file/client/Client.js +4 -4
- package/dist/api/resources/api/resources/test/resources/invoices/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/client/Client.js +7 -2
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +4 -4
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +2 -2
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +2 -2
- package/dist/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +17 -0
- package/dist/api/resources/api/resources/thera/resources/employment/client/Client.js +17 -0
- package/dist/api/resources/api/resources/thera/resources/employment/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/employment/client/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +20 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +109 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +9 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +10 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +11 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +9 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +1 -1
- package/dist/api/resources/db/resources/user/types/EmployeeInformation.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.d.ts +1 -1
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.js +1 -1
- package/dist/serialization/resources/api/resources/thera/resources/employment/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +14 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +44 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +45 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +14 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js +35 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +15 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +45 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +14 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js +35 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -1
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.d.ts +1 -0
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.js +1 -0
- package/package.json +1 -1
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.d.ts +1 -1
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.js +1 -1
- package/serialization/resources/api/resources/thera/resources/employment/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/employment/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +14 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +44 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +43 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +45 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +14 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js +35 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +15 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +45 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +14 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js +35 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/index.js +2 -1
- package/serialization/resources/db/resources/user/types/EmployeeInformation.d.ts +1 -0
- package/serialization/resources/db/resources/user/types/EmployeeInformation.js +1 -0
|
@@ -56,7 +56,7 @@ class File_ {
|
|
|
56
56
|
Authorization: yield this._getAuthorizationHeader(),
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
59
|
-
"X-Fern-SDK-Version": "0.0.
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
60
60
|
},
|
|
61
61
|
contentType: "application/json",
|
|
62
62
|
body: yield serializers.api.services.AttachDocumentToEmploymentRequest.jsonOrThrow(request, {
|
|
@@ -97,7 +97,7 @@ class File_ {
|
|
|
97
97
|
Authorization: yield this._getAuthorizationHeader(),
|
|
98
98
|
"X-Fern-Language": "JavaScript",
|
|
99
99
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
100
|
-
"X-Fern-SDK-Version": "0.0.
|
|
100
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
101
101
|
},
|
|
102
102
|
contentType: "application/json",
|
|
103
103
|
body: yield serializers.api.services.DeleteDocumentFromEmploymentRequest.jsonOrThrow(request, {
|
|
@@ -138,7 +138,7 @@ class File_ {
|
|
|
138
138
|
Authorization: yield this._getAuthorizationHeader(),
|
|
139
139
|
"X-Fern-Language": "JavaScript",
|
|
140
140
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
141
|
-
"X-Fern-SDK-Version": "0.0.
|
|
141
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
142
142
|
},
|
|
143
143
|
contentType: "application/json",
|
|
144
144
|
timeoutMs: 60000,
|
|
@@ -181,7 +181,7 @@ class File_ {
|
|
|
181
181
|
Authorization: yield this._getAuthorizationHeader(),
|
|
182
182
|
"X-Fern-Language": "JavaScript",
|
|
183
183
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
184
|
-
"X-Fern-SDK-Version": "0.0.
|
|
184
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
185
185
|
},
|
|
186
186
|
contentType: "application/json",
|
|
187
187
|
timeoutMs: 60000,
|
|
@@ -56,7 +56,7 @@ class Invoices {
|
|
|
56
56
|
Authorization: yield this._getAuthorizationHeader(),
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
59
|
-
"X-Fern-SDK-Version": "0.0.
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
60
60
|
},
|
|
61
61
|
contentType: "application/json",
|
|
62
62
|
body: yield serializers.api.test.VoidInvoiceRequest.jsonOrThrow(request, {
|
|
@@ -5,6 +5,7 @@ import * as core from "../../../../../../core";
|
|
|
5
5
|
import { Bank } from "../resources/bank/client/Client";
|
|
6
6
|
import { Company } from "../resources/company/client/Client";
|
|
7
7
|
import { Disbursement } from "../resources/disbursement/client/Client";
|
|
8
|
+
import { Employment } from "../resources/employment/client/Client";
|
|
8
9
|
import { Payroll } from "../resources/payroll/client/Client";
|
|
9
10
|
export declare namespace Thera {
|
|
10
11
|
interface Options {
|
|
@@ -21,6 +22,8 @@ export declare class Thera {
|
|
|
21
22
|
get company(): Company;
|
|
22
23
|
protected _disbursement: Disbursement | undefined;
|
|
23
24
|
get disbursement(): Disbursement;
|
|
25
|
+
protected _employment: Employment | undefined;
|
|
26
|
+
get employment(): Employment;
|
|
24
27
|
protected _payroll: Payroll | undefined;
|
|
25
28
|
get payroll(): Payroll;
|
|
26
29
|
}
|
|
@@ -7,7 +7,8 @@ exports.Thera = void 0;
|
|
|
7
7
|
const Client_1 = require("../resources/bank/client/Client");
|
|
8
8
|
const Client_2 = require("../resources/company/client/Client");
|
|
9
9
|
const Client_3 = require("../resources/disbursement/client/Client");
|
|
10
|
-
const Client_4 = require("../resources/
|
|
10
|
+
const Client_4 = require("../resources/employment/client/Client");
|
|
11
|
+
const Client_5 = require("../resources/payroll/client/Client");
|
|
11
12
|
class Thera {
|
|
12
13
|
constructor(_options) {
|
|
13
14
|
this._options = _options;
|
|
@@ -24,9 +25,13 @@ class Thera {
|
|
|
24
25
|
var _a;
|
|
25
26
|
return ((_a = this._disbursement) !== null && _a !== void 0 ? _a : (this._disbursement = new Client_3.Disbursement(this._options)));
|
|
26
27
|
}
|
|
28
|
+
get employment() {
|
|
29
|
+
var _a;
|
|
30
|
+
return ((_a = this._employment) !== null && _a !== void 0 ? _a : (this._employment = new Client_4.Employment(this._options)));
|
|
31
|
+
}
|
|
27
32
|
get payroll() {
|
|
28
33
|
var _a;
|
|
29
|
-
return ((_a = this._payroll) !== null && _a !== void 0 ? _a : (this._payroll = new
|
|
34
|
+
return ((_a = this._payroll) !== null && _a !== void 0 ? _a : (this._payroll = new Client_5.Payroll(this._options)));
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
exports.Thera = Thera;
|
|
@@ -65,7 +65,7 @@ class BankApi {
|
|
|
65
65
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
66
|
"X-Fern-Language": "JavaScript",
|
|
67
67
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
68
|
-
"X-Fern-SDK-Version": "0.0.
|
|
68
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -112,7 +112,7 @@ class BankApi {
|
|
|
112
112
|
Authorization: yield this._getAuthorizationHeader(),
|
|
113
113
|
"X-Fern-Language": "JavaScript",
|
|
114
114
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
115
|
-
"X-Fern-SDK-Version": "0.0.
|
|
115
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
116
116
|
},
|
|
117
117
|
contentType: "application/json",
|
|
118
118
|
body: yield serializers.api.thera.bank.VerifyAccountSignupRequest.jsonOrThrow(request, {
|
|
@@ -156,7 +156,7 @@ class BankApi {
|
|
|
156
156
|
Authorization: yield this._getAuthorizationHeader(),
|
|
157
157
|
"X-Fern-Language": "JavaScript",
|
|
158
158
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
159
|
-
"X-Fern-SDK-Version": "0.0.
|
|
159
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
160
160
|
},
|
|
161
161
|
contentType: "application/json",
|
|
162
162
|
timeoutMs: 60000,
|
|
@@ -197,7 +197,7 @@ class BankApi {
|
|
|
197
197
|
Authorization: yield this._getAuthorizationHeader(),
|
|
198
198
|
"X-Fern-Language": "JavaScript",
|
|
199
199
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
200
|
-
"X-Fern-SDK-Version": "0.0.
|
|
200
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
201
201
|
},
|
|
202
202
|
contentType: "application/json",
|
|
203
203
|
body: yield serializers.api.thera.bank.VerifyMicrodepositRequest.jsonOrThrow(request, {
|
package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class CompanyApi {
|
|
|
13
13
|
protected readonly _options: CompanyApi.Options;
|
|
14
14
|
constructor(_options: CompanyApi.Options);
|
|
15
15
|
/**
|
|
16
|
-
* Invite Contractor or Create Contract
|
|
16
|
+
* In Staging. Invite Contractor or Create Contract
|
|
17
17
|
*/
|
|
18
18
|
inviteContractor(request: TheraApi.api.thera.company.InviteContractorReq): Promise<TheraApi.api.thera.company.InviteContractorResponse>;
|
|
19
19
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js
CHANGED
|
@@ -49,7 +49,7 @@ class CompanyApi {
|
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Invite Contractor or Create Contract
|
|
52
|
+
* In Staging. Invite Contractor or Create Contract
|
|
53
53
|
*/
|
|
54
54
|
inviteContractor(request) {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -65,7 +65,7 @@ class CompanyApi {
|
|
|
65
65
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
66
|
"X-Fern-Language": "JavaScript",
|
|
67
67
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
68
|
-
"X-Fern-SDK-Version": "0.0.
|
|
68
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -59,7 +59,7 @@ class CompanyW2PayrollApi {
|
|
|
59
59
|
Authorization: yield this._getAuthorizationHeader(),
|
|
60
60
|
"X-Fern-Language": "JavaScript",
|
|
61
61
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
62
|
-
"X-Fern-SDK-Version": "0.0.
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
63
63
|
},
|
|
64
64
|
contentType: "application/json",
|
|
65
65
|
body: yield serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
|
|
@@ -13,7 +13,7 @@ export declare class DisbursementWebhookApi {
|
|
|
13
13
|
protected readonly _options: DisbursementWebhookApi.Options;
|
|
14
14
|
constructor(_options: DisbursementWebhookApi.Options);
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Calling this API will trigger automatic creation of invoices that need to be created
|
|
17
17
|
*/
|
|
18
18
|
invoiceWebhook(request: TheraApi.api.thera.disbursement.InvoiceWebhookRequest): Promise<void>;
|
|
19
19
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
@@ -48,7 +48,7 @@ class DisbursementWebhookApi {
|
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Calling this API will trigger automatic creation of invoices that need to be created
|
|
52
52
|
*/
|
|
53
53
|
invoiceWebhook(request) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -60,7 +60,7 @@ class DisbursementWebhookApi {
|
|
|
60
60
|
Authorization: yield this._getAuthorizationHeader(),
|
|
61
61
|
"X-Fern-Language": "JavaScript",
|
|
62
62
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
63
|
-
"X-Fern-SDK-Version": "0.0.
|
|
63
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
64
64
|
"Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
|
|
65
65
|
},
|
|
66
66
|
contentType: "application/json",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../../../../../core";
|
|
5
|
+
import { EmploymentApi } from "../resources/employmentApi/client/Client";
|
|
6
|
+
export declare namespace Employment {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class Employment {
|
|
13
|
+
protected readonly _options: Employment.Options;
|
|
14
|
+
constructor(_options: Employment.Options);
|
|
15
|
+
protected _employmentApi: EmploymentApi | undefined;
|
|
16
|
+
get employmentApi(): EmploymentApi;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Employment = void 0;
|
|
7
|
+
const Client_1 = require("../resources/employmentApi/client/Client");
|
|
8
|
+
class Employment {
|
|
9
|
+
constructor(_options) {
|
|
10
|
+
this._options = _options;
|
|
11
|
+
}
|
|
12
|
+
get employmentApi() {
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._employmentApi) !== null && _a !== void 0 ? _a : (this._employmentApi = new Client_1.EmploymentApi(this._options)));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Employment = Employment;
|
|
@@ -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("./resources"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
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 "../../../../../../../../..";
|
|
6
|
+
export declare namespace EmploymentApi {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class EmploymentApi {
|
|
13
|
+
protected readonly _options: EmploymentApi.Options;
|
|
14
|
+
constructor(_options: EmploymentApi.Options);
|
|
15
|
+
/**
|
|
16
|
+
* In Staging. Get estimate for this contract (cycle date, list of cycles, etc) based on provided paycycle
|
|
17
|
+
*/
|
|
18
|
+
estimateContract(request: TheraApi.api.thera.employment.CreateContractEstimateRequest): Promise<TheraApi.api.thera.employment.CreateContractEstimateResponse>;
|
|
19
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.EmploymentApi = void 0;
|
|
42
|
+
const core = __importStar(require("../../../../../../../../../../core"));
|
|
43
|
+
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
|
44
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
+
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
46
|
+
class EmploymentApi {
|
|
47
|
+
constructor(_options) {
|
|
48
|
+
this._options = _options;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* In Staging. Get estimate for this contract (cycle date, list of cycles, etc) based on provided paycycle
|
|
52
|
+
*/
|
|
53
|
+
estimateContract(request) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const _response = yield core.fetcher({
|
|
56
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "contracts/estimate"),
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers: {
|
|
59
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
60
|
+
"X-Fern-Language": "JavaScript",
|
|
61
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.1547",
|
|
63
|
+
},
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
body: yield serializers.api.thera.employment.CreateContractEstimateRequest.jsonOrThrow(request, {
|
|
66
|
+
unrecognizedObjectKeys: "strip",
|
|
67
|
+
}),
|
|
68
|
+
timeoutMs: 60000,
|
|
69
|
+
});
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return yield serializers.api.thera.employment.CreateContractEstimateResponse.parseOrThrow(_response.body, {
|
|
72
|
+
unrecognizedObjectKeys: "passthrough",
|
|
73
|
+
allowUnrecognizedUnionMembers: true,
|
|
74
|
+
allowUnrecognizedEnumValues: true,
|
|
75
|
+
breadcrumbsPrefix: ["response"],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (_response.error.reason === "status-code") {
|
|
79
|
+
throw new errors.TheraApiError({
|
|
80
|
+
statusCode: _response.error.statusCode,
|
|
81
|
+
body: _response.error.body,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
switch (_response.error.reason) {
|
|
85
|
+
case "non-json":
|
|
86
|
+
throw new errors.TheraApiError({
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.rawBody,
|
|
89
|
+
});
|
|
90
|
+
case "timeout":
|
|
91
|
+
throw new errors.TheraApiTimeoutError();
|
|
92
|
+
case "unknown":
|
|
93
|
+
throw new errors.TheraApiError({
|
|
94
|
+
message: _response.error.errorMessage,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
_getAuthorizationHeader() {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
102
|
+
if (bearer != null) {
|
|
103
|
+
return `Bearer ${bearer}`;
|
|
104
|
+
}
|
|
105
|
+
return undefined;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.EmploymentApi = EmploymentApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js
ADDED
|
@@ -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);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface ContractEstimateRequest {
|
|
6
|
+
contractType: TheraApi.model.thera.ContractType;
|
|
7
|
+
wageType: TheraApi.model.thera.WageType;
|
|
8
|
+
rate: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface CreateContractEstimateRequest {
|
|
6
|
+
contractEstimateRequest: TheraApi.api.thera.employment.ContractEstimateRequest;
|
|
7
|
+
payCycle: TheraApi.api.thera.employment.PayCycleEstimateRequest;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface CreateContractEstimateResponse {
|
|
6
|
+
/** Sorted ascendingly by the start date */
|
|
7
|
+
paymentCycles: TheraApi.api.thera.employment.PayCycleEstimate[];
|
|
8
|
+
/** Only available for Fixed Rate contract */
|
|
9
|
+
proRata?: TheraApi.api.thera.employment.ProRata;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface PayCycleEstimateRequest {
|
|
6
|
+
/** This field is currently not used. Adheres to Timezone DB version tzdata2022g. */
|
|
7
|
+
timezone: string;
|
|
8
|
+
cycleStartDate: string;
|
|
9
|
+
cycleEnd: TheraApi.model.thera.PayCycleEnd;
|
|
10
|
+
paymentDueDays: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./CreateContractEstimateRequest"), exports);
|
|
18
|
+
__exportStar(require("./ContractEstimateRequest"), exports);
|
|
19
|
+
__exportStar(require("./PayCycleEstimateRequest"), exports);
|
|
20
|
+
__exportStar(require("./CreateContractEstimateResponse"), exports);
|
|
21
|
+
__exportStar(require("./PayCycleEstimate"), exports);
|
|
22
|
+
__exportStar(require("./ProRata"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.employmentApi = void 0;
|
|
30
|
+
exports.employmentApi = __importStar(require("./employmentApi"));
|
|
31
|
+
__exportStar(require("./employmentApi/types"), exports);
|
|
@@ -23,9 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.payroll = exports.disbursement = exports.company = exports.bank = exports.address = void 0;
|
|
26
|
+
exports.payroll = exports.employment = exports.disbursement = exports.company = exports.bank = exports.address = void 0;
|
|
27
27
|
exports.address = __importStar(require("./address"));
|
|
28
28
|
exports.bank = __importStar(require("./bank"));
|
|
29
29
|
exports.company = __importStar(require("./company"));
|
|
30
30
|
exports.disbursement = __importStar(require("./disbursement"));
|
|
31
|
+
exports.employment = __importStar(require("./employment"));
|
|
31
32
|
exports.payroll = __importStar(require("./payroll"));
|