@natch-the-storage/heathershaw-platform-types 1.18.15 → 1.18.17

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.
@@ -109,6 +109,8 @@ export declare function formatAddress(addr: Address): string;
109
109
  * Formats an address object into a human readable format
110
110
  */
111
111
  export declare function formatOrderId(o: Pick<Order, 'id' | 'type'>): string;
112
+ /** Formats a number into a price string */
113
+ export declare function formatPrice(n: number): string;
112
114
  export interface Address {
113
115
  street: string;
114
116
  suburb: string;
@@ -1007,12 +1009,10 @@ export declare const ApiRoutes: {
1007
1009
  update: string;
1008
1010
  delete: (id: number) => string;
1009
1011
  };
1010
- email: {
1011
- contactFormInternal: string;
1012
- };
1013
1012
  notifications: {
1014
1013
  createPaymentLink: string;
1015
1014
  quoteReadyNotification: string;
1015
+ contactFormNotification: string;
1016
1016
  };
1017
1017
  orders: {
1018
1018
  list: (filters?: ListParams & {
@@ -299,6 +299,10 @@ export function formatAddress(addr) {
299
299
  export function formatOrderId(o) {
300
300
  return `#${o.id}-${o.type ?? 'HS'}`;
301
301
  }
302
+ /** Formats a number into a price string */
303
+ export function formatPrice(n) {
304
+ return `$${n.toFixed(2)}`;
305
+ }
302
306
  //#endregion ──────────────────────────────────────────────────────────────────────
303
307
  //#region compound direct ────────────────────────────────────────────────────────────
304
308
  export const CDProductCategoriesIdLabel = cDProductCategoryIdValues.map((v, i) => {
@@ -436,12 +440,10 @@ export const ApiRoutes = {
436
440
  update: '/api/profiles/direct-users',
437
441
  delete: (id) => `/api/profiles/direct-users/${id}`,
438
442
  },
439
- email: {
440
- contactFormInternal: '/api/emails/contact-requests',
441
- },
442
443
  notifications: {
443
444
  createPaymentLink: '/api/notifications/payment-links',
444
445
  quoteReadyNotification: '/api/notifications/quotes',
446
+ contactFormNotification: '/api/notifications/contact-requests',
445
447
  },
446
448
  orders: {
447
449
  list: (filters) => `/api/orders${handleParams(filters)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.18.15",
3
+ "version": "1.18.17",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",