saferx-pharma-sdk 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/README.md +31 -0
  2. package/dist/client.d.ts +47 -0
  3. package/dist/client.js +166 -0
  4. package/package.json +11 -63
  5. package/src/client.ts +117 -0
  6. package/dist/cjs/BaseClient.d.ts +0 -39
  7. package/dist/cjs/BaseClient.js +0 -62
  8. package/dist/cjs/Client.d.ts +0 -17
  9. package/dist/cjs/Client.js +0 -21
  10. package/dist/cjs/api/errors/BadRequestError.d.ts +0 -5
  11. package/dist/cjs/api/errors/BadRequestError.js +0 -54
  12. package/dist/cjs/api/errors/ForbiddenError.d.ts +0 -5
  13. package/dist/cjs/api/errors/ForbiddenError.js +0 -54
  14. package/dist/cjs/api/errors/InternalServerError.d.ts +0 -5
  15. package/dist/cjs/api/errors/InternalServerError.js +0 -54
  16. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +0 -5
  17. package/dist/cjs/api/errors/TooManyRequestsError.js +0 -54
  18. package/dist/cjs/api/errors/UnauthorizedError.d.ts +0 -6
  19. package/dist/cjs/api/errors/UnauthorizedError.js +0 -54
  20. package/dist/cjs/api/errors/index.d.ts +0 -5
  21. package/dist/cjs/api/errors/index.js +0 -21
  22. package/dist/cjs/api/index.d.ts +0 -3
  23. package/dist/cjs/api/index.js +0 -19
  24. package/dist/cjs/api/resources/developers/client/Client.d.ts +0 -56
  25. package/dist/cjs/api/resources/developers/client/Client.js +0 -186
  26. package/dist/cjs/api/resources/developers/client/index.d.ts +0 -1
  27. package/dist/cjs/api/resources/developers/client/index.js +0 -17
  28. package/dist/cjs/api/resources/developers/client/requests/CreateFreeKeyDevelopersRequest.d.ts +0 -10
  29. package/dist/cjs/api/resources/developers/client/requests/CreateFreeKeyDevelopersRequest.js +0 -3
  30. package/dist/cjs/api/resources/developers/client/requests/VerifyFreeKeyDevelopersRequest.d.ts +0 -13
  31. package/dist/cjs/api/resources/developers/client/requests/VerifyFreeKeyDevelopersRequest.js +0 -3
  32. package/dist/cjs/api/resources/developers/client/requests/index.d.ts +0 -2
  33. package/dist/cjs/api/resources/developers/client/requests/index.js +0 -2
  34. package/dist/cjs/api/resources/developers/index.d.ts +0 -2
  35. package/dist/cjs/api/resources/developers/index.js +0 -18
  36. package/dist/cjs/api/resources/developers/types/CreateFreeKeyDevelopersResponse.d.ts +0 -18
  37. package/dist/cjs/api/resources/developers/types/CreateFreeKeyDevelopersResponse.js +0 -3
  38. package/dist/cjs/api/resources/developers/types/VerifyFreeKeyDevelopersResponse.d.ts +0 -12
  39. package/dist/cjs/api/resources/developers/types/VerifyFreeKeyDevelopersResponse.js +0 -3
  40. package/dist/cjs/api/resources/developers/types/index.d.ts +0 -2
  41. package/dist/cjs/api/resources/developers/types/index.js +0 -18
  42. package/dist/cjs/api/resources/drugSafety/client/Client.d.ts +0 -100
  43. package/dist/cjs/api/resources/drugSafety/client/Client.js +0 -258
  44. package/dist/cjs/api/resources/drugSafety/client/index.d.ts +0 -1
  45. package/dist/cjs/api/resources/drugSafety/client/index.js +0 -17
  46. package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.ts +0 -64
  47. package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.js +0 -15
  48. package/dist/cjs/api/resources/drugSafety/client/requests/index.d.ts +0 -1
  49. package/dist/cjs/api/resources/drugSafety/client/requests/index.js +0 -5
  50. package/dist/cjs/api/resources/drugSafety/index.d.ts +0 -2
  51. package/dist/cjs/api/resources/drugSafety/index.js +0 -18
  52. package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.ts +0 -26
  53. package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.js +0 -22
  54. package/dist/cjs/api/resources/drugSafety/types/index.d.ts +0 -1
  55. package/dist/cjs/api/resources/drugSafety/types/index.js +0 -17
  56. package/dist/cjs/api/resources/index.d.ts +0 -6
  57. package/dist/cjs/api/resources/index.js +0 -45
  58. package/dist/cjs/api/types/AdverseEffect.d.ts +0 -43
  59. package/dist/cjs/api/types/AdverseEffect.js +0 -3
  60. package/dist/cjs/api/types/Alert.d.ts +0 -64
  61. package/dist/cjs/api/types/Alert.js +0 -37
  62. package/dist/cjs/api/types/BadRequestErrorBody.d.ts +0 -3
  63. package/dist/cjs/api/types/BadRequestErrorBody.js +0 -3
  64. package/dist/cjs/api/types/BlackBoxWarning.d.ts +0 -15
  65. package/dist/cjs/api/types/BlackBoxWarning.js +0 -3
  66. package/dist/cjs/api/types/BlockedResponse.d.ts +0 -9
  67. package/dist/cjs/api/types/BlockedResponse.js +0 -3
  68. package/dist/cjs/api/types/ClinicalAlert.d.ts +0 -48
  69. package/dist/cjs/api/types/ClinicalAlert.js +0 -3
  70. package/dist/cjs/api/types/ClinicalConcern.d.ts +0 -15
  71. package/dist/cjs/api/types/ClinicalConcern.js +0 -3
  72. package/dist/cjs/api/types/ClinicalData.d.ts +0 -14
  73. package/dist/cjs/api/types/ClinicalData.js +0 -3
  74. package/dist/cjs/api/types/Condition.d.ts +0 -22
  75. package/dist/cjs/api/types/Condition.js +0 -25
  76. package/dist/cjs/api/types/DailyLimit.d.ts +0 -20
  77. package/dist/cjs/api/types/DailyLimit.js +0 -13
  78. package/dist/cjs/api/types/DomainCode.d.ts +0 -18
  79. package/dist/cjs/api/types/DomainCode.js +0 -21
  80. package/dist/cjs/api/types/DoseClassification.d.ts +0 -40
  81. package/dist/cjs/api/types/DoseClassification.js +0 -22
  82. package/dist/cjs/api/types/DoseComponent.d.ts +0 -30
  83. package/dist/cjs/api/types/DoseComponent.js +0 -12
  84. package/dist/cjs/api/types/DosingData.d.ts +0 -53
  85. package/dist/cjs/api/types/DosingData.js +0 -18
  86. package/dist/cjs/api/types/DrugClinicalData.d.ts +0 -7
  87. package/dist/cjs/api/types/DrugClinicalData.js +0 -3
  88. package/dist/cjs/api/types/DrugSafetyCheckResponse.d.ts +0 -28
  89. package/dist/cjs/api/types/DrugSafetyCheckResponse.js +0 -11
  90. package/dist/cjs/api/types/ErrorResponse.d.ts +0 -24
  91. package/dist/cjs/api/types/ErrorResponse.js +0 -3
  92. package/dist/cjs/api/types/FoodConflict.d.ts +0 -21
  93. package/dist/cjs/api/types/FoodConflict.js +0 -3
  94. package/dist/cjs/api/types/FoodData.d.ts +0 -11
  95. package/dist/cjs/api/types/FoodData.js +0 -3
  96. package/dist/cjs/api/types/ForbiddenErrorBody.d.ts +0 -4
  97. package/dist/cjs/api/types/ForbiddenErrorBody.js +0 -3
  98. package/dist/cjs/api/types/Interaction.d.ts +0 -61
  99. package/dist/cjs/api/types/Interaction.js +0 -14
  100. package/dist/cjs/api/types/InteractionSummary.d.ts +0 -13
  101. package/dist/cjs/api/types/InteractionSummary.js +0 -3
  102. package/dist/cjs/api/types/InteractionsData.d.ts +0 -11
  103. package/dist/cjs/api/types/InteractionsData.js +0 -3
  104. package/dist/cjs/api/types/InternalServerErrorBody.d.ts +0 -3
  105. package/dist/cjs/api/types/InternalServerErrorBody.js +0 -3
  106. package/dist/cjs/api/types/MealTiming.d.ts +0 -26
  107. package/dist/cjs/api/types/MealTiming.js +0 -3
  108. package/dist/cjs/api/types/Meta.d.ts +0 -27
  109. package/dist/cjs/api/types/Meta.js +0 -13
  110. package/dist/cjs/api/types/MetadataResponse.d.ts +0 -85
  111. package/dist/cjs/api/types/MetadataResponse.js +0 -16
  112. package/dist/cjs/api/types/Monitoring.d.ts +0 -22
  113. package/dist/cjs/api/types/Monitoring.js +0 -3
  114. package/dist/cjs/api/types/PatientProfile.d.ts +0 -12
  115. package/dist/cjs/api/types/PatientProfile.js +0 -3
  116. package/dist/cjs/api/types/Population.d.ts +0 -16
  117. package/dist/cjs/api/types/Population.js +0 -19
  118. package/dist/cjs/api/types/PopulationMonitoring.d.ts +0 -26
  119. package/dist/cjs/api/types/PopulationMonitoring.js +0 -3
  120. package/dist/cjs/api/types/RateLimitResponse.d.ts +0 -26
  121. package/dist/cjs/api/types/RateLimitResponse.js +0 -12
  122. package/dist/cjs/api/types/ReferenceDose.d.ts +0 -11
  123. package/dist/cjs/api/types/ReferenceDose.js +0 -3
  124. package/dist/cjs/api/types/ReproductiveSafetyData.d.ts +0 -58
  125. package/dist/cjs/api/types/ReproductiveSafetyData.js +0 -3
  126. package/dist/cjs/api/types/ReproductiveWarning.d.ts +0 -13
  127. package/dist/cjs/api/types/ReproductiveWarning.js +0 -3
  128. package/dist/cjs/api/types/ResolvedDrug.d.ts +0 -44
  129. package/dist/cjs/api/types/ResolvedDrug.js +0 -3
  130. package/dist/cjs/api/types/SafetyData.d.ts +0 -22
  131. package/dist/cjs/api/types/SafetyData.js +0 -3
  132. package/dist/cjs/api/types/SideEffectsData.d.ts +0 -38
  133. package/dist/cjs/api/types/SideEffectsData.js +0 -18
  134. package/dist/cjs/api/types/TooManyRequestsErrorBody.d.ts +0 -3
  135. package/dist/cjs/api/types/TooManyRequestsErrorBody.js +0 -3
  136. package/dist/cjs/api/types/index.d.ts +0 -39
  137. package/dist/cjs/api/types/index.js +0 -55
  138. package/dist/cjs/auth/HeaderAuthProvider.d.ts +0 -20
  139. package/dist/cjs/auth/HeaderAuthProvider.js +0 -80
  140. package/dist/cjs/auth/index.d.ts +0 -1
  141. package/dist/cjs/auth/index.js +0 -5
  142. package/dist/cjs/core/auth/AuthProvider.d.ts +0 -7
  143. package/dist/cjs/core/auth/AuthProvider.js +0 -2
  144. package/dist/cjs/core/auth/AuthRequest.d.ts +0 -9
  145. package/dist/cjs/core/auth/AuthRequest.js +0 -2
  146. package/dist/cjs/core/auth/BasicAuth.d.ts +0 -8
  147. package/dist/cjs/core/auth/BasicAuth.js +0 -27
  148. package/dist/cjs/core/auth/BearerToken.d.ts +0 -7
  149. package/dist/cjs/core/auth/BearerToken.js +0 -16
  150. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +0 -5
  151. package/dist/cjs/core/auth/NoOpAuthProvider.js +0 -9
  152. package/dist/cjs/core/auth/index.d.ts +0 -5
  153. package/dist/cjs/core/auth/index.js +0 -9
  154. package/dist/cjs/core/base64.d.ts +0 -2
  155. package/dist/cjs/core/base64.js +0 -26
  156. package/dist/cjs/core/exports.d.ts +0 -1
  157. package/dist/cjs/core/exports.js +0 -17
  158. package/dist/cjs/core/fetcher/APIResponse.d.ts +0 -20
  159. package/dist/cjs/core/fetcher/APIResponse.js +0 -2
  160. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +0 -19
  161. package/dist/cjs/core/fetcher/BinaryResponse.js +0 -17
  162. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +0 -13
  163. package/dist/cjs/core/fetcher/EndpointMetadata.js +0 -2
  164. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +0 -12
  165. package/dist/cjs/core/fetcher/EndpointSupplier.js +0 -22
  166. package/dist/cjs/core/fetcher/Fetcher.d.ts +0 -48
  167. package/dist/cjs/core/fetcher/Fetcher.js +0 -322
  168. package/dist/cjs/core/fetcher/Headers.d.ts +0 -2
  169. package/dist/cjs/core/fetcher/Headers.js +0 -84
  170. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +0 -58
  171. package/dist/cjs/core/fetcher/HttpResponsePromise.js +0 -103
  172. package/dist/cjs/core/fetcher/RawResponse.d.ts +0 -29
  173. package/dist/cjs/core/fetcher/RawResponse.js +0 -44
  174. package/dist/cjs/core/fetcher/Supplier.d.ts +0 -4
  175. package/dist/cjs/core/fetcher/Supplier.js +0 -22
  176. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +0 -1
  177. package/dist/cjs/core/fetcher/createRequestUrl.js +0 -8
  178. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +0 -1
  179. package/dist/cjs/core/fetcher/getErrorResponseBody.js +0 -45
  180. package/dist/cjs/core/fetcher/getFetchFn.d.ts +0 -1
  181. package/dist/cjs/core/fetcher/getFetchFn.js +0 -17
  182. package/dist/cjs/core/fetcher/getHeader.d.ts +0 -1
  183. package/dist/cjs/core/fetcher/getHeader.js +0 -11
  184. package/dist/cjs/core/fetcher/getRequestBody.d.ts +0 -7
  185. package/dist/cjs/core/fetcher/getRequestBody.js +0 -27
  186. package/dist/cjs/core/fetcher/getResponseBody.d.ts +0 -1
  187. package/dist/cjs/core/fetcher/getResponseBody.js +0 -69
  188. package/dist/cjs/core/fetcher/index.d.ts +0 -11
  189. package/dist/cjs/core/fetcher/index.js +0 -17
  190. package/dist/cjs/core/fetcher/makeRequest.d.ts +0 -1
  191. package/dist/cjs/core/fetcher/makeRequest.js +0 -40
  192. package/dist/cjs/core/fetcher/requestWithRetries.d.ts +0 -1
  193. package/dist/cjs/core/fetcher/requestWithRetries.js +0 -67
  194. package/dist/cjs/core/fetcher/signals.d.ts +0 -5
  195. package/dist/cjs/core/fetcher/signals.js +0 -24
  196. package/dist/cjs/core/headers.d.ts +0 -2
  197. package/dist/cjs/core/headers.js +0 -31
  198. package/dist/cjs/core/index.d.ts +0 -6
  199. package/dist/cjs/core/index.js +0 -45
  200. package/dist/cjs/core/json.d.ts +0 -15
  201. package/dist/cjs/core/json.js +0 -24
  202. package/dist/cjs/core/logging/exports.d.ts +0 -18
  203. package/dist/cjs/core/logging/exports.js +0 -45
  204. package/dist/cjs/core/logging/index.d.ts +0 -1
  205. package/dist/cjs/core/logging/index.js +0 -17
  206. package/dist/cjs/core/logging/logger.d.ts +0 -126
  207. package/dist/cjs/core/logging/logger.js +0 -144
  208. package/dist/cjs/core/runtime/index.d.ts +0 -1
  209. package/dist/cjs/core/runtime/index.js +0 -5
  210. package/dist/cjs/core/runtime/runtime.d.ts +0 -9
  211. package/dist/cjs/core/runtime/runtime.js +0 -103
  212. package/dist/cjs/core/url/encodePathParam.d.ts +0 -1
  213. package/dist/cjs/core/url/encodePathParam.js +0 -21
  214. package/dist/cjs/core/url/index.d.ts +0 -3
  215. package/dist/cjs/core/url/index.js +0 -9
  216. package/dist/cjs/core/url/join.d.ts +0 -1
  217. package/dist/cjs/core/url/join.js +0 -68
  218. package/dist/cjs/core/url/qs.d.ts +0 -6
  219. package/dist/cjs/core/url/qs.js +0 -64
  220. package/dist/cjs/environments.d.ts +0 -4
  221. package/dist/cjs/environments.js +0 -7
  222. package/dist/cjs/errors/SafeRxError.d.ts +0 -12
  223. package/dist/cjs/errors/SafeRxError.js +0 -32
  224. package/dist/cjs/errors/SafeRxTimeoutError.d.ts +0 -3
  225. package/dist/cjs/errors/SafeRxTimeoutError.js +0 -15
  226. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +0 -2
  227. package/dist/cjs/errors/handleNonStatusCodeError.js +0 -65
  228. package/dist/cjs/errors/index.d.ts +0 -2
  229. package/dist/cjs/errors/index.js +0 -7
  230. package/dist/cjs/exports.d.ts +0 -1
  231. package/dist/cjs/exports.js +0 -17
  232. package/dist/cjs/index.d.ts +0 -6
  233. package/dist/cjs/index.js +0 -48
  234. package/dist/cjs/version.d.ts +0 -1
  235. package/dist/cjs/version.js +0 -4
  236. package/dist/esm/BaseClient.d.mts +0 -39
  237. package/dist/esm/BaseClient.mjs +0 -25
  238. package/dist/esm/Client.d.mts +0 -17
  239. package/dist/esm/Client.mjs +0 -17
  240. package/dist/esm/api/errors/BadRequestError.d.mts +0 -5
  241. package/dist/esm/api/errors/BadRequestError.mjs +0 -17
  242. package/dist/esm/api/errors/ForbiddenError.d.mts +0 -5
  243. package/dist/esm/api/errors/ForbiddenError.mjs +0 -17
  244. package/dist/esm/api/errors/InternalServerError.d.mts +0 -5
  245. package/dist/esm/api/errors/InternalServerError.mjs +0 -17
  246. package/dist/esm/api/errors/TooManyRequestsError.d.mts +0 -5
  247. package/dist/esm/api/errors/TooManyRequestsError.mjs +0 -17
  248. package/dist/esm/api/errors/UnauthorizedError.d.mts +0 -6
  249. package/dist/esm/api/errors/UnauthorizedError.mjs +0 -17
  250. package/dist/esm/api/errors/index.d.mts +0 -5
  251. package/dist/esm/api/errors/index.mjs +0 -5
  252. package/dist/esm/api/index.d.mts +0 -3
  253. package/dist/esm/api/index.mjs +0 -3
  254. package/dist/esm/api/resources/developers/client/Client.d.mts +0 -56
  255. package/dist/esm/api/resources/developers/client/Client.mjs +0 -149
  256. package/dist/esm/api/resources/developers/client/index.d.mts +0 -1
  257. package/dist/esm/api/resources/developers/client/index.mjs +0 -1
  258. package/dist/esm/api/resources/developers/client/requests/CreateFreeKeyDevelopersRequest.d.mts +0 -10
  259. package/dist/esm/api/resources/developers/client/requests/CreateFreeKeyDevelopersRequest.mjs +0 -2
  260. package/dist/esm/api/resources/developers/client/requests/VerifyFreeKeyDevelopersRequest.d.mts +0 -13
  261. package/dist/esm/api/resources/developers/client/requests/VerifyFreeKeyDevelopersRequest.mjs +0 -2
  262. package/dist/esm/api/resources/developers/client/requests/index.d.mts +0 -2
  263. package/dist/esm/api/resources/developers/client/requests/index.mjs +0 -1
  264. package/dist/esm/api/resources/developers/index.d.mts +0 -2
  265. package/dist/esm/api/resources/developers/index.mjs +0 -2
  266. package/dist/esm/api/resources/developers/types/CreateFreeKeyDevelopersResponse.d.mts +0 -18
  267. package/dist/esm/api/resources/developers/types/CreateFreeKeyDevelopersResponse.mjs +0 -2
  268. package/dist/esm/api/resources/developers/types/VerifyFreeKeyDevelopersResponse.d.mts +0 -12
  269. package/dist/esm/api/resources/developers/types/VerifyFreeKeyDevelopersResponse.mjs +0 -2
  270. package/dist/esm/api/resources/developers/types/index.d.mts +0 -2
  271. package/dist/esm/api/resources/developers/types/index.mjs +0 -2
  272. package/dist/esm/api/resources/drugSafety/client/Client.d.mts +0 -100
  273. package/dist/esm/api/resources/drugSafety/client/Client.mjs +0 -221
  274. package/dist/esm/api/resources/drugSafety/client/index.d.mts +0 -1
  275. package/dist/esm/api/resources/drugSafety/client/index.mjs +0 -1
  276. package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.mts +0 -64
  277. package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.mjs +0 -12
  278. package/dist/esm/api/resources/drugSafety/client/requests/index.d.mts +0 -1
  279. package/dist/esm/api/resources/drugSafety/client/requests/index.mjs +0 -1
  280. package/dist/esm/api/resources/drugSafety/index.d.mts +0 -2
  281. package/dist/esm/api/resources/drugSafety/index.mjs +0 -2
  282. package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.mts +0 -26
  283. package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.mjs +0 -19
  284. package/dist/esm/api/resources/drugSafety/types/index.d.mts +0 -1
  285. package/dist/esm/api/resources/drugSafety/types/index.mjs +0 -1
  286. package/dist/esm/api/resources/index.d.mts +0 -6
  287. package/dist/esm/api/resources/index.mjs +0 -6
  288. package/dist/esm/api/types/AdverseEffect.d.mts +0 -43
  289. package/dist/esm/api/types/AdverseEffect.mjs +0 -2
  290. package/dist/esm/api/types/Alert.d.mts +0 -64
  291. package/dist/esm/api/types/Alert.mjs +0 -34
  292. package/dist/esm/api/types/BadRequestErrorBody.d.mts +0 -3
  293. package/dist/esm/api/types/BadRequestErrorBody.mjs +0 -2
  294. package/dist/esm/api/types/BlackBoxWarning.d.mts +0 -15
  295. package/dist/esm/api/types/BlackBoxWarning.mjs +0 -2
  296. package/dist/esm/api/types/BlockedResponse.d.mts +0 -9
  297. package/dist/esm/api/types/BlockedResponse.mjs +0 -2
  298. package/dist/esm/api/types/ClinicalAlert.d.mts +0 -48
  299. package/dist/esm/api/types/ClinicalAlert.mjs +0 -2
  300. package/dist/esm/api/types/ClinicalConcern.d.mts +0 -15
  301. package/dist/esm/api/types/ClinicalConcern.mjs +0 -2
  302. package/dist/esm/api/types/ClinicalData.d.mts +0 -14
  303. package/dist/esm/api/types/ClinicalData.mjs +0 -2
  304. package/dist/esm/api/types/Condition.d.mts +0 -22
  305. package/dist/esm/api/types/Condition.mjs +0 -22
  306. package/dist/esm/api/types/DailyLimit.d.mts +0 -20
  307. package/dist/esm/api/types/DailyLimit.mjs +0 -10
  308. package/dist/esm/api/types/DomainCode.d.mts +0 -18
  309. package/dist/esm/api/types/DomainCode.mjs +0 -18
  310. package/dist/esm/api/types/DoseClassification.d.mts +0 -40
  311. package/dist/esm/api/types/DoseClassification.mjs +0 -19
  312. package/dist/esm/api/types/DoseComponent.d.mts +0 -30
  313. package/dist/esm/api/types/DoseComponent.mjs +0 -9
  314. package/dist/esm/api/types/DosingData.d.mts +0 -53
  315. package/dist/esm/api/types/DosingData.mjs +0 -15
  316. package/dist/esm/api/types/DrugClinicalData.d.mts +0 -7
  317. package/dist/esm/api/types/DrugClinicalData.mjs +0 -2
  318. package/dist/esm/api/types/DrugSafetyCheckResponse.d.mts +0 -28
  319. package/dist/esm/api/types/DrugSafetyCheckResponse.mjs +0 -8
  320. package/dist/esm/api/types/ErrorResponse.d.mts +0 -24
  321. package/dist/esm/api/types/ErrorResponse.mjs +0 -2
  322. package/dist/esm/api/types/FoodConflict.d.mts +0 -21
  323. package/dist/esm/api/types/FoodConflict.mjs +0 -2
  324. package/dist/esm/api/types/FoodData.d.mts +0 -11
  325. package/dist/esm/api/types/FoodData.mjs +0 -2
  326. package/dist/esm/api/types/ForbiddenErrorBody.d.mts +0 -4
  327. package/dist/esm/api/types/ForbiddenErrorBody.mjs +0 -2
  328. package/dist/esm/api/types/Interaction.d.mts +0 -61
  329. package/dist/esm/api/types/Interaction.mjs +0 -11
  330. package/dist/esm/api/types/InteractionSummary.d.mts +0 -13
  331. package/dist/esm/api/types/InteractionSummary.mjs +0 -2
  332. package/dist/esm/api/types/InteractionsData.d.mts +0 -11
  333. package/dist/esm/api/types/InteractionsData.mjs +0 -2
  334. package/dist/esm/api/types/InternalServerErrorBody.d.mts +0 -3
  335. package/dist/esm/api/types/InternalServerErrorBody.mjs +0 -2
  336. package/dist/esm/api/types/MealTiming.d.mts +0 -26
  337. package/dist/esm/api/types/MealTiming.mjs +0 -2
  338. package/dist/esm/api/types/Meta.d.mts +0 -27
  339. package/dist/esm/api/types/Meta.mjs +0 -10
  340. package/dist/esm/api/types/MetadataResponse.d.mts +0 -85
  341. package/dist/esm/api/types/MetadataResponse.mjs +0 -13
  342. package/dist/esm/api/types/Monitoring.d.mts +0 -22
  343. package/dist/esm/api/types/Monitoring.mjs +0 -2
  344. package/dist/esm/api/types/PatientProfile.d.mts +0 -12
  345. package/dist/esm/api/types/PatientProfile.mjs +0 -2
  346. package/dist/esm/api/types/Population.d.mts +0 -16
  347. package/dist/esm/api/types/Population.mjs +0 -16
  348. package/dist/esm/api/types/PopulationMonitoring.d.mts +0 -26
  349. package/dist/esm/api/types/PopulationMonitoring.mjs +0 -2
  350. package/dist/esm/api/types/RateLimitResponse.d.mts +0 -26
  351. package/dist/esm/api/types/RateLimitResponse.mjs +0 -9
  352. package/dist/esm/api/types/ReferenceDose.d.mts +0 -11
  353. package/dist/esm/api/types/ReferenceDose.mjs +0 -2
  354. package/dist/esm/api/types/ReproductiveSafetyData.d.mts +0 -58
  355. package/dist/esm/api/types/ReproductiveSafetyData.mjs +0 -2
  356. package/dist/esm/api/types/ReproductiveWarning.d.mts +0 -13
  357. package/dist/esm/api/types/ReproductiveWarning.mjs +0 -2
  358. package/dist/esm/api/types/ResolvedDrug.d.mts +0 -44
  359. package/dist/esm/api/types/ResolvedDrug.mjs +0 -2
  360. package/dist/esm/api/types/SafetyData.d.mts +0 -22
  361. package/dist/esm/api/types/SafetyData.mjs +0 -2
  362. package/dist/esm/api/types/SideEffectsData.d.mts +0 -38
  363. package/dist/esm/api/types/SideEffectsData.mjs +0 -15
  364. package/dist/esm/api/types/TooManyRequestsErrorBody.d.mts +0 -3
  365. package/dist/esm/api/types/TooManyRequestsErrorBody.mjs +0 -2
  366. package/dist/esm/api/types/index.d.mts +0 -39
  367. package/dist/esm/api/types/index.mjs +0 -39
  368. package/dist/esm/auth/HeaderAuthProvider.d.mts +0 -20
  369. package/dist/esm/auth/HeaderAuthProvider.mjs +0 -43
  370. package/dist/esm/auth/index.d.mts +0 -1
  371. package/dist/esm/auth/index.mjs +0 -1
  372. package/dist/esm/core/auth/AuthProvider.d.mts +0 -7
  373. package/dist/esm/core/auth/AuthProvider.mjs +0 -1
  374. package/dist/esm/core/auth/AuthRequest.d.mts +0 -9
  375. package/dist/esm/core/auth/AuthRequest.mjs +0 -1
  376. package/dist/esm/core/auth/BasicAuth.d.mts +0 -8
  377. package/dist/esm/core/auth/BasicAuth.mjs +0 -24
  378. package/dist/esm/core/auth/BearerToken.d.mts +0 -7
  379. package/dist/esm/core/auth/BearerToken.mjs +0 -13
  380. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +0 -5
  381. package/dist/esm/core/auth/NoOpAuthProvider.mjs +0 -5
  382. package/dist/esm/core/auth/index.d.mts +0 -5
  383. package/dist/esm/core/auth/index.mjs +0 -3
  384. package/dist/esm/core/base64.d.mts +0 -2
  385. package/dist/esm/core/base64.mjs +0 -22
  386. package/dist/esm/core/exports.d.mts +0 -1
  387. package/dist/esm/core/exports.mjs +0 -1
  388. package/dist/esm/core/fetcher/APIResponse.d.mts +0 -20
  389. package/dist/esm/core/fetcher/APIResponse.mjs +0 -1
  390. package/dist/esm/core/fetcher/BinaryResponse.d.mts +0 -19
  391. package/dist/esm/core/fetcher/BinaryResponse.mjs +0 -14
  392. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +0 -13
  393. package/dist/esm/core/fetcher/EndpointMetadata.mjs +0 -1
  394. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +0 -12
  395. package/dist/esm/core/fetcher/EndpointSupplier.mjs +0 -19
  396. package/dist/esm/core/fetcher/Fetcher.d.mts +0 -48
  397. package/dist/esm/core/fetcher/Fetcher.mjs +0 -318
  398. package/dist/esm/core/fetcher/Headers.d.mts +0 -2
  399. package/dist/esm/core/fetcher/Headers.mjs +0 -82
  400. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +0 -58
  401. package/dist/esm/core/fetcher/HttpResponsePromise.mjs +0 -99
  402. package/dist/esm/core/fetcher/RawResponse.d.mts +0 -29
  403. package/dist/esm/core/fetcher/RawResponse.mjs +0 -40
  404. package/dist/esm/core/fetcher/Supplier.d.mts +0 -4
  405. package/dist/esm/core/fetcher/Supplier.mjs +0 -19
  406. package/dist/esm/core/fetcher/createRequestUrl.d.mts +0 -1
  407. package/dist/esm/core/fetcher/createRequestUrl.mjs +0 -5
  408. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +0 -1
  409. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +0 -42
  410. package/dist/esm/core/fetcher/getFetchFn.d.mts +0 -1
  411. package/dist/esm/core/fetcher/getFetchFn.mjs +0 -14
  412. package/dist/esm/core/fetcher/getHeader.d.mts +0 -1
  413. package/dist/esm/core/fetcher/getHeader.mjs +0 -8
  414. package/dist/esm/core/fetcher/getRequestBody.d.mts +0 -7
  415. package/dist/esm/core/fetcher/getRequestBody.mjs +0 -24
  416. package/dist/esm/core/fetcher/getResponseBody.d.mts +0 -1
  417. package/dist/esm/core/fetcher/getResponseBody.mjs +0 -66
  418. package/dist/esm/core/fetcher/index.d.mts +0 -11
  419. package/dist/esm/core/fetcher/index.mjs +0 -6
  420. package/dist/esm/core/fetcher/makeRequest.d.mts +0 -1
  421. package/dist/esm/core/fetcher/makeRequest.mjs +0 -36
  422. package/dist/esm/core/fetcher/requestWithRetries.d.mts +0 -1
  423. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -64
  424. package/dist/esm/core/fetcher/signals.d.mts +0 -5
  425. package/dist/esm/core/fetcher/signals.mjs +0 -20
  426. package/dist/esm/core/headers.d.mts +0 -2
  427. package/dist/esm/core/headers.mjs +0 -27
  428. package/dist/esm/core/index.d.mts +0 -6
  429. package/dist/esm/core/index.mjs +0 -6
  430. package/dist/esm/core/json.d.mts +0 -15
  431. package/dist/esm/core/json.mjs +0 -19
  432. package/dist/esm/core/logging/exports.d.mts +0 -18
  433. package/dist/esm/core/logging/exports.mjs +0 -9
  434. package/dist/esm/core/logging/index.d.mts +0 -1
  435. package/dist/esm/core/logging/index.mjs +0 -1
  436. package/dist/esm/core/logging/logger.d.mts +0 -126
  437. package/dist/esm/core/logging/logger.mjs +0 -138
  438. package/dist/esm/core/runtime/index.d.mts +0 -1
  439. package/dist/esm/core/runtime/index.mjs +0 -1
  440. package/dist/esm/core/runtime/runtime.d.mts +0 -9
  441. package/dist/esm/core/runtime/runtime.mjs +0 -100
  442. package/dist/esm/core/url/encodePathParam.d.mts +0 -1
  443. package/dist/esm/core/url/encodePathParam.mjs +0 -18
  444. package/dist/esm/core/url/index.d.mts +0 -3
  445. package/dist/esm/core/url/index.mjs +0 -3
  446. package/dist/esm/core/url/join.d.mts +0 -1
  447. package/dist/esm/core/url/join.mjs +0 -65
  448. package/dist/esm/core/url/qs.d.mts +0 -6
  449. package/dist/esm/core/url/qs.mjs +0 -61
  450. package/dist/esm/environments.d.mts +0 -4
  451. package/dist/esm/environments.mjs +0 -4
  452. package/dist/esm/errors/SafeRxError.d.mts +0 -12
  453. package/dist/esm/errors/SafeRxError.mjs +0 -28
  454. package/dist/esm/errors/SafeRxTimeoutError.d.mts +0 -3
  455. package/dist/esm/errors/SafeRxTimeoutError.mjs +0 -11
  456. package/dist/esm/errors/handleNonStatusCodeError.d.mts +0 -2
  457. package/dist/esm/errors/handleNonStatusCodeError.mjs +0 -29
  458. package/dist/esm/errors/index.d.mts +0 -2
  459. package/dist/esm/errors/index.mjs +0 -2
  460. package/dist/esm/exports.d.mts +0 -1
  461. package/dist/esm/exports.mjs +0 -1
  462. package/dist/esm/index.d.mts +0 -6
  463. package/dist/esm/index.mjs +0 -5
  464. package/dist/esm/version.d.mts +0 -1
  465. package/dist/esm/version.mjs +0 -1
