@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 CHANGED
@@ -1,29 +1,17 @@
1
1
  # @natch-the-storage/heathershaw-platform-types
2
2
 
3
- Zod validation schemas, enum value arrays, and inferred TypeScript types for frontend use.
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 zod
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
@@ -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 declare const addressSchema: z.ZodObject<{
21
- street: z.ZodString;
22
- suburb: z.ZodString;
23
- state: z.ZodString;
24
- postcode: z.ZodString;
25
- deliveryInstructions: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strip>;
27
- export declare const prescriberSelectSchema: z.ZodObject<{
28
- id: z.ZodNumber;
29
- name: z.ZodString;
30
- email: z.ZodString;
31
- phone: z.ZodString;
32
- }, z.core.$strip>;
33
- export declare const healthInfoSchema: z.ZodObject<{
34
- allergies: z.ZodNullable<z.ZodString>;
35
- conditions: z.ZodNullable<z.ZodString>;
36
- relevantHistory: z.ZodNullable<z.ZodString>;
37
- currentMedications: z.ZodNullable<z.ZodString>;
38
- prescriber: z.ZodNullable<z.ZodObject<{
39
- id: z.ZodNumber;
40
- name: z.ZodString;
41
- email: z.ZodString;
42
- phone: z.ZodString;
43
- }, z.core.$strip>>;
44
- }, z.core.$strip>;
45
- export declare const scriptSelectSchema: z.ZodObject<{
46
- id: z.ZodNumber;
47
- prescriberId: z.ZodNumber;
48
- patientRecordId: z.ZodNumber;
49
- productId: z.ZodNumber;
50
- dateIssued: z.ZodString;
51
- processed: z.ZodBoolean;
52
- repeatsRemaining: z.ZodNumber;
53
- daysSupply: z.ZodNumber;
54
- repeatStorage: z.ZodEnum<{
55
- HEATHERSHAWS: "HEATHERSHAWS";
56
- PHARMACY: "PHARMACY";
57
- PATIENT: "PATIENT";
58
- }>;
59
- compoundDirectId: z.ZodNullable<z.ZodString>;
60
- imageKey: z.ZodNullable<z.ZodString>;
61
- }, z.core.$strip>;
62
- export declare const orderSelectSchema: z.ZodObject<{
63
- id: z.ZodNumber;
64
- partnerPharmacyProfileId: z.ZodNullable<z.ZodNumber>;
65
- patientRecordId: z.ZodNullable<z.ZodNumber>;
66
- completed: z.ZodBoolean;
67
- paymentModeAtOrder: z.ZodEnum<{
68
- INVOICE: "INVOICE";
69
- POS: "POS";
70
- }>;
71
- paymentStatus: z.ZodEnum<{
72
- AWAITING_PAYMENT: "AWAITING_PAYMENT";
73
- PAID: "PAID";
74
- PENDING_INVOICE: "PENDING_INVOICE";
75
- }>;
76
- scriptType: z.ZodEnum<{
77
- eRx: "eRx";
78
- PAPER: "PAPER";
79
- }>;
80
- paperScriptReceived: z.ZodBoolean;
81
- shippingType: z.ZodEnum<{
82
- STANDARD: "STANDARD";
83
- COLD_CHAIN: "COLD_CHAIN";
84
- }>;
85
- shippingFee: z.ZodString;
86
- lineItems: z.ZodUnknown;
87
- orderChangeNotes: z.ZodNullable<z.ZodString>;
88
- counsellingRequired: z.ZodBoolean;
89
- confirmationSentAt: z.ZodNullable<z.ZodDate>;
90
- hubspotContactId: z.ZodNullable<z.ZodString>;
91
- createdByUserId: z.ZodNullable<z.ZodString>;
92
- }, z.core.$strip>;
93
- export type Address = z.infer<typeof addressSchema>;
94
- export type PrescriberSelect = z.infer<typeof prescriberSelectSchema>;
95
- export type HealthInfo = z.infer<typeof healthInfoSchema>;
96
- export type ScriptSelect = z.infer<typeof scriptSelectSchema>;
97
- export type OrderSelect = z.infer<typeof orderSelectSchema>;
98
- export declare const getByIdSchema: z.ZodObject<{
99
- id: z.ZodPreprocess<z.ZodNumber>;
100
- }, z.core.$strip>;
101
- export declare const getAllSchema: z.ZodObject<{
102
- page: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
103
- limit: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
104
- }, z.core.$strip>;
105
- export declare const devEmailSchema: z.ZodObject<{
106
- to: z.ZodString;
107
- name: z.ZodString;
108
- number: z.ZodNumber;
109
- }, z.core.$strip>;
110
- export declare const smsSchema: z.ZodObject<{
111
- body: z.ZodString;
112
- to: z.ZodString;
113
- from: z.ZodString;
114
- }, z.core.$strip>;
115
- export type GetById = z.infer<typeof getByIdSchema>;
116
- export type GetAll = z.infer<typeof getAllSchema>;
117
- export type DevEmail = z.infer<typeof devEmailSchema>;
118
- export type Sms = z.infer<typeof smsSchema>;
119
- export declare const createDirectUserProfileBodySchema: z.ZodObject<{
120
- userId: z.ZodString;
121
- patientRecordId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
122
- compoundDirectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
- remindersEnabled: z.ZodOptional<z.ZodBoolean>;
124
- scriptSubmissions: z.ZodNullable<z.ZodArray<z.ZodObject<{
125
- id: z.ZodNumber;
126
- prescriberId: z.ZodNumber;
127
- patientRecordId: z.ZodNumber;
128
- productId: z.ZodNumber;
129
- dateIssued: z.ZodString;
130
- processed: z.ZodBoolean;
131
- repeatsRemaining: z.ZodNumber;
132
- daysSupply: z.ZodNumber;
133
- repeatStorage: z.ZodEnum<{
134
- HEATHERSHAWS: "HEATHERSHAWS";
135
- PHARMACY: "PHARMACY";
136
- PATIENT: "PATIENT";
137
- }>;
138
- compoundDirectId: z.ZodNullable<z.ZodString>;
139
- imageKey: z.ZodNullable<z.ZodString>;
140
- }, z.core.$strip>>>;
141
- }, z.core.$strip>;
142
- export declare const updateDirectUserProfileBodySchema: z.ZodObject<{
143
- id: z.ZodNumber;
144
- userId: z.ZodOptional<z.ZodString>;
145
- patientRecordId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
146
- compoundDirectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
- remindersEnabled: z.ZodOptional<z.ZodBoolean>;
148
- scriptSubmissions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
149
- id: z.ZodNumber;
150
- prescriberId: z.ZodNumber;
151
- patientRecordId: z.ZodNumber;
152
- productId: z.ZodNumber;
153
- dateIssued: z.ZodString;
154
- processed: z.ZodBoolean;
155
- repeatsRemaining: z.ZodNumber;
156
- daysSupply: z.ZodNumber;
157
- repeatStorage: z.ZodEnum<{
158
- HEATHERSHAWS: "HEATHERSHAWS";
159
- PHARMACY: "PHARMACY";
160
- PATIENT: "PATIENT";
161
- }>;
162
- compoundDirectId: z.ZodNullable<z.ZodString>;
163
- imageKey: z.ZodNullable<z.ZodString>;
164
- }, z.core.$strip>>>>;
165
- }, z.core.$strip>;
166
- export type CreateDirectUserProfileBody = z.infer<typeof createDirectUserProfileBodySchema>;
167
- export type UpdateDirectUserProfileBody = z.infer<typeof updateDirectUserProfileBodySchema>;
168
- export declare const createOrderBodySchema: z.ZodObject<{
169
- partnerPharmacyProfileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
170
- patientRecordId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
171
- completed: z.ZodOptional<z.ZodBoolean>;
172
- paymentModeAtOrder: z.ZodEnum<{
173
- INVOICE: "INVOICE";
174
- POS: "POS";
175
- }>;
176
- paymentStatus: z.ZodEnum<{
177
- AWAITING_PAYMENT: "AWAITING_PAYMENT";
178
- PAID: "PAID";
179
- PENDING_INVOICE: "PENDING_INVOICE";
180
- }>;
181
- scriptType: z.ZodEnum<{
182
- eRx: "eRx";
183
- PAPER: "PAPER";
184
- }>;
185
- paperScriptReceived: z.ZodOptional<z.ZodBoolean>;
186
- shippingType: z.ZodEnum<{
187
- STANDARD: "STANDARD";
188
- COLD_CHAIN: "COLD_CHAIN";
189
- }>;
190
- shippingFee: z.ZodString;
191
- lineItems: z.ZodOptional<z.ZodUnknown>;
192
- orderChangeNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
- counsellingRequired: z.ZodOptional<z.ZodBoolean>;
194
- confirmationSentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
195
- hubspotContactId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
- createdByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
- }, z.core.$strip>;
198
- export declare const updateOrderBodySchema: z.ZodObject<{
199
- id: z.ZodNumber;
200
- partnerPharmacyProfileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
201
- patientRecordId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
202
- completed: z.ZodOptional<z.ZodBoolean>;
203
- paymentModeAtOrder: z.ZodOptional<z.ZodEnum<{
204
- INVOICE: "INVOICE";
205
- POS: "POS";
206
- }>>;
207
- paymentStatus: z.ZodOptional<z.ZodEnum<{
208
- AWAITING_PAYMENT: "AWAITING_PAYMENT";
209
- PAID: "PAID";
210
- PENDING_INVOICE: "PENDING_INVOICE";
211
- }>>;
212
- scriptType: z.ZodOptional<z.ZodEnum<{
213
- eRx: "eRx";
214
- PAPER: "PAPER";
215
- }>>;
216
- paperScriptReceived: z.ZodOptional<z.ZodBoolean>;
217
- shippingType: z.ZodOptional<z.ZodEnum<{
218
- STANDARD: "STANDARD";
219
- COLD_CHAIN: "COLD_CHAIN";
220
- }>>;
221
- shippingFee: z.ZodOptional<z.ZodString>;
222
- lineItems: z.ZodOptional<z.ZodUnknown>;
223
- orderChangeNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
- counsellingRequired: z.ZodOptional<z.ZodBoolean>;
225
- confirmationSentAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
226
- hubspotContactId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
- createdByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
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 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
+ }
@@ -1,311 +1,22 @@
1
- import { z as e } from "zod";
2
- //#region validators.ts
3
- var t = [
4
- "PENDING",
5
- "RECEIVED",
6
- "ESCALATED"
7
- ], n = [
8
- "PENDING",
9
- "PROCESSING",
10
- "RESOLVED"
11
- ], r = ["INVOICE", "POS"], i = [
12
- "AWAITING_PAYMENT",
13
- "PAID",
14
- "PENDING_INVOICE"
15
- ], a = [
16
- "TODO1",
17
- "TODO2",
18
- "TODO3"
19
- ], o = [
20
- "HEATHERSHAWS",
21
- "PHARMACY",
22
- "PATIENT"
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.2",
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": "vite 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
  }