@natch-the-storage/heathershaw-platform-types 1.14.2 → 1.15.0
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 +144 -4
- package/build/validators.js +2 -1
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -590,6 +590,90 @@ export interface CDScript {
|
|
|
590
590
|
};
|
|
591
591
|
itemCount: number;
|
|
592
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
* A customer object from Compound Direct
|
|
595
|
+
* @dateOfBirth IsoDateString, only date portion
|
|
596
|
+
* @createdDate IsoString with timestamp
|
|
597
|
+
* @modifiedDate IsoString with timestamp
|
|
598
|
+
* @address2 Usually empty
|
|
599
|
+
*/
|
|
600
|
+
export interface CDCustomer {
|
|
601
|
+
id: number;
|
|
602
|
+
customerId: number;
|
|
603
|
+
firstName: string;
|
|
604
|
+
lastName: string;
|
|
605
|
+
initials: string;
|
|
606
|
+
name: string;
|
|
607
|
+
mobile: string;
|
|
608
|
+
email: string;
|
|
609
|
+
createdDate: string;
|
|
610
|
+
modifiedDate: string;
|
|
611
|
+
isAnimal: false;
|
|
612
|
+
dateOfBirth: string;
|
|
613
|
+
isMobileInvalid: boolean;
|
|
614
|
+
note: string;
|
|
615
|
+
noteImportance: string;
|
|
616
|
+
barcode: string;
|
|
617
|
+
availableBarcodes: string[];
|
|
618
|
+
barcodeCheckDigit: number;
|
|
619
|
+
address1: string;
|
|
620
|
+
address2: string;
|
|
621
|
+
suburb: string;
|
|
622
|
+
state: string;
|
|
623
|
+
postCode: string;
|
|
624
|
+
formattedAddress: string;
|
|
625
|
+
address: string;
|
|
626
|
+
refillRemindersEnabled: boolean;
|
|
627
|
+
aus: {};
|
|
628
|
+
availableCount: number;
|
|
629
|
+
orderCount: number;
|
|
630
|
+
recentOrderCount: number;
|
|
631
|
+
additionalAddresses: CDAddress[];
|
|
632
|
+
notes: CDCustomerNote[];
|
|
633
|
+
activeRefillRemindersCount: number;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Object in the notes field of CDCustomer
|
|
637
|
+
* @modifiedDate iso string with timestamp
|
|
638
|
+
*/
|
|
639
|
+
export interface CDCustomerNote {
|
|
640
|
+
noteId: number;
|
|
641
|
+
customerId: number;
|
|
642
|
+
actionType: string;
|
|
643
|
+
actionMessage: string;
|
|
644
|
+
comments: string;
|
|
645
|
+
userName: string;
|
|
646
|
+
userSub: string;
|
|
647
|
+
createdDate: string;
|
|
648
|
+
changeSetId: number;
|
|
649
|
+
modifiedDate: string;
|
|
650
|
+
noteImportance: string;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Address object in the addtionalAddresses field of CDCustomer
|
|
654
|
+
* @createdDate IsoString with timestamp
|
|
655
|
+
* @modifiedDate IsoString with timestamp
|
|
656
|
+
*/
|
|
657
|
+
export interface CDAddress {
|
|
658
|
+
additionalAddressId: number;
|
|
659
|
+
addressGuid: string;
|
|
660
|
+
type: string;
|
|
661
|
+
deliveryInstructions: string;
|
|
662
|
+
createdDate: string;
|
|
663
|
+
modifiedDate: string;
|
|
664
|
+
customerId: number;
|
|
665
|
+
createdByUserName: string;
|
|
666
|
+
createdByUserSub: string;
|
|
667
|
+
modifiedByUserName: string;
|
|
668
|
+
modifiedByUserSub: string;
|
|
669
|
+
address1: string;
|
|
670
|
+
address2: string;
|
|
671
|
+
suburb: string;
|
|
672
|
+
state: string;
|
|
673
|
+
postCode: string;
|
|
674
|
+
formattedAddress: string;
|
|
675
|
+
address: string;
|
|
676
|
+
}
|
|
593
677
|
export interface CDCustomerCreate {
|
|
594
678
|
firstName: string;
|
|
595
679
|
lastName: string;
|
|
@@ -603,6 +687,10 @@ export interface CDCustomerCreate {
|
|
|
603
687
|
animalSpecies?: typeof AnimalSpeciesKeys;
|
|
604
688
|
animalOwnerName?: string;
|
|
605
689
|
}
|
|
690
|
+
/**
|
|
691
|
+
* Identical to CDCustomer, fully overwrites fields, so you must update using the entire CDCustomer
|
|
692
|
+
*/
|
|
693
|
+
export type CDCustomerUpdate = CDCustomer;
|
|
606
694
|
export interface CDCustomerSearch {
|
|
607
695
|
query: string;
|
|
608
696
|
dobStartDate: string;
|
|
@@ -648,10 +736,6 @@ export type CDProduct = Omit<CDFormulation, 'pricing'> & Omit<CDScriptPriceOptio
|
|
|
648
736
|
category: CDProductCategoryId;
|
|
649
737
|
categoryLabel: CDProductCategoryLabel;
|
|
650
738
|
};
|
|
651
|
-
export declare const CDProductForms: {
|
|
652
|
-
id: string;
|
|
653
|
-
label: string;
|
|
654
|
-
}[];
|
|
655
739
|
export interface CDPriceOptionUpdate {
|
|
656
740
|
formulationPriceId: number;
|
|
657
741
|
formulationId: number;
|
|
@@ -662,6 +746,61 @@ export interface CDBulkUpdateResultList {
|
|
|
662
746
|
invalidFormulationPrices: CDPriceOptionUpdate[];
|
|
663
747
|
successfulUpdates: CDPriceOptionUpdate[];
|
|
664
748
|
}
|
|
749
|
+
export declare const CDProductForms: readonly [{
|
|
750
|
+
readonly id: "capsule";
|
|
751
|
+
readonly label: "Capsules";
|
|
752
|
+
}, {
|
|
753
|
+
readonly id: "oral liquid";
|
|
754
|
+
readonly label: "Oral liquids / suspensions";
|
|
755
|
+
}, {
|
|
756
|
+
readonly id: "suppository";
|
|
757
|
+
readonly label: "Suppositories";
|
|
758
|
+
}, {
|
|
759
|
+
readonly id: "ointment";
|
|
760
|
+
readonly label: "Ointments";
|
|
761
|
+
}, {
|
|
762
|
+
readonly id: "topical liquid";
|
|
763
|
+
readonly label: "Topical Liquids";
|
|
764
|
+
}, {
|
|
765
|
+
readonly id: "scooped powder";
|
|
766
|
+
readonly label: "Scooped Powders";
|
|
767
|
+
}, {
|
|
768
|
+
readonly id: "cream";
|
|
769
|
+
readonly label: "Creams";
|
|
770
|
+
}, {
|
|
771
|
+
readonly id: "troche";
|
|
772
|
+
readonly label: "Troches / lozenges";
|
|
773
|
+
}, {
|
|
774
|
+
readonly id: "pessary";
|
|
775
|
+
readonly label: "Pessaries";
|
|
776
|
+
}, {
|
|
777
|
+
readonly id: "gummy";
|
|
778
|
+
readonly label: "Gummies";
|
|
779
|
+
}, {
|
|
780
|
+
readonly id: "gel";
|
|
781
|
+
readonly label: "Gels";
|
|
782
|
+
}, {
|
|
783
|
+
readonly id: "lotion";
|
|
784
|
+
readonly label: "Lotions";
|
|
785
|
+
}, {
|
|
786
|
+
readonly id: "patch";
|
|
787
|
+
readonly label: "Transdermal patches";
|
|
788
|
+
}, {
|
|
789
|
+
readonly id: "nasal spray";
|
|
790
|
+
readonly label: "Nasal sprays";
|
|
791
|
+
}, {
|
|
792
|
+
readonly id: "vaginal";
|
|
793
|
+
readonly label: "Vaginal creams / gels";
|
|
794
|
+
}, {
|
|
795
|
+
readonly id: "drop";
|
|
796
|
+
readonly label: "Drops";
|
|
797
|
+
}, {
|
|
798
|
+
readonly id: "spray";
|
|
799
|
+
readonly label: "Sprays";
|
|
800
|
+
}, {
|
|
801
|
+
readonly id: "tablet";
|
|
802
|
+
readonly label: "Tablets";
|
|
803
|
+
}];
|
|
665
804
|
export declare const parseCategory: (category: string) => "Compounding" | "Order or delivery" | "Prescription" | "Profile or account" | "General";
|
|
666
805
|
export interface ContactFormInternalCreate {
|
|
667
806
|
category: string;
|
|
@@ -702,6 +841,7 @@ export declare const ApiRoutes: {
|
|
|
702
841
|
compoundDirect: {
|
|
703
842
|
searchCustomers: string;
|
|
704
843
|
createCustomer: string;
|
|
844
|
+
updateCustomer: string;
|
|
705
845
|
getDraftScripts: string;
|
|
706
846
|
getDraftScriptById: (id: number) => string;
|
|
707
847
|
getHouseholdDraftScripts: string;
|
package/build/validators.js
CHANGED
|
@@ -229,7 +229,8 @@ export const ApiRoutes = {
|
|
|
229
229
|
},
|
|
230
230
|
compoundDirect: {
|
|
231
231
|
searchCustomers: '/api/compound-direct/customers',
|
|
232
|
-
createCustomer: '/api/compound-direct/
|
|
232
|
+
createCustomer: '/api/compound-direct/new-customers',
|
|
233
|
+
updateCustomer: '/api/compound-direct/customers',
|
|
233
234
|
getDraftScripts: '/api/compound-direct/draft-scripts',
|
|
234
235
|
getDraftScriptById: (id) => `/api/compound-direct/draft-scripts/${id}`,
|
|
235
236
|
getHouseholdDraftScripts: '/api/compound-direct/scripts/households',
|