apirocket 0.14.4 → 0.14.6
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 +1 -0
- package/dist/ecommerce.js +2 -2
- package/dist/lib/api.d.ts +3 -1
- package/dist/lib/graphql.d.ts +1 -1
- package/dist/lib/utils.d.ts +2 -1
- package/dist/services/account.service.d.ts +2 -2
- package/dist/services/customer.service.d.ts +12 -6
- package/dist/services/ecommerce-routes.d.ts +3 -1
- package/dist/services/sales.service.d.ts +10 -12
- package/dist/types/ecommerce.type.d.ts +3 -1
- package/package.json +1 -1
package/dist/lib/api.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import type { CustomerService } from '@src/services/customer.service';
|
|
3
|
-
export { countries, geolocation, getCountryId,
|
|
3
|
+
export { countries, geolocation, getCountryId, rememberPassword, resetPassword, states };
|
|
4
4
|
declare const countries: (customer: CustomerService) => Promise<Array<Country>>;
|
|
5
5
|
declare const states: (countryId: number, customer: CustomerService) => Promise<Array<State>>;
|
|
6
6
|
declare const geolocation: () => Observable<any>;
|
|
7
7
|
declare const getCountryId: (countryIso: string) => Promise<number>;
|
|
8
|
+
declare const rememberPassword: (email: string, sales: boolean) => Promise<number>;
|
|
9
|
+
declare const resetPassword: (hash: string, email: string, password: string, sales: boolean) => Promise<number>;
|
package/dist/lib/graphql.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const post: <T>(url: string, data: any, token: string | undefined) => Ob
|
|
|
28
28
|
declare const query: <T>(query: string, variables: QueryVariables, customer?: CustomerService) => Observable<T>;
|
|
29
29
|
declare const getApi: (url: string, data: any, customer: CustomerService | undefined) => Observable<AjaxResponse<any>>;
|
|
30
30
|
declare const post2: <T>(url: string, data: any, customer?: CustomerService) => Observable<any>;
|
|
31
|
-
declare const getSales: <T>(url: string,
|
|
31
|
+
declare const getSales: <T>(url: string, { search, page }: CustomersFilter, sales: SalesService | undefined) => Observable<{
|
|
32
32
|
__errors: any;
|
|
33
33
|
status: number;
|
|
34
34
|
} & T>;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { account, asFloat, asInteger, autoincrement, backToShopping, buildQuery, cart, checkout, clearHtml, createAccount, dataset, euroPrice, euros, isBoolean, isNumber, isString, millares, orderError, orderSummary, price, rememberPassword, round, salesAccount, salesSignIn, signIn, storageAvailable };
|
|
1
|
+
export { account, asFloat, asInteger, autoincrement, backToShopping, buildQuery, cart, checkout, clearHtml, createAccount, dataset, euroPrice, euros, isBoolean, isNumber, isString, millares, orderError, orderSummary, price, rememberPassword, round, salesAccount, salesRememberPassword, salesSignIn, signIn, storageAvailable };
|
|
2
2
|
declare const buildQuery: (data: {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}) => string;
|
|
@@ -23,6 +23,7 @@ declare const orderError: () => void;
|
|
|
23
23
|
declare const orderSummary: () => void;
|
|
24
24
|
declare const rememberPassword: () => void;
|
|
25
25
|
declare const salesAccount: () => void;
|
|
26
|
+
declare const salesRememberPassword: () => void;
|
|
26
27
|
declare const salesSignIn: () => void;
|
|
27
28
|
declare const signIn: () => void;
|
|
28
29
|
declare const clearHtml: (cadena: string) => string;
|
|
@@ -8,7 +8,9 @@ export declare class AccountService {
|
|
|
8
8
|
get myAccount$(): Observable<CustomerAccount>;
|
|
9
9
|
get myOrders$(): Observable<CustomerOrders>;
|
|
10
10
|
constructor();
|
|
11
|
+
init(): void;
|
|
11
12
|
private initMyAccountData;
|
|
13
|
+
private myAccountData;
|
|
12
14
|
passwordForm(formElement: HTMLFormElement, canChange: (canChange: boolean) => void): FormControl;
|
|
13
15
|
personalForm(formElement: HTMLFormElement, ecommerceService: EcommerceService, canUpdate: (canUpdate: boolean) => void): FormControl;
|
|
14
16
|
setCustomerService(customer: CustomerService): void;
|
|
@@ -17,6 +19,4 @@ export declare class AccountService {
|
|
|
17
19
|
passwordChange(form: FormControl): Observable<void>;
|
|
18
20
|
pdfOrder(orderId: number): Observable<PdfOrder>;
|
|
19
21
|
private myOrderData;
|
|
20
|
-
private myAccountData;
|
|
21
|
-
init(): void;
|
|
22
22
|
}
|
|
@@ -17,8 +17,13 @@ export declare class CustomerService implements Authentication {
|
|
|
17
17
|
get isLogged(): boolean;
|
|
18
18
|
constructor();
|
|
19
19
|
private changeCustomer;
|
|
20
|
+
createBillingAddress(input: Omit<BillingAddress, 'id'>): Promise<unknown>;
|
|
21
|
+
createShippingAddress(input: Omit<ShippingAddress, 'id'>): Promise<unknown>;
|
|
22
|
+
deleteBillingAddress(id: number): Promise<unknown>;
|
|
23
|
+
deleteShippingAddress(id: number): Promise<unknown>;
|
|
20
24
|
myAccount(): Promise<CustomerAccount>;
|
|
21
|
-
rememberPassword(
|
|
25
|
+
rememberPassword(email: string): Promise<number>;
|
|
26
|
+
resetPassword(hash: string, email: string, password: string): Promise<number>;
|
|
22
27
|
private restoreState;
|
|
23
28
|
private saveState;
|
|
24
29
|
setAccountService(account: AccountService): void;
|
|
@@ -30,11 +35,13 @@ export declare class CustomerService implements Authentication {
|
|
|
30
35
|
lastName?: string;
|
|
31
36
|
phone?: string;
|
|
32
37
|
}): void;
|
|
38
|
+
updateBillingAddress(input: BillingAddress): Promise<unknown>;
|
|
33
39
|
updateMyAccount(data: InputUpdateAccount): Promise<boolean>;
|
|
40
|
+
updateShippingAddress(input: ShippingAddress): Promise<unknown>;
|
|
34
41
|
logout(): Promise<{
|
|
35
42
|
status: number;
|
|
36
43
|
}>;
|
|
37
|
-
login(
|
|
44
|
+
login(email: string, password: string): Promise<{
|
|
38
45
|
status: number;
|
|
39
46
|
}>;
|
|
40
47
|
updateToken(data: LoginData): void;
|
|
@@ -44,10 +51,7 @@ export declare class CustomerService implements Authentication {
|
|
|
44
51
|
orders(filter?: OrdersFilter): Promise<CustomerOrders>;
|
|
45
52
|
order(id: number): Promise<Order>;
|
|
46
53
|
updatePassword(oldPassword: string, newPassword: string): Promise<boolean>;
|
|
47
|
-
|
|
48
|
-
createBillingAddress(input: Omit<BillingAddress, 'id'>): Promise<unknown>;
|
|
49
|
-
updateShippingAddress(input: ShippingAddress): Promise<unknown>;
|
|
50
|
-
updateBillingAddress(input: BillingAddress): Promise<unknown>;
|
|
54
|
+
updateAddressData(endPoint: string, input: any): Promise<unknown>;
|
|
51
55
|
}
|
|
52
56
|
export declare function customerProxy(customer: CustomerService): {
|
|
53
57
|
acceptEmailMarketing: boolean;
|
|
@@ -61,6 +65,8 @@ export declare function customerProxy(customer: CustomerService): {
|
|
|
61
65
|
countries: () => Promise<Country[]>;
|
|
62
66
|
createBillingAddress: (input: Omit<BillingAddress, 'id'>) => Promise<unknown>;
|
|
63
67
|
createShippingAddress: (input: Omit<ShippingAddress, 'id'>) => Promise<unknown>;
|
|
68
|
+
deleteShippingAddress: (id: number) => Promise<unknown>;
|
|
69
|
+
deleteBillingAddress: (id: number) => Promise<unknown>;
|
|
64
70
|
myAccount: () => Promise<CustomerAccount>;
|
|
65
71
|
order: (id: number) => Promise<Order>;
|
|
66
72
|
orders: (filter?: OrdersFilter) => Promise<CustomerOrders>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { EcommerceStatus } from "@src/types/ecommerce.type";
|
|
1
2
|
import type { SvelteComponent } from "svelte";
|
|
2
3
|
import type { EcommerceService } from "./ecommerce.service";
|
|
3
4
|
type Route = {
|
|
4
5
|
component: typeof SvelteComponent;
|
|
5
6
|
canActivate?: (ecommerceService: EcommerceService) => boolean;
|
|
7
|
+
props?: any;
|
|
6
8
|
};
|
|
7
|
-
export declare const ROUTES: Map<
|
|
9
|
+
export declare const ROUTES: Map<EcommerceStatus, Route>;
|
|
8
10
|
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { FormControl } from "@e-xisto/form-control";
|
|
2
|
-
import type { CustomerService } from "./customer.service";
|
|
3
1
|
import { Observable } from "rxjs";
|
|
4
|
-
type
|
|
5
|
-
type SalesCustomer = any;
|
|
2
|
+
import type { CustomerService } from "./customer.service";
|
|
6
3
|
export declare class SalesService implements Authentication {
|
|
7
4
|
#private;
|
|
8
5
|
readonly change$: Observable<SalesService>;
|
|
@@ -18,24 +15,25 @@ export declare class SalesService implements Authentication {
|
|
|
18
15
|
private _state;
|
|
19
16
|
private _subscribe$;
|
|
20
17
|
private _update$;
|
|
21
|
-
private _customers;
|
|
22
|
-
private _customers$;
|
|
23
|
-
private _customersData;
|
|
24
18
|
constructor();
|
|
25
19
|
private changeSales;
|
|
26
|
-
|
|
20
|
+
private init;
|
|
21
|
+
login(email: string, password: string): Promise<{
|
|
27
22
|
status: number;
|
|
28
23
|
}>;
|
|
24
|
+
rememberPassword(email: string): Promise<number>;
|
|
25
|
+
resetPassword(hash: string, email: string, password: string): Promise<number>;
|
|
29
26
|
private restoreState;
|
|
30
27
|
private saveState;
|
|
31
|
-
|
|
28
|
+
setCustomerService(customer: CustomerService): void;
|
|
32
29
|
subscribe(cb: (sales: SalesService) => void): () => void;
|
|
30
|
+
private updateState;
|
|
33
31
|
updateToken(data: LoginData): void;
|
|
34
|
-
private customersData;
|
|
35
32
|
customerLogin(customerId: number): void;
|
|
36
|
-
setCustomerService(customer: CustomerService): void;
|
|
37
33
|
logout(): Promise<{
|
|
38
34
|
status: number;
|
|
39
35
|
}>;
|
|
36
|
+
private initCustomersData;
|
|
37
|
+
private customersData;
|
|
38
|
+
customersSearch(filter: CustomersFilter): Observable<SalesCustomers>;
|
|
40
39
|
}
|
|
41
|
-
export {};
|
|
@@ -15,7 +15,9 @@ export declare enum EcommerceStatus {
|
|
|
15
15
|
REGISTER = "#/register",
|
|
16
16
|
RESET_PASSWORD = "#/reset-password",
|
|
17
17
|
SALES_ACCOUNT = "#/sales-account",
|
|
18
|
-
SALES_SIGNIN = "#/sales-signin"
|
|
18
|
+
SALES_SIGNIN = "#/sales-signin",
|
|
19
|
+
SALES_REMEMBER_PASSWORD = "#/sales-remember-password",
|
|
20
|
+
SALES_RESET_PASSWORD = "#/sales-reset-password"
|
|
19
21
|
}
|
|
20
22
|
export declare class EcommerceReadyEvent extends Event {
|
|
21
23
|
readonly ecommerce: PublicEcommerceService;
|