saferx-pharma-sdk 1.4.2 → 2.0.1
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/Client.d.ts +0 -12
- package/dist/cjs/Client.js +0 -67
- 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 +5 -37
- package/dist/cjs/api/resources/drugSafety/client/Client.js +5 -37
- package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.ts +4 -38
- package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.ts +14 -2
- package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.js +11 -0
- package/dist/cjs/api/types/Alert.d.ts +2 -8
- package/dist/cjs/api/types/Alert.js +1 -5
- package/dist/cjs/api/types/ClinicalAlert.d.ts +0 -8
- package/dist/cjs/api/types/ClinicalData.d.ts +4 -7
- package/dist/cjs/api/types/DailyLimit.d.ts +1 -1
- package/dist/cjs/api/types/DomainCode.d.ts +2 -4
- package/dist/cjs/api/types/DomainCode.js +2 -4
- package/dist/cjs/api/types/DosingData.d.ts +12 -22
- package/dist/cjs/api/types/DosingData.js +3 -3
- package/dist/cjs/api/types/DrugSafetyCheckResponse.d.ts +0 -1
- package/dist/cjs/api/types/ErrorResponse.d.ts +0 -5
- package/dist/cjs/api/types/Interaction.d.ts +2 -0
- package/dist/cjs/api/types/InteractionSummary.d.ts +4 -4
- package/dist/cjs/api/types/Meta.d.ts +0 -2
- package/dist/cjs/api/types/Meta.js +0 -1
- package/dist/cjs/api/types/MetadataResponse.d.ts +6 -14
- package/dist/cjs/api/types/MetadataResponse.js +0 -1
- package/dist/cjs/api/types/PatientProfile.d.ts +0 -31
- package/dist/cjs/api/types/PatientProfile.js +0 -17
- package/dist/cjs/api/types/RateLimitResponse.d.ts +0 -11
- package/dist/cjs/api/types/RateLimitResponse.js +0 -1
- package/dist/cjs/api/types/ReproductiveSafetyData.d.ts +3 -3
- package/dist/cjs/api/types/ResolvedDrug.d.ts +0 -26
- package/dist/cjs/api/types/SafetyData.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +0 -16
- package/dist/cjs/api/types/index.js +0 -16
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/Fetcher.js +1 -1
- package/dist/cjs/core/fetcher/index.d.ts +0 -2
- package/dist/cjs/core/fetcher/index.js +1 -3
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -6
- package/dist/cjs/core/fetcher/makeRequest.js +9 -30
- package/dist/cjs/core/runtime/runtime.js +7 -8
- 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/Client.d.mts +0 -12
- package/dist/esm/Client.mjs +0 -34
- 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 +5 -37
- package/dist/esm/api/resources/drugSafety/client/Client.mjs +5 -37
- package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.mts +4 -38
- package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.mts +14 -2
- package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.mjs +11 -0
- package/dist/esm/api/types/Alert.d.mts +2 -8
- package/dist/esm/api/types/Alert.mjs +1 -5
- package/dist/esm/api/types/ClinicalAlert.d.mts +0 -8
- package/dist/esm/api/types/ClinicalData.d.mts +4 -7
- package/dist/esm/api/types/DailyLimit.d.mts +1 -1
- package/dist/esm/api/types/DomainCode.d.mts +2 -4
- package/dist/esm/api/types/DomainCode.mjs +2 -4
- package/dist/esm/api/types/DosingData.d.mts +12 -22
- package/dist/esm/api/types/DosingData.mjs +3 -3
- package/dist/esm/api/types/DrugSafetyCheckResponse.d.mts +0 -1
- package/dist/esm/api/types/ErrorResponse.d.mts +0 -5
- package/dist/esm/api/types/Interaction.d.mts +2 -0
- package/dist/esm/api/types/InteractionSummary.d.mts +4 -4
- package/dist/esm/api/types/Meta.d.mts +0 -2
- package/dist/esm/api/types/Meta.mjs +0 -1
- package/dist/esm/api/types/MetadataResponse.d.mts +6 -14
- package/dist/esm/api/types/MetadataResponse.mjs +0 -1
- package/dist/esm/api/types/PatientProfile.d.mts +0 -31
- package/dist/esm/api/types/PatientProfile.mjs +1 -16
- package/dist/esm/api/types/RateLimitResponse.d.mts +0 -11
- package/dist/esm/api/types/RateLimitResponse.mjs +0 -1
- package/dist/esm/api/types/ReproductiveSafetyData.d.mts +3 -3
- package/dist/esm/api/types/ResolvedDrug.d.mts +0 -26
- package/dist/esm/api/types/SafetyData.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +0 -16
- package/dist/esm/api/types/index.mjs +0 -16
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +1 -1
- package/dist/esm/core/fetcher/index.d.mts +0 -2
- package/dist/esm/core/fetcher/index.mjs +0 -1
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -6
- package/dist/esm/core/fetcher/makeRequest.mjs +9 -28
- package/dist/esm/core/runtime/runtime.mjs +7 -8
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +9 -31
- package/dist/cjs/api/resources/developers/exports.d.ts +0 -2
- package/dist/cjs/api/resources/developers/exports.js +0 -21
- package/dist/cjs/api/resources/drugSafety/exports.d.ts +0 -2
- package/dist/cjs/api/resources/drugSafety/exports.js +0 -21
- package/dist/cjs/api/types/AllergyCrossReactivityReference.d.ts +0 -16
- package/dist/cjs/api/types/AllergyCrossReactivityReference.js +0 -3
- package/dist/cjs/api/types/AllergyData.d.ts +0 -24
- package/dist/cjs/api/types/AllergyData.js +0 -11
- package/dist/cjs/api/types/AllergyFamilyReference.d.ts +0 -10
- package/dist/cjs/api/types/AllergyFamilyReference.js +0 -3
- package/dist/cjs/api/types/AllergyInputEntry.d.ts +0 -10
- package/dist/cjs/api/types/AllergyInputEntry.js +0 -3
- package/dist/cjs/api/types/AllergyProductFamilyReference.d.ts +0 -9
- package/dist/cjs/api/types/AllergyProductFamilyReference.js +0 -3
- package/dist/cjs/api/types/AllergySummary.d.ts +0 -14
- package/dist/cjs/api/types/AllergySummary.js +0 -3
- package/dist/cjs/api/types/AllergyWarning.d.ts +0 -30
- package/dist/cjs/api/types/AllergyWarning.js +0 -11
- package/dist/cjs/api/types/ClinicalContextApplied.d.ts +0 -10
- package/dist/cjs/api/types/ClinicalContextApplied.js +0 -3
- package/dist/cjs/api/types/IdentityMatch.d.ts +0 -13
- package/dist/cjs/api/types/IdentityMatch.js +0 -3
- package/dist/cjs/api/types/IntelligenceClinicalProfile.d.ts +0 -24
- package/dist/cjs/api/types/IntelligenceClinicalProfile.js +0 -13
- package/dist/cjs/api/types/IntelligenceContext.d.ts +0 -17
- package/dist/cjs/api/types/IntelligenceContext.js +0 -3
- package/dist/cjs/api/types/IntelligenceProcessorError.d.ts +0 -4
- package/dist/cjs/api/types/IntelligenceProcessorError.js +0 -3
- package/dist/cjs/api/types/IntelligenceResult.d.ts +0 -16
- package/dist/cjs/api/types/IntelligenceResult.js +0 -3
- package/dist/cjs/api/types/IntelligenceSynthesis.d.ts +0 -6
- package/dist/cjs/api/types/IntelligenceSynthesis.js +0 -3
- package/dist/cjs/api/types/MedicationHistoryItem.d.ts +0 -22
- package/dist/cjs/api/types/MedicationHistoryItem.js +0 -15
- package/dist/cjs/api/types/QuotaMeta.d.ts +0 -11
- package/dist/cjs/api/types/QuotaMeta.js +0 -3
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +0 -49
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +0 -135
- package/dist/esm/api/resources/developers/exports.d.mts +0 -2
- package/dist/esm/api/resources/developers/exports.mjs +0 -3
- package/dist/esm/api/resources/drugSafety/exports.d.mts +0 -2
- package/dist/esm/api/resources/drugSafety/exports.mjs +0 -3
- package/dist/esm/api/types/AllergyCrossReactivityReference.d.mts +0 -16
- package/dist/esm/api/types/AllergyCrossReactivityReference.mjs +0 -2
- package/dist/esm/api/types/AllergyData.d.mts +0 -24
- package/dist/esm/api/types/AllergyData.mjs +0 -8
- package/dist/esm/api/types/AllergyFamilyReference.d.mts +0 -10
- package/dist/esm/api/types/AllergyFamilyReference.mjs +0 -2
- package/dist/esm/api/types/AllergyInputEntry.d.mts +0 -10
- package/dist/esm/api/types/AllergyInputEntry.mjs +0 -2
- package/dist/esm/api/types/AllergyProductFamilyReference.d.mts +0 -9
- package/dist/esm/api/types/AllergyProductFamilyReference.mjs +0 -2
- package/dist/esm/api/types/AllergySummary.d.mts +0 -14
- package/dist/esm/api/types/AllergySummary.mjs +0 -2
- package/dist/esm/api/types/AllergyWarning.d.mts +0 -30
- package/dist/esm/api/types/AllergyWarning.mjs +0 -8
- package/dist/esm/api/types/ClinicalContextApplied.d.mts +0 -10
- package/dist/esm/api/types/ClinicalContextApplied.mjs +0 -2
- package/dist/esm/api/types/IdentityMatch.d.mts +0 -13
- package/dist/esm/api/types/IdentityMatch.mjs +0 -2
- package/dist/esm/api/types/IntelligenceClinicalProfile.d.mts +0 -24
- package/dist/esm/api/types/IntelligenceClinicalProfile.mjs +0 -10
- package/dist/esm/api/types/IntelligenceContext.d.mts +0 -17
- package/dist/esm/api/types/IntelligenceContext.mjs +0 -2
- package/dist/esm/api/types/IntelligenceProcessorError.d.mts +0 -4
- package/dist/esm/api/types/IntelligenceProcessorError.mjs +0 -2
- package/dist/esm/api/types/IntelligenceResult.d.mts +0 -16
- package/dist/esm/api/types/IntelligenceResult.mjs +0 -2
- package/dist/esm/api/types/IntelligenceSynthesis.d.mts +0 -6
- package/dist/esm/api/types/IntelligenceSynthesis.mjs +0 -2
- package/dist/esm/api/types/MedicationHistoryItem.d.mts +0 -22
- package/dist/esm/api/types/MedicationHistoryItem.mjs +0 -12
- package/dist/esm/api/types/QuotaMeta.d.mts +0 -11
- package/dist/esm/api/types/QuotaMeta.mjs +0 -2
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +0 -49
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +0 -132
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
3
|
-
(function (PatientProfile) {
|
|
4
|
-
/** Child-Pugh class. Supplying this infers the `hepatic` population and returns matched hepatic dose-adjustment context when available. */
|
|
5
|
-
PatientProfile.ChildPugh = {
|
|
6
|
-
A: "A",
|
|
7
|
-
B: "B",
|
|
8
|
-
C: "C",
|
|
9
|
-
};
|
|
10
|
-
/** Hepatic impairment severity. `mild`, `moderate`, and `severe` map to hepatic clinical-dose context when `child_pugh` is not supplied. */
|
|
11
|
-
PatientProfile.HepaticStatus = {
|
|
12
|
-
Normal: "normal",
|
|
13
|
-
Mild: "mild",
|
|
14
|
-
Moderate: "moderate",
|
|
15
|
-
Severe: "severe",
|
|
16
|
-
};
|
|
17
|
-
})(PatientProfile || (PatientProfile = {}));
|
|
2
|
+
export {};
|
|
@@ -11,16 +11,6 @@ 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;
|
|
24
14
|
tier?: RateLimitResponse.Tier | undefined;
|
|
25
15
|
/** Upgrade guidance */
|
|
26
16
|
hint?: string | undefined;
|
|
@@ -29,7 +19,6 @@ export interface RateLimitResponse {
|
|
|
29
19
|
export declare namespace RateLimitResponse {
|
|
30
20
|
const Tier: {
|
|
31
21
|
readonly Free: "free";
|
|
32
|
-
readonly Startup: "startup";
|
|
33
22
|
readonly Pro: "pro";
|
|
34
23
|
readonly Enterprise: "enterprise";
|
|
35
24
|
};
|
|
@@ -32,19 +32,19 @@ export interface ReproductiveSafetyData {
|
|
|
32
32
|
pregnancy_warning?: SafeRx.ReproductiveWarning | undefined;
|
|
33
33
|
lactation_warning?: SafeRx.ReproductiveWarning | undefined;
|
|
34
34
|
/** First trimester pregnancy risk classification */
|
|
35
|
-
preg_t1_risk?: (
|
|
35
|
+
preg_t1_risk?: (number | null) | undefined;
|
|
36
36
|
/** First trimester clinical note */
|
|
37
37
|
preg_t1_note?: (string | null) | undefined;
|
|
38
38
|
/** First trimester note in Arabic */
|
|
39
39
|
preg_t1_note_ar?: (string | null) | undefined;
|
|
40
40
|
/** Second trimester pregnancy risk classification */
|
|
41
|
-
preg_t2_risk?: (
|
|
41
|
+
preg_t2_risk?: (number | null) | undefined;
|
|
42
42
|
/** Second trimester clinical note */
|
|
43
43
|
preg_t2_note?: (string | null) | undefined;
|
|
44
44
|
/** Second trimester note in Arabic */
|
|
45
45
|
preg_t2_note_ar?: (string | null) | undefined;
|
|
46
46
|
/** Third trimester pregnancy risk classification */
|
|
47
|
-
preg_t3_risk?: (
|
|
47
|
+
preg_t3_risk?: (number | null) | undefined;
|
|
48
48
|
/** Third trimester clinical note */
|
|
49
49
|
preg_t3_note?: (string | null) | undefined;
|
|
50
50
|
/** Third trimester note in Arabic */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as SafeRx from "../index.mjs";
|
|
2
1
|
export interface ResolvedDrug {
|
|
3
2
|
/** The original drug name as submitted in the request */
|
|
4
3
|
input: string;
|
|
@@ -18,10 +17,6 @@ export interface ResolvedDrug {
|
|
|
18
17
|
brand_name: string;
|
|
19
18
|
/** Arabic trade name */
|
|
20
19
|
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;
|
|
25
20
|
/** Active pharmaceutical ingredient(s), pipe-separated for combinations */
|
|
26
21
|
active_ingredient: string;
|
|
27
22
|
/** Arabic active ingredient name */
|
|
@@ -34,30 +29,10 @@ export interface ResolvedDrug {
|
|
|
34
29
|
form: string;
|
|
35
30
|
/** Arabic dosage form */
|
|
36
31
|
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;
|
|
41
32
|
/** Marketing authorization holder */
|
|
42
33
|
manufacturer_en?: string | undefined;
|
|
43
34
|
/** ATC-based therapeutic classification, pipe-separated hierarchy */
|
|
44
35
|
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;
|
|
61
36
|
/** Primary prescribing specialty */
|
|
62
37
|
medical_specialty?: string | undefined;
|
|
63
38
|
/** Distribution/supply company (may be empty) */
|
|
@@ -66,5 +41,4 @@ export interface ResolvedDrug {
|
|
|
66
41
|
barcode?: string | undefined;
|
|
67
42
|
/** Current price in Egyptian Pounds (EGP) */
|
|
68
43
|
price_egp?: number | undefined;
|
|
69
|
-
identity_match?: SafeRx.IdentityMatch | undefined;
|
|
70
44
|
}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
export * from "./AdverseEffect.mjs";
|
|
2
2
|
export * from "./Alert.mjs";
|
|
3
|
-
export * from "./AllergyCrossReactivityReference.mjs";
|
|
4
|
-
export * from "./AllergyData.mjs";
|
|
5
|
-
export * from "./AllergyFamilyReference.mjs";
|
|
6
|
-
export * from "./AllergyInputEntry.mjs";
|
|
7
|
-
export * from "./AllergyProductFamilyReference.mjs";
|
|
8
|
-
export * from "./AllergySummary.mjs";
|
|
9
|
-
export * from "./AllergyWarning.mjs";
|
|
10
3
|
export * from "./BadRequestErrorBody.mjs";
|
|
11
4
|
export * from "./BlackBoxWarning.mjs";
|
|
12
5
|
export * from "./BlockedResponse.mjs";
|
|
13
6
|
export * from "./ClinicalAlert.mjs";
|
|
14
7
|
export * from "./ClinicalConcern.mjs";
|
|
15
|
-
export * from "./ClinicalContextApplied.mjs";
|
|
16
8
|
export * from "./ClinicalData.mjs";
|
|
17
9
|
export * from "./Condition.mjs";
|
|
18
10
|
export * from "./DailyLimit.mjs";
|
|
@@ -26,25 +18,17 @@ export * from "./ErrorResponse.mjs";
|
|
|
26
18
|
export * from "./FoodConflict.mjs";
|
|
27
19
|
export * from "./FoodData.mjs";
|
|
28
20
|
export * from "./ForbiddenErrorBody.mjs";
|
|
29
|
-
export * from "./IdentityMatch.mjs";
|
|
30
|
-
export * from "./IntelligenceClinicalProfile.mjs";
|
|
31
|
-
export * from "./IntelligenceContext.mjs";
|
|
32
|
-
export * from "./IntelligenceProcessorError.mjs";
|
|
33
|
-
export * from "./IntelligenceResult.mjs";
|
|
34
|
-
export * from "./IntelligenceSynthesis.mjs";
|
|
35
21
|
export * from "./Interaction.mjs";
|
|
36
22
|
export * from "./InteractionSummary.mjs";
|
|
37
23
|
export * from "./InteractionsData.mjs";
|
|
38
24
|
export * from "./InternalServerErrorBody.mjs";
|
|
39
25
|
export * from "./MealTiming.mjs";
|
|
40
|
-
export * from "./MedicationHistoryItem.mjs";
|
|
41
26
|
export * from "./Meta.mjs";
|
|
42
27
|
export * from "./MetadataResponse.mjs";
|
|
43
28
|
export * from "./Monitoring.mjs";
|
|
44
29
|
export * from "./PatientProfile.mjs";
|
|
45
30
|
export * from "./Population.mjs";
|
|
46
31
|
export * from "./PopulationMonitoring.mjs";
|
|
47
|
-
export * from "./QuotaMeta.mjs";
|
|
48
32
|
export * from "./RateLimitResponse.mjs";
|
|
49
33
|
export * from "./ReferenceDose.mjs";
|
|
50
34
|
export * from "./ReproductiveSafetyData.mjs";
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
export * from "./AdverseEffect.mjs";
|
|
2
2
|
export * from "./Alert.mjs";
|
|
3
|
-
export * from "./AllergyCrossReactivityReference.mjs";
|
|
4
|
-
export * from "./AllergyData.mjs";
|
|
5
|
-
export * from "./AllergyFamilyReference.mjs";
|
|
6
|
-
export * from "./AllergyInputEntry.mjs";
|
|
7
|
-
export * from "./AllergyProductFamilyReference.mjs";
|
|
8
|
-
export * from "./AllergySummary.mjs";
|
|
9
|
-
export * from "./AllergyWarning.mjs";
|
|
10
3
|
export * from "./BadRequestErrorBody.mjs";
|
|
11
4
|
export * from "./BlackBoxWarning.mjs";
|
|
12
5
|
export * from "./BlockedResponse.mjs";
|
|
13
6
|
export * from "./ClinicalAlert.mjs";
|
|
14
7
|
export * from "./ClinicalConcern.mjs";
|
|
15
|
-
export * from "./ClinicalContextApplied.mjs";
|
|
16
8
|
export * from "./ClinicalData.mjs";
|
|
17
9
|
export * from "./Condition.mjs";
|
|
18
10
|
export * from "./DailyLimit.mjs";
|
|
@@ -26,25 +18,17 @@ export * from "./ErrorResponse.mjs";
|
|
|
26
18
|
export * from "./FoodConflict.mjs";
|
|
27
19
|
export * from "./FoodData.mjs";
|
|
28
20
|
export * from "./ForbiddenErrorBody.mjs";
|
|
29
|
-
export * from "./IdentityMatch.mjs";
|
|
30
|
-
export * from "./IntelligenceClinicalProfile.mjs";
|
|
31
|
-
export * from "./IntelligenceContext.mjs";
|
|
32
|
-
export * from "./IntelligenceProcessorError.mjs";
|
|
33
|
-
export * from "./IntelligenceResult.mjs";
|
|
34
|
-
export * from "./IntelligenceSynthesis.mjs";
|
|
35
21
|
export * from "./Interaction.mjs";
|
|
36
22
|
export * from "./InteractionSummary.mjs";
|
|
37
23
|
export * from "./InteractionsData.mjs";
|
|
38
24
|
export * from "./InternalServerErrorBody.mjs";
|
|
39
25
|
export * from "./MealTiming.mjs";
|
|
40
|
-
export * from "./MedicationHistoryItem.mjs";
|
|
41
26
|
export * from "./Meta.mjs";
|
|
42
27
|
export * from "./MetadataResponse.mjs";
|
|
43
28
|
export * from "./Monitoring.mjs";
|
|
44
29
|
export * from "./PatientProfile.mjs";
|
|
45
30
|
export * from "./Population.mjs";
|
|
46
31
|
export * from "./PopulationMonitoring.mjs";
|
|
47
|
-
export * from "./QuotaMeta.mjs";
|
|
48
32
|
export * from "./RateLimitResponse.mjs";
|
|
49
33
|
export * from "./ReferenceDose.mjs";
|
|
50
34
|
export * from "./ReproductiveSafetyData.mjs";
|
|
@@ -14,6 +14,6 @@ export type BinaryResponse = {
|
|
|
14
14
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
|
|
15
15
|
* Some versions of the Fetch API may not support this method.
|
|
16
16
|
*/
|
|
17
|
-
bytes?():
|
|
17
|
+
bytes?(): ReturnType<Response["bytes"]>;
|
|
18
18
|
};
|
|
19
19
|
export declare function getBinaryResponse(response: Response): BinaryResponse;
|
|
@@ -202,7 +202,7 @@ export function fetcherImpl(args) {
|
|
|
202
202
|
}
|
|
203
203
|
try {
|
|
204
204
|
const response = yield requestWithRetries(() => __awaiter(this, void 0, void 0, function* () {
|
|
205
|
-
return makeRequest(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex
|
|
205
|
+
return makeRequest(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
206
206
|
}), args.maxRetries);
|
|
207
207
|
if (response.status >= 200 && response.status < 400) {
|
|
208
208
|
if (logger.isDebug()) {
|
|
@@ -6,8 +6,6 @@ export type { Fetcher, FetchFunction } from "./Fetcher.mjs";
|
|
|
6
6
|
export { fetcher } from "./Fetcher.mjs";
|
|
7
7
|
export { getHeader } from "./getHeader.mjs";
|
|
8
8
|
export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
|
|
9
|
-
export type { PassthroughRequest } from "./makePassthroughRequest.mjs";
|
|
10
|
-
export { makePassthroughRequest } from "./makePassthroughRequest.mjs";
|
|
11
9
|
export type { RawResponse, WithRawResponse } from "./RawResponse.mjs";
|
|
12
10
|
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
13
11
|
export { Supplier } from "./Supplier.mjs";
|
|
@@ -2,6 +2,5 @@ export { EndpointSupplier } from "./EndpointSupplier.mjs";
|
|
|
2
2
|
export { fetcher } from "./Fetcher.mjs";
|
|
3
3
|
export { getHeader } from "./getHeader.mjs";
|
|
4
4
|
export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
|
|
5
|
-
export { makePassthroughRequest } from "./makePassthroughRequest.mjs";
|
|
6
5
|
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
7
6
|
export { Supplier } from "./Supplier.mjs";
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
/**
|
|
3
|
-
* Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.
|
|
4
|
-
*/
|
|
5
|
-
export declare function resetCacheNoStoreSupported(): void;
|
|
6
|
-
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half", disableCache?: boolean) => Promise<Response>;
|
|
1
|
+
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
|
|
@@ -8,32 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { anySignal, getTimeoutSignal } from "./signals.mjs";
|
|
11
|
-
|
|
12
|
-
* Cached result of checking whether the current runtime supports
|
|
13
|
-
* the `cache` option in `Request`. Some runtimes (e.g. Cloudflare Workers)
|
|
14
|
-
* throw a TypeError when this option is used.
|
|
15
|
-
*/
|
|
16
|
-
let _cacheNoStoreSupported;
|
|
17
|
-
export function isCacheNoStoreSupported() {
|
|
18
|
-
if (_cacheNoStoreSupported != null) {
|
|
19
|
-
return _cacheNoStoreSupported;
|
|
20
|
-
}
|
|
21
|
-
try {
|
|
22
|
-
new Request("http://localhost", { cache: "no-store" });
|
|
23
|
-
_cacheNoStoreSupported = true;
|
|
24
|
-
}
|
|
25
|
-
catch (_a) {
|
|
26
|
-
_cacheNoStoreSupported = false;
|
|
27
|
-
}
|
|
28
|
-
return _cacheNoStoreSupported;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.
|
|
32
|
-
*/
|
|
33
|
-
export function resetCacheNoStoreSupported() {
|
|
34
|
-
_cacheNoStoreSupported = undefined;
|
|
35
|
-
}
|
|
36
|
-
export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex, disableCache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
11
|
+
export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
12
|
const signals = [];
|
|
38
13
|
let timeoutAbortId;
|
|
39
14
|
if (timeoutMs != null) {
|
|
@@ -45,9 +20,15 @@ export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutM
|
|
|
45
20
|
signals.push(abortSignal);
|
|
46
21
|
}
|
|
47
22
|
const newSignals = anySignal(signals);
|
|
48
|
-
const response = yield fetchFn(url,
|
|
23
|
+
const response = yield fetchFn(url, {
|
|
24
|
+
method: method,
|
|
25
|
+
headers,
|
|
26
|
+
body: requestBody,
|
|
27
|
+
signal: newSignals,
|
|
28
|
+
credentials: withCredentials ? "include" : undefined,
|
|
49
29
|
// @ts-ignore
|
|
50
|
-
duplex
|
|
30
|
+
duplex,
|
|
31
|
+
});
|
|
51
32
|
if (timeoutAbortId != null) {
|
|
52
33
|
clearTimeout(timeoutAbortId);
|
|
53
34
|
}
|
|
@@ -81,18 +81,17 @@ function evaluateRuntime() {
|
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
84
|
-
*
|
|
85
|
-
* We assign `process` to a local variable first to avoid being flagged by
|
|
86
|
-
* bundlers that perform static analysis on `process.versions` (e.g. Next.js
|
|
87
|
-
* Edge Runtime warns about Node.js APIs even when they are guarded).
|
|
88
84
|
*/
|
|
89
|
-
const
|
|
90
|
-
|
|
85
|
+
const isNode = typeof process !== "undefined" &&
|
|
86
|
+
"version" in process &&
|
|
87
|
+
!!process.version &&
|
|
88
|
+
"versions" in process &&
|
|
89
|
+
!!((_e = process.versions) === null || _e === void 0 ? void 0 : _e.node);
|
|
91
90
|
if (isNode) {
|
|
92
91
|
return {
|
|
93
92
|
type: "node",
|
|
94
|
-
version:
|
|
95
|
-
parsedVersion: Number(
|
|
93
|
+
version: process.versions.node,
|
|
94
|
+
parsedVersion: Number(process.versions.node.split(".")[0]),
|
|
96
95
|
};
|
|
97
96
|
}
|
|
98
97
|
return {
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "2.0.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "2.0.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saferx-pharma-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"types": "./dist/cjs/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
+
"types": "./dist/cjs/index.d.ts",
|
|
11
12
|
"import": {
|
|
12
13
|
"types": "./dist/esm/index.d.mts",
|
|
13
14
|
"default": "./dist/esm/index.mjs"
|
|
@@ -18,28 +19,6 @@
|
|
|
18
19
|
},
|
|
19
20
|
"default": "./dist/cjs/index.js"
|
|
20
21
|
},
|
|
21
|
-
"./drugSafety": {
|
|
22
|
-
"import": {
|
|
23
|
-
"types": "./dist/esm/api/resources/drugSafety/exports.d.mts",
|
|
24
|
-
"default": "./dist/esm/api/resources/drugSafety/exports.mjs"
|
|
25
|
-
},
|
|
26
|
-
"require": {
|
|
27
|
-
"types": "./dist/cjs/api/resources/drugSafety/exports.d.ts",
|
|
28
|
-
"default": "./dist/cjs/api/resources/drugSafety/exports.js"
|
|
29
|
-
},
|
|
30
|
-
"default": "./dist/cjs/api/resources/drugSafety/exports.js"
|
|
31
|
-
},
|
|
32
|
-
"./developers": {
|
|
33
|
-
"import": {
|
|
34
|
-
"types": "./dist/esm/api/resources/developers/exports.d.mts",
|
|
35
|
-
"default": "./dist/esm/api/resources/developers/exports.mjs"
|
|
36
|
-
},
|
|
37
|
-
"require": {
|
|
38
|
-
"types": "./dist/cjs/api/resources/developers/exports.d.ts",
|
|
39
|
-
"default": "./dist/cjs/api/resources/developers/exports.js"
|
|
40
|
-
},
|
|
41
|
-
"default": "./dist/cjs/api/resources/developers/exports.js"
|
|
42
|
-
},
|
|
43
22
|
"./package.json": "./package.json"
|
|
44
23
|
},
|
|
45
24
|
"files": [
|
|
@@ -64,22 +43,21 @@
|
|
|
64
43
|
},
|
|
65
44
|
"dependencies": {},
|
|
66
45
|
"devDependencies": {
|
|
67
|
-
"webpack": "^5.
|
|
68
|
-
"ts-loader": "^9.5.
|
|
69
|
-
"vitest": "^
|
|
46
|
+
"webpack": "^5.97.1",
|
|
47
|
+
"ts-loader": "^9.5.1",
|
|
48
|
+
"vitest": "^3.2.4",
|
|
70
49
|
"msw": "2.11.2",
|
|
71
50
|
"@types/node": "^18.19.70",
|
|
72
|
-
"typescript": "~5.
|
|
73
|
-
"@biomejs/biome": "2.
|
|
51
|
+
"typescript": "~5.7.2",
|
|
52
|
+
"@biomejs/biome": "2.3.11"
|
|
74
53
|
},
|
|
75
54
|
"browser": {
|
|
76
55
|
"fs": false,
|
|
77
56
|
"os": false,
|
|
78
57
|
"path": false,
|
|
79
|
-
"stream": false
|
|
80
|
-
"crypto": false
|
|
58
|
+
"stream": false
|
|
81
59
|
},
|
|
82
|
-
"packageManager": "pnpm@10.
|
|
60
|
+
"packageManager": "pnpm@10.20.0",
|
|
83
61
|
"engines": {
|
|
84
62
|
"node": ">=18.0.0"
|
|
85
63
|
},
|
|
@@ -1,21 +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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DevelopersClient = void 0;
|
|
19
|
-
var Client_js_1 = require("./client/Client.js");
|
|
20
|
-
Object.defineProperty(exports, "DevelopersClient", { enumerable: true, get: function () { return Client_js_1.DevelopersClient; } });
|
|
21
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,21 +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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DrugSafetyClient = void 0;
|
|
19
|
-
var Client_js_1 = require("./client/Client.js");
|
|
20
|
-
Object.defineProperty(exports, "DrugSafetyClient", { enumerable: true, get: function () { return Client_js_1.DrugSafetyClient; } });
|
|
21
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface AllergyCrossReactivityReference {
|
|
2
|
-
target_family?: string | undefined;
|
|
3
|
-
target_family_name_en?: string | undefined;
|
|
4
|
-
target_family_name_ar?: (string | null) | undefined;
|
|
5
|
-
severity?: number | undefined;
|
|
6
|
-
severity_label?: (string | null) | undefined;
|
|
7
|
-
severity_label_ar?: (string | null) | undefined;
|
|
8
|
-
frequency_category?: (number | null) | undefined;
|
|
9
|
-
frequency_label?: (string | null) | undefined;
|
|
10
|
-
frequency_label_ar?: (string | null) | undefined;
|
|
11
|
-
mechanism_en?: (string | null) | undefined;
|
|
12
|
-
mechanism_ar?: (string | null) | undefined;
|
|
13
|
-
clinical_note_en?: (string | null) | undefined;
|
|
14
|
-
clinical_note_ar?: (string | null) | undefined;
|
|
15
|
-
evidence_level?: (string | null) | undefined;
|
|
16
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type * as SafeRx from "../index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Patient allergy matching results. Without `patient_profile.allergies`,
|
|
4
|
-
* the domain returns reference-only summary data and no patient-specific
|
|
5
|
-
* clearance should be inferred.
|
|
6
|
-
*/
|
|
7
|
-
export interface AllergyData {
|
|
8
|
-
mode?: AllergyData.Mode | undefined;
|
|
9
|
-
warnings?: SafeRx.AllergyWarning[] | undefined;
|
|
10
|
-
summary?: SafeRx.AllergySummary | undefined;
|
|
11
|
-
/** Product-level allergy family and cross-reactivity reference data keyed by `sfrx_id`. */
|
|
12
|
-
product_families?: Record<string, SafeRx.AllergyProductFamilyReference> | undefined;
|
|
13
|
-
needs_review_entries?: SafeRx.AllergyInputEntry[] | undefined;
|
|
14
|
-
unresolved_entries?: SafeRx.AllergyInputEntry[] | undefined;
|
|
15
|
-
/** Resolved product IDs that had no allergy reference record. */
|
|
16
|
-
missing_products?: string[] | undefined;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace AllergyData {
|
|
19
|
-
const Mode: {
|
|
20
|
-
readonly ReferenceOnly: "reference_only";
|
|
21
|
-
readonly PatientProfile: "patient_profile";
|
|
22
|
-
};
|
|
23
|
-
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
24
|
-
}
|
|
@@ -1,11 +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.AllergyData = void 0;
|
|
5
|
-
var AllergyData;
|
|
6
|
-
(function (AllergyData) {
|
|
7
|
-
AllergyData.Mode = {
|
|
8
|
-
ReferenceOnly: "reference_only",
|
|
9
|
-
PatientProfile: "patient_profile",
|
|
10
|
-
};
|
|
11
|
-
})(AllergyData || (exports.AllergyData = AllergyData = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type * as SafeRx from "../index.js";
|
|
2
|
-
export interface AllergyFamilyReference {
|
|
3
|
-
family_id?: string | undefined;
|
|
4
|
-
name_en?: string | undefined;
|
|
5
|
-
name_ar?: (string | null) | undefined;
|
|
6
|
-
description_en?: (string | null) | undefined;
|
|
7
|
-
description_ar?: (string | null) | undefined;
|
|
8
|
-
clinical_significance?: (string | null) | undefined;
|
|
9
|
-
cross_reactivity?: SafeRx.AllergyCrossReactivityReference[] | undefined;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Caller-provided allergy entry that could not be fully resolved or needs review.
|
|
3
|
-
*/
|
|
4
|
-
export interface AllergyInputEntry {
|
|
5
|
-
raw_input?: string | undefined;
|
|
6
|
-
source_label?: string | undefined;
|
|
7
|
-
family_id?: (string | null) | undefined;
|
|
8
|
-
source_sfrx_id?: (string | null) | undefined;
|
|
9
|
-
normalization_status?: (string | null) | undefined;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type * as SafeRx from "../index.js";
|
|
2
|
-
export interface AllergyProductFamilyReference {
|
|
3
|
-
tradename_en?: string | undefined;
|
|
4
|
-
generic_en?: string | undefined;
|
|
5
|
-
dosage_form_en?: string | undefined;
|
|
6
|
-
route_type?: (string | null) | undefined;
|
|
7
|
-
has_allergy_data?: boolean | undefined;
|
|
8
|
-
families?: SafeRx.AllergyFamilyReference[] | undefined;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface AllergySummary {
|
|
2
|
-
check_mode?: string | undefined;
|
|
3
|
-
products_checked?: number | undefined;
|
|
4
|
-
patient_allergies_count?: number | undefined;
|
|
5
|
-
resolved_patient_allergies_count?: number | undefined;
|
|
6
|
-
resolved_family_count?: number | undefined;
|
|
7
|
-
needs_review_count?: number | undefined;
|
|
8
|
-
unresolved_patient_allergies_count?: number | undefined;
|
|
9
|
-
direct_warnings?: number | undefined;
|
|
10
|
-
cross_reactivity_warnings?: number | undefined;
|
|
11
|
-
total_warnings?: number | undefined;
|
|
12
|
-
contraindicated_count?: number | undefined;
|
|
13
|
-
missing_products_count?: number | undefined;
|
|
14
|
-
}
|