@thera-hr/api-sdk 1.1.1-prerelease2492-dev-2 → 1.1.1-prerelease2492-dev-4
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.js +1 -1
- package/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
- package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +12 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +91 -37
- package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +29 -29
- 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 +6 -6
- 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.js +3 -3
- package/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +9 -9
- package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.js +11 -11
- 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 +5 -5
- package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +7 -7
- package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +15 -15
- 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 +14 -14
- 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.js +1 -1
- package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
- package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +12 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +91 -37
- package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +29 -29
- 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 +6 -6
- 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.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +9 -9
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.js +11 -11
- 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 +5 -5
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +7 -7
- package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +15 -15
- 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 +14 -14
- package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +79 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -83,7 +83,7 @@ class BankApi {
|
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
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)}/bank/account`),
|
|
85
85
|
method: "GET",
|
|
86
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
86
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
requestType: "json",
|
|
89
89
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -142,7 +142,7 @@ class BankApi {
|
|
|
142
142
|
const _response = yield core.fetcher({
|
|
143
143
|
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)), "bank/account/update"),
|
|
144
144
|
method: "POST",
|
|
145
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
145
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
146
146
|
contentType: "application/json",
|
|
147
147
|
queryParameters: _queryParams,
|
|
148
148
|
requestType: "json",
|
|
@@ -209,7 +209,7 @@ class BankApi {
|
|
|
209
209
|
const _response = yield core.fetcher({
|
|
210
210
|
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)), "bank/account/signup/link"),
|
|
211
211
|
method: "POST",
|
|
212
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
212
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
213
213
|
contentType: "application/json",
|
|
214
214
|
queryParameters: _queryParams,
|
|
215
215
|
requestType: "json",
|
|
@@ -268,7 +268,7 @@ class BankApi {
|
|
|
268
268
|
const _response = yield core.fetcher({
|
|
269
269
|
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)), "bank/account/signup/complete"),
|
|
270
270
|
method: "POST",
|
|
271
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
271
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
272
272
|
contentType: "application/json",
|
|
273
273
|
requestType: "json",
|
|
274
274
|
body: serializers.api.thera.bank.CompleteAccountSignupRequest.jsonOrThrow(request, {
|
|
@@ -320,7 +320,7 @@ class BankApi {
|
|
|
320
320
|
const _response = yield core.fetcher({
|
|
321
321
|
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)), "bank/stripe/attach"),
|
|
322
322
|
method: "POST",
|
|
323
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
323
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
324
324
|
contentType: "application/json",
|
|
325
325
|
requestType: "json",
|
|
326
326
|
body: serializers.api.thera.bank.ReattachStripeAccountMandateRequest.jsonOrThrow(request, {
|
|
@@ -369,7 +369,7 @@ class BankApi {
|
|
|
369
369
|
const _response = yield core.fetcher({
|
|
370
370
|
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)}/payment-methods`),
|
|
371
371
|
method: "GET",
|
|
372
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
372
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
373
373
|
contentType: "application/json",
|
|
374
374
|
requestType: "json",
|
|
375
375
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -422,7 +422,7 @@ class BankApi {
|
|
|
422
422
|
const _response = yield core.fetcher({
|
|
423
423
|
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)}/payment-methods/${encodeURIComponent(paymentMethodId)}`),
|
|
424
424
|
method: "DELETE",
|
|
425
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
425
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
426
426
|
contentType: "application/json",
|
|
427
427
|
requestType: "json",
|
|
428
428
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -469,7 +469,7 @@ class BankApi {
|
|
|
469
469
|
const _response = yield core.fetcher({
|
|
470
470
|
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)}/payment-methods/${encodeURIComponent(paymentMethodId)}/select-for-w2`),
|
|
471
471
|
method: "POST",
|
|
472
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
472
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
473
473
|
contentType: "application/json",
|
|
474
474
|
requestType: "json",
|
|
475
475
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -524,7 +524,7 @@ class BankApi {
|
|
|
524
524
|
const _response = yield core.fetcher({
|
|
525
525
|
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)), "bank/account/signup/verify"),
|
|
526
526
|
method: "POST",
|
|
527
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
527
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
528
528
|
contentType: "application/json",
|
|
529
529
|
queryParameters: _queryParams,
|
|
530
530
|
requestType: "json",
|
|
@@ -588,7 +588,7 @@ class BankApi {
|
|
|
588
588
|
const _response = yield core.fetcher({
|
|
589
589
|
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)), `company/${encodeURIComponent(companyId)}/autopay`),
|
|
590
590
|
method: "POST",
|
|
591
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
591
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
592
592
|
contentType: "application/json",
|
|
593
593
|
requestType: "json",
|
|
594
594
|
body: serializers.api.thera.bank.SetBulkAutoPayForTeamsRequest.jsonOrThrow(request, {
|
|
@@ -642,7 +642,7 @@ class BankApi {
|
|
|
642
642
|
const _response = yield core.fetcher({
|
|
643
643
|
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)), `company/${encodeURIComponent(companyId)}/teams/${encodeURIComponent(teamId)}/autopay`),
|
|
644
644
|
method: "POST",
|
|
645
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
645
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
646
646
|
contentType: "application/json",
|
|
647
647
|
requestType: "json",
|
|
648
648
|
body: serializers.api.thera.bank.SetAutoPayRequest.jsonOrThrow(request, {
|
|
@@ -700,7 +700,7 @@ class BankApi {
|
|
|
700
700
|
const _response = yield core.fetcher({
|
|
701
701
|
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)), "worker/supported-withdrawal-method-currencies"),
|
|
702
702
|
method: "GET",
|
|
703
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
703
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
704
704
|
contentType: "application/json",
|
|
705
705
|
queryParameters: _queryParams,
|
|
706
706
|
requestType: "json",
|
|
@@ -752,7 +752,7 @@ class BankApi {
|
|
|
752
752
|
const _response = yield core.fetcher({
|
|
753
753
|
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)), "worker/supported-bank-transfer-currencies"),
|
|
754
754
|
method: "GET",
|
|
755
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
755
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
756
756
|
contentType: "application/json",
|
|
757
757
|
requestType: "json",
|
|
758
758
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -814,7 +814,7 @@ class BankApi {
|
|
|
814
814
|
const _response = yield core.fetcher({
|
|
815
815
|
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)), `workers/${encodeURIComponent(userId)}/withdrawal-methods/${encodeURIComponent(paymentMethodId)}/withdrawal-limits`),
|
|
816
816
|
method: "GET",
|
|
817
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
817
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
818
818
|
contentType: "application/json",
|
|
819
819
|
queryParameters: _queryParams,
|
|
820
820
|
requestType: "json",
|
|
@@ -873,7 +873,7 @@ class BankApi {
|
|
|
873
873
|
const _response = yield core.fetcher({
|
|
874
874
|
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)), "worker/withdrawal-minimum-by-currency"),
|
|
875
875
|
method: "GET",
|
|
876
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
876
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
877
877
|
contentType: "application/json",
|
|
878
878
|
queryParameters: _queryParams,
|
|
879
879
|
requestType: "json",
|
|
@@ -936,7 +936,7 @@ class BankApi {
|
|
|
936
936
|
const _response = yield core.fetcher({
|
|
937
937
|
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)), `workers/${encodeURIComponent(userId)}/withdrawal-methods/${encodeURIComponent(paymentMethodId)}/withdrawal-minimum`),
|
|
938
938
|
method: "GET",
|
|
939
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
939
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
940
940
|
contentType: "application/json",
|
|
941
941
|
queryParameters: _queryParams,
|
|
942
942
|
requestType: "json",
|
|
@@ -1009,7 +1009,7 @@ class BankApi {
|
|
|
1009
1009
|
const _response = yield core.fetcher({
|
|
1010
1010
|
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)), "worker/supported-withdrawal-methods"),
|
|
1011
1011
|
method: "POST",
|
|
1012
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1012
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1013
1013
|
contentType: "application/json",
|
|
1014
1014
|
requestType: "json",
|
|
1015
1015
|
body: serializers.api.thera.bank.WithdrawalMethodsRequest.jsonOrThrow(request, {
|
|
@@ -1085,7 +1085,7 @@ class BankApi {
|
|
|
1085
1085
|
const _response = yield core.fetcher({
|
|
1086
1086
|
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)), `worker/${encodeURIComponent(userId)}/withdrawal-method`),
|
|
1087
1087
|
method: "POST",
|
|
1088
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1088
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1089
1089
|
contentType: "application/json",
|
|
1090
1090
|
requestType: "json",
|
|
1091
1091
|
body: serializers.api.thera.bank.WithdrawalMethodsRequest.jsonOrThrow(request, {
|
|
@@ -1139,7 +1139,7 @@ class BankApi {
|
|
|
1139
1139
|
const _response = yield core.fetcher({
|
|
1140
1140
|
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)), `worker/${encodeURIComponent(userId)}/withdrawal-method/${encodeURIComponent(withdrawalMethodId)}`),
|
|
1141
1141
|
method: "DELETE",
|
|
1142
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1142
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1143
1143
|
contentType: "application/json",
|
|
1144
1144
|
requestType: "json",
|
|
1145
1145
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1194,7 +1194,7 @@ class BankApi {
|
|
|
1194
1194
|
const _response = yield core.fetcher({
|
|
1195
1195
|
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)), `worker/${encodeURIComponent(userId)}/withdrawal-method/${encodeURIComponent(withdrawalMethodId)}`),
|
|
1196
1196
|
method: "PATCH",
|
|
1197
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1197
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1198
1198
|
contentType: "application/json",
|
|
1199
1199
|
requestType: "json",
|
|
1200
1200
|
body: serializers.api.thera.bank.EditWithdrawalMethodRequest.jsonOrThrow(request, {
|
|
@@ -1256,7 +1256,7 @@ class BankApi {
|
|
|
1256
1256
|
const _response = yield core.fetcher({
|
|
1257
1257
|
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)}/workers/${encodeURIComponent(userId)}/payout-preview`),
|
|
1258
1258
|
method: "POST",
|
|
1259
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1259
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1260
1260
|
contentType: "application/json",
|
|
1261
1261
|
requestType: "json",
|
|
1262
1262
|
body: serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1320,7 +1320,7 @@ class BankApi {
|
|
|
1320
1320
|
const _response = yield core.fetcher({
|
|
1321
1321
|
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)}/workers/${encodeURIComponent(userId)}/quote`),
|
|
1322
1322
|
method: "GET",
|
|
1323
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1323
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1324
1324
|
contentType: "application/json",
|
|
1325
1325
|
queryParameters: _queryParams,
|
|
1326
1326
|
requestType: "json",
|
|
@@ -1380,7 +1380,7 @@ class BankApi {
|
|
|
1380
1380
|
const _response = yield core.fetcher({
|
|
1381
1381
|
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)}/workers/${encodeURIComponent(userId)}/withdraw`),
|
|
1382
1382
|
method: "POST",
|
|
1383
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1383
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1384
1384
|
contentType: "application/json",
|
|
1385
1385
|
requestType: "json",
|
|
1386
1386
|
body: serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1442,7 +1442,7 @@ class BankApi {
|
|
|
1442
1442
|
const _response = yield core.fetcher({
|
|
1443
1443
|
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)}/workers/${encodeURIComponent(userId)}/payout`),
|
|
1444
1444
|
method: "POST",
|
|
1445
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1445
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1446
1446
|
contentType: "application/json",
|
|
1447
1447
|
requestType: "json",
|
|
1448
1448
|
body: serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1496,7 +1496,7 @@ class BankApi {
|
|
|
1496
1496
|
const _response = yield core.fetcher({
|
|
1497
1497
|
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)}/workers/${encodeURIComponent(userId)}/balances`),
|
|
1498
1498
|
method: "GET",
|
|
1499
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1499
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1500
1500
|
contentType: "application/json",
|
|
1501
1501
|
requestType: "json",
|
|
1502
1502
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1555,7 +1555,7 @@ class BankApi {
|
|
|
1555
1555
|
const _response = yield core.fetcher({
|
|
1556
1556
|
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)}/workers/${encodeURIComponent(userId)}/transactions`),
|
|
1557
1557
|
method: "GET",
|
|
1558
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1558
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1559
1559
|
contentType: "application/json",
|
|
1560
1560
|
queryParameters: _queryParams,
|
|
1561
1561
|
requestType: "json",
|
|
@@ -1593,6 +1593,60 @@ class BankApi {
|
|
|
1593
1593
|
}
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
|
+
/**
|
|
1597
|
+
* Get a specific worker transaction by its ledger transaction ID
|
|
1598
|
+
*
|
|
1599
|
+
* @param {string} userId
|
|
1600
|
+
* @param {string} companyId
|
|
1601
|
+
* @param {string} transactionId
|
|
1602
|
+
* @param {BankApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
1603
|
+
*
|
|
1604
|
+
* @example
|
|
1605
|
+
* await client.api.thera.bank.bankApi.getWorkerTransactionById("string", "string", "string")
|
|
1606
|
+
*/
|
|
1607
|
+
getWorkerTransactionById(userId, companyId, transactionId, requestOptions) {
|
|
1608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1609
|
+
var _a;
|
|
1610
|
+
const _response = yield core.fetcher({
|
|
1611
|
+
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)}/workers/${encodeURIComponent(userId)}/transactions/${encodeURIComponent(transactionId)}`),
|
|
1612
|
+
method: "GET",
|
|
1613
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1614
|
+
contentType: "application/json",
|
|
1615
|
+
requestType: "json",
|
|
1616
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1617
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1618
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1619
|
+
});
|
|
1620
|
+
if (_response.ok) {
|
|
1621
|
+
return serializers.api.thera.bank.WorkerTransaction.parseOrThrow(_response.body, {
|
|
1622
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1623
|
+
allowUnrecognizedUnionMembers: true,
|
|
1624
|
+
allowUnrecognizedEnumValues: true,
|
|
1625
|
+
skipValidation: true,
|
|
1626
|
+
breadcrumbsPrefix: ["response"],
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
if (_response.error.reason === "status-code") {
|
|
1630
|
+
throw new errors.TheraApiError({
|
|
1631
|
+
statusCode: _response.error.statusCode,
|
|
1632
|
+
body: _response.error.body,
|
|
1633
|
+
});
|
|
1634
|
+
}
|
|
1635
|
+
switch (_response.error.reason) {
|
|
1636
|
+
case "non-json":
|
|
1637
|
+
throw new errors.TheraApiError({
|
|
1638
|
+
statusCode: _response.error.statusCode,
|
|
1639
|
+
body: _response.error.rawBody,
|
|
1640
|
+
});
|
|
1641
|
+
case "timeout":
|
|
1642
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/workers/{userId}/transactions/{transactionId}.");
|
|
1643
|
+
case "unknown":
|
|
1644
|
+
throw new errors.TheraApiError({
|
|
1645
|
+
message: _response.error.errorMessage,
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1596
1650
|
/**
|
|
1597
1651
|
* @param {string} withdrawalId
|
|
1598
1652
|
* @param {BankApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1606,7 +1660,7 @@ class BankApi {
|
|
|
1606
1660
|
const _response = yield core.fetcher({
|
|
1607
1661
|
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)), `workers/withdrawals/delivery-estimate/${encodeURIComponent(withdrawalId)}`),
|
|
1608
1662
|
method: "GET",
|
|
1609
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1663
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1610
1664
|
contentType: "application/json",
|
|
1611
1665
|
requestType: "json",
|
|
1612
1666
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1678,7 +1732,7 @@ class BankApi {
|
|
|
1678
1732
|
const _response = yield core.fetcher({
|
|
1679
1733
|
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)}/pay-ins`),
|
|
1680
1734
|
method: "GET",
|
|
1681
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1735
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1682
1736
|
contentType: "application/json",
|
|
1683
1737
|
queryParameters: _queryParams,
|
|
1684
1738
|
requestType: "json",
|
|
@@ -1730,7 +1784,7 @@ class BankApi {
|
|
|
1730
1784
|
const _response = yield core.fetcher({
|
|
1731
1785
|
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)}/pay-ins/${encodeURIComponent(payInId)}`),
|
|
1732
1786
|
method: "GET",
|
|
1733
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1787
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1734
1788
|
contentType: "application/json",
|
|
1735
1789
|
requestType: "json",
|
|
1736
1790
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1785,7 +1839,7 @@ class BankApi {
|
|
|
1785
1839
|
const _response = yield core.fetcher({
|
|
1786
1840
|
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)}/pay-ins/off-platform/${encodeURIComponent(payInId)}`),
|
|
1787
1841
|
method: "DELETE",
|
|
1788
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1842
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1789
1843
|
contentType: "application/json",
|
|
1790
1844
|
requestType: "json",
|
|
1791
1845
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1844,7 +1898,7 @@ class BankApi {
|
|
|
1844
1898
|
const _response = yield core.fetcher({
|
|
1845
1899
|
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)), "currency/convert"),
|
|
1846
1900
|
method: "GET",
|
|
1847
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1901
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1848
1902
|
contentType: "application/json",
|
|
1849
1903
|
queryParameters: _queryParams,
|
|
1850
1904
|
requestType: "json",
|
|
@@ -1899,7 +1953,7 @@ class BankApi {
|
|
|
1899
1953
|
const _response = yield core.fetcher({
|
|
1900
1954
|
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)}/workers/${encodeURIComponent(userId)}/auto-withdrawals`),
|
|
1901
1955
|
method: "POST",
|
|
1902
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
1956
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1903
1957
|
contentType: "application/json",
|
|
1904
1958
|
requestType: "json",
|
|
1905
1959
|
body: serializers.api.thera.bank.SetAutoWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1954,7 +2008,7 @@ class BankApi {
|
|
|
1954
2008
|
const _response = yield core.fetcher({
|
|
1955
2009
|
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)), "bank/check/payment-method"),
|
|
1956
2010
|
method: "POST",
|
|
1957
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
2011
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1958
2012
|
contentType: "application/json",
|
|
1959
2013
|
requestType: "json",
|
|
1960
2014
|
body: serializers.api.thera.bank.CreateCheckPaymentMethodFromPlaidRequest.jsonOrThrow(request, {
|
|
@@ -2004,7 +2058,7 @@ class BankApi {
|
|
|
2004
2058
|
const _response = yield core.fetcher({
|
|
2005
2059
|
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)), "bank/stripe/payment-method"),
|
|
2006
2060
|
method: "POST",
|
|
2007
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
2061
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
2008
2062
|
contentType: "application/json",
|
|
2009
2063
|
requestType: "json",
|
|
2010
2064
|
body: serializers.api.thera.bank.CreateStripePaymentMethodFromPlaidRequest.jsonOrThrow(request, {
|
|
@@ -2058,7 +2112,7 @@ class BankApi {
|
|
|
2058
2112
|
const _response = yield core.fetcher({
|
|
2059
2113
|
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)), `company/${encodeURIComponent(companyId)}/auto-approve-settings`),
|
|
2060
2114
|
method: "POST",
|
|
2061
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
2115
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
2062
2116
|
contentType: "application/json",
|
|
2063
2117
|
requestType: "json",
|
|
2064
2118
|
body: serializers.api.thera.bank.SetBulkAutoApproveInvoiceForTeamsRequest.jsonOrThrow(request, {
|
|
@@ -2114,7 +2168,7 @@ class BankApi {
|
|
|
2114
2168
|
const _response = yield core.fetcher({
|
|
2115
2169
|
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)}/payments/${encodeURIComponent(paymentId)}`),
|
|
2116
2170
|
method: "GET",
|
|
2117
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
2171
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
2118
2172
|
contentType: "application/json",
|
|
2119
2173
|
queryParameters: _queryParams,
|
|
2120
2174
|
requestType: "json",
|
|
@@ -2167,7 +2221,7 @@ class BankApi {
|
|
|
2167
2221
|
const _response = yield core.fetcher({
|
|
2168
2222
|
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)}/pay-ins/count`),
|
|
2169
2223
|
method: "GET",
|
|
2170
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-
|
|
2224
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2492-dev-4", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2492-dev-4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
2171
2225
|
contentType: "application/json",
|
|
2172
2226
|
requestType: "json",
|
|
2173
2227
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|