@tryvital/vital-node
Advanced tools
Comparing version 2.1.12 to 2.1.13
@@ -24,2 +24,10 @@ import { AxiosInstance } from 'axios'; | ||
} | ||
public async getRequisitionPdf(orderId: string): Promise<string> { | ||
const resp = await this.client.get( | ||
this.baseURL.concat(`/order/${orderId}/requisition/pdf`), | ||
{ headers: { 'Accept': 'application/pdf' } } | ||
); | ||
return resp.data; | ||
} | ||
@@ -26,0 +34,0 @@ public async create_unregistered_testkit_order( |
@@ -7,2 +7,3 @@ import { AxiosInstance } from 'axios'; | ||
constructor(baseURL: string, axios: AxiosInstance); | ||
getRequisitionPdf(orderId: string): Promise<string>; | ||
create_unregistered_testkit_order(user_id: string, lab_test_id: string, shipping_details: ShippingDetails): Promise<OrderRequestResponse>; | ||
@@ -9,0 +10,0 @@ register_testkit_order(user_id: string, sample_id: string, patient_details: PatientDetails, patient_address: PatientAdress, physician?: Physician, consents?: [Consent]): Promise<OrderRequestResponse>; |
@@ -45,2 +45,15 @@ "use strict"; | ||
} | ||
OrdersApi.prototype.getRequisitionPdf = function (orderId) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var resp; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/order/" + orderId + "/requisition/pdf"), { headers: { 'Accept': 'application/pdf' } })]; | ||
case 1: | ||
resp = _a.sent(); | ||
return [2 /*return*/, resp.data]; | ||
} | ||
}); | ||
}); | ||
}; | ||
OrdersApi.prototype.create_unregistered_testkit_order = function (user_id, lab_test_id, shipping_details) { | ||
@@ -47,0 +60,0 @@ return __awaiter(this, void 0, void 0, function () { |
{ | ||
"name": "@tryvital/vital-node", | ||
"version": "2.1.12", | ||
"version": "2.1.13", | ||
"description": "Node client for Vital", | ||
@@ -5,0 +5,0 @@ "author": "maitham", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
243117
6831