@micropermit/client-angular 0.2.5 → 0.2.6-test1

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.
@@ -1296,6 +1296,8 @@
1296
1296
  var MicroClient = /** @class */ (function () {
1297
1297
  function MicroClient(httpClient) {
1298
1298
  this.httpClient = httpClient;
1299
+ this.entryPointSubject = new rxjs.Subject();
1300
+ this.entryPointObs = this.entryPointSubject.pipe(operators.shareReplay(1), operators.take(1));
1299
1301
  this.usePost = true;
1300
1302
  this.sendAsPermitTokenHeader = true;
1301
1303
  }
@@ -1334,15 +1336,28 @@
1334
1336
  this.authHeader = authHeader;
1335
1337
  };
1336
1338
  /**
1337
- * @template T
1338
1339
  * @return {?}
1339
1340
  */
1340
1341
  MicroClient.prototype.getEntryPoint = /**
1341
- * @template T
1342
1342
  * @return {?}
1343
1343
  */
1344
1344
  function () {
1345
- return (/** @type {?} */ (this.entryPoint));
1345
+ return this.entryPoint;
1346
+ };
1347
+ /**
1348
+ * @param {?=} cb
1349
+ * @return {?}
1350
+ */
1351
+ MicroClient.prototype.waitForEntryPoint = /**
1352
+ * @param {?=} cb
1353
+ * @return {?}
1354
+ */
1355
+ function (cb) {
1356
+ if (cb != null) {
1357
+ this.entryPointObs.subscribe(cb);
1358
+ return null;
1359
+ }
1360
+ return this.entryPointObs.toPromise();
1346
1361
  };
1347
1362
  /**
1348
1363
  * @param {?} other
@@ -1381,6 +1396,7 @@
1381
1396
  else {
1382
1397
  throw Error('Expected the entryPoint to contain a "permitToken" within the "__meta" field');
1383
1398
  }
1399
+ this.entryPointSubject.next(entryPoint);
1384
1400
  }
1385
1401
  };
1386
1402
  /**
@@ -1743,6 +1759,16 @@
1743
1759
  * @private
1744
1760
  */
1745
1761
  MicroClient.prototype.entryPoint;
1762
+ /**
1763
+ * @type {?}
1764
+ * @private
1765
+ */
1766
+ MicroClient.prototype.entryPointSubject;
1767
+ /**
1768
+ * @type {?}
1769
+ * @private
1770
+ */
1771
+ MicroClient.prototype.entryPointObs;
1746
1772
  /**
1747
1773
  * @type {?}
1748
1774
  * @private