@mailbiz/onsite-wakecommerce-vendor 0.3.5 → 0.4.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
CHANGED
|
@@ -2,6 +2,50 @@ import { OnsiteCoreWindow } from "@mailbiz/onsite-core";
|
|
|
2
2
|
//#region [Window]
|
|
3
3
|
interface WakecommerceWindow extends OnsiteCoreWindow {
|
|
4
4
|
Fbits?: FbitsContext;
|
|
5
|
+
// dataLayer?: WakecommerceDataLayer;
|
|
6
|
+
client?: WakeClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Wake Client API available on window.client in Wake checkout pages.
|
|
10
|
+
*/
|
|
11
|
+
interface WakeClient {
|
|
12
|
+
checkout: WakeClientCheckout;
|
|
13
|
+
}
|
|
14
|
+
interface WakeClientCheckout {
|
|
15
|
+
/**
|
|
16
|
+
* Gets current checkout data including products.
|
|
17
|
+
*/
|
|
18
|
+
get(): Promise<{
|
|
19
|
+
data: WakeClientCheckoutData;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the checkout ID for cart recovery.
|
|
23
|
+
*/
|
|
24
|
+
setCheckoutId(checkoutId: string): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
interface WakeClientCheckoutData {
|
|
27
|
+
checkoutId: string;
|
|
28
|
+
url: string;
|
|
29
|
+
products: WakeClientCheckoutProduct[];
|
|
30
|
+
shippingFee: number;
|
|
31
|
+
subtotal: number;
|
|
32
|
+
total: number;
|
|
33
|
+
}
|
|
34
|
+
interface WakeClientCheckoutProduct {
|
|
35
|
+
name: string;
|
|
36
|
+
productAttributes: {
|
|
37
|
+
name: string;
|
|
38
|
+
value: string;
|
|
39
|
+
type: number;
|
|
40
|
+
}[];
|
|
41
|
+
listPrice: number;
|
|
42
|
+
price: number;
|
|
43
|
+
ajustedPrice: number;
|
|
44
|
+
productId: number;
|
|
45
|
+
productVariantId: number;
|
|
46
|
+
imageUrl: string;
|
|
47
|
+
quantity: number;
|
|
48
|
+
customization: unknown | null;
|
|
5
49
|
}
|
|
6
50
|
//#endregion
|
|
7
51
|
//#region [Fbits context]
|