@feelflow/ffid-sdk 5.10.0 → 5.12.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.
@@ -1,4 +1,4 @@
1
- import { E as EffectiveSubscriptionStatus } from './types-BYdtyO_2.js';
1
+ import { E as EffectiveSubscriptionStatus } from './types-BeVl-z12.cjs';
2
2
 
3
3
  /**
4
4
  * Inquiry types exposed by the FFID SDK.
@@ -270,6 +270,52 @@ interface FFIDServiceAccessDecision {
270
270
  error?: FFIDServiceAccessError;
271
271
  }
272
272
 
273
+ /**
274
+ * Billing checkout / portal session types.
275
+ *
276
+ * types/index.ts のサイズ上限対応で切り出し(中身は逐語移設、#3787 Phase A)。
277
+ */
278
+ /**
279
+ * Checkout session response from billing checkout endpoint
280
+ */
281
+ interface FFIDCheckoutSessionResponse {
282
+ /** Stripe Checkout session ID */
283
+ sessionId: string;
284
+ /** Stripe Checkout session URL (null if session creation had issues) */
285
+ url: string | null;
286
+ }
287
+ /**
288
+ * Portal session response from billing portal endpoint
289
+ */
290
+ interface FFIDPortalSessionResponse {
291
+ /** Stripe Billing Portal URL */
292
+ url: string;
293
+ }
294
+ /**
295
+ * Parameters for creating a checkout session
296
+ */
297
+ interface FFIDCreateCheckoutParams {
298
+ /** Organization ID (UUID) */
299
+ organizationId: string;
300
+ /** Subscription ID (UUID) */
301
+ subscriptionId: string;
302
+ /** URL to redirect after successful checkout */
303
+ successUrl: string;
304
+ /** URL to redirect after cancelled checkout */
305
+ cancelUrl: string;
306
+ /** Optional plan ID for upgrade or resubscription */
307
+ planId?: string;
308
+ }
309
+ /**
310
+ * Parameters for creating a billing portal session
311
+ */
312
+ interface FFIDCreatePortalParams {
313
+ /** Organization ID (UUID) */
314
+ organizationId: string;
315
+ /** URL to redirect when user exits the portal */
316
+ returnUrl: string;
317
+ }
318
+
273
319
  /** Billing interval for subscriptions */
274
320
  type FFIDBillingInterval = 'monthly' | 'yearly';
