@feelflow/ffid-sdk 5.18.0 → 5.21.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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDRedirectResult, f as FFIDError, g as FFIDSubscriptionCheckResponse, h as FFIDCheckServiceAccessParams, i as FFIDServiceAccessDecision, j as FFIDAnalyticsConfig, k as FFIDVerifyAccessTokenOptions, l as FFIDOAuthUserInfo, m as FFIDInquiryCreateParams, n as FFIDInquiryCreateResponse, o as FFIDAuthMode, p as FFIDLogger, q as FFIDCacheAdapter, r as FFIDUser, s as FFIDOrganization, t as FFIDSubscription, u as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, v as FFIDOAuthUserInfoSubscription, w as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, x as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, y as FFIDAnnouncementsLogger } from './index-Bkul-fRw.cjs';
2
- export { z as Announcement, B as AnnouncementStatus, C as AnnouncementType, D as EFFECTIVE_SUBSCRIPTION_STATUSES, G as FFIDAnnouncementBadge, H as FFIDAnnouncementList, I as FFIDAnnouncementsError, J as FFIDAnnouncementsErrorCode, K as FFIDAnnouncementsServerResponse, M as FFIDCacheConfig, N as FFIDContextValue, O as FFIDInquiryCategory, P as FFIDInquiryCategorySite2026, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormClassNames, T as FFIDInquiryFormLegalLayout, U as FFIDInquiryFormOrganization, V as FFIDInquiryFormPlaceholderContext, W as FFIDInquiryFormPrefill, X as FFIDInquiryFormProps, Y as FFIDInquiryFormSubmitData, Z as FFIDInquiryFormSubmitResult, _ as FFIDJwtClaims, $ as FFIDLoginButton, a0 as FFIDOAuthTokenResponse, a1 as FFIDOAuthUserInfoMemberRole, a2 as FFIDOrganizationSwitcher, a3 as FFIDRedirectErrorCode, a4 as FFIDSeatModel, a5 as FFIDServiceAccessDenialReason, a6 as FFIDServiceAccessFailPolicy, a7 as FFIDSubscriptionBadge, a8 as FFIDTokenIntrospectionResponse, a9 as FFIDUserMenu, aa as FFID_INQUIRY_CATEGORIES, ab as FFID_INQUIRY_CATEGORIES_SITE_2026, ac as UseFFIDAnnouncementsOptions, ad as UseFFIDAnnouncementsReturn, ae as isFFIDInquiryCategorySite2026, af as useFFIDAnnouncements } from './index-Bkul-fRw.cjs';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDSignOutResult, f as FFIDRedirectResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDVerifyAccessTokenOptions, m as FFIDOAuthUserInfo, n as FFIDInquiryCreateParams, o as FFIDInquiryCreateResponse, p as FFIDAuthMode, q as FFIDLogger, r as FFIDCacheAdapter, s as FFIDUser, t as FFIDOrganization, u as FFIDSubscription, v as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, w as FFIDOAuthUserInfoSubscription, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index--wRiPlpi.cjs';
2
+ export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, G as EFFECTIVE_SUBSCRIPTION_STATUSES, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDApiResponseMeta, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index--wRiPlpi.cjs';
3
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-BJgVcJyw.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
@@ -564,6 +564,217 @@ interface FFIDRemoveMemberResponse {
564
564
  message: string;
565
565
  }
566
566
 
