saferx-pharma-sdk 0.0.39 → 0.0.51
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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/developers/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/developers/client/Client.js +1 -1
- package/dist/cjs/api/resources/drugSafety/client/Client.d.ts +10 -6
- package/dist/cjs/api/resources/drugSafety/client/Client.js +10 -6
- package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.ts +8 -5
- package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.ts +2 -14
- package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.js +0 -11
- package/dist/cjs/api/types/Alert.d.ts +8 -2
- package/dist/cjs/api/types/Alert.js +5 -1
- package/dist/cjs/api/types/AllergyCrossReactivityReference.d.ts +16 -0
- package/dist/cjs/api/types/AllergyCrossReactivityReference.js +3 -0
- package/dist/cjs/api/types/AllergyData.d.ts +24 -0
- package/dist/cjs/api/types/AllergyData.js +11 -0
- package/dist/cjs/api/types/AllergyFamilyReference.d.ts +10 -0
- package/dist/cjs/api/types/AllergyFamilyReference.js +3 -0
- package/dist/cjs/api/types/AllergyInputEntry.d.ts +10 -0
- package/dist/cjs/api/types/AllergyInputEntry.js +3 -0
- package/dist/cjs/api/types/AllergyProductFamilyReference.d.ts +9 -0
- package/dist/cjs/api/types/AllergyProductFamilyReference.js +3 -0
- package/dist/cjs/api/types/AllergySummary.d.ts +14 -0
- package/dist/cjs/api/types/AllergySummary.js +3 -0
- package/dist/cjs/api/types/AllergyWarning.d.ts +30 -0
- package/dist/cjs/api/types/AllergyWarning.js +11 -0
- package/dist/cjs/api/types/ClinicalAlert.d.ts +8 -0
- package/dist/cjs/api/types/ClinicalContextApplied.d.ts +10 -0
- package/dist/cjs/api/types/ClinicalContextApplied.js +3 -0
- package/dist/cjs/api/types/ClinicalData.d.ts +7 -4
- package/dist/cjs/api/types/DailyLimit.d.ts +1 -1
- package/dist/cjs/api/types/DomainCode.d.ts +4 -2
- package/dist/cjs/api/types/DomainCode.js +4 -2
- package/dist/cjs/api/types/DosingData.d.ts +22 -12
- package/dist/cjs/api/types/DosingData.js +3 -3
- package/dist/cjs/api/types/ErrorResponse.d.ts +5 -0
- package/dist/cjs/api/types/IdentityMatch.d.ts +13 -0
- package/dist/cjs/api/types/IdentityMatch.js +3 -0
- package/dist/cjs/api/types/Interaction.d.ts +0 -2
- package/dist/cjs/api/types/InteractionSummary.d.ts +4 -4
- package/dist/cjs/api/types/Meta.d.ts +2 -0
- package/dist/cjs/api/types/Meta.js +1 -0
- package/dist/cjs/api/types/MetadataResponse.d.ts +14 -6
- package/dist/cjs/api/types/MetadataResponse.js +1 -0
- package/dist/cjs/api/types/PatientProfile.d.ts +31 -0
- package/dist/cjs/api/types/PatientProfile.js +17 -0
- package/dist/cjs/api/types/QuotaMeta.d.ts +11 -0
- package/dist/cjs/api/types/QuotaMeta.js +3 -0
- package/dist/cjs/api/types/RateLimitResponse.d.ts +11 -0
- package/dist/cjs/api/types/RateLimitResponse.js +1 -0
- package/dist/cjs/api/types/ResolvedDrug.d.ts +26 -0
- package/dist/cjs/api/types/SafetyData.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +10 -0
- package/dist/cjs/api/types/index.js +10 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/developers/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/developers/client/Client.mjs +1 -1
- package/dist/esm/api/resources/drugSafety/client/Client.d.mts +10 -6
- package/dist/esm/api/resources/drugSafety/client/Client.mjs +10 -6
- package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.mts +8 -5
- package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.mts +2 -14
- package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.mjs +0 -11
- package/dist/esm/api/types/Alert.d.mts +8 -2
- package/dist/esm/api/types/Alert.mjs +5 -1
- package/dist/esm/api/types/AllergyCrossReactivityReference.d.mts +16 -0
- package/dist/esm/api/types/AllergyCrossReactivityReference.mjs +2 -0
- package/dist/esm/api/types/AllergyData.d.mts +24 -0
- package/dist/esm/api/types/AllergyData.mjs +8 -0
- package/dist/esm/api/types/AllergyFamilyReference.d.mts +10 -0
- package/dist/esm/api/types/AllergyFamilyReference.mjs +2 -0
- package/dist/esm/api/types/AllergyInputEntry.d.mts +10 -0
- package/dist/esm/api/types/AllergyInputEntry.mjs +2 -0
- package/dist/esm/api/types/AllergyProductFamilyReference.d.mts +9 -0
- package/dist/esm/api/types/AllergyProductFamilyReference.mjs +2 -0
- package/dist/esm/api/types/AllergySummary.d.mts +14 -0
- package/dist/esm/api/types/AllergySummary.mjs +2 -0
- package/dist/esm/api/types/AllergyWarning.d.mts +30 -0
- package/dist/esm/api/types/AllergyWarning.mjs +8 -0
- package/dist/esm/api/types/ClinicalAlert.d.mts +8 -0
- package/dist/esm/api/types/ClinicalContextApplied.d.mts +10 -0
- package/dist/esm/api/types/ClinicalContextApplied.mjs +2 -0
- package/dist/esm/api/types/ClinicalData.d.mts +7 -4
- package/dist/esm/api/types/DailyLimit.d.mts +1 -1
- package/dist/esm/api/types/DomainCode.d.mts +4 -2
- package/dist/esm/api/types/DomainCode.mjs +4 -2
- package/dist/esm/api/types/DosingData.d.mts +22 -12
- package/dist/esm/api/types/DosingData.mjs +3 -3
- package/dist/esm/api/types/ErrorResponse.d.mts +5 -0
- package/dist/esm/api/types/IdentityMatch.d.mts +13 -0
- package/dist/esm/api/types/IdentityMatch.mjs +2 -0
- package/dist/esm/api/types/Interaction.d.mts +0 -2
- package/dist/esm/api/types/InteractionSummary.d.mts +4 -4
- package/dist/esm/api/types/Meta.d.mts +2 -0
- package/dist/esm/api/types/Meta.mjs +1 -0
- package/dist/esm/api/types/MetadataResponse.d.mts +14 -6
- package/dist/esm/api/types/MetadataResponse.mjs +1 -0
- package/dist/esm/api/types/PatientProfile.d.mts +31 -0
- package/dist/esm/api/types/PatientProfile.mjs +16 -1
- package/dist/esm/api/types/QuotaMeta.d.mts +11 -0
- package/dist/esm/api/types/QuotaMeta.mjs +2 -0
- package/dist/esm/api/types/RateLimitResponse.d.mts +11 -0
- package/dist/esm/api/types/RateLimitResponse.mjs +1 -0
- package/dist/esm/api/types/ResolvedDrug.d.mts +26 -0
- package/dist/esm/api/types/SafetyData.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +10 -0
- package/dist/esm/api/types/index.mjs +10 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as SafeRx from "../index.js";
|
|
1
2
|
export interface ErrorResponse {
|
|
2
3
|
/** Error indicator or error message */
|
|
3
4
|
error?: ErrorResponse.Error_ | undefined;
|
|
@@ -15,6 +16,10 @@ export interface ErrorResponse {
|
|
|
15
16
|
hint?: string | undefined;
|
|
16
17
|
/** Support email for assistance */
|
|
17
18
|
support?: string | undefined;
|
|
19
|
+
/** Invalid safety domain codes supplied in `include`. */
|
|
20
|
+
invalid_domains?: string[] | undefined;
|
|
21
|
+
/** Valid safety domain codes. */
|
|
22
|
+
valid_domains?: SafeRx.DomainCode[] | undefined;
|
|
18
23
|
}
|
|
19
24
|
export declare namespace ErrorResponse {
|
|
20
25
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Non-sensitive drug identity resolution metadata for auditability.
|
|
3
|
+
*/
|
|
4
|
+
export interface IdentityMatch {
|
|
5
|
+
/** Resolver path that produced the match. */
|
|
6
|
+
method?: string | undefined;
|
|
7
|
+
/** Match confidence score. */
|
|
8
|
+
confidence?: number | undefined;
|
|
9
|
+
/** Public drug field used for the match. */
|
|
10
|
+
matched_field?: string | undefined;
|
|
11
|
+
/** Public-safe value that matched the input. */
|
|
12
|
+
matched_value?: string | undefined;
|
|
13
|
+
}
|
|
@@ -46,8 +46,6 @@ export interface Interaction {
|
|
|
46
46
|
recommendation?: string | undefined;
|
|
47
47
|
/** Clinical recommendation in Arabic */
|
|
48
48
|
recommendation_ar?: string | undefined;
|
|
49
|
-
/** Data source */
|
|
50
|
-
source?: string | undefined;
|
|
51
49
|
}
|
|
52
50
|
export declare namespace Interaction {
|
|
53
51
|
/** Human-readable severity label */
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Interaction count by severity level for quick triage
|
|
3
3
|
*/
|
|
4
4
|
export interface InteractionSummary {
|
|
5
|
-
/** Number of contraindicated (severity
|
|
5
|
+
/** Number of contraindicated (severity 4) interactions */
|
|
6
6
|
contraindicated?: number | undefined;
|
|
7
|
-
/** Number of major (severity
|
|
7
|
+
/** Number of major (severity 3) interactions */
|
|
8
8
|
major?: number | undefined;
|
|
9
|
-
/** Number of moderate (severity
|
|
9
|
+
/** Number of moderate (severity 2) interactions */
|
|
10
10
|
moderate?: number | undefined;
|
|
11
|
-
/** Number of minor (severity
|
|
11
|
+
/** Number of minor (severity 1) interactions */
|
|
12
12
|
minor?: number | undefined;
|
|
13
13
|
}
|
|
@@ -15,11 +15,13 @@ export interface Meta {
|
|
|
15
15
|
unresolved_count?: number | undefined;
|
|
16
16
|
/** Caller's current tier */
|
|
17
17
|
tier?: Meta.Tier | undefined;
|
|
18
|
+
quota?: SafeRx.QuotaMeta | undefined;
|
|
18
19
|
}
|
|
19
20
|
export declare namespace Meta {
|
|
20
21
|
/** Caller's current tier */
|
|
21
22
|
const Tier: {
|
|
22
23
|
readonly Free: "free";
|
|
24
|
+
readonly Startup: "startup";
|
|
23
25
|
readonly Pro: "pro";
|
|
24
26
|
readonly Enterprise: "enterprise";
|
|
25
27
|
};
|
|
@@ -42,6 +42,8 @@ export declare namespace MetadataResponse {
|
|
|
42
42
|
ae_risk_levels?: string[] | undefined;
|
|
43
43
|
/** DDI severity scale: integer key → label */
|
|
44
44
|
ddi_severity?: Record<string, string> | undefined;
|
|
45
|
+
/** Allergy warning severity scale: integer key → label */
|
|
46
|
+
allergy_severity?: Record<string, string> | undefined;
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Current database versions
|
|
@@ -52,7 +54,8 @@ export declare namespace MetadataResponse {
|
|
|
52
54
|
clinical?: string | undefined;
|
|
53
55
|
pllr?: string | undefined;
|
|
54
56
|
food?: string | undefined;
|
|
55
|
-
|
|
57
|
+
clinical_dose?: string | undefined;
|
|
58
|
+
allergy?: string | undefined;
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* Database coverage statistics
|
|
@@ -69,15 +72,20 @@ export declare namespace MetadataResponse {
|
|
|
69
72
|
/** Number of supported populations */
|
|
70
73
|
clinical_populations?: number | undefined;
|
|
71
74
|
/** Products with dose data */
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
/** Products with
|
|
76
|
-
|
|
75
|
+
clinical_dose_products?: number | undefined;
|
|
76
|
+
/** Dose data schema version */
|
|
77
|
+
clinical_dose_schema_version?: string | undefined;
|
|
78
|
+
/** Products with allergy reference data */
|
|
79
|
+
allergy_products?: number | undefined;
|
|
80
|
+
/** Allergy family count */
|
|
81
|
+
allergy_families?: number | undefined;
|
|
82
|
+
/** Allergy family cross-reaction pair count */
|
|
83
|
+
allergy_cross_reaction_pairs?: number | undefined;
|
|
77
84
|
}
|
|
78
85
|
/** Caller's current tier */
|
|
79
86
|
const Tier: {
|
|
80
87
|
readonly Free: "free";
|
|
88
|
+
readonly Startup: "startup";
|
|
81
89
|
readonly Pro: "pro";
|
|
82
90
|
readonly Enterprise: "enterprise";
|
|
83
91
|
};
|
|
@@ -9,4 +9,35 @@ export interface PatientProfile {
|
|
|
9
9
|
populations?: SafeRx.Population[] | undefined;
|
|
10
10
|
/** Patient comorbidities (e.g., diabetes, hypertension) */
|
|
11
11
|
conditions?: SafeRx.Condition[] | undefined;
|
|
12
|
+
/** Known patient allergies for the `allergy` domain. */
|
|
13
|
+
allergies?: string[] | undefined;
|
|
14
|
+
/** Patient age in years. Used to infer pediatric or geriatric clinical-dose context. */
|
|
15
|
+
age?: number | undefined;
|
|
16
|
+
/** Patient weight in kilograms. Used for pediatric weight-based dose context when available. */
|
|
17
|
+
weight_kg?: number | undefined;
|
|
18
|
+
/** Creatinine clearance in mL/min. Supplying this infers the `renal` population and returns matched renal dose-adjustment context when available. */
|
|
19
|
+
crcl?: number | undefined;
|
|
20
|
+
/** eGFR value accepted as a fallback renal-function input when `crcl` is not supplied. */
|
|
21
|
+
egfr?: number | undefined;
|
|
22
|
+
/** Child-Pugh class. Supplying this infers the `hepatic` population and returns matched hepatic dose-adjustment context when available. */
|
|
23
|
+
child_pugh?: PatientProfile.ChildPugh | undefined;
|
|
24
|
+
/** Hepatic impairment severity. `mild`, `moderate`, and `severe` map to hepatic clinical-dose context when `child_pugh` is not supplied. */
|
|
25
|
+
hepatic_status?: PatientProfile.HepaticStatus | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare namespace PatientProfile {
|
|
28
|
+
/** Child-Pugh class. Supplying this infers the `hepatic` population and returns matched hepatic dose-adjustment context when available. */
|
|
29
|
+
const ChildPugh: {
|
|
30
|
+
readonly A: "A";
|
|
31
|
+
readonly B: "B";
|
|
32
|
+
readonly C: "C";
|
|
33
|
+
};
|
|
34
|
+
type ChildPugh = (typeof ChildPugh)[keyof typeof ChildPugh];
|
|
35
|
+
/** Hepatic impairment severity. `mild`, `moderate`, and `severe` map to hepatic clinical-dose context when `child_pugh` is not supplied. */
|
|
36
|
+
const HepaticStatus: {
|
|
37
|
+
readonly Normal: "normal";
|
|
38
|
+
readonly Mild: "mild";
|
|
39
|
+
readonly Moderate: "moderate";
|
|
40
|
+
readonly Severe: "severe";
|
|
41
|
+
};
|
|
42
|
+
type HepaticStatus = (typeof HepaticStatus)[keyof typeof HepaticStatus];
|
|
12
43
|
}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PatientProfile = void 0;
|
|
5
|
+
var PatientProfile;
|
|
6
|
+
(function (PatientProfile) {
|
|
7
|
+
/** Child-Pugh class. Supplying this infers the `hepatic` population and returns matched hepatic dose-adjustment context when available. */
|
|
8
|
+
PatientProfile.ChildPugh = {
|
|
9
|
+
A: "A",
|
|
10
|
+
B: "B",
|
|
11
|
+
C: "C",
|
|
12
|
+
};
|
|
13
|
+
/** Hepatic impairment severity. `mild`, `moderate`, and `severe` map to hepatic clinical-dose context when `child_pugh` is not supplied. */
|
|
14
|
+
PatientProfile.HepaticStatus = {
|
|
15
|
+
Normal: "normal",
|
|
16
|
+
Mild: "mild",
|
|
17
|
+
Moderate: "moderate",
|
|
18
|
+
Severe: "severe",
|
|
19
|
+
};
|
|
20
|
+
})(PatientProfile || (exports.PatientProfile = PatientProfile = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monthly quota accounting for the request.
|
|
3
|
+
*/
|
|
4
|
+
export interface QuotaMeta {
|
|
5
|
+
monthly_limit?: number | undefined;
|
|
6
|
+
monthly_used?: number | undefined;
|
|
7
|
+
monthly_remaining?: number | undefined;
|
|
8
|
+
reset_at?: string | undefined;
|
|
9
|
+
/** Units consumed by this response. Unresolved-only checks return 0. */
|
|
10
|
+
billable_units?: number | undefined;
|
|
11
|
+
}
|
|
@@ -11,6 +11,16 @@ export interface RateLimitResponse {
|
|
|
11
11
|
daily_limit?: number | undefined;
|
|
12
12
|
/** Requests made today (present on daily limit errors) */
|
|
13
13
|
requests_today?: number | undefined;
|
|
14
|
+
/** Machine-readable limit reason */
|
|
15
|
+
reason?: string | undefined;
|
|
16
|
+
/** Your monthly commercial quota (present on monthly quota errors) */
|
|
17
|
+
monthly_limit?: number | undefined;
|
|
18
|
+
/** Requests consumed in the current monthly quota period */
|
|
19
|
+
requests_this_month?: number | undefined;
|
|
20
|
+
/** Remaining monthly quota units */
|
|
21
|
+
monthly_remaining?: number | undefined;
|
|
22
|
+
/** Monthly quota reset timestamp */
|
|
23
|
+
reset_at?: string | undefined;
|
|
14
24
|
tier?: RateLimitResponse.Tier | undefined;
|
|
15
25
|
/** Upgrade guidance */
|
|
16
26
|
hint?: string | undefined;
|
|
@@ -19,6 +29,7 @@ export interface RateLimitResponse {
|
|
|
19
29
|
export declare namespace RateLimitResponse {
|
|
20
30
|
const Tier: {
|
|
21
31
|
readonly Free: "free";
|
|
32
|
+
readonly Startup: "startup";
|
|
22
33
|
readonly Pro: "pro";
|
|
23
34
|
readonly Enterprise: "enterprise";
|
|
24
35
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as SafeRx from "../index.js";
|
|
1
2
|
export interface ResolvedDrug {
|
|
2
3
|
/** The original drug name as submitted in the request */
|
|
3
4
|
input: string;
|
|
@@ -17,6 +18,10 @@ export interface ResolvedDrug {
|
|
|
17
18
|
brand_name: string;
|
|
18
19
|
/** Arabic trade name */
|
|
19
20
|
brand_name_ar?: string | undefined;
|
|
21
|
+
/** Concise registered name plus strength, useful for app display and local matching. */
|
|
22
|
+
display_name?: string | undefined;
|
|
23
|
+
/** Arabic concise registered name plus strength, when available. */
|
|
24
|
+
display_name_ar?: string | undefined;
|
|
20
25
|
/** Active pharmaceutical ingredient(s), pipe-separated for combinations */
|
|
21
26
|
active_ingredient: string;
|
|
22
27
|
/** Arabic active ingredient name */
|
|
@@ -29,10 +34,30 @@ export interface ResolvedDrug {
|
|
|
29
34
|
form: string;
|
|
30
35
|
/** Arabic dosage form */
|
|
31
36
|
form_ar?: string | undefined;
|
|
37
|
+
/** Registered strength text as listed for the product. */
|
|
38
|
+
strength?: string | undefined;
|
|
39
|
+
/** Administration route, when available. */
|
|
40
|
+
route?: string | undefined;
|
|
32
41
|
/** Marketing authorization holder */
|
|
33
42
|
manufacturer_en?: string | undefined;
|
|
34
43
|
/** ATC-based therapeutic classification, pipe-separated hierarchy */
|
|
35
44
|
therapeutic_class?: string | undefined;
|
|
45
|
+
/** Public therapeutic/pharmacology summary in English. */
|
|
46
|
+
therapeutic_class_detail?: string | undefined;
|
|
47
|
+
/** Public therapeutic/pharmacology summary in Arabic, when available. */
|
|
48
|
+
therapeutic_class_detail_ar?: string | undefined;
|
|
49
|
+
/** Registered pharmaceutical uses or indications in English, when available. */
|
|
50
|
+
pharma_uses?: string | undefined;
|
|
51
|
+
/** Registered pharmaceutical uses or indications in Arabic, when available. */
|
|
52
|
+
pharma_uses_ar?: string | undefined;
|
|
53
|
+
/** Patient/app-friendly product description in English, when available. */
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
/** Patient/app-friendly product description in Arabic, when available. */
|
|
56
|
+
description_ar?: string | undefined;
|
|
57
|
+
/** Mechanism of action summary in English, when available. */
|
|
58
|
+
mechanism?: string | undefined;
|
|
59
|
+
/** Public warning summary in English, when available. */
|
|
60
|
+
warnings?: string | undefined;
|
|
36
61
|
/** Primary prescribing specialty */
|
|
37
62
|
medical_specialty?: string | undefined;
|
|
38
63
|
/** Distribution/supply company (may be empty) */
|
|
@@ -41,4 +66,5 @@ export interface ResolvedDrug {
|
|
|
41
66
|
barcode?: string | undefined;
|
|
42
67
|
/** Current price in Egyptian Pounds (EGP) */
|
|
43
68
|
price_egp?: number | undefined;
|
|
69
|
+
identity_match?: SafeRx.IdentityMatch | undefined;
|
|
44
70
|
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export * from "./AdverseEffect.js";
|
|
2
2
|
export * from "./Alert.js";
|
|
3
|
+
export * from "./AllergyCrossReactivityReference.js";
|
|
4
|
+
export * from "./AllergyData.js";
|
|
5
|
+
export * from "./AllergyFamilyReference.js";
|
|
6
|
+
export * from "./AllergyInputEntry.js";
|
|
7
|
+
export * from "./AllergyProductFamilyReference.js";
|
|
8
|
+
export * from "./AllergySummary.js";
|
|
9
|
+
export * from "./AllergyWarning.js";
|
|
3
10
|
export * from "./BadRequestErrorBody.js";
|
|
4
11
|
export * from "./BlackBoxWarning.js";
|
|
5
12
|
export * from "./BlockedResponse.js";
|
|
6
13
|
export * from "./ClinicalAlert.js";
|
|
7
14
|
export * from "./ClinicalConcern.js";
|
|
15
|
+
export * from "./ClinicalContextApplied.js";
|
|
8
16
|
export * from "./ClinicalData.js";
|
|
9
17
|
export * from "./Condition.js";
|
|
10
18
|
export * from "./DailyLimit.js";
|
|
@@ -18,6 +26,7 @@ export * from "./ErrorResponse.js";
|
|
|
18
26
|
export * from "./FoodConflict.js";
|
|
19
27
|
export * from "./FoodData.js";
|
|
20
28
|
export * from "./ForbiddenErrorBody.js";
|
|
29
|
+
export * from "./IdentityMatch.js";
|
|
21
30
|
export * from "./IntelligenceClinicalProfile.js";
|
|
22
31
|
export * from "./IntelligenceContext.js";
|
|
23
32
|
export * from "./IntelligenceProcessorError.js";
|
|
@@ -35,6 +44,7 @@ export * from "./Monitoring.js";
|
|
|
35
44
|
export * from "./PatientProfile.js";
|
|
36
45
|
export * from "./Population.js";
|
|
37
46
|
export * from "./PopulationMonitoring.js";
|
|
47
|
+
export * from "./QuotaMeta.js";
|
|
38
48
|
export * from "./RateLimitResponse.js";
|
|
39
49
|
export * from "./ReferenceDose.js";
|
|
40
50
|
export * from "./ReproductiveSafetyData.js";
|
|
@@ -16,11 +16,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AdverseEffect.js"), exports);
|
|
18
18
|
__exportStar(require("./Alert.js"), exports);
|
|
19
|
+
__exportStar(require("./AllergyCrossReactivityReference.js"), exports);
|
|
20
|
+
__exportStar(require("./AllergyData.js"), exports);
|
|
21
|
+
__exportStar(require("./AllergyFamilyReference.js"), exports);
|
|
22
|
+
__exportStar(require("./AllergyInputEntry.js"), exports);
|
|
23
|
+
__exportStar(require("./AllergyProductFamilyReference.js"), exports);
|
|
24
|
+
__exportStar(require("./AllergySummary.js"), exports);
|
|
25
|
+
__exportStar(require("./AllergyWarning.js"), exports);
|
|
19
26
|
__exportStar(require("./BadRequestErrorBody.js"), exports);
|
|
20
27
|
__exportStar(require("./BlackBoxWarning.js"), exports);
|
|
21
28
|
__exportStar(require("./BlockedResponse.js"), exports);
|
|
22
29
|
__exportStar(require("./ClinicalAlert.js"), exports);
|
|
23
30
|
__exportStar(require("./ClinicalConcern.js"), exports);
|
|
31
|
+
__exportStar(require("./ClinicalContextApplied.js"), exports);
|
|
24
32
|
__exportStar(require("./ClinicalData.js"), exports);
|
|
25
33
|
__exportStar(require("./Condition.js"), exports);
|
|
26
34
|
__exportStar(require("./DailyLimit.js"), exports);
|
|
@@ -34,6 +42,7 @@ __exportStar(require("./ErrorResponse.js"), exports);
|
|
|
34
42
|
__exportStar(require("./FoodConflict.js"), exports);
|
|
35
43
|
__exportStar(require("./FoodData.js"), exports);
|
|
36
44
|
__exportStar(require("./ForbiddenErrorBody.js"), exports);
|
|
45
|
+
__exportStar(require("./IdentityMatch.js"), exports);
|
|
37
46
|
__exportStar(require("./IntelligenceClinicalProfile.js"), exports);
|
|
38
47
|
__exportStar(require("./IntelligenceContext.js"), exports);
|
|
39
48
|
__exportStar(require("./IntelligenceProcessorError.js"), exports);
|
|
@@ -51,6 +60,7 @@ __exportStar(require("./Monitoring.js"), exports);
|
|
|
51
60
|
__exportStar(require("./PatientProfile.js"), exports);
|
|
52
61
|
__exportStar(require("./Population.js"), exports);
|
|
53
62
|
__exportStar(require("./PopulationMonitoring.js"), exports);
|
|
63
|
+
__exportStar(require("./QuotaMeta.js"), exports);
|
|
54
64
|
__exportStar(require("./RateLimitResponse.js"), exports);
|
|
55
65
|
__exportStar(require("./ReferenceDose.js"), exports);
|
|
56
66
|
__exportStar(require("./ReproductiveSafetyData.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.51";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "saferx-pharma-sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "saferx-pharma-sdk/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.51",
|
|
10
|
+
"User-Agent": "saferx-pharma-sdk/0.0.51",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -37,7 +37,7 @@ export declare class DevelopersClient {
|
|
|
37
37
|
* - Code expires after 30 minutes
|
|
38
38
|
* - Max 5 wrong attempts per code (then must request new code)
|
|
39
39
|
* - On success: issues sfx_free_ key (persistent, 1 per email)
|
|
40
|
-
* - Free tier: 20 requests/minute, 60
|
|
40
|
+
* - Free tier: 100 checks/month, 20 requests/minute anti-abuse, 60/day safety cap
|
|
41
41
|
*
|
|
42
42
|
* @param {SafeRx.VerifyFreeKeyDevelopersRequest} request
|
|
43
43
|
* @param {DevelopersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -88,7 +88,7 @@ export class DevelopersClient {
|
|
|
88
88
|
* - Code expires after 30 minutes
|
|
89
89
|
* - Max 5 wrong attempts per code (then must request new code)
|
|
90
90
|
* - On success: issues sfx_free_ key (persistent, 1 per email)
|
|
91
|
-
* - Free tier: 20 requests/minute, 60
|
|
91
|
+
* - Free tier: 100 checks/month, 20 requests/minute anti-abuse, 60/day safety cap
|
|
92
92
|
*
|
|
93
93
|
* @param {SafeRx.VerifyFreeKeyDevelopersRequest} request
|
|
94
94
|
* @param {DevelopersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -14,12 +14,14 @@ export declare class DrugSafetyClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<DrugSafetyClient.Options>;
|
|
15
15
|
constructor(options?: DrugSafetyClient.Options);
|
|
16
16
|
/**
|
|
17
|
-
* Screen one or more drugs across
|
|
17
|
+
* Screen one or more drugs across seven safety domains in a single request.
|
|
18
18
|
*
|
|
19
19
|
* The API resolves drug names via fuzzy matching, runs all requested safety
|
|
20
20
|
* checks in parallel, and returns a unified response with alerts bubbled to
|
|
21
21
|
* the top for easy triage.
|
|
22
22
|
*
|
|
23
|
+
* This endpoint is API-key only. It does not require `X-SafeRx-Token`.
|
|
24
|
+
*
|
|
23
25
|
* **Typical response time:** ~40ms (warm cache, 3 drugs, all domains).
|
|
24
26
|
*
|
|
25
27
|
* @param {SafeRx.DrugSafetyCheckRequest} request
|
|
@@ -42,9 +44,10 @@ export declare class DrugSafetyClient {
|
|
|
42
44
|
* drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
|
|
43
45
|
* patient_profile: {
|
|
44
46
|
* populations: ["geriatric", "renal"],
|
|
45
|
-
* conditions: ["diabetes", "hypertension"]
|
|
47
|
+
* conditions: ["diabetes", "hypertension"],
|
|
48
|
+
* allergies: ["penicillin"]
|
|
46
49
|
* },
|
|
47
|
-
* include: ["ae", "ddi", "pllr", "clinical"],
|
|
50
|
+
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
48
51
|
* lang: "en"
|
|
49
52
|
* })
|
|
50
53
|
*
|
|
@@ -74,7 +77,7 @@ export declare class DrugSafetyClient {
|
|
|
74
77
|
* status: "historical"
|
|
75
78
|
* }]
|
|
76
79
|
* },
|
|
77
|
-
* include: ["ae", "ddi", "pllr", "clinical", "dose"],
|
|
80
|
+
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
78
81
|
* lang: "en"
|
|
79
82
|
* })
|
|
80
83
|
*
|
|
@@ -113,10 +116,11 @@ export declare class DrugSafetyClient {
|
|
|
113
116
|
getMetadata(requestOptions?: DrugSafetyClient.RequestOptions): core.HttpResponsePromise<SafeRx.MetadataResponse>;
|
|
114
117
|
private __getMetadata;
|
|
115
118
|
/**
|
|
116
|
-
* Returns health status of the Drug Safety API subsystem
|
|
117
|
-
* overall system health and availability.
|
|
119
|
+
* Returns minimal health status of the Drug Safety API subsystem.
|
|
118
120
|
*
|
|
119
121
|
* No authentication required. Designed for monitoring services.
|
|
122
|
+
* The public enterprise health endpoint intentionally does not expose
|
|
123
|
+
* database counts, module internals, or detailed dependency checks.
|
|
120
124
|
*
|
|
121
125
|
* @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
126
|
*
|
|
@@ -23,12 +23,14 @@ export class DrugSafetyClient {
|
|
|
23
23
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Screen one or more drugs across
|
|
26
|
+
* Screen one or more drugs across seven safety domains in a single request.
|
|
27
27
|
*
|
|
28
28
|
* The API resolves drug names via fuzzy matching, runs all requested safety
|
|
29
29
|
* checks in parallel, and returns a unified response with alerts bubbled to
|
|
30
30
|
* the top for easy triage.
|
|
31
31
|
*
|
|
32
|
+
* This endpoint is API-key only. It does not require `X-SafeRx-Token`.
|
|
33
|
+
*
|
|
32
34
|
* **Typical response time:** ~40ms (warm cache, 3 drugs, all domains).
|
|
33
35
|
*
|
|
34
36
|
* @param {SafeRx.DrugSafetyCheckRequest} request
|
|
@@ -51,9 +53,10 @@ export class DrugSafetyClient {
|
|
|
51
53
|
* drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
|
|
52
54
|
* patient_profile: {
|
|
53
55
|
* populations: ["geriatric", "renal"],
|
|
54
|
-
* conditions: ["diabetes", "hypertension"]
|
|
56
|
+
* conditions: ["diabetes", "hypertension"],
|
|
57
|
+
* allergies: ["penicillin"]
|
|
55
58
|
* },
|
|
56
|
-
* include: ["ae", "ddi", "pllr", "clinical"],
|
|
59
|
+
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
57
60
|
* lang: "en"
|
|
58
61
|
* })
|
|
59
62
|
*
|
|
@@ -83,7 +86,7 @@ export class DrugSafetyClient {
|
|
|
83
86
|
* status: "historical"
|
|
84
87
|
* }]
|
|
85
88
|
* },
|
|
86
|
-
* include: ["ae", "ddi", "pllr", "clinical", "dose"],
|
|
89
|
+
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
87
90
|
* lang: "en"
|
|
88
91
|
* })
|
|
89
92
|
*
|
|
@@ -205,10 +208,11 @@ export class DrugSafetyClient {
|
|
|
205
208
|
});
|
|
206
209
|
}
|
|
207
210
|
/**
|
|
208
|
-
* Returns health status of the Drug Safety API subsystem
|
|
209
|
-
* overall system health and availability.
|
|
211
|
+
* Returns minimal health status of the Drug Safety API subsystem.
|
|
210
212
|
*
|
|
211
213
|
* No authentication required. Designed for monitoring services.
|
|
214
|
+
* The public enterprise health endpoint intentionally does not expose
|
|
215
|
+
* database counts, module internals, or detailed dependency checks.
|
|
212
216
|
*
|
|
213
217
|
* @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
214
218
|
*
|
|
@@ -11,9 +11,10 @@ import type * as SafeRx from "../../../../index.mjs";
|
|
|
11
11
|
* drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
|
|
12
12
|
* patient_profile: {
|
|
13
13
|
* populations: ["geriatric", "renal"],
|
|
14
|
-
* conditions: ["diabetes", "hypertension"]
|
|
14
|
+
* conditions: ["diabetes", "hypertension"],
|
|
15
|
+
* allergies: ["penicillin"]
|
|
15
16
|
* },
|
|
16
|
-
* include: ["ae", "ddi", "pllr", "clinical"],
|
|
17
|
+
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
17
18
|
* lang: "en"
|
|
18
19
|
* }
|
|
19
20
|
*
|
|
@@ -43,7 +44,7 @@ import type * as SafeRx from "../../../../index.mjs";
|
|
|
43
44
|
* status: "historical"
|
|
44
45
|
* }]
|
|
45
46
|
* },
|
|
46
|
-
* include: ["ae", "ddi", "pllr", "clinical", "dose"],
|
|
47
|
+
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
47
48
|
* lang: "en"
|
|
48
49
|
* }
|
|
49
50
|
*
|
|
@@ -72,8 +73,10 @@ export interface DrugSafetyCheckRequest {
|
|
|
72
73
|
patient_profile?: SafeRx.PatientProfile;
|
|
73
74
|
intelligence_context?: SafeRx.IntelligenceContext;
|
|
74
75
|
/**
|
|
75
|
-
* Safety domains to check. Omit to run all
|
|
76
|
-
*
|
|
76
|
+
* Safety domains to check. Omit or pass `null` to run all seven domains.
|
|
77
|
+
* When provided, `include` must be a non-empty array of valid lowercase
|
|
78
|
+
* domain codes. Unknown domain codes return `400 INVALID_INCLUDE_DOMAIN`.
|
|
79
|
+
* Duplicate valid domains are accepted and de-duplicated.
|
|
77
80
|
*/
|
|
78
81
|
include?: SafeRx.DomainCode[];
|
|
79
82
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export interface GetDrugSafetyHealthResponse {
|
|
2
2
|
status?: GetDrugSafetyHealthResponse.Status | undefined;
|
|
3
3
|
subsystem?: string | undefined;
|
|
4
|
-
|
|
4
|
+
/** Always empty on the public health endpoint. */
|
|
5
|
+
checks?: Record<string, unknown> | undefined;
|
|
5
6
|
latency_ms?: number | undefined;
|
|
6
7
|
}
|
|
7
8
|
export declare namespace GetDrugSafetyHealthResponse {
|
|
@@ -10,17 +11,4 @@ export declare namespace GetDrugSafetyHealthResponse {
|
|
|
10
11
|
readonly Degraded: "degraded";
|
|
11
12
|
};
|
|
12
13
|
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
14
|
}
|
|
@@ -5,15 +5,4 @@ export var GetDrugSafetyHealthResponse;
|
|
|
5
5
|
Healthy: "healthy",
|
|
6
6
|
Degraded: "degraded",
|
|
7
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
8
|
})(GetDrugSafetyHealthResponse || (GetDrugSafetyHealthResponse = {}));
|