@natch-the-storage/heathershaw-platform-types 1.8.1 → 1.8.3
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 +35 -4
- package/build/validators.js +5 -2
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -463,8 +463,16 @@ export declare const CompoundDirectAnimalId: {
|
|
|
463
463
|
readonly id: 24;
|
|
464
464
|
readonly name: "Monkey";
|
|
465
465
|
};
|
|
466
|
+
readonly other: {
|
|
467
|
+
readonly id: 25;
|
|
468
|
+
readonly name: "N/A";
|
|
469
|
+
};
|
|
466
470
|
};
|
|
467
471
|
export declare const AnimalSpeciesKeys: [keyof typeof CompoundDirectAnimalId, ...(keyof typeof CompoundDirectAnimalId)[]];
|
|
472
|
+
export interface CDScriptPriceOption {
|
|
473
|
+
quantity: number;
|
|
474
|
+
price: number;
|
|
475
|
+
}
|
|
468
476
|
export interface CDScriptProperties {
|
|
469
477
|
propertyId: number;
|
|
470
478
|
code: string;
|
|
@@ -534,7 +542,7 @@ export interface CDCustomerCreate {
|
|
|
534
542
|
state: string;
|
|
535
543
|
postCode: string;
|
|
536
544
|
mobile: string;
|
|
537
|
-
email
|
|
545
|
+
email?: string;
|
|
538
546
|
dateOfBirth: string;
|
|
539
547
|
animalSpecies?: typeof AnimalSpeciesKeys;
|
|
540
548
|
animalOwnerName?: string;
|
|
@@ -542,9 +550,30 @@ export interface CDCustomerCreate {
|
|
|
542
550
|
export interface CDCustomerSearch {
|
|
543
551
|
name: string;
|
|
544
552
|
dateOfBirth: string;
|
|
545
|
-
email
|
|
553
|
+
email?: string;
|
|
546
554
|
phone: string;
|
|
547
555
|
}
|
|
556
|
+
export interface CDFormulation {
|
|
557
|
+
formulationId: number;
|
|
558
|
+
name: string;
|
|
559
|
+
quantity: number;
|
|
560
|
+
isCapsule: boolean;
|
|
561
|
+
capsuleSize: string;
|
|
562
|
+
unit: string;
|
|
563
|
+
dosageFormRouteOfAdministration: string;
|
|
564
|
+
enableRiskAssessment: boolean;
|
|
565
|
+
standardInstructions: string;
|
|
566
|
+
infoUrl: string;
|
|
567
|
+
compound: {
|
|
568
|
+
isCapsule: boolean;
|
|
569
|
+
capsuleSize: string;
|
|
570
|
+
expiryDays: number;
|
|
571
|
+
dosageFormId: number;
|
|
572
|
+
dosageFormName: string;
|
|
573
|
+
};
|
|
574
|
+
pricing: CDScriptPriceOption[];
|
|
575
|
+
properties: CDScriptProperties[];
|
|
576
|
+
}
|
|
548
577
|
export declare const parseCategory: (category: string) => "Order or delivery" | "Prescription" | "Profile or account" | "Compounding" | "General";
|
|
549
578
|
export interface ContactFormInternalCreate {
|
|
550
579
|
category: string;
|
|
@@ -580,8 +609,8 @@ export declare const ApiRoutes: {
|
|
|
580
609
|
delete: (id: number) => string;
|
|
581
610
|
};
|
|
582
611
|
patientRecords: {
|
|
583
|
-
list: string;
|
|
584
|
-
get: (id
|
|
612
|
+
list: (id?: number, type?: "partner" | "direct") => string;
|
|
613
|
+
get: (id: number) => string;
|
|
585
614
|
getByUser: (userId: string) => string;
|
|
586
615
|
create: string;
|
|
587
616
|
update: string;
|
|
@@ -673,5 +702,7 @@ export declare const ApiRoutes: {
|
|
|
673
702
|
createCustomer: string;
|
|
674
703
|
getDraftScripts: string;
|
|
675
704
|
getDraftScriptById: (id: number) => string;
|
|
705
|
+
listFormulations: string;
|
|
706
|
+
getFormulationById: (id: number) => string;
|
|
676
707
|
};
|
|
677
708
|
};
|
package/build/validators.js
CHANGED
|
@@ -50,6 +50,7 @@ export const CompoundDirectAnimalId = {
|
|
|
50
50
|
bee: { id: 22, name: 'Bee' },
|
|
51
51
|
koala: { id: 23, name: 'Koala' },
|
|
52
52
|
monkey: { id: 24, name: 'Monkey' },
|
|
53
|
+
other: { id: 25, name: 'N/A' },
|
|
53
54
|
};
|
|
54
55
|
export const AnimalSpeciesKeys = Object.keys(CompoundDirectAnimalId);
|
|
55
56
|
// contact form
|
|
@@ -98,8 +99,8 @@ export const ApiRoutes = {
|
|
|
98
99
|
delete: (id) => `/api/orders/${id}`,
|
|
99
100
|
},
|
|
100
101
|
patientRecords: {
|
|
101
|
-
list: '/api/patient-records'
|
|
102
|
-
get: (id
|
|
102
|
+
list: (id, type) => '/api/patient-records' + `${type ? '?' + type + '=' + id : ''}`,
|
|
103
|
+
get: (id) => `/api/patient-records/${id}`,
|
|
103
104
|
getByUser: (userId) => `/api/patient-records/user/${userId}`,
|
|
104
105
|
create: '/api/patient-records',
|
|
105
106
|
update: '/api/patient-records',
|
|
@@ -191,5 +192,7 @@ export const ApiRoutes = {
|
|
|
191
192
|
createCustomer: '/api/compound-direct/customer',
|
|
192
193
|
getDraftScripts: '/api/compound-direct/draft-scripts',
|
|
193
194
|
getDraftScriptById: (id) => `/api/compound-direct/draft-scripts/${id}`,
|
|
195
|
+
listFormulations: '/api/compound-direct/formulations',
|
|
196
|
+
getFormulationById: (id) => `/api/compound-direct/formulations/${id}`,
|
|
194
197
|
},
|
|
195
198
|
};
|