@natch-the-storage/heathershaw-platform-types 1.7.2 → 1.7.4
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 +37 -42
- package/build/validators.js +2 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -43,28 +43,6 @@ export interface ScriptSelect {
|
|
|
43
43
|
token?: string | null;
|
|
44
44
|
fileKey?: string | null;
|
|
45
45
|
}
|
|
46
|
-
export interface OrderSelect {
|
|
47
|
-
id: number;
|
|
48
|
-
partnerPharmacyProfileId: number | null;
|
|
49
|
-
directUserProfileId: number | null;
|
|
50
|
-
trackingNumber: string;
|
|
51
|
-
status: boolean;
|
|
52
|
-
paymentModeAtOrder: PaymentModeAtOrder;
|
|
53
|
-
paymentStatus: PaymentStatus;
|
|
54
|
-
store: string;
|
|
55
|
-
staff: string;
|
|
56
|
-
shippingType: ShippingType;
|
|
57
|
-
shippingFee: string;
|
|
58
|
-
lineItems: LineItem[];
|
|
59
|
-
orderChangeNotes: string | null;
|
|
60
|
-
counsellingRequired: boolean;
|
|
61
|
-
counsellingPriority: string;
|
|
62
|
-
counselledBy: string;
|
|
63
|
-
consellingNotes: string;
|
|
64
|
-
counselledStatus: string;
|
|
65
|
-
confirmationSentAt: Date;
|
|
66
|
-
hubspotContactId: string;
|
|
67
|
-
}
|
|
68
46
|
export interface LineItem {
|
|
69
47
|
id: number;
|
|
70
48
|
name: string;
|
|
@@ -72,6 +50,7 @@ export interface LineItem {
|
|
|
72
50
|
price: number;
|
|
73
51
|
rrp: number;
|
|
74
52
|
flavour?: string;
|
|
53
|
+
adverseSymptomsStatus?: string;
|
|
75
54
|
adverseSymptoms?: string;
|
|
76
55
|
scriptType: string;
|
|
77
56
|
paperScriptReceived: boolean;
|
|
@@ -84,9 +63,10 @@ export interface LineItem {
|
|
|
84
63
|
for: {
|
|
85
64
|
customerId: number;
|
|
86
65
|
patientRecordId: number;
|
|
87
|
-
|
|
66
|
+
patientFirstName: string;
|
|
67
|
+
patientLastName: string;
|
|
88
68
|
};
|
|
89
|
-
quantity:
|
|
69
|
+
quantity: number;
|
|
90
70
|
expiryDate: string;
|
|
91
71
|
repeatsLeft: number;
|
|
92
72
|
supplyNumber: number;
|
|
@@ -124,16 +104,22 @@ export interface Order {
|
|
|
124
104
|
id: number;
|
|
125
105
|
partnerPharmacyProfileId?: number | null;
|
|
126
106
|
directUserProfileId?: number | null;
|
|
107
|
+
address: {
|
|
108
|
+
type: string;
|
|
109
|
+
name: string;
|
|
110
|
+
address: string;
|
|
111
|
+
};
|
|
127
112
|
trackingNumber?: string;
|
|
128
|
-
status
|
|
129
|
-
paymentModeAtOrder?: PaymentModeAtOrder;
|
|
130
|
-
paymentStatus?: PaymentStatus;
|
|
113
|
+
status: string;
|
|
131
114
|
store?: string;
|
|
132
115
|
staff?: string;
|
|
133
|
-
|
|
134
|
-
shippingFee?: string;
|
|
135
|
-
lineItems?: LineItem[];
|
|
116
|
+
lineItems: LineItem[];
|
|
136
117
|
orderChangeNotes?: string | null;
|
|
118
|
+
paymentModeAtOrder?: PaymentModeAtOrder;
|
|
119
|
+
paymentStatus?: PaymentStatus;
|
|
120
|
+
shippingType?: ShippingType;
|
|
121
|
+
shippingFee?: number;
|
|
122
|
+
total: number;
|
|
137
123
|
counsellingRequired?: boolean;
|
|
138
124
|
counsellingPriority?: string;
|
|
139
125
|
counselledBy?: string;
|
|
@@ -141,20 +127,27 @@ export interface Order {
|
|
|
141
127
|
counselledStatus?: string;
|
|
142
128
|
confirmationSentAt?: Date;
|
|
143
129
|
hubspotContactId?: string;
|
|
130
|
+
created: string;
|
|
144
131
|
}
|
|
145
132
|
export interface OrderCreate {
|
|
146
|
-
paymentModeAtOrder: PaymentModeAtOrder;
|
|
147
|
-
paymentStatus: PaymentStatus;
|
|
148
|
-
shippingType: ShippingType;
|
|
149
|
-
shippingFee: string;
|
|
150
133
|
partnerPharmacyProfileId?: number | null;
|
|
151
134
|
directUserProfileId?: number | null;
|
|
135
|
+
address: {
|
|
136
|
+
type: string;
|
|
137
|
+
name: string;
|
|
138
|
+
address: string;
|
|
139
|
+
};
|
|
152
140
|
trackingNumber?: string;
|
|
153
|
-
status?:
|
|
141
|
+
status?: string;
|
|
154
142
|
store?: string;
|
|
155
143
|
staff?: string;
|
|
156
|
-
lineItems
|
|
144
|
+
lineItems: LineItem[];
|
|
157
145
|
orderChangeNotes?: string | null;
|
|
146
|
+
paymentModeAtOrder: PaymentModeAtOrder;
|
|
147
|
+
paymentStatus: PaymentStatus;
|
|
148
|
+
shippingType: ShippingType;
|
|
149
|
+
shippingFee: number;
|
|
150
|
+
total: number;
|
|
158
151
|
counsellingRequired?: boolean;
|
|
159
152
|
counsellingPriority?: string;
|
|
160
153
|
counselledBy?: string;
|
|
@@ -219,8 +212,8 @@ export interface PatientRecord {
|
|
|
219
212
|
directUserProfileId?: number | null;
|
|
220
213
|
compoundDirectId?: number | null;
|
|
221
214
|
userId?: string | null;
|
|
222
|
-
firstName
|
|
223
|
-
lastName
|
|
215
|
+
firstName: string;
|
|
216
|
+
lastName: string;
|
|
224
217
|
dateOfBirth?: string;
|
|
225
218
|
medicareNumber?: string | null;
|
|
226
219
|
phone?: string;
|
|
@@ -228,7 +221,7 @@ export interface PatientRecord {
|
|
|
228
221
|
healthInfo?: HealthInfo;
|
|
229
222
|
reminderEnabled?: boolean;
|
|
230
223
|
scripts?: ScriptSelect[];
|
|
231
|
-
orderHistory?:
|
|
224
|
+
orderHistory?: Order[];
|
|
232
225
|
animalSpecies?: string;
|
|
233
226
|
relationship?: string | null;
|
|
234
227
|
}
|
|
@@ -246,7 +239,7 @@ export interface PatientRecordCreate {
|
|
|
246
239
|
healthInfo?: HealthInfo;
|
|
247
240
|
reminderEnabled?: boolean;
|
|
248
241
|
scripts?: ScriptSelect[];
|
|
249
|
-
orderHistory?:
|
|
242
|
+
orderHistory?: Order[];
|
|
250
243
|
animalSpecies?: string;
|
|
251
244
|
relationship?: string | null;
|
|
252
245
|
}
|
|
@@ -510,8 +503,8 @@ export interface CDScript {
|
|
|
510
503
|
};
|
|
511
504
|
};
|
|
512
505
|
formulation: {
|
|
513
|
-
properties
|
|
514
|
-
ingredients
|
|
506
|
+
properties: CDScriptProperties[];
|
|
507
|
+
ingredients: CDScriptIngredients[];
|
|
515
508
|
};
|
|
516
509
|
itemCount: number;
|
|
517
510
|
}
|
|
@@ -598,6 +591,7 @@ export declare const ApiRoutes: {
|
|
|
598
591
|
list: string;
|
|
599
592
|
get: (id: number) => string;
|
|
600
593
|
getByUser: (userId: string) => string;
|
|
594
|
+
getOrders: (userId: number) => string;
|
|
601
595
|
create: string;
|
|
602
596
|
onboard: (userId: string) => string;
|
|
603
597
|
update: string;
|
|
@@ -626,6 +620,7 @@ export declare const ApiRoutes: {
|
|
|
626
620
|
cart: {
|
|
627
621
|
get: (id: number) => string;
|
|
628
622
|
put: string;
|
|
623
|
+
delete: (id: number) => string;
|
|
629
624
|
};
|
|
630
625
|
compoundDirect: {
|
|
631
626
|
searchCustomers: ({ name, dateOfBirth, email, phone }: CDCustomerSearch) => string;
|
package/build/validators.js
CHANGED
|
@@ -116,6 +116,7 @@ export const ApiRoutes = {
|
|
|
116
116
|
list: '/api/profiles/direct-users',
|
|
117
117
|
get: (id) => `/api/profiles/direct-users/${id}`,
|
|
118
118
|
getByUser: (userId) => `/api/profiles/direct-users/user/${userId}`,
|
|
119
|
+
getOrders: (userId) => `/api/profiles/direct-users/user/${userId}/orders`,
|
|
119
120
|
create: '/api/profiles/direct-users',
|
|
120
121
|
onboard: (userId) => `/api/profiles/direct-users/${userId}`,
|
|
121
122
|
update: '/api/profiles/direct-users',
|
|
@@ -144,6 +145,7 @@ export const ApiRoutes = {
|
|
|
144
145
|
cart: {
|
|
145
146
|
get: (id) => `/api/carts/${id}`,
|
|
146
147
|
put: '/api/carts',
|
|
148
|
+
delete: (id) => `/api/carts/${id}`,
|
|
147
149
|
},
|
|
148
150
|
compoundDirect: {
|
|
149
151
|
searchCustomers: ({ name, dateOfBirth, email, phone }) => `/api/compound-direct/customers?name=${name}&dateOfBirth=${dateOfBirth}&email=${email}&phone=${phone}`,
|