@thera-hr/api-sdk 0.0.1-prerelease2895-dev-3 → 0.0.1-prerelease2904-dev-2
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/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/resources/externalApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/external/resources/externalApi/client/Client.js +5 -2
- package/api/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +3 -0
- 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.js +18 -18
- 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 +14 -4
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +61 -9
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.d.ts → GetEorEmployeeByEmailResponse.d.ts} +1 -1
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.d.ts +7 -0
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +2 -1
- package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +2 -1
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +25 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +77 -6
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.d.ts +27 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts +17 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +2 -0
- 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.js +9 -9
- 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/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/resources/externalApi/client/Client.d.ts +4 -1
- package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +5 -2
- package/dist/api/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +3 -0
- 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.js +18 -18
- 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 +14 -4
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +61 -9
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.d.ts → GetEorEmployeeByEmailResponse.d.ts} +1 -1
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetEorEmployeeByEmailResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.d.ts +7 -0
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +2 -1
- package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +2 -1
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +25 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +77 -6
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.d.ts +27 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/FilloutEorEmployeeRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts +17 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +2 -0
- 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.js +9 -9
- 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/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +4 -0
- package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js +4 -0
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.d.ts → GetEorEmployeeByEmailResponse.d.ts} +2 -2
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.js → GetEorEmployeeByEmailResponse.js} +2 -2
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.js +44 -0
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +2 -1
- package/dist/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +2 -1
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts +23 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js +54 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +148 -4
- package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +4 -0
- package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js +4 -0
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.d.ts → GetEorEmployeeByEmailResponse.d.ts} +2 -2
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.js → GetEorEmployeeByEmailResponse.js} +2 -2
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.js +44 -0
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.d.ts +2 -1
- package/serialization/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js +2 -1
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.d.ts +23 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookRequest.js +54 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/FilloutEorEmployeeWebhookResponse.js +43 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +2 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/{GetEorEmployeeByUserIdResponse.js → GetEorEmployeeByEmailResponse.js} +0 -0
- /package/{dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetEorEmployeeByUserIdResponse.js → api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/GetLatestEorEmployeeEmailResponse.js} +0 -0
|
@@ -78,7 +78,7 @@ class DisbursementWebhookApi {
|
|
|
78
78
|
const _response = yield core.fetcher({
|
|
79
79
|
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)), "webhook/disbursement/invoice"),
|
|
80
80
|
method: "POST",
|
|
81
|
-
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-
|
|
81
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
body: serializers.api.thera.disbursement.InvoiceWebhookEvent.jsonOrThrow(_body, {
|
|
@@ -75,7 +75,7 @@ class DocumentApi {
|
|
|
75
75
|
const _response = yield core.fetcher({
|
|
76
76
|
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)), "w9-document"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
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-
|
|
78
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
queryParameters: _queryParams,
|
|
81
81
|
requestType: "json",
|
|
@@ -134,7 +134,7 @@ class DocumentApi {
|
|
|
134
134
|
const _response = yield core.fetcher({
|
|
135
135
|
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)}/1099-nec-document`),
|
|
136
136
|
method: "GET",
|
|
137
|
-
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-
|
|
137
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
138
138
|
contentType: "application/json",
|
|
139
139
|
queryParameters: _queryParams,
|
|
140
140
|
requestType: "json",
|
|
@@ -190,7 +190,7 @@ class DocumentApi {
|
|
|
190
190
|
const _response = yield core.fetcher({
|
|
191
191
|
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)), "1099-nec-document/file"),
|
|
192
192
|
method: "POST",
|
|
193
|
-
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-
|
|
193
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
194
194
|
contentType: "application/json",
|
|
195
195
|
requestType: "json",
|
|
196
196
|
body: serializers.api.thera.document.BulkFileUsIrs1099NecDocumentRequest.jsonOrThrow(request, {
|
package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js
CHANGED
|
@@ -73,7 +73,7 @@ class EmailApi {
|
|
|
73
73
|
const _response = yield core.fetcher({
|
|
74
74
|
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)), "email/login"),
|
|
75
75
|
method: "POST",
|
|
76
|
-
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-
|
|
76
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
77
|
contentType: "application/json",
|
|
78
78
|
requestType: "json",
|
|
79
79
|
body: serializers.api.thera.email.SendLoginEmailRequest.jsonOrThrow(request, {
|
|
@@ -125,7 +125,7 @@ class EmailApi {
|
|
|
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)), `user/${encodeURIComponent(userId)}/update-email`),
|
|
127
127
|
method: "PUT",
|
|
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "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.thera.email.UpdateEmailRequest.jsonOrThrow(request, {
|
|
@@ -74,7 +74,7 @@ class EmploymentApi {
|
|
|
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)}/pay-cycle/recurrences/${encodeURIComponent(recurrenceId)}`),
|
|
76
76
|
method: "DELETE",
|
|
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "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.thera.employment.DeleteContractInvoiceItemRecurrenceRequest.jsonOrThrow(request, {
|
|
@@ -140,7 +140,7 @@ class EmploymentApi {
|
|
|
140
140
|
const _response = yield core.fetcher({
|
|
141
141
|
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/estimate"),
|
|
142
142
|
method: "POST",
|
|
143
|
-
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-
|
|
143
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
144
144
|
contentType: "application/json",
|
|
145
145
|
requestType: "json",
|
|
146
146
|
body: serializers.api.thera.employment.CreateContractEstimateRequest.jsonOrThrow(request, {
|
|
@@ -195,7 +195,7 @@ class EmploymentApi {
|
|
|
195
195
|
const _response = yield core.fetcher({
|
|
196
196
|
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)}`),
|
|
197
197
|
method: "DELETE",
|
|
198
|
-
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-
|
|
198
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
199
199
|
contentType: "application/json",
|
|
200
200
|
requestType: "json",
|
|
201
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -244,7 +244,7 @@ class EmploymentApi {
|
|
|
244
244
|
const _response = yield core.fetcher({
|
|
245
245
|
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)}/termination-cancellation`),
|
|
246
246
|
method: "POST",
|
|
247
|
-
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-
|
|
247
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
248
248
|
contentType: "application/json",
|
|
249
249
|
requestType: "json",
|
|
250
250
|
body: serializers.api.thera.employment.CancelContractTerminationRequest.jsonOrThrow(request, {
|
|
@@ -294,7 +294,7 @@ class EmploymentApi {
|
|
|
294
294
|
const _response = yield core.fetcher({
|
|
295
295
|
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)}/payCycle/${encodeURIComponent(baseDate)}`),
|
|
296
296
|
method: "GET",
|
|
297
|
-
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-
|
|
297
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
298
298
|
contentType: "application/json",
|
|
299
299
|
requestType: "json",
|
|
300
300
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -35,14 +35,24 @@ export declare class EorTrackerApi {
|
|
|
35
35
|
*/
|
|
36
36
|
getEorTracker(companyId: string, requestOptions?: EorTrackerApi.RequestOptions): Promise<TheraApi.api.thera.eor.GetEorTrackerResponse>;
|
|
37
37
|
/**
|
|
38
|
-
* Gets EOR employee data from Airtable for a specific employee
|
|
38
|
+
* Gets EOR employee data from Airtable for a specific employee email
|
|
39
39
|
*
|
|
40
|
-
* @param {string}
|
|
40
|
+
* @param {string} email
|
|
41
41
|
* @param {EorTrackerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
|
-
* await client.api.thera.eor.eorTrackerApi.
|
|
44
|
+
* await client.api.thera.eor.eorTrackerApi.getEorEmployeeByEmail("string")
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
getEorEmployeeByEmail(email: string, requestOptions?: EorTrackerApi.RequestOptions): Promise<TheraApi.api.thera.eor.GetEorEmployeeByEmailResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the email field of the latest EOR employee record added to Airtable for a specific company ID
|
|
49
|
+
*
|
|
50
|
+
* @param {string} companyId
|
|
51
|
+
* @param {EorTrackerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* await client.api.thera.eor.eorTrackerApi.getLatestEorEmployeeEmailByCompanyId("string")
|
|
55
|
+
*/
|
|
56
|
+
getLatestEorEmployeeEmailByCompanyId(companyId: string, requestOptions?: EorTrackerApi.RequestOptions): Promise<TheraApi.api.thera.eor.GetLatestEorEmployeeEmailResponse>;
|
|
47
57
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
48
58
|
}
|
|
@@ -72,7 +72,7 @@ class EorTrackerApi {
|
|
|
72
72
|
const _response = yield core.fetcher({
|
|
73
73
|
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)}/eor-tracker`),
|
|
74
74
|
method: "GET",
|
|
75
|
-
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-
|
|
75
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
76
76
|
contentType: "application/json",
|
|
77
77
|
requestType: "json",
|
|
78
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -110,21 +110,21 @@ class EorTrackerApi {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* Gets EOR employee data from Airtable for a specific employee
|
|
113
|
+
* Gets EOR employee data from Airtable for a specific employee email
|
|
114
114
|
*
|
|
115
|
-
* @param {string}
|
|
115
|
+
* @param {string} email
|
|
116
116
|
* @param {EorTrackerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
|
-
* await client.api.thera.eor.eorTrackerApi.
|
|
119
|
+
* await client.api.thera.eor.eorTrackerApi.getEorEmployeeByEmail("string")
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
getEorEmployeeByEmail(email, requestOptions) {
|
|
122
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
123
|
var _a;
|
|
124
124
|
const _response = yield core.fetcher({
|
|
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)), `eor-tracker/employee/${encodeURIComponent(
|
|
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)), `eor-tracker/employee/${encodeURIComponent(email)}`),
|
|
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "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,
|
|
@@ -132,7 +132,7 @@ class EorTrackerApi {
|
|
|
132
132
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
133
133
|
});
|
|
134
134
|
if (_response.ok) {
|
|
135
|
-
return serializers.api.thera.eor.
|
|
135
|
+
return serializers.api.thera.eor.GetEorEmployeeByEmailResponse.parseOrThrow(_response.body, {
|
|
136
136
|
unrecognizedObjectKeys: "passthrough",
|
|
137
137
|
allowUnrecognizedUnionMembers: true,
|
|
138
138
|
allowUnrecognizedEnumValues: true,
|
|
@@ -153,7 +153,59 @@ class EorTrackerApi {
|
|
|
153
153
|
body: _response.error.rawBody,
|
|
154
154
|
});
|
|
155
155
|
case "timeout":
|
|
156
|
-
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /eor-tracker/employee/{
|
|
156
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /eor-tracker/employee/{email}.");
|
|
157
|
+
case "unknown":
|
|
158
|
+
throw new errors.TheraApiError({
|
|
159
|
+
message: _response.error.errorMessage,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Gets the email field of the latest EOR employee record added to Airtable for a specific company ID
|
|
166
|
+
*
|
|
167
|
+
* @param {string} companyId
|
|
168
|
+
* @param {EorTrackerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* await client.api.thera.eor.eorTrackerApi.getLatestEorEmployeeEmailByCompanyId("string")
|
|
172
|
+
*/
|
|
173
|
+
getLatestEorEmployeeEmailByCompanyId(companyId, requestOptions) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
var _a;
|
|
176
|
+
const _response = yield core.fetcher({
|
|
177
|
+
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)}/eor-tracker/latest-email`),
|
|
178
|
+
method: "GET",
|
|
179
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
180
|
+
contentType: "application/json",
|
|
181
|
+
requestType: "json",
|
|
182
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
183
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
184
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
185
|
+
});
|
|
186
|
+
if (_response.ok) {
|
|
187
|
+
return serializers.api.thera.eor.GetLatestEorEmployeeEmailResponse.parseOrThrow(_response.body, {
|
|
188
|
+
unrecognizedObjectKeys: "passthrough",
|
|
189
|
+
allowUnrecognizedUnionMembers: true,
|
|
190
|
+
allowUnrecognizedEnumValues: true,
|
|
191
|
+
skipValidation: true,
|
|
192
|
+
breadcrumbsPrefix: ["response"],
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
if (_response.error.reason === "status-code") {
|
|
196
|
+
throw new errors.TheraApiError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.body,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
switch (_response.error.reason) {
|
|
202
|
+
case "non-json":
|
|
203
|
+
throw new errors.TheraApiError({
|
|
204
|
+
statusCode: _response.error.statusCode,
|
|
205
|
+
body: _response.error.rawBody,
|
|
206
|
+
});
|
|
207
|
+
case "timeout":
|
|
208
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/eor-tracker/latest-email.");
|
|
157
209
|
case "unknown":
|
|
158
210
|
throw new errors.TheraApiError({
|
|
159
211
|
message: _response.error.errorMessage,
|
package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/types/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./GetEorTrackerResponse"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./GetEorEmployeeByEmailResponse"), exports);
|
|
19
|
+
__exportStar(require("./GetLatestEorEmployeeEmailResponse"), exports);
|
package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts
CHANGED
|
@@ -96,5 +96,30 @@ export declare class Misc {
|
|
|
96
96
|
* })
|
|
97
97
|
*/
|
|
98
98
|
processAchTpInvoices(request: TheraApi.api.thera.misc.ProcessAchTpInvoicesCronRequest, requestOptions?: Misc.RequestOptions): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Webhook endpoint that receives submissions from Fillout forms to create EOR employees. This endpoint accepts the same request structure as the AddEorEmployeeRequest.
|
|
101
|
+
*
|
|
102
|
+
* @param {TheraApi.api.thera.misc.FilloutEorEmployeeRequest} request
|
|
103
|
+
* @param {Misc.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* await client.api.thera.misc.misc.filloutEorEmployeeWebhook({
|
|
107
|
+
* theraWebhookSignatureHeader: "string",
|
|
108
|
+
* body: {
|
|
109
|
+
* firstName: "string",
|
|
110
|
+
* lastName: "string",
|
|
111
|
+
* email: "string",
|
|
112
|
+
* country: "string",
|
|
113
|
+
* companyId: "string",
|
|
114
|
+
* teamId: "string",
|
|
115
|
+
* jobTitle: "string",
|
|
116
|
+
* startDate: "2023-01-15",
|
|
117
|
+
* rate: 1.1,
|
|
118
|
+
* wageType: "HOURLY",
|
|
119
|
+
* currency: "string"
|
|
120
|
+
* }
|
|
121
|
+
* })
|
|
122
|
+
*/
|
|
123
|
+
filloutEorEmployeeWebhook(request: TheraApi.api.thera.misc.FilloutEorEmployeeRequest, requestOptions?: Misc.RequestOptions): Promise<TheraApi.api.thera.misc.FilloutEorEmployeeWebhookResponse>;
|
|
99
124
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
125
|
}
|
package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js
CHANGED
|
@@ -75,7 +75,7 @@ class Misc {
|
|
|
75
75
|
const _response = yield core.fetcher({
|
|
76
76
|
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)), "webhook/regular-cron"),
|
|
77
77
|
method: "POST",
|
|
78
|
-
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-
|
|
78
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -130,7 +130,7 @@ class Misc {
|
|
|
130
130
|
const _response = yield core.fetcher({
|
|
131
131
|
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)), "webhook/auto-withdrawal-cron"),
|
|
132
132
|
method: "POST",
|
|
133
|
-
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-
|
|
133
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
134
134
|
contentType: "application/json",
|
|
135
135
|
requestType: "json",
|
|
136
136
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -185,7 +185,7 @@ class Misc {
|
|
|
185
185
|
const _response = yield core.fetcher({
|
|
186
186
|
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)), "webhook/autopay-invoices-cron"),
|
|
187
187
|
method: "POST",
|
|
188
|
-
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-
|
|
188
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
189
189
|
contentType: "application/json",
|
|
190
190
|
requestType: "json",
|
|
191
191
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -234,7 +234,7 @@ class Misc {
|
|
|
234
234
|
const _response = yield core.fetcher({
|
|
235
235
|
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)), "webhook/autopay-email-cron"),
|
|
236
236
|
method: "POST",
|
|
237
|
-
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-
|
|
237
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
238
238
|
contentType: "application/json",
|
|
239
239
|
requestType: "json",
|
|
240
240
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -283,7 +283,7 @@ class Misc {
|
|
|
283
283
|
const _response = yield core.fetcher({
|
|
284
284
|
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)), "webhook/contract-renewal-cron"),
|
|
285
285
|
method: "POST",
|
|
286
|
-
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-
|
|
286
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
287
287
|
contentType: "application/json",
|
|
288
288
|
requestType: "json",
|
|
289
289
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -338,7 +338,7 @@ class Misc {
|
|
|
338
338
|
const _response = yield core.fetcher({
|
|
339
339
|
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)), "webhook/process-ach-invoices"),
|
|
340
340
|
method: "POST",
|
|
341
|
-
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-
|
|
341
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
342
342
|
contentType: "application/json",
|
|
343
343
|
requestType: "json",
|
|
344
344
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -369,6 +369,77 @@ class Misc {
|
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* Webhook endpoint that receives submissions from Fillout forms to create EOR employees. This endpoint accepts the same request structure as the AddEorEmployeeRequest.
|
|
374
|
+
*
|
|
375
|
+
* @param {TheraApi.api.thera.misc.FilloutEorEmployeeRequest} request
|
|
376
|
+
* @param {Misc.RequestOptions} requestOptions - Request-specific configuration.
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* await client.api.thera.misc.misc.filloutEorEmployeeWebhook({
|
|
380
|
+
* theraWebhookSignatureHeader: "string",
|
|
381
|
+
* body: {
|
|
382
|
+
* firstName: "string",
|
|
383
|
+
* lastName: "string",
|
|
384
|
+
* email: "string",
|
|
385
|
+
* country: "string",
|
|
386
|
+
* companyId: "string",
|
|
387
|
+
* teamId: "string",
|
|
388
|
+
* jobTitle: "string",
|
|
389
|
+
* startDate: "2023-01-15",
|
|
390
|
+
* rate: 1.1,
|
|
391
|
+
* wageType: "HOURLY",
|
|
392
|
+
* currency: "string"
|
|
393
|
+
* }
|
|
394
|
+
* })
|
|
395
|
+
*/
|
|
396
|
+
filloutEorEmployeeWebhook(request, requestOptions) {
|
|
397
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
398
|
+
var _a;
|
|
399
|
+
const { theraWebhookSignatureHeader, body: _body } = request;
|
|
400
|
+
const _response = yield core.fetcher({
|
|
401
|
+
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)), "webhook/fillout-eor-employee"),
|
|
402
|
+
method: "POST",
|
|
403
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
404
|
+
contentType: "application/json",
|
|
405
|
+
requestType: "json",
|
|
406
|
+
body: serializers.api.thera.misc.FilloutEorEmployeeWebhookRequest.jsonOrThrow(_body, {
|
|
407
|
+
unrecognizedObjectKeys: "strip",
|
|
408
|
+
}),
|
|
409
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
410
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
411
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
412
|
+
});
|
|
413
|
+
if (_response.ok) {
|
|
414
|
+
return serializers.api.thera.misc.FilloutEorEmployeeWebhookResponse.parseOrThrow(_response.body, {
|
|
415
|
+
unrecognizedObjectKeys: "passthrough",
|
|
416
|
+
allowUnrecognizedUnionMembers: true,
|
|
417
|
+
allowUnrecognizedEnumValues: true,
|
|
418
|
+
skipValidation: true,
|
|
419
|
+
breadcrumbsPrefix: ["response"],
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
if (_response.error.reason === "status-code") {
|
|
423
|
+
throw new errors.TheraApiError({
|
|
424
|
+
statusCode: _response.error.statusCode,
|
|
425
|
+
body: _response.error.body,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
switch (_response.error.reason) {
|
|
429
|
+
case "non-json":
|
|
430
|
+
throw new errors.TheraApiError({
|
|
431
|
+
statusCode: _response.error.statusCode,
|
|
432
|
+
body: _response.error.rawBody,
|
|
433
|
+
});
|
|
434
|
+
case "timeout":
|
|
435
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /webhook/fillout-eor-employee.");
|
|
436
|
+
case "unknown":
|
|
437
|
+
throw new errors.TheraApiError({
|
|
438
|
+
message: _response.error.errorMessage,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
}
|
|
372
443
|
_getAuthorizationHeader() {
|
|
373
444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
374
445
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* theraWebhookSignatureHeader: "string",
|
|
9
|
+
* body: {
|
|
10
|
+
* firstName: "string",
|
|
11
|
+
* lastName: "string",
|
|
12
|
+
* email: "string",
|
|
13
|
+
* country: "string",
|
|
14
|
+
* companyId: "string",
|
|
15
|
+
* teamId: "string",
|
|
16
|
+
* jobTitle: "string",
|
|
17
|
+
* startDate: "2023-01-15",
|
|
18
|
+
* rate: 1.1,
|
|
19
|
+
* wageType: "HOURLY",
|
|
20
|
+
* currency: "string"
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*/
|
|
24
|
+
export interface FilloutEorEmployeeRequest {
|
|
25
|
+
theraWebhookSignatureHeader: string;
|
|
26
|
+
body: TheraApi.api.thera.misc.FilloutEorEmployeeWebhookRequest;
|
|
27
|
+
}
|
|
@@ -4,3 +4,4 @@ export { type AutoPayCronRequest } from "./AutoPayCronRequest";
|
|
|
4
4
|
export { type EmailNotificationCronRequest } from "./EmailNotificationCronRequest";
|
|
5
5
|
export { type ContractRenewalCronRequest } from "./ContractRenewalCronRequest";
|
|
6
6
|
export { type ProcessAchTpInvoicesCronRequest } from "./ProcessAchTpInvoicesCronRequest";
|
|
7
|
+
export { type FilloutEorEmployeeRequest } from "./FilloutEorEmployeeRequest";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../../index";
|
|
5
|
+
export interface FilloutEorEmployeeWebhookRequest {
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
email: string;
|
|
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
|
+
currency: string;
|
|
17
|
+
}
|
package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * from "./DailyCronResponse";
|
|
|
2
2
|
export * from "./AutoWithdrawalResults";
|
|
3
3
|
export * from "./TriggeredWithdrawal";
|
|
4
4
|
export * from "./ContractRenewalCronResponse";
|
|
5
|
+
export * from "./FilloutEorEmployeeWebhookResponse";
|
|
6
|
+
export * from "./FilloutEorEmployeeWebhookRequest";
|
|
@@ -18,3 +18,5 @@ __exportStar(require("./DailyCronResponse"), exports);
|
|
|
18
18
|
__exportStar(require("./AutoWithdrawalResults"), exports);
|
|
19
19
|
__exportStar(require("./TriggeredWithdrawal"), exports);
|
|
20
20
|
__exportStar(require("./ContractRenewalCronResponse"), exports);
|
|
21
|
+
__exportStar(require("./FilloutEorEmployeeWebhookResponse"), exports);
|
|
22
|
+
__exportStar(require("./FilloutEorEmployeeWebhookRequest"), exports);
|
|
@@ -72,7 +72,7 @@ class OffcycleApi {
|
|
|
72
72
|
const _response = yield core.fetcher({
|
|
73
73
|
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)}/w2-payroll/off-cycle-checks`),
|
|
74
74
|
method: "GET",
|
|
75
|
-
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-
|
|
75
|
+
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-prerelease2904-dev-2", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2904-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
76
76
|
contentType: "application/json",
|
|
77
77
|
requestType: "json",
|
|
78
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|