webc-miam 9.0.7 → 9.1.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/interfaces/mealz-interface.ts +15 -1
- package/interfaces/mealz-internal-interface.ts +12 -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'
|
|
@@ -152,6 +152,7 @@ export interface MealzInterface {
|
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Call to enable collapsing of unavailable products by default
|
|
155
|
+
* @deprecated Not used anymore
|
|
155
156
|
*/
|
|
156
157
|
collapseUnavailableProductsByDefault: () => void;
|
|
157
158
|
};
|
|
@@ -306,6 +307,19 @@ export interface MealzInterface {
|
|
|
306
307
|
* it saves time later)
|
|
307
308
|
*/
|
|
308
309
|
loadWithExternalId: (id: string, forbidProfiling?: boolean, initBasket?: boolean) => Observable<object>;
|
|
310
|
+
/**
|
|
311
|
+
* Call to inform Mealz that the user is authless with the corresponding id
|
|
312
|
+
* @param id authless-id fetched from the route /generate-authless-token
|
|
313
|
+
* @param forbidProfiling if set to true, desactivate personalized content (personalized recipes & products)
|
|
314
|
+
*/
|
|
315
|
+
loadWithAuthlessId: (id: string, forbidProfiling?: boolean) => void;
|
|
316
|
+
/**
|
|
317
|
+
* Call to inform Mealz that profiling preferences have been updated
|
|
318
|
+
* @param forbidProfiling if set to true, desactivate personalized content (personalized recipes & products)
|
|
319
|
+
* @param userId userId or authlessId of the user
|
|
320
|
+
* @param isAuthless if true Mealz will treat userID as an authless-id
|
|
321
|
+
*/
|
|
322
|
+
updateForbidProfiling: (forbidProfiling: boolean, userId: string, isAuthless: boolean) => void;
|
|
309
323
|
/**
|
|
310
324
|
* Call to inform Mealz that the user has logged out
|
|
311
325
|
*/
|
|
@@ -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.
|