@feelflow/ffid-sdk 4.0.0 → 4.2.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.
@@ -58,6 +58,91 @@ interface FFIDCacheConfig {
58
58
  */
59
59
  type EffectiveSubscriptionStatus = 'active' | 'past_due_grace' | 'blocked' | 'canceled' | 'trial_expired' | 'expired';
60
60
 
61
+ /**
62
+ * Canonical service-access types for subscription lifecycle decisions.
63
+ */
64
+
65
+ /** Subscription status values matching the FFID platform's SubscriptionStatus type */
66
+ type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
67
+ interface FFIDSubscriptionCheckResponse {
68
+ hasActiveSubscription: boolean;
69
+ /**
70
+ * Canonical access decision returned by FFID's `/subscriptions/ext/check`.
71
+ *
72
+ * This is the server-side source of truth for service gates. Consumers
73
+ * should not recompute access from `currentPeriodEnd`, `past_due_since`, or
74
+ * local payment timestamps.
75
+ */
76
+ hasAccess?: boolean;
77
+ /** True when `effectiveStatus === 'past_due_grace'`. */
78
+ isGrace?: boolean;
79
+ /** True when FFID's canonical effective status denies service access. */
80
+ isBlocked?: boolean;
81
+ organizationId: string | null;
82
+ subscriptionId: string | null;
83
+ status: FFIDSubscriptionStatus | null;
84
+ planCode: string | null;
85
+ currentPeriodEnd: string | null;
86
+ /**
87
+ * Semantic FFID access-control status. `null` means the organization has no
88
+ * subscription row for this service.
89
+ */
90
+ effectiveStatus?: EffectiveSubscriptionStatus | null;
91
+ /**
92
+ * ISO timestamp at which `past_due_grace` flips to `blocked`; null outside
93
+ * the grace window.
94
+ */
95
+ gracePeriodEndsAt?: string | null;
96
+ /** Whether a canceled subscription can be resumed via a re-subscription flow. */
97
+ reactivatable?: boolean;
98
+ }
99
+ type FFIDServiceAccessFailPolicy = 'failClosed';
100
+ type FFIDServiceAccessDenialReason = 'no_subscription' | 'grace_disallowed' | 'blocked' | 'canceled' | 'expired' | 'trial_expired' | 'ffid_unreachable';
101
+ interface FFIDCheckServiceAccessParams {
102
+ userId?: string;
103
+ organizationId: string;
104
+ /**
105
+ * Whether `past_due_grace` should keep access open.
106
+ *
107
+ * @default true
108
+ */
109
+ allowGrace?: boolean;
110
+ /**
111
+ * Error policy when FFID cannot return a canonical decision.
112
+ *
113
+ * Currently only `failClosed` is supported: network/server/parse failures
114
+ * become `hasAccess=false` decisions with `denialReason='ffid_unreachable'`
115
+ * and the root cause in `decision.error`. Treat `hasAccess` as the gate.
116
+ */
117
+ failPolicy?: FFIDServiceAccessFailPolicy;
118
+ }
119
+ interface FFIDServiceAccessError {
120
+ code: string;
121
+ message: string;
122
+ details?: unknown;
123
+ }
124
+ interface FFIDServiceAccessDecision {
125
+ hasAccess: boolean;
126
+ effectiveStatus: EffectiveSubscriptionStatus | null;
127
+ isGrace: boolean;
128
+ isBlocked: boolean;
129
+ allowGrace: boolean;
130
+ failPolicy: FFIDServiceAccessFailPolicy;
131
+ denialReason: FFIDServiceAccessDenialReason | null;
132
+ organizationId: string | null;
133
+ subscriptionId: string | null;
134
+ status: FFIDSubscriptionStatus | null;
135
+ planCode: string | null;
136
+ currentPeriodEnd: string | null;
137
+ gracePeriodEndsAt: string | null;
138
+ reactivatable: boolean;
139
+ /**
140
+ * Present when the decision was produced by the SDK fail-closed policy
141
+ * rather than by a successful FFID response.
142
+ */
143
+ error?: FFIDServiceAccessError;
144
+ }
145
+
61
146
  /**
62
147
  * FFID SDK Type Definitions
63
148
  *
@@ -444,16 +529,7 @@ type FFIDApiResponse<T> = {
444
529
  data?: undefined;
445
530
  error: FFIDError;
446
531
  };
447
- /** Subscription status values matching the FFID platform's SubscriptionStatus type */
448
- type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
449
- interface FFIDSubscriptionCheckResponse {
450
- hasActiveSubscription: boolean;
451
- organizationId: string | null;
452
- subscriptionId: string | null;
453
- status: FFIDSubscriptionStatus | null;
454
- planCode: string | null;
455
- currentPeriodEnd: string | null;
456
- }
532
+
457
533
  /**
458
534
  * Checkout session response from billing checkout endpoint
459
535
  */
@@ -1442,4 +1518,4 @@ interface FFIDInquiryFormPlaceholderContext {
1442
1518
  }
1443
1519
  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;
1444
1520
 
1445
- export { type FFIDInquiryFormPlaceholderContext as $, type FFIDOrganization as A, type FFIDSubscription as B, type FFIDSubscriptionContextValue as C, type FFIDAnnouncementsClientConfig as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type FFIDAnnouncementsApiResponse as G, type AnnouncementListResponse as H, type FFIDAnnouncementsLogger as I, type Announcement as J, type AnnouncementStatus as K, type ListAnnouncementsOptions as L, type AnnouncementType as M, FFIDAnnouncementBadge as N, FFIDAnnouncementList as O, type FFIDAnnouncementsError as P, type FFIDAnnouncementsErrorCode as Q, type FFIDAnnouncementsServerResponse as R, type FFIDCacheConfig as S, type FFIDContextValue as T, type FFIDInquiryCategory as U, type FFIDInquiryCategorySite2026 as V, FFIDInquiryForm as W, type FFIDInquiryFormCategoryItem as X, type FFIDInquiryFormClassNames as Y, type FFIDInquiryFormLegalLayout as Z, type FFIDInquiryFormOrganization as _, type FFIDConfig as a, type FFIDInquiryFormPrefill as a0, type FFIDInquiryFormProps as a1, type FFIDInquiryFormSubmitData as a2, type FFIDInquiryFormSubmitResult as a3, type FFIDJwtClaims as a4, FFIDLoginButton as a5, type FFIDMemberStatus as a6, type FFIDOAuthTokenResponse as a7, type FFIDOAuthUserInfoMemberRole as a8, type FFIDOAuthUserInfoSubscription as a9, type FFIDOrganizationMember as aa, FFIDOrganizationSwitcher as ab, type FFIDRedirectErrorCode as ac, type FFIDSeatModel as ad, FFIDSubscriptionBadge as ae, type FFIDTokenIntrospectionResponse as af, FFIDUserMenu as ag, FFID_INQUIRY_CATEGORIES as ah, FFID_INQUIRY_CATEGORIES_SITE_2026 as ai, type UseFFIDAnnouncementsOptions as aj, type UseFFIDAnnouncementsReturn as ak, isFFIDInquiryCategorySite2026 as al, useFFIDAnnouncements as am, type FFIDAnnouncementBadgeClassNames as an, type FFIDAnnouncementBadgeProps as ao, type FFIDAnnouncementListClassNames as ap, type FFIDAnnouncementListProps as aq, type FFIDLoginButtonProps as ar, type FFIDOrganizationSwitcherClassNames as as, type FFIDOrganizationSwitcherProps as at, type FFIDSubscriptionBadgeClassNames as au, type FFIDSubscriptionBadgeProps as av, type FFIDUserMenuClassNames as aw, type FFIDUserMenuProps as ax, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDProfileCallOptions as k, type FFIDUserProfile as l, type FFIDUpdateUserProfileRequest as m, type FFIDAnalyticsConfig as n, type FFIDCreateCheckoutParams as o, type FFIDCheckoutSessionResponse as p, type FFIDCreatePortalParams as q, type FFIDPortalSessionResponse as r, type FFIDVerifyAccessTokenOptions as s, type FFIDOAuthUserInfo as t, type FFIDInquiryCreateParams as u, type FFIDInquiryCreateResponse as v, type FFIDAuthMode as w, type FFIDLogger as x, type FFIDCacheAdapter as y, type FFIDUser as z };
1521
+ export { type FFIDInquiryFormLegalLayout as $, type FFIDCacheAdapter as A, type FFIDUser as B, type FFIDOrganization as C, type FFIDSubscription as D, type FFIDSubscriptionContextValue as E, type FFIDSubscriptionStatus as F, type EffectiveSubscriptionStatus as G, type FFIDAnnouncementsClientConfig as H, type FFIDAnnouncementsApiResponse as I, type AnnouncementListResponse as J, type FFIDAnnouncementsLogger as K, type ListAnnouncementsOptions as L, type Announcement as M, type AnnouncementStatus as N, type AnnouncementType as O, FFIDAnnouncementBadge as P, FFIDAnnouncementList as Q, type FFIDAnnouncementsError as R, type FFIDAnnouncementsErrorCode as S, type FFIDAnnouncementsServerResponse as T, type FFIDCacheConfig as U, type FFIDContextValue as V, type FFIDInquiryCategory as W, type FFIDInquiryCategorySite2026 as X, FFIDInquiryForm as Y, type FFIDInquiryFormCategoryItem as Z, type FFIDInquiryFormClassNames as _, type FFIDConfig as a, type FFIDInquiryFormOrganization as a0, type FFIDInquiryFormPlaceholderContext as a1, type FFIDInquiryFormPrefill as a2, type FFIDInquiryFormProps as a3, type FFIDInquiryFormSubmitData as a4, type FFIDInquiryFormSubmitResult as a5, type FFIDJwtClaims as a6, FFIDLoginButton as a7, type FFIDMemberStatus as a8, type FFIDOAuthTokenResponse as a9, type FFIDUserMenuClassNames as aA, type FFIDUserMenuProps as aB, type FFIDOAuthUserInfoMemberRole as aa, type FFIDOAuthUserInfoSubscription as ab, type FFIDOrganizationMember as ac, FFIDOrganizationSwitcher as ad, type FFIDRedirectErrorCode as ae, type FFIDSeatModel as af, type FFIDServiceAccessDenialReason as ag, type FFIDServiceAccessFailPolicy as ah, FFIDSubscriptionBadge as ai, type FFIDTokenIntrospectionResponse as aj, FFIDUserMenu as ak, FFID_INQUIRY_CATEGORIES as al, FFID_INQUIRY_CATEGORIES_SITE_2026 as am, type UseFFIDAnnouncementsOptions as an, type UseFFIDAnnouncementsReturn as ao, isFFIDInquiryCategorySite2026 as ap, useFFIDAnnouncements as aq, type FFIDAnnouncementBadgeClassNames as ar, type FFIDAnnouncementBadgeProps as as, type FFIDAnnouncementListClassNames as at, type FFIDAnnouncementListProps as au, type FFIDLoginButtonProps as av, type FFIDOrganizationSwitcherClassNames as aw, type FFIDOrganizationSwitcherProps as ax, type FFIDSubscriptionBadgeClassNames as ay, type FFIDSubscriptionBadgeProps 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 FFIDMemberRole as j, type FFIDUpdateMemberRoleResponse as k, type FFIDRemoveMemberResponse as l, type FFIDProfileCallOptions as m, type FFIDUserProfile as n, type FFIDUpdateUserProfileRequest as o, type FFIDAnalyticsConfig as p, type FFIDCreateCheckoutParams as q, type FFIDCheckoutSessionResponse as r, type FFIDCreatePortalParams as s, type FFIDPortalSessionResponse as t, type FFIDVerifyAccessTokenOptions as u, type FFIDOAuthUserInfo as v, type FFIDInquiryCreateParams as w, type FFIDInquiryCreateResponse as x, type FFIDAuthMode as y, type FFIDLogger as z };
@@ -58,6 +58,91 @@ interface FFIDCacheConfig {
58
58
  */
59
59
  type EffectiveSubscriptionStatus = 'active' | 'past_due_grace' | 'blocked' | 'canceled' | 'trial_expired' | 'expired';
60
60
 
61
+ /**
62
+ * Canonical service-access types for subscription lifecycle decisions.
63
+ */
64
+
65
+ /** Subscription status values matching the FFID platform's SubscriptionStatus type */
66
+ type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
67
+ interface FFIDSubscriptionCheckResponse {
68
+ hasActiveSubscription: boolean;
69
+ /**
70
+ * Canonical access decision returned by FFID's `/subscriptions/ext/check`.
71
+ *
72
+ * This is the server-side source of truth for service gates. Consumers
73
+ * should not recompute access from `currentPeriodEnd`, `past_due_since`, or
74
+ * local payment timestamps.
75
+ */
76
+ hasAccess?: boolean;
77
+ /** True when `effectiveStatus === 'past_due_grace'`. */
78
+ isGrace?: boolean;
79
+ /** True when FFID's canonical effective status denies service access. */
80
+ isBlocked?: boolean;
81
+ organizationId: string | null;
82
+ subscriptionId: string | null;
83
+ status: FFIDSubscriptionStatus | null;
84
+ planCode: string | null;
85
+ currentPeriodEnd: string | null;
86
+ /**
87
+ * Semantic FFID access-control status. `null` means the organization has no
88
+ * subscription row for this service.
89
+ */
90
+ effectiveStatus?: EffectiveSubscriptionStatus | null;
91
+ /**
92
+ * ISO timestamp at which `past_due_grace` flips to `blocked`; null outside
93
+ * the grace window.
94
+ */
95
+ gracePeriodEndsAt?: string | null;
96
+ /** Whether a canceled subscription can be resumed via a re-subscription flow. */
97
+ reactivatable?: boolean;
98
+ }
99
+ type FFIDServiceAccessFailPolicy = 'failClosed';
100
+ type FFIDServiceAccessDenialReason = 'no_subscription' | 'grace_disallowed' | 'blocked' | 'canceled' | 'expired' | 'trial_expired' | 'ffid_unreachable';
101
+ interface FFIDCheckServiceAccessParams {
102
+ userId?: string;
103
+ organizationId: string;
104
+ /**
105
+ * Whether `past_due_grace` should keep access open.
106
+ *
107
+ * @default true
108
+ */
109
+ allowGrace?: boolean;
110
+ /**
111
+ * Error policy when FFID cannot return a canonical decision.
112
+ *
113
+ * Currently only `failClosed` is supported: network/server/parse failures
114
+ * become `hasAccess=false` decisions with `denialReason='ffid_unreachable'`
115
+ * and the root cause in `decision.error`. Treat `hasAccess` as the gate.
116
+ */
117
+ failPolicy?: FFIDServiceAccessFailPolicy;
118
+ }
119
+ interface FFIDServiceAccessError {
120
+ code: string;
121
+ message: string;
122
+ details?: unknown;
123
+ }
124
+ interface FFIDServiceAccessDecision {
125
+ hasAccess: boolean;
126
+ effectiveStatus: EffectiveSubscriptionStatus | null;
127
+ isGrace: boolean;
128
+ isBlocked: boolean;
129
+ allowGrace: boolean;
130
+ failPolicy: FFIDServiceAccessFailPolicy;
131
+ denialReason: FFIDServiceAccessDenialReason | null;
132
+ organizationId: string | null;
133
+ subscriptionId: string | null;
134
+ status: FFIDSubscriptionStatus | null;
135
+ planCode: string | null;
136
+ currentPeriodEnd: string | null;
137
+ gracePeriodEndsAt: string | null;
138
+ reactivatable: boolean;
139
+ /**
140
+ * Present when the decision was produced by the SDK fail-closed policy
141
+ * rather than by a successful FFID response.
142
+ */
143
+ error?: FFIDServiceAccessError;
144
+ }
145
+
61
146
  /**
62
147
  * FFID SDK Type Definitions
63
148
  *
@@ -444,16 +529,7 @@ type FFIDApiResponse<T> = {
444
529
  data?: undefined;
445
530
  error: FFIDError;
446
531
  };
447
- /** Subscription status values matching the FFID platform's SubscriptionStatus type */
448
- type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
449
- interface FFIDSubscriptionCheckResponse {
450
- hasActiveSubscription: boolean;
451
- organizationId: string | null;
452
- subscriptionId: string | null;
453
- status: FFIDSubscriptionStatus | null;
454
- planCode: string | null;
455
- currentPeriodEnd: string | null;
456
- }
532
+
457
533
  /**
458
534
  * Checkout session response from billing checkout endpoint
459
535
  */
@@ -1442,4 +1518,4 @@ interface FFIDInquiryFormPlaceholderContext {
1442
1518
  }
1443
1519
  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;
1444
1520
 
1445
- export { type FFIDInquiryFormPlaceholderContext as $, type FFIDOrganization as A, type FFIDSubscription as B, type FFIDSubscriptionContextValue as C, type FFIDAnnouncementsClientConfig as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type FFIDAnnouncementsApiResponse as G, type AnnouncementListResponse as H, type FFIDAnnouncementsLogger as I, type Announcement as J, type AnnouncementStatus as K, type ListAnnouncementsOptions as L, type AnnouncementType as M, FFIDAnnouncementBadge as N, FFIDAnnouncementList as O, type FFIDAnnouncementsError as P, type FFIDAnnouncementsErrorCode as Q, type FFIDAnnouncementsServerResponse as R, type FFIDCacheConfig as S, type FFIDContextValue as T, type FFIDInquiryCategory as U, type FFIDInquiryCategorySite2026 as V, FFIDInquiryForm as W, type FFIDInquiryFormCategoryItem as X, type FFIDInquiryFormClassNames as Y, type FFIDInquiryFormLegalLayout as Z, type FFIDInquiryFormOrganization as _, type FFIDConfig as a, type FFIDInquiryFormPrefill as a0, type FFIDInquiryFormProps as a1, type FFIDInquiryFormSubmitData as a2, type FFIDInquiryFormSubmitResult as a3, type FFIDJwtClaims as a4, FFIDLoginButton as a5, type FFIDMemberStatus as a6, type FFIDOAuthTokenResponse as a7, type FFIDOAuthUserInfoMemberRole as a8, type FFIDOAuthUserInfoSubscription as a9, type FFIDOrganizationMember as aa, FFIDOrganizationSwitcher as ab, type FFIDRedirectErrorCode as ac, type FFIDSeatModel as ad, FFIDSubscriptionBadge as ae, type FFIDTokenIntrospectionResponse as af, FFIDUserMenu as ag, FFID_INQUIRY_CATEGORIES as ah, FFID_INQUIRY_CATEGORIES_SITE_2026 as ai, type UseFFIDAnnouncementsOptions as aj, type UseFFIDAnnouncementsReturn as ak, isFFIDInquiryCategorySite2026 as al, useFFIDAnnouncements as am, type FFIDAnnouncementBadgeClassNames as an, type FFIDAnnouncementBadgeProps as ao, type FFIDAnnouncementListClassNames as ap, type FFIDAnnouncementListProps as aq, type FFIDLoginButtonProps as ar, type FFIDOrganizationSwitcherClassNames as as, type FFIDOrganizationSwitcherProps as at, type FFIDSubscriptionBadgeClassNames as au, type FFIDSubscriptionBadgeProps as av, type FFIDUserMenuClassNames as aw, type FFIDUserMenuProps as ax, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDProfileCallOptions as k, type FFIDUserProfile as l, type FFIDUpdateUserProfileRequest as m, type FFIDAnalyticsConfig as n, type FFIDCreateCheckoutParams as o, type FFIDCheckoutSessionResponse as p, type FFIDCreatePortalParams as q, type FFIDPortalSessionResponse as r, type FFIDVerifyAccessTokenOptions as s, type FFIDOAuthUserInfo as t, type FFIDInquiryCreateParams as u, type FFIDInquiryCreateResponse as v, type FFIDAuthMode as w, type FFIDLogger as x, type FFIDCacheAdapter as y, type FFIDUser as z };
1521
+ export { type FFIDInquiryFormLegalLayout as $, type FFIDCacheAdapter as A, type FFIDUser as B, type FFIDOrganization as C, type FFIDSubscription as D, type FFIDSubscriptionContextValue as E, type FFIDSubscriptionStatus as F, type EffectiveSubscriptionStatus as G, type FFIDAnnouncementsClientConfig as H, type FFIDAnnouncementsApiResponse as I, type AnnouncementListResponse as J, type FFIDAnnouncementsLogger as K, type ListAnnouncementsOptions as L, type Announcement as M, type AnnouncementStatus as N, type AnnouncementType as O, FFIDAnnouncementBadge as P, FFIDAnnouncementList as Q, type FFIDAnnouncementsError as R, type FFIDAnnouncementsErrorCode as S, type FFIDAnnouncementsServerResponse as T, type FFIDCacheConfig as U, type FFIDContextValue as V, type FFIDInquiryCategory as W, type FFIDInquiryCategorySite2026 as X, FFIDInquiryForm as Y, type FFIDInquiryFormCategoryItem as Z, type FFIDInquiryFormClassNames as _, type FFIDConfig as a, type FFIDInquiryFormOrganization as a0, type FFIDInquiryFormPlaceholderContext as a1, type FFIDInquiryFormPrefill as a2, type FFIDInquiryFormProps as a3, type FFIDInquiryFormSubmitData as a4, type FFIDInquiryFormSubmitResult as a5, type FFIDJwtClaims as a6, FFIDLoginButton as a7, type FFIDMemberStatus as a8, type FFIDOAuthTokenResponse as a9, type FFIDUserMenuClassNames as aA, type FFIDUserMenuProps as aB, type FFIDOAuthUserInfoMemberRole as aa, type FFIDOAuthUserInfoSubscription as ab, type FFIDOrganizationMember as ac, FFIDOrganizationSwitcher as ad, type FFIDRedirectErrorCode as ae, type FFIDSeatModel as af, type FFIDServiceAccessDenialReason as ag, type FFIDServiceAccessFailPolicy as ah, FFIDSubscriptionBadge as ai, type FFIDTokenIntrospectionResponse as aj, FFIDUserMenu as ak, FFID_INQUIRY_CATEGORIES as al, FFID_INQUIRY_CATEGORIES_SITE_2026 as am, type UseFFIDAnnouncementsOptions as an, type UseFFIDAnnouncementsReturn as ao, isFFIDInquiryCategorySite2026 as ap, useFFIDAnnouncements as aq, type FFIDAnnouncementBadgeClassNames as ar, type FFIDAnnouncementBadgeProps as as, type FFIDAnnouncementListClassNames as at, type FFIDAnnouncementListProps as au, type FFIDLoginButtonProps as av, type FFIDOrganizationSwitcherClassNames as aw, type FFIDOrganizationSwitcherProps as ax, type FFIDSubscriptionBadgeClassNames as ay, type FFIDSubscriptionBadgeProps 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 FFIDMemberRole as j, type FFIDUpdateMemberRoleResponse as k, type FFIDRemoveMemberResponse as l, type FFIDProfileCallOptions as m, type FFIDUserProfile as n, type FFIDUpdateUserProfileRequest as o, type FFIDAnalyticsConfig as p, type FFIDCreateCheckoutParams as q, type FFIDCheckoutSessionResponse as r, type FFIDCreatePortalParams as s, type FFIDPortalSessionResponse as t, type FFIDVerifyAccessTokenOptions as u, type FFIDOAuthUserInfo as v, type FFIDInquiryCreateParams as w, type FFIDInquiryCreateResponse as x, type FFIDAuthMode as y, type FFIDLogger as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkXQL4YSTL_cjs = require('./chunk-XQL4YSTL.cjs');
3
+ var chunkU4XDH7TI_cjs = require('./chunk-U4XDH7TI.cjs');
4
4
  var react = require('react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
@@ -53,8 +53,8 @@ function defaultRedirect(url) {
53
53
  }
54
54
  function useRequireActiveSubscription(options) {
55
55
  const { redirectTo, allowGrace = true, onRedirect } = options;
56
- const { isLoading, error } = chunkXQL4YSTL_cjs.useFFIDContext();
57
- const { effectiveStatus, isBlocked, isGrace } = chunkXQL4YSTL_cjs.useSubscription();
56
+ const { isLoading, error } = chunkU4XDH7TI_cjs.useFFIDContext();
57
+ const { effectiveStatus, isBlocked, isGrace } = chunkU4XDH7TI_cjs.useSubscription();
58
58
  const hasFetchError = error !== null && effectiveStatus === null;
59
59
  const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
60
60
  react.useEffect(() => {
@@ -75,7 +75,7 @@ function useRequireActiveSubscription(options) {
75
75
  }
76
76
  function withFFIDAuth(Component, options = {}) {
77
77
  const WrappedComponent = (props) => {
78
- const { isLoading, isAuthenticated, login } = chunkXQL4YSTL_cjs.useFFIDContext();
78
+ const { isLoading, isAuthenticated, login } = chunkU4XDH7TI_cjs.useFFIDContext();
79
79
  const hasRedirected = react.useRef(false);
80
80
  react.useEffect(() => {
81
81
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -104,115 +104,115 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
104
104
 
105
105
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
106
106
  enumerable: true,
107
- get: function () { return chunkXQL4YSTL_cjs.DEFAULT_API_BASE_URL; }
107
+ get: function () { return chunkU4XDH7TI_cjs.DEFAULT_API_BASE_URL; }
108
108
  });
109
109
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
110
110
  enumerable: true,
111
- get: function () { return chunkXQL4YSTL_cjs.DEFAULT_OAUTH_SCOPES; }
111
+ get: function () { return chunkU4XDH7TI_cjs.DEFAULT_OAUTH_SCOPES; }
112
112
  });
113
113
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
114
114
  enumerable: true,
115
- get: function () { return chunkXQL4YSTL_cjs.FFIDAnnouncementBadge; }
115
+ get: function () { return chunkU4XDH7TI_cjs.FFIDAnnouncementBadge; }
116
116
  });
117
117
  Object.defineProperty(exports, "FFIDAnnouncementList", {
118
118
  enumerable: true,
119
- get: function () { return chunkXQL4YSTL_cjs.FFIDAnnouncementList; }
119
+ get: function () { return chunkU4XDH7TI_cjs.FFIDAnnouncementList; }
120
120
  });
121
121
  Object.defineProperty(exports, "FFIDInquiryForm", {
122
122
  enumerable: true,
123
- get: function () { return chunkXQL4YSTL_cjs.FFIDInquiryForm; }
123
+ get: function () { return chunkU4XDH7TI_cjs.FFIDInquiryForm; }
124
124
  });
125
125
  Object.defineProperty(exports, "FFIDLoginButton", {
126
126
  enumerable: true,
127
- get: function () { return chunkXQL4YSTL_cjs.FFIDLoginButton; }
127
+ get: function () { return chunkU4XDH7TI_cjs.FFIDLoginButton; }
128
128
  });
129
129
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
130
130
  enumerable: true,
131
- get: function () { return chunkXQL4YSTL_cjs.FFIDOrganizationSwitcher; }
131
+ get: function () { return chunkU4XDH7TI_cjs.FFIDOrganizationSwitcher; }
132
132
  });
133
133
  Object.defineProperty(exports, "FFIDProvider", {
134
134
  enumerable: true,
135
- get: function () { return chunkXQL4YSTL_cjs.FFIDProvider; }
135
+ get: function () { return chunkU4XDH7TI_cjs.FFIDProvider; }
136
136
  });
137
137
  Object.defineProperty(exports, "FFIDSDKError", {
138
138
  enumerable: true,
139
- get: function () { return chunkXQL4YSTL_cjs.FFIDSDKError; }
139
+ get: function () { return chunkU4XDH7TI_cjs.FFIDSDKError; }
140
140
  });
141
141
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
142
142
  enumerable: true,
143
- get: function () { return chunkXQL4YSTL_cjs.FFIDSubscriptionBadge; }
143
+ get: function () { return chunkU4XDH7TI_cjs.FFIDSubscriptionBadge; }
144
144
  });
145
145
  Object.defineProperty(exports, "FFIDUserMenu", {
146
146
  enumerable: true,
147
- get: function () { return chunkXQL4YSTL_cjs.FFIDUserMenu; }
147
+ get: function () { return chunkU4XDH7TI_cjs.FFIDUserMenu; }
148
148
  });
149
149
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
150
150
  enumerable: true,
151
- get: function () { return chunkXQL4YSTL_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
151
+ get: function () { return chunkU4XDH7TI_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
152
152
  });
153
153
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
154
154
  enumerable: true,
155
- get: function () { return chunkXQL4YSTL_cjs.FFID_INQUIRY_CATEGORIES; }
155
+ get: function () { return chunkU4XDH7TI_cjs.FFID_INQUIRY_CATEGORIES; }
156
156
  });
