@esolve/ng-esolve-connect 0.6.1 → 0.7.3

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 (175) hide show
  1. package/{esm2015/esolve-ng-esolve-connect.js → esm2020/esolve-ng-esolve-connect.mjs} +0 -0
  2. package/esm2020/lib/account/esolve-account.service.mjs +161 -0
  3. package/esm2020/lib/account/esolve-address-record.mjs +2 -0
  4. package/esm2020/lib/account/esolve-address-response.mjs +2 -0
  5. package/esm2020/lib/account/esolve-address-result.mjs +11 -0
  6. package/esm2020/lib/account/esolve-address-set-data.mjs +2 -0
  7. package/esm2020/lib/account/esolve-address.mjs +19 -0
  8. package/esm2020/lib/account/esolve-geocode-result.mjs +2 -0
  9. package/esm2020/lib/account/esolve-registration-data.mjs +2 -0
  10. package/esm2020/lib/account/esolve-registration-post-response-item.mjs +2 -0
  11. package/esm2020/lib/account/esolve-registration-result.mjs +11 -0
  12. package/esm2020/lib/account/esolve-user-account-data.mjs +2 -0
  13. package/esm2020/lib/account/esolve-user-account-record.mjs +2 -0
  14. package/esm2020/lib/account/esolve-user-account-result.mjs +9 -0
  15. package/esm2020/lib/account/esolve-user-account.mjs +29 -0
  16. package/{esm2015/lib/auth/esolve-auth-interceptor.service.js → esm2020/lib/auth/esolve-auth-interceptor.service.mjs} +7 -7
  17. package/esm2020/lib/auth/esolve-auth.service.mjs +163 -0
  18. package/{esm2015/lib/banners/esolve-banner-image-hotspot-record.js → esm2020/lib/banners/esolve-banner-image-hotspot-record.mjs} +0 -0
  19. package/{esm2015/lib/banners/esolve-banner-image-hotspot.js → esm2020/lib/banners/esolve-banner-image-hotspot.mjs} +0 -0
  20. package/{esm2015/lib/banners/esolve-banner-image-record.js → esm2020/lib/banners/esolve-banner-image-record.mjs} +0 -0
  21. package/{esm2015/lib/banners/esolve-banner-image.js → esm2020/lib/banners/esolve-banner-image.mjs} +0 -0
  22. package/{esm2015/lib/banners/esolve-banner-record.js → esm2020/lib/banners/esolve-banner-record.mjs} +0 -0
  23. package/{esm2015/lib/banners/esolve-banner-type.js → esm2020/lib/banners/esolve-banner-type.mjs} +0 -0
  24. package/{esm2015/lib/banners/esolve-banner.js → esm2020/lib/banners/esolve-banner.mjs} +0 -0
  25. package/{esm2015/lib/banners/esolve-banner.service.js → esm2020/lib/banners/esolve-banner.service.mjs} +3 -3
  26. package/{esm2015/lib/cart/esolve-cart-item-record.js → esm2020/lib/cart/esolve-cart-item-record.mjs} +0 -0
  27. package/{esm2015/lib/cart/esolve-cart-item-response.js → esm2020/lib/cart/esolve-cart-item-response.mjs} +0 -0
  28. package/{esm2015/lib/cart/esolve-cart-item.js → esm2020/lib/cart/esolve-cart-item.mjs} +0 -0
  29. package/{esm2015/lib/cart/esolve-cart-stock-item.js → esm2020/lib/cart/esolve-cart-stock-item.mjs} +0 -0
  30. package/{esm2015/lib/cart/esolve-cart-totals-record.js → esm2020/lib/cart/esolve-cart-totals-record.mjs} +0 -0
  31. package/{esm2015/lib/cart/esolve-cart-totals.js → esm2020/lib/cart/esolve-cart-totals.mjs} +0 -0
  32. package/esm2020/lib/cart/esolve-cart.service.mjs +172 -0
  33. package/esm2020/lib/cart/esolve-checkout-result.mjs +9 -0
  34. package/{esm2015/lib/cart/esolve-checkout.js → esm2020/lib/cart/esolve-checkout.mjs} +0 -0
  35. package/{esm2015/lib/category-tree/esolve-category-tree-item-record.js → esm2020/lib/category-tree/esolve-category-tree-item-record.mjs} +0 -0
  36. package/{esm2015/lib/category-tree/esolve-category-tree-item.js → esm2020/lib/category-tree/esolve-category-tree-item.mjs} +0 -0
  37. package/{esm2015/lib/category-tree/esolve-category-tree.service.js → esm2020/lib/category-tree/esolve-category-tree.service.mjs} +3 -3
  38. package/{esm2015/lib/esolve-connect.config.js → esm2020/lib/esolve-connect.config.mjs} +0 -0
  39. package/esm2020/lib/locations/esolve-locations.service.mjs +53 -0
  40. package/esm2020/lib/locations/esolve-stock-location-record.mjs +2 -0
  41. package/esm2020/lib/locations/esolve-stock-location.mjs +76 -0
  42. package/{esm2015/lib/media/esolve-media-article.js → esm2020/lib/media/esolve-media-article.mjs} +0 -0
  43. package/{esm2015/lib/media/esolve-media-record.js → esm2020/lib/media/esolve-media-record.mjs} +0 -0
  44. package/{esm2015/lib/media/esolve-media.service.js → esm2020/lib/media/esolve-media.service.mjs} +3 -3
  45. package/{esm2015/lib/menu/esolve-menu-item.js → esm2020/lib/menu/esolve-menu-item.mjs} +0 -0
  46. package/{esm2015/lib/menu/esolve-menu-tree-record.js → esm2020/lib/menu/esolve-menu-tree-record.mjs} +0 -0
  47. package/{esm2015/lib/menu/esolve-menu.service.js → esm2020/lib/menu/esolve-menu.service.mjs} +3 -3
  48. package/{esm2015/lib/news/esolve-news-article-author-record.js → esm2020/lib/news/esolve-news-article-author-record.mjs} +0 -0
  49. package/{esm2015/lib/news/esolve-news-article-author.js → esm2020/lib/news/esolve-news-article-author.mjs} +0 -0
  50. package/{esm2015/lib/news/esolve-news-article-list.js → esm2020/lib/news/esolve-news-article-list.mjs} +0 -0
  51. package/{esm2015/lib/news/esolve-news-article-record.js → esm2020/lib/news/esolve-news-article-record.mjs} +0 -0
  52. package/{esm2015/lib/news/esolve-news-article.js → esm2020/lib/news/esolve-news-article.mjs} +0 -0
  53. package/{esm2015/lib/news/esolve-news-group-record.js → esm2020/lib/news/esolve-news-group-record.mjs} +0 -0
  54. package/{esm2015/lib/news/esolve-news-group.js → esm2020/lib/news/esolve-news-group.mjs} +0 -0
  55. package/{esm2015/lib/news/esolve-news-manufacturer-record.js → esm2020/lib/news/esolve-news-manufacturer-record.mjs} +0 -0
  56. package/{esm2015/lib/news/esolve-news-range-record.js → esm2020/lib/news/esolve-news-range-record.mjs} +0 -0
  57. package/{esm2015/lib/news/esolve-news.service.js → esm2020/lib/news/esolve-news.service.mjs} +3 -3
  58. package/esm2020/lib/ng-esolve-connect.module.mjs +45 -0
  59. package/esm2020/lib/payment/esolve-card-data.mjs +2 -0
  60. package/esm2020/lib/payment/esolve-payment-method-options.mjs +2 -0
  61. package/esm2020/lib/payment/esolve-payment-method-record.mjs +2 -0
  62. package/esm2020/lib/payment/esolve-payment-method.mjs +49 -0
  63. package/esm2020/lib/payment/esolve-payment-response.mjs +2 -0
  64. package/esm2020/lib/payment/esolve-payment-result.mjs +22 -0
  65. package/esm2020/lib/payment/esolve-payment.service.mjs +178 -0
  66. package/esm2020/lib/payment/esolve-vault-item-result.mjs +20 -0
  67. package/esm2020/lib/payment/esolve-vault-item.mjs +19 -0
  68. package/esm2020/lib/payment/esolve-vault-record.mjs +2 -0
  69. package/esm2020/lib/payment/esolve-vault-response.mjs +2 -0
  70. package/esm2020/lib/session/esolve-session.mjs +27 -0
  71. package/esm2020/lib/session/esolve-session.service.mjs +79 -0
  72. package/esm2020/lib/session/esolve-stored-session.mjs +2 -0
  73. package/esm2020/lib/shared/error-handler/esolve-error-handler.service.mjs +58 -0
  74. package/{esm2015/lib/shared/error-handler/esolve-http-error.js → esm2020/lib/shared/error-handler/esolve-http-error.mjs} +0 -0
  75. package/{esm2015/lib/shared/esolve-response.js → esm2020/lib/shared/esolve-response.mjs} +1 -1
  76. package/{esm2015/lib/shared/esolve-url-target.js → esm2020/lib/shared/esolve-url-target.mjs} +0 -0
  77. package/esm2020/lib/shared/response-handler/esolve-response-handler.service.mjs +32 -0
  78. package/esm2020/lib/shared/response-handler/esolve-response-result.mjs +9 -0
  79. package/{esm2015/lib/shared/seo/esolve-seo-info.js → esm2020/lib/shared/seo/esolve-seo-info.mjs} +0 -0
  80. package/{esm2015/lib/shared/seo/esolve-seo.service.js → esm2020/lib/shared/seo/esolve-seo.service.mjs} +3 -3
  81. package/esm2020/lib/shipping/esolve-shipping-cost-record.mjs +2 -0
  82. package/esm2020/lib/shipping/esolve-shipping-cost.mjs +18 -0
  83. package/esm2020/lib/shipping/esolve-shipping-method-options.mjs +2 -0
  84. package/esm2020/lib/shipping/esolve-shipping-method-record.mjs +2 -0
  85. package/esm2020/lib/shipping/esolve-shipping-method.mjs +33 -0
  86. package/esm2020/lib/shipping/esolve-shipping.service.mjs +108 -0
  87. package/{esm2015/lib/stock/esolve-stock-badge-record.js → esm2020/lib/stock/esolve-stock-badge-record.mjs} +0 -0
  88. package/{esm2015/lib/stock/esolve-stock-badge.js → esm2020/lib/stock/esolve-stock-badge.mjs} +0 -0
  89. package/{esm2015/lib/stock/esolve-stock-item-list.js → esm2020/lib/stock/esolve-stock-item-list.mjs} +0 -0
  90. package/{esm2015/lib/stock/esolve-stock-item-options.js → esm2020/lib/stock/esolve-stock-item-options.mjs} +0 -0
  91. package/{esm2015/lib/stock/esolve-stock-item.js → esm2020/lib/stock/esolve-stock-item.mjs} +0 -0
  92. package/{esm2015/lib/stock/esolve-stock-price.js → esm2020/lib/stock/esolve-stock-price.mjs} +0 -0
  93. package/{esm2015/lib/stock/esolve-stock-record.js → esm2020/lib/stock/esolve-stock-record.mjs} +0 -0
  94. package/{esm2015/lib/stock/esolve-stock.service.js → esm2020/lib/stock/esolve-stock.service.mjs} +5 -6
  95. package/{esm2015/lib/tags/esolve-tag-record.js → esm2020/lib/tags/esolve-tag-record.mjs} +0 -0
  96. package/{esm2015/lib/tags/esolve-tag.js → esm2020/lib/tags/esolve-tag.mjs} +0 -0
  97. package/{esm2015/lib/topics/esolve-topic-record.js → esm2020/lib/topics/esolve-topic-record.mjs} +0 -0
  98. package/{esm2015/lib/topics/esolve-topic.js → esm2020/lib/topics/esolve-topic.mjs} +0 -0
  99. package/{esm2015/lib/topics/esolve-topic.service.js → esm2020/lib/topics/esolve-topic.service.mjs} +3 -3
  100. package/esm2020/public-api.mjs +78 -0
  101. package/fesm2015/esolve-ng-esolve-connect.mjs +2651 -0
  102. package/fesm2015/esolve-ng-esolve-connect.mjs.map +1 -0
  103. package/{fesm2015/esolve-ng-esolve-connect.js → fesm2020/esolve-ng-esolve-connect.mjs} +838 -461
  104. package/fesm2020/esolve-ng-esolve-connect.mjs.map +1 -0
  105. package/lib/account/esolve-account.service.d.ts +35 -0
  106. package/lib/{auth → account}/esolve-address-record.d.ts +0 -0
  107. package/lib/account/esolve-address-response.d.ts +8 -0
  108. package/lib/account/esolve-address-result.d.ts +10 -0
  109. package/lib/account/esolve-address-set-data.d.ts +17 -0
  110. package/lib/{auth → account}/esolve-address.d.ts +0 -0
  111. package/lib/account/esolve-geocode-result.d.ts +16 -0
  112. package/lib/{auth → account}/esolve-registration-data.d.ts +0 -0
  113. package/lib/account/esolve-registration-post-response-item.d.ts +7 -0
  114. package/lib/account/esolve-registration-result.d.ts +9 -0
  115. package/lib/account/esolve-user-account-data.d.ts +17 -0
  116. package/lib/account/esolve-user-account-record.d.ts +21 -0
  117. package/lib/account/esolve-user-account-result.d.ts +6 -0
  118. package/lib/account/esolve-user-account.d.ts +29 -0
  119. package/lib/auth/esolve-auth-interceptor.service.d.ts +1 -1
  120. package/lib/auth/esolve-auth.service.d.ts +5 -3
  121. package/lib/cart/esolve-cart.service.d.ts +6 -55
  122. package/lib/cart/esolve-checkout-result.d.ts +6 -0
  123. package/lib/locations/esolve-locations.service.d.ts +23 -0
  124. package/lib/{cart → locations}/esolve-stock-location-record.d.ts +0 -0
  125. package/lib/{cart → locations}/esolve-stock-location.d.ts +0 -0
  126. package/lib/payment/esolve-card-data.d.ts +7 -0
  127. package/lib/payment/esolve-payment-method-options.d.ts +5 -0
  128. package/lib/{cart → payment}/esolve-payment-method-record.d.ts +0 -5
  129. package/lib/{cart → payment}/esolve-payment-method.d.ts +2 -2
  130. package/lib/payment/esolve-payment-response.d.ts +13 -0
  131. package/lib/payment/esolve-payment-result.d.ts +10 -0
  132. package/lib/payment/esolve-payment.service.d.ts +61 -0
  133. package/lib/payment/esolve-vault-item-result.d.ts +10 -0
  134. package/lib/payment/esolve-vault-item.d.ts +10 -0
  135. package/lib/payment/esolve-vault-record.d.ts +11 -0
  136. package/lib/payment/esolve-vault-response.d.ts +9 -0
  137. package/lib/{auth → session}/esolve-session.d.ts +0 -0
  138. package/lib/{auth → session}/esolve-session.service.d.ts +0 -0
  139. package/lib/{auth → session}/esolve-stored-session.d.ts +0 -0
  140. package/lib/shared/error-handler/esolve-error-handler.service.d.ts +1 -1
  141. package/lib/shared/esolve-response.d.ts +5 -5
  142. package/lib/shared/response-handler/esolve-response-handler.service.d.ts +15 -0
  143. package/lib/shared/response-handler/esolve-response-result.d.ts +6 -0
  144. package/lib/{cart → shipping}/esolve-shipping-cost-record.d.ts +0 -5
  145. package/lib/{cart → shipping}/esolve-shipping-cost.d.ts +0 -0
  146. package/lib/shipping/esolve-shipping-method-options.d.ts +4 -0
  147. package/lib/{cart → shipping}/esolve-shipping-method-record.d.ts +0 -4
  148. package/lib/{cart → shipping}/esolve-shipping-method.d.ts +0 -0
  149. package/lib/shipping/esolve-shipping.service.d.ts +37 -0
  150. package/package.json +22 -8
  151. package/public-api.d.ts +24 -9
  152. package/bundles/esolve-ng-esolve-connect.umd.js +0 -3064
  153. package/bundles/esolve-ng-esolve-connect.umd.js.map +0 -1
  154. package/esm2015/lib/auth/esolve-account.service.js +0 -103
  155. package/esm2015/lib/auth/esolve-address-record.js +0 -2
  156. package/esm2015/lib/auth/esolve-address.js +0 -19
  157. package/esm2015/lib/auth/esolve-auth.service.js +0 -163
  158. package/esm2015/lib/auth/esolve-registration-data.js +0 -2
  159. package/esm2015/lib/auth/esolve-session.js +0 -27
  160. package/esm2015/lib/auth/esolve-session.service.js +0 -79
  161. package/esm2015/lib/auth/esolve-stored-session.js +0 -2
  162. package/esm2015/lib/cart/esolve-cart.service.js +0 -326
  163. package/esm2015/lib/cart/esolve-payment-method-record.js +0 -2
  164. package/esm2015/lib/cart/esolve-payment-method.js +0 -49
  165. package/esm2015/lib/cart/esolve-shipping-cost-record.js +0 -2
  166. package/esm2015/lib/cart/esolve-shipping-cost.js +0 -18
  167. package/esm2015/lib/cart/esolve-shipping-method-record.js +0 -2
  168. package/esm2015/lib/cart/esolve-shipping-method.js +0 -33
  169. package/esm2015/lib/cart/esolve-stock-location-record.js +0 -2
  170. package/esm2015/lib/cart/esolve-stock-location.js +0 -76
  171. package/esm2015/lib/ng-esolve-connect.module.js +0 -43
  172. package/esm2015/lib/shared/error-handler/esolve-error-handler.service.js +0 -58
  173. package/esm2015/public-api.js +0 -58
  174. package/fesm2015/esolve-ng-esolve-connect.js.map +0 -1
  175. package/lib/auth/esolve-account.service.d.ts +0 -23
