@natch-the-storage/heathershaw-platform-types 1.11.8 → 1.12.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.
- package/build/validators.d.ts +11 -7
- package/build/validators.js +10 -4
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
id: string;
|
|
4
|
-
label: CDProductCategory;
|
|
5
|
-
}[];
|
|
1
|
+
export declare const cDProductCategoryLabelValues: string[];
|
|
2
|
+
export declare const cDProductCategoryIdValues: string[];
|
|
6
3
|
export declare const orderFulfillmentValues: readonly ["PICKUP", "POST", "COURIER", "DELIVER"];
|
|
7
4
|
export declare const orderStatusValues: readonly ["RECEIVED", "PROCESSING", "DISPATCHED", "DELIVERED", "COMPLETED"];
|
|
8
5
|
export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
|
|
@@ -17,7 +14,8 @@ export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSE
|
|
|
17
14
|
export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
|
|
18
15
|
export declare const auStatesValues: string[];
|
|
19
16
|
export declare const discountTierValues: number[];
|
|
20
|
-
export type
|
|
17
|
+
export type CDProductCategoryId = (typeof cDProductCategoryIdValues)[number];
|
|
18
|
+
export type CDProductCategoryLabel = (typeof cDProductCategoryLabelValues)[number];
|
|
21
19
|
export type OrderFulfillment = (typeof orderFulfillmentValues)[number];
|
|
22
20
|
export type OrderStatus = (typeof orderStatusValues)[number];
|
|
23
21
|
export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
|
|
@@ -402,6 +400,10 @@ export interface Cart {
|
|
|
402
400
|
updatedAt: Date;
|
|
403
401
|
}
|
|
404
402
|
export type CartUpdate = Omit<Cart, 'id' | 'updatedAt'>;
|
|
403
|
+
export declare const CDProductCategoriesIdLabel: {
|
|
404
|
+
id: CDProductCategoryId;
|
|
405
|
+
label: CDProductCategoryLabel;
|
|
406
|
+
}[];
|
|
405
407
|
export declare const CompoundDirectAnimalId: {
|
|
406
408
|
readonly dog: {
|
|
407
409
|
readonly id: 1;
|
|
@@ -632,7 +634,8 @@ export interface CDFormulationList {
|
|
|
632
634
|
}
|
|
633
635
|
export type CDProduct = Omit<CDFormulation, 'pricing'> & Omit<CDScriptPriceOption, 'id'> & {
|
|
634
636
|
pricingId: number;
|
|
635
|
-
category:
|
|
637
|
+
category: CDProductCategoryId;
|
|
638
|
+
categoryLabel: CDProductCategoryLabel;
|
|
636
639
|
};
|
|
637
640
|
export declare const CDProductFormsIdLabels: {
|
|
638
641
|
id: string;
|
|
@@ -688,6 +691,7 @@ export declare const ApiRoutes: {
|
|
|
688
691
|
getDraftScriptById: (id: number) => string;
|
|
689
692
|
getHouseholdDraftScripts: string;
|
|
690
693
|
listFormulations: string;
|
|
694
|
+
listProducts: string;
|
|
691
695
|
getFormulationById: (id: number) => string;
|
|
692
696
|
updatePriceOptions: string;
|
|
693
697
|
};
|
package/build/validators.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
//#region Enum value arrays ──────────────────────────────────────────────────────────
|
|
2
|
-
export const
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export const cDProductCategoryLabelValues = ['OTC', 'Schedule 4', 'Schedule 8'];
|
|
3
|
+
export const cDProductCategoryIdValues = [
|
|
4
|
+
'schedule_1',
|
|
5
|
+
'schedule_4',
|
|
6
|
+
'schedule_8',
|
|
7
|
+
];
|
|
6
8
|
export const orderFulfillmentValues = [
|
|
7
9
|
'PICKUP',
|
|
8
10
|
'POST',
|
|
@@ -100,6 +102,9 @@ export const PHARMACIES = [
|
|
|
100
102
|
];
|
|
101
103
|
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
102
104
|
//#region compound direct ────────────────────────────────────────────────────────────
|
|
105
|
+
export const CDProductCategoriesIdLabel = cDProductCategoryIdValues.map((v, i) => {
|
|
106
|
+
return { id: v, label: cDProductCategoryLabelValues[i] };
|
|
107
|
+
});
|
|
103
108
|
export const CompoundDirectAnimalId = {
|
|
104
109
|
dog: { id: 1, name: 'Dog' },
|
|
105
110
|
cat: { id: 2, name: 'Cat' },
|
|
@@ -205,6 +210,7 @@ export const ApiRoutes = {
|
|
|
205
210
|
getDraftScriptById: (id) => `/api/compound-direct/draft-scripts/${id}`,
|
|
206
211
|
getHouseholdDraftScripts: '/api/compound-direct/scripts/households',
|
|
207
212
|
listFormulations: '/api/compound-direct/formulations',
|
|
213
|
+
listProducts: '/api/compound-direct/products',
|
|
208
214
|
getFormulationById: (id) => `/api/compound-direct/formulations/${id}`,
|
|
209
215
|
updatePriceOptions: '/api/compound-direct/formulations/prices',
|
|
210
216
|
},
|