@natch-the-storage/heathershaw-platform-types 1.7.5 → 1.7.6
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 +9 -0
- package/build/validators.js +15 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -527,6 +527,15 @@ export interface CDCustomerSearch {
|
|
|
527
527
|
email: string;
|
|
528
528
|
phone: string;
|
|
529
529
|
}
|
|
530
|
+
export declare const parseCategory: (category: string) => "Order or delivery" | "Prescription" | "Profile or account" | "Compounding" | "General";
|
|
531
|
+
export interface ContactFormInternalCreate {
|
|
532
|
+
category: string;
|
|
533
|
+
name: string;
|
|
534
|
+
email: string;
|
|
535
|
+
phone?: string;
|
|
536
|
+
orderNumber?: string;
|
|
537
|
+
message: string;
|
|
538
|
+
}
|
|
530
539
|
export declare const ApiRoutes: {
|
|
531
540
|
orders: {
|
|
532
541
|
list: string;
|
package/build/validators.js
CHANGED
|
@@ -52,6 +52,21 @@ export const CompoundDirectAnimalId = {
|
|
|
52
52
|
monkey: { id: 24, name: 'Monkey' },
|
|
53
53
|
};
|
|
54
54
|
export const AnimalSpeciesKeys = Object.keys(CompoundDirectAnimalId);
|
|
55
|
+
// contact form
|
|
56
|
+
export const parseCategory = (category) => {
|
|
57
|
+
switch (category) {
|
|
58
|
+
case 'orderOrDelivery':
|
|
59
|
+
return 'Order or delivery';
|
|
60
|
+
case 'prescription':
|
|
61
|
+
return 'Prescription';
|
|
62
|
+
case 'profileOrAccount':
|
|
63
|
+
return 'Profile or account';
|
|
64
|
+
case 'compounding':
|
|
65
|
+
return 'Compounding';
|
|
66
|
+
default:
|
|
67
|
+
return 'General';
|
|
68
|
+
}
|
|
69
|
+
};
|
|
55
70
|
export const ApiRoutes = {
|
|
56
71
|
orders: {
|
|
57
72
|
list: '/api/orders',
|