@feelflow/ffid-sdk 5.3.1 → 5.4.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.
@@ -840,7 +840,7 @@ function createProfileMethods(deps) {
840
840
  }
841
841
 
842
842
  // src/client/version-check.ts
843
- var SDK_VERSION = "5.3.1";
843
+ var SDK_VERSION = "5.4.0";
844
844
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
845
845
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
846
846
  function sdkHeaders() {
@@ -2229,6 +2229,83 @@ function createInquiryMethods(deps) {
2229
2229
  return { create };
2230
2230
  }
2231
2231
 
2232
+ // src/subscriptions/types.ts
2233
+ var PAST_DUE_GRACE_PERIOD_DAYS = 7;
2234
+ var HOURS_PER_DAY = 24;
2235
+ var MINUTES_PER_HOUR = 60;
2236
+ var SECONDS_PER_MINUTE = 60;
2237
+ var MS_PER_SECOND2 = 1e3;
2238
+ var MS_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE * MS_PER_SECOND2;
2239
+
2240
+ // src/subscriptions/compute-effective-status.ts
2241
+ function isExpired(isoTimestamp, nowMs) {
2242
+ if (!isoTimestamp) return null;
2243
+ const parsed = Date.parse(isoTimestamp);
2244
+ if (Number.isNaN(parsed)) return null;
2245
+ return parsed < nowMs;
2246
+ }
2247
+ function computeEffectiveStatusFromSession(input, nowMs = Date.now()) {
2248
+ const { status, currentPeriodEnd, trialEnd, pastDueSince } = input;
2249
+ switch (status) {
2250
+ case "trialing": {
2251
+ const relevantEnd = trialEnd ?? currentPeriodEnd;
2252
+ const expired = isExpired(relevantEnd, nowMs);
2253
+ return expired === true ? "trial_expired" : "active";
2254
+ }
2255
+ case "active": {
2256
+ const expired = isExpired(currentPeriodEnd, nowMs);
2257
+ return expired === true ? "expired" : "active";
2258
+ }
2259
+ case "past_due": {
2260
+ const baselineIso = pastDueSince ?? currentPeriodEnd;
2261
+ if (!baselineIso) return "blocked";
2262
+ const baselineMs = Date.parse(baselineIso);
2263
+ if (Number.isNaN(baselineMs)) return "blocked";
2264
+ const graceEndMs = baselineMs + PAST_DUE_GRACE_PERIOD_DAYS * MS_PER_DAY;
2265
+ return graceEndMs > nowMs ? "past_due_grace" : "blocked";
2266
+ }
2267
+ case "pending_invoice":
2268
+ return "active";
2269
+ case "paused":
2270
+ case "incomplete":
2271
+ return "active";
2272
+ case "canceled":
2273
+ return "canceled";
2274
+ case "unpaid":
2275
+ case "incomplete_expired":
2276
+ return "blocked";
2277
+ default: {
2278
+ return "blocked";
2279
+ }
2280
+ }
2281
+ }
2282
+
2283
+ // src/subscriptions/userinfo-helpers.ts
2284
+ var ACCESS_GRANTING_EFFECTIVE_STATUSES = [
2285
+ "active",
2286
+ "past_due_grace"
2287
+ ];
2288
+ var BLOCKING_EFFECTIVE_STATUSES = [
2289
+ "blocked",
2290
+ "canceled",
2291
+ "expired",
2292
+ "trial_expired"
2293
+ ];
2294
+ function hasAccessFromUserinfo(sub) {
2295
+ const effectiveStatus = sub?.effectiveStatus;
2296
+ if (effectiveStatus === void 0 || effectiveStatus === null) {
2297
+ return false;
2298
+ }
2299
+ return ACCESS_GRANTING_EFFECTIVE_STATUSES.includes(effectiveStatus);
2300
+ }
2301
+ function isBlockedFromUserinfo(sub) {
2302
+ const effectiveStatus = sub?.effectiveStatus;
2303
+ if (effectiveStatus === void 0 || effectiveStatus === null) {
2304
+ return false;
2305
+ }
2306
+ return BLOCKING_EFFECTIVE_STATUSES.includes(effectiveStatus);
2307
+ }
2308
+
2232
2309
  // src/client/ffid-client.ts
2233
2310
  var UNAUTHORIZED_STATUS2 = 401;
2234
2311
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -2259,13 +2336,6 @@ var EXT_CHECK_ENDPOINT = "/api/v1/subscriptions/ext/check";
2259
2336
  var DEFAULT_ALLOW_GRACE = true;
2260
2337
  var DEFAULT_SERVICE_ACCESS_FAIL_POLICY = "failClosed";
2261
2338
  var SERVICE_ACCESS_DENIED_CODE = "SERVICE_ACCESS_DENIED";
2262
- var ACCESS_GRANTING_EFFECTIVE_STATUSES = ["active", "past_due_grace"];
2263
- var BLOCKING_EFFECTIVE_STATUSES = [
2264
- "blocked",
2265
- "canceled",
2266
- "expired",
2267
- "trial_expired"
2268
- ];
2269
2339
  function resolveServiceAccessDenialReason(params, allowGrace) {
2270
2340
  if (params.hasAccess) {
2271
2341
  return null;
@@ -3448,57 +3518,6 @@ function FFIDOrganizationSwitcher({
3448
3518
  ] })
3449
3519
  ] });
3450
3520
  }
