@thera-hr/api-sdk 0.0.3283728 → 1.1.1-THERA-2281-deployment-improvement.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/Client.d.ts +3 -0
- package/api/resources/api/client/Client.d.ts +3 -0
- package/api/resources/api/resources/aiprise/client/Client.d.ts +3 -0
- package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +3 -3
- package/api/resources/api/resources/services/client/Client.d.ts +3 -0
- package/api/resources/api/resources/services/resources/file/client/Client.d.ts +7 -4
- package/api/resources/api/resources/services/resources/file/client/Client.js +12 -12
- package/api/resources/api/resources/thera/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +24 -21
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +67 -64
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +16 -13
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +41 -47
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/index.d.ts +0 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +10 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/contractor/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.d.ts +6 -3
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +9 -9
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/email/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +6 -3
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +9 -9
- package/api/resources/api/resources/thera/resources/misc/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/user/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.d.ts +4 -1
- package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
- package/api/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +2 -1
- package/api/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
- package/api/resources/db/resources/user/types/PoweredBy.d.ts +8 -0
- package/api/resources/db/resources/user/types/PoweredBy.js +10 -0
- package/api/resources/db/resources/user/types/index.d.ts +1 -0
- package/api/resources/db/resources/user/types/index.js +1 -0
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/index.d.ts +1 -1
- package/core/index.js +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +5 -5
- package/dist/Client.d.ts +3 -0
- package/dist/api/resources/api/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/aiprise/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.d.ts +4 -1
- package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/services/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/services/resources/file/client/Client.d.ts +7 -4
- package/dist/api/resources/api/resources/services/resources/file/client/Client.js +12 -12
- package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +24 -21
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +67 -64
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +16 -13
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +41 -47
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/index.d.ts +0 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +10 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +4 -1
- 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/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.d.ts +4 -1
- 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/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.d.ts +6 -3
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +9 -9
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +4 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/email/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.d.ts +4 -1
- package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +6 -3
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +9 -9
- package/dist/api/resources/api/resources/thera/resources/misc/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +4 -1
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +4 -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/user/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.d.ts +4 -1
- package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
- package/dist/api/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +2 -1
- package/dist/api/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
- package/dist/api/resources/db/resources/user/types/PoweredBy.d.ts +8 -0
- package/dist/api/resources/db/resources/user/types/PoweredBy.js +10 -0
- package/dist/api/resources/db/resources/user/types/index.d.ts +1 -0
- package/dist/api/resources/db/resources/user/types/index.js +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +5 -5
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.js +3 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +14 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.js +44 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/dist/serialization/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +1 -1
- package/dist/serialization/resources/db/resources/user/types/AiPriseVerificationResult.js +1 -1
- package/dist/serialization/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
- package/dist/serialization/resources/db/resources/user/types/BankTransfer.js +1 -0
- package/dist/serialization/resources/db/resources/user/types/PoweredBy.d.ts +10 -0
- package/dist/serialization/resources/db/resources/user/types/PoweredBy.js +31 -0
- package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -0
- package/dist/serialization/resources/db/resources/user/types/index.js +1 -0
- package/package.json +2 -2
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.js +3 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +14 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.js +44 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/serialization/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +1 -1
- package/serialization/resources/db/resources/user/types/AiPriseVerificationResult.js +1 -1
- package/serialization/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
- package/serialization/resources/db/resources/user/types/BankTransfer.js +1 -0
- package/serialization/resources/db/resources/user/types/PoweredBy.d.ts +10 -0
- package/serialization/resources/db/resources/user/types/PoweredBy.js +31 -0
- package/serialization/resources/db/resources/user/types/index.d.ts +1 -0
- package/serialization/resources/db/resources/user/types/index.js +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/InviteContractorReq.d.ts +0 -8
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/InviteContractorReq.d.ts +0 -8
- /package/api/resources/api/resources/thera/resources/company/resources/companyApi/{client/requests/InviteContractorReq.js → types/ContractorAndContracts.js} +0 -0
- /package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/{client/requests/InviteContractorReq.js → types/ContractorAndContracts.js} +0 -0
package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js
CHANGED
@@ -62,7 +62,7 @@ class BankApi {
|
|
62
62
|
/**
|
63
63
|
* Get Plaid Bank Account Details (employer/admin's bank account status). Contains Status, etc
|
64
64
|
*/
|
65
|
-
getPlaidBankDetails(companyId) {
|
65
|
+
getPlaidBankDetails(companyId, requestOptions) {
|
66
66
|
return __awaiter(this, void 0, void 0, function* () {
|
67
67
|
const _response = yield core.fetcher({
|
68
68
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/bank/account`),
|
@@ -71,10 +71,10 @@ class BankApi {
|
|
71
71
|
Authorization: yield this._getAuthorizationHeader(),
|
72
72
|
"X-Fern-Language": "JavaScript",
|
73
73
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
74
|
-
"X-Fern-SDK-Version": "
|
74
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
75
75
|
},
|
76
76
|
contentType: "application/json",
|
77
|
-
timeoutMs: 60000,
|
77
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
78
78
|
});
|
79
79
|
if (_response.ok) {
|
80
80
|
return yield serializers.api.thera.bank.bankApi.getPlaidBankDetails.Response.parseOrThrow(_response.body, {
|
@@ -106,7 +106,7 @@ class BankApi {
|
|
106
106
|
}
|
107
107
|
});
|
108
108
|
}
|
109
|
-
generatePlaidUpdateFlowLinkToken(request) {
|
109
|
+
generatePlaidUpdateFlowLinkToken(request, requestOptions) {
|
110
110
|
return __awaiter(this, void 0, void 0, function* () {
|
111
111
|
const { redirectUri } = request, _body = __rest(request, ["redirectUri"]);
|
112
112
|
const _queryParams = new url_search_params_1.default();
|
@@ -120,14 +120,14 @@ class BankApi {
|
|
120
120
|
Authorization: yield this._getAuthorizationHeader(),
|
121
121
|
"X-Fern-Language": "JavaScript",
|
122
122
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
123
|
-
"X-Fern-SDK-Version": "
|
123
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
124
124
|
},
|
125
125
|
contentType: "application/json",
|
126
126
|
queryParameters: _queryParams,
|
127
127
|
body: yield serializers.api.thera.bank.PlaidUpdateFlowLinkTokenRequest.jsonOrThrow(_body, {
|
128
128
|
unrecognizedObjectKeys: "strip",
|
129
129
|
}),
|
130
|
-
timeoutMs: 60000,
|
130
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
131
131
|
});
|
132
132
|
if (_response.ok) {
|
133
133
|
return yield serializers.api.thera.bank.PlaidUpdateFlowLinkTokenResponse.parseOrThrow(_response.body, {
|
@@ -162,7 +162,7 @@ class BankApi {
|
|
162
162
|
/**
|
163
163
|
* Get Plaid's link-token
|
164
164
|
*/
|
165
|
-
generateBankSignup(request = {}) {
|
165
|
+
generateBankSignup(request = {}, requestOptions) {
|
166
166
|
return __awaiter(this, void 0, void 0, function* () {
|
167
167
|
const { redirectUri } = request;
|
168
168
|
const _queryParams = new url_search_params_1.default();
|
@@ -176,11 +176,11 @@ class BankApi {
|
|
176
176
|
Authorization: yield this._getAuthorizationHeader(),
|
177
177
|
"X-Fern-Language": "JavaScript",
|
178
178
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
179
|
-
"X-Fern-SDK-Version": "
|
179
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
180
180
|
},
|
181
181
|
contentType: "application/json",
|
182
182
|
queryParameters: _queryParams,
|
183
|
-
timeoutMs: 60000,
|
183
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
184
184
|
});
|
185
185
|
if (_response.ok) {
|
186
186
|
return yield serializers.api.thera.bank.GetBankAccountSignupKey.parseOrThrow(_response.body, {
|
@@ -215,7 +215,7 @@ class BankApi {
|
|
215
215
|
/**
|
216
216
|
* Calling this API to signify that company's bank account has been provided to Plaid
|
217
217
|
*/
|
218
|
-
completeBankSignup(request) {
|
218
|
+
completeBankSignup(request, requestOptions) {
|
219
219
|
return __awaiter(this, void 0, void 0, function* () {
|
220
220
|
const _response = yield core.fetcher({
|
221
221
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "bank/account/signup/complete"),
|
@@ -224,13 +224,13 @@ class BankApi {
|
|
224
224
|
Authorization: yield this._getAuthorizationHeader(),
|
225
225
|
"X-Fern-Language": "JavaScript",
|
226
226
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
227
|
-
"X-Fern-SDK-Version": "
|
227
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
228
228
|
},
|
229
229
|
contentType: "application/json",
|
230
230
|
body: yield serializers.api.thera.bank.CompleteAccountSignupRequest.jsonOrThrow(request, {
|
231
231
|
unrecognizedObjectKeys: "strip",
|
232
232
|
}),
|
233
|
-
timeoutMs: 60000,
|
233
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
234
234
|
});
|
235
235
|
if (_response.ok) {
|
236
236
|
return;
|
@@ -259,7 +259,7 @@ class BankApi {
|
|
259
259
|
/**
|
260
260
|
* Used for Manual Verification. Calling this API to check in Plaid if the account has been verified
|
261
261
|
*/
|
262
|
-
verifyBankSignup(request = {}) {
|
262
|
+
verifyBankSignup(request = {}, requestOptions) {
|
263
263
|
return __awaiter(this, void 0, void 0, function* () {
|
264
264
|
const { redirectUri } = request, _body = __rest(request, ["redirectUri"]);
|
265
265
|
const _queryParams = new url_search_params_1.default();
|
@@ -273,14 +273,14 @@ class BankApi {
|
|
273
273
|
Authorization: yield this._getAuthorizationHeader(),
|
274
274
|
"X-Fern-Language": "JavaScript",
|
275
275
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
276
|
-
"X-Fern-SDK-Version": "
|
276
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
277
277
|
},
|
278
278
|
contentType: "application/json",
|
279
279
|
queryParameters: _queryParams,
|
280
280
|
body: yield serializers.api.thera.bank.VerifyAccountSignupRequest.jsonOrThrow(_body, {
|
281
281
|
unrecognizedObjectKeys: "strip",
|
282
282
|
}),
|
283
|
-
timeoutMs: 60000,
|
283
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
284
284
|
});
|
285
285
|
if (_response.ok) {
|
286
286
|
return yield serializers.api.thera.bank.GetBankAccountVerificationToken.parseOrThrow(_response.body, {
|
@@ -315,7 +315,7 @@ class BankApi {
|
|
315
315
|
/**
|
316
316
|
* Update Zeal's bank account with info from Plaid & send microdeposit to company's bank account during W2 onboarding for Zeal API
|
317
317
|
*/
|
318
|
-
sendMicrodeposit(request = {}) {
|
318
|
+
sendMicrodeposit(request = {}, requestOptions) {
|
319
319
|
return __awaiter(this, void 0, void 0, function* () {
|
320
320
|
const _response = yield core.fetcher({
|
321
321
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "bank/account/microdeposit/request"),
|
@@ -324,13 +324,13 @@ class BankApi {
|
|
324
324
|
Authorization: yield this._getAuthorizationHeader(),
|
325
325
|
"X-Fern-Language": "JavaScript",
|
326
326
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
327
|
-
"X-Fern-SDK-Version": "
|
327
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
328
328
|
},
|
329
329
|
contentType: "application/json",
|
330
330
|
body: yield serializers.api.thera.bank.SendMicroDepositRequest.jsonOrThrow(request, {
|
331
331
|
unrecognizedObjectKeys: "strip",
|
332
332
|
}),
|
333
|
-
timeoutMs: 60000,
|
333
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
334
334
|
});
|
335
335
|
if (_response.ok) {
|
336
336
|
return;
|
@@ -359,7 +359,7 @@ class BankApi {
|
|
359
359
|
/**
|
360
360
|
* Verify Microdeposit for company's bank account during W2 onboarding for Zeal API
|
361
361
|
*/
|
362
|
-
verifyMicrodeposit(request) {
|
362
|
+
verifyMicrodeposit(request, requestOptions) {
|
363
363
|
return __awaiter(this, void 0, void 0, function* () {
|
364
364
|
const _response = yield core.fetcher({
|
365
365
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "bank/account/microdeposit/verification"),
|
@@ -368,13 +368,13 @@ class BankApi {
|
|
368
368
|
Authorization: yield this._getAuthorizationHeader(),
|
369
369
|
"X-Fern-Language": "JavaScript",
|
370
370
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
371
|
-
"X-Fern-SDK-Version": "
|
371
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
372
372
|
},
|
373
373
|
contentType: "application/json",
|
374
374
|
body: yield serializers.api.thera.bank.VerifyMicrodepositRequest.jsonOrThrow(request, {
|
375
375
|
unrecognizedObjectKeys: "strip",
|
376
376
|
}),
|
377
|
-
timeoutMs: 60000,
|
377
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
378
378
|
});
|
379
379
|
if (_response.ok) {
|
380
380
|
return;
|
@@ -403,11 +403,14 @@ class BankApi {
|
|
403
403
|
/**
|
404
404
|
* Get the Supported Currencies for Each Withdrawal Method
|
405
405
|
*/
|
406
|
-
getWithdrawalMethodCurrencies(request) {
|
406
|
+
getWithdrawalMethodCurrencies(request, requestOptions) {
|
407
407
|
return __awaiter(this, void 0, void 0, function* () {
|
408
|
-
const { accountType } = request;
|
408
|
+
const { accountType, country } = request;
|
409
409
|
const _queryParams = new url_search_params_1.default();
|
410
410
|
_queryParams.append("accountType", accountType);
|
411
|
+
if (country != null) {
|
412
|
+
_queryParams.append("country", country);
|
413
|
+
}
|
411
414
|
const _response = yield core.fetcher({
|
412
415
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "worker/supported-withdrawal-method-currencies"),
|
413
416
|
method: "GET",
|
@@ -415,11 +418,11 @@ class BankApi {
|
|
415
418
|
Authorization: yield this._getAuthorizationHeader(),
|
416
419
|
"X-Fern-Language": "JavaScript",
|
417
420
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
418
|
-
"X-Fern-SDK-Version": "
|
421
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
419
422
|
},
|
420
423
|
contentType: "application/json",
|
421
424
|
queryParameters: _queryParams,
|
422
|
-
timeoutMs: 60000,
|
425
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
423
426
|
});
|
424
427
|
if (_response.ok) {
|
425
428
|
return yield serializers.api.thera.bank.GetWithdrawalMethodCurrenciesResponse.parseOrThrow(_response.body, {
|
@@ -454,7 +457,7 @@ class BankApi {
|
|
454
457
|
/**
|
455
458
|
* Get the minimum amount that must be withdrawn for a given currency to avoid incurring silly fees.
|
456
459
|
*/
|
457
|
-
getWithdrawalMinimumByCurrency(request) {
|
460
|
+
getWithdrawalMinimumByCurrency(request, requestOptions) {
|
458
461
|
return __awaiter(this, void 0, void 0, function* () {
|
459
462
|
const { currency } = request;
|
460
463
|
const _queryParams = new url_search_params_1.default();
|
@@ -466,11 +469,11 @@ class BankApi {
|
|
466
469
|
Authorization: yield this._getAuthorizationHeader(),
|
467
470
|
"X-Fern-Language": "JavaScript",
|
468
471
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
469
|
-
"X-Fern-SDK-Version": "
|
472
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
470
473
|
},
|
471
474
|
contentType: "application/json",
|
472
475
|
queryParameters: _queryParams,
|
473
|
-
timeoutMs: 60000,
|
476
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
474
477
|
});
|
475
478
|
if (_response.ok) {
|
476
479
|
return yield serializers.api.thera.bank.GetWithdrawalMinimumByCurrencyResponse.parseOrThrow(_response.body, {
|
@@ -505,7 +508,7 @@ class BankApi {
|
|
505
508
|
/**
|
506
509
|
* This endpoint should be used to dynamically create a form that allows a worker to enter their withdrawal method information. The user should initially be prompted to provide their `currency`. FE should then pass this with user's address that we've already saved in their `employeeInformation` for `recipientAddress`, and the user's first name and last name for `accountHolderName`. A response will be returned a list of `type`s that the user should select from, then provide the corresponding `details` for in the form. This is the same response returned by [this endpoint] (https://docs.wise.com/api-docs/api-reference/recipient#account-requirements) in Wise. These `details` should continue to be posted to this endpoint whenever a field with `refreshRequirementsOnChange = true` is changed to get the most up to date requirements, just like the Wise endpoint.
|
507
510
|
*/
|
508
|
-
getSupportedWithdrawalMethods(request) {
|
511
|
+
getSupportedWithdrawalMethods(request, requestOptions) {
|
509
512
|
return __awaiter(this, void 0, void 0, function* () {
|
510
513
|
const _response = yield core.fetcher({
|
511
514
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "worker/supported-withdrawal-methods"),
|
@@ -514,13 +517,13 @@ class BankApi {
|
|
514
517
|
Authorization: yield this._getAuthorizationHeader(),
|
515
518
|
"X-Fern-Language": "JavaScript",
|
516
519
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
517
|
-
"X-Fern-SDK-Version": "
|
520
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
518
521
|
},
|
519
522
|
contentType: "application/json",
|
520
523
|
body: yield serializers.api.thera.bank.WithdrawalMethodsRequest.jsonOrThrow(request, {
|
521
524
|
unrecognizedObjectKeys: "strip",
|
522
525
|
}),
|
523
|
-
timeoutMs: 60000,
|
526
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
524
527
|
});
|
525
528
|
if (_response.ok) {
|
526
529
|
return yield serializers.api.thera.bank.bankApi.getSupportedWithdrawalMethods.Response.parseOrThrow(_response.body, {
|
@@ -555,7 +558,7 @@ class BankApi {
|
|
555
558
|
/**
|
556
559
|
* After gathering all the dynamic fields required for the `Get Supported Withdrawal Methods`, they should be submitted here in order to save the payment method.
|
557
560
|
*/
|
558
|
-
saveWithdrawalMethod(userId, request) {
|
561
|
+
saveWithdrawalMethod(userId, request, requestOptions) {
|
559
562
|
return __awaiter(this, void 0, void 0, function* () {
|
560
563
|
const _response = yield core.fetcher({
|
561
564
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `worker/${userId}/withdrawal-method`),
|
@@ -564,13 +567,13 @@ class BankApi {
|
|
564
567
|
Authorization: yield this._getAuthorizationHeader(),
|
565
568
|
"X-Fern-Language": "JavaScript",
|
566
569
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
567
|
-
"X-Fern-SDK-Version": "
|
570
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
568
571
|
},
|
569
572
|
contentType: "application/json",
|
570
573
|
body: yield serializers.api.thera.bank.WithdrawalMethodsRequest.jsonOrThrow(request, {
|
571
574
|
unrecognizedObjectKeys: "strip",
|
572
575
|
}),
|
573
|
-
timeoutMs: 60000,
|
576
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
574
577
|
});
|
575
578
|
if (_response.ok) {
|
576
579
|
return yield serializers.api.thera.bank.SaveWithdrawalMethodResponse.parseOrThrow(_response.body, {
|
@@ -602,7 +605,7 @@ class BankApi {
|
|
602
605
|
}
|
603
606
|
});
|
604
607
|
}
|
605
|
-
deleteWithdrawalMethod(userId, withdrawalMethodId) {
|
608
|
+
deleteWithdrawalMethod(userId, withdrawalMethodId, requestOptions) {
|
606
609
|
return __awaiter(this, void 0, void 0, function* () {
|
607
610
|
const _response = yield core.fetcher({
|
608
611
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `worker/${userId}/withdrawal-method/${withdrawalMethodId}`),
|
@@ -611,10 +614,10 @@ class BankApi {
|
|
611
614
|
Authorization: yield this._getAuthorizationHeader(),
|
612
615
|
"X-Fern-Language": "JavaScript",
|
613
616
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
614
|
-
"X-Fern-SDK-Version": "
|
617
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
615
618
|
},
|
616
619
|
contentType: "application/json",
|
617
|
-
timeoutMs: 60000,
|
620
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
618
621
|
});
|
619
622
|
if (_response.ok) {
|
620
623
|
return yield serializers.api.thera.bank.DeleteWithdrawalMethodResponse.parseOrThrow(_response.body, {
|
@@ -646,7 +649,7 @@ class BankApi {
|
|
646
649
|
}
|
647
650
|
});
|
648
651
|
}
|
649
|
-
editWithdrawalMethod(userId, withdrawalMethodId, request) {
|
652
|
+
editWithdrawalMethod(userId, withdrawalMethodId, request, requestOptions) {
|
650
653
|
return __awaiter(this, void 0, void 0, function* () {
|
651
654
|
const _response = yield core.fetcher({
|
652
655
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `worker/${userId}/withdrawal-method/${withdrawalMethodId}`),
|
@@ -655,13 +658,13 @@ class BankApi {
|
|
655
658
|
Authorization: yield this._getAuthorizationHeader(),
|
656
659
|
"X-Fern-Language": "JavaScript",
|
657
660
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
658
|
-
"X-Fern-SDK-Version": "
|
661
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
659
662
|
},
|
660
663
|
contentType: "application/json",
|
661
664
|
body: yield serializers.api.thera.bank.EditWithdrawalMethodRequest.jsonOrThrow(request, {
|
662
665
|
unrecognizedObjectKeys: "strip",
|
663
666
|
}),
|
664
|
-
timeoutMs: 60000,
|
667
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
665
668
|
});
|
666
669
|
if (_response.ok) {
|
667
670
|
return yield serializers.api.thera.bank.EditWithdrawalMethodResponse.parseOrThrow(_response.body, {
|
@@ -693,7 +696,7 @@ class BankApi {
|
|
693
696
|
}
|
694
697
|
});
|
695
698
|
}
|
696
|
-
initiateWorkerWithdrawal(userId, companyId, request) {
|
699
|
+
initiateWorkerWithdrawal(userId, companyId, request, requestOptions) {
|
697
700
|
return __awaiter(this, void 0, void 0, function* () {
|
698
701
|
const _response = yield core.fetcher({
|
699
702
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/workers/${userId}/payout`),
|
@@ -702,13 +705,13 @@ class BankApi {
|
|
702
705
|
Authorization: yield this._getAuthorizationHeader(),
|
703
706
|
"X-Fern-Language": "JavaScript",
|
704
707
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
705
|
-
"X-Fern-SDK-Version": "
|
708
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
706
709
|
},
|
707
710
|
contentType: "application/json",
|
708
711
|
body: yield serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
709
712
|
unrecognizedObjectKeys: "strip",
|
710
713
|
}),
|
711
|
-
timeoutMs: 60000,
|
714
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
712
715
|
});
|
713
716
|
if (_response.ok) {
|
714
717
|
return yield serializers.api.thera.bank.InitiateWorkerWithdrawalResponse.parseOrThrow(_response.body, {
|
@@ -740,7 +743,7 @@ class BankApi {
|
|
740
743
|
}
|
741
744
|
});
|
742
745
|
}
|
743
|
-
getWorkerBalance(userId, companyId) {
|
746
|
+
getWorkerBalance(userId, companyId, requestOptions) {
|
744
747
|
return __awaiter(this, void 0, void 0, function* () {
|
745
748
|
const _response = yield core.fetcher({
|
746
749
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/workers/${userId}/balances`),
|
@@ -749,10 +752,10 @@ class BankApi {
|
|
749
752
|
Authorization: yield this._getAuthorizationHeader(),
|
750
753
|
"X-Fern-Language": "JavaScript",
|
751
754
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
752
|
-
"X-Fern-SDK-Version": "
|
755
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
753
756
|
},
|
754
757
|
contentType: "application/json",
|
755
|
-
timeoutMs: 60000,
|
758
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
756
759
|
});
|
757
760
|
if (_response.ok) {
|
758
761
|
return yield serializers.api.thera.bank.GetWorkerBalancesResponse.parseOrThrow(_response.body, {
|
@@ -784,7 +787,7 @@ class BankApi {
|
|
784
787
|
}
|
785
788
|
});
|
786
789
|
}
|
787
|
-
getWorkerTransactions(userId, companyId) {
|
790
|
+
getWorkerTransactions(userId, companyId, requestOptions) {
|
788
791
|
return __awaiter(this, void 0, void 0, function* () {
|
789
792
|
const _response = yield core.fetcher({
|
790
793
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/workers/${userId}/transactions`),
|
@@ -793,10 +796,10 @@ class BankApi {
|
|
793
796
|
Authorization: yield this._getAuthorizationHeader(),
|
794
797
|
"X-Fern-Language": "JavaScript",
|
795
798
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
796
|
-
"X-Fern-SDK-Version": "
|
799
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
797
800
|
},
|
798
801
|
contentType: "application/json",
|
799
|
-
timeoutMs: 60000,
|
802
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
800
803
|
});
|
801
804
|
if (_response.ok) {
|
802
805
|
return yield serializers.api.thera.bank.GetWorkerTransactionsResponse.parseOrThrow(_response.body, {
|
@@ -828,7 +831,7 @@ class BankApi {
|
|
828
831
|
}
|
829
832
|
});
|
830
833
|
}
|
831
|
-
getPayInHistory(companyId) {
|
834
|
+
getPayInHistory(companyId, requestOptions) {
|
832
835
|
return __awaiter(this, void 0, void 0, function* () {
|
833
836
|
const _response = yield core.fetcher({
|
834
837
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/pay-ins`),
|
@@ -837,10 +840,10 @@ class BankApi {
|
|
837
840
|
Authorization: yield this._getAuthorizationHeader(),
|
838
841
|
"X-Fern-Language": "JavaScript",
|
839
842
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
840
|
-
"X-Fern-SDK-Version": "
|
843
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
841
844
|
},
|
842
845
|
contentType: "application/json",
|
843
|
-
timeoutMs: 60000,
|
846
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
844
847
|
});
|
845
848
|
if (_response.ok) {
|
846
849
|
return yield serializers.api.thera.bank.GetPayInHistoryResponse.parseOrThrow(_response.body, {
|
@@ -872,7 +875,7 @@ class BankApi {
|
|
872
875
|
}
|
873
876
|
});
|
874
877
|
}
|
875
|
-
getPayInDetails(companyId, payInId) {
|
878
|
+
getPayInDetails(companyId, payInId, requestOptions) {
|
876
879
|
return __awaiter(this, void 0, void 0, function* () {
|
877
880
|
const _response = yield core.fetcher({
|
878
881
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/pay-ins/${payInId}`),
|
@@ -881,10 +884,10 @@ class BankApi {
|
|
881
884
|
Authorization: yield this._getAuthorizationHeader(),
|
882
885
|
"X-Fern-Language": "JavaScript",
|
883
886
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
884
|
-
"X-Fern-SDK-Version": "
|
887
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
885
888
|
},
|
886
889
|
contentType: "application/json",
|
887
|
-
timeoutMs: 60000,
|
890
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
888
891
|
});
|
889
892
|
if (_response.ok) {
|
890
893
|
return yield serializers.api.thera.bank.GetPayInDetailsResponse.parseOrThrow(_response.body, {
|
@@ -916,7 +919,7 @@ class BankApi {
|
|
916
919
|
}
|
917
920
|
});
|
918
921
|
}
|
919
|
-
getCurrencyConversion(request) {
|
922
|
+
getCurrencyConversion(request, requestOptions) {
|
920
923
|
return __awaiter(this, void 0, void 0, function* () {
|
921
924
|
const { from: from_, to, amount } = request;
|
922
925
|
const _queryParams = new url_search_params_1.default();
|
@@ -930,11 +933,11 @@ class BankApi {
|
|
930
933
|
Authorization: yield this._getAuthorizationHeader(),
|
931
934
|
"X-Fern-Language": "JavaScript",
|
932
935
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
933
|
-
"X-Fern-SDK-Version": "
|
936
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
934
937
|
},
|
935
938
|
contentType: "application/json",
|
936
939
|
queryParameters: _queryParams,
|
937
|
-
timeoutMs: 60000,
|
940
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
938
941
|
});
|
939
942
|
if (_response.ok) {
|
940
943
|
return yield serializers.api.thera.bank.GetCurrencyConversionResponse.parseOrThrow(_response.body, {
|
@@ -966,7 +969,7 @@ class BankApi {
|
|
966
969
|
}
|
967
970
|
});
|
968
971
|
}
|
969
|
-
setAutoWithdrawals(userId, companyId, request) {
|
972
|
+
setAutoWithdrawals(userId, companyId, request, requestOptions) {
|
970
973
|
return __awaiter(this, void 0, void 0, function* () {
|
971
974
|
const _response = yield core.fetcher({
|
972
975
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/workers/${userId}/auto-withdrawals`),
|
@@ -975,13 +978,13 @@ class BankApi {
|
|
975
978
|
Authorization: yield this._getAuthorizationHeader(),
|
976
979
|
"X-Fern-Language": "JavaScript",
|
977
980
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
978
|
-
"X-Fern-SDK-Version": "
|
981
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
979
982
|
},
|
980
983
|
contentType: "application/json",
|
981
984
|
body: yield serializers.api.thera.bank.SetAutoWithdrawalRequest.jsonOrThrow(request, {
|
982
985
|
unrecognizedObjectKeys: "strip",
|
983
986
|
}),
|
984
|
-
timeoutMs: 60000,
|
987
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
985
988
|
});
|
986
989
|
if (_response.ok) {
|
987
990
|
return yield serializers.api.thera.bank.SetAutoWithdrawalResponse.parseOrThrow(_response.body, {
|
@@ -1013,7 +1016,7 @@ class BankApi {
|
|
1013
1016
|
}
|
1014
1017
|
});
|
1015
1018
|
}
|
1016
|
-
createStripePaymentMethodFromPlaid(request = {}) {
|
1019
|
+
createStripePaymentMethodFromPlaid(request = {}, requestOptions) {
|
1017
1020
|
return __awaiter(this, void 0, void 0, function* () {
|
1018
1021
|
const _response = yield core.fetcher({
|
1019
1022
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "bank/stripe/payment-method"),
|
@@ -1022,13 +1025,13 @@ class BankApi {
|
|
1022
1025
|
Authorization: yield this._getAuthorizationHeader(),
|
1023
1026
|
"X-Fern-Language": "JavaScript",
|
1024
1027
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
1025
|
-
"X-Fern-SDK-Version": "
|
1028
|
+
"X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
|
1026
1029
|
},
|
1027
1030
|
contentType: "application/json",
|
1028
1031
|
body: yield serializers.api.thera.bank.CreateStripePaymentMethodFromPlaidRequest.jsonOrThrow(request, {
|
1029
1032
|
unrecognizedObjectKeys: "strip",
|
1030
1033
|
}),
|
1031
|
-
timeoutMs: 60000,
|
1034
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1032
1035
|
});
|
1033
1036
|
if (_response.ok) {
|
1034
1037
|
return;
|
@@ -9,6 +9,9 @@ export declare namespace Company {
|
|
9
9
|
environment: core.Supplier<string>;
|
10
10
|
token?: core.Supplier<core.BearerToken | undefined>;
|
11
11
|
}
|
12
|
+
interface RequestOptions {
|
13
|
+
timeoutInSeconds?: number;
|
14
|
+
}
|
12
15
|
}
|
13
16
|
export declare class Company {
|
14
17
|
protected readonly _options: Company.Options;
|
@@ -8,6 +8,9 @@ export declare namespace CompanyApi {
|
|
8
8
|
environment: core.Supplier<string>;
|
9
9
|
token?: core.Supplier<core.BearerToken | undefined>;
|
10
10
|
}
|
11
|
+
interface RequestOptions {
|
12
|
+
timeoutInSeconds?: number;
|
13
|
+
}
|
11
14
|
}
|
12
15
|
export declare class CompanyApi {
|
13
16
|
protected readonly _options: CompanyApi.Options;
|
@@ -15,56 +18,56 @@ export declare class CompanyApi {
|
|
15
18
|
/**
|
16
19
|
* Invite Contractor or Create Contract
|
17
20
|
*/
|
18
|
-
inviteContractor(request: TheraApi.api.thera.company.
|
21
|
+
inviteContractor(request: TheraApi.api.thera.company.InviteContractorRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.InviteContractorResponse>;
|
19
22
|
/**
|
20
23
|
* Invite manager to the platform
|
21
24
|
*/
|
22
|
-
inviteManager(companyId: string, request: TheraApi.api.thera.company.InviteManagerRequest): Promise<TheraApi.api.thera.company.InviteManagerResponse>;
|
25
|
+
inviteManager(companyId: string, request: TheraApi.api.thera.company.InviteManagerRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.InviteManagerResponse>;
|
23
26
|
/**
|
24
27
|
* < Edit the teams / roles that the manager belongs to. If no team role is provided, their role is removed for that team.
|
25
28
|
*/
|
26
|
-
editManagerRoles(userId: string, companyId: string, request?: TheraApi.api.thera.company.EditManagerRolesRequest): Promise<TheraApi.api.thera.company.EditManagerRolesResponse>;
|
29
|
+
editManagerRoles(userId: string, companyId: string, request?: TheraApi.api.thera.company.EditManagerRolesRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.EditManagerRolesResponse>;
|
27
30
|
/**
|
28
31
|
* < Edit org admins, with ultimate admin permissions across the platform. These users must already be managers of the org.
|
29
32
|
*/
|
30
|
-
editOrgAdmins(companyId: string, request: TheraApi.api.thera.company.EditOrgAdminsRequest): Promise<TheraApi.api.thera.company.EditOrgAdminsResponse>;
|
33
|
+
editOrgAdmins(companyId: string, request: TheraApi.api.thera.company.EditOrgAdminsRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.EditOrgAdminsResponse>;
|
31
34
|
/**
|
32
35
|
* < Removes a manager from the org entirely, revoking all team and org level roles.
|
33
36
|
*/
|
34
|
-
removeManager(companyId: string, userId: string): Promise<TheraApi.api.thera.company.RemoveManagerResponse>;
|
37
|
+
removeManager(companyId: string, userId: string, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.RemoveManagerResponse>;
|
35
38
|
/**
|
36
39
|
* < Add org admins, with ultimate admin permissions across the platform. These users must already be managers of the org.
|
37
40
|
*/
|
38
|
-
changeContractTeam(companyId: string, contractId: string, request: TheraApi.api.thera.company.ChangeContractTeamRequest): Promise<TheraApi.api.thera.company.ChangeContractTeamResponse>;
|
41
|
+
changeContractTeam(companyId: string, contractId: string, request: TheraApi.api.thera.company.ChangeContractTeamRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.ChangeContractTeamResponse>;
|
39
42
|
/**
|
40
43
|
* Get all of the teams and their contracts for a company
|
41
44
|
*/
|
42
|
-
getTeams(companyId: string): Promise<TheraApi.api.thera.company.GetTeamsResponse>;
|
45
|
+
getTeams(companyId: string, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.GetTeamsResponse>;
|
43
46
|
/**
|
44
47
|
* Get all of the managers for a company
|
45
48
|
*/
|
46
|
-
getManagers(companyId: string): Promise<TheraApi.api.thera.company.GetManagersResponse>;
|
49
|
+
getManagers(companyId: string, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.GetManagersResponse>;
|
47
50
|
/**
|
48
51
|
* Create a team within a company. At least one Team Admin must be added.
|
49
52
|
*/
|
50
|
-
createTeam(companyId: string, request: TheraApi.api.thera.company.CreateTeamRequest): Promise<TheraApi.api.thera.company.CreateTeamResponse>;
|
53
|
+
createTeam(companyId: string, request: TheraApi.api.thera.company.CreateTeamRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.CreateTeamResponse>;
|
51
54
|
/**
|
52
55
|
* Delete a team. All contracts must be removed from this team first
|
53
56
|
*/
|
54
|
-
deleteTeam(companyId: string, teamId: string): Promise<TheraApi.api.thera.company.DeleteTeamResponse>;
|
57
|
+
deleteTeam(companyId: string, teamId: string, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.DeleteTeamResponse>;
|
55
58
|
/**
|
56
59
|
* Change details related to a team. For now, you can just edit its name.
|
57
60
|
*/
|
58
|
-
editTeam(companyId: string, teamId: string, request: TheraApi.api.thera.company.EditTeamRequest): Promise<TheraApi.api.thera.company.EditTeamResponse>;
|
61
|
+
editTeam(companyId: string, teamId: string, request: TheraApi.api.thera.company.EditTeamRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.EditTeamResponse>;
|
59
62
|
/**
|
60
63
|
* Gets all team and org permissions across all orgs for a given user, along with the contracts on which they're the worker.
|
61
64
|
*
|
62
65
|
*/
|
63
|
-
getAllCompanyAffiliations(userId: string): Promise<TheraApi.api.thera.company.GetAllCompanyAffiliationsResponse>;
|
66
|
+
getAllCompanyAffiliations(userId: string, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.GetAllCompanyAffiliationsResponse>;
|
64
67
|
/**
|
65
68
|
* Check that a new user is authorized to create a new account. This is determined by an allow list that is stored in our db.
|
66
69
|
*
|
67
70
|
*/
|
68
|
-
checkCanCreateAccount(request: TheraApi.api.thera.company.CheckCanCreateAccountRequest): Promise<TheraApi.api.thera.company.CheckCanCreateAccountResponse>;
|
71
|
+
checkCanCreateAccount(request: TheraApi.api.thera.company.CheckCanCreateAccountRequest, requestOptions?: CompanyApi.RequestOptions): Promise<TheraApi.api.thera.company.CheckCanCreateAccountResponse>;
|
69
72
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
70
73
|
}
|