@esolve/ng-esolve-connect 0.142.0 → 0.144.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/index.d.ts CHANGED
@@ -593,150 +593,71 @@ interface EsolveAssetOptions {
593
593
  area_of_application?: string;
594
594
  }
595
595
 
596
- declare class EsolveCategoryTreeItem implements EsolveSeoDetails {
597
- type: 'category' | 'subcategory';
598
- esolve_id: string | number;
599
- parent_id: string;
600
- description: string;
601
- sef_description: string;
602
- short_description: string;
603
- sort_priority: number;
604
- active: boolean;
605
- display_only: boolean;
606
- private image_name;
607
- id: string;
608
- seo_details: EsolveSeoInfo;
609
- total_stock?: number;
610
- children?: EsolveCategoryTreeItem[];
611
- private image_path;
612
- get small_image_src(): string;
613
- get thumbnail_image_src(): string;
614
- get tiny_image_src(): string;
615
- constructor(type: 'category' | 'subcategory', esolve_id: string | number, parent_id: string, description: string, sef_description: string, short_description: string, sort_priority: number, active: boolean, display_only: boolean, image_name: string, seo_title: string, seo_keywords: string, seo_description: string, children?: EsolveCategoryTreeItem[]);
616
- getImagePath(image_size: 'small' | 'thumb' | 'tiny'): string;
617
- }
596
+ type EsolveStockSortField = 'sorting_code' | 'price' | 'name' | 'description' | 'code' | 'created';
618
597
 