3451
-
3452
- // src/subscriptions/types.ts
3453
- var PAST_DUE_GRACE_PERIOD_DAYS = 7;
3454
- var HOURS_PER_DAY = 24;
3455
- var MINUTES_PER_HOUR = 60;
3456
- var SECONDS_PER_MINUTE = 60;
3457
- var MS_PER_SECOND2 = 1e3;
3458
- var MS_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE * MS_PER_SECOND2;
3459
-
3460
- // src/subscriptions/compute-effective-status.ts
3461
- function isExpired(isoTimestamp, nowMs) {
3462
- if (!isoTimestamp) return null;
3463
- const parsed = Date.parse(isoTimestamp);
3464
- if (Number.isNaN(parsed)) return null;
3465
- return parsed < nowMs;
3466
- }
3467
- function computeEffectiveStatusFromSession(input, nowMs = Date.now()) {
3468
- const { status, currentPeriodEnd, trialEnd, pastDueSince } = input;
3469
- switch (status) {
3470
- case "trialing": {
3471
- const relevantEnd = trialEnd ?? currentPeriodEnd;
3472
- const expired = isExpired(relevantEnd, nowMs);
3473
- return expired === true ? "trial_expired" : "active";
3474
- }
3475
- case "active": {
3476
- const expired = isExpired(currentPeriodEnd, nowMs);
3477
- return expired === true ? "expired" : "active";
3478
- }
3479
- case "past_due": {
3480
- const baselineIso = pastDueSince ?? currentPeriodEnd;
3481
- if (!baselineIso) return "blocked";
3482
- const baselineMs = Date.parse(baselineIso);
3483
- if (Number.isNaN(baselineMs)) return "blocked";
3484
- const graceEndMs = baselineMs + PAST_DUE_GRACE_PERIOD_DAYS * MS_PER_DAY;
3485
- return graceEndMs > nowMs ? "past_due_grace" : "blocked";
3486
- }
3487
- case "pending_invoice":
3488
- return "active";
3489
- case "paused":
3490
- case "incomplete":
3491
- return "active";
3492
- case "canceled":
3493
- return "canceled";
3494
- case "unpaid":
3495
- case "incomplete_expired":
3496
- return "blocked";
3497
- default: {
3498
- return "blocked";
3499
- }
3500
- }
3501
- }
3502
3521
  var ACCESS_GRANTING_STATUSES = [
3503
3522
  "active",
3504
3523
  "past_due_grace"
@@ -4798,4 +4817,4 @@ function FFIDInquiryForm({
4798
4817
  );
4799
4818
  }
4800
4819
 
4801
- export { DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
4820
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
@@ -842,7 +842,7 @@ function createProfileMethods(deps) {
842
842
  }
843
843
 
844
844
  // src/client/version-check.ts
845
- var SDK_VERSION = "5.3.1";
845
+ var SDK_VERSION = "5.4.0";
846
846
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
847
847
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
848
848
  function sdkHeaders() {
@@ -2231,6 +2231,83 @@ function createInquiryMethods(deps) {
2231
2231
  return { create };
2232
2232
  }
2233
2233
 
2234
+ // src/subscriptions/types.ts
2235
+ var PAST_DUE_GRACE_PERIOD_DAYS = 7;
2236
+ var HOURS_PER_DAY = 24;
2237
+ var MINUTES_PER_HOUR = 60;
2238
+ var SECONDS_PER_MINUTE = 60;
2239
+ var MS_PER_SECOND2 = 1e3;
2240
+ var MS_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE * MS_PER_SECOND2;
2241
+
2242
+ // src/subscriptions/compute-effective-status.ts
2243
+ function isExpired(isoTimestamp, nowMs) {
2244
+ if (!isoTimestamp) return null;
2245
+ const parsed = Date.parse(isoTimestamp);
2246
+ if (Number.isNaN(parsed)) return null;
2247
+ return parsed < nowMs;
2248
+ }
2249
+ function computeEffectiveStatusFromSession(input, nowMs = Date.now()) {
2250
+ const { status, currentPeriodEnd, trialEnd, pastDueSince } = input;
2251
+ switch (status) {
2252
+ case "trialing": {
2253
+ const relevantEnd = trialEnd ?? currentPeriodEnd;
2254
+ const expired = isExpired(relevantEnd, nowMs);
2255
+ return expired === true ? "trial_expired" : "active";
2256
+ }
2257
+ case "active": {
2258
+ const expired = isExpired(currentPeriodEnd, nowMs);
2259
+ return expired === true ? "expired" : "active";
2260
+ }
2261
+ case "past_due": {
2262
+ const baselineIso = pastDueSince ?? currentPeriodEnd;
2263
+ if (!baselineIso) return "blocked";
2264
+ const baselineMs = Date.parse(baselineIso);
2265
+ if (Number.isNaN(baselineMs)) return "blocked";
2266
+ const graceEndMs = baselineMs + PAST_DUE_GRACE_PERIOD_DAYS * MS_PER_DAY;
2267
+ return graceEndMs > nowMs ? "past_due_grace" : "blocked";
2268
+ }
2269
+ case "pending_invoice":
2270
+ return "active";
2271
+ case "paused":
2272
+ case "incomplete":
2273
+ return "active";
2274
+ case "canceled":
2275
+ return "canceled";
2276
+ case "unpaid":
2277
+ case "incomplete_expired":
2278
+ return "blocked";
2279
+ default: {
2280
+ return "blocked";
2281
+ }
2282
+ }
2283
+ }
2284
+
2285
+ // src/subscriptions/userinfo-helpers.ts
2286
+ var ACCESS_GRANTING_EFFECTIVE_STATUSES = [
2287
+ "active",
2288
+ "past_due_grace"
2289
+ ];
2290
+ var BLOCKING_EFFECTIVE_STATUSES = [
2291
+ "blocked",
2292
+ "canceled",
2293
+ "expired",
2294
+ "trial_expired"
2295
+ ];
2296
+ function hasAccessFromUserinfo(sub) {
2297
+ const effectiveStatus = sub?.effectiveStatus;
2298
+ if (effectiveStatus === void 0 || effectiveStatus === null) {
2299
+ return false;
2300
+ }
2301
+ return ACCESS_GRANTING_EFFECTIVE_STATUSES.includes(effectiveStatus);
2302
+ }
2303
+ function isBlockedFromUserinfo(sub) {
2304
+ const effectiveStatus = sub?.effectiveStatus;
2305
+ if (effectiveStatus === void 0 || effectiveStatus === null) {
2306
+ return false;
2307
+ }
2308
+ return BLOCKING_EFFECTIVE_STATUSES.includes(effectiveStatus);
2309
+ }
2310
+
2234
2311
  // src/client/ffid-client.ts
2235
2312
  var UNAUTHORIZED_STATUS2 = 401;
2236
2313
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -2261,13 +2338,6 @@ var EXT_CHECK_ENDPOINT = "/api/v1/subscriptions/ext/check";
2261
2338
  var DEFAULT_ALLOW_GRACE = true;
2262
2339
  var DEFAULT_SERVICE_ACCESS_FAIL_POLICY = "failClosed";
2263
2340
  var SERVICE_ACCESS_DENIED_CODE = "SERVICE_ACCESS_DENIED";
2264
- var ACCESS_GRANTING_EFFECTIVE_STATUSES = ["active", "past_due_grace"];
2265
- var BLOCKING_EFFECTIVE_STATUSES = [
2266
- "blocked",
2267
- "canceled",
2268
- "expired",
2269
- "trial_expired"
2270
- ];
2271
2341
  function resolveServiceAccessDenialReason(params, allowGrace) {
2272
2342
  if (params.hasAccess) {
2273
2343
  return null;
@@ -3450,57 +3520,6 @@ function FFIDOrganizationSwitcher({
3450
3520
  ] })
3451
3521
  ] });
3452
3522
  }
3453
-
3454
- // src/subscriptions/types.ts
3455
- var PAST_DUE_GRACE_PERIOD_DAYS = 7;
3456
- var HOURS_PER_DAY = 24;
3457
- var MINUTES_PER_HOUR = 60;
3458
- var SECONDS_PER_MINUTE = 60;
3459
- var MS_PER_SECOND2 = 1e3;
3460
- var MS_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE * MS_PER_SECOND2;
3461
-
3462
- // src/subscriptions/compute-effective-status.ts
3463
- function isExpired(isoTimestamp, nowMs) {
3464
- if (!isoTimestamp) return null;
3465
- const parsed = Date.parse(isoTimestamp);
3466
- if (Number.isNaN(parsed)) return null;
3467
- return parsed < nowMs;
3468
- }
3469
- function computeEffectiveStatusFromSession(input, nowMs = Date.now()) {
3470
- const { status, currentPeriodEnd, trialEnd, pastDueSince } = input;
3471
- switch (status) {
3472
- case "trialing": {
3473
- const relevantEnd = trialEnd ?? currentPeriodEnd;
3474
- const expired = isExpired(relevantEnd, nowMs);
3475
- return expired === true ? "trial_expired" : "active";
3476
- }
3477
- case "active": {
3478
- const expired = isExpired(currentPeriodEnd, nowMs);
3479
- return expired === true ? "expired" : "active";
3480
- }
3481
- case "past_due": {
3482
- const baselineIso = pastDueSince ?? currentPeriodEnd;
3483
- if (!baselineIso) return "blocked";
3484
- const baselineMs = Date.parse(baselineIso);
3485
- if (Number.isNaN(baselineMs)) return "blocked";
3486
- const graceEndMs = baselineMs + PAST_DUE_GRACE_PERIOD_DAYS * MS_PER_DAY;
3487
- return graceEndMs > nowMs ? "past_due_grace" : "blocked";
3488
- }
3489
- case "pending_invoice":
3490
- return "active";
3491
- case "paused":
3492
- case "incomplete":
3493
- return "active";
3494
- case "canceled":
3495
- return "canceled";
3496
- case "unpaid":
3497
- case "incomplete_expired":
3498
- return "blocked";
3499
- default: {
3500
- return "blocked";
3501
- }
3502
- }
3503
- }
3504
3523
  var ACCESS_GRANTING_STATUSES = [
3505
3524
  "active",
3506
3525
  "past_due_grace"
@@ -4800,6 +4819,8 @@ function FFIDInquiryForm({
4800
4819
  );
4801
4820
  }
4802
4821
 
4822
+ exports.ACCESS_GRANTING_EFFECTIVE_STATUSES = ACCESS_GRANTING_EFFECTIVE_STATUSES;
4823
+ exports.BLOCKING_EFFECTIVE_STATUSES = BLOCKING_EFFECTIVE_STATUSES;
4803
4824
  exports.DEFAULT_API_BASE_URL = DEFAULT_API_BASE_URL;
4804
4825
  exports.DEFAULT_OAUTH_SCOPES = DEFAULT_OAUTH_SCOPES;
4805
4826
  exports.FFIDAnnouncementBadge = FFIDAnnouncementBadge;
@@ -4820,6 +4841,8 @@ exports.createFFIDClient = createFFIDClient;
4820
4841
  exports.createTokenStore = createTokenStore;
4821
4842
  exports.generateCodeChallenge = generateCodeChallenge;
4822
4843
  exports.generateCodeVerifier = generateCodeVerifier;
4844
+ exports.hasAccessFromUserinfo = hasAccessFromUserinfo;
4845
+ exports.isBlockedFromUserinfo = isBlockedFromUserinfo;
4823
4846
  exports.isFFIDInquiryCategorySite2026 = isFFIDInquiryCategorySite2026;
4824
4847
  exports.normalizeRedirectUri = normalizeRedirectUri;
4825
4848
  exports.retrieveCodeVerifier = retrieveCodeVerifier;
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkAAMNUM62_cjs = require('../chunk-AAMNUM62.cjs');
3
+ var chunkUOXRMTUI_cjs = require('../chunk-UOXRMTUI.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkAAMNUM62_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkUOXRMTUI_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkAAMNUM62_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkUOXRMTUI_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkAAMNUM62_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkUOXRMTUI_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkAAMNUM62_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkUOXRMTUI_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkAAMNUM62_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkUOXRMTUI_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkAAMNUM62_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkUOXRMTUI_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkAAMNUM62_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkUOXRMTUI_cjs.FFIDUserMenu; }
34
34
  });
