@feelflow/ffid-sdk 5.12.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-KB2JG64Z.js → chunk-4II4R7NR.js} +392 -10
- package/dist/{chunk-AOJDV3UO.cjs → chunk-BVDUQQHP.cjs} +395 -9
- 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-5IprSUVR.d.ts → ffid-client-9-lh0G_h.d.ts} +384 -134
- package/dist/{ffid-client-Dx4oc4Cw.d.cts → ffid-client-CKFxY60u.d.cts} +384 -134
- package/dist/{index-DqsWKU16.d.cts → index-CsVJTuPv.d.cts} +14 -112
- package/dist/{index-DqsWKU16.d.ts → index-CsVJTuPv.d.ts} +14 -112
- package/dist/index.cjs +53 -37
- package/dist/index.d.cts +436 -4
- package/dist/index.d.ts +436 -4
- package/dist/index.js +2 -2
- package/dist/legal/index.cjs +14 -0
- package/dist/legal/index.d.cts +16 -1
- package/dist/legal/index.d.ts +16 -1
- package/dist/legal/index.js +14 -0
- package/dist/server/index.cjs +241 -3
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +241 -3
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/dist/webhooks/index.cjs +5 -2
- package/dist/webhooks/index.js +5 -2
- package/package.json +1 -1
|
@@ -325,6 +325,17 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
325
325
|
interface FFIDOAuthUserInfo {
|
|
326
326
|
sub: string;
|
|
327
327
|
email: string | null;
|
|
328
|
+
/**
|
|
329
|
+
* Whether the user's email is verified on the FFID side (#3791). Use this to
|
|
330
|
+
* safely gate email-based auto account-linking (account-takeover prevention):
|
|
331
|
+
* never auto-link on an unverified email.
|
|
332
|
+
*
|
|
333
|
+
* `undefined` means the FFID server predates the field (older deployment) or
|
|
334
|
+
* the verification path could not populate it — NOT "unverified". Treat
|
|
335
|
+
* `undefined` as "unknown" and fall back to a stricter linking policy rather
|
|
336
|
+
* than coercing it to `false`/`true`.
|
|
337
|
+
*/
|
|
338
|
+
emailVerified?: boolean | undefined;
|
|
328
339
|
name: string | null;
|
|
329
340
|
picture: string | null;
|
|
330
341
|
companyName?: string | null | undefined;
|
|
@@ -633,75 +644,6 @@ type FFIDApiResponse<T> = {
|
|
|
633
644
|
error: FFIDError;
|
|
634
645
|
};
|
|
635
646
|
|
|
636
|
-
/**
|
|
637
|
-
* User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
|
|
638
|
-
*
|
|
639
|
-
* Mirrors the FFID backend `UserProfile` shape exposed via
|
|
640
|
-
* `GET /api/v1/users/ext/me` and `PUT /api/v1/users/ext/me`.
|
|
641
|
-
*/
|
|
642
|
-
interface FFIDUserProfile {
|
|
643
|
-
/** User ID (UUID) */
|
|
644
|
-
id: string;
|
|
645
|
-
/** Email address */
|
|
646
|
-
email: string;
|
|
647
|
-
/** Display name (nullable when not set) */
|
|
648
|
-
displayName: string | null;
|
|
649
|
-
/** Avatar URL (nullable when not set) */
|
|
650
|
-
avatarUrl: string | null;
|
|
651
|
-
/** Phone number (nullable when not set) */
|
|
652
|
-
phone: string | null;
|
|
653
|
-
/** Company name (nullable when not set) */
|
|
654
|
-
companyName: string | null;
|
|
655
|
-
/** Department (nullable when not set) */
|
|
656
|
-
department: string | null;
|
|
657
|
-
/** Job title (nullable when not set) */
|
|
658
|
-
jobTitle: string | null;
|
|
659
|
-
/** IANA timezone (e.g. 'Asia/Tokyo') */
|
|
660
|
-
timezone: string;
|
|
661
|
-
/** Locale (e.g. 'ja', 'en') */
|
|
662
|
-
locale: string;
|
|
663
|
-
/** Arbitrary user preferences bag */
|
|
664
|
-
preferences: Record<string, unknown>;
|
|
665
|
-
/** Account creation timestamp (ISO 8601) */
|
|
666
|
-
createdAt: string;
|
|
667
|
-
/** Profile last-updated timestamp (ISO 8601) */
|
|
668
|
-
updatedAt: string;
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* Per-call options for profile methods (`getProfile` / `updateProfile`).
|
|
672
|
-
*
|
|
673
|
-
* Supply `accessToken` to forward an end-user Bearer token for the single call
|
|
674
|
-
* without mutating client-level auth state. Designed for server runtimes (Cloudflare
|
|
675
|
-
* Workers, Edge, Node) that receive a user-scoped Bearer per request and want to
|
|
676
|
-
* act as that user against `/api/v1/users/ext/me`.
|
|
677
|
-
*
|
|
678
|
-
* When `accessToken` is supplied with a non-empty value, it overrides the client's
|
|
679
|
-
* configured auth mode: authentication for that request uses only
|
|
680
|
-
* `Authorization: Bearer <accessToken>` (no service key, no cookie, no token-store
|
|
681
|
-
* lookup, no auto-refresh on 401). Non-auth headers such as `Content-Type` are
|
|
682
|
-
* still attached. SDK metadata headers (`User-Agent` / `X-FFID-SDK-Version`) are
|
|
683
|
-
* attached on non-browser runtimes only (Node.js / Cloudflare Workers / Edge /
|
|
684
|
-
* Deno); browsers receive an empty object to avoid iOS WebKit `fetch()` breakage
|
|
685
|
-
* (see #2417).
|
|
686
|
-
*
|
|
687
|
-
* Runtime semantics:
|
|
688
|
-
* - `accessToken` omitted (or `undefined`) → no override, configured `authMode` is used
|
|
689
|
-
* - `accessToken` is empty string / whitespace-only → rejected as `VALIDATION_ERROR`
|
|
690
|
-
* before any network call (prevents silent impersonation fallback when a caller
|
|
691
|
-
* extracts a missing/blank `Authorization` header into this field)
|
|
692
|
-
* - `accessToken` is a non-empty string → override activated
|
|
693
|
-
*/
|
|
694
|
-
interface FFIDProfileCallOptions {
|
|
695
|
-
/**
|
|
696
|
-
* End-user Bearer token forwarded for this single request.
|
|
697
|
-
*
|
|
698
|
-
* Must be a non-empty string when supplied. Passing `''` or a whitespace-only
|
|
699
|
-
* string is treated as a caller error and surfaces as `VALIDATION_ERROR` —
|
|
700
|
-
* this guards against the common footgun where a server runtime extracts the
|
|
701
|
-
* Bearer from an incoming request without checking the header is present.
|
|
702
|
-
*/
|
|
703
|
-
accessToken?: string;
|
|
704
|
-
}
|
|
705
647
|
/**
|
|
706
648
|
* Response shape from `GET /api/v1/ext/analytics/config?service=<code>`.
|
|
707
649
|
*
|
|
@@ -725,48 +667,6 @@ interface FFIDAnalyticsConfig {
|
|
|
725
667
|
*/
|
|
726
668
|
isActive: boolean;
|
|
727
669
|
}
|
|
728
|
-
/**
|
|
729
|
-
* Request payload for `updateProfile`.
|
|
730
|
-
*
|
|
731
|
-
* Mirrors the FFID backend `UpdateUserProfileRequest` shape. All fields are
|
|
732
|
-
* optional — only the supplied keys will be updated (partial update semantics).
|
|
733
|
-
*
|
|
734
|
-
* Per-field value semantics:
|
|
735
|
-
* - `undefined` / key omitted → field is untouched (partial update)
|
|
736
|
-
* - `null` → clears the field (stores SQL NULL in the DB)
|
|
737
|
-
* - `""` (empty string) → stored as a literal empty string, **not** treated as
|
|
738
|
-
* a clear. Use `null` when you want the DB value to become NULL
|
|
739
|
-
*
|
|
740
|
-
* `timezone` and `locale` are intentionally modeled as non-null in this
|
|
741
|
-
* request type (application-level invariant — the DB columns have DEFAULT
|
|
742
|
-
* values but no NOT NULL constraint, yet the server-side normalization
|
|
743
|
-
* pipeline assumes a string is always present). Pass a string to update the
|
|
744
|
-
* value, or omit the key to leave the current value in place. Do not pass
|
|
745
|
-
* `null` to clear — there is no meaningful "no timezone" state for a user.
|
|
746
|
-
*
|
|
747
|
-
* `preferences: null` is accepted and clears the column. Subsequent reads
|
|
748
|
-
* return `{}` because the FFID backend normalizes a null `preferences` column
|
|
749
|
-
* to an empty object (`toUserProfile` helper) before serializing the response —
|
|
750
|
-
* the SDK itself does not transform the payload.
|
|
751
|
-
*/
|
|
752
|
-
interface FFIDUpdateUserProfileRequest {
|
|
753
|
-
/** Display name (null clears the field) */
|
|
754
|
-
displayName?: string | null;
|
|
755
|
-
/** Phone number (null clears the field) */
|
|
756
|
-
phone?: string | null;
|
|
757
|
-
/** Company name (null clears the field) */
|
|
758
|
-
companyName?: string | null;
|
|
759
|
-
/** Department (null clears the field) */
|
|
760
|
-
department?: string | null;
|
|
761
|
-
/** Job title (null clears the field) */
|
|
762
|
-
jobTitle?: string | null;
|
|
763
|
-
/** IANA timezone (non-null; omit the key to leave unchanged) */
|
|
764
|
-
timezone?: string;
|
|
765
|
-
/** Locale (non-null; omit the key to leave unchanged) */
|
|
766
|
-
locale?: string;
|
|
767
|
-
/** Arbitrary user preferences bag (null clears the column; reads return {}) */
|
|
768
|
-
preferences?: Record<string, unknown> | null;
|
|
769
|
-
}
|
|
770
670
|
/**
|
|
771
671
|
* Discriminant for redirect failures that callers need to handle
|
|
772
672
|
* programmatically (vs. logging the human-readable `error` string).
|
|
@@ -819,6 +719,8 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
819
719
|
active: boolean;
|
|
820
720
|
sub?: string;
|
|
821
721
|
email?: string;
|
|
722
|
+
/** Whether the user's email is verified (#3791). Optional for backward compat with older FFID. */
|
|
723
|
+
email_verified?: boolean;
|
|
822
724
|
name?: string;
|
|
823
725
|
picture?: string | null;
|
|
824
726
|
company_name?: string | null;
|
|
@@ -1546,4 +1448,4 @@ interface FFIDInquiryFormPlaceholderContext {
|
|
|
1546
1448
|
}
|
|
1547
1449
|
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;
|
|
1548
1450
|
|
|
1549
|
-
export { type
|
|
1451
|
+
export { type FFIDOAuthTokenResponse as $, type AnnouncementListResponse as A, type AnnouncementType as B, EFFECTIVE_SUBSCRIPTION_STATUSES as C, FFIDAnnouncementBadge as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementList as G, type FFIDAnnouncementsError as H, type FFIDAnnouncementsErrorCode as I, type FFIDAnnouncementsServerResponse as J, type FFIDCacheConfig as K, type ListAnnouncementsOptions as L, type FFIDContextValue as M, type FFIDInquiryCategory as N, type FFIDInquiryCategorySite2026 as O, FFIDInquiryForm as P, type FFIDInquiryFormCategoryItem as Q, type FFIDInquiryFormClassNames as R, type FFIDInquiryFormLegalLayout as S, type FFIDInquiryFormOrganization as T, type FFIDInquiryFormPlaceholderContext as U, type FFIDInquiryFormPrefill as V, type FFIDInquiryFormProps as W, type FFIDInquiryFormSubmitData as X, type FFIDInquiryFormSubmitResult as Y, type FFIDJwtClaims as Z, FFIDLoginButton as _, type FFIDConfig as a, type FFIDOAuthUserInfoMemberRole as a0, FFIDOrganizationSwitcher as a1, type FFIDRedirectErrorCode as a2, type FFIDSeatModel as a3, type FFIDServiceAccessDenialReason as a4, type FFIDServiceAccessFailPolicy as a5, FFIDSubscriptionBadge as a6, type FFIDTokenIntrospectionResponse as a7, FFIDUserMenu as a8, FFID_INQUIRY_CATEGORIES as a9, FFID_INQUIRY_CATEGORIES_SITE_2026 as aa, type UseFFIDAnnouncementsOptions as ab, type UseFFIDAnnouncementsReturn as ac, isFFIDInquiryCategorySite2026 as ad, useFFIDAnnouncements as ae, type FFIDAnnouncementBadgeClassNames as af, type FFIDAnnouncementBadgeProps as ag, type FFIDAnnouncementListClassNames as ah, type FFIDAnnouncementListProps as ai, type FFIDLoginButtonProps as aj, type FFIDOrganizationSwitcherClassNames as ak, type FFIDOrganizationSwitcherProps as al, type FFIDSubscriptionBadgeClassNames as am, type FFIDSubscriptionBadgeProps as an, type FFIDUserMenuClassNames as ao, type FFIDUserMenuProps as ap, 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 FFIDAnalyticsConfig as i, type FFIDVerifyAccessTokenOptions as j, type FFIDOAuthUserInfo as k, type FFIDInquiryCreateParams as l, type FFIDInquiryCreateResponse as m, type FFIDAuthMode as n, type FFIDLogger as o, type FFIDCacheAdapter as p, type FFIDUser as q, type FFIDOrganization as r, type FFIDSubscription as s, type FFIDSubscriptionContextValue as t, type FFIDOAuthUserInfoSubscription as u, type FFIDAnnouncementsClientConfig as v, type FFIDAnnouncementsApiResponse as w, type FFIDAnnouncementsLogger as x, type Announcement as y, type AnnouncementStatus as z };
|
|
@@ -325,6 +325,17 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
325
325
|
interface FFIDOAuthUserInfo {
|
|
326
326
|
sub: string;
|
|
327
327
|
email: string | null;
|
|
328
|
+
/**
|
|
329
|
+
* Whether the user's email is verified on the FFID side (#3791). Use this to
|
|
330
|
+
* safely gate email-based auto account-linking (account-takeover prevention):
|
|
331
|
+
* never auto-link on an unverified email.
|
|
332
|
+
*
|
|
333
|
+
* `undefined` means the FFID server predates the field (older deployment) or
|
|
334
|
+
* the verification path could not populate it — NOT "unverified". Treat
|
|
335
|
+
* `undefined` as "unknown" and fall back to a stricter linking policy rather
|
|
336
|
+
* than coercing it to `false`/`true`.
|
|
337
|
+
*/
|
|
338
|
+
emailVerified?: boolean | undefined;
|
|
328
339
|
name: string | null;
|
|
329
340
|
picture: string | null;
|
|
330
341
|
companyName?: string | null | undefined;
|
|
@@ -633,75 +644,6 @@ type FFIDApiResponse<T> = {
|
|
|
633
644
|
error: FFIDError;
|
|
634
645
|
};
|
|
635
646
|
|
|
636
|
-
/**
|
|
637
|
-
* User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
|
|
638
|
-
*
|
|
639
|
-
* Mirrors the FFID backend `UserProfile` shape exposed via
|
|
640
|
-
* `GET /api/v1/users/ext/me` and `PUT /api/v1/users/ext/me`.
|
|
641
|
-
*/
|
|
642
|
-
interface FFIDUserProfile {
|
|
643
|
-
/** User ID (UUID) */
|
|
644
|
-
id: string;
|
|
645
|
-
/** Email address */
|
|
646
|
-
email: string;
|
|
647
|
-
/** Display name (nullable when not set) */
|
|
648
|
-
displayName: string | null;
|
|
649
|
-
/** Avatar URL (nullable when not set) */
|
|
650
|
-
avatarUrl: string | null;
|
|
651
|
-
/** Phone number (nullable when not set) */
|
|
652
|
-
phone: string | null;
|
|
653
|
-
/** Company name (nullable when not set) */
|
|
654
|
-
companyName: string | null;
|
|
655
|
-
/** Department (nullable when not set) */
|
|
656
|
-
department: string | null;
|
|
657
|
-
/** Job title (nullable when not set) */
|
|
658
|
-
jobTitle: string | null;
|
|
659
|
-
/** IANA timezone (e.g. 'Asia/Tokyo') */
|
|
660
|
-
timezone: string;
|
|
661
|
-
/** Locale (e.g. 'ja', 'en') */
|
|
662
|
-
locale: string;
|
|
663
|
-
/** Arbitrary user preferences bag */
|
|
664
|
-
preferences: Record<string, unknown>;
|
|
665
|
-
/** Account creation timestamp (ISO 8601) */
|
|
666
|
-
createdAt: string;
|
|
667
|
-
/** Profile last-updated timestamp (ISO 8601) */
|
|
668
|
-
updatedAt: string;
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* Per-call options for profile methods (`getProfile` / `updateProfile`).
|
|
672
|
-
*
|
|
673
|
-
* Supply `accessToken` to forward an end-user Bearer token for the single call
|
|
674
|
-
* without mutating client-level auth state. Designed for server runtimes (Cloudflare
|
|
675
|
-
* Workers, Edge, Node) that receive a user-scoped Bearer per request and want to
|
|
676
|
-
* act as that user against `/api/v1/users/ext/me`.
|
|
677
|
-
*
|
|
678
|
-
* When `accessToken` is supplied with a non-empty value, it overrides the client's
|
|
679
|
-
* configured auth mode: authentication for that request uses only
|
|
680
|
-
* `Authorization: Bearer <accessToken>` (no service key, no cookie, no token-store
|
|
681
|
-
* lookup, no auto-refresh on 401). Non-auth headers such as `Content-Type` are
|
|
682
|
-
* still attached. SDK metadata headers (`User-Agent` / `X-FFID-SDK-Version`) are
|
|
683
|
-
* attached on non-browser runtimes only (Node.js / Cloudflare Workers / Edge /
|
|
684
|
-
* Deno); browsers receive an empty object to avoid iOS WebKit `fetch()` breakage
|
|
685
|
-
* (see #2417).
|
|
686
|
-
*
|
|
687
|
-
* Runtime semantics:
|
|
688
|
-
* - `accessToken` omitted (or `undefined`) → no override, configured `authMode` is used
|
|
689
|
-
* - `accessToken` is empty string / whitespace-only → rejected as `VALIDATION_ERROR`
|
|
690
|
-
* before any network call (prevents silent impersonation fallback when a caller
|
|
691
|
-
* extracts a missing/blank `Authorization` header into this field)
|
|
692
|
-
* - `accessToken` is a non-empty string → override activated
|
|
693
|
-
*/
|
|
694
|
-
interface FFIDProfileCallOptions {
|
|
695
|
-
/**
|
|
696
|
-
* End-user Bearer token forwarded for this single request.
|
|
697
|
-
*
|
|
698
|
-
* Must be a non-empty string when supplied. Passing `''` or a whitespace-only
|
|
699
|
-
* string is treated as a caller error and surfaces as `VALIDATION_ERROR` —
|
|
700
|
-
* this guards against the common footgun where a server runtime extracts the
|
|
701
|
-
* Bearer from an incoming request without checking the header is present.
|
|
702
|
-
*/
|
|
703
|
-
accessToken?: string;
|
|
704
|
-
}
|
|
705
647
|
/**
|
|
706
648
|
* Response shape from `GET /api/v1/ext/analytics/config?service=<code>`.
|
|
707
649
|
*
|
|
@@ -725,48 +667,6 @@ interface FFIDAnalyticsConfig {
|
|
|
725
667
|
*/
|
|
726
668
|
isActive: boolean;
|
|
727
669
|
}
|
|
728
|
-
/**
|
|
729
|
-
* Request payload for `updateProfile`.
|
|
730
|
-
*
|
|
731
|
-
* Mirrors the FFID backend `UpdateUserProfileRequest` shape. All fields are
|
|
732
|
-
* optional — only the supplied keys will be updated (partial update semantics).
|
|
733
|
-
*
|
|
734
|
-
* Per-field value semantics:
|
|
735
|
-
* - `undefined` / key omitted → field is untouched (partial update)
|
|
736
|
-
* - `null` → clears the field (stores SQL NULL in the DB)
|
|
737
|
-
* - `""` (empty string) → stored as a literal empty string, **not** treated as
|
|
738
|
-
* a clear. Use `null` when you want the DB value to become NULL
|
|
739
|
-
*
|
|
740
|
-
* `timezone` and `locale` are intentionally modeled as non-null in this
|
|
741
|
-
* request type (application-level invariant — the DB columns have DEFAULT
|
|
742
|
-
* values but no NOT NULL constraint, yet the server-side normalization
|
|
743
|
-
* pipeline assumes a string is always present). Pass a string to update the
|
|
744
|
-
* value, or omit the key to leave the current value in place. Do not pass
|
|
745
|
-
* `null` to clear — there is no meaningful "no timezone" state for a user.
|
|
746
|
-
*
|
|
747
|
-
* `preferences: null` is accepted and clears the column. Subsequent reads
|
|
748
|
-
* return `{}` because the FFID backend normalizes a null `preferences` column
|
|
749
|
-
* to an empty object (`toUserProfile` helper) before serializing the response —
|
|
750
|
-
* the SDK itself does not transform the payload.
|
|
751
|
-
*/
|
|
752
|
-
interface FFIDUpdateUserProfileRequest {
|
|
753
|
-
/** Display name (null clears the field) */
|
|
754
|
-
displayName?: string | null;
|
|
755
|
-
/** Phone number (null clears the field) */
|
|
756
|
-
phone?: string | null;
|
|
757
|
-
/** Company name (null clears the field) */
|
|
758
|
-
companyName?: string | null;
|
|
759
|
-
/** Department (null clears the field) */
|
|
760
|
-
department?: string | null;
|
|
761
|
-
/** Job title (null clears the field) */
|
|
762
|
-
jobTitle?: string | null;
|
|
763
|
-
/** IANA timezone (non-null; omit the key to leave unchanged) */
|
|
764
|
-
timezone?: string;
|
|
765
|
-
/** Locale (non-null; omit the key to leave unchanged) */
|
|
766
|
-
locale?: string;
|
|
767
|
-
/** Arbitrary user preferences bag (null clears the column; reads return {}) */
|
|
768
|
-
preferences?: Record<string, unknown> | null;
|
|
769
|
-
}
|
|
770
670
|
/**
|
|
771
671
|
* Discriminant for redirect failures that callers need to handle
|
|
772
672
|
* programmatically (vs. logging the human-readable `error` string).
|
|
@@ -819,6 +719,8 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
819
719
|
active: boolean;
|
|
820
720
|
sub?: string;
|
|
821
721
|
email?: string;
|
|
722
|
+
/** Whether the user's email is verified (#3791). Optional for backward compat with older FFID. */
|
|
723
|
+
email_verified?: boolean;
|
|
822
724
|
name?: string;
|
|
823
725
|
picture?: string | null;
|
|
824
726
|
company_name?: string | null;
|
|
@@ -1546,4 +1448,4 @@ interface FFIDInquiryFormPlaceholderContext {
|
|
|
1546
1448
|
}
|
|
1547
1449
|
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;
|
|
1548
1450
|
|
|
1549
|
-
export { type
|
|
1451
|
+
export { type FFIDOAuthTokenResponse as $, type AnnouncementListResponse as A, type AnnouncementType as B, EFFECTIVE_SUBSCRIPTION_STATUSES as C, FFIDAnnouncementBadge as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementList as G, type FFIDAnnouncementsError as H, type FFIDAnnouncementsErrorCode as I, type FFIDAnnouncementsServerResponse as J, type FFIDCacheConfig as K, type ListAnnouncementsOptions as L, type FFIDContextValue as M, type FFIDInquiryCategory as N, type FFIDInquiryCategorySite2026 as O, FFIDInquiryForm as P, type FFIDInquiryFormCategoryItem as Q, type FFIDInquiryFormClassNames as R, type FFIDInquiryFormLegalLayout as S, type FFIDInquiryFormOrganization as T, type FFIDInquiryFormPlaceholderContext as U, type FFIDInquiryFormPrefill as V, type FFIDInquiryFormProps as W, type FFIDInquiryFormSubmitData as X, type FFIDInquiryFormSubmitResult as Y, type FFIDJwtClaims as Z, FFIDLoginButton as _, type FFIDConfig as a, type FFIDOAuthUserInfoMemberRole as a0, FFIDOrganizationSwitcher as a1, type FFIDRedirectErrorCode as a2, type FFIDSeatModel as a3, type FFIDServiceAccessDenialReason as a4, type FFIDServiceAccessFailPolicy as a5, FFIDSubscriptionBadge as a6, type FFIDTokenIntrospectionResponse as a7, FFIDUserMenu as a8, FFID_INQUIRY_CATEGORIES as a9, FFID_INQUIRY_CATEGORIES_SITE_2026 as aa, type UseFFIDAnnouncementsOptions as ab, type UseFFIDAnnouncementsReturn as ac, isFFIDInquiryCategorySite2026 as ad, useFFIDAnnouncements as ae, type FFIDAnnouncementBadgeClassNames as af, type FFIDAnnouncementBadgeProps as ag, type FFIDAnnouncementListClassNames as ah, type FFIDAnnouncementListProps as ai, type FFIDLoginButtonProps as aj, type FFIDOrganizationSwitcherClassNames as ak, type FFIDOrganizationSwitcherProps as al, type FFIDSubscriptionBadgeClassNames as am, type FFIDSubscriptionBadgeProps as an, type FFIDUserMenuClassNames as ao, type FFIDUserMenuProps as ap, 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 FFIDAnalyticsConfig as i, type FFIDVerifyAccessTokenOptions as j, type FFIDOAuthUserInfo as k, type FFIDInquiryCreateParams as l, type FFIDInquiryCreateResponse as m, type FFIDAuthMode as n, type FFIDLogger as o, type FFIDCacheAdapter as p, type FFIDUser as q, type FFIDOrganization as r, type FFIDSubscription as s, type FFIDSubscriptionContextValue as t, type FFIDOAuthUserInfoSubscription as u, type FFIDAnnouncementsClientConfig as v, type FFIDAnnouncementsApiResponse as w, type FFIDAnnouncementsLogger as x, type Announcement as y, type AnnouncementStatus as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkBVDUQQHP_cjs = require('./chunk-BVDUQQHP.cjs');
|
|
4
4
|
var chunkR5WSZMUL_cjs = require('./chunk-R5WSZMUL.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
|
|
|
54
54
|
}
|
|
55
55
|
function useRequireActiveSubscription(options) {
|
|
56
56
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
57
|
-
const { isLoading, error } =
|
|
58
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
57
|
+
const { isLoading, error } = chunkBVDUQQHP_cjs.useFFIDContext();
|
|
58
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkBVDUQQHP_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 } = chunkBVDUQQHP_cjs.useFFIDContext();
|
|
80
80
|
const hasRedirected = react.useRef(false);
|
|
81
81
|
react.useEffect(() => {
|
|
82
82
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -105,135 +105,151 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
|
105
105
|
|
|
106
106
|
Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkBVDUQQHP_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkBVDUQQHP_cjs.BLOCKING_EFFECTIVE_STATUSES; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkBVDUQQHP_cjs.DEFAULT_API_BASE_URL; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkBVDUQQHP_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkBVDUQQHP_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDAnnouncementBadge; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDAnnouncementList; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDInquiryForm; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDLoginButton; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDOrganizationSwitcher; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDProvider; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDSDKError; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDSubscriptionBadge; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkBVDUQQHP_cjs.FFIDUserMenu; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkBVDUQQHP_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkBVDUQQHP_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkBVDUQQHP_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "clearState", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () { return chunkBVDUQQHP_cjs.cleanupStateStorage; }
|
|
173
177
|
});
|
|
174
178
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
175
179
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkBVDUQQHP_cjs.computeEffectiveStatusFromSession; }
|
|
177
181
|
});
|
|
178
182
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
179
183
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkBVDUQQHP_cjs.createFFIDAnnouncementsClient; }
|
|
181
185
|
});
|
|
182
186
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
183
187
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkBVDUQQHP_cjs.createFFIDClient; }
|
|
185
189
|
});
|
|
186
190
|
Object.defineProperty(exports, "createTokenStore", {
|
|
187
191
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkBVDUQQHP_cjs.createTokenStore; }
|
|
189
193
|
});
|
|
190
194
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
191
195
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkBVDUQQHP_cjs.generateCodeChallenge; }
|
|
193
197
|
});
|
|
194
198
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
195
199
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkBVDUQQHP_cjs.generateCodeVerifier; }
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(exports, "handleRedirectCallback", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
get: function () { return chunkBVDUQQHP_cjs.handleRedirectCallback; }
|
|
197
205
|
});
|
|
198
206
|
Object.defineProperty(exports, "hasAccessFromUserinfo", {
|
|
199
207
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkBVDUQQHP_cjs.hasAccessFromUserinfo; }
|
|
201
209
|
});
|
|
202
210
|
Object.defineProperty(exports, "isBlockedFromUserinfo", {
|
|
203
211
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkBVDUQQHP_cjs.isBlockedFromUserinfo; }
|
|
205
213
|
});
|
|
206
214
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
207
215
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkBVDUQQHP_cjs.isFFIDInquiryCategorySite2026; }
|
|
209
217
|
});
|
|
210
218
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
211
219
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkBVDUQQHP_cjs.normalizeRedirectUri; }
|
|
213
221
|
});
|
|
214
222
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
215
223
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkBVDUQQHP_cjs.retrieveCodeVerifier; }
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(exports, "retrieveState", {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () { return chunkBVDUQQHP_cjs.retrieveState; }
|
|
217
229
|
});
|
|
218
230
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
219
231
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkBVDUQQHP_cjs.storeCodeVerifier; }
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "storeState", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () { return chunkBVDUQQHP_cjs.storeState; }
|
|
221
237
|
});
|
|
222
238
|
Object.defineProperty(exports, "useFFID", {
|
|
223
239
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkBVDUQQHP_cjs.useFFID; }
|
|
225
241
|
});
|
|
226
242
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
227
243
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkBVDUQQHP_cjs.useFFIDAnnouncements; }
|
|
229
245
|
});
|
|
230
246
|
Object.defineProperty(exports, "useSubscription", {
|
|
231
247
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkBVDUQQHP_cjs.useSubscription; }
|
|
233
249
|
});
|
|
234
250
|
Object.defineProperty(exports, "withSubscription", {
|
|
235
251
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkBVDUQQHP_cjs.withSubscription; }
|
|
237
253
|
});
|
|
238
254
|
Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
|
|
239
255
|
enumerable: true,
|