webc-miam 8.4.2 → 8.6.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/miam-interface.ts +29 -5
- 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
|
@@ -2,8 +2,7 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ComparableProduct } from './comparable-product';
|
|
4
4
|
import { DocumentCollection } from 'miam-jsonapi';
|
|
5
|
-
import { PointOfSale } from '../../_models';
|
|
6
|
-
import { Coordinates } from '../coordinates';
|
|
5
|
+
import { PointOfSale, Supplier } from '../../_models';
|
|
7
6
|
|
|
8
7
|
export interface MiamInterface {
|
|
9
8
|
/**
|
|
@@ -124,10 +123,20 @@ export interface MiamInterface {
|
|
|
124
123
|
* @param antiInflation if you want to use the anti inflation
|
|
125
124
|
*/
|
|
126
125
|
enableMealsPlanner: (url: string, antiInflation?: boolean) => void;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Call to enable SEO (Title and meta tags on recipe display)
|
|
129
|
+
*/
|
|
130
|
+
enableSeo: () => void
|
|
127
131
|
/**
|
|
128
132
|
* Call to enable guests input on my-meals cards
|
|
129
133
|
*/
|
|
130
134
|
enableGuestsInputOnMyMeals: () => void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Call to enable collapsing of unavailable products by default
|
|
138
|
+
*/
|
|
139
|
+
collapseUnavailableProductsByDefault: () => void;
|
|
131
140
|
};
|
|
132
141
|
|
|
133
142
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -143,6 +152,13 @@ export interface MiamInterface {
|
|
|
143
152
|
* or to show your point of sale picker if the user has not chosen one
|
|
144
153
|
*/
|
|
145
154
|
setHookCallback: (callback: (isLogged, isPosValid) => boolean) => void;
|
|
155
|
+
/**
|
|
156
|
+
* Set up a callback which Miam will call when it needs to force the POS
|
|
157
|
+
* (only used when tranfering a basket from an affiliated website)
|
|
158
|
+
*
|
|
159
|
+
* @param callback a method that will be called passing :
|
|
160
|
+
* - posExtId, the id of the POS (in your database)
|
|
161
|
+
*/
|
|
146
162
|
setForcePosCallback: (callback: (posExtId: string) => boolean) => void;
|
|
147
163
|
};
|
|
148
164
|
|
|
@@ -157,8 +173,14 @@ export interface MiamInterface {
|
|
|
157
173
|
*/
|
|
158
174
|
load: (externalId) => void;
|
|
159
175
|
|
|
160
|
-
|
|
161
|
-
|
|
176
|
+
/**
|
|
177
|
+
* This is an internal method that will be moved elsewhere soon. Do not call
|
|
178
|
+
*/
|
|
179
|
+
getByAddress: (address: string, radius: string, suppliers: string[]) => Observable<DocumentCollection<PointOfSale>>;
|
|
180
|
+
/**
|
|
181
|
+
* This is an internal method that will be moved elsewhere soon. Do not call
|
|
182
|
+
*/
|
|
183
|
+
getByCoordinates: (longitude: number, latitude: number, radius: number, suppliers: string[]) => Observable<DocumentCollection<PointOfSale>>;
|
|
162
184
|
};
|
|
163
185
|
|
|
164
186
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -251,6 +273,8 @@ export interface MiamInterface {
|
|
|
251
273
|
* @param token a single token containing the information for supplierId, origin & plausible domain
|
|
252
274
|
*/
|
|
253
275
|
setupWithToken: (token: string) => void;
|
|
276
|
+
|
|
277
|
+
getAffiliateSuppliers: () => Observable<Supplier[]>;
|
|
254
278
|
};
|
|
255
279
|
|
|
256
280
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -282,7 +306,7 @@ export interface MiamInterface {
|
|
|
282
306
|
* User location can be set from the user's browser if they allowed it
|
|
283
307
|
* @param coords must provide latitude (number) and longitude (number) and optionally an accuracy (number)
|
|
284
308
|
*/
|
|
285
|
-
setLocation: (coords:
|
|
309
|
+
setLocation: (coords: GeolocationPosition) => void;
|
|
286
310
|
};
|
|
287
311
|
|
|
288
312
|
// ---------------------------------------------------------------------------------------------------
|