@@ -1,3 +1,3 @@
1
- export { S as FFIDAnnouncementBadge, av as FFIDAnnouncementBadgeClassNames, aw as FFIDAnnouncementBadgeProps, T as FFIDAnnouncementList, ax as FFIDAnnouncementListClassNames, ay as FFIDAnnouncementListProps, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, ab as FFIDLoginButton, az as FFIDLoginButtonProps, ah as FFIDOrganizationSwitcher, aA as FFIDOrganizationSwitcherClassNames, aB as FFIDOrganizationSwitcherProps, am as FFIDSubscriptionBadge, aC as FFIDSubscriptionBadgeClassNames, aD as FFIDSubscriptionBadgeProps, ao as FFIDUserMenu, aE as FFIDUserMenuClassNames, aF as FFIDUserMenuProps } from '../index-DfnHXRMX.cjs';
1
+ export { T as FFIDAnnouncementBadge, av as FFIDAnnouncementBadgeClassNames, aw as FFIDAnnouncementBadgeProps, U as FFIDAnnouncementList, ax as FFIDAnnouncementListClassNames, ay as FFIDAnnouncementListProps, a1 as FFIDInquiryForm, a2 as FFIDInquiryFormCategoryItem, a3 as FFIDInquiryFormClassNames, a4 as FFIDInquiryFormLegalLayout, a5 as FFIDInquiryFormOrganization, a6 as FFIDInquiryFormPlaceholderContext, a7 as FFIDInquiryFormPrefill, a8 as FFIDInquiryFormProps, a9 as FFIDInquiryFormSubmitData, aa as FFIDInquiryFormSubmitResult, ac as FFIDLoginButton, az as FFIDLoginButtonProps, ah as FFIDOrganizationSwitcher, aA as FFIDOrganizationSwitcherClassNames, aB as FFIDOrganizationSwitcherProps, am as FFIDSubscriptionBadge, aC as FFIDSubscriptionBadgeClassNames, aD as FFIDSubscriptionBadgeProps, ao as FFIDUserMenu, aE as FFIDUserMenuClassNames, aF as FFIDUserMenuProps } from '../index-lAvUS_oz.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { S as FFIDAnnouncementBadge, av as FFIDAnnouncementBadgeClassNames, aw as FFIDAnnouncementBadgeProps, T as FFIDAnnouncementList, ax as FFIDAnnouncementListClassNames, ay as FFIDAnnouncementListProps, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, ab as FFIDLoginButton, az as FFIDLoginButtonProps, ah as FFIDOrganizationSwitcher, aA as FFIDOrganizationSwitcherClassNames, aB as FFIDOrganizationSwitcherProps, am as FFIDSubscriptionBadge, aC as FFIDSubscriptionBadgeClassNames, aD as FFIDSubscriptionBadgeProps, ao as FFIDUserMenu, aE as FFIDUserMenuClassNames, aF as FFIDUserMenuProps } from '../index-DfnHXRMX.js';
1
+ export { T as FFIDAnnouncementBadge, av as FFIDAnnouncementBadgeClassNames, aw as FFIDAnnouncementBadgeProps, U as FFIDAnnouncementList, ax as FFIDAnnouncementListClassNames, ay as FFIDAnnouncementListProps, a1 as FFIDInquiryForm, a2 as FFIDInquiryFormCategoryItem, a3 as FFIDInquiryFormClassNames, a4 as FFIDInquiryFormLegalLayout, a5 as FFIDInquiryFormOrganization, a6 as FFIDInquiryFormPlaceholderContext, a7 as FFIDInquiryFormPrefill, a8 as FFIDInquiryFormProps, a9 as FFIDInquiryFormSubmitData, aa as FFIDInquiryFormSubmitResult, ac as FFIDLoginButton, az as FFIDLoginButtonProps, ah as FFIDOrganizationSwitcher, aA as FFIDOrganizationSwitcherClassNames, aB as FFIDOrganizationSwitcherProps, am as FFIDSubscriptionBadge, aC as FFIDSubscriptionBadgeClassNames, aD as FFIDSubscriptionBadgeProps, ao as FFIDUserMenu, aE as FFIDUserMenuClassNames, aF as FFIDUserMenuProps } from '../index-lAvUS_oz.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-ARKFHB72.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-RWA4L5WT.js';
@@ -1570,4 +1570,4 @@ interface FFIDInquiryFormPlaceholderContext {
1570
1570
  }
1571
1571
  declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1572
1572
 
1573
- export { type FFIDInquiryCategorySite2026 as $, type FFIDInquiryCreateResponse as A, type FFIDAuthMode as B, type FFIDLogger as C, type FFIDCacheAdapter as D, type FFIDUser as E, type FFIDSubscriptionStatus as F, type FFIDOrganization as G, type FFIDSubscription as H, type FFIDSubscriptionContextValue as I, type EffectiveSubscriptionStatus as J, type FFIDAnnouncementsClientConfig as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsApiResponse as M, type AnnouncementListResponse as N, type FFIDAnnouncementsLogger as O, type Announcement as P, type AnnouncementStatus as Q, type AnnouncementType as R, FFIDAnnouncementBadge as S, FFIDAnnouncementList as T, type FFIDAnnouncementsError as U, type FFIDAnnouncementsErrorCode as V, type FFIDAnnouncementsServerResponse as W, type FFIDAssignableMemberRole as X, type FFIDCacheConfig as Y, type FFIDContextValue as Z, type FFIDInquiryCategory as _, type FFIDConfig as a, FFIDInquiryForm as a0, type FFIDInquiryFormCategoryItem as a1, type FFIDInquiryFormClassNames as a2, type FFIDInquiryFormLegalLayout as a3, type FFIDInquiryFormOrganization as a4, type FFIDInquiryFormPlaceholderContext as a5, type FFIDInquiryFormPrefill as a6, type FFIDInquiryFormProps as a7, type FFIDInquiryFormSubmitData as a8, type FFIDInquiryFormSubmitResult as a9, type FFIDOrganizationSwitcherClassNames as aA, type FFIDOrganizationSwitcherProps as aB, type FFIDSubscriptionBadgeClassNames as aC, type FFIDSubscriptionBadgeProps as aD, type FFIDUserMenuClassNames as aE, type FFIDUserMenuProps as aF, type FFIDJwtClaims as aa, FFIDLoginButton as ab, type FFIDMemberStatus as ac, type FFIDOAuthTokenResponse as ad, type FFIDOAuthUserInfoMemberRole as ae, type FFIDOAuthUserInfoSubscription as af, type FFIDOrganizationMember as ag, FFIDOrganizationSwitcher as ah, type FFIDRedirectErrorCode as ai, type FFIDSeatModel as aj, type FFIDServiceAccessDenialReason as ak, type FFIDServiceAccessFailPolicy as al, FFIDSubscriptionBadge as am, type FFIDTokenIntrospectionResponse as an, FFIDUserMenu as ao, FFID_INQUIRY_CATEGORIES as ap, FFID_INQUIRY_CATEGORIES_SITE_2026 as aq, type UseFFIDAnnouncementsOptions as ar, type UseFFIDAnnouncementsReturn as as, isFFIDInquiryCategorySite2026 as at, useFFIDAnnouncements as au, type FFIDAnnouncementBadgeClassNames as av, type FFIDAnnouncementBadgeProps as aw, type FFIDAnnouncementListClassNames as ax, type FFIDAnnouncementListProps as ay, type FFIDLoginButtonProps as az, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDListMembersResponse as i, type FFIDAddMemberParams as j, type FFIDAddMemberResponse as k, type FFIDAddMemberRequest as l, type FFIDMemberRole as m, type FFIDUpdateMemberRoleResponse as n, type FFIDRemoveMemberResponse as o, type FFIDProfileCallOptions as p, type FFIDUserProfile as q, type FFIDUpdateUserProfileRequest as r, type FFIDAnalyticsConfig as s, type FFIDCreateCheckoutParams as t, type FFIDCheckoutSessionResponse as u, type FFIDCreatePortalParams as v, type FFIDPortalSessionResponse as w, type FFIDVerifyAccessTokenOptions as x, type FFIDOAuthUserInfo as y, type FFIDInquiryCreateParams as z };
1573
+ export { type FFIDInquiryCategory as $, type FFIDInquiryCreateResponse as A, type FFIDAuthMode as B, type FFIDLogger as C, type FFIDCacheAdapter as D, type FFIDUser as E, type FFIDSubscriptionStatus as F, type FFIDOrganization as G, type FFIDSubscription as H, type FFIDSubscriptionContextValue as I, type EffectiveSubscriptionStatus as J, type FFIDOAuthUserInfoSubscription as K, type FFIDAnnouncementsClientConfig as L, type ListAnnouncementsOptions as M, type FFIDAnnouncementsApiResponse as N, type AnnouncementListResponse as O, type FFIDAnnouncementsLogger as P, type Announcement as Q, type AnnouncementStatus as R, type AnnouncementType as S, FFIDAnnouncementBadge as T, FFIDAnnouncementList as U, type FFIDAnnouncementsError as V, type FFIDAnnouncementsErrorCode as W, type FFIDAnnouncementsServerResponse as X, type FFIDAssignableMemberRole as Y, type FFIDCacheConfig as Z, type FFIDContextValue as _, type FFIDConfig as a, type FFIDInquiryCategorySite2026 as a0, FFIDInquiryForm as a1, type FFIDInquiryFormCategoryItem as a2, type FFIDInquiryFormClassNames as a3, type FFIDInquiryFormLegalLayout as a4, type FFIDInquiryFormOrganization as a5, type FFIDInquiryFormPlaceholderContext as a6, type FFIDInquiryFormPrefill as a7, type FFIDInquiryFormProps as a8, type FFIDInquiryFormSubmitData as a9, type FFIDOrganizationSwitcherClassNames as aA, type FFIDOrganizationSwitcherProps as aB, type FFIDSubscriptionBadgeClassNames as aC, type FFIDSubscriptionBadgeProps as aD, type FFIDUserMenuClassNames as aE, type FFIDUserMenuProps as aF, type FFIDInquiryFormSubmitResult as aa, type FFIDJwtClaims as ab, FFIDLoginButton as ac, type FFIDMemberStatus as ad, type FFIDOAuthTokenResponse as ae, type FFIDOAuthUserInfoMemberRole as af, type FFIDOrganizationMember as ag, FFIDOrganizationSwitcher as ah, type FFIDRedirectErrorCode as ai, type FFIDSeatModel as aj, type FFIDServiceAccessDenialReason as ak, type FFIDServiceAccessFailPolicy as al, FFIDSubscriptionBadge as am, type FFIDTokenIntrospectionResponse as an, FFIDUserMenu as ao, FFID_INQUIRY_CATEGORIES as ap, FFID_INQUIRY_CATEGORIES_SITE_2026 as aq, type UseFFIDAnnouncementsOptions as ar, type UseFFIDAnnouncementsReturn as as, isFFIDInquiryCategorySite2026 as at, useFFIDAnnouncements as au, type FFIDAnnouncementBadgeClassNames as av, type FFIDAnnouncementBadgeProps as aw, type FFIDAnnouncementListClassNames as ax, type FFIDAnnouncementListProps as ay, type FFIDLoginButtonProps as az, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDListMembersResponse as i, type FFIDAddMemberParams as j, type FFIDAddMemberResponse as k, type FFIDAddMemberRequest as l, type FFIDMemberRole as m, type FFIDUpdateMemberRoleResponse as n, type FFIDRemoveMemberResponse as o, type FFIDProfileCallOptions as p, type FFIDUserProfile as q, type FFIDUpdateUserProfileRequest as r, type FFIDAnalyticsConfig as s, type FFIDCreateCheckoutParams as t, type FFIDCheckoutSessionResponse as u, type FFIDCreatePortalParams as v, type FFIDPortalSessionResponse as w, type FFIDVerifyAccessTokenOptions as x, type FFIDOAuthUserInfo as y, type FFIDInquiryCreateParams as z };
@@ -1570,4 +1570,4 @@ interface FFIDInquiryFormPlaceholderContext {
1570
1570
  }
