@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
@@ -8,10 +8,13 @@ export declare namespace EmailApi {
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 EmailApi {
13
16
  protected readonly _options: EmailApi.Options;
14
17
  constructor(_options: EmailApi.Options);
15
- sendLoginEmail(request: TheraApi.api.thera.email.SendLoginEmailRequest): Promise<void>;
18
+ sendLoginEmail(request: TheraApi.api.thera.email.SendLoginEmailRequest, requestOptions?: EmailApi.RequestOptions): Promise<void>;
16
19
  protected _getAuthorizationHeader(): Promise<string | undefined>;
17
20
  }
@@ -47,7 +47,7 @@ class EmailApi {
47
47
  constructor(_options) {
48
48
  this._options = _options;
49
49
  }
50
- sendLoginEmail(request) {
50
+ sendLoginEmail(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), "email/login"),
@@ -56,13 +56,13 @@ class EmailApi {
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.email.SendLoginEmailRequest.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;
@@ -8,6 +8,9 @@ export declare namespace Employment {
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 Employment {
13
16
  protected readonly _options: Employment.Options;
@@ -8,6 +8,9 @@ export declare namespace EmploymentApi {
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 EmploymentApi {
13
16
  protected readonly _options: EmploymentApi.Options;
@@ -15,14 +18,14 @@ export declare class EmploymentApi {
15
18
  /**
16
19
  * Get estimate for this contract (cycle date, list of cycles, etc) based on provided paycycle
17
20
  */
18
- estimateContract(request: TheraApi.api.thera.employment.CreateContractEstimateRequest): Promise<TheraApi.api.thera.employment.CreateContractEstimateResponse>;
21
+ estimateContract(request: TheraApi.api.thera.employment.CreateContractEstimateRequest, requestOptions?: EmploymentApi.RequestOptions): Promise<TheraApi.api.thera.employment.CreateContractEstimateResponse>;
19
22
  /**
20
23
  * DEPRECATED. Get Current Cycle for this contract
21
24
  */
22
- getCurrentPayCycle(contractId: string): Promise<TheraApi.api.thera.employment.GetPayCycleResponse>;
25
+ getCurrentPayCycle(contractId: string, requestOptions?: EmploymentApi.RequestOptions): Promise<TheraApi.api.thera.employment.GetPayCycleResponse>;
23
26
  /**
24
27
  * Get Cycle for this contract given a date
25
28
  */
26
- getPayCycle(contractId: string, baseDate: string): Promise<TheraApi.api.thera.employment.GetPayCycleResponse>;
29
+ getPayCycle(contractId: string, baseDate: string, requestOptions?: EmploymentApi.RequestOptions): Promise<TheraApi.api.thera.employment.GetPayCycleResponse>;
27
30
  protected _getAuthorizationHeader(): Promise<string | undefined>;
28
31
  }
@@ -50,7 +50,7 @@ class EmploymentApi {
50
50
  /**
51
51
  * Get estimate for this contract (cycle date, list of cycles, etc) based on provided paycycle
52
52
  */
53
- estimateContract(request) {
53
+ estimateContract(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), "contracts/estimate"),
@@ -59,13 +59,13 @@ class EmploymentApi {
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.employment.CreateContractEstimateRequest.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 yield serializers.api.thera.employment.CreateContractEstimateResponse.parseOrThrow(_response.body, {
@@ -100,7 +100,7 @@ class EmploymentApi {
100
100
  /**
101
101
  * DEPRECATED. Get Current Cycle for this contract
102
102
  */
103
- getCurrentPayCycle(contractId) {
103
+ getCurrentPayCycle(contractId, requestOptions) {
104
104
  return __awaiter(this, void 0, void 0, function* () {
105
105
  const _response = yield core.fetcher({
106
106
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `contracts/${contractId}/payCycle`),
@@ -109,10 +109,10 @@ class EmploymentApi {
109
109
  Authorization: yield this._getAuthorizationHeader(),
110
110
  "X-Fern-Language": "JavaScript",
111
111
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
112
- "X-Fern-SDK-Version": "0.0.3283728",
112
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
113
113
  },
114
114
  contentType: "application/json",
115
- timeoutMs: 60000,
115
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
116
116
  });
117
117
  if (_response.ok) {
118
118
  return yield serializers.api.thera.employment.GetPayCycleResponse.parseOrThrow(_response.body, {
@@ -147,7 +147,7 @@ class EmploymentApi {
147
147
  /**
148
148
  * Get Cycle for this contract given a date
149
149
  */
150
- getPayCycle(contractId, baseDate) {
150
+ getPayCycle(contractId, baseDate, requestOptions) {
151
151
  return __awaiter(this, void 0, void 0, function* () {
152
152
  const _response = yield core.fetcher({
153
153
  url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `contracts/${contractId}/payCycle/${baseDate}`),
@@ -156,10 +156,10 @@ class EmploymentApi {
156
156
  Authorization: yield this._getAuthorizationHeader(),
157
157
  "X-Fern-Language": "JavaScript",
158
158
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
159
- "X-Fern-SDK-Version": "0.0.3283728",
159
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
160
160
  },
161
161
  contentType: "application/json",
162
- timeoutMs: 60000,
162
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
163
163
  });
164
164
  if (_response.ok) {
165
165
  return yield serializers.api.thera.employment.GetPayCycleResponse.parseOrThrow(_response.body, {
@@ -8,6 +8,9 @@ export declare namespace Misc {
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 Misc {
13
16
  protected readonly _options: Misc.Options;
@@ -8,6 +8,9 @@ export declare namespace Misc {
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 Misc {
13
16
  protected readonly _options: Misc.Options;
@@ -16,6 +19,6 @@ export declare class Misc {
16
19
  * Calling this API will trigger automatic payouts for all workers that have auto-withdrawals turned on. This cron may be re-used for other daily tasks in the future
17
20
  *
18
21
  */
19
- regularCron(request: TheraApi.api.thera.misc.DailyCronRequest): Promise<TheraApi.api.thera.misc.DailyCronResponse>;
22
+ regularCron(request: TheraApi.api.thera.misc.DailyCronRequest, requestOptions?: Misc.RequestOptions): Promise<TheraApi.api.thera.misc.DailyCronResponse>;
20
23
  protected _getAuthorizationHeader(): Promise<string | undefined>;
21
24
  }
@@ -51,7 +51,7 @@ class Misc {
51
51
  * Calling this API will trigger automatic payouts for all workers that have auto-withdrawals turned on. This cron may be re-used for other daily tasks in the future
52
52
  *
53
53
  */
54
- regularCron(request) {
54
+ regularCron(request, requestOptions) {
55
55
  return __awaiter(this, void 0, void 0, function* () {
56
56
  const { theraWebhookSignatureHeader } = request;
57
57
  const _response = yield core.fetcher({
@@ -61,11 +61,11 @@ class Misc {
61
61
  Authorization: yield this._getAuthorizationHeader(),
62
62
  "X-Fern-Language": "JavaScript",
63
63
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
64
- "X-Fern-SDK-Version": "0.0.3283728",
64
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
65
65
  "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
66
66
  },
67
67
  contentType: "application/json",
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 yield serializers.api.thera.misc.DailyCronResponse.parseOrThrow(_response.body, {
@@ -8,6 +8,9 @@ export declare namespace Payroll {
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 Payroll {
13
16
  protected readonly _options: Payroll.Options;
@@ -8,6 +8,9 @@ export declare namespace OncycleApi {
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 OncycleApi {
13
16
  protected readonly _options: OncycleApi.Options;
@@ -15,6 +18,6 @@ export declare class OncycleApi {
15
18
  /**
16
19
  *
17
20
  */
18
- approveOncycleChecks(companyId: string): Promise<TheraApi.api.thera.payroll.ApproveOnCycleChecksResponse>;
21
+ approveOncycleChecks(companyId: string, requestOptions?: OncycleApi.RequestOptions): Promise<TheraApi.api.thera.payroll.ApproveOnCycleChecksResponse>;
19
22
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
23
  }
@@ -50,7 +50,7 @@ class OncycleApi {
50
50
  /**
51
51
  *
52
52
  */
53
- approveOncycleChecks(companyId) {
53
+ approveOncycleChecks(companyId, 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), `companies/${companyId}/w2-payroll/on-cycle-checks/approve`),
@@ -59,10 +59,10 @@ class OncycleApi {
59
59
  Authorization: yield this._getAuthorizationHeader(),
60
60
  "X-Fern-Language": "JavaScript",
61
61
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
62
- "X-Fern-SDK-Version": "0.0.3283728",
62
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
63
63
  },
64
64
  contentType: "application/json",
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 yield serializers.api.thera.payroll.ApproveOnCycleChecksResponse.parseOrThrow(_response.body, {
@@ -8,6 +8,9 @@ export declare namespace User {
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 User {
13
16
  protected readonly _options: User.Options;
@@ -8,6 +8,9 @@ export declare namespace UserApi {
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 UserApi {
13
16
  protected readonly _options: UserApi.Options;
@@ -15,6 +18,6 @@ export declare class UserApi {
15
18
  /**
16
19
  * Get User API
17
20
  */
18
- getUser(request: TheraApi.api.thera.user.GetUserRequest): Promise<TheraApi.db.User>;
21
+ getUser(request: TheraApi.api.thera.user.GetUserRequest, requestOptions?: UserApi.RequestOptions): Promise<TheraApi.db.User>;
19
22
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
23
  }
@@ -51,7 +51,7 @@ class UserApi {
51
51
  /**
52
52
  * Get User API
53
53
  */
54
- getUser(request) {
54
+ getUser(request, requestOptions) {
55
55
  return __awaiter(this, void 0, void 0, function* () {
56
56
  const { userId } = request;
57
57
  const _queryParams = new url_search_params_1.default();
@@ -63,11 +63,11 @@ class UserApi {
63
63
  Authorization: yield this._getAuthorizationHeader(),
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
66
- "X-Fern-SDK-Version": "0.0.3283728",
66
+ "X-Fern-SDK-Version": "1.1.1-THERA-2281-deployment-improvement.4",
67
67
  },
68
68
  contentType: "application/json",
69
69
  queryParameters: _queryParams,
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.db.User.parseOrThrow(_response.body, {
@@ -4,5 +4,6 @@
4
4
  import * as TheraApi from "../../../../..";
5
5
  export interface AiPriseVerificationResult {
6
6
  status: TheraApi.db.AiPriseVerificationStatus;
7
- sessionId: string;
7
+ /** If not present, then verification was uploaded manually and not completed through AiPrise. */
8
+ sessionId?: string;
8
9
  }
@@ -11,4 +11,5 @@ export interface BankTransfer {
11
11
  details: Record<string, string>;
12
12
  wiseRecipientAccountId?: number;
13
13
  accountType: TheraApi.db.WithdrawalMethodAccountType;
14
+ poweredBy?: TheraApi.db.PoweredBy;
14
15
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type PoweredBy = "dlocal" | "wise";
5
+ export declare const PoweredBy: {
6
+ readonly Dlocal: "dlocal";
7
+ readonly Wise: "wise";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PoweredBy = void 0;
7
+ exports.PoweredBy = {
8
+ Dlocal: "dlocal",
9
+ Wise: "wise",
10
+ };
@@ -11,6 +11,7 @@ export * from "./AiPriseVerificationStatus";
11
11
  export * from "./UserCompanySettings";
12
12
  export * from "./WithdrawalMethod";
13
13
  export * from "./BankTransfer";
14
+ export * from "./PoweredBy";
14
15
  export * from "./BankAddress";
15
16
  export * from "./WithdrawalMethodAccountType";
16
17
  export * from "./User";
@@ -27,6 +27,7 @@ __exportStar(require("./AiPriseVerificationStatus"), exports);
27
27
  __exportStar(require("./UserCompanySettings"), exports);
28
28
  __exportStar(require("./WithdrawalMethod"), exports);
29
29
  __exportStar(require("./BankTransfer"), exports);
30
+ __exportStar(require("./PoweredBy"), exports);
30
31
  __exportStar(require("./BankAddress"), exports);
31
32
  __exportStar(require("./WithdrawalMethodAccountType"), exports);
32
33
  __exportStar(require("./User"), exports);
@@ -1,5 +1,5 @@
1
1
  import { default as URLSearchParams } from "@ungap/url-search-params";
2
- import { AxiosAdapter, AxiosProgressEvent } from "axios";
2
+ import { AxiosAdapter } from "axios";
3
3
  import { APIResponse } from "./APIResponse";
4
4
  export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
5
5
  export declare namespace Fetcher {
@@ -14,7 +14,7 @@ export declare namespace Fetcher {
14
14
  withCredentials?: boolean;
15
15
  responseType?: "json" | "blob";
16
16
  adapter?: AxiosAdapter;
17
- onUploadProgress?: (event: AxiosProgressEvent) => void;
17
+ onUploadProgress?: (event: ProgressEvent) => void;
18
18
  }
19
19
  type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
20
20
  interface FailedStatusCodeError {
package/core/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * as serialization from "./schemas";
2
1
  export * from "./fetcher";
3
2
  export * from "./auth";
3
+ export * as serialization from "./schemas";
package/core/index.js CHANGED
@@ -15,6 +15,9 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
18
21
  var __importStar = (this && this.__importStar) || function (mod) {
19
22
  if (mod && mod.__esModule) return mod;
20
23
  var result = {};
@@ -22,11 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
25
  __setModuleDefault(result, mod);
23
26
  return result;
24
27
  };
25
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
- };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.serialization = void 0;
30
- exports.serialization = __importStar(require("./schemas"));
31
30
  __exportStar(require("./fetcher"), exports);
32
31
  __exportStar(require("./auth"), exports);
32
+ exports.serialization = __importStar(require("./schemas"));
@@ -16,26 +16,26 @@ const schema_utils_1 = require("../schema-utils");
16
16
  function undiscriminatedUnion(schemas) {
17
17
  const baseSchema = {
18
18
  parse: (raw, opts) => __awaiter(this, void 0, void 0, function* () {
19
- return validateAndTransformUndiscriminatedUnion((schema) => schema.parse(raw, opts), schemas);
19
+ return validateAndTransformUndiscriminatedUnion((schema, opts) => schema.parse(raw, opts), schemas, opts);
20
20
  }),
21
21
  json: (parsed, opts) => __awaiter(this, void 0, void 0, function* () {
22
- return validateAndTransformUndiscriminatedUnion((schema) => schema.json(parsed, opts), schemas);
22
+ return validateAndTransformUndiscriminatedUnion((schema, opts) => schema.json(parsed, opts), schemas, opts);
23
23
  }),
24
24
  getType: () => Schema_1.SchemaType.UNDISCRIMINATED_UNION,
25
25
  };
26
26
  return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
27
27
  }
28
28
  exports.undiscriminatedUnion = undiscriminatedUnion;
29
- function validateAndTransformUndiscriminatedUnion(transform, schemas) {
29
+ function validateAndTransformUndiscriminatedUnion(transform, schemas, opts) {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  const errors = [];
32
32
  for (const [index, schema] of schemas.entries()) {
33
- const transformed = yield transform(schema);
33
+ const transformed = yield transform(schema, Object.assign(Object.assign({}, opts), { skipValidation: false }));
34
34
  if (transformed.ok) {
35
35
  return transformed;
36
36
  }
37
37
  else {
38
- for (const error of errors) {
38
+ for (const error of transformed.errors) {
39
39
  errors.push({
40
40
  path: error.path,
41
41
  message: `[Variant ${index}] ${error.message}`,
package/dist/Client.d.ts CHANGED
@@ -8,6 +8,9 @@ export declare namespace TheraApiClient {
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 TheraApiClient {
13
16
  protected readonly _options: TheraApiClient.Options;
@@ -10,6 +10,9 @@ export declare namespace Api {
10
10
  environment: core.Supplier<string>;
11
11
  token?: core.Supplier<core.BearerToken | undefined>;
12
12
  }
13
+ interface RequestOptions {
14
+ timeoutInSeconds?: number;
15
+ }
13
16
  }
14
17
  export declare class Api {
15
18
  protected readonly _options: Api.Options;
@@ -8,6 +8,9 @@ export declare namespace Aiprise {
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 Aiprise {
13
16
  protected readonly _options: Aiprise.Options;
@@ -8,6 +8,9 @@ export declare namespace AipriseWebhookApi {
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 AipriseWebhookApi {
13
16
  protected readonly _options: AipriseWebhookApi.Options;
@@ -15,6 +18,6 @@ export declare class AipriseWebhookApi {
15
18
  /**
16
19
  * Not to be used by FE. AiPrise calls this API automatically.
17
20
  */
18
- verify(request: TheraApi.api.aiprise.AiPriseVerificationCallback): Promise<void>;
21
+ verify(request: TheraApi.api.aiprise.AiPriseVerificationCallback, requestOptions?: AipriseWebhookApi.RequestOptions): Promise<void>;
19
22
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
23
  }
@@ -50,7 +50,7 @@ class AipriseWebhookApi {
50
50
  /**
51
51
  * Not to be used by FE. AiPrise calls this API automatically.
52
52
  */
53
- verify(request) {
53
+ verify(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), "/aiprise/webhook/verification/callback"),
@@ -59,13 +59,13 @@ class AipriseWebhookApi {
59
59
  Authorization: yield this._getAuthorizationHeader(),
60
60
  "X-Fern-Language": "JavaScript",
61
61
  "X-Fern-SDK-Name": "@thera-hr/api-sdk",
62
- "X-Fern-SDK-Version": "0.0.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.aiprise.AiPriseVerificationCallback.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 Services {
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 Services {
13
16
  protected readonly _options: Services.Options;
@@ -8,13 +8,16 @@ export declare namespace File_ {
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 File_ {
13
16
  protected readonly _options: File_.Options;
14
17
  constructor(_options: File_.Options);
15
- attachDocumentToEmployment(contractId: string, request: TheraApi.api.services.AttachDocumentToEmploymentRequest): Promise<void>;
16
- deleteDocumentFromEmployment(contractId: string, s3Key: string, request: TheraApi.api.services.DeleteDocumentFromEmploymentRequest): Promise<void>;
17
- loadGenericDocumentFromEmployment(contractId: string, s3Key: string): Promise<TheraApi.api.services.LoadGenericDocumentFromEmploymentResponse>;
18
- loadPayslipFromEorEmployment(contractId: string, s3Key: string): Promise<TheraApi.api.services.LoadPayslipForEorEmployeeResponse>;
18
+ attachDocumentToEmployment(contractId: string, request: TheraApi.api.services.AttachDocumentToEmploymentRequest, requestOptions?: File_.RequestOptions): Promise<void>;
19
+ deleteDocumentFromEmployment(contractId: string, s3Key: string, request: TheraApi.api.services.DeleteDocumentFromEmploymentRequest, requestOptions?: File_.RequestOptions): Promise<void>;
20
+ loadGenericDocumentFromEmployment(contractId: string, s3Key: string, requestOptions?: File_.RequestOptions): Promise<TheraApi.api.services.LoadGenericDocumentFromEmploymentResponse>;
21
+ loadPayslipFromEorEmployment(contractId: string, s3Key: string, requestOptions?: File_.RequestOptions): Promise<TheraApi.api.services.LoadPayslipForEorEmployeeResponse>;
19
22
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
23
  }