@natch-the-storage/heathershaw-platform-types 1.7.8 → 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.
- package/build/validators.d.ts +7 -1
- package/build/validators.js +11 -1
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -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;
|
|
@@ -568,7 +570,11 @@ export declare const BucketObjects: {
|
|
|
568
570
|
export declare const ApiRoutes: {
|
|
569
571
|
orders: {
|
|
570
572
|
list: string;
|
|
571
|
-
get: (id: number
|
|
573
|
+
get: (id: number, filters?: {
|
|
574
|
+
partnerPharmacyProfileId?: number;
|
|
575
|
+
directUserProfileId?: number;
|
|
576
|
+
patientRecordId?: number;
|
|
577
|
+
}) => string;
|
|
572
578
|
create: string;
|
|
573
579
|
update: string;
|
|
574
580
|
delete: (id: number) => string;
|
package/build/validators.js
CHANGED
|
@@ -82,7 +82,17 @@ export const BucketObjects = {
|
|
|
82
82
|
export const ApiRoutes = {
|
|
83
83
|
orders: {
|
|
84
84
|
list: '/api/orders',
|
|
85
|
-
get: (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}`,
|