@thera-hr/api-sdk 0.0.2580 → 0.0.2590
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/services/resources/file/client/Client.js +4 -4
- package/api/resources/api/resources/test/resources/invoices/client/Client.js +1 -1
- package/api/resources/api/resources/thera/client/Client.d.ts +3 -0
- package/api/resources/api/resources/thera/client/Client.js +9 -4
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +2 -1
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +64 -14
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.d.ts +7 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.d.ts +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalMethodsRequest.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CompanyApiResponse.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +2 -2
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +3 -3
- package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/index.js +2 -1
- package/api/resources/api/resources/thera/resources/misc/client/Client.d.ts +17 -0
- package/api/resources/api/resources/thera/resources/misc/client/Client.js +17 -0
- package/api/resources/api/resources/thera/resources/misc/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/misc/client/index.js +2 -0
- package/api/resources/api/resources/thera/resources/misc/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/misc/index.js +18 -0
- package/api/resources/api/resources/thera/resources/misc/resources/index.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/misc/resources/index.js +32 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +21 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +109 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/index.js +17 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/DailyCronRequest.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/DailyCronRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.js +2 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/index.js +18 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +7 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.d.ts +11 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.js +5 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +19 -0
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +1 -1
- package/api/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
- package/api/resources/db/resources/user/types/CompanySettings.d.ts +1 -0
- package/api/resources/db/resources/user/types/WithdrawalMethodAccountType.d.ts +9 -0
- package/api/resources/db/resources/user/types/WithdrawalMethodAccountType.js +11 -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/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/services/resources/file/client/Client.js +4 -4
- package/dist/api/resources/api/resources/test/resources/invoices/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/client/Client.js +9 -4
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +2 -1
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +64 -14
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.d.ts +7 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.d.ts +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalMethodsRequest.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CompanyApiResponse.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +2 -2
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +3 -3
- package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
- package/dist/api/resources/api/resources/thera/resources/misc/client/Client.d.ts +17 -0
- package/dist/api/resources/api/resources/thera/resources/misc/client/Client.js +17 -0
- package/dist/api/resources/api/resources/thera/resources/misc/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/misc/client/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/misc/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/misc/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/index.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/index.js +32 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +21 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +109 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/index.js +17 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/DailyCronRequest.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/DailyCronRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +7 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.d.ts +11 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +19 -0
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +1 -1
- package/dist/api/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
- package/dist/api/resources/db/resources/user/types/CompanySettings.d.ts +1 -0
- package/dist/api/resources/db/resources/user/types/WithdrawalMethodAccountType.d.ts +9 -0
- package/dist/api/resources/db/resources/user/types/WithdrawalMethodAccountType.js +11 -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/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.js +33 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.js +3 -1
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.d.ts +11 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.js +31 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalMethodsRequest.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalMethodsRequest.js +3 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CompanyApiResponse.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CompanyApiResponse.js +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.js +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -1
- package/dist/serialization/resources/api/resources/thera/resources/misc/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/index.js +31 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.js +42 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.d.ts +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.js +38 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +3 -0
- package/dist/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +19 -0
- 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/CompanySettings.d.ts +1 -0
- package/dist/serialization/resources/db/resources/user/types/CompanySettings.js +1 -0
- package/dist/serialization/resources/db/resources/user/types/WithdrawalMethodAccountType.d.ts +10 -0
- package/dist/serialization/resources/db/resources/user/types/WithdrawalMethodAccountType.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 +1 -1
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/SetAutoWithdrawalRequest.js +33 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.js +3 -1
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.d.ts +11 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SetAutoWithdrawalResponse.js +31 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalMethodsRequest.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/WithdrawalMethodsRequest.js +3 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CompanyApiResponse.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CompanyApiResponse.js +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.js +1 -0
- package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/index.js +2 -1
- package/serialization/resources/api/resources/thera/resources/misc/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/misc/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/index.d.ts +2 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/index.js +31 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/AutoWithdrawalResults.js +43 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/DailyCronResponse.js +42 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.d.ts +17 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/TriggeredWithdrawal.js +38 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.d.ts +3 -0
- package/serialization/resources/api/resources/thera/resources/misc/resources/misc/types/index.js +19 -0
- 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/CompanySettings.d.ts +1 -0
- package/serialization/resources/db/resources/user/types/CompanySettings.js +1 -0
- package/serialization/resources/db/resources/user/types/WithdrawalMethodAccountType.d.ts +10 -0
- package/serialization/resources/db/resources/user/types/WithdrawalMethodAccountType.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
@@ -0,0 +1,109 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.Misc = void 0;
|
42
|
+
const core = __importStar(require("../../../../../../../../../../core"));
|
43
|
+
const url_join_1 = __importDefault(require("url-join"));
|
44
|
+
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
45
|
+
const errors = __importStar(require("../../../../../../../../../../errors"));
|
46
|
+
class Misc {
|
47
|
+
constructor(_options) {
|
48
|
+
this._options = _options;
|
49
|
+
}
|
50
|
+
/**
|
51
|
+
* Calling this API will trigger automatic payouts for all workers that have auto-withdrawals turned on. This cron may be re-used for other daily tasks in the future
|
52
|
+
*
|
53
|
+
*/
|
54
|
+
regularCron(request) {
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
56
|
+
const { theraWebhookSignatureHeader } = request;
|
57
|
+
const _response = yield core.fetcher({
|
58
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "webhook/regular-cron"),
|
59
|
+
method: "POST",
|
60
|
+
headers: {
|
61
|
+
Authorization: yield this._getAuthorizationHeader(),
|
62
|
+
"X-Fern-Language": "JavaScript",
|
63
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
64
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
65
|
+
"Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
|
66
|
+
},
|
67
|
+
contentType: "application/json",
|
68
|
+
timeoutMs: 60000,
|
69
|
+
});
|
70
|
+
if (_response.ok) {
|
71
|
+
return yield serializers.api.thera.misc.DailyCronResponse.parseOrThrow(_response.body, {
|
72
|
+
unrecognizedObjectKeys: "passthrough",
|
73
|
+
allowUnrecognizedUnionMembers: true,
|
74
|
+
allowUnrecognizedEnumValues: true,
|
75
|
+
breadcrumbsPrefix: ["response"],
|
76
|
+
});
|
77
|
+
}
|
78
|
+
if (_response.error.reason === "status-code") {
|
79
|
+
throw new errors.TheraApiError({
|
80
|
+
statusCode: _response.error.statusCode,
|
81
|
+
body: _response.error.body,
|
82
|
+
});
|
83
|
+
}
|
84
|
+
switch (_response.error.reason) {
|
85
|
+
case "non-json":
|
86
|
+
throw new errors.TheraApiError({
|
87
|
+
statusCode: _response.error.statusCode,
|
88
|
+
body: _response.error.rawBody,
|
89
|
+
});
|
90
|
+
case "timeout":
|
91
|
+
throw new errors.TheraApiTimeoutError();
|
92
|
+
case "unknown":
|
93
|
+
throw new errors.TheraApiError({
|
94
|
+
message: _response.error.errorMessage,
|
95
|
+
});
|
96
|
+
}
|
97
|
+
});
|
98
|
+
}
|
99
|
+
_getAuthorizationHeader() {
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
101
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
102
|
+
if (bearer != null) {
|
103
|
+
return `Bearer ${bearer}`;
|
104
|
+
}
|
105
|
+
return undefined;
|
106
|
+
});
|
107
|
+
}
|
108
|
+
}
|
109
|
+
exports.Misc = Misc;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./requests";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./requests"), exports);
|
package/api/resources/api/resources/thera/resources/misc/resources/misc/client/requests/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { DailyCronRequest } from "./DailyCronRequest";
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./types"), exports);
|
18
|
+
__exportStar(require("./client"), exports);
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
5
|
+
export interface AutoWithdrawalResults {
|
6
|
+
succeededWithdrawals: TheraApi.api.thera.misc.TriggeredWithdrawal[];
|
7
|
+
failedWithdrawals: TheraApi.api.thera.misc.TriggeredWithdrawal[];
|
8
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
export interface TriggeredWithdrawal {
|
5
|
+
userId: string;
|
6
|
+
amount: number;
|
7
|
+
currency: string;
|
8
|
+
companyId: string;
|
9
|
+
withdrawalMethodId: string;
|
10
|
+
errorDetails: Record<string, unknown>;
|
11
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./DailyCronResponse"), exports);
|
18
|
+
__exportStar(require("./AutoWithdrawalResults"), exports);
|
19
|
+
__exportStar(require("./TriggeredWithdrawal"), exports);
|
package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js
CHANGED
@@ -59,7 +59,7 @@ class OncycleApi {
|
|
59
59
|
Authorization: yield this._getAuthorizationHeader(),
|
60
60
|
"X-Fern-Language": "JavaScript",
|
61
61
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
62
|
-
"X-Fern-SDK-Version": "0.0.
|
62
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
63
63
|
},
|
64
64
|
contentType: "application/json",
|
65
65
|
timeoutMs: 60000,
|
@@ -63,7 +63,7 @@ class UserApi {
|
|
63
63
|
Authorization: yield this._getAuthorizationHeader(),
|
64
64
|
"X-Fern-Language": "JavaScript",
|
65
65
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
66
|
-
"X-Fern-SDK-Version": "0.0.
|
66
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
67
67
|
},
|
68
68
|
contentType: "application/json",
|
69
69
|
queryParameters: _queryParams,
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
export declare type WithdrawalMethodAccountType = "BANK_TRANSFER" | "WISE" | "PAYONEER";
|
5
|
+
export declare const WithdrawalMethodAccountType: {
|
6
|
+
readonly BankTransfer: "BANK_TRANSFER";
|
7
|
+
readonly Wise: "WISE";
|
8
|
+
readonly Payoneer: "PAYONEER";
|
9
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.WithdrawalMethodAccountType = void 0;
|
7
|
+
exports.WithdrawalMethodAccountType = {
|
8
|
+
BankTransfer: "BANK_TRANSFER",
|
9
|
+
Wise: "WISE",
|
10
|
+
Payoneer: "PAYONEER",
|
11
|
+
};
|
@@ -27,4 +27,5 @@ __exportStar(require("./AiPriseVerificationStatus"), exports);
|
|
27
27
|
__exportStar(require("./CompanySettings"), exports);
|
28
28
|
__exportStar(require("./WithdrawalMethod"), exports);
|
29
29
|
__exportStar(require("./BankTransfer"), exports);
|
30
|
+
__exportStar(require("./WithdrawalMethodAccountType"), exports);
|
30
31
|
__exportStar(require("./User"), exports);
|
package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js
CHANGED
@@ -59,7 +59,7 @@ class AipriseWebhookApi {
|
|
59
59
|
Authorization: yield this._getAuthorizationHeader(),
|
60
60
|
"X-Fern-Language": "JavaScript",
|
61
61
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
62
|
-
"X-Fern-SDK-Version": "0.0.
|
62
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
63
63
|
},
|
64
64
|
contentType: "application/json",
|
65
65
|
body: yield serializers.api.aiprise.AiPriseVerificationCallback.jsonOrThrow(request, {
|
@@ -56,7 +56,7 @@ class File_ {
|
|
56
56
|
Authorization: yield this._getAuthorizationHeader(),
|
57
57
|
"X-Fern-Language": "JavaScript",
|
58
58
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
59
|
-
"X-Fern-SDK-Version": "0.0.
|
59
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
60
60
|
},
|
61
61
|
contentType: "application/json",
|
62
62
|
body: yield serializers.api.services.AttachDocumentToEmploymentRequest.jsonOrThrow(request, {
|
@@ -97,7 +97,7 @@ class File_ {
|
|
97
97
|
Authorization: yield this._getAuthorizationHeader(),
|
98
98
|
"X-Fern-Language": "JavaScript",
|
99
99
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
100
|
-
"X-Fern-SDK-Version": "0.0.
|
100
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
101
101
|
},
|
102
102
|
contentType: "application/json",
|
103
103
|
body: yield serializers.api.services.DeleteDocumentFromEmploymentRequest.jsonOrThrow(request, {
|
@@ -138,7 +138,7 @@ class File_ {
|
|
138
138
|
Authorization: yield this._getAuthorizationHeader(),
|
139
139
|
"X-Fern-Language": "JavaScript",
|
140
140
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
141
|
-
"X-Fern-SDK-Version": "0.0.
|
141
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
142
142
|
},
|
143
143
|
contentType: "application/json",
|
144
144
|
timeoutMs: 60000,
|
@@ -181,7 +181,7 @@ class File_ {
|
|
181
181
|
Authorization: yield this._getAuthorizationHeader(),
|
182
182
|
"X-Fern-Language": "JavaScript",
|
183
183
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
184
|
-
"X-Fern-SDK-Version": "0.0.
|
184
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
185
185
|
},
|
186
186
|
contentType: "application/json",
|
187
187
|
timeoutMs: 60000,
|
@@ -56,7 +56,7 @@ class Invoices {
|
|
56
56
|
Authorization: yield this._getAuthorizationHeader(),
|
57
57
|
"X-Fern-Language": "JavaScript",
|
58
58
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
59
|
-
"X-Fern-SDK-Version": "0.0.
|
59
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
60
60
|
},
|
61
61
|
contentType: "application/json",
|
62
62
|
body: yield serializers.api.test.VoidInvoiceRequest.jsonOrThrow(request, {
|
@@ -6,6 +6,7 @@ import { Bank } from "../resources/bank/client/Client";
|
|
6
6
|
import { Company } from "../resources/company/client/Client";
|
7
7
|
import { Disbursement } from "../resources/disbursement/client/Client";
|
8
8
|
import { Employment } from "../resources/employment/client/Client";
|
9
|
+
import { Misc } from "../resources/misc/client/Client";
|
9
10
|
import { Payroll } from "../resources/payroll/client/Client";
|
10
11
|
import { User } from "../resources/user/client/Client";
|
11
12
|
export declare namespace Thera {
|
@@ -25,6 +26,8 @@ export declare class Thera {
|
|
25
26
|
get disbursement(): Disbursement;
|
26
27
|
protected _employment: Employment | undefined;
|
27
28
|
get employment(): Employment;
|
29
|
+
protected _misc: Misc | undefined;
|
30
|
+
get misc(): Misc;
|
28
31
|
protected _payroll: Payroll | undefined;
|
29
32
|
get payroll(): Payroll;
|
30
33
|
protected _user: User | undefined;
|
@@ -8,8 +8,9 @@ const Client_1 = require("../resources/bank/client/Client");
|
|
8
8
|
const Client_2 = require("../resources/company/client/Client");
|
9
9
|
const Client_3 = require("../resources/disbursement/client/Client");
|
10
10
|
const Client_4 = require("../resources/employment/client/Client");
|
11
|
-
const Client_5 = require("../resources/
|
12
|
-
const Client_6 = require("../resources/
|
11
|
+
const Client_5 = require("../resources/misc/client/Client");
|
12
|
+
const Client_6 = require("../resources/payroll/client/Client");
|
13
|
+
const Client_7 = require("../resources/user/client/Client");
|
13
14
|
class Thera {
|
14
15
|
constructor(_options) {
|
15
16
|
this._options = _options;
|
@@ -30,13 +31,17 @@ class Thera {
|
|
30
31
|
var _a;
|
31
32
|
return ((_a = this._employment) !== null && _a !== void 0 ? _a : (this._employment = new Client_4.Employment(this._options)));
|
32
33
|
}
|
34
|
+
get misc() {
|
35
|
+
var _a;
|
36
|
+
return ((_a = this._misc) !== null && _a !== void 0 ? _a : (this._misc = new Client_5.Misc(this._options)));
|
37
|
+
}
|
33
38
|
get payroll() {
|
34
39
|
var _a;
|
35
|
-
return ((_a = this._payroll) !== null && _a !== void 0 ? _a : (this._payroll = new
|
40
|
+
return ((_a = this._payroll) !== null && _a !== void 0 ? _a : (this._payroll = new Client_6.Payroll(this._options)));
|
36
41
|
}
|
37
42
|
get user() {
|
38
43
|
var _a;
|
39
|
-
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new
|
44
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_7.User(this._options)));
|
40
45
|
}
|
41
46
|
}
|
42
47
|
exports.Thera = Thera;
|
package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts
CHANGED
@@ -31,7 +31,7 @@ export declare class BankApi {
|
|
31
31
|
/**
|
32
32
|
* Get the Supported Currencies for Each Withdrawal Method
|
33
33
|
*/
|
34
|
-
getWithdrawalMethodCurrencies(): Promise<TheraApi.api.thera.bank.GetWithdrawalMethodCurrenciesResponse>;
|
34
|
+
getWithdrawalMethodCurrencies(request: TheraApi.api.thera.bank.GetWithdrawalMethodCurrenciesRequest): Promise<TheraApi.api.thera.bank.GetWithdrawalMethodCurrenciesResponse>;
|
35
35
|
/**
|
36
36
|
* 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.
|
37
37
|
*/
|
@@ -46,5 +46,6 @@ export declare class BankApi {
|
|
46
46
|
getWorkerBalance(userId: string, companyId: string): Promise<TheraApi.api.thera.bank.GetWorkerBalancesResponse>;
|
47
47
|
getWorkerTransactions(userId: string, companyId: string): Promise<TheraApi.api.thera.bank.GetWorkerTransactionsResponse>;
|
48
48
|
getCurrencyConversion(request: TheraApi.api.thera.bank.GetCurrencyConversionRequest): Promise<TheraApi.api.thera.bank.GetCurrencyConversionResponse>;
|
49
|
+
setAutoWithdrawals(userId: string, companyId: string, request: TheraApi.api.thera.bank.SetAutoWithdrawalRequest): Promise<TheraApi.api.thera.bank.SetAutoWithdrawalResponse>;
|
49
50
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
50
51
|
}
|
package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js
CHANGED
@@ -65,7 +65,7 @@ class BankApi {
|
|
65
65
|
Authorization: yield this._getAuthorizationHeader(),
|
66
66
|
"X-Fern-Language": "JavaScript",
|
67
67
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
68
|
-
"X-Fern-SDK-Version": "0.0.
|
68
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
69
69
|
},
|
70
70
|
contentType: "application/json",
|
71
71
|
queryParameters: _queryParams,
|
@@ -112,7 +112,7 @@ class BankApi {
|
|
112
112
|
Authorization: yield this._getAuthorizationHeader(),
|
113
113
|
"X-Fern-Language": "JavaScript",
|
114
114
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
115
|
-
"X-Fern-SDK-Version": "0.0.
|
115
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
116
116
|
},
|
117
117
|
contentType: "application/json",
|
118
118
|
body: yield serializers.api.thera.bank.VerifyAccountSignupRequest.jsonOrThrow(request, {
|
@@ -156,7 +156,7 @@ class BankApi {
|
|
156
156
|
Authorization: yield this._getAuthorizationHeader(),
|
157
157
|
"X-Fern-Language": "JavaScript",
|
158
158
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
159
|
-
"X-Fern-SDK-Version": "0.0.
|
159
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
160
160
|
},
|
161
161
|
contentType: "application/json",
|
162
162
|
timeoutMs: 60000,
|
@@ -197,7 +197,7 @@ class BankApi {
|
|
197
197
|
Authorization: yield this._getAuthorizationHeader(),
|
198
198
|
"X-Fern-Language": "JavaScript",
|
199
199
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
200
|
-
"X-Fern-SDK-Version": "0.0.
|
200
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
201
201
|
},
|
202
202
|
contentType: "application/json",
|
203
203
|
body: yield serializers.api.thera.bank.VerifyMicrodepositRequest.jsonOrThrow(request, {
|
@@ -232,8 +232,11 @@ class BankApi {
|
|
232
232
|
/**
|
233
233
|
* Get the Supported Currencies for Each Withdrawal Method
|
234
234
|
*/
|
235
|
-
getWithdrawalMethodCurrencies() {
|
235
|
+
getWithdrawalMethodCurrencies(request) {
|
236
236
|
return __awaiter(this, void 0, void 0, function* () {
|
237
|
+
const { accountType } = request;
|
238
|
+
const _queryParams = new url_search_params_1.default();
|
239
|
+
_queryParams.append("accountType", accountType);
|
237
240
|
const _response = yield core.fetcher({
|
238
241
|
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "worker/supported-withdrawal-method-currencies"),
|
239
242
|
method: "GET",
|
@@ -241,9 +244,10 @@ class BankApi {
|
|
241
244
|
Authorization: yield this._getAuthorizationHeader(),
|
242
245
|
"X-Fern-Language": "JavaScript",
|
243
246
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
244
|
-
"X-Fern-SDK-Version": "0.0.
|
247
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
245
248
|
},
|
246
249
|
contentType: "application/json",
|
250
|
+
queryParameters: _queryParams,
|
247
251
|
timeoutMs: 60000,
|
248
252
|
});
|
249
253
|
if (_response.ok) {
|
@@ -287,7 +291,7 @@ class BankApi {
|
|
287
291
|
Authorization: yield this._getAuthorizationHeader(),
|
288
292
|
"X-Fern-Language": "JavaScript",
|
289
293
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
290
|
-
"X-Fern-SDK-Version": "0.0.
|
294
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
291
295
|
},
|
292
296
|
contentType: "application/json",
|
293
297
|
body: yield serializers.api.thera.bank.WithdrawalMethodsRequest.jsonOrThrow(request, {
|
@@ -336,7 +340,7 @@ class BankApi {
|
|
336
340
|
Authorization: yield this._getAuthorizationHeader(),
|
337
341
|
"X-Fern-Language": "JavaScript",
|
338
342
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
339
|
-
"X-Fern-SDK-Version": "0.0.
|
343
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
340
344
|
},
|
341
345
|
contentType: "application/json",
|
342
346
|
body: yield serializers.api.thera.bank.WithdrawalMethodsRequest.jsonOrThrow(request, {
|
@@ -382,7 +386,7 @@ class BankApi {
|
|
382
386
|
Authorization: yield this._getAuthorizationHeader(),
|
383
387
|
"X-Fern-Language": "JavaScript",
|
384
388
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
385
|
-
"X-Fern-SDK-Version": "0.0.
|
389
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
386
390
|
},
|
387
391
|
contentType: "application/json",
|
388
392
|
timeoutMs: 60000,
|
@@ -425,7 +429,7 @@ class BankApi {
|
|
425
429
|
Authorization: yield this._getAuthorizationHeader(),
|
426
430
|
"X-Fern-Language": "JavaScript",
|
427
431
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
428
|
-
"X-Fern-SDK-Version": "0.0.
|
432
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
429
433
|
},
|
430
434
|
contentType: "application/json",
|
431
435
|
body: yield serializers.api.thera.bank.EditWithdrawalMethodRequest.jsonOrThrow(request, {
|
@@ -471,7 +475,7 @@ class BankApi {
|
|
471
475
|
Authorization: yield this._getAuthorizationHeader(),
|
472
476
|
"X-Fern-Language": "JavaScript",
|
473
477
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
474
|
-
"X-Fern-SDK-Version": "0.0.
|
478
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
475
479
|
},
|
476
480
|
contentType: "application/json",
|
477
481
|
body: yield serializers.api.thera.bank.InitiateWorkerWithdrawalRequest.jsonOrThrow(request, {
|
@@ -517,7 +521,7 @@ class BankApi {
|
|
517
521
|
Authorization: yield this._getAuthorizationHeader(),
|
518
522
|
"X-Fern-Language": "JavaScript",
|
519
523
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
520
|
-
"X-Fern-SDK-Version": "0.0.
|
524
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
521
525
|
},
|
522
526
|
contentType: "application/json",
|
523
527
|
timeoutMs: 60000,
|
@@ -560,7 +564,7 @@ class BankApi {
|
|
560
564
|
Authorization: yield this._getAuthorizationHeader(),
|
561
565
|
"X-Fern-Language": "JavaScript",
|
562
566
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
563
|
-
"X-Fern-SDK-Version": "0.0.
|
567
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
564
568
|
},
|
565
569
|
contentType: "application/json",
|
566
570
|
timeoutMs: 60000,
|
@@ -608,7 +612,7 @@ class BankApi {
|
|
608
612
|
Authorization: yield this._getAuthorizationHeader(),
|
609
613
|
"X-Fern-Language": "JavaScript",
|
610
614
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
611
|
-
"X-Fern-SDK-Version": "0.0.
|
615
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
612
616
|
},
|
613
617
|
contentType: "application/json",
|
614
618
|
queryParameters: _queryParams,
|
@@ -643,6 +647,52 @@ class BankApi {
|
|
643
647
|
}
|
644
648
|
});
|
645
649
|
}
|
650
|
+
setAutoWithdrawals(userId, companyId, request) {
|
651
|
+
return __awaiter(this, void 0, void 0, function* () {
|
652
|
+
const _response = yield core.fetcher({
|
653
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/workers/${userId}/auto-withdrawals`),
|
654
|
+
method: "POST",
|
655
|
+
headers: {
|
656
|
+
Authorization: yield this._getAuthorizationHeader(),
|
657
|
+
"X-Fern-Language": "JavaScript",
|
658
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
659
|
+
"X-Fern-SDK-Version": "0.0.2590",
|
660
|
+
},
|
661
|
+
contentType: "application/json",
|
662
|
+
body: yield serializers.api.thera.bank.SetAutoWithdrawalRequest.jsonOrThrow(request, {
|
663
|
+
unrecognizedObjectKeys: "strip",
|
664
|
+
}),
|
665
|
+
timeoutMs: 60000,
|
666
|
+
});
|
667
|
+
if (_response.ok) {
|
668
|
+
return yield serializers.api.thera.bank.SetAutoWithdrawalResponse.parseOrThrow(_response.body, {
|
669
|
+
unrecognizedObjectKeys: "passthrough",
|
670
|
+
allowUnrecognizedUnionMembers: true,
|
671
|
+
allowUnrecognizedEnumValues: true,
|
672
|
+
breadcrumbsPrefix: ["response"],
|
673
|
+
});
|
674
|
+
}
|
675
|
+
if (_response.error.reason === "status-code") {
|
676
|
+
throw new errors.TheraApiError({
|
677
|
+
statusCode: _response.error.statusCode,
|
678
|
+
body: _response.error.body,
|
679
|
+
});
|
680
|
+
}
|
681
|
+
switch (_response.error.reason) {
|
682
|
+
case "non-json":
|
683
|
+
throw new errors.TheraApiError({
|
684
|
+
statusCode: _response.error.statusCode,
|
685
|
+
body: _response.error.rawBody,
|
686
|
+
});
|
687
|
+
case "timeout":
|
688
|
+
throw new errors.TheraApiTimeoutError();
|
689
|
+
case "unknown":
|
690
|
+
throw new errors.TheraApiError({
|
691
|
+
message: _response.error.errorMessage,
|
692
|
+
});
|
693
|
+
}
|
694
|
+
});
|
695
|
+
}
|
646
696
|
_getAuthorizationHeader() {
|
647
697
|
return __awaiter(this, void 0, void 0, function* () {
|
648
698
|
const bearer = yield core.Supplier.get(this._options.token);
|