@natch-the-storage/heathershaw-platform-types 1.8.0 → 1.8.2

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.
@@ -569,19 +569,19 @@ export declare const BucketObjects: {
569
569
  };
570
570
  export declare const ApiRoutes: {
571
571
  orders: {
572
- list: string;
573
- get: (id: number, filters?: {
572
+ list: (filters?: {
574
573
  partnerPharmacyProfileId?: number;
575
574
  directUserProfileId?: number;
576
575
  patientRecordId?: number;
577
576
  }) => string;
577
+ get: (id: number) => string;
578
578
  create: string;
579
579
  update: string;
580
580
  delete: (id: number) => string;
581
581
  };
582
582
  patientRecords: {
583
- list: string;
584
- get: (id?: number, type?: "partner" | "direct") => string;
583
+ list: (id?: number, type?: "partner" | "direct") => string;
584
+ get: (id: number) => string;
585
585
  getByUser: (userId: string) => string;
586
586
  create: string;
587
587
  update: string;
@@ -81,8 +81,7 @@ export const BucketObjects = {
81
81
  };
82
82
  export const ApiRoutes = {
83
83
  orders: {
84
- list: '/api/orders',
85
- get: (id, filters) => {
84
+ list: (filters) => {
86
85
  const params = new URLSearchParams();
87
86
  if (filters?.partnerPharmacyProfileId)
88
87
  params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
@@ -91,15 +90,16 @@ export const ApiRoutes = {
91
90
  if (filters?.patientRecordId)
92
91
  params.set('patientRecordId', String(filters.patientRecordId));
93
92
  const query = params.toString();
94
- return `/api/orders/${id}${query ? `?${query}` : ''}`;
93
+ return `/api/orders${query ? `?${query}` : ''}`;
95
94
  },
95
+ get: (id) => `/api/orders/${id}`,
96
96
  create: '/api/orders',
97
97
  update: '/api/orders',
98
98
  delete: (id) => `/api/orders/${id}`,
99
99
  },
100
100
  patientRecords: {
101
- list: '/api/patient-records',
102
- get: (id, type) => '/api/patient-records' + `${type ? '?' + type + '=' + id : ''}`,
101
+ list: (id, type) => '/api/patient-records' + `${type ? '?' + type + '=' + id : ''}`,
102
+ get: (id) => `/api/patient-records/${id}`,
103
103
  getByUser: (userId) => `/api/patient-records/user/${userId}`,
104
104
  create: '/api/patient-records',
105
105
  update: '/api/patient-records',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",