@natch-the-storage/heathershaw-platform-types 1.0.2 → 1.1.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 +2 -15
- package/build/validators.d.ts +312 -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,3 @@ 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
|
-
- `zod` is a peer dependency — install it in the consumer project
|
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,315 @@ 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
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
}
|
|
229
|
-
export
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
export
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
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 CreateDirectUserProfileBody {
|
|
88
|
+
userId: string;
|
|
89
|
+
patientRecordId?: number | null;
|
|
90
|
+
compoundDirectId?: string | null;
|
|
91
|
+
remindersEnabled?: boolean;
|
|
92
|
+
scriptSubmissions: ScriptSelect[] | null;
|
|
93
|
+
}
|
|
94
|
+
export interface UpdateDirectUserProfileBody {
|
|
95
|
+
id: number;
|
|
96
|
+
userId?: string;
|
|
97
|
+
patientRecordId?: number | null;
|
|
98
|
+
compoundDirectId?: string | null;
|
|
99
|
+
remindersEnabled?: boolean;
|
|
100
|
+
scriptSubmissions?: ScriptSelect[] | null;
|
|
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;
|
|
118
|
+
}
|
|
119
|
+
export interface UpdateOrderBody {
|
|
120
|
+
id: number;
|
|
121
|
+
partnerPharmacyProfileId?: number | null;
|
|
122
|
+
patientRecordId?: number | null;
|
|
123
|
+
completed?: boolean;
|
|
124
|
+
paymentModeAtOrder?: PaymentModeAtOrder;
|
|
125
|
+
paymentStatus?: PaymentStatus;
|
|
126
|
+
scriptType?: ScriptType;
|
|
127
|
+
paperScriptReceived?: boolean;
|
|
128
|
+
shippingType?: ShippingType;
|
|
129
|
+
shippingFee?: string;
|
|
130
|
+
lineItems?: unknown;
|
|
131
|
+
orderChangeNotes?: string | null;
|
|
132
|
+
counsellingRequired?: boolean;
|
|
133
|
+
confirmationSentAt?: Date | null;
|
|
134
|
+
hubspotContactId?: string | null;
|
|
135
|
+
createdByUserId?: string | null;
|
|
136
|
+
}
|
|
137
|
+
export interface CreatePaperScriptReminderBody {
|
|
138
|
+
orderId: number;
|
|
139
|
+
partnerPharmacyProfileId: number;
|
|
140
|
+
status: PaperScriptReminderStatus;
|
|
141
|
+
remindersSent: number;
|
|
142
|
+
reminderIntervalDays?: number;
|
|
143
|
+
escalationEmail: string;
|
|
144
|
+
receivedMarked: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface UpdatePaperScriptReminderBody {
|
|
147
|
+
id: number;
|
|
148
|
+
orderId?: number;
|
|
149
|
+
partnerPharmacyProfileId?: number;
|
|
150
|
+
status?: PaperScriptReminderStatus;
|
|
151
|
+
remindersSent?: number;
|
|
152
|
+
reminderIntervalDays?: number;
|
|
153
|
+
escalationEmail?: string;
|
|
154
|
+
receivedMarked?: boolean;
|
|
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;
|
|
169
|
+
}
|
|
170
|
+
export interface UpdatePartnerPharmacyProfileBody {
|
|
171
|
+
id: number;
|
|
172
|
+
userId?: string;
|
|
173
|
+
abn?: string;
|
|
174
|
+
contactName?: string;
|
|
175
|
+
invoiceEmail?: string;
|
|
176
|
+
phone?: string;
|
|
177
|
+
discountTier?: string;
|
|
178
|
+
paymentMode?: PaymentModeAtOrder;
|
|
179
|
+
remindersEnabled?: boolean;
|
|
180
|
+
priceMatches?: unknown;
|
|
181
|
+
dispatchAddress?: Address | null;
|
|
182
|
+
orders?: unknown;
|
|
183
|
+
xeroContactId?: string | null;
|
|
184
|
+
}
|
|
185
|
+
export interface GetPatientRecordsQuery extends GetAll {
|
|
186
|
+
partner_pharmacy_profile_id?: number;
|
|
187
|
+
}
|
|
188
|
+
export interface CreatePatientRecordBody {
|
|
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 {
|
|
203
|
+
id: number;
|
|
204
|
+
partnerPharmacyProfileId?: number | null;
|
|
205
|
+
userId?: string | null;
|
|
206
|
+
firstName?: string;
|
|
207
|
+
lastName?: string;
|
|
208
|
+
dateOfBirth?: string;
|
|
209
|
+
medicareNumber?: string | null;
|
|
210
|
+
phone?: string;
|
|
211
|
+
address?: Address | null;
|
|
212
|
+
healthInfo?: HealthInfo | null;
|
|
213
|
+
reminderEnabled?: boolean;
|
|
214
|
+
scripts?: ScriptSelect[] | null;
|
|
215
|
+
orderHistory?: OrderSelect[] | null;
|
|
216
|
+
}
|
|
217
|
+
export interface CreatePrescriberBody {
|
|
218
|
+
name: string;
|
|
219
|
+
email: string;
|
|
220
|
+
phone: string;
|
|
221
|
+
}
|
|
222
|
+
export interface UpdatePrescriberBody {
|
|
223
|
+
id: number;
|
|
224
|
+
name?: string;
|
|
225
|
+
email?: string;
|
|
226
|
+
phone?: string;
|
|
227
|
+
}
|
|
228
|
+
export interface CreatePriceMatchBody {
|
|
229
|
+
partnerPharmacyProfileId: number;
|
|
230
|
+
productId: number;
|
|
231
|
+
overridePrice: string;
|
|
232
|
+
}
|
|
233
|
+
export interface UpdatePriceMatchBody {
|
|
234
|
+
id: number;
|
|
235
|
+
partnerPharmacyProfileId?: number;
|
|
236
|
+
productId?: number;
|
|
237
|
+
overridePrice?: string;
|
|
238
|
+
}
|
|
239
|
+
export interface CreateProductBody {
|
|
240
|
+
name: string;
|
|
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 {
|
|
252
|
+
id: number;
|
|
253
|
+
name?: string;
|
|
254
|
+
imageKey?: string | null;
|
|
255
|
+
abbreviations?: string[] | null;
|
|
256
|
+
category?: ProductCategory;
|
|
257
|
+
rrp?: string;
|
|
258
|
+
hazardTags?: HazardTag[] | null;
|
|
259
|
+
compoundDirectId?: string | null;
|
|
260
|
+
requiresFridge?: boolean;
|
|
261
|
+
flavours?: string[] | null;
|
|
262
|
+
requiresS8Medicare?: boolean;
|
|
263
|
+
}
|
|
264
|
+
export interface CreateQuoteBody {
|
|
265
|
+
status?: QuoteStatus;
|
|
266
|
+
partnerPharmacyProfileId: number;
|
|
267
|
+
name: string;
|
|
268
|
+
strength: string;
|
|
269
|
+
form: string;
|
|
270
|
+
quantity: number;
|
|
271
|
+
patientContext: string;
|
|
272
|
+
}
|
|
273
|
+
export interface UpdateQuoteBody {
|
|
274
|
+
id: number;
|
|
275
|
+
status?: QuoteStatus;
|
|
276
|
+
partnerPharmacyProfileId?: number;
|
|
277
|
+
name?: string;
|
|
278
|
+
strength?: string;
|
|
279
|
+
form?: string;
|
|
280
|
+
quantity?: number;
|
|
281
|
+
patientContext?: string;
|
|
282
|
+
}
|
|
283
|
+
export interface CreateRepeatReminderBody {
|
|
284
|
+
orderId: number;
|
|
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 {
|
|
295
|
+
id: number;
|
|
296
|
+
orderId?: number;
|
|
297
|
+
patientRecordId?: number;
|
|
298
|
+
daysSupply?: number;
|
|
299
|
+
dispatchedAt?: Date;
|
|
300
|
+
reminderDueAt?: Date;
|
|
301
|
+
reminderOffsetDays?: number;
|
|
302
|
+
pharmacyReminderSent?: boolean;
|
|
303
|
+
patientSmsSent?: boolean;
|
|
304
|
+
enabled?: boolean;
|
|
305
|
+
}
|
|
306
|
+
export interface CreateScriptBody {
|
|
307
|
+
prescriberId: number;
|
|
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 {
|
|
319
|
+
id: number;
|
|
320
|
+
prescriberId?: number;
|
|
321
|
+
patientRecordId?: number;
|
|
322
|
+
productId?: number;
|
|
323
|
+
dateIssued?: string;
|
|
324
|
+
processed?: boolean;
|
|
325
|
+
repeatsRemaining?: number;
|
|
326
|
+
daysSupply?: number;
|
|
327
|
+
repeatStorage?: RepeatStorage;
|
|
328
|
+
compoundDirectId?: string | null;
|
|
329
|
+
imageKey?: string | null;
|
|
330
|
+
}
|
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.1.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
|
}
|