275
321
  /**
@@ -637,6 +683,122 @@ interface FFIDRemoveMemberResponse {
637
683
  message: string;
638
684
  }
639
685
 
686
+ /**
687
+ * Contract resource types (#3787 Phase A)
688
+ *
689
+ * シート割り当て・請求書・支払い再試行の ext API 型。
690
+ * サーバー側の sanitize 済みレスポンス(Stripe 内部 ID を含まない)と対になる。
691
+ */
692
+ /** シート割り当て 1 件(ユーザー情報付き、一覧用) */
693
+ interface FFIDSeatAssignmentWithUser {
694
+ userId: string;
695
+ email: string;
696
+ name: string | null;
697
+ role: string;
698
+ assignedAt: string;
699
+ assignedBy: string | null;
700
+ }
701
+ /** シート割り当てレコード(割り当て直後のレスポンス用) */
702
+ interface FFIDSeatAssignmentRecord {
703
+ id: string;
704
+ subscriptionId: string;
705
+ userId: string;
706
+ assignedBy: string | null;
707
+ assignedAt: string;
708
+ createdAt: string;
709
+ updatedAt: string;
710
+ }
711
+ /** GET /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス */
712
+ interface FFIDListSeatAssignmentsResponse {
713
+ assignments: FFIDSeatAssignmentWithUser[];
714
+ totalSeats: number;
715
+ assignedSeats: number;
716
+ availableSeats: number;
717
+ }
718
+ /** listSeatAssignments のパラメータ */
719
+ interface FFIDListSeatAssignmentsParams {
720
+ subscriptionId: string;
721
+ }
722
+ /** assignSeats のパラメータ */
723
+ interface FFIDAssignSeatsParams {
724
+ subscriptionId: string;
725
+ userIds: string[];
726
+ }
727
+ /** POST /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス */
728
+ interface FFIDAssignSeatsResponse {
729
+ message: string;
730
+ assignments: FFIDSeatAssignmentRecord[];
731
+ }
732
+ /** unassignSeat のパラメータ */
733
+ interface FFIDUnassignSeatParams {
734
+ subscriptionId: string;
735
+ userId: string;
736
+ }
737
+ /** DELETE /api/v1/subscriptions/ext/{id}/seats/assignments/{userId} のレスポンス */
738
+ interface FFIDUnassignSeatResponse {
739
+ message: string;
740
+ }
741
+ /** 請求書サマリー(一覧用) */
742
+ interface FFIDInvoiceSummary {
743
+ id: string;
744
+ organizationId: string;
745
+ subscriptionId: string | null;
746
+ invoiceNumber: string;
747
+ description: string | null;
748
+ subtotal: number;
749
+ taxRate: number;
750
+ taxAmount: number;
751
+ totalAmount: number;
752
+ currency: string;
753
+ status: string;
754
+ issuedAt: string | null;
755
+ dueDate: string | null;
756
+ paidAt: string | null;
757
+ pdfUrl: string | null;
758
+ createdAt: string;
759
+ }
760
+ /** 請求書詳細(請求先情報・備考を含む) */
761
+ interface FFIDInvoiceDetail extends FFIDInvoiceSummary {
762
+ billingName: string | null;
763
+ billingEmail: string | null;
764
+ notes: string | null;
765
+ }
766
+ /** listInvoices のパラメータ */
767
+ interface FFIDListInvoicesParams {
768
+ organizationId: string;
769
+ }
770
+ /** GET /api/v1/billing/ext/invoices のレスポンス */
771
+ interface FFIDListInvoicesResponse {
772
+ invoices: FFIDInvoiceSummary[];
773
+ count: number;
774
+ }
775
+ /** getInvoice のパラメータ */
776
+ interface FFIDGetInvoiceParams {
777
+ invoiceId: string;
778
+ }
779
+ /** GET /api/v1/billing/ext/invoices/{id} のレスポンス */
780
+ interface FFIDGetInvoiceResponse {
781
+ invoice: FFIDInvoiceDetail;
782
+ }
783
+ /** retryPayment のパラメータ */
784
+ interface FFIDRetryPaymentParams {
785
+ organizationId: string;
786
+ }
787
+ /** 再試行に失敗した契約の詳細 */
788
+ interface FFIDRetryPaymentFailure {
789
+ subscriptionId: string;
790
+ reason: string;
791
+ stripeCode?: string;
792
+ }
793
+ /** POST /api/v1/billing/ext/retry-payment のレスポンス */
794
+ interface FFIDRetryPaymentSummary {
795
+ totalAttempted: number;
796
+ succeeded: number;
797
+ failed: number;
798
+ noOpenInvoice: number;
799
+ failures: FFIDRetryPaymentFailure[];
800
+ }
801
+
640
802
  /**
641
803
  * FFID SDK Type Definitions
642
804
  *
@@ -962,47 +1124,6 @@ type FFIDApiResponse<T> = {
962
1124
  error: FFIDError;
963
1125
  };
964
1126
 
965
- /**
966
- * Checkout session response from billing checkout endpoint
967
- */
968
- interface FFIDCheckoutSessionResponse {
969
- /** Stripe Checkout session ID */
970
- sessionId: string;
971
- /** Stripe Checkout session URL (null if session creation had issues) */
972
- url: string | null;
973
- }
974
- /**
975
- * Portal session response from billing portal endpoint
976
- */
977
- interface FFIDPortalSessionResponse {
978
- /** Stripe Billing Portal URL */
979
- url: string;
980
- }
981
- /**
982
- * Parameters for creating a checkout session
983
- */
984
- interface FFIDCreateCheckoutParams {
985
- /** Organization ID (UUID) */
986
- organizationId: string;
987
- /** Subscription ID (UUID) */
988
- subscriptionId: string;
989
- /** URL to redirect after successful checkout */
990
- successUrl: string;
991
- /** URL to redirect after cancelled checkout */
992
- cancelUrl: string;
993
- /** Optional plan ID for upgrade or resubscription */
994
- planId?: string;
995
- }
996
- /**
997
- * Parameters for creating a billing portal session
998
- */
999
- interface FFIDCreatePortalParams {
1000
- /** Organization ID (UUID) */
1001
- organizationId: string;
1002
- /** URL to redirect when user exits the portal */
1003
- returnUrl: string;
1004
- }
1005
-
1006
1127
  /**
1007
1128
  * User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
1008
1129
  *
@@ -1341,6 +1462,12 @@ declare function createFFIDClient(config: FFIDConfig): {
1341
1462
  getAnalyticsConfig: (serviceCode: string, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDAnalyticsConfig>>;
1342
1463
  createCheckoutSession: (params: FFIDCreateCheckoutParams) => Promise<FFIDApiResponse<FFIDCheckoutSessionResponse>>;
1343
1464
  createPortalSession: (params: FFIDCreatePortalParams) => Promise<FFIDApiResponse<FFIDPortalSessionResponse>>;
1465
+ listInvoices: (params: FFIDListInvoicesParams) => Promise<FFIDApiResponse<FFIDListInvoicesResponse>>;
1466
+ getInvoice: (params: FFIDGetInvoiceParams) => Promise<FFIDApiResponse<FFIDGetInvoiceResponse>>;
1467
+ retryPayment: (params: FFIDRetryPaymentParams) => Promise<FFIDApiResponse<FFIDRetryPaymentSummary>>;
1468
+ listSeatAssignments: (params: FFIDListSeatAssignmentsParams) => Promise<FFIDApiResponse<FFIDListSeatAssignmentsResponse>>;
1469
+ assignSeats: (params: FFIDAssignSeatsParams) => Promise<FFIDApiResponse<FFIDAssignSeatsResponse>>;
1470
+ unassignSeat: (params: FFIDUnassignSeatParams) => Promise<FFIDApiResponse<FFIDUnassignSeatResponse>>;
1344
1471
  listPlans: () => Promise<FFIDApiResponse<FFIDListPlansResponse>>;
1345
1472
  getSubscription: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDSubscriptionDetail>>;
1346
1473
  subscribe: (params: FFIDSubscribeParams) => Promise<FFIDApiResponse<FFIDSubscribeResponse>>;
@@ -73,7 +73,16 @@ interface FFIDCacheConfig {
73
73
  * @see /api/v1/subscriptions/ext/check
74
74
  * @see docs/03-implementation/EXPIRED_CONTRACT_HANDLING.md
75
75
  */
