@esolve/ng-esolve-connect 0.5.0 → 0.6.2
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/bundles/esolve-ng-esolve-connect.umd.js +528 -465
- package/bundles/esolve-ng-esolve-connect.umd.js.map +1 -1
- package/esm2015/lib/auth/esolve-account.service.js +55 -7
- package/esm2015/lib/auth/esolve-auth-interceptor.service.js +3 -3
- package/esm2015/lib/auth/esolve-auth.service.js +21 -58
- package/esm2015/lib/auth/esolve-registration-data.js +2 -0
- package/esm2015/lib/auth/esolve-registration-post-response-item.js +2 -0
- package/esm2015/lib/auth/esolve-registration-result.js +9 -0
- package/esm2015/lib/auth/esolve-session.service.js +4 -10
- package/esm2015/lib/cart/esolve-cart-item-record.js +1 -1
- package/esm2015/lib/cart/esolve-cart-item-response.js +2 -0
- package/esm2015/lib/cart/esolve-cart.service.js +8 -53
- package/esm2015/lib/esolve-connect.config.js +8 -1
- package/esm2015/lib/shared/error-handler/esolve-error-handler.service.js +58 -0
- package/esm2015/lib/shared/error-handler/esolve-http-error.js +8 -0
- package/esm2015/lib/stock/esolve-stock-item.js +13 -3
- package/esm2015/lib/stock/esolve-stock-record.js +1 -1
- package/esm2015/lib/stock/esolve-stock.service.js +2 -2
- package/esm2015/public-api.js +6 -1
- package/fesm2015/esolve-ng-esolve-connect.js +257 -214
- package/fesm2015/esolve-ng-esolve-connect.js.map +1 -1
- package/lib/auth/esolve-account.service.d.ts +8 -1
- package/lib/auth/esolve-auth.service.d.ts +3 -1
- package/lib/auth/esolve-registration-data.d.ts +12 -0
- package/lib/auth/esolve-registration-post-response-item.d.ts +6 -0
- package/lib/auth/esolve-registration-result.d.ts +7 -0
- package/lib/auth/esolve-session.service.d.ts +1 -2
- package/lib/cart/esolve-cart-item-record.d.ts +0 -5
- package/lib/cart/esolve-cart-item-response.d.ts +5 -0
- package/lib/cart/esolve-cart.service.d.ts +4 -2
- package/lib/shared/error-handler/esolve-error-handler.service.d.ts +11 -0
- package/lib/shared/error-handler/esolve-http-error.d.ts +6 -0
- package/lib/stock/esolve-stock-item.d.ts +17 -1
- package/lib/stock/esolve-stock-record.d.ts +7 -1
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
|
@@ -2,16 +2,23 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
4
4
|
import { EsolveAddress } from './esolve-address';
|
|
5
|
+
import { EsolveRegistrationData } from './esolve-registration-data';
|
|
6
|
+
import { EsolveSessionService } from './esolve-session.service';
|
|
7
|
+
import { EsolveRegistrationResult } from './esolve-registration-result';
|
|
8
|
+
import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
|
|
5
9
|
import * as i0 from "@angular/core";
|
|
6
10
|
export declare class EsolveAccountService {
|
|
7
11
|
private config;
|
|
8
12
|
private http;
|
|
13
|
+
private sessionService;
|
|
14
|
+
private errorHandler;
|
|
9
15
|
private _user_id;
|
|
10
16
|
get user_id(): number;
|
|
11
17
|
set user_id(value: number);
|
|
12
|
-
constructor(config: EsolveConnectConfig, http: HttpClient);
|
|
18
|
+
constructor(config: EsolveConnectConfig, http: HttpClient, sessionService: EsolveSessionService, errorHandler: EsolveErrorHandlerService);
|
|
13
19
|
private processUserAddress;
|
|
14
20
|
getAddress(): Observable<EsolveAddress[]>;
|
|
21
|
+
register(user_registration: EsolveRegistrationData): Observable<EsolveRegistrationResult>;
|
|
15
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveAccountService, never>;
|
|
16
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveAccountService>;
|
|
17
24
|
}
|
|
@@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
4
4
|
import { EsolveSessionService } from './esolve-session.service';
|
|
5
|
+
import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
interface EsolveAuthResponseData {
|
|
7
8
|
service_type: string;
|
|
@@ -19,7 +20,8 @@ export declare class EsolveAuthService {
|
|
|
19
20
|
private config;
|
|
20
21
|
private http;
|
|
21
22
|
private session;
|
|
22
|
-
|
|
23
|
+
private errorHandler;
|
|
24
|
+
constructor(config: EsolveConnectConfig, http: HttpClient, session: EsolveSessionService, errorHandler: EsolveErrorHandlerService);
|
|
23
25
|
private checkAccessToken;
|
|
24
26
|
getAccessToken(email: string, password: string, anonymous?: boolean): Observable<EsolveAuthResponseData>;
|
|
25
27
|
autoLogin(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface EsolveRegistrationData {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
confirm_password?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
firstname?: string;
|
|
7
|
+
surname?: string;
|
|
8
|
+
loyaltynumber?: string;
|
|
9
|
+
idnumber?: string;
|
|
10
|
+
telnumber?: string;
|
|
11
|
+
cellnumber?: string;
|
|
12
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
3
|
-
import { EsolveAccountService } from './esolve-account.service';
|
|
4
3
|
import { EsolveSession } from './esolve-session';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class EsolveSessionService {
|
|
@@ -9,8 +8,8 @@ export declare class EsolveSessionService {
|
|
|
9
8
|
private storage_key;
|
|
10
9
|
private _session;
|
|
11
10
|
session: Observable<EsolveSession>;
|
|
12
|
-
constructor(config: EsolveConnectConfig, account: EsolveAccountService);
|
|
13
11
|
get currentSession(): EsolveSession;
|
|
12
|
+
constructor(config: EsolveConnectConfig);
|
|
14
13
|
private setStorageKey;
|
|
15
14
|
private startTimer;
|
|
16
15
|
clearTimer(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EsolvePostResponseItem } from '../shared/esolve-response';
|
|
2
1
|
export interface EsolveCartItemRecord {
|
|
3
2
|
id: number;
|
|
4
3
|
code: string;
|
|
@@ -37,7 +36,3 @@ export interface EsolveCartItemRecord {
|
|
|
37
36
|
subcategory_min_level: number;
|
|
38
37
|
image_name: string;
|
|
39
38
|
}
|
|
40
|
-
export interface EsolveCartItemResponse extends EsolvePostResponseItem {
|
|
41
|
-
esolve_id: number;
|
|
42
|
-
current_qty: number;
|
|
43
|
-
}
|
|
@@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
4
4
|
import { EsolveCart, EsolveCartSetAction, EsolveCartSetItem } from './esolve-cart-item';
|
|
5
|
-
import { EsolveCartItemResponse } from './esolve-cart-item-
|
|
5
|
+
import { EsolveCartItemResponse } from './esolve-cart-item-response';
|
|
6
6
|
import { EsolveStockLocation } from './esolve-stock-location';
|
|
7
7
|
import { EsolvePaymentMethod } from './esolve-payment-method';
|
|
8
8
|
import { EsolvePaymentMethodOptions } from './esolve-payment-method-record';
|
|
@@ -11,12 +11,14 @@ import { EsolveShippingMethodOptions } from './esolve-shipping-method-record';
|
|
|
11
11
|
import { EsolveShippingCost } from './esolve-shipping-cost';
|
|
12
12
|
import { EsolveShippingCostOptions } from './esolve-shipping-cost-record';
|
|
13
13
|
import { EsolveCartTotals } from './esolve-cart-totals';
|
|
14
|
+
import { EsolveErrorHandlerService } from '../shared/error-handler/esolve-error-handler.service';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare class EsolveCartService {
|
|
16
17
|
private config;
|
|
17
18
|
private http;
|
|
19
|
+
private errorHandler;
|
|
18
20
|
private _cached_tracking;
|
|
19
|
-
constructor(config: EsolveConnectConfig, http: HttpClient);
|
|
21
|
+
constructor(config: EsolveConnectConfig, http: HttpClient, errorHandler: EsolveErrorHandlerService);
|
|
20
22
|
/**
|
|
21
23
|
* Processes the eSolve tree records.
|
|
22
24
|
* @param cart_item_records Records to process
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class EsolveErrorHandlerService {
|
|
5
|
+
constructor();
|
|
6
|
+
private parseException;
|
|
7
|
+
private parseErrors;
|
|
8
|
+
handleHttpError(service_type: string, errorRes: HttpErrorResponse | any): Observable<never>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveErrorHandlerService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveErrorHandlerService>;
|
|
11
|
+
}
|
|
@@ -55,6 +55,14 @@ export declare class EsolveStockItem implements EsolveSEODetails {
|
|
|
55
55
|
* Stock badges
|
|
56
56
|
*/
|
|
57
57
|
badges: EsolveStockBadge[];
|
|
58
|
+
/**
|
|
59
|
+
* ID of default category linked to the stock item
|
|
60
|
+
*/
|
|
61
|
+
category_id: string;
|
|
62
|
+
/**
|
|
63
|
+
* ID of default subcategory linked to the stock item
|
|
64
|
+
*/
|
|
65
|
+
subcategory_id: number;
|
|
58
66
|
/**
|
|
59
67
|
* SEO page details
|
|
60
68
|
*/
|
|
@@ -124,7 +132,15 @@ export declare class EsolveStockItem implements EsolveSEODetails {
|
|
|
124
132
|
/**
|
|
125
133
|
* Stock badges
|
|
126
134
|
*/
|
|
127
|
-
badges: EsolveStockBadge[],
|
|
135
|
+
badges: EsolveStockBadge[],
|
|
136
|
+
/**
|
|
137
|
+
* ID of default category linked to the stock item
|
|
138
|
+
*/
|
|
139
|
+
category_id: string,
|
|
140
|
+
/**
|
|
141
|
+
* ID of default subcategory linked to the stock item
|
|
142
|
+
*/
|
|
143
|
+
subcategory_id: number, seo_title?: string, seo_keywords?: string);
|
|
128
144
|
/**
|
|
129
145
|
* Path to tiny stock image
|
|
130
146
|
*/
|
|
@@ -16,7 +16,7 @@ export interface EsolveStockRecord {
|
|
|
16
16
|
category_description: string;
|
|
17
17
|
subcategory_id: number;
|
|
18
18
|
subcategory_description: string;
|
|
19
|
-
linked_categories:
|
|
19
|
+
linked_categories: EsolveStockLinkedCategoryRecord[];
|
|
20
20
|
image_checksum: string;
|
|
21
21
|
image_name: string;
|
|
22
22
|
image_last_modified: string;
|
|
@@ -37,3 +37,9 @@ export interface EsolveStockRecord {
|
|
|
37
37
|
topics: EsolveTopicRecord[];
|
|
38
38
|
badges: EsolveStockBadgeRecord[];
|
|
39
39
|
}
|
|
40
|
+
interface EsolveStockLinkedCategoryRecord {
|
|
41
|
+
category_id: string;
|
|
42
|
+
subcategory_id: number;
|
|
43
|
+
is_default: boolean;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export * from './lib/ng-esolve-connect.module';
|
|
2
2
|
export { EsolveConnectConfig } from './lib/esolve-connect.config';
|
|
3
3
|
export * from './lib/shared/esolve-response';
|
|
4
|
+
export * from './lib/shared/error-handler/esolve-http-error';
|
|
5
|
+
export * from './lib/shared/error-handler/esolve-error-handler.service';
|
|
4
6
|
export * from './lib/shared/seo/esolve-seo-info';
|
|
5
7
|
export * from './lib/shared/seo/esolve-seo.service';
|
|
6
8
|
export * from './lib/auth/esolve-session';
|
|
7
9
|
export * from './lib/auth/esolve-address';
|
|
10
|
+
export * from './lib/auth/esolve-registration-data';
|
|
11
|
+
export * from './lib/auth/esolve-registration-result';
|
|
8
12
|
export * from './lib/auth/esolve-auth.service';
|
|
9
13
|
export * from './lib/auth/esolve-session.service';
|
|
10
14
|
export * from './lib/auth/esolve-account.service';
|
|
@@ -36,5 +40,6 @@ export * from './lib/cart/esolve-cart-item';
|
|
|
36
40
|
export * from './lib/cart/esolve-shipping-method';
|
|
37
41
|
export * from './lib/cart/esolve-payment-method';
|
|
38
42
|
export * from './lib/cart/esolve-shipping-cost';
|
|
43
|
+
export * from './lib/cart/esolve-cart-item-response';
|
|
39
44
|
export * from './lib/cart/esolve-cart-totals';
|
|
40
45
|
export * from './lib/cart/esolve-cart.service';
|