@thera-hr/api-sdk 0.0.1-prerelease2879-dev-3 → 0.0.1-prerelease2879-staging

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.
Files changed (132) hide show
  1. package/api/resources/api/client/Client.d.ts +3 -0
  2. package/api/resources/api/client/Client.js +9 -4
  3. package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  4. package/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  5. package/api/resources/api/resources/external/client/Client.d.ts +19 -0
  6. package/api/resources/api/resources/external/client/Client.js +17 -0
  7. package/api/resources/api/resources/external/client/index.d.ts +1 -0
  8. package/api/resources/api/resources/external/client/index.js +2 -0
  9. package/api/resources/api/resources/external/index.d.ts +2 -0
  10. package/api/resources/api/resources/external/index.js +18 -0
  11. package/api/resources/api/resources/external/resources/externalApi/client/Client.d.ts +71 -0
  12. package/api/resources/api/resources/external/resources/externalApi/client/Client.js +158 -0
  13. package/api/resources/api/resources/external/resources/externalApi/client/index.d.ts +1 -0
  14. package/api/resources/api/resources/external/resources/externalApi/client/index.js +2 -0
  15. package/api/resources/api/resources/external/resources/externalApi/index.d.ts +2 -0
  16. package/api/resources/api/resources/external/resources/externalApi/index.js +18 -0
  17. package/api/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +18 -0
  18. package/api/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js +5 -0
  19. package/api/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts +6 -0
  20. package/api/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.js +5 -0
  21. package/api/resources/api/resources/external/resources/externalApi/types/index.d.ts +2 -0
  22. package/api/resources/api/resources/external/resources/externalApi/types/index.js +18 -0
  23. package/api/resources/api/resources/external/resources/index.d.ts +2 -0
  24. package/api/resources/api/resources/external/resources/index.js +41 -0
  25. package/api/resources/api/resources/index.d.ts +1 -0
  26. package/api/resources/api/resources/index.js +2 -1
  27. package/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  28. package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  29. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +33 -33
  30. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +23 -23
  31. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +8 -1
  32. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +26 -19
  33. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  34. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  35. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  36. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  37. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  38. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  39. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  40. package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +2 -2
  41. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  42. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  43. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  44. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  45. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.d.ts +2 -1
  46. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +15 -11
  47. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/requests/GetAllTimeTrackingRequest.d.ts +3 -1
  48. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  49. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  50. package/dist/api/resources/api/client/Client.d.ts +3 -0
  51. package/dist/api/resources/api/client/Client.js +9 -4
  52. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  53. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  54. package/dist/api/resources/api/resources/external/client/Client.d.ts +19 -0
  55. package/dist/api/resources/api/resources/external/client/Client.js +17 -0
  56. package/dist/api/resources/api/resources/external/client/index.d.ts +1 -0
  57. package/dist/api/resources/api/resources/external/client/index.js +2 -0
  58. package/dist/api/resources/api/resources/external/index.d.ts +2 -0
  59. package/dist/api/resources/api/resources/external/index.js +18 -0
  60. package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.d.ts +71 -0
  61. package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +158 -0
  62. package/dist/api/resources/api/resources/external/resources/externalApi/client/index.d.ts +1 -0
  63. package/dist/api/resources/api/resources/external/resources/externalApi/client/index.js +2 -0
  64. package/dist/api/resources/api/resources/external/resources/externalApi/index.d.ts +2 -0
  65. package/dist/api/resources/api/resources/external/resources/externalApi/index.js +18 -0
  66. package/dist/api/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +18 -0
  67. package/dist/api/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js +5 -0
  68. package/dist/api/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts +6 -0
  69. package/dist/api/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.js +5 -0
  70. package/dist/api/resources/api/resources/external/resources/externalApi/types/index.d.ts +2 -0
  71. package/dist/api/resources/api/resources/external/resources/externalApi/types/index.js +18 -0
  72. package/dist/api/resources/api/resources/external/resources/index.d.ts +2 -0
  73. package/dist/api/resources/api/resources/external/resources/index.js +41 -0
  74. package/dist/api/resources/api/resources/index.d.ts +1 -0
  75. package/dist/api/resources/api/resources/index.js +2 -1
  76. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  77. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  78. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +33 -33
  79. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +23 -23
  80. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +8 -1
  81. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +26 -19
  82. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  83. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  84. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  85. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  86. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  87. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  88. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  89. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +2 -2
  90. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +6 -6
  91. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  92. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  93. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +14 -14
  94. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.d.ts +2 -1
  95. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +15 -11
  96. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/requests/GetAllTimeTrackingRequest.d.ts +3 -1
  97. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +10 -10
  98. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  99. package/dist/serialization/resources/api/resources/external/index.d.ts +1 -0
  100. package/dist/serialization/resources/api/resources/external/index.js +17 -0
  101. package/dist/serialization/resources/api/resources/external/resources/externalApi/index.d.ts +1 -0
  102. package/dist/serialization/resources/api/resources/external/resources/externalApi/index.js +17 -0
  103. package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +26 -0
  104. package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js +57 -0
  105. package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts +12 -0
  106. package/dist/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.js +43 -0
  107. package/dist/serialization/resources/api/resources/external/resources/externalApi/types/index.d.ts +2 -0
  108. package/dist/serialization/resources/api/resources/external/resources/externalApi/types/index.js +18 -0
  109. package/dist/serialization/resources/api/resources/external/resources/index.d.ts +2 -0
  110. package/dist/serialization/resources/api/resources/external/resources/index.js +41 -0
  111. package/dist/serialization/resources/api/resources/index.d.ts +1 -0
  112. package/dist/serialization/resources/api/resources/index.js +2 -1
  113. package/dist/version.d.ts +1 -1
  114. package/dist/version.js +1 -1
  115. package/package.json +1 -1
  116. package/reference.md +94 -1
  117. package/serialization/resources/api/resources/external/index.d.ts +1 -0
  118. package/serialization/resources/api/resources/external/index.js +17 -0
  119. package/serialization/resources/api/resources/external/resources/externalApi/index.d.ts +1 -0
  120. package/serialization/resources/api/resources/external/resources/externalApi/index.js +17 -0
  121. package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.d.ts +26 -0
  122. package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalCreateContractorRequestV2.js +57 -0
  123. package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.d.ts +12 -0
  124. package/serialization/resources/api/resources/external/resources/externalApi/types/ExternalSuccessResponseV2.js +43 -0
  125. package/serialization/resources/api/resources/external/resources/externalApi/types/index.d.ts +2 -0
  126. package/serialization/resources/api/resources/external/resources/externalApi/types/index.js +18 -0
  127. package/serialization/resources/api/resources/external/resources/index.d.ts +2 -0
  128. package/serialization/resources/api/resources/external/resources/index.js +41 -0
  129. package/serialization/resources/api/resources/index.d.ts +1 -0
  130. package/serialization/resources/api/resources/index.js +2 -1
  131. package/version.d.ts +1 -1
  132. package/version.js +1 -1
