@natch-the-storage/heathershaw-platform-types 1.9.0 → 1.9.1

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.
@@ -2,20 +2,16 @@ export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECE
2
2
  export declare const quoteStatusValues: readonly ["PENDING", "PROCESSING", "RESOLVED"];
3
3
  export declare const paymentModeAtOrderValues: readonly ["INVOICE", "POS"];
4
4
  export declare const paymentStatusValues: readonly ["AWAITING_PAYMENT", "PAID", "PENDING_INVOICE"];
5
- export declare const productCategoryValues: readonly ["TODO1", "TODO2", "TODO3"];
6
5
  export declare const repeatStorageValues: readonly ["HEATHERSHAWS", "PHARMACY", "PATIENT"];
7
6
  export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
8
7
  export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
9
- export declare const hazardTagsValues: readonly ["Hazardous", "Cytotoxic", "High-Risk"];
10
8
  export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
11
9
  export type QuoteStatus = (typeof quoteStatusValues)[number];
12
10
  export type PaymentModeAtOrder = (typeof paymentModeAtOrderValues)[number];
13
11
  export type PaymentStatus = (typeof paymentStatusValues)[number];
14
- export type ProductCategory = (typeof productCategoryValues)[number];
15
12
  export type RepeatStorage = (typeof repeatStorageValues)[number];
16
13
  export type ScriptType = (typeof scriptTypeValues)[number];
17
14
  export type ShippingType = (typeof shippingTypeValues)[number];
