@thera-hr/api-sdk 0.0.1-prerelease3075-dev-3 → 0.0.1-prerelease3077-production
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 +31 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +157 -33
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.d.ts +16 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +10 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +14 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +23 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +15 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +7 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
- package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +25 -24
- package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
- 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.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 +7 -7
- 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.d.ts +2 -1
- package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +13 -12
- package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
- package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
- 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 +31 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +157 -33
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.d.ts +16 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWorkerWithdrawalQuote.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +10 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +14 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +23 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +15 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +7 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +25 -24
- package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
- 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.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 +7 -7
- 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.d.ts +2 -1
- package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +13 -12
- package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
- package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
- package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.js +2 -1
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +10 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +41 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +15 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +46 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +19 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +50 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +48 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
- package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.js +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
- package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +141 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.d.ts +2 -1
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/EorPayIn.js +2 -1
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.d.ts +10 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/FeeType.js +41 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts +15 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.js +46 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.d.ts +19 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalQuote.js +50 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.d.ts +17 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalRequest.js +48 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WorkerWithdrawalResponse.js +43 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +5 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +5 -0
- package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bridge/resources/bridgeApi/types/ExternalAccount.js +1 -0
- package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/ProcessFundsTransfer.js +1 -0
- package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +4 -4
- package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +4 -4
- 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": "0.0.1-
|
|
86
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
145
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
212
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
271
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
323
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
372
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
425
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
472
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
527
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
591
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
645
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
703
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
755
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
817
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
876
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
939
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
1012
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
1088
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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": "0.0.1-
|
|
1142
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "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,
|
|
@@ -1193,7 +1193,7 @@ class BankApi {
|
|
|
1193
1193
|
const _response = yield core.fetcher({
|
|
1194
1194
|
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)}`),
|
|
1195
1195
|
method: "PATCH",
|
|
1196
|
-
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-
|
|
1196
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1197
1197
|
contentType: "application/json",
|
|
1198
1198
|
requestType: "json",
|
|
1199
1199
|
body: serializers.api.thera.bank.EditWithdrawalMethodRequest.jsonOrThrow(request, {
|
|
@@ -1255,7 +1255,7 @@ class BankApi {
|
|
|
1255
1255
|
const _response = yield core.fetcher({
|
|
1256
1256
|
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`),
|
|
1257
1257
|
method: "POST",
|
|
1258
|
-
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-
|
|
1258
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1259
1259
|
contentType: "application/json",
|
|
1260
1260
|
requestType: "json",
|
|
1261
1261
|
body: serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1295,6 +1295,130 @@ class BankApi {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
|
+
/**
|
|
1299
|
+
* @param {string} userId
|
|
1300
|
+
* @param {string} companyId
|
|
1301
|
+
* @param {TheraApi.api.thera.bank.GetWorkerWithdrawalQuote} request
|
|
1302
|
+
* @param {BankApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
1303
|
+
*
|
|
1304
|
+
* @example
|
|
1305
|
+
* await client.api.thera.bank.bankApi.getWorkerWithdrawalQuote("string", "string", {
|
|
1306
|
+
* amount: 1000000,
|
|
1307
|
+
* amountCurrency: "string",
|
|
1308
|
+
* withdrawalMethodId: "string"
|
|
1309
|
+
* })
|
|
1310
|
+
*/
|
|
1311
|
+
getWorkerWithdrawalQuote(userId, companyId, request, requestOptions) {
|
|
1312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1313
|
+
var _a;
|
|
1314
|
+
const { amount, amountCurrency, withdrawalMethodId } = request;
|
|
1315
|
+
const _queryParams = {};
|
|
1316
|
+
_queryParams["amount"] = amount.toString();
|
|
1317
|
+
_queryParams["amountCurrency"] = amountCurrency;
|
|
1318
|
+
_queryParams["withdrawalMethodId"] = withdrawalMethodId;
|
|
1319
|
+
const _response = yield core.fetcher({
|
|
1320
|
+
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`),
|
|
1321
|
+
method: "GET",
|
|
1322
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1323
|
+
contentType: "application/json",
|
|
1324
|
+
queryParameters: _queryParams,
|
|
1325
|
+
requestType: "json",
|
|
1326
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1327
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1328
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1329
|
+
});
|
|
1330
|
+
if (_response.ok) {
|
|
1331
|
+
return serializers.api.thera.bank.WorkerWithdrawalQuote.parseOrThrow(_response.body, {
|
|
1332
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1333
|
+
allowUnrecognizedUnionMembers: true,
|
|
1334
|
+
allowUnrecognizedEnumValues: true,
|
|
1335
|
+
skipValidation: true,
|
|
1336
|
+
breadcrumbsPrefix: ["response"],
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
if (_response.error.reason === "status-code") {
|
|
1340
|
+
throw new errors.TheraApiError({
|
|
1341
|
+
statusCode: _response.error.statusCode,
|
|
1342
|
+
body: _response.error.body,
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
switch (_response.error.reason) {
|
|
1346
|
+
case "non-json":
|
|
1347
|
+
throw new errors.TheraApiError({
|
|
1348
|
+
statusCode: _response.error.statusCode,
|
|
1349
|
+
body: _response.error.rawBody,
|
|
1350
|
+
});
|
|
1351
|
+
case "timeout":
|
|
1352
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling GET /companies/{companyId}/workers/{userId}/quote.");
|
|
1353
|
+
case "unknown":
|
|
1354
|
+
throw new errors.TheraApiError({
|
|
1355
|
+
message: _response.error.errorMessage,
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* @param {string} userId
|
|
1362
|
+
* @param {string} companyId
|
|
1363
|
+
* @param {TheraApi.api.thera.bank.WorkerWithdrawalRequest} request
|
|
1364
|
+
* @param {BankApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
1365
|
+
*
|
|
1366
|
+
* @example
|
|
1367
|
+
* await client.api.thera.bank.bankApi.workerWithdraw("string", "string", {
|
|
1368
|
+
* debitAmount: 1000000,
|
|
1369
|
+
* debitCurrency: "string",
|
|
1370
|
+
* creditAmount: 1000000,
|
|
1371
|
+
* creditCurrency: "string",
|
|
1372
|
+
* withdrawalMethodId: "string",
|
|
1373
|
+
* providerId: "string"
|
|
1374
|
+
* })
|
|
1375
|
+
*/
|
|
1376
|
+
workerWithdraw(userId, companyId, request, requestOptions) {
|
|
1377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1378
|
+
var _a;
|
|
1379
|
+
const _response = yield core.fetcher({
|
|
1380
|
+
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`),
|
|
1381
|
+
method: "POST",
|
|
1382
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1383
|
+
contentType: "application/json",
|
|
1384
|
+
requestType: "json",
|
|
1385
|
+
body: serializers.api.thera.bank.WorkerWithdrawalRequest.jsonOrThrow(request, {
|
|
1386
|
+
unrecognizedObjectKeys: "strip",
|
|
1387
|
+
}),
|
|
1388
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1389
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1390
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1391
|
+
});
|
|
1392
|
+
if (_response.ok) {
|
|
1393
|
+
return serializers.api.thera.bank.WorkerWithdrawalResponse.parseOrThrow(_response.body, {
|
|
1394
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1395
|
+
allowUnrecognizedUnionMembers: true,
|
|
1396
|
+
allowUnrecognizedEnumValues: true,
|
|
1397
|
+
skipValidation: true,
|
|
1398
|
+
breadcrumbsPrefix: ["response"],
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
if (_response.error.reason === "status-code") {
|
|
1402
|
+
throw new errors.TheraApiError({
|
|
1403
|
+
statusCode: _response.error.statusCode,
|
|
1404
|
+
body: _response.error.body,
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
switch (_response.error.reason) {
|
|
1408
|
+
case "non-json":
|
|
1409
|
+
throw new errors.TheraApiError({
|
|
1410
|
+
statusCode: _response.error.statusCode,
|
|
1411
|
+
body: _response.error.rawBody,
|
|
1412
|
+
});
|
|
1413
|
+
case "timeout":
|
|
1414
|
+
throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/workers/{userId}/withdraw.");
|
|
1415
|
+
case "unknown":
|
|
1416
|
+
throw new errors.TheraApiError({
|
|
1417
|
+
message: _response.error.errorMessage,
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1298
1422
|
/**
|
|
1299
1423
|
* @param {string} userId
|
|
1300
1424
|
* @param {string} companyId
|
|
@@ -1317,7 +1441,7 @@ class BankApi {
|
|
|
1317
1441
|
const _response = yield core.fetcher({
|
|
1318
1442
|
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`),
|
|
1319
1443
|
method: "POST",
|
|
1320
|
-
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-
|
|
1444
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1321
1445
|
contentType: "application/json",
|
|
1322
1446
|
requestType: "json",
|
|
1323
1447
|
body: serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1371,7 +1495,7 @@ class BankApi {
|
|
|
1371
1495
|
const _response = yield core.fetcher({
|
|
1372
1496
|
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`),
|
|
1373
1497
|
method: "GET",
|
|
1374
|
-
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-
|
|
1498
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1375
1499
|
contentType: "application/json",
|
|
1376
1500
|
requestType: "json",
|
|
1377
1501
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1422,7 +1546,7 @@ class BankApi {
|
|
|
1422
1546
|
const _response = yield core.fetcher({
|
|
1423
1547
|
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`),
|
|
1424
1548
|
method: "GET",
|
|
1425
|
-
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-
|
|
1549
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1426
1550
|
contentType: "application/json",
|
|
1427
1551
|
requestType: "json",
|
|
1428
1552
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1472,7 +1596,7 @@ class BankApi {
|
|
|
1472
1596
|
const _response = yield core.fetcher({
|
|
1473
1597
|
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)}`),
|
|
1474
1598
|
method: "GET",
|
|
1475
|
-
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-
|
|
1599
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1476
1600
|
contentType: "application/json",
|
|
1477
1601
|
requestType: "json",
|
|
1478
1602
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1536,7 +1660,7 @@ class BankApi {
|
|
|
1536
1660
|
const _response = yield core.fetcher({
|
|
1537
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)), `companies/${encodeURIComponent(companyId)}/pay-ins`),
|
|
1538
1662
|
method: "GET",
|
|
1539
|
-
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-
|
|
1663
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1540
1664
|
contentType: "application/json",
|
|
1541
1665
|
queryParameters: _queryParams,
|
|
1542
1666
|
requestType: "json",
|
|
@@ -1588,7 +1712,7 @@ class BankApi {
|
|
|
1588
1712
|
const _response = yield core.fetcher({
|
|
1589
1713
|
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)}`),
|
|
1590
1714
|
method: "GET",
|
|
1591
|
-
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-
|
|
1715
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1592
1716
|
contentType: "application/json",
|
|
1593
1717
|
requestType: "json",
|
|
1594
1718
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1643,7 +1767,7 @@ class BankApi {
|
|
|
1643
1767
|
const _response = yield core.fetcher({
|
|
1644
1768
|
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)}`),
|
|
1645
1769
|
method: "DELETE",
|
|
1646
|
-
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-
|
|
1770
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1647
1771
|
contentType: "application/json",
|
|
1648
1772
|
requestType: "json",
|
|
1649
1773
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1702,7 +1826,7 @@ class BankApi {
|
|
|
1702
1826
|
const _response = yield core.fetcher({
|
|
1703
1827
|
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"),
|
|
1704
1828
|
method: "GET",
|
|
1705
|
-
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-
|
|
1829
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1706
1830
|
contentType: "application/json",
|
|
1707
1831
|
queryParameters: _queryParams,
|
|
1708
1832
|
requestType: "json",
|
|
@@ -1757,7 +1881,7 @@ class BankApi {
|
|
|
1757
1881
|
const _response = yield core.fetcher({
|
|
1758
1882
|
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`),
|
|
1759
1883
|
method: "POST",
|
|
1760
|
-
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-
|
|
1884
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1761
1885
|
contentType: "application/json",
|
|
1762
1886
|
requestType: "json",
|
|
1763
1887
|
body: serializers.api.thera.bank.SetAutoWithdrawalRequest.jsonOrThrow(request, {
|
|
@@ -1812,7 +1936,7 @@ class BankApi {
|
|
|
1812
1936
|
const _response = yield core.fetcher({
|
|
1813
1937
|
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"),
|
|
1814
1938
|
method: "POST",
|
|
1815
|
-
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-
|
|
1939
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1816
1940
|
contentType: "application/json",
|
|
1817
1941
|
requestType: "json",
|
|
1818
1942
|
body: serializers.api.thera.bank.CreateCheckPaymentMethodFromPlaidRequest.jsonOrThrow(request, {
|
|
@@ -1862,7 +1986,7 @@ class BankApi {
|
|
|
1862
1986
|
const _response = yield core.fetcher({
|
|
1863
1987
|
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"),
|
|
1864
1988
|
method: "POST",
|
|
1865
|
-
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-
|
|
1989
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1866
1990
|
contentType: "application/json",
|
|
1867
1991
|
requestType: "json",
|
|
1868
1992
|
body: serializers.api.thera.bank.CreateStripePaymentMethodFromPlaidRequest.jsonOrThrow(request, {
|
|
@@ -1916,7 +2040,7 @@ class BankApi {
|
|
|
1916
2040
|
const _response = yield core.fetcher({
|
|
1917
2041
|
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`),
|
|
1918
2042
|
method: "POST",
|
|
1919
|
-
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-
|
|
2043
|
+
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-prerelease3077-production", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease3077-production", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1920
2044
|
contentType: "application/json",
|
|
1921
2045
|
requestType: "json",
|
|
1922
2046
|
body: serializers.api.thera.bank.SetBulkAutoApproveInvoiceForTeamsRequest.jsonOrThrow(request, {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* amount: 1000000,
|
|
8
|
+
* amountCurrency: "string",
|
|
9
|
+
* withdrawalMethodId: "string"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface GetWorkerWithdrawalQuote {
|
|
13
|
+
amount: number;
|
|
14
|
+
amountCurrency: string;
|
|
15
|
+
withdrawalMethodId: string;
|
|
16
|
+
}
|
|
@@ -6,6 +6,7 @@ export { type GetWithdrawalLimitsByMethodRequest } from "./GetWithdrawalLimitsBy
|
|
|
6
6
|
export { type GetWithdrawalMinimumByCurrencyRequest } from "./GetWithdrawalMinimumByCurrencyRequest";
|
|
7
7
|
export { type GetWithdrawalMinimumByMethodRequest } from "./GetWithdrawalMinimumByMethodRequest";
|
|
8
8
|
export { type EditWithdrawalMethodRequest } from "./EditWithdrawalMethodRequest";
|
|
9
|
+
export { type GetWorkerWithdrawalQuote } from "./GetWorkerWithdrawalQuote";
|
|
9
10
|
export { type GetPayInHistoryRequest } from "./GetPayInHistoryRequest";
|
|
10
11
|
export { type GetCurrencyConversionRequest } from "./GetCurrencyConversionRequest";
|
|
11
12
|
export { type SetAutoWithdrawalRequest } from "./SetAutoWithdrawalRequest";
|
package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalFee.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* Represents a fee a user sees which is applied to their Quote.
|
|
7
|
+
*/
|
|
8
|
+
export interface WithdrawalFee {
|
|
9
|
+
/** A number amount, either a percentage or currency amount. */
|
|
10
|
+
amount: number;
|
|
11
|
+
feeType: TheraApi.api.thera.bank.FeeType;
|
|
12
|
+
/** A short description of the fee. */
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* A user-facing quote which includes fees and an exchange rate.
|
|
7
|
+
*/
|
|
8
|
+
export interface WorkerWithdrawalQuote {
|
|
9
|
+
/** A list of fees presented to the users. */
|
|
10
|
+
fees: TheraApi.api.thera.bank.WithdrawalFee[];
|
|
11
|
+
/** The exchange rate presented to the the user. */
|
|
12
|
+
exchangeRate: number;
|
|
13
|
+
/** The currency the user wants to withdraw to. */
|
|
14
|
+
targetCurrency: string;
|
|
15
|
+
/** The amount the user will see in their bank account, in the target currency. */
|
|
16
|
+
targetAmount: number;
|
|
17
|
+
/** The currency the user wants to withdraw to. */
|
|
18
|
+
sourceCurrency: string;
|
|
19
|
+
/** The amount (in sourceCurrency) that will be debited from the workers wallet. */
|
|
20
|
+
sourceAmount: number;
|
|
21
|
+
/** A string ID for the provider this quote will use. */
|
|
22
|
+
provider: string;
|
|
23
|
+
}
|