@natch-the-storage/heathershaw-platform-types 1.16.10 → 1.17.1

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.
@@ -317,18 +317,33 @@ export interface PatientRecord {
317
317
  animalSpecies?: string;
318
318
  relationship?: string | null;
319
319
  active: boolean;
320
+ consentToken?: string | null;
320
321
  }
321
- export type PatientRecordCreate = Omit<PatientRecord, 'id' | 'active'> & {
322
+ export type PatientRecordCreate = Omit<PatientRecord, 'id' | 'active' | 'consentToken'> & {
322
323
  active?: boolean;
323
324
  };
324
325
  export type PatientRecordUpdate = Partial<PatientRecord> & {
325
326
  id: number;
326
327
  };
327
- export type PatientRecordConsent = Pick<PatientRecord, 'id' | 'firstName' | 'lastName' | 'relationship'> & {
328
- newId: number;
328
+ export type PatientRecordConsent = Pick<PatientRecord, 'id'> & {
329
+ newPatientId: number;
329
330
  phoneNumber?: string;
330
331
  email?: string;
331
332
  };
333
+ export interface PatientRecordAuthorisationData {
334
+ owner: {
335
+ id: number;
336
+ firstName: string;
337
+ lastName: string;
338
+ };
339
+ subaccount: {
340
+ id: number;
341
+ firstName: string;
342
+ };
343
+ }
344
+ export interface PatientRecordHandleAuthorisationBody {
345
+ rejected: boolean;
346
+ }
332
347
  export interface PriceMatch {
333
348
  id: number;
334
349
  partnerPharmacyProfileId: number;
@@ -943,10 +958,9 @@ export declare const ApiRoutes: {
943
958
  create: string;
944
959
  update: string;
945
960
  delete: (id: number) => string;
946
- consent: string;
947
- activate: string;
948
- isActive: (id: number) => string;
949
- declineConsent: string;
961
+ authorisationNotification: string;
962
+ getAuthorisationData: (token: string) => string;
963
+ handleAuthorisation: (token: string) => string;
950
964
  };
951
965
  priceMatches: {
952
966
  list: (filters?: {
@@ -324,10 +324,9 @@ export const ApiRoutes = {
324
324
  create: '/api/patient-records',
325
325
  update: '/api/patient-records',
326
326
  delete: (id) => `/api/patient-records/${id}`,
327
- consent: '/api/notifications/patient-records',
328
- activate: '/api/patient-records/activate',
329
- isActive: (id) => `/api/patient-records/${id}/active`,
330
- declineConsent: '/api/patient-records/decline-consent',
327
+ authorisationNotification: '/api/notifications/patient-records',
328
+ getAuthorisationData: (token) => `/api/patient-records/authorisation-tokens/${token}`,
329
+ handleAuthorisation: (token) => `/api/patient-records/authorisation-tokens/${token}`,
331
330
  },
332
331
  priceMatches: {
333
332
  list: (filters) => `/api/price-matches${handleParams(filters)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.16.10",
3
+ "version": "1.17.1",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",