@croct/sdk 0.9.1 → 0.11.0-alpha

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.
Files changed (122) hide show
  1. package/activeRecord.js +32 -36
  2. package/cache/fallbackCache.js +15 -32
  3. package/cache/inMemoryCache.js +9 -10
  4. package/cache/index.js +1 -1
  5. package/cache/localStorageCache.js +24 -25
  6. package/channel/beaconSocketChannel.d.ts +1 -1
  7. package/channel/beaconSocketChannel.js +49 -79
  8. package/channel/channel.d.ts +1 -1
  9. package/channel/encodedChannel.js +8 -10
  10. package/channel/guaranteedChannel.d.ts +4 -4
  11. package/channel/guaranteedChannel.js +41 -43
  12. package/channel/index.js +1 -1
  13. package/channel/queuedChannel.js +35 -64
  14. package/channel/retryChannel.d.ts +1 -1
  15. package/channel/retryChannel.js +44 -77
  16. package/channel/sandboxChannel.js +17 -18
  17. package/channel/socketChannel.d.ts +4 -4
  18. package/channel/socketChannel.js +77 -79
  19. package/cid/cachedAssigner.js +15 -27
  20. package/cid/fixedAssigner.js +5 -6
  21. package/cid/index.js +1 -1
  22. package/cid/remoteAssigner.js +23 -36
  23. package/constants.d.ts +3 -2
  24. package/constants.js +6 -5
  25. package/container.d.ts +13 -6
  26. package/container.js +152 -168
  27. package/contentFetcher.d.ts +59 -0
  28. package/contentFetcher.js +129 -0
  29. package/context.d.ts +3 -3
  30. package/context.js +36 -38
  31. package/error.js +2 -2
  32. package/evaluator.d.ts +33 -24
  33. package/evaluator.js +126 -117
  34. package/eventManager.d.ts +1 -1
  35. package/eventManager.js +14 -15
  36. package/facade/contentFetcherFacade.d.ts +27 -0
  37. package/facade/contentFetcherFacade.js +40 -0
  38. package/facade/evaluatorFacade.d.ts +13 -3
  39. package/facade/evaluatorFacade.js +57 -72
  40. package/facade/sdkFacade.d.ts +10 -3
  41. package/facade/sdkFacade.js +129 -141
  42. package/facade/sessionFacade.js +6 -7
  43. package/facade/sessionPatch.js +9 -13
  44. package/facade/trackerFacade.js +32 -38
  45. package/facade/userFacade.js +10 -11
  46. package/facade/userPatch.js +9 -13
  47. package/index.js +2 -2
  48. package/logging/consoleLogger.js +18 -35
  49. package/logging/index.js +1 -1
  50. package/logging/namespacedLogger.js +14 -15
  51. package/logging/nullLogger.js +10 -13
  52. package/namespacedStorage.js +30 -47
  53. package/package.json +13 -16
  54. package/patch.d.ts +1 -1
  55. package/queue/capacityRestrictedQueue.js +17 -18
  56. package/queue/inMemoryQueue.js +22 -28
  57. package/queue/index.js +1 -1
  58. package/queue/monitoredQueue.d.ts +2 -2
  59. package/queue/monitoredQueue.js +39 -40
  60. package/queue/persistentQueue.js +33 -38
  61. package/retry/arbitraryPolicy.js +8 -10
  62. package/retry/backoffPolicy.d.ts +1 -1
  63. package/retry/backoffPolicy.js +11 -13
  64. package/retry/index.js +1 -1
  65. package/retry/maxAttemptsPolicy.js +7 -8
  66. package/retry/neverPolicy.js +6 -9
  67. package/schema/attributeSchema.js +1 -1
  68. package/schema/contentFetcherSchemas.d.ts +2 -0
  69. package/schema/contentFetcherSchemas.js +22 -0
  70. package/schema/contentSchemas.js +1 -1
  71. package/schema/contextSchemas.js +1 -1
  72. package/schema/ecommerceSchemas.js +1 -1
  73. package/schema/evaluatorSchemas.d.ts +2 -0
  74. package/schema/{evaluationSchemas.js → evaluatorSchemas.js} +3 -3
  75. package/schema/eventSchemas.js +8 -9
  76. package/schema/index.d.ts +2 -1
  77. package/schema/index.js +3 -2
  78. package/schema/loggerSchema.js +1 -1
  79. package/schema/operationSchemas.js +8 -8
  80. package/schema/sdkFacadeSchemas.js +9 -6
  81. package/schema/sdkSchemas.js +8 -5
  82. package/schema/tokenSchema.js +5 -4
  83. package/schema/userSchema.js +2 -2
  84. package/sdk.d.ts +9 -3
  85. package/sdk.js +81 -127
  86. package/sdkEvents.d.ts +3 -3
  87. package/sourceLocation.d.ts +3 -3
  88. package/sourceLocation.js +13 -14
  89. package/tab.d.ts +5 -5
  90. package/tab.js +50 -80
  91. package/token/cachedTokenStore.js +9 -10
  92. package/token/inMemoryTokenStore.js +7 -8
  93. package/token/index.js +1 -1
  94. package/token/replicatedTokenStore.js +7 -8
  95. package/token/token.d.ts +9 -5
  96. package/token/token.js +63 -57
  97. package/tracker.d.ts +4 -4
  98. package/tracker.js +145 -122
  99. package/trackingEvents.d.ts +36 -36
  100. package/trackingEvents.js +12 -6
  101. package/transformer.js +1 -1
  102. package/utilityTypes.d.ts +2 -2
  103. package/uuid.js +9 -7
  104. package/validation/arrayType.d.ts +2 -2
  105. package/validation/arrayType.js +29 -27
  106. package/validation/booleanType.js +11 -15
  107. package/validation/functionType.js +11 -15
  108. package/validation/index.js +1 -1
  109. package/validation/jsonType.d.ts +2 -2
  110. package/validation/jsonType.js +61 -80
  111. package/validation/mixedSchema.js +4 -7
  112. package/validation/nullType.js +11 -15
  113. package/validation/numberType.d.ts +1 -1
  114. package/validation/numberType.js +23 -22
  115. package/validation/objectType.d.ts +1 -1
  116. package/validation/objectType.js +61 -73
  117. package/validation/schema.js +6 -10
  118. package/validation/stringType.d.ts +1 -1
  119. package/validation/stringType.js +36 -47
  120. package/validation/unionType.js +27 -77
  121. package/validation/violation.js +1 -2
  122. package/schema/evaluationSchemas.d.ts +0 -2