157
157
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
158
158
  enumerable: true,
159
- get: function () { return chunkXQL4YSTL_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
159
+ get: function () { return chunkU4XDH7TI_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
160
160
  });
161
161
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
162
162
  enumerable: true,
163
- get: function () { return chunkXQL4YSTL_cjs.computeEffectiveStatusFromSession; }
163
+ get: function () { return chunkU4XDH7TI_cjs.computeEffectiveStatusFromSession; }
164
164
  });
165
165
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
166
166
  enumerable: true,
167
- get: function () { return chunkXQL4YSTL_cjs.createFFIDAnnouncementsClient; }
167
+ get: function () { return chunkU4XDH7TI_cjs.createFFIDAnnouncementsClient; }
168
168
  });
169
169
  Object.defineProperty(exports, "createFFIDClient", {
170
170
  enumerable: true,
171
- get: function () { return chunkXQL4YSTL_cjs.createFFIDClient; }
171
+ get: function () { return chunkU4XDH7TI_cjs.createFFIDClient; }
172
172
  });
173
173
  Object.defineProperty(exports, "createTokenStore", {
174
174
  enumerable: true,
175
- get: function () { return chunkXQL4YSTL_cjs.createTokenStore; }
175
+ get: function () { return chunkU4XDH7TI_cjs.createTokenStore; }
176
176
  });