567
+ /**
568
+ * Provisioning types (ext API) — service-key-authenticated, idempotent user /
569
+ * organization provisioning for external batch migration (#3790 / #4127).
570
+ *
571
+ * Mirrors the server contract of `POST /api/v1/ext/users/provision` and
572
+ * `POST /api/v1/ext/organizations/provision`. Responses are modelled as
573
+ * discriminated unions on `dryRun` so consumers narrow with `if (res.dryRun)`
574
+ * and the compiler enforces which fields are present on each branch
575
+ * (`wouldCreate` on dry-run, `created` on a real call).
576
+ */
577
+
578
+ /** Optional business-profile fields applied to a freshly provisioned user. */
579
+ interface FFIDProvisionUserProfileInput {
580
+ /** Display name (1–255 chars). */
581
+ displayName?: string;
582
+ /** Company name (≤255 chars). */
583
+ companyName?: string;
584
+ /** Department (≤255 chars). */
585
+ department?: string;
586
+ /** Job title (≤255 chars). */
587
+ jobTitle?: string;
588
+ /** Phone number (≤30 chars). */
589
+ phone?: string;
590
+ }
591
+ /** Parameters for `provisionUser`. */
592
+ interface FFIDProvisionUserParams {
593
+ /**
594
+ * Email of the user to provision. Normalized (trim + lowercase) server-side
595
+ * before the idempotency lookup, so re-runs with different casing resolve to
596
+ * the same user.
597
+ */
598
+ email: string;
599
+ /** Optional business profile applied only when a new user is created. */
600
+ profile?: FFIDProvisionUserProfileInput;
601
+ /**
602
+ * When `true`, the server performs no writes and returns a
603
+ * {@link FFIDProvisionUserDryRun} describing what a real call would do.
604
+ * @default false
605
+ */
606
+ dryRun?: boolean;
607
+ }
608
+ /** Minimal identity returned for a provisioned / resolved user. */
609
+ interface FFIDProvisionedUser {
610
+ /** User ID (UUID). */
611
+ id: string;
612
+ /** Email address (normalized). */
613
+ email: string;
614
+ }
615
+ /**
616
+ * Real (non-dry-run) user provisioning outcome.
617
+ *
618
+ * Idempotent: an existing email resolves to `created: false` (HTTP 200) instead
619
+ * of creating a duplicate; a new email yields `created: true` (HTTP 201) for a
620
+ * passwordless, email-confirmed user.
621
+ */
622
+ interface FFIDProvisionUserOutcome {
623
+ /** Discriminant — absent/`false` for a real call. */
624
+ dryRun?: false;
625
+ /**
626
+ * `true` → a new passwordless, email-confirmed user was created (HTTP 201).
627
+ * `false` → a user with this email already existed; idempotent no-op (HTTP 200).
628
+ */
629
+ created: boolean;
630
+ user: FFIDProvisionedUser;
631
+ /**
632
+ * Present only when a new user was created **and** a `profile` was supplied.
633
+ * `false` means the user row was created but the authoritative profile write
634
+ * did not complete — some profile fields may not be fully applied, so
635
+ * re-issue the profile to be sure. Absent on the idempotent-existing branch
636
+ * and when no profile was requested.
637
+ */
638
+ profileWritten?: boolean;
639
+ }
640
+ /** Dry-run user provisioning outcome — no writes performed. */
641
+ interface FFIDProvisionUserDryRun {
642
+ /** Discriminant — always `true` for a dry-run. */
643
+ dryRun: true;
644
+ /** Whether a real call would create a new user. */
645
+ wouldCreate: boolean;
646
+ /** `id` is present only when the user already exists. */
647
+ user: {
648
+ id?: string;
649
+ email: string;
650
+ };
651
+ }
652
+ /**
653
+ * Response from `provisionUser`. Narrow with the truthiness of `dryRun`:
654
+ *
655
+ * ```ts
656
+ * if (res.dryRun) {
657
+ * // FFIDProvisionUserDryRun — inspect res.wouldCreate
658
+ * } else {
659
+ * // FFIDProvisionUserOutcome — inspect res.created
660
+ * }
661
+ * ```
662
+ *
663
+ * A real (non-dry-run) response omits `dryRun` on the wire (it is `undefined`,
664
+ * not `false`), so narrow with `if (res.dryRun)` — do **not** use
665
+ * `res.dryRun === false` or `switch (res.dryRun)`, which would miss every real
666
+ * response. This mirrors how `FFIDApiResponse` is narrowed on `data` / `error`.
667
+ */
668
+ type FFIDProvisionUserResponse = FFIDProvisionUserOutcome | FFIDProvisionUserDryRun;
669
+ /** A member to add to the provisioned organization. */
670
+ interface FFIDProvisionOrganizationMemberInput {
671
+ email: string;
672
+ /** `owner` is intentionally excluded — the owner is set via `ownerEmail`. */
673
+ role: FFIDAssignableMemberRole;
674
+ }
675
+ /** Parameters for `provisionOrganization`. */
676
+ interface FFIDProvisionOrganizationParams {
677
+ /** Organization display name (1–255 chars). */
678
+ name: string;
679
+ /**
680
+ * Email of the organization owner. The owner **must** already be an FFID user
681
+ * — provision them via `provisionUser` first, otherwise the call returns an
682
+ * `OWNER_NOT_FOUND` error (HTTP 422).
683
+ */
684
+ ownerEmail: string;
685
+ /** Optional billing contact email. */
686
+ billingEmail?: string;
687
+ /** Members to add idempotently (≤100 per request; validated client-side). */
688
+ members?: FFIDProvisionOrganizationMemberInput[];
689
+ /**
690
+ * When `true`, the server performs no writes and returns a
691
+ * {@link FFIDProvisionOrganizationDryRun} describing what a real call would do.
692
+ * @default false
693
+ */
694
+ dryRun?: boolean;
695
+ }
696
+ /** Minimal organization shape returned by the org provisioning helper. */
697
+ interface FFIDProvisionedOrganization {
698
+ /** Organization ID (UUID). */
699
+ id: string;
700
+ /** Organization display name. */
701
+ name: string;
702
+ /** URL-safe slug. */
703
+ slug: string;
704
+ }
705
+ /** Per-member outcome status of a real (non-dry-run) organization provision. */
706
+ type FFIDProvisionMemberStatus = 'added' | 'already_member' | 'user_not_found';
707
+ /** Per-member outcome status of a dry-run organization provision. */
708
+ type FFIDProvisionMemberPlanStatus = 'would_add' | 'already_member' | 'user_not_found';
709
+ /** Per-member outcome of a real (non-dry-run) organization provision. */
710
+ interface FFIDProvisionMemberResult {
711
+ email: string;
712
+ role: FFIDAssignableMemberRole;
713
+ /**
714
+ * - `added` — membership was inserted.
715
+ * - `already_member` — user was already a member (idempotent no-op).
716
+ * - `user_not_found` — no FFID user exists for this email (skipped).
717
+ */
718
+ status: FFIDProvisionMemberStatus;
719
+ }
720
+ /** Per-member plan of a dry-run organization provision. */
721
+ interface FFIDProvisionMemberPlan {
722
+ email: string;
723
+ role: FFIDAssignableMemberRole;
724
+ /**
725
+ * - `would_add` — user exists and is not yet a member.
726
+ * - `already_member` — user is already a member of the existing org.
727
+ * - `user_not_found` — no FFID user exists for this email.
728
+ */
729
+ status: FFIDProvisionMemberPlanStatus;
730
+ }
731
+ /** Real (non-dry-run) organization provisioning outcome. */
732
+ interface FFIDProvisionOrganizationOutcome {
733
+ /** Discriminant — absent/`false` for a real call. */
734
+ dryRun?: false;
735
+ /**
736
+ * `true` → a brand-new organization was created (HTTP 201).
737
+ * `false` → the owner already owned an org with this name; idempotent (HTTP 200).
738
+ */
739
+ created: boolean;
740
+ organization: FFIDProvisionedOrganization;
741
+ /** Per-member results (added / already_member / user_not_found). */
742
+ members: FFIDProvisionMemberResult[];
743
+ }
744
+ /** Dry-run organization provisioning outcome — no writes performed. */
745
+ interface FFIDProvisionOrganizationDryRun {
746
+ /** Discriminant — always `true` for a dry-run. */
747
+ dryRun: true;
748
+ /**
749
+ * Whether a real call would create a new organization. Coupled to
750
+ * `organization`: `wouldCreate === (organization === null)` — the server
751
+ * returns `organization: null` exactly when it would create a new org.
752
+ */
753
+ wouldCreate: boolean;
754
+ /** `null` when the org does not exist yet (would be created) — see `wouldCreate`. */
755
+ organization: FFIDProvisionedOrganization | null;
756
+ /** Per-member plans (would_add / already_member / user_not_found). */
757
+ members: FFIDProvisionMemberPlan[];
758
+ }
759
+ /**
760
+ * Response from `provisionOrganization`. Narrow on `dryRun`:
761
+ *
762
+ * ```ts
763
+ * if (res.dryRun) {
764
+ * // FFIDProvisionOrganizationDryRun — inspect res.wouldCreate / res.organization (nullable)
765
+ * } else {
766
+ * // FFIDProvisionOrganizationOutcome — inspect res.created / res.members
767
+ * }
768
+ * ```
769
+ *
770
+ * As with `FFIDProvisionUserResponse`, a real response omits `dryRun` on the
771
+ * wire, so narrow with `if (res.dryRun)` — not `res.dryRun === false`.
772
+ *
773
+ * When `ownerEmail` has no FFID user, the call resolves to
774
+ * `{ error: { code: 'OWNER_NOT_FOUND' } }` (HTTP 422) rather than a data branch.
775
+ */
776
+ type FFIDProvisionOrganizationResponse = FFIDProvisionOrganizationOutcome | FFIDProvisionOrganizationDryRun;
777
+
567
778
  /**
568
779
  * Contract resource types (#3787 Phase A)
569
780
  *
@@ -1157,7 +1368,7 @@ type FFIDErrorCode = (typeof FFID_ERROR_CODES)[keyof typeof FFID_ERROR_CODES];
1157
1368
  /** Creates an FFID API client instance */
