@natch-the-storage/heathershaw-platform-types 1.10.6 → 1.10.8
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 +19 -15
- package/build/validators.js +11 -5
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -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", "
|
|
8
|
+
export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES REP", "ALT. THERAPIES", "COMPOUNDING"];
|
|
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,34 @@ 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;
|
|
393
|
+
name: string;
|
|
391
394
|
status: StaffProfileStatus;
|
|
392
395
|
}
|
|
393
396
|
export interface StaffProfileCreate {
|
|
397
|
+
userId: string;
|
|
398
|
+
role: StaffProfileRole;
|
|
399
|
+
name: string;
|
|
400
|
+
status: StaffProfileStatus;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* A union of the StaffProfile with the name, username and email fields from the user
|
|
404
|
+
*/
|
|
405
|
+
export interface StaffProfileWithUser {
|
|
406
|
+
id: number;
|
|
394
407
|
userId: string;
|
|
395
408
|
name: string;
|
|
396
409
|
email: string;
|
|
397
|
-
|
|
398
|
-
password: string;
|
|
410
|
+
username: string;
|
|
399
411
|
role: StaffProfileRole;
|
|
400
412
|
status: StaffProfileStatus;
|
|
401
413
|
}
|
|
402
|
-
export interface UpdateStaffProfilePassword {
|
|
403
|
-
newPassword: string;
|
|
404
|
-
}
|
|
405
|
-
export interface StaffProfileSignIn {
|
|
406
|
-
userName: string;
|
|
407
|
-
password: string;
|
|
408
|
-
}
|
|
409
414
|
export interface GetStaffProfilesQuery {
|
|
410
415
|
page?: number;
|
|
411
416
|
limit?: number;
|
|
@@ -780,10 +785,9 @@ export declare const ApiRoutes: {
|
|
|
780
785
|
limit?: number;
|
|
781
786
|
}) => string;
|
|
782
787
|
get: (id: number) => string;
|
|
788
|
+
getByUser: (userId: string) => string;
|
|
783
789
|
create: string;
|
|
784
790
|
update: string;
|
|
785
|
-
updatePassword: (id: number) => string;
|
|
786
|
-
signIn: string;
|
|
787
791
|
};
|
|
788
792
|
uploads: {
|
|
789
793
|
presign: string;
|
package/build/validators.js
CHANGED
|
@@ -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 = [
|
|
21
|
+
export const staffProfileRoleValues = [
|
|
22
|
+
'STAFF',
|
|
23
|
+
'ADMIN',
|
|
24
|
+
'COUNSELLING',
|
|
25
|
+
'SALES REP',
|
|
26
|
+
'ALT. THERAPIES',
|
|
27
|
+
'COMPOUNDING',
|
|
28
|
+
];
|
|
22
29
|
export const staffProfileStatusValues = ['ACTIVE', 'SUSPENDED'];
|
|
23
30
|
// ─── Compound Direct ────────────────────────────────────────────────────────────
|
|
24
31
|
export const CompoundDirectAnimalId = {
|
|
@@ -140,7 +147,7 @@ export const ApiRoutes = {
|
|
|
140
147
|
partnerPharmacyProfiles: {
|
|
141
148
|
list: '/api/profiles/partner-pharmacies',
|
|
142
149
|
get: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
143
|
-
getByUser: (userId) => `/api/profiles/partner-pharmacies/
|
|
150
|
+
getByUser: (userId) => `/api/profiles/partner-pharmacies/users/${userId}`,
|
|
144
151
|
create: '/api/profiles/partner-pharmacies',
|
|
145
152
|
update: '/api/profiles/partner-pharmacies',
|
|
146
153
|
delete: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
@@ -149,7 +156,7 @@ export const ApiRoutes = {
|
|
|
149
156
|
patientRecords: {
|
|
150
157
|
list: (id, type) => '/api/patient-records' + `${type ? '?' + type + '=' + id : ''}`,
|
|
151
158
|
get: (id) => `/api/patient-records/${id}`,
|
|
152
|
-
getByUser: (userId) => `/api/patient-records/
|
|
159
|
+
getByUser: (userId) => `/api/patient-records/users/${userId}`,
|
|
153
160
|
create: '/api/patient-records',
|
|
154
161
|
update: '/api/patient-records',
|
|
155
162
|
delete: (id) => `/api/patient-records/${id}`,
|
|
@@ -210,10 +217,9 @@ export const ApiRoutes = {
|
|
|
210
217
|
return `/api/profiles/staff-profiles${query ? `?${query}` : ''}`;
|
|
211
218
|
},
|
|
212
219
|
get: (id) => `/api/profiles/staff-profiles/${id}`,
|
|
220
|
+
getByUser: (userId) => `/api/profiles/staff-profiles/users/${userId}`,
|
|
213
221
|
create: '/api/profiles/staff-profiles',
|
|
214
222
|
update: '/api/profiles/staff-profiles',
|
|
215
|
-
updatePassword: (id) => `/api/profiles/staff-profiles/${id}/password`,
|
|
216
|
-
signIn: '/api/profiles/staff-profiles/sign-in',
|
|
217
223
|
},
|
|
218
224
|
uploads: {
|
|
219
225
|
presign: '/api/uploads/presign',
|