177
177
  Object.defineProperty(exports, "generateCodeChallenge", {
178
178
  enumerable: true,
179
- get: function () { return chunkXQL4YSTL_cjs.generateCodeChallenge; }
179
+ get: function () { return chunkU4XDH7TI_cjs.generateCodeChallenge; }
180
180
  });
181
181
  Object.defineProperty(exports, "generateCodeVerifier", {
182
182
  enumerable: true,
183
- get: function () { return chunkXQL4YSTL_cjs.generateCodeVerifier; }
183
+ get: function () { return chunkU4XDH7TI_cjs.generateCodeVerifier; }
184
184
  });
185
185
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
186
186
  enumerable: true,
187
- get: function () { return chunkXQL4YSTL_cjs.isFFIDInquiryCategorySite2026; }
187
+ get: function () { return chunkU4XDH7TI_cjs.isFFIDInquiryCategorySite2026; }
188
188
  });
189
189
  Object.defineProperty(exports, "normalizeRedirectUri", {
190
190
  enumerable: true,
191
- get: function () { return chunkXQL4YSTL_cjs.normalizeRedirectUri; }
191
+ get: function () { return chunkU4XDH7TI_cjs.normalizeRedirectUri; }
192
192
  });
193
193
  Object.defineProperty(exports, "retrieveCodeVerifier", {
194
194
  enumerable: true,
195
- get: function () { return chunkXQL4YSTL_cjs.retrieveCodeVerifier; }
195
+ get: function () { return chunkU4XDH7TI_cjs.retrieveCodeVerifier; }
196
196
  });
