@tryvital/vital-node 0.3.4 → 0.3.8
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/client/Testkits.ts +61 -0
- package/client/User.ts +2 -2
- package/client/Vitals.ts +46 -0
- package/client/index.ts +1 -0
- package/client/models/activity.ts +189 -3
- package/client/models/testkit_models.ts +61 -0
- package/client/models/user_models.ts +4 -0
- package/dist/client/Testkits.d.ts +11 -0
- package/dist/client/Testkits.js +105 -0
- package/dist/client/User.d.ts +2 -2
- package/dist/client/Vitals.d.ts +4 -1
- package/dist/client/Vitals.js +45 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +3 -1
- package/dist/client/models/activity.d.ts +181 -3
- package/dist/client/models/activity.js +142 -0
- package/dist/client/models/testkit_models.d.ts +44 -0
- package/dist/client/models/testkit_models.js +2 -0
- package/dist/client/models/user_models.d.ts +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/index.ts +4 -1
- package/package.json +1 -1
@@ -0,0 +1,61 @@
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
2
|
+
import { signature } from './lib/WebhookVerification';
|
3
|
+
import {
|
4
|
+
Order,
|
5
|
+
OrderRequestResponse,
|
6
|
+
OrderResponse,
|
7
|
+
PatientAdress,
|
8
|
+
PatientDetails,
|
9
|
+
TestkitResponse,
|
10
|
+
} from './models/testkit_models';
|
11
|
+
|
12
|
+
export class TestkitsApi {
|
13
|
+
baseURL: string;
|
14
|
+
client: AxiosInstance;
|
15
|
+
constructor(baseURL: string, axios: AxiosInstance) {
|
16
|
+
this.baseURL = baseURL;
|
17
|
+
this.client = axios;
|
18
|
+
}
|
19
|
+
|
20
|
+
public async get(): Promise<TestkitResponse> {
|
21
|
+
const resp = await this.client.get(this.baseURL.concat('/testkit'));
|
22
|
+
return resp.data;
|
23
|
+
}
|
24
|
+
|
25
|
+
public async get_orders(
|
26
|
+
startDate: Date,
|
27
|
+
endDate: Date
|
28
|
+
): Promise<OrderResponse> {
|
29
|
+
const resp = await this.client.get(
|
30
|
+
this.baseURL.concat('/testkit/orders/'),
|
31
|
+
{
|
32
|
+
params: { start_date: startDate, end_date: endDate },
|
33
|
+
}
|
34
|
+
);
|
35
|
+
return resp.data;
|
36
|
+
}
|
37
|
+
|
38
|
+
public async order(
|
39
|
+
userKey: string,
|
40
|
+
testkitId: string,
|
41
|
+
patientAddress: PatientAdress,
|
42
|
+
patientDetails: PatientDetails
|
43
|
+
): Promise<OrderRequestResponse> {
|
44
|
+
const resp = await this.client.post(
|
45
|
+
this.baseURL.concat('/testkit/orders'),
|
46
|
+
{
|
47
|
+
user_key: userKey,
|
48
|
+
testkit_id: testkitId,
|
49
|
+
patient_address: patientAddress,
|
50
|
+
}
|
51
|
+
);
|
52
|
+
return resp.data;
|
53
|
+
}
|
54
|
+
|
55
|
+
public async get_order(orderId: string): Promise<Order> {
|
56
|
+
const resp = await this.client.get(
|
57
|
+
this.baseURL.concat(`/testkit/orders/${orderId}`)
|
58
|
+
);
|
59
|
+
return resp.data;
|
60
|
+
}
|
61
|
+
}
|
package/client/User.ts
CHANGED
@@ -3,8 +3,8 @@ import {
|
|
3
3
|
UserKeyResponse,
|
4
4
|
SuccessResponse,
|
5
5
|
ClientFacingUser,
|
6
|
-
SourceClientFacing,
|
7
6
|
Providers,
|
7
|
+
ProvidersResponse,
|
8
8
|
} from './models/user_models';
|
9
9
|
|
10
10
|
export class UserApi {
|
@@ -46,7 +46,7 @@ export class UserApi {
|
|
46
46
|
return resp.data;
|
47
47
|
}
|
48
48
|
|
49
|
-
public async providers(userKey: string): Promise<
|
49
|
+
public async providers(userKey: string): Promise<ProvidersResponse> {
|
50
50
|
const resp = await this.client.get(
|
51
51
|
this.baseURL.concat(`/user/providers/${userKey}`)
|
52
52
|
);
|
package/client/Vitals.ts
CHANGED
@@ -2,6 +2,9 @@ import { AxiosInstance } from 'axios';
|
|
2
2
|
import {
|
3
3
|
ClientCholesterolResponse,
|
4
4
|
ClientGlucoseResponse,
|
5
|
+
ClientHba1cResponse,
|
6
|
+
ClientIgeResponse,
|
7
|
+
ClientIggResponse,
|
5
8
|
} from './models/activity';
|
6
9
|
|
7
10
|
export class VitalsApi {
|
@@ -42,4 +45,47 @@ export class VitalsApi {
|
|
42
45
|
);
|
43
46
|
return resp.data;
|
44
47
|
}
|
48
|
+
|
49
|
+
public async hba1c(
|
50
|
+
userKey: string,
|
51
|
+
startDate: Date,
|
52
|
+
endDate: Date,
|
53
|
+
provider?: string
|
54
|
+
): Promise<ClientHba1cResponse> {
|
55
|
+
const resp = await this.client.get(
|
56
|
+
this.baseURL.concat(`/vitals/hba1c/${userKey}`),
|
57
|
+
{
|
58
|
+
params: { start_date: startDate, end_date: endDate, provider },
|
59
|
+
}
|
60
|
+
);
|
61
|
+
return resp.data;
|
62
|
+
}
|
63
|
+
|
64
|
+
public async ige(
|
65
|
+
userKey: string,
|
66
|
+
startDate: Date,
|
67
|
+
endDate: Date
|
68
|
+
): Promise<ClientIgeResponse> {
|
69
|
+
const resp = await this.client.get(
|
70
|
+
this.baseURL.concat(`/vitals/ige/${userKey}`),
|
71
|
+
{
|
72
|
+
params: { start_date: startDate, end_date: endDate },
|
73
|
+
}
|
74
|
+
);
|
75
|
+
return resp.data;
|
76
|
+
}
|
77
|
+
|
78
|
+
public async igg(
|
79
|
+
userKey: string,
|
80
|
+
startDate: Date,
|
81
|
+
endDate: Date
|
82
|
+
): Promise<ClientIggResponse> {
|
83
|
+
const resp = await this.client.get(
|
84
|
+
this.baseURL.concat(`/vitals/igg/${userKey}`),
|
85
|
+
{
|
86
|
+
params: { start_date: startDate, end_date: endDate },
|
87
|
+
}
|
88
|
+
);
|
89
|
+
return resp.data;
|
90
|
+
}
|
45
91
|
}
|
package/client/index.ts
CHANGED
@@ -18,13 +18,13 @@ export interface ClientFacingActivity {
|
|
18
18
|
* @type {number}
|
19
19
|
* @memberof ClientFacingActivity
|
20
20
|
*/
|
21
|
-
|
21
|
+
calories_total: number;
|
22
22
|
/**
|
23
23
|
* Energy consumption caused by the physical activity of the day in kilocalories.::kilocalories
|
24
24
|
* @type {number}
|
25
25
|
* @memberof ClientFacingActivity
|
26
26
|
*/
|
27
|
-
|
27
|
+
calories_active: number;
|
28
28
|
/**
|
29
29
|
* Total number of steps registered during the day.::steps
|
30
30
|
* @type {number}
|
@@ -36,7 +36,7 @@ export interface ClientFacingActivity {
|
|
36
36
|
* @type {number}
|
37
37
|
* @memberof ClientFacingActivity
|
38
38
|
*/
|
39
|
-
|
39
|
+
daily_movement?: number;
|
40
40
|
/**
|
41
41
|
* Number of minutes during the day with low intensity activity (e.g. household work).::minutes
|
42
42
|
* @type {number}
|
@@ -93,3 +93,189 @@ export interface ClientGlucoseResponse {
|
|
93
93
|
export interface ClientCholesterolResponse {
|
94
94
|
cholesterol: ClientFacingCholesterol[];
|
95
95
|
}
|
96
|
+
|
97
|
+
enum RespiratoryAllergen {
|
98
|
+
D_PTERONYSSINUS = 'd_pteronyssinus',
|
99
|
+
D_FARINAE = 'd_farinae',
|
100
|
+
CAT_DANDER = 'cat_dander',
|
101
|
+
DOG_DANDER = 'dog_dander',
|
102
|
+
HORSE_DANDER = 'horse_dander',
|
103
|
+
MOUSE_URINE = 'mouse_urine',
|
104
|
+
COCKROACH = 'cockroach',
|
105
|
+
ALTERNARIA_ALTERNATA = 'alternaria_alternata',
|
106
|
+
ASPERGILLUS_FUMIGATUS = 'aspergillus_fumigatus',
|
107
|
+
CLADOSPORIUM_HERBARUM = 'cladosporium_herbarum',
|
108
|
+
PENICILLIUM_NOTATUM = 'penicillium_notatum',
|
109
|
+
AUREOBASIDIUM_PULLULANS = 'aureobasidium_pullulans',
|
110
|
+
BAHIA_GRASS = 'bahia_grass',
|
111
|
+
BERMUDA_GRASS = 'bermuda_grass',
|
112
|
+
JOHNSON_GRASS = 'johnson_grass',
|
113
|
+
PERENNIAL_RYEGRASS = 'perennial_ryegrass',
|
114
|
+
TIMOTHY_GRASS = 'timothy_grass',
|
115
|
+
ACACIA = 'acacia',
|
116
|
+
ALDER = 'alder',
|
117
|
+
AUSTRALIAN_PINE = 'australian_pine',
|
118
|
+
BIRCH = 'birch',
|
119
|
+
COTTONWOOD = 'cottonwood',
|
120
|
+
ELM = 'elm',
|
121
|
+
MAPLE_BOX_ELDER = 'maple_box_elder',
|
122
|
+
MAPLE_LEAF_SYCAMORE = 'maple_leaf_sycamore',
|
123
|
+
MOUNTAIN_CEDAR = 'mountain_cedar',
|
124
|
+
MULBERRY = 'mulberry',
|
125
|
+
OAK = 'oak',
|
126
|
+
OLIVE = 'olive',
|
127
|
+
PECAN_HICKORY = 'pecan_hickory',
|
128
|
+
WALNUT = 'walnut',
|
129
|
+
WHITE_ASH = 'white_ash',
|
130
|
+
COMMON_RAGWEED = 'common_ragweed',
|
131
|
+
MUGWORT = 'mugwort',
|
132
|
+
NETTLE = 'nettle',
|
133
|
+
ROUGH_MARSH_ELDER = 'rough_marsh_elder',
|
134
|
+
ROUGH_PIGWEED = 'rough_pigweed',
|
135
|
+
RUSSIAN_THISTLE = 'russian_thistle',
|
136
|
+
SHEEP_SORREL = 'sheep_sorrel',
|
137
|
+
BLOMIA_TROPICALIS = 'blomia_tropicalis',
|
138
|
+
}
|
139
|
+
|
140
|
+
interface Ige {
|
141
|
+
timestamp: Date;
|
142
|
+
unit: string;
|
143
|
+
user_id: string;
|
144
|
+
order_id?: string;
|
145
|
+
source_id: number;
|
146
|
+
value: number;
|
147
|
+
type: RespiratoryAllergen;
|
148
|
+
priority_id?: number;
|
149
|
+
}
|
150
|
+
|
151
|
+
enum FoodAllergen {
|
152
|
+
CHEDDAR_CHEESE = 'cheddar_cheese',
|
153
|
+
COTTAGE_CHEESE = 'cottage_cheese',
|
154
|
+
COW_MILK = 'cow_milk',
|
155
|
+
MOZZARELLA_CHEESE = 'mozzarella_cheese',
|
156
|
+
YOGURT = 'yogurt',
|
157
|
+
EGG_WHITE = 'egg_white',
|
158
|
+
EGG_YOLK = 'egg_yolk',
|
159
|
+
APPLE = 'apple',
|
160
|
+
AVOCADO = 'avocado',
|
161
|
+
BANANA = 'banana',
|
162
|
+
BLUEBERRY = 'blueberry',
|
163
|
+
CANTALOUPE = 'cantaloupe',
|
164
|
+
COCONUT = 'coconut',
|
165
|
+
GRAPE = 'grape',
|
166
|
+
GRAPEFRUIT = 'grapefruit',
|
167
|
+
LEMON = 'lemon',
|
168
|
+
ORANGE = 'orange',
|
169
|
+
PEACH = 'peach',
|
170
|
+
PEAR = 'pear',
|
171
|
+
PINEAPPLE = 'pineapple',
|
172
|
+
STRAWBERRY = 'strawberry',
|
173
|
+
TOMATO = 'tomato',
|
174
|
+
WATERMELON = 'watermelon',
|
175
|
+
BAKERS_YEAST = 'bakers_yeast',
|
176
|
+
BARLEY = 'barley',
|
177
|
+
BRAN = 'bran',
|
178
|
+
BREWERS_YEAST = 'brewers_yeast',
|
179
|
+
BROWN_RICE = 'brown_rice',
|
180
|
+
GLUTEN = 'gluten',
|
181
|
+
MALT = 'malt',
|
182
|
+
OATS = 'oats',
|
183
|
+
RYE = 'rye',
|
184
|
+
WHEAT = 'wheat',
|
185
|
+
GREEN_BEAN = 'green_bean',
|
186
|
+
GREEN_PEA = 'green_pea',
|
187
|
+
LIMA_BEAN = 'lima_bean',
|
188
|
+
PEANUT = 'peanut',
|
189
|
+
SOYBEAN = 'soybean',
|
190
|
+
BEEF = 'beef',
|
191
|
+
CHICKEN = 'chicken',
|
192
|
+
LAMB = 'lamb',
|
193
|
+
PORK = 'pork',
|
194
|
+
TURKEY = 'turkey',
|
195
|
+
CLAM = 'clam',
|
196
|
+
CODFISH = 'codfish',
|
197
|
+
CRAB = 'crab',
|
198
|
+
HADDOCK = 'haddock',
|
199
|
+
LOBSTER = 'lobster',
|
200
|
+
PRAWN = 'prawn',
|
201
|
+
SALMON = 'salmon',
|
202
|
+
SCALLOP = 'scallop',
|
203
|
+
SOLE = 'sole',
|
204
|
+
SWORDFISH = 'swordfish',
|
205
|
+
TUNA = 'tuna',
|
206
|
+
ALMOND = 'almond',
|
207
|
+
BLACK_WALNUT = 'black_walnut',
|
208
|
+
CASHEW = 'cashew',
|
209
|
+
CHIA_SEED = 'chia_seed',
|
210
|
+
SAFFLOWER = 'safflower',
|
211
|
+
SESAME = 'sesame',
|
212
|
+
SUNFLOWER = 'sunflower',
|
213
|
+
ASPARAGUS = 'asparagus',
|
214
|
+
BELL_PEPPER = 'bell_pepper',
|
215
|
+
BROCCOLI = 'broccoli',
|
216
|
+
CABBAGE = 'cabbage',
|
217
|
+
CARROT = 'carrot',
|
218
|
+
CAULIFLOWER = 'cauliflower',
|
219
|
+
CELERY = 'celery',
|
220
|
+
CORN = 'corn',
|
221
|
+
CUCUMBER = 'cucumber',
|
222
|
+
EGGPLANT = 'eggplant',
|
223
|
+
GREEN_OLIVE = 'green_olive',
|
224
|
+
KALE = 'kale',
|
225
|
+
KELP = 'kelp',
|
226
|
+
LETTUCE = 'lettuce',
|
227
|
+
MUSHROOM = 'mushroom',
|
228
|
+
ONION = 'onion',
|
229
|
+
POTATO = 'potato',
|
230
|
+
SPINACH = 'spinach',
|
231
|
+
SQUASH = 'squash',
|
232
|
+
SWEET_POTATO = 'sweet_potato',
|
233
|
+
BASIL = 'basil',
|
234
|
+
BAY_LEAF = 'bay_leaf',
|
235
|
+
BLACK_PEPPER = 'black_pepper',
|
236
|
+
BLACK_TEA = 'black_tea',
|
237
|
+
COCOA = 'cocoa',
|
238
|
+
COFFEE = 'coffee',
|
239
|
+
COLA = 'cola',
|
240
|
+
CINNAMON = 'cinnamon',
|
241
|
+
DILL = 'dill',
|
242
|
+
GARLIC = 'garlic',
|
243
|
+
GINGER = 'ginger',
|
244
|
+
HONEY = 'honey',
|
245
|
+
MUSTARD = 'mustard',
|
246
|
+
OREGANO = 'oregano',
|
247
|
+
TARRAGON = 'tarragon',
|
248
|
+
}
|
249
|
+
|
250
|
+
interface Igg {
|
251
|
+
timestamp: Date;
|
252
|
+
unit: string;
|
253
|
+
user_id: string;
|
254
|
+
order_id: string;
|
255
|
+
source_id: number;
|
256
|
+
value: number;
|
257
|
+
type: FoodAllergen;
|
258
|
+
priority_id?: number;
|
259
|
+
}
|
260
|
+
|
261
|
+
export interface ClientIgeResponse {
|
262
|
+
ige: Ige[];
|
263
|
+
}
|
264
|
+
|
265
|
+
export interface ClientIggResponse {
|
266
|
+
igg: Igg[];
|
267
|
+
}
|
268
|
+
|
269
|
+
interface hba1c {
|
270
|
+
timestamp: Date;
|
271
|
+
unit: string;
|
272
|
+
user_id: string;
|
273
|
+
source_id: number;
|
274
|
+
value: number;
|
275
|
+
priority_id: number;
|
276
|
+
type: string;
|
277
|
+
}
|
278
|
+
|
279
|
+
export interface ClientHba1cResponse {
|
280
|
+
hba1c: hba1c[];
|
281
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
export interface PatientAdress {
|
2
|
+
receiver_name: string;
|
3
|
+
street_number: string;
|
4
|
+
street: string;
|
5
|
+
city: string;
|
6
|
+
state: string;
|
7
|
+
zip: string;
|
8
|
+
country: string;
|
9
|
+
phone_number: string;
|
10
|
+
}
|
11
|
+
|
12
|
+
export interface PatientDetails {
|
13
|
+
dob: string;
|
14
|
+
gender: string;
|
15
|
+
}
|
16
|
+
|
17
|
+
export interface Testkit {
|
18
|
+
id: string;
|
19
|
+
name: string;
|
20
|
+
description: string;
|
21
|
+
}
|
22
|
+
|
23
|
+
export interface Order {
|
24
|
+
id: string;
|
25
|
+
team_id: string;
|
26
|
+
created_on: Date;
|
27
|
+
updated_on: Date;
|
28
|
+
status:
|
29
|
+
| 'ordered'
|
30
|
+
| 'transit_customer'
|
31
|
+
| 'out_for_delivery'
|
32
|
+
| 'with_customer'
|
33
|
+
| 'transit_lab'
|
34
|
+
| 'delivered_to_lab'
|
35
|
+
| 'processing_lab'
|
36
|
+
| 'completed'
|
37
|
+
| 'failure_to_deliver_to_customer'
|
38
|
+
| 'failure_to_deliver_to_lab'
|
39
|
+
| 'unknown';
|
40
|
+
user_key: string;
|
41
|
+
testkit_id: string;
|
42
|
+
testkit: Testkit;
|
43
|
+
inbound_tracking_number?: string;
|
44
|
+
outbound_tracking_number?: string;
|
45
|
+
outbound_courier?: string;
|
46
|
+
inbound_courier?: string;
|
47
|
+
}
|
48
|
+
|
49
|
+
export interface OrderResponse {
|
50
|
+
orders: Order[];
|
51
|
+
}
|
52
|
+
|
53
|
+
export interface OrderRequestResponse {
|
54
|
+
order: Order;
|
55
|
+
status: string;
|
56
|
+
message: string;
|
57
|
+
}
|
58
|
+
|
59
|
+
export interface TestkitResponse {
|
60
|
+
testkits: Testkit[];
|
61
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
2
|
+
import { Order, OrderRequestResponse, OrderResponse, PatientAdress, PatientDetails, TestkitResponse } from './models/testkit_models';
|
3
|
+
export declare class TestkitsApi {
|
4
|
+
baseURL: string;
|
5
|
+
client: AxiosInstance;
|
6
|
+
constructor(baseURL: string, axios: AxiosInstance);
|
7
|
+
get(): Promise<TestkitResponse>;
|
8
|
+
get_orders(startDate: Date, endDate: Date): Promise<OrderResponse>;
|
9
|
+
order(userKey: string, testkitId: string, patientAddress: PatientAdress, patientDetails: PatientDetails): Promise<OrderRequestResponse>;
|
10
|
+
get_order(orderId: string): Promise<Order>;
|
11
|
+
}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
15
|
+
function step(op) {
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
17
|
+
while (_) try {
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
20
|
+
switch (op[0]) {
|
21
|
+
case 0: case 1: t = op; break;
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
25
|
+
default:
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
30
|
+
if (t[2]) _.ops.pop();
|
31
|
+
_.trys.pop(); continue;
|
32
|
+
}
|
33
|
+
op = body.call(thisArg, _);
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
36
|
+
}
|
37
|
+
};
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
39
|
+
exports.TestkitsApi = void 0;
|
40
|
+
var TestkitsApi = /** @class */ (function () {
|
41
|
+
function TestkitsApi(baseURL, axios) {
|
42
|
+
this.baseURL = baseURL;
|
43
|
+
this.client = axios;
|
44
|
+
}
|
45
|
+
TestkitsApi.prototype.get = function () {
|
46
|
+
return __awaiter(this, void 0, void 0, function () {
|
47
|
+
var resp;
|
48
|
+
return __generator(this, function (_a) {
|
49
|
+
switch (_a.label) {
|
50
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat('/testkit'))];
|
51
|
+
case 1:
|
52
|
+
resp = _a.sent();
|
53
|
+
return [2 /*return*/, resp.data];
|
54
|
+
}
|
55
|
+
});
|
56
|
+
});
|
57
|
+
};
|
58
|
+
TestkitsApi.prototype.get_orders = function (startDate, endDate) {
|
59
|
+
return __awaiter(this, void 0, void 0, function () {
|
60
|
+
var resp;
|
61
|
+
return __generator(this, function (_a) {
|
62
|
+
switch (_a.label) {
|
63
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat('/testkit/orders/'), {
|
64
|
+
params: { start_date: startDate, end_date: endDate },
|
65
|
+
})];
|
66
|
+
case 1:
|
67
|
+
resp = _a.sent();
|
68
|
+
return [2 /*return*/, resp.data];
|
69
|
+
}
|
70
|
+
});
|
71
|
+
});
|
72
|
+
};
|
73
|
+
TestkitsApi.prototype.order = function (userKey, testkitId, patientAddress, patientDetails) {
|
74
|
+
return __awaiter(this, void 0, void 0, function () {
|
75
|
+
var resp;
|
76
|
+
return __generator(this, function (_a) {
|
77
|
+
switch (_a.label) {
|
78
|
+
case 0: return [4 /*yield*/, this.client.post(this.baseURL.concat('/testkit/orders'), {
|
79
|
+
user_key: userKey,
|
80
|
+
testkit_id: testkitId,
|
81
|
+
patient_address: patientAddress,
|
82
|
+
})];
|
83
|
+
case 1:
|
84
|
+
resp = _a.sent();
|
85
|
+
return [2 /*return*/, resp.data];
|
86
|
+
}
|
87
|
+
});
|
88
|
+
});
|
89
|
+
};
|
90
|
+
TestkitsApi.prototype.get_order = function (orderId) {
|
91
|
+
return __awaiter(this, void 0, void 0, function () {
|
92
|
+
var resp;
|
93
|
+
return __generator(this, function (_a) {
|
94
|
+
switch (_a.label) {
|
95
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/testkit/orders/" + orderId))];
|
96
|
+
case 1:
|
97
|
+
resp = _a.sent();
|
98
|
+
return [2 /*return*/, resp.data];
|
99
|
+
}
|
100
|
+
});
|
101
|
+
});
|
102
|
+
};
|
103
|
+
return TestkitsApi;
|
104
|
+
}());
|
105
|
+
exports.TestkitsApi = TestkitsApi;
|
package/dist/client/User.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { UserKeyResponse, SuccessResponse, ClientFacingUser,
|
2
|
+
import { UserKeyResponse, SuccessResponse, ClientFacingUser, Providers, ProvidersResponse } from './models/user_models';
|
3
3
|
export declare class UserApi {
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
@@ -9,6 +9,6 @@ export declare class UserApi {
|
|
9
9
|
getAll(): Promise<Array<ClientFacingUser>>;
|
10
10
|
get(userKey: string): Promise<ClientFacingUser>;
|
11
11
|
resolve(clientUserId: string): Promise<ClientFacingUser>;
|
12
|
-
providers(userKey: string): Promise<
|
12
|
+
providers(userKey: string): Promise<ProvidersResponse>;
|
13
13
|
deregisterProvider(userKey: string, provider: Providers): Promise<SuccessResponse>;
|
14
14
|
}
|
package/dist/client/Vitals.d.ts
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ClientCholesterolResponse, ClientGlucoseResponse } from './models/activity';
|
2
|
+
import { ClientCholesterolResponse, ClientGlucoseResponse, ClientHba1cResponse, ClientIgeResponse, ClientIggResponse } from './models/activity';
|
3
3
|
export declare class VitalsApi {
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
7
|
cholesterol(type: 'ldl' | 'total_cholesterol' | 'triglycerides' | 'hdl', userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientCholesterolResponse>;
|
8
8
|
glucose(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientGlucoseResponse>;
|
9
|
+
hba1c(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientHba1cResponse>;
|
10
|
+
ige(userKey: string, startDate: Date, endDate: Date): Promise<ClientIgeResponse>;
|
11
|
+
igg(userKey: string, startDate: Date, endDate: Date): Promise<ClientIggResponse>;
|
9
12
|
}
|
package/dist/client/Vitals.js
CHANGED
@@ -72,6 +72,51 @@ var VitalsApi = /** @class */ (function () {
|
|
72
72
|
});
|
73
73
|
});
|
74
74
|
};
|
75
|
+
VitalsApi.prototype.hba1c = function (userKey, startDate, endDate, provider) {
|
76
|
+
return __awaiter(this, void 0, void 0, function () {
|
77
|
+
var resp;
|
78
|
+
return __generator(this, function (_a) {
|
79
|
+
switch (_a.label) {
|
80
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/vitals/hba1c/" + userKey), {
|
81
|
+
params: { start_date: startDate, end_date: endDate, provider: provider },
|
82
|
+
})];
|
83
|
+
case 1:
|
84
|
+
resp = _a.sent();
|
85
|
+
return [2 /*return*/, resp.data];
|
86
|
+
}
|
87
|
+
});
|
88
|
+
});
|
89
|
+
};
|
90
|
+
VitalsApi.prototype.ige = function (userKey, startDate, endDate) {
|
91
|
+
return __awaiter(this, void 0, void 0, function () {
|
92
|
+
var resp;
|
93
|
+
return __generator(this, function (_a) {
|
94
|
+
switch (_a.label) {
|
95
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/vitals/ige/" + userKey), {
|
96
|
+
params: { start_date: startDate, end_date: endDate },
|
97
|
+
})];
|
98
|
+
case 1:
|
99
|
+
resp = _a.sent();
|
100
|
+
return [2 /*return*/, resp.data];
|
101
|
+
}
|
102
|
+
});
|
103
|
+
});
|
104
|
+
};
|
105
|
+
VitalsApi.prototype.igg = function (userKey, startDate, endDate) {
|
106
|
+
return __awaiter(this, void 0, void 0, function () {
|
107
|
+
var resp;
|
108
|
+
return __generator(this, function (_a) {
|
109
|
+
switch (_a.label) {
|
110
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/vitals/igg/" + userKey), {
|
111
|
+
params: { start_date: startDate, end_date: endDate },
|
112
|
+
})];
|
113
|
+
case 1:
|
114
|
+
resp = _a.sent();
|
115
|
+
return [2 /*return*/, resp.data];
|
116
|
+
}
|
117
|
+
});
|
118
|
+
});
|
119
|
+
};
|
75
120
|
return VitalsApi;
|
76
121
|
}());
|
77
122
|
exports.VitalsApi = VitalsApi;
|
package/dist/client/index.d.ts
CHANGED
package/dist/client/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.WorkoutsApi = exports.WebhooksApi = exports.UserApi = exports.SleepApi = exports.ProviderSpecificApi = exports.LinkApi = exports.BodyApi = exports.ActivityApi = void 0;
|
3
|
+
exports.TestkitsApi = exports.WorkoutsApi = exports.WebhooksApi = exports.UserApi = exports.SleepApi = exports.ProviderSpecificApi = exports.LinkApi = exports.BodyApi = exports.ActivityApi = void 0;
|
4
4
|
var Activity_1 = require("./Activity");
|
5
5
|
Object.defineProperty(exports, "ActivityApi", { enumerable: true, get: function () { return Activity_1.ActivityApi; } });
|
6
6
|
var Body_1 = require("./Body");
|
@@ -17,3 +17,5 @@ var Webhooks_1 = require("./Webhooks");
|
|
17
17
|
Object.defineProperty(exports, "WebhooksApi", { enumerable: true, get: function () { return Webhooks_1.WebhooksApi; } });
|
18
18
|
var Workouts_1 = require("./Workouts");
|
19
19
|
Object.defineProperty(exports, "WorkoutsApi", { enumerable: true, get: function () { return Workouts_1.WorkoutsApi; } });
|
20
|
+
var Testkits_1 = require("./Testkits");
|
21
|
+
Object.defineProperty(exports, "TestkitsApi", { enumerable: true, get: function () { return Testkits_1.TestkitsApi; } });
|
@@ -17,13 +17,13 @@ export interface ClientFacingActivity {
|
|
17
17
|
* @type {number}
|
18
18
|
* @memberof ClientFacingActivity
|
19
19
|
*/
|
20
|
-
|
20
|
+
calories_total: number;
|
21
21
|
/**
|
22
22
|
* Energy consumption caused by the physical activity of the day in kilocalories.::kilocalories
|
23
23
|
* @type {number}
|
24
24
|
* @memberof ClientFacingActivity
|
25
25
|
*/
|
26
|
-
|
26
|
+
calories_active: number;
|
27
27
|
/**
|
28
28
|
* Total number of steps registered during the day.::steps
|
29
29
|
* @type {number}
|
@@ -35,7 +35,7 @@ export interface ClientFacingActivity {
|
|
35
35
|
* @type {number}
|
36
36
|
* @memberof ClientFacingActivity
|
37
37
|
*/
|
38
|
-
|
38
|
+
daily_movement?: number;
|
39
39
|
/**
|
40
40
|
* Number of minutes during the day with low intensity activity (e.g. household work).::minutes
|
41
41
|
* @type {number}
|
@@ -87,4 +87,182 @@ export interface ClientGlucoseResponse {
|
|
87
87
|
export interface ClientCholesterolResponse {
|
88
88
|
cholesterol: ClientFacingCholesterol[];
|
89
89
|
}
|
90
|
+
declare enum RespiratoryAllergen {
|
91
|
+
D_PTERONYSSINUS = "d_pteronyssinus",
|
92
|
+
D_FARINAE = "d_farinae",
|
93
|
+
CAT_DANDER = "cat_dander",
|
94
|
+
DOG_DANDER = "dog_dander",
|
95
|
+
HORSE_DANDER = "horse_dander",
|
96
|
+
MOUSE_URINE = "mouse_urine",
|
97
|
+
COCKROACH = "cockroach",
|
98
|
+
ALTERNARIA_ALTERNATA = "alternaria_alternata",
|
99
|
+
ASPERGILLUS_FUMIGATUS = "aspergillus_fumigatus",
|
100
|
+
CLADOSPORIUM_HERBARUM = "cladosporium_herbarum",
|
101
|
+
PENICILLIUM_NOTATUM = "penicillium_notatum",
|
102
|
+
AUREOBASIDIUM_PULLULANS = "aureobasidium_pullulans",
|
103
|
+
BAHIA_GRASS = "bahia_grass",
|
104
|
+
BERMUDA_GRASS = "bermuda_grass",
|
105
|
+
JOHNSON_GRASS = "johnson_grass",
|
106
|
+
PERENNIAL_RYEGRASS = "perennial_ryegrass",
|
107
|
+
TIMOTHY_GRASS = "timothy_grass",
|
108
|
+
ACACIA = "acacia",
|
109
|
+
ALDER = "alder",
|
110
|
+
AUSTRALIAN_PINE = "australian_pine",
|
111
|
+
BIRCH = "birch",
|
112
|
+
COTTONWOOD = "cottonwood",
|
113
|
+
ELM = "elm",
|
114
|
+
MAPLE_BOX_ELDER = "maple_box_elder",
|
115
|
+
MAPLE_LEAF_SYCAMORE = "maple_leaf_sycamore",
|
116
|
+
MOUNTAIN_CEDAR = "mountain_cedar",
|
117
|
+
MULBERRY = "mulberry",
|
118
|
+
OAK = "oak",
|
119
|
+
OLIVE = "olive",
|
120
|
+
PECAN_HICKORY = "pecan_hickory",
|
121
|
+
WALNUT = "walnut",
|
122
|
+
WHITE_ASH = "white_ash",
|
123
|
+
COMMON_RAGWEED = "common_ragweed",
|
124
|
+
MUGWORT = "mugwort",
|
125
|
+
NETTLE = "nettle",
|
126
|
+
ROUGH_MARSH_ELDER = "rough_marsh_elder",
|
127
|
+
ROUGH_PIGWEED = "rough_pigweed",
|
128
|
+
RUSSIAN_THISTLE = "russian_thistle",
|
129
|
+
SHEEP_SORREL = "sheep_sorrel",
|
130
|
+
BLOMIA_TROPICALIS = "blomia_tropicalis"
|
131
|
+
}
|
132
|
+
interface Ige {
|
133
|
+
timestamp: Date;
|
134
|
+
unit: string;
|
135
|
+
user_id: string;
|
136
|
+
order_id?: string;
|
137
|
+
source_id: number;
|
138
|
+
value: number;
|
139
|
+
type: RespiratoryAllergen;
|
140
|
+
priority_id?: number;
|
141
|
+
}
|
142
|
+
declare enum FoodAllergen {
|
143
|
+
CHEDDAR_CHEESE = "cheddar_cheese",
|
144
|
+
COTTAGE_CHEESE = "cottage_cheese",
|
145
|
+
COW_MILK = "cow_milk",
|
146
|
+
MOZZARELLA_CHEESE = "mozzarella_cheese",
|
147
|
+
YOGURT = "yogurt",
|
148
|
+
EGG_WHITE = "egg_white",
|
149
|
+
EGG_YOLK = "egg_yolk",
|
150
|
+
APPLE = "apple",
|
151
|
+
AVOCADO = "avocado",
|
152
|
+
BANANA = "banana",
|
153
|
+
BLUEBERRY = "blueberry",
|
154
|
+
CANTALOUPE = "cantaloupe",
|
155
|
+
COCONUT = "coconut",
|
156
|
+
GRAPE = "grape",
|
157
|
+
GRAPEFRUIT = "grapefruit",
|
158
|
+
LEMON = "lemon",
|
159
|
+
ORANGE = "orange",
|
160
|
+
PEACH = "peach",
|
161
|
+
PEAR = "pear",
|
162
|
+
PINEAPPLE = "pineapple",
|
163
|
+
STRAWBERRY = "strawberry",
|
164
|
+
TOMATO = "tomato",
|
165
|
+
WATERMELON = "watermelon",
|
166
|
+
BAKERS_YEAST = "bakers_yeast",
|
167
|
+
BARLEY = "barley",
|
168
|
+
BRAN = "bran",
|
169
|
+
BREWERS_YEAST = "brewers_yeast",
|
170
|
+
BROWN_RICE = "brown_rice",
|
171
|
+
GLUTEN = "gluten",
|
172
|
+
MALT = "malt",
|
173
|
+
OATS = "oats",
|
174
|
+
RYE = "rye",
|
175
|
+
WHEAT = "wheat",
|
176
|
+
GREEN_BEAN = "green_bean",
|
177
|
+
GREEN_PEA = "green_pea",
|
178
|
+
LIMA_BEAN = "lima_bean",
|
179
|
+
PEANUT = "peanut",
|
180
|
+
SOYBEAN = "soybean",
|
181
|
+
BEEF = "beef",
|
182
|
+
CHICKEN = "chicken",
|
183
|
+
LAMB = "lamb",
|
184
|
+
PORK = "pork",
|
185
|
+
TURKEY = "turkey",
|
186
|
+
CLAM = "clam",
|
187
|
+
CODFISH = "codfish",
|
188
|
+
CRAB = "crab",
|
189
|
+
HADDOCK = "haddock",
|
190
|
+
LOBSTER = "lobster",
|
191
|
+
PRAWN = "prawn",
|
192
|
+
SALMON = "salmon",
|
193
|
+
SCALLOP = "scallop",
|
194
|
+
SOLE = "sole",
|
195
|
+
SWORDFISH = "swordfish",
|
196
|
+
TUNA = "tuna",
|
197
|
+
ALMOND = "almond",
|
198
|
+
BLACK_WALNUT = "black_walnut",
|
199
|
+
CASHEW = "cashew",
|
200
|
+
CHIA_SEED = "chia_seed",
|
201
|
+
SAFFLOWER = "safflower",
|
202
|
+
SESAME = "sesame",
|
203
|
+
SUNFLOWER = "sunflower",
|
204
|
+
ASPARAGUS = "asparagus",
|
205
|
+
BELL_PEPPER = "bell_pepper",
|
206
|
+
BROCCOLI = "broccoli",
|
207
|
+
CABBAGE = "cabbage",
|
208
|
+
CARROT = "carrot",
|
209
|
+
CAULIFLOWER = "cauliflower",
|
210
|
+
CELERY = "celery",
|
211
|
+
CORN = "corn",
|
212
|
+
CUCUMBER = "cucumber",
|
213
|
+
EGGPLANT = "eggplant",
|
214
|
+
GREEN_OLIVE = "green_olive",
|
215
|
+
KALE = "kale",
|
216
|
+
KELP = "kelp",
|
217
|
+
LETTUCE = "lettuce",
|
218
|
+
MUSHROOM = "mushroom",
|
219
|
+
ONION = "onion",
|
220
|
+
POTATO = "potato",
|
221
|
+
SPINACH = "spinach",
|
222
|
+
SQUASH = "squash",
|
223
|
+
SWEET_POTATO = "sweet_potato",
|
224
|
+
BASIL = "basil",
|
225
|
+
BAY_LEAF = "bay_leaf",
|
226
|
+
BLACK_PEPPER = "black_pepper",
|
227
|
+
BLACK_TEA = "black_tea",
|
228
|
+
COCOA = "cocoa",
|
229
|
+
COFFEE = "coffee",
|
230
|
+
COLA = "cola",
|
231
|
+
CINNAMON = "cinnamon",
|
232
|
+
DILL = "dill",
|
233
|
+
GARLIC = "garlic",
|
234
|
+
GINGER = "ginger",
|
235
|
+
HONEY = "honey",
|
236
|
+
MUSTARD = "mustard",
|
237
|
+
OREGANO = "oregano",
|
238
|
+
TARRAGON = "tarragon"
|
239
|
+
}
|
240
|
+
interface Igg {
|
241
|
+
timestamp: Date;
|
242
|
+
unit: string;
|
243
|
+
user_id: string;
|
244
|
+
order_id: string;
|
245
|
+
source_id: number;
|
246
|
+
value: number;
|
247
|
+
type: FoodAllergen;
|
248
|
+
priority_id?: number;
|
249
|
+
}
|
250
|
+
export interface ClientIgeResponse {
|
251
|
+
ige: Ige[];
|
252
|
+
}
|
253
|
+
export interface ClientIggResponse {
|
254
|
+
igg: Igg[];
|
255
|
+
}
|
256
|
+
interface hba1c {
|
257
|
+
timestamp: Date;
|
258
|
+
unit: string;
|
259
|
+
user_id: string;
|
260
|
+
source_id: number;
|
261
|
+
value: number;
|
262
|
+
priority_id: number;
|
263
|
+
type: string;
|
264
|
+
}
|
265
|
+
export interface ClientHba1cResponse {
|
266
|
+
hba1c: hba1c[];
|
267
|
+
}
|
90
268
|
export {};
|
@@ -1,2 +1,144 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var RespiratoryAllergen;
|
4
|
+
(function (RespiratoryAllergen) {
|
5
|
+
RespiratoryAllergen["D_PTERONYSSINUS"] = "d_pteronyssinus";
|
6
|
+
RespiratoryAllergen["D_FARINAE"] = "d_farinae";
|
7
|
+
RespiratoryAllergen["CAT_DANDER"] = "cat_dander";
|
8
|
+
RespiratoryAllergen["DOG_DANDER"] = "dog_dander";
|
9
|
+
RespiratoryAllergen["HORSE_DANDER"] = "horse_dander";
|
10
|
+
RespiratoryAllergen["MOUSE_URINE"] = "mouse_urine";
|
11
|
+
RespiratoryAllergen["COCKROACH"] = "cockroach";
|
12
|
+
RespiratoryAllergen["ALTERNARIA_ALTERNATA"] = "alternaria_alternata";
|
13
|
+
RespiratoryAllergen["ASPERGILLUS_FUMIGATUS"] = "aspergillus_fumigatus";
|
14
|
+
RespiratoryAllergen["CLADOSPORIUM_HERBARUM"] = "cladosporium_herbarum";
|
15
|
+
RespiratoryAllergen["PENICILLIUM_NOTATUM"] = "penicillium_notatum";
|
16
|
+
RespiratoryAllergen["AUREOBASIDIUM_PULLULANS"] = "aureobasidium_pullulans";
|
17
|
+
RespiratoryAllergen["BAHIA_GRASS"] = "bahia_grass";
|
18
|
+
RespiratoryAllergen["BERMUDA_GRASS"] = "bermuda_grass";
|
19
|
+
RespiratoryAllergen["JOHNSON_GRASS"] = "johnson_grass";
|
20
|
+
RespiratoryAllergen["PERENNIAL_RYEGRASS"] = "perennial_ryegrass";
|
21
|
+
RespiratoryAllergen["TIMOTHY_GRASS"] = "timothy_grass";
|
22
|
+
RespiratoryAllergen["ACACIA"] = "acacia";
|
23
|
+
RespiratoryAllergen["ALDER"] = "alder";
|
24
|
+
RespiratoryAllergen["AUSTRALIAN_PINE"] = "australian_pine";
|
25
|
+
RespiratoryAllergen["BIRCH"] = "birch";
|
26
|
+
RespiratoryAllergen["COTTONWOOD"] = "cottonwood";
|
27
|
+
RespiratoryAllergen["ELM"] = "elm";
|
28
|
+
RespiratoryAllergen["MAPLE_BOX_ELDER"] = "maple_box_elder";
|
29
|
+
RespiratoryAllergen["MAPLE_LEAF_SYCAMORE"] = "maple_leaf_sycamore";
|
30
|
+
RespiratoryAllergen["MOUNTAIN_CEDAR"] = "mountain_cedar";
|
31
|
+
RespiratoryAllergen["MULBERRY"] = "mulberry";
|
32
|
+
RespiratoryAllergen["OAK"] = "oak";
|
33
|
+
RespiratoryAllergen["OLIVE"] = "olive";
|
34
|
+
RespiratoryAllergen["PECAN_HICKORY"] = "pecan_hickory";
|
35
|
+
RespiratoryAllergen["WALNUT"] = "walnut";
|
36
|
+
RespiratoryAllergen["WHITE_ASH"] = "white_ash";
|
37
|
+
RespiratoryAllergen["COMMON_RAGWEED"] = "common_ragweed";
|
38
|
+
RespiratoryAllergen["MUGWORT"] = "mugwort";
|
39
|
+
RespiratoryAllergen["NETTLE"] = "nettle";
|
40
|
+
RespiratoryAllergen["ROUGH_MARSH_ELDER"] = "rough_marsh_elder";
|
41
|
+
RespiratoryAllergen["ROUGH_PIGWEED"] = "rough_pigweed";
|
42
|
+
RespiratoryAllergen["RUSSIAN_THISTLE"] = "russian_thistle";
|
43
|
+
RespiratoryAllergen["SHEEP_SORREL"] = "sheep_sorrel";
|
44
|
+
RespiratoryAllergen["BLOMIA_TROPICALIS"] = "blomia_tropicalis";
|
45
|
+
})(RespiratoryAllergen || (RespiratoryAllergen = {}));
|
46
|
+
var FoodAllergen;
|
47
|
+
(function (FoodAllergen) {
|
48
|
+
FoodAllergen["CHEDDAR_CHEESE"] = "cheddar_cheese";
|
49
|
+
FoodAllergen["COTTAGE_CHEESE"] = "cottage_cheese";
|
50
|
+
FoodAllergen["COW_MILK"] = "cow_milk";
|
51
|
+
FoodAllergen["MOZZARELLA_CHEESE"] = "mozzarella_cheese";
|
52
|
+
FoodAllergen["YOGURT"] = "yogurt";
|
53
|
+
FoodAllergen["EGG_WHITE"] = "egg_white";
|
54
|
+
FoodAllergen["EGG_YOLK"] = "egg_yolk";
|
55
|
+
FoodAllergen["APPLE"] = "apple";
|
56
|
+
FoodAllergen["AVOCADO"] = "avocado";
|
57
|
+
FoodAllergen["BANANA"] = "banana";
|
58
|
+
FoodAllergen["BLUEBERRY"] = "blueberry";
|
59
|
+
FoodAllergen["CANTALOUPE"] = "cantaloupe";
|
60
|
+
FoodAllergen["COCONUT"] = "coconut";
|
61
|
+
FoodAllergen["GRAPE"] = "grape";
|
62
|
+
FoodAllergen["GRAPEFRUIT"] = "grapefruit";
|
63
|
+
FoodAllergen["LEMON"] = "lemon";
|
64
|
+
FoodAllergen["ORANGE"] = "orange";
|
65
|
+
FoodAllergen["PEACH"] = "peach";
|
66
|
+
FoodAllergen["PEAR"] = "pear";
|
67
|
+
FoodAllergen["PINEAPPLE"] = "pineapple";
|
68
|
+
FoodAllergen["STRAWBERRY"] = "strawberry";
|
69
|
+
FoodAllergen["TOMATO"] = "tomato";
|
70
|
+
FoodAllergen["WATERMELON"] = "watermelon";
|
71
|
+
FoodAllergen["BAKERS_YEAST"] = "bakers_yeast";
|
72
|
+
FoodAllergen["BARLEY"] = "barley";
|
73
|
+
FoodAllergen["BRAN"] = "bran";
|
74
|
+
FoodAllergen["BREWERS_YEAST"] = "brewers_yeast";
|
75
|
+
FoodAllergen["BROWN_RICE"] = "brown_rice";
|
76
|
+
FoodAllergen["GLUTEN"] = "gluten";
|
77
|
+
FoodAllergen["MALT"] = "malt";
|
78
|
+
FoodAllergen["OATS"] = "oats";
|
79
|
+
FoodAllergen["RYE"] = "rye";
|
80
|
+
FoodAllergen["WHEAT"] = "wheat";
|
81
|
+
FoodAllergen["GREEN_BEAN"] = "green_bean";
|
82
|
+
FoodAllergen["GREEN_PEA"] = "green_pea";
|
83
|
+
FoodAllergen["LIMA_BEAN"] = "lima_bean";
|
84
|
+
FoodAllergen["PEANUT"] = "peanut";
|
85
|
+
FoodAllergen["SOYBEAN"] = "soybean";
|
86
|
+
FoodAllergen["BEEF"] = "beef";
|
87
|
+
FoodAllergen["CHICKEN"] = "chicken";
|
88
|
+
FoodAllergen["LAMB"] = "lamb";
|
89
|
+
FoodAllergen["PORK"] = "pork";
|
90
|
+
FoodAllergen["TURKEY"] = "turkey";
|
91
|
+
FoodAllergen["CLAM"] = "clam";
|
92
|
+
FoodAllergen["CODFISH"] = "codfish";
|
93
|
+
FoodAllergen["CRAB"] = "crab";
|
94
|
+
FoodAllergen["HADDOCK"] = "haddock";
|
95
|
+
FoodAllergen["LOBSTER"] = "lobster";
|
96
|
+
FoodAllergen["PRAWN"] = "prawn";
|
97
|
+
FoodAllergen["SALMON"] = "salmon";
|
98
|
+
FoodAllergen["SCALLOP"] = "scallop";
|
99
|
+
FoodAllergen["SOLE"] = "sole";
|
100
|
+
FoodAllergen["SWORDFISH"] = "swordfish";
|
101
|
+
FoodAllergen["TUNA"] = "tuna";
|
102
|
+
FoodAllergen["ALMOND"] = "almond";
|
103
|
+
FoodAllergen["BLACK_WALNUT"] = "black_walnut";
|
104
|
+
FoodAllergen["CASHEW"] = "cashew";
|
105
|
+
FoodAllergen["CHIA_SEED"] = "chia_seed";
|
106
|
+
FoodAllergen["SAFFLOWER"] = "safflower";
|
107
|
+
FoodAllergen["SESAME"] = "sesame";
|
108
|
+
FoodAllergen["SUNFLOWER"] = "sunflower";
|
109
|
+
FoodAllergen["ASPARAGUS"] = "asparagus";
|
110
|
+
FoodAllergen["BELL_PEPPER"] = "bell_pepper";
|
111
|
+
FoodAllergen["BROCCOLI"] = "broccoli";
|
112
|
+
FoodAllergen["CABBAGE"] = "cabbage";
|
113
|
+
FoodAllergen["CARROT"] = "carrot";
|
114
|
+
FoodAllergen["CAULIFLOWER"] = "cauliflower";
|
115
|
+
FoodAllergen["CELERY"] = "celery";
|
116
|
+
FoodAllergen["CORN"] = "corn";
|
117
|
+
FoodAllergen["CUCUMBER"] = "cucumber";
|
118
|
+
FoodAllergen["EGGPLANT"] = "eggplant";
|
119
|
+
FoodAllergen["GREEN_OLIVE"] = "green_olive";
|
120
|
+
FoodAllergen["KALE"] = "kale";
|
121
|
+
FoodAllergen["KELP"] = "kelp";
|
122
|
+
FoodAllergen["LETTUCE"] = "lettuce";
|
123
|
+
FoodAllergen["MUSHROOM"] = "mushroom";
|
124
|
+
FoodAllergen["ONION"] = "onion";
|
125
|
+
FoodAllergen["POTATO"] = "potato";
|
126
|
+
FoodAllergen["SPINACH"] = "spinach";
|
127
|
+
FoodAllergen["SQUASH"] = "squash";
|
128
|
+
FoodAllergen["SWEET_POTATO"] = "sweet_potato";
|
129
|
+
FoodAllergen["BASIL"] = "basil";
|
130
|
+
FoodAllergen["BAY_LEAF"] = "bay_leaf";
|
131
|
+
FoodAllergen["BLACK_PEPPER"] = "black_pepper";
|
132
|
+
FoodAllergen["BLACK_TEA"] = "black_tea";
|
133
|
+
FoodAllergen["COCOA"] = "cocoa";
|
134
|
+
FoodAllergen["COFFEE"] = "coffee";
|
135
|
+
FoodAllergen["COLA"] = "cola";
|
136
|
+
FoodAllergen["CINNAMON"] = "cinnamon";
|
137
|
+
FoodAllergen["DILL"] = "dill";
|
138
|
+
FoodAllergen["GARLIC"] = "garlic";
|
139
|
+
FoodAllergen["GINGER"] = "ginger";
|
140
|
+
FoodAllergen["HONEY"] = "honey";
|
141
|
+
FoodAllergen["MUSTARD"] = "mustard";
|
142
|
+
FoodAllergen["OREGANO"] = "oregano";
|
143
|
+
FoodAllergen["TARRAGON"] = "tarragon";
|
144
|
+
})(FoodAllergen || (FoodAllergen = {}));
|
@@ -0,0 +1,44 @@
|
|
1
|
+
export interface PatientAdress {
|
2
|
+
receiver_name: string;
|
3
|
+
street_number: string;
|
4
|
+
street: string;
|
5
|
+
city: string;
|
6
|
+
state: string;
|
7
|
+
zip: string;
|
8
|
+
country: string;
|
9
|
+
phone_number: string;
|
10
|
+
}
|
11
|
+
export interface PatientDetails {
|
12
|
+
dob: string;
|
13
|
+
gender: string;
|
14
|
+
}
|
15
|
+
export interface Testkit {
|
16
|
+
id: string;
|
17
|
+
name: string;
|
18
|
+
description: string;
|
19
|
+
}
|
20
|
+
export interface Order {
|
21
|
+
id: string;
|
22
|
+
team_id: string;
|
23
|
+
created_on: Date;
|
24
|
+
updated_on: Date;
|
25
|
+
status: 'ordered' | 'transit_customer' | 'out_for_delivery' | 'with_customer' | 'transit_lab' | 'delivered_to_lab' | 'processing_lab' | 'completed' | 'failure_to_deliver_to_customer' | 'failure_to_deliver_to_lab' | 'unknown';
|
26
|
+
user_key: string;
|
27
|
+
testkit_id: string;
|
28
|
+
testkit: Testkit;
|
29
|
+
inbound_tracking_number?: string;
|
30
|
+
outbound_tracking_number?: string;
|
31
|
+
outbound_courier?: string;
|
32
|
+
inbound_courier?: string;
|
33
|
+
}
|
34
|
+
export interface OrderResponse {
|
35
|
+
orders: Order[];
|
36
|
+
}
|
37
|
+
export interface OrderRequestResponse {
|
38
|
+
order: Order;
|
39
|
+
status: string;
|
40
|
+
message: string;
|
41
|
+
}
|
42
|
+
export interface TestkitResponse {
|
43
|
+
testkits: Testkit[];
|
44
|
+
}
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ActivityApi, BodyApi, LinkApi, ProviderSpecificApi, SleepApi, UserApi, WebhooksApi, WorkoutsApi } from './client';
|
1
|
+
import { ActivityApi, BodyApi, LinkApi, ProviderSpecificApi, SleepApi, TestkitsApi, UserApi, WebhooksApi, WorkoutsApi } from './client';
|
2
2
|
import { ClientConfig } from './lib/models';
|
3
3
|
import { ClientCredentials } from './lib/credentials';
|
4
4
|
import { VitalsApi } from './client/Vitals';
|
@@ -14,5 +14,6 @@ export declare class VitalClient {
|
|
14
14
|
Workouts: WorkoutsApi;
|
15
15
|
Webhooks: WebhooksApi;
|
16
16
|
Vitals: VitalsApi;
|
17
|
+
Testkits: TestkitsApi;
|
17
18
|
constructor(config: ClientConfig);
|
18
19
|
}
|
package/dist/index.js
CHANGED
@@ -89,6 +89,7 @@ var VitalClient = /** @class */ (function () {
|
|
89
89
|
this.Workouts = new client_1.WorkoutsApi(baseURL, axiosApiInstance);
|
90
90
|
this.Webhooks = new client_1.WebhooksApi(baseURL, axiosApiInstance);
|
91
91
|
this.Vitals = new Vitals_1.VitalsApi(baseURL, axiosApiInstance);
|
92
|
+
this.Testkits = new client_1.TestkitsApi(baseURL, axiosApiInstance);
|
92
93
|
}
|
93
94
|
return VitalClient;
|
94
95
|
}());
|
package/index.ts
CHANGED
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
LinkApi,
|
7
7
|
ProviderSpecificApi,
|
8
8
|
SleepApi,
|
9
|
+
TestkitsApi,
|
9
10
|
UserApi,
|
10
11
|
WebhooksApi,
|
11
12
|
WorkoutsApi,
|
@@ -27,7 +28,8 @@ export class VitalClient {
|
|
27
28
|
Workouts: WorkoutsApi;
|
28
29
|
Webhooks: WebhooksApi;
|
29
30
|
Vitals: VitalsApi;
|
30
|
-
|
31
|
+
Testkits: TestkitsApi;
|
32
|
+
|
31
33
|
constructor(config: ClientConfig) {
|
32
34
|
this.config = config;
|
33
35
|
this.clientCredentials = new ClientCredentials(config);
|
@@ -64,5 +66,6 @@ export class VitalClient {
|
|
64
66
|
this.Workouts = new WorkoutsApi(baseURL, axiosApiInstance);
|
65
67
|
this.Webhooks = new WebhooksApi(baseURL, axiosApiInstance);
|
66
68
|
this.Vitals = new VitalsApi(baseURL, axiosApiInstance);
|
69
|
+
this.Testkits = new TestkitsApi(baseURL, axiosApiInstance);
|
67
70
|
}
|
68
71
|
}
|