@natch-the-storage/heathershaw-platform-types 1.7.7 → 1.8.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.
@@ -91,6 +91,22 @@ export interface Sms {
91
91
  to: string;
92
92
  from: string;
93
93
  }
94
+ export interface User {
95
+ id: string;
96
+ name: string;
97
+ email: string;
98
+ emailVerified: boolean;
99
+ phoneNumber: string;
100
+ phoneNumberVerified: boolean;
101
+ image?: string;
102
+ createdAt: Date;
103
+ updatedAt: Date;
104
+ role: string;
105
+ banned?: boolean;
106
+ banReason?: string;
107
+ banExpires?: Date;
108
+ onboarded: boolean;
109
+ }
94
110
  export interface DirectUserProfile {
95
111
  id: number;
96
112
  userId?: string;
@@ -103,6 +119,7 @@ export interface DirectUserProfileCreate {
103
119
  export interface Order {
104
120
  id: number;
105
121
  partnerPharmacyProfileId?: number | null;
122
+ patientRecordId?: number | null;
106
123
  directUserProfileId?: number | null;
107
124
  address: {
108
125
  type: string;
@@ -131,6 +148,7 @@ export interface Order {
131
148
  }
132
149
  export interface OrderCreate {
133
150
  partnerPharmacyProfileId?: number | null;
151
+ patientRecordId?: number | null;
134
152
  directUserProfileId?: number | null;
135
153
  address: {
136
154
  type: string;
@@ -188,7 +206,7 @@ export interface PartnerPharmacyProfile {
188
206
  paymentMode?: PaymentModeAtOrder;
189
207
  remindersEnabled?: boolean;
190
208
  priceMatches?: unknown;
191
- dispatchAddress?: Address[];
209
+ addresses?: Address[];
192
210
  orders?: unknown;
193
211
  xeroContactId?: string | null;
194
212
  }
@@ -202,7 +220,7 @@ export interface PartnerPharmacyProfileCreate {
202
220
  paymentMode: PaymentModeAtOrder;
203
221
  remindersEnabled?: boolean;
204
222
  priceMatches?: unknown;
205
- dispatchAddress?: Address[];
223
+ addresses?: Address[];
206
224
  orders?: unknown;
207
225
  xeroContactId?: string | null;
208
226
  }
@@ -217,7 +235,7 @@ export interface PatientRecord {
217
235
  dateOfBirth?: string;
218
236
  medicareNumber?: string | null;
219
237
  phone?: string;
220
- address?: Address[];
238
+ addresses?: Address[];
221
239
  healthInfo?: HealthInfo;
222
240
  reminderEnabled?: boolean;
223
241
  scripts?: ScriptSelect[];
@@ -235,7 +253,7 @@ export interface PatientRecordCreate {
235
253
  compoundDirectId?: number | null;
236
254
  userId?: string | null;
237
255
  medicareNumber?: string | null;
238
- address?: Address[];
256
+ addresses?: Address[];
239
257
  healthInfo?: HealthInfo;
240
258
  reminderEnabled?: boolean;
241
259
  scripts?: ScriptSelect[];
@@ -530,6 +548,7 @@ export interface CDCustomerSearch {
530
548
  export declare const parseCategory: (category: string) => "Order or delivery" | "Prescription" | "Profile or account" | "Compounding" | "General";
531
549
  export interface ContactFormInternalCreate {
532
550
  category: string;
551
+ pharmacyName?: string;
533
552
  name: string;
534
553
  email: string;
535
554
  phone?: string;
@@ -551,7 +570,11 @@ export declare const BucketObjects: {
551
570
  export declare const ApiRoutes: {
552
571
  orders: {
553
572
  list: string;
554
- get: (id: number) => string;
573
+ get: (id: number, filters?: {
574
+ partnerPharmacyProfileId?: number;
575
+ directUserProfileId?: number;
576
+ patientRecordId?: number;
577
+ }) => string;
555
578
  create: string;
556
579
  update: string;
557
580
  delete: (id: number) => string;
@@ -82,7 +82,17 @@ export const BucketObjects = {
82
82
  export const ApiRoutes = {
83
83
  orders: {
84
84
  list: '/api/orders',
85
- get: (id) => `/api/orders/${id}`,
85
+ get: (id, filters) => {
86
+ const params = new URLSearchParams();
87
+ if (filters?.partnerPharmacyProfileId)
88
+ params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
89
+ if (filters?.directUserProfileId)
90
+ params.set('directUserProfileId', String(filters.directUserProfileId));
91
+ if (filters?.patientRecordId)
92
+ params.set('patientRecordId', String(filters.patientRecordId));
93
+ const query = params.toString();
94
+ return `/api/orders/${id}${query ? `?${query}` : ''}`;
95
+ },
86
96
  create: '/api/orders',
87
97
  update: '/api/orders',
88
98
  delete: (id) => `/api/orders/${id}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.7.7",
3
+ "version": "1.8.0",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",