@mappedin/mappedin-js 5.0.0-beta.6 → 5.0.0-beta.7

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.
@@ -6,6 +6,19 @@
6
6
  declare module '@mappedin/mappedin-js/lib/esm/get-venue' {
7
7
  import type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
8
8
  import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
9
+ /**
10
+ * This is how we can avoid bundling in node-fetch (via isomorphic fetch),
11
+ * which keeps popping up in security advisories
12
+ * This is a pattern that most isomorphic libraries appear to use,
13
+ * where when running in node, you can pass your own fetch function
14
+ * as one is not provided by Node.js.
15
+ *
16
+ */
17
+ export function isomorphicFetch(): Window['fetch'];
18
+ /**
19
+ * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest
20
+ */
21
+ export function setFetchFn(fetchFn: any): void;
9
22
  /** Classes */
10
23
  export { Mappedin, MappedinCollectionType } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
11
24
  export { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';
@@ -134,6 +147,7 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types
134
147
  things?: any;
135
148
  useDraftData?: boolean;
136
149
  platformString?: string;
150
+ emitAnalyticsEvents?: boolean;
137
151
  };
138
152
  export type TGetVenueOptionsInternal = {
139
153
  baseUrl?: string;
@@ -1988,6 +2002,19 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.Analy
1988
2002
  trackBlueDotEvent(blueDotEvent: any): void;
1989
2003
  trackSearch(searchAnalyticsObject: any): void;
1990
2004
  trackSearchSuggest(searchAnalyticsObject: any): void;
2005
+ /**
2006
+ * Sets the current global context of the Analytics class.
2007
+ * @method setContext
2008
+ * @param context {String} The Analytics context to be set.
2009
+ * @hidden
2010
+ */
2011
+ static setContext(context: any): void;
2012
+ /**
2013
+ * Sets the current global context of the Analytics class to undefined.
2014
+ * @method clearContext
2015
+ * @hidden
2016
+ */
2017
+ static clearContext(): void;
1991
2018
  /**
1992
2019
  * Enum of valid bluedot events.
1993
2020
  * Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
@@ -2008,6 +2035,19 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.Analy
2008
2035
  declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue' {
2009
2036
  import type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
2010
2037
  import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
2038
+ /**
2039
+ * This is how we can avoid bundling in node-fetch (via isomorphic fetch),
2040
+ * which keeps popping up in security advisories
2041
+ * This is a pattern that most isomorphic libraries appear to use,
2042
+ * where when running in node, you can pass your own fetch function
2043
+ * as one is not provided by Node.js.
2044
+ *
2045
+ */
2046
+ export function isomorphicFetch(): Window['fetch'];
2047
+ /**
2048
+ * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest
2049
+ */
2050
+ export function setFetchFn(fetchFn: any): void;
2011
2051
  /** Classes */
2012
2052
  export { Mappedin, MappedinCollectionType } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
2013
2053
  export { MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinLocation';