@micropermit/client-angular 0.2.5 → 0.2.6

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,30 @@
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
+ /** @type {?} */
1357
+ var obs = this.entryPointObs.pipe(operators.take(1));
1358
+ if (cb != null) {
1359
+ obs.subscribe(cb);
1360
+ return null;
1361
+ }
1362
+ return obs.toPromise();
1346
1363
  };
1347
1364
  /**
1348
1365
  * @param {?} other
@@ -1381,6 +1398,7 @@
1381
1398
  else {
1382
1399
  throw Error('Expected the entryPoint to contain a "permitToken" within the "__meta" field');
1383
1400
  }
1401
+ this.entryPointSubject.next(entryPoint);
1384
1402
  }
1385
1403
  };
1386
1404
  /**
@@ -1743,6 +1761,16 @@
1743
1761
  * @private
1744
1762
  */
1745
1763
  MicroClient.prototype.entryPoint;
1764
+ /**
1765
+ * @type {?}
1766
+ * @private
1767
+ */
1768
+ MicroClient.prototype.entryPointSubject;
1769
+ /**
1770
+ * @type {?}
1771
+ * @private
1772
+ */
1773
+ MicroClient.prototype.entryPointObs;
1746
1774
  /**
1747
1775
  * @type {?}
1748
1776
  * @private