webc-miam 8.2.4 → 8.3.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/miam-interface.ts +23 -0
- package/main-es2015.js +1 -1
- package/main-es5.js +1 -1
- package/package.json +2 -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
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ComparableProduct } from './comparable-product';
|
|
4
|
+
import { DocumentCollection } from 'miam-jsonapi';
|
|
5
|
+
import { PointOfSale } from '../../_models';
|
|
6
|
+
import { Coordinates } from '../coordinates';
|
|
4
7
|
|
|
5
8
|
export interface MiamInterface {
|
|
6
9
|
/**
|
|
@@ -153,6 +156,8 @@ export interface MiamInterface {
|
|
|
153
156
|
* @param externalId the id of the PointOfSale in client's database
|
|
154
157
|
*/
|
|
155
158
|
load: (externalId) => void;
|
|
159
|
+
|
|
160
|
+
getByAddress: (address: string, radius: string) => Observable<DocumentCollection<PointOfSale>>
|
|
156
161
|
};
|
|
157
162
|
|
|
158
163
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -171,6 +176,12 @@ export interface MiamInterface {
|
|
|
171
176
|
* and if ingredients picture have been enabled with recipes.shouldDisplayIngredientPicturesOnRecipeCards(true)
|
|
172
177
|
*/
|
|
173
178
|
setDefaultIngredientPicture: (url: string) => void;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Call with an url of a picture to change the default picture displayed if a recipe doesn't have a picture
|
|
182
|
+
*/
|
|
183
|
+
setDefaultRecipePicture: (url: string) => void;
|
|
184
|
+
|
|
174
185
|
/**
|
|
175
186
|
* Override default labels for difficulty levels
|
|
176
187
|
*
|
|
@@ -265,6 +276,18 @@ export interface MiamInterface {
|
|
|
265
276
|
* @param favoriteProductIds an array of product ids, passed as string
|
|
266
277
|
*/
|
|
267
278
|
setFavoriteItems: (favoriteProductIds: string[]) => Observable<object>;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* User location can be set from the user's browser if they allowed it
|
|
282
|
+
* @param coords must provide latitude (number) and longitude (number) and optionally an accuracy (number)
|
|
283
|
+
*/
|
|
284
|
+
setLocation: (coords: Coordinates) => void;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// ---------------------------------------------------------------------------------------------------
|
|
288
|
+
|
|
289
|
+
events: {
|
|
290
|
+
storeLocatorOpened: () => Observable<boolean>
|
|
268
291
|
};
|
|
269
292
|
|
|
270
293
|
/**
|