@natch-the-storage/heathershaw-platform-types 1.7.8 → 1.8.1

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.
@@ -119,6 +119,7 @@ export interface DirectUserProfileCreate {
119
119
  export interface Order {
120
120
  id: number;
121
121
  partnerPharmacyProfileId?: number | null;
122
+ patientRecordId?: number | null;
122
123
  directUserProfileId?: number | null;
123
124
  address: {
124
125
  type: string;
@@ -147,6 +148,7 @@ export interface Order {
147
148
  }
148
149
  export interface OrderCreate {
149
150
  partnerPharmacyProfileId?: number | null;
151
+ patientRecordId?: number | null;
150
152
  directUserProfileId?: number | null;
151
153
  address: {
152
154
  type: string;
@@ -567,7 +569,11 @@ export declare const BucketObjects: {
567
569
  };
568
570
  export declare const ApiRoutes: {
569
571
  orders: {
570
- list: string;
572
+ list: (filters?: {
573
+ partnerPharmacyProfileId?: number;
574
+ directUserProfileId?: number;
575
+ patientRecordId?: number;
576
+ }) => string;
571
577
  get: (id: number) => string;
572
578
  create: string;
573
579
  update: string;
@@ -81,7 +81,17 @@ export const BucketObjects = {
81
81
  };
82
82
  export const ApiRoutes = {
83
83
  orders: {
84
- list: '/api/orders',
84
+ list: (filters) => {
85
+ const params = new URLSearchParams();
86
+ if (filters?.partnerPharmacyProfileId)
87
+ params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
88
+ if (filters?.directUserProfileId)
89
+ params.set('directUserProfileId', String(filters.directUserProfileId));
90
+ if (filters?.patientRecordId)
91
+ params.set('patientRecordId', String(filters.patientRecordId));
92
+ const query = params.toString();
93
+ return `/api/orders${query ? `?${query}` : ''}`;
94
+ },
85
95
  get: (id) => `/api/orders/${id}`,
86
96
  create: '/api/orders',
87
97
  update: '/api/orders',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.7.8",
3
+ "version": "1.8.1",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",