1571
1571
  declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1572
1572
 
1573
- export { type FFIDInquiryCategorySite2026 as $, type FFIDInquiryCreateResponse as A, type FFIDAuthMode as B, type FFIDLogger as C, type FFIDCacheAdapter as D, type FFIDUser as E, type FFIDSubscriptionStatus as F, type FFIDOrganization as G, type FFIDSubscription as H, type FFIDSubscriptionContextValue as I, type EffectiveSubscriptionStatus as J, type FFIDAnnouncementsClientConfig as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsApiResponse as M, type AnnouncementListResponse as N, type FFIDAnnouncementsLogger as O, type Announcement as P, type AnnouncementStatus as Q, type AnnouncementType as R, FFIDAnnouncementBadge as S, FFIDAnnouncementList as T, type FFIDAnnouncementsError as U, type FFIDAnnouncementsErrorCode as V, type FFIDAnnouncementsServerResponse as W, type FFIDAssignableMemberRole as X, type FFIDCacheConfig as Y, type FFIDContextValue as Z, type FFIDInquiryCategory as _, type FFIDConfig as a, FFIDInquiryForm as a0, type FFIDInquiryFormCategoryItem as a1, type FFIDInquiryFormClassNames as a2, type FFIDInquiryFormLegalLayout as a3, type FFIDInquiryFormOrganization as a4, type FFIDInquiryFormPlaceholderContext as a5, type FFIDInquiryFormPrefill as a6, type FFIDInquiryFormProps as a7, type FFIDInquiryFormSubmitData as a8, type FFIDInquiryFormSubmitResult as a9, type FFIDOrganizationSwitcherClassNames as aA, type FFIDOrganizationSwitcherProps as aB, type FFIDSubscriptionBadgeClassNames as aC, type FFIDSubscriptionBadgeProps as aD, type FFIDUserMenuClassNames as aE, type FFIDUserMenuProps as aF, type FFIDJwtClaims as aa, FFIDLoginButton as ab, type FFIDMemberStatus as ac, type FFIDOAuthTokenResponse as ad, type FFIDOAuthUserInfoMemberRole as ae, type FFIDOAuthUserInfoSubscription as af, type FFIDOrganizationMember as ag, FFIDOrganizationSwitcher as ah, type FFIDRedirectErrorCode as ai, type FFIDSeatModel as aj, type FFIDServiceAccessDenialReason as ak, type FFIDServiceAccessFailPolicy as al, FFIDSubscriptionBadge as am, type FFIDTokenIntrospectionResponse as an, FFIDUserMenu as ao, FFID_INQUIRY_CATEGORIES as ap, FFID_INQUIRY_CATEGORIES_SITE_2026 as aq, type UseFFIDAnnouncementsOptions as ar, type UseFFIDAnnouncementsReturn as as, isFFIDInquiryCategorySite2026 as at, useFFIDAnnouncements as au, type FFIDAnnouncementBadgeClassNames as av, type FFIDAnnouncementBadgeProps as aw, type FFIDAnnouncementListClassNames as ax, type FFIDAnnouncementListProps as ay, type FFIDLoginButtonProps as az, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDListMembersResponse as i, type FFIDAddMemberParams as j, type FFIDAddMemberResponse as k, type FFIDAddMemberRequest as l, type FFIDMemberRole as m, type FFIDUpdateMemberRoleResponse as n, type FFIDRemoveMemberResponse as o, type FFIDProfileCallOptions as p, type FFIDUserProfile as q, type FFIDUpdateUserProfileRequest as r, type FFIDAnalyticsConfig as s, type FFIDCreateCheckoutParams as t, type FFIDCheckoutSessionResponse as u, type FFIDCreatePortalParams as v, type FFIDPortalSessionResponse as w, type FFIDVerifyAccessTokenOptions as x, type FFIDOAuthUserInfo as y, type FFIDInquiryCreateParams as z };
1573
+ export { type FFIDInquiryCategory as $, type FFIDInquiryCreateResponse as A, type FFIDAuthMode as B, type FFIDLogger as C, type FFIDCacheAdapter as D, type FFIDUser as E, type FFIDSubscriptionStatus as F, type FFIDOrganization as G, type FFIDSubscription as H, type FFIDSubscriptionContextValue as I, type EffectiveSubscriptionStatus as J, type FFIDOAuthUserInfoSubscription as K, type FFIDAnnouncementsClientConfig as L, type ListAnnouncementsOptions as M, type FFIDAnnouncementsApiResponse as N, type AnnouncementListResponse as O, type FFIDAnnouncementsLogger as P, type Announcement as Q, type AnnouncementStatus as R, type AnnouncementType as S, FFIDAnnouncementBadge as T, FFIDAnnouncementList as U, type FFIDAnnouncementsError as V, type FFIDAnnouncementsErrorCode as W, type FFIDAnnouncementsServerResponse as X, type FFIDAssignableMemberRole as Y, type FFIDCacheConfig as Z, type FFIDContextValue as _, type FFIDConfig as a, type FFIDInquiryCategorySite2026 as a0, FFIDInquiryForm as a1, type FFIDInquiryFormCategoryItem as a2, type FFIDInquiryFormClassNames as a3, type FFIDInquiryFormLegalLayout as a4, type FFIDInquiryFormOrganization as a5, type FFIDInquiryFormPlaceholderContext as a6, type FFIDInquiryFormPrefill as a7, type FFIDInquiryFormProps as a8, type FFIDInquiryFormSubmitData as a9, type FFIDOrganizationSwitcherClassNames as aA, type FFIDOrganizationSwitcherProps as aB, type FFIDSubscriptionBadgeClassNames as aC, type FFIDSubscriptionBadgeProps as aD, type FFIDUserMenuClassNames as aE, type FFIDUserMenuProps as aF, type FFIDInquiryFormSubmitResult as aa, type FFIDJwtClaims as ab, FFIDLoginButton as ac, type FFIDMemberStatus as ad, type FFIDOAuthTokenResponse as ae, type FFIDOAuthUserInfoMemberRole as af, type FFIDOrganizationMember as ag, FFIDOrganizationSwitcher as ah, type FFIDRedirectErrorCode as ai, type FFIDSeatModel as aj, type FFIDServiceAccessDenialReason as ak, type FFIDServiceAccessFailPolicy as al, FFIDSubscriptionBadge as am, type FFIDTokenIntrospectionResponse as an, FFIDUserMenu as ao, FFID_INQUIRY_CATEGORIES as ap, FFID_INQUIRY_CATEGORIES_SITE_2026 as aq, type UseFFIDAnnouncementsOptions as ar, type UseFFIDAnnouncementsReturn as as, isFFIDInquiryCategorySite2026 as at, useFFIDAnnouncements as au, type FFIDAnnouncementBadgeClassNames as av, type FFIDAnnouncementBadgeProps as aw, type FFIDAnnouncementListClassNames as ax, type FFIDAnnouncementListProps as ay, type FFIDLoginButtonProps as az, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDCheckServiceAccessParams as g, type FFIDServiceAccessDecision as h, type FFIDListMembersResponse as i, type FFIDAddMemberParams as j, type FFIDAddMemberResponse as k, type FFIDAddMemberRequest as l, type FFIDMemberRole as m, type FFIDUpdateMemberRoleResponse as n, type FFIDRemoveMemberResponse as o, type FFIDProfileCallOptions as p, type FFIDUserProfile as q, type FFIDUpdateUserProfileRequest as r, type FFIDAnalyticsConfig as s, type FFIDCreateCheckoutParams as t, type FFIDCheckoutSessionResponse as u, type FFIDCreatePortalParams as v, type FFIDPortalSessionResponse as w, type FFIDVerifyAccessTokenOptions as x, type FFIDOAuthUserInfo as y, type FFIDInquiryCreateParams as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkAAMNUM62_cjs = require('./chunk-AAMNUM62.cjs');
3
+ var chunkUOXRMTUI_cjs = require('./chunk-UOXRMTUI.cjs');
4
4
  var chunkQZN4WZCV_cjs = require('./chunk-QZN4WZCV.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 } = chunkAAMNUM62_cjs.useFFIDContext();
58
- const { effectiveStatus, isBlocked, isGrace } = chunkAAMNUM62_cjs.useSubscription();
57
+ const { isLoading, error } = chunkUOXRMTUI_cjs.useFFIDContext();
58
+ const { effectiveStatus, isBlocked, isGrace } = chunkUOXRMTUI_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 } = chunkAAMNUM62_cjs.useFFIDContext();
79
+ const { isLoading, isAuthenticated, login } = chunkUOXRMTUI_cjs.useFFIDContext();
80
80
  const hasRedirected = react.useRef(false);
81
81
  react.useEffect(() => {
82
82
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -103,117 +103,133 @@ function withFFIDAuth(Component, options = {}) {
103
103
  var FFID_NEWSLETTER_TYPES = ["inquiry_followup", "general"];
104
104
  var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
105
105
 
106
+ Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
107
+ enumerable: true,
108
+ get: function () { return chunkUOXRMTUI_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
109
+ });
110
+ Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
111
+ enumerable: true,
112
+ get: function () { return chunkUOXRMTUI_cjs.BLOCKING_EFFECTIVE_STATUSES; }
113
+ });
106
114
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
107
115
  enumerable: true,
108
- get: function () { return chunkAAMNUM62_cjs.DEFAULT_API_BASE_URL; }
116
+ get: function () { return chunkUOXRMTUI_cjs.DEFAULT_API_BASE_URL; }
109
117
  });
