@natch-the-storage/heathershaw-platform-types 1.10.25 → 1.10.27

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.
@@ -1,13 +1,13 @@
1
- export declare const orderStatusValues: readonly ["received", "processing", "dispatched", "delivered", "completed"];
1
+ export declare const orderStatusValues: readonly ["RECEIVED", "PROCESSING", "DISPATCHED", "DELIVERED", "COMPLETED"];
2
2
  export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
3
3
  export declare const quoteStatusValues: readonly ["PENDING", "PROCESSING", "RESOLVED"];
4
- export declare const paymentModeAtOrderValues: readonly ["online", "invoice", "pos"];
5
- export declare const partnerPharmacyPaymentModeValues: readonly ["invoice", "pos"];
4
+ export declare const paymentModeAtOrderValues: readonly ["ONLINE", "INVOICE", "POS"];
5
+ export declare const partnerPharmacyPaymentModeValues: readonly ["INVOICE", "POS"];
6
6
  export declare const paymentStatusValues: readonly ["AWAITING_PAYMENT", "PAID", "PENDING_INVOICE"];
7
7
  export declare const repeatStorageValues: readonly ["HEATHERSHAWS", "PHARMACY", "PATIENT"];
8
- export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
9
- export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
10
- export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING"];
8
+ export declare const scriptTypeValues: readonly ["ERX", "PAPER"];
9
+ export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN", "SAME_DAY_COURIER"];
10
+ export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES_REP", "ALT_THERAPIES", "COMPOUNDING"];
11
11
  export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
12
12
  export declare const auStatesValues: string[];
13
13
  export declare const discountTierValues: number[];
@@ -174,8 +174,12 @@ export interface Order {
174
174
  hubspotContactId?: string;
175
175
  created: string;
176
176
  requiredDate: string;
177
+ draft: boolean;
177
178
  }