197
197
  Object.defineProperty(exports, "storeCodeVerifier", {
198
198
  enumerable: true,
199
- get: function () { return chunkXQL4YSTL_cjs.storeCodeVerifier; }
199
+ get: function () { return chunkU4XDH7TI_cjs.storeCodeVerifier; }
200
200
  });
201
201
  Object.defineProperty(exports, "useFFID", {
202
202
  enumerable: true,
203
- get: function () { return chunkXQL4YSTL_cjs.useFFID; }
203
+ get: function () { return chunkU4XDH7TI_cjs.useFFID; }
204
204
  });
205
205
  Object.defineProperty(exports, "useFFIDAnnouncements", {
206
206
  enumerable: true,
207
- get: function () { return chunkXQL4YSTL_cjs.useFFIDAnnouncements; }
207
+ get: function () { return chunkU4XDH7TI_cjs.useFFIDAnnouncements; }
208
208
  });
209
209
  Object.defineProperty(exports, "useSubscription", {
210
210
  enumerable: true,
211
- get: function () { return chunkXQL4YSTL_cjs.useSubscription; }
211
+ get: function () { return chunkU4XDH7TI_cjs.useSubscription; }
212
212
  });
213
213
  Object.defineProperty(exports, "withSubscription", {
214
214
  enumerable: true,
215
- get: function () { return chunkXQL4YSTL_cjs.withSubscription; }
215
+ get: function () { return chunkU4XDH7TI_cjs.withSubscription; }
216
216
  });