76
- type EffectiveSubscriptionStatus = 'active' | 'active_canceling' | 'past_due_grace' | 'blocked' | 'canceled' | 'trial_expired' | 'expired';
76
+ declare const EFFECTIVE_SUBSCRIPTION_STATUSES: readonly ["active", "active_canceling", "past_due_grace", "blocked", "canceled", "trial_expired", "expired"];
77
+ /**
78
+ * Derived from {@link EFFECTIVE_SUBSCRIPTION_STATUSES} so the literal set has
79
+ * a runtime representation. The server mirrors the same const in
80
+ * `src/lib/common/subscription-helpers.ts`, and a server-side unit test pins
81
+ * element-equality between the two arrays (#3474) — convention-only sync
82
+ * could drift silently in the server-extending direction (a new server
83
+ * literal would fall through SDK consumers' `switch` defaults).
84
+ */
85
+ type EffectiveSubscriptionStatus = (typeof EFFECTIVE_SUBSCRIPTION_STATUSES)[number];
77
86
 
78
87
  /**
79
88
  * Canonical service-access types for subscription lifecycle decisions.
@@ -624,47 +633,6 @@ type FFIDApiResponse<T> = {
624
633
  error: FFIDError;
625
634
  };
626
635
 
627
- /**
628
- * Checkout session response from billing checkout endpoint
629
- */
630
- interface FFIDCheckoutSessionResponse {
631
- /** Stripe Checkout session ID */
632
- sessionId: string;
633
- /** Stripe Checkout session URL (null if session creation had issues) */
634
- url: string | null;
635
- }
636
- /**
637
- * Portal session response from billing portal endpoint
638
- */
639
- interface FFIDPortalSessionResponse {
640
- /** Stripe Billing Portal URL */
641
- url: string;
642
- }
643
- /**
644
- * Parameters for creating a checkout session
645
- */
646
- interface FFIDCreateCheckoutParams {
647
- /** Organization ID (UUID) */
648
- organizationId: string;
649
- /** Subscription ID (UUID) */
650
- subscriptionId: string;
651
- /** URL to redirect after successful checkout */
652
- successUrl: string;
653
- /** URL to redirect after cancelled checkout */
654
- cancelUrl: string;
655
- /** Optional plan ID for upgrade or resubscription */
656
- planId?: string;
657
- }
658
- /**
659
- * Parameters for creating a billing portal session
660
- */
661
- interface FFIDCreatePortalParams {
662
- /** Organization ID (UUID) */
663
- organizationId: string;
664
- /** URL to redirect when user exits the portal */
665
- returnUrl: string;
666
- }
667
-
668
636
  /**
669
637
  * User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
670
638
  *
@@ -1578,4 +1546,4 @@ interface FFIDInquiryFormPlaceholderContext {
1578
1546
  }
1579
1547
  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;
1580
1548
 
1581
- export { type FFIDInquiryFormPrefill as $, type FFIDSubscriptionContextValue as A, type FFIDOAuthUserInfoSubscription as B, type FFIDAnnouncementsClientConfig as C, type FFIDAnnouncementsApiResponse as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type AnnouncementListResponse as G, type FFIDAnnouncementsLogger as H, type Announcement as I, type AnnouncementStatus as J, type AnnouncementType as K, type ListAnnouncementsOptions as L, FFIDAnnouncementBadge as M, FFIDAnnouncementList as N, type FFIDAnnouncementsError as O, type FFIDAnnouncementsErrorCode as P, type FFIDAnnouncementsServerResponse as Q, type FFIDCacheConfig as R, type FFIDContextValue as S, type FFIDInquiryCategory as T, type FFIDInquiryCategorySite2026 as U, FFIDInquiryForm as V, type FFIDInquiryFormCategoryItem as W, type FFIDInquiryFormClassNames as X, type FFIDInquiryFormLegalLayout as Y, type FFIDInquiryFormOrganization as Z, type FFIDInquiryFormPlaceholderContext as _, type FFIDConfig as a, type FFIDInquiryFormProps as a0, type FFIDInquiryFormSubmitData as a1, type FFIDInquiryFormSubmitResult as a2, type FFIDJwtClaims as a3, FFIDLoginButton as a4, type FFIDOAuthTokenResponse as a5, type FFIDOAuthUserInfoMemberRole as a6, FFIDOrganizationSwitcher as a7, type FFIDRedirectErrorCode as a8, type FFIDSeatModel as a9, type FFIDServiceAccessDenialReason as aa, type FFIDServiceAccessFailPolicy as ab, FFIDSubscriptionBadge as ac, type FFIDTokenIntrospectionResponse as ad, FFIDUserMenu as ae, FFID_INQUIRY_CATEGORIES as af, FFID_INQUIRY_CATEGORIES_SITE_2026 as ag, type UseFFIDAnnouncementsOptions as ah, type UseFFIDAnnouncementsReturn as ai, isFFIDInquiryCategorySite2026 as aj, useFFIDAnnouncements as ak, type FFIDAnnouncementBadgeClassNames as al, type FFIDAnnouncementBadgeProps as am, type FFIDAnnouncementListClassNames as an, type FFIDAnnouncementListProps as ao, type FFIDLoginButtonProps as ap, type FFIDOrganizationSwitcherClassNames as aq, type FFIDOrganizationSwitcherProps as ar, type FFIDSubscriptionBadgeClassNames as as, type FFIDSubscriptionBadgeProps as at, type FFIDUserMenuClassNames as au, type FFIDUserMenuProps as av, 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 FFIDProfileCallOptions as i, type FFIDUserProfile as j, type FFIDUpdateUserProfileRequest as k, type FFIDAnalyticsConfig as l, type FFIDCreateCheckoutParams as m, type FFIDCheckoutSessionResponse as n, type FFIDCreatePortalParams as o, type FFIDPortalSessionResponse as p, type FFIDVerifyAccessTokenOptions as q, type FFIDOAuthUserInfo as r, type FFIDInquiryCreateParams as s, type FFIDInquiryCreateResponse as t, type FFIDAuthMode as u, type FFIDLogger as v, type FFIDCacheAdapter as w, type FFIDUser as x, type FFIDOrganization as y, type FFIDSubscription as z };
1549
+ export { type FFIDInquiryFormSubmitResult as $, type AnnouncementListResponse as A, type FFIDAnnouncementsLogger as B, type Announcement as C, type AnnouncementStatus as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type AnnouncementType as G, EFFECTIVE_SUBSCRIPTION_STATUSES as H, FFIDAnnouncementBadge as I, FFIDAnnouncementList as J, type FFIDAnnouncementsError as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsErrorCode as M, type FFIDAnnouncementsServerResponse as N, type FFIDCacheConfig as O, type FFIDContextValue as P, type FFIDInquiryCategory as Q, type FFIDInquiryCategorySite2026 as R, FFIDInquiryForm as S, type FFIDInquiryFormCategoryItem as T, type FFIDInquiryFormClassNames as U, type FFIDInquiryFormLegalLayout as V, type FFIDInquiryFormOrganization as W, type FFIDInquiryFormPlaceholderContext as X, type FFIDInquiryFormPrefill as Y, type FFIDInquiryFormProps as Z, type FFIDInquiryFormSubmitData as _, type FFIDConfig as a, type FFIDJwtClaims as a0, FFIDLoginButton as a1, type FFIDOAuthTokenResponse as a2, type FFIDOAuthUserInfoMemberRole as a3, FFIDOrganizationSwitcher as a4, type FFIDRedirectErrorCode as a5, type FFIDSeatModel as a6, type FFIDServiceAccessDenialReason as a7, type FFIDServiceAccessFailPolicy as a8, FFIDSubscriptionBadge as a9, type FFIDTokenIntrospectionResponse as aa, FFIDUserMenu as ab, FFID_INQUIRY_CATEGORIES as ac, FFID_INQUIRY_CATEGORIES_SITE_2026 as ad, type UseFFIDAnnouncementsOptions as ae, type UseFFIDAnnouncementsReturn as af, isFFIDInquiryCategorySite2026 as ag, useFFIDAnnouncements as ah, type FFIDAnnouncementBadgeClassNames as ai, type FFIDAnnouncementBadgeProps as aj, type FFIDAnnouncementListClassNames as ak, type FFIDAnnouncementListProps as al, type FFIDLoginButtonProps as am, type FFIDOrganizationSwitcherClassNames as an, type FFIDOrganizationSwitcherProps as ao, type FFIDSubscriptionBadgeClassNames as ap, type FFIDSubscriptionBadgeProps as aq, type FFIDUserMenuClassNames as ar, type FFIDUserMenuProps as as, 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 FFIDProfileCallOptions as i, type FFIDUserProfile as j, type FFIDUpdateUserProfileRequest as k, type FFIDAnalyticsConfig as l, type FFIDVerifyAccessTokenOptions as m, type FFIDOAuthUserInfo as n, type FFIDInquiryCreateParams as o, type FFIDInquiryCreateResponse as p, type FFIDAuthMode as q, type FFIDLogger as r, type FFIDCacheAdapter as s, type FFIDUser as t, type FFIDOrganization as u, type FFIDSubscription as v, type FFIDSubscriptionContextValue as w, type FFIDOAuthUserInfoSubscription as x, type FFIDAnnouncementsClientConfig as y, type FFIDAnnouncementsApiResponse as z };
@@ -73,7 +73,16 @@ interface FFIDCacheConfig {
73
73
  * @see /api/v1/subscriptions/ext/check
74
74
  * @see docs/03-implementation/EXPIRED_CONTRACT_HANDLING.md
75
75
  */