1158
1369
  declare function createFFIDClient(config: FFIDConfig): {
1159
1370
  getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
1160
- signOut: () => Promise<FFIDApiResponse<void>>;
1371
+ signOut: () => Promise<FFIDApiResponse<FFIDSignOutResult>>;
1161
1372
  redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1162
1373
  redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1163
1374
  redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
@@ -1194,6 +1405,8 @@ declare function createFFIDClient(config: FFIDConfig): {
1194
1405
  organizationId: string;
1195
1406
  userId: string;
1196
1407
  }) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
1408
+ provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
1409
+ provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
1197
1410
  getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
1198
1411
  updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
1199
1412
  getLoginHistory: (params?: FFIDGetLoginHistoryParams) => Promise<FFIDApiResponse<FFIDLoginHistoryResponse>>;
@@ -2067,4 +2280,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
2067
2280
  };
2068
2281
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
2069
2282
 
2070
- 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, type ExchangeCodeForTokensOptions, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDErrorCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDMemberRole, type FFIDMemberStatus, 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 FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, type 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, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
2283
+ 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, type ExchangeCodeForTokensOptions, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDErrorCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDMemberRole, type FFIDMemberStatus, 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 FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, type FFIDProvisionMemberPlan, type FFIDProvisionMemberPlanStatus, type FFIDProvisionMemberResult, type FFIDProvisionMemberStatus, type FFIDProvisionOrganizationDryRun, type FFIDProvisionOrganizationMemberInput, type FFIDProvisionOrganizationOutcome, type FFIDProvisionOrganizationParams, type FFIDProvisionOrganizationResponse, type FFIDProvisionUserDryRun, type FFIDProvisionUserOutcome, type FFIDProvisionUserParams, type FFIDProvisionUserProfileInput, type FFIDProvisionUserResponse, type FFIDProvisionedOrganization, type FFIDProvisionedUser, FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, FFIDSignOutResult, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDRedirectResult, f as FFIDError, g as FFIDSubscriptionCheckResponse, h as FFIDCheckServiceAccessParams, i as FFIDServiceAccessDecision, j as FFIDAnalyticsConfig, k as FFIDVerifyAccessTokenOptions, l as FFIDOAuthUserInfo, m as FFIDInquiryCreateParams, n as FFIDInquiryCreateResponse, o as FFIDAuthMode, p as FFIDLogger, q as FFIDCacheAdapter, r as FFIDUser, s as FFIDOrganization, t as FFIDSubscription, u as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, v as FFIDOAuthUserInfoSubscription, w as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, x as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, y as FFIDAnnouncementsLogger } from './index-Bkul-fRw.js';
2
- export { z as Announcement, B as AnnouncementStatus, C as AnnouncementType, D as EFFECTIVE_SUBSCRIPTION_STATUSES, G as FFIDAnnouncementBadge, H as FFIDAnnouncementList, I as FFIDAnnouncementsError, J as FFIDAnnouncementsErrorCode, K as FFIDAnnouncementsServerResponse, M as FFIDCacheConfig, N as FFIDContextValue, O as FFIDInquiryCategory, P as FFIDInquiryCategorySite2026, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormClassNames, T as FFIDInquiryFormLegalLayout, U as FFIDInquiryFormOrganization, V as FFIDInquiryFormPlaceholderContext, W as FFIDInquiryFormPrefill, X as FFIDInquiryFormProps, Y as FFIDInquiryFormSubmitData, Z as FFIDInquiryFormSubmitResult, _ as FFIDJwtClaims, $ as FFIDLoginButton, a0 as FFIDOAuthTokenResponse, a1 as FFIDOAuthUserInfoMemberRole, a2 as FFIDOrganizationSwitcher, a3 as FFIDRedirectErrorCode, a4 as FFIDSeatModel, a5 as FFIDServiceAccessDenialReason, a6 as FFIDServiceAccessFailPolicy, a7 as FFIDSubscriptionBadge, a8 as FFIDTokenIntrospectionResponse, a9 as FFIDUserMenu, aa as FFID_INQUIRY_CATEGORIES, ab as FFID_INQUIRY_CATEGORIES_SITE_2026, ac as UseFFIDAnnouncementsOptions, ad as UseFFIDAnnouncementsReturn, ae as isFFIDInquiryCategorySite2026, af as useFFIDAnnouncements } from './index-Bkul-fRw.js';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDPrompt, b as FFIDConfig, c as FFIDApiResponse, d as FFIDSessionResponse, e as FFIDSignOutResult, f as FFIDRedirectResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDVerifyAccessTokenOptions, m as FFIDOAuthUserInfo, n as FFIDInquiryCreateParams, o as FFIDInquiryCreateResponse, p as FFIDAuthMode, q as FFIDLogger, r as FFIDCacheAdapter, s as FFIDUser, t as FFIDOrganization, u as FFIDSubscription, v as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, w as FFIDOAuthUserInfoSubscription, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index--wRiPlpi.js';
2
+ export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, G as EFFECTIVE_SUBSCRIPTION_STATUSES, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDApiResponseMeta, O as FFIDCacheConfig, P as FFIDContextValue, Q as FFIDInquiryCategory, R as FFIDInquiryCategorySite2026, S as FFIDInquiryForm, T as FFIDInquiryFormCategoryItem, U as FFIDInquiryFormClassNames, V as FFIDInquiryFormLegalLayout, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a0 as FFIDJwtClaims, a1 as FFIDLoginButton, a2 as FFIDOAuthTokenResponse, a3 as FFIDOAuthUserInfoMemberRole, a4 as FFIDOrganizationSwitcher, a5 as FFIDRedirectErrorCode, a6 as FFIDSeatModel, a7 as FFIDServiceAccessDenialReason, a8 as FFIDServiceAccessFailPolicy, a9 as FFIDSubscriptionBadge, aa as FFIDTokenIntrospectionResponse, ab as FFIDUserMenu, ac as FFID_INQUIRY_CATEGORIES, ad as FFID_INQUIRY_CATEGORIES_SITE_2026, ae as UseFFIDAnnouncementsOptions, af as UseFFIDAnnouncementsReturn, ag as isFFIDInquiryCategorySite2026, ah as useFFIDAnnouncements } from './index--wRiPlpi.js';
3
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-BJgVcJyw.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode, ComponentType, FC } from 'react';
@@ -564,6 +564,217 @@ interface FFIDRemoveMemberResponse {
564
564
  message: string;
565
565
  }
