@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.
- package/build/validators.d.ts +4 -4
- package/build/validators.js +5 -5
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -569,19 +569,19 @@ export declare const BucketObjects: {
|
|
|
569
569
|
};
|
|
570
570
|
export declare const ApiRoutes: {
|
|
571
571
|
orders: {
|
|
572
|
-
list:
|
|
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
|
|
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;
|
package/build/validators.js
CHANGED
|
@@ -81,8 +81,7 @@ export const BucketObjects = {
|
|
|
81
81
|
};
|
|
82
82
|
export const ApiRoutes = {
|
|
83
83
|
orders: {
|
|
84
|
-
list:
|
|
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
|
|
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
|
|
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',
|