@@ -0,0 +1,17 @@
1
+ import { EsolveAddressType } from './esolve-address-record';
2
+ export interface EsolveAddressPostData {
3
+ addresses_id?: number;
4
+ recipient?: string;
5
+ address_type?: EsolveAddressType;
6
+ pobox?: string;
7
+ place_name?: string;
8
+ street_number?: string | number;
9
+ street?: string;
10
+ suburb?: string;
11
+ sub_region?: string;
12
+ city?: string;
13
+ province?: string;
14
+ country?: string;
15
+ postal_code?: string;
16
+ description?: string;
17
+ }
File without changes
@@ -0,0 +1,16 @@
1
+ export interface EsolveGeocodeResult {
2
+ status: string;
3
+ checksum: string;
4
+ cached: boolean;
5
+ error_message?: string;
6
+ formatted_address?: string;
7
+ street_number?: string;
8
+ street?: string;
9
+ suburb?: string;
10
+ city?: string;
11
+ province?: string;
12
+ country?: string;
13
+ postal_code?: string;
14
+ latitude?: number;
15
+ longitude?: number;
16
+ }
@@ -0,0 +1,7 @@
1
+ import { EsolvePostResponseItem } from '../shared/esolve-response';
2
+ export interface EsolveRegistrationPostResponseItem extends EsolvePostResponseItem {
3
+ esolve_id: number;
4
+ guest: boolean;
5
+ authentication_required: boolean;
6
+ auto_login: boolean;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { EsolveResponseResult } from '../shared/response-handler/esolve-response-result';
2
+ import { EsolveRegistrationPostResponseItem } from './esolve-registration-post-response-item';
3
+ export declare class EsolveRegistrationResult extends EsolveResponseResult {
4
+ user_id: number;
5
+ guest: boolean;
6
+ authentication_required: boolean;
7
+ auto_login: boolean;
8
+ constructor(response: EsolveRegistrationPostResponseItem);
9
+ }
@@ -0,0 +1,17 @@
1
+ export interface EsolveUserAccountData {
2
+ email?: string;
3
+ loyaltynumber?: string;
4
+ title?: string;
5
+ initials?: string;
6
+ firstname?: string;
7
+ surname?: string;
8
+ idnumber?: string;
9
+ telnumber?: string;
10
+ cellnumber?: string;
11
+ fax?: string;
12
+ busname?: string;
13
+ vatnum?: string;
14
+ busdescript?: string;
15
+ business_type?: string;
16
+ registration_type?: string;
17
+ }
@@ -0,0 +1,21 @@
1
+ export interface EsolveUserAccountRecord {
2
+ userid: number;
3
+ email: string;
4
+ registration_type: string;
5
+ account: string;
6
+ loyaltynumber: string;
7
+ gender: string;
8
+ title: string;
9
+ initials: string;
10
+ firstname: string;
11
+ surname: string;
12
+ idnumber: string;
13
+ telnumber: string;
14
+ cellnumber: string;
15
+ fax: string;
16
+ busname: string;
17
+ vatnum: string;
18
+ busdescript: string;
19
+ business_type: string;
20
+ language: string;
21
+ }
@@ -0,0 +1,6 @@
1
+ import { EsolvePostResponseItem } from '../shared/esolve-response';
2
+ import { EsolveResponseResult } from '../shared/response-handler/esolve-response-result';
3
+ export declare class EsolveUserAccountResult extends EsolveResponseResult {
4
+ id: number;
5
+ constructor(response: EsolvePostResponseItem);
6
+ }
@@ -0,0 +1,29 @@
1
+ export declare class EsolveUserAccount {
2
+ esolve_id: number;
3
+ email: string;
4
+ registration_type: string;
5
+ title: string;
6
+ first_name: string;
7
+ last_name: string;
8
+ initials: string;
9
+ gender: string;
10
+ identification_number: string;
11
+ account_number?: string;
12
+ loyalty_number?: string;
13
+ business_details?: EsolveUserAccountBusiness;
14
+ contact_details?: EsolveUserAccountContact;
15
+ constructor(esolve_id: number, email: string, registration_type: string, title: string, first_name: string, last_name: string, initials: string, gender: string, identification_number: string);
16
+ }
17
+ export declare class EsolveUserAccountBusiness {
18
+ name: string;
19
+ vat_number: string;
20
+ description: string;
21
+ type: string;
22
+ constructor(name: string, vat_number: string, description: string, type: string);
23
+ }
24
+ export declare class EsolveUserAccountContact {
25
+ tel_number?: string | undefined;
26
+ cell_number?: string | undefined;
27
+ fax_number?: string | undefined;
28
+ constructor(tel_number?: string | undefined, cell_number?: string | undefined, fax_number?: string | undefined);
29
+ }
@@ -1,7 +1,7 @@
1
1
  import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { EsolveConnectConfig } from '../esolve-connect.config';
4
- import { EsolveSessionService } from './esolve-session.service';
4
+ import { EsolveSessionService } from '../session/esolve-session.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class EsolveAuthInterceptorService implements HttpInterceptor {
7
7
  private config;
@@ -1,7 +1,8 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
+ import { CookieService } from 'ngx-cookie-service';
3
4
  import { EsolveConnectConfig } from '../esolve-connect.config';
4
- import { EsolveSessionService } from './esolve-session.service';
5
+ import { EsolveSessionService } from '../session/esolve-session.service';
5
6
  import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
6
7
  import * as i0 from "@angular/core";
7
8
  interface EsolveAuthResponseData {
@@ -21,12 +22,13 @@ export declare class EsolveAuthService {
21
22
  private http;
22
23
  private session;
23
24
  private errorHandler;
24
- constructor(config: EsolveConnectConfig, http: HttpClient, session: EsolveSessionService, errorHandler: EsolveErrorHandlerService);
25
+ private cookieService;
26
+ constructor(config: EsolveConnectConfig, http: HttpClient, session: EsolveSessionService, errorHandler: EsolveErrorHandlerService, cookieService: CookieService);
25
27
  private checkAccessToken;
26
28
  getAccessToken(email: string, password: string, anonymous?: boolean): Observable<EsolveAuthResponseData>;
27
29
  autoLogin(): void;
28
30
  login(email: string, password: string): Observable<number>;
29
- logout(): void;
31
+ logout(): Promise<EsolveAuthResponseData>;
30
32
  private handleExpiration;
31
33
  private handleAuthentication;
32
34
  private handleError;
@@ -1,54 +1,26 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { EsolveConnectConfig } from '../esolve-connect.config';
4
+ import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
5
+ import { EsolveResponseHandlerService } from '../shared/response-handler/esolve-response-handler.service';
4
6
  import { EsolveCart, EsolveCartSetAction, EsolveCartSetItem } from './esolve-cart-item';
5
7
  import { EsolveCartItemResponse } from './esolve-cart-item-response';
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
8
  import { EsolveCartTotals } from './esolve-cart-totals';
14
- import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
9
+ import { EsolveCheckoutResult } from './esolve-checkout-result';
15
10
  import * as i0 from "@angular/core";
16
11
  export declare class EsolveCartService {
17
12
  private config;
18
13
  private http;
19
14
  private errorHandler;
15
+ private responseHandler;
20
16
  private _cached_tracking;
21
- constructor(config: EsolveConnectConfig, http: HttpClient, errorHandler: EsolveErrorHandlerService);
17
+ constructor(config: EsolveConnectConfig, http: HttpClient, errorHandler: EsolveErrorHandlerService, responseHandler: EsolveResponseHandlerService);
22
18
  /**
23
19
  * Processes the eSolve tree records.
24
20
  * @param cart_item_records Records to process
25
21
  * @returns An array of processed cart items
26
22
  */
27
23
  private processCart;
28
- /**
29
- * Processes the eSolve stock location records.
30
- * @param records Records to process
31
- * @returns An array of processed stock location records
32
- */
33
- private processStockLocations;
34
- /**
35
- * Processes the eSolve shipping method records.
36
- * @param records Records to process
37
- * @returns An array of processed shipping methods
38
- */
39
- private processShippingMethods;
40
- /**
41
- * Processes the eSolve payment method records.
42
- * @param records Records to process
43
- * @returns An array of processed payment methods.
44
- */
45
- private processPaymentMethods;
46
- /**
47
- * Processes the eSolve shipping costs record.
48
- * @param record Data to process
49
- * @returns Processed shipping costs
50
- */
51
- private processShippingCost;
52
24
  /**
53
25
  * Processes the eSolve cart totals
54
26
  * @param record Data to process
@@ -67,27 +39,6 @@ export declare class EsolveCartService {
67
39
  * @returns An `Observable` with an array of responses that gives feedback on the requested changes
68
40
  */
69
41
  setCart(items: EsolveCartSetItem[], action?: EsolveCartSetAction): Observable<EsolveCartItemResponse[]>;
70
- /**
71
- * Retrieves a list of stock locations
72
- * @returns An `Observable` with an array of stock locations
73
- */
74
- getStockLocations(): Observable<EsolveStockLocation[]>;
75
- /**
76
- * Retrieves a list of shipping methods
77
- * @returns An `Observable` with an array of shipping methods
78
- */
79
- getShippingMethods(options?: EsolveShippingMethodOptions): Observable<EsolveShippingMethod[]>;
80
- /**
81
- * Retrieves a list of payment methods
82
- * @returns An `Observable` with an array of payment methods
83
- */
84
- getPaymentMethods(options?: EsolvePaymentMethodOptions): Observable<EsolvePaymentMethod[]>;
85
- /**
86
- * Retrieves the shipping costs
87
- * @param options Shipping cost options
88
- * @returns An `Observable` with the shipping costs
89
- */
90
- getShippingCost(options: EsolveShippingCostOptions): Observable<EsolveShippingCost>;
91
42
  /**
92
43
  * Retrieves the totals of the cart with all the totals calculated
93
44
  * @returns An `Observable` with an object containing cart totals
@@ -108,7 +59,7 @@ export declare class EsolveCartService {
108
59
  * @param comments Additional comments on the cart
109
60
  * @returns An `Observable` with the transaction ID
110
61
  */
111
- checkout(type: 'order' | 'quote', addresses_id: number, shipping_id: number, payment_method_id?: number, location_id?: number, comments?: string): Observable<number>;
62
+ checkout(type: 'order' | 'quote', addresses_id: number, shipping_id: number, payment_method_id?: number, location_id?: number, comments?: string): Observable<EsolveCheckoutResult>;
112
63
  static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCartService, never>;
113
64
  static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCartService>;
114
65
  }
@@ -0,0 +1,6 @@
1
+ import { EsolveResponseResult } from '../shared/response-handler/esolve-response-result';
2
+ import { EsolveCheckoutResponse } from './esolve-checkout';
3
+ export declare class EsolveCheckoutResult extends EsolveResponseResult {
4
+ id: number;
5
+ constructor(response: EsolveCheckoutResponse);
6
+ }
@@ -0,0 +1,23 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { EsolveConnectConfig } from '../esolve-connect.config';
4
+ import { EsolveStockLocation } from './esolve-stock-location';
5
+ import * as i0 from "@angular/core";
6
+ export declare class EsolveLocationsService {
7
+ private config;
8
+ private http;
9
+ constructor(config: EsolveConnectConfig, http: HttpClient);
10
+ /**
11
+ * Processes the eSolve stock location records.
12
+ * @param records Records to process
13
+ * @returns An array of processed stock location records
14
+ */
15
+ private processStockLocations;
16
+ /**
17
+ * Retrieves a list of stock locations
18
+ * @returns An `Observable` with an array of stock locations
19
+ */
20
+ getStockLocations(): Observable<EsolveStockLocation[]>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveLocationsService, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveLocationsService>;
23
+ }
@@ -0,0 +1,7 @@
1
+ export interface EsolveCardData {
2
+ card_number: string;
3
+ name: string;
4
+ cvv: string;
5
+ expiry_month: string;
6
+ expiry_year: string;
7
+ }
@@ -0,0 +1,5 @@
1
+ export interface EsolvePaymentMethodOptions {
2
+ live?: boolean;
3
+ location_id?: number;
4
+ is_gateway?: boolean;
5
+ }
@@ -40,8 +40,3 @@ export interface EsolvePaymentMethodRecord {
40
40
  sort_priority: number;
41
41
  image_url: string;
42
42
  }
43
- export interface EsolvePaymentMethodOptions {
44
- live?: boolean;
45
- location_id?: number;
46
- is_gateway?: boolean;
47
- }
@@ -33,10 +33,10 @@ export declare class EsolvePaymentMethod {
33
33
  on_account: boolean;
34
34
  sort_priority: number;
35
35
  image_url: string;
36
- banking_details: BankingDetails;
36
+ banking_details: EsolveBankingDetails;
37
37
  constructor(record: EsolvePaymentMethodRecord);
38
38
  }
39
- export declare class BankingDetails {
39
+ export declare class EsolveBankingDetails {
40
40
  bank_name: string;
41
41
  account_holder: string;
42
42
  account: string;
@@ -0,0 +1,13 @@
1
+ import { EsolvePostResponseItem } from '../shared/esolve-response';
2
+ export interface EsolvePaymentResponse extends EsolvePostResponseItem {
3
+ esolve_id: number;
4
+ gateway_error_message?: string;
5
+ three_d_secure?: boolean;
6
+ redirect_url?: string;
7
+ form_inputs?: EsolvePaygateFormInput[];
8
+ form_html?: string;
9
+ }
10
+ export interface EsolvePaygateFormInput {
11
+ key: string;
12
+ value: string;
13
+ }
@@ -0,0 +1,10 @@
1
+ import { EsolveResponseResult } from '../shared/response-handler/esolve-response-result';
2
+ import { EsolvePaygateFormInput, EsolvePaymentResponse } from './esolve-payment-response';
3
+ export declare class EsolvePaymentResult extends EsolveResponseResult {
4
+ gateway_error_message?: string;
5
+ three_d_secure?: boolean;
6
+ redirect_url?: string;
7
+ form_inputs?: EsolvePaygateFormInput[];
8
+ form_html?: string;
9
+ constructor(response: EsolvePaymentResponse);
10
+ }
@@ -0,0 +1,61 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { EsolveConnectConfig } from '../esolve-connect.config';
4
+ import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
5
+ import { EsolveResponseHandlerService } from '../shared/response-handler/esolve-response-handler.service';
6
+ import { EsolvePaymentMethod } from './esolve-payment-method';
7
+ import { EsolvePaymentMethodOptions } from './esolve-payment-method-options';
8
+ import { EsolveCardData } from './esolve-card-data';
9
+ import { EsolveVaultItem } from './esolve-vault-item';
10
+ import { EsolveVaultItemResult } from './esolve-vault-item-result';
11
+ import { EsolvePaymentResult } from './esolve-payment-result';
12
+ import * as i0 from "@angular/core";
13
+ export declare class EsolvePaymentService {
14
+ private config;
15
+ private http;
16
+ private errorHandler;
17
+ private responseHandler;
18
+ constructor(config: EsolveConnectConfig, http: HttpClient, errorHandler: EsolveErrorHandlerService, responseHandler: EsolveResponseHandlerService);
19
+ /**
20
+ * Processes the eSolve payment method records.
21
+ * @param records Records to process
22
+ * @returns An array of processed payment methods.
23
+ */
24
+ private processPaymentMethods;
25
+ /**
26
+ * Processes the eSolve vault records.
27
+ * @param records Records to process
28
+ * @returns An array of processed vault items (a.k.a. cards)
29
+ */
30
+ private processVaultItems;
31
+ private generateExpiry;
32
+ /**
33
+ * Retrieves a list of payment methods.
34
+ * @param options Filter options
35
+ * @returns An `Observable` with an array of payment methods
36
+ */
37
+ getPaymentMethods(options?: EsolvePaymentMethodOptions): Observable<EsolvePaymentMethod[]>;
38
+ /**
39
+ * Retrieves a list of saved cards from the vault.
40
+ * @param payment_methods_id eSolve ID of a payment method
41
+ * @returns An `Observable` with an array of saved bank cards
42
+ */
43
+ getVault(payment_methods_id?: number): Observable<EsolveVaultItem[]>;
44
+ /**
45
+ * Sets a new card in the vault OR updates an existing one.
46
+ * @param payment_methods_id Selected payment method
47
+ * @param card_data Information of bank card
48
+ * @returns An `Observable` with the result of the vault set.
49
+ */
50
+ setVaultItem(payment_methods_id: number, card_data: EsolveCardData): Observable<EsolveVaultItemResult>;
51
+ /**
52
+ * Sets the payment for the specified transaction using selected payment method.
53
+ * @param transaction_id eSolve ID to the transaction
54
+ * @param payment_methods_id eSolve ID to the selected payment method
55
+ * @param card ID of selected card from the vault or information to a brand new card
56
+ * @returns An `Observable` with the result of the payment
57
+ */
58
+ setPayment(transaction_id: number, payment_methods_id: number, card: EsolveCardData | number): Observable<EsolvePaymentResult>;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolvePaymentService, never>;
60
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolvePaymentService>;
61
+ }
@@ -0,0 +1,10 @@
1
+ import { EsolveResponseResult } from '../shared/response-handler/esolve-response-result';
2
+ import { EsolveVaultResponse } from './esolve-vault-response';
3
+ export declare class EsolveVaultItemResult extends EsolveResponseResult {
4
+ id: number;
5
+ token?: string;
6
+ card_valid?: boolean;
7
+ card_details_validated?: boolean;
8
+ gateway_error_message?: string;
9
+ constructor(response: EsolveVaultResponse);
10
+ }
@@ -0,0 +1,10 @@
1
+ export declare class EsolveVaultItem {
2
+ id: number;
3
+ last4: string;
4
+ brand: string;
5
+ private expiry;
6
+ get expiry_month(): string;
7
+ get expiry_year(): number;
8
+ get masked_number(): string;
9
+ constructor(id: number, last4: string, brand: string, expiry_timestamp: number);
10
+ }
@@ -0,0 +1,11 @@
1
+ export interface EsolveVaultRecord {
2
+ id: number;
3
+ payment_methods_id: number;
4
+ description: string;
5
+ token: string;
6
+ brand: string;
7
+ last4: string;
8
+ expiry: string;
9
+ expiry_timestamp: number;
10
+ default: boolean;
11
+ }
@@ -0,0 +1,9 @@
1
+ import { EsolvePostResponseItem } from '../shared/esolve-response';
2
+ export interface EsolveVaultResponse extends EsolvePostResponseItem {
3
+ esolve_id: number;
4
+ card_valid?: boolean;
5
+ card_details_validated?: boolean;
6
+ gateway_error_message?: string;
7
+ user_vault_id?: number;
8
+ token?: string;
9
+ }
File without changes
File without changes
@@ -5,7 +5,7 @@ export declare class EsolveErrorHandlerService {
5
5
  constructor();
6
6
  private parseException;
7
7
  private parseErrors;
8
- handleHttpError(service_type: string, errorRes: HttpErrorResponse | any): Observable<never>;
8
+ handleHttpPostError(service_type: string, errorRes: HttpErrorResponse | any): Observable<never>;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<EsolveErrorHandlerService, never>;
10
10
  static ɵprov: i0.ɵɵInjectableDeclaration<EsolveErrorHandlerService>;
11
11
  }
@@ -21,14 +21,14 @@ export interface EsolvePostResponseItem {
21
21
  status: EsolvePostResponseStatus;
22
22
  log: EsolveResponseLogItem[];
23
23
  }
24
+ export interface EsolveResponseLogItem {
25
+ type: 'success' | 'error';
26
+ message_code: string;
27
+ message: string;
28
+ }
24
29
  interface EsolvePostResponseStatus {
25
30
  state: 'warning' | 'success' | 'error' | 'none';
26
31
  errors: number;
27
32
  success: number;
28
33
  }
29
- interface EsolveResponseLogItem {
30
- type: 'success' | 'error';
31
- message_code: string;
32
- message: string;
33
- }
34
34
  export {};
@@ -0,0 +1,15 @@
1
+ import { EsolvePostResponseItem, EsolveSetResponse } from '../esolve-response';
2
+ import { EsolveResponseResult } from './esolve-response-result';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EsolveResponseHandlerService {
5
+ constructor();
6
+ /**
7
+ * Parse single HTTP response
8
+ * @param http_response HTTP Response to eSolve service
9
+ * @param resultHandler Function to parse response to a result
10
+ * @returns Parsed result of response
11
+ */
12
+ validateSingleHttpResponse<R extends EsolveResponseResult, T extends EsolvePostResponseItem>(http_response: EsolveSetResponse<T>, resultHandler: (response: T) => R): R;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveResponseHandlerService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveResponseHandlerService>;
15
+ }
@@ -0,0 +1,6 @@
1
+ import { EsolvePostResponseItem, EsolveResponseLogItem } from '../esolve-response';
2
+ export declare class EsolveResponseResult {
3
+ success_log: EsolveResponseLogItem[];
4
+ error_log: EsolveResponseLogItem[];
5
+ constructor(response: EsolvePostResponseItem);
6
+ }
@@ -7,8 +7,3 @@ export interface EsolveShippingCostRecord {
7
7
  vat_on_insurance: number;
8
8
  total_saving_on_insurance: number;
9
9
  }
10
- export interface EsolveShippingCostOptions {
11
- location_id?: number;
12
- addresses_id: number;
13
- shipping_id: number;
14
- }
File without changes
@@ -0,0 +1,4 @@
1
+ export interface EsolveShippingMethodOptions {
2
+ location_id?: number;
3
+ addresses_id?: number;
4
+ }
@@ -31,7 +31,3 @@ export interface EsolveShippingMethodRecord {
31
31
  shipping_slot_delay_hours: number;
32
32
  image_url: string;
33
33
  }
34
- export interface EsolveShippingMethodOptions {
35
- location_id?: number;
36
- addresses_id?: number;
37
- }
@@ -0,0 +1,37 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { EsolveConnectConfig } from '../esolve-connect.config';
4
+ import { EsolveShippingMethod } from './esolve-shipping-method';
5
+ import { EsolveShippingMethodOptions } from './esolve-shipping-method-options';
6
+ import { EsolveShippingCost } from './esolve-shipping-cost';
7
+ import * as i0 from "@angular/core";
8
+ export declare class EsolveShippingService {
9
+ private config;
10
+ private http;
11
+ constructor(config: EsolveConnectConfig, http: HttpClient);
12
+ /**
13
+ * Processes the eSolve shipping method records.
14
+ * @param records Records to process
15
+ * @returns An array of processed shipping methods
16
+ */
17
+ private processShippingMethods;
18
+ /**
19
+ * Processes the eSolve shipping costs record.
20
+ * @param record Data to process
21
+ * @returns Processed shipping costs
22
+ */
23
+ private processShippingCost;
24
+ /**
25
+ * Retrieves a list of shipping methods
26
+ * @returns An `Observable` with an array of shipping methods
27
+ */
28
+ getShippingMethods(options?: EsolveShippingMethodOptions): Observable<EsolveShippingMethod[]>;
29
+ /**
30
+ * Retrieves the shipping costs
31
+ * @param options Shipping cost options
32
+ * @returns An `Observable` with the shipping costs
33
+ */
34
+ getShippingCost(shipping_id: number, addresses_id: number, location_id?: number): Observable<EsolveShippingCost>;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<EsolveShippingService, never>;
36
+ static ɵprov: i0.ɵɵInjectableDeclaration<EsolveShippingService>;
37
+ }