110
118
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
111
119
  enumerable: true,
112
- get: function () { return chunkAAMNUM62_cjs.DEFAULT_OAUTH_SCOPES; }
120
+ get: function () { return chunkUOXRMTUI_cjs.DEFAULT_OAUTH_SCOPES; }
113
121
  });
114
122
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
115
123
  enumerable: true,
116
- get: function () { return chunkAAMNUM62_cjs.FFIDAnnouncementBadge; }
124
+ get: function () { return chunkUOXRMTUI_cjs.FFIDAnnouncementBadge; }
117
125
  });
118
126
  Object.defineProperty(exports, "FFIDAnnouncementList", {
119
127
  enumerable: true,
120
- get: function () { return chunkAAMNUM62_cjs.FFIDAnnouncementList; }
128
+ get: function () { return chunkUOXRMTUI_cjs.FFIDAnnouncementList; }
121
129
  });
122
130
  Object.defineProperty(exports, "FFIDInquiryForm", {
123
131
  enumerable: true,
124
- get: function () { return chunkAAMNUM62_cjs.FFIDInquiryForm; }
132
+ get: function () { return chunkUOXRMTUI_cjs.FFIDInquiryForm; }
125
133
  });
126
134
  Object.defineProperty(exports, "FFIDLoginButton", {
127
135
  enumerable: true,
128
- get: function () { return chunkAAMNUM62_cjs.FFIDLoginButton; }
136
+ get: function () { return chunkUOXRMTUI_cjs.FFIDLoginButton; }
129
137
  });
130
138
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
131
139
  enumerable: true,
132
- get: function () { return chunkAAMNUM62_cjs.FFIDOrganizationSwitcher; }
140
+ get: function () { return chunkUOXRMTUI_cjs.FFIDOrganizationSwitcher; }
133
141
  });
134
142
  Object.defineProperty(exports, "FFIDProvider", {
135
143
  enumerable: true,
136
- get: function () { return chunkAAMNUM62_cjs.FFIDProvider; }
144
+ get: function () { return chunkUOXRMTUI_cjs.FFIDProvider; }
137
145
  });
138
146
  Object.defineProperty(exports, "FFIDSDKError", {
139
147
  enumerable: true,
140
- get: function () { return chunkAAMNUM62_cjs.FFIDSDKError; }
148
+ get: function () { return chunkUOXRMTUI_cjs.FFIDSDKError; }
141
149
  });
142
150
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
143
151
  enumerable: true,
144
- get: function () { return chunkAAMNUM62_cjs.FFIDSubscriptionBadge; }
152
+ get: function () { return chunkUOXRMTUI_cjs.FFIDSubscriptionBadge; }
145
153
  });
146
154
  Object.defineProperty(exports, "FFIDUserMenu", {
147
155
  enumerable: true,
148
- get: function () { return chunkAAMNUM62_cjs.FFIDUserMenu; }
156
+ get: function () { return chunkUOXRMTUI_cjs.FFIDUserMenu; }
149
157
  });
150
158
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
151
159
  enumerable: true,
152
- get: function () { return chunkAAMNUM62_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
160
+ get: function () { return chunkUOXRMTUI_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
153
161
  });
154
162
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
155
163
  enumerable: true,
156
- get: function () { return chunkAAMNUM62_cjs.FFID_INQUIRY_CATEGORIES; }
164
+ get: function () { return chunkUOXRMTUI_cjs.FFID_INQUIRY_CATEGORIES; }
157
165
  });
158
166
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
159
167
  enumerable: true,
160
- get: function () { return chunkAAMNUM62_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
168
+ get: function () { return chunkUOXRMTUI_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
161
169
  });
162
170
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
163
171
  enumerable: true,
164
- get: function () { return chunkAAMNUM62_cjs.computeEffectiveStatusFromSession; }
172
+ get: function () { return chunkUOXRMTUI_cjs.computeEffectiveStatusFromSession; }
165
173
  });
166
174
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
167
175
  enumerable: true,
168
- get: function () { return chunkAAMNUM62_cjs.createFFIDAnnouncementsClient; }
176
+ get: function () { return chunkUOXRMTUI_cjs.createFFIDAnnouncementsClient; }
169
177
  });
170
178
  Object.defineProperty(exports, "createFFIDClient", {
171
179
  enumerable: true,
172
- get: function () { return chunkAAMNUM62_cjs.createFFIDClient; }
180
+ get: function () { return chunkUOXRMTUI_cjs.createFFIDClient; }
173
181
  });
174
182
  Object.defineProperty(exports, "createTokenStore", {
175
183
  enumerable: true,
176
- get: function () { return chunkAAMNUM62_cjs.createTokenStore; }
184
+ get: function () { return chunkUOXRMTUI_cjs.createTokenStore; }
177
185
  });
