@esolve/ng-esolve-connect 0.22.0 → 0.23.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/esm2020/lib/account/confirmation/esolve-account-confirmation-post-response-item.interface.mjs +2 -0
- package/esm2020/lib/account/confirmation/esolve-account-confirmation-result.model.mjs +10 -0
- package/esm2020/lib/account/confirmation/index.mjs +3 -0
- package/esm2020/lib/account/esolve-account.service.mjs +34 -1
- package/esm2020/lib/account/index.mjs +2 -1
- package/esm2020/lib/cart/esolve-checkout-response.interface.mjs +1 -1
- package/esm2020/lib/cart/esolve-checkout-result.model.mjs +2 -1
- package/esm2020/lib/cart/index.mjs +2 -1
- package/esm2020/lib/payment/esolve-payment.service.mjs +6 -3
- package/esm2020/lib/payment/interfaces/esolve-payment-redirect-links.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-set-body.interface.mjs +1 -1
- package/esm2020/lib/payment/interfaces/index.mjs +2 -1
- package/esm2020/lib/wishlist/classes/esolve-wishlist-item.model.mjs +1 -1
- package/esm2020/lib/wishlist/classes/index.mjs +2 -1
- package/esm2020/lib/wishlist/esolve-wishlist.service.mjs +9 -7
- package/esm2020/lib/wishlist/interfaces/esolve-wishlist-item-record.interface.mjs +1 -1
- package/esm2020/lib/wishlist/interfaces/esolve-wishlist-set-item.interface.mjs +1 -1
- package/esm2020/lib/wishlist/types/esolve-wishlist.type.mjs +1 -1
- package/fesm2015/esolve-ng-esolve-connect.mjs +55 -4
- package/fesm2015/esolve-ng-esolve-connect.mjs.map +1 -1
- package/fesm2020/esolve-ng-esolve-connect.mjs +54 -4
- package/fesm2020/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/account/confirmation/esolve-account-confirmation-post-response-item.interface.d.ts +7 -0
- package/lib/account/confirmation/esolve-account-confirmation-result.model.d.ts +8 -0
- package/lib/account/confirmation/index.d.ts +2 -0
- package/lib/account/esolve-account.service.d.ts +10 -0
- package/lib/account/index.d.ts +1 -0
- package/lib/cart/esolve-checkout-response.interface.d.ts +1 -0
- package/lib/cart/esolve-checkout-result.model.d.ts +1 -0
- package/lib/payment/esolve-payment.service.d.ts +2 -2
- package/lib/payment/interfaces/esolve-payment-redirect-links.interface.d.ts +4 -0
- package/lib/payment/interfaces/esolve-payment-set-body.interface.d.ts +2 -0
- package/lib/payment/interfaces/index.d.ts +1 -0
- package/lib/wishlist/classes/esolve-wishlist-item.model.d.ts +1 -1
- package/lib/wishlist/classes/index.d.ts +1 -0
- package/lib/wishlist/esolve-wishlist.service.d.ts +11 -10
- package/lib/wishlist/interfaces/esolve-wishlist-item-record.interface.d.ts +1 -1
- package/lib/wishlist/interfaces/esolve-wishlist-set-item.interface.d.ts +1 -1
- package/lib/wishlist/types/esolve-wishlist.type.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.d.ts +2 -0
- package/schematics/ng-add/index.js +30 -0
- package/schematics/ng-add/index.js.map +1 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EsolveResponseResult } from '../../shared/response';
|
|
2
|
+
import { EsolveAccountConfirmationPostResponseItem } from './esolve-account-confirmation-post-response-item.interface';
|
|
3
|
+
export declare class EsolveAccountConfirmationResult extends EsolveResponseResult {
|
|
4
|
+
user_id: number;
|
|
5
|
+
location_id: number;
|
|
6
|
+
recalculated_cart: boolean;
|
|
7
|
+
constructor(response: EsolveAccountConfirmationPostResponseItem);
|
|
8
|
+
}
|
|
@@ -11,6 +11,7 @@ import { EsolveAddress, EsolveAddressResult, EsolveAddressPostData } from './add
|
|
|
11
11
|
import { EsolveChangePasswordResult, EsolveResetPasswordResult } from './password';
|
|
12
12
|
import { EsolveTransaction, EsolveTransactionOptions, EsolveTransactionList } from './transaction';
|
|
13
13
|
import { EsolveUserAccount, EsolveUserAccountData, EsolveUserAccountResult } from './user-account';
|
|
14
|
+
import { EsolveAccountConfirmationResult } from './confirmation';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare class EsolveAccountService {
|
|
16
17
|
private config;
|
|
@@ -29,6 +30,15 @@ export declare class EsolveAccountService {
|
|
|
29
30
|
deleteAddress(id: number): Observable<EsolveResult>;
|
|
30
31
|
register(user_registration: EsolveRegistrationData): Observable<EsolveRegistrationResult>;
|
|
31
32
|
changePassword(password: string, confirm_password: string): Observable<EsolveChangePasswordResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Submits the users confirmation key to the relevant backend server in order to
|
|
35
|
+
* confirm the accounts validity. The key was emailed to the user hence if he received
|
|
36
|
+
* it and enters the value, the email account can be seen as valid.
|
|
37
|
+
*
|
|
38
|
+
* @param key The key that was emailed to the registered user's email account.
|
|
39
|
+
* @returns An `Observable` that contains the result of the account confirmation request.
|
|
40
|
+
*/
|
|
41
|
+
accountConfirmationRequest(key: string): Observable<EsolveAccountConfirmationResult>;
|
|
32
42
|
sendForgotPasswordRequest(email: string): Observable<boolean>;
|
|
33
43
|
resetPassword(reset_key: string, password: string, confirm_password: string, auto_login?: boolean): Observable<EsolveResetPasswordResult>;
|
|
34
44
|
updateLocation(location_id: number): Observable<EsolveLocationUpdateResult>;
|
package/lib/account/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import { EsolveResponseResult } from '../shared/response';
|
|
|
2
2
|
import { EsolveCheckoutResponse } from './esolve-checkout-response.interface';
|
|
3
3
|
export declare class EsolveCheckoutResult extends EsolveResponseResult {
|
|
4
4
|
id: number;
|
|
5
|
+
process_payment: boolean;
|
|
5
6
|
constructor(response: EsolveCheckoutResponse);
|
|
6
7
|
}
|
|
@@ -5,7 +5,7 @@ import { EsolveErrorHandlerService } from '../shared/errors/esolve-error-handler
|
|
|
5
5
|
import { EsolveResult } from '../shared/esolve-result.model';
|
|
6
6
|
import { EsolveResponseHandlerService } from '../shared/response';
|
|
7
7
|
import { EsolvePaymentMethod, EsolvePaymentResult, EsolveVaultItem, EsolveVaultItemResult } from './classes';
|
|
8
|
-
import { EsolveCardData, EsolvePaymentMethodOptions } from './interfaces';
|
|
8
|
+
import { EsolveCardData, EsolvePaymentMethodOptions, EsolvePaymentRedirectLinks } from './interfaces';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class EsolvePaymentService {
|
|
11
11
|
private config;
|
|
@@ -64,7 +64,7 @@ export declare class EsolvePaymentService {
|
|
|
64
64
|
*
|
|
65
65
|
* @returns An `Observable` with the result of the payment
|
|
66
66
|
*/
|
|
67
|
-
setPayment(transaction_id: number, payment_methods_id: number, card?: EsolveCardData | number): Observable<EsolvePaymentResult>;
|
|
67
|
+
setPayment(transaction_id: number, payment_methods_id: number, card?: EsolveCardData | number, links?: EsolvePaymentRedirectLinks): Observable<EsolvePaymentResult>;
|
|
68
68
|
/**
|
|
69
69
|
* Processes the eSolve payment method records.
|
|
70
70
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EsolvePaymentRedirectLinks } from './esolve-payment-redirect-links.interface';
|
|
1
2
|
export interface EsolvePaymentSetBody {
|
|
2
3
|
payment: {
|
|
3
4
|
cart_id: number;
|
|
@@ -10,4 +11,5 @@ export interface EsolvePaymentSetBody {
|
|
|
10
11
|
card_cvv: string;
|
|
11
12
|
card_expiry: string;
|
|
12
13
|
};
|
|
14
|
+
links?: EsolvePaymentRedirectLinks;
|
|
13
15
|
}
|
|
@@ -5,3 +5,4 @@ export * from './esolve-vault-record.interface';
|
|
|
5
5
|
export * from './esolve-payment-response.interface';
|
|
6
6
|
export * from './esolve-payment-method-options.interface';
|
|
7
7
|
export * from './esolve-payment-method-record.interface';
|
|
8
|
+
export * from './esolve-payment-redirect-links.interface';
|
|
@@ -1,16 +1,14 @@
|
|
|
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/errors/esolve-error-handler.service';
|
|
5
4
|
import { EsolveResponseHandlerService } from '../shared/response';
|
|
6
|
-
import {
|
|
7
|
-
import { EsolveWishlistItemResponse } from './interfaces/esolve-wishlist-item-response.interface';
|
|
8
|
-
import { EsolveWishlist } from './types/esolve-wishlist.type';
|
|
9
|
-
import { EsolveCustomFields } from '../shared/custom-fields';
|
|
5
|
+
import { EsolveErrorHandlerService } from '../shared/errors';
|
|
10
6
|
import { EsolveWishlistSetItem } from './interfaces';
|
|
11
|
-
import {
|
|
7
|
+
import { EsolveWishlist, EsolveWishlistSetAction } from './types';
|
|
8
|
+
import { EsolveEmptyWishlistResult } from './classes';
|
|
9
|
+
import { EsolveWishlistItemResponse } from './interfaces';
|
|
12
10
|
import * as i0 from "@angular/core";
|
|
13
|
-
export declare class EsolveWishlistService
|
|
11
|
+
export declare class EsolveWishlistService {
|
|
14
12
|
private config;
|
|
15
13
|
private http;
|
|
16
14
|
private errorHandler;
|
|
@@ -26,7 +24,8 @@ export declare class EsolveWishlistService<T extends EsolveCustomFields = Esolve
|
|
|
26
24
|
* Updates the wishlist by preforming various actions, such as adding, editing or removing items from the list.
|
|
27
25
|
*
|
|
28
26
|
* @param items An array of options to update the wishlist
|
|
29
|
-
* @param
|
|
27
|
+
* @param default_action The default action to preform
|
|
28
|
+
*
|
|
30
29
|
* @returns An `Observable` with an array of responses that gives feedback on the requested changes
|
|
31
30
|
*/
|
|
32
31
|
setWishlist(items: EsolveWishlistSetItem[], default_action?: EsolveWishlistSetAction): Observable<EsolveWishlistItemResponse[]>;
|
|
@@ -40,14 +39,16 @@ export declare class EsolveWishlistService<T extends EsolveCustomFields = Esolve
|
|
|
40
39
|
* Processes the eSolve wishlist records
|
|
41
40
|
*
|
|
42
41
|
* @param wishlist_item_records Records to process
|
|
42
|
+
*
|
|
43
43
|
* @returns An array of processed cart items
|
|
44
44
|
*/
|
|
45
45
|
private processWishlist;
|
|
46
46
|
/**
|
|
47
47
|
* Retrieves stock records from HTTP params.
|
|
48
|
+
*
|
|
48
49
|
* @param params HTTP client parameters
|
|
49
50
|
*/
|
|
50
51
|
private getWishlistRecords;
|
|
51
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveWishlistService
|
|
52
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveWishlistService
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveWishlistService, never>;
|
|
53
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveWishlistService>;
|
|
53
54
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EsolveWishlistItem } from '../classes
|
|
1
|
+
import { EsolveWishlistItem } from '../classes';
|
|
2
2
|
export declare type EsolveWishlist = EsolveWishlistItem[];
|
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ngAdd = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
7
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
8
|
+
const ts = require("typescript");
|
|
9
|
+
function ngAdd() {
|
|
10
|
+
return (tree, context) => {
|
|
11
|
+
context.logger.info('Adding library module to the app...');
|
|
12
|
+
const module_path = '/src/app/app.module.ts';
|
|
13
|
+
if (!tree.exists(module_path)) {
|
|
14
|
+
throw new schematics_1.SchematicsException(`The file '${module_path}' doesn't exist...`);
|
|
15
|
+
}
|
|
16
|
+
const recorder = tree.beginUpdate(module_path);
|
|
17
|
+
const text = tree.read(module_path);
|
|
18
|
+
if (text === null) {
|
|
19
|
+
throw new schematics_1.SchematicsException(`The file '${module_path}' doesn't exist...`);
|
|
20
|
+
}
|
|
21
|
+
const source = ts.createSourceFile(module_path, text.toString(), ts.ScriptTarget.Latest, true);
|
|
22
|
+
(0, change_1.applyToUpdateRecorder)(recorder, (0, ast_utils_1.addImportToModule)(source, module_path, 'NgEsolveConnectModule.forRoot()', '@esolve/ng-esolve-connect'));
|
|
23
|
+
tree.commitUpdate(recorder);
|
|
24
|
+
context.logger.info('Installing dependencies...');
|
|
25
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
26
|
+
return tree;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
exports.ngAdd = ngAdd;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/ng-esolve-connect/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+F;AAC/F,4DAA0E;AAE1E,+DAA2E;AAC3E,qEAA0E;AAE1E,iCAAiC;AAEjC,SAAgB,KAAK;IACjB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC7C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;QAC3D,MAAM,WAAW,GAAG,wBAAwB,CAAC;QAE7C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;YAC3B,MAAM,IAAI,gCAAmB,CAAC,aAAa,WAAW,oBAAoB,CAAC,CAAC;SAC/E;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE/C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEpC,IAAI,IAAI,KAAK,IAAI,EAAE;YACf,MAAM,IAAI,gCAAmB,CAAC,aAAa,WAAW,oBAAoB,CAAC,CAAC;SAC/E;QAED,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAC9B,WAAW,EACX,IAAI,CAAC,QAAQ,EAAE,EACf,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACP,CAAC;QAEF,IAAA,8BAAqB,EACjB,QAAQ,EACR,IAAA,6BAAiB,EACb,MAAM,EACN,WAAW,EACX,iCAAiC,EACjC,2BAA2B,CAC9B,CACJ,CAAC;QAEF,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE5B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QAClD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC;AAzCD,sBAyCC"}
|