@natch-the-storage/heathershaw-platform-types 1.0.2 → 1.2.0
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 +16 -15
- package/build/validators.d.ts +208 -611
- package/build/validators.js +22 -311
- package/package.json +3 -8
package/README.md
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
# @natch-the-storage/heathershaw-platform-types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript interfaces, enum value arrays, and union types for frontend use.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
Install the package and peer dependency:
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
|
-
npm install @natch-the-storage/heathershaw-platform-types
|
|
8
|
+
npm install @natch-the-storage/heathershaw-platform-types
|
|
11
9
|
```
|
|
12
10
|
|
|
13
11
|
## Usage
|
|
14
12
|
|
|
15
|
-
### Schemas
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { createOrderBodySchema } from "@natch-the-storage/heathershaw-platform-types";
|
|
19
|
-
|
|
20
|
-
const result = createOrderBodySchema.parse(data);
|
|
21
|
-
```
|
|
22
|
-
|
|
23
13
|
### TypeScript types
|
|
24
14
|
|
|
25
|
-
Every schema has a matching inferred type exported alongside it:
|
|
26
|
-
|
|
27
15
|
```ts
|
|
28
16
|
import type { CreateOrderBody, Address, ScriptSelect } from "@natch-the-storage/heathershaw-platform-types";
|
|
29
17
|
```
|
|
@@ -47,4 +35,17 @@ import type { ShippingType } from "@natch-the-storage/heathershaw-platform-types
|
|
|
47
35
|
## Notes
|
|
48
36
|
|
|
49
37
|
- ESM only — requires a bundler (Vite, Next.js, webpack 5, etc.)
|
|
50
|
-
|
|
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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
|
|
3
2
|
export declare const quoteStatusValues: readonly ["PENDING", "PROCESSING", "RESOLVED"];
|
|
4
3
|
export declare const paymentModeAtOrderValues: readonly ["INVOICE", "POS"];
|
|
@@ -17,613 +16,211 @@ export type RepeatStorage = (typeof repeatStorageValues)[number];
|
|
|
17
16
|
export type ScriptType = (typeof scriptTypeValues)[number];
|
|
18
17
|
export type ShippingType = (typeof shippingTypeValues)[number];
|
|
19
18
|
export type HazardTag = (typeof hazardTagsValues)[number];
|
|
20
|
-
export
|
|
21
|
-
street:
|
|
22
|
-
suburb:
|
|
23
|
-
state:
|
|
24
|
-
postcode:
|
|
25
|
-
deliveryInstructions
|
|
26
|
-
}
|
|
27
|
-
export
|
|
28
|
-
id:
|
|
29
|
-
name:
|
|
30
|
-
email:
|
|
31
|
-
phone:
|
|
32
|
-
}
|
|
33
|
-
export
|
|
34
|
-
allergies:
|
|
35
|
-
conditions:
|
|
36
|
-
relevantHistory:
|
|
37
|
-
currentMedications:
|
|
38
|
-
prescriber:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
export type
|
|
96
|
-
export
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
export
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
export
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}, z.core.$strip>;
|
|
229
|
-
export type CreateOrderBody = z.infer<typeof createOrderBodySchema>;
|
|
230
|
-
export type UpdateOrderBody = z.infer<typeof updateOrderBodySchema>;
|
|
231
|
-
export declare const createPaperScriptReminderBodySchema: z.ZodObject<{
|
|
232
|
-
orderId: z.ZodNumber;
|
|
233
|
-
partnerPharmacyProfileId: z.ZodNumber;
|
|
234
|
-
status: z.ZodEnum<{
|
|
235
|
-
PENDING: "PENDING";
|
|
236
|
-
RECEIVED: "RECEIVED";
|
|
237
|
-
ESCALATED: "ESCALATED";
|
|
238
|
-
}>;
|
|
239
|
-
remindersSent: z.ZodNumber;
|
|
240
|
-
reminderIntervalDays: z.ZodOptional<z.ZodNumber>;
|
|
241
|
-
escalationEmail: z.ZodString;
|
|
242
|
-
receivedMarked: z.ZodBoolean;
|
|
243
|
-
}, z.core.$strip>;
|
|
244
|
-
export declare const updatePaperScriptReminderBodySchema: z.ZodObject<{
|
|
245
|
-
id: z.ZodNumber;
|
|
246
|
-
orderId: z.ZodOptional<z.ZodNumber>;
|
|
247
|
-
partnerPharmacyProfileId: z.ZodOptional<z.ZodNumber>;
|
|
248
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
249
|
-
PENDING: "PENDING";
|
|
250
|
-
RECEIVED: "RECEIVED";
|
|
251
|
-
ESCALATED: "ESCALATED";
|
|
252
|
-
}>>;
|
|
253
|
-
remindersSent: z.ZodOptional<z.ZodNumber>;
|
|
254
|
-
reminderIntervalDays: z.ZodOptional<z.ZodNumber>;
|
|
255
|
-
escalationEmail: z.ZodOptional<z.ZodString>;
|
|
256
|
-
receivedMarked: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
-
}, z.core.$strip>;
|
|
258
|
-
export type CreatePaperScriptReminderBody = z.infer<typeof createPaperScriptReminderBodySchema>;
|
|
259
|
-
export type UpdatePaperScriptReminderBody = z.infer<typeof updatePaperScriptReminderBodySchema>;
|
|
260
|
-
export declare const createPartnerPharmacyProfileBodySchema: z.ZodObject<{
|
|
261
|
-
userId: z.ZodString;
|
|
262
|
-
abn: z.ZodString;
|
|
263
|
-
contactName: z.ZodString;
|
|
264
|
-
invoiceEmail: z.ZodString;
|
|
265
|
-
phone: z.ZodString;
|
|
266
|
-
discountTier: z.ZodString;
|
|
267
|
-
paymentMode: z.ZodEnum<{
|
|
268
|
-
INVOICE: "INVOICE";
|
|
269
|
-
POS: "POS";
|
|
270
|
-
}>;
|
|
271
|
-
remindersEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
-
priceMatches: z.ZodOptional<z.ZodUnknown>;
|
|
273
|
-
dispatchAddress: z.ZodNullable<z.ZodObject<{
|
|
274
|
-
street: z.ZodString;
|
|
275
|
-
suburb: z.ZodString;
|
|
276
|
-
state: z.ZodString;
|
|
277
|
-
postcode: z.ZodString;
|
|
278
|
-
deliveryInstructions: z.ZodOptional<z.ZodString>;
|
|
279
|
-
}, z.core.$strip>>;
|
|
280
|
-
orders: z.ZodOptional<z.ZodUnknown>;
|
|
281
|
-
xeroContactId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
282
|
-
}, z.core.$strip>;
|
|
283
|
-
export declare const updatePartnerPharmacyProfileBodySchema: z.ZodObject<{
|
|
284
|
-
id: z.ZodNumber;
|
|
285
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
286
|
-
abn: z.ZodOptional<z.ZodString>;
|
|
287
|
-
contactName: z.ZodOptional<z.ZodString>;
|
|
288
|
-
invoiceEmail: z.ZodOptional<z.ZodString>;
|
|
289
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
290
|
-
discountTier: z.ZodOptional<z.ZodString>;
|
|
291
|
-
paymentMode: z.ZodOptional<z.ZodEnum<{
|
|
292
|
-
INVOICE: "INVOICE";
|
|
293
|
-
POS: "POS";
|
|
294
|
-
}>>;
|
|
295
|
-
remindersEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
296
|
-
priceMatches: z.ZodOptional<z.ZodUnknown>;
|
|
297
|
-
dispatchAddress: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
298
|
-
street: z.ZodString;
|
|
299
|
-
suburb: z.ZodString;
|
|
300
|
-
state: z.ZodString;
|
|
301
|
-
postcode: z.ZodString;
|
|
302
|
-
deliveryInstructions: z.ZodOptional<z.ZodString>;
|
|
303
|
-
}, z.core.$strip>>>;
|
|
304
|
-
orders: z.ZodOptional<z.ZodUnknown>;
|
|
305
|
-
xeroContactId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
|
-
}, z.core.$strip>;
|
|
307
|
-
export type CreatePartnerPharmacyProfileBody = z.infer<typeof createPartnerPharmacyProfileBodySchema>;
|
|
308
|
-
export type UpdatePartnerPharmacyProfileBody = z.infer<typeof updatePartnerPharmacyProfileBodySchema>;
|
|
309
|
-
export declare const getPatientRecordsQuerySchema: z.ZodObject<{
|
|
310
|
-
page: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
|
|
311
|
-
limit: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
|
|
312
|
-
partner_pharmacy_profile_id: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
|
|
313
|
-
}, z.core.$strip>;
|
|
314
|
-
export declare const createPatientRecordBodySchema: z.ZodObject<{
|
|
315
|
-
partnerPharmacyProfileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
316
|
-
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
-
firstName: z.ZodString;
|
|
318
|
-
lastName: z.ZodString;
|
|
319
|
-
dateOfBirth: z.ZodString;
|
|
320
|
-
medicareNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
321
|
-
phone: z.ZodString;
|
|
322
|
-
address: z.ZodNullable<z.ZodObject<{
|
|
323
|
-
street: z.ZodString;
|
|
324
|
-
suburb: z.ZodString;
|
|
325
|
-
state: z.ZodString;
|
|
326
|
-
postcode: z.ZodString;
|
|
327
|
-
deliveryInstructions: z.ZodOptional<z.ZodString>;
|
|
328
|
-
}, z.core.$strip>>;
|
|
329
|
-
healthInfo: z.ZodNullable<z.ZodObject<{
|
|
330
|
-
allergies: z.ZodNullable<z.ZodString>;
|
|
331
|
-
conditions: z.ZodNullable<z.ZodString>;
|
|
332
|
-
relevantHistory: z.ZodNullable<z.ZodString>;
|
|
333
|
-
currentMedications: z.ZodNullable<z.ZodString>;
|
|
334
|
-
prescriber: z.ZodNullable<z.ZodObject<{
|
|
335
|
-
id: z.ZodNumber;
|
|
336
|
-
name: z.ZodString;
|
|
337
|
-
email: z.ZodString;
|
|
338
|
-
phone: z.ZodString;
|
|
339
|
-
}, z.core.$strip>>;
|
|
340
|
-
}, z.core.$strip>>;
|
|
341
|
-
reminderEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
-
scripts: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
343
|
-
id: z.ZodNumber;
|
|
344
|
-
prescriberId: z.ZodNumber;
|
|
345
|
-
patientRecordId: z.ZodNumber;
|
|
346
|
-
productId: z.ZodNumber;
|
|
347
|
-
dateIssued: z.ZodString;
|
|
348
|
-
processed: z.ZodBoolean;
|
|
349
|
-
repeatsRemaining: z.ZodNumber;
|
|
350
|
-
daysSupply: z.ZodNumber;
|
|
351
|
-
repeatStorage: z.ZodEnum<{
|
|
352
|
-
HEATHERSHAWS: "HEATHERSHAWS";
|
|
353
|
-
PHARMACY: "PHARMACY";
|
|
354
|
-
PATIENT: "PATIENT";
|
|
355
|
-
}>;
|
|
356
|
-
compoundDirectId: z.ZodNullable<z.ZodString>;
|
|
357
|
-
imageKey: z.ZodNullable<z.ZodString>;
|
|
358
|
-
}, z.core.$strip>>>;
|
|
359
|
-
orderHistory: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
360
|
-
id: z.ZodNumber;
|
|
361
|
-
partnerPharmacyProfileId: z.ZodNullable<z.ZodNumber>;
|
|
362
|
-
patientRecordId: z.ZodNullable<z.ZodNumber>;
|
|
363
|
-
completed: z.ZodBoolean;
|
|
364
|
-
paymentModeAtOrder: z.ZodEnum<{
|
|
365
|
-
INVOICE: "INVOICE";
|
|
366
|
-
POS: "POS";
|
|
367
|
-
}>;
|
|
368
|
-
paymentStatus: z.ZodEnum<{
|
|
369
|
-
AWAITING_PAYMENT: "AWAITING_PAYMENT";
|
|
370
|
-
PAID: "PAID";
|
|
371
|
-
PENDING_INVOICE: "PENDING_INVOICE";
|
|
372
|
-
}>;
|
|
373
|
-
scriptType: z.ZodEnum<{
|
|
374
|
-
eRx: "eRx";
|
|
375
|
-
PAPER: "PAPER";
|
|
376
|
-
}>;
|
|
377
|
-
paperScriptReceived: z.ZodBoolean;
|
|
378
|
-
shippingType: z.ZodEnum<{
|
|
379
|
-
STANDARD: "STANDARD";
|
|
380
|
-
COLD_CHAIN: "COLD_CHAIN";
|
|
381
|
-
}>;
|
|
382
|
-
shippingFee: z.ZodString;
|
|
383
|
-
lineItems: z.ZodUnknown;
|
|
384
|
-
orderChangeNotes: z.ZodNullable<z.ZodString>;
|
|
385
|
-
counsellingRequired: z.ZodBoolean;
|
|
386
|
-
confirmationSentAt: z.ZodNullable<z.ZodDate>;
|
|
387
|
-
hubspotContactId: z.ZodNullable<z.ZodString>;
|
|
388
|
-
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
389
|
-
}, z.core.$strip>>>;
|
|
390
|
-
}, z.core.$strip>;
|
|
391
|
-
export declare const updatePatientRecordBodySchema: z.ZodObject<{
|
|
392
|
-
id: z.ZodNumber;
|
|
393
|
-
partnerPharmacyProfileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
394
|
-
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
395
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
396
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
397
|
-
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
398
|
-
medicareNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
399
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
400
|
-
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
401
|
-
street: z.ZodString;
|
|
402
|
-
suburb: z.ZodString;
|
|
403
|
-
state: z.ZodString;
|
|
404
|
-
postcode: z.ZodString;
|
|
405
|
-
deliveryInstructions: z.ZodOptional<z.ZodString>;
|
|
406
|
-
}, z.core.$strip>>>;
|
|
407
|
-
healthInfo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
408
|
-
allergies: z.ZodNullable<z.ZodString>;
|
|
409
|
-
conditions: z.ZodNullable<z.ZodString>;
|
|
410
|
-
relevantHistory: z.ZodNullable<z.ZodString>;
|
|
411
|
-
currentMedications: z.ZodNullable<z.ZodString>;
|
|
412
|
-
prescriber: z.ZodNullable<z.ZodObject<{
|
|
413
|
-
id: z.ZodNumber;
|
|
414
|
-
name: z.ZodString;
|
|
415
|
-
email: z.ZodString;
|
|
416
|
-
phone: z.ZodString;
|
|
417
|
-
}, z.core.$strip>>;
|
|
418
|
-
}, z.core.$strip>>>;
|
|
419
|
-
reminderEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
-
scripts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
421
|
-
id: z.ZodNumber;
|
|
422
|
-
prescriberId: z.ZodNumber;
|
|
423
|
-
patientRecordId: z.ZodNumber;
|
|
424
|
-
productId: z.ZodNumber;
|
|
425
|
-
dateIssued: z.ZodString;
|
|
426
|
-
processed: z.ZodBoolean;
|
|
427
|
-
repeatsRemaining: z.ZodNumber;
|
|
428
|
-
daysSupply: z.ZodNumber;
|
|
429
|
-
repeatStorage: z.ZodEnum<{
|
|
430
|
-
HEATHERSHAWS: "HEATHERSHAWS";
|
|
431
|
-
PHARMACY: "PHARMACY";
|
|
432
|
-
PATIENT: "PATIENT";
|
|
433
|
-
}>;
|
|
434
|
-
compoundDirectId: z.ZodNullable<z.ZodString>;
|
|
435
|
-
imageKey: z.ZodNullable<z.ZodString>;
|
|
436
|
-
}, z.core.$strip>>>>;
|
|
437
|
-
orderHistory: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
438
|
-
id: z.ZodNumber;
|
|
439
|
-
partnerPharmacyProfileId: z.ZodNullable<z.ZodNumber>;
|
|
440
|
-
patientRecordId: z.ZodNullable<z.ZodNumber>;
|
|
441
|
-
completed: z.ZodBoolean;
|
|
442
|
-
paymentModeAtOrder: z.ZodEnum<{
|
|
443
|
-
INVOICE: "INVOICE";
|
|
444
|
-
POS: "POS";
|
|
445
|
-
}>;
|
|
446
|
-
paymentStatus: z.ZodEnum<{
|
|
447
|
-
AWAITING_PAYMENT: "AWAITING_PAYMENT";
|
|
448
|
-
PAID: "PAID";
|
|
449
|
-
PENDING_INVOICE: "PENDING_INVOICE";
|
|
450
|
-
}>;
|
|
451
|
-
scriptType: z.ZodEnum<{
|
|
452
|
-
eRx: "eRx";
|
|
453
|
-
PAPER: "PAPER";
|
|
454
|
-
}>;
|
|
455
|
-
paperScriptReceived: z.ZodBoolean;
|
|
456
|
-
shippingType: z.ZodEnum<{
|
|
457
|
-
STANDARD: "STANDARD";
|
|
458
|
-
COLD_CHAIN: "COLD_CHAIN";
|
|
459
|
-
}>;
|
|
460
|
-
shippingFee: z.ZodString;
|
|
461
|
-
lineItems: z.ZodUnknown;
|
|
462
|
-
orderChangeNotes: z.ZodNullable<z.ZodString>;
|
|
463
|
-
counsellingRequired: z.ZodBoolean;
|
|
464
|
-
confirmationSentAt: z.ZodNullable<z.ZodDate>;
|
|
465
|
-
hubspotContactId: z.ZodNullable<z.ZodString>;
|
|
466
|
-
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
467
|
-
}, z.core.$strip>>>>;
|
|
468
|
-
}, z.core.$strip>;
|
|
469
|
-
export type GetPatientRecordsQuery = z.infer<typeof getPatientRecordsQuerySchema>;
|
|
470
|
-
export type CreatePatientRecordBody = z.infer<typeof createPatientRecordBodySchema>;
|
|
471
|
-
export type UpdatePatientRecordBody = z.infer<typeof updatePatientRecordBodySchema>;
|
|
472
|
-
export declare const createPrescriberBodySchema: z.ZodObject<{
|
|
473
|
-
name: z.ZodString;
|
|
474
|
-
email: z.ZodString;
|
|
475
|
-
phone: z.ZodString;
|
|
476
|
-
}, z.core.$strip>;
|
|
477
|
-
export declare const updatePrescriberBodySchema: z.ZodObject<{
|
|
478
|
-
id: z.ZodNumber;
|
|
479
|
-
name: z.ZodOptional<z.ZodString>;
|
|
480
|
-
email: z.ZodOptional<z.ZodString>;
|
|
481
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
482
|
-
}, z.core.$strip>;
|
|
483
|
-
export type CreatePrescriberBody = z.infer<typeof createPrescriberBodySchema>;
|
|
484
|
-
export type UpdatePrescriberBody = z.infer<typeof updatePrescriberBodySchema>;
|
|
485
|
-
export declare const createPriceMatchBodySchema: z.ZodObject<{
|
|
486
|
-
partnerPharmacyProfileId: z.ZodNumber;
|
|
487
|
-
productId: z.ZodNumber;
|
|
488
|
-
overridePrice: z.ZodString;
|
|
489
|
-
}, z.core.$strip>;
|
|
490
|
-
export declare const updatePriceMatchBodySchema: z.ZodObject<{
|
|
491
|
-
id: z.ZodNumber;
|
|
492
|
-
partnerPharmacyProfileId: z.ZodOptional<z.ZodNumber>;
|
|
493
|
-
productId: z.ZodOptional<z.ZodNumber>;
|
|
494
|
-
overridePrice: z.ZodOptional<z.ZodString>;
|
|
495
|
-
}, z.core.$strip>;
|
|
496
|
-
export type CreatePriceMatchBody = z.infer<typeof createPriceMatchBodySchema>;
|
|
497
|
-
export type UpdatePriceMatchBody = z.infer<typeof updatePriceMatchBodySchema>;
|
|
498
|
-
export declare const createProductBodySchema: z.ZodObject<{
|
|
499
|
-
name: z.ZodString;
|
|
500
|
-
imageKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
501
|
-
abbreviations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
502
|
-
category: z.ZodEnum<{
|
|
503
|
-
TODO1: "TODO1";
|
|
504
|
-
TODO2: "TODO2";
|
|
505
|
-
TODO3: "TODO3";
|
|
506
|
-
}>;
|
|
507
|
-
rrp: z.ZodString;
|
|
508
|
-
hazardTags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
509
|
-
Hazardous: "Hazardous";
|
|
510
|
-
Cytotoxic: "Cytotoxic";
|
|
511
|
-
"High-Risk": "High-Risk";
|
|
512
|
-
}>>>>;
|
|
513
|
-
compoundDirectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
514
|
-
requiresFridge: z.ZodOptional<z.ZodBoolean>;
|
|
515
|
-
flavours: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
516
|
-
requiresS8Medicare: z.ZodOptional<z.ZodBoolean>;
|
|
517
|
-
}, z.core.$strip>;
|
|
518
|
-
export declare const updateProductBodySchema: z.ZodObject<{
|
|
519
|
-
id: z.ZodNumber;
|
|
520
|
-
name: z.ZodOptional<z.ZodString>;
|
|
521
|
-
imageKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
522
|
-
abbreviations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
523
|
-
category: z.ZodOptional<z.ZodEnum<{
|
|
524
|
-
TODO1: "TODO1";
|
|
525
|
-
TODO2: "TODO2";
|
|
526
|
-
TODO3: "TODO3";
|
|
527
|
-
}>>;
|
|
528
|
-
rrp: z.ZodOptional<z.ZodString>;
|
|
529
|
-
hazardTags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
530
|
-
Hazardous: "Hazardous";
|
|
531
|
-
Cytotoxic: "Cytotoxic";
|
|
532
|
-
"High-Risk": "High-Risk";
|
|
533
|
-
}>>>>;
|
|
534
|
-
compoundDirectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
535
|
-
requiresFridge: z.ZodOptional<z.ZodBoolean>;
|
|
536
|
-
flavours: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
537
|
-
requiresS8Medicare: z.ZodOptional<z.ZodBoolean>;
|
|
538
|
-
}, z.core.$strip>;
|
|
539
|
-
export type CreateProductBody = z.infer<typeof createProductBodySchema>;
|
|
540
|
-
export type UpdateProductBody = z.infer<typeof updateProductBodySchema>;
|
|
541
|
-
export declare const createQuoteBodySchema: z.ZodObject<{
|
|
542
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
543
|
-
PENDING: "PENDING";
|
|
544
|
-
PROCESSING: "PROCESSING";
|
|
545
|
-
RESOLVED: "RESOLVED";
|
|
546
|
-
}>>;
|
|
547
|
-
partnerPharmacyProfileId: z.ZodNumber;
|
|
548
|
-
name: z.ZodString;
|
|
549
|
-
strength: z.ZodString;
|
|
550
|
-
form: z.ZodString;
|
|
551
|
-
quantity: z.ZodNumber;
|
|
552
|
-
patientContext: z.ZodString;
|
|
553
|
-
}, z.core.$strip>;
|
|
554
|
-
export declare const updateQuoteBodySchema: z.ZodObject<{
|
|
555
|
-
id: z.ZodNumber;
|
|
556
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
557
|
-
PENDING: "PENDING";
|
|
558
|
-
PROCESSING: "PROCESSING";
|
|
559
|
-
RESOLVED: "RESOLVED";
|
|
560
|
-
}>>;
|
|
561
|
-
partnerPharmacyProfileId: z.ZodOptional<z.ZodNumber>;
|
|
562
|
-
name: z.ZodOptional<z.ZodString>;
|
|
563
|
-
strength: z.ZodOptional<z.ZodString>;
|
|
564
|
-
form: z.ZodOptional<z.ZodString>;
|
|
565
|
-
quantity: z.ZodOptional<z.ZodNumber>;
|
|
566
|
-
patientContext: z.ZodOptional<z.ZodString>;
|
|
567
|
-
}, z.core.$strip>;
|
|
568
|
-
export type CreateQuoteBody = z.infer<typeof createQuoteBodySchema>;
|
|
569
|
-
export type UpdateQuoteBody = z.infer<typeof updateQuoteBodySchema>;
|
|
570
|
-
export declare const createRepeatReminderBodySchema: z.ZodObject<{
|
|
571
|
-
orderId: z.ZodNumber;
|
|
572
|
-
patientRecordId: z.ZodNumber;
|
|
573
|
-
daysSupply: z.ZodNumber;
|
|
574
|
-
dispatchedAt: z.ZodCoercedDate<unknown>;
|
|
575
|
-
reminderDueAt: z.ZodCoercedDate<unknown>;
|
|
576
|
-
reminderOffsetDays: z.ZodOptional<z.ZodNumber>;
|
|
577
|
-
pharmacyReminderSent: z.ZodOptional<z.ZodBoolean>;
|
|
578
|
-
patientSmsSent: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
580
|
-
}, z.core.$strip>;
|
|
581
|
-
export declare const updateRepeatReminderBodySchema: z.ZodObject<{
|
|
582
|
-
id: z.ZodNumber;
|
|
583
|
-
orderId: z.ZodOptional<z.ZodNumber>;
|
|
584
|
-
patientRecordId: z.ZodOptional<z.ZodNumber>;
|
|
585
|
-
daysSupply: z.ZodOptional<z.ZodNumber>;
|
|
586
|
-
dispatchedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
587
|
-
reminderDueAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
588
|
-
reminderOffsetDays: z.ZodOptional<z.ZodNumber>;
|
|
589
|
-
pharmacyReminderSent: z.ZodOptional<z.ZodBoolean>;
|
|
590
|
-
patientSmsSent: z.ZodOptional<z.ZodBoolean>;
|
|
591
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
592
|
-
}, z.core.$strip>;
|
|
593
|
-
export type CreateRepeatReminderBody = z.infer<typeof createRepeatReminderBodySchema>;
|
|
594
|
-
export type UpdateRepeatReminderBody = z.infer<typeof updateRepeatReminderBodySchema>;
|
|
595
|
-
export declare const createScriptBodySchema: z.ZodObject<{
|
|
596
|
-
prescriberId: z.ZodNumber;
|
|
597
|
-
patientRecordId: z.ZodNumber;
|
|
598
|
-
productId: z.ZodNumber;
|
|
599
|
-
dateIssued: z.ZodString;
|
|
600
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
601
|
-
repeatsRemaining: z.ZodOptional<z.ZodNumber>;
|
|
602
|
-
daysSupply: z.ZodNumber;
|
|
603
|
-
repeatStorage: z.ZodEnum<{
|
|
604
|
-
HEATHERSHAWS: "HEATHERSHAWS";
|
|
605
|
-
PHARMACY: "PHARMACY";
|
|
606
|
-
PATIENT: "PATIENT";
|
|
607
|
-
}>;
|
|
608
|
-
compoundDirectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
609
|
-
imageKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
610
|
-
}, z.core.$strip>;
|
|
611
|
-
export declare const updateScriptBodySchema: z.ZodObject<{
|
|
612
|
-
id: z.ZodNumber;
|
|
613
|
-
prescriberId: z.ZodOptional<z.ZodNumber>;
|
|
614
|
-
patientRecordId: z.ZodOptional<z.ZodNumber>;
|
|
615
|
-
productId: z.ZodOptional<z.ZodNumber>;
|
|
616
|
-
dateIssued: z.ZodOptional<z.ZodString>;
|
|
617
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
618
|
-
repeatsRemaining: z.ZodOptional<z.ZodNumber>;
|
|
619
|
-
daysSupply: z.ZodOptional<z.ZodNumber>;
|
|
620
|
-
repeatStorage: z.ZodOptional<z.ZodEnum<{
|
|
621
|
-
HEATHERSHAWS: "HEATHERSHAWS";
|
|
622
|
-
PHARMACY: "PHARMACY";
|
|
623
|
-
PATIENT: "PATIENT";
|
|
624
|
-
}>>;
|
|
625
|
-
compoundDirectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
626
|
-
imageKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
627
|
-
}, z.core.$strip>;
|
|
628
|
-
export type CreateScriptBody = z.infer<typeof createScriptBodySchema>;
|
|
629
|
-
export type UpdateScriptBody = z.infer<typeof updateScriptBodySchema>;
|
|
19
|
+
export interface Address {
|
|
20
|
+
street: string;
|
|
21
|
+
suburb: string;
|
|
22
|
+
state: string;
|
|
23
|
+
postcode: string;
|
|
24
|
+
deliveryInstructions?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PrescriberSelect {
|
|
27
|
+
id: number;
|
|
28
|
+
name: string;
|
|
29
|
+
email: string;
|
|
30
|
+
phone: string;
|
|
31
|
+
}
|
|
32
|
+
export interface HealthInfo {
|
|
33
|
+
allergies: string | null;
|
|
34
|
+
conditions: string | null;
|
|
35
|
+
relevantHistory: string | null;
|
|
36
|
+
currentMedications: string | null;
|
|
37
|
+
prescriber: PrescriberSelect | null;
|
|
38
|
+
}
|
|
39
|
+
export interface ScriptSelect {
|
|
40
|
+
id: number;
|
|
41
|
+
prescriberId: number;
|
|
42
|
+
patientRecordId: number;
|
|
43
|
+
productId: number;
|
|
44
|
+
dateIssued: string;
|
|
45
|
+
processed: boolean;
|
|
46
|
+
repeatsRemaining: number;
|
|
47
|
+
daysSupply: number;
|
|
48
|
+
repeatStorage: RepeatStorage;
|
|
49
|
+
compoundDirectId: string | null;
|
|
50
|
+
imageKey: string | null;
|
|
51
|
+
}
|
|
52
|
+
export interface OrderSelect {
|
|
53
|
+
id: number;
|
|
54
|
+
partnerPharmacyProfileId: number | null;
|
|
55
|
+
patientRecordId: number | null;
|
|
56
|
+
completed: boolean;
|
|
57
|
+
paymentModeAtOrder: PaymentModeAtOrder;
|
|
58
|
+
paymentStatus: PaymentStatus;
|
|
59
|
+
scriptType: ScriptType;
|
|
60
|
+
paperScriptReceived: boolean;
|
|
61
|
+
shippingType: ShippingType;
|
|
62
|
+
shippingFee: string;
|
|
63
|
+
lineItems: unknown;
|
|
64
|
+
orderChangeNotes: string | null;
|
|
65
|
+
counsellingRequired: boolean;
|
|
66
|
+
confirmationSentAt: Date | null;
|
|
67
|
+
hubspotContactId: string | null;
|
|
68
|
+
createdByUserId: string | null;
|
|
69
|
+
}
|
|
70
|
+
export interface GetById {
|
|
71
|
+
id: number;
|
|
72
|
+
}
|
|
73
|
+
export interface GetAll {
|
|
74
|
+
page?: number;
|
|
75
|
+
limit?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface DevEmail {
|
|
78
|
+
to: string;
|
|
79
|
+
name: string;
|
|
80
|
+
number: number;
|
|
81
|
+
}
|
|
82
|
+
export interface Sms {
|
|
83
|
+
body: string;
|
|
84
|
+
to: string;
|
|
85
|
+
from: string;
|
|
86
|
+
}
|
|
87
|
+
export interface DirectUserProfile {
|
|
88
|
+
id: number;
|
|
89
|
+
userId?: string;
|
|
90
|
+
compoundDirectId?: string | null;
|
|
91
|
+
remindersEnabled?: boolean;
|
|
92
|
+
scriptSubmissions?: ScriptSelect[];
|
|
93
|
+
}
|
|
94
|
+
export type DirectUserProfileCreate = Omit<DirectUserProfile, "id">;
|
|
95
|
+
export interface Order {
|
|
96
|
+
id: number;
|
|
97
|
+
partnerPharmacyProfileId?: number | null;
|
|
98
|
+
patientRecordId?: number | null;
|
|
99
|
+
completed?: boolean;
|
|
100
|
+
paymentModeAtOrder?: PaymentModeAtOrder;
|
|
101
|
+
paymentStatus?: PaymentStatus;
|
|
102
|
+
scriptType?: ScriptType;
|
|
103
|
+
paperScriptReceived?: boolean;
|
|
104
|
+
shippingType?: ShippingType;
|
|
105
|
+
shippingFee?: string;
|
|
106
|
+
lineItems?: unknown;
|
|
107
|
+
orderChangeNotes?: string | null;
|
|
108
|
+
counsellingRequired?: boolean;
|
|
109
|
+
confirmationSentAt?: Date | null;
|
|
110
|
+
hubspotContactId?: string | null;
|
|
111
|
+
createdByUserId?: string | null;
|
|
112
|
+
}
|
|
113
|
+
export type OrderCreate = Omit<Order, "id">;
|
|
114
|
+
export interface PaperScriptReminder {
|
|
115
|
+
id: number;
|
|
116
|
+
orderId?: number;
|
|
117
|
+
partnerPharmacyProfileId?: number;
|
|
118
|
+
status?: PaperScriptReminderStatus;
|
|
119
|
+
remindersSent?: number;
|
|
120
|
+
reminderIntervalDays?: number;
|
|
121
|
+
escalationEmail?: string;
|
|
122
|
+
received?: boolean;
|
|
123
|
+
lastSentAt?: string | null;
|
|
124
|
+
}
|
|
125
|
+
export type PaperScriptReminderCreate = Omit<PaperScriptReminder, "id">;
|
|
126
|
+
export interface PartnerPharmacyProfile {
|
|
127
|
+
id: number;
|
|
128
|
+
userId?: string;
|
|
129
|
+
abn?: string;
|
|
130
|
+
contactName?: string;
|
|
131
|
+
invoiceEmail?: string;
|
|
132
|
+
discountTier?: string;
|
|
133
|
+
paymentMode?: PaymentModeAtOrder;
|
|
134
|
+
remindersEnabled?: boolean;
|
|
135
|
+
priceMatches?: unknown;
|
|
136
|
+
dispatchAddress?: Address;
|
|
137
|
+
orders?: unknown;
|
|
138
|
+
xeroContactId?: string | null;
|
|
139
|
+
}
|
|
140
|
+
export type PartnerPharmacyProfileCreate = Omit<PartnerPharmacyProfile, "id">;
|
|
141
|
+
export interface GetPatientRecordsQuery extends GetAll {
|
|
142
|
+
partner_pharmacy_profile_id?: number;
|
|
143
|
+
}
|
|
144
|
+
export interface PatientRecord {
|
|
145
|
+
id: number;
|
|
146
|
+
partnerPharmacyProfileId?: number | null;
|
|
147
|
+
directUserProfileId?: number | null;
|
|
148
|
+
userId?: string | null;
|
|
149
|
+
firstName?: string;
|
|
150
|
+
lastName?: string;
|
|
151
|
+
dateOfBirth?: string;
|
|
152
|
+
medicareNumber?: string | null;
|
|
153
|
+
phone?: string;
|
|
154
|
+
address?: Address;
|
|
155
|
+
healthInfo?: HealthInfo;
|
|
156
|
+
reminderEnabled?: boolean;
|
|
157
|
+
scripts?: ScriptSelect[];
|
|
158
|
+
orderHistory?: OrderSelect[];
|
|
159
|
+
}
|
|
160
|
+
export type PatientRecordCreate = Omit<PatientRecord, "id">;
|
|
161
|
+
export interface Prescriber {
|
|
162
|
+
id: number;
|
|
163
|
+
name?: string;
|
|
164
|
+
email?: string;
|
|
165
|
+
phone?: string;
|
|
166
|
+
}
|
|
167
|
+
export type PrescriberCreate = Omit<Prescriber, "id">;
|
|
168
|
+
export interface PriceMatch {
|
|
169
|
+
id: number;
|
|
170
|
+
partnerPharmacyProfileId?: number;
|
|
171
|
+
productId?: number;
|
|
172
|
+
overridePrice?: string;
|
|
173
|
+
}
|
|
174
|
+
export type PriceMatchCreate = Omit<PriceMatch, "id">;
|
|
175
|
+
export interface Product {
|
|
176
|
+
id: number;
|
|
177
|
+
name?: string;
|
|
178
|
+
imageKey?: string | null;
|
|
179
|
+
abbreviations?: string[] | null;
|
|
180
|
+
category?: ProductCategory;
|
|
181
|
+
rrp?: string;
|
|
182
|
+
hazardTags?: HazardTag[] | null;
|
|
183
|
+
compoundDirectId?: string | null;
|
|
184
|
+
requiresFridge?: boolean;
|
|
185
|
+
flavours?: string[] | null;
|
|
186
|
+
requiresS8Medicare?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export type ProductCreate = Omit<Product, "id">;
|
|
189
|
+
export interface Quote {
|
|
190
|
+
id: number;
|
|
191
|
+
status?: QuoteStatus;
|
|
192
|
+
partnerPharmacyProfileId?: number;
|
|
193
|
+
name?: string;
|
|
194
|
+
strength?: string;
|
|
195
|
+
form?: string;
|
|
196
|
+
quantity?: number;
|
|
197
|
+
patientContext?: string;
|
|
198
|
+
}
|
|
199
|
+
export type QuoteCreate = Omit<Quote, "id">;
|
|
200
|
+
export interface RepeatReminder {
|
|
201
|
+
id: number;
|
|
202
|
+
orderId?: number;
|
|
203
|
+
patientRecordId?: number;
|
|
204
|
+
daysSupply?: number;
|
|
205
|
+
dispatchedAt?: Date;
|
|
206
|
+
reminderDueAt?: Date;
|
|
207
|
+
reminderOffsetDays?: number;
|
|
208
|
+
pharmacyReminderSent?: boolean;
|
|
209
|
+
patientSmsSent?: boolean;
|
|
210
|
+
enabled?: boolean;
|
|
211
|
+
}
|
|
212
|
+
export type RepeatReminderCreate = Omit<RepeatReminder, "id">;
|
|
213
|
+
export interface Script {
|
|
214
|
+
id: number;
|
|
215
|
+
prescriberId?: number;
|
|
216
|
+
patientRecordId?: number;
|
|
217
|
+
productId?: number;
|
|
218
|
+
dateIssued?: string;
|
|
219
|
+
processed?: boolean;
|
|
220
|
+
repeatsRemaining?: number;
|
|
221
|
+
daysSupply?: number;
|
|
222
|
+
repeatStorage?: RepeatStorage;
|
|
223
|
+
compoundDirectId?: string | null;
|
|
224
|
+
imageKey?: string | null;
|
|
225
|
+
}
|
|
226
|
+
export type ScriptCreate = Omit<Script, "id">;
|
package/build/validators.js
CHANGED
|
@@ -1,311 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
], s = ["eRx", "PAPER"], c = ["STANDARD", "COLD_CHAIN"], l = [
|
|
24
|
-
"Hazardous",
|
|
25
|
-
"Cytotoxic",
|
|
26
|
-
"High-Risk"
|
|
27
|
-
], u = e.object({
|
|
28
|
-
street: e.string().min(1),
|
|
29
|
-
suburb: e.string().min(1),
|
|
30
|
-
state: e.string().min(1),
|
|
31
|
-
postcode: e.string().min(1),
|
|
32
|
-
deliveryInstructions: e.string().optional()
|
|
33
|
-
}), d = e.object({
|
|
34
|
-
id: e.number(),
|
|
35
|
-
name: e.string(),
|
|
36
|
-
email: e.string(),
|
|
37
|
-
phone: e.string()
|
|
38
|
-
}), f = e.object({
|
|
39
|
-
allergies: e.string().nullable(),
|
|
40
|
-
conditions: e.string().nullable(),
|
|
41
|
-
relevantHistory: e.string().nullable(),
|
|
42
|
-
currentMedications: e.string().nullable(),
|
|
43
|
-
prescriber: d.nullable()
|
|
44
|
-
}), p = e.object({
|
|
45
|
-
id: e.number(),
|
|
46
|
-
prescriberId: e.number(),
|
|
47
|
-
patientRecordId: e.number(),
|
|
48
|
-
productId: e.number(),
|
|
49
|
-
dateIssued: e.string(),
|
|
50
|
-
processed: e.boolean(),
|
|
51
|
-
repeatsRemaining: e.number(),
|
|
52
|
-
daysSupply: e.number(),
|
|
53
|
-
repeatStorage: e.enum(o),
|
|
54
|
-
compoundDirectId: e.string().nullable(),
|
|
55
|
-
imageKey: e.string().nullable()
|
|
56
|
-
}), m = e.object({
|
|
57
|
-
id: e.number(),
|
|
58
|
-
partnerPharmacyProfileId: e.number().nullable(),
|
|
59
|
-
patientRecordId: e.number().nullable(),
|
|
60
|
-
completed: e.boolean(),
|
|
61
|
-
paymentModeAtOrder: e.enum(r),
|
|
62
|
-
paymentStatus: e.enum(i),
|
|
63
|
-
scriptType: e.enum(s),
|
|
64
|
-
paperScriptReceived: e.boolean(),
|
|
65
|
-
shippingType: e.enum(c),
|
|
66
|
-
shippingFee: e.string(),
|
|
67
|
-
lineItems: e.unknown(),
|
|
68
|
-
orderChangeNotes: e.string().nullable(),
|
|
69
|
-
counsellingRequired: e.boolean(),
|
|
70
|
-
confirmationSentAt: e.date().nullable(),
|
|
71
|
-
hubspotContactId: e.string().nullable(),
|
|
72
|
-
createdByUserId: e.string().nullable()
|
|
73
|
-
}), h = e.object({ id: e.preprocess((e) => typeof e == "string" && e !== "" ? Number(e) : e, e.number().int().min(1)) }), g = e.object({
|
|
74
|
-
page: e.preprocess((e) => {
|
|
75
|
-
if (typeof e == "string" && e !== "") return Number(e);
|
|
76
|
-
}, e.number().int().min(1).optional()),
|
|
77
|
-
limit: e.preprocess((e) => {
|
|
78
|
-
if (typeof e == "string" && e !== "") return Number(e);
|
|
79
|
-
}, e.number().int().min(1).max(100).optional())
|
|
80
|
-
}), _ = e.object({
|
|
81
|
-
to: e.string(),
|
|
82
|
-
name: e.string(),
|
|
83
|
-
number: e.number()
|
|
84
|
-
}), v = e.object({
|
|
85
|
-
body: e.string(),
|
|
86
|
-
to: e.string(),
|
|
87
|
-
from: e.string()
|
|
88
|
-
}), y = e.object({
|
|
89
|
-
userId: e.string(),
|
|
90
|
-
patientRecordId: e.number().int().nullable().optional(),
|
|
91
|
-
compoundDirectId: e.string().nullable().optional(),
|
|
92
|
-
remindersEnabled: e.boolean().optional(),
|
|
93
|
-
scriptSubmissions: e.array(p).nullable()
|
|
94
|
-
}), b = e.object({
|
|
95
|
-
id: e.number().int().min(1),
|
|
96
|
-
userId: e.string().optional(),
|
|
97
|
-
patientRecordId: e.number().int().nullable().optional(),
|
|
98
|
-
compoundDirectId: e.string().nullable().optional(),
|
|
99
|
-
remindersEnabled: e.boolean().optional(),
|
|
100
|
-
scriptSubmissions: e.array(p).nullable().optional()
|
|
101
|
-
}), x = e.object({
|
|
102
|
-
partnerPharmacyProfileId: e.number().int().nullable().optional(),
|
|
103
|
-
patientRecordId: e.number().int().nullable().optional(),
|
|
104
|
-
completed: e.boolean().optional(),
|
|
105
|
-
paymentModeAtOrder: e.enum(r),
|
|
106
|
-
paymentStatus: e.enum(i),
|
|
107
|
-
scriptType: e.enum(s),
|
|
108
|
-
paperScriptReceived: e.boolean().optional(),
|
|
109
|
-
shippingType: e.enum(c),
|
|
110
|
-
shippingFee: e.string(),
|
|
111
|
-
lineItems: e.unknown().optional(),
|
|
112
|
-
orderChangeNotes: e.string().nullable().optional(),
|
|
113
|
-
counsellingRequired: e.boolean().optional(),
|
|
114
|
-
confirmationSentAt: e.coerce.date().nullable().optional(),
|
|
115
|
-
hubspotContactId: e.string().nullable().optional(),
|
|
116
|
-
createdByUserId: e.string().nullable().optional()
|
|
117
|
-
}), S = e.object({
|
|
118
|
-
id: e.number().int().min(1),
|
|
119
|
-
partnerPharmacyProfileId: e.number().int().nullable().optional(),
|
|
120
|
-
patientRecordId: e.number().int().nullable().optional(),
|
|
121
|
-
completed: e.boolean().optional(),
|
|
122
|
-
paymentModeAtOrder: e.enum(r).optional(),
|
|
123
|
-
paymentStatus: e.enum(i).optional(),
|
|
124
|
-
scriptType: e.enum(s).optional(),
|
|
125
|
-
paperScriptReceived: e.boolean().optional(),
|
|
126
|
-
shippingType: e.enum(c).optional(),
|
|
127
|
-
shippingFee: e.string().optional(),
|
|
128
|
-
lineItems: e.unknown().optional(),
|
|
129
|
-
orderChangeNotes: e.string().nullable().optional(),
|
|
130
|
-
counsellingRequired: e.boolean().optional(),
|
|
131
|
-
confirmationSentAt: e.coerce.date().nullable().optional(),
|
|
132
|
-
hubspotContactId: e.string().nullable().optional(),
|
|
133
|
-
createdByUserId: e.string().nullable().optional()
|
|
134
|
-
}), C = e.object({
|
|
135
|
-
orderId: e.number().int(),
|
|
136
|
-
partnerPharmacyProfileId: e.number().int(),
|
|
137
|
-
status: e.enum(t),
|
|
138
|
-
remindersSent: e.number().int(),
|
|
139
|
-
reminderIntervalDays: e.number().int().optional(),
|
|
140
|
-
escalationEmail: e.string(),
|
|
141
|
-
receivedMarked: e.boolean()
|
|
142
|
-
}), w = e.object({
|
|
143
|
-
id: e.number().int().min(1),
|
|
144
|
-
orderId: e.number().int().optional(),
|
|
145
|
-
partnerPharmacyProfileId: e.number().int().optional(),
|
|
146
|
-
status: e.enum(t).optional(),
|
|
147
|
-
remindersSent: e.number().int().optional(),
|
|
148
|
-
reminderIntervalDays: e.number().int().optional(),
|
|
149
|
-
escalationEmail: e.string().optional(),
|
|
150
|
-
receivedMarked: e.boolean().optional()
|
|
151
|
-
}), T = e.object({
|
|
152
|
-
userId: e.string(),
|
|
153
|
-
abn: e.string(),
|
|
154
|
-
contactName: e.string(),
|
|
155
|
-
invoiceEmail: e.string(),
|
|
156
|
-
phone: e.string(),
|
|
157
|
-
discountTier: e.string(),
|
|
158
|
-
paymentMode: e.enum(r),
|
|
159
|
-
remindersEnabled: e.boolean().optional(),
|
|
160
|
-
priceMatches: e.unknown().optional(),
|
|
161
|
-
dispatchAddress: u.nullable(),
|
|
162
|
-
orders: e.unknown().optional(),
|
|
163
|
-
xeroContactId: e.string().nullable().optional()
|
|
164
|
-
}), E = e.object({
|
|
165
|
-
id: e.number().int().min(1),
|
|
166
|
-
userId: e.string().optional(),
|
|
167
|
-
abn: e.string().optional(),
|
|
168
|
-
contactName: e.string().optional(),
|
|
169
|
-
invoiceEmail: e.string().optional(),
|
|
170
|
-
phone: e.string().optional(),
|
|
171
|
-
discountTier: e.string().optional(),
|
|
172
|
-
paymentMode: e.enum(r).optional(),
|
|
173
|
-
remindersEnabled: e.boolean().optional(),
|
|
174
|
-
priceMatches: e.unknown().optional(),
|
|
175
|
-
dispatchAddress: u.nullable().optional(),
|
|
176
|
-
orders: e.unknown().optional(),
|
|
177
|
-
xeroContactId: e.string().nullable().optional()
|
|
178
|
-
}), D = g.extend({ partner_pharmacy_profile_id: e.preprocess((e) => {
|
|
179
|
-
if (typeof e == "string" && e !== "") return Number(e);
|
|
180
|
-
}, e.number().int().min(1).optional()) }), O = e.object({
|
|
181
|
-
partnerPharmacyProfileId: e.number().int().nullable().optional(),
|
|
182
|
-
userId: e.string().nullable().optional(),
|
|
183
|
-
firstName: e.string(),
|
|
184
|
-
lastName: e.string(),
|
|
185
|
-
dateOfBirth: e.string(),
|
|
186
|
-
medicareNumber: e.string().nullable().optional(),
|
|
187
|
-
phone: e.string(),
|
|
188
|
-
address: u.nullable(),
|
|
189
|
-
healthInfo: f.nullable(),
|
|
190
|
-
reminderEnabled: e.boolean().optional(),
|
|
191
|
-
scripts: e.array(p).nullable(),
|
|
192
|
-
orderHistory: e.array(m).nullable()
|
|
193
|
-
}), k = e.object({
|
|
194
|
-
id: e.number().int().min(1),
|
|
195
|
-
partnerPharmacyProfileId: e.number().int().nullable().optional(),
|
|
196
|
-
userId: e.string().nullable().optional(),
|
|
197
|
-
firstName: e.string().optional(),
|
|
198
|
-
lastName: e.string().optional(),
|
|
199
|
-
dateOfBirth: e.string().optional(),
|
|
200
|
-
medicareNumber: e.string().nullable().optional(),
|
|
201
|
-
phone: e.string().optional(),
|
|
202
|
-
address: u.nullable().optional(),
|
|
203
|
-
healthInfo: f.nullable().optional(),
|
|
204
|
-
reminderEnabled: e.boolean().optional(),
|
|
205
|
-
scripts: e.array(p).nullable().optional(),
|
|
206
|
-
orderHistory: e.array(m).nullable().optional()
|
|
207
|
-
}), A = e.object({
|
|
208
|
-
name: e.string(),
|
|
209
|
-
email: e.string(),
|
|
210
|
-
phone: e.string()
|
|
211
|
-
}), j = e.object({
|
|
212
|
-
id: e.number().int().min(1),
|
|
213
|
-
name: e.string().optional(),
|
|
214
|
-
email: e.string().optional(),
|
|
215
|
-
phone: e.string().optional()
|
|
216
|
-
}), M = e.object({
|
|
217
|
-
partnerPharmacyProfileId: e.number().int(),
|
|
218
|
-
productId: e.number().int(),
|
|
219
|
-
overridePrice: e.string()
|
|
220
|
-
}), N = e.object({
|
|
221
|
-
id: e.number().int().min(1),
|
|
222
|
-
partnerPharmacyProfileId: e.number().int().optional(),
|
|
223
|
-
productId: e.number().int().optional(),
|
|
224
|
-
overridePrice: e.string().optional()
|
|
225
|
-
}), P = e.object({
|
|
226
|
-
name: e.string(),
|
|
227
|
-
imageKey: e.string().nullable().optional(),
|
|
228
|
-
abbreviations: e.array(e.string()).nullable().optional(),
|
|
229
|
-
category: e.enum(a),
|
|
230
|
-
rrp: e.string(),
|
|
231
|
-
hazardTags: e.array(e.enum(l)).nullable().optional(),
|
|
232
|
-
compoundDirectId: e.string().nullable().optional(),
|
|
233
|
-
requiresFridge: e.boolean().optional(),
|
|
234
|
-
flavours: e.array(e.string()).nullable().optional(),
|
|
235
|
-
requiresS8Medicare: e.boolean().optional()
|
|
236
|
-
}), F = e.object({
|
|
237
|
-
id: e.number().int().min(1),
|
|
238
|
-
name: e.string().optional(),
|
|
239
|
-
imageKey: e.string().nullable().optional(),
|
|
240
|
-
abbreviations: e.array(e.string()).nullable().optional(),
|
|
241
|
-
category: e.enum(a).optional(),
|
|
242
|
-
rrp: e.string().optional(),
|
|
243
|
-
hazardTags: e.array(e.enum(l)).nullable().optional(),
|
|
244
|
-
compoundDirectId: e.string().nullable().optional(),
|
|
245
|
-
requiresFridge: e.boolean().optional(),
|
|
246
|
-
flavours: e.array(e.string()).nullable().optional(),
|
|
247
|
-
requiresS8Medicare: e.boolean().optional()
|
|
248
|
-
}), I = e.object({
|
|
249
|
-
status: e.enum(n).optional(),
|
|
250
|
-
partnerPharmacyProfileId: e.number().int(),
|
|
251
|
-
name: e.string(),
|
|
252
|
-
strength: e.string(),
|
|
253
|
-
form: e.string(),
|
|
254
|
-
quantity: e.number().int(),
|
|
255
|
-
patientContext: e.string()
|
|
256
|
-
}), L = e.object({
|
|
257
|
-
id: e.number().int().min(1),
|
|
258
|
-
status: e.enum(n).optional(),
|
|
259
|
-
partnerPharmacyProfileId: e.number().int().optional(),
|
|
260
|
-
name: e.string().optional(),
|
|
261
|
-
strength: e.string().optional(),
|
|
262
|
-
form: e.string().optional(),
|
|
263
|
-
quantity: e.number().int().optional(),
|
|
264
|
-
patientContext: e.string().optional()
|
|
265
|
-
}), R = e.object({
|
|
266
|
-
orderId: e.number().int(),
|
|
267
|
-
patientRecordId: e.number().int(),
|
|
268
|
-
daysSupply: e.number().int(),
|
|
269
|
-
dispatchedAt: e.coerce.date(),
|
|
270
|
-
reminderDueAt: e.coerce.date(),
|
|
271
|
-
reminderOffsetDays: e.number().int().optional(),
|
|
272
|
-
pharmacyReminderSent: e.boolean().optional(),
|
|
273
|
-
patientSmsSent: e.boolean().optional(),
|
|
274
|
-
enabled: e.boolean().optional()
|
|
275
|
-
}), z = e.object({
|
|
276
|
-
id: e.number().int().min(1),
|
|
277
|
-
orderId: e.number().int().optional(),
|
|
278
|
-
patientRecordId: e.number().int().optional(),
|
|
279
|
-
daysSupply: e.number().int().optional(),
|
|
280
|
-
dispatchedAt: e.coerce.date().optional(),
|
|
281
|
-
reminderDueAt: e.coerce.date().optional(),
|
|
282
|
-
reminderOffsetDays: e.number().int().optional(),
|
|
283
|
-
pharmacyReminderSent: e.boolean().optional(),
|
|
284
|
-
patientSmsSent: e.boolean().optional(),
|
|
285
|
-
enabled: e.boolean().optional()
|
|
286
|
-
}), B = e.object({
|
|
287
|
-
prescriberId: e.number().int(),
|
|
288
|
-
patientRecordId: e.number().int(),
|
|
289
|
-
productId: e.number().int(),
|
|
290
|
-
dateIssued: e.string(),
|
|
291
|
-
processed: e.boolean().optional(),
|
|
292
|
-
repeatsRemaining: e.number().int().optional(),
|
|
293
|
-
daysSupply: e.number().int(),
|
|
294
|
-
repeatStorage: e.enum(o),
|
|
295
|
-
compoundDirectId: e.string().nullable().optional(),
|
|
296
|
-
imageKey: e.string().nullable().optional()
|
|
297
|
-
}), V = e.object({
|
|
298
|
-
id: e.number().int().min(1),
|
|
299
|
-
prescriberId: e.number().int().optional(),
|
|
300
|
-
patientRecordId: e.number().int().optional(),
|
|
301
|
-
productId: e.number().int().optional(),
|
|
302
|
-
dateIssued: e.string().optional(),
|
|
303
|
-
processed: e.boolean().optional(),
|
|
304
|
-
repeatsRemaining: e.number().int().optional(),
|
|
305
|
-
daysSupply: e.number().int().optional(),
|
|
306
|
-
repeatStorage: e.enum(o).optional(),
|
|
307
|
-
compoundDirectId: e.string().nullable().optional(),
|
|
308
|
-
imageKey: e.string().nullable().optional()
|
|
309
|
-
});
|
|
310
|
-
//#endregion
|
|
311
|
-
export { u as addressSchema, y as createDirectUserProfileBodySchema, x as createOrderBodySchema, C as createPaperScriptReminderBodySchema, T as createPartnerPharmacyProfileBodySchema, O as createPatientRecordBodySchema, A as createPrescriberBodySchema, M as createPriceMatchBodySchema, P as createProductBodySchema, I as createQuoteBodySchema, R as createRepeatReminderBodySchema, B as createScriptBodySchema, _ as devEmailSchema, g as getAllSchema, h as getByIdSchema, D as getPatientRecordsQuerySchema, l as hazardTagsValues, f as healthInfoSchema, m as orderSelectSchema, t as paperScriptReminderStatusValues, r as paymentModeAtOrderValues, i as paymentStatusValues, d as prescriberSelectSchema, a as productCategoryValues, n as quoteStatusValues, o as repeatStorageValues, p as scriptSelectSchema, s as scriptTypeValues, c as shippingTypeValues, v as smsSchema, b as updateDirectUserProfileBodySchema, S as updateOrderBodySchema, w as updatePaperScriptReminderBodySchema, E as updatePartnerPharmacyProfileBodySchema, k as updatePatientRecordBodySchema, j as updatePrescriberBodySchema, N as updatePriceMatchBodySchema, F as updateProductBodySchema, L as updateQuoteBodySchema, z as updateRepeatReminderBodySchema, V as updateScriptBodySchema };
|
|
1
|
+
// ─── Enum value arrays ──────────────────────────────────────────────────────────
|
|
2
|
+
export const paperScriptReminderStatusValues = [
|
|
3
|
+
"PENDING",
|
|
4
|
+
"RECEIVED",
|
|
5
|
+
"ESCALATED",
|
|
6
|
+
];
|
|
7
|
+
export const quoteStatusValues = ["PENDING", "PROCESSING", "RESOLVED"];
|
|
8
|
+
export const paymentModeAtOrderValues = ["INVOICE", "POS"];
|
|
9
|
+
export const paymentStatusValues = [
|
|
10
|
+
"AWAITING_PAYMENT",
|
|
11
|
+
"PAID",
|
|
12
|
+
"PENDING_INVOICE",
|
|
13
|
+
];
|
|
14
|
+
export const productCategoryValues = ["TODO1", "TODO2", "TODO3"];
|
|
15
|
+
export const repeatStorageValues = [
|
|
16
|
+
"HEATHERSHAWS",
|
|
17
|
+
"PHARMACY",
|
|
18
|
+
"PATIENT",
|
|
19
|
+
];
|
|
20
|
+
export const scriptTypeValues = ["eRx", "PAPER"];
|
|
21
|
+
export const shippingTypeValues = ["STANDARD", "COLD_CHAIN"];
|
|
22
|
+
export const hazardTagsValues = ["Hazardous", "Cytotoxic", "High-Risk"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natch-the-storage/heathershaw-platform-types",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Validation and interfaces to use on the client",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Natch Surana",
|
|
@@ -13,18 +13,13 @@
|
|
|
13
13
|
"import": "./build/validators.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"peerDependencies": {
|
|
17
|
-
"zod": "^4.4.3"
|
|
18
|
-
},
|
|
19
16
|
"files": [
|
|
20
17
|
"build"
|
|
21
18
|
],
|
|
22
19
|
"scripts": {
|
|
23
|
-
"build": "
|
|
20
|
+
"build": "tsc"
|
|
24
21
|
},
|
|
25
22
|
"devDependencies": {
|
|
26
|
-
"typescript": "^6.0.3"
|
|
27
|
-
"vite": "^8.0.16",
|
|
28
|
-
"vite-plugin-dts": "^5.0.2"
|
|
23
|
+
"typescript": "^6.0.3"
|
|
29
24
|
}
|
|
30
25
|
}
|