@natch-the-storage/heathershaw-platform-types 1.10.9 → 1.10.11

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.
@@ -1,3 +1,4 @@
1
+ export declare const orderStatusValues: readonly ["received", "processing", "dispatched", "delivered", "completed"];
1
2
  export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
2
3
  export declare const quoteStatusValues: readonly ["PENDING", "PROCESSING", "RESOLVED"];
3
4
  export declare const paymentModeAtOrderValues: readonly ["INVOICE", "POS"];
@@ -7,6 +8,9 @@ export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
7
8
  export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
8
9
  export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING"];
9
10
  export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
11
+ export declare const auStatesValues: string[];
12
+ export declare const discountTierValues: number[];
13
+ export type OrderStatus = (typeof orderStatusValues)[number];
10
14
  export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
11
15
  export type QuoteStatus = (typeof quoteStatusValues)[number];
12
16
  export type PaymentModeAtOrder = (typeof paymentModeAtOrderValues)[number];
@@ -16,6 +20,8 @@ export type ScriptType = (typeof scriptTypeValues)[number];
16
20
  export type ShippingType = (typeof shippingTypeValues)[number];
17
21
  export type StaffProfileRole = (typeof staffProfileRoleValues)[number];
18
22
  export type StaffProfileStatus = (typeof staffProfileStatusValues)[number];
23
+ export type AuStates = (typeof auStatesValues)[number];
24
+ export type DiscountTiers = (typeof discountTierValues)[number];
19
25
  export interface Address {
20
26
  street: string;
21
27
  suburb: string;
@@ -111,7 +117,6 @@ export interface User {
111
117
  banned?: boolean;
112
118
  banReason?: string;
113
119
  banExpires?: Date;
114
- onboarded: boolean;
115
120
  }
116
121
  export interface DirectUserProfile {
117
122
  id: number;
@@ -222,46 +227,38 @@ export interface PartnerPharmacyProfile {
222
227
  paymentMode: PaymentModeAtOrder;
223
228
  remindersEnabled?: boolean;
224
229
  priceMatches?: PriceMatch[];
225
- addresses?: Address[];
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[];
230
+ addresses: Address[];
240
231
  orders?: Order[];
241
232
  xeroContactId?: string | null;
242
233
  }
234
+ export type PartnerPharmacyProfileCreate = Omit<PartnerPharmacyProfile, 'id' | 'priceMatches' | 'orders'>;
235
+ export type PartnerPharmacyProfileUpdate = Partial<PartnerPharmacyProfile> & {
236
+ id: number;
237
+ };
243
238
  export interface PartnerPharmacyProfileReportData {
244
239
  orderCount: number;
245
240
  patientRecordCount: number;
246
241
  pendingPaperScripts: number;
247
242
  }
248
243
  export type PartnerPharmacyProfileDetailed = PartnerPharmacyProfile & {
244
+ email: string;
245
+ phoneNumber: string;
249
246
  status: boolean | null;
250
247
  patients: PatientRecord[];
251
- orders: Order[];
248
+ orders: Order & {
249
+ patientFirstName: string;
250
+ patientLastName: string;
251
+ }[];
252
252
  priceMatches: PriceMatch[];
253
253
  quotes: Quote[];
254
254
  };
255
- export type PartnerPharmacyProfileSummary = {
256
- id: number;
257
- userId: string;
258
- pharmacyName: string;
259
- discountTier: number;
260
- paymentMode: PaymentModeAtOrder;
255
+ export type PartnerPharmacyProfileSummary = Pick<PartnerPharmacyProfile, 'id' | 'userId' | 'pharmacyName' | 'discountTier' | 'paymentMode'> & {
261
256
  patientsCount: number;
262
257
  ordersCount: number;
263
258
  lastOrderDate: string | null;
264
259
  status: boolean | null;
260
+ phoneNumber: string;
261
+ email: string;
265
262
  };
266
263
  export interface PatientRecord {
267
264
  id: number;
@@ -1,4 +1,11 @@
1
1
  //#region Enum value arrays ──────────────────────────────────────────────────────────
2
+ export const orderStatusValues = [
3
+ 'received',
4
+ 'processing',
5
+ 'dispatched',
6
+ 'delivered',
7
+ 'completed',
8
+ ];
2
9
  export const paperScriptReminderStatusValues = [
3
10
  'PENDING',
4
11
  'RECEIVED',
@@ -27,6 +34,17 @@ export const staffProfileRoleValues = [
27
34
  'COMPOUNDING',
28
35
  ];
29
36
  export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
37
+ export const auStatesValues = [
38
+ 'VIC',
39
+ 'NSW',
40
+ 'QLD',
41
+ 'WA',
42
+ 'SA',
43
+ 'TAS',
44
+ 'ACT',
45
+ 'NT',
46
+ ];
47
+ export const discountTierValues = [0.9, 0.88, 0.875, 0.85, 0.8, 0.75, 0.7];
30
48
  //#endregion ──────────────────────────────────────────────────────────────────────
31
49
  //#region compound direct ────────────────────────────────────────────────────────────
32
50
  export const CompoundDirectAnimalId = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.10.9",
3
+ "version": "1.10.11",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",