@esolve/ng-esolve-connect 0.5.1

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.
Files changed (148) hide show
  1. package/README.md +23 -0
  2. package/bundles/esolve-ng-esolve-connect.umd.js +3032 -0
  3. package/bundles/esolve-ng-esolve-connect.umd.js.map +1 -0
  4. package/esm2015/esolve-ng-esolve-connect.js +5 -0
  5. package/esm2015/lib/auth/esolve-account.service.js +60 -0
  6. package/esm2015/lib/auth/esolve-address-record.js +2 -0
  7. package/esm2015/lib/auth/esolve-address.js +19 -0
  8. package/esm2015/lib/auth/esolve-auth-interceptor.service.js +43 -0
  9. package/esm2015/lib/auth/esolve-auth.service.js +200 -0
  10. package/esm2015/lib/auth/esolve-session.js +27 -0
  11. package/esm2015/lib/auth/esolve-session.service.js +85 -0
  12. package/esm2015/lib/auth/esolve-stored-session.js +2 -0
  13. package/esm2015/lib/banners/esolve-banner-image-hotspot-record.js +2 -0
  14. package/esm2015/lib/banners/esolve-banner-image-hotspot.js +9 -0
  15. package/esm2015/lib/banners/esolve-banner-image-record.js +2 -0
  16. package/esm2015/lib/banners/esolve-banner-image.js +14 -0
  17. package/esm2015/lib/banners/esolve-banner-record.js +2 -0
  18. package/esm2015/lib/banners/esolve-banner-type.js +2 -0
  19. package/esm2015/lib/banners/esolve-banner.js +25 -0
  20. package/esm2015/lib/banners/esolve-banner.service.js +104 -0
  21. package/esm2015/lib/cart/esolve-cart-item-record.js +2 -0
  22. package/esm2015/lib/cart/esolve-cart-item.js +24 -0
  23. package/esm2015/lib/cart/esolve-cart-stock-item.js +43 -0
  24. package/esm2015/lib/cart/esolve-cart-totals-record.js +2 -0
  25. package/esm2015/lib/cart/esolve-cart-totals.js +39 -0
  26. package/esm2015/lib/cart/esolve-cart.service.js +371 -0
  27. package/esm2015/lib/cart/esolve-checkout.js +2 -0
  28. package/esm2015/lib/cart/esolve-payment-method-record.js +2 -0
  29. package/esm2015/lib/cart/esolve-payment-method.js +49 -0
  30. package/esm2015/lib/cart/esolve-shipping-cost-record.js +2 -0
  31. package/esm2015/lib/cart/esolve-shipping-cost.js +18 -0
  32. package/esm2015/lib/cart/esolve-shipping-method-record.js +2 -0
  33. package/esm2015/lib/cart/esolve-shipping-method.js +33 -0
  34. package/esm2015/lib/cart/esolve-stock-location-record.js +2 -0
  35. package/esm2015/lib/cart/esolve-stock-location.js +76 -0
  36. package/esm2015/lib/category-tree/esolve-category-tree-item-record.js +2 -0
  37. package/esm2015/lib/category-tree/esolve-category-tree-item.js +48 -0
  38. package/esm2015/lib/category-tree/esolve-category-tree.service.js +126 -0
  39. package/esm2015/lib/esolve-connect.config.js +9 -0
  40. package/esm2015/lib/media/esolve-media-article.js +16 -0
  41. package/esm2015/lib/media/esolve-media-record.js +2 -0
  42. package/esm2015/lib/media/esolve-media.service.js +94 -0
  43. package/esm2015/lib/menu/esolve-menu-item.js +9 -0
  44. package/esm2015/lib/menu/esolve-menu-tree-record.js +2 -0
  45. package/esm2015/lib/menu/esolve-menu.service.js +48 -0
  46. package/esm2015/lib/news/esolve-news-article-author-record.js +2 -0
  47. package/esm2015/lib/news/esolve-news-article-author.js +9 -0
  48. package/esm2015/lib/news/esolve-news-article-list.js +8 -0
  49. package/esm2015/lib/news/esolve-news-article-record.js +2 -0
  50. package/esm2015/lib/news/esolve-news-article.js +20 -0
  51. package/esm2015/lib/news/esolve-news-group-record.js +2 -0
  52. package/esm2015/lib/news/esolve-news-group.js +9 -0
  53. package/esm2015/lib/news/esolve-news-manufacturer-record.js +2 -0
  54. package/esm2015/lib/news/esolve-news-range-record.js +2 -0
  55. package/esm2015/lib/news/esolve-news.service.js +107 -0
  56. package/esm2015/lib/ng-esolve-connect.module.js +43 -0
  57. package/esm2015/lib/shared/esolve-response.js +2 -0
  58. package/esm2015/lib/shared/esolve-url-target.js +2 -0
  59. package/esm2015/lib/shared/seo/esolve-seo-info.js +11 -0
  60. package/esm2015/lib/shared/seo/esolve-seo.service.js +114 -0
  61. package/esm2015/lib/stock/esolve-stock-badge-record.js +2 -0
  62. package/esm2015/lib/stock/esolve-stock-badge.js +11 -0
  63. package/esm2015/lib/stock/esolve-stock-item-list.js +11 -0
  64. package/esm2015/lib/stock/esolve-stock-item-options.js +2 -0
  65. package/esm2015/lib/stock/esolve-stock-item.js +130 -0
  66. package/esm2015/lib/stock/esolve-stock-price.js +43 -0
  67. package/esm2015/lib/stock/esolve-stock-record.js +2 -0
  68. package/esm2015/lib/stock/esolve-stock.service.js +146 -0
  69. package/esm2015/lib/tags/esolve-tag-record.js +2 -0
  70. package/esm2015/lib/tags/esolve-tag.js +9 -0
  71. package/esm2015/lib/topics/esolve-topic-record.js +2 -0
  72. package/esm2015/lib/topics/esolve-topic.js +9 -0
  73. package/esm2015/lib/topics/esolve-topic.service.js +57 -0
  74. package/esm2015/public-api.js +54 -0
  75. package/esolve-ng-esolve-connect.d.ts +5 -0
  76. package/fesm2015/esolve-ng-esolve-connect.js +2226 -0
  77. package/fesm2015/esolve-ng-esolve-connect.js.map +1 -0
  78. package/lib/auth/esolve-account.service.d.ts +17 -0
  79. package/lib/auth/esolve-address-record.d.ts +18 -0
  80. package/lib/auth/esolve-address.d.ts +18 -0
  81. package/lib/auth/esolve-auth-interceptor.service.d.ts +13 -0
  82. package/lib/auth/esolve-auth.service.d.ts +34 -0
  83. package/lib/auth/esolve-session.d.ts +11 -0
  84. package/lib/auth/esolve-session.service.d.ts +22 -0
  85. package/lib/auth/esolve-stored-session.d.ts +5 -0
  86. package/lib/banners/esolve-banner-image-hotspot-record.d.ts +8 -0
  87. package/lib/banners/esolve-banner-image-hotspot.d.ts +12 -0
  88. package/lib/banners/esolve-banner-image-record.d.ts +10 -0
  89. package/lib/banners/esolve-banner-image.d.ts +12 -0
  90. package/lib/banners/esolve-banner-record.d.ts +17 -0
  91. package/lib/banners/esolve-banner-type.d.ts +7 -0
  92. package/lib/banners/esolve-banner.d.ts +21 -0
  93. package/lib/banners/esolve-banner.service.d.ts +26 -0
  94. package/lib/cart/esolve-cart-item-record.d.ts +43 -0
  95. package/lib/cart/esolve-cart-item.d.ts +31 -0
  96. package/lib/cart/esolve-cart-stock-item.d.ts +31 -0
  97. package/lib/cart/esolve-cart-totals-record.d.ts +7 -0
  98. package/lib/cart/esolve-cart-totals.d.ts +50 -0
  99. package/lib/cart/esolve-cart.service.d.ts +112 -0
  100. package/lib/cart/esolve-checkout.d.ts +7 -0
  101. package/lib/cart/esolve-payment-method-record.d.ts +47 -0
  102. package/lib/cart/esolve-payment-method.d.ts +47 -0
  103. package/lib/cart/esolve-shipping-cost-record.d.ts +14 -0
  104. package/lib/cart/esolve-shipping-cost.d.ts +12 -0
  105. package/lib/cart/esolve-shipping-method-record.d.ts +37 -0
  106. package/lib/cart/esolve-shipping-method.d.ts +32 -0
  107. package/lib/cart/esolve-stock-location-record.d.ts +47 -0
  108. package/lib/cart/esolve-stock-location.d.ts +61 -0
  109. package/lib/category-tree/esolve-category-tree-item-record.d.ts +51 -0
  110. package/lib/category-tree/esolve-category-tree-item.d.ts +23 -0
  111. package/lib/category-tree/esolve-category-tree.service.d.ts +47 -0
  112. package/lib/esolve-connect.config.d.ts +49 -0
  113. package/lib/media/esolve-media-article.d.ts +13 -0
  114. package/lib/media/esolve-media-record.d.ts +31 -0
  115. package/lib/media/esolve-media.service.d.ts +28 -0
  116. package/lib/menu/esolve-menu-item.d.ts +8 -0
  117. package/lib/menu/esolve-menu-tree-record.d.ts +20 -0
  118. package/lib/menu/esolve-menu.service.d.ts +14 -0
  119. package/lib/news/esolve-news-article-author-record.d.ts +9 -0
  120. package/lib/news/esolve-news-article-author.d.ts +7 -0
  121. package/lib/news/esolve-news-article-list.d.ts +7 -0
  122. package/lib/news/esolve-news-article-record.d.ts +27 -0
  123. package/lib/news/esolve-news-article.d.ts +16 -0
  124. package/lib/news/esolve-news-group-record.d.ts +6 -0
  125. package/lib/news/esolve-news-group.d.ts +7 -0
  126. package/lib/news/esolve-news-manufacturer-record.d.ts +8 -0
  127. package/lib/news/esolve-news-range-record.d.ts +9 -0
  128. package/lib/news/esolve-news.service.d.ts +31 -0
  129. package/lib/ng-esolve-connect.module.d.ts +11 -0
  130. package/lib/shared/esolve-response.d.ts +34 -0
  131. package/lib/shared/esolve-url-target.d.ts +1 -0
  132. package/lib/shared/seo/esolve-seo-info.d.ts +12 -0
  133. package/lib/shared/seo/esolve-seo.service.d.ts +28 -0
  134. package/lib/stock/esolve-stock-badge-record.d.ts +8 -0
  135. package/lib/stock/esolve-stock-badge.d.ts +9 -0
  136. package/lib/stock/esolve-stock-item-list.d.ts +10 -0
  137. package/lib/stock/esolve-stock-item-options.d.ts +10 -0
  138. package/lib/stock/esolve-stock-item.d.ts +164 -0
  139. package/lib/stock/esolve-stock-price.d.ts +45 -0
  140. package/lib/stock/esolve-stock-record.d.ts +45 -0
  141. package/lib/stock/esolve-stock.service.d.ts +39 -0
  142. package/lib/tags/esolve-tag-record.d.ts +6 -0
  143. package/lib/tags/esolve-tag.d.ts +7 -0
  144. package/lib/topics/esolve-topic-record.d.ts +6 -0
  145. package/lib/topics/esolve-topic.d.ts +7 -0
  146. package/lib/topics/esolve-topic.service.d.ts +20 -0
  147. package/package.json +20 -0
  148. package/public-api.d.ts +40 -0
