saferx-pharma-sdk 0.0.6

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 (413) hide show
  1. package/dist/cjs/BaseClient.d.ts +43 -0
  2. package/dist/cjs/BaseClient.js +63 -0
  3. package/dist/cjs/Client.d.ts +14 -0
  4. package/dist/cjs/Client.js +16 -0
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +6 -0
  6. package/dist/cjs/api/errors/BadRequestError.js +54 -0
  7. package/dist/cjs/api/errors/ForbiddenError.d.ts +6 -0
  8. package/dist/cjs/api/errors/ForbiddenError.js +54 -0
  9. package/dist/cjs/api/errors/InternalServerError.d.ts +6 -0
  10. package/dist/cjs/api/errors/InternalServerError.js +54 -0
  11. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +6 -0
  12. package/dist/cjs/api/errors/TooManyRequestsError.js +54 -0
  13. package/dist/cjs/api/errors/UnauthorizedError.d.ts +6 -0
  14. package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
  15. package/dist/cjs/api/errors/index.d.ts +5 -0
  16. package/dist/cjs/api/errors/index.js +21 -0
  17. package/dist/cjs/api/index.d.ts +3 -0
  18. package/dist/cjs/api/index.js +19 -0
  19. package/dist/cjs/api/resources/drugSafety/client/Client.d.ts +99 -0
  20. package/dist/cjs/api/resources/drugSafety/client/Client.js +278 -0
  21. package/dist/cjs/api/resources/drugSafety/client/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/drugSafety/client/index.js +17 -0
  23. package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.ts +69 -0
  24. package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.js +15 -0
  25. package/dist/cjs/api/resources/drugSafety/client/requests/GetMetadataDrugSafetyRequest.d.ts +9 -0
  26. package/dist/cjs/api/resources/drugSafety/client/requests/GetMetadataDrugSafetyRequest.js +3 -0
  27. package/dist/cjs/api/resources/drugSafety/client/requests/index.d.ts +2 -0
  28. package/dist/cjs/api/resources/drugSafety/client/requests/index.js +5 -0
  29. package/dist/cjs/api/resources/drugSafety/index.d.ts +2 -0
  30. package/dist/cjs/api/resources/drugSafety/index.js +18 -0
  31. package/dist/cjs/api/resources/drugSafety/types/CheckDrugSafetyRequestXSafeRxSandbox.d.ts +4 -0
  32. package/dist/cjs/api/resources/drugSafety/types/CheckDrugSafetyRequestXSafeRxSandbox.js +7 -0
  33. package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.ts +26 -0
  34. package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.js +22 -0
  35. package/dist/cjs/api/resources/drugSafety/types/GetMetadataDrugSafetyRequestXSafeRxSandbox.d.ts +4 -0
  36. package/dist/cjs/api/resources/drugSafety/types/GetMetadataDrugSafetyRequestXSafeRxSandbox.js +7 -0
  37. package/dist/cjs/api/resources/drugSafety/types/index.d.ts +3 -0
  38. package/dist/cjs/api/resources/drugSafety/types/index.js +19 -0
  39. package/dist/cjs/api/resources/index.d.ts +3 -0
  40. package/dist/cjs/api/resources/index.js +42 -0
  41. package/dist/cjs/api/types/AdverseEffect.d.ts +43 -0
  42. package/dist/cjs/api/types/AdverseEffect.js +3 -0
  43. package/dist/cjs/api/types/Alert.d.ts +62 -0
  44. package/dist/cjs/api/types/Alert.js +37 -0
  45. package/dist/cjs/api/types/BlackBoxWarning.d.ts +15 -0
  46. package/dist/cjs/api/types/BlackBoxWarning.js +3 -0
  47. package/dist/cjs/api/types/BlockedResponse.d.ts +9 -0
  48. package/dist/cjs/api/types/BlockedResponse.js +3 -0
  49. package/dist/cjs/api/types/ClinicalAlert.d.ts +48 -0
  50. package/dist/cjs/api/types/ClinicalAlert.js +3 -0
  51. package/dist/cjs/api/types/ClinicalConcern.d.ts +15 -0
  52. package/dist/cjs/api/types/ClinicalConcern.js +3 -0
  53. package/dist/cjs/api/types/ClinicalData.d.ts +14 -0
  54. package/dist/cjs/api/types/ClinicalData.js +3 -0
  55. package/dist/cjs/api/types/Condition.d.ts +22 -0
  56. package/dist/cjs/api/types/Condition.js +25 -0
  57. package/dist/cjs/api/types/DailyLimit.d.ts +11 -0
  58. package/dist/cjs/api/types/DailyLimit.js +3 -0
  59. package/dist/cjs/api/types/DomainCode.d.ts +18 -0
  60. package/dist/cjs/api/types/DomainCode.js +21 -0
  61. package/dist/cjs/api/types/DoseClassification.d.ts +40 -0
  62. package/dist/cjs/api/types/DoseClassification.js +22 -0
  63. package/dist/cjs/api/types/DosingData.d.ts +14 -0
  64. package/dist/cjs/api/types/DosingData.js +3 -0
  65. package/dist/cjs/api/types/DrugClinicalData.d.ts +7 -0
  66. package/dist/cjs/api/types/DrugClinicalData.js +3 -0
  67. package/dist/cjs/api/types/DrugSafetyCheckResponse.d.ts +28 -0
  68. package/dist/cjs/api/types/DrugSafetyCheckResponse.js +11 -0
  69. package/dist/cjs/api/types/ErrorResponse.d.ts +16 -0
  70. package/dist/cjs/api/types/ErrorResponse.js +3 -0
  71. package/dist/cjs/api/types/FoodConflict.d.ts +13 -0
  72. package/dist/cjs/api/types/FoodConflict.js +3 -0
  73. package/dist/cjs/api/types/FoodData.d.ts +11 -0
  74. package/dist/cjs/api/types/FoodData.js +3 -0
  75. package/dist/cjs/api/types/Interaction.d.ts +36 -0
  76. package/dist/cjs/api/types/Interaction.js +14 -0
  77. package/dist/cjs/api/types/InteractionSummary.d.ts +13 -0
  78. package/dist/cjs/api/types/InteractionSummary.js +3 -0
  79. package/dist/cjs/api/types/InteractionsData.d.ts +11 -0
  80. package/dist/cjs/api/types/InteractionsData.js +3 -0
  81. package/dist/cjs/api/types/MealTiming.d.ts +26 -0
  82. package/dist/cjs/api/types/MealTiming.js +3 -0
  83. package/dist/cjs/api/types/Meta.d.ts +27 -0
  84. package/dist/cjs/api/types/Meta.js +13 -0
  85. package/dist/cjs/api/types/MetadataResponse.d.ts +79 -0
  86. package/dist/cjs/api/types/MetadataResponse.js +16 -0
  87. package/dist/cjs/api/types/Monitoring.d.ts +22 -0
  88. package/dist/cjs/api/types/Monitoring.js +3 -0
  89. package/dist/cjs/api/types/PatientProfile.d.ts +12 -0
  90. package/dist/cjs/api/types/PatientProfile.js +3 -0
  91. package/dist/cjs/api/types/Population.d.ts +16 -0
  92. package/dist/cjs/api/types/Population.js +19 -0
  93. package/dist/cjs/api/types/PopulationMonitoring.d.ts +26 -0
  94. package/dist/cjs/api/types/PopulationMonitoring.js +3 -0
  95. package/dist/cjs/api/types/RateLimitResponse.d.ts +26 -0
  96. package/dist/cjs/api/types/RateLimitResponse.js +12 -0
  97. package/dist/cjs/api/types/ReproductiveSafetyData.d.ts +30 -0
  98. package/dist/cjs/api/types/ReproductiveSafetyData.js +3 -0
  99. package/dist/cjs/api/types/ReproductiveWarning.d.ts +11 -0
  100. package/dist/cjs/api/types/ReproductiveWarning.js +3 -0
  101. package/dist/cjs/api/types/ResolvedDrug.d.ts +29 -0
  102. package/dist/cjs/api/types/ResolvedDrug.js +3 -0
  103. package/dist/cjs/api/types/SafetyData.d.ts +22 -0
  104. package/dist/cjs/api/types/SafetyData.js +3 -0
  105. package/dist/cjs/api/types/SideEffectsData.d.ts +38 -0
  106. package/dist/cjs/api/types/SideEffectsData.js +18 -0
  107. package/dist/cjs/api/types/index.d.ts +33 -0
  108. package/dist/cjs/api/types/index.js +49 -0
  109. package/dist/cjs/auth/HeaderAuthProvider.d.ts +20 -0
  110. package/dist/cjs/auth/HeaderAuthProvider.js +80 -0
  111. package/dist/cjs/auth/index.d.ts +1 -0
  112. package/dist/cjs/auth/index.js +5 -0
  113. package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
  114. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  115. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  116. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  117. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  118. package/dist/cjs/core/auth/BasicAuth.js +27 -0
  119. package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
  120. package/dist/cjs/core/auth/BearerToken.js +16 -0
  121. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  122. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  123. package/dist/cjs/core/auth/index.d.ts +5 -0
  124. package/dist/cjs/core/auth/index.js +9 -0
  125. package/dist/cjs/core/base64.d.ts +2 -0
  126. package/dist/cjs/core/base64.js +26 -0
  127. package/dist/cjs/core/exports.d.ts +1 -0
  128. package/dist/cjs/core/exports.js +17 -0
  129. package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
  130. package/dist/cjs/core/fetcher/APIResponse.js +2 -0
  131. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
  132. package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
  133. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
  134. package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
  135. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
  136. package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
  137. package/dist/cjs/core/fetcher/Fetcher.d.ts +48 -0
  138. package/dist/cjs/core/fetcher/Fetcher.js +322 -0
  139. package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
  140. package/dist/cjs/core/fetcher/Headers.js +84 -0
  141. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
  142. package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
  143. package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
  144. package/dist/cjs/core/fetcher/RawResponse.js +44 -0
  145. package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
  146. package/dist/cjs/core/fetcher/Supplier.js +22 -0
  147. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
  148. package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
  149. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
  150. package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
  151. package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
  152. package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
  153. package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
  154. package/dist/cjs/core/fetcher/getHeader.js +11 -0
  155. package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
  156. package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
  157. package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
  158. package/dist/cjs/core/fetcher/getResponseBody.js +69 -0
  159. package/dist/cjs/core/fetcher/index.d.ts +11 -0
  160. package/dist/cjs/core/fetcher/index.js +17 -0
  161. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
  162. package/dist/cjs/core/fetcher/makeRequest.js +40 -0
  163. package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
  164. package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
  165. package/dist/cjs/core/fetcher/signals.d.ts +5 -0
  166. package/dist/cjs/core/fetcher/signals.js +24 -0
  167. package/dist/cjs/core/headers.d.ts +2 -0
  168. package/dist/cjs/core/headers.js +31 -0
  169. package/dist/cjs/core/index.d.ts +6 -0
  170. package/dist/cjs/core/index.js +45 -0
  171. package/dist/cjs/core/json.d.ts +15 -0
  172. package/dist/cjs/core/json.js +24 -0
  173. package/dist/cjs/core/logging/exports.d.ts +18 -0
  174. package/dist/cjs/core/logging/exports.js +45 -0
  175. package/dist/cjs/core/logging/index.d.ts +1 -0
  176. package/dist/cjs/core/logging/index.js +17 -0
  177. package/dist/cjs/core/logging/logger.d.ts +126 -0
  178. package/dist/cjs/core/logging/logger.js +144 -0
  179. package/dist/cjs/core/runtime/index.d.ts +1 -0
  180. package/dist/cjs/core/runtime/index.js +5 -0
  181. package/dist/cjs/core/runtime/runtime.d.ts +9 -0
  182. package/dist/cjs/core/runtime/runtime.js +103 -0
  183. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  184. package/dist/cjs/core/url/encodePathParam.js +21 -0
  185. package/dist/cjs/core/url/index.d.ts +3 -0
  186. package/dist/cjs/core/url/index.js +9 -0
  187. package/dist/cjs/core/url/join.d.ts +1 -0
  188. package/dist/cjs/core/url/join.js +68 -0
  189. package/dist/cjs/core/url/qs.d.ts +6 -0
  190. package/dist/cjs/core/url/qs.js +64 -0
  191. package/dist/cjs/environments.d.ts +5 -0
  192. package/dist/cjs/environments.js +8 -0
  193. package/dist/cjs/errors/SafeRxError.d.ts +12 -0
  194. package/dist/cjs/errors/SafeRxError.js +32 -0
  195. package/dist/cjs/errors/SafeRxTimeoutError.d.ts +3 -0
  196. package/dist/cjs/errors/SafeRxTimeoutError.js +15 -0
  197. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  198. package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
  199. package/dist/cjs/errors/index.d.ts +2 -0
  200. package/dist/cjs/errors/index.js +7 -0
  201. package/dist/cjs/exports.d.ts +1 -0
  202. package/dist/cjs/exports.js +17 -0
  203. package/dist/cjs/index.d.ts +6 -0
  204. package/dist/cjs/index.js +48 -0
  205. package/dist/cjs/version.d.ts +1 -0
  206. package/dist/cjs/version.js +4 -0
  207. package/dist/esm/BaseClient.d.mts +43 -0
  208. package/dist/esm/BaseClient.mjs +26 -0
  209. package/dist/esm/Client.d.mts +14 -0
  210. package/dist/esm/Client.mjs +12 -0
  211. package/dist/esm/api/errors/BadRequestError.d.mts +6 -0
  212. package/dist/esm/api/errors/BadRequestError.mjs +17 -0
  213. package/dist/esm/api/errors/ForbiddenError.d.mts +6 -0
  214. package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
  215. package/dist/esm/api/errors/InternalServerError.d.mts +6 -0
  216. package/dist/esm/api/errors/InternalServerError.mjs +17 -0
  217. package/dist/esm/api/errors/TooManyRequestsError.d.mts +6 -0
  218. package/dist/esm/api/errors/TooManyRequestsError.mjs +17 -0
  219. package/dist/esm/api/errors/UnauthorizedError.d.mts +6 -0
  220. package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
  221. package/dist/esm/api/errors/index.d.mts +5 -0
  222. package/dist/esm/api/errors/index.mjs +5 -0
  223. package/dist/esm/api/index.d.mts +3 -0
  224. package/dist/esm/api/index.mjs +3 -0
  225. package/dist/esm/api/resources/drugSafety/client/Client.d.mts +99 -0
  226. package/dist/esm/api/resources/drugSafety/client/Client.mjs +241 -0
  227. package/dist/esm/api/resources/drugSafety/client/index.d.mts +1 -0
  228. package/dist/esm/api/resources/drugSafety/client/index.mjs +1 -0
  229. package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.mts +69 -0
  230. package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.mjs +12 -0
  231. package/dist/esm/api/resources/drugSafety/client/requests/GetMetadataDrugSafetyRequest.d.mts +9 -0
  232. package/dist/esm/api/resources/drugSafety/client/requests/GetMetadataDrugSafetyRequest.mjs +2 -0
  233. package/dist/esm/api/resources/drugSafety/client/requests/index.d.mts +2 -0
  234. package/dist/esm/api/resources/drugSafety/client/requests/index.mjs +1 -0
  235. package/dist/esm/api/resources/drugSafety/index.d.mts +2 -0
  236. package/dist/esm/api/resources/drugSafety/index.mjs +2 -0
  237. package/dist/esm/api/resources/drugSafety/types/CheckDrugSafetyRequestXSafeRxSandbox.d.mts +4 -0
  238. package/dist/esm/api/resources/drugSafety/types/CheckDrugSafetyRequestXSafeRxSandbox.mjs +4 -0
  239. package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.mts +26 -0
  240. package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.mjs +19 -0
  241. package/dist/esm/api/resources/drugSafety/types/GetMetadataDrugSafetyRequestXSafeRxSandbox.d.mts +4 -0
  242. package/dist/esm/api/resources/drugSafety/types/GetMetadataDrugSafetyRequestXSafeRxSandbox.mjs +4 -0
  243. package/dist/esm/api/resources/drugSafety/types/index.d.mts +3 -0
  244. package/dist/esm/api/resources/drugSafety/types/index.mjs +3 -0
  245. package/dist/esm/api/resources/index.d.mts +3 -0
  246. package/dist/esm/api/resources/index.mjs +3 -0
  247. package/dist/esm/api/types/AdverseEffect.d.mts +43 -0
  248. package/dist/esm/api/types/AdverseEffect.mjs +2 -0
  249. package/dist/esm/api/types/Alert.d.mts +62 -0
  250. package/dist/esm/api/types/Alert.mjs +34 -0
  251. package/dist/esm/api/types/BlackBoxWarning.d.mts +15 -0
  252. package/dist/esm/api/types/BlackBoxWarning.mjs +2 -0
  253. package/dist/esm/api/types/BlockedResponse.d.mts +9 -0
  254. package/dist/esm/api/types/BlockedResponse.mjs +2 -0
  255. package/dist/esm/api/types/ClinicalAlert.d.mts +48 -0
  256. package/dist/esm/api/types/ClinicalAlert.mjs +2 -0
  257. package/dist/esm/api/types/ClinicalConcern.d.mts +15 -0
  258. package/dist/esm/api/types/ClinicalConcern.mjs +2 -0
  259. package/dist/esm/api/types/ClinicalData.d.mts +14 -0
  260. package/dist/esm/api/types/ClinicalData.mjs +2 -0
  261. package/dist/esm/api/types/Condition.d.mts +22 -0
  262. package/dist/esm/api/types/Condition.mjs +22 -0
  263. package/dist/esm/api/types/DailyLimit.d.mts +11 -0
  264. package/dist/esm/api/types/DailyLimit.mjs +2 -0
  265. package/dist/esm/api/types/DomainCode.d.mts +18 -0
  266. package/dist/esm/api/types/DomainCode.mjs +18 -0
  267. package/dist/esm/api/types/DoseClassification.d.mts +40 -0
  268. package/dist/esm/api/types/DoseClassification.mjs +19 -0
  269. package/dist/esm/api/types/DosingData.d.mts +14 -0
  270. package/dist/esm/api/types/DosingData.mjs +2 -0
  271. package/dist/esm/api/types/DrugClinicalData.d.mts +7 -0
  272. package/dist/esm/api/types/DrugClinicalData.mjs +2 -0
  273. package/dist/esm/api/types/DrugSafetyCheckResponse.d.mts +28 -0
  274. package/dist/esm/api/types/DrugSafetyCheckResponse.mjs +8 -0
  275. package/dist/esm/api/types/ErrorResponse.d.mts +16 -0
  276. package/dist/esm/api/types/ErrorResponse.mjs +2 -0
  277. package/dist/esm/api/types/FoodConflict.d.mts +13 -0
  278. package/dist/esm/api/types/FoodConflict.mjs +2 -0
  279. package/dist/esm/api/types/FoodData.d.mts +11 -0
  280. package/dist/esm/api/types/FoodData.mjs +2 -0
  281. package/dist/esm/api/types/Interaction.d.mts +36 -0
  282. package/dist/esm/api/types/Interaction.mjs +11 -0
  283. package/dist/esm/api/types/InteractionSummary.d.mts +13 -0
  284. package/dist/esm/api/types/InteractionSummary.mjs +2 -0
  285. package/dist/esm/api/types/InteractionsData.d.mts +11 -0
  286. package/dist/esm/api/types/InteractionsData.mjs +2 -0
  287. package/dist/esm/api/types/MealTiming.d.mts +26 -0
  288. package/dist/esm/api/types/MealTiming.mjs +2 -0
  289. package/dist/esm/api/types/Meta.d.mts +27 -0
  290. package/dist/esm/api/types/Meta.mjs +10 -0
  291. package/dist/esm/api/types/MetadataResponse.d.mts +79 -0
  292. package/dist/esm/api/types/MetadataResponse.mjs +13 -0
  293. package/dist/esm/api/types/Monitoring.d.mts +22 -0
  294. package/dist/esm/api/types/Monitoring.mjs +2 -0
  295. package/dist/esm/api/types/PatientProfile.d.mts +12 -0
  296. package/dist/esm/api/types/PatientProfile.mjs +2 -0
  297. package/dist/esm/api/types/Population.d.mts +16 -0
  298. package/dist/esm/api/types/Population.mjs +16 -0
  299. package/dist/esm/api/types/PopulationMonitoring.d.mts +26 -0
  300. package/dist/esm/api/types/PopulationMonitoring.mjs +2 -0
  301. package/dist/esm/api/types/RateLimitResponse.d.mts +26 -0
  302. package/dist/esm/api/types/RateLimitResponse.mjs +9 -0
  303. package/dist/esm/api/types/ReproductiveSafetyData.d.mts +30 -0
  304. package/dist/esm/api/types/ReproductiveSafetyData.mjs +2 -0
  305. package/dist/esm/api/types/ReproductiveWarning.d.mts +11 -0
  306. package/dist/esm/api/types/ReproductiveWarning.mjs +2 -0
  307. package/dist/esm/api/types/ResolvedDrug.d.mts +29 -0
  308. package/dist/esm/api/types/ResolvedDrug.mjs +2 -0
  309. package/dist/esm/api/types/SafetyData.d.mts +22 -0
  310. package/dist/esm/api/types/SafetyData.mjs +2 -0
  311. package/dist/esm/api/types/SideEffectsData.d.mts +38 -0
  312. package/dist/esm/api/types/SideEffectsData.mjs +15 -0
  313. package/dist/esm/api/types/index.d.mts +33 -0
  314. package/dist/esm/api/types/index.mjs +33 -0
  315. package/dist/esm/auth/HeaderAuthProvider.d.mts +20 -0
  316. package/dist/esm/auth/HeaderAuthProvider.mjs +43 -0
  317. package/dist/esm/auth/index.d.mts +1 -0
  318. package/dist/esm/auth/index.mjs +1 -0
  319. package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
  320. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  321. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  322. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  323. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  324. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  325. package/dist/esm/core/auth/BearerToken.d.mts +7 -0
  326. package/dist/esm/core/auth/BearerToken.mjs +13 -0
  327. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  328. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  329. package/dist/esm/core/auth/index.d.mts +5 -0
  330. package/dist/esm/core/auth/index.mjs +3 -0
  331. package/dist/esm/core/base64.d.mts +2 -0
  332. package/dist/esm/core/base64.mjs +22 -0
  333. package/dist/esm/core/exports.d.mts +1 -0
  334. package/dist/esm/core/exports.mjs +1 -0
  335. package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
  336. package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
  337. package/dist/esm/core/fetcher/BinaryResponse.d.mts +19 -0
  338. package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
  339. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
  340. package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
  341. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
  342. package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
  343. package/dist/esm/core/fetcher/Fetcher.d.mts +48 -0
  344. package/dist/esm/core/fetcher/Fetcher.mjs +318 -0
  345. package/dist/esm/core/fetcher/Headers.d.mts +2 -0
  346. package/dist/esm/core/fetcher/Headers.mjs +82 -0
  347. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
  348. package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
  349. package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
  350. package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
  351. package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
  352. package/dist/esm/core/fetcher/Supplier.mjs +19 -0
  353. package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
  354. package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
  355. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
  356. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
  357. package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
  358. package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
  359. package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
  360. package/dist/esm/core/fetcher/getHeader.mjs +8 -0
  361. package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
  362. package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
  363. package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
  364. package/dist/esm/core/fetcher/getResponseBody.mjs +66 -0
  365. package/dist/esm/core/fetcher/index.d.mts +11 -0
  366. package/dist/esm/core/fetcher/index.mjs +6 -0
  367. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
  368. package/dist/esm/core/fetcher/makeRequest.mjs +36 -0
  369. package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
  370. package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
  371. package/dist/esm/core/fetcher/signals.d.mts +5 -0
  372. package/dist/esm/core/fetcher/signals.mjs +20 -0
  373. package/dist/esm/core/headers.d.mts +2 -0
  374. package/dist/esm/core/headers.mjs +27 -0
  375. package/dist/esm/core/index.d.mts +6 -0
  376. package/dist/esm/core/index.mjs +6 -0
  377. package/dist/esm/core/json.d.mts +15 -0
  378. package/dist/esm/core/json.mjs +19 -0
  379. package/dist/esm/core/logging/exports.d.mts +18 -0
  380. package/dist/esm/core/logging/exports.mjs +9 -0
  381. package/dist/esm/core/logging/index.d.mts +1 -0
  382. package/dist/esm/core/logging/index.mjs +1 -0
  383. package/dist/esm/core/logging/logger.d.mts +126 -0
  384. package/dist/esm/core/logging/logger.mjs +138 -0
  385. package/dist/esm/core/runtime/index.d.mts +1 -0
  386. package/dist/esm/core/runtime/index.mjs +1 -0
  387. package/dist/esm/core/runtime/runtime.d.mts +9 -0
  388. package/dist/esm/core/runtime/runtime.mjs +100 -0
  389. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  390. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  391. package/dist/esm/core/url/index.d.mts +3 -0
  392. package/dist/esm/core/url/index.mjs +3 -0
  393. package/dist/esm/core/url/join.d.mts +1 -0
  394. package/dist/esm/core/url/join.mjs +65 -0
  395. package/dist/esm/core/url/qs.d.mts +6 -0
  396. package/dist/esm/core/url/qs.mjs +61 -0
  397. package/dist/esm/environments.d.mts +5 -0
  398. package/dist/esm/environments.mjs +5 -0
  399. package/dist/esm/errors/SafeRxError.d.mts +12 -0
  400. package/dist/esm/errors/SafeRxError.mjs +28 -0
  401. package/dist/esm/errors/SafeRxTimeoutError.d.mts +3 -0
  402. package/dist/esm/errors/SafeRxTimeoutError.mjs +11 -0
  403. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  404. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  405. package/dist/esm/errors/index.d.mts +2 -0
  406. package/dist/esm/errors/index.mjs +2 -0
  407. package/dist/esm/exports.d.mts +1 -0
  408. package/dist/esm/exports.mjs +1 -0
  409. package/dist/esm/index.d.mts +6 -0
  410. package/dist/esm/index.mjs +5 -0
  411. package/dist/esm/version.d.mts +1 -0
  412. package/dist/esm/version.mjs +1 -0
  413. package/package.json +65 -0
