@thera-hr/api-sdk 0.0.1503 → 0.0.1520

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 (269) hide show
  1. package/Client.d.ts +3 -3
  2. package/Client.js +4 -5
  3. package/api/resources/api/client/Client.d.ts +3 -3
  4. package/api/resources/api/client/Client.js +8 -9
  5. package/api/resources/api/resources/services/client/Client.d.ts +3 -3
  6. package/api/resources/api/resources/services/client/Client.js +4 -5
  7. package/api/resources/api/resources/services/resources/file/client/Client.d.ts +3 -3
  8. package/api/resources/api/resources/services/resources/file/client/Client.js +167 -149
  9. package/api/resources/api/resources/test/client/Client.d.ts +3 -3
  10. package/api/resources/api/resources/test/client/Client.js +4 -5
  11. package/api/resources/api/resources/test/resources/invoices/client/Client.d.ts +3 -3
  12. package/api/resources/api/resources/test/resources/invoices/client/Client.js +60 -48
  13. package/api/resources/api/resources/thera/client/Client.d.ts +3 -3
  14. package/api/resources/api/resources/thera/client/Client.js +10 -11
  15. package/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -3
  16. package/api/resources/api/resources/thera/resources/bank/client/Client.js +4 -5
  17. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +3 -3
  18. package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +168 -150
  19. package/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -3
  20. package/api/resources/api/resources/thera/resources/company/client/Client.js +6 -7
  21. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +4 -4
  22. package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +66 -49
  23. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +8 -0
  24. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  25. package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  26. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +3 -3
  27. package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +55 -43
  28. package/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -3
  29. package/api/resources/api/resources/thera/resources/disbursement/client/Client.js +4 -5
  30. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +3 -3
  31. package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +57 -45
  32. package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -3
  33. package/api/resources/api/resources/thera/resources/payroll/client/Client.js +4 -5
  34. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +3 -3
  35. package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +57 -45
  36. package/api/resources/db/resources/user/types/ComplianceDocumentType.d.ts +3 -1
  37. package/api/resources/db/resources/user/types/ComplianceDocumentType.js +2 -0
  38. package/api/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
  39. package/api/resources/db/resources/user/types/{FernUser.d.ts → User.d.ts} +1 -1
  40. package/api/resources/db/resources/user/types/index.d.ts +1 -2
  41. package/api/resources/db/resources/user/types/index.js +1 -2
  42. package/core/fetcher/Fetcher.d.ts +5 -4
  43. package/core/fetcher/Fetcher.js +82 -66
  44. package/core/fetcher/Supplier.js +11 -2
  45. package/core/fetcher/index.d.ts +3 -2
  46. package/core/index.d.ts +1 -1
  47. package/core/index.js +1 -1
  48. package/core/schemas/builders/date/date.js +1 -4
  49. package/core/schemas/builders/lazy/index.d.ts +2 -1
  50. package/core/schemas/builders/lazy/lazy.js +21 -13
  51. package/core/schemas/builders/lazy/lazyObject.js +11 -11
  52. package/core/schemas/builders/list/list.js +51 -41
  53. package/core/schemas/builders/object/index.d.ts +3 -2
  54. package/core/schemas/builders/object/object.js +148 -140
  55. package/core/schemas/builders/object-like/getObjectLikeUtils.js +17 -17
  56. package/core/schemas/builders/object-like/index.d.ts +1 -1
  57. package/core/schemas/builders/record/index.d.ts +1 -1
  58. package/core/schemas/builders/record/record.js +80 -75
  59. package/core/schemas/builders/schema-utils/JsonError.js +0 -1
  60. package/core/schemas/builders/schema-utils/ParseError.js +0 -1
  61. package/core/schemas/builders/schema-utils/getSchemaUtils.js +23 -20
  62. package/core/schemas/builders/schema-utils/index.d.ts +2 -1
  63. package/core/schemas/builders/set/set.js +18 -11
  64. package/core/schemas/builders/undiscriminated-union/index.d.ts +1 -1
  65. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +34 -26
  66. package/core/schemas/builders/union/index.d.ts +3 -2
  67. package/core/schemas/builders/union/union.js +93 -75
  68. package/core/schemas/index.d.ts +1 -1
  69. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -4
  70. package/core/schemas/utils/maybeSkipValidation.js +14 -9
  71. package/dist/Client.d.ts +3 -3
  72. package/dist/Client.js +4 -5
  73. package/dist/api/resources/api/client/Client.d.ts +3 -3
  74. package/dist/api/resources/api/client/Client.js +8 -9
  75. package/dist/api/resources/api/resources/services/client/Client.d.ts +3 -3
  76. package/dist/api/resources/api/resources/services/client/Client.js +4 -5
  77. package/dist/api/resources/api/resources/services/resources/file/client/Client.d.ts +3 -3
  78. package/dist/api/resources/api/resources/services/resources/file/client/Client.js +167 -149
  79. package/dist/api/resources/api/resources/test/client/Client.d.ts +3 -3
  80. package/dist/api/resources/api/resources/test/client/Client.js +4 -5
  81. package/dist/api/resources/api/resources/test/resources/invoices/client/Client.d.ts +3 -3
  82. package/dist/api/resources/api/resources/test/resources/invoices/client/Client.js +60 -48
  83. package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -3
  84. package/dist/api/resources/api/resources/thera/client/Client.js +10 -11
  85. package/dist/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -3
  86. package/dist/api/resources/api/resources/thera/resources/bank/client/Client.js +4 -5
  87. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +3 -3
  88. package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +168 -150
  89. package/dist/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -3
  90. package/dist/api/resources/api/resources/thera/resources/company/client/Client.js +6 -7
  91. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +4 -4
  92. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +66 -49
  93. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +8 -0
  94. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  95. package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  96. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +3 -3
  97. package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +55 -43
  98. package/dist/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -3
  99. package/dist/api/resources/api/resources/thera/resources/disbursement/client/Client.js +4 -5
  100. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +3 -3
  101. package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +57 -45
  102. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -3
  103. package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.js +4 -5
  104. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +3 -3
  105. package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +57 -45
  106. package/dist/api/resources/db/resources/user/types/ComplianceDocumentType.d.ts +3 -1
  107. package/dist/api/resources/db/resources/user/types/ComplianceDocumentType.js +2 -0
  108. package/dist/api/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
  109. package/dist/api/resources/db/resources/user/types/{FernUser.d.ts → User.d.ts} +1 -1
  110. package/dist/api/resources/db/resources/user/types/index.d.ts +1 -2
  111. package/dist/api/resources/db/resources/user/types/index.js +1 -2
  112. package/dist/core/fetcher/Fetcher.d.ts +5 -4
  113. package/dist/core/fetcher/Fetcher.js +82 -66
  114. package/dist/core/fetcher/Supplier.js +11 -2
  115. package/dist/core/fetcher/index.d.ts +3 -2
  116. package/dist/core/index.d.ts +1 -1
  117. package/dist/core/index.js +1 -1
  118. package/dist/core/schemas/builders/date/date.js +1 -4
  119. package/dist/core/schemas/builders/lazy/index.d.ts +2 -1
  120. package/dist/core/schemas/builders/lazy/lazy.js +21 -13
  121. package/dist/core/schemas/builders/lazy/lazyObject.js +11 -11
  122. package/dist/core/schemas/builders/list/list.js +51 -41
  123. package/dist/core/schemas/builders/object/index.d.ts +3 -2
  124. package/dist/core/schemas/builders/object/object.js +148 -140
  125. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +17 -17
  126. package/dist/core/schemas/builders/object-like/index.d.ts +1 -1
  127. package/dist/core/schemas/builders/record/index.d.ts +1 -1
  128. package/dist/core/schemas/builders/record/record.js +80 -75
  129. package/dist/core/schemas/builders/schema-utils/JsonError.js +0 -1
  130. package/dist/core/schemas/builders/schema-utils/ParseError.js +0 -1
  131. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +23 -20
  132. package/dist/core/schemas/builders/schema-utils/index.d.ts +2 -1
  133. package/dist/core/schemas/builders/set/set.js +18 -11
  134. package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +1 -1
  135. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +34 -26
  136. package/dist/core/schemas/builders/union/index.d.ts +3 -2
  137. package/dist/core/schemas/builders/union/union.js +93 -75
  138. package/dist/core/schemas/index.d.ts +1 -1
  139. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -4
  140. package/dist/core/schemas/utils/maybeSkipValidation.js +14 -9
  141. package/dist/errors/TheraApiError.js +14 -3
  142. package/dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.js +11 -2
  143. package/dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementRequest.js +10 -1
  144. package/dist/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentDetail.js +10 -1
  145. package/dist/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentRequest.js +10 -1
  146. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/AdditionalFields.js +10 -1
  147. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/Deduction.js +13 -4
  148. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployeeContribution.js +10 -1
  149. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployerContribution.js +10 -1
  150. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/Disbursement.js +10 -1
  151. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/EmployeeCheck.js +14 -5
  152. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/reportingPeriod/types/ReportingPeriod.js +10 -1
  153. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/shift/types/Shift.js +12 -3
  154. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeduction.js +10 -1
  155. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeductionDetails.js +11 -2
  156. package/dist/serialization/resources/api/resources/request/resources/zeal/resources/employee/resources/employee/types/ZealEmployee.js +10 -1
  157. package/dist/serialization/resources/api/resources/test/resources/invoices/types/DemoFernInvoice.js +11 -2
  158. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.js +10 -1
  159. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateEmployment.js +15 -6
  160. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateMilestoneDetails.js +10 -1
  161. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorRequest.js +11 -2
  162. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +13 -0
  163. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js +43 -0
  164. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  165. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  166. package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollRequest.js +11 -2
  167. package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/types/InvoiceWebhookEvent.js +10 -1
  168. package/dist/serialization/resources/api/resources/zeal/resources/company/resources/create/types/ZealCreateCompanyResponse.js +10 -1
  169. package/dist/serialization/resources/db/resources/document/types/FernDocument.js +11 -2
  170. package/dist/serialization/resources/db/resources/document/types/FernRecipient.js +10 -1
  171. package/dist/serialization/resources/db/resources/employment/types/Earning.js +10 -1
  172. package/dist/serialization/resources/db/resources/employment/types/Employment.js +19 -10
  173. package/dist/serialization/resources/db/resources/employment/types/EmploymentDocuments.js +10 -1
  174. package/dist/serialization/resources/db/resources/employment/types/EmploymentW2PayrollDetails.js +10 -1
  175. package/dist/serialization/resources/db/resources/employment/types/EorDetails.js +10 -1
  176. package/dist/serialization/resources/db/resources/employment/types/Frequency.js +10 -1
  177. package/dist/serialization/resources/db/resources/employment/types/Milestone.js +10 -1
  178. package/dist/serialization/resources/db/resources/employment/types/MilestoneDetails.js +10 -1
  179. package/dist/serialization/resources/db/resources/employment/types/ModifyRecurrencesRequest.js +10 -1
  180. package/dist/serialization/resources/db/resources/employment/types/Recurrence.js +11 -2
  181. package/dist/serialization/resources/db/resources/employment/types/RecurrenceDetails.js +11 -2
  182. package/dist/serialization/resources/db/resources/employment/types/RecurrenceModifications.js +11 -2
  183. package/dist/serialization/resources/db/resources/payment/resources/invoice/types/FernInvoice.js +11 -2
  184. package/dist/serialization/resources/db/resources/user/types/ComplianceDocument.js +10 -1
  185. package/dist/serialization/resources/db/resources/user/types/ComplianceDocumentType.d.ts +1 -1
  186. package/dist/serialization/resources/db/resources/user/types/ComplianceDocumentType.js +10 -1
  187. package/dist/serialization/resources/db/resources/user/types/ComplianceInformation.js +10 -1
  188. package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
  189. package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.js +13 -3
  190. package/{serialization/resources/db/resources/user/types/FernUser.d.ts → dist/serialization/resources/db/resources/user/types/User.d.ts} +2 -2
  191. package/dist/serialization/resources/db/resources/user/types/{FernUser.js → User.js} +12 -3
  192. package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -2
  193. package/dist/serialization/resources/db/resources/user/types/index.js +1 -2
  194. package/dist/serialization/resources/model/resources/thera/resources/employment/types/BiWeeklyPayCycleEnd.js +10 -1
  195. package/dist/serialization/resources/model/resources/thera/resources/employment/types/MonthlyPayCycleEnd.js +11 -2
  196. package/dist/serialization/resources/model/resources/thera/resources/employment/types/PayCycle.js +10 -1
  197. package/dist/serialization/resources/model/resources/thera/resources/employment/types/PayCycleEnd.js +13 -4
  198. package/dist/serialization/resources/model/resources/thera/resources/employment/types/SemiMonthlyPayCycleEnd.js +10 -1
  199. package/dist/serialization/resources/model/resources/thera/resources/employment/types/WeeklyPayCycleEnd.js +10 -1
  200. package/errors/TheraApiError.js +14 -3
  201. package/package.json +3 -3
  202. package/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.js +11 -2
  203. package/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementRequest.js +10 -1
  204. package/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentDetail.js +10 -1
  205. package/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentRequest.js +10 -1
  206. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/AdditionalFields.js +10 -1
  207. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/Deduction.js +13 -4
  208. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployeeContribution.js +10 -1
  209. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployerContribution.js +10 -1
  210. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/Disbursement.js +10 -1
  211. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/EmployeeCheck.js +14 -5
  212. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/reportingPeriod/types/ReportingPeriod.js +10 -1
  213. package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/shift/types/Shift.js +12 -3
  214. package/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeduction.js +10 -1
  215. package/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeductionDetails.js +11 -2
  216. package/serialization/resources/api/resources/request/resources/zeal/resources/employee/resources/employee/types/ZealEmployee.js +10 -1
  217. package/serialization/resources/api/resources/test/resources/invoices/types/DemoFernInvoice.js +11 -2
  218. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.js +10 -1
  219. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateEmployment.js +15 -6
  220. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateMilestoneDetails.js +10 -1
  221. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorRequest.js +11 -2
  222. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +13 -0
  223. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js +43 -0
  224. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
  225. package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
  226. package/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollRequest.js +11 -2
  227. package/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/types/InvoiceWebhookEvent.js +10 -1
  228. package/serialization/resources/api/resources/zeal/resources/company/resources/create/types/ZealCreateCompanyResponse.js +10 -1
  229. package/serialization/resources/db/resources/document/types/FernDocument.js +11 -2
  230. package/serialization/resources/db/resources/document/types/FernRecipient.js +10 -1
  231. package/serialization/resources/db/resources/employment/types/Earning.js +10 -1
  232. package/serialization/resources/db/resources/employment/types/Employment.js +19 -10
  233. package/serialization/resources/db/resources/employment/types/EmploymentDocuments.js +10 -1
  234. package/serialization/resources/db/resources/employment/types/EmploymentW2PayrollDetails.js +10 -1
  235. package/serialization/resources/db/resources/employment/types/EorDetails.js +10 -1
  236. package/serialization/resources/db/resources/employment/types/Frequency.js +10 -1
  237. package/serialization/resources/db/resources/employment/types/Milestone.js +10 -1
  238. package/serialization/resources/db/resources/employment/types/MilestoneDetails.js +10 -1
  239. package/serialization/resources/db/resources/employment/types/ModifyRecurrencesRequest.js +10 -1
  240. package/serialization/resources/db/resources/employment/types/Recurrence.js +11 -2
  241. package/serialization/resources/db/resources/employment/types/RecurrenceDetails.js +11 -2
  242. package/serialization/resources/db/resources/employment/types/RecurrenceModifications.js +11 -2
  243. package/serialization/resources/db/resources/payment/resources/invoice/types/FernInvoice.js +11 -2
  244. package/serialization/resources/db/resources/user/types/ComplianceDocument.js +10 -1
  245. package/serialization/resources/db/resources/user/types/ComplianceDocumentType.d.ts +1 -1
  246. package/serialization/resources/db/resources/user/types/ComplianceDocumentType.js +10 -1
  247. package/serialization/resources/db/resources/user/types/ComplianceInformation.js +10 -1
  248. package/serialization/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
  249. package/serialization/resources/db/resources/user/types/EmployeeInformation.js +13 -3
  250. package/{dist/serialization/resources/db/resources/user/types/FernUser.d.ts → serialization/resources/db/resources/user/types/User.d.ts} +2 -2
  251. package/serialization/resources/db/resources/user/types/{FernUser.js → User.js} +12 -3
  252. package/serialization/resources/db/resources/user/types/index.d.ts +1 -2
  253. package/serialization/resources/db/resources/user/types/index.js +1 -2
  254. package/serialization/resources/model/resources/thera/resources/employment/types/BiWeeklyPayCycleEnd.js +10 -1
  255. package/serialization/resources/model/resources/thera/resources/employment/types/MonthlyPayCycleEnd.js +11 -2
  256. package/serialization/resources/model/resources/thera/resources/employment/types/PayCycle.js +10 -1
  257. package/serialization/resources/model/resources/thera/resources/employment/types/PayCycleEnd.js +13 -4
  258. package/serialization/resources/model/resources/thera/resources/employment/types/SemiMonthlyPayCycleEnd.js +10 -1
  259. package/serialization/resources/model/resources/thera/resources/employment/types/WeeklyPayCycleEnd.js +10 -1
  260. package/api/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -11
  261. package/dist/api/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -11
  262. package/dist/serialization/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -17
  263. package/dist/serialization/resources/db/resources/user/types/EmployeeInformationAddress.js +0 -38
  264. package/serialization/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -17
  265. package/serialization/resources/db/resources/user/types/EmployeeInformationAddress.js +0 -38
  266. /package/api/resources/{db/resources/user/types/EmployeeInformationAddress.js → api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js} +0 -0
  267. /package/api/resources/db/resources/user/types/{FernUser.js → User.js} +0 -0
  268. /package/dist/api/resources/{db/resources/user/types/EmployeeInformationAddress.js → api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js} +0 -0
  269. /package/dist/api/resources/db/resources/user/types/{FernUser.js → User.js} +0 -0