@@ -0,0 +1,8 @@
1
+ import { EsolveUrlTarget } from '../shared/esolve-url-target';
2
+ import { EsolveBannerImageHotspotCoords } from './esolve-banner-image-hotspot';
3
+ export interface EsolveBannerImageHotspotRecord {
4
+ url: string;
5
+ target: EsolveUrlTarget;
6
+ coords: EsolveBannerImageHotspotCoords[];
7
+ coords_string: string;
8
+ }
@@ -0,0 +1,12 @@
1
+ import { EsolveUrlTarget } from '../shared/esolve-url-target';
2
+ export declare class EsolveBannerImageHotspot {
3
+ url: string;
4
+ target: EsolveUrlTarget;
5
+ coords: EsolveBannerImageHotspotCoords[];
6
+ coords_string: string;
7
+ constructor(url: string, target: EsolveUrlTarget, coords: EsolveBannerImageHotspotCoords[], coords_string: string);
8
+ }
9
+ export interface EsolveBannerImageHotspotCoords {
10
+ x: number;
11
+ y: number;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { EsolveBannerImageType } from './esolve-banner-type';
2
+ import { EsolveBannerImageHotspotRecord } from './esolve-banner-image-hotspot-record';
3
+ export interface EsolveBannerImageRecord {
4
+ id: number;
5
+ image_type: EsolveBannerImageType;
6
+ width: number;
7
+ height: number;
8
+ filename: string;
9
+ hotspots?: EsolveBannerImageHotspotRecord[];
10
+ }
@@ -0,0 +1,12 @@
1
+ import { EsolveBannerImageType } from './esolve-banner-type';
2
+ import { EsolveBannerImageHotspot } from './esolve-banner-image-hotspot';
3
+ export declare class EsolveBannerImage {
4
+ id: number;
5
+ image_type: EsolveBannerImageType;
6
+ width: number;
7
+ height: number;
8
+ filename: string;
9
+ hotspots?: EsolveBannerImageHotspot[] | undefined;
10
+ constructor(id: number, image_type: EsolveBannerImageType, width: number, height: number, filename: string, hotspots?: EsolveBannerImageHotspot[] | undefined);
11
+ get src(): string;
12
+ }
@@ -0,0 +1,17 @@
1
+ import { EsolveBannerType, EsolveBannerLink } from './esolve-banner-type';
2
+ import { EsolveBannerImageRecord } from './esolve-banner-image-record';
3
+ export interface EsolveBannerRecord {
4
+ id: number;
5
+ banner_display_container: string;
6
+ identifier: string;
7
+ type: EsolveBannerType;
8
+ title: string;
9
+ article: string;
10
+ sort_priority: number;
11
+ link: EsolveBannerLink;
12
+ images: {
13
+ desktop?: EsolveBannerImageRecord[];
14
+ mobile?: EsolveBannerImageRecord[];
15
+ sub?: EsolveBannerImageRecord[];
16
+ };
17
+ }
@@ -0,0 +1,7 @@
1
+ import { EsolveUrlTarget } from '../shared/esolve-url-target';
2
+ export declare type EsolveBannerType = 'static' | 'hotspot';
3
+ export declare type EsolveBannerImageType = 'desktop' | 'mobile' | 'sub';
4
+ export interface EsolveBannerLink {
5
+ url: string;
6
+ target: EsolveUrlTarget;
7
+ }
@@ -0,0 +1,21 @@
1
+ import { EsolveBannerLink, EsolveBannerType } from './esolve-banner-type';
2
+ import { EsolveBannerImage } from './esolve-banner-image';
3
+ export interface EsolveBannerImageSet {
4
+ desktop?: EsolveBannerImage[];
5
+ mobile?: EsolveBannerImage[];
6
+ sub?: EsolveBannerImage[];
7
+ }
8
+ export declare class EsolveBanner {
9
+ id: number;
10
+ banner_display_container: string;
11
+ identifier: string;
12
+ type: EsolveBannerType;
13
+ title: string;
14
+ article: string;
15
+ sort_priority: number;
16
+ link: EsolveBannerLink;
17
+ desktop_images: EsolveBannerImage[];
18
+ mobile_images: EsolveBannerImage[];
19
+ sub_images: EsolveBannerImage[];
20
+ constructor(id: number, banner_display_container: string, identifier: string, type: EsolveBannerType, title: string, article: string, sort_priority: number, link: EsolveBannerLink, images: EsolveBannerImageSet);
21
+ }
@@ -0,0 +1,26 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { EsolveConnectConfig } from '../esolve-connect.config';
4
+ import { EsolveBanner } from './esolve-banner';
5
+ import * as i0 from "@angular/core";
6
+ export declare class EsolveBannerService {
7
+ private config;
8
+ private http;
9
+ constructor(config: EsolveConnectConfig, http: HttpClient);
10
+ private processBannerImageHotspots;
11
+ private processBannerImages;
12
+ /**
13
+ * Process banner records into banner objects
14
+ * @param records Array of records
15
+ * @returns List of banners
16
+ */
17
+ private processBanners;
18
+ /**
19
+ * Retrieves banners records from eSolve instance
20
+ *
21
+ * @returns An observable of eSolve banners.
22
+ */
23
+ getBanners(identifier?: string, banner_display_container?: string, enable_date_filter?: boolean): Observable<EsolveBanner[]>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveBannerService, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveBannerService>;
26
+ }
@@ -0,0 +1,43 @@
1
+ import { EsolvePostResponseItem } from '../shared/esolve-response';
2
+ export interface EsolveCartItemRecord {
3
+ id: number;
4
+ code: string;
5
+ external_system_code: string;
6
+ name: string;
7
+ description: string;
8
+ qty: number;
9
+ price: number;
10
+ price_description: string;
11
+ price_incl: number;
12
+ discount_price: number;
13
+ discount_price_incl: number;
14
+ discount_total: number;
15
+ vat_total: number;
16
+ line_total: number;
17
+ line_total_incl: number;
18
+ discount: number;
19
+ discount_interval: number;
20
+ vat_rate: number;
21
+ delivery_category: string;
22
+ type: string;
23
+ must_collect: boolean;
24
+ requested_assembly: boolean;
25
+ allow_quotes: boolean;
26
+ allow_orders: boolean;
27
+ sef_name: string;
28
+ minimum_onhand: number;
29
+ group: string;
30
+ limit_per_transaction: number;
31
+ onhand: number;
32
+ cart_question_identifier: string;
33
+ items_in_pack: number;
34
+ is_active: boolean;
35
+ display_only: boolean;
36
+ ignore_onhand_check: boolean;
37
+ subcategory_min_level: number;
38
+ image_name: string;
39
+ }
40
+ export interface EsolveCartItemResponse extends EsolvePostResponseItem {
41
+ esolve_id: number;
42
+ current_qty: number;
43
+ }
@@ -0,0 +1,31 @@
1
+ import { EsolveCartStockItem } from './esolve-cart-stock-item';
2
+ export declare type EsolveCart = EsolveCartItem[];
3
+ export declare class EsolveCartItem {
4
+ id: number;
5
+ stock_item: EsolveCartStockItem;
6
+ qty: number;
7
+ type: string;
8
+ price: number;
9
+ discount: number;
10
+ discount_interval: number;
11
+ vat_rate: number;
12
+ allow_quotes: boolean;
13
+ allow_orders: boolean;
14
+ must_collect: boolean;
15
+ requested_assembly: boolean;
16
+ price_incl: number;
17
+ discount_price: number;
18
+ discount_price_incl: number;
19
+ discount_total: number;
20
+ vat_total: number;
21
+ total: number;
22
+ total_incl: number;
23
+ constructor(id: number, stock_item: EsolveCartStockItem, qty: number, type: string, price: number, discount: number, discount_interval: number, vat_rate: number, allow_quotes: boolean, allow_orders: boolean, must_collect: boolean, requested_assembly: boolean, price_incl: number, discount_price: number, discount_price_incl: number, discount_total: number, vat_total: number, total: number, total_incl: number);
24
+ }
25
+ export declare type EsolveCartSetAction = 'add' | 'edit' | 'remove';
26
+ export interface EsolveCartSetItem {
27
+ code: string;
28
+ id?: number;
29
+ qty?: number;
30
+ action?: EsolveCartSetAction;
31
+ }
@@ -0,0 +1,31 @@
1
+ export declare class EsolveCartStockItem {
2
+ code: string;
3
+ name: string;
4
+ sef_name: string;
5
+ description: string;
6
+ active: boolean;
7
+ items_in_pack: number;
8
+ delivery_category: string;
9
+ private image_name;
10
+ constructor(code: string, name: string, sef_name: string, description: string, active: boolean, items_in_pack: number, delivery_category: string, image_name: string);
11
+ /**
12
+ * Path to tiny stock image
13
+ */
14
+ get tiny_image_src(): string;
15
+ /**
16
+ * Path to thumbnail stock image
17
+ */
18
+ get thumbnail_image_src(): string;
19
+ /**
20
+ * Path to small stock image
21
+ */
22
+ get small_image_src(): string;
23
+ /**
24
+ * Path to big stock image
25
+ */
26
+ get big_image_src(): string;
27
+ /**
28
+ * Path to original stock image
29
+ */
30
+ get original_image_src(): string;
31
+ }
@@ -0,0 +1,7 @@
1
+ export interface EsolveCartTotalsRecord {
2
+ records: number;
3
+ items: string;
4
+ total: string;
5
+ vat: string;
6
+ discount: string;
7
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Totals in cart
3
+ */
4
+ export declare class EsolveCartTotals {
5
+ /**
6
+ * Number of unique records in cart
7
+ */
8
+ records: number;
9
+ /**
10
+ * Total quantity of all items in a cart
11
+ */
12
+ items: number;
13
+ /**
14
+ * Total in cart before discount and VAT is added
15
+ */
16
+ sub_total: number;
17
+ /**
18
+ * Total VAT of all the items in the cart
19
+ */
20
+ vat_total: number;
21
+ /**
22
+ * Total discount of all the item in the cart
23
+ */
24
+ discount_total: number;
25
+ constructor(
26
+ /**
27
+ * Number of unique records in cart
28
+ */
29
+ records?: number,
30
+ /**
31
+ * Total quantity of all items in a cart
32
+ */
33
+ items?: number,
34
+ /**
35
+ * Total in cart before discount and VAT is added
36
+ */
37
+ sub_total?: number,
38
+ /**
39
+ * Total VAT of all the items in the cart
40
+ */
41
+ vat_total?: number,
42
+ /**
43
+ * Total discount of all the item in the cart
44
+ */
45
+ discount_total?: number);
46
+ /**
47
+ * Grand total of cart which includes discount and VAT (NOTE: shipping and insurance is not included)
48
+ */
49
+ get total(): number;
50
+ }
@@ -0,0 +1,112 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { EsolveConnectConfig } from '../esolve-connect.config';
4
+ import { EsolveCart, EsolveCartSetAction, EsolveCartSetItem } from './esolve-cart-item';
5
+ import { EsolveCartItemResponse } from './esolve-cart-item-record';
6
+ import { EsolveStockLocation } from './esolve-stock-location';
7
+ import { EsolvePaymentMethod } from './esolve-payment-method';
8
+ import { EsolvePaymentMethodOptions } from './esolve-payment-method-record';
9
+ import { EsolveShippingMethod } from './esolve-shipping-method';
10
+ import { EsolveShippingMethodOptions } from './esolve-shipping-method-record';
11
+ import { EsolveShippingCost } from './esolve-shipping-cost';
12
+ import { EsolveShippingCostOptions } from './esolve-shipping-cost-record';
13
+ import { EsolveCartTotals } from './esolve-cart-totals';
14
+ import * as i0 from "@angular/core";
15
+ export declare class EsolveCartService {
16
+ private config;
17
+ private http;
18
+ private _cached_tracking;
19
+ constructor(config: EsolveConnectConfig, http: HttpClient);
20
+ /**
21
+ * Processes the eSolve tree records.
22
+ * @param cart_item_records Records to process
23
+ * @returns An array of processed cart items
24
+ */
25
+ private processCart;
26
+ /**
27
+ * Processes the eSolve stock location records.
28
+ * @param records Records to process
29
+ * @returns An array of processed stock location records
30
+ */
31
+ private processStockLocations;
32
+ /**
33
+ * Processes the eSolve shipping method records.
34
+ * @param records Records to process
35
+ * @returns An array of processed shipping methods
36
+ */
37
+ private processShippingMethods;
38
+ /**
39
+ * Processes the eSolve payment method records.
40
+ * @param records Records to process
41
+ * @returns An array of processed payment methods.
42
+ */
43
+ private processPaymentMethods;
44
+ /**
45
+ * Processes the eSolve shipping costs record.
46
+ * @param record Data to process
47
+ * @returns Processed shipping costs
48
+ */
49
+ private processShippingCost;
50
+ /**
51
+ * Processes the eSolve cart totals
52
+ * @param record Data to process
53
+ * @returns Processed cart totals
54
+ */
55
+ private processCartTotals;
56
+ /**
57
+ * Retrieves the current cart
58
+ * @returns An `Observable` with an array of cart items
59
+ */
60
+ getCart(): Observable<EsolveCart>;
61
+ /**
62
+ * Updates the cart by preforming various actions, such as adding, editing or removing items from the cart.
63
+ * @param items An array of options to update the cart
64
+ * @param action The default action to preform
65
+ * @returns An `Observable` with an array of responses that gives feedback on the requested changes
66
+ */
67
+ setCart(items: EsolveCartSetItem[], action?: EsolveCartSetAction): Observable<EsolveCartItemResponse[]>;
68
+ /**
69
+ * Retrieves a list of stock locations
70
+ * @returns An `Observable` with an array of stock locations
71
+ */
72
+ getStockLocations(): Observable<EsolveStockLocation[]>;
73
+ /**
74
+ * Retrieves a list of shipping methods
75
+ * @returns An `Observable` with an array of shipping methods
76
+ */
77
+ getShippingMethods(options?: EsolveShippingMethodOptions): Observable<EsolveShippingMethod[]>;
78
+ /**
79
+ * Retrieves a list of payment methods
80
+ * @returns An `Observable` with an array of payment methods
81
+ */
82
+ getPaymentMethods(options?: EsolvePaymentMethodOptions): Observable<EsolvePaymentMethod[]>;
83
+ /**
84
+ * Retrieves the shipping costs
85
+ * @param options Shipping cost options
86
+ * @returns An `Observable` with the shipping costs
87
+ */
88
+ getShippingCost(options: EsolveShippingCostOptions): Observable<EsolveShippingCost>;
89
+ /**
90
+ * Retrieves the totals of the cart with all the totals calculated
91
+ * @returns An `Observable` with an object containing cart totals
92
+ */
93
+ getTotals(): Observable<EsolveCartTotals>;
94
+ /**
95
+ * Retrieves a tracking code for the cart
96
+ * @returns An `Observable` with the cart tracking code
97
+ */
98
+ getTrackingCode(): Observable<number>;
99
+ /**
100
+ * Initiates checkout of the cart items
101
+ * @param type The cart type that needs to be checked out
102
+ * @param addresses_id The ID of the delivery address
103
+ * @param shipping_id The ID of the shipping method
104
+ * @param payment_method_id The ID of the selected payment method
105
+ * @param location_id The ID of the selected branch from with shipping needs to be calculated
106
+ * @param comments Additional comments on the cart
107
+ * @returns An `Observable` with the transaction ID
108
+ */
109
+ checkout(type: 'order' | 'quote', addresses_id: number, shipping_id: number, payment_method_id?: number, location_id?: number, comments?: string): Observable<number>;
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCartService, never>;
111
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCartService>;
112
+ }
@@ -0,0 +1,7 @@
1
+ import { EsolvePostResponseItem } from '../shared/esolve-response';
2
+ export interface EsolveTrackingCode {
3
+ tracking: number;
4
+ }
5
+ export interface EsolveCheckoutResponse extends EsolvePostResponseItem {
6
+ esolve_id: number;
7
+ }
@@ -0,0 +1,47 @@
1
+ export declare type EsolveIntegrationType = 'Virtual' | 'Direct';
2
+ export interface EsolvePaymentMethodRecord {
3
+ id: number;
4
+ location_id: number;
5
+ paymethod_name: string;
6
+ description: string;
7
+ display_banking_details: boolean;
8
+ bank_name: string;
9
+ account_holder: string;
10
+ account: string;
11
+ account_type: string;
12
+ swift_number: string;
13
+ branch_code: string;
14
+ currency_code: string;
15
+ terminal_id: string;
16
+ terminal_id_secondary: string;
17
+ merchant_id: string;
18
+ application_id: string;
19
+ api_username: string;
20
+ api_password: string;
21
+ api_signature: string;
22
+ is_gateway: boolean;
23
+ must_store_card_details: boolean;
24
+ allow_budget: boolean;
25
+ integration_type: EsolveIntegrationType;
26
+ bank_gateway_id: string;
27
+ accepted_card_types: string[];
28
+ post_transactions_to_gateway: boolean;
29
+ three_d_secure_url: string;
30
+ gateway_url: string;
31
+ generate_token_url: string;
32
+ widget_url: string;
33
+ successful_url: string;
34
+ failed_url: string;
35
+ enable_callback: boolean;
36
+ live: boolean;
37
+ default_module_id: number;
38
+ service_provider: string;
39
+ on_account: boolean;
40
+ sort_priority: number;
41
+ image_url: string;
42
+ }
43
+ export interface EsolvePaymentMethodOptions {
44
+ live?: boolean;
45
+ location_id?: number;
46
+ is_gateway?: boolean;
47
+ }
@@ -0,0 +1,47 @@
1
+ import { EsolveIntegrationType, EsolvePaymentMethodRecord } from './esolve-payment-method-record';
2
+ export declare class EsolvePaymentMethod {
3
+ id: number;
4
+ location_id: number;
5
+ paymethod_name: string;
6
+ description: string;
7
+ display_banking_details: boolean;
8
+ currency_code: string;
9
+ terminal_id: string;
10
+ terminal_id_secondary: string;
11
+ merchant_id: string;
12
+ application_id: string;
13
+ api_username: string;
14
+ api_password: string;
15
+ api_signature: string;
16
+ is_gateway: boolean;
17
+ must_store_card_details: boolean;
18
+ allow_budget: boolean;
19
+ integration_type: EsolveIntegrationType;
20
+ bank_gateway_id: string;
21
+ accepted_card_types: string[];
22
+ post_transactions_to_gateway: boolean;
23
+ three_d_secure_url: string;
24
+ gateway_url: string;
25
+ generate_token_url: string;
26
+ widget_url: string;
27
+ successful_url: string;
28
+ failed_url: string;
29
+ enable_callback: boolean;
30
+ live: boolean;
31
+ default_module_id: number;
32
+ service_provider: string;
33
+ on_account: boolean;
34
+ sort_priority: number;
35
+ image_url: string;
36
+ banking_details: BankingDetails;
37
+ constructor(record: EsolvePaymentMethodRecord);
38
+ }
39
+ export declare class BankingDetails {
40
+ bank_name: string;
41
+ account_holder: string;
42
+ account: string;
43
+ account_type: string;
44
+ swift_number: string;
45
+ branch_code: string;
46
+ constructor(bank_name: string, account_holder: string, account: string, account_type: string, swift_number: string, branch_code: string);
47
+ }
@@ -0,0 +1,14 @@
1
+ export interface EsolveShippingCostRecord {
2
+ shipping_cost_type: string;
3
+ shipping_total: number;
4
+ vat_on_shipping: number;
5
+ total_saving_on_shipping: number;
6
+ insurance_total: number;
7
+ vat_on_insurance: number;
8
+ total_saving_on_insurance: number;
9
+ }
10
+ export interface EsolveShippingCostOptions {
11
+ location_id?: number;
12
+ addresses_id: number;
13
+ shipping_id: number;
14
+ }
@@ -0,0 +1,12 @@
1
+ export declare class EsolveShippingCost {
2
+ shipping: EsolveShippingTotals;
3
+ insurance: EsolveShippingTotals;
4
+ constructor(shipping_total?: number, shipping_vat?: number, shipping_total_savings?: number, insurance_total?: number, insurance_vat?: number, insurance_total_savings?: number);
5
+ }
6
+ declare class EsolveShippingTotals {
7
+ total: number;
8
+ vat: number;
9
+ savings: number;
10
+ constructor(total: number, vat: number, savings: number);
11
+ }
12
+ export {};
@@ -0,0 +1,37 @@
1
+ export declare type EsolveLocationType = 'Domestic' | 'International' | 'Domestic and International';
2
+ export declare type EsolveInsuranceCostCalculationMethod = 'not_applicable' | 'included_in_price' | 'percentage_of_price';
3
+ export declare type EsolveShippingCostCalculationMethod = 'by_weight' | 'by_volume' | 'greater_of_volume_weight' | 'add_on_proforma' | 'volumetric' | 'flat_rate' | 'free';
4
+ export interface EsolveShippingMethodRecord {
5
+ id: number;
6
+ carrier_name: string;
7
+ delivery_category: string;
8
+ description: string;
9
+ location: EsolveLocationType;
10
+ pricing: string;
11
+ link_to_carrier_website: string;
12
+ days_to_deliver: number;
13
+ shipping_cost_calculation_method: EsolveShippingCostCalculationMethod;
14
+ insurance_cost_calculation_method: EsolveInsuranceCostCalculationMethod;
15
+ insurance_cost_percentage: number;
16
+ metric_factor: number;
17
+ allow_immediate_payment_processing: boolean;
18
+ allow_postal_address: boolean;
19
+ allow_physical_address: boolean;
20
+ client_to_collect: boolean;
21
+ is_default_shipping_method: boolean;
22
+ location_id: number;
23
+ use_zones: boolean;
24
+ min_distance: number;
25
+ max_distance: number;
26
+ shipping_surge_condition: number;
27
+ shipping_surge_percentage: number;
28
+ sort_priority: number;
29
+ shipping_group: string;
30
+ shipping_slot_identifier: string;
31
+ shipping_slot_delay_hours: number;
32
+ image_url: string;
33
+ }
34
+ export interface EsolveShippingMethodOptions {
35
+ location_id?: number;
36
+ addresses_id?: number;
37
+ }
@@ -0,0 +1,32 @@
1
+ import { EsolveInsuranceCostCalculationMethod, EsolveLocationType, EsolveShippingCostCalculationMethod } from './esolve-shipping-method-record';
2
+ export declare class EsolveShippingMethod {
3
+ id: number;
4
+ carrier_name: string;
5
+ delivery_category: string;
6
+ description: string;
7
+ location: EsolveLocationType;
8
+ pricing: string;
9
+ link_to_carrier_website: string;
10
+ days_to_deliver: number;
11
+ shipping_cost_calculation_method: EsolveShippingCostCalculationMethod;
12
+ insurance_cost_calculation_method: EsolveInsuranceCostCalculationMethod;
13
+ insurance_cost_percentage: number;
14
+ metric_factor: number;
15
+ allow_immediate_payment_processing: boolean;
16
+ allow_postal_address: boolean;
17
+ allow_physical_address: boolean;
18
+ client_to_collect: boolean;
19
+ is_default: boolean;
20
+ location_id: number;
21
+ use_zones: boolean;
22
+ min_distance: number;
23
+ max_distance: number;
24
+ shipping_surge_condition: number;
25
+ shipping_surge_percentage: number;
26
+ sort_priority: number;
27
+ shipping_group: string;
28
+ shipping_slot_identifier: string;
29
+ shipping_slot_delay_hours: number;
30
+ image_url: string;
31
+ constructor(id: number, carrier_name: string, delivery_category: string, description: string, location: EsolveLocationType, pricing: string, link_to_carrier_website: string, days_to_deliver: number, shipping_cost_calculation_method: EsolveShippingCostCalculationMethod, insurance_cost_calculation_method: EsolveInsuranceCostCalculationMethod, insurance_cost_percentage: number, metric_factor: number, allow_immediate_payment_processing: boolean, allow_postal_address: boolean, allow_physical_address: boolean, client_to_collect: boolean, is_default: boolean, location_id: number, use_zones: boolean, min_distance: number, max_distance: number, shipping_surge_condition: number, shipping_surge_percentage: number, sort_priority: number, shipping_group: string, shipping_slot_identifier: string, shipping_slot_delay_hours: number, image_url: string);
32
+ }
@@ -0,0 +1,47 @@
1
+ export interface EsolveStockLocationRecord {
2
+ id: number;
3
+ identifier: string;
4
+ head_office: boolean;
5
+ default_location_for_payment_methods: boolean;
6
+ description: string;
7
+ external_system_code: string;
8
+ erp_identifier: string;
9
+ userid: number;
10
+ importance: number;
11
+ is_active: boolean;
12
+ street: string;
13
+ suburb: string;
14
+ city: string;
15
+ province: string;
16
+ country: string;
17
+ postal_code: string;
18
+ latitude: number;
19
+ longitude: number;
20
+ pobox_postal_code: string;
21
+ pobox_city: string;
22
+ pobox: string;
23
+ branch_telnumber: string;
24
+ branch_telnumber_2: string;
25
+ branch_telnumber_3: string;
26
+ branch_cellnumber: string;
27
+ branch_fax: string;
28
+ branch_email: string;
29
+ monday_open_time: string;
30
+ monday_close_time: string;
31
+ tuesday_open_time: string;
32
+ tuesday_close_time: string;
33
+ wednesday_open_time: string;
34
+ wednesday_close_time: string;
35
+ thursday_open_time: string;
36
+ thursday_close_time: string;
37
+ friday_open_time: string;
38
+ friday_close_time: string;
39
+ saturday_open_time: string;
40
+ saturday_close_time: string;
41
+ sunday_open_time: string;
42
+ sunday_close_time: string;
43
+ public_holiday_open_time: string;
44
+ public_holiday_close_time: string;
45
+ trading_hours_additional_in?: string;
46
+ website_url: string;
47
+ }