76
- type EffectiveSubscriptionStatus = 'active' | 'active_canceling' | 'past_due_grace' | 'blocked' | 'canceled' | 'trial_expired' | 'expired';
76
+ declare const EFFECTIVE_SUBSCRIPTION_STATUSES: readonly ["active", "active_canceling", "past_due_grace", "blocked", "canceled", "trial_expired", "expired"];
77
+ /**
78
+ * Derived from {@link EFFECTIVE_SUBSCRIPTION_STATUSES} so the literal set has
79
+ * a runtime representation. The server mirrors the same const in
80
+ * `src/lib/common/subscription-helpers.ts`, and a server-side unit test pins
81
+ * element-equality between the two arrays (#3474) — convention-only sync
82
+ * could drift silently in the server-extending direction (a new server
83
+ * literal would fall through SDK consumers' `switch` defaults).
84
+ */
85
+ type EffectiveSubscriptionStatus = (typeof EFFECTIVE_SUBSCRIPTION_STATUSES)[number];
77
86
 
78
87
  /**
79
88
  * Canonical service-access types for subscription lifecycle decisions.
@@ -624,47 +633,6 @@ type FFIDApiResponse<T> = {
624
633
  error: FFIDError;
625
634
  };
626
635
 
627
- /**
628
- * Checkout session response from billing checkout endpoint
629
- */
630
- interface FFIDCheckoutSessionResponse {
631
- /** Stripe Checkout session ID */
632
- sessionId: string;
633
- /** Stripe Checkout session URL (null if session creation had issues) */
634
- url: string | null;
635
- }
636
- /**
637
- * Portal session response from billing portal endpoint
638
- */
639
- interface FFIDPortalSessionResponse {
640
- /** Stripe Billing Portal URL */
641
- url: string;
642
- }
643
- /**
644
- * Parameters for creating a checkout session
645
- */
646
- interface FFIDCreateCheckoutParams {
647
- /** Organization ID (UUID) */
648
- organizationId: string;
649
- /** Subscription ID (UUID) */
650
- subscriptionId: string;
651
- /** URL to redirect after successful checkout */
652
- successUrl: string;
653
- /** URL to redirect after cancelled checkout */
654
- cancelUrl: string;
655
- /** Optional plan ID for upgrade or resubscription */
656
- planId?: string;
657
- }
658
- /**
659
- * Parameters for creating a billing portal session
660
- */
661
- interface FFIDCreatePortalParams {
662
- /** Organization ID (UUID) */
663
- organizationId: string;
664
- /** URL to redirect when user exits the portal */
665
- returnUrl: string;
666
- }
667
-
668
636
  /**
669
637
  * User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
670
638
  *
@@ -1578,4 +1546,4 @@ interface FFIDInquiryFormPlaceholderContext {
1578
1546
  }
1579
1547
  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;
1580
1548
 
1581
- export { type FFIDInquiryFormPrefill as $, type FFIDSubscriptionContextValue as A, type FFIDOAuthUserInfoSubscription as B, type FFIDAnnouncementsClientConfig as C, type FFIDAnnouncementsApiResponse as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type AnnouncementListResponse as G, type FFIDAnnouncementsLogger as H, type Announcement as I, type AnnouncementStatus as J, type AnnouncementType as K, type ListAnnouncementsOptions as L, FFIDAnnouncementBadge as M, FFIDAnnouncementList as N, type FFIDAnnouncementsError as O, type FFIDAnnouncementsErrorCode as P, type FFIDAnnouncementsServerResponse as Q, type FFIDCacheConfig as R, type FFIDContextValue as S, type FFIDInquiryCategory as T, type FFIDInquiryCategorySite2026 as U, FFIDInquiryForm as V, type FFIDInquiryFormCategoryItem as W, type FFIDInquiryFormClassNames as X, type FFIDInquiryFormLegalLayout as Y, type FFIDInquiryFormOrganization as Z, type FFIDInquiryFormPlaceholderContext as _, type FFIDConfig as a, type FFIDInquiryFormProps as a0, type FFIDInquiryFormSubmitData as a1, type FFIDInquiryFormSubmitResult as a2, type FFIDJwtClaims as a3, FFIDLoginButton as a4, type FFIDOAuthTokenResponse as a5, type FFIDOAuthUserInfoMemberRole as a6, FFIDOrganizationSwitcher as a7, type FFIDRedirectErrorCode as a8, type FFIDSeatModel as a9, type FFIDServiceAccessDenialReason as aa, type FFIDServiceAccessFailPolicy as ab, FFIDSubscriptionBadge as ac, type FFIDTokenIntrospectionResponse as ad, FFIDUserMenu as ae, FFID_INQUIRY_CATEGORIES as af, FFID_INQUIRY_CATEGORIES_SITE_2026 as ag, type UseFFIDAnnouncementsOptions as ah, type UseFFIDAnnouncementsReturn as ai, isFFIDInquiryCategorySite2026 as aj, useFFIDAnnouncements as ak, type FFIDAnnouncementBadgeClassNames as al, type FFIDAnnouncementBadgeProps as am, type FFIDAnnouncementListClassNames as an, type FFIDAnnouncementListProps as ao, type FFIDLoginButtonProps as ap, type FFIDOrganizationSwitcherClassNames as aq, type FFIDOrganizationSwitcherProps as ar, type FFIDSubscriptionBadgeClassNames as as, type FFIDSubscriptionBadgeProps as at, type FFIDUserMenuClassNames as au, type FFIDUserMenuProps as av, 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 FFIDProfileCallOptions as i, type FFIDUserProfile as j, type FFIDUpdateUserProfileRequest as k, type FFIDAnalyticsConfig as l, type FFIDCreateCheckoutParams as m, type FFIDCheckoutSessionResponse as n, type FFIDCreatePortalParams as o, type FFIDPortalSessionResponse as p, type FFIDVerifyAccessTokenOptions as q, type FFIDOAuthUserInfo as r, type FFIDInquiryCreateParams as s, type FFIDInquiryCreateResponse as t, type FFIDAuthMode as u, type FFIDLogger as v, type FFIDCacheAdapter as w, type FFIDUser as x, type FFIDOrganization as y, type FFIDSubscription as z };
1549
+ export { type FFIDInquiryFormSubmitResult as $, type AnnouncementListResponse as A, type FFIDAnnouncementsLogger as B, type Announcement as C, type AnnouncementStatus as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type AnnouncementType as G, EFFECTIVE_SUBSCRIPTION_STATUSES as H, FFIDAnnouncementBadge as I, FFIDAnnouncementList as J, type FFIDAnnouncementsError as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsErrorCode as M, type FFIDAnnouncementsServerResponse as N, type FFIDCacheConfig as O, type FFIDContextValue as P, type FFIDInquiryCategory as Q, type FFIDInquiryCategorySite2026 as R, FFIDInquiryForm as S, type FFIDInquiryFormCategoryItem as T, type FFIDInquiryFormClassNames as U, type FFIDInquiryFormLegalLayout as V, type FFIDInquiryFormOrganization as W, type FFIDInquiryFormPlaceholderContext as X, type FFIDInquiryFormPrefill as Y, type FFIDInquiryFormProps as Z, type FFIDInquiryFormSubmitData as _, type FFIDConfig as a, type FFIDJwtClaims as a0, FFIDLoginButton as a1, type FFIDOAuthTokenResponse as a2, type FFIDOAuthUserInfoMemberRole as a3, FFIDOrganizationSwitcher as a4, type FFIDRedirectErrorCode as a5, type FFIDSeatModel as a6, type FFIDServiceAccessDenialReason as a7, type FFIDServiceAccessFailPolicy as a8, FFIDSubscriptionBadge as a9, type FFIDTokenIntrospectionResponse as aa, FFIDUserMenu as ab, FFID_INQUIRY_CATEGORIES as ac, FFID_INQUIRY_CATEGORIES_SITE_2026 as ad, type UseFFIDAnnouncementsOptions as ae, type UseFFIDAnnouncementsReturn as af, isFFIDInquiryCategorySite2026 as ag, useFFIDAnnouncements as ah, type FFIDAnnouncementBadgeClassNames as ai, type FFIDAnnouncementBadgeProps as aj, type FFIDAnnouncementListClassNames as ak, type FFIDAnnouncementListProps as al, type FFIDLoginButtonProps as am, type FFIDOrganizationSwitcherClassNames as an, type FFIDOrganizationSwitcherProps as ao, type FFIDSubscriptionBadgeClassNames as ap, type FFIDSubscriptionBadgeProps as aq, type FFIDUserMenuClassNames as ar, type FFIDUserMenuProps as as, 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 FFIDProfileCallOptions as i, type FFIDUserProfile as j, type FFIDUpdateUserProfileRequest as k, type FFIDAnalyticsConfig as l, type FFIDVerifyAccessTokenOptions as m, type FFIDOAuthUserInfo as n, type FFIDInquiryCreateParams as o, type FFIDInquiryCreateResponse as p, type FFIDAuthMode as q, type FFIDLogger as r, type FFIDCacheAdapter as s, type FFIDUser as t, type FFIDOrganization as u, type FFIDSubscription as v, type FFIDSubscriptionContextValue as w, type FFIDOAuthUserInfoSubscription as x, type FFIDAnnouncementsClientConfig as y, type FFIDAnnouncementsApiResponse as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkIZSL6DI7_cjs = require('./chunk-IZSL6DI7.cjs');
3
+ var chunkAOJDV3UO_cjs = require('./chunk-AOJDV3UO.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 } = chunkIZSL6DI7_cjs.useFFIDContext();
58
- const { effectiveStatus, isBlocked, isGrace } = chunkIZSL6DI7_cjs.useSubscription();
57
+ const { isLoading, error } = chunkAOJDV3UO_cjs.useFFIDContext();
58
+ const { effectiveStatus, isBlocked, isGrace } = chunkAOJDV3UO_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 } = chunkIZSL6DI7_cjs.useFFIDContext();
79
+ const { isLoading, isAuthenticated, login } = chunkAOJDV3UO_cjs.useFFIDContext();
80
80
  const hasRedirected = react.useRef(false);
81
81
  react.useEffect(() => {
82
82
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -105,131 +105,135 @@ 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 chunkIZSL6DI7_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
108
+ get: function () { return chunkAOJDV3UO_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
109
109
  });
110
110
  Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
111
111
  enumerable: true,
112
- get: function () { return chunkIZSL6DI7_cjs.BLOCKING_EFFECTIVE_STATUSES; }
112
+ get: function () { return chunkAOJDV3UO_cjs.BLOCKING_EFFECTIVE_STATUSES; }
113
113
  });
114
114
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
115
115
  enumerable: true,
116
- get: function () { return chunkIZSL6DI7_cjs.DEFAULT_API_BASE_URL; }
116
+ get: function () { return chunkAOJDV3UO_cjs.DEFAULT_API_BASE_URL; }
117
117
  });
118
118
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
119
119
  enumerable: true,
120
- get: function () { return chunkIZSL6DI7_cjs.DEFAULT_OAUTH_SCOPES; }
120
+ get: function () { return chunkAOJDV3UO_cjs.DEFAULT_OAUTH_SCOPES; }
121
+ });
122
+ Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
123
+ enumerable: true,
124
+ get: function () { return chunkAOJDV3UO_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
121
125
  });
122
126
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
123
127
  enumerable: true,
124
- get: function () { return chunkIZSL6DI7_cjs.FFIDAnnouncementBadge; }
128
+ get: function () { return chunkAOJDV3UO_cjs.FFIDAnnouncementBadge; }
125
129
  });
126
130
  Object.defineProperty(exports, "FFIDAnnouncementList", {
127
131
  enumerable: true,
128
- get: function () { return chunkIZSL6DI7_cjs.FFIDAnnouncementList; }
132
+ get: function () { return chunkAOJDV3UO_cjs.FFIDAnnouncementList; }
129
133
  });
130
134
  Object.defineProperty(exports, "FFIDInquiryForm", {
131
135
  enumerable: true,
132
- get: function () { return chunkIZSL6DI7_cjs.FFIDInquiryForm; }
136
+ get: function () { return chunkAOJDV3UO_cjs.FFIDInquiryForm; }
133
137
  });
134
138
  Object.defineProperty(exports, "FFIDLoginButton", {
135
139
  enumerable: true,
136
- get: function () { return chunkIZSL6DI7_cjs.FFIDLoginButton; }
140
+ get: function () { return chunkAOJDV3UO_cjs.FFIDLoginButton; }
137
141
  });
138
142
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
139
143
  enumerable: true,
140
- get: function () { return chunkIZSL6DI7_cjs.FFIDOrganizationSwitcher; }
144
+ get: function () { return chunkAOJDV3UO_cjs.FFIDOrganizationSwitcher; }
141
145
  });
142
146
  Object.defineProperty(exports, "FFIDProvider", {
143
147
  enumerable: true,
144
- get: function () { return chunkIZSL6DI7_cjs.FFIDProvider; }
148
+ get: function () { return chunkAOJDV3UO_cjs.FFIDProvider; }
145
149
  });
146
150
  Object.defineProperty(exports, "FFIDSDKError", {
147
151
  enumerable: true,
148
- get: function () { return chunkIZSL6DI7_cjs.FFIDSDKError; }
152
+ get: function () { return chunkAOJDV3UO_cjs.FFIDSDKError; }
149
153
  });
150
154
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
151
155
  enumerable: true,
152
- get: function () { return chunkIZSL6DI7_cjs.FFIDSubscriptionBadge; }
156
+ get: function () { return chunkAOJDV3UO_cjs.FFIDSubscriptionBadge; }
153
157
  });
154
158
  Object.defineProperty(exports, "FFIDUserMenu", {
155
159
  enumerable: true,
156
- get: function () { return chunkIZSL6DI7_cjs.FFIDUserMenu; }
160
+ get: function () { return chunkAOJDV3UO_cjs.FFIDUserMenu; }
157
161
  });
158
162
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
159
163
  enumerable: true,
160
- get: function () { return chunkIZSL6DI7_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
164
+ get: function () { return chunkAOJDV3UO_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
161
165
  });
162
166
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
163
167
  enumerable: true,
164
- get: function () { return chunkIZSL6DI7_cjs.FFID_INQUIRY_CATEGORIES; }
168
+ get: function () { return chunkAOJDV3UO_cjs.FFID_INQUIRY_CATEGORIES; }
165
169
  });
166
170
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
167
171
  enumerable: true,
168
- get: function () { return chunkIZSL6DI7_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
172
+ get: function () { return chunkAOJDV3UO_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
169
173
  });
170
174
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
171
175
  enumerable: true,
172
- get: function () { return chunkIZSL6DI7_cjs.computeEffectiveStatusFromSession; }
176
+ get: function () { return chunkAOJDV3UO_cjs.computeEffectiveStatusFromSession; }
173
177
  });
174
178
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
175
179
  enumerable: true,
176
- get: function () { return chunkIZSL6DI7_cjs.createFFIDAnnouncementsClient; }
180
+ get: function () { return chunkAOJDV3UO_cjs.createFFIDAnnouncementsClient; }
177
181
  });
178
182
  Object.defineProperty(exports, "createFFIDClient", {
179
183
  enumerable: true,
180
- get: function () { return chunkIZSL6DI7_cjs.createFFIDClient; }
184
+ get: function () { return chunkAOJDV3UO_cjs.createFFIDClient; }
181
185
  });
182
186
  Object.defineProperty(exports, "createTokenStore", {
183
187
  enumerable: true,
184
- get: function () { return chunkIZSL6DI7_cjs.createTokenStore; }
188
+ get: function () { return chunkAOJDV3UO_cjs.createTokenStore; }
185
189
  });
186
190
  Object.defineProperty(exports, "generateCodeChallenge", {
187
191
  enumerable: true,
188
- get: function () { return chunkIZSL6DI7_cjs.generateCodeChallenge; }
192
+ get: function () { return chunkAOJDV3UO_cjs.generateCodeChallenge; }
189
193
  });
190
194
  Object.defineProperty(exports, "generateCodeVerifier", {
191
195
  enumerable: true,
192
- get: function () { return chunkIZSL6DI7_cjs.generateCodeVerifier; }
196
+ get: function () { return chunkAOJDV3UO_cjs.generateCodeVerifier; }
193
197
  });
194
198
  Object.defineProperty(exports, "hasAccessFromUserinfo", {
195
199
  enumerable: true,
196
- get: function () { return chunkIZSL6DI7_cjs.hasAccessFromUserinfo; }
200
+ get: function () { return chunkAOJDV3UO_cjs.hasAccessFromUserinfo; }
197
201
  });
198
202
  Object.defineProperty(exports, "isBlockedFromUserinfo", {
199
203
  enumerable: true,
200
- get: function () { return chunkIZSL6DI7_cjs.isBlockedFromUserinfo; }
204
+ get: function () { return chunkAOJDV3UO_cjs.isBlockedFromUserinfo; }
201
205
  });
202
206
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
203
207
  enumerable: true,
204
- get: function () { return chunkIZSL6DI7_cjs.isFFIDInquiryCategorySite2026; }
208
+ get: function () { return chunkAOJDV3UO_cjs.isFFIDInquiryCategorySite2026; }
205
209
  });
206
210
  Object.defineProperty(exports, "normalizeRedirectUri", {
207
211
  enumerable: true,
208
- get: function () { return chunkIZSL6DI7_cjs.normalizeRedirectUri; }
212
+ get: function () { return chunkAOJDV3UO_cjs.normalizeRedirectUri; }
209
213
  });
210
214
  Object.defineProperty(exports, "retrieveCodeVerifier", {
211
215
  enumerable: true,
212
- get: function () { return chunkIZSL6DI7_cjs.retrieveCodeVerifier; }
216
+ get: function () { return chunkAOJDV3UO_cjs.retrieveCodeVerifier; }
213
217
  });
214
218
  Object.defineProperty(exports, "storeCodeVerifier", {
215
219
  enumerable: true,
216
- get: function () { return chunkIZSL6DI7_cjs.storeCodeVerifier; }
220
+ get: function () { return chunkAOJDV3UO_cjs.storeCodeVerifier; }
217
221
  });
218
222
  Object.defineProperty(exports, "useFFID", {
219
223
  enumerable: true,
220
- get: function () { return chunkIZSL6DI7_cjs.useFFID; }
224
+ get: function () { return chunkAOJDV3UO_cjs.useFFID; }
221
225
  });
222
226
  Object.defineProperty(exports, "useFFIDAnnouncements", {
223
227
  enumerable: true,
224
- get: function () { return chunkIZSL6DI7_cjs.useFFIDAnnouncements; }
228
+ get: function () { return chunkAOJDV3UO_cjs.useFFIDAnnouncements; }
225
229
  });
226
230
  Object.defineProperty(exports, "useSubscription", {
227
231
  enumerable: true,
228
- get: function () { return chunkIZSL6DI7_cjs.useSubscription; }
232
+ get: function () { return chunkAOJDV3UO_cjs.useSubscription; }
229
233
  });
230
234
  Object.defineProperty(exports, "withSubscription", {
231
235
  enumerable: true,
232
- get: function () { return chunkIZSL6DI7_cjs.withSubscription; }
236
+ get: function () { return chunkAOJDV3UO_cjs.withSubscription; }
233
237
  });
234
238
  Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
235
239
  enumerable: true,