@@ -5,16 +5,16 @@ import * as core from "../../../../../../../../../../core";
5
5
  import * as TheraApi from "../../../../../../../../..";
6
6
  export declare namespace CompanyApi {
7
7
  interface Options {
8
- environment: string;
8
+ environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
11
  }
12
12
  export declare class CompanyApi {
13
- protected readonly options: CompanyApi.Options;
14
- constructor(options: CompanyApi.Options);
13
+ protected readonly _options: CompanyApi.Options;
14
+ constructor(_options: CompanyApi.Options);
15
15
  /**
16
16
  * Invite Contractor or Create Contract
17
17
  */
18
- inviteContractor(request: TheraApi.api.thera.company.InviteContractorReq): Promise<unknown>;
18
+ inviteContractor(request: TheraApi.api.thera.company.InviteContractorReq): Promise<TheraApi.api.thera.company.InviteContractorResponse>;
19
19
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
20
  }
@@ -25,6 +25,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  __setModuleDefault(result, mod);
26
26
  return result;
27
27
  };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
28
37
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
38
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
39
  };
@@ -36,64 +45,72 @@ const serializers = __importStar(require("../../../../../../../../../../serializ
36
45
  const url_join_1 = __importDefault(require("url-join"));
37
46
  const errors = __importStar(require("../../../../../../../../../../errors"));
38
47
  class CompanyApi {
39
- options;
40
- constructor(options) {
41
- this.options = options;
48
+ constructor(_options) {
49
+ this._options = _options;
42
50
  }
43
51
  /**
44
52
  * Invite Contractor or Create Contract
45
53
  */
46
- async inviteContractor(request) {
47
- const { skipEmail, body: _body } = request;
48
- const _queryParams = new url_search_params_1.default();
49
- if (skipEmail != null) {
50
- _queryParams.append("skipEmail", skipEmail.toString());
51
- }
52
- const _response = await core.fetcher({
53
- url: (0, url_join_1.default)(this.options.environment, "companies/employees"),
54
- method: "POST",
55
- headers: {
56
- Authorization: await this._getAuthorizationHeader(),
57
- "X-Fern-Language": "JavaScript",
58
- "X-Fern-SDK-Name": "@thera-hr/api-sdk",
59
- "X-Fern-SDK-Version": "0.0.1503",
60
- },
61
- contentType: "application/json",
62
- queryParameters: _queryParams,
63
- body: await serializers.api.thera.company.InviteContractorRequest.jsonOrThrow(_body, {
64
- unrecognizedObjectKeys: "strip",
65
- }),
66
- timeoutMs: 60000,
67
- });
68
- if (_response.ok) {
69
- return _response.body;
70
- }
71
- if (_response.error.reason === "status-code") {
72
- throw new errors.TheraApiError({
73
- statusCode: _response.error.statusCode,
74
- body: _response.error.body,
54
+ inviteContractor(request) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const { skipEmail, body: _body } = request;
57
+ const _queryParams = new url_search_params_1.default();
58
+ if (skipEmail != null) {
59
+ _queryParams.append("skipEmail", skipEmail.toString());
60
+ }
61
+ const _response = yield core.fetcher({
62
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "companies/employees"),
63
+ method: "POST",
64
+ headers: {
65
+ Authorization: yield this._getAuthorizationHeader(),
66
+ "X-Fern-Language": "JavaScript",
67
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
68
+ "X-Fern-SDK-Version": "0.0.1520",
69
+ },
70
+ contentType: "application/json",
71
+ queryParameters: _queryParams,
72
+ body: yield serializers.api.thera.company.InviteContractorRequest.jsonOrThrow(_body, {
73
+ unrecognizedObjectKeys: "strip",
74
+ }),
75
+ timeoutMs: 60000,
75
76
  });
76
- }
77
- switch (_response.error.reason) {
78
- case "non-json":
79
- throw new errors.TheraApiError({
80
- statusCode: _response.error.statusCode,
81
- body: _response.error.rawBody,
77
+ if (_response.ok) {
78
+ return yield serializers.api.thera.company.InviteContractorResponse.parseOrThrow(_response.body, {
79
+ unrecognizedObjectKeys: "passthrough",
80
+ allowUnrecognizedUnionMembers: true,
81
+ allowUnrecognizedEnumValues: true,
82
+ breadcrumbsPrefix: ["response"],
82
83
  });
83
- case "timeout":
84
- throw new errors.TheraApiTimeoutError();
85
- case "unknown":
84
+ }
85
+ if (_response.error.reason === "status-code") {
86
86
  throw new errors.TheraApiError({
87
- message: _response.error.errorMessage,
87
+ statusCode: _response.error.statusCode,
88
+ body: _response.error.body,
88
89
  });
89
- }
90
+ }
91
+ switch (_response.error.reason) {
92
+ case "non-json":
93
+ throw new errors.TheraApiError({
94
+ statusCode: _response.error.statusCode,
95
+ body: _response.error.rawBody,
96
+ });
97
+ case "timeout":
98
+ throw new errors.TheraApiTimeoutError();
99
+ case "unknown":
100
+ throw new errors.TheraApiError({
101
+ message: _response.error.errorMessage,
102
+ });
103
+ }
104
+ });
90
105
  }
91
- async _getAuthorizationHeader() {
92
- const bearer = await core.Supplier.get(this.options.token);
93
- if (bearer != null) {
94
- return `Bearer ${bearer}`;
95
- }
96
- return undefined;
106
+ _getAuthorizationHeader() {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ const bearer = yield core.Supplier.get(this._options.token);
109
+ if (bearer != null) {
110
+ return `Bearer ${bearer}`;
111
+ }
112
+ return undefined;
113
+ });
97
114
  }
98
115
  }
99
116
  exports.CompanyApi = CompanyApi;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as TheraApi from "../../../../../../../../..";
5
+ export interface InviteContractorResponse {
6
+ user: TheraApi.db.User;
7
+ employment: TheraApi.db.Employment;
8
+ }
@@ -4,4 +4,5 @@ export * from "./CreateEmployeeInformation";
4
4
  export * from "./CreateEmployment";
5
5
  export * from "./CreateMilestoneDetails";
6
6
  export * from "./CreateMilestone";
7
+ export * from "./InviteContractorResponse";
7
8
  export * from "./CompanyPayFrequency";
@@ -20,4 +20,5 @@ __exportStar(require("./CreateEmployeeInformation"), exports);
20
20
  __exportStar(require("./CreateEmployment"), exports);
21
21
  __exportStar(require("./CreateMilestoneDetails"), exports);
22
22
  __exportStar(require("./CreateMilestone"), exports);
23
+ __exportStar(require("./InviteContractorResponse"), exports);
23
24
  __exportStar(require("./CompanyPayFrequency"), exports);
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../../../core";
5
5
  import * as TheraApi from "../../../../../../../../..";
6
6
  export declare namespace CompanyW2PayrollApi {
7
7
  interface Options {
8
- environment: string;
8
+ environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
11
  }
12
12
  export declare class CompanyW2PayrollApi {
13
- protected readonly options: CompanyW2PayrollApi.Options;
14
- constructor(options: CompanyW2PayrollApi.Options);
13
+ protected readonly _options: CompanyW2PayrollApi.Options;
14
+ constructor(_options: CompanyW2PayrollApi.Options);
15
15
  /**
16
16
  *
17
17
  */
@@ -25,6 +25,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  __setModuleDefault(result, mod);
26
26
  return result;
27
27
  };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
28
37
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
38
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
39
  };
@@ -35,58 +44,61 @@ const serializers = __importStar(require("../../../../../../../../../../serializ
35
44
  const url_join_1 = __importDefault(require("url-join"));
36
45
  const errors = __importStar(require("../../../../../../../../../../errors"));
37
46
  class CompanyW2PayrollApi {
38
- options;
39
- constructor(options) {
40
- this.options = options;
47
+ constructor(_options) {
48
+ this._options = _options;
41
49
  }
42
50
  /**
43
51
  *
44
52
  */
45
- async onboardW2Payroll(request) {
46
- const _response = await core.fetcher({
47
- url: (0, url_join_1.default)(this.options.environment, "company/w2Payroll"),
48
- method: "POST",
49
- headers: {
50
- Authorization: await this._getAuthorizationHeader(),
51
- "X-Fern-Language": "JavaScript",
52
- "X-Fern-SDK-Name": "@thera-hr/api-sdk",
53
- "X-Fern-SDK-Version": "0.0.1503",
54
- },
55
- contentType: "application/json",
56
- body: await serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
57
- unrecognizedObjectKeys: "strip",
58
- }),
59
- timeoutMs: 60000,
60
- });
61
- if (_response.ok) {
62
- return;
63
- }
64
- if (_response.error.reason === "status-code") {
65
- throw new errors.TheraApiError({
66
- statusCode: _response.error.statusCode,
67
- body: _response.error.body,
53
+ onboardW2Payroll(request) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const _response = yield core.fetcher({
56
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "company/w2Payroll"),
57
+ method: "POST",
58
+ headers: {
59
+ Authorization: yield this._getAuthorizationHeader(),
60
+ "X-Fern-Language": "JavaScript",
61
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
62
+ "X-Fern-SDK-Version": "0.0.1520",
63
+ },
64
+ contentType: "application/json",
65
+ body: yield serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
66
+ unrecognizedObjectKeys: "strip",
67
+ }),
68
+ timeoutMs: 60000,
68
69
  });
69
- }
70
- switch (_response.error.reason) {
71
- case "non-json":
70
+ if (_response.ok) {
71
+ return;
72
+ }
73
+ if (_response.error.reason === "status-code") {
72
74
  throw new errors.TheraApiError({
73
75
  statusCode: _response.error.statusCode,
74
- body: _response.error.rawBody,
75
- });
76
- case "timeout":
77
- throw new errors.TheraApiTimeoutError();
78
- case "unknown":
79
- throw new errors.TheraApiError({
80
- message: _response.error.errorMessage,
76
+ body: _response.error.body,
81
77
  });
82
- }
78
+ }
79
+ switch (_response.error.reason) {
80
+ case "non-json":
81
+ throw new errors.TheraApiError({
82
+ statusCode: _response.error.statusCode,
83
+ body: _response.error.rawBody,
84
+ });
85
+ case "timeout":
86
+ throw new errors.TheraApiTimeoutError();
87
+ case "unknown":
88
+ throw new errors.TheraApiError({
89
+ message: _response.error.errorMessage,
90
+ });
91
+ }
92
+ });
83
93
  }
84
- async _getAuthorizationHeader() {
85
- const bearer = await core.Supplier.get(this.options.token);
86
- if (bearer != null) {
87
- return `Bearer ${bearer}`;
88
- }
89
- return undefined;
94
+ _getAuthorizationHeader() {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ const bearer = yield core.Supplier.get(this._options.token);
97
+ if (bearer != null) {
98
+ return `Bearer ${bearer}`;
99
+ }
100
+ return undefined;
101
+ });
90
102
  }
91
103
  }