217
217
  exports.FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS;
218
218
  exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
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 FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDProfileCallOptions, l as FFIDUserProfile, m as FFIDUpdateUserProfileRequest, n as FFIDAnalyticsConfig, o as FFIDCreateCheckoutParams, p as FFIDCheckoutSessionResponse, q as FFIDCreatePortalParams, r as FFIDPortalSessionResponse, s as FFIDVerifyAccessTokenOptions, t as FFIDOAuthUserInfo, u as FFIDInquiryCreateParams, v as FFIDInquiryCreateResponse, w as FFIDAuthMode, x as FFIDLogger, y as FFIDCacheAdapter, z as FFIDUser, A as FFIDOrganization, B as FFIDSubscription, C as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, D as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, G as FFIDAnnouncementsApiResponse, H as AnnouncementListResponse, I as FFIDAnnouncementsLogger } from './index-Cn8-3hgb.cjs';
2
- export { J as Announcement, K as AnnouncementStatus, M as AnnouncementType, N as FFIDAnnouncementBadge, O as FFIDAnnouncementList, P as FFIDAnnouncementsError, Q as FFIDAnnouncementsErrorCode, R as FFIDAnnouncementsServerResponse, S as FFIDCacheConfig, T as FFIDContextValue, U as FFIDInquiryCategory, V as FFIDInquiryCategorySite2026, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormLegalLayout, _ as FFIDInquiryFormOrganization, $ as FFIDInquiryFormPlaceholderContext, a0 as FFIDInquiryFormPrefill, a1 as FFIDInquiryFormProps, a2 as FFIDInquiryFormSubmitData, a3 as FFIDInquiryFormSubmitResult, a4 as FFIDJwtClaims, a5 as FFIDLoginButton, a6 as FFIDMemberStatus, a7 as FFIDOAuthTokenResponse, a8 as FFIDOAuthUserInfoMemberRole, a9 as FFIDOAuthUserInfoSubscription, aa as FFIDOrganizationMember, ab as FFIDOrganizationSwitcher, ac as FFIDRedirectErrorCode, ad as FFIDSeatModel, ae as FFIDSubscriptionBadge, af as FFIDTokenIntrospectionResponse, ag as FFIDUserMenu, ah as FFID_INQUIRY_CATEGORIES, ai as FFID_INQUIRY_CATEGORIES_SITE_2026, aj as UseFFIDAnnouncementsOptions, ak as UseFFIDAnnouncementsReturn, al as isFFIDInquiryCategorySite2026, am as useFFIDAnnouncements } from './index-Cn8-3hgb.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 FFIDMemberRole, k as FFIDUpdateMemberRoleResponse, l as FFIDRemoveMemberResponse, m as FFIDProfileCallOptions, n as FFIDUserProfile, o as FFIDUpdateUserProfileRequest, p as FFIDAnalyticsConfig, q as FFIDCreateCheckoutParams, r as FFIDCheckoutSessionResponse, s as FFIDCreatePortalParams, t as FFIDPortalSessionResponse, u as FFIDVerifyAccessTokenOptions, v as FFIDOAuthUserInfo, w as FFIDInquiryCreateParams, x as FFIDInquiryCreateResponse, y as FFIDAuthMode, z as FFIDLogger, A as FFIDCacheAdapter, B as FFIDUser, C as FFIDOrganization, D as FFIDSubscription, E as FFIDSubscriptionContextValue, G as EffectiveSubscriptionStatus, H as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, I as FFIDAnnouncementsApiResponse, J as AnnouncementListResponse, K as FFIDAnnouncementsLogger } from './index-DXgTH5vK.cjs';
2
+ export { M as Announcement, N as AnnouncementStatus, O as AnnouncementType, P as FFIDAnnouncementBadge, Q as FFIDAnnouncementList, R as FFIDAnnouncementsError, S as FFIDAnnouncementsErrorCode, T as FFIDAnnouncementsServerResponse, U as FFIDCacheConfig, V as FFIDContextValue, W as FFIDInquiryCategory, X as FFIDInquiryCategorySite2026, Y as FFIDInquiryForm, Z as FFIDInquiryFormCategoryItem, _ as FFIDInquiryFormClassNames, $ as FFIDInquiryFormLegalLayout, a0 as FFIDInquiryFormOrganization, a1 as FFIDInquiryFormPlaceholderContext, a2 as FFIDInquiryFormPrefill, a3 as FFIDInquiryFormProps, a4 as FFIDInquiryFormSubmitData, a5 as FFIDInquiryFormSubmitResult, a6 as FFIDJwtClaims, a7 as FFIDLoginButton, a8 as FFIDMemberStatus, a9 as FFIDOAuthTokenResponse, aa as FFIDOAuthUserInfoMemberRole, ab as FFIDOAuthUserInfoSubscription, ac as FFIDOrganizationMember, ad as FFIDOrganizationSwitcher, ae as FFIDRedirectErrorCode, af as FFIDSeatModel, ag as FFIDServiceAccessDenialReason, ah as FFIDServiceAccessFailPolicy, ai as FFIDSubscriptionBadge, aj as FFIDTokenIntrospectionResponse, ak as FFIDUserMenu, al as FFID_INQUIRY_CATEGORIES, am as FFID_INQUIRY_CATEGORIES_SITE_2026, an as UseFFIDAnnouncementsOptions, ao as UseFFIDAnnouncementsReturn, ap as isFFIDInquiryCategorySite2026, aq as useFFIDAnnouncements } from './index-DXgTH5vK.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode, ComponentType, FC } from 'react';
5
5
 
