@thera-hr/api-sdk 0.0.1574 → 0.0.1585
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/request/resources/thera/resources/index.d.ts +0 -2
- package/api/resources/api/resources/request/resources/thera/resources/index.js +1 -3
- 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/resources/bank/resources/bankApi/client/Client.js +4 -4
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +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/disbursementApi/client/Client.d.ts +6 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +47 -2
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/index.js +1 -0
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/CreateDisbursementDetail.d.ts +13 -0
- package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.d.ts +1 -1
- package/{dist/api/resources/api/resources/request/resources/thera/resources/disbursement → api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateInvoiceDetail.d.ts +3 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.d.ts +10 -0
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.js +12 -0
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement → api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/index.d.ts +2 -0
- package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/index.js +2 -0
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/index.d.ts +2 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/index.js +3 -2
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +2 -2
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/request/resources/thera/resources/index.d.ts +0 -2
- package/dist/api/resources/api/resources/request/resources/thera/resources/index.js +1 -3
- 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/resources/bank/resources/bankApi/client/Client.js +4 -4
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +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/disbursementApi/client/Client.d.ts +6 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +47 -2
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/index.js +1 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/CreateDisbursementDetail.d.ts +13 -0
- package/dist/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.d.ts +1 -1
- package/{api/resources/api/resources/request/resources/thera/resources/disbursement → dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateInvoiceDetail.d.ts +3 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/CreateInvoiceDetail.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.d.ts +10 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.js +12 -0
- package/{api/resources/api/resources/request/resources/thera/resources/disbursement → dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/index.d.ts +2 -0
- package/dist/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/index.d.ts +2 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/index.js +3 -2
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +2 -2
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +1 -1
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/index.d.ts +0 -2
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/index.js +1 -3
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementDetail.d.ts +3 -3
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementDetail.js +2 -2
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.d.ts +2 -2
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.js +1 -1
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.d.ts +1 -1
- package/dist/serialization/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateInvoiceDetail.d.ts +2 -2
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/CreateInvoiceDetail.js +48 -0
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.d.ts +10 -0
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateInvoiceDetail.js → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.js} +2 -8
- package/{serialization/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/index.d.ts +2 -0
- package/dist/{api/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/index.js +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/index.js +3 -1
- package/package.json +1 -1
- package/serialization/resources/api/resources/request/resources/thera/resources/index.d.ts +0 -2
- package/serialization/resources/api/resources/request/resources/thera/resources/index.js +1 -3
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementDetail.d.ts +3 -3
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementDetail.js +2 -2
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.d.ts +2 -2
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.js +1 -1
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.d.ts +1 -1
- package/serialization/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateInvoiceDetail.d.ts +2 -2
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/CreateInvoiceDetail.js +48 -0
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.js +43 -0
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.d.ts +10 -0
- package/{dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateInvoiceDetail.js → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnitType.js} +2 -8
- package/{dist/api/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/types/index.d.ts +2 -0
- package/serialization/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/index.js +2 -0
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/index.d.ts +2 -0
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/index.js +3 -1
- package/api/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.d.ts +0 -13
- package/dist/api/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.d.ts +0 -13
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/index.d.ts +0 -1
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/index.js +0 -17
- package/serialization/resources/api/resources/request/resources/thera/resources/disbursement/index.d.ts +0 -1
- package/serialization/resources/api/resources/request/resources/thera/resources/disbursement/index.js +0 -17
- /package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementDetail.js +0 -0
- /package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateDisbursementRequest.js +0 -0
- /package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.d.ts +0 -0
- /package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.js +0 -0
- /package/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateInvoiceDetail.js +0 -0
- /package/{dist/api/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.js → api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/types/InvoiceWorkUnit.js} +0 -0
- /package/dist/api/resources/api/resources/{request/resources/thera/resources/disbursement/types/CreateDisbursementRequest.js → thera/resources/disbursement/resources/disbursementApi/types/CreateDisbursementDetail.js} +0 -0
- /package/dist/api/resources/api/resources/{request/resources/thera/resources/disbursement/types/CreateExpenseDetail.js → thera/resources/disbursement/resources/disbursementApi/types/CreateDisbursementRequest.js} +0 -0
- /package/dist/api/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.d.ts +0 -0
- /package/dist/api/resources/api/resources/{request/resources/thera/resources/disbursement/types/CreateInvoiceDetail.js → thera/resources/disbursement/resources/disbursementApi/types/CreateExpenseDetail.js} +0 -0
- /package/{api/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/index.d.ts +0 -0
- /package/{api/resources/api/resources/request/resources/thera/resources/disbursement → dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/index.js +0 -0
- /package/dist/serialization/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.js +0 -0
- /package/{dist/api/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/index.d.ts +0 -0
- /package/{dist/api/resources/api/resources/request/resources/thera/resources/disbursement → serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementApi}/index.js +0 -0
- /package/serialization/resources/api/resources/{request/resources/thera/resources/disbursement → thera/resources/disbursement/resources/disbursementApi}/types/CreateExpenseDetail.js +0 -0
|
@@ -26,8 +26,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.document =
|
|
30
|
-
exports.disbursement = __importStar(require("./disbursement"));
|
|
31
|
-
__exportStar(require("./disbursement/types"), exports);
|
|
29
|
+
exports.document = void 0;
|
|
32
30
|
exports.document = __importStar(require("./document"));
|
|
33
31
|
__exportStar(require("./document/types"), exports);
|
|
@@ -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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
60
60
|
},
|
|
61
61
|
contentType: "application/json",
|
|
62
62
|
body: yield serializers.api.test.VoidInvoiceRequest.jsonOrThrow(request, {
|
|
@@ -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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.js
CHANGED
|
@@ -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.1585",
|
|
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.1585",
|
|
63
63
|
},
|
|
64
64
|
contentType: "application/json",
|
|
65
65
|
body: yield serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as core from "../../../../../../../../../../core";
|
|
5
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
6
|
export declare namespace DisbursementApi {
|
|
6
7
|
interface Options {
|
|
7
8
|
environment: core.Supplier<string>;
|
|
@@ -12,7 +13,11 @@ export declare class DisbursementApi {
|
|
|
12
13
|
protected readonly _options: DisbursementApi.Options;
|
|
13
14
|
constructor(_options: DisbursementApi.Options);
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* For the response type, please check Swagger. Info for the Invoice Work Unit type: 1. `workUnitTotal` is used to replace `hours`. 2. Check the WageType of Invoice in the Contract API to know if it's hourly, daily or weekly invoice.
|
|
17
|
+
*/
|
|
18
|
+
createDisbursement(request: TheraApi.api.thera.disbursement.CreateDisbursementRequest): Promise<unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Approve Invoice
|
|
16
21
|
*/
|
|
17
22
|
approveInvoice(invoiceId: string): Promise<void>;
|
|
18
23
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
@@ -40,6 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.DisbursementApi = void 0;
|
|
42
42
|
const core = __importStar(require("../../../../../../../../../../core"));
|
|
43
|
+
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
|
43
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
44
45
|
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
45
46
|
class DisbursementApi {
|
|
@@ -47,7 +48,51 @@ class DisbursementApi {
|
|
|
47
48
|
this._options = _options;
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
+
* For the response type, please check Swagger. Info for the Invoice Work Unit type: 1. `workUnitTotal` is used to replace `hours`. 2. Check the WageType of Invoice in the Contract API to know if it's hourly, daily or weekly invoice.
|
|
52
|
+
*/
|
|
53
|
+
createDisbursement(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), "disbursement"),
|
|
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.1585",
|
|
63
|
+
},
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
body: yield serializers.api.thera.disbursement.CreateDisbursementRequest.jsonOrThrow(request, {
|
|
66
|
+
unrecognizedObjectKeys: "strip",
|
|
67
|
+
}),
|
|
68
|
+
timeoutMs: 60000,
|
|
69
|
+
});
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return _response.body;
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
74
|
+
throw new errors.TheraApiError({
|
|
75
|
+
statusCode: _response.error.statusCode,
|
|
76
|
+
body: _response.error.body,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
switch (_response.error.reason) {
|
|
80
|
+
case "non-json":
|
|
81
|
+
throw new errors.TheraApiError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.rawBody,
|
|
84
|
+
});
|
|
85
|
+
case "timeout":
|
|
86
|
+
throw new errors.TheraApiTimeoutError();
|
|
87
|
+
case "unknown":
|
|
88
|
+
throw new errors.TheraApiError({
|
|
89
|
+
message: _response.error.errorMessage,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Approve Invoice
|
|
51
96
|
*/
|
|
52
97
|
approveInvoice(invoiceId) {
|
|
53
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,7 +103,7 @@ class DisbursementApi {
|
|
|
58
103
|
Authorization: yield this._getAuthorizationHeader(),
|
|
59
104
|
"X-Fern-Language": "JavaScript",
|
|
60
105
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
61
|
-
"X-Fern-SDK-Version": "0.0.
|
|
106
|
+
"X-Fern-SDK-Version": "0.0.1585",
|
|
62
107
|
},
|
|
63
108
|
contentType: "application/json",
|
|
64
109
|
timeoutMs: 60000,
|
package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/index.js
CHANGED
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
17
18
|
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export declare type CreateDisbursementDetail = TheraApi.api.thera.disbursement.CreateDisbursementDetail.Invoice | TheraApi.api.thera.disbursement.CreateDisbursementDetail.Expense;
|
|
6
|
+
export declare namespace CreateDisbursementDetail {
|
|
7
|
+
interface Invoice extends TheraApi.api.thera.disbursement.CreateInvoiceDetail {
|
|
8
|
+
type: "invoice";
|
|
9
|
+
}
|
|
10
|
+
interface Expense extends TheraApi.api.thera.disbursement.CreateExpenseDetail {
|
|
11
|
+
type: "expense";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -9,5 +9,5 @@ export interface CreateDisbursementRequest {
|
|
|
9
9
|
/** The ID of Thera's Employment object */
|
|
10
10
|
contractId: string;
|
|
11
11
|
currency: string;
|
|
12
|
-
detail: TheraApi.api.
|
|
12
|
+
detail: TheraApi.api.thera.disbursement.CreateDisbursementDetail;
|
|
13
13
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
4
5
|
export interface CreateInvoiceDetail {
|
|
5
|
-
|
|
6
|
+
/** Null/empty if doesn't exist, for example in Fixed Rate contract */
|
|
7
|
+
workUnit?: TheraApi.api.thera.disbursement.InvoiceWorkUnit;
|
|
6
8
|
rate: number;
|
|
7
9
|
amount: number;
|
|
8
10
|
startDate: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type InvoiceWorkUnitType = "HOURLY" | "DAILY" | "WEEKLY" | "TASK";
|
|
5
|
+
export declare const InvoiceWorkUnitType: {
|
|
6
|
+
readonly Hourly: "HOURLY";
|
|
7
|
+
readonly Daily: "DAILY";
|
|
8
|
+
readonly Weekly: "WEEKLY";
|
|
9
|
+
readonly Task: "TASK";
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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.InvoiceWorkUnitType = void 0;
|
|
7
|
+
exports.InvoiceWorkUnitType = {
|
|
8
|
+
Hourly: "HOURLY",
|
|
9
|
+
Daily: "DAILY",
|
|
10
|
+
Weekly: "WEEKLY",
|
|
11
|
+
Task: "TASK",
|
|
12
|
+
};
|
|
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./InvoiceWorkUnitType"), exports);
|
|
18
|
+
__exportStar(require("./InvoiceWorkUnit"), exports);
|
|
17
19
|
__exportStar(require("./CreateInvoiceDetail"), exports);
|
|
18
20
|
__exportStar(require("./CreateExpenseDetail"), exports);
|
|
19
21
|
__exportStar(require("./CreateDisbursementDetail"), exports);
|
|
@@ -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.1585",
|
|
64
64
|
"Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
|
|
65
65
|
},
|
|
66
66
|
contentType: "application/json",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
export * as disbursementApi from "./disbursementApi";
|
|
2
|
+
export * from "./disbursementApi/types";
|
|
1
3
|
export * as disbursementWebhookApi from "./disbursementWebhookApi";
|
|
2
4
|
export * from "./disbursementWebhookApi/types";
|
|
3
|
-
export * as disbursementApi from "./disbursementApi";
|
|
4
5
|
export * from "./disbursementWebhookApi/client/requests";
|
|
@@ -26,8 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.disbursementWebhookApi = exports.disbursementApi = void 0;
|
|
30
|
+
exports.disbursementApi = __importStar(require("./disbursementApi"));
|
|
31
|
+
__exportStar(require("./disbursementApi/types"), exports);
|
|
30
32
|
exports.disbursementWebhookApi = __importStar(require("./disbursementWebhookApi"));
|
|
31
33
|
__exportStar(require("./disbursementWebhookApi/types"), exports);
|
|
32
|
-
exports.disbursementApi = __importStar(require("./disbursementApi"));
|
|
33
34
|
__exportStar(require("./disbursementWebhookApi/client/requests"), exports);
|
|
@@ -59,7 +59,7 @@ class EmploymentApi {
|
|
|
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.1585",
|
|
63
63
|
},
|
|
64
64
|
contentType: "application/json",
|
|
65
65
|
body: yield serializers.api.thera.employment.CreateContractEstimateRequest.jsonOrThrow(request, {
|
|
@@ -108,7 +108,7 @@ class EmploymentApi {
|
|
|
108
108
|
Authorization: yield this._getAuthorizationHeader(),
|
|
109
109
|
"X-Fern-Language": "JavaScript",
|
|
110
110
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
111
|
-
"X-Fern-SDK-Version": "0.0.
|
|
111
|
+
"X-Fern-SDK-Version": "0.0.1585",
|
|
112
112
|
},
|
|
113
113
|
contentType: "application/json",
|
|
114
114
|
timeoutMs: 60000,
|
package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js
CHANGED
|
@@ -59,7 +59,7 @@ class OncycleApi {
|
|
|
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.1585",
|
|
63
63
|
},
|
|
64
64
|
contentType: "application/json",
|
|
65
65
|
timeoutMs: 60000,
|
|
@@ -26,8 +26,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.document =
|
|
30
|
-
exports.disbursement = __importStar(require("./disbursement"));
|
|
31
|
-
__exportStar(require("./disbursement/types"), exports);
|
|
29
|
+
exports.document = void 0;
|
|
32
30
|
exports.document = __importStar(require("./document"));
|
|
33
31
|
__exportStar(require("./document/types"), exports);
|
|
@@ -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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
60
60
|
},
|
|
61
61
|
contentType: "application/json",
|
|
62
62
|
body: yield serializers.api.test.VoidInvoiceRequest.jsonOrThrow(request, {
|
package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js
CHANGED
|
@@ -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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
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.1585",
|
|
201
201
|
},
|
|
202
202
|
contentType: "application/json",
|
|
203
203
|
body: yield serializers.api.thera.bank.VerifyMicrodepositRequest.jsonOrThrow(request, {
|
|
@@ -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.1585",
|
|
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.1585",
|
|
63
63
|
},
|
|
64
64
|
contentType: "application/json",
|
|
65
65
|
body: yield serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as core from "../../../../../../../../../../core";
|
|
5
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
6
|
export declare namespace DisbursementApi {
|
|
6
7
|
interface Options {
|
|
7
8
|
environment: core.Supplier<string>;
|
|
@@ -12,7 +13,11 @@ export declare class DisbursementApi {
|
|
|
12
13
|
protected readonly _options: DisbursementApi.Options;
|
|
13
14
|
constructor(_options: DisbursementApi.Options);
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* For the response type, please check Swagger. Info for the Invoice Work Unit type: 1. `workUnitTotal` is used to replace `hours`. 2. Check the WageType of Invoice in the Contract API to know if it's hourly, daily or weekly invoice.
|
|
17
|
+
*/
|
|
18
|
+
createDisbursement(request: TheraApi.api.thera.disbursement.CreateDisbursementRequest): Promise<unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Approve Invoice
|
|
16
21
|
*/
|
|
17
22
|
approveInvoice(invoiceId: string): Promise<void>;
|
|
18
23
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
@@ -40,6 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.DisbursementApi = void 0;
|
|
42
42
|
const core = __importStar(require("../../../../../../../../../../core"));
|
|
43
|
+
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
|
43
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
44
45
|
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
45
46
|
class DisbursementApi {
|
|
@@ -47,7 +48,51 @@ class DisbursementApi {
|
|
|
47
48
|
this._options = _options;
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
+
* For the response type, please check Swagger. Info for the Invoice Work Unit type: 1. `workUnitTotal` is used to replace `hours`. 2. Check the WageType of Invoice in the Contract API to know if it's hourly, daily or weekly invoice.
|
|
52
|
+
*/
|
|
53
|
+
createDisbursement(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), "disbursement"),
|
|
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.1585",
|
|
63
|
+
},
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
body: yield serializers.api.thera.disbursement.CreateDisbursementRequest.jsonOrThrow(request, {
|
|
66
|
+
unrecognizedObjectKeys: "strip",
|
|
67
|
+
}),
|
|
68
|
+
timeoutMs: 60000,
|
|
69
|
+
});
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return _response.body;
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
74
|
+
throw new errors.TheraApiError({
|
|
75
|
+
statusCode: _response.error.statusCode,
|
|
76
|
+
body: _response.error.body,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
switch (_response.error.reason) {
|
|
80
|
+
case "non-json":
|
|
81
|
+
throw new errors.TheraApiError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.rawBody,
|
|
84
|
+
});
|
|
85
|
+
case "timeout":
|
|
86
|
+
throw new errors.TheraApiTimeoutError();
|
|
87
|
+
case "unknown":
|
|
88
|
+
throw new errors.TheraApiError({
|
|
89
|
+
message: _response.error.errorMessage,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Approve Invoice
|
|
51
96
|
*/
|
|
52
97
|
approveInvoice(invoiceId) {
|
|
53
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,7 +103,7 @@ class DisbursementApi {
|
|
|
58
103
|
Authorization: yield this._getAuthorizationHeader(),
|
|
59
104
|
"X-Fern-Language": "JavaScript",
|
|
60
105
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
61
|
-
"X-Fern-SDK-Version": "0.0.
|
|
106
|
+
"X-Fern-SDK-Version": "0.0.1585",
|
|
62
107
|
},
|
|
63
108
|
contentType: "application/json",
|
|
64
109
|
timeoutMs: 60000,
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
17
18
|
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export declare type CreateDisbursementDetail = TheraApi.api.thera.disbursement.CreateDisbursementDetail.Invoice | TheraApi.api.thera.disbursement.CreateDisbursementDetail.Expense;
|
|
6
|
+
export declare namespace CreateDisbursementDetail {
|
|
7
|
+
interface Invoice extends TheraApi.api.thera.disbursement.CreateInvoiceDetail {
|
|
8
|
+
type: "invoice";
|
|
9
|
+
}
|
|
10
|
+
interface Expense extends TheraApi.api.thera.disbursement.CreateExpenseDetail {
|
|
11
|
+
type: "expense";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -9,5 +9,5 @@ export interface CreateDisbursementRequest {
|
|
|
9
9
|
/** The ID of Thera's Employment object */
|
|
10
10
|
contractId: string;
|
|
11
11
|
currency: string;
|
|
12
|
-
detail: TheraApi.api.
|
|
12
|
+
detail: TheraApi.api.thera.disbursement.CreateDisbursementDetail;
|
|
13
13
|
}
|