@thera-hr/api-sdk 1.1.1-prerelease2720-dev-2 → 1.1.1-prerelease2737-dev-2

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 (98) hide show
  1. package/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  2. package/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  3. package/api/resources/api/resources/external/resources/externalApi/client/Client.js +1 -1
  4. package/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  5. package/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  6. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +39 -39
  7. package/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +29 -29
  8. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  9. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +6 -6
  10. package/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  11. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  12. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  13. package/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  14. package/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  15. package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  16. package/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  17. package/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
  18. package/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +9 -9
  19. package/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.js +11 -11
  20. package/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  21. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +5 -5
  22. package/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +7 -7
  23. package/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +15 -15
  24. package/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  25. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +29 -4
  26. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +88 -18
  27. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/AddCompanyBankingDetailsRequest.d.ts +12 -4
  28. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.d.ts +23 -0
  29. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.js +5 -0
  30. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/index.d.ts +1 -0
  31. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.d.ts +5 -0
  32. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.js +5 -0
  33. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +1 -0
  34. package/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +1 -0
  35. package/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  36. package/api/resources/db/resources/company/types/CompanyBankingDetails.d.ts +13 -5
  37. package/dist/api/resources/api/resources/aiprise/resources/aipriseWebhookApi/client/Client.js +1 -1
  38. package/dist/api/resources/api/resources/dev/resources/dev/client/Client.js +1 -1
  39. package/dist/api/resources/api/resources/external/resources/externalApi/client/Client.js +1 -1
  40. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +5 -5
  41. package/dist/api/resources/api/resources/thera/resources/accounting/resources/accountingApi/client/Client.js +4 -4
  42. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +39 -39
  43. package/dist/api/resources/api/resources/thera/resources/bridge/resources/bridgeApi/client/Client.js +29 -29
  44. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +18 -18
  45. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +6 -6
  46. package/dist/api/resources/api/resources/thera/resources/contractor/resources/contractorApi/client/Client.js +3 -3
  47. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementApi/client/Client.js +7 -7
  48. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +1 -1
  49. package/dist/api/resources/api/resources/thera/resources/document/resources/documentApi/client/Client.js +3 -3
  50. package/dist/api/resources/api/resources/thera/resources/email/resources/emailApi/client/Client.js +2 -2
  51. package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +5 -5
  52. package/dist/api/resources/api/resources/thera/resources/eor/resources/eorTrackerApi/client/Client.js +3 -3
  53. package/dist/api/resources/api/resources/thera/resources/incorporation/resources/incorporationApi/client/Client.js +3 -3
  54. package/dist/api/resources/api/resources/thera/resources/misc/resources/misc/client/Client.js +9 -9
  55. package/dist/api/resources/api/resources/thera/resources/payroll/resources/expenseApi/client/Client.js +11 -11
  56. package/dist/api/resources/api/resources/thera/resources/payroll/resources/offcycleApi/client/Client.js +1 -1
  57. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +5 -5
  58. package/dist/api/resources/api/resources/thera/resources/payroll/resources/payscheduleApi/client/Client.js +7 -7
  59. package/dist/api/resources/api/resources/thera/resources/timeoff/resources/timeoffApi/client/Client.js +15 -15
  60. package/dist/api/resources/api/resources/thera/resources/timetracking/resources/timetrackingApi/client/Client.js +9 -9
  61. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.d.ts +29 -4
  62. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/Client.js +88 -18
  63. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/AddCompanyBankingDetailsRequest.d.ts +12 -4
  64. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.d.ts +23 -0
  65. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.js +5 -0
  66. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/index.d.ts +1 -0
  67. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.d.ts +5 -0
  68. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.js +5 -0
  69. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +1 -0
  70. package/dist/api/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +1 -0
  71. package/dist/api/resources/api/resources/thera/resources/user/resources/userApi/client/Client.js +3 -3
  72. package/dist/api/resources/db/resources/company/types/CompanyBankingDetails.d.ts +13 -5
  73. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.d.ts +16 -0
  74. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.js +47 -0
  75. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/index.d.ts +1 -0
  76. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/index.js +3 -1
  77. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.d.ts +11 -0
  78. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.js +41 -0
  79. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +1 -0
  80. package/dist/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +1 -0
  81. package/dist/serialization/resources/db/resources/company/types/CompanyBankingDetails.d.ts +4 -4
  82. package/dist/serialization/resources/db/resources/company/types/CompanyBankingDetails.js +4 -4
  83. package/dist/version.d.ts +1 -1
  84. package/dist/version.js +1 -1
  85. package/package.json +1 -1
  86. package/reference.md +89 -4
  87. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.d.ts +16 -0
  88. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/UpdateCompanyIncorporationInfoRequest.js +47 -0
  89. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/index.d.ts +1 -0
  90. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/client/requests/index.js +3 -1
  91. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.d.ts +11 -0
  92. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/UpdateCompanyIncorporationInfoResponse.js +41 -0
  93. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.d.ts +1 -0
  94. package/serialization/resources/api/resources/thera/resources/tp/resources/tpApi/types/index.js +1 -0
  95. package/serialization/resources/db/resources/company/types/CompanyBankingDetails.d.ts +4 -4
  96. package/serialization/resources/db/resources/company/types/CompanyBankingDetails.js +4 -4
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
@@ -57,6 +57,68 @@ class TpApi {
57
57
  constructor(_options) {
58
58
  this._options = _options;
59
59
  }
60
+ /**
61
+ * Update company incorporation information (NAICS code, establishment date, incorporation state,
62
+ * and legal structure). This should be called before submitting beneficiary details.
63
+ *
64
+ * @param {string} companyId
65
+ * @param {TheraApi.api.thera.tp.UpdateCompanyIncorporationInfoRequest} request
66
+ * @param {TpApi.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @example
69
+ * await client.api.thera.tp.tpApi.updateCompanyIncorporationInfo("string", {
70
+ * naics: "string",
71
+ * establishedOn: "2023-01-15",
72
+ * incorporationState: "string",
73
+ * legalStructure: "ccorp"
74
+ * })
75
+ */
76
+ updateCompanyIncorporationInfo(companyId, request, requestOptions) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ var _a;
79
+ const _response = yield core.fetcher({
80
+ 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)}/incorporation-info`),
81
+ method: "POST",
82
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ contentType: "application/json",
84
+ requestType: "json",
85
+ body: serializers.api.thera.tp.UpdateCompanyIncorporationInfoRequest.jsonOrThrow(request, {
86
+ unrecognizedObjectKeys: "strip",
87
+ }),
88
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
89
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
90
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
+ });
92
+ if (_response.ok) {
93
+ return serializers.api.thera.tp.UpdateCompanyIncorporationInfoResponse.parseOrThrow(_response.body, {
94
+ unrecognizedObjectKeys: "passthrough",
95
+ allowUnrecognizedUnionMembers: true,
96
+ allowUnrecognizedEnumValues: true,
97
+ skipValidation: true,
98
+ breadcrumbsPrefix: ["response"],
99
+ });
100
+ }
101
+ if (_response.error.reason === "status-code") {
102
+ throw new errors.TheraApiError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.body,
105
+ });
106
+ }
107
+ switch (_response.error.reason) {
108
+ case "non-json":
109
+ throw new errors.TheraApiError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.rawBody,
112
+ });
113
+ case "timeout":
114
+ throw new errors.TheraApiTimeoutError("Timeout exceeded when calling POST /companies/{companyId}/incorporation-info.");
115
+ case "unknown":
116
+ throw new errors.TheraApiError({
117
+ message: _response.error.errorMessage,
118
+ });
119
+ }
120
+ });
121
+ }
60
122
  /**
61
123
  * Final step of company onboarding, if the company is using Thera banking.
62
124
  *
@@ -67,10 +129,18 @@ class TpApi {
67
129
  * @example
68
130
  * await client.api.thera.tp.tpApi.addCompanyBankingDetails("string", {
69
131
  * details: {
70
- * establishedOn: "2023-01-15",
71
- * incorporationState: "string",
72
- * legalStructure: "ccorp",
73
- * naics: "string",
132
+ * establishedOn: {
133
+ * "key": "value"
134
+ * },
135
+ * incorporationState: {
136
+ * "key": "value"
137
+ * },
138
+ * legalStructure: {
139
+ * "key": "value"
140
+ * },
141
+ * naics: {
142
+ * "key": "value"
143
+ * },
74
144
  * callerUserBeneficiaryInformation: {
75
145
  * dateOfBirth: "2023-01-15",
76
146
  * emailAddress: "string",
@@ -127,7 +197,7 @@ class TpApi {
127
197
  const _response = yield core.fetcher({
128
198
  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)}/banking-details`),
