@natch-the-storage/heathershaw-platform-types 1.10.9 → 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 +10 -22
- package/build/validators.js +11 -0
- 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,24 +225,14 @@ 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;
|
|
@@ -252,12 +245,7 @@ export type PartnerPharmacyProfileDetailed = PartnerPharmacyProfile & {
|
|
|
252
245
|
priceMatches: PriceMatch[];
|
|
253
246
|
quotes: Quote[];
|
|
254
247
|
};
|
|
255
|
-
export type PartnerPharmacyProfileSummary = {
|
|
256
|
-
id: number;
|
|
257
|
-
userId: string;
|
|
258
|
-
pharmacyName: string;
|
|
259
|
-
discountTier: number;
|
|
260
|
-
paymentMode: PaymentModeAtOrder;
|
|
248
|
+
export type PartnerPharmacyProfileSummary = Pick<PartnerPharmacyProfile, 'id' | 'userId' | 'pharmacyName' | 'discountTier' | 'paymentMode'> & {
|
|
261
249
|
patientsCount: number;
|
|
262
250
|
ordersCount: number;
|
|
263
251
|
lastOrderDate: string | null;
|
package/build/validators.js
CHANGED
|
@@ -27,6 +27,17 @@ export const staffProfileRoleValues = [
|
|
|
27
27
|
'COMPOUNDING',
|
|
28
28
|
];
|
|
29
29
|
export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
|
|
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];
|
|
30
41
|
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
31
42
|
//#region compound direct ────────────────────────────────────────────────────────────
|
|
32
43
|
export const CompoundDirectAnimalId = {
|