@natch-the-storage/heathershaw-platform-types 1.1.0 → 1.2.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/README.md +14 -0
- package/build/validators.d.ts +31 -135
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,3 +35,17 @@ import type { ShippingType } from "@natch-the-storage/heathershaw-platform-types
|
|
|
35
35
|
## Notes
|
|
36
36
|
|
|
37
37
|
- ESM only — requires a bundler (Vite, Next.js, webpack 5, etc.)
|
|
38
|
+
|
|
39
|
+
## Publishing to npm
|
|
40
|
+
|
|
41
|
+
1. Bump the version in `package.json`
|
|
42
|
+
2. Build the output:
|
|
43
|
+
```bash
|
|
44
|
+
npm run build
|
|
45
|
+
```
|
|
46
|
+
3. Publish:
|
|
47
|
+
```bash
|
|
48
|
+
npm publish --access public
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> You must be logged in (`npm login`) and have publish access to the `@natch-the-storage` scope.
|
package/build/validators.d.ts
CHANGED
|
@@ -84,39 +84,15 @@ export interface Sms {
|
|
|
84
84
|
to: string;
|
|
85
85
|
from: string;
|
|
86
86
|
}
|
|
87
|
-
export interface
|
|
88
|
-
userId: string;
|
|
89
|
-
patientRecordId?: number | null;
|
|
90
|
-
compoundDirectId?: string | null;
|
|
91
|
-
remindersEnabled?: boolean;
|
|
92
|
-
scriptSubmissions: ScriptSelect[] | null;
|
|
93
|
-
}
|
|
94
|
-
export interface UpdateDirectUserProfileBody {
|
|
87
|
+
export interface DirectUserProfile {
|
|
95
88
|
id: number;
|
|
96
89
|
userId?: string;
|
|
97
|
-
patientRecordId?: number | null;
|
|
98
90
|
compoundDirectId?: string | null;
|
|
99
91
|
remindersEnabled?: boolean;
|
|
100
|
-
scriptSubmissions?: ScriptSelect[]
|
|
101
|
-
}
|
|
102
|
-
export interface CreateOrderBody {
|
|
103
|
-
partnerPharmacyProfileId?: number | null;
|
|
104
|
-
patientRecordId?: number | null;
|
|
105
|
-
completed?: boolean;
|
|
106
|
-
paymentModeAtOrder: PaymentModeAtOrder;
|
|
107
|
-
paymentStatus: PaymentStatus;
|
|
108
|
-
scriptType: ScriptType;
|
|
109
|
-
paperScriptReceived?: boolean;
|
|
110
|
-
shippingType: ShippingType;
|
|
111
|
-
shippingFee: string;
|
|
112
|
-
lineItems?: unknown;
|
|
113
|
-
orderChangeNotes?: string | null;
|
|
114
|
-
counsellingRequired?: boolean;
|
|
115
|
-
confirmationSentAt?: Date | null;
|
|
116
|
-
hubspotContactId?: string | null;
|
|
117
|
-
createdByUserId?: string | null;
|
|
92
|
+
scriptSubmissions?: ScriptSelect[];
|
|
118
93
|
}
|
|
119
|
-
export
|
|
94
|
+
export type DirectUserProfileCreate = Omit<DirectUserProfile, "id">;
|
|
95
|
+
export interface Order {
|
|
120
96
|
id: number;
|
|
121
97
|
partnerPharmacyProfileId?: number | null;
|
|
122
98
|
patientRecordId?: number | null;
|
|
@@ -134,16 +110,8 @@ export interface UpdateOrderBody {
|
|
|
134
110
|
hubspotContactId?: string | null;
|
|
135
111
|
createdByUserId?: string | null;
|
|
136
112
|
}
|
|
137
|
-
export
|
|
138
|
-
|
|
139
|
-
partnerPharmacyProfileId: number;
|
|
140
|
-
status: PaperScriptReminderStatus;
|
|
141
|
-
remindersSent: number;
|
|
142
|
-
reminderIntervalDays?: number;
|
|
143
|
-
escalationEmail: string;
|
|
144
|
-
receivedMarked: boolean;
|
|
145
|
-
}
|
|
146
|
-
export interface UpdatePaperScriptReminderBody {
|
|
113
|
+
export type OrderCreate = Omit<Order, "id">;
|
|
114
|
+
export interface PaperScriptReminder {
|
|
147
115
|
id: number;
|
|
148
116
|
orderId?: number;
|
|
149
117
|
partnerPharmacyProfileId?: number;
|
|
@@ -151,104 +119,60 @@ export interface UpdatePaperScriptReminderBody {
|
|
|
151
119
|
remindersSent?: number;
|
|
152
120
|
reminderIntervalDays?: number;
|
|
153
121
|
escalationEmail?: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export interface CreatePartnerPharmacyProfileBody {
|
|
157
|
-
userId: string;
|
|
158
|
-
abn: string;
|
|
159
|
-
contactName: string;
|
|
160
|
-
invoiceEmail: string;
|
|
161
|
-
phone: string;
|
|
162
|
-
discountTier: string;
|
|
163
|
-
paymentMode: PaymentModeAtOrder;
|
|
164
|
-
remindersEnabled?: boolean;
|
|
165
|
-
priceMatches?: unknown;
|
|
166
|
-
dispatchAddress: Address | null;
|
|
167
|
-
orders?: unknown;
|
|
168
|
-
xeroContactId?: string | null;
|
|
122
|
+
received?: boolean;
|
|
123
|
+
lastSentAt?: string | null;
|
|
169
124
|
}
|
|
170
|
-
export
|
|
125
|
+
export type PaperScriptReminderCreate = Omit<PaperScriptReminder, "id">;
|
|
126
|
+
export interface PartnerPharmacyProfile {
|
|
171
127
|
id: number;
|
|
172
128
|
userId?: string;
|
|
173
129
|
abn?: string;
|
|
174
130
|
contactName?: string;
|
|
175
131
|
invoiceEmail?: string;
|
|
176
|
-
phone?: string;
|
|
177
132
|
discountTier?: string;
|
|
178
133
|
paymentMode?: PaymentModeAtOrder;
|
|
179
134
|
remindersEnabled?: boolean;
|
|
180
135
|
priceMatches?: unknown;
|
|
181
|
-
dispatchAddress?: Address
|
|
136
|
+
dispatchAddress?: Address;
|
|
182
137
|
orders?: unknown;
|
|
183
138
|
xeroContactId?: string | null;
|
|
184
139
|
}
|
|
140
|
+
export type PartnerPharmacyProfileCreate = Omit<PartnerPharmacyProfile, "id">;
|
|
185
141
|
export interface GetPatientRecordsQuery extends GetAll {
|
|
186
142
|
partner_pharmacy_profile_id?: number;
|
|
187
143
|
}
|
|
188
|
-
export interface
|
|
189
|
-
partnerPharmacyProfileId?: number | null;
|
|
190
|
-
userId?: string | null;
|
|
191
|
-
firstName: string;
|
|
192
|
-
lastName: string;
|
|
193
|
-
dateOfBirth: string;
|
|
194
|
-
medicareNumber?: string | null;
|
|
195
|
-
phone: string;
|
|
196
|
-
address: Address | null;
|
|
197
|
-
healthInfo: HealthInfo | null;
|
|
198
|
-
reminderEnabled?: boolean;
|
|
199
|
-
scripts: ScriptSelect[] | null;
|
|
200
|
-
orderHistory: OrderSelect[] | null;
|
|
201
|
-
}
|
|
202
|
-
export interface UpdatePatientRecordBody {
|
|
144
|
+
export interface PatientRecord {
|
|
203
145
|
id: number;
|
|
204
146
|
partnerPharmacyProfileId?: number | null;
|
|
147
|
+
directUserProfileId?: number | null;
|
|
205
148
|
userId?: string | null;
|
|
206
149
|
firstName?: string;
|
|
207
150
|
lastName?: string;
|
|
208
151
|
dateOfBirth?: string;
|
|
209
152
|
medicareNumber?: string | null;
|
|
210
153
|
phone?: string;
|
|
211
|
-
address?: Address
|
|
212
|
-
healthInfo?: HealthInfo
|
|
154
|
+
address?: Address;
|
|
155
|
+
healthInfo?: HealthInfo;
|
|
213
156
|
reminderEnabled?: boolean;
|
|
214
|
-
scripts?: ScriptSelect[]
|
|
215
|
-
orderHistory?: OrderSelect[]
|
|
157
|
+
scripts?: ScriptSelect[];
|
|
158
|
+
orderHistory?: OrderSelect[];
|
|
216
159
|
}
|
|
217
|
-
export
|
|
218
|
-
|
|
219
|
-
email: string;
|
|
220
|
-
phone: string;
|
|
221
|
-
}
|
|
222
|
-
export interface UpdatePrescriberBody {
|
|
160
|
+
export type PatientRecordCreate = Omit<PatientRecord, "id">;
|
|
161
|
+
export interface Prescriber {
|
|
223
162
|
id: number;
|
|
224
163
|
name?: string;
|
|
225
164
|
email?: string;
|
|
226
165
|
phone?: string;
|
|
227
166
|
}
|
|
228
|
-
export
|
|
229
|
-
|
|
230
|
-
productId: number;
|
|
231
|
-
overridePrice: string;
|
|
232
|
-
}
|
|
233
|
-
export interface UpdatePriceMatchBody {
|
|
167
|
+
export type PrescriberCreate = Omit<Prescriber, "id">;
|
|
168
|
+
export interface PriceMatch {
|
|
234
169
|
id: number;
|
|
235
170
|
partnerPharmacyProfileId?: number;
|
|
236
171
|
productId?: number;
|
|
237
172
|
overridePrice?: string;
|
|
238
173
|
}
|
|
239
|
-
export
|
|
240
|
-
|
|
241
|
-
imageKey?: string | null;
|
|
242
|
-
abbreviations?: string[] | null;
|
|
243
|
-
category: ProductCategory;
|
|
244
|
-
rrp: string;
|
|
245
|
-
hazardTags?: HazardTag[] | null;
|
|
246
|
-
compoundDirectId?: string | null;
|
|
247
|
-
requiresFridge?: boolean;
|
|
248
|
-
flavours?: string[] | null;
|
|
249
|
-
requiresS8Medicare?: boolean;
|
|
250
|
-
}
|
|
251
|
-
export interface UpdateProductBody {
|
|
174
|
+
export type PriceMatchCreate = Omit<PriceMatch, "id">;
|
|
175
|
+
export interface Product {
|
|
252
176
|
id: number;
|
|
253
177
|
name?: string;
|
|
254
178
|
imageKey?: string | null;
|
|
@@ -261,16 +185,8 @@ export interface UpdateProductBody {
|
|
|
261
185
|
flavours?: string[] | null;
|
|
262
186
|
requiresS8Medicare?: boolean;
|
|
263
187
|
}
|
|
264
|
-
export
|
|
265
|
-
|
|
266
|
-
partnerPharmacyProfileId: number;
|
|
267
|
-
name: string;
|
|
268
|
-
strength: string;
|
|
269
|
-
form: string;
|
|
270
|
-
quantity: number;
|
|
271
|
-
patientContext: string;
|
|
272
|
-
}
|
|
273
|
-
export interface UpdateQuoteBody {
|
|
188
|
+
export type ProductCreate = Omit<Product, "id">;
|
|
189
|
+
export interface Quote {
|
|
274
190
|
id: number;
|
|
275
191
|
status?: QuoteStatus;
|
|
276
192
|
partnerPharmacyProfileId?: number;
|
|
@@ -280,18 +196,8 @@ export interface UpdateQuoteBody {
|
|
|
280
196
|
quantity?: number;
|
|
281
197
|
patientContext?: string;
|
|
282
198
|
}
|
|
283
|
-
export
|
|
284
|
-
|
|
285
|
-
patientRecordId: number;
|
|
286
|
-
daysSupply: number;
|
|
287
|
-
dispatchedAt: Date;
|
|
288
|
-
reminderDueAt: Date;
|
|
289
|
-
reminderOffsetDays?: number;
|
|
290
|
-
pharmacyReminderSent?: boolean;
|
|
291
|
-
patientSmsSent?: boolean;
|
|
292
|
-
enabled?: boolean;
|
|
293
|
-
}
|
|
294
|
-
export interface UpdateRepeatReminderBody {
|
|
199
|
+
export type QuoteCreate = Omit<Quote, "id">;
|
|
200
|
+
export interface RepeatReminder {
|
|
295
201
|
id: number;
|
|
296
202
|
orderId?: number;
|
|
297
203
|
patientRecordId?: number;
|
|
@@ -303,19 +209,8 @@ export interface UpdateRepeatReminderBody {
|
|
|
303
209
|
patientSmsSent?: boolean;
|
|
304
210
|
enabled?: boolean;
|
|
305
211
|
}
|
|
306
|
-
export
|
|
307
|
-
|
|
308
|
-
patientRecordId: number;
|
|
309
|
-
productId: number;
|
|
310
|
-
dateIssued: string;
|
|
311
|
-
processed?: boolean;
|
|
312
|
-
repeatsRemaining?: number;
|
|
313
|
-
daysSupply: number;
|
|
314
|
-
repeatStorage: RepeatStorage;
|
|
315
|
-
compoundDirectId?: string | null;
|
|
316
|
-
imageKey?: string | null;
|
|
317
|
-
}
|
|
318
|
-
export interface UpdateScriptBody {
|
|
212
|
+
export type RepeatReminderCreate = Omit<RepeatReminder, "id">;
|
|
213
|
+
export interface Script {
|
|
319
214
|
id: number;
|
|
320
215
|
prescriberId?: number;
|
|
321
216
|
patientRecordId?: number;
|
|
@@ -328,3 +223,4 @@ export interface UpdateScriptBody {
|
|
|
328
223
|
compoundDirectId?: string | null;
|
|
329
224
|
imageKey?: string | null;
|
|
330
225
|
}
|
|
226
|
+
export type ScriptCreate = Omit<Script, "id">;
|