178
186
  Object.defineProperty(exports, "generateCodeChallenge", {
179
187
  enumerable: true,
180
- get: function () { return chunkAAMNUM62_cjs.generateCodeChallenge; }
188
+ get: function () { return chunkUOXRMTUI_cjs.generateCodeChallenge; }
181
189
  });
182
190
  Object.defineProperty(exports, "generateCodeVerifier", {
183
191
  enumerable: true,
184
- get: function () { return chunkAAMNUM62_cjs.generateCodeVerifier; }
192
+ get: function () { return chunkUOXRMTUI_cjs.generateCodeVerifier; }
193
+ });
194
+ Object.defineProperty(exports, "hasAccessFromUserinfo", {
195
+ enumerable: true,
196
+ get: function () { return chunkUOXRMTUI_cjs.hasAccessFromUserinfo; }
197
+ });
198
+ Object.defineProperty(exports, "isBlockedFromUserinfo", {
199
+ enumerable: true,
200
+ get: function () { return chunkUOXRMTUI_cjs.isBlockedFromUserinfo; }
185
201
  });
186
202
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
187
203
  enumerable: true,
188
- get: function () { return chunkAAMNUM62_cjs.isFFIDInquiryCategorySite2026; }
204
+ get: function () { return chunkUOXRMTUI_cjs.isFFIDInquiryCategorySite2026; }
189
205
  });
190
206
  Object.defineProperty(exports, "normalizeRedirectUri", {
191
207
  enumerable: true,
192
- get: function () { return chunkAAMNUM62_cjs.normalizeRedirectUri; }
208
+ get: function () { return chunkUOXRMTUI_cjs.normalizeRedirectUri; }
193
209
  });
194
210
  Object.defineProperty(exports, "retrieveCodeVerifier", {
195
211
  enumerable: true,
196
- get: function () { return chunkAAMNUM62_cjs.retrieveCodeVerifier; }
212
+ get: function () { return chunkUOXRMTUI_cjs.retrieveCodeVerifier; }
197
213
  });
198
214
  Object.defineProperty(exports, "storeCodeVerifier", {
199
215
  enumerable: true,
200
- get: function () { return chunkAAMNUM62_cjs.storeCodeVerifier; }
216
+ get: function () { return chunkUOXRMTUI_cjs.storeCodeVerifier; }
201
217
  });
202
218
  Object.defineProperty(exports, "useFFID", {
203
219
  enumerable: true,
204
- get: function () { return chunkAAMNUM62_cjs.useFFID; }
220
+ get: function () { return chunkUOXRMTUI_cjs.useFFID; }
205
221
  });
206
222
  Object.defineProperty(exports, "useFFIDAnnouncements", {
207
223
  enumerable: true,
208
- get: function () { return chunkAAMNUM62_cjs.useFFIDAnnouncements; }
224
+ get: function () { return chunkUOXRMTUI_cjs.useFFIDAnnouncements; }
209
225
  });
210
226
  Object.defineProperty(exports, "useSubscription", {
211
227
  enumerable: true,
212
- get: function () { return chunkAAMNUM62_cjs.useSubscription; }
228
+ get: function () { return chunkUOXRMTUI_cjs.useSubscription; }
213
229
  });
214
230
  Object.defineProperty(exports, "withSubscription", {
215
231
  enumerable: true,
216
- get: function () { return chunkAAMNUM62_cjs.withSubscription; }
232
+ get: function () { return chunkUOXRMTUI_cjs.withSubscription; }
217
233
  });
218
234
  Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
