@opengeoweb/api 4.21.0 → 4.22.0

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/index.umd.js DELETED
@@ -1,638 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('axios'), require('@opengeoweb/shared')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'axios', '@opengeoweb/shared'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Api = {}, global.React, global.axios, global.shared));
5
- })(this, (function (exports, React, axios, shared) { 'use strict';
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n["default"] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
- var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
29
-
30
- /*! *****************************************************************************
31
- Copyright (c) Microsoft Corporation.
32
-
33
- Permission to use, copy, modify, and/or distribute this software for any
34
- purpose with or without fee is hereby granted.
35
-
36
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
37
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
40
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
- PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */
44
-
45
- var __assign = function() {
46
- __assign = Object.assign || function __assign(t) {
47
- for (var s, i = 1, n = arguments.length; i < n; i++) {
48
- s = arguments[i];
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
50
- }
51
- return t;
52
- };
53
- return __assign.apply(this, arguments);
54
- };
55
-
56
- function __rest(s, e) {
57
- var t = {};
58
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
59
- t[p] = s[p];
60
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
61
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
62
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
63
- t[p[i]] = s[p[i]];
64
- }
65
- return t;
66
- }
67
-
68
- function __awaiter(thisArg, _arguments, P, generator) {
69
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
70
- return new (P || (P = Promise))(function (resolve, reject) {
71
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
72
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
73
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
74
- step((generator = generator.apply(thisArg, _arguments || [])).next());
75
- });
76
- }
77
-
78
- function __generator(thisArg, body) {
79
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
80
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
81
- function verb(n) { return function (v) { return step([n, v]); }; }
82
- function step(op) {
83
- if (f) throw new TypeError("Generator is already executing.");
84
- while (_) try {
85
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
86
- if (y = 0, t) op = [op[0] & 2, t.value];
87
- switch (op[0]) {
88
- case 0: case 1: t = op; break;
89
- case 4: _.label++; return { value: op[1], done: false };
90
- case 5: _.label++; y = op[1]; op = [0]; continue;
91
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
92
- default:
93
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
94
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
95
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
96
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
97
- if (t[2]) _.ops.pop();
98
- _.trys.pop(); continue;
99
- }
100
- op = body.call(thisArg, _);
101
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
102
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
103
- }
104
- }
105
-
106
- function __read(o, n) {
107
- var m = typeof Symbol === "function" && o[Symbol.iterator];
108
- if (!m) return o;
109
- var i = m.call(o), r, ar = [], e;
110
- try {
111
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
112
- }
113
- catch (error) { e = { error: error }; }
114
- finally {
115
- try {
116
- if (r && !r.done && (m = i["return"])) m.call(i);
117
- }
118
- finally { if (e) throw e.error; }
119
- }
120
- return ar;
121
- }
122
-
123
- /*
124
- Accepts a value and timeout and will debounce
125
-
126
- @param {string} value: value of element
127
- @param {timeout} number: timer
128
- @return {value: string}
129
-
130
- @example:
131
- const debouncedName = useDebounce('testing', 2000)
132
- */
133
-
134
- var useDebounce = function useDebounce(value, timeout) {
135
- var _a = __read(React__namespace.useState(value), 2),
136
- state = _a[0],
137
- setState = _a[1];
138
-
139
- React__namespace.useEffect(function () {
140
- var handler = setTimeout(function () {
141
- return setState(value);
142
- }, timeout);
143
- return function () {
144
- return clearTimeout(handler);
145
- };
146
- }, [value, timeout]);
147
- return state;
148
- };
149
-
150
- var generateRandomId = function generateRandomId() {
151
- return "-" + Math.random().toString(36).substr(2, 9);
152
- }; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
153
-
154
-
155
- var useApi = function useApi(apiCall, params) {
156
- if (params === void 0) {
157
- params = null;
158
- }
159
-
160
- var isMounted = shared.useIsMounted().isMounted;
161
-
162
- var _a = __read(React__namespace.useState(generateRandomId()), 1),
163
- id = _a[0];
164
-
165
- var _b = __read(React__namespace.useState(true), 2),
166
- isLoading = _b[0],
167
- setIsloading = _b[1];
168
-
169
- var _c = __read(React__namespace.useState(null), 2),
170
- error = _c[0],
171
- setError = _c[1];
172
-
173
- var _d = __read(React__namespace.useState(null), 2),
174
- result = _d[0],
175
- setResult = _d[1];
176
-
177
- var debouncedParams = useDebounce(JSON.stringify(params), 300);
178
-
179
- var fetchApiData = function fetchApiData(_params) {
180
- if (_params === void 0) {
181
- _params = null;
182
- }
183
-
184
- return __awaiter(void 0, void 0, void 0, function () {
185
- var response, newError_1;
186
- return __generator(this, function (_a) {
187
- switch (_a.label) {
188
- case 0:
189
- _a.trys.push([0, 2,, 3]);
190
-
191
- setIsloading(true);
192
- setError(null);
193
- return [4
194
- /*yield*/
195
- , apiCall(_params, id)];
196
-
197
- case 1:
198
- response = _a.sent();
199
-
200
- if (isMounted.current) {
201
- setResult(Array.isArray(response) ? response.map(function (d) {
202
- return d.data;
203
- }) : response.data);
204
- setIsloading(false);
205
- setError(null);
206
- }
207
-
208
- return [3
209
- /*break*/
210
- , 3];
211
-
212
- case 2:
213
- newError_1 = _a.sent();
214
-
215
- if (isMounted.current) {
216
- if (axios__default["default"].isCancel(newError_1)) {
217
- setIsloading(false);
218
- } else {
219
- setError(newError_1);
220
- setIsloading(false);
221
- }
222
- }
223
-
224
- return [3
225
- /*break*/
226
- , 3];
227
-
228
- case 3:
229
- return [2
230
- /*return*/
231
- ];
232
- }
233
- });
234
- });
235
- };
236
-
237
- React__namespace.useEffect(function () {
238
- fetchApiData(params);
239
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
240
- [debouncedParams]);
241
-
242
- var clearResults = function clearResults() {
243
- setIsloading(true);
244
- setResult(null);
245
- };
246
-
247
- return {
248
- isLoading: isLoading,
249
- error: error,
250
- result: result,
251
- clearResults: clearResults,
252
- fetchApiData: fetchApiData
253
- };
254
- };
255
-
256
- var ApiContext = /*#__PURE__*/React__namespace.createContext({
257
- api: null
258
- });
259
- var registeredApis = new Map();
260
-
261
- function registerApi(name, api) {
262
- registeredApis.set(name, api);
263
- } // eslint-disable-next-line no-unused-vars
264
-
265
- function getApi(name) {
266
- return registeredApis.get(name);
267
- }
268
- var ApiProvider = function ApiProvider(_a) {
269
- var children = _a.children,
270
- createApi = _a.createApi,
271
- name = _a.name,
272
- apiModuleProps = __rest(_a, ["children", "createApi", "name"]);
273
-
274
- var handleNewApi = React__namespace.useCallback(function () {
275
- var newApi = createApi(apiModuleProps);
276
-
277
- if (name) {
278
- registerApi(name, newApi);
279
- }
280
-
281
- return newApi; // eslint-disable-next-line react-hooks/exhaustive-deps
282
- }, [createApi, name]);
283
-
284
- var _b = __read(React__namespace.useState(handleNewApi), 2),
285
- api = _b[0],
286
- setApi = _b[1];
287
-
288
- React__namespace.useEffect(function () {
289
- setApi(handleNewApi);
290
- return function () {
291
- };
292
- }, [handleNewApi, name]);
293
- return /*#__PURE__*/React__namespace.createElement(ApiContext.Provider, {
294
- value: {
295
- api: api
296
- }
297
- }, children);
298
- };
299
- function useApiContext() {
300
- return React__namespace.useContext(ApiContext);
301
- }
302
-
303
- var DEFAULT_TIMEOUT = 15000;
304
- var KEEP_ALIVE_IN_SECONDS = 60; // Number of seconds in between intervals to check with the token request if connection is stil intact
305
-
306
- var KEEP_ALIVE_POLLER_IN_SECONDS = 10; // Number of milliseconds to check if connection is restored or to check if KEEP_ALIVE_IN_SECONDS has passed
307
-
308
- var REFRESH_TOKEN_WHEN_PCT_EXPIRED = 75; // Refresh token when 75% expired. Set to (10 / 3600) * 100 = 0.2777778% to test with 10 second interval.
309
-
310
- var DEFAULT_TOKEN_EXPIRES_IN = 3600; // Number of seconds a token expires by default
311
-
312
- var MILLISECOND_TO_SECOND = 1 / 1000;
313
- /**
314
- * Creates a Credentials object based on the axios response from the token service.
315
- *
316
- * It will calculate the expires_at attribute based on the expires_in property found in the JWT.
317
- *
318
- * @param tokenResponse Response of the tokenservice as axios response object.
319
- * @returns Credentials object.
320
- */
321
-
322
- var makeCredentialsFromTokenResponse = function makeCredentialsFromTokenResponse(tokenResponse) {
323
- var token = tokenResponse.data.body || tokenResponse.data; // eslint-disable-next-line @typescript-eslint/naming-convention
324
-
325
- var access_token = token.access_token,
326
- refresh_token = token.refresh_token,
327
- id_token = token.id_token,
328
- expires_in = token.expires_in;
329
-
330
- if (!access_token || !id_token) {
331
- throw new Error('Login failed');
332
- }
333
-
334
- var userInfoString = atob( // convert base64url specific characters before parsing as base64
335
- id_token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'));
336
- var userInfo = JSON.parse(userInfoString);
337
- var tokenExpirationInSeconds = expires_in && expires_in > 0 ? expires_in : DEFAULT_TOKEN_EXPIRES_IN; // If not set or zero in the token, assume valid for 1 hour.
338
-
339
- var pctTokenExpirationInSeconds = tokenExpirationInSeconds * (REFRESH_TOKEN_WHEN_PCT_EXPIRED / 100);
340
- var epochTimeTokenExpirationInSeconds = pctTokenExpirationInSeconds + getCurrentTimeInSeconds();
341
- var isAuthCognito = userInfo.iss.includes('cognito');
342
- var newAuth = {
343
- username: isAuthCognito ? userInfo['cognito:username'] : userInfo.email,
344
- token: access_token,
345
- refresh_token: refresh_token || '',
346
- expires_at: epochTimeTokenExpirationInSeconds,
347
- keep_session_alive_at: getCurrentTimeInSeconds() + KEEP_ALIVE_IN_SECONDS,
348
- has_connection_issue: false
349
- };
350
- return newAuth;
351
- };
352
- var refreshAccessToken = function refreshAccessToken(_a) {
353
- var auth = _a.auth,
354
- _b = _a.config,
355
- _c = _b === void 0 ? {} : _b,
356
- authTokenURL = _c.authTokenURL,
357
- authClientId = _c.authClientId,
358
- appURL = _c.appURL,
359
- _d = _a.timeout,
360
- timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d; // Refresh token request with a new axios instance
361
- // without request interceptor
362
-
363
-
364
- var tokenAxiosInstance = axios__default["default"].create({
365
- headers: {},
366
- timeout: timeout
367
- });
368
- var refreshPayload = {
369
- refresh_token: auth.refresh_token,
370
- redirect_uri: appURL + "/code",
371
- grant_type: 'refresh_token',
372
- client_id: authClientId
373
- };
374
- /* Send data in the "application/x-www-form-urlencoded" format.
375
- If only JSON is supported, use Axios' default content type ("application/x-www-form-urlencoded"). */
376
-
377
- var useDefaultContentType = authTokenURL.includes('amazonaws.com');
378
- var data = useDefaultContentType ? refreshPayload : new URLSearchParams(refreshPayload);
379
- var axiosConfig = {
380
- headers: {
381
- 'Content-Type': useDefaultContentType ? 'application/json' : 'application/x-www-form-urlencoded'
382
- }
383
- };
384
- return tokenAxiosInstance.post(authTokenURL, data, axiosConfig);
385
- };
386
- var refreshAccessTokenAndSetAuthContext = function refreshAccessTokenAndSetAuthContext(_a) {
387
- var auth = _a.auth,
388
- onSetAuth = _a.onSetAuth,
389
- config = _a.config,
390
- _b = _a.timeout,
391
- timeout = _b === void 0 ? DEFAULT_TIMEOUT : _b;
392
- return __awaiter(void 0, void 0, void 0, function () {
393
- var refreshedToken, newAuth;
394
- return __generator(this, function (_c) {
395
- switch (_c.label) {
396
- case 0:
397
- _c.trys.push([0, 2,, 3]);
398
-
399
- return [4
400
- /*yield*/
401
- , refreshAccessToken({
402
- auth: auth,
403
- config: config,
404
- timeout: timeout
405
- })];
406
-
407
- case 1:
408
- refreshedToken = _c.sent();
409
- newAuth = makeCredentialsFromTokenResponse(refreshedToken); // Cognito does not send a new refresh token, but gitlab does. Set it here into the auth context.
410
-
411
- if (!newAuth.refresh_token || newAuth.refresh_token.length === 0) {
412
- newAuth.refresh_token = auth.refresh_token;
413
- }
414
-
415
- onSetAuth(newAuth);
416
- return [3
417
- /*break*/
418
- , 3];
419
-
420
- case 2:
421
- _c.sent();
422
- onSetAuth(__assign(__assign({}, auth), {
423
- has_connection_issue: true
424
- }));
425
- return [3
426
- /*break*/
427
- , 3];
428
-
429
- case 3:
430
- return [2
431
- /*return*/
432
- ];
433
- }
434
- });
435
- });
436
- };
437
- var createApiInstance = function createApiInstance(_a) {
438
- var auth = _a.auth,
439
- onSetAuth = _a.onSetAuth,
440
- _b = _a.config,
441
- _c = _b === void 0 ? {} : _b,
442
- baseURL = _c.baseURL,
443
- authTokenURL = _c.authTokenURL,
444
- authClientId = _c.authClientId,
445
- appURL = _c.appURL,
446
- _d = _a.timeout,
447
- timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d;
448
-
449
- var axiosInstance = axios__default["default"].create({
450
- baseURL: baseURL,
451
- headers: {},
452
- timeout: timeout
453
- }); // Request interceptor for API calls done BEFORE the request is made.
454
-
455
- axiosInstance.interceptors.request.use(function (axiosConfig) {
456
- return __awaiter(void 0, void 0, void 0, function () {
457
- var timeInSecondsLeftBeforeExpiration, newConfig;
458
- return __generator(this, function (_a) {
459
- switch (_a.label) {
460
- case 0:
461
- timeInSecondsLeftBeforeExpiration = auth && auth.expires_at ? auth.expires_at - getCurrentTimeInSeconds() : 0;
462
- if (!(timeInSecondsLeftBeforeExpiration < 0)) return [3
463
- /*break*/
464
- , 2];
465
- return [4
466
- /*yield*/
467
- , refreshAccessTokenAndSetAuthContext({
468
- auth: auth,
469
- onSetAuth: onSetAuth,
470
- config: {
471
- baseURL: baseURL,
472
- authTokenURL: authTokenURL,
473
- authClientId: authClientId,
474
- appURL: appURL
475
- },
476
- timeout: timeout
477
- })];
478
-
479
- case 1:
480
- _a.sent();
481
-
482
- _a.label = 2;
483
-
484
- case 2:
485
- newConfig = __assign(__assign({}, axiosConfig), {
486
- headers: __assign({
487
- 'Content-Type': 'application/json',
488
- Authorization: "Bearer " + auth.token,
489
- Accept: 'application/json'
490
- }, axiosConfig.headers)
491
- });
492
- return [2
493
- /*return*/
494
- , newConfig];
495
- }
496
- });
497
- });
498
- }, function (error) {
499
- Promise.reject(error);
500
- }); // Response interceptor for API calls done AFTER the request is made.
501
-
502
- axiosInstance.interceptors.response.use(function (response) {
503
- return response;
504
- }, function (error) {
505
- return __awaiter(void 0, void 0, void 0, function () {
506
- var originalRequest;
507
- return __generator(this, function (_a) {
508
- switch (_a.label) {
509
- case 0:
510
- originalRequest = error.config;
511
- if (!(error.response && error.response.status && (error.response.status === 401 || error.response.status === 403) && !originalRequest.inRetry)) return [3
512
- /*break*/
513
- , 2];
514
- originalRequest.inRetry = true;
515
- return [4
516
- /*yield*/
517
- , refreshAccessTokenAndSetAuthContext({
518
- auth: auth,
519
- onSetAuth: onSetAuth,
520
- config: {
521
- baseURL: baseURL,
522
- authTokenURL: authTokenURL,
523
- authClientId: authClientId,
524
- appURL: appURL
525
- },
526
- timeout: timeout
527
- })];
528
-
529
- case 1:
530
- _a.sent();
531
-
532
- return [2
533
- /*return*/
534
- , axiosInstance(originalRequest)];
535
-
536
- case 2:
537
- return [2
538
- /*return*/
539
- , Promise.reject(error)];
540
- }
541
- });
542
- });
543
- });
544
- return axiosInstance;
545
- };
546
- var createNonAuthApiInstance = function createNonAuthApiInstance(_a) {
547
- var _b = _a.config,
548
- _c = _b === void 0 ? {} : _b,
549
- baseURL = _c.baseURL,
550
- _d = _a.timeout,
551
- timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d;
552
-
553
- var axiosInstance = axios__default["default"].create({
554
- baseURL: baseURL,
555
- headers: {},
556
- timeout: timeout
557
- }); // Request interceptor for API calls
558
-
559
- axiosInstance.interceptors.request.use(function (config) {
560
- return __awaiter(void 0, void 0, void 0, function () {
561
- var newConfig;
562
- return __generator(this, function (_a) {
563
- newConfig = __assign(__assign({}, config), {
564
- headers: __assign({
565
- 'Content-Type': 'application/json',
566
- Accept: 'application/json'
567
- }, config.headers)
568
- });
569
- return [2
570
- /*return*/
571
- , newConfig];
572
- });
573
- });
574
- }, function (error) {
575
- Promise.reject(error);
576
- });
577
- return axiosInstance;
578
- };
579
- var fakeApiRequest = function fakeApiRequest(signal) {
580
- return new Promise(function (resolve, reject) {
581
- var timer = setTimeout(function () {
582
- resolve();
583
- }, 300);
584
- signal === null || signal === void 0 ? void 0 : signal.signal.addEventListener('abort', function () {
585
- clearTimeout(timer);
586
- reject(new Error('canceled'));
587
- });
588
- });
589
- };
590
- var createFakeApiInstance = function createFakeApiInstance() {
591
- return {
592
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars,
593
- get: function get(_url, _params) {
594
- return fakeApiRequest();
595
- },
596
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars,
597
- put: function put(_url, _params) {
598
- return fakeApiRequest();
599
- },
600
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars,
601
- post: function post(_url, _params) {
602
- return fakeApiRequest();
603
- },
604
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
605
- "delete": function _delete(_url, _params) {
606
- return fakeApiRequest();
607
- },
608
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-module-boundary-types
609
- patch: function patch(_url, _params, _signal) {
610
- return fakeApiRequest(_signal);
611
- }
612
- };
613
- };
614
- var getCurrentTimeInSeconds = function getCurrentTimeInSeconds() {
615
- return Date.now() * MILLISECOND_TO_SECOND;
616
- };
617
-
618
- exports.ApiProvider = ApiProvider;
619
- exports.KEEP_ALIVE_IN_SECONDS = KEEP_ALIVE_IN_SECONDS;
620
- exports.KEEP_ALIVE_POLLER_IN_SECONDS = KEEP_ALIVE_POLLER_IN_SECONDS;
621
- exports.MILLISECOND_TO_SECOND = MILLISECOND_TO_SECOND;
622
- exports.REFRESH_TOKEN_WHEN_PCT_EXPIRED = REFRESH_TOKEN_WHEN_PCT_EXPIRED;
623
- exports.createApiInstance = createApiInstance;
624
- exports.createFakeApiInstance = createFakeApiInstance;
625
- exports.createNonAuthApiInstance = createNonAuthApiInstance;
626
- exports.fakeApiRequest = fakeApiRequest;
627
- exports.getApi = getApi;
628
- exports.getCurrentTimeInSeconds = getCurrentTimeInSeconds;
629
- exports.makeCredentialsFromTokenResponse = makeCredentialsFromTokenResponse;
630
- exports.refreshAccessToken = refreshAccessToken;
631
- exports.refreshAccessTokenAndSetAuthContext = refreshAccessTokenAndSetAuthContext;
632
- exports.useApi = useApi;
633
- exports.useApiContext = useApiContext;
634
- exports.useDebounce = useDebounce;
635
-
636
- Object.defineProperty(exports, '__esModule', { value: true });
637
-
638
- }));
File without changes
File without changes