@tryvital/vital-node
Advanced tools
Comparing version 2.1.8 to 2.1.9
@@ -10,2 +10,3 @@ export { ActivityApi } from './Activity'; | ||
export { LabTestsApi } from './LabTests'; | ||
export { OrdersApi } from './LabTests'; | ||
export { ProfileApi } from './Profile'; | ||
@@ -12,0 +13,0 @@ export { DevicesAPI } from './Devices'; |
@@ -51,2 +51,13 @@ import { AxiosInstance } from 'axios'; | ||
public async getOrders(page?: number, size?: number): Promise<Order[]> { | ||
const resp = await this.client.get( | ||
this.baseURL.concat(`/orders?`) + | ||
new URLSearchParams({ | ||
page: page ? page.toString() : '1', | ||
size: size ? size.toString() : '50', | ||
}) | ||
); | ||
return resp.data; | ||
} | ||
// Cancels order. | ||
@@ -53,0 +64,0 @@ public async cancelOrder(orderId: string): Promise<OrderRequestResponse> { |
@@ -10,2 +10,3 @@ export { ActivityApi } from './Activity'; | ||
export { LabTestsApi } from './LabTests'; | ||
export { OrdersApi } from './LabTests'; | ||
export { ProfileApi } from './Profile'; | ||
@@ -12,0 +13,0 @@ export { DevicesAPI } from './Devices'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TestkitsApi = exports.MealsApi = exports.DevicesAPI = exports.ProfileApi = exports.LabTestsApi = exports.AtHomePhlebotomyApi = exports.WorkoutsApi = exports.WebhooksApi = exports.UserApi = exports.SleepApi = exports.LinkApi = exports.BodyApi = exports.ActivityApi = void 0; | ||
exports.TestkitsApi = exports.MealsApi = exports.DevicesAPI = exports.ProfileApi = exports.OrdersApi = exports.LabTestsApi = exports.AtHomePhlebotomyApi = exports.WorkoutsApi = exports.WebhooksApi = exports.UserApi = exports.SleepApi = exports.LinkApi = exports.BodyApi = exports.ActivityApi = void 0; | ||
var Activity_1 = require("./Activity"); | ||
@@ -22,2 +22,4 @@ Object.defineProperty(exports, "ActivityApi", { enumerable: true, get: function () { return Activity_1.ActivityApi; } }); | ||
Object.defineProperty(exports, "LabTestsApi", { enumerable: true, get: function () { return LabTests_1.LabTestsApi; } }); | ||
var LabTests_2 = require("./LabTests"); | ||
Object.defineProperty(exports, "OrdersApi", { enumerable: true, get: function () { return LabTests_2.OrdersApi; } }); | ||
var Profile_1 = require("./Profile"); | ||
@@ -24,0 +26,0 @@ Object.defineProperty(exports, "ProfileApi", { enumerable: true, get: function () { return Profile_1.ProfileApi; } }); |
@@ -9,2 +9,3 @@ import { AxiosInstance } from 'axios'; | ||
getOrder(orderId: string): Promise<Order>; | ||
getOrders(page?: number, size?: number): Promise<Order[]>; | ||
cancelOrder(orderId: string): Promise<OrderRequestResponse>; | ||
@@ -11,0 +12,0 @@ } |
@@ -80,2 +80,19 @@ "use strict"; | ||
}; | ||
OrdersApi.prototype.getOrders = function (page, size) { | ||
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("/orders?") + | ||
new URLSearchParams({ | ||
page: page ? page.toString() : '1', | ||
size: size ? size.toString() : '50', | ||
}))]; | ||
case 1: | ||
resp = _a.sent(); | ||
return [2 /*return*/, resp.data]; | ||
} | ||
}); | ||
}); | ||
}; | ||
// Cancels order. | ||
@@ -82,0 +99,0 @@ OrdersApi.prototype.cancelOrder = function (orderId) { |
@@ -1,2 +0,2 @@ | ||
import { ActivityApi, AtHomePhlebotomyApi, BodyApi, LinkApi, SleepApi, UserApi, WebhooksApi, WorkoutsApi, ProfileApi, DevicesAPI, MealsApi, LabTestsApi } from './client'; | ||
import { ActivityApi, AtHomePhlebotomyApi, BodyApi, LinkApi, SleepApi, UserApi, WebhooksApi, WorkoutsApi, ProfileApi, DevicesAPI, MealsApi, LabTestsApi, OrdersApi } from './client'; | ||
import { ClientConfig } from './lib/models'; | ||
@@ -17,2 +17,3 @@ import { VitalsApi } from './client/Vitals'; | ||
LabTests: LabTestsApi; | ||
Orders: OrdersApi; | ||
AtHomePhlebotomy: AtHomePhlebotomyApi; | ||
@@ -19,0 +20,0 @@ Profile: ProfileApi; |
@@ -97,2 +97,3 @@ "use strict"; | ||
this.LabTests = new client_1.LabTestsApi(baseURL.concat('/v3'), axiosApiInstance); | ||
this.Orders = new client_1.OrdersApi(baseURL.concat('/v3'), axiosApiInstance); | ||
this.AtHomePhlebotomy = new client_1.AtHomePhlebotomyApi(baseURL.concat('/v3'), axiosApiInstance); | ||
@@ -99,0 +100,0 @@ this.Profile = new client_1.ProfileApi(baseURL.concat('/v2'), axiosApiInstance); |
@@ -16,2 +16,3 @@ import axios from 'axios'; | ||
LabTestsApi, | ||
OrdersApi, | ||
} from './client'; | ||
@@ -35,2 +36,3 @@ import { ClientConfig } from './lib/models'; | ||
LabTests: LabTestsApi; | ||
Orders: OrdersApi; | ||
AtHomePhlebotomy: AtHomePhlebotomyApi; | ||
@@ -83,2 +85,3 @@ Profile: ProfileApi; | ||
this.LabTests = new LabTestsApi(baseURL.concat('/v3'), axiosApiInstance); | ||
this.Orders = new OrdersApi(baseURL.concat('/v3'), axiosApiInstance); | ||
this.AtHomePhlebotomy = new AtHomePhlebotomyApi( | ||
@@ -85,0 +88,0 @@ baseURL.concat('/v3'), |
{ | ||
"name": "@tryvital/vital-node", | ||
"version": "2.1.8", | ||
"version": "2.1.9", | ||
"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
237772
6699