566
566
 
567
+ /**
568
+ * Provisioning types (ext API) — service-key-authenticated, idempotent user /
569
+ * organization provisioning for external batch migration (#3790 / #4127).
570
+ *
571
+ * Mirrors the server contract of `POST /api/v1/ext/users/provision` and
572
+ * `POST /api/v1/ext/organizations/provision`. Responses are modelled as
573
+ * discriminated unions on `dryRun` so consumers narrow with `if (res.dryRun)`
574
+ * and the compiler enforces which fields are present on each branch
575
+ * (`wouldCreate` on dry-run, `created` on a real call).
576
+ */
577
+
578
+ /** Optional business-profile fields applied to a freshly provisioned user. */
579
+ interface FFIDProvisionUserProfileInput {
580
+ /** Display name (1–255 chars). */
581
+ displayName?: string;
582
+ /** Company name (≤255 chars). */
583
+ companyName?: string;
584
+ /** Department (≤255 chars). */
585
+ department?: string;
586
+ /** Job title (≤255 chars). */
587
+ jobTitle?: string;
588
+ /** Phone number (≤30 chars). */
589
+ phone?: string;
590
+ }
591
+ /** Parameters for `provisionUser`. */
592
+ interface FFIDProvisionUserParams {
593
+ /**
594
+ * Email of the user to provision. Normalized (trim + lowercase) server-side
595
+ * before the idempotency lookup, so re-runs with different casing resolve to
596
+ * the same user.
597
+ */
598
+ email: string;
599
+ /** Optional business profile applied only when a new user is created. */
600
+ profile?: FFIDProvisionUserProfileInput;
601
+ /**
602
+ * When `true`, the server performs no writes and returns a
603
+ * {@link FFIDProvisionUserDryRun} describing what a real call would do.
604
+ * @default false
605
+ */
606
+ dryRun?: boolean;
607
+ }
608
+ /** Minimal identity returned for a provisioned / resolved user. */
609
+ interface FFIDProvisionedUser {
610
+ /** User ID (UUID). */
611
+ id: string;
612
+ /** Email address (normalized). */
613
+ email: string;
614
+ }
615
+ /**
616
+ * Real (non-dry-run) user provisioning outcome.
617
+ *
618
+ * Idempotent: an existing email resolves to `created: false` (HTTP 200) instead
619
+ * of creating a duplicate; a new email yields `created: true` (HTTP 201) for a
620
+ * passwordless, email-confirmed user.
621
+ */
622
+ interface FFIDProvisionUserOutcome {
623
+ /** Discriminant — absent/`false` for a real call. */
624
+ dryRun?: false;
625
+ /**
626
+ * `true` → a new passwordless, email-confirmed user was created (HTTP 201).
627
+ * `false` → a user with this email already existed; idempotent no-op (HTTP 200).
628
+ */
629
+ created: boolean;
630
+ user: FFIDProvisionedUser;
631
+ /**
632
+ * Present only when a new user was created **and** a `profile` was supplied.
633
+ * `false` means the user row was created but the authoritative profile write
634
+ * did not complete — some profile fields may not be fully applied, so
635
+ * re-issue the profile to be sure. Absent on the idempotent-existing branch
636
+ * and when no profile was requested.
637
+ */
638
+ profileWritten?: boolean;
639
+ }
640
+ /** Dry-run user provisioning outcome — no writes performed. */
641
+ interface FFIDProvisionUserDryRun {
642
+ /** Discriminant — always `true` for a dry-run. */
643
+ dryRun: true;
644
+ /** Whether a real call would create a new user. */
645
+ wouldCreate: boolean;
646
+ /** `id` is present only when the user already exists. */
647
+ user: {
648
+ id?: string;
649
+ email: string;
650
+ };
651
+ }
652
+ /**
653
+ * Response from `provisionUser`. Narrow with the truthiness of `dryRun`:
654
+ *
655
+ * ```ts
656
+ * if (res.dryRun) {
657
+ * // FFIDProvisionUserDryRun — inspect res.wouldCreate
658
+ * } else {
659
+ * // FFIDProvisionUserOutcome — inspect res.created
660
+ * }
661
+ * ```
662
+ *
663
+ * A real (non-dry-run) response omits `dryRun` on the wire (it is `undefined`,
664
+ * not `false`), so narrow with `if (res.dryRun)` — do **not** use
665
+ * `res.dryRun === false` or `switch (res.dryRun)`, which would miss every real
666
+ * response. This mirrors how `FFIDApiResponse` is narrowed on `data` / `error`.
667
+ */
668
+ type FFIDProvisionUserResponse = FFIDProvisionUserOutcome | FFIDProvisionUserDryRun;
669
+ /** A member to add to the provisioned organization. */
670
+ interface FFIDProvisionOrganizationMemberInput {
671
+ email: string;
672
+ /** `owner` is intentionally excluded — the owner is set via `ownerEmail`. */
673
+ role: FFIDAssignableMemberRole;
674
+ }
675
+ /** Parameters for `provisionOrganization`. */
676
+ interface FFIDProvisionOrganizationParams {
677
+ /** Organization display name (1–255 chars). */
678
+ name: string;
679
+ /**
680
+ * Email of the organization owner. The owner **must** already be an FFID user
681
+ * — provision them via `provisionUser` first, otherwise the call returns an
682
+ * `OWNER_NOT_FOUND` error (HTTP 422).
683
+ */
684
+ ownerEmail: string;
685
+ /** Optional billing contact email. */
686
+ billingEmail?: string;
687
+ /** Members to add idempotently (≤100 per request; validated client-side). */
688
+ members?: FFIDProvisionOrganizationMemberInput[];
689
+ /**
690
+ * When `true`, the server performs no writes and returns a
691
+ * {@link FFIDProvisionOrganizationDryRun} describing what a real call would do.
692
+ * @default false
693
+ */
694
+ dryRun?: boolean;
695
+ }
696
+ /** Minimal organization shape returned by the org provisioning helper. */
697
+ interface FFIDProvisionedOrganization {
698
+ /** Organization ID (UUID). */
699
+ id: string;
700
+ /** Organization display name. */
701
+ name: string;
702
+ /** URL-safe slug. */
703
+ slug: string;
704
+ }
705
+ /** Per-member outcome status of a real (non-dry-run) organization provision. */
706
+ type FFIDProvisionMemberStatus = 'added' | 'already_member' | 'user_not_found';
707
+ /** Per-member outcome status of a dry-run organization provision. */
708
+ type FFIDProvisionMemberPlanStatus = 'would_add' | 'already_member' | 'user_not_found';
709
+ /** Per-member outcome of a real (non-dry-run) organization provision. */
710
+ interface FFIDProvisionMemberResult {
711
+ email: string;
712
+ role: FFIDAssignableMemberRole;
713
+ /**
714
+ * - `added` — membership was inserted.
715
+ * - `already_member` — user was already a member (idempotent no-op).
716
+ * - `user_not_found` — no FFID user exists for this email (skipped).
717
+ */
718
+ status: FFIDProvisionMemberStatus;
719
+ }
720
+ /** Per-member plan of a dry-run organization provision. */
721
+ interface FFIDProvisionMemberPlan {
722
+ email: string;
723
+ role: FFIDAssignableMemberRole;
724
+ /**
725
+ * - `would_add` — user exists and is not yet a member.
726
+ * - `already_member` — user is already a member of the existing org.
727
+ * - `user_not_found` — no FFID user exists for this email.
728
+ */
729
+ status: FFIDProvisionMemberPlanStatus;
730
+ }
731
+ /** Real (non-dry-run) organization provisioning outcome. */
732
+ interface FFIDProvisionOrganizationOutcome {
733
+ /** Discriminant — absent/`false` for a real call. */
734
+ dryRun?: false;
735
+ /**
736
+ * `true` → a brand-new organization was created (HTTP 201).
737
+ * `false` → the owner already owned an org with this name; idempotent (HTTP 200).
738
+ */
739
+ created: boolean;
740
+ organization: FFIDProvisionedOrganization;
741
+ /** Per-member results (added / already_member / user_not_found). */
742
+ members: FFIDProvisionMemberResult[];
743
+ }
744
+ /** Dry-run organization provisioning outcome — no writes performed. */
745
+ interface FFIDProvisionOrganizationDryRun {
746
+ /** Discriminant — always `true` for a dry-run. */
747
+ dryRun: true;
748
+ /**
749
+ * Whether a real call would create a new organization. Coupled to
750
+ * `organization`: `wouldCreate === (organization === null)` — the server
751
+ * returns `organization: null` exactly when it would create a new org.
752
+ */
753
+ wouldCreate: boolean;
754
+ /** `null` when the org does not exist yet (would be created) — see `wouldCreate`. */
755
+ organization: FFIDProvisionedOrganization | null;
756
+ /** Per-member plans (would_add / already_member / user_not_found). */
757
+ members: FFIDProvisionMemberPlan[];
758
+ }
759
+ /**
760
+ * Response from `provisionOrganization`. Narrow on `dryRun`:
761
+ *
762
+ * ```ts
763
+ * if (res.dryRun) {
764
+ * // FFIDProvisionOrganizationDryRun — inspect res.wouldCreate / res.organization (nullable)
765
+ * } else {
766
+ * // FFIDProvisionOrganizationOutcome — inspect res.created / res.members
767
+ * }
768
+ * ```
769
+ *
770
+ * As with `FFIDProvisionUserResponse`, a real response omits `dryRun` on the
771
+ * wire, so narrow with `if (res.dryRun)` — not `res.dryRun === false`.
772
+ *
773
+ * When `ownerEmail` has no FFID user, the call resolves to
774
+ * `{ error: { code: 'OWNER_NOT_FOUND' } }` (HTTP 422) rather than a data branch.
775
+ */
776
+ type FFIDProvisionOrganizationResponse = FFIDProvisionOrganizationOutcome | FFIDProvisionOrganizationDryRun;
777
+
567
778
  /**
568
779
  * Contract resource types (#3787 Phase A)
569
780
  *
@@ -1157,7 +1368,7 @@ type FFIDErrorCode = (typeof FFID_ERROR_CODES)[keyof typeof FFID_ERROR_CODES];
1157
1368
  /** Creates an FFID API client instance */