@@ -1,102 +1,102 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SocketChannel = void 0;
4
- var tslib_1 = require("tslib");
5
- var logging_1 = require("../logging");
6
- var error_1 = require("../error");
7
- var SocketChannel = /** @class */ (function () {
8
- function SocketChannel(_a) {
9
- var _b, _c, _d;
10
- var url = _a.url, logger = _a.logger, options = tslib_1.__rest(_a, ["url", "logger"]);
4
+ const logging_1 = require("../logging");
5
+ const error_1 = require("../error");
6
+ class SocketChannel {
7
+ constructor({ url, logger, ...options }) {
8
+ var _a, _b, _c;
11
9
  this.listeners = [];
12
10
  this.closed = false;
13
11
  this.url = url;
14
12
  this.logger = logger !== null && logger !== void 0 ? logger : new logging_1.NullLogger();
15
- this.options = tslib_1.__assign(tslib_1.__assign({}, options), { closeTimeout: (_b = options.closeTimeout) !== null && _b !== void 0 ? _b : 5000, connectionTimeout: (_c = options.connectionTimeout) !== null && _c !== void 0 ? _c : 10000, protocols: (_d = options.protocols) !== null && _d !== void 0 ? _d : [] });
13
+ this.options = {
14
+ ...options,
15
+ closeTimeout: (_a = options.closeTimeout) !== null && _a !== void 0 ? _a : 5000,
16
+ connectionTimeout: (_b = options.connectionTimeout) !== null && _b !== void 0 ? _b : 10000,
17
+ protocols: (_c = options.protocols) !== null && _c !== void 0 ? _c : [],
18
+ };
16
19
  }
17
- Object.defineProperty(SocketChannel.prototype, "connected", {
18
- get: function () {
19
- if (this.connection === undefined) {
20
- return Promise.resolve(false);
21
- }
22
- return this.connection.then(function () { return true; }, function () { return false; });
23
- },
24
- enumerable: false,
25
- configurable: true
26
- });
27
- SocketChannel.prototype.publish = function (message) {
28
- var _this = this;
29
- return this.connect().then(function (socket) {
20
+ get connected() {
21
+ if (this.connection === undefined) {
22
+ return Promise.resolve(false);
23
+ }
24
+ return this.connection.then(() => true, () => false);
25
+ }
26
+ publish(message) {
27
+ return this.connect().then(socket => {
30
28
  socket.send(message);
31
- _this.logger.debug('Message sent.');
29
+ this.logger.debug('Message sent.');
32
30
  });
33
- };
34
- SocketChannel.prototype.subscribe = function (listener) {
31
+ }
32
+ subscribe(listener) {
35
33
  if (!this.listeners.includes(listener)) {
36
34
  this.listeners.push(listener);
37
35
  }
38
- };
39
- SocketChannel.prototype.unsubscribe = function (listener) {
40
- var index = this.listeners.indexOf(listener);
36
+ }
37
+ unsubscribe(listener) {
38
+ const index = this.listeners.indexOf(listener);
41
39
  if (index >= 0) {
42
40
  this.listeners.splice(index, 1);
43
41
  }
44
- };
45
- SocketChannel.prototype.notify = function (message) {
46
- this.listeners.forEach(function (dispatch) { return dispatch(message); });
47
- };
48
- SocketChannel.prototype.connect = function () {
49
- var _this = this;
42
+ }
43
+ notify(message) {
44
+ this.listeners.forEach(dispatch => dispatch(message));
45
+ }
46
+ connect() {
50
47
  if (this.closed) {
51
48
  return Promise.reject(new Error('Channel has been closed.'));
52
49
  }
53
50
  if (this.connection !== undefined) {
54
- return this.connection.then(function (connection) {
55
- var state = connection.readyState;
51
+ return this.connection
52
+ .then(connection => {
53
+ const state = connection.readyState;
56
54
  if (state === WebSocket.OPEN) {
57
55
  return connection;
58
56
  }
59
57
  throw new Error('Connection lost.');
60
- }).catch(function () {
58
+ })
59
+ .catch(() => {
61
60
  // Reconnect
62
- delete _this.connection;
63
- return _this.connect();
61
+ delete this.connection;
62
+ return this.connect();
64
63
  });
65
64
  }
66
- this.connection = new Promise(function (resolve, reject) {
67
- _this.logger.debug('Connecting...');
68
- var connection = new window.WebSocket(_this.url, _this.options.protocols);
69
- if (_this.options.binaryType) {
70
- connection.binaryType = _this.options.binaryType;
65
+ this.connection = new Promise((resolve, reject) => {
66
+ this.logger.debug('Connecting...');
67
+ const connection = new window.WebSocket(this.url, this.options.protocols);
68
+ if (this.options.binaryType !== undefined) {
69
+ connection.binaryType = this.options.binaryType;
71
70
  }
72
- var abortListener = function () {
73
- var reason = 'Maximum connection timeout reached.';
74
- _this.logger.error(reason);
71
+ const abortListener = () => {
72
+ const reason = 'Maximum connection timeout reached.';
73
+ this.logger.error(reason);
75
74
  reject(new Error(reason));
76
75
  connection.close(1000, reason);
77
76
  };
78
- var abortTimer = window.setTimeout(abortListener, _this.options.connectionTimeout);
79
- var openListener = function () {
77
+ const abortTimer = window.setTimeout(abortListener, this.options.connectionTimeout);
78
+ const openListener = () => {
80
79
  window.clearTimeout(abortTimer);
81
- _this.logger.info('Connection established.');
80
+ this.logger.info('Connection established.');
82
81
  connection.removeEventListener('open', openListener);
83
82
  resolve(connection);
84
83
  };
85
- var errorListener = function () {
86
- if (!_this.closed) {
87
- _this.logger.error('Connection error.');
84
+ const errorListener = () => {
85
+ if (!this.closed) {
86
+ this.logger.error('Connection error.');
88
87
  }
89
88
  };
90
- var messageListener = function (event) {
91
- _this.logger.debug('Message received.');
92
- _this.notify(event.data);
89
+ const messageListener = (event) => {
90
+ this.logger.debug('Message received.');
91
+ this.notify(event.data);
93
92
  };
94
- var closeListener = function (event) {
93
+ const closeListener = (event) => {
94
+ var _a;
95
95
  window.clearTimeout(abortTimer);
96
- var reason = "".concat((0, error_1.formatCause)(event.reason || 'unknown'), " (code ").concat(event.code, ")");
97
- var message = "Connection has been closed, reason: ".concat(reason);
98
- if (!_this.closed) {
99
- _this.logger.info(message);
96
+ const reason = `${(0, error_1.formatCause)((_a = event.reason) !== null && _a !== void 0 ? _a : 'unknown')} (code ${event.code})`;
97
+ const message = `Connection has been closed, reason: ${reason}`;
98
+ if (!this.closed) {
99
+ this.logger.info(message);
100
100
  }
101
101
  connection.removeEventListener('open', openListener);
102
102
  connection.removeEventListener('error', errorListener);
@@ -110,37 +110,35 @@ var SocketChannel = /** @class */ (function () {
110
110
  connection.addEventListener('message', messageListener);
111
111
  });
112
112
  return this.connection;
113
- };
114
- SocketChannel.prototype.close = function () {
115
- var _this = this;
113
+ }
114
+ close() {
116
115
  this.logger.debug('Closing connection...');
117
- return new Promise(function (resolve, reject) {
118
- _this.closed = true;
119
- if (_this.connection === undefined) {
120
- _this.logger.debug('Connection is not open.');
116
+ return new Promise((resolve, reject) => {
117
+ this.closed = true;
118
+ if (this.connection === undefined) {
119
+ this.logger.debug('Connection is not open.');
121
120
  resolve();
122
121
  return;
123
122
  }
124
- _this.connection.then(function (connection) {
125
- var abortTimer;
126
- var abort = function () {
127
- _this.logger.warn('Connection could not be closed within the timeout period.');
123
+ this.connection.then((connection) => {
124
+ let abortTimer;
125
+ const abort = () => {
126
+ this.logger.warn('Connection could not be closed within the timeout period.');
128
127
  reject(new Error('Maximum close timeout reached.'));
129
128
  };
130
- var close = function () {
129
+ const close = () => {
131
130
  window.clearTimeout(abortTimer);
132
- _this.logger.info('Connection gracefully closed.');
131
+ this.logger.info('Connection gracefully closed.');
133
132
  resolve();
134
133
  };
135
134
  connection.addEventListener('close', close, { once: true });
136
135
  connection.close(1000, 'Deliberate disconnection.');
137
- abortTimer = window.setTimeout(abort, _this.options.closeTimeout);
138
- }, function () {
139
- _this.logger.info('Connection closed.');
136
+ abortTimer = window.setTimeout(abort, this.options.closeTimeout);
137
+ }, () => {
138
+ this.logger.info('Connection closed.');
140
139
  resolve();
141
140
  });
142
141
  });
143
- };
144
- return SocketChannel;
145
- }());
142
+ }
143
+ }
146
144
  exports.SocketChannel = SocketChannel;
@@ -1,35 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CachedAssigner = void 0;
4
- var tslib_1 = require("tslib");
5
- var logging_1 = require("../logging");
6
- var CachedAssigner = /** @class */ (function () {
7
- function CachedAssigner(assigner, cache, logger) {
4
+ const logging_1 = require("../logging");
5
+ class CachedAssigner {
6
+ constructor(assigner, cache, logger) {
8
7
  this.assigner = assigner;
9
8
  this.cache = cache;
10
9
  this.logger = logger !== null && logger !== void 0 ? logger : new logging_1.NullLogger();
11
10
  }
12
- CachedAssigner.prototype.assignCid = function () {
13
- return tslib_1.__awaiter(this, void 0, void 0, function () {
14
- var cid, newCid;
15
- return tslib_1.__generator(this, function (_a) {
16
- switch (_a.label) {
17
- case 0:
18
- cid = this.cache.get();
19
- if (cid !== null) {
20
- this.logger.debug('Previous CID loaded from cache');
21
- return [2 /*return*/, cid];
22
- }
23
- return [4 /*yield*/, this.assigner.assignCid()];
24
- case 1:
25
- newCid = _a.sent();
26
- this.cache.put(newCid);
27
- this.logger.debug('New CID stored into cache');
28
- return [2 /*return*/, newCid];
29
- }
30
- });
31
- });
32
- };
33
- return CachedAssigner;
34
- }());
11
+ async assignCid() {
12
+ const cid = this.cache.get();
13
+ if (cid !== null) {
14
+ this.logger.debug('Previous CID loaded from cache');
15
+ return cid;
16
+ }
17
+ const newCid = await this.assigner.assignCid();
18
+ this.cache.put(newCid);
19
+ this.logger.debug('New CID stored into cache');
20
+ return newCid;
21
+ }
22
+ }
35
23
  exports.CachedAssigner = CachedAssigner;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FixedAssigner = void 0;
4
- var FixedAssigner = /** @class */ (function () {
5
- function FixedAssigner(cid) {
4
+ class FixedAssigner {
5
+ constructor(cid) {
6
6
  this.cid = cid;
7
7
  }
8
- FixedAssigner.prototype.assignCid = function () {
8
+ assignCid() {
9
9
  return Promise.resolve(this.cid);
10
- };
11
- return FixedAssigner;
12
- }());
10
+ }
11
+ }
13
12
  exports.FixedAssigner = FixedAssigner;
package/cid/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RemoteAssigner = exports.FixedAssigner = exports.CachedAssigner = void 0;
4
- var tslib_1 = require("tslib");
4
+ const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./assigner"), exports);
6
6
  var cachedAssigner_1 = require("./cachedAssigner");
7
7
  Object.defineProperty(exports, "CachedAssigner", { enumerable: true, get: function () { return cachedAssigner_1.CachedAssigner; } });
@@ -1,47 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RemoteAssigner = void 0;
4
- var tslib_1 = require("tslib");
5
- var logging_1 = require("../logging");
6
- var error_1 = require("../error");
7
- var RemoteAssigner = /** @class */ (function () {
8
- function RemoteAssigner(endpoint, logger) {
4
+ const logging_1 = require("../logging");
5
+ const error_1 = require("../error");
6
+ class RemoteAssigner {
7
+ constructor(endpoint, logger) {
9
8
  this.endpoint = endpoint;
10
9
  this.logger = logger !== null && logger !== void 0 ? logger : new logging_1.NullLogger();
11
10
  }
12
- RemoteAssigner.prototype.assignCid = function () {
13
- var _this = this;
11
+ assignCid() {
14
12
  if (this.pending === undefined) {
15
- this.pending = this.fetchCid().finally(function () {
16
- _this.pending = undefined;
13
+ this.pending = this.fetchCid().finally(() => {
14
+ this.pending = undefined;
17
15
  });
18
16
  }
19
17
  return this.pending;
20
- };
21
- RemoteAssigner.prototype.fetchCid = function () {
22
- return tslib_1.__awaiter(this, void 0, void 0, function () {
23
- var options, response, error;
24
- return tslib_1.__generator(this, function (_a) {
25
- switch (_a.label) {
26
- case 0:
27
- options = {
28
- method: 'GET',
29
- credentials: 'include',
30
- };
31
- return [4 /*yield*/, window.fetch(this.endpoint, options)];
32
- case 1:
33
- response = _a.sent();
34
- if (!response.ok) {
35
- error = new Error("Failed to assign CID: ".concat((0, error_1.formatCause)(response.statusText)));
36
- this.logger.error(error.message);
37
- throw error;
38
- }
39
- this.logger.debug('New CID successfully assigned');
40
- return [2 /*return*/, response.text()];
41
- }
42
- });
43
- });
44
- };
45
- return RemoteAssigner;
46
- }());
18
+ }
19
+ async fetchCid() {
20
+ const options = {
21
+ method: 'GET',
22
+ credentials: 'include',
23
+ };
24
+ const response = await window.fetch(this.endpoint, options);
25
+ if (!response.ok) {
26
+ const error = new Error(`Failed to assign CID: ${(0, error_1.formatCause)(response.statusText)}`);
27
+ this.logger.error(error.message);
28
+ throw error;
29
+ }
30
+ this.logger.debug('New CID successfully assigned');
31
+ return response.text();
32
+ }
33
+ }
47
34
  exports.RemoteAssigner = RemoteAssigner;
package/constants.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ export declare const CID_ASSIGNER_ENDPOINT_URL = "<@cidAssignerEndpointUrl@>";
1
2
  export declare const TRACKER_ENDPOINT_URL = "<@trackerEndpointUrl@>";
2
3
  export declare const EVALUATION_ENDPOINT_URL = "<@evaluationEndpointUrl@>";
3
- export declare const BOOTSTRAP_ENDPOINT_URL = "<@bootstrapEndpointUrl@>";
4
- export declare const MAX_EXPRESSION_LENGTH: number;
4
+ export declare const CONTENT_ENDPOINT_URL = "<@contentEndpointUrl@>";
5
+ export declare const MAX_QUERY_LENGTH: number;
5
6
  export declare const VERSION = "<@version@>";
package/constants.js CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VERSION = exports.MAX_EXPRESSION_LENGTH = exports.BOOTSTRAP_ENDPOINT_URL = exports.EVALUATION_ENDPOINT_URL = exports.TRACKER_ENDPOINT_URL = void 0;
3
+ exports.VERSION = exports.MAX_QUERY_LENGTH = exports.CONTENT_ENDPOINT_URL = exports.EVALUATION_ENDPOINT_URL = exports.TRACKER_ENDPOINT_URL = exports.CID_ASSIGNER_ENDPOINT_URL = void 0;
4
+ exports.CID_ASSIGNER_ENDPOINT_URL = 'https://api.croct.io/client/web/bootstrap';
4
5
  exports.TRACKER_ENDPOINT_URL = 'wss://api.croct.io/client/web/connect';
5
- exports.EVALUATION_ENDPOINT_URL = 'https://api.croct.io/client/web/evaluate';
6
- exports.BOOTSTRAP_ENDPOINT_URL = 'https://api.croct.io/client/web/bootstrap';
7
- exports.MAX_EXPRESSION_LENGTH = 300;
8
- exports.VERSION = '0.9.1';
6
+ exports.EVALUATION_ENDPOINT_URL = 'https://api.croct.io';
7
+ exports.CONTENT_ENDPOINT_URL = 'https://api.croct.io';
8
+ exports.MAX_QUERY_LENGTH = 500;
9
+ exports.VERSION = '0.11.0-alpha';
package/container.d.ts CHANGED
@@ -1,22 +1,24 @@
1
1
  import { Logger } from './logging';
2
2
  import { Context, TokenScope } from './context';
3
3
  import { MonitoredQueue } from './queue';
4
- import { TokenProvider } from './token';
4
+ import { TokenStore } from './token';
5
5
  import { Tracker } from './tracker';
6
6
  import { Evaluator } from './evaluator';
7
7
  import { CidAssigner } from './cid';
8
8
  import { EventManager } from './eventManager';
9
9
  import { SdkEventMap } from './sdkEvents';
10
10
  import { UrlSanitizer } from './tab';
11
- export declare type Configuration = {
11
+ import { ContentFetcher } from './contentFetcher';
12
+ export type Configuration = {
12
13
  appId: string;
13
14
  tokenScope: TokenScope;
14
- cid?: string;
15
+ clientId?: string;
15
16
  debug: boolean;
16
17
  test: boolean;
17
18
  trackerEndpointUrl: string;
18
19
  evaluationEndpointUrl: string;
19
- bootstrapEndpointUrl: string;
20
+ contentEndpointUrl: string;
21
+ cidAssignerEndpointUrl: string;
20
22
  beaconQueueSize: number;
21
23
  logger?: Logger;
22
24
  urlSanitizer?: UrlSanitizer;
@@ -27,9 +29,11 @@ export declare type Configuration = {
27
29
  export declare class Container {
28
30
  private readonly configuration;
29
31
  private context?;
30
- private tokenProvider?;
32
+ private userTokenProvider?;
33
+ private previewTokenStore?;
31
34
  private tracker?;
32
35
  private evaluator?;
36
+ private contentFetcher?;
33
37
  private cidAssigner?;
34
38
  private beaconChannel?;
35
39
  private beaconQueue?;
@@ -39,9 +43,12 @@ export declare class Container {
39
43
  getConfiguration(): Configuration;
40
44
  getEvaluator(): Evaluator;
41
45
  private createEvaluator;
46
+ getContentFetcher(): ContentFetcher;
47
+ private createContentFetcher;
48
+ getPreviewTokenStore(): TokenStore;
42
49
  getTracker(): Tracker;
43
50
  private createTracker;
44
- getTokenProvider(): TokenProvider;
51
+ getUserTokenStore(): TokenStore;
45
52
  getContext(): Context;
46
53
  private createContext;
47
54
  private getBeaconChannel;