apirocket 0.18.2 → 0.18.4
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 +23 -0
- package/dist/ecommerce.js +2 -2
- package/dist/services/api.service.d.ts +1 -1
- package/dist/types/ecommerce.type.d.ts +8 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ type EcommerceConfig = {
|
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### Eventos
|
|
65
|
+
- apirocket.ecommerce.customer.login
|
|
65
66
|
- apirocket.ecommerce.updateEvents
|
|
66
67
|
- apirocket.cartitem-loaded
|
|
67
68
|
|
|
@@ -85,6 +86,28 @@ document.addEventListener('apirocket.cartitem-loaded', (event: CartItemLoadedEve
|
|
|
85
86
|
```
|
|
86
87
|
|
|
87
88
|
|
|
89
|
+
### CustomerLoginEvent
|
|
90
|
+
|
|
91
|
+
Se lanza cuando un cliente inicia sesion a traves de un enlace de acceso (`#/customer-login/<hash>`),
|
|
92
|
+
una vez validado el hash y actualizado el estado del cliente.
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
interface CustomerLoginEvent extends Event {
|
|
96
|
+
login: {
|
|
97
|
+
token?: string;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
document.addEventListener('apirocket.ecommerce.customer.login', (event: CustomerLoginEvent) => {
|
|
104
|
+
const token = event.login.token;
|
|
105
|
+
|
|
106
|
+
// ...
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
|
|
88
111
|
### DebugType
|
|
89
112
|
|
|
90
113
|
```javascript
|