18
- export type HazardTag = (typeof hazardTagsValues)[number];
19
15
  export interface Address {
20
16
  street: string;
21
17
  suburb: string;
@@ -38,6 +34,7 @@ export interface HealthInfo {
38
34
  export interface ScriptSelect {
39
35
  id: number;
40
36
  patientRecordId: number;
37
+ partnerPharmacyProfileId?: number;
41
38
  uploaded: string;
42
39
  processed: boolean;
43
40
  token?: string | null;
@@ -53,6 +50,10 @@ export interface LineItem {
53
50
  adverseSymptomsStatus?: string;
54
51
  adverseSymptoms?: string;
55
52
  scriptType: string;
53
+ scriptDetails?: {
54
+ token?: string;
55
+ fileKey?: string;
56
+ };
56
57
  paperScriptReceived: boolean;
57
58
  patientCharged?: string;
58
59
  overage?: string;
@@ -199,15 +200,15 @@ export interface PartnerPharmacyProfile {
199
200
  id: number;
200
201
  userId?: string;
201
202
  abn?: string;
202
- pharmacyName?: string;
203
- contactName?: string;
204
- invoiceEmail?: string;
205
- discountTier?: string;
206
- paymentMode?: PaymentModeAtOrder;
203
+ pharmacyName: string;
204
+ contactName: string;
205
+ invoiceEmail: string;
206
+ discountTier: number;
207
+ paymentMode: PaymentModeAtOrder;
207
208
  remindersEnabled?: boolean;
208
209
  priceMatches?: unknown;
209
210
  addresses?: Address[];
210
- orders?: unknown;
211
+ orders?: Order[];
211
212
  xeroContactId?: string | null;
212
213
  }
213
214
  export interface PartnerPharmacyProfileCreate {
@@ -216,12 +217,12 @@ export interface PartnerPharmacyProfileCreate {
216
217
  pharmacyName: string;
217
218
  contactName: string;
218
219
  invoiceEmail: string;
219
- discountTier: string;
220
+ discountTier: number;
220
221
  paymentMode: PaymentModeAtOrder;
221
222
  remindersEnabled?: boolean;
222
223
  priceMatches?: unknown;
223
224
  addresses?: Address[];
224
- orders?: unknown;
225
+ orders?: Order[];
225
226
  xeroContactId?: string | null;
226
227
  }
227
228
  export interface PartnerPharmacyProfileReportData {
@@ -277,31 +278,6 @@ export interface PriceMatchCreate {
277
278
  productId: number;
278
279
  overridePrice: string;
279
280
  }
280
- export interface Product {
281
- id: number;
282
- name?: string;
283
- imageKey?: string | null;
284
- abbreviations?: string[] | null;
285
- category?: ProductCategory;
286
- rrp?: string;
287
- hazardTags?: HazardTag[] | null;
288
- compoundDirectId?: string | null;
289
- requiresFridge?: boolean;
290
- flavours?: string[] | null;
291
- requiresS8Medicare?: boolean;
292
- }
293
- export interface ProductCreate {
294
- name: string;
295
- category: ProductCategory;
296
- rrp: string;
297
- imageKey?: string | null;
298
- abbreviations?: string[] | null;
299
- hazardTags?: HazardTag[] | null;
300
- compoundDirectId?: string | null;
301
- requiresFridge?: boolean;
302
- flavours?: string[] | null;
303
- requiresS8Medicare?: boolean;
304
- }
305
281
  export interface Quote {
306
282
  id: number;
307
283
  status: QuoteStatus;
@@ -351,6 +327,7 @@ export interface RepeatReminderCreate {
351
327
  export interface Script {
352
328
  id: number;
353
329
  patientRecordId: number;
330
+ partnerPharmacyProfileId?: number;
354
331
  uploaded: string;
355
332
  processed: boolean;
356
333
  token?: string | null;
@@ -358,12 +335,12 @@ export interface Script {
358
335
  }
359
336
  export interface EScriptCreate {
360
337
  patientRecordId: number;
361
- uploaded: string;
338
+ partnerPharmacyProfileId?: number;
362
339
  token: string;
363
340
  }
364
341
  export interface PaperScriptCreate {
365
342
  patientRecordId: number;
366
- uploaded: string;
343
+ partnerPharmacyProfileId?: number;
367
344
  fileKey: string;
368
345
  }
369
346
  export interface Cart {
@@ -645,19 +622,15 @@ export declare const ApiRoutes: {
645
622
  };
646
623
  scripts: {
647
624
  list: string;
648
- get: (id: number) => string;
625
+ get: (id: number, filters?: {
626
+ partnerPharmacyProfileId?: number;
627
+ patientRecordId?: number;
628
+ }) => string;
649
629
  createEscript: string;
650
630
  createPaperScript: string;
651
631
  update: string;
652
632
  delete: (id: number) => string;
653
633
  };
654
- products: {
655
- list: string;
656
- get: (id: number) => string;
657
- create: string;
658
- update: string;
659
- delete: (id: number) => string;
660
- };
661
634
  quotes: {
662
635
  list: string;
663
636
  get: (id: number) => string;
@@ -11,7 +11,6 @@ export const paymentStatusValues = [
11
11
  'PAID',
12
12
  'PENDING_INVOICE',
13
13
  ];
14
- export const productCategoryValues = ['TODO1', 'TODO2', 'TODO3'];
15
14
  export const repeatStorageValues = [
16
15
  'HEATHERSHAWS',
17
16
  'PHARMACY',
@@ -19,11 +18,6 @@ export const repeatStorageValues = [
19
18
  ];
20
19
  export const scriptTypeValues = ['eRx', 'PAPER'];
21
20
  export const shippingTypeValues = ['STANDARD', 'COLD_CHAIN'];
22
- export const hazardTagsValues = [
23
- 'Hazardous',
24
- 'Cytotoxic',
25
- 'High-Risk',
26
- ];
27
21
  // ─── Compound Direct ────────────────────────────────────────────────────────────
28
22
  export const CompoundDirectAnimalId = {
29
23
  dog: { id: 1, name: 'Dog' },
@@ -108,19 +102,20 @@ export const ApiRoutes = {
108
102
  },
109
103
  scripts: {
110
104
  list: '/api/scripts',
111
- get: (id) => `/api/scripts/${id}`,
105
+ get: (id, filters) => {
106
+ const params = new URLSearchParams();
107
+ if (filters?.partnerPharmacyProfileId)
108
+ params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
109
+ if (filters?.patientRecordId)
110
+ params.set('patientRecordId', String(filters.patientRecordId));
111
+ const query = params.toString();
112
+ return `/api/scripts/${id}${query ? `?${query}` : ''}`;
113
+ },
112
114
  createEscript: '/api/scripts/escripts',
113
115
  createPaperScript: '/api/scripts/paper-scripts',
114
116
  update: '/api/scripts',
115
117
  delete: (id) => `/api/scripts/${id}`,
116
118
  },
117
- products: {
118
- list: '/api/products',
119
- get: (id) => `/api/products/${id}`,
120
- create: '/api/products',
121
- update: '/api/products',
122
- delete: (id) => `/api/products/${id}`,
123
- },
124
119
  quotes: {
125
120
  list: '/api/quotes',
126
121
  get: (id) => `/api/quotes/${id}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",