129
199
  method: "POST",
130
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
200
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
131
201
  contentType: "application/json",
132
202
  requestType: "json",
133
203
  body: serializers.api.thera.tp.AddCompanyBankingDetailsRequest.jsonOrThrow(request, {
@@ -181,7 +251,7 @@ class TpApi {
181
251
  const _response = yield core.fetcher({
182
252
  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)), "naics-codes"),
183
253
  method: "GET",
184
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
254
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
185
255
  contentType: "application/json",
186
256
  requestType: "json",
187
257
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -243,7 +313,7 @@ class TpApi {
243
313
  const _response = yield core.fetcher({
244
314
  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)}/process-funds`),
245
315
  method: "POST",
246
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
316
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
317
  contentType: "application/json",
248
318
  requestType: "json",
249
319
  body: serializers.api.thera.tp.ProcessFundsTransfer.jsonOrThrow(request, {
@@ -295,7 +365,7 @@ class TpApi {
295
365
  const _response = yield core.fetcher({
296
366
  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)}/create-counterparty`),
297
367
  method: "POST",
298
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
368
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
299
369
  contentType: "application/json",
300
370
  requestType: "json",
301
371
  body: serializers.api.thera.tp.CreateCounterPartyForBankingRequest.jsonOrThrow(request, {
@@ -344,7 +414,7 @@ class TpApi {
344
414
  const _response = yield core.fetcher({
345
415
  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)}/fetch-accounts`),
346
416
  method: "GET",
347
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
348
418
  contentType: "application/json",
349
419
  requestType: "json",
350
420
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -399,7 +469,7 @@ class TpApi {
399
469
  const _response = yield core.fetcher({
400
470
  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)}/fetch-accounts/${encodeURIComponent(accountId)}`),
401
471
  method: "GET",
402
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
472
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
403
473
  contentType: "application/json",
404
474
  queryParameters: _queryParams,
405
475
  requestType: "json",
@@ -450,7 +520,7 @@ class TpApi {
450
520
  const _response = yield core.fetcher({
451
521
  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)}/transfer-fbo-omnibus`),
452
522
  method: "POST",
453
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
523
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
454
524
  contentType: "application/json",
455
525
  requestType: "json",
456
526
  body: serializers.api.thera.tp.TransferFundsToOmnibusAccount.jsonOrThrow(request, {
@@ -500,7 +570,7 @@ class TpApi {
500
570
  const _response = yield core.fetcher({
501
571
  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)}/fetch-transactions/${encodeURIComponent(accountId)}`),
502
572
  method: "GET",
503
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
573
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
504
574
  contentType: "application/json",
505
575
  requestType: "json",
506
576
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -553,7 +623,7 @@ class TpApi {
553
623
  const _response = yield core.fetcher({
554
624
  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)}/tp-transaction/${encodeURIComponent(transactionId)}`),
555
625
  method: "GET",
556
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
626
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
557
627
  contentType: "application/json",
558
628
  requestType: "json",
559
629
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -617,7 +687,7 @@ class TpApi {
617
687
  const _response = yield core.fetcher({
618
688
  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)), "webhook/tp/external-transfer-funds"),
619
689
  method: "POST",
620
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
690
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
621
691
  contentType: "application/json",
622
692
  queryParameters: _queryParams,
623
693
  requestType: "json",
@@ -695,7 +765,7 @@ class TpApi {
695
765
  const _response = yield core.fetcher({
696
766
  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)}/withdraw-funds`),
697
767
  method: "POST",
698
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
768
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
699
769
  contentType: "application/json",
700
770
  requestType: "json",
701
771
  body: serializers.api.thera.tp.WithdrawalTheraCash.jsonOrThrow(request, {
@@ -760,7 +830,7 @@ class TpApi {
760
830
  const _response = yield core.fetcher({
761
831
  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)}/ach-transfers`),
762
832
  method: "GET",
763
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
833
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
764
834
  contentType: "application/json",
765
835
  queryParameters: _queryParams,
766
836
  requestType: "json",
@@ -814,7 +884,7 @@ class TpApi {
814
884
  const _response = yield core.fetcher({
815
885
  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)}/ach-transfers/${encodeURIComponent(achId)}`),
816
886
  method: "GET",
817
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
887
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
818
888
  contentType: "application/json",
819
889
  requestType: "json",
820
890
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -867,7 +937,7 @@ class TpApi {
867
937
  const _response = yield core.fetcher({
868
938
  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)}/ach-transfers/${encodeURIComponent(achId)}/retry`),
869
939
  method: "POST",
870
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
940
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
871
941
  contentType: "application/json",
872
942
  requestType: "json",
873
943
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -6,10 +6,18 @@ import * as TheraApi from "../../../../../../../../../../index";
6
6
  * @example
7
7
  * {
8
8
  * details: {
9
- * establishedOn: "2023-01-15",
10
- * incorporationState: "string",
11
- * legalStructure: "ccorp",
12
- * naics: "string",
9
+ * establishedOn: {
10
+ * "key": "value"
11
+ * },
12
+ * incorporationState: {
13
+ * "key": "value"
14
+ * },
15
+ * legalStructure: {
16
+ * "key": "value"
17
+ * },
18
+ * naics: {
19
+ * "key": "value"
20
+ * },
13
21
  * callerUserBeneficiaryInformation: {
14
22
  * dateOfBirth: "2023-01-15",
15
23
  * emailAddress: "string",
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * naics: "string",
9
+ * establishedOn: "2023-01-15",
10
+ * incorporationState: "string",
11
+ * legalStructure: "ccorp"
12
+ * }
13
+ */
14
+ export interface UpdateCompanyIncorporationInfoRequest {
15
+ /** NAICS sector code that accurately describes the industry the business operates in. */
16
+ naics: string;
17
+ /** Date the company was established. */
18
+ establishedOn: string;
19
+ /** State where the company is incorporated. */
20
+ incorporationState: string;
21
+ /** Legal structure of the company. */
22
+ legalStructure: TheraApi.db.CompanyLegalStructure;
23
+ }
@@ -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 });
@@ -1,3 +1,4 @@
1
+ export { type UpdateCompanyIncorporationInfoRequest } from "./UpdateCompanyIncorporationInfoRequest";
1
2
  export { type AddCompanyBankingDetailsRequest } from "./AddCompanyBankingDetailsRequest";
2
3
  export { type TpAccountRequest } from "./TpAccountRequest";
3
4
  export { type ExternalTransferFundRequest } from "./ExternalTransferFundRequest";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface UpdateCompanyIncorporationInfoResponse {
5
+ }
@@ -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 });
@@ -1,3 +1,4 @@
1
+ export * from "./UpdateCompanyIncorporationInfoResponse";
1
2
  export * from "./AddCompanyBankingDetailsResponse";
2
3
  export * from "./GetIndustryCodesResponse";
3
4
  export * from "./IndustryCodes";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./UpdateCompanyIncorporationInfoResponse"), exports);
17
18
  __exportStar(require("./AddCompanyBankingDetailsResponse"), exports);
18
19
  __exportStar(require("./GetIndustryCodesResponse"), exports);
19
20
  __exportStar(require("./IndustryCodes"), exports);
@@ -78,7 +78,7 @@ class UserApi {
78
78
  const _response = yield core.fetcher({
79
79
  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)), `company/${encodeURIComponent(companyId)}/user/${encodeURIComponent(userId)}`),
80
80
  method: "POST",
81
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  body: serializers.api.thera.user.SetUserComplianceSettingsRequest.jsonOrThrow(request, {
@@ -139,7 +139,7 @@ class UserApi {
139
139
  const _response = yield core.fetcher({
140
140
  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)), `company/${encodeURIComponent(companyId)}/user`),
141
141
  method: "GET",
142
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
142
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
143
143
  contentType: "application/json",
144
144
  queryParameters: _queryParams,
145
145
  requestType: "json",
@@ -197,7 +197,7 @@ class UserApi {
197
197
  const _response = yield core.fetcher({
198
198
  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)), "user"),
199
199
  method: "GET",
200
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
200
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
201
201
  contentType: "application/json",
202
202
  queryParameters: _queryParams,
203
203
  requestType: "json",
@@ -2,12 +2,20 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as TheraApi from "../../../../../index";
5
+ /**
6
+ * Banking details for a company. Company incorporation fields (establishedOn, incorporationState,
7
+ * legalStructure, naics) are optional and can be saved separately before beneficiary submission
8
+ * via the updateCompanyIncorporationInfo endpoint.
9
+ */
5
10
  export interface CompanyBankingDetails {
6
- establishedOn: string;
7
- incorporationState: string;
8
- legalStructure: TheraApi.db.CompanyLegalStructure;
9
- /** NAICS sector code that accurately describes the industry the business operates in. */
10
- naics: string;
11
+ /** Date the company was established. Optional - can be saved separately. */
12
+ establishedOn?: string;
13
+ /** State where the company is incorporated. Optional - can be saved separately. */
14
+ incorporationState?: string;
15
+ /** Legal structure of the company. Optional - can be saved separately. */
16
+ legalStructure?: TheraApi.db.CompanyLegalStructure;
17
+ /** NAICS sector code that accurately describes the industry the business operates in. Optional - can be saved separately. */
18
+ naics?: string;
11
19
  /**
12
20
  * Whoever is filling out the onboarding form must fill out beneficiary information even if they don't
13
21
  * own 25% or more of the company.
@@ -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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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" }),
@@ -113,7 +113,7 @@ class ExternalApi {
113
113
  const _response = yield core.fetcher({
114
114
  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"),
115
115
  method: "POST",
116
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
116
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
117
117
  contentType: "application/json",
118
118
  requestType: "json",
119
119
  body: serializers.api.external.ExternalCreateContractorRequestV2.jsonOrThrow(request, {
@@ -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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "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": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "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,
@@ -77,7 +77,7 @@ class AccountingApi {
77
77
  const _response = yield core.fetcher({
78
78
  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)}/accounting/settings`),
79
79
  method: "PUT",
80
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  body: serializers.api.thera.accounting.ModifyAccountingIntegrationSetting.jsonOrThrow(request, {
@@ -124,7 +124,7 @@ class AccountingApi {
124
124
  const _response = yield core.fetcher({
125
125
  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)}/accounting/info`),
126
126
  method: "GET",
127
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
127
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
128
128
  contentType: "application/json",
129
129
  requestType: "json",
130
130
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -174,7 +174,7 @@ class AccountingApi {
174
174
  const _response = yield core.fetcher({
175
175
  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)}/accounting/account-mapping`),
176
176
  method: "GET",
177
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
177
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
178
178
  contentType: "application/json",
179
179
  requestType: "json",
180
180
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -227,7 +227,7 @@ class AccountingApi {
227
227
  const _response = yield core.fetcher({
228
228
  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)}/accounting/authorize`),
229
229
  method: "POST",
230
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2720-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2720-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
230
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@thera-hr/api-sdk", "X-Fern-SDK-Version": "1.1.1-prerelease2737-dev-2", "User-Agent": "@thera-hr/api-sdk/1.1.1-prerelease2737-dev-2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  body: serializers.api.thera.accounting.CompleteAccountingIntegrationAuth.jsonOrThrow(request, {