@natch-the-storage/heathershaw-platform-types 1.14.3 → 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 +89 -0
- 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;
|
|
@@ -753,6 +841,7 @@ export declare const ApiRoutes: {
|
|
|
753
841
|
compoundDirect: {
|
|
754
842
|
searchCustomers: string;
|
|
755
843
|
createCustomer: string;
|
|
844
|
+
updateCustomer: string;
|
|
756
845
|
getDraftScripts: string;
|
|
757
846
|
getDraftScriptById: (id: number) => string;
|
|
758
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',
|