@natch-the-storage/heathershaw-platform-types 1.16.2 → 1.16.4
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 +8 -9
- package/build/validators.js +8 -2
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const cDProductCategoryLabelValues:
|
|
2
|
-
export declare const cDProductCategoryIdValues:
|
|
3
|
-
export declare const logItemTypeValues:
|
|
1
|
+
export declare const cDProductCategoryLabelValues: readonly ["OTC", "Schedule 4", "Schedule 8"];
|
|
2
|
+
export declare const cDProductCategoryIdValues: readonly ["schedule_1", "schedule_4", "schedule_8"];
|
|
3
|
+
export declare const logItemTypeValues: readonly ["CREATED", "DRAFTED", "CREATED_PAID", "UPDATED", "UPDATED_DRAFT", "PAYMENT_LINK_SMS", "PAYMENT_LINK_EMAIL", "PAYMENT_LINK_BOTH", "PARTNER_ORDERED_INVOICE", "PARTNER_ORDERED_POS", "PAID", "MARKED_PAID", "PAYMENT_LINK_PAID"];
|
|
4
4
|
export declare const orderFulfillmentValues: readonly ["PICKUP", "POST", "COURIER", "DELIVER"];
|
|
5
5
|
export declare const orderStatusValues: readonly ["TO_REVIEW", "AWAITING_PICKUP", "POSTED", "IN_TRANSIT", "DELIVERED", "COLLECTED", "CANCELLED"];
|
|
6
6
|
export declare const patientRecordSubAccountRelationshipValues: readonly ["Child", "Spouse", "Parent", "Pet", "Other"];
|
|
@@ -15,8 +15,8 @@ export declare const scriptTypeValues: readonly ["ERX", "PAPER"];
|
|
|
15
15
|
export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN", "SAME_DAY_COURIER"];
|
|
16
16
|
export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSELLING", "SALES_REP", "ALT_THERAPIES", "COMPOUNDING"];
|
|
17
17
|
export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
|
|
18
|
-
export declare const auStatesValues:
|
|
19
|
-
export declare const discountTierValues:
|
|
18
|
+
export declare const auStatesValues: readonly ["VIC", "NSW", "QLD", "WA", "SA", "TAS", "ACT", "NT"];
|
|
19
|
+
export declare const discountTierValues: readonly [0.9, 0.88, 0.875, 0.85, 0.8, 0.75, 0.7];
|
|
20
20
|
export type CDProductCategoryId = (typeof cDProductCategoryIdValues)[number];
|
|
21
21
|
export type CDProductCategoryLabel = (typeof cDProductCategoryLabelValues)[number];
|
|
22
22
|
export type LogItemType = (typeof logItemTypeValues)[number];
|
|
@@ -214,13 +214,12 @@ export interface Order {
|
|
|
214
214
|
draft: boolean;
|
|
215
215
|
reasonMarkedPaid?: string;
|
|
216
216
|
paymentLinkToken?: string;
|
|
217
|
+
log: LogItem[];
|
|
217
218
|
}
|
|
218
|
-
export type OrderCreate = Omit<Order, 'id' | 'status' | 'created' | 'draft' | 'paymentLinkToken'> & {
|
|
219
|
+
export type OrderCreate = Omit<Order, 'id' | 'status' | 'created' | 'draft' | 'paymentLinkToken' | 'log'> & {
|
|
219
220
|
draft?: boolean;
|
|
220
221
|
};
|
|
221
|
-
export type OrderUpdate = Partial<Order> &
|
|
222
|
-
id: number;
|
|
223
|
-
};
|
|
222
|
+
export type OrderUpdate = Partial<Order> & Pick<Order, 'id'>;
|
|
224
223
|
export interface OrderAddress {
|
|
225
224
|
fulfillment: OrderFulfillment;
|
|
226
225
|
name: string;
|
package/build/validators.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region Enum value arrays ──────────────────────────────────────────────────────────
|
|
2
|
-
export const cDProductCategoryLabelValues = [
|
|
2
|
+
export const cDProductCategoryLabelValues = [
|
|
3
|
+
'OTC',
|
|
4
|
+
'Schedule 4',
|
|
5
|
+
'Schedule 8',
|
|
6
|
+
];
|
|
3
7
|
// don't touch, this is how they exist in Compound Direct
|
|
4
8
|
export const cDProductCategoryIdValues = [
|
|
5
9
|
'schedule_1',
|
|
@@ -88,7 +92,9 @@ export const auStatesValues = [
|
|
|
88
92
|
'ACT',
|
|
89
93
|
'NT',
|
|
90
94
|
];
|
|
91
|
-
export const discountTierValues = [
|
|
95
|
+
export const discountTierValues = [
|
|
96
|
+
0.9, 0.88, 0.875, 0.85, 0.8, 0.75, 0.7,
|
|
97
|
+
];
|
|
92
98
|
export const PHARMACIES = [
|
|
93
99
|
{
|
|
94
100
|
name: 'Malvern Road',
|