1158
1369
  declare function createFFIDClient(config: FFIDConfig): {
1159
1370
  getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
1160
- signOut: () => Promise<FFIDApiResponse<void>>;
1371
+ signOut: () => Promise<FFIDApiResponse<FFIDSignOutResult>>;
1161
1372
  redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1162
1373
  redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
1163
1374
  redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
@@ -1194,6 +1405,8 @@ declare function createFFIDClient(config: FFIDConfig): {
1194
1405
  organizationId: string;
1195
1406
  userId: string;
1196
1407
  }) => Promise<FFIDApiResponse<FFIDRemoveMemberResponse>>;
1408
+ provisionUser: (params: FFIDProvisionUserParams) => Promise<FFIDApiResponse<FFIDProvisionUserResponse>>;
1409
+ provisionOrganization: (params: FFIDProvisionOrganizationParams) => Promise<FFIDApiResponse<FFIDProvisionOrganizationResponse>>;
1197
1410
  getProfile: (options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
1198
1411
  updateProfile: (data: FFIDUpdateUserProfileRequest, options?: FFIDProfileCallOptions) => Promise<FFIDApiResponse<FFIDUserProfile>>;
1199
1412
  getLoginHistory: (params?: FFIDGetLoginHistoryParams) => Promise<FFIDApiResponse<FFIDLoginHistoryResponse>>;
@@ -2067,4 +2280,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
2067
2280
  };
