@natch-the-storage/heathershaw-platform-types 1.7.4 → 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.
@@ -115,10 +115,10 @@ export interface Order {
115
115
  staff?: string;
116
116
  lineItems: LineItem[];
117
117
  orderChangeNotes?: string | null;
118
- paymentModeAtOrder?: PaymentModeAtOrder;
119
- paymentStatus?: PaymentStatus;
118
+ paymentModeAtOrder: PaymentModeAtOrder;
119
+ paymentStatus: PaymentStatus;
120
120
  shippingType?: ShippingType;
121
- shippingFee?: number;
121
+ shippingFee: number;
122
122
  total: number;
123
123
  counsellingRequired?: boolean;
124
124
  counsellingPriority?: string;
@@ -145,7 +145,7 @@ export interface OrderCreate {
145
145
  orderChangeNotes?: string | null;
146
146
  paymentModeAtOrder: PaymentModeAtOrder;
147
147
  paymentStatus: PaymentStatus;
148
- shippingType: ShippingType;
148
+ shippingType?: ShippingType;
149
149
  shippingFee: number;
150
150
  total: number;
151
151
  counsellingRequired?: boolean;
@@ -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;
@@ -616,7 +625,9 @@ export declare const ApiRoutes: {
616
625
  twilioStatus: string;
617
626
  send: string;
618
627
  };
619
- email: {};
628
+ email: {
629
+ contactFormInternal: string;
630
+ };
620
631
  cart: {
621
632
  get: (id: number) => string;
622
633
  put: string;
@@ -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',
@@ -141,7 +156,9 @@ export const ApiRoutes = {
141
156
  twilioStatus: '/api/webhooks/twilio/status',
142
157
  send: '/api/reminders/sms',
143
158
  },
144
- email: {},
159
+ email: {
160
+ contactFormInternal: '/api/emails/contact-requests',
161
+ },
145
162
  cart: {
146
163
  get: (id) => `/api/carts/${id}`,
147
164
  put: '/api/carts',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",