@@ -4,6 +4,7 @@
4
4
  import * as core from "../../../../core";
5
5
  import { Aiprise } from "../resources/aiprise/client/Client";
6
6
  import { Dev } from "../resources/dev/client/Client";
7
+ import { External } from "../resources/external/client/Client";
7
8
  import { Services } from "../resources/services/client/Client";
8
9
  import { Thera } from "../resources/thera/client/Client";
9
10
  export declare namespace Api {
@@ -18,11 +19,13 @@ export declare class Api {
18
19
  protected readonly _options: Api.Options;
19
20
  protected _aiprise: Aiprise | undefined;
20
21
  protected _dev: Dev | undefined;
22
+ protected _external: External | undefined;
21
23
  protected _services: Services | undefined;
22
24
  protected _thera: Thera | undefined;
23
25
  constructor(_options: Api.Options);
24
26
  get aiprise(): Aiprise;
25
27
  get dev(): Dev;
28
+ get external(): External;
26
29
  get services(): Services;
27
30
  get thera(): Thera;
28
31
  }
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Api = void 0;
7
7
  const Client_1 = require("../resources/aiprise/client/Client");
8
8
  const Client_2 = require("../resources/dev/client/Client");
9
- const Client_3 = require("../resources/services/client/Client");
10
- const Client_4 = require("../resources/thera/client/Client");
9
+ const Client_3 = require("../resources/external/client/Client");
10
+ const Client_4 = require("../resources/services/client/Client");
11
+ const Client_5 = require("../resources/thera/client/Client");
11
12
  class Api {
12
13
  constructor(_options) {
13
14
  this._options = _options;
@@ -20,13 +21,17 @@ class Api {
20
21
  var _a;
21
22
  return ((_a = this._dev) !== null && _a !== void 0 ? _a : (this._dev = new Client_2.Dev(this._options)));
22
23
  }
24
+ get external() {
25
+ var _a;
26
+ return ((_a = this._external) !== null && _a !== void 0 ? _a : (this._external = new Client_3.External(this._options)));
27
+ }
23
28
  get services() {
24
29
  var _a;
25
- return ((_a = this._services) !== null && _a !== void 0 ? _a : (this._services = new Client_3.Services(this._options)));
30
+ return ((_a = this._services) !== null && _a !== void 0 ? _a : (this._services = new Client_4.Services(this._options)));
26
31
  }
27
32
  get thera() {
28
33
  var _a;
29
- return ((_a = this._thera) !== null && _a !== void 0 ? _a : (this._thera = new Client_4.Thera(this._options)));
34
+ return ((_a = this._thera) !== null && _a !== void 0 ? _a : (this._thera = new Client_5.Thera(this._options)));
30
35
  }
31
36
  }
32
37
  exports.Api = Api;
@@ -108,7 +108,7 @@ class AipriseWebhookApi {
108
108
  const _response = yield core.fetcher({
109
109
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/aiprise/webhook/verification/callback"),
110
110
  method: "POST",
111
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
111
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
112
112
  contentType: "application/json",
113
113
  requestType: "json",
114
114
  body: serializers.api.aiprise.AiPriseVerificationCallback.jsonOrThrow(request, {
@@ -87,7 +87,7 @@ class Dev {
87
87
  const _response = yield core.fetcher({
88
88
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/dev/eor"),
89
89
  method: "POST",
90
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
91
  contentType: "application/json",
92
92
  requestType: "json",
93
93
  body: serializers.api.dev.AddEorEmployeeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../../../core";
5
+ import { ExternalApi } from "../resources/externalApi/client/Client";
6
+ export declare namespace External {
7
+ interface Options {
8
+ environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ token?: core.Supplier<core.BearerToken | undefined>;
12
+ }
13
+ }
14
+ export declare class External {
15
+ protected readonly _options: External.Options;
16
+ protected _externalApi: ExternalApi | undefined;
17
+ constructor(_options: External.Options);
18
+ get externalApi(): ExternalApi;
19
+ }
@@ -0,0 +1,17 @@
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.External = void 0;
7
+ const Client_1 = require("../resources/externalApi/client/Client");
8
+ class External {
9
+ constructor(_options) {
10
+ this._options = _options;
11
+ }
12
+ get externalApi() {
13
+ var _a;
14
+ return ((_a = this._externalApi) !== null && _a !== void 0 ? _a : (this._externalApi = new Client_1.ExternalApi(this._options)));
15
+ }
16
+ }
17
+ exports.External = External;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./resources";
2
+ export * from "./client";
@@ -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,71 @@
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 "../../../../../../../index";
6
+ export declare namespace ExternalApi {
7
+ interface Options {
8
+ environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ token?: core.Supplier<core.BearerToken | undefined>;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class ExternalApi {
25
+ protected readonly _options: ExternalApi.Options;
26
+ constructor(_options: ExternalApi.Options);
27
+ /**
28
+ * @param {TheraApi.api.external.ExternalCreateContractorRequestV2} request
29
+ * @param {ExternalApi.RequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @example
32
+ * await client.api.external.externalApi.createContractorV2({
33
+ * email: "string",
34
+ * firstName: "string",
35
+ * lastName: "string",
36
+ * country: "string",
37
+ * currency: "string",
38
+ * rate: 1000000,
39
+ * wageType: "HOURLY",
40
+ * payCycle: {
41
+ * timezone: "string",
42
+ * cycleStartDate: "2023-01-15",
43
+ * cycleEnd: {
44
+ * type: "weekly"
45
+ * },
46
+ * paymentDueDays: 1,
47
+ * firstPayDate: "2023-01-15",
48
+ * lastPayDate: "2023-01-15",
49
+ * firstPayTotal: 1000000,
50
+ * lastPayTotal: 1000000,
51
+ * itemRecurrencesById: {
52
+ * "string": {
53
+ * itemType: "EXPENSE",
54
+ * description: "string",
55
+ * amount: 1000000,
56
+ * firstInvoiceDate: "2023-01-15",
57
+ * paymentCurrency: "string",
58
+ * deletedDateTime: {
59
+ * "key": "value"
60
+ * }
61
+ * }
62
+ * }
63
+ * },
64
+ * contractType: "FIXED_RATE",
65
+ * contractName: "string",
66
+ * contractDocumentType: "NO_CONTRACT"
67
+ * })
68
+ */
69
+ createContractorV2(request: TheraApi.api.external.ExternalCreateContractorRequestV2, requestOptions?: ExternalApi.RequestOptions): Promise<TheraApi.api.external.ExternalSuccessResponseV2>;
70
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
71
+ }
@@ -0,0 +1,158 @@
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 () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.ExternalApi = void 0;
52
+ const core = __importStar(require("../../../../../../../../core"));
53
+ const serializers = __importStar(require("../../../../../../../../serialization/index"));
54
+ const url_join_1 = __importDefault(require("url-join"));
55
+ const errors = __importStar(require("../../../../../../../../errors/index"));
56
+ class ExternalApi {
57
+ constructor(_options) {
58
+ this._options = _options;
59
+ }
60
+ /**
61
+ * @param {TheraApi.api.external.ExternalCreateContractorRequestV2} request
62
+ * @param {ExternalApi.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @example
65
+ * await client.api.external.externalApi.createContractorV2({
66
+ * email: "string",
67
+ * firstName: "string",
68
+ * lastName: "string",
69
+ * country: "string",
70
+ * currency: "string",
71
+ * rate: 1000000,
72
+ * wageType: "HOURLY",
73
+ * payCycle: {
74
+ * timezone: "string",
75
+ * cycleStartDate: "2023-01-15",
76
+ * cycleEnd: {
77
+ * type: "weekly"
78
+ * },
79
+ * paymentDueDays: 1,
80
+ * firstPayDate: "2023-01-15",
81
+ * lastPayDate: "2023-01-15",
82
+ * firstPayTotal: 1000000,
83
+ * lastPayTotal: 1000000,
84
+ * itemRecurrencesById: {
85
+ * "string": {
86
+ * itemType: "EXPENSE",
87
+ * description: "string",
88
+ * amount: 1000000,
89
+ * firstInvoiceDate: "2023-01-15",
90
+ * paymentCurrency: "string",
91
+ * deletedDateTime: {
92
+ * "key": "value"
93
+ * }
94
+ * }
95
+ * }
96
+ * },
97
+ * contractType: "FIXED_RATE",
98
+ * contractName: "string",
99
+ * contractDocumentType: "NO_CONTRACT"
100
+ * })
101
+ */
102
+ createContractorV2(request, requestOptions) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ var _a;
105
+ const _response = yield core.fetcher({
106
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/external/v2/contractor"),
107
+ method: "POST",
108
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
109
+ contentType: "application/json",
110
+ requestType: "json",
111
+ body: serializers.api.external.ExternalCreateContractorRequestV2.jsonOrThrow(request, {
112
+ unrecognizedObjectKeys: "strip",
113
+ }),
114
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
115
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
116
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
117
+ });
118
+ if (_response.ok) {
119
+ return serializers.api.external.ExternalSuccessResponseV2.parseOrThrow(_response.body, {
120
+ unrecognizedObjectKeys: "passthrough",
121
+ allowUnrecognizedUnionMembers: true,
122
+ allowUnrecognizedEnumValues: true,
123
+ skipValidation: true,
124
+ breadcrumbsPrefix: ["response"],
125
+ });
126
+ }
127
+ if (_response.error.reason === "status-code") {
128
+ throw new errors.TheraApiError({
129
+ statusCode: _response.error.statusCode,
130
+ body: _response.error.body,
131
+ });
132
+ }
133
+ switch (_response.error.reason) {
134
+ case "non-json":
135
+ throw new errors.TheraApiError({
136
+ statusCode: _response.error.statusCode,
137
+ body: _response.error.rawBody,
138
+ });
139
+ case "timeout":
140
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /external/v2/contractor.");
141
+ case "unknown":
142
+ throw new errors.TheraApiError({
143
+ message: _response.error.errorMessage,
144
+ });
145
+ }
146
+ });
147
+ }
148
+ _getAuthorizationHeader() {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const bearer = yield core.Supplier.get(this._options.token);
151
+ if (bearer != null) {
152
+ return `Bearer ${bearer}`;
153
+ }
154
+ return undefined;
155
+ });
156
+ }
157
+ }
158
+ exports.ExternalApi = ExternalApi;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";
@@ -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,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../index";
5
+ export interface ExternalCreateContractorRequestV2 {
6
+ email: string;
7
+ firstName: string;
8
+ lastName: string;
9
+ country: string;
10
+ currency: string;
11
+ /** Amount in Minor Units. ex: 100 USD = 1 USD. 150 USD = 1.5 USD. Not needed for Milestone Contractors. */
12
+ rate?: number;
13
+ wageType: TheraApi.model.thera.WageType;
14
+ payCycle: TheraApi.model.thera.PayCycle;
15
+ contractType: TheraApi.model.thera.ContractType;
16
+ contractName: string;
17
+ contractDocumentType: TheraApi.model.thera.ContractDocumentType;
18
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ExternalSuccessResponseV2 {
5
+ success: boolean;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./ExternalCreateContractorRequestV2";
2
+ export * from "./ExternalSuccessResponseV2";
@@ -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("./ExternalCreateContractorRequestV2"), exports);
18
+ __exportStar(require("./ExternalSuccessResponseV2"), exports);
@@ -0,0 +1,2 @@
1
+ export * as externalApi from "./externalApi";
2
+ export * from "./externalApi/types";
@@ -0,0 +1,41 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.externalApi = void 0;
40
+ exports.externalApi = __importStar(require("./externalApi"));
41
+ __exportStar(require("./externalApi/types"), exports);
@@ -1,5 +1,6 @@
1
1
  export * as aiprise from "./aiprise";
2
2
  export * as dev from "./dev";
3
+ export * as external from "./external";
3
4
  export * as oneschema from "./oneschema";
4
5
  export * as request from "./request";
5
6
  export * as response from "./response";
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.zeal = exports.thera = exports.services = exports.response = exports.request = exports.oneschema = exports.dev = exports.aiprise = void 0;
36
+ exports.zeal = exports.thera = exports.services = exports.response = exports.request = exports.oneschema = exports.external = exports.dev = exports.aiprise = void 0;
37
37
  exports.aiprise = __importStar(require("./aiprise"));
38
38
  exports.dev = __importStar(require("./dev"));
39
+ exports.external = __importStar(require("./external"));
39
40
  exports.oneschema = __importStar(require("./oneschema"));
40
41
  exports.request = __importStar(require("./request"));
41
42
  exports.response = __importStar(require("./response"));
@@ -74,7 +74,7 @@ class File_ {
74
74
  const _response = yield core.fetcher({
75
75
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/${encodeURIComponent(contractId)}/generic-document`),
76
76
  method: "POST",
77
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
77
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
78
  contentType: "application/json",
79
79
  requestType: "json",
80
80
  body: serializers.api.services.AttachDocumentToEmploymentRequest.jsonOrThrow(request, {
@@ -125,7 +125,7 @@ class File_ {
125
125
  const _response = yield core.fetcher({
126
126
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/${encodeURIComponent(contractId)}/generic-document/${encodeURIComponent(s3Key)}`),
127
127
  method: "DELETE",
128
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
128
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
129
129
  contentType: "application/json",
130
130
  requestType: "json",
131
131
  body: serializers.api.services.DeleteDocumentFromEmploymentRequest.jsonOrThrow(request, {
@@ -173,7 +173,7 @@ class File_ {
173
173
  const _response = yield core.fetcher({
174
174
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/${encodeURIComponent(contractId)}/generic-document/${encodeURIComponent(s3Key)}/file-url`),
175
175
  method: "GET",
176
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
176
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
177
177
  contentType: "application/json",
178
178
  requestType: "json",
179
179
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -224,7 +224,7 @@ class File_ {
224
224
  const _response = yield core.fetcher({
225
225
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/contracts/eor/${encodeURIComponent(contractId)}/payslips/${encodeURIComponent(s3Key)}/fileUrl`),
226
226
  method: "GET",
227
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
227
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
228
228
  contentType: "application/json",
229
229
  requestType: "json",
230
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -275,7 +275,7 @@ class File_ {
275
275
  const _response = yield core.fetcher({
276
276
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/companies/${encodeURIComponent(companyId)}/contracts/eor/pay-in/${encodeURIComponent(s3Key)}/file-url`),
277
277
  method: "GET",
278
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-dev-3", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-dev-3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
278
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "0.0.1-prerelease2879-staging", "User-Agent": "@thera-hr/api-sdk/0.0.1-prerelease2879-staging", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
279
279
  contentType: "application/json",
280
280
  requestType: "json",
281
281
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,