@mparticle/web-sdk 2.47.0 → 2.47.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/src/identity.js CHANGED
@@ -1215,7 +1215,7 @@ export default function Identity(mpInstance) {
1215
1215
  mpInstance.Logger.warning(
1216
1216
  'Deprecated function Identity.getCurrentUser().getCart() will be removed in future releases'
1217
1217
  );
1218
- return self.mParticleUserCart(mpid);
1218
+ return self.mParticleUserCart();
1219
1219
  },
1220
1220
 
1221
1221
  /**
@@ -1286,133 +1286,37 @@ export default function Identity(mpInstance) {
1286
1286
  * @class mParticle.Identity.getCurrentUser().getCart()
1287
1287
  * @deprecated
1288
1288
  */
1289
- this.mParticleUserCart = function(mpid) {
1289
+ this.mParticleUserCart = function() {
1290
1290
  return {
1291
1291
  /**
1292
1292
  * Adds a cart product to the user cart
1293
1293
  * @method add
1294
- * @param {Object} product the product
1295
- * @param {Boolean} [logEvent] a boolean to log adding of the cart object. If blank, no logging occurs.
1296
1294
  * @deprecated
1297
1295
  */
1298
- add: function(product, logEvent) {
1296
+ add: function() {
1299
1297
  mpInstance.Logger.warning(
1300
- 'Deprecated function Identity.getCurrentUser().getCart().add() will be removed in future releases'
1298
+ generateDeprecationMessage(
1299
+ 'Identity.getCurrentUser().getCart().add()',
1300
+ true,
1301
+ 'eCommerce.logProductAction()',
1302
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
1303
+ )
1301
1304
  );
1302
- var allProducts, userProducts, arrayCopy;
1303
-
1304
- arrayCopy = Array.isArray(product)
1305
- ? product.slice()
1306
- : [product];
1307
- arrayCopy.forEach(function(product) {
1308
- product.Attributes = mpInstance._Helpers.sanitizeAttributes(
1309
- product.Attributes
1310
- );
1311
- });
1312
-
1313
- if (mpInstance._Store.webviewBridgeEnabled) {
1314
- mpInstance._NativeSdkHelpers.sendToNative(
1315
- Constants.NativeSdkPaths.AddToCart,
1316
- JSON.stringify(arrayCopy)
1317
- );
1318
- } else {
1319
- mpInstance._SessionManager.resetSessionTimer();
1320
-
1321
- userProducts = mpInstance._Persistence.getUserProductsFromLS(
1322
- mpid
1323
- );
1324
-
1325
- userProducts = userProducts.concat(arrayCopy);
1326
-
1327
- if (logEvent === true) {
1328
- mpInstance._Events.logProductActionEvent(
1329
- Types.ProductActionType.AddToCart,
1330
- arrayCopy
1331
- );
1332
- }
1333
-
1334
- var productsForMemory = {};
1335
- productsForMemory[mpid] = { cp: userProducts };
1336
-
1337
- if (
1338
- userProducts.length >
1339
- mpInstance._Store.SDKConfig.maxProducts
1340
- ) {
1341
- mpInstance.Logger.verbose(
1342
- 'The cart contains ' +
1343
- userProducts.length +
1344
- ' items. Only ' +
1345
- mpInstance._Store.SDKConfig.maxProducts +
1346
- ' can currently be saved in cookies.'
1347
- );
1348
- userProducts = userProducts.slice(
1349
- -mpInstance._Store.SDKConfig.maxProducts
1350
- );
1351
- }
1352
-
1353
- allProducts = mpInstance._Persistence.getAllUserProductsFromLS();
1354
- allProducts[mpid].cp = userProducts;
1355
-
1356
- mpInstance._Persistence.setCartProducts(allProducts);
1357
- }
1358
1305
  },
1359
1306
  /**
1360
1307
  * Removes a cart product from the current user cart
1361
1308
  * @method remove
1362
- * @param {Object} product the product
1363
- * @param {Boolean} [logEvent] a boolean to log adding of the cart object. If blank, no logging occurs.
1364
1309
  * @deprecated
1365
1310
  */
1366
- remove: function(product, logEvent) {
1311
+ remove: function() {
1367
1312
  mpInstance.Logger.warning(
1368
- 'Deprecated function Identity.getCurrentUser().getCart().remove() will be removed in future releases'
1313
+ generateDeprecationMessage(
1314
+ 'Identity.getCurrentUser().getCart().remove()',
1315
+ true,
1316
+ 'eCommerce.logProductAction()',
1317
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
1318
+ )
1369
1319
  );
1370
- var allProducts,
1371
- userProducts,
1372
- cartIndex = -1,
1373
- cartItem = null;
1374
-
1375
- if (mpInstance._Store.webviewBridgeEnabled) {
1376
- mpInstance._NativeSdkHelpers.sendToNative(
1377
- Constants.NativeSdkPaths.RemoveFromCart,
1378
- JSON.stringify(product)
1379
- );
1380
- } else {
1381
- mpInstance._SessionManager.resetSessionTimer();
1382
-
1383
- userProducts = mpInstance._Persistence.getUserProductsFromLS(
1384
- mpid
1385
- );
1386
-
1387
- if (userProducts) {
1388
- userProducts.forEach(function(cartProduct, i) {
1389
- if (cartProduct.Sku === product.Sku) {
1390
- cartIndex = i;
1391
- cartItem = cartProduct;
1392
- }
1393
- });
1394
-
1395
- if (cartIndex > -1) {
1396
- userProducts.splice(cartIndex, 1);
1397
-
1398
- if (logEvent === true) {
1399
- mpInstance._Events.logProductActionEvent(
1400
- Types.ProductActionType.RemoveFromCart,
1401
- cartItem
1402
- );
1403
- }
1404
- }
1405
- }
1406
-
1407
- var productsForMemory = {};
1408
- productsForMemory[mpid] = { cp: userProducts };
1409
-
1410
- allProducts = mpInstance._Persistence.getAllUserProductsFromLS();
1411
-
1412
- allProducts[mpid].cp = userProducts;
1413
-
1414
- mpInstance._Persistence.setCartProducts(allProducts);
1415
- }
1416
1320
  },
1417
1321
  /**
1418
1322
  * Clears the user's cart
@@ -1421,31 +1325,13 @@ export default function Identity(mpInstance) {
1421
1325
  */
1422
1326
  clear: function() {
1423
1327
  mpInstance.Logger.warning(
1424
- 'Deprecated function Identity.getCurrentUser().getCart().clear() will be removed in future releases'
1328
+ generateDeprecationMessage(
1329
+ 'Identity.getCurrentUser().getCart().clear()',
1330
+ true,
1331
+ '',
1332
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
1333
+ )
1425
1334
  );
1426
-
1427
- var allProducts;
1428
-
1429
- if (mpInstance._Store.webviewBridgeEnabled) {
1430
- mpInstance._NativeSdkHelpers.sendToNative(
1431
- Constants.NativeSdkPaths.ClearCart
1432
- );
1433
- } else {
1434
- mpInstance._SessionManager.resetSessionTimer();
1435
- allProducts = mpInstance._Persistence.getAllUserProductsFromLS();
1436
-
1437
- if (
1438
- allProducts &&
1439
- allProducts[mpid] &&
1440
- allProducts[mpid].cp
1441
- ) {
1442
- allProducts[mpid].cp = [];
1443
-
1444
- allProducts[mpid].cp = [];
1445
-
1446
- mpInstance._Persistence.setCartProducts(allProducts);
1447
- }
1448
- }
1449
1335
  },
1450
1336
  /**
1451
1337
  * Returns all cart products
@@ -1455,9 +1341,14 @@ export default function Identity(mpInstance) {
1455
1341
  */
1456
1342
  getCartProducts: function() {
1457
1343
  mpInstance.Logger.warning(
1458
- 'Deprecated function Identity.getCurrentUser().getCart().getCartProducts() will be removed in future releases'
1344
+ generateDeprecationMessage(
1345
+ 'Identity.getCurrentUser().getCart().getCartProducts()',
1346
+ true,
1347
+ 'eCommerce.logProductAction()',
1348
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
1349
+ )
1459
1350
  );
1460
- return mpInstance._Persistence.getCartProducts(mpid);
1351
+ return [];
1461
1352
  },
1462
1353
  };
1463
1354
  };
@@ -36,7 +36,7 @@ import Consent, { IConsent } from './consent';
36
36
  import KitBlocker from './kitBlocking';
37
37
  import ConfigAPIClient, { IKitConfigs } from './configAPIClient';
38
38
  import IdentityAPIClient from './identityApiClient';
39
- import { isFunction, parseConfig, valueof } from './utils';
39
+ import { isFunction, parseConfig, valueof, generateDeprecationMessage } from './utils';
40
40
  import { DisabledVault, LocalStorageVault } from './vault';
41
41
  import { removeExpiredIdentityCacheDates } from './identity-utils';
42
42
  import IntegrationCapture from './integrationCapture';
@@ -706,16 +706,13 @@ export default function mParticleInstance(this: IMParticleWebSDKInstance, instan
706
706
  */
707
707
  add: function(product, logEventBoolean) {
708
708
  self.Logger.warning(
709
- 'Deprecated function eCommerce.Cart.add() will be removed in future releases'
709
+ generateDeprecationMessage(
710
+ 'eCommerce.Cart.add()',
711
+ true,
712
+ 'eCommerce.logProductAction()',
713
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
714
+ )
710
715
  );
711
- let mpid;
712
- const currentUser = self.Identity.getCurrentUser();
713
- if (currentUser) {
714
- mpid = currentUser.getMPID();
715
- }
716
- self._Identity
717
- .mParticleUserCart(mpid)
718
- .add(product, logEventBoolean);
719
716
  },
720
717
  /**
721
718
  * Removes a product from the cart
@@ -726,16 +723,13 @@ export default function mParticleInstance(this: IMParticleWebSDKInstance, instan
726
723
  */
727
724
  remove: function(product, logEventBoolean) {
728
725
  self.Logger.warning(
729
- 'Deprecated function eCommerce.Cart.remove() will be removed in future releases'
726
+ generateDeprecationMessage(
727
+ 'eCommerce.Cart.remove()',
728
+ true,
729
+ 'eCommerce.logProductAction()',
730
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
731
+ )
730
732
  );
731
- let mpid;
732
- const currentUser = self.Identity.getCurrentUser();
733
- if (currentUser) {
734
- mpid = currentUser.getMPID();
735
- }
736
- self._Identity
737
- .mParticleUserCart(mpid)
738
- .remove(product, logEventBoolean);
739
733
  },
740
734
  /**
741
735
  * Clears the cart
@@ -744,14 +738,13 @@ export default function mParticleInstance(this: IMParticleWebSDKInstance, instan
744
738
  */
745
739
  clear: function() {
746
740
  self.Logger.warning(
747
- 'Deprecated function eCommerce.Cart.clear() will be removed in future releases'
741
+ generateDeprecationMessage(
742
+ 'eCommerce.Cart.clear()',
743
+ true,
744
+ '',
745
+ 'https://docs.mparticle.com/developers/sdk/web/commerce-tracking'
746
+ )
748
747
  );
749
- let mpid;
750
- const currentUser = self.Identity.getCurrentUser();
751
- if (currentUser) {
752
- mpid = currentUser.getMPID();
753
- }
754
- self._Identity.mParticleUserCart(mpid).clear();
755
748
  },
756
749
  },
757
750
  /**
@@ -99,11 +99,8 @@ export interface IPersistence {
99
99
  useLocalStorage(): boolean;
100
100
  initializeStorage(): void;
101
101
  update(): void;
102
- storeProductsInMemory(products: Product[], mpid: MPID): void;
103
102
  storeDataInMemory(obj: IPersistenceMinified, currentMPID: MPID): void;
104
103
  determineLocalStorageAvailability(storage: Storage): boolean;
105
- getUserProductsFromLS(mpid: MPID): Product[];
106
- getAllUserProductsFromLS(): Product[];
107
104
  setLocalStorage(): void;
108
105
  getLocalStorage(): IPersistenceMinified | null;
109
106
  expireCookies(cookieName: string): void;
@@ -120,8 +117,6 @@ export interface IPersistence {
120
117
  decodePersistence(persistenceString: string): string;
121
118
  getCookieDomain(): string;
122
119
  getDomain(doc: string, locationHostname: string): string;
123
- getCartProducts(mpid: MPID): Product[];
124
- setCartProducts(allProducts: Product[]): void;
125
120
  saveUserCookieSyncDatesToPersistence(mpid: MPID, csd: CookieSyncDates): void;
126
121
  savePersistence(persistance: IPersistenceMinified): void;
127
122
  getPersistence(): IPersistenceMinified;
@@ -90,35 +90,6 @@ export default function _Persistence(mpInstance) {
90
90
  self.storeDataInMemory(cookies);
91
91
  }
92
92
 
93
- // https://go.mparticle.com/work/SQDSDKS-6048
94
- try {
95
- if (mpInstance._Store.isLocalStorageAvailable) {
96
- var encodedProducts = localStorage.getItem(
97
- mpInstance._Store.prodStorageName
98
- );
99
-
100
- if (encodedProducts) {
101
- var decodedProducts = JSON.parse(
102
- Base64.decode(encodedProducts)
103
- );
104
- }
105
- if (mpInstance._Store.mpid) {
106
- self.storeProductsInMemory(
107
- decodedProducts,
108
- mpInstance._Store.mpid
109
- );
110
- }
111
- }
112
- } catch (e) {
113
- if (mpInstance._Store.isLocalStorageAvailable) {
114
- localStorage.removeItem(mpInstance._Store.prodStorageName);
115
- }
116
- mpInstance._Store.cartProducts = [];
117
- mpInstance.Logger.error(
118
- 'Error loading products in initialization: ' + e
119
- );
120
- }
121
-
122
93
  // https://go.mparticle.com/work/SQDSDKS-6046
123
94
  // Stores all non-current user MPID information into the store
124
95
  for (var key in allData) {
@@ -158,21 +129,6 @@ export default function _Persistence(mpInstance) {
158
129
  }
159
130
  };
160
131
 
161
- this.storeProductsInMemory = function(products, mpid) {
162
- if (products) {
163
- try {
164
- mpInstance._Store.cartProducts =
165
- products[mpid] && products[mpid].cp
166
- ? products[mpid].cp
167
- : [];
168
- } catch (e) {
169
- mpInstance.Logger.error(
170
- Messages.ErrorMessages.CookieParseError
171
- );
172
- }
173
- }
174
- };
175
-
176
132
  // https://go.mparticle.com/work/SQDSDKS-6045
177
133
  this.storeDataInMemory = function(obj, currentMPID) {
178
134
  try {
@@ -275,64 +231,6 @@ export default function _Persistence(mpInstance) {
275
231
  }
276
232
  };
277
233
 
278
- this.getUserProductsFromLS = function(mpid) {
279
- if (!mpInstance._Store.isLocalStorageAvailable) {
280
- return [];
281
- }
282
-
283
- var decodedProducts,
284
- userProducts,
285
- parsedProducts,
286
- encodedProducts = localStorage.getItem(
287
- mpInstance._Store.prodStorageName
288
- );
289
- if (encodedProducts) {
290
- decodedProducts = Base64.decode(encodedProducts);
291
- }
292
- // if there is an MPID, we are retrieving the user's products, which is an array
293
- if (mpid) {
294
- try {
295
- if (decodedProducts) {
296
- parsedProducts = JSON.parse(decodedProducts);
297
- }
298
- if (
299
- decodedProducts &&
300
- parsedProducts[mpid] &&
301
- parsedProducts[mpid].cp &&
302
- Array.isArray(parsedProducts[mpid].cp)
303
- ) {
304
- userProducts = parsedProducts[mpid].cp;
305
- } else {
306
- userProducts = [];
307
- }
308
- return userProducts;
309
- } catch (e) {
310
- return [];
311
- }
312
- } else {
313
- return [];
314
- }
315
- };
316
-
317
- this.getAllUserProductsFromLS = function() {
318
- var decodedProducts,
319
- encodedProducts = localStorage.getItem(
320
- mpInstance._Store.prodStorageName
321
- ),
322
- parsedDecodedProducts;
323
- if (encodedProducts) {
324
- decodedProducts = Base64.decode(encodedProducts);
325
- }
326
- // returns an object with keys of MPID and values of array of products
327
- try {
328
- parsedDecodedProducts = JSON.parse(decodedProducts);
329
- } catch (e) {
330
- parsedDecodedProducts = {};
331
- }
332
-
333
- return parsedDecodedProducts;
334
- };
335
-
336
234
  // https://go.mparticle.com/work/SQDSDKS-6021
337
235
  this.setLocalStorage = function() {
338
236
  if (!mpInstance._Store.isLocalStorageAvailable) {
@@ -340,30 +238,9 @@ export default function _Persistence(mpInstance) {
340
238
  }
341
239
 
342
240
  var key = mpInstance._Store.storageName,
343
- allLocalStorageProducts = self.getAllUserProductsFromLS(),
344
241
  localStorageData = self.getLocalStorage() || {},
345
242
  currentUser = mpInstance.Identity.getCurrentUser(),
346
- mpid = currentUser ? currentUser.getMPID() : null,
347
- currentUserProducts = {
348
- cp: allLocalStorageProducts[mpid]
349
- ? allLocalStorageProducts[mpid].cp
350
- : [],
351
- };
352
- if (mpid) {
353
- allLocalStorageProducts = allLocalStorageProducts || {};
354
- allLocalStorageProducts[mpid] = currentUserProducts;
355
- try {
356
- window.localStorage.setItem(
357
- encodeURIComponent(mpInstance._Store.prodStorageName),
358
- Base64.encode(JSON.stringify(allLocalStorageProducts))
359
- );
360
- } catch (e) {
361
- mpInstance.Logger.error(
362
- 'Error with setting products on localStorage.'
363
- );
364
- }
365
- }
366
-
243
+ mpid = currentUser ? currentUser.getMPID() : null;
367
244
  if (!mpInstance._Store.SDKConfig.useCookieStorage) {
368
245
  localStorageData.gs = localStorageData.gs || {};
369
246
 
@@ -900,42 +777,6 @@ export default function _Persistence(mpInstance) {
900
777
  return '';
901
778
  };
902
779
 
903
- this.getCartProducts = function(mpid) {
904
- var allCartProducts,
905
- cartProductsString = localStorage.getItem(
906
- mpInstance._Store.prodStorageName
907
- );
908
- if (cartProductsString) {
909
- allCartProducts = JSON.parse(Base64.decode(cartProductsString));
910
- if (
911
- allCartProducts &&
912
- allCartProducts[mpid] &&
913
- allCartProducts[mpid].cp
914
- ) {
915
- return allCartProducts[mpid].cp;
916
- }
917
- }
918
-
919
- return [];
920
- };
921
-
922
- this.setCartProducts = function(allProducts) {
923
- if (!mpInstance._Store.isLocalStorageAvailable) {
924
- return;
925
- }
926
-
927
- try {
928
- window.localStorage.setItem(
929
- encodeURIComponent(mpInstance._Store.prodStorageName),
930
- Base64.encode(JSON.stringify(allProducts))
931
- );
932
- } catch (e) {
933
- mpInstance.Logger.error(
934
- 'Error with setting products on localStorage.'
935
- );
936
- }
937
- };
938
-
939
780
  this.saveUserCookieSyncDatesToPersistence = function(mpid, csd) {
940
781
  if (csd) {
941
782
  var persistence = self.getPersistence();
@@ -1111,7 +952,6 @@ export default function _Persistence(mpInstance) {
1111
952
  removeLocalStorage(StorageNames.localStorageName);
1112
953
  removeLocalStorage(StorageNames.localStorageNameV3);
1113
954
  removeLocalStorage(StorageNames.localStorageNameV4);
1114
- removeLocalStorage(mpInstance._Store.prodStorageName);
1115
955
  removeLocalStorage(mpInstance._Store.storageName);
1116
956
  removeLocalStorage(StorageNames.localStorageProductsV4);
1117
957
 
@@ -1119,7 +959,6 @@ export default function _Persistence(mpInstance) {
1119
959
  self.expireCookies(StorageNames.cookieNameV2);
1120
960
  self.expireCookies(StorageNames.cookieNameV3);
1121
961
  self.expireCookies(StorageNames.cookieNameV4);
1122
- self.expireCookies(mpInstance._Store.prodStorageName);
1123
962
  self.expireCookies(mpInstance._Store.storageName);
1124
963
 
1125
964
  if (mParticle._isTestEnv) {
@@ -1130,9 +969,6 @@ export default function _Persistence(mpInstance) {
1130
969
  self.expireCookies(
1131
970
  mpInstance._Helpers.createMainStorageName(testWorkspaceToken)
1132
971
  );
1133
- removeLocalStorage(
1134
- mpInstance._Helpers.createProductStorageName(testWorkspaceToken)
1135
- );
1136
972
  }
1137
973
  };
1138
974
 
@@ -319,7 +319,6 @@ export interface DataPlanConfig {
319
319
  export interface SDKHelpersApi {
320
320
  canLog?(): boolean;
321
321
  createMainStorageName?(workspaceToken: string): string;
322
- createProductStorageName?(workspaceToken: string): string;
323
322
  createServiceUrl(url: string, devToken?: string): string;
324
323
  createXHR?(cb: () => void): XMLHttpRequest;
325
324
  extend?(...args: any[]);
@@ -72,7 +72,7 @@ export default function SessionManager(
72
72
  mpInstance.Logger.warning(
73
73
  generateDeprecationMessage(
74
74
  'SessionManager.getSession()',
75
-
75
+ false,
76
76
  'SessionManager.getSessionId()'
77
77
  )
78
78
  );
package/src/store.ts CHANGED
@@ -194,7 +194,6 @@ export interface IStore {
194
194
  requireDelay: boolean;
195
195
  isLocalStorageAvailable: boolean | null;
196
196
  storageName: string | null;
197
- prodStorageName: string | null;
198
197
  activeForwarders: ConfiguredKit[];
199
198
  kits: Dictionary<MPForwarder>;
200
199
  sideloadedKits: MPForwarder[];
@@ -247,7 +246,6 @@ export default function Store(
247
246
  ) {
248
247
  const {
249
248
  createMainStorageName,
250
- createProductStorageName,
251
249
  } = mpInstance._Helpers;
252
250
 
253
251
  const { isWebviewEnabled } = mpInstance._NativeSdkHelpers;
@@ -287,7 +285,6 @@ export default function Store(
287
285
  requireDelay: true,
288
286
  isLocalStorageAvailable: null,
289
287
  storageName: null,
290
- prodStorageName: null,
291
288
  activeForwarders: [],
292
289
  kits: {},
293
290
  sideloadedKits: [],
@@ -762,7 +759,6 @@ export default function Store(
762
759
  }
763
760
  // add a new function to apply items to the store that require config to be returned
764
761
  this.storageName = createMainStorageName(workspaceToken);
765
- this.prodStorageName = createProductStorageName(workspaceToken);
766
762
 
767
763
  this.SDKConfig.requiredWebviewBridgeName =
768
764
  requiredWebviewBridgeName || workspaceToken;
package/src/utils.ts CHANGED
@@ -57,18 +57,25 @@ const findKeyInObject = (obj: any, key: string): string => {
57
57
 
58
58
  const generateDeprecationMessage = (
59
59
  methodName: string,
60
- alternateMethod: string
60
+ isDeprecated?: boolean,
61
+ alternateMethod?: string,
62
+ docsUrl?: string,
61
63
  ): string => {
62
- const messageArray: string[] = [
63
- methodName,
64
- Messages.DeprecationMessages.MethodIsDeprecatedPostfix,
65
- ];
64
+ const messageArray: string[] = [methodName];
65
+
66
+ if (isDeprecated) {
67
+ messageArray.push(Messages.DeprecationMessages.MethodHasBeenDeprecated);
68
+ } else {
69
+ messageArray.push(Messages.DeprecationMessages.MethodMarkedForDeprecationPostfix);
70
+ }
66
71
 
67
72
  if (alternateMethod) {
68
- messageArray.push(alternateMethod);
69
- messageArray.push(
70
- Messages.DeprecationMessages.MethodIsDeprecatedPostfix
71
- );
73
+ messageArray.push(Messages.DeprecationMessages.AlternativeMethodPrefix);
74
+ messageArray.push(alternateMethod + ".");
75
+ }
76
+
77
+ if (docsUrl) {
78
+ messageArray.push("See - " + docsUrl);
72
79
  }
73
80
 
74
81
  return messageArray.join(' ');