92
104
  exports.CompanyW2PayrollApi = CompanyW2PayrollApi;
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../core";
5
5
  import { DisbursementWebhookApi } from "../resources/disbursementWebhookApi/client/Client";
6
6
  export declare namespace Disbursement {
7
7
  interface Options {
8
- environment: string;
8
+ environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
11
  }
12
12
  export declare class Disbursement {
13
- protected readonly options: Disbursement.Options;
14
- constructor(options: Disbursement.Options);
13
+ protected readonly _options: Disbursement.Options;
14
+ constructor(_options: Disbursement.Options);
15
15
  protected _disbursementWebhookApi: DisbursementWebhookApi | undefined;
16
16
  get disbursementWebhookApi(): DisbursementWebhookApi;
17
17
  }
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Disbursement = void 0;
7
7
  const Client_1 = require("../resources/disbursementWebhookApi/client/Client");
8
8
  class Disbursement {
9
- options;
10
- constructor(options) {
11
- this.options = options;
9
+ constructor(_options) {
10
+ this._options = _options;
12
11
  }
13
- _disbursementWebhookApi;
14
12
  get disbursementWebhookApi() {
15
- return (this._disbursementWebhookApi ??= new Client_1.DisbursementWebhookApi(this.options));
13
+ var _a;
14
+ return ((_a = this._disbursementWebhookApi) !== null && _a !== void 0 ? _a : (this._disbursementWebhookApi = new Client_1.DisbursementWebhookApi(this._options)));
16
15
  }
17
16
  }
18
17
  exports.Disbursement = Disbursement;
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../../../core";
5
5
  import * as TheraApi from "../../../../../../../../..";
6
6
  export declare namespace DisbursementWebhookApi {
7
7
  interface Options {
8
- environment: string;
8
+ environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
11
  }
12
12
  export declare class DisbursementWebhookApi {
13
- protected readonly options: DisbursementWebhookApi.Options;
14
- constructor(options: DisbursementWebhookApi.Options);
13
+ protected readonly _options: DisbursementWebhookApi.Options;
14
+ constructor(_options: DisbursementWebhookApi.Options);
15
15
  /**
16
16
  * IN DEVELOPMENT
17
17
  */
@@ -25,6 +25,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  __setModuleDefault(result, mod);
26
26
  return result;
27
27
  };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
28
37
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
38
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
39
  };
@@ -35,60 +44,63 @@ const serializers = __importStar(require("../../../../../../../../../../serializ
35
44
  const url_join_1 = __importDefault(require("url-join"));
36
45
  const errors = __importStar(require("../../../../../../../../../../errors"));
37
46
  class DisbursementWebhookApi {
38
- options;
39
- constructor(options) {
40
- this.options = options;
47
+ constructor(_options) {
48
+ this._options = _options;
41
49
  }
42
50
  /**
43
51
  * IN DEVELOPMENT
44
52
  */
45
- async invoiceWebhook(request) {
46
- const { theraWebhookSignatureHeader, body: _body } = request;
47
- const _response = await core.fetcher({
48
- url: (0, url_join_1.default)(this.options.environment, "webhook/disbursement/invoice"),
49
- method: "POST",
50
- headers: {
51
- Authorization: await this._getAuthorizationHeader(),
52
- "X-Fern-Language": "JavaScript",
53
- "X-Fern-SDK-Name": "@thera-hr/api-sdk",
54
- "X-Fern-SDK-Version": "0.0.1503",
55
- "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
56
- },
57
- contentType: "application/json",
58
- body: await serializers.api.thera.disbursement.InvoiceWebhookEvent.jsonOrThrow(_body, {
59
- unrecognizedObjectKeys: "strip",
60
- }),
61
- timeoutMs: 60000,
62
- });
63
- if (_response.ok) {
64
- return;
65
- }
66
- if (_response.error.reason === "status-code") {
67
- throw new errors.TheraApiError({
68
- statusCode: _response.error.statusCode,
69
- body: _response.error.body,
53
+ invoiceWebhook(request) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const { theraWebhookSignatureHeader, body: _body } = request;
56
+ const _response = yield core.fetcher({
57
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "webhook/disbursement/invoice"),
58
+ method: "POST",
59
+ headers: {
60
+ Authorization: yield this._getAuthorizationHeader(),
61
+ "X-Fern-Language": "JavaScript",
62
+ "X-Fern-SDK-Name": "@thera-hr/api-sdk",
63
+ "X-Fern-SDK-Version": "0.0.1520",
64
+ "Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
65
+ },
66
+ contentType: "application/json",
67
+ body: yield serializers.api.thera.disbursement.InvoiceWebhookEvent.jsonOrThrow(_body, {
68
+ unrecognizedObjectKeys: "strip",
69
+ }),
70
+ timeoutMs: 60000,
70
71
  });
71
- }
72
- switch (_response.error.reason) {
73
- case "non-json":
72
+ if (_response.ok) {
73
+ return;
74
+ }
75
+ if (_response.error.reason === "status-code") {
74
76
  throw new errors.TheraApiError({
75
77
  statusCode: _response.error.statusCode,
76
- body: _response.error.rawBody,
77
- });
78
- case "timeout":
79
- throw new errors.TheraApiTimeoutError();
80
- case "unknown":
81
- throw new errors.TheraApiError({
82
- message: _response.error.errorMessage,
78
+ body: _response.error.body,
83
79
  });
84
- }
80
+ }
81
+ switch (_response.error.reason) {
82
+ case "non-json":
83
+ throw new errors.TheraApiError({
84
+ statusCode: _response.error.statusCode,
85
+ body: _response.error.rawBody,
86
+ });
87
+ case "timeout":
88
+ throw new errors.TheraApiTimeoutError();
89
+ case "unknown":
90
+ throw new errors.TheraApiError({
91
+ message: _response.error.errorMessage,
92
+ });
93
+ }
94
+ });
85
95
  }
86
- async _getAuthorizationHeader() {
87
- const bearer = await core.Supplier.get(this.options.token);
88
- if (bearer != null) {
89
- return `Bearer ${bearer}`;
90
- }
91
- return undefined;
96
+ _getAuthorizationHeader() {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ const bearer = yield core.Supplier.get(this._options.token);
99
+ if (bearer != null) {
100
+ return `Bearer ${bearer}`;
101
+ }
102
+ return undefined;
103
+ });
92
104
  }
93
105
  }
94
106
  exports.DisbursementWebhookApi = DisbursementWebhookApi;
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../core";
5
5
  import { OncycleApi } from "../resources/oncycleApi/client/Client";
6
6
  export declare namespace Payroll {
7
7
  interface Options {
8
- environment: string;
8
+ environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
11
  }
12
12
  export declare class Payroll {
13
- protected readonly options: Payroll.Options;
14
- constructor(options: Payroll.Options);
13
+ protected readonly _options: Payroll.Options;
14
+ constructor(_options: Payroll.Options);
15
15
  protected _oncycleApi: OncycleApi | undefined;
16
16
  get oncycleApi(): OncycleApi;
17
17
  }
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Payroll = void 0;
7
7
  const Client_1 = require("../resources/oncycleApi/client/Client");
8
8
  class Payroll {
9
- options;
10
- constructor(options) {
11
- this.options = options;
9
+ constructor(_options) {
10
+ this._options = _options;
12
11
  }
13
- _oncycleApi;
14
12
  get oncycleApi() {
15
- return (this._oncycleApi ??= new Client_1.OncycleApi(this.options));
13
+ var _a;
14
+ return ((_a = this._oncycleApi) !== null && _a !== void 0 ? _a : (this._oncycleApi = new Client_1.OncycleApi(this._options)));
16
15
  }
17
16
  }
18
17
  exports.Payroll = Payroll;
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../../../core";
5
5
  import * as TheraApi from "../../../../../../../../..";
6
6
  export declare namespace OncycleApi {
7
7
  interface Options {
8
- environment: string;
8
+ environment: core.Supplier<string>;
9
9
  token?: core.Supplier<core.BearerToken | undefined>;
10
10
  }
11
11
  }
12
12
  export declare class OncycleApi {
13
- protected readonly options: OncycleApi.Options;
14
- constructor(options: OncycleApi.Options);
13
+ protected readonly _options: OncycleApi.Options;
14
+ constructor(_options: OncycleApi.Options);
15
15
  /**
16
16
  *
17
17
  */