@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.
- package/README.md +31 -0
- package/dist/{chunk-XQL4YSTL.cjs → chunk-U4XDH7TI.cjs} +121 -1
- package/dist/{chunk-P35ULJLM.js → chunk-WI645CPU.js} +121 -1
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{ffid-client-ZcJhRbD6.d.ts → ffid-client-CKMGqqPi.d.cts} +90 -10
- package/dist/{ffid-client-ZcJhRbD6.d.cts → ffid-client-CUOFknXy.d.ts} +90 -10
- package/dist/{index-Cn8-3hgb.d.cts → index-DXgTH5vK.d.cts} +87 -11
- package/dist/{index-Cn8-3hgb.d.ts → index-DXgTH5vK.d.ts} +87 -11
- package/dist/index.cjs +32 -32
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +121 -1
- package/dist/server/index.d.cts +3 -2
- package/dist/server/index.d.ts +3 -2
- package/dist/server/index.js +121 -1
- package/dist/server/test/index.d.cts +2 -1
- package/dist/server/test/index.d.ts +2 -1
- package/dist/types-5g_Bg6Ey.d.cts +37 -0
- package/dist/types-5g_Bg6Ey.d.ts +37 -0
- package/dist/webhooks/index.d.cts +65 -2
- package/dist/webhooks/index.d.ts +65 -2
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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 } =
|
|
57
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
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 } =
|
|
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
|
|
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
|
|
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
|
|
115
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDAnnouncementBadge; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDAnnouncementList; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDInquiryForm; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDLoginButton; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDOrganizationSwitcher; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDProvider; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDSDKError; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkU4XDH7TI_cjs.FFIDSubscriptionBadge; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
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
|
|
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
|
|
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
|
|
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
|
|
163
|
+
get: function () { return chunkU4XDH7TI_cjs.computeEffectiveStatusFromSession; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkU4XDH7TI_cjs.createFFIDAnnouncementsClient; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkU4XDH7TI_cjs.createFFIDClient; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "createTokenStore", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkU4XDH7TI_cjs.createTokenStore; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkU4XDH7TI_cjs.generateCodeChallenge; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkU4XDH7TI_cjs.generateCodeVerifier; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkU4XDH7TI_cjs.isFFIDInquiryCategorySite2026; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkU4XDH7TI_cjs.normalizeRedirectUri; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkU4XDH7TI_cjs.retrieveCodeVerifier; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkU4XDH7TI_cjs.storeCodeVerifier; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "useFFID", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkU4XDH7TI_cjs.useFFID; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
206
206
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkU4XDH7TI_cjs.useFFIDAnnouncements; }
|
|
208
208
|
});
|
|
209
209
|
Object.defineProperty(exports, "useSubscription", {
|
|
210
210
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkU4XDH7TI_cjs.useSubscription; }
|
|
212
212
|
});
|
|
213
213
|
Object.defineProperty(exports, "withSubscription", {
|
|
214
214
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
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
|
|
2
|
-
export {
|
|
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
|
|
2
|
-
export {
|
|
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-
|
|
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-
|
|
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
|
|