@natch-the-storage/heathershaw-platform-types 1.9.3 → 1.9.4

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.
@@ -350,6 +350,10 @@ export interface PaperScriptCreate {
350
350
  partnerPharmacyProfileId?: number;
351
351
  fileKey: string;
352
352
  }
353
+ export interface getScriptsQuery {
354
+ patientRecordId?: number;
355
+ partnerPharmacyProfileId?: number;
356
+ }
353
357
  export interface Cart {
354
358
  id: number;
355
359
  directUserProfileId?: number;
@@ -546,7 +550,7 @@ export interface CDCustomerCreate {
546
550
  animalOwnerName?: string;
547
551
  }
548
552
  export interface CDCustomerSearch {
549
- name: string;
553
+ query: string;
550
554
  dobStartDate: string;
551
555
  dobEndDate: string;
552
556
  }
@@ -629,10 +633,8 @@ export declare const ApiRoutes: {
629
633
  };
630
634
  scripts: {
631
635
  list: string;
632
- get: (id: number, filters?: {
633
- partnerPharmacyProfileId?: number;
634
- patientRecordId?: number;
635
- }) => string;
636
+ get: (filters?: getScriptsQuery) => string;
637
+ getById: (id: number) => string;
636
638
  createEscript: string;
637
639
  createPaperScript: string;
638
640
  update: string;
@@ -102,15 +102,16 @@ export const ApiRoutes = {
102
102
  },
103
103
  scripts: {
104
104
  list: '/api/scripts',
105
- get: (id, filters) => {
105
+ get: (filters) => {
106
106
  const params = new URLSearchParams();
107
107
  if (filters?.partnerPharmacyProfileId)
108
108
  params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
109
109
  if (filters?.patientRecordId)
110
110
  params.set('patientRecordId', String(filters.patientRecordId));
111
111
  const query = params.toString();
112
- return `/api/scripts/${id}${query ? `?${query}` : ''}`;
112
+ return `/api/scripts/${query ? `?${query}` : ''}`;
113
113
  },
114
+ getById: (id) => `/api/scripts/${id}`,
114
115
  createEscript: '/api/scripts/escripts',
115
116
  createPaperScript: '/api/scripts/paper-scripts',
116
117
  update: '/api/scripts',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",