178
- export type OrderCreate = Omit<Order, 'id' | 'status' | 'created'>;
179
+ export type OrderCreate = Omit<Order, 'id' | 'status' | 'created'> & {
180
+ draft?: boolean;
181
+ };
182
+ export type OrderUpdate = Partial<Order>;
179
183
  export interface PaperScriptReminder {
180
184
  id: number;
181
185
  orderId?: number;
@@ -325,38 +329,26 @@ export interface Script {
325
329
  id: number;
326
330
  patientRecordId: number;
327
331
  partnerPharmacyProfileId?: number;
328
- uploaded: string;
329
332
  processed: boolean;
330
333
  token?: string | null;
331
334
  fileKey?: string | null;
332
335
  fileName?: string | null;
336
+ created: string;
333
337
  }
334
- export interface AdminScript {
335
- id: number;
336
- patientRecordId: number;
337
- partnerPharmacyProfileId?: number;
338
- uploaded: string;
339
- processed: boolean;
340
- token?: string | null;
341
- fileKey?: string | null;
342
- fileName?: string | null;
338
+ export type AdminScript = Script & {
343
339
  firstName: string;
344
340
  lastName: string;
345
341
  dateOfBirth: string;
346
342
  phone: string;
347
343
  email: string;
348
- }
349
- export interface EScriptCreate {
350
- patientRecordId: number;
351
- partnerPharmacyProfileId?: number;
344
+ };
345
+ export type EScriptCreate = Pick<Script, 'patientRecordId' | 'partnerPharmacyProfileId'> & {
352
346
  token: string;
353
- }
354
- export interface PaperScriptCreate {
355
- patientRecordId: number;
356
- partnerPharmacyProfileId?: number;
347
+ };
348
+ export type PaperScriptCreate = Pick<Script, 'patientRecordId' | 'partnerPharmacyProfileId'> & {
357
349
  fileKey: string;
358
350
  fileName: string;
359
- }
351
+ };
360
352
  export interface getScriptsQuery {
361
353
  patientRecordId?: number;
362
354
  partnerPharmacyProfileId?: number;
@@ -371,24 +363,14 @@ export interface StaffProfile {
371
363
  name: string;
372
364
  status: StaffProfileStatus;
373
365
  }
374
- export interface StaffProfileCreate {
375
- userId: string;
376
- role: StaffProfileRole;
377
- name: string;
378
- status: StaffProfileStatus;
379
- }
366
+ export type StaffProfileCreate = Omit<StaffProfile, 'id'>;
380
367
  /**
381
- * A union of the StaffProfile with the name, username and email fields from the user
368
+ * A union of the StaffProfile with the username and email fields from the user
382
369
  */
383
- export interface StaffProfileWithUser {
384
- id: number;
385
- userId: string;
386
- name: string;
387
- email: string;
370
+ export type StaffProfileWithUser = StaffProfile & {
388
371
  username: string;
389
- role: StaffProfileRole;
390
- status: StaffProfileStatus;
391
- }
372
+ email: string;
373
+ };
392
374
  export interface GetStaffProfilesQuery {
393
375
  page?: number;
394
376
  limit?: number;
@@ -401,11 +383,7 @@ export interface Cart {
401
383
  items: LineItem[];
402
384
  updatedAt: Date;
403
385
  }
404
- export interface CartUpdate {
405
- directUserProfileId?: number;
406
- partnerPharmacyProfileId?: number;
407
- items: LineItem[];
408
- }
386
+ export type CartUpdate = Omit<Cart, 'id' | 'updatedAt'>;
409
387
  export declare const CompoundDirectAnimalId: {
410
388
  readonly dog: {
411
389
  readonly id: 1;
@@ -694,6 +672,7 @@ export declare const ApiRoutes: {
694
672
  partnerPharmacyProfileId?: number;
695
673
  directUserProfileId?: number;
696
674
  patientRecordId?: number;
675
+ draft?: boolean;
697
676
  page?: number;
698
677
  limit?: number;
699
678
  }) => string;
@@ -1,10 +1,10 @@
1
1
  //#region Enum value arrays ──────────────────────────────────────────────────────────
2
2
  export const orderStatusValues = [
3
- 'received',
4
- 'processing',
5
- 'dispatched',
6
- 'delivered',
7
- 'completed',
3
+ 'RECEIVED',
4
+ 'PROCESSING',
5
+ 'DISPATCHED',
6
+ 'DELIVERED',
7
+ 'COMPLETED',
8
8
  ];
9
9
  export const paperScriptReminderStatusValues = [
10
10
  'PENDING',
@@ -12,8 +12,8 @@ export const paperScriptReminderStatusValues = [
12
12
  'ESCALATED',
13
13
  ];
14
14
  export const quoteStatusValues = ['PENDING', 'PROCESSING', 'RESOLVED'];
15
- export const paymentModeAtOrderValues = ['online', 'invoice', 'pos'];
16
- export const partnerPharmacyPaymentModeValues = ['invoice', 'pos'];
15
+ export const paymentModeAtOrderValues = ['ONLINE', 'INVOICE', 'POS'];
16
+ export const partnerPharmacyPaymentModeValues = ['INVOICE', 'POS'];
17
17
  export const paymentStatusValues = [
18
18
  'AWAITING_PAYMENT',
19
19
  'PAID',
@@ -24,14 +24,18 @@ export const repeatStorageValues = [
24
24
  'PHARMACY',
25
25
  'PATIENT',
26
26
  ];
27
- export const scriptTypeValues = ['eRx', 'PAPER'];
28
- export const shippingTypeValues = ['STANDARD', 'COLD_CHAIN'];
27
+ export const scriptTypeValues = ['ERX', 'PAPER'];
28
+ export const shippingTypeValues = [
29
+ 'STANDARD',
30
+ 'COLD_CHAIN',
31
+ 'SAME_DAY_COURIER',
32
+ ];
29
33
  export const staffProfileRoleValues = [
30
34
  'STAFF',
31
35
  'ADMIN',
32
36
  'COUNSELLING',
33
- 'SALES REP',
34
- 'ALT. THERAPIES',
37
+ 'SALES_REP',
38
+ 'ALT_THERAPIES',
35
39
  'COMPOUNDING',
36
40
  ];
37
41
  export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
@@ -189,6 +193,8 @@ export const ApiRoutes = {
189
193
  params.set('page', String(filters.page));
190
194
  if (filters?.limit)
191
195
  params.set('limit', String(filters.limit));
196
+ if (filters?.draft)
197
+ params.set('draft', String(filters.draft));
192
198
  const query = params.toString();
193
199
  return `/api/orders${query ? `?${query}` : ''}`;
194
200
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.10.25",
3
+ "version": "1.10.27",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",