apirocket 0.14.7 → 0.15.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/README.md +74 -1
- package/dist/ecommerce.css +214 -23
- package/dist/ecommerce.js +3 -3
- package/dist/lib/animations.d.ts +1 -1
- package/dist/lib/api.d.ts +3 -3
- package/dist/lib/utils.d.ts +10 -3
- package/dist/models/addresses-models.d.ts +29 -0
- package/dist/services/account.service.d.ts +17 -9
- package/dist/services/analytics.service.d.ts +1 -2
- package/dist/services/cart.service.d.ts +5 -5
- package/dist/services/checkout.service.d.ts +11 -14
- package/dist/services/customer.service.d.ts +14 -13
- package/dist/services/index.d.ts +3 -3
- package/dist/services/sales.service.d.ts +8 -7
- package/dist/types/types.d.ts +3 -7
- package/package.json +2 -2
- package/dist/models/billing-address.model.d.ts +0 -7
- package/dist/models/checkout-address.model.d.ts +0 -13
- package/dist/models/shipping-address.model.d.ts +0 -7
package/dist/lib/animations.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { cartIn, cartOut, checkoutIn, checkoutOut, summaryIn, summaryOut };
|
|
1
2
|
declare const cartIn: (_node: HTMLElement) => {
|
|
2
3
|
duration: number;
|
|
3
4
|
easing: (t: number) => number;
|
|
@@ -28,4 +29,3 @@ declare const summaryOut: (_node: HTMLElement) => {
|
|
|
28
29
|
easing: (t: number) => number;
|
|
29
30
|
css: (_t: number, u: number) => string;
|
|
30
31
|
};
|
|
31
|
-
export { cartIn, cartOut, checkoutIn, checkoutOut, summaryIn, summaryOut };
|
package/dist/lib/api.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import type { CustomerService } from '@src/services/customer.service';
|
|
3
|
-
export { countries, geolocation,
|
|
3
|
+
export { countries, geolocation, getCountry, rememberPassword, resetPassword, states };
|
|
4
4
|
declare const countries: (customer: CustomerService) => Promise<Array<Country>>;
|
|
5
|
+
declare const getCountry: (countryIso: string) => Promise<Country>;
|
|
5
6
|
declare const states: (countryId: number, customer: CustomerService) => Promise<Array<State>>;
|
|
6
7
|
declare const geolocation: () => Observable<any>;
|
|
7
|
-
declare const getCountryId: (countryIso: string) => Promise<number>;
|
|
8
8
|
declare const rememberPassword: (email: string, sales: boolean) => Promise<number>;
|
|
9
|
-
declare const resetPassword: (hash: string, email: string, password: string, sales: boolean) => Promise<
|
|
9
|
+
declare const resetPassword: (hash: string, email: string, password: string, sales: boolean) => Promise<LoginData>;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
type ValidModel<T> = {
|
|
2
|
+
[K in keyof T]: (value: T[K]) => boolean;
|
|
3
|
+
};
|
|
4
|
+
export { account, asFloat, asInteger, autoincrement, backToShopping, buildQuery, cart, checkout, clearHtml, clearHtmlObject, createAccount, dataset, dateToddmmaaaa, dateToddmmaaaahhmm, euroPrice, euros, isBoolean, isNumber, isString, isValidModel, millares, orderError, orderSummary, price, rememberPassword, round, salesAccount, salesRememberPassword, salesSignIn, signIn, storageAvailable };
|
|
2
5
|
declare const buildQuery: (data: {
|
|
3
6
|
[key: string]: any;
|
|
4
7
|
}) => string;
|
|
5
8
|
declare const dataset: (element: HTMLElement, property: string) => any;
|
|
9
|
+
declare const dateToddmmaaaa: (fecha: string) => string;
|
|
10
|
+
declare const dateToddmmaaaahhmm: (fecha: string) => string;
|
|
6
11
|
declare const euroPrice: (taxBase: number, taxAmount: number, pricesTaxIncluded: boolean, decimales: number, cero?: boolean) => string;
|
|
7
12
|
declare const euros: (valor: number, decimales: number, cero?: boolean) => string;
|
|
8
13
|
declare const isBoolean: (value: any) => boolean;
|
|
@@ -11,7 +16,7 @@ declare const isString: (value: any, defaultValue?: string) => string;
|
|
|
11
16
|
declare const price: (taxBase: number, taxAmount: number, pricesTaxIncluded: boolean) => number;
|
|
12
17
|
declare const millares: (valor: number, decimales: number, cero?: boolean) => string;
|
|
13
18
|
declare const asFloat: (value: string | number | Array<string> | undefined, decimales?: number) => number;
|
|
14
|
-
declare const asInteger: (value: string | number | Array<string> | boolean | undefined) => number;
|
|
19
|
+
declare const asInteger: (value: string | number | Array<string> | boolean | Date | undefined) => number;
|
|
15
20
|
declare const round: (num: number, precision: number) => number;
|
|
16
21
|
declare const storageAvailable: (type: "sessionStorage" | "localStorage") => boolean;
|
|
17
22
|
declare const account: () => void;
|
|
@@ -26,5 +31,7 @@ declare const salesAccount: () => void;
|
|
|
26
31
|
declare const salesRememberPassword: () => void;
|
|
27
32
|
declare const salesSignIn: () => void;
|
|
28
33
|
declare const signIn: () => void;
|
|
29
|
-
declare const clearHtml: (cadena: string) => string;
|
|
34
|
+
declare const clearHtml: (cadena: string | undefined) => string;
|
|
35
|
+
declare const clearHtmlObject: (object: any) => any;
|
|
30
36
|
declare const autoincrement: () => number;
|
|
37
|
+
declare const isValidModel: <T>(type: T, properties: ValidModel<T>) => boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export { isBillingAddress, BillingAddress, CheckoutAddress, ShippingAddress };
|
|
2
|
+
declare class CheckoutAddress {
|
|
3
|
+
get fullAddress(): string;
|
|
4
|
+
address: string;
|
|
5
|
+
address2: string;
|
|
6
|
+
addressName: string;
|
|
7
|
+
city: string;
|
|
8
|
+
country: Country;
|
|
9
|
+
default: boolean;
|
|
10
|
+
description: string;
|
|
11
|
+
id: number;
|
|
12
|
+
state: State;
|
|
13
|
+
postalCode?: string;
|
|
14
|
+
saveAddress: boolean;
|
|
15
|
+
constructor(values?: Partial<CheckoutAddress>);
|
|
16
|
+
private getFullAddress;
|
|
17
|
+
}
|
|
18
|
+
declare class BillingAddress extends CheckoutAddress {
|
|
19
|
+
taxCode: string;
|
|
20
|
+
name: string;
|
|
21
|
+
constructor(values?: Partial<BillingAddress>);
|
|
22
|
+
}
|
|
23
|
+
declare class ShippingAddress extends CheckoutAddress {
|
|
24
|
+
firstName: string;
|
|
25
|
+
lastName: string;
|
|
26
|
+
phone: string;
|
|
27
|
+
constructor(values?: Partial<ShippingAddress>);
|
|
28
|
+
}
|
|
29
|
+
declare function isBillingAddress(address: BillingAddress | ShippingAddress): address is BillingAddress;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { type FormControl } from "@e-xisto/form-control";
|
|
3
3
|
import type { CustomerService } from "./customer.service";
|
|
4
|
-
import type { ShippingAddress } from "@src/models/shipping-address.model";
|
|
5
4
|
import type { EcommerceService } from "./ecommerce.service";
|
|
5
|
+
import { ShippingAddress } from "@src/models/addresses-models";
|
|
6
6
|
export declare class AccountService {
|
|
7
7
|
#private;
|
|
8
|
-
|
|
9
|
-
get
|
|
8
|
+
readonly status$: Observable<AccountStatus>;
|
|
9
|
+
get account$(): Observable<CustomerAccount>;
|
|
10
|
+
get orders$(): Observable<CustomerOrders>;
|
|
10
11
|
constructor();
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
private
|
|
12
|
+
private accountData;
|
|
13
|
+
private getOrders$;
|
|
14
|
+
private ordersData;
|
|
15
|
+
ordersSearch(filter: OrdersFilter): Observable<CustomerOrders>;
|
|
16
|
+
private otherBillingAddress;
|
|
17
|
+
private otherShippingAddress;
|
|
18
|
+
private setAccountData;
|
|
19
|
+
setCustomerService(customer: CustomerService): void;
|
|
20
|
+
private setOrdersData;
|
|
14
21
|
passwordForm(formElement: HTMLFormElement, canChange: (canChange: boolean) => void): FormControl;
|
|
15
22
|
personalForm(formElement: HTMLFormElement, ecommerceService: EcommerceService, canUpdate: (canUpdate: boolean) => void): FormControl;
|
|
16
|
-
setCustomerService(customer: CustomerService): void;
|
|
17
23
|
updateMyAccount(form: FormControl): Observable<void>;
|
|
18
24
|
updateShippingAddress(shippingAddress: ShippingAddress): void;
|
|
19
25
|
passwordChange(form: FormControl): Observable<void>;
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
setStatus(newStatus: AccountStatus): void;
|
|
27
|
+
reset(): void;
|
|
28
|
+
pdfOrder(orderId: number): Promise<boolean>;
|
|
29
|
+
showOrder(ecommerceService: EcommerceService, order: Order): void;
|
|
22
30
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CartService } from "./cart.service";
|
|
2
|
-
import type { OrderType } from "@src/types/types";
|
|
3
2
|
declare class AnalyticsService {
|
|
4
3
|
constructor();
|
|
5
4
|
addToCart(item: CartItem, index: number, quantity: number): void;
|
|
@@ -7,7 +6,7 @@ declare class AnalyticsService {
|
|
|
7
6
|
private pushEcommerceEvent;
|
|
8
7
|
removeFromCart(item: CartItem, quantity: number): void;
|
|
9
8
|
viewCart(cart: CartService): void;
|
|
10
|
-
purchase(order:
|
|
9
|
+
purchase(order: Order): void;
|
|
11
10
|
}
|
|
12
11
|
export declare const analyticsService: AnalyticsService;
|
|
13
12
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import type { CustomerService } from './customer.service';
|
|
3
3
|
import type { CheckoutService } from "./checkout.service";
|
|
4
|
-
import type { LastOrder
|
|
5
|
-
import type { ShippingAddress } from "@src/models/
|
|
4
|
+
import type { LastOrder } from "@src/types/types";
|
|
5
|
+
import type { ShippingAddress } from "@src/models/addresses-models";
|
|
6
6
|
export declare class CartService {
|
|
7
7
|
readonly change$: Observable<CartService>;
|
|
8
8
|
get count(): number;
|
|
@@ -41,9 +41,8 @@ export declare class CartService {
|
|
|
41
41
|
private restoreStorage;
|
|
42
42
|
private saveStorage;
|
|
43
43
|
setServices(customer: CustomerService, checkout: CheckoutService): void;
|
|
44
|
-
subscribe(cb: (cart: CartService) => void): () => void;
|
|
45
44
|
add(data: CartItem): void;
|
|
46
|
-
orderSummary(id: number, hash: string): Observable<
|
|
45
|
+
orderSummary(id: number, hash: string): Observable<Order & {
|
|
47
46
|
__errors: any;
|
|
48
47
|
}>;
|
|
49
48
|
addFromTarget(target: HTMLElement): void;
|
|
@@ -71,12 +70,13 @@ export declare function cartProxy(cart: CartService): {
|
|
|
71
70
|
taxBase: number;
|
|
72
71
|
total: number;
|
|
73
72
|
units: number;
|
|
74
|
-
add: (data:
|
|
73
|
+
add: (data: CartAddItem) => void;
|
|
75
74
|
clear: () => void;
|
|
76
75
|
close: () => void;
|
|
77
76
|
items: () => CartItem[];
|
|
78
77
|
open: (fullScreen: boolean) => void;
|
|
79
78
|
removeItem: (item: CartItem) => void;
|
|
79
|
+
setCountryIso: (iso: string) => Promise<void>;
|
|
80
80
|
subscribe: (cb: (cart: CartService) => void) => () => void;
|
|
81
81
|
updateItem: (item: CartItem, quantity: number) => void;
|
|
82
82
|
};
|
|
@@ -3,8 +3,7 @@ import type { FormControl } from "@e-xisto/form-control";
|
|
|
3
3
|
import type { CartService } from '@src/services/cart.service';
|
|
4
4
|
import type { AccountService } from './account.service';
|
|
5
5
|
import type { CustomerService } from './customer.service';
|
|
6
|
-
import { ShippingAddress } from
|
|
7
|
-
import { BillingAddress } from '@src/models/billing-address.model';
|
|
6
|
+
import { BillingAddress, ShippingAddress } from '@src/models/addresses-models';
|
|
8
7
|
export declare class CheckoutService {
|
|
9
8
|
#private;
|
|
10
9
|
readonly change$: Observable<CheckoutService>;
|
|
@@ -20,34 +19,25 @@ export declare class CheckoutService {
|
|
|
20
19
|
get steps(): Set<CheckoutStatus>;
|
|
21
20
|
get taxAmount(): number;
|
|
22
21
|
get total(): number;
|
|
23
|
-
constructor(cartService: CartService, customer: CustomerService);
|
|
22
|
+
constructor(cartService: CartService, customer: CustomerService, account: AccountService);
|
|
24
23
|
private getShippingAddress;
|
|
25
24
|
paymentForm(formElement: HTMLFormElement, paymentMethods: Array<PaymentMethodOption>): Observable<{
|
|
26
25
|
form: FormControl;
|
|
26
|
+
addresses: Array<BillingAddress>;
|
|
27
27
|
}>;
|
|
28
28
|
paymentSet(form: FormControl, payments: Array<PaymentMethodOption>): Observable<any>;
|
|
29
|
-
private saveStorage;
|
|
30
|
-
setStatus(newStatus: CheckoutStatus): void;
|
|
31
29
|
private restoreStorage;
|
|
32
|
-
|
|
33
|
-
form: FormControl;
|
|
34
|
-
addresses: Array<AccountShippingAddress>;
|
|
35
|
-
}>;
|
|
30
|
+
setStatus(newStatus: CheckoutStatus): void;
|
|
36
31
|
formSignIn(form: HTMLFormElement): FormControl;
|
|
37
32
|
signInSubmit(_form: FormControl): void;
|
|
38
33
|
close(): void;
|
|
39
34
|
open(): void;
|
|
40
|
-
private initCountryControl;
|
|
41
35
|
shippingMethodForm(formElement: HTMLFormElement, shippingMethods: Array<ShippingMethodType>): FormControl;
|
|
42
36
|
shippingMethodSet(form: FormControl, methods: Array<ShippingMethodType>, cartService: CartService, gotoPayment: boolean): void;
|
|
43
37
|
changeShippingMethod(cartService: CartService, methods: Array<ShippingMethodType>, shippingMethodId: number): void;
|
|
44
|
-
resetPassword(form: FormControl): void;
|
|
45
|
-
private otherShippingAddress;
|
|
46
38
|
stripeSettings(methodId: number): Observable<StripeSettings>;
|
|
47
39
|
stripePayment(orderId: number, hash: string): Observable<any>;
|
|
48
40
|
stripePaymentConfirm(orderId: number, paymentId: string): Observable<PaymentInfo>;
|
|
49
|
-
private shippingAddressSelect;
|
|
50
|
-
shippingAddressSet(form: FormControl, customerService: CustomerService, account: AccountService): void;
|
|
51
41
|
clearOrder(): void;
|
|
52
42
|
paypalSettings(methodId: number): Observable<PaypalSettings>;
|
|
53
43
|
paypalApprobe(data: any): Observable<any>;
|
|
@@ -57,4 +47,11 @@ export declare class CheckoutService {
|
|
|
57
47
|
removeDiscountCode(cartService: CartService, code: Discount): void;
|
|
58
48
|
private getDiscounts;
|
|
59
49
|
shippingMethods(): Observable<Array<ShippingMethodType> | false>;
|
|
50
|
+
shippingAddressForm(formElement: HTMLFormElement): Observable<{
|
|
51
|
+
form: FormControl;
|
|
52
|
+
addresses: Array<ShippingAddress>;
|
|
53
|
+
}>;
|
|
54
|
+
shippingAddressSet(form: FormControl): void;
|
|
55
|
+
updateState(saveState: boolean, checkoutString: string): void;
|
|
56
|
+
private saveStorage;
|
|
60
57
|
}
|
|
@@ -2,6 +2,8 @@ import type { Observable } from 'rxjs/internal/Observable';
|
|
|
2
2
|
import type { FormControl } from "@e-xisto/form-control";
|
|
3
3
|
import type { CartService } from "./cart.service";
|
|
4
4
|
import type { AccountService } from "./account.service";
|
|
5
|
+
import type { CheckoutService } from "./checkout.service";
|
|
6
|
+
import type { BillingAddress, ShippingAddress } from "@src/models/addresses-models";
|
|
5
7
|
export declare class CustomerService implements Authentication {
|
|
6
8
|
#private;
|
|
7
9
|
readonly change$: Observable<CustomerService>;
|
|
@@ -17,17 +19,16 @@ export declare class CustomerService implements Authentication {
|
|
|
17
19
|
get isLogged(): boolean;
|
|
18
20
|
constructor();
|
|
19
21
|
private changeCustomer;
|
|
20
|
-
createBillingAddress(input: Omit<
|
|
21
|
-
createShippingAddress(input: Omit<
|
|
22
|
+
createBillingAddress(input: Omit<BillingAddress, 'id'>): Promise<unknown>;
|
|
23
|
+
createShippingAddress(input: Omit<ShippingAddress, 'id'>): Promise<unknown>;
|
|
22
24
|
deleteBillingAddress(id: number): Promise<unknown>;
|
|
23
25
|
deleteShippingAddress(id: number): Promise<unknown>;
|
|
24
26
|
myAccount(): Promise<CustomerAccount>;
|
|
27
|
+
orders(filter?: Partial<OrdersFilter>): Promise<CustomerOrders>;
|
|
25
28
|
rememberPassword(email: string): Promise<number>;
|
|
26
|
-
resetPassword(hash: string, email: string, password: string): Promise<
|
|
29
|
+
resetPassword(hash: string, email: string, password: string): Promise<void>;
|
|
27
30
|
private restoreState;
|
|
28
31
|
private saveState;
|
|
29
|
-
setAccountService(account: AccountService): void;
|
|
30
|
-
setCartService(cart: CartService): void;
|
|
31
32
|
setData(data: {
|
|
32
33
|
acceptEmailMarketing?: boolean;
|
|
33
34
|
email?: string;
|
|
@@ -35,9 +36,10 @@ export declare class CustomerService implements Authentication {
|
|
|
35
36
|
lastName?: string;
|
|
36
37
|
phone?: string;
|
|
37
38
|
}): void;
|
|
38
|
-
|
|
39
|
+
setServices(cart: CartService, account: AccountService, checkout: CheckoutService): void;
|
|
40
|
+
updateBillingAddress(input: BillingAddress): Promise<unknown>;
|
|
39
41
|
updateMyAccount(data: InputUpdateAccount): Promise<boolean>;
|
|
40
|
-
updateShippingAddress(input:
|
|
42
|
+
updateShippingAddress(input: ShippingAddress): Promise<unknown>;
|
|
41
43
|
logout(): Promise<{
|
|
42
44
|
status: number;
|
|
43
45
|
}>;
|
|
@@ -48,7 +50,6 @@ export declare class CustomerService implements Authentication {
|
|
|
48
50
|
createAccount(form: FormControl): Promise<CreateAccountResponse>;
|
|
49
51
|
price(productId: number): Promise<any>;
|
|
50
52
|
updateState(data: LoginData, emitUpdated: boolean): void;
|
|
51
|
-
orders(filter?: OrdersFilter): Promise<CustomerOrders>;
|
|
52
53
|
order(id: number): Promise<Order>;
|
|
53
54
|
updatePassword(oldPassword: string, newPassword: string): Promise<boolean>;
|
|
54
55
|
updateAddressData(endPoint: string, input: any): Promise<unknown>;
|
|
@@ -63,18 +64,18 @@ export declare function customerProxy(customer: CustomerService): {
|
|
|
63
64
|
type: CustomerType;
|
|
64
65
|
isLogged: boolean;
|
|
65
66
|
countries: () => Promise<Country[]>;
|
|
66
|
-
createBillingAddress: (input: Omit<
|
|
67
|
-
createShippingAddress: (input: Omit<
|
|
67
|
+
createBillingAddress: (input: Omit<BillingAddress, 'id'>) => Promise<unknown>;
|
|
68
|
+
createShippingAddress: (input: Omit<ShippingAddress, 'id'>) => Promise<unknown>;
|
|
68
69
|
deleteShippingAddress: (id: number) => Promise<unknown>;
|
|
69
70
|
deleteBillingAddress: (id: number) => Promise<unknown>;
|
|
70
71
|
myAccount: () => Promise<CustomerAccount>;
|
|
71
72
|
order: (id: number) => Promise<Order>;
|
|
72
|
-
orders: (filter?: OrdersFilter) => Promise<CustomerOrders>;
|
|
73
|
+
orders: (filter?: Partial<OrdersFilter>) => Promise<CustomerOrders>;
|
|
73
74
|
price: (productId: number) => Promise<any>;
|
|
74
75
|
states: (countryId: number) => Promise<globalThis.State[]>;
|
|
75
76
|
subscribe: (cb: (customer: CustomerService) => void) => () => void;
|
|
76
77
|
updateMyAccount: (input: InputUpdateAccount) => Promise<boolean>;
|
|
77
78
|
updatePassword: (oldPassword: string, newPassword: string) => Promise<boolean>;
|
|
78
|
-
updateBillingAddress: (input:
|
|
79
|
-
updateShippingAddress: (input:
|
|
79
|
+
updateBillingAddress: (input: BillingAddress) => Promise<unknown>;
|
|
80
|
+
updateShippingAddress: (input: ShippingAddress) => Promise<unknown>;
|
|
80
81
|
};
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { analyticsService } from "
|
|
2
|
-
export { modalService } from "
|
|
3
|
-
export { lockService } from "
|
|
1
|
+
export { analyticsService } from "./analytics.service";
|
|
2
|
+
export { modalService } from "./modal.service";
|
|
3
|
+
export { lockService } from "./lock.service";
|
|
@@ -3,6 +3,7 @@ import type { CustomerService } from "./customer.service";
|
|
|
3
3
|
export declare class SalesService implements Authentication {
|
|
4
4
|
#private;
|
|
5
5
|
readonly change$: Observable<SalesService>;
|
|
6
|
+
get customers$(): Observable<SalesCustomers>;
|
|
6
7
|
get email(): string;
|
|
7
8
|
get firstName(): string;
|
|
8
9
|
get id(): number;
|
|
@@ -11,21 +12,24 @@ export declare class SalesService implements Authentication {
|
|
|
11
12
|
get refreshToken(): string;
|
|
12
13
|
get token(): string;
|
|
13
14
|
get isLogged(): boolean;
|
|
14
|
-
get customers$(): Observable<SalesCustomers>;
|
|
15
15
|
private _state;
|
|
16
16
|
private _subscribe$;
|
|
17
17
|
private _update$;
|
|
18
18
|
constructor();
|
|
19
|
-
private
|
|
19
|
+
private customersData;
|
|
20
|
+
customersSearch(filter: CustomersFilter): Observable<SalesCustomers>;
|
|
21
|
+
private getCustomers$;
|
|
20
22
|
private init;
|
|
21
23
|
login(email: string, password: string): Promise<{
|
|
22
24
|
status: number;
|
|
23
25
|
}>;
|
|
26
|
+
private setCustomersData;
|
|
27
|
+
setCustomerService(customer: CustomerService): void;
|
|
28
|
+
private changeSales;
|
|
24
29
|
rememberPassword(email: string): Promise<number>;
|
|
25
|
-
resetPassword(hash: string, email: string, password: string): Promise<
|
|
30
|
+
resetPassword(hash: string, email: string, password: string): Promise<void>;
|
|
26
31
|
private restoreState;
|
|
27
32
|
private saveState;
|
|
28
|
-
setCustomerService(customer: CustomerService): void;
|
|
29
33
|
subscribe(cb: (sales: SalesService) => void): () => void;
|
|
30
34
|
private updateState;
|
|
31
35
|
updateToken(data: LoginData): void;
|
|
@@ -33,7 +37,4 @@ export declare class SalesService implements Authentication {
|
|
|
33
37
|
logout(): Promise<{
|
|
34
38
|
status: number;
|
|
35
39
|
}>;
|
|
36
|
-
private initCustomersData;
|
|
37
|
-
private customersData;
|
|
38
|
-
customersSearch(filter: CustomersFilter): Observable<SalesCustomers>;
|
|
39
40
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
SHIPPING = "shipping",
|
|
4
|
-
BILLING = "billing",
|
|
5
|
-
ORDERS = "orders"
|
|
6
|
-
}
|
|
1
|
+
import type { ShippingAddress } from "@src/models/addresses-models";
|
|
2
|
+
export declare const DEFAULT_COUNTRY: Country;
|
|
7
3
|
interface InputOrderCustomer {
|
|
8
4
|
acceptEmailMarketing?: boolean;
|
|
9
5
|
email: string;
|
|
@@ -87,7 +83,7 @@ export interface OrderType {
|
|
|
87
83
|
number: string;
|
|
88
84
|
payment: OrderPaymentType;
|
|
89
85
|
pricesTaxIncluded: boolean;
|
|
90
|
-
shippingAddress:
|
|
86
|
+
shippingAddress: ShippingAddress;
|
|
91
87
|
shippingMethod: ShippingMethodType;
|
|
92
88
|
total: number;
|
|
93
89
|
totalTaxAmount: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apirocket",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"typescript": "4.9.5"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@e-xisto/form-control": "0.
|
|
39
|
+
"@e-xisto/form-control": "0.2.3",
|
|
40
40
|
"@paypal/paypal-js": "^8.0.2",
|
|
41
41
|
"rxjs": "^7.8.0"
|
|
42
42
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CheckoutAddress } from "./checkout-address.model";
|
|
2
|
-
export declare class BillingAddress extends CheckoutAddress implements BillingAddressType {
|
|
3
|
-
taxCode?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
protected constructor(values: BillingAddressType);
|
|
6
|
-
static create(values: BillingAddressType): BillingAddress;
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare class CheckoutAddress implements AddressType {
|
|
2
|
-
get fullAddress(): string;
|
|
3
|
-
address?: string;
|
|
4
|
-
address2?: string;
|
|
5
|
-
city?: string;
|
|
6
|
-
country?: Country;
|
|
7
|
-
id: number;
|
|
8
|
-
state?: State;
|
|
9
|
-
postalCode?: string;
|
|
10
|
-
protected constructor(values: AddressType);
|
|
11
|
-
private getFullAddress;
|
|
12
|
-
}
|
|
13
|
-
export { CheckoutAddress };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CheckoutAddress } from "./checkout-address.model";
|
|
2
|
-
export declare class ShippingAddress extends CheckoutAddress implements ShippingAddressType {
|
|
3
|
-
firstName?: string;
|
|
4
|
-
lastName?: string;
|
|
5
|
-
protected constructor(values: ShippingAddressType);
|
|
6
|
-
static create(values: ShippingAddressType): ShippingAddress;
|
|
7
|
-
}
|