@thera-hr/api-sdk 0.0.1284 → 0.0.1331
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/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/authentication/resources/gustoAuthentication/client/Client.js +1 -1
- package/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +17 -0
- package/api/resources/api/resources/thera/resources/bank/client/Client.js +18 -0
- package/api/resources/api/resources/thera/resources/bank/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bank/client/index.js +2 -0
- package/api/resources/api/resources/thera/resources/bank/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/bank/index.js +18 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +36 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +268 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/index.js +17 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GenerateBankSignupRequest.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GenerateBankSignupRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.js +2 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/index.js +18 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.d.ts +7 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +4 -0
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +20 -0
- package/api/resources/api/resources/thera/resources/bank/resources/index.d.ts +3 -0
- package/api/resources/api/resources/thera/resources/bank/resources/index.js +32 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +2 -2
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollUpdateCompany.d.ts +0 -2
- 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/payroll/resources/oncycleApi/client/Client.d.ts +1 -1
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +2 -2
- 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/authentication/resources/gustoAuthentication/client/Client.js +1 -1
- package/dist/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +17 -0
- package/dist/api/resources/api/resources/thera/resources/bank/client/Client.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/bank/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bank/client/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/bank/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/bank/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +36 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +268 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/index.js +17 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GenerateBankSignupRequest.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GenerateBankSignupRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.d.ts +7 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +4 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +20 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/index.d.ts +3 -0
- package/dist/api/resources/api/resources/thera/resources/bank/resources/index.js +32 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +2 -2
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollUpdateCompany.d.ts +0 -2
- 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/payroll/resources/oncycleApi/client/Client.d.ts +1 -1
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +2 -2
- package/dist/serialization/resources/api/resources/thera/resources/bank/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.js +33 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.js +33 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.d.ts +12 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.js +33 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.js +34 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +4 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +20 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/bank/resources/index.js +31 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollUpdateCompany.d.ts +0 -1
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollUpdateCompany.js +0 -1
- 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/package.json +3 -3
- package/serialization/resources/api/resources/thera/resources/bank/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bank/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetBankAccountSignupKey.js +33 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/GetSandboxPublicKey.js +33 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.d.ts +12 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyAccountSignupRequest.js +33 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/VerifyMicrodepositRequest.js +34 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.d.ts +4 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/index.js +20 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/index.d.ts +2 -0
- package/serialization/resources/api/resources/thera/resources/bank/resources/index.js +31 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollUpdateCompany.d.ts +0 -1
- package/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollUpdateCompany.js +0 -1
- package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/index.js +2 -1
|
@@ -47,7 +47,7 @@ class File_ {
|
|
|
47
47
|
Authorization: await this._getAuthorizationHeader(),
|
|
48
48
|
"X-Fern-Language": "JavaScript",
|
|
49
49
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
50
|
-
"X-Fern-SDK-Version": "0.0.
|
|
50
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
51
51
|
},
|
|
52
52
|
contentType: "application/json",
|
|
53
53
|
body: await serializers.api.services.AttachDocumentToEmploymentRequest.jsonOrThrow(request, {
|
|
@@ -86,7 +86,7 @@ class File_ {
|
|
|
86
86
|
Authorization: await this._getAuthorizationHeader(),
|
|
87
87
|
"X-Fern-Language": "JavaScript",
|
|
88
88
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
89
|
-
"X-Fern-SDK-Version": "0.0.
|
|
89
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
90
90
|
},
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
body: await serializers.api.services.DeleteDocumentFromEmploymentRequest.jsonOrThrow(request, {
|
|
@@ -125,7 +125,7 @@ class File_ {
|
|
|
125
125
|
Authorization: await this._getAuthorizationHeader(),
|
|
126
126
|
"X-Fern-Language": "JavaScript",
|
|
127
127
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
128
|
-
"X-Fern-SDK-Version": "0.0.
|
|
128
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
129
129
|
},
|
|
130
130
|
contentType: "application/json",
|
|
131
131
|
timeoutMs: 60000,
|
|
@@ -166,7 +166,7 @@ class File_ {
|
|
|
166
166
|
Authorization: await this._getAuthorizationHeader(),
|
|
167
167
|
"X-Fern-Language": "JavaScript",
|
|
168
168
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
169
|
-
"X-Fern-SDK-Version": "0.0.
|
|
169
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
170
170
|
},
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
timeoutMs: 60000,
|
|
@@ -47,7 +47,7 @@ class Invoices {
|
|
|
47
47
|
Authorization: await this._getAuthorizationHeader(),
|
|
48
48
|
"X-Fern-Language": "JavaScript",
|
|
49
49
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
50
|
-
"X-Fern-SDK-Version": "0.0.
|
|
50
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
51
51
|
},
|
|
52
52
|
contentType: "application/json",
|
|
53
53
|
body: await serializers.api.test.VoidInvoiceRequest.jsonOrThrow(request, {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as core from "../../../../../../core";
|
|
5
5
|
import { Authentication } from "../resources/authentication/client/Client";
|
|
6
|
+
import { Bank } from "../resources/bank/client/Client";
|
|
6
7
|
import { Company } from "../resources/company/client/Client";
|
|
7
8
|
import { Payroll } from "../resources/payroll/client/Client";
|
|
8
9
|
export declare namespace Thera {
|
|
@@ -16,6 +17,8 @@ export declare class Thera {
|
|
|
16
17
|
constructor(options: Thera.Options);
|
|
17
18
|
protected _authentication: Authentication | undefined;
|
|
18
19
|
get authentication(): Authentication;
|
|
20
|
+
protected _bank: Bank | undefined;
|
|
21
|
+
get bank(): Bank;
|
|
19
22
|
protected _company: Company | undefined;
|
|
20
23
|
get company(): Company;
|
|
21
24
|
protected _payroll: Payroll | undefined;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Thera = void 0;
|
|
7
7
|
const Client_1 = require("../resources/authentication/client/Client");
|
|
8
|
-
const Client_2 = require("../resources/
|
|
9
|
-
const Client_3 = require("../resources/
|
|
8
|
+
const Client_2 = require("../resources/bank/client/Client");
|
|
9
|
+
const Client_3 = require("../resources/company/client/Client");
|
|
10
|
+
const Client_4 = require("../resources/payroll/client/Client");
|
|
10
11
|
class Thera {
|
|
11
12
|
options;
|
|
12
13
|
constructor(options) {
|
|
@@ -16,13 +17,17 @@ class Thera {
|
|
|
16
17
|
get authentication() {
|
|
17
18
|
return (this._authentication ??= new Client_1.Authentication(this.options));
|
|
18
19
|
}
|
|
20
|
+
_bank;
|
|
21
|
+
get bank() {
|
|
22
|
+
return (this._bank ??= new Client_2.Bank(this.options));
|
|
23
|
+
}
|
|
19
24
|
_company;
|
|
20
25
|
get company() {
|
|
21
|
-
return (this._company ??= new
|
|
26
|
+
return (this._company ??= new Client_3.Company(this.options));
|
|
22
27
|
}
|
|
23
28
|
_payroll;
|
|
24
29
|
get payroll() {
|
|
25
|
-
return (this._payroll ??= new
|
|
30
|
+
return (this._payroll ??= new Client_4.Payroll(this.options));
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
exports.Thera = Thera;
|
|
@@ -47,7 +47,7 @@ class GustoAuthentication {
|
|
|
47
47
|
Authorization: await this._getAuthorizationHeader(),
|
|
48
48
|
"X-Fern-Language": "JavaScript",
|
|
49
49
|
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
50
|
-
"X-Fern-SDK-Version": "0.0.
|
|
50
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
51
51
|
},
|
|
52
52
|
contentType: "application/json",
|
|
53
53
|
timeoutMs: 60000,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../../../../../core";
|
|
5
|
+
import { BankApi } from "../resources/bankApi/client/Client";
|
|
6
|
+
export declare namespace Bank {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: string;
|
|
9
|
+
token: core.Supplier<core.BearerToken>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class Bank {
|
|
13
|
+
protected readonly options: Bank.Options;
|
|
14
|
+
constructor(options: Bank.Options);
|
|
15
|
+
protected _bankApi: BankApi | undefined;
|
|
16
|
+
get bankApi(): BankApi;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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.Bank = void 0;
|
|
7
|
+
const Client_1 = require("../resources/bankApi/client/Client");
|
|
8
|
+
class Bank {
|
|
9
|
+
options;
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.options = options;
|
|
12
|
+
}
|
|
13
|
+
_bankApi;
|
|
14
|
+
get bankApi() {
|
|
15
|
+
return (this._bankApi ??= new Client_1.BankApi(this.options));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Bank = Bank;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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("./resources"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../../../../../../../core";
|
|
5
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
6
|
+
export declare namespace BankApi {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: string;
|
|
9
|
+
token: core.Supplier<core.BearerToken>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class BankApi {
|
|
13
|
+
protected readonly options: BankApi.Options;
|
|
14
|
+
constructor(options: BankApi.Options);
|
|
15
|
+
/**
|
|
16
|
+
* For uses in Production Env only!
|
|
17
|
+
*/
|
|
18
|
+
generateBankSignup(request?: TheraApi.api.thera.bank.GenerateBankSignupRequest): Promise<TheraApi.api.thera.bank.GetBankAccountSignupKey>;
|
|
19
|
+
/**
|
|
20
|
+
* For uses in Dev/Staging Env only!
|
|
21
|
+
*/
|
|
22
|
+
getPublicTokenSandbox(): Promise<TheraApi.api.thera.bank.GetSandboxPublicKey>;
|
|
23
|
+
/**
|
|
24
|
+
* Verify that company's bank account has been provided to Plaid
|
|
25
|
+
*/
|
|
26
|
+
verifyBankSignup(request: TheraApi.api.thera.bank.VerifyAccountSignupRequest): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Update Zeal's bank account with info from Plaid & send microdeposit to company's bank account during W2 onboarding for Zeal API
|
|
29
|
+
*/
|
|
30
|
+
sendMicrodeposit(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Verify Microdeposit for company's bank account during W2 onboarding for Zeal API
|
|
33
|
+
*/
|
|
34
|
+
verifyMicrodeposit(request: TheraApi.api.thera.bank.VerifyMicrodepositRequest): Promise<void>;
|
|
35
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.BankApi = void 0;
|
|
33
|
+
const core = __importStar(require("../../../../../../../../../../core"));
|
|
34
|
+
const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
|
|
35
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
36
|
+
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
|
37
|
+
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
38
|
+
class BankApi {
|
|
39
|
+
options;
|
|
40
|
+
constructor(options) {
|
|
41
|
+
this.options = options;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* For uses in Production Env only!
|
|
45
|
+
*/
|
|
46
|
+
async generateBankSignup(request = {}) {
|
|
47
|
+
const { redirectUri } = request;
|
|
48
|
+
const _queryParams = new url_search_params_1.default();
|
|
49
|
+
if (redirectUri != null) {
|
|
50
|
+
_queryParams.append("redirectUri", redirectUri);
|
|
51
|
+
}
|
|
52
|
+
const _response = await core.fetcher({
|
|
53
|
+
url: (0, url_join_1.default)(this.options.environment, "bank/account/signup/link"),
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: {
|
|
56
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
57
|
+
"X-Fern-Language": "JavaScript",
|
|
58
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
60
|
+
},
|
|
61
|
+
contentType: "application/json",
|
|
62
|
+
queryParameters: _queryParams,
|
|
63
|
+
timeoutMs: 60000,
|
|
64
|
+
});
|
|
65
|
+
if (_response.ok) {
|
|
66
|
+
return await serializers.api.thera.bank.GetBankAccountSignupKey.parseOrThrow(_response.body, {
|
|
67
|
+
unrecognizedObjectKeys: "passthrough",
|
|
68
|
+
allowUnrecognizedUnionMembers: true,
|
|
69
|
+
allowUnrecognizedEnumValues: true,
|
|
70
|
+
breadcrumbsPrefix: ["response"],
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
74
|
+
throw new errors.TheraApiError({
|
|
75
|
+
statusCode: _response.error.statusCode,
|
|
76
|
+
body: _response.error.body,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
switch (_response.error.reason) {
|
|
80
|
+
case "non-json":
|
|
81
|
+
throw new errors.TheraApiError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.rawBody,
|
|
84
|
+
});
|
|
85
|
+
case "timeout":
|
|
86
|
+
throw new errors.TheraApiTimeoutError();
|
|
87
|
+
case "unknown":
|
|
88
|
+
throw new errors.TheraApiError({
|
|
89
|
+
message: _response.error.errorMessage,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* For uses in Dev/Staging Env only!
|
|
95
|
+
*/
|
|
96
|
+
async getPublicTokenSandbox() {
|
|
97
|
+
const _response = await core.fetcher({
|
|
98
|
+
url: (0, url_join_1.default)(this.options.environment, "sandbox/bank/account/publicToken"),
|
|
99
|
+
method: "GET",
|
|
100
|
+
headers: {
|
|
101
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
102
|
+
"X-Fern-Language": "JavaScript",
|
|
103
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
104
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
105
|
+
},
|
|
106
|
+
contentType: "application/json",
|
|
107
|
+
timeoutMs: 60000,
|
|
108
|
+
});
|
|
109
|
+
if (_response.ok) {
|
|
110
|
+
return await serializers.api.thera.bank.GetSandboxPublicKey.parseOrThrow(_response.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
breadcrumbsPrefix: ["response"],
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (_response.error.reason === "status-code") {
|
|
118
|
+
throw new errors.TheraApiError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.body,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
switch (_response.error.reason) {
|
|
124
|
+
case "non-json":
|
|
125
|
+
throw new errors.TheraApiError({
|
|
126
|
+
statusCode: _response.error.statusCode,
|
|
127
|
+
body: _response.error.rawBody,
|
|
128
|
+
});
|
|
129
|
+
case "timeout":
|
|
130
|
+
throw new errors.TheraApiTimeoutError();
|
|
131
|
+
case "unknown":
|
|
132
|
+
throw new errors.TheraApiError({
|
|
133
|
+
message: _response.error.errorMessage,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Verify that company's bank account has been provided to Plaid
|
|
139
|
+
*/
|
|
140
|
+
async verifyBankSignup(request) {
|
|
141
|
+
const _response = await core.fetcher({
|
|
142
|
+
url: (0, url_join_1.default)(this.options.environment, "bank/account/signup/verify"),
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: {
|
|
145
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
146
|
+
"X-Fern-Language": "JavaScript",
|
|
147
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
148
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
149
|
+
},
|
|
150
|
+
contentType: "application/json",
|
|
151
|
+
body: await serializers.api.thera.bank.VerifyAccountSignupRequest.jsonOrThrow(request, {
|
|
152
|
+
unrecognizedObjectKeys: "strip",
|
|
153
|
+
}),
|
|
154
|
+
timeoutMs: 60000,
|
|
155
|
+
});
|
|
156
|
+
if (_response.ok) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (_response.error.reason === "status-code") {
|
|
160
|
+
throw new errors.TheraApiError({
|
|
161
|
+
statusCode: _response.error.statusCode,
|
|
162
|
+
body: _response.error.body,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
switch (_response.error.reason) {
|
|
166
|
+
case "non-json":
|
|
167
|
+
throw new errors.TheraApiError({
|
|
168
|
+
statusCode: _response.error.statusCode,
|
|
169
|
+
body: _response.error.rawBody,
|
|
170
|
+
});
|
|
171
|
+
case "timeout":
|
|
172
|
+
throw new errors.TheraApiTimeoutError();
|
|
173
|
+
case "unknown":
|
|
174
|
+
throw new errors.TheraApiError({
|
|
175
|
+
message: _response.error.errorMessage,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Update Zeal's bank account with info from Plaid & send microdeposit to company's bank account during W2 onboarding for Zeal API
|
|
181
|
+
*/
|
|
182
|
+
async sendMicrodeposit() {
|
|
183
|
+
const _response = await core.fetcher({
|
|
184
|
+
url: (0, url_join_1.default)(this.options.environment, "bank/account/microdeposit/request"),
|
|
185
|
+
method: "POST",
|
|
186
|
+
headers: {
|
|
187
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
188
|
+
"X-Fern-Language": "JavaScript",
|
|
189
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
190
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
191
|
+
},
|
|
192
|
+
contentType: "application/json",
|
|
193
|
+
timeoutMs: 60000,
|
|
194
|
+
});
|
|
195
|
+
if (_response.ok) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (_response.error.reason === "status-code") {
|
|
199
|
+
throw new errors.TheraApiError({
|
|
200
|
+
statusCode: _response.error.statusCode,
|
|
201
|
+
body: _response.error.body,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
switch (_response.error.reason) {
|
|
205
|
+
case "non-json":
|
|
206
|
+
throw new errors.TheraApiError({
|
|
207
|
+
statusCode: _response.error.statusCode,
|
|
208
|
+
body: _response.error.rawBody,
|
|
209
|
+
});
|
|
210
|
+
case "timeout":
|
|
211
|
+
throw new errors.TheraApiTimeoutError();
|
|
212
|
+
case "unknown":
|
|
213
|
+
throw new errors.TheraApiError({
|
|
214
|
+
message: _response.error.errorMessage,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Verify Microdeposit for company's bank account during W2 onboarding for Zeal API
|
|
220
|
+
*/
|
|
221
|
+
async verifyMicrodeposit(request) {
|
|
222
|
+
const _response = await core.fetcher({
|
|
223
|
+
url: (0, url_join_1.default)(this.options.environment, "bank/account/microdeposit/verification"),
|
|
224
|
+
method: "POST",
|
|
225
|
+
headers: {
|
|
226
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
227
|
+
"X-Fern-Language": "JavaScript",
|
|
228
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
229
|
+
"X-Fern-SDK-Version": "0.0.1331",
|
|
230
|
+
},
|
|
231
|
+
contentType: "application/json",
|
|
232
|
+
body: await serializers.api.thera.bank.VerifyMicrodepositRequest.jsonOrThrow(request, {
|
|
233
|
+
unrecognizedObjectKeys: "strip",
|
|
234
|
+
}),
|
|
235
|
+
timeoutMs: 60000,
|
|
236
|
+
});
|
|
237
|
+
if (_response.ok) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (_response.error.reason === "status-code") {
|
|
241
|
+
throw new errors.TheraApiError({
|
|
242
|
+
statusCode: _response.error.statusCode,
|
|
243
|
+
body: _response.error.body,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
switch (_response.error.reason) {
|
|
247
|
+
case "non-json":
|
|
248
|
+
throw new errors.TheraApiError({
|
|
249
|
+
statusCode: _response.error.statusCode,
|
|
250
|
+
body: _response.error.rawBody,
|
|
251
|
+
});
|
|
252
|
+
case "timeout":
|
|
253
|
+
throw new errors.TheraApiTimeoutError();
|
|
254
|
+
case "unknown":
|
|
255
|
+
throw new errors.TheraApiError({
|
|
256
|
+
message: _response.error.errorMessage,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
async _getAuthorizationHeader() {
|
|
261
|
+
const bearer = await core.Supplier.get(this.options.token);
|
|
262
|
+
if (bearer != null) {
|
|
263
|
+
return `Bearer ${bearer}`;
|
|
264
|
+
}
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.BankApi = BankApi;
|
|
@@ -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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GenerateBankSignupRequest } from "./GenerateBankSignupRequest";
|
|
@@ -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,20 @@
|
|
|
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("./VerifyMicrodepositRequest"), exports);
|
|
18
|
+
__exportStar(require("./VerifyAccountSignupRequest"), exports);
|
|
19
|
+
__exportStar(require("./GetSandboxPublicKey"), exports);
|
|
20
|
+
__exportStar(require("./GetBankAccountSignupKey"), exports);
|