619
- interface EsolveSubcategoryRecord {
620
- type: 'subcategory';
598
+ type EsolveErpSalesStockSortField = EsolveStockSortField | 'total' | 'qty' | 'date';
599
+
600
+ interface EsolveAdditionalStockImageRecord {
621
601
  id: number;
622
- menu_id: string;
623
- external_system_code: string;
624
- location_id: number;
625
- description: string;
626
- sef_description: string;
627
- seo_description: string;
628
- sort_priority: number;
629
- active: boolean;
630
- display_only: boolean;
631
- seo_page_title: string;
632
- seo_keywords: string;
633
- short_description: string;
634
- image: string;
635
- total_stock?: number;
602
+ type: string;
603
+ url: string;
604
+ name?: string | null;
605
+ etag?: string | null;
606
+ key?: string | null;
636
607
  }
637
608
 
638
- interface EsolveCategoryRecord {
639
- type: 'category';
640
- menu_id: string;
641
- owner_menu_id: string;
642
- description: string;
643
- sef_description: string;
644
- seo_description: string;
645
- sort_priority: number;
646
- active: boolean;
647
- display_only: boolean;
648
- seo_page_title: string;
649
- seo_keywords: string;
650
- short_description: string;
651
- image: string;
652
- total_stock?: number;
653
- children: (EsolveCategoryRecord | EsolveSubcategoryRecord)[];
609
+ interface EsolveStockBarcodeOptions {
610
+ barcode: string;
611
+ barcode_type?: string;
654
612
  }
655
613
 
656
- interface EsolveCategoryTreeItemRecord {
657
- type: 'category' | 'subcategory';
658
- id: string | number;
659
- parent_id: string;
660
- description: string;
661
- sef_description: string;
662
- short_description: string;
663
- sort_priority: number;
664
- active: boolean;
665
- display_only: boolean;
666
- seo_page_title: string;
667
- seo_keywords: string;
668
- seo_description: string;
669
- image: string;
670
- total_stock?: number;
671
- children?: EsolveCategoryTreeItemRecord[];
614
+ type EsolveBarcodeType = 'ean13' | 'qr' | 'code39' | 'code128';
615
+
616
+ interface EsolveStockBarcodeRecord {
617
+ id: number;
618
+ code: string;
619
+ barcode_data: string;
620
+ barcode_type: EsolveBarcodeType;
672
621
  }
673
622
 
674
- interface EsolveCategoryTreeItemOptions {
675
- /**
676
- * Generated ID. Does not require type to be set.
677
- */
678
- id?: string;
679
- /**
680
- * Type category tree item. Required for if esolve_id or sef_description is set
681
- */
682
- type?: 'category' | 'subcategory';
683
- /**
684
- * Search engine friendly description. Requires type to be set.
685
- */
686
- sef_description?: string;
687
- /**
688
- * ID from eSolve. Requires type to be set.
689
- */
690
- esolve_id?: number | string;
623
+ interface EsolveColourOptions {
624
+ colour_chart_id?: number | number[];
691
625
  }
692
626
 
693
- interface EsolveCategoryIdentifier {
694
- type: 'category' | 'subcategory';
695
- esolve_id: number | string;
627
+ interface EsolveColourRecord {
628
+ id: number;
629
+ colour: string;
630
+ description: string;
631
+ image_name: string;
632
+ image_last_modified: string;
696
633
  }
697
634
 
698
- declare class EsolveCategoryTreeService {
635
+ declare class EsolveColour {
636
+ id: number;
637
+ colour: string;
638
+ description: string;
639
+ private image_name;
640
+ private image_last_modified;
641
+ get image_src(): string;
642
+ constructor(record: Partial<EsolveColourRecord>);
643
+ getImagePath(): string;
644
+ }
645
+
646
+ declare class EsolveColoursService {
699
647
  private readonly config;
700
648
  private readonly http;
701
649
  /**
702
- * Retrieves the category tree from eSolve instance and coverts it to the correct format.
703
- */
704
- getCategoryTree(identifier?: string): Observable<EsolveCategoryTreeItem[]>;
705
- /**
706
- * Retrieve the special tree structure for a specific special from the eSolve
707
- * instance and converts it into the correct format
708
- *
709
- * @param special_id Id of to special to get tree for
710
- *
711
- * @returns Observable containing special tree data
712
- */
713
- getSpecialTree(special_id: number): Observable<EsolveCategoryTreeItem[]>;
714
- /**
715
- * Retrieve the manufacturer tree structure for a specific manufacturer from the eSolve
716
- * instance and converts it into the correct format
717
- *
718
- * @param manufacturer_id Id of the manufacturer to get the tree for
719
- *
720
- * @returns Observable containing manufacturer tree data
721
- */
722
- getManufacturerTree(manufacturer_id: number): Observable<EsolveCategoryTreeItem[]>;
723
- /**
724
- * Retrieve the details of a category tree item from the eSolve instance and
725
- * converts it to the correct format.
726
- *
727
- * @param options Filter options
728
- */
729
- getCategoryTreeItem(options: EsolveCategoryTreeItemOptions): Observable<EsolveCategoryTreeItem>;
730
- /**
731
- * Processes the eSolve tree records and converts them into the correct format.
732
- *
733
- * @param tree_records Records to process
734
- */
735
- private processTree;
736
- private processTreeItem;
737
- private processID;
738
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCategoryTreeService, never>;
739
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCategoryTreeService>;
650
+ * Retrieves colour chart details for the provided filter options
651
+ *
652
+ * @param options Filter options
653
+ *
654
+ * @returns An observable of colour details
655
+ */
656
+ getColours(options?: EsolveColourOptions): Observable<EsolveColour[]>;
657
+ private parseOptions;
658
+ private processColours;
659
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveColoursService, never>;
660
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveColoursService>;
740
661
  }
741
662
 
742
663
  interface EsolveManufacturerOptions {
@@ -794,6 +715,42 @@ declare class EsolveManufacturersService {
794
715
  static ɵprov: i0.ɵɵInjectableDeclaration<EsolveManufacturersService>;
795
716
  }
796
717
 
718
+ type EsolveMaterialPhraseMatchMode = 'contains' | 'not_equals' | 'equals';
719
+
720
+ interface EsolveMaterialOptions {
721
+ type_of_materials_id?: number | number[];
722
+ phrase?: string;
723
+ phrase_match_mode?: EsolveMaterialPhraseMatchMode;
724
+ }
725
+
726
+ interface EsolveMaterialRecord {
727
+ id: number;
728
+ material: string;
729
+ }
730
+
731
+ declare class EsolveMaterial {
732
+ id: number;
733
+ material: string;
734
+ constructor(record?: Partial<EsolveMaterialRecord>);
735
+ }
736
+
737
+ declare class EsolveMaterialsService {
738
+ private readonly config;
739
+ private readonly http;
740
+ /**
741
+ * Retrieves type of materials details for the provided filter options
742
+ *
743
+ * @param options Filter options
744
+ *
745
+ * @returns An observable of material details
746
+ */
747
+ getMaterials(options?: EsolveMaterialOptions): Observable<EsolveMaterial[]>;
748
+ private parseOptions;
749
+ private processMaterials;
750
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveMaterialsService, never>;
751
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveMaterialsService>;
752
+ }
753
+
797
754
  interface EsolveRangeRecord {
798
755
  id: number;
799
756
  range: string;
@@ -927,478 +884,32 @@ declare class EsolveTopicService {
927
884
  static ɵprov: i0.ɵɵInjectableDeclaration<EsolveTopicService>;
928
885
  }
929
886
 
930
- interface EsolveAssetRecord {
887
+ interface EsolveStockBadgeRecord {
931
888
  id: number;
932
- src: string;
933
- name: string;
934
- type: EsolveAssetType;
935
- description: string;
936
- document_number?: string;
937
- document_type?: string;
938
- area_of_application?: string;
939
- asset_category?: string;
940
- asset_sub_category?: string;
941
- sort_priority?: number;
942
- created?: string;
943
- image_name?: string;
944
- category?: EsolveCategoryTreeItemRecord;
945
- subcategory?: EsolveCategoryTreeItemRecord;
946
- manufacturer?: EsolveManufacturerRecord;
947
- range?: EsolveRangeRecord;
948
- topics?: EsolveTopicRecord[];
949
- tags?: EsolveTagRecord[];
950
- url?: string;
889
+ text: string;
890
+ identifier: string;
891
+ font_colour: string;
892
+ badge_colour: string;
893
+ sort_priority: number;
951
894
  }
952
895
 
953
- interface EsolveMediaAssetOptions extends EsolveAssetOptions {
954
- media_id?: number;
955
- media_identifier?: string;
896
+ interface EsolveStockCartParameter {
897
+ name: string;
898
+ type: EsolveStockCartParameterInput;
899
+ label: string;
900
+ is_required: boolean;
901
+ options?: string[];
956
902
  }
957
903
 
958
- interface EsolveStockAssetOptions extends EsolveAssetOptions {
959
- code?: string;
960
- sef_name?: string;
904
+ interface EsolveStockLeadTimesRecord {
905
+ max: number;
906
+ min: number;
961
907
  }
962
908
 
963
- declare class EsolveLinkedAsset {
964
- id: number;
965
- name: string;
966
- type: EsolveAssetType;
967
- description: string;
968
- src: string;
969
- private image_name;
970
- /**
971
- * Shortcut to `getImagePath()`
972
- */
973
- get image_src(): string;
974
- constructor(record: EsolveLinkedAssetRecord);
975
- /**
976
- * Retrieve image path
977
- *
978
- * @returns Image path on CDN, else empty string if no image exists
979
- */
980
- getImagePath(): string;
981
- }
982
-
983
- declare class EsolveAsset {
984
- id: number;
985
- src: string;
986
- name: string;
987
- type?: EsolveAssetType;
988
- description: string;
989
- document_number: string;
990
- document_type: string;
991
- area_of_application: string;
992
- asset_category: string;
993
- asset_sub_category: string;
994
- sort_priority: number;
995
- created?: string;
996
- category?: EsolveCategoryTreeItem;
997
- subcategory?: EsolveCategoryTreeItem;
998
- manufacturer?: EsolveManufacturer;
999
- range?: EsolveRange;
1000
- topics: EsolveTopic[];
1001
- tags: EsolveTag[];
1002
- url: string;
1003
- private image_name;
1004
- /**
1005
- * Shortcut to `getImagePath()`
1006
- */
1007
- get image_src(): string;
1008
- constructor(record: EsolveAssetRecord);
1009
- /**
1010
- * Retrieve image path
1011
- *
1012
- * @returns Image path on CDN, else empty string if no image exists
1013
- */
1014
- getImagePath(): string;
1015
- }
1016
-
1017
- declare class EsolveAssetsService {
1018
- private readonly config;
1019
- private readonly http;
1020
- getAsset(id: number): Observable<EsolveAsset>;
1021
- getAssets(options?: EsolveAssetOptions): Observable<EsolveAssetList>;
1022
- getMediaAssets(options: EsolveMediaAssetOptions): Observable<EsolveAssetList>;
1023
- getStockAssets(options: EsolveStockAssetOptions): Observable<EsolveAssetList>;
1024
- private processAsset;
1025
- private getAssetRecords;
1026
- private parseOptions;
1027
- private processAssetLists;
1028
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveAssetsService, never>;
1029
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveAssetsService>;
1030
- }
1031
-
1032
- interface EsolveSessionData {
1033
- addresses_id: number;
1034
- location_id: number;
1035
- shipping_id: number;
1036
- clients_id: number;
1037
- }
1038
-
1039
- interface EsolveSession {
1040
- token: string;
1041
- user_id: number;
1042
- access_level: number;
1043
- location_id: number;
1044
- addresses_id: number;
1045
- shipping_id: number;
1046
- clients_id: number;
1047
- }
1048
-
1049
- interface EsolveSessionUpdateOptions {
1050
- user_id?: number;
1051
- location_id?: number;
1052
- addresses_id?: number;
1053
- shipping_id?: number;
1054
- clients_id?: number;
1055
- token?: string;
1056
- expiry_date_unix?: number;
1057
- grace_unix?: number;
1058
- }
1059
-
1060
- declare class EsolveSessionService {
1061
- private readonly is_browser;
1062
- private readonly config;
1063
- private readonly cookieService;
1064
- private readonly storage_key;
1065
- private readonly appRef;
1066
- protected readonly token: i0.WritableSignal<string>;
1067
- protected readonly user_id: i0.WritableSignal<number>;
1068
- protected readonly access_level: i0.WritableSignal<number>;
1069
- protected readonly location_id: i0.WritableSignal<number>;
1070
- protected readonly addresses_id: i0.WritableSignal<number>;
1071
- protected readonly shipping_id: i0.WritableSignal<number>;
1072
- protected readonly clients_id: i0.WritableSignal<number>;
1073
- protected readonly state_hash: i0.Signal<string>;
1074
- protected readonly session: i0.Signal<EsolveSession>;
1075
- private token$;
1076
- private user_id$;
1077
- private access_level$;
1078
- private location_id$;
1079
- private addresses_id$;
1080
- private shipping_id$;
1081
- private clients_id$;
1082
- private session$;
1083
- private timer_start;
1084
- private timer_stop;
1085
- private expire;
1086
- private session_end;
1087
- private app_stable_init$;
1088
- constructor();
1089
- isValid(): boolean;
1090
- getSession(): Observable<EsolveSession>;
1091
- getSessionValue(): EsolveSession;
1092
- onSessionEnd(): Observable<void>;
1093
- onExpire(): Observable<void>;
1094
- expireSession(): void;
1095
- getToken(): string;
1096
- onTokenUpdate(): Observable<string>;
1097
- updateToken(token: string): void;
1098
- getUserId(): number;
1099
- onUserIdUpdate(): Observable<number>;
1100
- updateUserId(user_id: number): void;
1101
- getAccessLevel(): number;
1102
- onAccessLevelUpdate(): Observable<number>;
1103
- updateAccessLevel(access_level: number): void;
1104
- getLocationId(): number;
1105
- onLocationIdUpdate(): Observable<number>;
1106
- updateLocationId(location_id: number): void;
1107
- getAddressesId(): number;
1108
- onAddressesIdUpdate(): Observable<number>;
1109
- updateAddressesId(addresses_id: number): void;
1110
- getShippingId(): number;
1111
- onShippingIdUpdate(): Observable<number>;
1112
- updateShippingId(shipping_id: number): void;
1113
- getClientsId(): number;
1114
- onClientsIdUpdate(): Observable<number>;
1115
- updateClientsId(clients_id: number): void;
1116
- getStateHash(): string;
1117
- stopTimer(): void;
1118
- startTimer(time: number | Date): Promise<void>;
1119
- getCachedSession(): string | null;
1120
- reset(): void;
1121
- handleSession(session: EsolveSession, expiry_date_unix: number, grace_unix: number): void;
1122
- handleUpdateSession(options: EsolveSessionUpdateOptions): void;
1123
- private setStorageKey;
1124
- private getCache;
1125
- private setCache;
1126
- private removeCache;
1127
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveSessionService, never>;
1128
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveSessionService>;
1129
- }
1130
-
1131
- declare class EsolveSessionMetadataService {
1132
- private readonly config;
1133
- private readonly http;
1134
- private readonly errorHandler;
1135
- private readonly responseHandler;
1136
- set(type: string, metadata: any): Observable<EsolveResponseResult>;
1137
- get<T>(type: string): Observable<T>;
1138
- delete(type: string): Observable<EsolveResult>;
1139
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveSessionMetadataService, never>;
1140
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveSessionMetadataService>;
1141
- }
1142
-
1143
- declare enum EsolveEventType {
1144
- FATAL_SESSION_ERROR = "FATAL_SESSION_ERROR",
1145
- SESSION_VALIDATION_START = "SESSION_VALIDATION_START",
1146
- SESSION_VALIDATION_END = "SESSION_VALIDATION_END",
1147
- CART_ERROR = "CART_ERROR"
1148
- }
1149
-
1150
- interface EsolveEventRecord {
1151
- type: EsolveEventType;
1152
- message?: string;
1153
- additional_data?: any;
1154
- }
1155
-
1156
- interface EsolveNotificationButtonActionRecord {
1157
- text: string;
1158
- module: string;
1159
- target: EsolveUrlTarget;
1160
- url: string;
1161
- }
1162
-
1163
- interface EsolveNotificationDateRecord {
1164
- date: string;
1165
- timestamp: number;
1166
- }
1167
-
1168
- interface EsolveNotificationDatesRecord {
1169
- from: EsolveNotificationDateRecord;
1170
- to: EsolveNotificationDateRecord;
1171
- }
1172
-
1173
- interface EsolveSystemNotificationOptions {
1174
- exclude_ids?: number[];
1175
- }
1176
-
1177
- type EsolveNotificationPosition = 'top' | 'center' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
1178
-
1179
- type EsolveNotificationSize = 'small' | 'normal' | 'large';
1180
-
1181
- type EsolveNotificationType = 'modal' | 'floating_block' | 'toast';
1182
-
1183
- interface EsolveSystemNotificationTypeRecord {
1184
- id: number;
1185
- identifier: string;
1186
- title: string;
1187
- type: EsolveNotificationType;
1188
- position: EsolveNotificationPosition;
1189
- size: EsolveNotificationSize;
1190
- system_disable_order: boolean;
1191
- }
1192
-
1193
- interface EsolveSystemNotificationRecord {
1194
- id: number;
1195
- identifier: string;
1196
- title: string;
1197
- message: string;
1198
- dates?: EsolveNotificationDatesRecord | null;
1199
- timeout: number;
1200
- display_every: number;
1201
- button_actions: EsolveNotificationButtonActionRecord[];
1202
- type: EsolveSystemNotificationTypeRecord;
1203
- }
1204
-
1205
- declare class EsolveEvent {
1206
- private _type;
1207
- private _message;
1208
- private _additional_data?;
1209
- get type(): EsolveEventType;
1210
- get message(): string;
1211
- get additional_data(): any;
1212
- constructor(record: EsolveEventRecord);
1213
- }
1214
-
1215
- declare class EsolveNotificationButtonAction {
1216
- text: string;
1217
- url: string;
1218
- module: string;
1219
- target: EsolveUrlTarget;
1220
- constructor(record?: EsolveNotificationButtonActionRecord);
1221
- }
1222
-
1223
- declare class EsolveNotificationDates {
1224
- from: Date;
1225
- to: Date;
1226
- constructor(record: EsolveNotificationDatesRecord);
1227
- }
1228
-
1229
- declare class EsolveSystemNotificationType {
1230
- id: number;
1231
- identifier: string;
1232
- title: string;
1233
- system_disable_order: boolean;
1234
- position: EsolveNotificationPosition;
1235
- size: EsolveNotificationSize;
1236
- type: EsolveNotificationType;
1237
- constructor(record: EsolveSystemNotificationTypeRecord);
1238
- }
1239
-
1240
- declare class EsolveSystemNotification {
1241
- id: number;
1242
- identifier: string;
1243
- title: string;
1244
- message: string;
1245
- timeout: number;
1246
- display_every: number;
1247
- button_actions: EsolveNotificationButtonAction[];
1248
- type: EsolveSystemNotificationType;
1249
- dates?: EsolveNotificationDates;
1250
- constructor(record: EsolveSystemNotificationRecord);
1251
- }
1252
-
1253
- declare class EsolveEventTargetService {
1254
- private readonly listeners;
1255
- addEventListener(event_name: EsolveEventType, callback: (event: EsolveEvent) => void): void;
1256
- removeEventListener(event_name: EsolveEventType, callback: (event: EsolveEvent) => void): void;
1257
- dispatchEvent(event: EsolveEvent | EsolveEventType): void;
1258
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveEventTargetService, never>;
1259
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveEventTargetService>;
1260
- }
1261
-
1262
- declare class EsolveNotificationsService {
1263
- private readonly config;
1264
- private readonly http;
1265
- getSystemNotifications(options?: EsolveSystemNotificationOptions): Observable<EsolveSystemNotification[]>;
1266
- private processNotifications;
1267
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveNotificationsService, never>;
1268
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveNotificationsService>;
1269
- }
1270
-
1271
- interface EsolveAuthGetData {
1272
- key: string;
1273
- }
1274
-
1275
- interface EsolveAuthCheckData extends Partial<EsolveAuthGetData> {
1276
- key_okay: boolean;
1277
- }
1278
-
1279
- type EsolveStockSortField = 'sorting_code' | 'price' | 'name' | 'description' | 'code' | 'created';
1280
-
1281
- type EsolveErpSalesStockSortField = EsolveStockSortField | 'total' | 'qty' | 'date';
1282
-
1283
- interface EsolveAdditionalStockImageRecord {
1284
- id: number;
1285
- type: string;
1286
- url: string;
1287
- name?: string | null;
1288
- etag?: string | null;
1289
- key?: string | null;
1290
- }
1291
-
1292
- interface EsolveStockBarcodeOptions {
1293
- barcode: string;
1294
- barcode_type?: string;
1295
- }
1296
-
1297
- type EsolveBarcodeType = 'ean13' | 'qr' | 'code39' | 'code128';
1298
-
1299
- interface EsolveStockBarcodeRecord {
1300
- id: number;
1301
- code: string;
1302
- barcode_data: string;
1303
- barcode_type: EsolveBarcodeType;
1304
- }
1305
-
1306
- interface EsolveColourOptions {
1307
- colour_chart_id?: number | number[];
1308
- }
1309
-
1310
- interface EsolveColourRecord {
1311
- id: number;
1312
- colour: string;
1313
- description: string;
1314
- image_name: string;
1315
- image_last_modified: string;
1316
- }
1317
-
1318
- declare class EsolveColour {
1319
- id: number;
1320
- colour: string;
1321
- description: string;
1322
- private image_name;
1323
- private image_last_modified;
1324
- get image_src(): string;
1325
- constructor(record: Partial<EsolveColourRecord>);
1326
- getImagePath(): string;
1327
- }
1328
-
1329
- declare class EsolveColoursService {
1330
- private readonly config;
1331
- private readonly http;
1332
- /**
1333
- * Retrieves colour chart details for the provided filter options
1334
- *
1335
- * @param options Filter options
1336
- *
1337
- * @returns An observable of colour details
1338
- */
1339
- getColours(options?: EsolveColourOptions): Observable<EsolveColour[]>;
1340
- private parseOptions;
1341
- private processColours;
1342
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveColoursService, never>;
1343
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveColoursService>;
1344
- }
1345
-
1346
- type EsolveMaterialPhraseMatchMode = 'contains' | 'not_equals' | 'equals';
1347
-
1348
- interface EsolveMaterialOptions {
1349
- type_of_materials_id?: number | number[];
1350
- phrase?: string;
1351
- phrase_match_mode?: EsolveMaterialPhraseMatchMode;
1352
- }
1353
-
1354
- interface EsolveMaterialRecord {
1355
- id: number;
1356
- material: string;
1357
- }
1358
-
1359
- declare class EsolveMaterial {
1360
- id: number;
1361
- material: string;
1362
- constructor(record?: Partial<EsolveMaterialRecord>);
1363
- }
1364
-
1365
- declare class EsolveMaterialsService {
1366
- private readonly config;
1367
- private readonly http;
1368
- /**
1369
- * Retrieves type of materials details for the provided filter options
1370
- *
1371
- * @param options Filter options
1372
- *
1373
- * @returns An observable of material details
1374
- */
1375
- getMaterials(options?: EsolveMaterialOptions): Observable<EsolveMaterial[]>;
1376
- private parseOptions;
1377
- private processMaterials;
1378
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveMaterialsService, never>;
1379
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveMaterialsService>;
1380
- }
1381
-
1382
- interface EsolveStockBadgeRecord {
1383
- id: number;
1384
- text: string;
1385
- identifier: string;
1386
- font_colour: string;
1387
- badge_colour: string;
1388
- sort_priority: number;
1389
- }
1390
-
1391
- interface EsolveStockCartParameter {
1392
- name: string;
1393
- type: EsolveStockCartParameterInput;
1394
- label: string;
1395
- is_required: boolean;
1396
- options?: string[];
1397
- }
1398
-
1399
- interface EsolveStockLeadTimesRecord {
1400
- max: number;
1401
- min: number;
909
+ interface EsolveStockLinkedCategoryRecord {
910
+ category_id: string;
911
+ subcategory_id: number;
912
+ is_default: boolean;
1402
913
  }
1403
914
 
1404
915
  interface EsolveStockReviewsReportRecord {
@@ -1458,6 +969,7 @@ interface EsolveStockBaseRecord<T extends EsolveCustomFields = EsolveCustomField
1458
969
  topics: EsolveTopicRecord[];
1459
970
  badges: EsolveStockBadgeRecord[];
1460
971
  lead_times: EsolveStockLeadTimesRecord;
972
+ linked_categories: EsolveStockLinkedCategoryRecord[];
1461
973
  colours: EsolveColourRecord[];
1462
974
  sizes: string[];
1463
975
  custom_fields: T;
@@ -1494,12 +1006,6 @@ interface EsolveDependantItemRecord<T extends EsolveCustomFields = EsolveCustomF
1494
1006
  dependency_description?: string;
1495
1007
  }
1496
1008
 
1497
- interface EsolveStockLinkedCategoryRecord {
1498
- category_id: string;
1499
- subcategory_id: number;
1500
- is_default: boolean;
1501
- }
1502
-
1503
1009
  interface EsolveStockRecord<T extends EsolveCustomFields = EsolveCustomFields> extends EsolveStockBaseRecord<T> {
1504
1010
  linked_categories: EsolveStockLinkedCategoryRecord[];
1505
1011
  group?: string;
@@ -1575,6 +1081,8 @@ interface EsolveStockItemLocationLevelRecord {
1575
1081
  distance?: number;
1576
1082
  }
1577
1083
 
1084
+ type EsolveStockItemOptionsFieldsSet = 'lite' | 'full' | 'custom' | 'config';
1085
+
1578
1086
  interface EsolveStockItemOptions extends EsolveStockItemBaseOptions {
1579
1087
  category_id?: string;
1580
1088
  subcategory_id?: number;
@@ -1582,6 +1090,8 @@ interface EsolveStockItemOptions extends EsolveStockItemBaseOptions {
1582
1090
  ranges_id?: number;
1583
1091
  is_active?: boolean;
1584
1092
  display_only?: boolean;
1093
+ override_fields_set?: EsolveStockItemOptionsFieldsSet;
1094
+ custom_field_config_names?: string[];
1585
1095
  tag_id_list?: number[];
1586
1096
  topic_id_list?: number[];
1587
1097
  specials_id?: number;
@@ -1617,6 +1127,22 @@ declare class EsolveStockLeadTimes {
1617
1127
  constructor(lead_times: EsolveStockLeadTimesRecord);
1618
1128
  }
1619
1129
 
1130
+ declare class EsolveStockLinkedCategory {
1131
+ /**
1132
+ * ID of the linked category
1133
+ */
1134
+ category_id: string;
1135
+ /**
1136
+ * ID of the linked subcategory
1137
+ */
1138
+ subcategory_id: number;
1139
+ /**
1140
+ * Whether this linked category is the default for the stock item
1141
+ */
1142
+ is_default: boolean;
1143
+ constructor(linked_category: EsolveStockLinkedCategoryRecord);
1144
+ }
1145
+
1620
1146
  /**
1621
1147
  * Price of eSolve stock item
1622
1148
  */
@@ -1923,6 +1449,10 @@ declare class EsolveStockItemBase<T extends EsolveCustomFields = EsolveCustomFie
1923
1449
  * Stock Item Lead Times for supply
1924
1450
  */
1925
1451
  lead_times?: EsolveStockLeadTimes;
1452
+ /**
1453
+ * Linked categories the stock item belongs to
1454
+ */
1455
+ linked_categories: EsolveStockLinkedCategory[];
1926
1456
  /**
1927
1457
  * Transaction history
1928
1458
  */
@@ -2861,9 +2391,120 @@ declare class EsolveErpDocumentsRequestResult extends EsolveResponseResult {
2861
2391
  constructor(response: EsolvePostResponseItem);
2862
2392
  }
2863
2393
 
2864
- declare class EsolveChangePasswordResult extends EsolveResponseResult {
2865
- password_updated: boolean;
2866
- constructor(response: EsolvePostResponseItem);
2394
+ declare class EsolveChangePasswordResult extends EsolveResponseResult {
2395
+ password_updated: boolean;
2396
+ constructor(response: EsolvePostResponseItem);
2397
+ }
2398
+
2399
+ interface EsolveSessionData {
2400
+ addresses_id: number;
2401
+ location_id: number;
2402
+ shipping_id: number;
2403
+ clients_id: number;
2404
+ }
2405
+
2406
+ interface EsolveSession {
2407
+ token: string;
2408
+ user_id: number;
2409
+ access_level: number;
2410
+ location_id: number;
2411
+ addresses_id: number;
2412
+ shipping_id: number;
2413
+ clients_id: number;
2414
+ }
2415
+
2416
+ interface EsolveSessionUpdateOptions {
2417
+ user_id?: number;
2418
+ location_id?: number;
2419
+ addresses_id?: number;
2420
+ shipping_id?: number;
2421
+ clients_id?: number;
2422
+ token?: string;
2423
+ expiry_date_unix?: number;
2424
+ grace_unix?: number;
2425
+ }
2426
+
2427
+ declare class EsolveSessionService {
2428
+ private readonly is_browser;
2429
+ private readonly config;
2430
+ private readonly cookieService;
2431
+ private readonly storage_key;
2432
+ private readonly appRef;
2433
+ protected readonly token: i0.WritableSignal<string>;
2434
+ protected readonly user_id: i0.WritableSignal<number>;
2435
+ protected readonly access_level: i0.WritableSignal<number>;
2436
+ protected readonly location_id: i0.WritableSignal<number>;
2437
+ protected readonly addresses_id: i0.WritableSignal<number>;
2438
+ protected readonly shipping_id: i0.WritableSignal<number>;
2439
+ protected readonly clients_id: i0.WritableSignal<number>;
2440
+ protected readonly state_hash: i0.Signal<string>;
2441
+ protected readonly session: i0.Signal<EsolveSession>;
2442
+ private token$;
2443
+ private user_id$;
2444
+ private access_level$;
2445
+ private location_id$;
2446
+ private addresses_id$;
2447
+ private shipping_id$;
2448
+ private clients_id$;
2449
+ private session$;
2450
+ private timer_start;
2451
+ private timer_stop;
2452
+ private expire;
2453
+ private session_end;
2454
+ private app_stable_init$;
2455
+ constructor();
2456
+ isValid(): boolean;
2457
+ getSession(): Observable<EsolveSession>;
2458
+ getSessionValue(): EsolveSession;
2459
+ onSessionEnd(): Observable<void>;
2460
+ onExpire(): Observable<void>;
2461
+ expireSession(): void;
2462
+ getToken(): string;
2463
+ onTokenUpdate(): Observable<string>;
2464
+ updateToken(token: string): void;
2465
+ getUserId(): number;
2466
+ onUserIdUpdate(): Observable<number>;
2467
+ updateUserId(user_id: number): void;
2468
+ getAccessLevel(): number;
2469
+ onAccessLevelUpdate(): Observable<number>;
2470
+ updateAccessLevel(access_level: number): void;
2471
+ getLocationId(): number;
2472
+ onLocationIdUpdate(): Observable<number>;
2473
+ updateLocationId(location_id: number): void;
2474
+ getAddressesId(): number;
2475
+ onAddressesIdUpdate(): Observable<number>;
2476
+ updateAddressesId(addresses_id: number): void;
2477
+ getShippingId(): number;
2478
+ onShippingIdUpdate(): Observable<number>;
2479
+ updateShippingId(shipping_id: number): void;
2480
+ getClientsId(): number;
2481
+ onClientsIdUpdate(): Observable<number>;
2482
+ updateClientsId(clients_id: number): void;
2483
+ getStateHash(): string;
2484
+ stopTimer(): void;
2485
+ startTimer(time: number | Date): Promise<void>;
2486
+ getCachedSession(): string | null;
2487
+ reset(): void;
2488
+ handleSession(session: EsolveSession, expiry_date_unix: number, grace_unix: number): void;
2489
+ handleUpdateSession(options: EsolveSessionUpdateOptions): void;
2490
+ private setStorageKey;
2491
+ private getCache;
2492
+ private setCache;
2493
+ private removeCache;
2494
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveSessionService, never>;
2495
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveSessionService>;
2496
+ }
2497
+
2498
+ declare class EsolveSessionMetadataService {
2499
+ private readonly config;
2500
+ private readonly http;
2501
+ private readonly errorHandler;
2502
+ private readonly responseHandler;
2503
+ set(type: string, metadata: any): Observable<EsolveResponseResult>;
2504
+ get<T>(type: string): Observable<T>;
2505
+ delete(type: string): Observable<EsolveResult>;
2506
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveSessionMetadataService, never>;
2507
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveSessionMetadataService>;
2867
2508
  }
2868
2509
 
2869
2510
  interface EsolveForgotPasswordResponse extends EsolvePostResponseItem {
@@ -3272,6 +2913,7 @@ interface EsolveLocationRecord<T extends EsolveCustomFields = EsolveCustomFields
3272
2913
  image_name?: string;
3273
2914
  image_last_modified?: string;
3274
2915
  custom_fields?: T;
2916
+ sef_name?: string;
3275
2917
  }
3276
2918
 
3277
2919
  type EsolveLocationSortField = 'sorting_code' | 'price' | 'name' | 'description' | 'code' | 'created';
@@ -3323,6 +2965,7 @@ declare class EsolveLocation<T extends EsolveCustomFields = EsolveCustomFields>
3323
2965
  include_on_enquiries: boolean;
3324
2966
  include_on_store_locator: boolean;
3325
2967
  website_url: string;
2968
+ sef_name: string;
3326
2969
  address: EsolveLocationAddress;
3327
2970
  pobox_address: EsolveLocationPOBoxAddress;
3328
2971
  contact_info: EsolveLocationContactInfo;
@@ -4381,9 +4024,7 @@ type EsolveCartItemErrors = {
4381
4024
  [tempcart_id: number]: EsolveCartItemErrorRecord;
4382
4025
  };
4383
4026
 
4384
- type EsolveCartSetAction = 'add' | 'edit' | 'remove';
4385
-
4386
- type EsolveCart = EsolveCartItem[];
4027
+ type EsolveCartItemSortField = 'sorting_code' | 'price' | 'qty' | 'name' | 'description' | 'code' | 'type';
4387
4028
 
4388
4029
  /**
4389
4030
  * How a promotion's reward is expressed once qualified.
@@ -4409,6 +4050,10 @@ type EsolveCartPromotionProgressMode = 'qty' | 'any_one' | 'all';
4409
4050
  */
4410
4051
  type EsolveCartPromotionProgress = EsolveCartPromotionProgressItem[];
4411
4052
 
4053
+ type EsolveCartSetAction = 'add' | 'edit' | 'remove';
4054
+
4055
+ type EsolveCart = EsolveCartItem[];
4056
+
4412
4057
  type EsolveDeliveryCategoryTotalsMapRecord = Record<string, EsolveDeliveryCategoryTotalsRecord>;
4413
4058
 
4414
4059
  type EsolveDeliveryCategoryTotalsMap = Map<string, EsolveDeliveryCategoryTotals>;
@@ -4431,111 +4076,527 @@ declare class EsolveCartService {
4431
4076
  private readonly vouchers;
4432
4077
  private _cached_tracking;
4433
4078
  /**
4434
- * Retrieves the current cart
4435
- *
4436
- * @returns An `Observable` with an array of cart items
4079
+ * Retrieves the current cart
4080
+ *
4081
+ * @returns An `Observable` with an array of cart items
4082
+ */
4083
+ getCart(): Observable<EsolveCart>;
4084
+ /**
4085
+ * Updates the cart by preforming various actions, such as adding, editing or removing items from the cart.
4086
+ *
4087
+ * @param items An array of options to update the cart
4088
+ * @param action The default action to preform
4089
+ *
4090
+ * @returns An `Observable` with an array of responses that gives feedback on the requested changes
4091
+ */
4092
+ setCart(items: EsolveCartSetItem[], action?: EsolveCartSetAction): Observable<EsolveCartItemResponse[]>;
4093
+ setCartEmpty(type: EsolveTransactionType, additional_where: EsolveAdditionalWhere[]): Observable<EsolveEmptyCartResult>;
4094
+ /**
4095
+ * Retrieves the totals of the cart with all the totals calculated
4096
+ *
4097
+ * @returns An `Observable` with an object containing cart totals
4098
+ */
4099
+ getTotals(type?: EsolveTransactionType): Observable<EsolveCartTotals>;
4100
+ /**
4101
+ * Retrieves a tracking code for the cart
4102
+ *
4103
+ * @returns An `Observable` with the cart tracking code
4104
+ */
4105
+ getTrackingCode(): Observable<number>;
4106
+ /**
4107
+ * Get the data of the transaction for the analytics
4108
+ *
4109
+ * @param transaction_id ID of the transaction used in eSolve
4110
+ *
4111
+ * @returns An `Observable` with the analytics data
4112
+ */
4113
+ getTransactionAnalyticsData<T = any>(transaction_id: number): Observable<EsolveTransactionAnalyticsData<T>>;
4114
+ /**
4115
+ * Initiates checkout of the cart items
4116
+ *
4117
+ * @param type The cart type that needs to be checked out
4118
+ * @param addresses_id The ID of the delivery address
4119
+ * @param shipping_id The ID of the shipping method
4120
+ * @param payment_method_id The ID of the selected payment method
4121
+ * @param location_id The ID of the selected branch from with shipping needs to be calculated
4122
+ * @param comments Additional comments on the cart
4123
+ * @param time_slot The time slot to be used
4124
+ * @param apply_wallet Whether to apply wallet to the order
4125
+ * @param purchase_order_number Custom purchase order to added to transaction
4126
+ *
4127
+ * @returns An `Observable` with the transaction ID
4128
+ */
4129
+ checkout(type: EsolveTransactionType, addresses_id: number, shipping_id: number, payment_method_id?: number, location_id?: number, comments?: string, time_slot?: EsolveTimeSlotCheckout, apply_wallet?: boolean, purchase_order_number?: string, expected_date?: string): Observable<EsolveCheckoutResult>;
4130
+ getCartAlternatives(): Observable<EsolveCartAlternativesMap>;
4131
+ /**
4132
+ * Retrieves the active promotions the cart has not yet qualified for, with a
4133
+ * ready-to-display indicator message and the structured data behind it.
4134
+ *
4135
+ * The endpoint is read-only — it never applies discounts and never writes to
4136
+ * the cart. Call it whenever the cart changes (the same trigger used for
4137
+ * `getCart` / `getTotals`). A `no_records` soft-error (`records: []`) means
4138
+ * there is nothing to display — not a real failure — and resolves to an
4139
+ * empty array.
4140
+ *
4141
+ * @returns An `Observable` with an array of promotion progress entries
4142
+ */
4143
+ getCartPromotionProgress(): Observable<EsolveCartPromotionProgress>;
4144
+ /**
4145
+ * Set an alternative stock item to current cart item
4146
+ *
4147
+ * @param id It is used to identify the specific cart item for which the alternative is being set
4148
+ * @param alternative The alternative value that you want to set for a specific cart item.
4149
+ * @returns an Observable of type EsolveResponseResult.
4150
+ */
4151
+ setCartAlternative(id: number, alternative: string): Observable<EsolveResponseResult>;
4152
+ deleteCartAlternative(id: number): Observable<EsolveResult>;
4153
+ /**
4154
+ * Processes the eSolve tree records
4155
+ *
4156
+ * @param cart_item_records Records to process
4157
+ * @returns An array of processed cart items
4158
+ */
4159
+ private processCart;
4160
+ /**
4161
+ * Processes the eSolve cart alternatives records
4162
+ *
4163
+ * @param records Records to process
4164
+ *
4165
+ * @returns A `Map` of processed cart alternatives
4166
+ */
4167
+ private processCartAlternatives;
4168
+ /**
4169
+ * Processes the eSolve cart totals
4170
+ *
4171
+ * @param record Data to process
4172
+ * @returns Processed cart totals
4173
+ */
4174
+ private processCartTotals;
4175
+ /**
4176
+ * Processes the eSolve cart promotion progress records
4177
+ *
4178
+ * @param records Records to process
4179
+ * @returns An array of processed promotion progress entries
4180
+ */
4181
+ private processCartPromotionProgress;
4182
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCartService, never>;
4183
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCartService>;
4184
+ }
4185
+
4186
+ declare class EsolveCategoryTreeItem implements EsolveSeoDetails {
4187
+ type: 'category' | 'subcategory';
4188
+ esolve_id: string | number;
4189
+ parent_id: string;
4190
+ description: string;
4191
+ sef_description: string;
4192
+ short_description: string;
4193
+ sort_priority: number;
4194
+ active: boolean;
4195
+ display_only: boolean;
4196
+ private image_name;
4197
+ id: string;
4198
+ seo_details: EsolveSeoInfo;
4199
+ total_stock?: number;
4200
+ children?: EsolveCategoryTreeItem[];
4201
+ cart_sort: EsolveSort<EsolveCartItemSortField> | null;
4202
+ stock_sort: EsolveSort<EsolveStockSortField> | null;
4203
+ private image_path;
4204
+ get small_image_src(): string;
4205
+ get thumbnail_image_src(): string;
4206
+ get tiny_image_src(): string;
4207
+ constructor(type: 'category' | 'subcategory', esolve_id: string | number, parent_id: string, description: string, sef_description: string, short_description: string, sort_priority: number, active: boolean, display_only: boolean, image_name: string, seo_title: string, seo_keywords: string, seo_description: string, children?: EsolveCategoryTreeItem[], cart_sort?: {
4208
+ sort: EsolveCartItemSortField;
4209
+ order: EsolveSortOrder;
4210
+ }, stock_sort?: {
4211
+ sort: EsolveStockSortField;
4212
+ order: EsolveSortOrder;
4213
+ });
4214
+ getImagePath(image_size: 'small' | 'thumb' | 'tiny'): string;
4215
+ }
4216
+
4217
+ interface EsolveSubcategoryRecord {
4218
+ type: 'subcategory';
4219
+ id: number;
4220
+ menu_id: string;
4221
+ external_system_code: string;
4222
+ location_id: number;
4223
+ description: string;
4224
+ sef_description: string;
4225
+ seo_description: string;
4226
+ sort_priority: number;
4227
+ active: boolean;
4228
+ display_only: boolean;
4229
+ seo_page_title: string;
4230
+ seo_keywords: string;
4231
+ short_description: string;
4232
+ image: string;
4233
+ total_stock?: number;
4234
+ cart_sort?: {
4235
+ sort: EsolveCartItemSortField;
4236
+ order: EsolveSortOrder;
4237
+ };
4238
+ stock_sort?: {
4239
+ sort: EsolveStockSortField;
4240
+ order: EsolveSortOrder;
4241
+ };
4242
+ }
4243
+
4244
+ interface EsolveCategoryRecord {
4245
+ type: 'category';
4246
+ menu_id: string;
4247
+ owner_menu_id: string;
4248
+ description: string;
4249
+ sef_description: string;
4250
+ seo_description: string;
4251
+ sort_priority: number;
4252
+ active: boolean;
4253
+ display_only: boolean;
4254
+ seo_page_title: string;
4255
+ seo_keywords: string;
4256
+ short_description: string;
4257
+ image: string;
4258
+ total_stock?: number;
4259
+ children: (EsolveCategoryRecord | EsolveSubcategoryRecord)[];
4260
+ cart_sort?: {
4261
+ sort: EsolveCartItemSortField;
4262
+ order: EsolveSortOrder;
4263
+ };
4264
+ stock_sort?: {
4265
+ sort: EsolveStockSortField;
4266
+ order: EsolveSortOrder;
4267
+ };
4268
+ }
4269
+
4270
+ interface EsolveCategoryTreeItemRecord {
4271
+ type: 'category' | 'subcategory';
4272
+ id: string | number;
4273
+ parent_id: string;
4274
+ description: string;
4275
+ sef_description: string;
4276
+ short_description: string;
4277
+ sort_priority: number;
4278
+ active: boolean;
4279
+ display_only: boolean;
4280
+ seo_page_title: string;
4281
+ seo_keywords: string;
4282
+ seo_description: string;
4283
+ image: string;
4284
+ total_stock?: number;
4285
+ children?: EsolveCategoryTreeItemRecord[];
4286
+ cart_sort?: {
4287
+ sort: EsolveCartItemSortField;
4288
+ order: EsolveSortOrder;
4289
+ };
4290
+ stock_sort?: {
4291
+ sort: EsolveStockSortField;
4292
+ order: EsolveSortOrder;
4293
+ };
4294
+ }
4295
+
4296
+ interface EsolveCategoryTreeItemOptions {
4297
+ /**
4298
+ * Generated ID. Does not require type to be set.
4437
4299
  */
4438
- getCart(): Observable<EsolveCart>;
4300
+ id?: string;
4439
4301
  /**
4440
- * Updates the cart by preforming various actions, such as adding, editing or removing items from the cart.
4441
- *
4442
- * @param items An array of options to update the cart
4443
- * @param action The default action to preform
4444
- *
4445
- * @returns An `Observable` with an array of responses that gives feedback on the requested changes
4302
+ * Type category tree item. Required for if esolve_id or sef_description is set
4446
4303
  */
4447
- setCart(items: EsolveCartSetItem[], action?: EsolveCartSetAction): Observable<EsolveCartItemResponse[]>;
4448
- setCartEmpty(type: EsolveTransactionType, additional_where: EsolveAdditionalWhere[]): Observable<EsolveEmptyCartResult>;
4304
+ type?: 'category' | 'subcategory';
4449
4305
  /**
4450
- * Retrieves the totals of the cart with all the totals calculated
4451
- *
4452
- * @returns An `Observable` with an object containing cart totals
4306
+ * Search engine friendly description. Requires type to be set.
4453
4307
  */
4454
- getTotals(type?: EsolveTransactionType): Observable<EsolveCartTotals>;
4308
+ sef_description?: string;
4455
4309
  /**
4456
- * Retrieves a tracking code for the cart
4457
- *
4458
- * @returns An `Observable` with the cart tracking code
4310
+ * ID from eSolve. Requires type to be set.
4459
4311
  */
4460
- getTrackingCode(): Observable<number>;
4312
+ esolve_id?: number | string;
4313
+ }
4314
+
4315
+ interface EsolveCategoryIdentifier {
4316
+ type: 'category' | 'subcategory';
4317
+ esolve_id: number | string;
4318
+ }
4319
+
4320
+ declare class EsolveCategoryTreeService {
4321
+ private readonly config;
4322
+ private readonly http;
4461
4323
  /**
4462
- * Get the data of the transaction for the analytics
4463
- *
4464
- * @param transaction_id ID of the transaction used in eSolve
4465
- *
4466
- * @returns An `Observable` with the analytics data
4324
+ * Retrieves the category tree from eSolve instance and coverts it to the correct format.
4467
4325
  */
4468
- getTransactionAnalyticsData<T = any>(transaction_id: number): Observable<EsolveTransactionAnalyticsData<T>>;
4326
+ getCategoryTree(identifier?: string): Observable<EsolveCategoryTreeItem[]>;
4469
4327
  /**
4470
- * Initiates checkout of the cart items
4328
+ * Retrieve the special tree structure for a specific special from the eSolve
4329
+ * instance and converts it into the correct format
4471
4330
  *
4472
- * @param type The cart type that needs to be checked out
4473
- * @param addresses_id The ID of the delivery address
4474
- * @param shipping_id The ID of the shipping method
4475
- * @param payment_method_id The ID of the selected payment method
4476
- * @param location_id The ID of the selected branch from with shipping needs to be calculated
4477
- * @param comments Additional comments on the cart
4478
- * @param time_slot The time slot to be used
4479
- * @param apply_wallet Whether to apply wallet to the order
4480
- * @param purchase_order_number Custom purchase order to added to transaction
4331
+ * @param special_id Id of to special to get tree for
4481
4332
  *
4482
- * @returns An `Observable` with the transaction ID
4333
+ * @returns Observable containing special tree data
4483
4334
  */
4484
- checkout(type: EsolveTransactionType, addresses_id: number, shipping_id: number, payment_method_id?: number, location_id?: number, comments?: string, time_slot?: EsolveTimeSlotCheckout, apply_wallet?: boolean, purchase_order_number?: string, expected_date?: string): Observable<EsolveCheckoutResult>;
4485
- getCartAlternatives(): Observable<EsolveCartAlternativesMap>;
4335
+ getSpecialTree(special_id: number): Observable<EsolveCategoryTreeItem[]>;
4486
4336
  /**
4487
- * Retrieves the active promotions the cart has not yet qualified for, with a
4488
- * ready-to-display indicator message and the structured data behind it.
4337
+ * Retrieve the manufacturer tree structure for a specific manufacturer from the eSolve
4338
+ * instance and converts it into the correct format
4489
4339
  *
4490
- * The endpoint is read-only — it never applies discounts and never writes to
4491
- * the cart. Call it whenever the cart changes (the same trigger used for
4492
- * `getCart` / `getTotals`). A `no_records` soft-error (`records: []`) means
4493
- * there is nothing to display — not a real failure — and resolves to an
4494
- * empty array.
4340
+ * @param manufacturer_id Id of the manufacturer to get the tree for
4495
4341
  *
4496
- * @returns An `Observable` with an array of promotion progress entries
4342
+ * @returns Observable containing manufacturer tree data
4497
4343
  */
4498
- getCartPromotionProgress(): Observable<EsolveCartPromotionProgress>;
4344
+ getManufacturerTree(manufacturer_id: number): Observable<EsolveCategoryTreeItem[]>;
4499
4345
  /**
4500
- * Set an alternative stock item to current cart item
4346
+ * Retrieve the details of a category tree item from the eSolve instance and
4347
+ * converts it to the correct format.
4501
4348
  *
4502
- * @param id It is used to identify the specific cart item for which the alternative is being set
4503
- * @param alternative The alternative value that you want to set for a specific cart item.
4504
- * @returns an Observable of type EsolveResponseResult.
4349
+ * @param options Filter options
4505
4350
  */
4506
- setCartAlternative(id: number, alternative: string): Observable<EsolveResponseResult>;
4507
- deleteCartAlternative(id: number): Observable<EsolveResult>;
4351
+ getCategoryTreeItem(options: EsolveCategoryTreeItemOptions): Observable<EsolveCategoryTreeItem>;
4508
4352
  /**
4509
- * Processes the eSolve tree records
4353
+ * Processes the eSolve tree records and converts them into the correct format.
4510
4354
  *
4511
- * @param cart_item_records Records to process
4512
- * @returns An array of processed cart items
4355
+ * @param tree_records Records to process
4513
4356
  */
4514
- private processCart;
4357
+ private processTree;
4358
+ private processTreeItem;
4359
+ private processID;
4360
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCategoryTreeService, never>;
4361
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCategoryTreeService>;
4362
+ }
4363
+
4364
+ interface EsolveAssetRecord {
4365
+ id: number;
4366
+ src: string;
4367
+ name: string;
4368
+ type: EsolveAssetType;
4369
+ description: string;
4370
+ document_number?: string;
4371
+ document_type?: string;
4372
+ area_of_application?: string;
4373
+ asset_category?: string;
4374
+ asset_sub_category?: string;
4375
+ sort_priority?: number;
4376
+ created?: string;
4377
+ image_name?: string;
4378
+ category?: EsolveCategoryTreeItemRecord;
4379
+ subcategory?: EsolveCategoryTreeItemRecord;
4380
+ manufacturer?: EsolveManufacturerRecord;
4381
+ range?: EsolveRangeRecord;
4382
+ topics?: EsolveTopicRecord[];
4383
+ tags?: EsolveTagRecord[];
4384
+ url?: string;
4385
+ }
4386
+
4387
+ interface EsolveMediaAssetOptions extends EsolveAssetOptions {
4388
+ media_id?: number;
4389
+ media_identifier?: string;
4390
+ }
4391
+
4392
+ interface EsolveStockAssetOptions extends EsolveAssetOptions {
4393
+ code?: string;
4394
+ sef_name?: string;
4395
+ }
4396
+
4397
+ declare class EsolveLinkedAsset {
4398
+ id: number;
4399
+ name: string;
4400
+ type: EsolveAssetType;
4401
+ description: string;
4402
+ src: string;
4403
+ private image_name;
4515
4404
  /**
4516
- * Processes the eSolve cart alternatives records
4517
- *
4518
- * @param records Records to process
4519
- *
4520
- * @returns A `Map` of processed cart alternatives
4405
+ * Shortcut to `getImagePath()`
4521
4406
  */
4522
- private processCartAlternatives;
4407
+ get image_src(): string;
4408
+ constructor(record: EsolveLinkedAssetRecord);
4523
4409
  /**
4524
- * Processes the eSolve cart totals
4410
+ * Retrieve image path
4525
4411
  *
4526
- * @param record Data to process
4527
- * @returns Processed cart totals
4412
+ * @returns Image path on CDN, else empty string if no image exists
4528
4413
  */
4529
- private processCartTotals;
4414
+ getImagePath(): string;
4415
+ }
4416
+
4417
+ declare class EsolveAsset {
4418
+ id: number;
4419
+ src: string;
4420
+ name: string;
4421
+ type?: EsolveAssetType;
4422
+ description: string;
4423
+ document_number: string;
4424
+ document_type: string;
4425
+ area_of_application: string;
4426
+ asset_category: string;
4427
+ asset_sub_category: string;
4428
+ sort_priority: number;
4429
+ created?: string;
4430
+ category?: EsolveCategoryTreeItem;
4431
+ subcategory?: EsolveCategoryTreeItem;
4432
+ manufacturer?: EsolveManufacturer;
4433
+ range?: EsolveRange;
4434
+ topics: EsolveTopic[];
4435
+ tags: EsolveTag[];
4436
+ url: string;
4437
+ private image_name;
4530
4438
  /**
4531
- * Processes the eSolve cart promotion progress records
4439
+ * Shortcut to `getImagePath()`
4440
+ */
4441
+ get image_src(): string;
4442
+ constructor(record: EsolveAssetRecord);
4443
+ /**
4444
+ * Retrieve image path
4532
4445
  *
4533
- * @param records Records to process
4534
- * @returns An array of processed promotion progress entries
4446
+ * @returns Image path on CDN, else empty string if no image exists
4535
4447
  */
4536
- private processCartPromotionProgress;
4537
- static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCartService, never>;
4538
- static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCartService>;
4448
+ getImagePath(): string;
4449
+ }
4450
+
4451
+ declare class EsolveAssetsService {
4452
+ private readonly config;
4453
+ private readonly http;
4454
+ getAsset(id: number): Observable<EsolveAsset>;
4455
+ getAssets(options?: EsolveAssetOptions): Observable<EsolveAssetList>;
4456
+ getMediaAssets(options: EsolveMediaAssetOptions): Observable<EsolveAssetList>;
4457
+ getStockAssets(options: EsolveStockAssetOptions): Observable<EsolveAssetList>;
4458
+ private processAsset;
4459
+ private getAssetRecords;
4460
+ private parseOptions;
4461
+ private processAssetLists;
4462
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveAssetsService, never>;
4463
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveAssetsService>;
4464
+ }
4465
+
4466
+ declare enum EsolveEventType {
4467
+ FATAL_SESSION_ERROR = "FATAL_SESSION_ERROR",
4468
+ SESSION_VALIDATION_START = "SESSION_VALIDATION_START",
4469
+ SESSION_VALIDATION_END = "SESSION_VALIDATION_END",
4470
+ CART_ERROR = "CART_ERROR"
4471
+ }
4472
+
4473
+ interface EsolveEventRecord {
4474
+ type: EsolveEventType;
4475
+ message?: string;
4476
+ additional_data?: any;
4477
+ }
4478
+
4479
+ interface EsolveNotificationButtonActionRecord {
4480
+ text: string;
4481
+ module: string;
4482
+ target: EsolveUrlTarget;
4483
+ url: string;
4484
+ }
4485
+
4486
+ interface EsolveNotificationDateRecord {
4487
+ date: string;
4488
+ timestamp: number;
4489
+ }
4490
+
4491
+ interface EsolveNotificationDatesRecord {
4492
+ from: EsolveNotificationDateRecord;
4493
+ to: EsolveNotificationDateRecord;
4494
+ }
4495
+
4496
+ interface EsolveSystemNotificationOptions {
4497
+ exclude_ids?: number[];
4498
+ }
4499
+
4500
+ type EsolveNotificationPosition = 'top' | 'center' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
4501
+
4502
+ type EsolveNotificationSize = 'small' | 'normal' | 'large';
4503
+
4504
+ type EsolveNotificationType = 'modal' | 'floating_block' | 'toast';
4505
+
4506
+ interface EsolveSystemNotificationTypeRecord {
4507
+ id: number;
4508
+ identifier: string;
4509
+ title: string;
4510
+ type: EsolveNotificationType;
4511
+ position: EsolveNotificationPosition;
4512
+ size: EsolveNotificationSize;
4513
+ system_disable_order: boolean;
4514
+ }
4515
+
4516
+ interface EsolveSystemNotificationRecord {
4517
+ id: number;
4518
+ identifier: string;
4519
+ title: string;
4520
+ message: string;
4521
+ dates?: EsolveNotificationDatesRecord | null;
4522
+ timeout: number;
4523
+ display_every: number;
4524
+ button_actions: EsolveNotificationButtonActionRecord[];
4525
+ type: EsolveSystemNotificationTypeRecord;
4526
+ }
4527
+
4528
+ declare class EsolveEvent {
4529
+ private _type;
4530
+ private _message;
4531
+ private _additional_data?;
4532
+ get type(): EsolveEventType;
4533
+ get message(): string;
4534
+ get additional_data(): any;
4535
+ constructor(record: EsolveEventRecord);
4536
+ }
4537
+
4538
+ declare class EsolveNotificationButtonAction {
4539
+ text: string;
4540
+ url: string;
4541
+ module: string;
4542
+ target: EsolveUrlTarget;
4543
+ constructor(record?: EsolveNotificationButtonActionRecord);
4544
+ }
4545
+
4546
+ declare class EsolveNotificationDates {
4547
+ from: Date;
4548
+ to: Date;
4549
+ constructor(record: EsolveNotificationDatesRecord);
4550
+ }
4551
+
4552
+ declare class EsolveSystemNotificationType {
4553
+ id: number;
4554
+ identifier: string;
4555
+ title: string;
4556
+ system_disable_order: boolean;
4557
+ position: EsolveNotificationPosition;
4558
+ size: EsolveNotificationSize;
4559
+ type: EsolveNotificationType;
4560
+ constructor(record: EsolveSystemNotificationTypeRecord);
4561
+ }
4562
+
4563
+ declare class EsolveSystemNotification {
4564
+ id: number;
4565
+ identifier: string;
4566
+ title: string;
4567
+ message: string;
4568
+ timeout: number;
4569
+ display_every: number;
4570
+ button_actions: EsolveNotificationButtonAction[];
4571
+ type: EsolveSystemNotificationType;
4572
+ dates?: EsolveNotificationDates;
4573
+ constructor(record: EsolveSystemNotificationRecord);
4574
+ }
4575
+
4576
+ declare class EsolveEventTargetService {
4577
+ private readonly listeners;
4578
+ addEventListener(event_name: EsolveEventType, callback: (event: EsolveEvent) => void): void;
4579
+ removeEventListener(event_name: EsolveEventType, callback: (event: EsolveEvent) => void): void;
4580
+ dispatchEvent(event: EsolveEvent | EsolveEventType): void;
4581
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveEventTargetService, never>;
4582
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveEventTargetService>;
4583
+ }
4584
+
4585
+ declare class EsolveNotificationsService {
4586
+ private readonly config;
4587
+ private readonly http;
4588
+ getSystemNotifications(options?: EsolveSystemNotificationOptions): Observable<EsolveSystemNotification[]>;
4589
+ private processNotifications;
4590
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveNotificationsService, never>;
4591
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveNotificationsService>;
4592
+ }
4593
+
4594
+ interface EsolveAuthGetData {
4595
+ key: string;
4596
+ }
4597
+
4598
+ interface EsolveAuthCheckData extends Partial<EsolveAuthGetData> {
4599
+ key_okay: boolean;
4539
4600
  }
4540
4601
 
4541
4602
  interface EsolveAuthData {
@@ -5435,6 +5496,113 @@ declare class EsolvePaymentService {
5435
5496
  static ɵprov: i0.ɵɵInjectableDeclaration<EsolvePaymentService>;
5436
5497
  }
5437
5498
 
5499
+ interface EsolveEnquiryFormFieldRecordBase {
5500
+ id: number;
5501
+ identifier: string;
5502
+ type: string;
5503
+ label: string;
5504
+ description: string;
5505
+ required: boolean;
5506
+ /**
5507
+ * Fields sharing the same nonzero `layout_row` render together in one
5508
+ * Formly `fieldGroup` row instead of stacked. `0` (the default for every
5509
+ * field predating this) means "own row" — unchanged behavior.
5510
+ */
5511
+ layout_row: number;
5512
+ }
5513
+
5514
+ interface EsolveEnquiryFormFieldCheckboxRecord extends EsolveEnquiryFormFieldRecordBase {
5515
+ type: 'checkbox';
5516
+ options: {
5517
+ label: string;
5518
+ value: string;
5519
+ }[];
5520
+ }
5521
+
5522
+ interface EsolveEnquiryFormFieldFileRecord extends EsolveEnquiryFormFieldRecordBase {
5523
+ type: 'file';
5524
+ accept: string;
5525
+ }
5526
+
5527
+ interface EsolveEnquiryFormFieldRadioRecord extends EsolveEnquiryFormFieldRecordBase {
5528
+ type: 'radio';
5529
+ options: {
5530
+ label: string;
5531
+ value: string;
5532
+ }[];
5533
+ }
5534
+
5535
+ interface EsolveEnquiryFormFieldSelectRecord extends EsolveEnquiryFormFieldRecordBase {
5536
+ type: 'select';
5537
+ options: {
5538
+ label: string;
5539
+ value: string;
5540
+ }[];
5541
+ }
5542
+
5543
+ interface EsolveEnquiryFormFieldTextRecord extends EsolveEnquiryFormFieldRecordBase {
5544
+ type: 'input' | 'textarea' | 'phone' | 'email';
5545
+ placeholder: string;
5546
+ character_length: number;
5547
+ }
5548
+
5549
+ type EsolveEnquiryFormFieldRecord = EsolveEnquiryFormFieldTextRecord | EsolveEnquiryFormFieldSelectRecord | EsolveEnquiryFormFieldRadioRecord | EsolveEnquiryFormFieldCheckboxRecord | EsolveEnquiryFormFieldFileRecord;
5550
+
5551
+ interface EsolveEnquiryFormRecord {
5552
+ id: number;
5553
+ identifier: string;
5554
+ title: string;
5555
+ description: string;
5556
+ success_message: string;
5557
+ fields: EsolveEnquiryFormFieldRecord[];
5558
+ }
5559
+
5560
+ interface EsolveEnquiryFormSubmitResult {
5561
+ success: boolean;
5562
+ message: string;
5563
+ invalid_field_identifiers?: string[];
5564
+ }
5565
+
5566
+ declare class EsolveEnquiryFormField {
5567
+ id: number;
5568
+ identifier: string;
5569
+ type: string;
5570
+ label: string;
5571
+ description: string;
5572
+ required: boolean;
5573
+ placeholder: string;
5574
+ character_length: number;
5575
+ options: {
5576
+ label: string;
5577
+ value: string;
5578
+ }[];
5579
+ accept: string;
5580
+ layout_row: number;
5581
+ constructor(record?: Partial<EsolveEnquiryFormFieldRecord>);
5582
+ }
5583
+
5584
+ declare class EsolveEnquiryFormSubmissionResult {
5585
+ success: boolean;
5586
+ message: string;
5587
+ invalid_field_identifiers: string[];
5588
+ constructor(result: EsolveEnquiryFormSubmitResult);
5589
+ }
5590
+
5591
+ declare class EsolveEnquiryForm {
5592
+ id: number;
5593
+ identifier: string;
5594
+ title: string;
5595
+ description: string;
5596
+ success_message: string;
5597
+ fields: EsolveEnquiryFormField[];
5598
+ constructor(record?: Partial<EsolveEnquiryFormRecord>);
5599
+ private processFields;
5600
+ }
5601
+
5602
+ interface EsolveEnquiryFormSubmitHttpResponse {
5603
+ additional_data: EsolveEnquiryFormSubmitResult;
5604
+ }
5605
+
5438
5606
  type EsolveEnquiryResponse = EsolvePostResponseItem;
5439
5607
 
5440
5608
  declare class EsolveEnquiryResult extends EsolveResponseResult {
@@ -5442,6 +5610,46 @@ declare class EsolveEnquiryResult extends EsolveResponseResult {
5442
5610
  constructor(response: EsolveEnquiryResponse);
5443
5611
  }
5444
5612
 
5613
+ declare class EsolveEnquiryFormsService {
5614
+ private readonly http;
5615
+ private readonly config;
5616
+ private readonly errorHandler;
5617
+ /**
5618
+ * Fetch an enquiry form definition by its id or string identifier.
5619
+ *
5620
+ * @param params - Either `{ id: number }` or `{ identifier: string }`
5621
+ *
5622
+ * @returns an Observable of type EsolveEnquiryForm
5623
+ */
5624
+ getEnquiryForm(params: {
5625
+ id: number;
5626
+ } | {
5627
+ identifier: string;
5628
+ }): Observable<EsolveEnquiryForm>;
5629
+ /**
5630
+ * Submit a completed enquiry form.
5631
+ *
5632
+ * Resolves with the submit result — does not reject on validation failure.
5633
+ * Check `result.success` and `result.invalid_field_identifiers` to handle
5634
+ * field-level validation errors without clearing the form.
5635
+ *
5636
+ * Captcha fields (`captcha_key`, `captcha_code`) should be appended to
5637
+ * `form_data` by the caller when captcha is enabled.
5638
+ *
5639
+ * @param params - Either `{ id: number }` or `{ identifier: string }`
5640
+ * @param form_data - Completed form data; file fields appended as `File` objects
5641
+ *
5642
+ * @returns an Observable of type EsolveEnquiryFormSubmissionResult
5643
+ */
5644
+ submitEnquiryForm(params: {
5645
+ id: number;
5646
+ } | {
5647
+ identifier: string;
5648
+ }, form_data: FormData): Observable<EsolveEnquiryFormSubmissionResult>;
5649
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveEnquiryFormsService, never>;
5650
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveEnquiryFormsService>;
5651
+ }
5652
+
5445
5653
  declare class EsolveEnquiryService {
5446
5654
  private readonly config;
5447
5655
  private readonly http;
@@ -6117,11 +6325,35 @@ declare class EsolveCompetitionEntryResult extends EsolveResponseResult {
6117
6325
  constructor(response: EsolveCompetitionEntryResponse);
6118
6326
  }
6119
6327
 
6328
+ interface EsolveCompetitionEntryRecord {
6329
+ id: string;
6330
+ code: string;
6331
+ title: string;
6332
+ submitted_by: string;
6333
+ file_type: 'image' | 'video' | 'audio' | 'text' | 'pdf' | 'pptx' | 'docx';
6334
+ file_url: string;
6335
+ preview_url: string;
6336
+ date_submitted: string;
6337
+ status: 'pending' | 'approved' | 'winner';
6338
+ up_votes: number;
6339
+ down_votes: number;
6340
+ has_voted: boolean;
6341
+ text_content?: string;
6342
+ }
6343
+
6120
6344
  interface EsolveCompetitionOptions {
6121
6345
  competition_id?: number;
6122
6346
  identifier?: string;
6123
6347
  }
6124
6348
 
6349
+ /**
6350
+ * Raw public competition statistics shape returned by the API.
6351
+ */
6352
+ interface EsolveCompetitionStatsRecord {
6353
+ total_entries: number;
6354
+ total_votes: number;
6355
+ }
6356
+
6125
6357
  interface EsolveCompetitionWinnerRecord {
6126
6358
  userid: number;
6127
6359
  firstname: string;
@@ -6149,11 +6381,65 @@ interface EsolveCompetitionRecord {
6149
6381
  audio_attachment: boolean;
6150
6382
  video_attachment: boolean;
6151
6383
  image_attachment: boolean;
6384
+ document_attachment: boolean;
6152
6385
  text: boolean;
6153
6386
  display_timer: boolean;
6387
+ enable_voting: boolean;
6388
+ require_approval: boolean;
6389
+ stats: EsolveCompetitionStatsRecord;
6154
6390
  winners: EsolveCompetitionWinnerRecord[];
6155
6391
  }
6156
6392
 
6393
+ interface EsolveCompetitionVoteRecord extends EsolvePostResponseItem {
6394
+ entry_id: string;
6395
+ dowhat: 'up' | 'down';
6396
+ up_votes: number;
6397
+ down_votes: number;
6398
+ has_voted: boolean;
6399
+ }
6400
+
6401
+ declare class EsolveCompetitionEntry {
6402
+ id: string;
6403
+ code: string;
6404
+ title: string;
6405
+ submitted_by: string;
6406
+ file_type: EsolveCompetitionEntryRecord['file_type'];
6407
+ file_url: string;
6408
+ preview_url: string;
6409
+ date_submitted: string;
6410
+ status: EsolveCompetitionEntryRecord['status'];
6411
+ up_votes: number;
6412
+ down_votes: number;
6413
+ has_voted: boolean;
6414
+ text_content?: string;
6415
+ constructor(record?: Partial<EsolveCompetitionEntryRecord>);
6416
+ }
6417
+
6418
+ /**
6419
+ * Public competition statistics returned by the `get-competitions.php` service.
6420
+ */
6421
+ declare class EsolveCompetitionStats implements EsolveCompetitionStatsRecord {
6422
+ /**
6423
+ * Total approved entries submitted to the competition.
6424
+ */
6425
+ total_entries: number;
6426
+ /**
6427
+ * Total up + down votes cast across all competition entries.
6428
+ */
6429
+ total_votes: number;
6430
+ constructor(record?: Partial<EsolveCompetitionStatsRecord>);
6431
+ }
6432
+
6433
+ declare class EsolveCompetitionVoteResult extends EsolveResponseResult {
6434
+ success: boolean;
6435
+ entry_id: string;
6436
+ dowhat: 'up' | 'down';
6437
+ up_votes: number;
6438
+ down_votes: number;
6439
+ has_voted: boolean;
6440
+ constructor(record: EsolveCompetitionVoteRecord);
6441
+ }
6442
+
6157
6443
  declare class EsolveCompetitionWinner {
6158
6444
  /**
6159
6445
  * eSolve Generated ID
@@ -6227,6 +6513,18 @@ declare class EsolveCompetition {
6227
6513
  * Competition requires text submission
6228
6514
  */
6229
6515
  require_text: boolean;
6516
+ /**
6517
+ * Allow document (PDF/PPTX/DOCX) submissions
6518
+ */
6519
+ require_document: boolean;
6520
+ /**
6521
+ * Whether public voting on entries is enabled for this competition
6522
+ */
6523
+ enable_voting: boolean;
6524
+ /**
6525
+ * Whether new entries require moderator approval before they appear
6526
+ */
6527
+ require_approval: boolean;
6230
6528
  /**
6231
6529
  * List of competition winners
6232
6530
  */
@@ -6235,6 +6533,10 @@ declare class EsolveCompetition {
6235
6533
  * Display a count down timer
6236
6534
  */
6237
6535
  display_timer: boolean;
6536
+ /**
6537
+ * Public competition statistics (entries and votes)
6538
+ */
6539
+ stats: EsolveCompetitionStats;
6238
6540
  constructor(record?: Partial<EsolveCompetitionRecord>);
6239
6541
  }
6240
6542
 
@@ -6278,6 +6580,25 @@ declare class EsolveCompetitionsService {
6278
6580
  * @returns an Observable of type EsolveCompetitionEntryResult
6279
6581
  */
6280
6582
  setCompetitionEntry(competitions_id: number, form_data: FormData): Observable<EsolveCompetitionEntryResult>;
6583
+ /**
6584
+ * Retrieve a paginated list of approved entries for a competition.
6585
+ *
6586
+ * @param competitions_id - eSolve ID of the competition.
6587
+ * @param page - 1-based page number (optional).
6588
+ * @param rows - entries per page (optional).
6589
+ *
6590
+ * @returns an Observable of EsolveCompetitionEntry[].
6591
+ */
6592
+ getCompetitionEntries(competitions_id: number, page?: number, rows?: number): Observable<EsolveCompetitionEntry[]>;
6593
+ /**
6594
+ * Cast or retract a vote on a competition entry.
6595
+ *
6596
+ * @param competition_entry_id - UUID of the entry to vote on.
6597
+ * @param dowhat - `'up'` to upvote (default) or `'down'` to downvote.
6598
+ *
6599
+ * @returns an Observable of EsolveCompetitionVoteResult.
6600
+ */
6601
+ setCompetitionVote(competition_entry_id: string, dowhat?: 'up' | 'down'): Observable<EsolveCompetitionVoteResult>;
6281
6602
  private getCompetitionSingle;
6282
6603
  private getCompetitionRecords;
6283
6604
  private processCompetition;
@@ -6994,5 +7315,221 @@ declare class EsolveSettingsService {
6994
7315
  static ɵprov: i0.ɵɵInjectableDeclaration<EsolveSettingsService>;
6995
7316
  }
6996
7317
 
6997
- export { ESOLVE_CONNECT_CONFIG, ESOLVE_EURUS_AUTO_LOGIN, EsolveAccountConfirmationResult, EsolveAccountPayment, EsolveAccountService, EsolveAdditionalStockImage, EsolveAddress, EsolveAddressResult, EsolveAffiliate, EsolveAffiliateCheckResult, EsolveAffiliateLinkResult, EsolveAffiliateService, EsolveAlbum, EsolveAlbumImage, EsolveAlbumImageList, EsolveAlbumList, EsolveAlbumsService, EsolveAsset, EsolveAssetsService, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveBannerVideo, EsolveCaptcha, EsolveCaptchaService, EsolveCareer, EsolveCareersService, EsolveCartAlternative, EsolveCartErrorHandlerService, EsolveCartItem, EsolveCartItemError, EsolveCartPromotionProgressItem, EsolveCartPromotionProgressQualifyingItem, EsolveCartService, EsolveCartStockItem, EsolveCartTaxBreakdown, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveCdnSrcDirective, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveClientAsset, EsolveClientAssetList, EsolveColour, EsolveColoursService, EsolveCompetition, EsolveCompetitionDates, EsolveCompetitionEntryResult, EsolveCompetitionWinner, EsolveCompetitionsService, EsolveConfigService, EsolveCookieService, EsolveCountry, EsolveCountryService, EsolveCoupon, EsolveCouponsService, EsolveDeliveriesService, EsolveDelivery, EsolveDeliveryCategoryTotals, EsolveDeliveryList, EsolveDeliveryStatus, EsolveDependantItem, EsolveDeviceService, EsolveEmptyCartResult, EsolveEmptyWishlistResult, EsolveEnquiryResult, EsolveEnquiryService, EsolveErpDocumentRequest, EsolveErpDocumentsRequestResult, EsolveErrorHandlerService, EsolveEvent, EsolveEventTargetService, EsolveEventType, EsolveFilterFactory, EsolveGenericFilter, EsolveGeocodeAddressResult, EsolveGeocodeCoordsResult, EsolveGeocodeResult, EsolveGeocoderService, EsolveHttpError, EsolveLinkedAsset, EsolveLinkedStockItem, EsolveList, EsolveLocation, EsolveLocationAddress, EsolveLocationContactInfo, EsolveLocationGEO, EsolveLocationList, EsolveLocationPOBoxAddress, EsolveLocationTradingDay, EsolveLocationTradingTimes, EsolveLocationUpdateResult, EsolveLocationsService, EsolveManufacturer, EsolveManufacturersService, EsolveMaterial, EsolveMaterialsService, EsolveMediaStockItem, EsolveMenuItem, EsolveMenuService, EsolveMultipleSelectFilter, EsolveNewsArticle, EsolveNewsArticleAuthor, EsolveNewsArticleList, EsolveNewsGroup, EsolveNewsService, EsolveNewsletterResult, EsolveNotificationButtonAction, EsolveNotificationDates, EsolveNotificationsService, EsolveOtp, EsolveOtpService, EsolveOtpValidation, EsolvePaymentMethod, EsolvePaymentResult, EsolvePaymentService, EsolveRange, EsolveRangeFilter, EsolveRangesService, EsolveRecipeStockItem, EsolveRegistrationResult, EsolveResetPasswordResult, EsolveResponseHandlerService, EsolveResponseResult, EsolveResult, EsolveReview, EsolveReviewList, EsolveReviewResult, EsolveReviewsService, EsolveSearchCleanResult, EsolveSearchResult, EsolveSearchResultItem, EsolveSearchService, EsolveSearchVectorizeResult, EsolveSeoInfo, EsolveSeoService, EsolveSessionAddressUpdateResult, EsolveSessionClientUpdateResult, EsolveSessionMetadataService, EsolveSessionService, EsolveSessionShippingUpdateResult, EsolveSetDeviceResult, EsolveSetNotifyResult, EsolveSettings, EsolveSettingsService, EsolveShippingCost, EsolveShippingCostItem, EsolveShippingMethod, EsolveShippingService, EsolveShippingTotals, EsolveSingleSelectFilter, EsolveSpecial, EsolveSpecialDates, EsolveSpecialImage, EsolveSpecialImageCollection, EsolveSpecialsService, EsolveStatement, EsolveStatementAgeing, EsolveStatementBalances, EsolveStatementTransaction, EsolveStockBadge, EsolveStockBarcode, EsolveStockGroup, EsolveStockGroupItem, EsolveStockImage, EsolveStockImageCollection, EsolveStockItem, EsolveStockItemBase, EsolveStockItemList, EsolveStockItemLocationLevel, EsolveStockLeadTimes, EsolveStockPrice, EsolveStockReviewsReport, EsolveStockService, EsolveStockTransactionSales, EsolveSuggestedStockItem, EsolveSupplier, EsolveSuppliersService, EsolveSystemNotification, EsolveSystemNotificationType, EsolveTag, EsolveTagsService, EsolveTimeSlot, EsolveTimeSlotConfig, EsolveTimeSlotDate, EsolveTimeSlotDays, EsolveTimeSlotTimes, EsolveToggleFilter, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionAnalyticsData, EsolveTransactionApprovalResult, EsolveTransactionClient, EsolveTransactionDelivery, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionPick, EsolveTransactionShippingMethod, EsolveTransactionTimeSlot, EsolveTransactionUser, EsolveTransactionsService, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveUserClientAccount, EsolveUserClientAccountBalances, EsolveUserDevice, EsolveVaultItem, EsolveVaultItemResult, EsolveVoucher, EsolveVouchersService, EsolveWalletBalances, EsolveWalletService, EsolveWalletTransaction, EsolveWalletTransactionsList, EsolveWishlistItem, EsolveWishlistService, NgEsolveConnectModule, esolveAuthInterceptor, esolveHexHash, esolveUnauthorizedErrorInterceptor, isEsolveCdnPath, isFtgCdnPath, isLegacyEsolveCdnPath, processEsolveImageSrc, provideEsolveImageLoader, provideNgEsolveConnect };
6998
- export type { EsolveAccountConfirmationPostResponseItem, EsolveAccountPaymentRecord, EsolveAccountPaymentsOptions, EsolveAdditionalStockImageRecord, EsolveAdditionalWhere, EsolveAddressPlaceType, EsolveAddressPostData, EsolveAddressRecord, EsolveAddressResponse, EsolveAddressType, EsolveAffiliateCheckRecord, EsolveAffiliateLinkOptions, EsolveAffiliateLinkResponse, EsolveAffiliateRecord, EsolveAffiliatesOptions, EsolveAlbumImageOptions, EsolveAlbumImageRecord, EsolveAlbumImageSize, EsolveAlbumOptions, EsolveAlbumRecord, EsolveAssetList, EsolveAssetOptions, EsolveAssetRecord, EsolveAssetType, EsolveAuthCheckData, EsolveAuthCheckResponse, EsolveAuthData, EsolveAuthGetData, EsolveAuthGetResponse, EsolveAuthResponse, EsolveAuthResponseData, EsolveAuthResult, EsolveBannerImageHotspotCoords, EsolveBannerImageHotspotRecord, EsolveBannerImageRecord, EsolveBannerImageSet, EsolveBannerImageType, EsolveBannerLink, EsolveBannerRecord, EsolveBannerType, EsolveBannerVideoRecord, EsolveCaptchaAction, EsolveCaptchaOptions, EsolveCaptchaRecord, EsolveCardData, EsolveCareerOptions, EsolveCareerRecord, EsolveCareerType, EsolveCareersSortField, EsolveCart, EsolveCartAdditionalParams, EsolveCartAlternativeRecord, EsolveCartAlternativesMap, EsolveCartEmptyResponse, EsolveCartErrors, EsolveCartItemErrorRecord, EsolveCartItemErrors, EsolveCartItemRecord, EsolveCartItemResponse, EsolveCartPromotionProgress, EsolveCartPromotionProgressDiscountType, EsolveCartPromotionProgressItemType, EsolveCartPromotionProgressMode, EsolveCartPromotionProgressQualifyingItemRecord, EsolveCartPromotionProgressRecord, EsolveCartSetAction, EsolveCartSetItem, EsolveCartTotalsRecord, EsolveCategoryIdentifier, EsolveCategoryRecord, EsolveCategoryTreeItemOptions, EsolveCategoryTreeItemRecord, EsolveCheckoutBody, EsolveCheckoutResponse, EsolveClientAssetRecord, EsolveClientAssetsOptions, EsolveColourOptions, EsolveColourRecord, EsolveCompetitionOptions, EsolveCompetitionRecord, EsolveCompetitionWinnerRecord, EsolveConnectConfig, EsolveCookieOptions, EsolveCountryOptions, EsolveCountryRecord, EsolveCouponRecord, EsolveCouponValidation, EsolveCouponValidationError, EsolveCouponValidationResult, EsolveCouponsCache, EsolveCustomFields, EsolveDeleteResponse, EsolveDeleteResult, EsolveDeliveriesOptions, EsolveDeliveriesSortField, EsolveDeliveryCategoryTotalsMap, EsolveDeliveryCategoryTotalsMapRecord, EsolveDeliveryCategoryTotalsRecord, EsolveDeliveryIntegration, EsolveDeliveryRecord, EsolveDeliveryStatusRecord, EsolveDeliveryStatusType, EsolveDeliveryType, EsolveDependantItemRecord, EsolveDevice, EsolveDeviceType, EsolveEnquiryResponse, EsolveErpDocumentRequestRecord, EsolveErpSalesStockSortField, EsolveEventRecord, EsolveFilter, EsolveFilterDefinitions, EsolveFilterList, EsolveFilterRecord, EsolveFilterRecordList, EsolveFilterType, EsolveForgotPasswordGetResult, EsolveForgotPasswordResponse, EsolveGenericFilterDefinition, EsolveGeocodeAddressRecord, EsolveGeocodeResponse, EsolveGeocodeResultRecord, EsolveGetResponse, EsolveInsuranceCalculationMethod, EsolveIntegrationType, EsolveLinkedAssetRecord, EsolveLinkedStockRecord, EsolveLocationFilterOptions, EsolveLocationGeoOptions, EsolveLocationImageSize, EsolveLocationOption, EsolveLocationOptions, EsolveLocationRecord, EsolveLocationSortField, EsolveLoginPostResponseItem, EsolveLoginResponse, EsolveLogoutResponse, EsolveManufacturerImageSize, EsolveManufacturerOptions, EsolveManufacturerRecord, EsolveMaterialOptions, EsolveMaterialPhraseMatchMode, EsolveMaterialRecord, EsolveMediaAssetOptions, EsolveMediaStockItemList, EsolveMediaStockItemOptions, EsolveMediaStockItemRecord, EsolveMediaStockSortField, EsolveMenu, EsolveMenuTreeRecord, EsolveNewsArticleAuthorRecord, EsolveNewsArticleOptions, EsolveNewsArticleRecord, EsolveNewsGroupRecord, EsolveNewsletterResponse, EsolveNotificationButtonActionRecord, EsolveNotificationDateRecord, EsolveNotificationDatesRecord, EsolveNotificationPosition, EsolveNotificationSize, EsolveNotificationType, EsolveOtpAction, EsolveOtpOptions, EsolveOtpRecord, EsolveOtpValidationRecord, EsolvePaymentFormInput, EsolvePaymentMethodOptions, EsolvePaymentMethodRecord, EsolvePaymentRedirectLinks, EsolvePaymentResponse, EsolvePaymentSetBody, EsolvePaymentStatus, EsolvePickStatusType, EsolvePostResponseItem, EsolvePostResponseStatus, EsolveRangeFilterDefinition, EsolveRangeFilterRecord, EsolveRangeFilterType, EsolveRangeOptions, EsolveRangeRecord, EsolveRecipeItemRecord, EsolveRecipeStockOptions, EsolveRegistrationData, EsolveRegistrationPostResponseItem, EsolveResponse, EsolveResponseLogItem, EsolveReviewListRecord, EsolveReviewOptions, EsolveReviewRecord, EsolveReviewReport, EsolveReviewResponse, EsolveReviewSortField, EsolveReviewUser, EsolveSearchAuthStatus, EsolveSearchAuthStatusType, EsolveSearchBillingRequest, EsolveSearchBillingResponse, EsolveSearchBillingTotal, EsolveSearchCleanResponse, EsolveSearchRequest, EsolveSearchResponse, EsolveSearchResultRecord, EsolveSearchVectorizeGetRequest, EsolveSearchVectorizeGetResponse, EsolveSearchVectorizeItem, EsolveSearchVectorizeRequest, EsolveSearchVectorizeResponse, EsolveSelectFilter, EsolveSelectFilterRecord, EsolveSelectFilterType, EsolveSeoDetails, EsolveServiceProvider, EsolveSession, EsolveSessionData, EsolveSessionUpdateOptions, EsolveSetResponse, EsolveSettingsRecord, EsolveShippingCalculationMethod, EsolveShippingCostItemRecord, EsolveShippingCostRecord, EsolveShippingLocation, EsolveShippingMethodOptions, EsolveShippingMethodRecord, EsolveSort, EsolveSortOrder, EsolveSpecialImageCollectionRecord, EsolveSpecialImageRecord, EsolveSpecialOptions, EsolveSpecialRecord, EsolveStatementAgeingRecord, EsolveStatementBalancesRecord, EsolveStatementRecord, EsolveStatementTransactionRecord, EsolveStockAssetOptions, EsolveStockBadgeRecord, EsolveStockBarcodeOptions, EsolveStockBarcodeRecord, EsolveStockBaseRecord, EsolveStockCartParameter, EsolveStockCartParameterInput, EsolveStockFilterOptions, EsolveStockGroupItemRecord, EsolveStockHistorySortField, EsolveStockImageCollectionRecord, EsolveStockImageSize, EsolveStockItemBaseOptions, EsolveStockItemHistoryOptions, EsolveStockItemLocationLevelRecord, EsolveStockItemOptions, EsolveStockLeadTimesRecord, EsolveStockLinkedCategoryRecord, EsolveStockRecord, EsolveStockReviewsReportRecord, EsolveStockSortField, EsolveStockType, EsolveStockUnitOfMeasure, EsolveSubcategoryRecord, EsolveSupplierOptions, EsolveSupplierRecord, EsolveSystemNotificationOptions, EsolveSystemNotificationRecord, EsolveSystemNotificationTypeRecord, EsolveTagOptions, EsolveTagPhraseMatchMode, EsolveTagRecord, EsolveTimeSlotCheckout, EsolveTimeSlotConfigRecord, EsolveTimeSlotDateRecord, EsolveTimeSlotDaysRecord, EsolveTimeSlotRecord, EsolveTimeSlotTimesRecord, EsolveToggleFilterType, EsolveTopicRecord, EsolveTrackingCode, EsolveTranactionApproval, EsolveTransactionAnalyticsDataRecord, EsolveTransactionApprovalState, EsolveTransactionClientRecord, EsolveTransactionItemRecord, EsolveTransactionLocationRecord, EsolveTransactionOptions, EsolveTransactionPaymentMethodRecord, EsolveTransactionRecord, EsolveTransactionSalesStockItemOptions, EsolveTransactionShippingMethodRecord, EsolveTransactionSortField, EsolveTransactionTimeSlotRecord, EsolveTransactionType, EsolveTransactionUserRecord, EsolveUrlTarget, EsolveUserAccountData, EsolveUserAccountRecord, EsolveUserClientAccountBalancesRecord, EsolveUserClientAccountRecord, EsolveUserDeviceOptions, EsolveUserDeviceRecord, EsolveValidateOtpResponse, EsolveVaultRecord, EsolveVaultResponse, EsolveVoucherRecord, EsolveVoucherValidation, EsolveVoucherValidationError, EsolveVoucherValidationResult, EsolveVouchersCache, EsolveWalletBalancesRecord, EsolveWalletCashOutOptions, EsolveWalletCashOutResponse, EsolveWalletTransactionOptions, EsolveWalletTransactionRecord, EsolveWalletTransactionType, EsolveWishlist, EsolveWishlistItemRecord, EsolveWishlistItemResponse, EsolveWishlistSetAction, EsolveWishlistSetItem };
7318
+ /**
7319
+ * Suggestion-chip intents the frontend handles locally with no server call.
7320
+ * The server emits these in `suggestions[].intent`; they never appear in the
7321
+ * top-level response `intent` and are never sent back to `set-chat-intent.php`.
7322
+ */
7323
+ type EsolveChatClientActionIntent = 'view_cart' | 'checkout';
7324
+
7325
+ type EsolveChatDisplayHint = 'grid' | 'multi_grid' | 'list' | 'map' | 'text';
7326
+
7327
+ type EsolveChatIntent = 'product_search' | 'product_catalog' | 'add_to_basket' | 'directions' | 'list_brands' | 'general';
7328
+
7329
+ type EsolveChatIntentRequest = EsolveChatIntentMessageRequest | EsolveChatIntentDispatchRequest;
7330
+
7331
+ /**
7332
+ * "View more" target for a `product_catalog` group, resolved server-side
7333
+ * from the AI's guessed `filters` (`category`/`subcategory`/`brand`/`tag`)
7334
+ * against the store's real taxonomy — see
7335
+ * `ChatIntentDispatcher::resolveGroupLink()` on the esolve side. `null` when
7336
+ * no filter dimension resolved to a real record; the group still renders,
7337
+ * it just has no "View more" link.
7338
+ *
7339
+ * `type` selects which storefront route to build:
7340
+ * - `category`: `/category/:sef`
7341
+ * - `subcategory`: `/category/:parent_sef/subcategory/:sef`
7342
+ * - `brand`: `/brands/:sef`
7343
+ * - `tag`: `/search/tag/:phrase`
7344
+ *
7345
+ * `topic` is intentionally not included — the server does not currently
7346
+ * resolve topic filters to a link (no reliable sef/slug to route to).
7347
+ */
7348
+ type EsolveChatProductGroupLinkRecord = {
7349
+ type: 'category';
7350
+ sef: string;
7351
+ } | {
7352
+ type: 'subcategory';
7353
+ sef: string;
7354
+ parent_sef: string;
7355
+ } | {
7356
+ type: 'brand';
7357
+ sef: string;
7358
+ } | {
7359
+ type: 'tag';
7360
+ phrase: string;
7361
+ };
7362
+
7363
+ /** The `intent` on a suggestion chip — a server intent (dispatch) or a client-action intent (local). */
7364
+ type EsolveChatSuggestionIntent = EsolveChatIntent | EsolveChatClientActionIntent;
7365
+
7366
+ interface EsolveChatMessage {
7367
+ role: 'user' | 'assistant';
7368
+ content: string;
7369
+ }
7370
+
7371
+ /** Structured chip tap — direct dispatch, no AI round trip. */
7372
+ interface EsolveChatIntentDispatchRequest {
7373
+ /** One of the 5 server intents. Client-action intents are never sent here. */
7374
+ intent: EsolveChatIntent;
7375
+ parameters: Record<string, unknown>;
7376
+ history?: EsolveChatMessage[];
7377
+ /** Chip phrase recorded as the user turn in history. Falls back to parameters.query server-side. */
7378
+ phrase?: string;
7379
+ }
7380
+
7381
+ /** Free-text message — AI classification. */
7382
+ interface EsolveChatIntentMessageRequest {
7383
+ message: string;
7384
+ history: EsolveChatMessage[];
7385
+ context?: string;
7386
+ }
7387
+
7388
+ /**
7389
+ * Raw `{label, items, link}` group shape the `product_catalog` intent
7390
+ * returns in `data` (`display_hint: 'multi_grid'`) — one group per
7391
+ * `parameters.groups` entry the AI resolved a search for. `items` is the
7392
+ * same raw `'lite'` field-set stock row shape `product_search`/
7393
+ * `get-items.php` return; never a bespoke chat-only shape.
7394
+ */
7395
+ interface EsolveChatProductGroupRecord {
7396
+ /** Group heading (e.g. a category or theme name). Empty string when the server had no label to give — e.g. the legacy single-query fallback. */
7397
+ label: string;
7398
+ items: Partial<EsolveStockBaseRecord>[];
7399
+ /** "View more" target resolved from this group's filters, or `null` when none of them matched a real category/subcategory/brand/tag. */
7400
+ link: EsolveChatProductGroupLinkRecord | null;
7401
+ }
7402
+
7403
+ /**
7404
+ * One quick-reply chip offered after an assistant turn. `intent` is the
7405
+ * routing key — server intents are tapped via
7406
+ * {@link EsolveChatService.dispatchIntent} (no AI round trip); client-action
7407
+ * intents (`view_cart`, `checkout`) are mapped locally by the consumer with
7408
+ * no server call. `query` is the free-text fallback, always present.
7409
+ */
7410
+ interface EsolveChatSuggestion {
7411
+ /** Short text to show on the chip. */
7412
+ label: string;
7413
+ /** Routing key: a server intent (dispatch) or a client-action intent (local). */
7414
+ intent: EsolveChatSuggestionIntent;
7415
+ /** Intent parameters for structured routing. Empty for client-action chips. */
7416
+ parameters: Record<string, unknown>;
7417
+ /** Free-text fallback message; always present. */
7418
+ query: string;
7419
+ }
7420
+
7421
+ /**
7422
+ * `data` is whatever raw row shape the matched intent's action already
7423
+ * returns server-side — the same `Partial<EsolveStockBaseRecord>`,
7424
+ * `EsolveLocationRecord`, or `Partial<EsolveManufacturerRecord>` shape the
7425
+ * rest of the app builds from `get-items.php` / `get-locations.php` /
7426
+ * `get-manufacturers.php` — never a bespoke chat-only shape. The one
7427
+ * exception is `product_catalog`, whose rows are already grouped
7428
+ * server-side (`{label, items}[]`, `display_hint: 'multi_grid'`) since a
7429
+ * single flat item list can't represent multiple labelled grids.
7430
+ */
7431
+ interface EsolveChatIntentResponse {
7432
+ intent: EsolveChatIntent;
7433
+ parameters: Record<string, unknown>;
7434
+ reply: string;
7435
+ history: EsolveChatMessage[];
7436
+ data: Partial<EsolveStockBaseRecord>[] | EsolveLocationRecord[] | Partial<EsolveManufacturerRecord>[] | EsolveChatProductGroupRecord[] | [];
7437
+ context: string;
7438
+ display_hint: EsolveChatDisplayHint;
7439
+ suggestions: EsolveChatSuggestion[];
7440
+ }
7441
+
7442
+ /**
7443
+ * One labelled product grid within a `product_catalog` (`multi_grid`) chat
7444
+ * result — e.g. "Under R500", "Best sellers". `items` are built the same way
7445
+ * `EsolveChatIntentResult.items` builds `product_search` results, just
7446
+ * grouped under a label instead of a single flat list. `link` is an optional
7447
+ * "View more" target the consumer can build a route from — `null` when the
7448
+ * server couldn't resolve any of this group's filters to a real
7449
+ * category/subcategory/brand/tag.
7450
+ */
7451
+ declare class EsolveChatProductGroup {
7452
+ label: string;
7453
+ items: EsolveStockItemBase[];
7454
+ link: EsolveChatProductGroupLinkRecord | null;
7455
+ constructor(record: EsolveChatProductGroupRecord);
7456
+ }
7457
+
7458
+ declare class EsolveChatIntentResult {
7459
+ intent: EsolveChatIntent;
7460
+ parameters: Record<string, unknown>;
7461
+ reply: string;
7462
+ history: EsolveChatMessage[];
7463
+ /**
7464
+ * Raw `'lite'` field-set stock rows — the same shape and model
7465
+ * `get-items.php` results use elsewhere in the app — rather than a
7466
+ * bespoke chat-only item shape. The full StockSearch already runs
7467
+ * server-side regardless, so there's nothing cheaper to build a
7468
+ * duplicate model from.
7469
+ *
7470
+ * Populated for `product_search` and `add_to_basket` only. `product_catalog`
7471
+ * results come back grouped — see {@link groups} — since a flat item list
7472
+ * can't represent multiple labelled grids.
7473
+ */
7474
+ items: EsolveStockItemBase[];
7475
+ /**
7476
+ * Labelled product grids for the `product_catalog` intent
7477
+ * (`display_hint: 'multi_grid'`) — one StockSearch per group, run
7478
+ * server-side. Empty for every other intent.
7479
+ */
7480
+ groups: EsolveChatProductGroup[];
7481
+ /** Raw location rows, same shape/model `get-locations.php` results use. */
7482
+ locations: EsolveLocation[];
7483
+ /** Raw manufacturer rows, same shape/model `get-manufacturers.php` results use. */
7484
+ brands: EsolveManufacturer[];
7485
+ /** Pass back as `context` on the next {@link EsolveChatService.sendMessage} call. Empty string when there are no results. */
7486
+ context: string;
7487
+ /** UI rendering hint from the server: `'grid'`, `'multi_grid'`, `'list'`, `'map'`, or `'text'`. */
7488
+ display_hint: EsolveChatDisplayHint;
7489
+ /** Up to 3 quick-reply chips to show after this turn. */
7490
+ suggestions: EsolveChatSuggestion[];
7491
+ constructor(response: EsolveChatIntentResponse);
7492
+ }
7493
+
7494
+ declare class EsolveChatService {
7495
+ private readonly http;
7496
+ private readonly config;
7497
+ private readonly errorHandler;
7498
+ /**
7499
+ * Send a free-text message to the chat assistant (AI classification).
7500
+ *
7501
+ * The caller is responsible for persisting `result.history` and
7502
+ * `result.context` between turns and passing them back on the next call.
7503
+ * The server caps history at 50 messages and summarises automatically.
7504
+ *
7505
+ * @param message The user's message (max 1024 chars; truncated server-side).
7506
+ * @param history History from the previous `EsolveChatIntentResult.history`.
7507
+ * Pass an empty array to start a new conversation.
7508
+ * @param context Pass back `EsolveChatIntentResult.context` from the previous
7509
+ * turn so the AI can answer follow-up questions about results
7510
+ * currently shown on screen. Omit or pass `null` / `''` when
7511
+ * there are no current results. Never stored in history.
7512
+ */
7513
+ sendMessage(message: string, history?: EsolveChatIntentMessageRequest['history'], context?: string): Observable<EsolveChatIntentResult>;
7514
+ /**
7515
+ * Dispatch a structured suggestion-chip tap directly — no AI round trip.
7516
+ *
7517
+ * Use this when the consumer taps a chip whose `intent` is a server intent
7518
+ * (`product_search`, `product_catalog`, `add_to_basket`, `directions`,
7519
+ * `list_brands`). Client-action intents (`view_cart`, `checkout`) are handled
7520
+ * locally by the consumer and never reach this method.
7521
+ *
7522
+ * @param intent One of the 5 server intents.
7523
+ * @param parameters The chip's `parameters` (sent back verbatim).
7524
+ * @param history History from the previous `EsolveChatIntentResult.history`.
7525
+ * @param phrase The chip's phrase, recorded as the user turn in history.
7526
+ * Omit to let the server fall back to `parameters.query`.
7527
+ */
7528
+ dispatchIntent(intent: EsolveChatIntent, parameters: Record<string, unknown>, history?: EsolveChatIntentDispatchRequest['history'], phrase?: string): Observable<EsolveChatIntentResult>;
7529
+ private post;
7530
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveChatService, never>;
7531
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveChatService>;
7532
+ }
7533
+
7534
+ export { ESOLVE_CONNECT_CONFIG, ESOLVE_EURUS_AUTO_LOGIN, EsolveAccountConfirmationResult, EsolveAccountPayment, EsolveAccountService, EsolveAdditionalStockImage, EsolveAddress, EsolveAddressResult, EsolveAffiliate, EsolveAffiliateCheckResult, EsolveAffiliateLinkResult, EsolveAffiliateService, EsolveAlbum, EsolveAlbumImage, EsolveAlbumImageList, EsolveAlbumList, EsolveAlbumsService, EsolveAsset, EsolveAssetsService, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveBannerVideo, EsolveCaptcha, EsolveCaptchaService, EsolveCareer, EsolveCareersService, EsolveCartAlternative, EsolveCartErrorHandlerService, EsolveCartItem, EsolveCartItemError, EsolveCartPromotionProgressItem, EsolveCartPromotionProgressQualifyingItem, EsolveCartService, EsolveCartStockItem, EsolveCartTaxBreakdown, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveCdnSrcDirective, EsolveChangePasswordResult, EsolveChatIntentResult, EsolveChatProductGroup, EsolveChatService, EsolveCheckoutResult, EsolveClientAsset, EsolveClientAssetList, EsolveColour, EsolveColoursService, EsolveCompetition, EsolveCompetitionDates, EsolveCompetitionEntry, EsolveCompetitionEntryResult, EsolveCompetitionStats, EsolveCompetitionVoteResult, EsolveCompetitionWinner, EsolveCompetitionsService, EsolveConfigService, EsolveCookieService, EsolveCountry, EsolveCountryService, EsolveCoupon, EsolveCouponsService, EsolveDeliveriesService, EsolveDelivery, EsolveDeliveryCategoryTotals, EsolveDeliveryList, EsolveDeliveryStatus, EsolveDependantItem, EsolveDeviceService, EsolveEmptyCartResult, EsolveEmptyWishlistResult, EsolveEnquiryForm, EsolveEnquiryFormField, EsolveEnquiryFormSubmissionResult, EsolveEnquiryFormsService, EsolveEnquiryResult, EsolveEnquiryService, EsolveErpDocumentRequest, EsolveErpDocumentsRequestResult, EsolveErrorHandlerService, EsolveEvent, EsolveEventTargetService, EsolveEventType, EsolveFilterFactory, EsolveGenericFilter, EsolveGeocodeAddressResult, EsolveGeocodeCoordsResult, EsolveGeocodeResult, EsolveGeocoderService, EsolveHttpError, EsolveLinkedAsset, EsolveLinkedStockItem, EsolveList, EsolveLocation, EsolveLocationAddress, EsolveLocationContactInfo, EsolveLocationGEO, EsolveLocationList, EsolveLocationPOBoxAddress, EsolveLocationTradingDay, EsolveLocationTradingTimes, EsolveLocationUpdateResult, EsolveLocationsService, EsolveManufacturer, EsolveManufacturersService, EsolveMaterial, EsolveMaterialsService, EsolveMediaStockItem, EsolveMenuItem, EsolveMenuService, EsolveMultipleSelectFilter, EsolveNewsArticle, EsolveNewsArticleAuthor, EsolveNewsArticleList, EsolveNewsGroup, EsolveNewsService, EsolveNewsletterResult, EsolveNotificationButtonAction, EsolveNotificationDates, EsolveNotificationsService, EsolveOtp, EsolveOtpService, EsolveOtpValidation, EsolvePaymentMethod, EsolvePaymentResult, EsolvePaymentService, EsolveRange, EsolveRangeFilter, EsolveRangesService, EsolveRecipeStockItem, EsolveRegistrationResult, EsolveResetPasswordResult, EsolveResponseHandlerService, EsolveResponseResult, EsolveResult, EsolveReview, EsolveReviewList, EsolveReviewResult, EsolveReviewsService, EsolveSearchCleanResult, EsolveSearchResult, EsolveSearchResultItem, EsolveSearchService, EsolveSearchVectorizeResult, EsolveSeoInfo, EsolveSeoService, EsolveSessionAddressUpdateResult, EsolveSessionClientUpdateResult, EsolveSessionMetadataService, EsolveSessionService, EsolveSessionShippingUpdateResult, EsolveSetDeviceResult, EsolveSetNotifyResult, EsolveSettings, EsolveSettingsService, EsolveShippingCost, EsolveShippingCostItem, EsolveShippingMethod, EsolveShippingService, EsolveShippingTotals, EsolveSingleSelectFilter, EsolveSpecial, EsolveSpecialDates, EsolveSpecialImage, EsolveSpecialImageCollection, EsolveSpecialsService, EsolveStatement, EsolveStatementAgeing, EsolveStatementBalances, EsolveStatementTransaction, EsolveStockBadge, EsolveStockBarcode, EsolveStockGroup, EsolveStockGroupItem, EsolveStockImage, EsolveStockImageCollection, EsolveStockItem, EsolveStockItemBase, EsolveStockItemList, EsolveStockItemLocationLevel, EsolveStockLeadTimes, EsolveStockLinkedCategory, EsolveStockPrice, EsolveStockReviewsReport, EsolveStockService, EsolveStockTransactionSales, EsolveSuggestedStockItem, EsolveSupplier, EsolveSuppliersService, EsolveSystemNotification, EsolveSystemNotificationType, EsolveTag, EsolveTagsService, EsolveTimeSlot, EsolveTimeSlotConfig, EsolveTimeSlotDate, EsolveTimeSlotDays, EsolveTimeSlotTimes, EsolveToggleFilter, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionAnalyticsData, EsolveTransactionApprovalResult, EsolveTransactionClient, EsolveTransactionDelivery, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionPick, EsolveTransactionShippingMethod, EsolveTransactionTimeSlot, EsolveTransactionUser, EsolveTransactionsService, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveUserClientAccount, EsolveUserClientAccountBalances, EsolveUserDevice, EsolveVaultItem, EsolveVaultItemResult, EsolveVoucher, EsolveVouchersService, EsolveWalletBalances, EsolveWalletService, EsolveWalletTransaction, EsolveWalletTransactionsList, EsolveWishlistItem, EsolveWishlistService, NgEsolveConnectModule, esolveAuthInterceptor, esolveHexHash, esolveUnauthorizedErrorInterceptor, isEsolveCdnPath, isFtgCdnPath, isLegacyEsolveCdnPath, processEsolveImageSrc, provideEsolveImageLoader, provideNgEsolveConnect };
7535
+ export type { EsolveAccountConfirmationPostResponseItem, EsolveAccountPaymentRecord, EsolveAccountPaymentsOptions, EsolveAdditionalStockImageRecord, EsolveAdditionalWhere, EsolveAddressPlaceType, EsolveAddressPostData, EsolveAddressRecord, EsolveAddressResponse, EsolveAddressType, EsolveAffiliateCheckRecord, EsolveAffiliateLinkOptions, EsolveAffiliateLinkResponse, EsolveAffiliateRecord, EsolveAffiliatesOptions, EsolveAlbumImageOptions, EsolveAlbumImageRecord, EsolveAlbumImageSize, EsolveAlbumOptions, EsolveAlbumRecord, EsolveAssetList, EsolveAssetOptions, EsolveAssetRecord, EsolveAssetType, EsolveAuthCheckData, EsolveAuthCheckResponse, EsolveAuthData, EsolveAuthGetData, EsolveAuthGetResponse, EsolveAuthResponse, EsolveAuthResponseData, EsolveAuthResult, EsolveBannerImageHotspotCoords, EsolveBannerImageHotspotRecord, EsolveBannerImageRecord, EsolveBannerImageSet, EsolveBannerImageType, EsolveBannerLink, EsolveBannerRecord, EsolveBannerType, EsolveBannerVideoRecord, EsolveCaptchaAction, EsolveCaptchaOptions, EsolveCaptchaRecord, EsolveCardData, EsolveCareerOptions, EsolveCareerRecord, EsolveCareerType, EsolveCareersSortField, EsolveCart, EsolveCartAdditionalParams, EsolveCartAlternativeRecord, EsolveCartAlternativesMap, EsolveCartEmptyResponse, EsolveCartErrors, EsolveCartItemErrorRecord, EsolveCartItemErrors, EsolveCartItemRecord, EsolveCartItemResponse, EsolveCartItemSortField, EsolveCartPromotionProgress, EsolveCartPromotionProgressDiscountType, EsolveCartPromotionProgressItemType, EsolveCartPromotionProgressMode, EsolveCartPromotionProgressQualifyingItemRecord, EsolveCartPromotionProgressRecord, EsolveCartSetAction, EsolveCartSetItem, EsolveCartTotalsRecord, EsolveCategoryIdentifier, EsolveCategoryRecord, EsolveCategoryTreeItemOptions, EsolveCategoryTreeItemRecord, EsolveChatClientActionIntent, EsolveChatDisplayHint, EsolveChatIntent, EsolveChatIntentDispatchRequest, EsolveChatIntentMessageRequest, EsolveChatIntentRequest, EsolveChatIntentResponse, EsolveChatMessage, EsolveChatProductGroupLinkRecord, EsolveChatProductGroupRecord, EsolveChatSuggestion, EsolveChatSuggestionIntent, EsolveCheckoutBody, EsolveCheckoutResponse, EsolveClientAssetRecord, EsolveClientAssetsOptions, EsolveColourOptions, EsolveColourRecord, EsolveCompetitionEntryRecord, EsolveCompetitionOptions, EsolveCompetitionRecord, EsolveCompetitionStatsRecord, EsolveCompetitionVoteRecord, EsolveCompetitionWinnerRecord, EsolveConnectConfig, EsolveCookieOptions, EsolveCountryOptions, EsolveCountryRecord, EsolveCouponRecord, EsolveCouponValidation, EsolveCouponValidationError, EsolveCouponValidationResult, EsolveCouponsCache, EsolveCustomFields, EsolveDeleteResponse, EsolveDeleteResult, EsolveDeliveriesOptions, EsolveDeliveriesSortField, EsolveDeliveryCategoryTotalsMap, EsolveDeliveryCategoryTotalsMapRecord, EsolveDeliveryCategoryTotalsRecord, EsolveDeliveryIntegration, EsolveDeliveryRecord, EsolveDeliveryStatusRecord, EsolveDeliveryStatusType, EsolveDeliveryType, EsolveDependantItemRecord, EsolveDevice, EsolveDeviceType, EsolveEnquiryFormFieldCheckboxRecord, EsolveEnquiryFormFieldFileRecord, EsolveEnquiryFormFieldRadioRecord, EsolveEnquiryFormFieldRecord, EsolveEnquiryFormFieldRecordBase, EsolveEnquiryFormFieldSelectRecord, EsolveEnquiryFormFieldTextRecord, EsolveEnquiryFormRecord, EsolveEnquiryFormSubmitHttpResponse, EsolveEnquiryFormSubmitResult, EsolveEnquiryResponse, EsolveErpDocumentRequestRecord, EsolveErpSalesStockSortField, EsolveEventRecord, EsolveFilter, EsolveFilterDefinitions, EsolveFilterList, EsolveFilterRecord, EsolveFilterRecordList, EsolveFilterType, EsolveForgotPasswordGetResult, EsolveForgotPasswordResponse, EsolveGenericFilterDefinition, EsolveGeocodeAddressRecord, EsolveGeocodeResponse, EsolveGeocodeResultRecord, EsolveGetResponse, EsolveInsuranceCalculationMethod, EsolveIntegrationType, EsolveLinkedAssetRecord, EsolveLinkedStockRecord, EsolveLocationFilterOptions, EsolveLocationGeoOptions, EsolveLocationImageSize, EsolveLocationOption, EsolveLocationOptions, EsolveLocationRecord, EsolveLocationSortField, EsolveLoginPostResponseItem, EsolveLoginResponse, EsolveLogoutResponse, EsolveManufacturerImageSize, EsolveManufacturerOptions, EsolveManufacturerRecord, EsolveMaterialOptions, EsolveMaterialPhraseMatchMode, EsolveMaterialRecord, EsolveMediaAssetOptions, EsolveMediaStockItemList, EsolveMediaStockItemOptions, EsolveMediaStockItemRecord, EsolveMediaStockSortField, EsolveMenu, EsolveMenuTreeRecord, EsolveNewsArticleAuthorRecord, EsolveNewsArticleOptions, EsolveNewsArticleRecord, EsolveNewsGroupRecord, EsolveNewsletterResponse, EsolveNotificationButtonActionRecord, EsolveNotificationDateRecord, EsolveNotificationDatesRecord, EsolveNotificationPosition, EsolveNotificationSize, EsolveNotificationType, EsolveOtpAction, EsolveOtpOptions, EsolveOtpRecord, EsolveOtpValidationRecord, EsolvePaymentFormInput, EsolvePaymentMethodOptions, EsolvePaymentMethodRecord, EsolvePaymentRedirectLinks, EsolvePaymentResponse, EsolvePaymentSetBody, EsolvePaymentStatus, EsolvePickStatusType, EsolvePostResponseItem, EsolvePostResponseStatus, EsolveRangeFilterDefinition, EsolveRangeFilterRecord, EsolveRangeFilterType, EsolveRangeOptions, EsolveRangeRecord, EsolveRecipeItemRecord, EsolveRecipeStockOptions, EsolveRegistrationData, EsolveRegistrationPostResponseItem, EsolveResponse, EsolveResponseLogItem, EsolveReviewListRecord, EsolveReviewOptions, EsolveReviewRecord, EsolveReviewReport, EsolveReviewResponse, EsolveReviewSortField, EsolveReviewUser, EsolveSearchAuthStatus, EsolveSearchAuthStatusType, EsolveSearchBillingRequest, EsolveSearchBillingResponse, EsolveSearchBillingTotal, EsolveSearchCleanResponse, EsolveSearchRequest, EsolveSearchResponse, EsolveSearchResultRecord, EsolveSearchVectorizeGetRequest, EsolveSearchVectorizeGetResponse, EsolveSearchVectorizeItem, EsolveSearchVectorizeRequest, EsolveSearchVectorizeResponse, EsolveSelectFilter, EsolveSelectFilterRecord, EsolveSelectFilterType, EsolveSeoDetails, EsolveServiceProvider, EsolveSession, EsolveSessionData, EsolveSessionUpdateOptions, EsolveSetResponse, EsolveSettingsRecord, EsolveShippingCalculationMethod, EsolveShippingCostItemRecord, EsolveShippingCostRecord, EsolveShippingLocation, EsolveShippingMethodOptions, EsolveShippingMethodRecord, EsolveSort, EsolveSortOrder, EsolveSpecialImageCollectionRecord, EsolveSpecialImageRecord, EsolveSpecialOptions, EsolveSpecialRecord, EsolveStatementAgeingRecord, EsolveStatementBalancesRecord, EsolveStatementRecord, EsolveStatementTransactionRecord, EsolveStockAssetOptions, EsolveStockBadgeRecord, EsolveStockBarcodeOptions, EsolveStockBarcodeRecord, EsolveStockBaseRecord, EsolveStockCartParameter, EsolveStockCartParameterInput, EsolveStockFilterOptions, EsolveStockGroupItemRecord, EsolveStockHistorySortField, EsolveStockImageCollectionRecord, EsolveStockImageSize, EsolveStockItemBaseOptions, EsolveStockItemHistoryOptions, EsolveStockItemLocationLevelRecord, EsolveStockItemOptions, EsolveStockLeadTimesRecord, EsolveStockLinkedCategoryRecord, EsolveStockRecord, EsolveStockReviewsReportRecord, EsolveStockSortField, EsolveStockType, EsolveStockUnitOfMeasure, EsolveSubcategoryRecord, EsolveSupplierOptions, EsolveSupplierRecord, EsolveSystemNotificationOptions, EsolveSystemNotificationRecord, EsolveSystemNotificationTypeRecord, EsolveTagOptions, EsolveTagPhraseMatchMode, EsolveTagRecord, EsolveTimeSlotCheckout, EsolveTimeSlotConfigRecord, EsolveTimeSlotDateRecord, EsolveTimeSlotDaysRecord, EsolveTimeSlotRecord, EsolveTimeSlotTimesRecord, EsolveToggleFilterType, EsolveTopicRecord, EsolveTrackingCode, EsolveTranactionApproval, EsolveTransactionAnalyticsDataRecord, EsolveTransactionApprovalState, EsolveTransactionClientRecord, EsolveTransactionItemRecord, EsolveTransactionLocationRecord, EsolveTransactionOptions, EsolveTransactionPaymentMethodRecord, EsolveTransactionRecord, EsolveTransactionSalesStockItemOptions, EsolveTransactionShippingMethodRecord, EsolveTransactionSortField, EsolveTransactionTimeSlotRecord, EsolveTransactionType, EsolveTransactionUserRecord, EsolveUrlTarget, EsolveUserAccountData, EsolveUserAccountRecord, EsolveUserClientAccountBalancesRecord, EsolveUserClientAccountRecord, EsolveUserDeviceOptions, EsolveUserDeviceRecord, EsolveValidateOtpResponse, EsolveVaultRecord, EsolveVaultResponse, EsolveVoucherRecord, EsolveVoucherValidation, EsolveVoucherValidationError, EsolveVoucherValidationResult, EsolveVouchersCache, EsolveWalletBalancesRecord, EsolveWalletCashOutOptions, EsolveWalletCashOutResponse, EsolveWalletTransactionOptions, EsolveWalletTransactionRecord, EsolveWalletTransactionType, EsolveWishlist, EsolveWishlistItemRecord, EsolveWishlistItemResponse, EsolveWishlistSetAction, EsolveWishlistSetItem };