@thera-hr/api-sdk 0.0.3283728 → 1.1.1-THERA-2281-deployment-improvement.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/Client.d.ts +3 -0
  2. package/api/resources/api/client/Client.d.ts +3 -0
  3. package/api/resources/api/resources/aiprise/client/Client.d.ts +3 -0
  4. package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.d.ts +4 -1
  5. package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +3 -3
  6. package/api/resources/api/resources/services/client/Client.d.ts +3 -0
  7. package/api/resources/api/resources/services/resources/file/client/Client.d.ts +7 -4
  8. package/api/resources/api/resources/services/resources/file/client/Client.js +12 -12
  9. package/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  10. package/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -0
  11. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +24 -21
  12. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +67 -64
  13. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.d.ts +1 -0
  14. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
  15. package/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -0
  16. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +16 -13
  17. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +41 -47
  18. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/index.d.ts +0 -1
  19. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +10 -0
  20. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -1
  21. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  22. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  23. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +4 -1
  24. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  25. package/api/resources/api/resources/thera/resources/contractor/client/Client.d.ts +3 -0
  26. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.d.ts +4 -1
  27. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  28. package/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -0
  29. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.d.ts +6 -3
  30. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +9 -9
  31. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +4 -1
  32. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +3 -3
  33. package/api/resources/api/resources/thera/resources/email/client/Client.d.ts +3 -0
  34. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.d.ts +4 -1
  35. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +3 -3
  36. package/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +3 -0
  37. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +6 -3
  38. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +9 -9
  39. package/api/resources/api/resources/thera/resources/misc/client/Client.d.ts +3 -0
  40. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +4 -1
  41. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +3 -3
  42. package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  43. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +4 -1
  44. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  45. package/api/resources/api/resources/thera/resources/user/client/Client.d.ts +3 -0
  46. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.d.ts +4 -1
  47. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  48. package/api/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +2 -1
  49. package/api/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
  50. package/api/resources/db/resources/user/types/PoweredBy.d.ts +8 -0
  51. package/api/resources/db/resources/user/types/PoweredBy.js +10 -0
  52. package/api/resources/db/resources/user/types/index.d.ts +1 -0
  53. package/api/resources/db/resources/user/types/index.js +1 -0
  54. package/core/fetcher/Fetcher.d.ts +2 -2
  55. package/core/index.d.ts +1 -1
  56. package/core/index.js +4 -4
  57. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +5 -5
  58. package/dist/Client.d.ts +3 -0
  59. package/dist/api/resources/api/client/Client.d.ts +3 -0
  60. package/dist/api/resources/api/resources/aiprise/client/Client.d.ts +3 -0
  61. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.d.ts +4 -1
  62. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +3 -3
  63. package/dist/api/resources/api/resources/services/client/Client.d.ts +3 -0
  64. package/dist/api/resources/api/resources/services/resources/file/client/Client.d.ts +7 -4
  65. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +12 -12
  66. package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -0
  67. package/dist/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -0
  68. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +24 -21
  69. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +67 -64
  70. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/requests/GetWithdrawalMethodCurrenciesRequest.d.ts +1 -0
  71. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
  72. package/dist/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -0
  73. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +16 -13
  74. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +41 -47
  75. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/index.d.ts +0 -1
  76. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +10 -0
  77. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateCompanyRequest.d.ts +1 -1
  78. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  79. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  80. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +4 -1
  81. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +3 -3
  82. package/dist/api/resources/api/resources/thera/resources/contractor/client/Client.d.ts +3 -0
  83. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.d.ts +4 -1
  84. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  85. package/dist/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -0
  86. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.d.ts +6 -3
  87. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +9 -9
  88. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +4 -1
  89. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +3 -3
  90. package/dist/api/resources/api/resources/thera/resources/email/client/Client.d.ts +3 -0
  91. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.d.ts +4 -1
  92. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +3 -3
  93. package/dist/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +3 -0
  94. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +6 -3
  95. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +9 -9
  96. package/dist/api/resources/api/resources/thera/resources/misc/client/Client.d.ts +3 -0
  97. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.d.ts +4 -1
  98. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +3 -3
  99. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -0
  100. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +4 -1
  101. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +3 -3
  102. package/dist/api/resources/api/resources/thera/resources/user/client/Client.d.ts +3 -0
  103. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.d.ts +4 -1
  104. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  105. package/dist/api/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +2 -1
  106. package/dist/api/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
  107. package/dist/api/resources/db/resources/user/types/PoweredBy.d.ts +8 -0
  108. package/dist/api/resources/db/resources/user/types/PoweredBy.js +10 -0
  109. package/dist/api/resources/db/resources/user/types/index.d.ts +1 -0
  110. package/dist/api/resources/db/resources/user/types/index.js +1 -0
  111. package/dist/core/fetcher/Fetcher.d.ts +2 -2
  112. package/dist/core/index.d.ts +1 -1
  113. package/dist/core/index.js +4 -4
  114. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +5 -5
  115. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
  116. package/dist/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.js +3 -0
  117. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +14 -0
  118. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.js +44 -0
  119. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  120. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  121. package/dist/serialization/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +1 -1
  122. package/dist/serialization/resources/db/resources/user/types/AiPriseVerificationResult.js +1 -1
  123. package/dist/serialization/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
  124. package/dist/serialization/resources/db/resources/user/types/BankTransfer.js +1 -0
  125. package/dist/serialization/resources/db/resources/user/types/PoweredBy.d.ts +10 -0
  126. package/dist/serialization/resources/db/resources/user/types/PoweredBy.js +31 -0
  127. package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  128. package/dist/serialization/resources/db/resources/user/types/index.js +1 -0
  129. package/package.json +2 -2
  130. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.d.ts +1 -0
  131. package/serialization/resources/api/resources/thera/resources/bank/resources/bankApi/types/SingleWithdrawalMethodResponse.js +3 -0
  132. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.d.ts +14 -0
  133. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/ContractorAndContracts.js +44 -0
  134. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  135. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  136. package/serialization/resources/db/resources/user/types/AiPriseVerificationResult.d.ts +1 -1
  137. package/serialization/resources/db/resources/user/types/AiPriseVerificationResult.js +1 -1
  138. package/serialization/resources/db/resources/user/types/BankTransfer.d.ts +1 -0
  139. package/serialization/resources/db/resources/user/types/BankTransfer.js +1 -0
  140. package/serialization/resources/db/resources/user/types/PoweredBy.d.ts +10 -0
  141. package/serialization/resources/db/resources/user/types/PoweredBy.js +31 -0
  142. package/serialization/resources/db/resources/user/types/index.d.ts +1 -0
  143. package/serialization/resources/db/resources/user/types/index.js +1 -0
  144. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/InviteContractorReq.d.ts +0 -8
  145. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/requests/InviteContractorReq.d.ts +0 -8
  146. /package/api/resources/api/resources/thera/resources/company/resources/companyApi/{client/requests/InviteContractorReq.js → types/ContractorAndContracts.js} +0 -0
  147. /package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/{client/requests/InviteContractorReq.js → types/ContractorAndContracts.js} +0 -0
