@natch-the-storage/heathershaw-platform-types 1.10.8 → 1.10.10
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 +24 -16
- package/build/validators.js +19 -3
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
|
|
|
7
7
|
export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
|
|
8
8
|
export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING"];
|
|
9
9
|
export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
|
|
10
|
+
export declare const auStatesValues: string[];
|
|
11
|
+
export declare const discountTierValues: number[];
|
|
10
12
|
export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
|
|
11
13
|
export type QuoteStatus = (typeof quoteStatusValues)[number];
|
|
12
14
|
export type PaymentModeAtOrder = (typeof paymentModeAtOrderValues)[number];
|
|
@@ -16,6 +18,8 @@ export type ScriptType = (typeof scriptTypeValues)[number];
|
|
|
16
18
|
export type ShippingType = (typeof shippingTypeValues)[number];
|
|
17
19
|
export type StaffProfileRole = (typeof staffProfileRoleValues)[number];
|
|
18
20
|
export type StaffProfileStatus = (typeof staffProfileStatusValues)[number];
|
|
21
|
+
export type AuStates = (typeof auStatesValues)[number];
|
|
22
|
+
export type DiscountTiers = (typeof discountTierValues)[number];
|
|
19
23
|
export interface Address {
|
|
20
24
|
street: string;
|
|
21
25
|
suburb: string;
|
|
@@ -111,7 +115,6 @@ export interface User {
|
|
|
111
115
|
banned?: boolean;
|
|
112
116
|
banReason?: string;
|
|
113
117
|
banExpires?: Date;
|
|
114
|
-
onboarded: boolean;
|
|
115
118
|
}
|
|
116
119
|
export interface DirectUserProfile {
|
|
117
120
|
id: number;
|
|
@@ -222,29 +225,32 @@ export interface PartnerPharmacyProfile {
|
|
|
222
225
|
paymentMode: PaymentModeAtOrder;
|
|
223
226
|
remindersEnabled?: boolean;
|
|
224
227
|
priceMatches?: PriceMatch[];
|
|
225
|
-
addresses
|
|
226
|
-
orders?: Order[];
|
|
227
|
-
xeroContactId?: string | null;
|
|
228
|
-
}
|
|
229
|
-
export interface PartnerPharmacyProfileCreate {
|
|
230
|
-
userId: string;
|
|
231
|
-
abn: string;
|
|
232
|
-
pharmacyName: string;
|
|
233
|
-
contactName: string;
|
|
234
|
-
invoiceEmail: string;
|
|
235
|
-
discountTier: number;
|
|
236
|
-
paymentMode: PaymentModeAtOrder;
|
|
237
|
-
remindersEnabled?: boolean;
|
|
238
|
-
priceMatches?: PriceMatch[];
|
|
239
|
-
addresses?: Address[];
|
|
228
|
+
addresses: Address[];
|
|
240
229
|
orders?: Order[];
|
|
241
230
|
xeroContactId?: string | null;
|
|
242
231
|
}
|
|
232
|
+
export type PartnerPharmacyProfileCreate = Omit<PartnerPharmacyProfile, 'id' | 'priceMatches' | 'orders'>;
|
|
233
|
+
export type PartnerPharmacyProfileUpdate = Partial<PartnerPharmacyProfile> & {
|
|
234
|
+
id: number;
|
|
235
|
+
};
|
|
243
236
|
export interface PartnerPharmacyProfileReportData {
|
|
244
237
|
orderCount: number;
|
|
245
238
|
patientRecordCount: number;
|
|
246
239
|
pendingPaperScripts: number;
|
|
247
240
|
}
|
|
241
|
+
export type PartnerPharmacyProfileDetailed = PartnerPharmacyProfile & {
|
|
242
|
+
status: boolean | null;
|
|
243
|
+
patients: PatientRecord[];
|
|
244
|
+
orders: Order[];
|
|
245
|
+
priceMatches: PriceMatch[];
|
|
246
|
+
quotes: Quote[];
|
|
247
|
+
};
|
|
248
|
+
export type PartnerPharmacyProfileSummary = Pick<PartnerPharmacyProfile, 'id' | 'userId' | 'pharmacyName' | 'discountTier' | 'paymentMode'> & {
|
|
249
|
+
patientsCount: number;
|
|
250
|
+
ordersCount: number;
|
|
251
|
+
lastOrderDate: string | null;
|
|
252
|
+
status: boolean | null;
|
|
253
|
+
};
|
|
248
254
|
export interface PatientRecord {
|
|
249
255
|
id: number;
|
|
250
256
|
partnerPharmacyProfileId?: number | null;
|
|
@@ -728,8 +734,10 @@ export declare const ApiRoutes: {
|
|
|
728
734
|
};
|
|
729
735
|
partnerPharmacyProfiles: {
|
|
730
736
|
list: string;
|
|
737
|
+
getSummaries: string;
|
|
731
738
|
get: (id: number) => string;
|
|
732
739
|
getByUser: (userId: string) => string;
|
|
740
|
+
getDetailed: (id: number) => string;
|
|
733
741
|
create: string;
|
|
734
742
|
update: string;
|
|
735
743
|
delete: (id: number) => string;
|
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',
|
|
@@ -27,7 +27,19 @@ export const staffProfileRoleValues = [
|
|
|
27
27
|
'COMPOUNDING',
|
|
28
28
|
];
|
|
29
29
|
export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
|
|
30
|
-
|
|
30
|
+
export const auStatesValues = [
|
|
31
|
+
'VIC',
|
|
32
|
+
'NSW',
|
|
33
|
+
'QLD',
|
|
34
|
+
'WA',
|
|
35
|
+
'SA',
|
|
36
|
+
'TAS',
|
|
37
|
+
'ACT',
|
|
38
|
+
'NT',
|
|
39
|
+
];
|
|
40
|
+
export const discountTierValues = [0.9, 0.88, 0.875, 0.85, 0.8, 0.75, 0.7];
|
|
41
|
+
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
42
|
+
//#region compound direct ────────────────────────────────────────────────────────────
|
|
31
43
|
export const CompoundDirectAnimalId = {
|
|
32
44
|
dog: { id: 1, name: 'Dog' },
|
|
33
45
|
cat: { id: 2, name: 'Cat' },
|
|
@@ -56,7 +68,8 @@ export const CompoundDirectAnimalId = {
|
|
|
56
68
|
other: { id: 25, name: 'N/A' },
|
|
57
69
|
};
|
|
58
70
|
export const AnimalSpeciesKeys = Object.keys(CompoundDirectAnimalId);
|
|
59
|
-
|
|
71
|
+
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
72
|
+
//#region contact form ────────────────────────────────────────────────────────────
|
|
60
73
|
export const parseCategory = (category) => {
|
|
61
74
|
switch (category) {
|
|
62
75
|
case 'orderOrDelivery':
|
|
@@ -71,6 +84,7 @@ export const parseCategory = (category) => {
|
|
|
71
84
|
return 'General';
|
|
72
85
|
}
|
|
73
86
|
};
|
|
87
|
+
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
74
88
|
export const BucketObjects = {
|
|
75
89
|
dev: {
|
|
76
90
|
emailLogo: {
|
|
@@ -146,8 +160,10 @@ export const ApiRoutes = {
|
|
|
146
160
|
},
|
|
147
161
|
partnerPharmacyProfiles: {
|
|
148
162
|
list: '/api/profiles/partner-pharmacies',
|
|
163
|
+
getSummaries: '/api/profiles/partner-pharmacies/summaries',
|
|
149
164
|
get: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
150
165
|
getByUser: (userId) => `/api/profiles/partner-pharmacies/users/${userId}`,
|
|
166
|
+
getDetailed: (id) => `/api/profiles/partner-pharmacies/${id}/detailed-profiles`,
|
|
151
167
|
create: '/api/profiles/partner-pharmacies',
|
|
152
168
|
update: '/api/profiles/partner-pharmacies',
|
|
153
169
|
delete: (id) => `/api/profiles/partner-pharmacies/${id}`,
|