@natch-the-storage/heathershaw-platform-types 1.10.5 → 1.10.7

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.
@@ -5,7 +5,7 @@ export declare const paymentStatusValues: readonly ["AWAITING_PAYMENT", "PAID",
5
5
  export declare const repeatStorageValues: readonly ["HEATHERSHAWS", "PHARMACY", "PATIENT"];
6
6
  export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
7
7
  export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
8
- export declare const staffProfileRoleValues: readonly ["ADMIN", "STAFF"];
8
+ export declare const staffProfileRoleValues: readonly ["ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING", "STAFF"];
9
9
  export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
10
10
  export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
11
11
  export type QuoteStatus = (typeof quoteStatusValues)[number];
@@ -102,6 +102,8 @@ export interface User {
102
102
  emailVerified: boolean;
103
103
  phoneNumber: string;
104
104
  phoneNumberVerified: boolean;
105
+ username?: string;
106
+ displayUsername?: string;
105
107
  image?: string;
106
108
  createdAt: Date;
107
109
  updatedAt: Date;
@@ -381,31 +383,32 @@ export interface getScriptsQuery {
381
383
  patientRecordId?: number;
382
384
  partnerPharmacyProfileId?: number;
383
385
  }
386
+ /**
387
+ * The base StaffProfile object
388
+ */
384
389
  export interface StaffProfile {
385
390
  id: number;
386
391
  userId: string;
387
- name: string;
388
- email: string;
389
- userName: string;
390
392
  role: StaffProfileRole;
391
393
  status: StaffProfileStatus;
392
394
  }
393
395
  export interface StaffProfileCreate {
396
+ userId: string;
397
+ role: StaffProfileRole;
398
+ status: StaffProfileStatus;
399
+ }
400
+ /**
401
+ * A union of the StaffProfile with the name, username and email fields from the user
402
+ */
403
+ export interface StaffProfileSelect {
404
+ id: number;
394
405
  userId: string;
395
406
  name: string;
396
407
  email: string;
397
- userName: string;
398
- password: string;
408
+ username: string;
399
409
  role: StaffProfileRole;
400
410
  status: StaffProfileStatus;
401
411
  }
402
- export interface UpdateStaffProfilePassword {
403
- newPassword: string;
404
- }
405
- export interface StaffProfileSignIn {
406
- userName: string;
407
- password: string;
408
- }
409
412
  export interface GetStaffProfilesQuery {
410
413
  page?: number;
411
414
  limit?: number;
@@ -782,11 +785,10 @@ export declare const ApiRoutes: {
782
785
  get: (id: number) => string;
783
786
  create: string;
784
787
  update: string;
785
- updatePassword: (id: number) => string;
786
- signIn: string;
787
788
  };
788
789
  uploads: {
789
790
  presign: string;
791
+ getFile: (key: string) => string;
790
792
  delete: string;
791
793
  };
792
794
  users: {
@@ -18,7 +18,14 @@ export const repeatStorageValues = [
18
18
  ];
19
19
  export const scriptTypeValues = ['eRx', 'PAPER'];
20
20
  export const shippingTypeValues = ['STANDARD', 'COLD_CHAIN'];
21
- export const staffProfileRoleValues = ['ADMIN', 'STAFF'];
21
+ export const staffProfileRoleValues = [
22
+ 'ADMIN',
23
+ 'COUNSELLING',
24
+ 'SALES REP',
25
+ 'ALT. THERAPIES',
26
+ 'COMPOUNDING',
27
+ 'STAFF',
28
+ ];
22
29
  export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
23
30
  // ─── Compound Direct ────────────────────────────────────────────────────────────
24
31
  export const CompoundDirectAnimalId = {
@@ -212,11 +219,10 @@ export const ApiRoutes = {
212
219
  get: (id) => `/api/profiles/staff-profiles/${id}`,
213
220
  create: '/api/profiles/staff-profiles',
214
221
  update: '/api/profiles/staff-profiles',
215
- updatePassword: (id) => `/api/profiles/staff-profiles/${id}/password`,
216
- signIn: '/api/profiles/staff-profiles/sign-in',
217
222
  },
218
223
  uploads: {
219
224
  presign: '/api/uploads/presign',
225
+ getFile: (key) => `/api/uploads/presign${key ? '?key=' + key : ''}`,
220
226
  delete: '/api/uploads',
221
227
  },
222
228
  users: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.10.5",
3
+ "version": "1.10.7",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",