apirocket 0.9.6 → 0.9.7
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/dist/lib/api.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import type { CartType, InputCartRemoveItem, InputCartUpdate, InputCartUpdateItem, OrderType } from '@src/types/types';
|
|
3
2
|
import type { CustomerService } from '@src/services/customer.service';
|
|
4
3
|
declare const ID_ESPANA = 199;
|
|
5
|
-
export {
|
|
6
|
-
declare const cartRemoveItem: (input: InputCartRemoveItem, customer: CustomerService) => Observable<CartType>;
|
|
7
|
-
declare const cartUpdate: (input: InputCartUpdate, customer: CustomerService) => Observable<CartType>;
|
|
8
|
-
declare const cartUpdateItem: (input: InputCartUpdateItem, customer: CustomerService) => Observable<CartType>;
|
|
9
|
-
declare const orderSummary: (id: number, hash: string, customer: CustomerService) => Observable<OrderType>;
|
|
4
|
+
export { geolocation, states, ID_ESPANA };
|
|
10
5
|
declare const geolocation: () => Observable<any>;
|
|
11
6
|
declare const states: (countryId: number, customer: CustomerService) => Observable<Array<StateType>>;
|
|
@@ -26,14 +26,16 @@ export declare class CartService {
|
|
|
26
26
|
add(data: CartItem): void;
|
|
27
27
|
close(): void;
|
|
28
28
|
open(fullScreen: boolean): void;
|
|
29
|
-
orderSummary(id: number, hash: string): Observable<OrderType
|
|
29
|
+
orderSummary(id: number, hash: string): Observable<OrderType & {
|
|
30
|
+
__errors: any;
|
|
31
|
+
}>;
|
|
30
32
|
addFromTarget(target: HTMLElement): void;
|
|
31
33
|
private setStatus;
|
|
32
34
|
clear(): void;
|
|
33
|
-
remove(item: CartItem): Promise<void>;
|
|
34
|
-
update(): Promise<void>;
|
|
35
|
-
updateItem(item: CartItem, quantity: number): Promise<void>;
|
|
36
35
|
private updateCart;
|
|
37
36
|
cartToOrder(checkoutService: CheckoutService, customer: CustomerService): Observable<PaymentInfo>;
|
|
38
37
|
private addItemCart;
|
|
38
|
+
removeItem(item: CartItem): void;
|
|
39
|
+
updateItem(item: CartItem, quantity: number): void;
|
|
40
|
+
update(): void;
|
|
39
41
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export type CartType = {
|
|
|
77
77
|
taxAmount: number;
|
|
78
78
|
taxBase: number;
|
|
79
79
|
total: number;
|
|
80
|
+
units: number;
|
|
80
81
|
uuid: string;
|
|
81
82
|
};
|
|
82
83
|
export type CartStatus = 'loaded' | 'loading';
|
|
@@ -99,6 +100,7 @@ export type InputCartRemoveItem = {
|
|
|
99
100
|
customerId?: number;
|
|
100
101
|
email?: string;
|
|
101
102
|
itemUuid: string;
|
|
103
|
+
priceTaxIncluded?: boolean;
|
|
102
104
|
};
|
|
103
105
|
export type InputCartUpdateItem = {
|
|
104
106
|
cartUuid: string;
|
package/package.json
CHANGED
package/dist/lib/api-models.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const ADDRESS = "{\n address\n address2\n city\n country {\n id\n name\n }\n firstName\n lastName\n postalCode\n state {\n id\n name\n }\n}";
|
|
2
|
-
export declare const BILLING_ADDRESS = "{\n address\n address2\n city\n country {\n id\n name\n }\n name\n postalCode\n state {\n id\n name\n }\n taxCode\n}\n";
|
|
3
|
-
export declare const CART_RESPONSE: string;
|
|
4
|
-
export declare const ORDER_CUSTOMER = "\n{\n email\n id\n phone\n}\n";
|
|
5
|
-
export declare const ORDER_ITEM: string;
|
|
6
|
-
export declare const ORDER_PAYMENT = "{\n authorization\n method {\n id\n name\n }\n}";
|
|
7
|
-
export declare const ORDER_SHIPPING = "{\n description,\n id\n name\n taxBase\n taxAmount\n}";
|