219
235
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, M as FFIDAnnouncementsApiResponse, N as AnnouncementListResponse, O as FFIDAnnouncementsLogger } from './index-DfnHXRMX.cjs';
2
- export { P as Announcement, Q as AnnouncementStatus, R as AnnouncementType, S as FFIDAnnouncementBadge, T as FFIDAnnouncementList, U as FFIDAnnouncementsError, V as FFIDAnnouncementsErrorCode, W as FFIDAnnouncementsServerResponse, X as FFIDAssignableMemberRole, Y as FFIDCacheConfig, Z as FFIDContextValue, _ as FFIDInquiryCategory, $ as FFIDInquiryCategorySite2026, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, aa as FFIDJwtClaims, ab as FFIDLoginButton, ac as FFIDMemberStatus, ad as FFIDOAuthTokenResponse, ae as FFIDOAuthUserInfoMemberRole, af as FFIDOAuthUserInfoSubscription, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-DfnHXRMX.cjs';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDOAuthUserInfoSubscription, L as FFIDAnnouncementsClientConfig, M as ListAnnouncementsOptions, N as FFIDAnnouncementsApiResponse, O as AnnouncementListResponse, P as FFIDAnnouncementsLogger } from './index-lAvUS_oz.cjs';
2
+ export { Q as Announcement, R as AnnouncementStatus, S as AnnouncementType, T as FFIDAnnouncementBadge, U as FFIDAnnouncementList, V as FFIDAnnouncementsError, W as FFIDAnnouncementsErrorCode, X as FFIDAnnouncementsServerResponse, Y as FFIDAssignableMemberRole, Z as FFIDCacheConfig, _ as FFIDContextValue, $ as FFIDInquiryCategory, a0 as FFIDInquiryCategorySite2026, a1 as FFIDInquiryForm, a2 as FFIDInquiryFormCategoryItem, a3 as FFIDInquiryFormClassNames, a4 as FFIDInquiryFormLegalLayout, a5 as FFIDInquiryFormOrganization, a6 as FFIDInquiryFormPlaceholderContext, a7 as FFIDInquiryFormPrefill, a8 as FFIDInquiryFormProps, a9 as FFIDInquiryFormSubmitData, aa as FFIDInquiryFormSubmitResult, ab as FFIDJwtClaims, ac as FFIDLoginButton, ad as FFIDMemberStatus, ae as FFIDOAuthTokenResponse, af as FFIDOAuthUserInfoMemberRole, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-lAvUS_oz.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-Bt0f1gyo.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
@@ -1045,6 +1045,110 @@ interface ComputeEffectiveStatusInput {
1045
1045
  */
1046
1046
  declare function computeEffectiveStatusFromSession(input: ComputeEffectiveStatusInput, nowMs?: number): EffectiveSubscriptionStatus;
1047
1047
 
1048
+ /**
1049
+ * Access-control predicates for the `/oauth/userinfo` subscription blob.
1050
+ *
1051
+ * `FFIDOAuthUserInfo.subscription.effectiveStatus` (added in SDK 5.3.0 / FFID
1052
+ * #3353) is the canonical access-control signal for callers that consume the
1053
+ * OAuth userinfo path — including the agent hub `syncUserFromBearerToken`
1054
+ * primary sync path and any SSR / RSC code that reads the `FFIDProvider`
1055
+ * context.
1056
+ *
1057
+ * `FFIDSession.hasAccess()` / `.isBlocked` / `.isGrace` cover the **session**
1058
+ * path on the SDK consumer side. These helpers cover the **userinfo** path so
1059
+ * callers do not re-implement the predicate inline (and silently drift apart
1060
+ * across services), keeping FFID, SDK, and consumers on the same vocabulary.
1061
+ *
1062
+ * @see {@link FFIDOAuthUserInfoSubscription.effectiveStatus}
1063
+ * @see {@link computeEffectiveStatusFromSession}
1064
+ */
1065
+
1066
+ /**
1067
+ * `EffectiveSubscriptionStatus` values that grant access.
1068
+ *
1069
+ * Single source of truth shared with `client/ffid-client.ts` and any future
1070
+ * caller that needs to fan in on the same access predicate. Mirrors the FFID
1071
+ * backend constants in `src/app/api/v1/subscriptions/ext/check/route.ts`
1072
+ * (route-local) — change there forces a sync here in the same PR.
1073
+ */
1074
+ declare const ACCESS_GRANTING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
1075
+ /**
1076
+ * `EffectiveSubscriptionStatus` values that should drive the explicit-block UI
1077
+ * (reactivation CTA, plan picker). Disjoint from
1078
+ * {@link ACCESS_GRANTING_EFFECTIVE_STATUSES}; `past_due_grace` is intentionally
1079
+ * in NEITHER set so callers can render an in-grace recovery banner without
1080
+ * tripping a "blocked screen" branch.
1081
+ */
1082
+ declare const BLOCKING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
1083
+ /**
1084
+ * Decide whether the `/oauth/userinfo` subscription summary grants access.
1085
+ *
1086
+ * Returns `true` iff `sub.effectiveStatus` is in
1087
+ * {@link ACCESS_GRANTING_EFFECTIVE_STATUSES} (`active` or `past_due_grace`).
1088
+ *
1089
+ * Conservative fallback rules (security-critical — treat as part of the
1090
+ * contract, not implementation detail):
1091
+ *
1092
+ * - `sub === undefined` → `false`. Either the granted OAuth scope omits
1093
+ * `subscription:read` (FFID #3380) or the caller used `verifyAccessToken`
1094
+ * without `includeProfile`. NEITHER means "no contract" (contractless users
1095
+ * hit HTTP 403 upstream). Returning `false` here forces narrow-scope
1096
+ * callers to fetch the data explicitly; treating `undefined` as "grant" is
1097
+ * a security regression.
1098
+ * - `sub === null` → `false`. Caller has explicitly observed no subscription
1099
+ * summary (free / contractless user surfaced post-403). Deny.
1100
+ * - `sub.effectiveStatus === null` → `false`. Backward-compat path for FFID
1101
+ * versions before #3353 that did not populate the field. The legacy `status`
1102
+ * field is intentionally NOT consulted: it lacks grace-window resolution, so
1103
+ * falling back to it would diverge from `/ext/check` and risk granting access
1104
+ * during dunning. Callers on legacy FFID should upgrade or call `/ext/check`
1105
+ * for the canonical answer.
1106
+ *
1107
+ * @example Allow access in a Next.js middleware
1108
+ * ```ts
1109
+ * import { hasAccessFromUserinfo } from '@feelflow/ffid-sdk'
1110
+ *
1111
+ * if (!hasAccessFromUserinfo(userinfo.subscription)) {
1112
+ * return NextResponse.redirect(new URL('/plans', req.url))
1113
+ * }
1114
+ * ```
1115
+ */
1116
+ declare function hasAccessFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
1117
+ /**
1118
+ * Decide whether the `/oauth/userinfo` subscription summary is in a
1119
+ * hard-blocked state.
1120
+ *
1121
+ * Returns `true` iff `sub.effectiveStatus` is in
1122
+ * {@link BLOCKING_EFFECTIVE_STATUSES} (`blocked` / `canceled` / `expired` /
1123
+ * `trial_expired`).
1124
+ *
1125
+ * **Not the negation of {@link hasAccessFromUserinfo}.** `past_due_grace`
1126
+ * grants access AND is not blocked (callers should still surface a recovery
1127
+ * banner). Conversely, `undefined` / `null` / `effectiveStatus === null`
1128
+ * return `false` here — the data is missing, not "blocked". Callers that
1129
+ * want a "should I show the blocked screen" predicate should branch on this
1130
+ * helper; callers that want a "should I grant access" predicate should use
1131
+ * {@link hasAccessFromUserinfo}. Treating absence as blocking here would
1132
+ * surface the blocked UI to every narrow-scope caller.
1133
+ *
1134
+ * **Intentional asymmetry with `FFIDServiceAccessDecision.isBlocked`.** The
1135
+ * `/ext/check` decision wrapper in `client/ffid-client.ts` flags absent
1136
+ * effectiveStatus as `isBlocked: true` because it folds **access-gate
1137
+ * results** (fail-closed: deny on unknown). This predicate flags **the
1138
+ * "blocked screen" UI signal** (fail-open on absence: do not paint the
1139
+ * blocked banner over a narrow-scope or legacy-FFID caller). The two live
1140
+ * at different layers and the asymmetry is by design — pair this with
1141
+ * {@link hasAccessFromUserinfo} when you want a complete access decision.
1142
+ *
1143
+ * @example Show blocked banner only on explicit block
1144
+ * ```ts
1145
+ * if (isBlockedFromUserinfo(userinfo.subscription)) {
1146
+ * return <BlockedBanner status={userinfo.subscription!.effectiveStatus!} />
1147
+ * }
1148
+ * ```
1149
+ */
1150
+ declare function isBlockedFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
1151
+
1048
1152
  /**
1049
1153
  * FFID Announcements API Client
1050
1154
  *
@@ -1208,4 +1312,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
1208
1312
  };
1209
1313
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
1210
1314
 
1211
- export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
1315
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, M as FFIDAnnouncementsApiResponse, N as AnnouncementListResponse, O as FFIDAnnouncementsLogger } from './index-DfnHXRMX.js';
2
- export { P as Announcement, Q as AnnouncementStatus, R as AnnouncementType, S as FFIDAnnouncementBadge, T as FFIDAnnouncementList, U as FFIDAnnouncementsError, V as FFIDAnnouncementsErrorCode, W as FFIDAnnouncementsServerResponse, X as FFIDAssignableMemberRole, Y as FFIDCacheConfig, Z as FFIDContextValue, _ as FFIDInquiryCategory, $ as FFIDInquiryCategorySite2026, a0 as FFIDInquiryForm, a1 as FFIDInquiryFormCategoryItem, a2 as FFIDInquiryFormClassNames, a3 as FFIDInquiryFormLegalLayout, a4 as FFIDInquiryFormOrganization, a5 as FFIDInquiryFormPlaceholderContext, a6 as FFIDInquiryFormPrefill, a7 as FFIDInquiryFormProps, a8 as FFIDInquiryFormSubmitData, a9 as FFIDInquiryFormSubmitResult, aa as FFIDJwtClaims, ab as FFIDLoginButton, ac as FFIDMemberStatus, ad as FFIDOAuthTokenResponse, ae as FFIDOAuthUserInfoMemberRole, af as FFIDOAuthUserInfoSubscription, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-DfnHXRMX.js';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDOAuthUserInfoSubscription, L as FFIDAnnouncementsClientConfig, M as ListAnnouncementsOptions, N as FFIDAnnouncementsApiResponse, O as AnnouncementListResponse, P as FFIDAnnouncementsLogger } from './index-lAvUS_oz.js';
2
+ export { Q as Announcement, R as AnnouncementStatus, S as AnnouncementType, T as FFIDAnnouncementBadge, U as FFIDAnnouncementList, V as FFIDAnnouncementsError, W as FFIDAnnouncementsErrorCode, X as FFIDAnnouncementsServerResponse, Y as FFIDAssignableMemberRole, Z as FFIDCacheConfig, _ as FFIDContextValue, $ as FFIDInquiryCategory, a0 as FFIDInquiryCategorySite2026, a1 as FFIDInquiryForm, a2 as FFIDInquiryFormCategoryItem, a3 as FFIDInquiryFormClassNames, a4 as FFIDInquiryFormLegalLayout, a5 as FFIDInquiryFormOrganization, a6 as FFIDInquiryFormPlaceholderContext, a7 as FFIDInquiryFormPrefill, a8 as FFIDInquiryFormProps, a9 as FFIDInquiryFormSubmitData, aa as FFIDInquiryFormSubmitResult, ab as FFIDJwtClaims, ac as FFIDLoginButton, ad as FFIDMemberStatus, ae as FFIDOAuthTokenResponse, af as FFIDOAuthUserInfoMemberRole, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-lAvUS_oz.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-Bt0f1gyo.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
@@ -1045,6 +1045,110 @@ interface ComputeEffectiveStatusInput {
1045
1045
  */
1046
1046
  declare function computeEffectiveStatusFromSession(input: ComputeEffectiveStatusInput, nowMs?: number): EffectiveSubscriptionStatus;
1047
1047
 
1048
+ /**
1049
+ * Access-control predicates for the `/oauth/userinfo` subscription blob.
1050
+ *
1051
+ * `FFIDOAuthUserInfo.subscription.effectiveStatus` (added in SDK 5.3.0 / FFID
1052
+ * #3353) is the canonical access-control signal for callers that consume the
1053
+ * OAuth userinfo path — including the agent hub `syncUserFromBearerToken`
1054
+ * primary sync path and any SSR / RSC code that reads the `FFIDProvider`
1055
+ * context.
1056
+ *
1057
+ * `FFIDSession.hasAccess()` / `.isBlocked` / `.isGrace` cover the **session**
1058
+ * path on the SDK consumer side. These helpers cover the **userinfo** path so
1059
+ * callers do not re-implement the predicate inline (and silently drift apart
1060
+ * across services), keeping FFID, SDK, and consumers on the same vocabulary.
1061
+ *
1062
+ * @see {@link FFIDOAuthUserInfoSubscription.effectiveStatus}
1063
+ * @see {@link computeEffectiveStatusFromSession}
1064
+ */
1065
+
1066
+ /**
1067
+ * `EffectiveSubscriptionStatus` values that grant access.
1068
+ *
1069
+ * Single source of truth shared with `client/ffid-client.ts` and any future
1070
+ * caller that needs to fan in on the same access predicate. Mirrors the FFID
1071
+ * backend constants in `src/app/api/v1/subscriptions/ext/check/route.ts`
1072
+ * (route-local) — change there forces a sync here in the same PR.
1073
+ */
1074
+ declare const ACCESS_GRANTING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
1075
+ /**
1076
+ * `EffectiveSubscriptionStatus` values that should drive the explicit-block UI
1077
+ * (reactivation CTA, plan picker). Disjoint from
1078
+ * {@link ACCESS_GRANTING_EFFECTIVE_STATUSES}; `past_due_grace` is intentionally
1079
+ * in NEITHER set so callers can render an in-grace recovery banner without
1080
+ * tripping a "blocked screen" branch.
1081
+ */
1082
+ declare const BLOCKING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
1083
+ /**
1084
+ * Decide whether the `/oauth/userinfo` subscription summary grants access.
1085
+ *
1086
+ * Returns `true` iff `sub.effectiveStatus` is in
1087
+ * {@link ACCESS_GRANTING_EFFECTIVE_STATUSES} (`active` or `past_due_grace`).
1088
+ *
1089
+ * Conservative fallback rules (security-critical — treat as part of the
1090
+ * contract, not implementation detail):
1091
+ *
1092
+ * - `sub === undefined` → `false`. Either the granted OAuth scope omits
1093
+ * `subscription:read` (FFID #3380) or the caller used `verifyAccessToken`
1094
+ * without `includeProfile`. NEITHER means "no contract" (contractless users
1095
+ * hit HTTP 403 upstream). Returning `false` here forces narrow-scope
1096
+ * callers to fetch the data explicitly; treating `undefined` as "grant" is
1097
+ * a security regression.
1098
+ * - `sub === null` → `false`. Caller has explicitly observed no subscription
1099
+ * summary (free / contractless user surfaced post-403). Deny.
1100
+ * - `sub.effectiveStatus === null` → `false`. Backward-compat path for FFID
1101
+ * versions before #3353 that did not populate the field. The legacy `status`
1102
+ * field is intentionally NOT consulted: it lacks grace-window resolution, so
1103
+ * falling back to it would diverge from `/ext/check` and risk granting access
1104
+ * during dunning. Callers on legacy FFID should upgrade or call `/ext/check`
1105
+ * for the canonical answer.
1106
+ *
1107
+ * @example Allow access in a Next.js middleware
1108
+ * ```ts
1109
+ * import { hasAccessFromUserinfo } from '@feelflow/ffid-sdk'
1110
+ *
1111
+ * if (!hasAccessFromUserinfo(userinfo.subscription)) {
1112
+ * return NextResponse.redirect(new URL('/plans', req.url))
1113
+ * }
1114
+ * ```
1115
+ */
1116
+ declare function hasAccessFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
1117
+ /**
1118
+ * Decide whether the `/oauth/userinfo` subscription summary is in a
1119
+ * hard-blocked state.
1120
+ *
1121
+ * Returns `true` iff `sub.effectiveStatus` is in
1122
+ * {@link BLOCKING_EFFECTIVE_STATUSES} (`blocked` / `canceled` / `expired` /
1123
+ * `trial_expired`).
1124
+ *
1125
+ * **Not the negation of {@link hasAccessFromUserinfo}.** `past_due_grace`
1126
+ * grants access AND is not blocked (callers should still surface a recovery
1127
+ * banner). Conversely, `undefined` / `null` / `effectiveStatus === null`
1128
+ * return `false` here — the data is missing, not "blocked". Callers that
1129
+ * want a "should I show the blocked screen" predicate should branch on this
1130
+ * helper; callers that want a "should I grant access" predicate should use
1131
+ * {@link hasAccessFromUserinfo}. Treating absence as blocking here would
1132
+ * surface the blocked UI to every narrow-scope caller.
1133
+ *
1134
+ * **Intentional asymmetry with `FFIDServiceAccessDecision.isBlocked`.** The
1135
+ * `/ext/check` decision wrapper in `client/ffid-client.ts` flags absent
1136
+ * effectiveStatus as `isBlocked: true` because it folds **access-gate
1137
+ * results** (fail-closed: deny on unknown). This predicate flags **the
1138
+ * "blocked screen" UI signal** (fail-open on absence: do not paint the
1139
+ * blocked banner over a narrow-scope or legacy-FFID caller). The two live
1140
+ * at different layers and the asymmetry is by design — pair this with
1141
+ * {@link hasAccessFromUserinfo} when you want a complete access decision.
1142
+ *
1143
+ * @example Show blocked banner only on explicit block
1144
+ * ```ts
1145
+ * if (isBlockedFromUserinfo(userinfo.subscription)) {
1146
+ * return <BlockedBanner status={userinfo.subscription!.effectiveStatus!} />
1147
+ * }
1148
+ * ```
1149
+ */
1150
+ declare function isBlockedFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
1151
+
1048
1152
  /**
1049
1153
  * FFID Announcements API Client
1050
1154
  *
@@ -1208,4 +1312,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
1208
1312
  };
1209
1313
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
1210
1314
 
1211
- export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
1315
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext, useSubscription } from './chunk-ARKFHB72.js';
2
- export { DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-ARKFHB72.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-RWA4L5WT.js';
2
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-RWA4L5WT.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-IVKFKMLQ.js';
4
4
  import { useEffect, useRef } from 'react';
5
5
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -837,7 +837,7 @@ function createProfileMethods(deps) {
837
837
  }
838
838
 
839
839
  // src/client/version-check.ts
840
- var SDK_VERSION = "5.3.1";
840
+ var SDK_VERSION = "5.4.0";
841
841
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
842
842
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
843
843
  function sdkHeaders() {
@@ -2187,6 +2187,18 @@ function createInquiryMethods(deps) {
2187
2187
  return { create };
2188
2188
  }
2189
2189
 
2190
+ // src/subscriptions/userinfo-helpers.ts
2191
+ var ACCESS_GRANTING_EFFECTIVE_STATUSES = [
2192
+ "active",
2193
+ "past_due_grace"
2194
+ ];
2195
+ var BLOCKING_EFFECTIVE_STATUSES = [
2196
+ "blocked",
2197
+ "canceled",
2198
+ "expired",
2199
+ "trial_expired"
2200
+ ];
2201
+
2190
2202
  // src/client/ffid-client.ts
2191
2203
  var UNAUTHORIZED_STATUS2 = 401;
2192
2204
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -2217,13 +2229,6 @@ var EXT_CHECK_ENDPOINT = "/api/v1/subscriptions/ext/check";
2217
2229
  var DEFAULT_ALLOW_GRACE = true;
2218
2230
  var DEFAULT_SERVICE_ACCESS_FAIL_POLICY = "failClosed";
2219
2231
  var SERVICE_ACCESS_DENIED_CODE = "SERVICE_ACCESS_DENIED";
2220
- var ACCESS_GRANTING_EFFECTIVE_STATUSES = ["active", "past_due_grace"];
2221
- var BLOCKING_EFFECTIVE_STATUSES = [
2222
- "blocked",
2223
- "canceled",
2224
- "expired",
2225
- "trial_expired"
2226
- ];
2227
2232
  function resolveServiceAccessDenialReason(params, allowGrace) {
2228
2233
  if (params.hasAccess) {
2229
2234
  return null;
@@ -836,7 +836,7 @@ function createProfileMethods(deps) {
836
836
  }
837
837
 
838
838
  // src/client/version-check.ts
839
- var SDK_VERSION = "5.3.1";
839
+ var SDK_VERSION = "5.4.0";
840
840
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
841
841
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
842
842
  function sdkHeaders() {
@@ -2186,6 +2186,18 @@ function createInquiryMethods(deps) {
2186
2186
  return { create };
2187
2187
  }
2188
2188
 
2189
+ // src/subscriptions/userinfo-helpers.ts
2190
+ var ACCESS_GRANTING_EFFECTIVE_STATUSES = [
2191
+ "active",
2192
+ "past_due_grace"
2193
+ ];
2194
+ var BLOCKING_EFFECTIVE_STATUSES = [
2195
+ "blocked",
2196
+ "canceled",
2197
+ "expired",
2198
+ "trial_expired"
2199
+ ];
2200
+
2189
2201
  // src/client/ffid-client.ts
2190
2202
  var UNAUTHORIZED_STATUS2 = 401;
2191
2203
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -2216,13 +2228,6 @@ var EXT_CHECK_ENDPOINT = "/api/v1/subscriptions/ext/check";
2216
2228
  var DEFAULT_ALLOW_GRACE = true;
2217
2229
  var DEFAULT_SERVICE_ACCESS_FAIL_POLICY = "failClosed";
2218
2230
  var SERVICE_ACCESS_DENIED_CODE = "SERVICE_ACCESS_DENIED";
2219
- var ACCESS_GRANTING_EFFECTIVE_STATUSES = ["active", "past_due_grace"];
2220
- var BLOCKING_EFFECTIVE_STATUSES = [
2221
- "blocked",
2222
- "canceled",
2223
- "expired",
2224
- "trial_expired"
2225
- ];
2226
2231
  function resolveServiceAccessDenialReason(params, allowGrace) {
2227
2232
  if (params.hasAccess) {
2228
2233
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feelflow/ffid-sdk",
3
- "version": "5.3.1",
3
+ "version": "5.4.0",
4
4
  "description": "FeelFlow ID Platform SDK for React/Next.js applications",
5
5
  "keywords": [
6
6
  "feelflow",