saferx-pharma-sdk
v2.0.2
Published
Signed TypeScript client for the SafeRx Enterprise API
Readme
saferx-pharma-sdk
Signed TypeScript client for the SafeRx Enterprise API.
Server-side use only. This client signs every request with your API key as the HMAC secret -- never import or bundle it into browser or client-controlled code.
npm install saferx-pharma-sdkimport { SafeRxClient } from "saferx-pharma-sdk";
const client = new SafeRxClient(
"https://saferx.online/api/enterprise/v1",
process.env.SAFERX_API_KEY!,
);
const result = await client.request("enterprise_safety_check", {
body: {
locale: "en",
medications: [{ input_text: "Augmentin 1g" }],
requested_domains: ["ddi"],
},
idempotencyKey: "safety-check-001",
});Full docs: https://docs.saferx.online
