webc-miam 9.0.8 → 9.1.1
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/interfaces/mealz-interface.ts +16 -2
- package/interfaces/mealz-internal-interface.ts +17 -6
- package/main-es2015.js +1 -1
- package/main-es5.js +1 -1
- package/package.json +1 -1
- package/webc-miam-de.js +1 -1
- package/webc-miam-en.js +1 -1
- package/webc-miam-es.js +1 -1
- package/webc-miam-fr.js +1 -1
- package/webc-miam-it.js +1 -1
- package/webc-miam-nl.js +1 -1
- package/webc-miam-pt.js +1 -1
- package/webc-miam-ro.js +1 -1
|
@@ -64,7 +64,7 @@ export interface MealzInterface {
|
|
|
64
64
|
/**
|
|
65
65
|
* Opens the preview by calling the `openBasket` method of the `recipesService`.
|
|
66
66
|
*/
|
|
67
|
-
openPreview: () => void;
|
|
67
|
+
openPreview: (analyticsPath?: string) => void;
|
|
68
68
|
/**
|
|
69
69
|
* /!\ Debug only: If no-supplier mode is activated, override the base of the transfer url with an other url
|
|
70
70
|
* ex: if transfer url is 'https://test.com/recipes?param1=x,param2=y'
|
|
@@ -148,6 +148,7 @@ export interface MealzInterface {
|
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* Call to enable collapsing of unavailable products by default
|
|
151
|
+
* @deprecated Not used anymore
|
|
151
152
|
*/
|
|
152
153
|
collapseUnavailableProductsByDefault: () => void;
|
|
153
154
|
};
|
|
@@ -193,7 +194,7 @@ export interface MealzInterface {
|
|
|
193
194
|
/**
|
|
194
195
|
* This is an internal method that will be moved elsewhere soon. Do not call
|
|
195
196
|
*/
|
|
196
|
-
getByCoordinates: (
|
|
197
|
+
getByCoordinates: (latitude: number, longitude: number, radius: number, suppliers: string[]) => Observable<DocumentCollection<PointOfSale>>;
|
|
197
198
|
};
|
|
198
199
|
|
|
199
200
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -302,6 +303,19 @@ export interface MealzInterface {
|
|
|
302
303
|
* it saves time later)
|
|
303
304
|
*/
|
|
304
305
|
loadWithExternalId: (id: string, forbidProfiling?: boolean, initBasket?: boolean) => Observable<object>;
|
|
306
|
+
/**
|
|
307
|
+
* Call to inform Mealz that the user is authless with the corresponding id
|
|
308
|
+
* @param id authless-id fetched from the route /generate-authless-token
|
|
309
|
+
* @param forbidProfiling if set to true, desactivate personalized content (personalized recipes & products)
|
|
310
|
+
*/
|
|
311
|
+
loadWithAuthlessId: (id: string, forbidProfiling?: boolean) => void;
|
|
312
|
+
/**
|
|
313
|
+
* Call to inform Mealz that profiling preferences have been updated
|
|
314
|
+
* @param forbidProfiling if set to true, desactivate personalized content (personalized recipes & products)
|
|
315
|
+
* @param userId userId or authlessId of the user
|
|
316
|
+
* @param isAuthless if true Mealz will treat userID as an authless-id
|
|
317
|
+
*/
|
|
318
|
+
updateForbidProfiling: (forbidProfiling: boolean, userId: string, isAuthless: boolean) => void;
|
|
305
319
|
/**
|
|
306
320
|
* Call to inform Mealz that the user has logged out
|
|
307
321
|
*/
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import { PlausibleProps } from 'mealz-shared-analytics';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
3
|
import { BasketEntry, Recipe } from '../../_models';
|
|
3
4
|
import { RecipePricing } from '../../_models/recipe-pricing';
|
|
5
|
+
import { EventJourney } from '../event-journey.enum';
|
|
4
6
|
|
|
5
7
|
export interface MealzInternalInterface {
|
|
6
8
|
|
|
9
|
+
analytics: {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Sends an analytics event via mealz-shared-analytics
|
|
13
|
+
*/
|
|
14
|
+
sendEvent: (name: string, path: string, props: PlausibleProps, journey?: EventJourney) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
7
17
|
// ---------------------------------------------------------------------------------------------------
|
|
8
18
|
|
|
9
19
|
basket: {
|
|
@@ -27,10 +37,6 @@ export interface MealzInternalInterface {
|
|
|
27
37
|
// ---------------------------------------------------------------------------------------------------
|
|
28
38
|
|
|
29
39
|
catalog: {
|
|
30
|
-
/**
|
|
31
|
-
* Opens filter modal
|
|
32
|
-
*/
|
|
33
|
-
openFilters: () => void;
|
|
34
40
|
|
|
35
41
|
/**
|
|
36
42
|
* Opens preferences modal
|
|
@@ -62,14 +68,14 @@ export interface MealzInternalInterface {
|
|
|
62
68
|
/**
|
|
63
69
|
* Opens the recipe details by calling the `openRecipeDetails` method of the `recipesService`.
|
|
64
70
|
*/
|
|
65
|
-
openDetails: (recipeId: string, guests: number) => void;
|
|
71
|
+
openDetails: (recipeId: string, guests: number, initialTabIndex: number, analyticsPath?: string, categoryId?: string) => void;
|
|
66
72
|
|
|
67
73
|
/**
|
|
68
74
|
* Updates or creates a recipe like entry.
|
|
69
75
|
* If `recipeLikeId` is provided, it updates the existing like; otherwise, it creates a new one.
|
|
70
76
|
* It also sets the `isPast` status and tracks the update event.
|
|
71
77
|
*/
|
|
72
|
-
updateRecipeLike: (recipeLikeId: string, recipeId: string, isPast: boolean,
|
|
78
|
+
updateRecipeLike: (recipeLikeId: string, recipeId: string, isPast: boolean, path?: string) => void;
|
|
73
79
|
|
|
74
80
|
/**
|
|
75
81
|
* Emits an observable that notifies subscribers when a recipe like has been updated.
|
|
@@ -115,6 +121,11 @@ export interface MealzInternalInterface {
|
|
|
115
121
|
* Retrieves the current authentication status of the user.
|
|
116
122
|
*/
|
|
117
123
|
isAuthenticated: () => Observable<boolean>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Updates the SDK's session ID to ensure consistency with SSR.
|
|
127
|
+
*/
|
|
128
|
+
setSessionId: (sessionId: string) => void;
|
|
118
129
|
};
|
|
119
130
|
|
|
120
131
|
getStickyHeaderHeight: () => Observable<number>;
|