@natch-the-storage/heathershaw-platform-types 1.18.14 → 1.18.15
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 +5 -1
- package/build/validators.js +7 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const cDProductCategoryIdValues: readonly ["schedule_1", "schedul
|
|
|
3
3
|
export declare const logItemTypeValues: readonly ["CREATED", "CREATED_PAID", "UPDATED", "UPDATED_DRAFT", "MARKED_FOR_PICKUP", "CANCELLED", "PAYMENT_LINK_PHONE", "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
|
-
export declare const orderTypeValues: readonly ["CG", "MC"];
|
|
6
|
+
export declare const orderTypeValues: readonly ["CG", "MC", "HS"];
|
|
7
7
|
export declare const patientRecordSubAccountRelationshipValues: readonly ["Child", "Spouse", "Parent", "Pet", "Other"];
|
|
8
8
|
export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
|
|
9
9
|
export declare const quoteStatusValues: readonly ["PENDING", "RESOLVED", "DECLINED"];
|
|
@@ -105,6 +105,10 @@ export declare function getAge(dateOfBirth: string): number;
|
|
|
105
105
|
* Formats an address object into a human readable format
|
|
106
106
|
*/
|
|
107
107
|
export declare function formatAddress(addr: Address): string;
|
|
108
|
+
/**
|
|
109
|
+
* Formats an address object into a human readable format
|
|
110
|
+
*/
|
|
111
|
+
export declare function formatOrderId(o: Pick<Order, 'id' | 'type'>): string;
|
|
108
112
|
export interface Address {
|
|
109
113
|
street: string;
|
|
110
114
|
suburb: string;
|
package/build/validators.js
CHANGED
|
@@ -46,6 +46,7 @@ export const orderStatusValues = [
|
|
|
46
46
|
export const orderTypeValues = [
|
|
47
47
|
'CG' /** compounding order */,
|
|
48
48
|
'MC' /** cannabis order */,
|
|
49
|
+
'HS' /** fallback */,
|
|
49
50
|
];
|
|
50
51
|
export const patientRecordSubAccountRelationshipValues = [
|
|
51
52
|
'Child',
|
|
@@ -292,6 +293,12 @@ export function getAge(dateOfBirth) {
|
|
|
292
293
|
export function formatAddress(addr) {
|
|
293
294
|
return `${addr.street}, ${addr.suburb} ${addr.state} ${addr.postcode}`;
|
|
294
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* Formats an address object into a human readable format
|
|
298
|
+
*/
|
|
299
|
+
export function formatOrderId(o) {
|
|
300
|
+
return `#${o.id}-${o.type ?? 'HS'}`;
|
|
301
|
+
}
|
|
295
302
|
//#endregion ──────────────────────────────────────────────────────────────────────
|
|
296
303
|
//#region compound direct ────────────────────────────────────────────────────────────
|
|
297
304
|
export const CDProductCategoriesIdLabel = cDProductCategoryIdValues.map((v, i) => {
|