@natch-the-storage/heathershaw-platform-types 1.8.5 → 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.
- package/build/validators.d.ts +30 -51
- package/build/validators.js +13 -16
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -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
|
|
203
|
-
contactName
|
|
204
|
-
invoiceEmail
|
|
205
|
-
discountTier
|
|
206
|
-
paymentMode
|
|
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?:
|
|
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:
|
|
220
|
+
discountTier: number;
|
|
220
221
|
paymentMode: PaymentModeAtOrder;
|
|
221
222
|
remindersEnabled?: boolean;
|
|
222
223
|
priceMatches?: unknown;
|
|
223
224
|
addresses?: Address[];
|
|
224
|
-
orders?:
|
|
225
|
+
orders?: Order[];
|
|
225
226
|
xeroContactId?: string | null;
|
|
226
227
|
}
|
|
227
228
|
export interface PartnerPharmacyProfileReportData {
|
|
@@ -237,9 +238,9 @@ export interface PatientRecord {
|
|
|
237
238
|
userId?: string | null;
|
|
238
239
|
firstName: string;
|
|
239
240
|
lastName: string;
|
|
240
|
-
dateOfBirth
|
|
241
|
+
dateOfBirth: string;
|
|
241
242
|
medicareNumber?: string | null;
|
|
242
|
-
phone
|
|
243
|
+
phone: string;
|
|
243
244
|
addresses?: Address[];
|
|
244
245
|
healthInfo?: HealthInfo;
|
|
245
246
|
reminderEnabled?: boolean;
|
|
@@ -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,21 +335,25 @@ export interface Script {
|
|
|
358
335
|
}
|
|
359
336
|
export interface EScriptCreate {
|
|
360
337
|
patientRecordId: number;
|
|
361
|
-
|
|
338
|
+
partnerPharmacyProfileId?: number;
|
|
362
339
|
token: string;
|
|
363
340
|
}
|
|
364
341
|
export interface PaperScriptCreate {
|
|
365
342
|
patientRecordId: number;
|
|
366
|
-
|
|
343
|
+
partnerPharmacyProfileId?: number;
|
|
367
344
|
fileKey: string;
|
|
368
345
|
}
|
|
369
346
|
export interface Cart {
|
|
370
347
|
id: number;
|
|
348
|
+
directUserProfileId?: number;
|
|
349
|
+
partnerPharmacyProfileId?: number;
|
|
371
350
|
items: LineItem[];
|
|
372
351
|
updatedAt: Date;
|
|
373
352
|
}
|
|
374
353
|
export interface CartUpdate {
|
|
375
354
|
id: number;
|
|
355
|
+
directUserProfileId?: number;
|
|
356
|
+
partnerPharmacyProfileId?: number;
|
|
376
357
|
items: LineItem[];
|
|
377
358
|
}
|
|
378
359
|
export declare const CompoundDirectAnimalId: {
|
|
@@ -641,19 +622,15 @@ export declare const ApiRoutes: {
|
|
|
641
622
|
};
|
|
642
623
|
scripts: {
|
|
643
624
|
list: string;
|
|
644
|
-
get: (id: number
|
|
625
|
+
get: (id: number, filters?: {
|
|
626
|
+
partnerPharmacyProfileId?: number;
|
|
627
|
+
patientRecordId?: number;
|
|
628
|
+
}) => string;
|
|
645
629
|
createEscript: string;
|
|
646
630
|
createPaperScript: string;
|
|
647
631
|
update: string;
|
|
648
632
|
delete: (id: number) => string;
|
|
649
633
|
};
|
|
650
|
-
products: {
|
|
651
|
-
list: string;
|
|
652
|
-
get: (id: number) => string;
|
|
653
|
-
create: string;
|
|
654
|
-
update: string;
|
|
655
|
-
delete: (id: number) => string;
|
|
656
|
-
};
|
|
657
634
|
quotes: {
|
|
658
635
|
list: string;
|
|
659
636
|
get: (id: number) => string;
|
|
@@ -717,9 +694,11 @@ export declare const ApiRoutes: {
|
|
|
717
694
|
contactFormInternal: string;
|
|
718
695
|
};
|
|
719
696
|
cart: {
|
|
720
|
-
|
|
697
|
+
getByDirectUser: (id: number) => string;
|
|
698
|
+
getByPartnerPharmacy: (id: number) => string;
|
|
721
699
|
put: string;
|
|
722
|
-
|
|
700
|
+
deleteByDirectUser: (id: number) => string;
|
|
701
|
+
deleteByPartnerPharmacy: (id: number) => string;
|
|
723
702
|
};
|
|
724
703
|
compoundDirect: {
|
|
725
704
|
searchCustomers: ({ name, dateOfBirth, email, phone }: CDCustomerSearch) => string;
|
package/build/validators.js
CHANGED
|
@@ -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) =>
|
|
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}`,
|
|
@@ -184,9 +179,11 @@ export const ApiRoutes = {
|
|
|
184
179
|
contactFormInternal: '/api/emails/contact-requests',
|
|
185
180
|
},
|
|
186
181
|
cart: {
|
|
187
|
-
|
|
182
|
+
getByDirectUser: (id) => `/api/carts/direct-users/${id}`,
|
|
183
|
+
getByPartnerPharmacy: (id) => `/api/carts/partner-pharmacies/${id}`,
|
|
188
184
|
put: '/api/carts',
|
|
189
|
-
|
|
185
|
+
deleteByDirectUser: (id) => `/api/carts/direct-users/${id}`,
|
|
186
|
+
deleteByPartnerPharmacy: (id) => `/api/carts/partner-pharmacies/${id}`,
|
|
190
187
|
},
|
|
191
188
|
compoundDirect: {
|
|
192
189
|
searchCustomers: ({ name, dateOfBirth, email, phone }) => `/api/compound-direct/customers?name=${name}&dateOfBirth=${dateOfBirth}&email=${email}&phone=${phone}`,
|