@@ -1,2 +0,0 @@
1
- export type { CreateFreeKeyDevelopersRequest } from "./CreateFreeKeyDevelopersRequest.js";
2
- export type { VerifyFreeKeyDevelopersRequest } from "./VerifyFreeKeyDevelopersRequest.js";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from "./client/index.js";
2
- export * from "./types/index.js";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client/index.js"), exports);
18
- __exportStar(require("./types/index.js"), exports);
@@ -1,18 +0,0 @@
1
- export type CreateFreeKeyDevelopersResponse =
2
- /**
3
- * New user - code sent */
4
- {
5
- message?: string | undefined;
6
- email?: string | undefined;
7
- }
8
- /**
9
- * Existing verified user - key returned */
10
- | {
11
- api_key?: string | undefined;
12
- tier?: string | undefined;
13
- limits?: {
14
- requests_per_minute?: number | undefined;
15
- requests_per_day?: number | undefined;
16
- } | undefined;
17
- note?: string | undefined;
18
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- export interface VerifyFreeKeyDevelopersResponse {
2
- /** Your persistent free-tier API key */
3
- api_key?: string | undefined;
4
- tier?: string | undefined;
5
- limits?: VerifyFreeKeyDevelopersResponse.Limits | undefined;
6
- }
7
- export declare namespace VerifyFreeKeyDevelopersResponse {
8
- interface Limits {
9
- requests_per_minute?: number | undefined;
10
- requests_per_day?: number | undefined;
11
- }
12
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from "./CreateFreeKeyDevelopersResponse.js";
2
- export * from "./VerifyFreeKeyDevelopersResponse.js";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./CreateFreeKeyDevelopersResponse.js"), exports);
18
- __exportStar(require("./VerifyFreeKeyDevelopersResponse.js"), exports);
@@ -1,100 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
- import * as core from "../../../../core/index.js";
4
- import * as SafeRx from "../../../index.js";
5
- export declare namespace DrugSafetyClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- /**
11
- * Unified drug safety screening endpoints
12
- */
13
- export declare class DrugSafetyClient {
14
- protected readonly _options: NormalizedClientOptionsWithAuth<DrugSafetyClient.Options>;
15
- constructor(options?: DrugSafetyClient.Options);
16
- /**
17
- * Screen one or more drugs across six safety domains in a single request.
18
- *
19
- * The API resolves drug names via fuzzy matching, runs all requested safety
20
- * checks in parallel, and returns a unified response with alerts bubbled to
21
- * the top for easy triage.
22
- *
23
- * This endpoint is API-key only. It does not require `X-SafeRx-Token`.
24
- *
25
- * **Typical response time:** ~40ms (warm cache, 3 drugs, all domains).
26
- *
27
- * @param {SafeRx.DrugSafetyCheckRequest} request
28
- * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
29
- *
30
- * @throws {@link SafeRx.BadRequestError}
31
- * @throws {@link SafeRx.UnauthorizedError}
32
- * @throws {@link SafeRx.ForbiddenError}
33
- * @throws {@link SafeRx.TooManyRequestsError}
34
- * @throws {@link SafeRx.InternalServerError}
35
- *
36
- * @example
37
- * await client.drugSafety.check({
38
- * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
39
- * lang: "en"
40
- * })
41
- *
42
- * @example
43
- * await client.drugSafety.check({
44
- * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
45
- * patient_profile: {
46
- * populations: ["geriatric", "renal"],
47
- * conditions: ["diabetes", "hypertension"]
48
- * },
49
- * include: ["ae", "ddi", "pllr", "clinical"],
50
- * lang: "en"
51
- * })
52
- *
53
- * @example
54
- * await client.drugSafety.check({
55
- * drugs: ["Augmentin 1g", "Marivan"],
56
- * include: ["ddi"]
57
- * })
58
- *
59
- * @example
60
- * await client.drugSafety.check({
61
- * drugs: ["Augmentin 1g", "Glucophage 500mg"],
62
- * lang: "ar"
63
- * })
64
- */
65
- check(request: SafeRx.DrugSafetyCheckRequest, requestOptions?: DrugSafetyClient.RequestOptions): core.HttpResponsePromise<SafeRx.DrugSafetyCheckResponse>;
66
- private __check;
67
- /**
68
- * Returns available populations, conditions, database versions, risk level
69
- * scales, and current tier limits.
70
- *
71
- * Use this endpoint to:
72
- * - Populate dropdown menus with valid population and condition values
73
- * - Check database versions and coverage statistics
74
- * - Verify your tier and rate limits
75
- * - Cache metadata locally (changes infrequently — safe to cache for 24 hours)
76
- *
77
- * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
78
- *
79
- * @throws {@link SafeRx.UnauthorizedError}
80
- * @throws {@link SafeRx.TooManyRequestsError}
81
- *
82
- * @example
83
- * await client.drugSafety.getMetadata()
84
- */
85
- getMetadata(requestOptions?: DrugSafetyClient.RequestOptions): core.HttpResponsePromise<SafeRx.MetadataResponse>;
86
- private __getMetadata;
87
- /**
88
- * Returns health status of the Drug Safety API subsystem including
89
- * overall system health and availability.
90
- *
91
- * No authentication required. Designed for monitoring services.
92
- *
93
- * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
94
- *
95
- * @example
96
- * await client.drugSafety.getDrugSafetyHealth()
97
- */
98
- getDrugSafetyHealth(requestOptions?: DrugSafetyClient.RequestOptions): core.HttpResponsePromise<SafeRx.GetDrugSafetyHealthResponse>;
99
- private __getDrugSafetyHealth;
100
- }
@@ -1,258 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.DrugSafetyClient = void 0;
47
- const BaseClient_js_1 = require("../../../../BaseClient.js");
48
- const headers_js_1 = require("../../../../core/headers.js");
49
- const core = __importStar(require("../../../../core/index.js"));
50
- const environments = __importStar(require("../../../../environments.js"));
51
- const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
- const errors = __importStar(require("../../../../errors/index.js"));
53
- const SafeRx = __importStar(require("../../../index.js"));
54
- /**
55
- * Unified drug safety screening endpoints
56
- */
57
- class DrugSafetyClient {
58
- constructor(options = {}) {
59
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
- }
61
- /**
62
- * Screen one or more drugs across six safety domains in a single request.
63
- *
64
- * The API resolves drug names via fuzzy matching, runs all requested safety
65
- * checks in parallel, and returns a unified response with alerts bubbled to
66
- * the top for easy triage.
67
- *
68
- * This endpoint is API-key only. It does not require `X-SafeRx-Token`.
69
- *
70
- * **Typical response time:** ~40ms (warm cache, 3 drugs, all domains).
71
- *
72
- * @param {SafeRx.DrugSafetyCheckRequest} request
73
- * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
74
- *
75
- * @throws {@link SafeRx.BadRequestError}
76
- * @throws {@link SafeRx.UnauthorizedError}
77
- * @throws {@link SafeRx.ForbiddenError}
78
- * @throws {@link SafeRx.TooManyRequestsError}
79
- * @throws {@link SafeRx.InternalServerError}
80
- *
81
- * @example
82
- * await client.drugSafety.check({
83
- * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
84
- * lang: "en"
85
- * })
86
- *
87
- * @example
88
- * await client.drugSafety.check({
89
- * drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
90
- * patient_profile: {
91
- * populations: ["geriatric", "renal"],
92
- * conditions: ["diabetes", "hypertension"]
93
- * },
94
- * include: ["ae", "ddi", "pllr", "clinical"],
95
- * lang: "en"
96
- * })
97
- *
98
- * @example
99
- * await client.drugSafety.check({
100
- * drugs: ["Augmentin 1g", "Marivan"],
101
- * include: ["ddi"]
102
- * })
103
- *
104
- * @example
105
- * await client.drugSafety.check({
106
- * drugs: ["Augmentin 1g", "Glucophage 500mg"],
107
- * lang: "ar"
108
- * })
109
- */
110
- check(request, requestOptions) {
111
- return core.HttpResponsePromise.fromPromise(this.__check(request, requestOptions));
112
- }
113
- __check(request, requestOptions) {
114
- return __awaiter(this, void 0, void 0, function* () {
115
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
116
- const _authRequest = yield this._options.authProvider.getAuthRequest();
117
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
118
- const _response = yield core.fetcher({
119
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SafeRxEnvironment.Production, "api/drug_safety/check"),
120
- method: "POST",
121
- headers: _headers,
122
- contentType: "application/json",
123
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
124
- requestType: "json",
125
- body: request,
126
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
127
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
128
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
129
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
130
- logging: this._options.logging,
131
- });
132
- if (_response.ok) {
133
- return { data: _response.body, rawResponse: _response.rawResponse };
134
- }
135
- if (_response.error.reason === "status-code") {
136
- switch (_response.error.statusCode) {
137
- case 400:
138
- throw new SafeRx.BadRequestError(_response.error.body, _response.rawResponse);
139
- case 401:
140
- throw new SafeRx.UnauthorizedError(_response.error.body, _response.rawResponse);
141
- case 403:
142
- throw new SafeRx.ForbiddenError(_response.error.body, _response.rawResponse);
143
- case 429:
144
- throw new SafeRx.TooManyRequestsError(_response.error.body, _response.rawResponse);
145
- case 500:
146
- throw new SafeRx.InternalServerError(_response.error.body, _response.rawResponse);
147
- default:
148
- throw new errors.SafeRxError({
149
- statusCode: _response.error.statusCode,
150
- body: _response.error.body,
151
- rawResponse: _response.rawResponse,
152
- });
153
- }
154
- }
155
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/drug_safety/check");
156
- });
157
- }
158
- /**
159
- * Returns available populations, conditions, database versions, risk level
160
- * scales, and current tier limits.
161
- *
162
- * Use this endpoint to:
163
- * - Populate dropdown menus with valid population and condition values
164
- * - Check database versions and coverage statistics
165
- * - Verify your tier and rate limits
166
- * - Cache metadata locally (changes infrequently — safe to cache for 24 hours)
167
- *
168
- * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
169
- *
170
- * @throws {@link SafeRx.UnauthorizedError}
171
- * @throws {@link SafeRx.TooManyRequestsError}
172
- *
173
- * @example
174
- * await client.drugSafety.getMetadata()
175
- */
176
- getMetadata(requestOptions) {
177
- return core.HttpResponsePromise.fromPromise(this.__getMetadata(requestOptions));
178
- }
179
- __getMetadata(requestOptions) {
180
- return __awaiter(this, void 0, void 0, function* () {
181
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
182
- const _authRequest = yield this._options.authProvider.getAuthRequest();
183
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
184
- const _response = yield core.fetcher({
185
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SafeRxEnvironment.Production, "api/drug_safety/metadata"),
186
- method: "GET",
187
- headers: _headers,
188
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
189
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
190
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
191
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
193
- logging: this._options.logging,
194
- });
195
- if (_response.ok) {
196
- return { data: _response.body, rawResponse: _response.rawResponse };
197
- }
198
- if (_response.error.reason === "status-code") {
199
- switch (_response.error.statusCode) {
200
- case 401:
201
- throw new SafeRx.UnauthorizedError(_response.error.body, _response.rawResponse);
202
- case 429:
203
- throw new SafeRx.TooManyRequestsError(_response.error.body, _response.rawResponse);
204
- default:
205
- throw new errors.SafeRxError({
206
- statusCode: _response.error.statusCode,
207
- body: _response.error.body,
208
- rawResponse: _response.rawResponse,
209
- });
210
- }
211
- }
212
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/drug_safety/metadata");
213
- });
214
- }
215
- /**
216
- * Returns health status of the Drug Safety API subsystem including
217
- * overall system health and availability.
218
- *
219
- * No authentication required. Designed for monitoring services.
220
- *
221
- * @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
222
- *
223
- * @example
224
- * await client.drugSafety.getDrugSafetyHealth()
225
- */
226
- getDrugSafetyHealth(requestOptions) {
227
- return core.HttpResponsePromise.fromPromise(this.__getDrugSafetyHealth(requestOptions));
228
- }
229
- __getDrugSafetyHealth(requestOptions) {
230
- return __awaiter(this, void 0, void 0, function* () {
231
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
232
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
233
- const _response = yield core.fetcher({
234
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SafeRxEnvironment.Production, "api/drug_safety/health"),
235
- method: "GET",
236
- headers: _headers,
237
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
238
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
239
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
240
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
241
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
242
- logging: this._options.logging,
243
- });
244
- if (_response.ok) {
245
- return { data: _response.body, rawResponse: _response.rawResponse };
246
- }
247
- if (_response.error.reason === "status-code") {
248
- throw new errors.SafeRxError({
249
- statusCode: _response.error.statusCode,
250
- body: _response.error.body,
251
- rawResponse: _response.rawResponse,
252
- });
253
- }
254
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/drug_safety/health");
255
- });
256
- }
257
- }
258
- exports.DrugSafetyClient = DrugSafetyClient;
@@ -1 +0,0 @@
1
- export * from "./requests/index.js";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -1,64 +0,0 @@
1
- import type * as SafeRx from "../../../../index.js";
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
- * Drug names to screen. Accepts trade names (e.g., "Augmentin 1g"),
35
- * generic names (e.g., "amoxicillin"), or partial matches.
36
- * Fuzzy matching resolves names to SafeRx product IDs.
37
- *
38
- * - **Free/Pro tier:** max 20 drugs per request
39
- * - **Enterprise tier:** max 50 drugs per request
40
- */
41
- drugs: string[];
42
- patient_profile?: SafeRx.PatientProfile;
43
- /**
44
- * Safety domains to check. Omit to run all six domains.
45
- * Including fewer domains reduces response size and may improve latency.
46
- */
47
- include?: SafeRx.DomainCode[];
48
- /**
49
- * Response language. Controls bilingual fields such as rationale text,
50
- * drug name translations, and clinical advice.
51
- */
52
- lang?: DrugSafetyCheckRequest.Lang;
53
- }
54
- export declare namespace DrugSafetyCheckRequest {
55
- /**
56
- * Response language. Controls bilingual fields such as rationale text,
57
- * drug name translations, and clinical advice.
58
- */
59
- const Lang: {
60
- readonly En: "en";
61
- readonly Ar: "ar";
62
- };
63
- type Lang = (typeof Lang)[keyof typeof Lang];
64
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DrugSafetyCheckRequest = void 0;
5
- var DrugSafetyCheckRequest;
6
- (function (DrugSafetyCheckRequest) {
7
- /**
8
- * Response language. Controls bilingual fields such as rationale text,
9
- * drug name translations, and clinical advice.
10
- */
11
- DrugSafetyCheckRequest.Lang = {
12
- En: "en",
13
- Ar: "ar",
14
- };
15
- })(DrugSafetyCheckRequest || (exports.DrugSafetyCheckRequest = DrugSafetyCheckRequest = {}));
@@ -1 +0,0 @@
1
- export { DrugSafetyCheckRequest } from "./DrugSafetyCheckRequest.js";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DrugSafetyCheckRequest = void 0;
4
- var DrugSafetyCheckRequest_js_1 = require("./DrugSafetyCheckRequest.js");
5
- Object.defineProperty(exports, "DrugSafetyCheckRequest", { enumerable: true, get: function () { return DrugSafetyCheckRequest_js_1.DrugSafetyCheckRequest; } });
@@ -1,2 +0,0 @@
1
- export * from "./client/index.js";
2
- export * from "./types/index.js";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client/index.js"), exports);
18
- __exportStar(require("./types/index.js"), exports);
@@ -1,26 +0,0 @@
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
- }
@@ -1,22 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.GetDrugSafetyHealthResponse = void 0;
5
- var GetDrugSafetyHealthResponse;
6
- (function (GetDrugSafetyHealthResponse) {
7
- GetDrugSafetyHealthResponse.Status = {
8
- Healthy: "healthy",
9
- Degraded: "degraded",
10
- };
11
- let Checks;
12
- (function (Checks) {
13
- let Value;
14
- (function (Value) {
15
- Value.Status = {
16
- Healthy: "healthy",
17
- Degraded: "degraded",
18
- Unhealthy: "unhealthy",
19
- };
20
- })(Value = Checks.Value || (Checks.Value = {}));
21
- })(Checks = GetDrugSafetyHealthResponse.Checks || (GetDrugSafetyHealthResponse.Checks = {}));
22
- })(GetDrugSafetyHealthResponse || (exports.GetDrugSafetyHealthResponse = GetDrugSafetyHealthResponse = {}));
@@ -1 +0,0 @@
1
- export * from "./GetDrugSafetyHealthResponse.js";