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

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
  }
@@ -628,11 +632,8 @@ export declare const ApiRoutes: {
628
632
  delete: (id: number) => string;
629
633
  };
630
634
  scripts: {
631
- list: string;
632
- get: (id: number, filters?: {
633
- partnerPharmacyProfileId?: number;
634
- patientRecordId?: number;
635
- }) => string;
635
+ get: (filters?: getScriptsQuery) => string;
636
+ getById: (id: number) => string;
636
637
  createEscript: string;
637
638
  createPaperScript: string;
638
639
  update: string;
@@ -101,16 +101,16 @@ export const ApiRoutes = {
101
101
  delete: (id) => `/api/patient-records/${id}`,
102
102
  },
103
103
  scripts: {
104
- list: '/api/scripts',
105
- get: (id, filters) => {
104
+ get: (filters) => {
106
105
  const params = new URLSearchParams();
107
106
  if (filters?.partnerPharmacyProfileId)
108
107
  params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
109
108
  if (filters?.patientRecordId)
110
109
  params.set('patientRecordId', String(filters.patientRecordId));
111
110
  const query = params.toString();
112
- return `/api/scripts/${id}${query ? `?${query}` : ''}`;
111
+ return `/api/scripts${query ? `/?${query}` : ''}`;
113
112
  },
113
+ getById: (id) => `/api/scripts/${id}`,
114
114
  createEscript: '/api/scripts/escripts',
115
115
  createPaperScript: '/api/scripts/paper-scripts',
116
116
  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.5",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",