@feelflow/ffid-sdk 5.22.1 → 5.24.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/dist/{chunk-W4E7YNH5.js → chunk-7A2P3NII.js} +21 -10
- package/dist/{chunk-42Z2WZEI.cjs → chunk-D7QD57HL.cjs} +21 -10
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{ffid-client-CEJMpqRZ.d.cts → ffid-client-D0Jh4bO7.d.cts} +5 -2
- package/dist/{ffid-client-DM0ZhIDV.d.ts → ffid-client-DX2PTTFr.d.ts} +5 -2
- package/dist/{index-btouGGKr.d.cts → index-GqflEaKi.d.cts} +5 -2
- package/dist/{index-btouGGKr.d.ts → index-GqflEaKi.d.ts} +5 -2
- package/dist/index.cjs +42 -42
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +286 -8
- package/dist/server/index.d.cts +159 -3
- package/dist/server/index.d.ts +159 -3
- package/dist/server/index.js +283 -9
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1225,7 +1225,7 @@ function createNonContractMethods(deps) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
1227
|
// src/client/version-check.ts
|
|
1228
|
-
var SDK_VERSION = "5.
|
|
1228
|
+
var SDK_VERSION = "5.24.0";
|
|
1229
1229
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1230
1230
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1231
1231
|
function sdkHeaders() {
|
|
@@ -1295,8 +1295,15 @@ function createOAuthTokenMethods(deps) {
|
|
|
1295
1295
|
resolvedRedirectUri,
|
|
1296
1296
|
tokenStore,
|
|
1297
1297
|
logger,
|
|
1298
|
+
timeout,
|
|
1298
1299
|
errorCodes
|
|
1299
1300
|
} = deps;
|
|
1301
|
+
function withTimeout(init) {
|
|
1302
|
+
if (timeout !== void 0) {
|
|
1303
|
+
return { ...init, signal: AbortSignal.timeout(timeout) };
|
|
1304
|
+
}
|
|
1305
|
+
return init;
|
|
1306
|
+
}
|
|
1300
1307
|
async function exchangeCodeForTokens(code, codeVerifier, opts) {
|
|
1301
1308
|
const url = `${baseUrl}${OAUTH_TOKEN_ENDPOINT}`;
|
|
1302
1309
|
logger.debug("Exchanging code for tokens:", url);
|
|
@@ -1332,12 +1339,12 @@ function createOAuthTokenMethods(deps) {
|
|
|
1332
1339
|
}
|
|
1333
1340
|
let response;
|
|
1334
1341
|
try {
|
|
1335
|
-
response = await fetch(url, {
|
|
1342
|
+
response = await fetch(url, withTimeout({
|
|
1336
1343
|
method: "POST",
|
|
1337
1344
|
credentials: "omit",
|
|
1338
1345
|
headers: { "Content-Type": "application/x-www-form-urlencoded", ...sdkHeaders() },
|
|
1339
1346
|
body: new URLSearchParams(body).toString()
|
|
1340
|
-
});
|
|
1347
|
+
}));
|
|
1341
1348
|
} catch (error) {
|
|
1342
1349
|
logger.error("Network error during token exchange:", error);
|
|
1343
1350
|
return {
|
|
@@ -1400,7 +1407,7 @@ function createOAuthTokenMethods(deps) {
|
|
|
1400
1407
|
logger.debug("Refreshing access token:", url);
|
|
1401
1408
|
let response;
|
|
1402
1409
|
try {
|
|
1403
|
-
response = await fetch(url, {
|
|
1410
|
+
response = await fetch(url, withTimeout({
|
|
1404
1411
|
method: "POST",
|
|
1405
1412
|
credentials: "omit",
|
|
1406
1413
|
headers: { "Content-Type": "application/x-www-form-urlencoded", ...sdkHeaders() },
|
|
@@ -1409,7 +1416,7 @@ function createOAuthTokenMethods(deps) {
|
|
|
1409
1416
|
refresh_token: tokens.refreshToken,
|
|
1410
1417
|
client_id: clientId
|
|
1411
1418
|
}).toString()
|
|
1412
|
-
});
|
|
1419
|
+
}));
|
|
1413
1420
|
} catch (error) {
|
|
1414
1421
|
logger.error("Network error during token refresh:", error);
|
|
1415
1422
|
return {
|
|
@@ -1479,7 +1486,7 @@ function createOAuthTokenMethods(deps) {
|
|
|
1479
1486
|
async function revokeOAuthToken(token, tokenTypeHint) {
|
|
1480
1487
|
const url = `${baseUrl}${OAUTH_REVOKE_ENDPOINT}`;
|
|
1481
1488
|
try {
|
|
1482
|
-
const response = await fetch(url, {
|
|
1489
|
+
const response = await fetch(url, withTimeout({
|
|
1483
1490
|
method: "POST",
|
|
1484
1491
|
credentials: "omit",
|
|
1485
1492
|
headers: { "Content-Type": "application/x-www-form-urlencoded", ...sdkHeaders() },
|
|
@@ -1488,9 +1495,10 @@ function createOAuthTokenMethods(deps) {
|
|
|
1488
1495
|
client_id: clientId,
|
|
1489
1496
|
token_type_hint: tokenTypeHint
|
|
1490
1497
|
}).toString()
|
|
1491
|
-
});
|
|
1498
|
+
}));
|
|
1492
1499
|
return response.ok;
|
|
1493
|
-
} catch {
|
|
1500
|
+
} catch (err) {
|
|
1501
|
+
logger.debug("Token revoke request failed (client-side; e.g. timeout/network):", err);
|
|
1494
1502
|
return false;
|
|
1495
1503
|
}
|
|
1496
1504
|
}
|
|
@@ -3061,6 +3069,7 @@ function createFFIDClient(config) {
|
|
|
3061
3069
|
resolvedRedirectUri,
|
|
3062
3070
|
tokenStore,
|
|
3063
3071
|
logger,
|
|
3072
|
+
timeout,
|
|
3064
3073
|
errorCodes: FFID_ERROR_CODES
|
|
3065
3074
|
});
|
|
3066
3075
|
async function fetchWithAuth(endpoint, options = {}, authOverride) {
|
|
@@ -3535,6 +3544,7 @@ function FFIDProvider({
|
|
|
3535
3544
|
onError,
|
|
3536
3545
|
authMode,
|
|
3537
3546
|
clientId,
|
|
3547
|
+
timeout,
|
|
3538
3548
|
cleanCallbackUrl = true
|
|
3539
3549
|
}) {
|
|
3540
3550
|
const [user, setUser] = useState(null);
|
|
@@ -3559,9 +3569,10 @@ function FFIDProvider({
|
|
|
3559
3569
|
debug,
|
|
3560
3570
|
logger,
|
|
3561
3571
|
authMode,
|
|
3562
|
-
clientId
|
|
3572
|
+
clientId,
|
|
3573
|
+
timeout
|
|
3563
3574
|
}),
|
|
3564
|
-
[serviceCode, scope, apiBaseUrl, debug, logger, authMode, clientId]
|
|
3575
|
+
[serviceCode, scope, apiBaseUrl, debug, logger, authMode, clientId, timeout]
|
|
3565
3576
|
);
|
|
3566
3577
|
const refresh = useCallback(async () => {
|
|
3567
3578
|
client.logger.debug("Refreshing session...");
|
|
@@ -1227,7 +1227,7 @@ function createNonContractMethods(deps) {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
|
|
1229
1229
|
// src/client/version-check.ts
|
|
1230
|
-
var SDK_VERSION = "5.
|
|
1230
|
+
var SDK_VERSION = "5.24.0";
|
|
1231
1231
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1232
1232
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1233
1233
|
function sdkHeaders() {
|
|
@@ -1297,8 +1297,15 @@ function createOAuthTokenMethods(deps) {
|
|
|
1297
1297
|
resolvedRedirectUri,
|
|
1298
1298
|
tokenStore,
|
|
1299
1299
|
logger,
|
|
1300
|
+
timeout,
|
|
1300
1301
|
errorCodes
|
|
1301
1302
|
} = deps;
|
|
1303
|
+
function withTimeout(init) {
|
|
1304
|
+
if (timeout !== void 0) {
|
|
1305
|
+
return { ...init, signal: AbortSignal.timeout(timeout) };
|
|
1306
|
+
}
|
|
1307
|
+
return init;
|
|
1308
|
+
}
|
|
1302
1309
|
async function exchangeCodeForTokens(code, codeVerifier, opts) {
|
|
1303
1310
|
const url = `${baseUrl}${OAUTH_TOKEN_ENDPOINT}`;
|
|
1304
1311
|
logger.debug("Exchanging code for tokens:", url);
|
|
@@ -1334,12 +1341,12 @@ function createOAuthTokenMethods(deps) {
|
|
|
1334
1341
|
}
|
|
1335
1342
|
let response;
|
|
1336
1343
|
try {
|
|
1337
|
-
response = await fetch(url, {
|
|
1344
|
+
response = await fetch(url, withTimeout({
|
|
1338
1345
|
method: "POST",
|
|
1339
1346
|
credentials: "omit",
|
|
1340
1347
|
headers: { "Content-Type": "application/x-www-form-urlencoded", ...sdkHeaders() },
|
|
1341
1348
|
body: new URLSearchParams(body).toString()
|
|
1342
|
-
});
|
|
1349
|
+
}));
|
|
1343
1350
|
} catch (error) {
|
|
1344
1351
|
logger.error("Network error during token exchange:", error);
|
|
1345
1352
|
return {
|
|
@@ -1402,7 +1409,7 @@ function createOAuthTokenMethods(deps) {
|
|
|
1402
1409
|
logger.debug("Refreshing access token:", url);
|
|
1403
1410
|
let response;
|
|
1404
1411
|
try {
|
|
1405
|
-
response = await fetch(url, {
|
|
1412
|
+
response = await fetch(url, withTimeout({
|
|
1406
1413
|
method: "POST",
|
|
1407
1414
|
credentials: "omit",
|
|
1408
1415
|
headers: { "Content-Type": "application/x-www-form-urlencoded", ...sdkHeaders() },
|
|
@@ -1411,7 +1418,7 @@ function createOAuthTokenMethods(deps) {
|
|
|
1411
1418
|
refresh_token: tokens.refreshToken,
|
|
1412
1419
|
client_id: clientId
|
|
1413
1420
|
}).toString()
|
|
1414
|
-
});
|
|
1421
|
+
}));
|
|
1415
1422
|
} catch (error) {
|
|
1416
1423
|
logger.error("Network error during token refresh:", error);
|
|
1417
1424
|
return {
|
|
@@ -1481,7 +1488,7 @@ function createOAuthTokenMethods(deps) {
|
|
|
1481
1488
|
async function revokeOAuthToken(token, tokenTypeHint) {
|
|
1482
1489
|
const url = `${baseUrl}${OAUTH_REVOKE_ENDPOINT}`;
|
|
1483
1490
|
try {
|
|
1484
|
-
const response = await fetch(url, {
|
|
1491
|
+
const response = await fetch(url, withTimeout({
|
|
1485
1492
|
method: "POST",
|
|
1486
1493
|
credentials: "omit",
|
|
1487
1494
|
headers: { "Content-Type": "application/x-www-form-urlencoded", ...sdkHeaders() },
|
|
@@ -1490,9 +1497,10 @@ function createOAuthTokenMethods(deps) {
|
|
|
1490
1497
|
client_id: clientId,
|
|
1491
1498
|
token_type_hint: tokenTypeHint
|
|
1492
1499
|
}).toString()
|
|
1493
|
-
});
|
|
1500
|
+
}));
|
|
1494
1501
|
return response.ok;
|
|
1495
|
-
} catch {
|
|
1502
|
+
} catch (err) {
|
|
1503
|
+
logger.debug("Token revoke request failed (client-side; e.g. timeout/network):", err);
|
|
1496
1504
|
return false;
|
|
1497
1505
|
}
|
|
1498
1506
|
}
|
|
@@ -3063,6 +3071,7 @@ function createFFIDClient(config) {
|
|
|
3063
3071
|
resolvedRedirectUri,
|
|
3064
3072
|
tokenStore,
|
|
3065
3073
|
logger,
|
|
3074
|
+
timeout,
|
|
3066
3075
|
errorCodes: FFID_ERROR_CODES
|
|
3067
3076
|
});
|
|
3068
3077
|
async function fetchWithAuth(endpoint, options = {}, authOverride) {
|
|
@@ -3537,6 +3546,7 @@ function FFIDProvider({
|
|
|
3537
3546
|
onError,
|
|
3538
3547
|
authMode,
|
|
3539
3548
|
clientId,
|
|
3549
|
+
timeout,
|
|
3540
3550
|
cleanCallbackUrl = true
|
|
3541
3551
|
}) {
|
|
3542
3552
|
const [user, setUser] = react.useState(null);
|
|
@@ -3561,9 +3571,10 @@ function FFIDProvider({
|
|
|
3561
3571
|
debug,
|
|
3562
3572
|
logger,
|
|
3563
3573
|
authMode,
|
|
3564
|
-
clientId
|
|
3574
|
+
clientId,
|
|
3575
|
+
timeout
|
|
3565
3576
|
}),
|
|
3566
|
-
[serviceCode, scope, apiBaseUrl, debug, logger, authMode, clientId]
|
|
3577
|
+
[serviceCode, scope, apiBaseUrl, debug, logger, authMode, clientId, timeout]
|
|
3567
3578
|
);
|
|
3568
3579
|
const refresh = react.useCallback(async () => {
|
|
3569
3580
|
client.logger.debug("Refreshing session...");
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkD7QD57HL_cjs = require('../chunk-D7QD57HL.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDInquiryForm; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDLoginButton; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDOrganizationSwitcher; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDSubscriptionBadge; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDUserMenu; }
|
|
34
34
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { H as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-
|
|
1
|
+
export { H as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-GqflEaKi.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { H as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-
|
|
1
|
+
export { H as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a4 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-GqflEaKi.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-
|
|
1
|
+
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-7A2P3NII.js';
|
|
@@ -1600,8 +1600,11 @@ interface FFIDConfig {
|
|
|
1600
1600
|
*/
|
|
1601
1601
|
cache?: FFIDCacheConfig | undefined;
|
|
1602
1602
|
/**
|
|
1603
|
-
* Request timeout in milliseconds for FFID API calls.
|
|
1604
|
-
*
|
|
1603
|
+
* Request timeout in milliseconds for FFID API calls. Applies to server-side
|
|
1604
|
+
* token verification / introspection and, in `token` mode, to the client-side
|
|
1605
|
+
* OAuth operations (code exchange / refresh / revoke) — including via the
|
|
1606
|
+
* `FFIDProvider` `timeout` prop (#4260). On timeout the fetch is aborted and
|
|
1607
|
+
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
1605
1608
|
* @default undefined (no timeout, uses fetch default)
|
|
1606
1609
|
*/
|
|
1607
1610
|
timeout?: number | undefined;
|
|
@@ -1600,8 +1600,11 @@ interface FFIDConfig {
|
|
|
1600
1600
|
*/
|
|
1601
1601
|
cache?: FFIDCacheConfig | undefined;
|
|
1602
1602
|
/**
|
|
1603
|
-
* Request timeout in milliseconds for FFID API calls.
|
|
1604
|
-
*
|
|
1603
|
+
* Request timeout in milliseconds for FFID API calls. Applies to server-side
|
|
1604
|
+
* token verification / introspection and, in `token` mode, to the client-side
|
|
1605
|
+
* OAuth operations (code exchange / refresh / revoke) — including via the
|
|
1606
|
+
* `FFIDProvider` `timeout` prop (#4260). On timeout the fetch is aborted and
|
|
1607
|
+
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
1605
1608
|
* @default undefined (no timeout, uses fetch default)
|
|
1606
1609
|
*/
|
|
1607
1610
|
timeout?: number | undefined;
|
|
@@ -466,8 +466,11 @@ interface FFIDConfig {
|
|
|
466
466
|
*/
|
|
467
467
|
cache?: FFIDCacheConfig | undefined;
|
|
468
468
|
/**
|
|
469
|
-
* Request timeout in milliseconds for FFID API calls.
|
|
470
|
-
*
|
|
469
|
+
* Request timeout in milliseconds for FFID API calls. Applies to server-side
|
|
470
|
+
* token verification / introspection and, in `token` mode, to the client-side
|
|
471
|
+
* OAuth operations (code exchange / refresh / revoke) — including via the
|
|
472
|
+
* `FFIDProvider` `timeout` prop (#4260). On timeout the fetch is aborted and
|
|
473
|
+
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
471
474
|
* @default undefined (no timeout, uses fetch default)
|
|
472
475
|
*/
|
|
473
476
|
timeout?: number | undefined;
|
|
@@ -466,8 +466,11 @@ interface FFIDConfig {
|
|
|
466
466
|
*/
|
|
467
467
|
cache?: FFIDCacheConfig | undefined;
|
|
468
468
|
/**
|
|
469
|
-
* Request timeout in milliseconds for FFID API calls.
|
|
470
|
-
*
|
|
469
|
+
* Request timeout in milliseconds for FFID API calls. Applies to server-side
|
|
470
|
+
* token verification / introspection and, in `token` mode, to the client-side
|
|
471
|
+
* OAuth operations (code exchange / refresh / revoke) — including via the
|
|
472
|
+
* `FFIDProvider` `timeout` prop (#4260). On timeout the fetch is aborted and
|
|
473
|
+
* surfaced through the normal error path (e.g. `NETWORK_ERROR`).
|
|
471
474
|
* @default undefined (no timeout, uses fetch default)
|
|
472
475
|
*/
|
|
473
476
|
timeout?: number | undefined;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkD7QD57HL_cjs = require('./chunk-D7QD57HL.cjs');
|
|
4
4
|
var chunkH5O2CCAY_cjs = require('./chunk-H5O2CCAY.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
|
|
|
54
54
|
}
|
|
55
55
|
function useRequireActiveSubscription(options) {
|
|
56
56
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
57
|
-
const { isLoading, error } =
|
|
58
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
57
|
+
const { isLoading, error } = chunkD7QD57HL_cjs.useFFIDContext();
|
|
58
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkD7QD57HL_cjs.useSubscription();
|
|
59
59
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
60
60
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
61
61
|
react.useEffect(() => {
|
|
@@ -76,7 +76,7 @@ function useRequireActiveSubscription(options) {
|
|
|
76
76
|
}
|
|
77
77
|
function withFFIDAuth(Component, options = {}) {
|
|
78
78
|
const WrappedComponent = (props) => {
|
|
79
|
-
const { isLoading, isAuthenticated, login } =
|
|
79
|
+
const { isLoading, isAuthenticated, login } = chunkD7QD57HL_cjs.useFFIDContext();
|
|
80
80
|
const hasRedirected = react.useRef(false);
|
|
81
81
|
react.useEffect(() => {
|
|
82
82
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -105,155 +105,155 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
|
105
105
|
|
|
106
106
|
Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkD7QD57HL_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkD7QD57HL_cjs.BLOCKING_EFFECTIVE_STATUSES; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkD7QD57HL_cjs.DEFAULT_API_BASE_URL; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkD7QD57HL_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkD7QD57HL_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDAnnouncementBadge; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDAnnouncementList; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDInquiryForm; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDLoginButton; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDOrganizationSwitcher; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDProvider; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDSDKError; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDSubscriptionBadge; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkD7QD57HL_cjs.FFIDUserMenu; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkD7QD57HL_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "FFID_ERROR_CODES", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkD7QD57HL_cjs.FFID_ERROR_CODES; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkD7QD57HL_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkD7QD57HL_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "clearState", {
|
|
179
179
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkD7QD57HL_cjs.cleanupStateStorage; }
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkD7QD57HL_cjs.computeEffectiveStatusFromSession; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkD7QD57HL_cjs.createFFIDAnnouncementsClient; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
191
191
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkD7QD57HL_cjs.createFFIDClient; }
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "createTokenStore", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkD7QD57HL_cjs.createTokenStore; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkD7QD57HL_cjs.generateCodeChallenge; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkD7QD57HL_cjs.generateCodeVerifier; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "handleRedirectCallback", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkD7QD57HL_cjs.handleRedirectCallback; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "hasAccessFromUserinfo", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkD7QD57HL_cjs.hasAccessFromUserinfo; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "isBlockedFromUserinfo", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkD7QD57HL_cjs.isBlockedFromUserinfo; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkD7QD57HL_cjs.isFFIDInquiryCategorySite2026; }
|
|
221
221
|
});
|
|
222
222
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
223
223
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkD7QD57HL_cjs.normalizeRedirectUri; }
|
|
225
225
|
});
|
|
226
226
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
227
227
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkD7QD57HL_cjs.retrieveCodeVerifier; }
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(exports, "retrieveState", {
|
|
231
231
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkD7QD57HL_cjs.retrieveState; }
|
|
233
233
|
});
|
|
234
234
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
235
235
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkD7QD57HL_cjs.storeCodeVerifier; }
|
|
237
237
|
});
|
|
238
238
|
Object.defineProperty(exports, "storeState", {
|
|
239
239
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkD7QD57HL_cjs.storeState; }
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(exports, "useFFID", {
|
|
243
243
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkD7QD57HL_cjs.useFFID; }
|
|
245
245
|
});
|
|
246
246
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
247
247
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkD7QD57HL_cjs.useFFIDAnnouncements; }
|
|
249
249
|
});
|
|
250
250
|
Object.defineProperty(exports, "useSubscription", {
|
|
251
251
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkD7QD57HL_cjs.useSubscription; }
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "withSubscription", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkD7QD57HL_cjs.withSubscription; }
|
|
257
257
|
});
|
|
258
258
|
Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
|
|
259
259
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDSignOutResult, f as FFIDRedirectResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDVerifyAccessTokenOptions, m as FFIDOAuthUserInfo, n as FFIDInquiryCreateParams, o as FFIDInquiryCreateResponse, p as FFIDAuthMode, q as FFIDLogger, r as FFIDCacheAdapter, s as FFIDUser, t as FFIDOrganization, u as FFIDSubscription, v as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, w as FFIDOAuthUserInfoSubscription, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index-
|
|
2
|
-
export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, G as EFFECTIVE_SUBSCRIPTION_STATUSES, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDApiResponseMeta, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index-
|
|
1
|
+
import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDSignOutResult, f as FFIDRedirectResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDVerifyAccessTokenOptions, m as FFIDOAuthUserInfo, n as FFIDInquiryCreateParams, o as FFIDInquiryCreateResponse, p as FFIDAuthMode, q as FFIDLogger, r as FFIDCacheAdapter, s as FFIDUser, t as FFIDOrganization, u as FFIDSubscription, v as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, w as FFIDOAuthUserInfoSubscription, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index-GqflEaKi.cjs';
|
|
2
|
+
export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, G as EFFECTIVE_SUBSCRIPTION_STATUSES, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDApiResponseMeta, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index-GqflEaKi.cjs';
|
|
3
3
|
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-BJgVcJyw.cjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
@@ -1643,7 +1643,7 @@ interface FFIDProviderProps extends FFIDConfig {
|
|
|
1643
1643
|
* - Automatic session refresh
|
|
1644
1644
|
* - Token mode: automatic code exchange and token refresh
|
|
1645
1645
|
*/
|
|
1646
|
-
declare function FFIDProvider({ children, serviceCode, scope, apiBaseUrl, debug, logger, refreshInterval, onAuthStateChange, onError, authMode, clientId, cleanCallbackUrl, }: FFIDProviderProps): react_jsx_runtime.JSX.Element;
|
|
1646
|
+
declare function FFIDProvider({ children, serviceCode, scope, apiBaseUrl, debug, logger, refreshInterval, onAuthStateChange, onError, authMode, clientId, timeout, cleanCallbackUrl, }: FFIDProviderProps): react_jsx_runtime.JSX.Element;
|
|
1647
1647
|
|
|
1648
1648
|
/**
|
|
1649
1649
|
* Return type for useFFID hook
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDSignOutResult, f as FFIDRedirectResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDVerifyAccessTokenOptions, m as FFIDOAuthUserInfo, n as FFIDInquiryCreateParams, o as FFIDInquiryCreateResponse, p as FFIDAuthMode, q as FFIDLogger, r as FFIDCacheAdapter, s as FFIDUser, t as FFIDOrganization, u as FFIDSubscription, v as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, w as FFIDOAuthUserInfoSubscription, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index-
|
|
2
|
-
export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, G as EFFECTIVE_SUBSCRIPTION_STATUSES, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDApiResponseMeta, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index-
|
|
1
|
+
import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDSignOutResult, f as FFIDRedirectResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDVerifyAccessTokenOptions, m as FFIDOAuthUserInfo, n as FFIDInquiryCreateParams, o as FFIDInquiryCreateResponse, p as FFIDAuthMode, q as FFIDLogger, r as FFIDCacheAdapter, s as FFIDUser, t as FFIDOrganization, u as FFIDSubscription, v as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, w as FFIDOAuthUserInfoSubscription, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index-GqflEaKi.js';
|
|
2
|
+
export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, G as EFFECTIVE_SUBSCRIPTION_STATUSES, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDApiResponseMeta, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index-GqflEaKi.js';
|
|
3
3
|
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-BJgVcJyw.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
@@ -1643,7 +1643,7 @@ interface FFIDProviderProps extends FFIDConfig {
|
|
|
1643
1643
|
* - Automatic session refresh
|
|
1644
1644
|
* - Token mode: automatic code exchange and token refresh
|
|
1645
1645
|
*/
|
|
1646
|
-
declare function FFIDProvider({ children, serviceCode, scope, apiBaseUrl, debug, logger, refreshInterval, onAuthStateChange, onError, authMode, clientId, cleanCallbackUrl, }: FFIDProviderProps): react_jsx_runtime.JSX.Element;
|
|
1646
|
+
declare function FFIDProvider({ children, serviceCode, scope, apiBaseUrl, debug, logger, refreshInterval, onAuthStateChange, onError, authMode, clientId, timeout, cleanCallbackUrl, }: FFIDProviderProps): react_jsx_runtime.JSX.Element;
|
|
1647
1647
|
|
|
1648
1648
|
/**
|
|
1649
1649
|
* Return type for useFFID hook
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext, useSubscription } from './chunk-
|
|
2
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-
|
|
1
|
+
import { useFFIDContext, useSubscription } from './chunk-7A2P3NII.js';
|
|
2
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-7A2P3NII.js';
|
|
3
3
|
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-G7VOX64X.js';
|
|
4
4
|
import { useEffect, useRef } from 'react';
|
|
5
5
|
import { jsx, Fragment } from 'react/jsx-runtime';
|