@natch-the-storage/heathershaw-platform-types 1.12.0 → 1.12.2

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.
@@ -1,4 +1,5 @@
1
- export declare const cDProductCategoryValues: string[];
1
+ export declare const cDProductCategoryLabelValues: string[];
2
+ export declare const cDProductCategoryIdValues: string[];
2
3
  export declare const orderFulfillmentValues: readonly ["PICKUP", "POST", "COURIER", "DELIVER"];
3
4
  export declare const orderStatusValues: readonly ["RECEIVED", "PROCESSING", "DISPATCHED", "DELIVERED", "COMPLETED"];
4
5
  export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECEIVED", "ESCALATED"];
@@ -13,7 +14,8 @@ export declare const staffProfileRoleValues: readonly ["STAFF", "ADMIN", "COUNSE
13
14
  export declare const staffProfileStatusValues: readonly ["ACTIVE", "SUSPENDED"];
14
15
  export declare const auStatesValues: string[];
15
16
  export declare const discountTierValues: number[];
16
- export type CDProductCategory = (typeof cDProductCategoryValues)[number];
17
+ export type CDProductCategoryId = (typeof cDProductCategoryIdValues)[number];
18
+ export type CDProductCategoryLabel = (typeof cDProductCategoryLabelValues)[number];
17
19
  export type OrderFulfillment = (typeof orderFulfillmentValues)[number];
18
20
  export type OrderStatus = (typeof orderStatusValues)[number];
19
21
  export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
@@ -28,10 +30,6 @@ export type StaffProfileRole = (typeof staffProfileRoleValues)[number];
28
30
  export type StaffProfileStatus = (typeof staffProfileStatusValues)[number];
29
31
  export type AuStates = (typeof auStatesValues)[number];
30
32
  export type DiscountTiers = (typeof discountTierValues)[number];
31
- export declare const CDProductCategoriesIdLabel: {
32
- id: string;
33
- label: CDProductCategory;
34
- }[];
35
33
  export type Pharmacy = {
36
34
  name: string;
37
35
  address: string;
@@ -402,6 +400,10 @@ export interface Cart {
402
400
  updatedAt: Date;
403
401
  }
404
402
  export type CartUpdate = Omit<Cart, 'id' | 'updatedAt'>;
403
+ export declare const CDProductCategoriesIdLabel: {
404
+ id: CDProductCategoryId;
405
+ label: CDProductCategoryLabel;
406
+ }[];
405
407
  export declare const CompoundDirectAnimalId: {
406
408
  readonly dog: {
407
409
  readonly id: 1;
@@ -632,7 +634,8 @@ export interface CDFormulationList {
632
634
  }
633
635
  export type CDProduct = Omit<CDFormulation, 'pricing'> & Omit<CDScriptPriceOption, 'id'> & {
634
636
  pricingId: number;
635
- category: CDProductCategory;
637
+ category: CDProductCategoryId;
638
+ categoryLabel: CDProductCategoryLabel;
636
639
  };
637
640
  export declare const CDProductFormsIdLabels: {
638
641
  id: string;
@@ -644,6 +647,16 @@ export interface CDPriceOptionUpdate {
644
647
  quantity: number;
645
648
  price: number;
646
649
  }
650
+ export interface CDBulkUpdateResult {
651
+ formulationId: number;
652
+ formulationPriceId: number;
653
+ quantity: number;
654
+ price: number;
655
+ }
656
+ export interface CDBulkUpdateResultList {
657
+ invalidFormulationPrices: CDBulkUpdateResult[];
658
+ successfulUpdates: CDBulkUpdateResult[];
659
+ }
647
660
  export declare const parseCategory: (category: string) => "Compounding" | "Order or delivery" | "Prescription" | "Profile or account" | "General";
648
661
  export interface ContactFormInternalCreate {
649
662
  category: string;
@@ -1,5 +1,10 @@
1
1
  //#region Enum value arrays ──────────────────────────────────────────────────────────
2
- export const cDProductCategoryValues = ['OTC', 'Schedule 4', 'Schedule 8'];
2
+ export const cDProductCategoryLabelValues = ['OTC', 'Schedule 4', 'Schedule 8'];
3
+ export const cDProductCategoryIdValues = [
4
+ 'schedule_1',
5
+ 'schedule_4',
6
+ 'schedule_8',
7
+ ];
3
8
  export const orderFulfillmentValues = [
4
9
  'PICKUP',
5
10
  'POST',
@@ -57,11 +62,6 @@ export const auStatesValues = [
57
62
  'NT',
58
63
  ];
59
64
  export const discountTierValues = [0.9, 0.88, 0.875, 0.85, 0.8, 0.75, 0.7];
60
- //#endregion ──────────────────────────────────────────────────────────────────────
61
- // #region Functions
62
- export const CDProductCategoriesIdLabel = cDProductCategoryValues.map((v) => {
63
- return { id: v, label: v === 'schedule_1' ? 'OTC' : v.replace('_', ' ') };
64
- });
65
65
  export const PHARMACIES = [
66
66
  {
67
67
  name: 'Malvern Road',
@@ -102,6 +102,9 @@ export const PHARMACIES = [
102
102
  ];
103
103
  //#endregion ──────────────────────────────────────────────────────────────────────
104
104
  //#region compound direct ────────────────────────────────────────────────────────────
105
+ export const CDProductCategoriesIdLabel = cDProductCategoryIdValues.map((v, i) => {
106
+ return { id: v, label: cDProductCategoryLabelValues[i] };
107
+ });
105
108
  export const CompoundDirectAnimalId = {
106
109
  dog: { id: 1, name: 'Dog' },
107
110
  cat: { id: 2, name: 'Cat' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",