webc-miam 8.4.3 → 8.5.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 +24 -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
|
/**
|
|
@@ -128,6 +127,11 @@ export interface MiamInterface {
|
|
|
128
127
|
* Call to enable guests input on my-meals cards
|
|
129
128
|
*/
|
|
130
129
|
enableGuestsInputOnMyMeals: () => void;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Call to enable collapsing of unavailable products by default
|
|
133
|
+
*/
|
|
134
|
+
collapseUnavailableProductsByDefault: () => void;
|
|
131
135
|
};
|
|
132
136
|
|
|
133
137
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -143,6 +147,13 @@ export interface MiamInterface {
|
|
|
143
147
|
* or to show your point of sale picker if the user has not chosen one
|
|
144
148
|
*/
|
|
145
149
|
setHookCallback: (callback: (isLogged, isPosValid) => boolean) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Set up a callback which Miam will call when it needs to force the POS
|
|
152
|
+
* (only used when tranfering a basket from an affiliated website)
|
|
153
|
+
*
|
|
154
|
+
* @param callback a method that will be called passing :
|
|
155
|
+
* - posExtId, the id of the POS (in your database)
|
|
156
|
+
*/
|
|
146
157
|
setForcePosCallback: (callback: (posExtId: string) => boolean) => void;
|
|
147
158
|
};
|
|
148
159
|
|
|
@@ -157,8 +168,14 @@ export interface MiamInterface {
|
|
|
157
168
|
*/
|
|
158
169
|
load: (externalId) => void;
|
|
159
170
|
|
|
160
|
-
|
|
161
|
-
|
|
171
|
+
/**
|
|
172
|
+
* This is an internal method that will be moved elsewhere soon. Do not call
|
|
173
|
+
*/
|
|
174
|
+
getByAddress: (address: string, radius: string, suppliers: string[]) => Observable<DocumentCollection<PointOfSale>>;
|
|
175
|
+
/**
|
|
176
|
+
* This is an internal method that will be moved elsewhere soon. Do not call
|
|
177
|
+
*/
|
|
178
|
+
getByCoordinates: (longitude: number, latitude: number, radius: number, suppliers: string[]) => Observable<DocumentCollection<PointOfSale>>;
|
|
162
179
|
};
|
|
163
180
|
|
|
164
181
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -251,6 +268,8 @@ export interface MiamInterface {
|
|
|
251
268
|
* @param token a single token containing the information for supplierId, origin & plausible domain
|
|
252
269
|
*/
|
|
253
270
|
setupWithToken: (token: string) => void;
|
|
271
|
+
|
|
272
|
+
getAffiliateSuppliers: () => Observable<Supplier[]>;
|
|
254
273
|
};
|
|
255
274
|
|
|
256
275
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -282,7 +301,7 @@ export interface MiamInterface {
|
|
|
282
301
|
* User location can be set from the user's browser if they allowed it
|
|
283
302
|
* @param coords must provide latitude (number) and longitude (number) and optionally an accuracy (number)
|
|
284
303
|
*/
|
|
285
|
-
setLocation: (coords:
|
|
304
|
+
setLocation: (coords: GeolocationPosition) => void;
|
|
286
305
|
};
|
|
287
306
|
|
|
288
307
|
// ---------------------------------------------------------------------------------------------------
|