2068
2281
  type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
2069
2282
 
2070
- 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, type ExchangeCodeForTokensOptions, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDErrorCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDMemberRole, type FFIDMemberStatus, 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 FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, type 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, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
2283
+ 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, type ExchangeCodeForTokensOptions, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, type FFIDCreateCheckoutParams, type FFIDCreatePortalParams, FFIDError, type FFIDErrorCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, type FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDMemberRole, type FFIDMemberStatus, 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 FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, type FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, type FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, type FFIDProvisionMemberPlan, type FFIDProvisionMemberPlanStatus, type FFIDProvisionMemberResult, type FFIDProvisionMemberStatus, type FFIDProvisionOrganizationDryRun, type FFIDProvisionOrganizationMemberInput, type FFIDProvisionOrganizationOutcome, type FFIDProvisionOrganizationParams, type FFIDProvisionOrganizationResponse, type FFIDProvisionUserDryRun, type FFIDProvisionUserOutcome, type FFIDProvisionUserParams, type FFIDProvisionUserProfileInput, type FFIDProvisionUserResponse, type FFIDProvisionedOrganization, type FFIDProvisionedUser, FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDSeatChangeLineItem, type FFIDSeatChangePreview, type FFIDSeatChangePreviewResponse, FFIDServiceAccessDecision, type FFIDServiceInfo, FFIDSessionResponse, FFIDSignOutResult, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext, useSubscription } from './chunk-L2H56C4W.js';
2
- export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-L2H56C4W.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-U57ZDFEN.js';
2
+ export { ACCESS_GRANTING_EFFECTIVE_STATUSES, BLOCKING_EFFECTIVE_STATUSES, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, handleRedirectCallback, hasAccessFromUserinfo, isBlockedFromUserinfo, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, retrieveState, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-U57ZDFEN.js';
3
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-G7VOX64X.js';
4
4
  import { useEffect, useRef } from 'react';
5
5
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -25,7 +25,8 @@ var noopLogger = {
25
25
  },
26
26
  warn: () => {
27
27
  },
28
- error: (...args) => console.error(SDK_LOG_PREFIX, ...args)
28
+ error: () => {
29
+ }
29
30
  };
30
31
  var consoleLogger = {
31
32
  debug: (...args) => console.debug(SDK_LOG_PREFIX, ...args),
@@ -24,7 +24,8 @@ var noopLogger = {
24
24
  },
25
25
  warn: () => {
26
26
  },
27
- error: (...args) => console.error(SDK_LOG_PREFIX, ...args)
27
+ error: () => {
28
+ }
28
29
  };
29
30
  var consoleLogger = {
30
31
  debug: (...args) => console.debug(SDK_LOG_PREFIX, ...args),