@natch-the-storage/heathershaw-platform-types 1.10.7 → 1.10.9
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 +25 -2
- package/build/validators.js +12 -6
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const paymentStatusValues: readonly ["AWAITING_PAYMENT", "PAID",
|
|
|
5
5
|
export declare const repeatStorageValues: readonly ["HEATHERSHAWS", "PHARMACY", "PATIENT"];
|
|
6
6
|
export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
|
|
7
7
|
export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
|
|
8
|
-
export declare const staffProfileRoleValues: readonly ["ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING"
|
|
8
|
+
export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING"];
|
|
9
9
|
export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
|
|
10
10
|
export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
|
|
11
11
|
export type QuoteStatus = (typeof quoteStatusValues)[number];
|
|
@@ -245,6 +245,24 @@ export interface PartnerPharmacyProfileReportData {
|
|
|
245
245
|
patientRecordCount: number;
|
|
246
246
|
pendingPaperScripts: number;
|
|
247
247
|
}
|
|
248
|
+
export type PartnerPharmacyProfileDetailed = PartnerPharmacyProfile & {
|
|
249
|
+
status: boolean | null;
|
|
250
|
+
patients: PatientRecord[];
|
|
251
|
+
orders: Order[];
|
|
252
|
+
priceMatches: PriceMatch[];
|
|
253
|
+
quotes: Quote[];
|
|
254
|
+
};
|
|
255
|
+
export type PartnerPharmacyProfileSummary = {
|
|
256
|
+
id: number;
|
|
257
|
+
userId: string;
|
|
258
|
+
pharmacyName: string;
|
|
259
|
+
discountTier: number;
|
|
260
|
+
paymentMode: PaymentModeAtOrder;
|
|
261
|
+
patientsCount: number;
|
|
262
|
+
ordersCount: number;
|
|
263
|
+
lastOrderDate: string | null;
|
|
264
|
+
status: boolean | null;
|
|
265
|
+
};
|
|
248
266
|
export interface PatientRecord {
|
|
249
267
|
id: number;
|
|
250
268
|
partnerPharmacyProfileId?: number | null;
|
|
@@ -390,17 +408,19 @@ export interface StaffProfile {
|
|
|
390
408
|
id: number;
|
|
391
409
|
userId: string;
|
|
392
410
|
role: StaffProfileRole;
|
|
411
|
+
name: string;
|
|
393
412
|
status: StaffProfileStatus;
|
|
394
413
|
}
|
|
395
414
|
export interface StaffProfileCreate {
|
|
396
415
|
userId: string;
|
|
397
416
|
role: StaffProfileRole;
|
|
417
|
+
name: string;
|
|
398
418
|
status: StaffProfileStatus;
|
|
399
419
|
}
|
|
400
420
|
/**
|
|
401
421
|
* A union of the StaffProfile with the name, username and email fields from the user
|
|
402
422
|
*/
|
|
403
|
-
export interface
|
|
423
|
+
export interface StaffProfileWithUser {
|
|
404
424
|
id: number;
|
|
405
425
|
userId: string;
|
|
406
426
|
name: string;
|
|
@@ -726,8 +746,10 @@ export declare const ApiRoutes: {
|
|
|
726
746
|
};
|
|
727
747
|
partnerPharmacyProfiles: {
|
|
728
748
|
list: string;
|
|
749
|
+
getSummaries: string;
|
|
729
750
|
get: (id: number) => string;
|
|
730
751
|
getByUser: (userId: string) => string;
|
|
752
|
+
getDetailed: (id: number) => string;
|
|
731
753
|
create: string;
|
|
732
754
|
update: string;
|
|
733
755
|
delete: (id: number) => string;
|
|
@@ -783,6 +805,7 @@ export declare const ApiRoutes: {
|
|
|
783
805
|
limit?: number;
|
|
784
806
|
}) => string;
|
|
785
807
|
get: (id: number) => string;
|
|
808
|
+
getByUser: (userId: string) => string;
|
|
786
809
|
create: string;
|
|
787
810
|
update: string;
|
|
788
811
|
};
|
package/build/validators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region Enum value arrays ──────────────────────────────────────────────────────────
|
|
2
2
|
export const paperScriptReminderStatusValues = [
|
|
3
3
|
'PENDING',
|
|
4
4
|
'RECEIVED',
|
|
@@ -19,15 +19,16 @@ export const repeatStorageValues = [
|
|
|
19
19
|
export const scriptTypeValues = ['eRx', 'PAPER'];
|
|
20
20
|
export const shippingTypeValues = ['STANDARD', 'COLD_CHAIN'];
|
|
21
21
|
export const staffProfileRoleValues = [
|
|
22
|
+
'STAFF',
|
|
22
23
|
'ADMIN',
|
|
23
24
|
'COUNSELLING',
|
|
24
25
|
'SALES REP',
|
|
25
26
|
'ALT. THERAPIES',
|
|
26
27
|
'COMPOUNDING',
|
|
27
|
-
'STAFF',
|
|
28
28
|
];
|
|
29
29
|
export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
|
|
30
|
-
|
|
30
|
+
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
31
|
+
//#region compound direct ────────────────────────────────────────────────────────────
|
|
31
32
|
export const CompoundDirectAnimalId = {
|
|
32
33
|
dog: { id: 1, name: 'Dog' },
|
|
33
34
|
cat: { id: 2, name: 'Cat' },
|
|
@@ -56,7 +57,8 @@ export const CompoundDirectAnimalId = {
|
|
|
56
57
|
other: { id: 25, name: 'N/A' },
|
|
57
58
|
};
|
|
58
59
|
export const AnimalSpeciesKeys = Object.keys(CompoundDirectAnimalId);
|
|
59
|
-
|
|
60
|
+
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
61
|
+
//#region contact form ────────────────────────────────────────────────────────────
|
|
60
62
|
export const parseCategory = (category) => {
|
|
61
63
|
switch (category) {
|
|
62
64
|
case 'orderOrDelivery':
|
|
@@ -71,6 +73,7 @@ export const parseCategory = (category) => {
|
|
|
71
73
|
return 'General';
|
|
72
74
|
}
|
|
73
75
|
};
|
|
76
|
+
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
74
77
|
export const BucketObjects = {
|
|
75
78
|
dev: {
|
|
76
79
|
emailLogo: {
|
|
@@ -146,8 +149,10 @@ export const ApiRoutes = {
|
|
|
146
149
|
},
|
|
147
150
|
partnerPharmacyProfiles: {
|
|
148
151
|
list: '/api/profiles/partner-pharmacies',
|
|
152
|
+
getSummaries: '/api/profiles/partner-pharmacies/summaries',
|
|
149
153
|
get: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
150
|
-
getByUser: (userId) => `/api/profiles/partner-pharmacies/
|
|
154
|
+
getByUser: (userId) => `/api/profiles/partner-pharmacies/users/${userId}`,
|
|
155
|
+
getDetailed: (id) => `/api/profiles/partner-pharmacies/${id}/detailed-profiles`,
|
|
151
156
|
create: '/api/profiles/partner-pharmacies',
|
|
152
157
|
update: '/api/profiles/partner-pharmacies',
|
|
153
158
|
delete: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
@@ -156,7 +161,7 @@ export const ApiRoutes = {
|
|
|
156
161
|
patientRecords: {
|
|
157
162
|
list: (id, type) => '/api/patient-records' + `${type ? '?' + type + '=' + id : ''}`,
|
|
158
163
|
get: (id) => `/api/patient-records/${id}`,
|
|
159
|
-
getByUser: (userId) => `/api/patient-records/
|
|
164
|
+
getByUser: (userId) => `/api/patient-records/users/${userId}`,
|
|
160
165
|
create: '/api/patient-records',
|
|
161
166
|
update: '/api/patient-records',
|
|
162
167
|
delete: (id) => `/api/patient-records/${id}`,
|
|
@@ -217,6 +222,7 @@ export const ApiRoutes = {
|
|
|
217
222
|
return `/api/profiles/staff-profiles${query ? `?${query}` : ''}`;
|
|
218
223
|
},
|
|
219
224
|
get: (id) => `/api/profiles/staff-profiles/${id}`,
|
|
225
|
+
getByUser: (userId) => `/api/profiles/staff-profiles/users/${userId}`,
|
|
220
226
|
create: '/api/profiles/staff-profiles',
|
|
221
227
|
update: '/api/profiles/staff-profiles',
|
|
222
228
|
},
|