@@ -0,0 +1,241 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
+ import * as core from "../../../../core/index.mjs";
25
+ import * as environments from "../../../../environments.mjs";
26
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
27
+ import * as errors from "../../../../errors/index.mjs";
28
+ import * as SafeRx from "../../../index.mjs";
29
+ /**
30
+ * Unified drug safety screening endpoints
31
+ */
32
+ export class DrugSafetyClient {
33
+ constructor(options) {
34
+ this._options = normalizeClientOptionsWithAuth(options);
35
+ }
36
+ /**
37
+ * Screen one or more drugs across six safety domains in a single request.
38
+ *
39
+ * The API resolves drug names via fuzzy matching, runs all requested safety
40
+ * checks in parallel, and returns a unified response with alerts bubbled to
41
+ * the top for easy triage.
42
+ *
43
+ * **Typical response time:** ~40ms (warm cache, 3 drugs, all domains).
44
+ *
45
+ * @param {SafeRx.DrugSafetyCheckRequest} request
46
+ * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link SafeRx.BadRequestError}
49
+ * @throws {@link SafeRx.UnauthorizedError}
50
+ * @throws {@link SafeRx.ForbiddenError}
51
+ * @throws {@link SafeRx.TooManyRequestsError}
52
+ * @throws {@link SafeRx.InternalServerError}
53
+ *
54
+ * @example
55
+ * await client.drugSafety.check({
56
+ * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
57
+ * lang: "en"
58
+ * })
59
+ *
60
+ * @example
61
+ * await client.drugSafety.check({
62
+ * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
63
+ * patient_profile: {
64
+ * populations: ["geriatric", "renal"],
65
+ * conditions: ["diabetes", "hypertension"]
66
+ * },
67
+ * include: ["ae", "ddi", "pllr", "clinical"],
68
+ * lang: "en"
69
+ * })
70
+ *
71
+ * @example
72
+ * await client.drugSafety.check({
73
+ * drugs: ["Augmentin 1g", "Marivan"],
74
+ * include: ["ddi"]
75
+ * })
76
+ *
77
+ * @example
78
+ * await client.drugSafety.check({
79
+ * drugs: ["Augmentin 1g", "Glucophage 500mg"],
80
+ * lang: "ar"
81
+ * })
82
+ */
83
+ check(request, requestOptions) {
84
+ return core.HttpResponsePromise.fromPromise(this.__check(request, requestOptions));
85
+ }
86
+ __check(request, requestOptions) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
89
+ const { "X-SafeRx-Sandbox": safeRxSandbox } = request, _body = __rest(request, ["X-SafeRx-Sandbox"]);
90
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
91
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
92
+ "X-SafeRx-Sandbox": safeRxSandbox,
93
+ "X-SafeRx-API-Key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.safeRxApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.safeRxApiKey,
94
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
95
+ const _response = yield core.fetcher({
96
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SafeRxEnvironment.Production, "api/drug_safety/check"),
97
+ method: "POST",
98
+ headers: _headers,
99
+ contentType: "application/json",
100
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
101
+ requestType: "json",
102
+ body: _body,
103
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
104
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
105
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
106
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
107
+ logging: this._options.logging,
108
+ });
109
+ if (_response.ok) {
110
+ return { data: _response.body, rawResponse: _response.rawResponse };
111
+ }
112
+ if (_response.error.reason === "status-code") {
113
+ switch (_response.error.statusCode) {
114
+ case 400:
115
+ throw new SafeRx.BadRequestError(_response.error.body, _response.rawResponse);
116
+ case 401:
117
+ throw new SafeRx.UnauthorizedError(_response.error.body, _response.rawResponse);
118
+ case 403:
119
+ throw new SafeRx.ForbiddenError(_response.error.body, _response.rawResponse);
120
+ case 429:
121
+ throw new SafeRx.TooManyRequestsError(_response.error.body, _response.rawResponse);
122
+ case 500:
123
+ throw new SafeRx.InternalServerError(_response.error.body, _response.rawResponse);
124
+ default:
125
+ throw new errors.SafeRxError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/drug_safety/check");
133
+ });
134
+ }
135
+ /**
136
+ * Returns available populations, conditions, database versions, risk level
137
+ * scales, and current tier limits.
138
+ *
139
+ * Use this endpoint to:
140
+ * - Populate dropdown menus with valid population and condition values
141
+ * - Check database versions and coverage statistics
142
+ * - Verify your tier and rate limits
143
+ * - Cache metadata locally (changes infrequently — safe to cache for 24 hours)
144
+ *
145
+ * @param {SafeRx.GetMetadataDrugSafetyRequest} request
146
+ * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
147
+ *
148
+ * @throws {@link SafeRx.UnauthorizedError}
149
+ * @throws {@link SafeRx.TooManyRequestsError}
150
+ *
151
+ * @example
152
+ * await client.drugSafety.getMetadata()
153
+ */
154
+ getMetadata(request = {}, requestOptions) {
155
+ return core.HttpResponsePromise.fromPromise(this.__getMetadata(request, requestOptions));
156
+ }
157
+ __getMetadata() {
158
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
159
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
160
+ const { "X-SafeRx-Sandbox": safeRxSandbox } = request;
161
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
162
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
163
+ "X-SafeRx-Sandbox": safeRxSandbox,
164
+ "X-SafeRx-API-Key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.safeRxApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.safeRxApiKey,
165
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
166
+ const _response = yield core.fetcher({
167
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SafeRxEnvironment.Production, "api/drug_safety/metadata"),
168
+ method: "GET",
169
+ headers: _headers,
170
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
171
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
172
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
173
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
174
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
175
+ logging: this._options.logging,
176
+ });
177
+ if (_response.ok) {
178
+ return { data: _response.body, rawResponse: _response.rawResponse };
179
+ }
180
+ if (_response.error.reason === "status-code") {
181
+ switch (_response.error.statusCode) {
182
+ case 401:
183
+ throw new SafeRx.UnauthorizedError(_response.error.body, _response.rawResponse);
184
+ case 429:
185
+ throw new SafeRx.TooManyRequestsError(_response.error.body, _response.rawResponse);
186
+ default:
187
+ throw new errors.SafeRxError({
188
+ statusCode: _response.error.statusCode,
189
+ body: _response.error.body,
190
+ rawResponse: _response.rawResponse,
191
+ });
192
+ }
193
+ }
194
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/drug_safety/metadata");
195
+ });
196
+ }
197
+ /**
198
+ * Returns health status of the Drug Safety API subsystem including
199
+ * database connectivity, safety module availability, and Redis status.
200
+ *
201
+ * No authentication required. Designed for monitoring services.
202
+ *
203
+ * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
204
+ *
205
+ * @example
206
+ * await client.drugSafety.getDrugSafetyHealth()
207
+ */
208
+ getDrugSafetyHealth(requestOptions) {
209
+ return core.HttpResponsePromise.fromPromise(this.__getDrugSafetyHealth(requestOptions));
210
+ }
211
+ __getDrugSafetyHealth(requestOptions) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
214
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
215
+ "X-SafeRx-API-Key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.safeRxApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.safeRxApiKey,
216
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
217
+ const _response = yield core.fetcher({
218
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SafeRxEnvironment.Production, "api/drug_safety/health"),
219
+ method: "GET",
220
+ headers: _headers,
221
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
222
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
223
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
224
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
225
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
226
+ logging: this._options.logging,
227
+ });
228
+ if (_response.ok) {
229
+ return { data: _response.body, rawResponse: _response.rawResponse };
230
+ }
231
+ if (_response.error.reason === "status-code") {
232
+ throw new errors.SafeRxError({
233
+ statusCode: _response.error.statusCode,
234
+ body: _response.error.body,
235
+ rawResponse: _response.rawResponse,
236
+ });
237
+ }
238
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/drug_safety/health");
239
+ });
240
+ }
241
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,69 @@
1
+ import type * as SafeRx from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
6
+ * lang: "en"
7
+ * }
8
+ *
9
+ * @example
10
+ * {
11
+ * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
12
+ * patient_profile: {
13
+ * populations: ["geriatric", "renal"],
14
+ * conditions: ["diabetes", "hypertension"]
15
+ * },
16
+ * include: ["ae", "ddi", "pllr", "clinical"],
17
+ * lang: "en"
18
+ * }
19
+ *
20
+ * @example
21
+ * {
22
+ * drugs: ["Augmentin 1g", "Marivan"],
23
+ * include: ["ddi"]
24
+ * }
25
+ *
26
+ * @example
27
+ * {
28
+ * drugs: ["Augmentin 1g", "Glucophage 500mg"],
29
+ * lang: "ar"
30
+ * }
31
+ */
32
+ export interface DrugSafetyCheckRequest {
33
+ /**
34
+ * Set to `true` to use sandbox mode. Sandbox restricts drug resolution
35
+ * to a 500-product subset for safe testing. Response includes `"sandbox": true` in meta.
36
+ */
37
+ "X-SafeRx-Sandbox"?: SafeRx.CheckDrugSafetyRequestXSafeRxSandbox;
38
+ /**
39
+ * Drug names to screen. Accepts trade names (e.g., "Augmentin 1g"),
40
+ * generic names (e.g., "amoxicillin"), or partial matches.
41
+ * Fuzzy matching resolves names to SafeRx product IDs.
42
+ *
43
+ * - **Free/Pro tier:** max 20 drugs per request
44
+ * - **Enterprise tier:** max 50 drugs per request
45
+ */
46
+ drugs: string[];
47
+ patient_profile?: SafeRx.PatientProfile;
48
+ /**
49
+ * Safety domains to check. Omit to run all six domains.
50
+ * Including fewer domains reduces response size and may improve latency.
51
+ */
52
+ include?: SafeRx.DomainCode[];
53
+ /**
54
+ * Response language. Controls bilingual fields such as rationale text,
55
+ * drug name translations, and clinical advice.
56
+ */
57
+ lang?: DrugSafetyCheckRequest.Lang;
58
+ }
59
+ export declare namespace DrugSafetyCheckRequest {
60
+ /**
61
+ * Response language. Controls bilingual fields such as rationale text,
62
+ * drug name translations, and clinical advice.
63
+ */
64
+ const Lang: {
65
+ readonly En: "en";
66
+ readonly Ar: "ar";
67
+ };
68
+ type Lang = (typeof Lang)[keyof typeof Lang];
69
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var DrugSafetyCheckRequest;
3
+ (function (DrugSafetyCheckRequest) {
4
+ /**
5
+ * Response language. Controls bilingual fields such as rationale text,
6
+ * drug name translations, and clinical advice.
7
+ */
8
+ DrugSafetyCheckRequest.Lang = {
9
+ En: "en",
10
+ Ar: "ar",
11
+ };
12
+ })(DrugSafetyCheckRequest || (DrugSafetyCheckRequest = {}));
@@ -0,0 +1,9 @@
1
+ import type * as SafeRx from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface GetMetadataDrugSafetyRequest {
7
+ /** Set to `true` to get sandbox metadata including sandbox_product_count. */
8
+ "X-SafeRx-Sandbox"?: SafeRx.GetMetadataDrugSafetyRequestXSafeRxSandbox;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export { DrugSafetyCheckRequest } from "./DrugSafetyCheckRequest.mjs";
2
+ export type { GetMetadataDrugSafetyRequest } from "./GetMetadataDrugSafetyRequest.mjs";
@@ -0,0 +1 @@
1
+ export { DrugSafetyCheckRequest } from "./DrugSafetyCheckRequest.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,4 @@
1
+ export declare const CheckDrugSafetyRequestXSafeRxSandbox: {
2
+ readonly True: "true";
3
+ };
4
+ export type CheckDrugSafetyRequestXSafeRxSandbox = (typeof CheckDrugSafetyRequestXSafeRxSandbox)[keyof typeof CheckDrugSafetyRequestXSafeRxSandbox];
@@ -0,0 +1,4 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const CheckDrugSafetyRequestXSafeRxSandbox = {
3
+ True: "true",
4
+ };
@@ -0,0 +1,26 @@
1
+ export interface GetDrugSafetyHealthResponse {
2
+ status?: GetDrugSafetyHealthResponse.Status | undefined;
3
+ subsystem?: string | undefined;
4
+ checks?: Record<string, GetDrugSafetyHealthResponse.Checks.Value> | undefined;
5
+ latency_ms?: number | undefined;
6
+ }
7
+ export declare namespace GetDrugSafetyHealthResponse {
8
+ const Status: {
9
+ readonly Healthy: "healthy";
10
+ readonly Degraded: "degraded";
11
+ };
12
+ type Status = (typeof Status)[keyof typeof Status];
13
+ namespace Checks {
14
+ interface Value {
15
+ status?: Value.Status | undefined;
16
+ }
17
+ namespace Value {
18
+ const Status: {
19
+ readonly Healthy: "healthy";
20
+ readonly Degraded: "degraded";
21
+ readonly Unhealthy: "unhealthy";
22
+ };
23
+ type Status = (typeof Status)[keyof typeof Status];
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,19 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var GetDrugSafetyHealthResponse;
3
+ (function (GetDrugSafetyHealthResponse) {
4
+ GetDrugSafetyHealthResponse.Status = {
5
+ Healthy: "healthy",
6
+ Degraded: "degraded",
7
+ };
8
+ let Checks;
9
+ (function (Checks) {
10
+ let Value;
11
+ (function (Value) {
12
+ Value.Status = {
13
+ Healthy: "healthy",
14
+ Degraded: "degraded",
15
+ Unhealthy: "unhealthy",
16
+ };
17
+ })(Value = Checks.Value || (Checks.Value = {}));
18
+ })(Checks = GetDrugSafetyHealthResponse.Checks || (GetDrugSafetyHealthResponse.Checks = {}));
19
+ })(GetDrugSafetyHealthResponse || (GetDrugSafetyHealthResponse = {}));
@@ -0,0 +1,4 @@
1
+ export declare const GetMetadataDrugSafetyRequestXSafeRxSandbox: {
2
+ readonly True: "true";
3
+ };
4
+ export type GetMetadataDrugSafetyRequestXSafeRxSandbox = (typeof GetMetadataDrugSafetyRequestXSafeRxSandbox)[keyof typeof GetMetadataDrugSafetyRequestXSafeRxSandbox];
@@ -0,0 +1,4 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetMetadataDrugSafetyRequestXSafeRxSandbox = {
3
+ True: "true",
4
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./CheckDrugSafetyRequestXSafeRxSandbox.mjs";
2
+ export * from "./GetDrugSafetyHealthResponse.mjs";
3
+ export * from "./GetMetadataDrugSafetyRequestXSafeRxSandbox.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./CheckDrugSafetyRequestXSafeRxSandbox.mjs";
2
+ export * from "./GetDrugSafetyHealthResponse.mjs";
3
+ export * from "./GetMetadataDrugSafetyRequestXSafeRxSandbox.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./drugSafety/client/requests/index.mjs";
2
+ export * as drugSafety from "./drugSafety/index.mjs";
3
+ export * from "./drugSafety/types/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./drugSafety/client/requests/index.mjs";
2
+ export * as drugSafety from "./drugSafety/index.mjs";
3
+ export * from "./drugSafety/types/index.mjs";
@@ -0,0 +1,43 @@
1
+ export interface AdverseEffect {
2
+ /** Effect name in English */
3
+ name?: string | undefined;
4
+ /** Effect name in Arabic */
5
+ name_ar?: string | undefined;
6
+ /** Frequency as a decimal (0.0 to 1.0) */
7
+ frequency?: number | undefined;
8
+ /** Human-readable frequency tier */
9
+ frequency_label?: string | undefined;
10
+ /** Numeric frequency tier (1=very rare, 5=very common) */
11
+ frequency_category?: number | undefined;
12
+ /** Detailed frequency breakdown */
13
+ frequency_detail?: AdverseEffect.FrequencyDetail | undefined;
14
+ /** Severity score (1=mild, 5=life-threatening) */
15
+ severity?: number | undefined;
16
+ /** Human-readable severity label */
17
+ severity_label?: string | undefined;
18
+ /**
19
+ * Severity category name (mild, moderate, serious,
20
+ * severe, life_threatening)
21
+ */
22
+ severity_category?: string | undefined;
23
+ /** Data source for this effect */
24
+ source?: string | undefined;
25
+ /** Brief clinical guidance */
26
+ clinical_advice?: string | undefined;
27
+ /** Whether monitoring is recommended */
28
+ requires_monitoring?: boolean | undefined;
29
+ /** Whether this effect requires urgent attention */
30
+ urgency?: boolean | undefined;
31
+ /** Classification basis for this effect */
32
+ basis?: string | undefined;
33
+ }
34
+ export declare namespace AdverseEffect {
35
+ /**
36
+ * Detailed frequency breakdown
37
+ */
38
+ interface FrequencyDetail {
39
+ category?: string | undefined;
40
+ label?: string | undefined;
41
+ value?: number | undefined;
42
+ }
43
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,62 @@
1
+ /**
2
+ * High-severity safety alert bubbled up from domain-level data.
3
+ * Alerts are generated when safety thresholds are exceeded.
4
+ */
5
+ export interface Alert {
6
+ /**
7
+ * Alert severity level.
8
+ * - `CRITICAL` — Immediate action required (e.g., BBW, contraindicated DDI, pregnancy risk 7)
9
+ * - `HIGH` — Significant risk requiring pharmacist review (e.g., major DDI, pregnancy risk 6)
10
+ * - `MODERATE` — Worth noting, may require monitoring
11
+ * - `LOW` — Informational
12
+ */
13
+ severity: Alert.Severity;
14
+ /**
15
+ * Alert source domain and trigger.
16
+ * - `ae_bbw` — Drug has a Black Box Warning
17
+ * - `ddi` — Major (severity 4) or contraindicated (severity 5) interaction
18
+ * - `pllr_pregnancy` — Pregnancy risk >= 6 (Contraindicated or Absolutely Contraindicated)
19
+ * - `pllr_lactation` — Lactation risk >= 6
20
+ * - `clinical_condition` — Clinical condition severity >= 4
21
+ * - `clinical_population` — Clinical population severity >= 4
22
+ */
23
+ type: Alert.Type;
24
+ /** Human-readable alert message */
25
+ message: string;
26
+ /** Drug names involved in this alert */
27
+ drugs_involved: string[];
28
+ }
29
+ export declare namespace Alert {
30
+ /**
31
+ * Alert severity level.
32
+ * - `CRITICAL` — Immediate action required (e.g., BBW, contraindicated DDI, pregnancy risk 7)
33
+ * - `HIGH` — Significant risk requiring pharmacist review (e.g., major DDI, pregnancy risk 6)
34
+ * - `MODERATE` — Worth noting, may require monitoring
35
+ * - `LOW` — Informational
36
+ */
37
+ const Severity: {
38
+ readonly Critical: "CRITICAL";
39
+ readonly High: "HIGH";
40
+ readonly Moderate: "MODERATE";
41
+ readonly Low: "LOW";
42
+ };
43
+ type Severity = (typeof Severity)[keyof typeof Severity];
44
+ /**
45
+ * Alert source domain and trigger.
46
+ * - `ae_bbw` — Drug has a Black Box Warning
47
+ * - `ddi` — Major (severity 4) or contraindicated (severity 5) interaction
48
+ * - `pllr_pregnancy` — Pregnancy risk >= 6 (Contraindicated or Absolutely Contraindicated)
49
+ * - `pllr_lactation` — Lactation risk >= 6
50
+ * - `clinical_condition` — Clinical condition severity >= 4
51
+ * - `clinical_population` — Clinical population severity >= 4
52
+ */
53
+ const Type: {
54
+ readonly AeBbw: "ae_bbw";
55
+ readonly Ddi: "ddi";
56
+ readonly PllrPregnancy: "pllr_pregnancy";
57
+ readonly PllrLactation: "pllr_lactation";
58
+ readonly ClinicalCondition: "clinical_condition";
59
+ readonly ClinicalPopulation: "clinical_population";
60
+ };
61
+ type Type = (typeof Type)[keyof typeof Type];
62
+ }
@@ -0,0 +1,34 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var Alert;
3
+ (function (Alert) {
4
+ /**
5
+ * Alert severity level.
6
+ * - `CRITICAL` — Immediate action required (e.g., BBW, contraindicated DDI, pregnancy risk 7)
7
+ * - `HIGH` — Significant risk requiring pharmacist review (e.g., major DDI, pregnancy risk 6)
8
+ * - `MODERATE` — Worth noting, may require monitoring
9
+ * - `LOW` — Informational
10
+ */
11
+ Alert.Severity = {
12
+ Critical: "CRITICAL",
13
+ High: "HIGH",
14
+ Moderate: "MODERATE",
15
+ Low: "LOW",
16
+ };
17
+ /**
18
+ * Alert source domain and trigger.
19
+ * - `ae_bbw` — Drug has a Black Box Warning
20
+ * - `ddi` — Major (severity 4) or contraindicated (severity 5) interaction
21
+ * - `pllr_pregnancy` — Pregnancy risk >= 6 (Contraindicated or Absolutely Contraindicated)
22
+ * - `pllr_lactation` — Lactation risk >= 6
23
+ * - `clinical_condition` — Clinical condition severity >= 4
24
+ * - `clinical_population` — Clinical population severity >= 4
25
+ */
26
+ Alert.Type = {
27
+ AeBbw: "ae_bbw",
28
+ Ddi: "ddi",
29
+ PllrPregnancy: "pllr_pregnancy",
30
+ PllrLactation: "pllr_lactation",
31
+ ClinicalCondition: "clinical_condition",
32
+ ClinicalPopulation: "clinical_population",
33
+ };
34
+ })(Alert || (Alert = {}));
@@ -0,0 +1,15 @@
1
+ export interface BlackBoxWarning {
2
+ /** Full BBW text in English */
3
+ warning_text?: string | undefined;
4
+ /** Full BBW text in Arabic */
5
+ warning_text_ar?: string | undefined;
6
+ /**
7
+ * BBW category tags (e.g., DEATH_RISK, BLEEDING_RISK, CARDIAC_RISK,
8
+ * HEPATOTOXICITY, SUICIDALITY, TERATOGENIC)
9
+ */
10
+ categories?: string[] | undefined;
11
+ /** Whether this BBW includes a mortality risk */
12
+ has_death_warning?: boolean | undefined;
13
+ /** Source of the BBW data */
14
+ source?: string | undefined;
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Response when access is temporarily suspended
3
+ */
4
+ export interface BlockedResponse {
5
+ error?: string | undefined;
6
+ reason?: string | undefined;
7
+ message?: string | undefined;
8
+ support?: string | undefined;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};