@feelflow/ffid-sdk 5.3.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FFIDCookieLink-Bt0f1gyo.d.cts → FFIDCookieLink-CE01gYc4.d.cts} +40 -1
- package/dist/{FFIDCookieLink-Bt0f1gyo.d.ts → FFIDCookieLink-CE01gYc4.d.ts} +40 -1
- package/dist/{chunk-AAMNUM62.cjs → chunk-JKP3MBTT.cjs} +82 -59
- package/dist/{chunk-IVKFKMLQ.js → chunk-KJ7FUNA6.js} +21 -3
- package/dist/{chunk-QZN4WZCV.cjs → chunk-Q5SZVLNB.cjs} +20 -2
- package/dist/{chunk-ARKFHB72.js → chunk-WNYMSUHN.js} +79 -60
- 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/consent/index.cjs +64 -64
- package/dist/consent/index.d.cts +2 -2
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +1 -1
- package/dist/{index-DfnHXRMX.d.ts → index-lAvUS_oz.d.cts} +1 -1
- package/dist/{index-DfnHXRMX.d.cts → index-lAvUS_oz.d.ts} +1 -1
- package/dist/index.cjs +69 -53
- package/dist/index.d.cts +108 -4
- package/dist/index.d.ts +108 -4
- package/dist/index.js +3 -3
- package/dist/server/index.cjs +13 -8
- package/dist/server/index.js +13 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJKP3MBTT_cjs = require('./chunk-JKP3MBTT.cjs');
|
|
4
|
+
var chunkQ5SZVLNB_cjs = require('./chunk-Q5SZVLNB.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
|
|
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
|
|
|
54
54
|
}
|
|
55
55
|
function useRequireActiveSubscription(options) {
|
|
56
56
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
57
|
-
const { isLoading, error } =
|
|
58
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
57
|
+
const { isLoading, error } = chunkJKP3MBTT_cjs.useFFIDContext();
|
|
58
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkJKP3MBTT_cjs.useSubscription();
|
|
59
59
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
60
60
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
61
61
|
react.useEffect(() => {
|
|
@@ -76,7 +76,7 @@ function useRequireActiveSubscription(options) {
|
|
|
76
76
|
}
|
|
77
77
|
function withFFIDAuth(Component, options = {}) {
|
|
78
78
|
const WrappedComponent = (props) => {
|
|
79
|
-
const { isLoading, isAuthenticated, login } =
|
|
79
|
+
const { isLoading, isAuthenticated, login } = chunkJKP3MBTT_cjs.useFFIDContext();
|
|
80
80
|
const hasRedirected = react.useRef(false);
|
|
81
81
|
react.useEffect(() => {
|
|
82
82
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -103,197 +103,213 @@ function withFFIDAuth(Component, options = {}) {
|
|
|
103
103
|
var FFID_NEWSLETTER_TYPES = ["inquiry_followup", "general"];
|
|
104
104
|
var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
105
105
|
|
|
106
|
+
Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return chunkJKP3MBTT_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () { return chunkJKP3MBTT_cjs.BLOCKING_EFFECTIVE_STATUSES; }
|
|
113
|
+
});
|
|
106
114
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
107
115
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkJKP3MBTT_cjs.DEFAULT_API_BASE_URL; }
|
|
109
117
|
});
|
|
110
118
|
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
111
119
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkJKP3MBTT_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
113
121
|
});
|
|
114
122
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
115
123
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDAnnouncementBadge; }
|
|
117
125
|
});
|
|
118
126
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
119
127
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDAnnouncementList; }
|
|
121
129
|
});
|
|
122
130
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
123
131
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDInquiryForm; }
|
|
125
133
|
});
|
|
126
134
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
127
135
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDLoginButton; }
|
|
129
137
|
});
|
|
130
138
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
131
139
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDOrganizationSwitcher; }
|
|
133
141
|
});
|
|
134
142
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
135
143
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDProvider; }
|
|
137
145
|
});
|
|
138
146
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
139
147
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDSDKError; }
|
|
141
149
|
});
|
|
142
150
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
143
151
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDSubscriptionBadge; }
|
|
145
153
|
});
|
|
146
154
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
147
155
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkJKP3MBTT_cjs.FFIDUserMenu; }
|
|
149
157
|
});
|
|
150
158
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
151
159
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkJKP3MBTT_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
153
161
|
});
|
|
154
162
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
155
163
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkJKP3MBTT_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
157
165
|
});
|
|
158
166
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
159
167
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkJKP3MBTT_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
161
169
|
});
|
|
162
170
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
163
171
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkJKP3MBTT_cjs.computeEffectiveStatusFromSession; }
|
|
165
173
|
});
|
|
166
174
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
167
175
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkJKP3MBTT_cjs.createFFIDAnnouncementsClient; }
|
|
169
177
|
});
|
|
170
178
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
171
179
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkJKP3MBTT_cjs.createFFIDClient; }
|
|
173
181
|
});
|
|
174
182
|
Object.defineProperty(exports, "createTokenStore", {
|
|
175
183
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkJKP3MBTT_cjs.createTokenStore; }
|
|
177
185
|
});
|
|
178
186
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
179
187
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkJKP3MBTT_cjs.generateCodeChallenge; }
|
|
181
189
|
});
|
|
182
190
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
183
191
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkJKP3MBTT_cjs.generateCodeVerifier; }
|
|
193
|
+
});
|
|
194
|
+
Object.defineProperty(exports, "hasAccessFromUserinfo", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function () { return chunkJKP3MBTT_cjs.hasAccessFromUserinfo; }
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "isBlockedFromUserinfo", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () { return chunkJKP3MBTT_cjs.isBlockedFromUserinfo; }
|
|
185
201
|
});
|
|
186
202
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
187
203
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkJKP3MBTT_cjs.isFFIDInquiryCategorySite2026; }
|
|
189
205
|
});
|
|
190
206
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
191
207
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkJKP3MBTT_cjs.normalizeRedirectUri; }
|
|
193
209
|
});
|
|
194
210
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
195
211
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkJKP3MBTT_cjs.retrieveCodeVerifier; }
|
|
197
213
|
});
|
|
198
214
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
199
215
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkJKP3MBTT_cjs.storeCodeVerifier; }
|
|
201
217
|
});
|
|
202
218
|
Object.defineProperty(exports, "useFFID", {
|
|
203
219
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkJKP3MBTT_cjs.useFFID; }
|
|
205
221
|
});
|
|
206
222
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
207
223
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkJKP3MBTT_cjs.useFFIDAnnouncements; }
|
|
209
225
|
});
|
|
210
226
|
Object.defineProperty(exports, "useSubscription", {
|
|
211
227
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkJKP3MBTT_cjs.useSubscription; }
|
|
213
229
|
});
|
|
214
230
|
Object.defineProperty(exports, "withSubscription", {
|
|
215
231
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkJKP3MBTT_cjs.withSubscription; }
|
|
217
233
|
});
|
|
218
234
|
Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
|
|
219
235
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkQ5SZVLNB_cjs.ALL_DENIED_EXCEPT_NECESSARY; }
|
|
221
237
|
});
|
|
222
238
|
Object.defineProperty(exports, "CONSENT_COOKIE_NAME", {
|
|
223
239
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkQ5SZVLNB_cjs.CONSENT_COOKIE_NAME; }
|
|
225
241
|
});
|
|
226
242
|
Object.defineProperty(exports, "CONSENT_DISMISSAL_TIMESTAMP_KEY", {
|
|
227
243
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkQ5SZVLNB_cjs.CONSENT_DISMISSAL_TIMESTAMP_KEY; }
|
|
229
245
|
});
|
|
230
246
|
Object.defineProperty(exports, "COOKIE_VERSION", {
|
|
231
247
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkQ5SZVLNB_cjs.COOKIE_VERSION; }
|
|
233
249
|
});
|
|
234
250
|
Object.defineProperty(exports, "DEFAULT_CONSENT_ERROR_MESSAGES", {
|
|
235
251
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkQ5SZVLNB_cjs.DEFAULT_CONSENT_ERROR_MESSAGES; }
|
|
237
253
|
});
|
|
238
254
|
Object.defineProperty(exports, "FFIDAnalyticsProvider", {
|
|
239
255
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkQ5SZVLNB_cjs.FFIDAnalyticsProvider; }
|
|
241
257
|
});
|
|
242
258
|
Object.defineProperty(exports, "FFIDConsentError", {
|
|
243
259
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkQ5SZVLNB_cjs.FFIDConsentError; }
|
|
245
261
|
});
|
|
246
262
|
Object.defineProperty(exports, "FFIDCookieBanner", {
|
|
247
263
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkQ5SZVLNB_cjs.FFIDCookieBanner; }
|
|
249
265
|
});
|
|
250
266
|
Object.defineProperty(exports, "FFIDCookieLink", {
|
|
251
267
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkQ5SZVLNB_cjs.FFIDCookieLink; }
|
|
253
269
|
});
|
|
254
270
|
Object.defineProperty(exports, "FFIDCookieSettings", {
|
|
255
271
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkQ5SZVLNB_cjs.FFIDCookieSettings; }
|
|
257
273
|
});
|
|
258
274
|
Object.defineProperty(exports, "FFID_CONSENT_ERROR_CODES", {
|
|
259
275
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkQ5SZVLNB_cjs.FFID_CONSENT_ERROR_CODES; }
|
|
261
277
|
});
|
|
262
278
|
Object.defineProperty(exports, "clearConsentDismissalTimestamp", {
|
|
263
279
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
280
|
+
get: function () { return chunkQ5SZVLNB_cjs.clearConsentDismissalTimestamp; }
|
|
265
281
|
});
|
|
266
282
|
Object.defineProperty(exports, "decodeConsentCookie", {
|
|
267
283
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunkQ5SZVLNB_cjs.decodeConsentCookie; }
|
|
269
285
|
});
|
|
270
286
|
Object.defineProperty(exports, "encodeConsentCookie", {
|
|
271
287
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
288
|
+
get: function () { return chunkQ5SZVLNB_cjs.encodeConsentCookie; }
|
|
273
289
|
});
|
|
274
290
|
Object.defineProperty(exports, "readConsentCookie", {
|
|
275
291
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
292
|
+
get: function () { return chunkQ5SZVLNB_cjs.readConsentCookie; }
|
|
277
293
|
});
|
|
278
294
|
Object.defineProperty(exports, "readConsentDismissalTimestamp", {
|
|
279
295
|
enumerable: true,
|
|
280
|
-
get: function () { return
|
|
296
|
+
get: function () { return chunkQ5SZVLNB_cjs.readConsentDismissalTimestamp; }
|
|
281
297
|
});
|
|
282
298
|
Object.defineProperty(exports, "useFFIDConsent", {
|
|
283
299
|
enumerable: true,
|
|
284
|
-
get: function () { return
|
|
300
|
+
get: function () { return chunkQ5SZVLNB_cjs.useFFIDConsent; }
|
|
285
301
|
});
|
|
286
302
|
Object.defineProperty(exports, "useFFIDConsentPreferences", {
|
|
287
303
|
enumerable: true,
|
|
288
|
-
get: function () { return
|
|
304
|
+
get: function () { return chunkQ5SZVLNB_cjs.useFFIDConsentPreferences; }
|
|
289
305
|
});
|
|
290
306
|
Object.defineProperty(exports, "writeConsentCookie", {
|
|
291
307
|
enumerable: true,
|
|
292
|
-
get: function () { return
|
|
308
|
+
get: function () { return chunkQ5SZVLNB_cjs.writeConsentCookie; }
|
|
293
309
|
});
|
|
294
310
|
Object.defineProperty(exports, "writeConsentDismissalTimestamp", {
|
|
295
311
|
enumerable: true,
|
|
296
|
-
get: function () { return
|
|
312
|
+
get: function () { return chunkQ5SZVLNB_cjs.writeConsentDismissalTimestamp; }
|
|
297
313
|
});
|
|
298
314
|
exports.FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS;
|
|
299
315
|
exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as
|
|
2
|
-
export {
|
|
3
|
-
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-
|
|
1
|
+
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDOAuthUserInfoSubscription, L as FFIDAnnouncementsClientConfig, M as ListAnnouncementsOptions, N as FFIDAnnouncementsApiResponse, O as AnnouncementListResponse, P as FFIDAnnouncementsLogger } from './index-lAvUS_oz.cjs';
|
|
2
|
+
export { Q as Announcement, R as AnnouncementStatus, S as AnnouncementType, T as FFIDAnnouncementBadge, U as FFIDAnnouncementList, V as FFIDAnnouncementsError, W as FFIDAnnouncementsErrorCode, X as FFIDAnnouncementsServerResponse, Y as FFIDAssignableMemberRole, Z as FFIDCacheConfig, _ as FFIDContextValue, $ as FFIDInquiryCategory, a0 as FFIDInquiryCategorySite2026, a1 as FFIDInquiryForm, a2 as FFIDInquiryFormCategoryItem, a3 as FFIDInquiryFormClassNames, a4 as FFIDInquiryFormLegalLayout, a5 as FFIDInquiryFormOrganization, a6 as FFIDInquiryFormPlaceholderContext, a7 as FFIDInquiryFormPrefill, a8 as FFIDInquiryFormProps, a9 as FFIDInquiryFormSubmitData, aa as FFIDInquiryFormSubmitResult, ab as FFIDJwtClaims, ac as FFIDLoginButton, ad as FFIDMemberStatus, ae as FFIDOAuthTokenResponse, af as FFIDOAuthUserInfoMemberRole, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-lAvUS_oz.cjs';
|
|
3
|
+
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-CE01gYc4.cjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
6
6
|
import 'zod';
|
|
@@ -1045,6 +1045,110 @@ interface ComputeEffectiveStatusInput {
|
|
|
1045
1045
|
*/
|
|
1046
1046
|
declare function computeEffectiveStatusFromSession(input: ComputeEffectiveStatusInput, nowMs?: number): EffectiveSubscriptionStatus;
|
|
1047
1047
|
|
|
1048
|
+
/**
|
|
1049
|
+
* Access-control predicates for the `/oauth/userinfo` subscription blob.
|
|
1050
|
+
*
|
|
1051
|
+
* `FFIDOAuthUserInfo.subscription.effectiveStatus` (added in SDK 5.3.0 / FFID
|
|
1052
|
+
* #3353) is the canonical access-control signal for callers that consume the
|
|
1053
|
+
* OAuth userinfo path — including the agent hub `syncUserFromBearerToken`
|
|
1054
|
+
* primary sync path and any SSR / RSC code that reads the `FFIDProvider`
|
|
1055
|
+
* context.
|
|
1056
|
+
*
|
|
1057
|
+
* `FFIDSession.hasAccess()` / `.isBlocked` / `.isGrace` cover the **session**
|
|
1058
|
+
* path on the SDK consumer side. These helpers cover the **userinfo** path so
|
|
1059
|
+
* callers do not re-implement the predicate inline (and silently drift apart
|
|
1060
|
+
* across services), keeping FFID, SDK, and consumers on the same vocabulary.
|
|
1061
|
+
*
|
|
1062
|
+
* @see {@link FFIDOAuthUserInfoSubscription.effectiveStatus}
|
|
1063
|
+
* @see {@link computeEffectiveStatusFromSession}
|
|
1064
|
+
*/
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* `EffectiveSubscriptionStatus` values that grant access.
|
|
1068
|
+
*
|
|
1069
|
+
* Single source of truth shared with `client/ffid-client.ts` and any future
|
|
1070
|
+
* caller that needs to fan in on the same access predicate. Mirrors the FFID
|
|
1071
|
+
* backend constants in `src/app/api/v1/subscriptions/ext/check/route.ts`
|
|
1072
|
+
* (route-local) — change there forces a sync here in the same PR.
|
|
1073
|
+
*/
|
|
1074
|
+
declare const ACCESS_GRANTING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
|
|
1075
|
+
/**
|
|
1076
|
+
* `EffectiveSubscriptionStatus` values that should drive the explicit-block UI
|
|
1077
|
+
* (reactivation CTA, plan picker). Disjoint from
|
|
1078
|
+
* {@link ACCESS_GRANTING_EFFECTIVE_STATUSES}; `past_due_grace` is intentionally
|
|
1079
|
+
* in NEITHER set so callers can render an in-grace recovery banner without
|
|
1080
|
+
* tripping a "blocked screen" branch.
|
|
1081
|
+
*/
|
|
1082
|
+
declare const BLOCKING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
|
|
1083
|
+
/**
|
|
1084
|
+
* Decide whether the `/oauth/userinfo` subscription summary grants access.
|
|
1085
|
+
*
|
|
1086
|
+
* Returns `true` iff `sub.effectiveStatus` is in
|
|
1087
|
+
* {@link ACCESS_GRANTING_EFFECTIVE_STATUSES} (`active` or `past_due_grace`).
|
|
1088
|
+
*
|
|
1089
|
+
* Conservative fallback rules (security-critical — treat as part of the
|
|
1090
|
+
* contract, not implementation detail):
|
|
1091
|
+
*
|
|
1092
|
+
* - `sub === undefined` → `false`. Either the granted OAuth scope omits
|
|
1093
|
+
* `subscription:read` (FFID #3380) or the caller used `verifyAccessToken`
|
|
1094
|
+
* without `includeProfile`. NEITHER means "no contract" (contractless users
|
|
1095
|
+
* hit HTTP 403 upstream). Returning `false` here forces narrow-scope
|
|
1096
|
+
* callers to fetch the data explicitly; treating `undefined` as "grant" is
|
|
1097
|
+
* a security regression.
|
|
1098
|
+
* - `sub === null` → `false`. Caller has explicitly observed no subscription
|
|
1099
|
+
* summary (free / contractless user surfaced post-403). Deny.
|
|
1100
|
+
* - `sub.effectiveStatus === null` → `false`. Backward-compat path for FFID
|
|
1101
|
+
* versions before #3353 that did not populate the field. The legacy `status`
|
|
1102
|
+
* field is intentionally NOT consulted: it lacks grace-window resolution, so
|
|
1103
|
+
* falling back to it would diverge from `/ext/check` and risk granting access
|
|
1104
|
+
* during dunning. Callers on legacy FFID should upgrade or call `/ext/check`
|
|
1105
|
+
* for the canonical answer.
|
|
1106
|
+
*
|
|
1107
|
+
* @example Allow access in a Next.js middleware
|
|
1108
|
+
* ```ts
|
|
1109
|
+
* import { hasAccessFromUserinfo } from '@feelflow/ffid-sdk'
|
|
1110
|
+
*
|
|
1111
|
+
* if (!hasAccessFromUserinfo(userinfo.subscription)) {
|
|
1112
|
+
* return NextResponse.redirect(new URL('/plans', req.url))
|
|
1113
|
+
* }
|
|
1114
|
+
* ```
|
|
1115
|
+
*/
|
|
1116
|
+
declare function hasAccessFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* Decide whether the `/oauth/userinfo` subscription summary is in a
|
|
1119
|
+
* hard-blocked state.
|
|
1120
|
+
*
|
|
1121
|
+
* Returns `true` iff `sub.effectiveStatus` is in
|
|
1122
|
+
* {@link BLOCKING_EFFECTIVE_STATUSES} (`blocked` / `canceled` / `expired` /
|
|
1123
|
+
* `trial_expired`).
|
|
1124
|
+
*
|
|
1125
|
+
* **Not the negation of {@link hasAccessFromUserinfo}.** `past_due_grace`
|
|
1126
|
+
* grants access AND is not blocked (callers should still surface a recovery
|
|
1127
|
+
* banner). Conversely, `undefined` / `null` / `effectiveStatus === null`
|
|
1128
|
+
* return `false` here — the data is missing, not "blocked". Callers that
|
|
1129
|
+
* want a "should I show the blocked screen" predicate should branch on this
|
|
1130
|
+
* helper; callers that want a "should I grant access" predicate should use
|
|
1131
|
+
* {@link hasAccessFromUserinfo}. Treating absence as blocking here would
|
|
1132
|
+
* surface the blocked UI to every narrow-scope caller.
|
|
1133
|
+
*
|
|
1134
|
+
* **Intentional asymmetry with `FFIDServiceAccessDecision.isBlocked`.** The
|
|
1135
|
+
* `/ext/check` decision wrapper in `client/ffid-client.ts` flags absent
|
|
1136
|
+
* effectiveStatus as `isBlocked: true` because it folds **access-gate
|
|
1137
|
+
* results** (fail-closed: deny on unknown). This predicate flags **the
|
|
1138
|
+
* "blocked screen" UI signal** (fail-open on absence: do not paint the
|
|
1139
|
+
* blocked banner over a narrow-scope or legacy-FFID caller). The two live
|
|
1140
|
+
* at different layers and the asymmetry is by design — pair this with
|
|
1141
|
+
* {@link hasAccessFromUserinfo} when you want a complete access decision.
|
|
1142
|
+
*
|
|
1143
|
+
* @example Show blocked banner only on explicit block
|
|
1144
|
+
* ```ts
|
|
1145
|
+
* if (isBlockedFromUserinfo(userinfo.subscription)) {
|
|
1146
|
+
* return <BlockedBanner status={userinfo.subscription!.effectiveStatus!} />
|
|
1147
|
+
* }
|
|
1148
|
+
* ```
|
|
1149
|
+
*/
|
|
1150
|
+
declare function isBlockedFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
|
|
1151
|
+
|
|
1048
1152
|
/**
|
|
1049
1153
|
* FFID Announcements API Client
|
|
1050
1154
|
*
|
|
@@ -1208,4 +1312,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
1208
1312
|
};
|
|
1209
1313
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
1210
1314
|
|
|
1211
|
-
export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
|
1315
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as
|
|
2
|
-
export {
|
|
3
|
-
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-
|
|
1
|
+
import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDCheckServiceAccessParams, h as FFIDServiceAccessDecision, i as FFIDListMembersResponse, j as FFIDAddMemberParams, k as FFIDAddMemberResponse, l as FFIDAddMemberRequest, m as FFIDMemberRole, n as FFIDUpdateMemberRoleResponse, o as FFIDRemoveMemberResponse, p as FFIDProfileCallOptions, q as FFIDUserProfile, r as FFIDUpdateUserProfileRequest, s as FFIDAnalyticsConfig, t as FFIDCreateCheckoutParams, u as FFIDCheckoutSessionResponse, v as FFIDCreatePortalParams, w as FFIDPortalSessionResponse, x as FFIDVerifyAccessTokenOptions, y as FFIDOAuthUserInfo, z as FFIDInquiryCreateParams, A as FFIDInquiryCreateResponse, B as FFIDAuthMode, C as FFIDLogger, D as FFIDCacheAdapter, E as FFIDUser, G as FFIDOrganization, H as FFIDSubscription, I as FFIDSubscriptionContextValue, J as EffectiveSubscriptionStatus, K as FFIDOAuthUserInfoSubscription, L as FFIDAnnouncementsClientConfig, M as ListAnnouncementsOptions, N as FFIDAnnouncementsApiResponse, O as AnnouncementListResponse, P as FFIDAnnouncementsLogger } from './index-lAvUS_oz.js';
|
|
2
|
+
export { Q as Announcement, R as AnnouncementStatus, S as AnnouncementType, T as FFIDAnnouncementBadge, U as FFIDAnnouncementList, V as FFIDAnnouncementsError, W as FFIDAnnouncementsErrorCode, X as FFIDAnnouncementsServerResponse, Y as FFIDAssignableMemberRole, Z as FFIDCacheConfig, _ as FFIDContextValue, $ as FFIDInquiryCategory, a0 as FFIDInquiryCategorySite2026, a1 as FFIDInquiryForm, a2 as FFIDInquiryFormCategoryItem, a3 as FFIDInquiryFormClassNames, a4 as FFIDInquiryFormLegalLayout, a5 as FFIDInquiryFormOrganization, a6 as FFIDInquiryFormPlaceholderContext, a7 as FFIDInquiryFormPrefill, a8 as FFIDInquiryFormProps, a9 as FFIDInquiryFormSubmitData, aa as FFIDInquiryFormSubmitResult, ab as FFIDJwtClaims, ac as FFIDLoginButton, ad as FFIDMemberStatus, ae as FFIDOAuthTokenResponse, af as FFIDOAuthUserInfoMemberRole, ag as FFIDOrganizationMember, ah as FFIDOrganizationSwitcher, ai as FFIDRedirectErrorCode, aj as FFIDSeatModel, ak as FFIDServiceAccessDenialReason, al as FFIDServiceAccessFailPolicy, am as FFIDSubscriptionBadge, an as FFIDTokenIntrospectionResponse, ao as FFIDUserMenu, ap as FFID_INQUIRY_CATEGORIES, aq as FFID_INQUIRY_CATEGORIES_SITE_2026, ar as UseFFIDAnnouncementsOptions, as as UseFFIDAnnouncementsReturn, at as isFFIDInquiryCategorySite2026, au as useFFIDAnnouncements } from './index-lAvUS_oz.js';
|
|
3
|
+
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, o as FFIDAnalyticsProvider, p as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, r as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, w as FFIDConsentError, x as FFIDConsentErrorCode, y as FFIDConsentMergeStrategy, B as FFIDConsentMergeWarning, E as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, I as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, M as FFIDCookieBanner, N as FFIDCookieBannerClassNames, O as FFIDCookieBannerProps, Q as FFIDCookieLink, R as FFIDCookieLinkProps, f as FFIDCookiePolicy, T as FFIDCookieSettings, U as FFIDCookieSettingsClassNames, V as FFIDCookieSettingsProps, _ as FFID_CONSENT_ERROR_CODES, ae as UseFFIDConsentPreferencesReturn, af as UseFFIDConsentReturn, ag as clearConsentDismissalTimestamp, aj as decodeConsentCookie, al as encodeConsentCookie, an as readConsentCookie, ao as readConsentDismissalTimestamp, aq as useFFIDConsent, ar as useFFIDConsentPreferences, as as writeConsentCookie, at as writeConsentDismissalTimestamp } from './FFIDCookieLink-CE01gYc4.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
6
6
|
import 'zod';
|
|
@@ -1045,6 +1045,110 @@ interface ComputeEffectiveStatusInput {
|
|
|
1045
1045
|
*/
|
|
1046
1046
|
declare function computeEffectiveStatusFromSession(input: ComputeEffectiveStatusInput, nowMs?: number): EffectiveSubscriptionStatus;
|
|
1047
1047
|
|
|
1048
|
+
/**
|
|
1049
|
+
* Access-control predicates for the `/oauth/userinfo` subscription blob.
|
|
1050
|
+
*
|
|
1051
|
+
* `FFIDOAuthUserInfo.subscription.effectiveStatus` (added in SDK 5.3.0 / FFID
|
|
1052
|
+
* #3353) is the canonical access-control signal for callers that consume the
|
|
1053
|
+
* OAuth userinfo path — including the agent hub `syncUserFromBearerToken`
|
|
1054
|
+
* primary sync path and any SSR / RSC code that reads the `FFIDProvider`
|
|
1055
|
+
* context.
|
|
1056
|
+
*
|
|
1057
|
+
* `FFIDSession.hasAccess()` / `.isBlocked` / `.isGrace` cover the **session**
|
|
1058
|
+
* path on the SDK consumer side. These helpers cover the **userinfo** path so
|
|
1059
|
+
* callers do not re-implement the predicate inline (and silently drift apart
|
|
1060
|
+
* across services), keeping FFID, SDK, and consumers on the same vocabulary.
|
|
1061
|
+
*
|
|
1062
|
+
* @see {@link FFIDOAuthUserInfoSubscription.effectiveStatus}
|
|
1063
|
+
* @see {@link computeEffectiveStatusFromSession}
|
|
1064
|
+
*/
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* `EffectiveSubscriptionStatus` values that grant access.
|
|
1068
|
+
*
|
|
1069
|
+
* Single source of truth shared with `client/ffid-client.ts` and any future
|
|
1070
|
+
* caller that needs to fan in on the same access predicate. Mirrors the FFID
|
|
1071
|
+
* backend constants in `src/app/api/v1/subscriptions/ext/check/route.ts`
|
|
1072
|
+
* (route-local) — change there forces a sync here in the same PR.
|
|
1073
|
+
*/
|
|
1074
|
+
declare const ACCESS_GRANTING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
|
|
1075
|
+
/**
|
|
1076
|
+
* `EffectiveSubscriptionStatus` values that should drive the explicit-block UI
|
|
1077
|
+
* (reactivation CTA, plan picker). Disjoint from
|
|
1078
|
+
* {@link ACCESS_GRANTING_EFFECTIVE_STATUSES}; `past_due_grace` is intentionally
|
|
1079
|
+
* in NEITHER set so callers can render an in-grace recovery banner without
|
|
1080
|
+
* tripping a "blocked screen" branch.
|
|
1081
|
+
*/
|
|
1082
|
+
declare const BLOCKING_EFFECTIVE_STATUSES: readonly EffectiveSubscriptionStatus[];
|
|
1083
|
+
/**
|
|
1084
|
+
* Decide whether the `/oauth/userinfo` subscription summary grants access.
|
|
1085
|
+
*
|
|
1086
|
+
* Returns `true` iff `sub.effectiveStatus` is in
|
|
1087
|
+
* {@link ACCESS_GRANTING_EFFECTIVE_STATUSES} (`active` or `past_due_grace`).
|
|
1088
|
+
*
|
|
1089
|
+
* Conservative fallback rules (security-critical — treat as part of the
|
|
1090
|
+
* contract, not implementation detail):
|
|
1091
|
+
*
|
|
1092
|
+
* - `sub === undefined` → `false`. Either the granted OAuth scope omits
|
|
1093
|
+
* `subscription:read` (FFID #3380) or the caller used `verifyAccessToken`
|
|
1094
|
+
* without `includeProfile`. NEITHER means "no contract" (contractless users
|
|
1095
|
+
* hit HTTP 403 upstream). Returning `false` here forces narrow-scope
|
|
1096
|
+
* callers to fetch the data explicitly; treating `undefined` as "grant" is
|
|
1097
|
+
* a security regression.
|
|
1098
|
+
* - `sub === null` → `false`. Caller has explicitly observed no subscription
|
|
1099
|
+
* summary (free / contractless user surfaced post-403). Deny.
|
|
1100
|
+
* - `sub.effectiveStatus === null` → `false`. Backward-compat path for FFID
|
|
1101
|
+
* versions before #3353 that did not populate the field. The legacy `status`
|
|
1102
|
+
* field is intentionally NOT consulted: it lacks grace-window resolution, so
|
|
1103
|
+
* falling back to it would diverge from `/ext/check` and risk granting access
|
|
1104
|
+
* during dunning. Callers on legacy FFID should upgrade or call `/ext/check`
|
|
1105
|
+
* for the canonical answer.
|
|
1106
|
+
*
|
|
1107
|
+
* @example Allow access in a Next.js middleware
|
|
1108
|
+
* ```ts
|
|
1109
|
+
* import { hasAccessFromUserinfo } from '@feelflow/ffid-sdk'
|
|
1110
|
+
*
|
|
1111
|
+
* if (!hasAccessFromUserinfo(userinfo.subscription)) {
|
|
1112
|
+
* return NextResponse.redirect(new URL('/plans', req.url))
|
|
1113
|
+
* }
|
|
1114
|
+
* ```
|
|
1115
|
+
*/
|
|
1116
|
+
declare function hasAccessFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* Decide whether the `/oauth/userinfo` subscription summary is in a
|
|
1119
|
+
* hard-blocked state.
|
|
1120
|
+
*
|
|
1121
|
+
* Returns `true` iff `sub.effectiveStatus` is in
|
|
1122
|
+
* {@link BLOCKING_EFFECTIVE_STATUSES} (`blocked` / `canceled` / `expired` /
|
|
1123
|
+
* `trial_expired`).
|
|
1124
|
+
*
|
|
1125
|
+
* **Not the negation of {@link hasAccessFromUserinfo}.** `past_due_grace`
|
|
1126
|
+
* grants access AND is not blocked (callers should still surface a recovery
|
|
1127
|
+
* banner). Conversely, `undefined` / `null` / `effectiveStatus === null`
|
|
1128
|
+
* return `false` here — the data is missing, not "blocked". Callers that
|
|
1129
|
+
* want a "should I show the blocked screen" predicate should branch on this
|
|
1130
|
+
* helper; callers that want a "should I grant access" predicate should use
|
|
1131
|
+
* {@link hasAccessFromUserinfo}. Treating absence as blocking here would
|
|
1132
|
+
* surface the blocked UI to every narrow-scope caller.
|
|
1133
|
+
*
|
|
1134
|
+
* **Intentional asymmetry with `FFIDServiceAccessDecision.isBlocked`.** The
|
|
1135
|
+
* `/ext/check` decision wrapper in `client/ffid-client.ts` flags absent
|
|
1136
|
+
* effectiveStatus as `isBlocked: true` because it folds **access-gate
|
|
1137
|
+
* results** (fail-closed: deny on unknown). This predicate flags **the
|
|
1138
|
+
* "blocked screen" UI signal** (fail-open on absence: do not paint the
|
|
1139
|
+
* blocked banner over a narrow-scope or legacy-FFID caller). The two live
|
|
1140
|
+
* at different layers and the asymmetry is by design — pair this with
|
|
1141
|
+
* {@link hasAccessFromUserinfo} when you want a complete access decision.
|
|
1142
|
+
*
|
|
1143
|
+
* @example Show blocked banner only on explicit block
|
|
1144
|
+
* ```ts
|
|
1145
|
+
* if (isBlockedFromUserinfo(userinfo.subscription)) {
|
|
1146
|
+
* return <BlockedBanner status={userinfo.subscription!.effectiveStatus!} />
|
|
1147
|
+
* }
|
|
1148
|
+
* ```
|
|
1149
|
+
*/
|
|
1150
|
+
declare function isBlockedFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
|
|
1151
|
+
|
|
1048
1152
|
/**
|
|
1049
1153
|
* FFID Announcements API Client
|
|
1050
1154
|
*
|
|
@@ -1208,4 +1312,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
1208
1312
|
};
|
|
1209
1313
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
1210
1314
|
|
|
1211
|
-
export { AnnouncementListResponse, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
|
1315
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUpdateUserProfileRequest, FFIDUser, FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-
|
|
1
|
+
import { useFFIDContext, useSubscription } from './chunk-WNYMSUHN.js';
|
|
2
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-WNYMSUHN.js';
|
|
3
|
+
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-KJ7FUNA6.js';
|
|
4
4
|
import { useEffect, useRef } from 'react';
|
|
5
5
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
|