@natch-the-storage/heathershaw-platform-types 1.4.4 → 1.5.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/build/validators.d.ts +139 -1
- package/build/validators.js +34 -1
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -202,6 +202,7 @@ export interface PatientRecord {
|
|
|
202
202
|
reminderEnabled?: boolean;
|
|
203
203
|
scripts?: ScriptSelect[];
|
|
204
204
|
orderHistory?: OrderSelect[];
|
|
205
|
+
animalSpecies?: string;
|
|
205
206
|
relationship?: string | null;
|
|
206
207
|
}
|
|
207
208
|
export interface PatientRecordCreate {
|
|
@@ -218,6 +219,7 @@ export interface PatientRecordCreate {
|
|
|
218
219
|
reminderEnabled?: boolean;
|
|
219
220
|
scripts?: ScriptSelect[];
|
|
220
221
|
orderHistory?: OrderSelect[];
|
|
222
|
+
animalSpecies?: string;
|
|
221
223
|
relationship?: string | null;
|
|
222
224
|
}
|
|
223
225
|
export interface Prescriber {
|
|
@@ -334,7 +336,138 @@ export interface ScriptCreate {
|
|
|
334
336
|
compoundDirectId?: string | null;
|
|
335
337
|
imageKey?: string | null;
|
|
336
338
|
}
|
|
337
|
-
export declare const
|
|
339
|
+
export declare const CompoundDirectAnimalId: {
|
|
340
|
+
readonly dog: {
|
|
341
|
+
readonly id: 1;
|
|
342
|
+
readonly name: "Dog";
|
|
343
|
+
};
|
|
344
|
+
readonly cat: {
|
|
345
|
+
readonly id: 2;
|
|
346
|
+
readonly name: "Cat";
|
|
347
|
+
};
|
|
348
|
+
readonly fish: {
|
|
349
|
+
readonly id: 3;
|
|
350
|
+
readonly name: "Fish";
|
|
351
|
+
};
|
|
352
|
+
readonly bird: {
|
|
353
|
+
readonly id: 4;
|
|
354
|
+
readonly name: "Bird";
|
|
355
|
+
};
|
|
356
|
+
readonly rabbit: {
|
|
357
|
+
readonly id: 5;
|
|
358
|
+
readonly name: "Rabbit";
|
|
359
|
+
};
|
|
360
|
+
readonly mouse: {
|
|
361
|
+
readonly id: 6;
|
|
362
|
+
readonly name: "Mouse";
|
|
363
|
+
};
|
|
364
|
+
readonly guinea: {
|
|
365
|
+
readonly id: 7;
|
|
366
|
+
readonly name: "Guinea";
|
|
367
|
+
};
|
|
368
|
+
readonly turtle: {
|
|
369
|
+
readonly id: 8;
|
|
370
|
+
readonly name: "Turtle";
|
|
371
|
+
};
|
|
372
|
+
readonly horse: {
|
|
373
|
+
readonly id: 9;
|
|
374
|
+
readonly name: "Horse";
|
|
375
|
+
};
|
|
376
|
+
readonly snake: {
|
|
377
|
+
readonly id: 10;
|
|
378
|
+
readonly name: "Snake";
|
|
379
|
+
};
|
|
380
|
+
readonly ferret: {
|
|
381
|
+
readonly id: 11;
|
|
382
|
+
readonly name: "Ferret";
|
|
383
|
+
};
|
|
384
|
+
readonly lizard: {
|
|
385
|
+
readonly id: 12;
|
|
386
|
+
readonly name: "Lizard";
|
|
387
|
+
};
|
|
388
|
+
readonly rat: {
|
|
389
|
+
readonly id: 13;
|
|
390
|
+
readonly name: "Rat";
|
|
391
|
+
};
|
|
392
|
+
readonly sheep: {
|
|
393
|
+
readonly id: 14;
|
|
394
|
+
readonly name: "Sheep";
|
|
395
|
+
};
|
|
396
|
+
readonly cow: {
|
|
397
|
+
readonly id: 15;
|
|
398
|
+
readonly name: "Cow";
|
|
399
|
+
};
|
|
400
|
+
readonly goat: {
|
|
401
|
+
readonly id: 16;
|
|
402
|
+
readonly name: "Goat";
|
|
403
|
+
};
|
|
404
|
+
readonly donkey: {
|
|
405
|
+
readonly id: 17;
|
|
406
|
+
readonly name: "Donkey";
|
|
407
|
+
};
|
|
408
|
+
readonly deer: {
|
|
409
|
+
readonly id: 18;
|
|
410
|
+
readonly name: "Deer";
|
|
411
|
+
};
|
|
412
|
+
readonly pig: {
|
|
413
|
+
readonly id: 19;
|
|
414
|
+
readonly name: "Pig";
|
|
415
|
+
};
|
|
416
|
+
readonly chicken: {
|
|
417
|
+
readonly id: 20;
|
|
418
|
+
readonly name: "Chicken";
|
|
419
|
+
};
|
|
420
|
+
readonly goose: {
|
|
421
|
+
readonly id: 21;
|
|
422
|
+
readonly name: "Goose";
|
|
423
|
+
};
|
|
424
|
+
readonly bee: {
|
|
425
|
+
readonly id: 22;
|
|
426
|
+
readonly name: "Bee";
|
|
427
|
+
};
|
|
428
|
+
readonly koala: {
|
|
429
|
+
readonly id: 23;
|
|
430
|
+
readonly name: "Koala";
|
|
431
|
+
};
|
|
432
|
+
readonly monkey: {
|
|
433
|
+
readonly id: 24;
|
|
434
|
+
readonly name: "Monkey";
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
export declare const AnimalSpeciesKeys: [keyof typeof CompoundDirectAnimalId, ...(keyof typeof CompoundDirectAnimalId)[]];
|
|
438
|
+
export interface CDScript {
|
|
439
|
+
draftScriptId: number;
|
|
440
|
+
stockId: number | null;
|
|
441
|
+
name: string;
|
|
442
|
+
comment: string;
|
|
443
|
+
isReorderable: boolean;
|
|
444
|
+
hasCurrentOrder: boolean;
|
|
445
|
+
isOrderConfirmed: boolean;
|
|
446
|
+
personId: number;
|
|
447
|
+
customerId: number;
|
|
448
|
+
price: number;
|
|
449
|
+
repeatsTotal: number;
|
|
450
|
+
repeatsLeft: number;
|
|
451
|
+
supplyNumber: number;
|
|
452
|
+
owing: boolean;
|
|
453
|
+
deferred: boolean;
|
|
454
|
+
quantity: number;
|
|
455
|
+
itemCount: number;
|
|
456
|
+
}
|
|
457
|
+
export interface CDCustomerCreate {
|
|
458
|
+
firstName: string;
|
|
459
|
+
lastName: string;
|
|
460
|
+
address: string;
|
|
461
|
+
suburb: string;
|
|
462
|
+
state: string;
|
|
463
|
+
postCode: string;
|
|
464
|
+
mobile: string;
|
|
465
|
+
email: string;
|
|
466
|
+
dateOfBirth: string;
|
|
467
|
+
animalSpecies?: typeof AnimalSpeciesKeys;
|
|
468
|
+
animalOwnerName?: string;
|
|
469
|
+
}
|
|
470
|
+
export declare const ApiRoutes: {
|
|
338
471
|
orders: {
|
|
339
472
|
list: string;
|
|
340
473
|
get: (id: number) => string;
|
|
@@ -429,4 +562,9 @@ export declare const apiRoutes: {
|
|
|
429
562
|
send: string;
|
|
430
563
|
};
|
|
431
564
|
email: {};
|
|
565
|
+
compoundDirect: {
|
|
566
|
+
searchForCustomer: string;
|
|
567
|
+
createCustomer: string;
|
|
568
|
+
getDraftScripts: string;
|
|
569
|
+
};
|
|
432
570
|
};
|
package/build/validators.js
CHANGED
|
@@ -24,7 +24,35 @@ export const hazardTagsValues = [
|
|
|
24
24
|
"Cytotoxic",
|
|
25
25
|
"High-Risk",
|
|
26
26
|
];
|
|
27
|
-
|
|
27
|
+
// ─── Compound Direct ────────────────────────────────────────────────────────────
|
|
28
|
+
export const CompoundDirectAnimalId = {
|
|
29
|
+
dog: { id: 1, name: 'Dog' },
|
|
30
|
+
cat: { id: 2, name: 'Cat' },
|
|
31
|
+
fish: { id: 3, name: 'Fish' },
|
|
32
|
+
bird: { id: 4, name: 'Bird' },
|
|
33
|
+
rabbit: { id: 5, name: 'Rabbit' },
|
|
34
|
+
mouse: { id: 6, name: 'Mouse' },
|
|
35
|
+
guinea: { id: 7, name: 'Guinea' },
|
|
36
|
+
turtle: { id: 8, name: 'Turtle' },
|
|
37
|
+
horse: { id: 9, name: 'Horse' },
|
|
38
|
+
snake: { id: 10, name: 'Snake' },
|
|
39
|
+
ferret: { id: 11, name: 'Ferret' },
|
|
40
|
+
lizard: { id: 12, name: 'Lizard' },
|
|
41
|
+
rat: { id: 13, name: 'Rat' },
|
|
42
|
+
sheep: { id: 14, name: 'Sheep' },
|
|
43
|
+
cow: { id: 15, name: 'Cow' },
|
|
44
|
+
goat: { id: 16, name: 'Goat' },
|
|
45
|
+
donkey: { id: 17, name: 'Donkey' },
|
|
46
|
+
deer: { id: 18, name: 'Deer' },
|
|
47
|
+
pig: { id: 19, name: 'Pig' },
|
|
48
|
+
chicken: { id: 20, name: 'Chicken' },
|
|
49
|
+
goose: { id: 21, name: 'Goose' },
|
|
50
|
+
bee: { id: 22, name: 'Bee' },
|
|
51
|
+
koala: { id: 23, name: 'Koala' },
|
|
52
|
+
monkey: { id: 24, name: 'Monkey' },
|
|
53
|
+
};
|
|
54
|
+
export const AnimalSpeciesKeys = Object.keys(CompoundDirectAnimalId);
|
|
55
|
+
export const ApiRoutes = {
|
|
28
56
|
orders: {
|
|
29
57
|
list: "/api/orders",
|
|
30
58
|
get: (id) => `/api/orders/${id}`,
|
|
@@ -119,4 +147,9 @@ export const apiRoutes = {
|
|
|
119
147
|
send: "/api/reminders/sms",
|
|
120
148
|
},
|
|
121
149
|
email: {},
|
|
150
|
+
compoundDirect: {
|
|
151
|
+
searchForCustomer: "/api/compound-direct/customers",
|
|
152
|
+
createCustomer: "/api/compound-direct/customer",
|
|
153
|
+
getDraftScripts: "/api/compound-direct/draft-scripts/customers"
|
|
154
|
+
}
|
|
122
155
|
};
|