@@ -40,10 +40,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.CompanyApi = void 0;
42
42
  const core = __importStar(require("../../../../../../../../../../core"));
43
- const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
44
43
  const serializers = __importStar(require("../../../../../../../../../../serialization"));
45
44
  const url_join_1 = __importDefault(require("url-join"));
46
45
  const errors = __importStar(require("../../../../../../../../../../errors"));
46
+ const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
47
47
  class CompanyApi {
48
48
  constructor(_options) {
49
49
  this._options = _options;
@@ -51,13 +51,8 @@ class CompanyApi {
51
51
  /**
52
52
  * Invite Contractor or Create Contract
53
53
  */
54
- inviteContractor(request) {
54
+ inviteContractor(request, requestOptions) {
55
55
  return __awaiter(this, void 0, void 0, function* () {
56
- const { skipEmail, body: _body } = request;
57
- const _queryParams = new url_search_params_1.default();
58
- if (skipEmail != null) {
59
- _queryParams.append("skipEmail", skipEmail.toString());
60
- }
61
56
  const _response = yield core.fetcher({
62
57
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "companies/employees"),
63
58
  method: "POST",
@@ -65,14 +60,13 @@ class CompanyApi {
65
60
  Authorization: yield this._getAuthorizationHeader(),
66
61
  "X-Fern-Language": "JavaScript",
67
62
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
68
- "X-Fern-SDK-Version": "0.0.3283728",
63
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
69
64
  },
70
65
  contentType: "application/json",
71
- queryParameters: _queryParams,
72
- body: yield serializers.api.thera.company.InviteContractorRequest.jsonOrThrow(_body, {
66
+ body: yield serializers.api.thera.company.InviteContractorRequest.jsonOrThrow(request, {
73
67
  unrecognizedObjectKeys: "strip",
74
68
  }),
75
- timeoutMs: 60000,
69
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
76
70
  });
77
71
  if (_response.ok) {
78
72
  return yield serializers.api.thera.company.InviteContractorResponse.parseOrThrow(_response.body, {
@@ -107,7 +101,7 @@ class CompanyApi {
107
101
  /**
108
102
  * Invite manager to the platform
109
103
  */
110
- inviteManager(companyId, request) {
104
+ inviteManager(companyId, request, requestOptions) {
111
105
  return __awaiter(this, void 0, void 0, function* () {
112
106
  const _response = yield core.fetcher({
113
107
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/managers`),
@@ -116,13 +110,13 @@ class CompanyApi {
116
110
  Authorization: yield this._getAuthorizationHeader(),
117
111
  "X-Fern-Language": "JavaScript",
118
112
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
119
- "X-Fern-SDK-Version": "0.0.3283728",
113
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
120
114
  },
121
115
  contentType: "application/json",
122
116
  body: yield serializers.api.thera.company.InviteManagerRequest.jsonOrThrow(request, {
123
117
  unrecognizedObjectKeys: "strip",
124
118
  }),
125
- timeoutMs: 60000,
119
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
126
120
  });
127
121
  if (_response.ok) {
128
122
  return yield serializers.api.thera.company.InviteManagerResponse.parseOrThrow(_response.body, {
@@ -157,7 +151,7 @@ class CompanyApi {
157
151
  /**
158
152
  * < Edit the teams / roles that the manager belongs to. If no team role is provided, their role is removed for that team.
159
153
  */
160
- editManagerRoles(userId, companyId, request = {}) {
154
+ editManagerRoles(userId, companyId, request = {}, requestOptions) {
161
155
  return __awaiter(this, void 0, void 0, function* () {
162
156
  const _response = yield core.fetcher({
163
157
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/managers/${userId}`),
@@ -166,13 +160,13 @@ class CompanyApi {
166
160
  Authorization: yield this._getAuthorizationHeader(),
167
161
  "X-Fern-Language": "JavaScript",
168
162
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
169
- "X-Fern-SDK-Version": "0.0.3283728",
163
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
170
164
  },
171
165
  contentType: "application/json",
172
166
  body: yield serializers.api.thera.company.EditManagerRolesRequest.jsonOrThrow(request, {
173
167
  unrecognizedObjectKeys: "strip",
174
168
  }),
175
- timeoutMs: 60000,
169
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
176
170
  });
177
171
  if (_response.ok) {
178
172
  return yield serializers.api.thera.company.EditManagerRolesResponse.parseOrThrow(_response.body, {
@@ -207,7 +201,7 @@ class CompanyApi {
207
201
  /**
208
202
  * < Edit org admins, with ultimate admin permissions across the platform. These users must already be managers of the org.
209
203
  */
210
- editOrgAdmins(companyId, request) {
204
+ editOrgAdmins(companyId, request, requestOptions) {
211
205
  return __awaiter(this, void 0, void 0, function* () {
212
206
  const _response = yield core.fetcher({
213
207
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/admins`),
@@ -216,13 +210,13 @@ class CompanyApi {
216
210
  Authorization: yield this._getAuthorizationHeader(),
217
211
  "X-Fern-Language": "JavaScript",
218
212
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
219
- "X-Fern-SDK-Version": "0.0.3283728",
213
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
220
214
  },
221
215
  contentType: "application/json",
222
216
  body: yield serializers.api.thera.company.EditOrgAdminsRequest.jsonOrThrow(request, {
223
217
  unrecognizedObjectKeys: "strip",
224
218
  }),
225
- timeoutMs: 60000,
219
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
226
220
  });
227
221
  if (_response.ok) {
228
222
  return yield serializers.api.thera.company.EditOrgAdminsResponse.parseOrThrow(_response.body, {
@@ -257,7 +251,7 @@ class CompanyApi {
257
251
  /**
258
252
  * < Removes a manager from the org entirely, revoking all team and org level roles.
259
253
  */
260
- removeManager(companyId, userId) {
254
+ removeManager(companyId, userId, requestOptions) {
261
255
  return __awaiter(this, void 0, void 0, function* () {
262
256
  const _response = yield core.fetcher({
263
257
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/managers/${userId}`),
@@ -266,10 +260,10 @@ class CompanyApi {
266
260
  Authorization: yield this._getAuthorizationHeader(),
267
261
  "X-Fern-Language": "JavaScript",
268
262
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
269
- "X-Fern-SDK-Version": "0.0.3283728",
263
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
270
264
  },
271
265
  contentType: "application/json",
272
- timeoutMs: 60000,
266
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
273
267
  });
274
268
  if (_response.ok) {
275
269
  return yield serializers.api.thera.company.RemoveManagerResponse.parseOrThrow(_response.body, {
@@ -304,7 +298,7 @@ class CompanyApi {
304
298
  /**
305
299
  * < Add org admins, with ultimate admin permissions across the platform. These users must already be managers of the org.
306
300
  */
307
- changeContractTeam(companyId, contractId, request) {
301
+ changeContractTeam(companyId, contractId, request, requestOptions) {
308
302
  return __awaiter(this, void 0, void 0, function* () {
309
303
  const _response = yield core.fetcher({
310
304
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/contracts/${contractId}/team`),
@@ -313,13 +307,13 @@ class CompanyApi {
313
307
  Authorization: yield this._getAuthorizationHeader(),
314
308
  "X-Fern-Language": "JavaScript",
315
309
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
316
- "X-Fern-SDK-Version": "0.0.3283728",
310
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
317
311
  },
318
312
  contentType: "application/json",
319
313
  body: yield serializers.api.thera.company.ChangeContractTeamRequest.jsonOrThrow(request, {
320
314
  unrecognizedObjectKeys: "strip",
321
315
  }),
322
- timeoutMs: 60000,
316
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
323
317
  });
324
318
  if (_response.ok) {
325
319
  return yield serializers.api.thera.company.ChangeContractTeamResponse.parseOrThrow(_response.body, {
@@ -354,7 +348,7 @@ class CompanyApi {
354
348
  /**
355
349
  * Get all of the teams and their contracts for a company
356
350
  */
357
- getTeams(companyId) {
351
+ getTeams(companyId, requestOptions) {
358
352
  return __awaiter(this, void 0, void 0, function* () {
359
353
  const _response = yield core.fetcher({
360
354
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/teams`),
@@ -363,10 +357,10 @@ class CompanyApi {
363
357
  Authorization: yield this._getAuthorizationHeader(),
364
358
  "X-Fern-Language": "JavaScript",
365
359
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
366
- "X-Fern-SDK-Version": "0.0.3283728",
360
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
367
361
  },
368
362
  contentType: "application/json",
369
- timeoutMs: 60000,
363
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
370
364
  });
371
365
  if (_response.ok) {
372
366
  return yield serializers.api.thera.company.GetTeamsResponse.parseOrThrow(_response.body, {
@@ -401,7 +395,7 @@ class CompanyApi {
401
395
  /**
402
396
  * Get all of the managers for a company
403
397
  */
404
- getManagers(companyId) {
398
+ getManagers(companyId, requestOptions) {
405
399
  return __awaiter(this, void 0, void 0, function* () {
406
400
  const _response = yield core.fetcher({
407
401
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/managers`),
@@ -410,10 +404,10 @@ class CompanyApi {
410
404
  Authorization: yield this._getAuthorizationHeader(),
411
405
  "X-Fern-Language": "JavaScript",
412
406
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
413
- "X-Fern-SDK-Version": "0.0.3283728",
407
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
414
408
  },
415
409
  contentType: "application/json",
416
- timeoutMs: 60000,
410
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
417
411
  });
418
412
  if (_response.ok) {
419
413
  return yield serializers.api.thera.company.GetManagersResponse.parseOrThrow(_response.body, {
@@ -448,7 +442,7 @@ class CompanyApi {
448
442
  /**
449
443
  * Create a team within a company. At least one Team Admin must be added.
450
444
  */
451
- createTeam(companyId, request) {
445
+ createTeam(companyId, request, requestOptions) {
452
446
  return __awaiter(this, void 0, void 0, function* () {
453
447
  const _response = yield core.fetcher({
454
448
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/teams`),
@@ -457,13 +451,13 @@ class CompanyApi {
457
451
  Authorization: yield this._getAuthorizationHeader(),
458
452
  "X-Fern-Language": "JavaScript",
459
453
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
460
- "X-Fern-SDK-Version": "0.0.3283728",
454
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
461
455
  },
462
456
  contentType: "application/json",
463
457
  body: yield serializers.api.thera.company.CreateTeamRequest.jsonOrThrow(request, {
464
458
  unrecognizedObjectKeys: "strip",
465
459
  }),
466
- timeoutMs: 60000,
460
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
467
461
  });
468
462
  if (_response.ok) {
469
463
  return yield serializers.api.thera.company.CreateTeamResponse.parseOrThrow(_response.body, {
@@ -498,7 +492,7 @@ class CompanyApi {
498
492
  /**
499
493
  * Delete a team. All contracts must be removed from this team first
500
494
  */
501
- deleteTeam(companyId, teamId) {
495
+ deleteTeam(companyId, teamId, requestOptions) {
502
496
  return __awaiter(this, void 0, void 0, function* () {
503
497
  const _response = yield core.fetcher({
504
498
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/teams/${teamId}`),
@@ -507,10 +501,10 @@ class CompanyApi {
507
501
  Authorization: yield this._getAuthorizationHeader(),
508
502
  "X-Fern-Language": "JavaScript",
509
503
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
510
- "X-Fern-SDK-Version": "0.0.3283728",
504
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
511
505
  },
512
506
  contentType: "application/json",
513
- timeoutMs: 60000,
507
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
514
508
  });
515
509
  if (_response.ok) {
516
510
  return yield serializers.api.thera.company.DeleteTeamResponse.parseOrThrow(_response.body, {
@@ -545,7 +539,7 @@ class CompanyApi {
545
539
  /**
546
540
  * Change details related to a team. For now, you can just edit its name.
547
541
  */
548
- editTeam(companyId, teamId, request) {
542
+ editTeam(companyId, teamId, request, requestOptions) {
549
543
  return __awaiter(this, void 0, void 0, function* () {
550
544
  const _response = yield core.fetcher({
551
545
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/teams/${teamId}`),
@@ -554,13 +548,13 @@ class CompanyApi {
554
548
  Authorization: yield this._getAuthorizationHeader(),
555
549
  "X-Fern-Language": "JavaScript",
556
550
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
557
- "X-Fern-SDK-Version": "0.0.3283728",
551
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
558
552
  },
559
553
  contentType: "application/json",
560
554
  body: yield serializers.api.thera.company.EditTeamRequest.jsonOrThrow(request, {
561
555
  unrecognizedObjectKeys: "strip",
562
556
  }),
563
- timeoutMs: 60000,
557
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
564
558
  });
565
559
  if (_response.ok) {
566
560
  return yield serializers.api.thera.company.EditTeamResponse.parseOrThrow(_response.body, {
@@ -596,7 +590,7 @@ class CompanyApi {
596
590
  * Gets all team and org permissions across all orgs for a given user, along with the contracts on which they're the worker.
597
591
  *
598
592
  */
599
- getAllCompanyAffiliations(userId) {
593
+ getAllCompanyAffiliations(userId, requestOptions) {
600
594
  return __awaiter(this, void 0, void 0, function* () {
601
595
  const _response = yield core.fetcher({
602
596
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `users/${userId}/affiliations`),
@@ -605,10 +599,10 @@ class CompanyApi {
605
599
  Authorization: yield this._getAuthorizationHeader(),
606
600
  "X-Fern-Language": "JavaScript",
607
601
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
608
- "X-Fern-SDK-Version": "0.0.3283728",
602
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
609
603
  },
610
604
  contentType: "application/json",
611
- timeoutMs: 60000,
605
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
612
606
  });
613
607
  if (_response.ok) {
614
608
  return yield serializers.api.thera.company.GetAllCompanyAffiliationsResponse.parseOrThrow(_response.body, {
@@ -644,7 +638,7 @@ class CompanyApi {
644
638
  * Check that a new user is authorized to create a new account. This is determined by an allow list that is stored in our db.
645
639
  *
646
640
  */
647
- checkCanCreateAccount(request) {
641
+ checkCanCreateAccount(request, requestOptions) {
648
642
  return __awaiter(this, void 0, void 0, function* () {
649
643
  const { email } = request;
650
644
  const _queryParams = new url_search_params_1.default();
@@ -656,11 +650,11 @@ class CompanyApi {
656
650
  Authorization: yield this._getAuthorizationHeader(),
657
651
  "X-Fern-Language": "JavaScript",
658
652
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
659
- "X-Fern-SDK-Version": "0.0.3283728",
653
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
660
654
  },
661
655
  contentType: "application/json",
662
656
  queryParameters: _queryParams,
663
- timeoutMs: 60000,
657
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
664
658
  });
665
659
  if (_response.ok) {
666
660
  return yield serializers.api.thera.company.CheckCanCreateAccountResponse.parseOrThrow(_response.body, {
@@ -1,4 +1,3 @@
1
- export { InviteContractorReq } from "./InviteContractorReq";
2
1
  export { InviteManagerRequest } from "./InviteManagerRequest";
3
2
  export { EditManagerRolesRequest } from "./EditManagerRolesRequest";
4
3
  export { EditOrgAdminsRequest } from "./EditOrgAdminsRequest";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../../..";
5
+ export interface ContractorAndContracts {
6
+ user: TheraApi.db.UserApiResponse;
7
+ employments: TheraApi.db.ContractApiResponse[];
8
+ /** Will be removed soon */
9
+ employment: TheraApi.db.ContractApiResponse;
10
+ }
@@ -13,6 +13,6 @@ export interface CreateCompanyRequest {
13
13
  w2Payroll: TheraApi.db.W2Payroll;
14
14
  mailingAddress: TheraApi.api.thera.common.Address;
15
15
  defaultCurrency: string;
16
- /** If false, we won't send emails to anyone in this company. Default true. */
16
+ /** If false, we won't send any emails to anyone in this company until this field is changed on our Company DB entity. Default true. */
17
17
  live?: boolean;
18
18
  }
@@ -6,6 +6,7 @@ export * from "./CreateMilestoneDetails";
6
6
  export * from "./CreateMilestone";
7
7
  export * from "./CheckCanCreateAccountResponse";
8
8
  export * from "./InviteContractorResponse";
9
+ export * from "./ContractorAndContracts";
9
10
  export * from "./InviteManagerResponse";
10
11
  export * from "./EditManagerRolesResponse";
11
12
  export * from "./EditOrgAdminsResponse";
@@ -22,6 +22,7 @@ __exportStar(require("./CreateMilestoneDetails"), exports);
22
22
  __exportStar(require("./CreateMilestone"), exports);
23
23
  __exportStar(require("./CheckCanCreateAccountResponse"), exports);
24
24
  __exportStar(require("./InviteContractorResponse"), exports);
25
+ __exportStar(require("./ContractorAndContracts"), exports);
25
26
  __exportStar(require("./InviteManagerResponse"), exports);
26
27
  __exportStar(require("./EditManagerRolesResponse"), exports);
27
28
  __exportStar(require("./EditOrgAdminsResponse"), exports);
@@ -8,6 +8,9 @@ export declare namespace CompanyW2PayrollApi {
8
8
  environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
+ interface RequestOptions {
12
+ timeoutInSeconds?: number;
13
+ }
11
14
  }
12
15
  export declare class CompanyW2PayrollApi {
13
16
  protected readonly _options: CompanyW2PayrollApi.Options;
@@ -15,6 +18,6 @@ export declare class CompanyW2PayrollApi {
15
18
  /**
16
19
  *
17
20
  */
18
- onboardW2Payroll(request: TheraApi.api.thera.company.OnboardW2PayrollRequest): Promise<void>;
21
+ onboardW2Payroll(request: TheraApi.api.thera.company.OnboardW2PayrollRequest, requestOptions?: CompanyW2PayrollApi.RequestOptions): Promise<void>;
19
22
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
23
  }
@@ -50,7 +50,7 @@ class CompanyW2PayrollApi {
50
50
  /**
51
51
  *
52
52
  */
53
- onboardW2Payroll(request) {
53
+ onboardW2Payroll(request, requestOptions) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
55
  const _response = yield core.fetcher({
56
56
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "company/w2Payroll"),
@@ -59,13 +59,13 @@ class CompanyW2PayrollApi {
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.3283728",
62
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
63
63
  },
64
64
  contentType: "application/json",
65
65
  body: yield serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
66
66
  unrecognizedObjectKeys: "strip",
67
67
  }),
68
- timeoutMs: 60000,
68
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
69
69
  });
70
70
  if (_response.ok) {
71
71
  return;
@@ -8,6 +8,9 @@ export declare namespace Contractor {
8
8
  environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
+ interface RequestOptions {
12
+ timeoutInSeconds?: number;
13
+ }
11
14
  }
12
15
  export declare class Contractor {
13
16
  protected readonly _options: Contractor.Options;
@@ -8,10 +8,13 @@ export declare namespace ContractorApi {
8
8
  environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
+ interface RequestOptions {
12
+ timeoutInSeconds?: number;
13
+ }
11
14
  }
12
15
  export declare class ContractorApi {
13
16
  protected readonly _options: ContractorApi.Options;
14
17
  constructor(_options: ContractorApi.Options);
15
- onboardContractorsCsv(companyId: string, request: TheraApi.api.thera.contractor.CreateContractorsCsvRequest): Promise<unknown>;
18
+ onboardContractorsCsv(companyId: string, request: TheraApi.api.thera.contractor.CreateContractorsCsvRequest, requestOptions?: ContractorApi.RequestOptions): Promise<unknown>;
16
19
  protected _getAuthorizationHeader(): Promise<string | undefined>;
17
20
  }
@@ -47,7 +47,7 @@ class ContractorApi {
47
47
  constructor(_options) {
48
48
  this._options = _options;
49
49
  }
50
- onboardContractorsCsv(companyId, request) {
50
+ onboardContractorsCsv(companyId, request, requestOptions) {
51
51
  return __awaiter(this, void 0, void 0, function* () {
52
52
  const _response = yield core.fetcher({
53
53
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `companies/${companyId}/contractors/csv`),
@@ -56,13 +56,13 @@ class ContractorApi {
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.3283728",
59
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
60
60
  },
61
61
  contentType: "application/json",
62
62
  body: yield serializers.api.thera.contractor.CreateContractorsCsvRequest.jsonOrThrow(request, {
63
63
  unrecognizedObjectKeys: "strip",
64
64
  }),
65
- timeoutMs: 60000,
65
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
66
66
  });
67
67
  if (_response.ok) {
68
68
  return _response.body;
@@ -9,6 +9,9 @@ export declare namespace Disbursement {
9
9
  environment: core.Supplier<string>;
10
10
  token?: core.Supplier<core.BearerToken | undefined>;
11
11
  }
12
+ interface RequestOptions {
13
+ timeoutInSeconds?: number;
14
+ }
12
15
  }
13
16
  export declare class Disbursement {
14
17
  protected readonly _options: Disbursement.Options;
@@ -8,18 +8,21 @@ export declare namespace DisbursementApi {
8
8
  environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
+ interface RequestOptions {
12
+ timeoutInSeconds?: number;
13
+ }
11
14
  }
12
15
  export declare class DisbursementApi {
13
16
  protected readonly _options: DisbursementApi.Options;
14
17
  constructor(_options: DisbursementApi.Options);
15
- uploadCsvInvoice(companyId: string, request: TheraApi.api.thera.disbursement.CreateInvoiceCsvRequest): Promise<unknown>;
18
+ uploadCsvInvoice(companyId: string, request: TheraApi.api.thera.disbursement.CreateInvoiceCsvRequest, requestOptions?: DisbursementApi.RequestOptions): Promise<unknown>;
16
19
  /**
17
20
  * For the response type, please check Swagger. Info for the Invoice Work Unit type: 1. `workUnitTotal` is used to replace `hours`. 2. Check the WageType of Invoice in the Contract API to know if it's hourly, daily or weekly invoice.
18
21
  */
19
- createDisbursement(request: TheraApi.api.thera.disbursement.CreateDisbursementRequest): Promise<unknown>;
22
+ createDisbursement(request: TheraApi.api.thera.disbursement.CreateDisbursementRequest, requestOptions?: DisbursementApi.RequestOptions): Promise<unknown>;
20
23
  /**
21
24
  * Approve Invoice
22
25
  */
23
- approveInvoice(invoiceId: string): Promise<void>;
26
+ approveInvoice(invoiceId: string, requestOptions?: DisbursementApi.RequestOptions): Promise<void>;
24
27
  protected _getAuthorizationHeader(): Promise<string | undefined>;
25
28
  }
@@ -59,7 +59,7 @@ class DisbursementApi {
59
59
  constructor(_options) {
60
60
  this._options = _options;
61
61
  }
62
- uploadCsvInvoice(companyId, request) {
62
+ uploadCsvInvoice(companyId, request, requestOptions) {
63
63
  return __awaiter(this, void 0, void 0, function* () {
64
64
  const { preview } = request, _body = __rest(request, ["preview"]);
65
65
  const _queryParams = new url_search_params_1.default();
@@ -73,14 +73,14 @@ class DisbursementApi {
73
73
  Authorization: yield this._getAuthorizationHeader(),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
76
- "X-Fern-SDK-Version": "0.0.3283728",
76
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
77
77
  },
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
80
80
  body: yield serializers.api.thera.disbursement.CreateInvoiceCsvRequest.jsonOrThrow(_body, {
81
81
  unrecognizedObjectKeys: "strip",
82
82
  }),
83
- timeoutMs: 60000,
83
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
84
84
  });
85
85
  if (_response.ok) {
86
86
  return _response.body;
@@ -109,7 +109,7 @@ class DisbursementApi {
109
109
  /**
110
110
  * For the response type, please check Swagger. Info for the Invoice Work Unit type: 1. `workUnitTotal` is used to replace `hours`. 2. Check the WageType of Invoice in the Contract API to know if it's hourly, daily or weekly invoice.
111
111
  */
112
- createDisbursement(request) {
112
+ createDisbursement(request, requestOptions) {
113
113
  return __awaiter(this, void 0, void 0, function* () {
114
114
  const _response = yield core.fetcher({
115
115
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "disbursement"),
@@ -118,13 +118,13 @@ class DisbursementApi {
118
118
  Authorization: yield this._getAuthorizationHeader(),
119
119
  "X-Fern-Language": "JavaScript",
120
120
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
121
- "X-Fern-SDK-Version": "0.0.3283728",
121
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
122
122
  },
123
123
  contentType: "application/json",
124
124
  body: yield serializers.api.thera.disbursement.CreateDisbursementRequest.jsonOrThrow(request, {
125
125
  unrecognizedObjectKeys: "strip",
126
126
  }),
127
- timeoutMs: 60000,
127
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
128
128
  });
129
129
  if (_response.ok) {
130
130
  return _response.body;
@@ -153,7 +153,7 @@ class DisbursementApi {
153
153
  /**
154
154
  * Approve Invoice
155
155
  */
156
- approveInvoice(invoiceId) {
156
+ approveInvoice(invoiceId, requestOptions) {
157
157
  return __awaiter(this, void 0, void 0, function* () {
158
158
  const _response = yield core.fetcher({
159
159
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `disbursement/invoices/${invoiceId}/approve`),
@@ -162,10 +162,10 @@ class DisbursementApi {
162
162
  Authorization: yield this._getAuthorizationHeader(),
163
163
  "X-Fern-Language": "JavaScript",
164
164
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
165
- "X-Fern-SDK-Version": "0.0.3283728",
165
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
166
166
  },
167
167
  contentType: "application/json",
168
- timeoutMs: 60000,
168
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
169
169
  });
170
170
  if (_response.ok) {
171
171
  return;
@@ -8,6 +8,9 @@ export declare namespace DisbursementWebhookApi {
8
8
  environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
+ interface RequestOptions {
12
+ timeoutInSeconds?: number;
13
+ }
11
14
  }
12
15
  export declare class DisbursementWebhookApi {
13
16
  protected readonly _options: DisbursementWebhookApi.Options;
@@ -15,6 +18,6 @@ export declare class DisbursementWebhookApi {
15
18
  /**
16
19
  * Calling this API will trigger automatic creation of invoices that need to be created
17
20
  */
18
- invoiceWebhook(request: TheraApi.api.thera.disbursement.InvoiceWebhookRequest): Promise<TheraApi.api.thera.disbursement.AutoCreateInvoicePayCycleResponse>;
21
+ invoiceWebhook(request: TheraApi.api.thera.disbursement.InvoiceWebhookRequest, requestOptions?: DisbursementWebhookApi.RequestOptions): Promise<TheraApi.api.thera.disbursement.AutoCreateInvoicePayCycleResponse>;
19
22
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
23
  }
@@ -50,7 +50,7 @@ class DisbursementWebhookApi {
50
50
  /**
51
51
  * Calling this API will trigger automatic creation of invoices that need to be created
52
52
  */
53
- invoiceWebhook(request) {
53
+ invoiceWebhook(request, requestOptions) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
55
  const { theraWebhookSignatureHeader, body: _body } = request;
56
56
  const _response = yield core.fetcher({
@@ -60,14 +60,14 @@ class DisbursementWebhookApi {
60
60
  Authorization: yield this._getAuthorizationHeader(),
61
61
  "X-Fern-Language": "JavaScript",
62
62
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
63
- "X-Fern-SDK-Version": "0.0.3283728",
63
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
64
64
  "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
65
65
  },
66
66
  contentType: "application/json",
67
67
  body: yield serializers.api.thera.disbursement.InvoiceWebhookEvent.jsonOrThrow(_body, {
68
68
  unrecognizedObjectKeys: "strip",
69
69
  }),
70
- timeoutMs: 60000,
70
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
71
71
  });
72
72
  if (_response.ok) {
73
73
  return yield serializers.api.thera.disbursement.AutoCreateInvoicePayCycleResponse.parseOrThrow(_response.body, {
@@ -8,6 +8,9 @@ export declare namespace Email {
8
8
  environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
+ interface RequestOptions {
12
+ timeoutInSeconds?: number;
13
+ }
11
14
  }
12
15
  export declare class Email {
13
16
  protected readonly _options: Email.Options;