@@ -536,6 +536,8 @@ declare function createFFIDClient(config: FFIDConfig): {
536
536
  userId?: string;
537
537
  organizationId: string;
538
538
  }) => Promise<FFIDApiResponse<FFIDSubscriptionCheckResponse>>;
539
+ checkServiceAccess: (params: FFIDCheckServiceAccessParams) => Promise<FFIDApiResponse<FFIDServiceAccessDecision>>;
540
+ requireServiceAccess: (params: FFIDCheckServiceAccessParams) => Promise<FFIDApiResponse<FFIDServiceAccessDecision>>;
539
541
  listMembers: (params: {
540
542
  organizationId: string;
541
543
  }) => Promise<FFIDApiResponse<FFIDListMembersResponse>>;
@@ -1200,4 +1202,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
1200
1202
  };
1201
1203
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
1202
1204
 
1203
- export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, 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, 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 };
1205
+ export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, 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 };
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 FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDProfileCallOptions, l as FFIDUserProfile, m as FFIDUpdateUserProfileRequest, n as FFIDAnalyticsConfig, o as FFIDCreateCheckoutParams, p as FFIDCheckoutSessionResponse, q as FFIDCreatePortalParams, r as FFIDPortalSessionResponse, s as FFIDVerifyAccessTokenOptions, t as FFIDOAuthUserInfo, u as FFIDInquiryCreateParams, v as FFIDInquiryCreateResponse, w as FFIDAuthMode, x as FFIDLogger, y as FFIDCacheAdapter, z as FFIDUser, A as FFIDOrganization, B as FFIDSubscription, C as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, D as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, G as FFIDAnnouncementsApiResponse, H as AnnouncementListResponse, I as FFIDAnnouncementsLogger } from './index-Cn8-3hgb.js';
2
- export { J as Announcement, K as AnnouncementStatus, M as AnnouncementType, N as FFIDAnnouncementBadge, O as FFIDAnnouncementList, P as FFIDAnnouncementsError, Q as FFIDAnnouncementsErrorCode, R as FFIDAnnouncementsServerResponse, S as FFIDCacheConfig, T as FFIDContextValue, U as FFIDInquiryCategory, V as FFIDInquiryCategorySite2026, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormLegalLayout, _ as FFIDInquiryFormOrganization, $ as FFIDInquiryFormPlaceholderContext, a0 as FFIDInquiryFormPrefill, a1 as FFIDInquiryFormProps, a2 as FFIDInquiryFormSubmitData, a3 as FFIDInquiryFormSubmitResult, a4 as FFIDJwtClaims, a5 as FFIDLoginButton, a6 as FFIDMemberStatus, a7 as FFIDOAuthTokenResponse, a8 as FFIDOAuthUserInfoMemberRole, a9 as FFIDOAuthUserInfoSubscription, aa as FFIDOrganizationMember, ab as FFIDOrganizationSwitcher, ac as FFIDRedirectErrorCode, ad as FFIDSeatModel, ae as FFIDSubscriptionBadge, af as FFIDTokenIntrospectionResponse, ag as FFIDUserMenu, ah as FFID_INQUIRY_CATEGORIES, ai as FFID_INQUIRY_CATEGORIES_SITE_2026, aj as UseFFIDAnnouncementsOptions, ak as UseFFIDAnnouncementsReturn, al as isFFIDInquiryCategorySite2026, am as useFFIDAnnouncements } from './index-Cn8-3hgb.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 FFIDMemberRole, k as FFIDUpdateMemberRoleResponse, l as FFIDRemoveMemberResponse, m as FFIDProfileCallOptions, n as FFIDUserProfile, o as FFIDUpdateUserProfileRequest, p as FFIDAnalyticsConfig, q as FFIDCreateCheckoutParams, r as FFIDCheckoutSessionResponse, s as FFIDCreatePortalParams, t as FFIDPortalSessionResponse, u as FFIDVerifyAccessTokenOptions, v as FFIDOAuthUserInfo, w as FFIDInquiryCreateParams, x as FFIDInquiryCreateResponse, y as FFIDAuthMode, z as FFIDLogger, A as FFIDCacheAdapter, B as FFIDUser, C as FFIDOrganization, D as FFIDSubscription, E as FFIDSubscriptionContextValue, G as EffectiveSubscriptionStatus, H as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, I as FFIDAnnouncementsApiResponse, J as AnnouncementListResponse, K as FFIDAnnouncementsLogger } from './index-DXgTH5vK.js';
2
+ export { M as Announcement, N as AnnouncementStatus, O as AnnouncementType, P as FFIDAnnouncementBadge, Q as FFIDAnnouncementList, R as FFIDAnnouncementsError, S as FFIDAnnouncementsErrorCode, T as FFIDAnnouncementsServerResponse, U as FFIDCacheConfig, V as FFIDContextValue, W as FFIDInquiryCategory, X as FFIDInquiryCategorySite2026, Y as FFIDInquiryForm, Z as FFIDInquiryFormCategoryItem, _ as FFIDInquiryFormClassNames, $ as FFIDInquiryFormLegalLayout, a0 as FFIDInquiryFormOrganization, a1 as FFIDInquiryFormPlaceholderContext, a2 as FFIDInquiryFormPrefill, a3 as FFIDInquiryFormProps, a4 as FFIDInquiryFormSubmitData, a5 as FFIDInquiryFormSubmitResult, a6 as FFIDJwtClaims, a7 as FFIDLoginButton, a8 as FFIDMemberStatus, a9 as FFIDOAuthTokenResponse, aa as FFIDOAuthUserInfoMemberRole, ab as FFIDOAuthUserInfoSubscription, ac as FFIDOrganizationMember, ad as FFIDOrganizationSwitcher, ae as FFIDRedirectErrorCode, af as FFIDSeatModel, ag as FFIDServiceAccessDenialReason, ah as FFIDServiceAccessFailPolicy, ai as FFIDSubscriptionBadge, aj as FFIDTokenIntrospectionResponse, ak as FFIDUserMenu, al as FFID_INQUIRY_CATEGORIES, am as FFID_INQUIRY_CATEGORIES_SITE_2026, an as UseFFIDAnnouncementsOptions, ao as UseFFIDAnnouncementsReturn, ap as isFFIDInquiryCategorySite2026, aq as useFFIDAnnouncements } from './index-DXgTH5vK.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode, ComponentType, FC } from 'react';
5
5
 
@@ -536,6 +536,8 @@ declare function createFFIDClient(config: FFIDConfig): {
536
536
  userId?: string;
537
537
  organizationId: string;
538
538
  }) => Promise<FFIDApiResponse<FFIDSubscriptionCheckResponse>>;
539
+ checkServiceAccess: (params: FFIDCheckServiceAccessParams) => Promise<FFIDApiResponse<FFIDServiceAccessDecision>>;
540
+ requireServiceAccess: (params: FFIDCheckServiceAccessParams) => Promise<FFIDApiResponse<FFIDServiceAccessDecision>>;
539
541
  listMembers: (params: {
540
542
  organizationId: string;
541
543
  }) => Promise<FFIDApiResponse<FFIDListMembersResponse>>;
@@ -1200,4 +1202,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
1200
1202
  };
1201
1203
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
1202
1204
 
1203
- export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, 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, 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 };
1205
+ export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, 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 };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext, useSubscription } from './chunk-P35ULJLM.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-P35ULJLM.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-WI645CPU.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-WI645CPU.js';
3
3
  import { useEffect, useRef } from 'react';
4
4
  import { jsx, Fragment } from 'react/jsx-runtime';
5
5