@feelflow/ffid-sdk 2.7.0 → 2.9.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.
@@ -630,6 +630,48 @@ interface UseFFIDAnnouncementsReturn {
630
630
  */
631
631
  declare function useFFIDAnnouncements(options?: UseFFIDAnnouncementsOptions): UseFFIDAnnouncementsReturn;
632
632
 
633
+ /**
634
+ * Inquiry types exposed by the FFID SDK.
635
+ *
636
+ * Mirrors the `/api/v1/ext/inquiry` and `/api/contact` endpoints
637
+ * with a single shared shape so that consumers can render one
638
+ * `<FFIDInquiryForm />` and submit through either endpoint.
639
+ */
640
+ /**
641
+ * Categories surfaced by the default form. Consumers are free to
642
+ * pass their own list via `<FFIDInquiryForm categories={...} />`.
643
+ */
644
+ declare const FFID_INQUIRY_CATEGORIES: readonly ["general", "sales", "support", "partnership", "press", "other"];
645
+ type FFIDInquiryCategory = (typeof FFID_INQUIRY_CATEGORIES)[number];
646
+ /**
647
+ * Parameters for `client.inquiry.create()`. When submitting from a
648
+ * server-side SDK (Service API Key), set `source` to a stable
649
+ * origin string so admins can trace the submission back.
650
+ */
651
+ interface FFIDInquiryCreateParams {
652
+ email: string;
653
+ name: string;
654
+ message: string;
655
+ category?: FFIDInquiryCategory | (string & {});
656
+ company?: string;
657
+ phone?: string;
658
+ locale?: 'ja' | 'en';
659
+ /** Current terms-of-service version the submitter agreed to. */
660
+ termsVersion: string;
661
+ /** Current privacy-policy version the submitter agreed to. */
662
+ privacyVersion: string;
663
+ /** Opt-in to the post-inquiry follow-up newsletter (Type A). */
664
+ inquiryFollowupOptIn?: boolean;
665
+ /** Opt-in to the general marketing newsletter (Type B). */
666
+ generalNewsletterOptIn?: boolean;
667
+ }
668
+ interface FFIDInquiryCreateResponse {
669
+ ok: true;
670
+ inquiryId: string;
671
+ /** True only when the submitter is already a confirmed newsletter subscriber. */
672
+ newsletterSubscribed: boolean;
673
+ }
674
+
633
675
  interface FFIDLoginButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
634
676
  /** Button content */
635
677
  children?: ReactNode;
@@ -844,4 +886,116 @@ interface FFIDAnnouncementListProps {
844
886
  */
845
887
  declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
846
888
 
847
- export { useFFIDAnnouncements as $, type AnnouncementListResponse as A, type Announcement as B, type AnnouncementStatus as C, type AnnouncementType as D, FFIDAnnouncementBadge 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 FFIDJwtClaims as N, FFIDLoginButton as O, type FFIDMemberStatus as P, type FFIDOAuthTokenResponse as Q, type FFIDOAuthUserInfoMemberRole as R, type FFIDOAuthUserInfoSubscription as S, type FFIDOrganizationMember as T, FFIDOrganizationSwitcher as U, type FFIDSeatModel as V, FFIDSubscriptionBadge as W, type FFIDTokenIntrospectionResponse as X, FFIDUserMenu as Y, type UseFFIDAnnouncementsOptions as Z, type UseFFIDAnnouncementsReturn as _, type FFIDConfig as a, type FFIDAnnouncementBadgeClassNames as a0, type FFIDAnnouncementBadgeProps as a1, type FFIDAnnouncementListClassNames as a2, type FFIDAnnouncementListProps as a3, type FFIDLoginButtonProps as a4, type FFIDOrganizationSwitcherClassNames as a5, type FFIDOrganizationSwitcherProps as a6, type FFIDSubscriptionBadgeClassNames as a7, type FFIDSubscriptionBadgeProps as a8, type FFIDUserMenuClassNames as a9, type FFIDUserMenuProps as aa, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDCreateCheckoutParams as k, type FFIDCheckoutSessionResponse as l, type FFIDCreatePortalParams as m, type FFIDPortalSessionResponse as n, type FFIDVerifyAccessTokenOptions as o, type FFIDOAuthUserInfo 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 FFIDAnnouncementsClientConfig as x, type FFIDAnnouncementsApiResponse as y, type FFIDAnnouncementsLogger as z };
889
+ /**
890
+ * Known category literal with an escape hatch for arbitrary strings, so
891
+ * IDE autocomplete suggests the built-in set while still accepting any
892
+ * consumer-defined value.
893
+ */
894
+ type FFIDInquiryCategoryValue = FFIDInquiryCategory | (string & {});
895
+ /** Organization summary rendered in the selector. */
896
+ interface FFIDInquiryFormOrganization {
897
+ id: string;
898
+ name: string;
899
+ slug?: string;
900
+ role?: string;
901
+ }
902
+ /**
903
+ * Initial form values. Prefill is read **only on mount**; later changes
904
+ * to these keys are ignored (remount via `key={...}` to reseed). In
905
+ * `mode='authenticated'` the company/phone fields are hidden, so
906
+ * `prefill.company` / `prefill.phone` are ignored to avoid submitting
907
+ * values the user cannot see or edit.
908
+ */
909
+ interface FFIDInquiryFormPrefill {
910
+ name?: string;
911
+ email?: string;
912
+ company?: string;
913
+ phone?: string;
914
+ /**
915
+ * Preselected category value. Silently ignored if the value does not
916
+ * match any entry in `categories` (or the default list when `categories`
917
+ * is omitted), so consumers can safely forward URL query strings.
918
+ */
919
+ category?: FFIDInquiryCategoryValue;
920
+ message?: string;
921
+ }
922
+ /**
923
+ * Category option rendered in the form select. If any item has a
924
+ * `group` the select switches into `<optgroup>` mode; ungrouped items
925
+ * are emitted as bare `<option>` entries before the first `<optgroup>`
926
+ * in DOM order. Groups render in the order each `group` key first
927
+ * appears in `categories`, and the first encountered `groupLabel` wins
928
+ * when a `group` key repeats with inconsistent labels.
929
+ */
930
+ interface FFIDInquiryFormCategoryItem {
931
+ value: string;
932
+ label: string;
933
+ group?: string;
934
+ groupLabel?: string;
935
+ }
936
+ interface FFIDInquiryFormSubmitData {
937
+ name: string;
938
+ email: string;
939
+ company: string | null;
940
+ phone: string | null;
941
+ category: string;
942
+ message: string;
943
+ organizationId: string | null;
944
+ inquiryFollowupOptIn: boolean;
945
+ generalNewsletterOptIn: boolean;
946
+ termsVersion: string;
947
+ privacyVersion: string;
948
+ turnstileToken: string | null;
949
+ locale: 'ja' | 'en';
950
+ }
951
+ type FFIDInquiryFormSubmitResult = {
952
+ ok: true;
953
+ requiresDoubleOptIn?: boolean;
954
+ message?: string;
955
+ } | {
956
+ ok: false;
957
+ message: string;
958
+ };
959
+ interface FFIDInquiryFormProps {
960
+ mode: 'anonymous' | 'authenticated';
961
+ prefill?: FFIDInquiryFormPrefill;
962
+ organizations?: FFIDInquiryFormOrganization[];
963
+ preselectedOrganizationId?: string | null;
964
+ categories?: ReadonlyArray<FFIDInquiryFormCategoryItem>;
965
+ termsVersion: string;
966
+ privacyVersion: string;
967
+ termsHref?: string;
968
+ privacyHref?: string;
969
+ /** Must be refreshed by the consumer when the Turnstile widget reissues a token. */
970
+ turnstileToken?: string | null;
971
+ /** Slot for the consumer's Turnstile widget (anonymous mode only). */
972
+ turnstileSlot?: ReactNode;
973
+ onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
974
+ /**
975
+ * Called after every change to a field that is part of the submit
976
+ * payload (including the initial mount with prefilled values and
977
+ * re-fires when `termsVersion`/`privacyVersion`/`turnstileToken`/
978
+ * `locale` props change). Enables consumers to mirror state for
979
+ * URL-driven banners, analytics, or dynamic placeholders without
980
+ * owning the form. Consent checkboxes (`separateLegalCheckboxes` or
981
+ * the combined variant) are intentionally excluded — they are not
982
+ * part of `FFIDInquiryFormSubmitData`. Emitted values use the same
983
+ * normalization as `onSubmit` (string fields are trimmed; empty
984
+ * strings become `null` for `company` / `phone`).
985
+ *
986
+ * React StrictMode double-invokes effects in development, so expect
987
+ * two calls per mount in dev builds.
988
+ */
989
+ onChange?: (data: FFIDInquiryFormSubmitData) => void;
990
+ /**
991
+ * When true, renders the legal agreement as two independent checkboxes
992
+ * (terms and privacy). Defaults to `false`, preserving the combined
993
+ * single-checkbox behavior from SDK ≤ 2.8.
994
+ */
995
+ separateLegalCheckboxes?: boolean;
996
+ locale?: 'ja' | 'en';
997
+ className?: string;
998
+ }
999
+ declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, separateLegalCheckboxes, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1000
+
1001
+ export { type FFIDOAuthUserInfoMemberRole as $, type FFIDAnnouncementsApiResponse as A, type AnnouncementListResponse as B, type FFIDAnnouncementsLogger as C, type Announcement as D, type AnnouncementStatus as E, type FFIDSubscriptionStatus as F, type AnnouncementType as G, FFIDAnnouncementBadge as H, FFIDAnnouncementList as I, type FFIDAnnouncementsError as J, type FFIDAnnouncementsErrorCode as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsServerResponse as M, type FFIDCacheConfig as N, type FFIDContextValue as O, type FFIDInquiryCategory as P, FFIDInquiryForm as Q, type FFIDInquiryFormCategoryItem as R, type FFIDInquiryFormOrganization as S, type FFIDInquiryFormPrefill as T, type FFIDInquiryFormProps as U, type FFIDInquiryFormSubmitData as V, type FFIDInquiryFormSubmitResult as W, type FFIDJwtClaims as X, FFIDLoginButton as Y, type FFIDMemberStatus as Z, type FFIDOAuthTokenResponse as _, type FFIDConfig as a, type FFIDOAuthUserInfoSubscription as a0, type FFIDOrganizationMember as a1, FFIDOrganizationSwitcher as a2, type FFIDSeatModel as a3, FFIDSubscriptionBadge as a4, type FFIDTokenIntrospectionResponse as a5, FFIDUserMenu as a6, FFID_INQUIRY_CATEGORIES as a7, type UseFFIDAnnouncementsOptions as a8, type UseFFIDAnnouncementsReturn as a9, useFFIDAnnouncements as aa, type FFIDAnnouncementBadgeClassNames as ab, type FFIDAnnouncementBadgeProps as ac, type FFIDAnnouncementListClassNames as ad, type FFIDAnnouncementListProps as ae, type FFIDLoginButtonProps as af, type FFIDOrganizationSwitcherClassNames as ag, type FFIDOrganizationSwitcherProps as ah, type FFIDSubscriptionBadgeClassNames as ai, type FFIDSubscriptionBadgeProps as aj, type FFIDUserMenuClassNames as ak, type FFIDUserMenuProps as al, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDCreateCheckoutParams as k, type FFIDCheckoutSessionResponse as l, type FFIDCreatePortalParams as m, type FFIDPortalSessionResponse as n, type FFIDVerifyAccessTokenOptions as o, type FFIDOAuthUserInfo as p, type FFIDInquiryCreateParams as q, type FFIDInquiryCreateResponse as r, type FFIDAuthMode as s, type FFIDLogger as t, type FFIDCacheAdapter as u, type FFIDUser as v, type FFIDOrganization as w, type FFIDSubscription as x, type FFIDSubscriptionContextValue as y, type FFIDAnnouncementsClientConfig as z };
@@ -630,6 +630,48 @@ interface UseFFIDAnnouncementsReturn {
630
630
  */
631
631
  declare function useFFIDAnnouncements(options?: UseFFIDAnnouncementsOptions): UseFFIDAnnouncementsReturn;
632
632
 
633
+ /**
634
+ * Inquiry types exposed by the FFID SDK.
635
+ *
636
+ * Mirrors the `/api/v1/ext/inquiry` and `/api/contact` endpoints
637
+ * with a single shared shape so that consumers can render one
638
+ * `<FFIDInquiryForm />` and submit through either endpoint.
639
+ */
640
+ /**
641
+ * Categories surfaced by the default form. Consumers are free to
642
+ * pass their own list via `<FFIDInquiryForm categories={...} />`.
643
+ */
644
+ declare const FFID_INQUIRY_CATEGORIES: readonly ["general", "sales", "support", "partnership", "press", "other"];
645
+ type FFIDInquiryCategory = (typeof FFID_INQUIRY_CATEGORIES)[number];
646
+ /**
647
+ * Parameters for `client.inquiry.create()`. When submitting from a
648
+ * server-side SDK (Service API Key), set `source` to a stable
649
+ * origin string so admins can trace the submission back.
650
+ */
651
+ interface FFIDInquiryCreateParams {
652
+ email: string;
653
+ name: string;
654
+ message: string;
655
+ category?: FFIDInquiryCategory | (string & {});
656
+ company?: string;
657
+ phone?: string;
658
+ locale?: 'ja' | 'en';
659
+ /** Current terms-of-service version the submitter agreed to. */
660
+ termsVersion: string;
661
+ /** Current privacy-policy version the submitter agreed to. */
662
+ privacyVersion: string;
663
+ /** Opt-in to the post-inquiry follow-up newsletter (Type A). */
664
+ inquiryFollowupOptIn?: boolean;
665
+ /** Opt-in to the general marketing newsletter (Type B). */
666
+ generalNewsletterOptIn?: boolean;
667
+ }
668
+ interface FFIDInquiryCreateResponse {
669
+ ok: true;
670
+ inquiryId: string;
671
+ /** True only when the submitter is already a confirmed newsletter subscriber. */
672
+ newsletterSubscribed: boolean;
673
+ }
674
+
633
675
  interface FFIDLoginButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
634
676
  /** Button content */
635
677
  children?: ReactNode;
@@ -844,4 +886,116 @@ interface FFIDAnnouncementListProps {
844
886
  */
845
887
  declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
846
888
 
847
- export { useFFIDAnnouncements as $, type AnnouncementListResponse as A, type Announcement as B, type AnnouncementStatus as C, type AnnouncementType as D, FFIDAnnouncementBadge 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 FFIDJwtClaims as N, FFIDLoginButton as O, type FFIDMemberStatus as P, type FFIDOAuthTokenResponse as Q, type FFIDOAuthUserInfoMemberRole as R, type FFIDOAuthUserInfoSubscription as S, type FFIDOrganizationMember as T, FFIDOrganizationSwitcher as U, type FFIDSeatModel as V, FFIDSubscriptionBadge as W, type FFIDTokenIntrospectionResponse as X, FFIDUserMenu as Y, type UseFFIDAnnouncementsOptions as Z, type UseFFIDAnnouncementsReturn as _, type FFIDConfig as a, type FFIDAnnouncementBadgeClassNames as a0, type FFIDAnnouncementBadgeProps as a1, type FFIDAnnouncementListClassNames as a2, type FFIDAnnouncementListProps as a3, type FFIDLoginButtonProps as a4, type FFIDOrganizationSwitcherClassNames as a5, type FFIDOrganizationSwitcherProps as a6, type FFIDSubscriptionBadgeClassNames as a7, type FFIDSubscriptionBadgeProps as a8, type FFIDUserMenuClassNames as a9, type FFIDUserMenuProps as aa, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDCreateCheckoutParams as k, type FFIDCheckoutSessionResponse as l, type FFIDCreatePortalParams as m, type FFIDPortalSessionResponse as n, type FFIDVerifyAccessTokenOptions as o, type FFIDOAuthUserInfo 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 FFIDAnnouncementsClientConfig as x, type FFIDAnnouncementsApiResponse as y, type FFIDAnnouncementsLogger as z };
889
+ /**
890
+ * Known category literal with an escape hatch for arbitrary strings, so
891
+ * IDE autocomplete suggests the built-in set while still accepting any
892
+ * consumer-defined value.
893
+ */
894
+ type FFIDInquiryCategoryValue = FFIDInquiryCategory | (string & {});
895
+ /** Organization summary rendered in the selector. */
896
+ interface FFIDInquiryFormOrganization {
897
+ id: string;
898
+ name: string;
899
+ slug?: string;
900
+ role?: string;
901
+ }
902
+ /**
903
+ * Initial form values. Prefill is read **only on mount**; later changes
904
+ * to these keys are ignored (remount via `key={...}` to reseed). In
905
+ * `mode='authenticated'` the company/phone fields are hidden, so
906
+ * `prefill.company` / `prefill.phone` are ignored to avoid submitting
907
+ * values the user cannot see or edit.
908
+ */
909
+ interface FFIDInquiryFormPrefill {
910
+ name?: string;
911
+ email?: string;
912
+ company?: string;
913
+ phone?: string;
914
+ /**
915
+ * Preselected category value. Silently ignored if the value does not
916
+ * match any entry in `categories` (or the default list when `categories`
917
+ * is omitted), so consumers can safely forward URL query strings.
918
+ */
919
+ category?: FFIDInquiryCategoryValue;
920
+ message?: string;
921
+ }
922
+ /**
923
+ * Category option rendered in the form select. If any item has a
924
+ * `group` the select switches into `<optgroup>` mode; ungrouped items
925
+ * are emitted as bare `<option>` entries before the first `<optgroup>`
926
+ * in DOM order. Groups render in the order each `group` key first
927
+ * appears in `categories`, and the first encountered `groupLabel` wins
928
+ * when a `group` key repeats with inconsistent labels.
929
+ */
930
+ interface FFIDInquiryFormCategoryItem {
931
+ value: string;
932
+ label: string;
933
+ group?: string;
934
+ groupLabel?: string;
935
+ }
936
+ interface FFIDInquiryFormSubmitData {
937
+ name: string;
938
+ email: string;
939
+ company: string | null;
940
+ phone: string | null;
941
+ category: string;
942
+ message: string;
943
+ organizationId: string | null;
944
+ inquiryFollowupOptIn: boolean;
945
+ generalNewsletterOptIn: boolean;
946
+ termsVersion: string;
947
+ privacyVersion: string;
948
+ turnstileToken: string | null;
949
+ locale: 'ja' | 'en';
950
+ }
951
+ type FFIDInquiryFormSubmitResult = {
952
+ ok: true;
953
+ requiresDoubleOptIn?: boolean;
954
+ message?: string;
955
+ } | {
956
+ ok: false;
957
+ message: string;
958
+ };
959
+ interface FFIDInquiryFormProps {
960
+ mode: 'anonymous' | 'authenticated';
961
+ prefill?: FFIDInquiryFormPrefill;
962
+ organizations?: FFIDInquiryFormOrganization[];
963
+ preselectedOrganizationId?: string | null;
964
+ categories?: ReadonlyArray<FFIDInquiryFormCategoryItem>;
965
+ termsVersion: string;
966
+ privacyVersion: string;
967
+ termsHref?: string;
968
+ privacyHref?: string;
969
+ /** Must be refreshed by the consumer when the Turnstile widget reissues a token. */
970
+ turnstileToken?: string | null;
971
+ /** Slot for the consumer's Turnstile widget (anonymous mode only). */
972
+ turnstileSlot?: ReactNode;
973
+ onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
974
+ /**
975
+ * Called after every change to a field that is part of the submit
976
+ * payload (including the initial mount with prefilled values and
977
+ * re-fires when `termsVersion`/`privacyVersion`/`turnstileToken`/
978
+ * `locale` props change). Enables consumers to mirror state for
979
+ * URL-driven banners, analytics, or dynamic placeholders without
980
+ * owning the form. Consent checkboxes (`separateLegalCheckboxes` or
981
+ * the combined variant) are intentionally excluded — they are not
982
+ * part of `FFIDInquiryFormSubmitData`. Emitted values use the same
983
+ * normalization as `onSubmit` (string fields are trimmed; empty
984
+ * strings become `null` for `company` / `phone`).
985
+ *
986
+ * React StrictMode double-invokes effects in development, so expect
987
+ * two calls per mount in dev builds.
988
+ */
989
+ onChange?: (data: FFIDInquiryFormSubmitData) => void;
990
+ /**
991
+ * When true, renders the legal agreement as two independent checkboxes
992
+ * (terms and privacy). Defaults to `false`, preserving the combined
993
+ * single-checkbox behavior from SDK ≤ 2.8.
994
+ */
995
+ separateLegalCheckboxes?: boolean;
996
+ locale?: 'ja' | 'en';
997
+ className?: string;
998
+ }
999
+ declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, separateLegalCheckboxes, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1000
+
1001
+ export { type FFIDOAuthUserInfoMemberRole as $, type FFIDAnnouncementsApiResponse as A, type AnnouncementListResponse as B, type FFIDAnnouncementsLogger as C, type Announcement as D, type AnnouncementStatus as E, type FFIDSubscriptionStatus as F, type AnnouncementType as G, FFIDAnnouncementBadge as H, FFIDAnnouncementList as I, type FFIDAnnouncementsError as J, type FFIDAnnouncementsErrorCode as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsServerResponse as M, type FFIDCacheConfig as N, type FFIDContextValue as O, type FFIDInquiryCategory as P, FFIDInquiryForm as Q, type FFIDInquiryFormCategoryItem as R, type FFIDInquiryFormOrganization as S, type FFIDInquiryFormPrefill as T, type FFIDInquiryFormProps as U, type FFIDInquiryFormSubmitData as V, type FFIDInquiryFormSubmitResult as W, type FFIDJwtClaims as X, FFIDLoginButton as Y, type FFIDMemberStatus as Z, type FFIDOAuthTokenResponse as _, type FFIDConfig as a, type FFIDOAuthUserInfoSubscription as a0, type FFIDOrganizationMember as a1, FFIDOrganizationSwitcher as a2, type FFIDSeatModel as a3, FFIDSubscriptionBadge as a4, type FFIDTokenIntrospectionResponse as a5, FFIDUserMenu as a6, FFID_INQUIRY_CATEGORIES as a7, type UseFFIDAnnouncementsOptions as a8, type UseFFIDAnnouncementsReturn as a9, useFFIDAnnouncements as aa, type FFIDAnnouncementBadgeClassNames as ab, type FFIDAnnouncementBadgeProps as ac, type FFIDAnnouncementListClassNames as ad, type FFIDAnnouncementListProps as ae, type FFIDLoginButtonProps as af, type FFIDOrganizationSwitcherClassNames as ag, type FFIDOrganizationSwitcherProps as ah, type FFIDSubscriptionBadgeClassNames as ai, type FFIDSubscriptionBadgeProps as aj, type FFIDUserMenuClassNames as ak, type FFIDUserMenuProps as al, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDCreateCheckoutParams as k, type FFIDCheckoutSessionResponse as l, type FFIDCreatePortalParams as m, type FFIDPortalSessionResponse as n, type FFIDVerifyAccessTokenOptions as o, type FFIDOAuthUserInfo as p, type FFIDInquiryCreateParams as q, type FFIDInquiryCreateResponse as r, type FFIDAuthMode as s, type FFIDLogger as t, type FFIDCacheAdapter as u, type FFIDUser as v, type FFIDOrganization as w, type FFIDSubscription as x, type FFIDSubscriptionContextValue as y, type FFIDAnnouncementsClientConfig as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkI6MKRVUB_cjs = require('./chunk-I6MKRVUB.cjs');
3
+ var chunk2LD6Y65W_cjs = require('./chunk-2LD6Y65W.cjs');
4
4
  var react = require('react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
@@ -46,7 +46,7 @@ function createKVCacheAdapter(kv) {
46
46
  }
47
47
  function withFFIDAuth(Component, options = {}) {
48
48
  const WrappedComponent = (props) => {
49
- const { isLoading, isAuthenticated, login } = chunkI6MKRVUB_cjs.useFFIDContext();
49
+ const { isLoading, isAuthenticated, login } = chunk2LD6Y65W_cjs.useFFIDContext();
50
50
  const hasRedirected = react.useRef(false);
51
51
  react.useEffect(() => {
52
52
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -74,83 +74,91 @@ var FFID_NEWSLETTER_TYPES = ["inquiry_followup", "general"];
74
74
 
75
75
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
76
76
  enumerable: true,
77
- get: function () { return chunkI6MKRVUB_cjs.DEFAULT_API_BASE_URL; }
77
+ get: function () { return chunk2LD6Y65W_cjs.DEFAULT_API_BASE_URL; }
78
78
  });
79
79
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
80
80
  enumerable: true,
81
- get: function () { return chunkI6MKRVUB_cjs.FFIDAnnouncementBadge; }
81
+ get: function () { return chunk2LD6Y65W_cjs.FFIDAnnouncementBadge; }
82
82
  });
83
83
  Object.defineProperty(exports, "FFIDAnnouncementList", {
84
84
  enumerable: true,
85
- get: function () { return chunkI6MKRVUB_cjs.FFIDAnnouncementList; }
85
+ get: function () { return chunk2LD6Y65W_cjs.FFIDAnnouncementList; }
86
+ });
87
+ Object.defineProperty(exports, "FFIDInquiryForm", {
88
+ enumerable: true,
89
+ get: function () { return chunk2LD6Y65W_cjs.FFIDInquiryForm; }
86
90
  });
87
91
  Object.defineProperty(exports, "FFIDLoginButton", {
88
92
  enumerable: true,
89
- get: function () { return chunkI6MKRVUB_cjs.FFIDLoginButton; }
93
+ get: function () { return chunk2LD6Y65W_cjs.FFIDLoginButton; }
90
94
  });
91
95
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
92
96
  enumerable: true,
93
- get: function () { return chunkI6MKRVUB_cjs.FFIDOrganizationSwitcher; }
97
+ get: function () { return chunk2LD6Y65W_cjs.FFIDOrganizationSwitcher; }
94
98
  });
95
99
  Object.defineProperty(exports, "FFIDProvider", {
96
100
  enumerable: true,
97
- get: function () { return chunkI6MKRVUB_cjs.FFIDProvider; }
101
+ get: function () { return chunk2LD6Y65W_cjs.FFIDProvider; }
98
102
  });
99
103
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
100
104
  enumerable: true,
101
- get: function () { return chunkI6MKRVUB_cjs.FFIDSubscriptionBadge; }
105
+ get: function () { return chunk2LD6Y65W_cjs.FFIDSubscriptionBadge; }
102
106
  });
103
107
  Object.defineProperty(exports, "FFIDUserMenu", {
104
108
  enumerable: true,
105
- get: function () { return chunkI6MKRVUB_cjs.FFIDUserMenu; }
109
+ get: function () { return chunk2LD6Y65W_cjs.FFIDUserMenu; }
106
110
  });
107
111
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
108
112
  enumerable: true,
109
- get: function () { return chunkI6MKRVUB_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
113
+ get: function () { return chunk2LD6Y65W_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
114
+ });
115
+ Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
116
+ enumerable: true,
117
+ get: function () { return chunk2LD6Y65W_cjs.FFID_INQUIRY_CATEGORIES; }
110
118
  });
111
119
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
112
120
  enumerable: true,
113
- get: function () { return chunkI6MKRVUB_cjs.createFFIDAnnouncementsClient; }
121
+ get: function () { return chunk2LD6Y65W_cjs.createFFIDAnnouncementsClient; }
114
122
  });
115
123
  Object.defineProperty(exports, "createFFIDClient", {
116
124
  enumerable: true,
117
- get: function () { return chunkI6MKRVUB_cjs.createFFIDClient; }
125
+ get: function () { return chunk2LD6Y65W_cjs.createFFIDClient; }
118
126
  });
119
127
  Object.defineProperty(exports, "createTokenStore", {
120
128
  enumerable: true,
121
- get: function () { return chunkI6MKRVUB_cjs.createTokenStore; }
129
+ get: function () { return chunk2LD6Y65W_cjs.createTokenStore; }
122
130
  });
123
131
  Object.defineProperty(exports, "generateCodeChallenge", {
124
132
  enumerable: true,
125
- get: function () { return chunkI6MKRVUB_cjs.generateCodeChallenge; }
133
+ get: function () { return chunk2LD6Y65W_cjs.generateCodeChallenge; }
126
134
  });
127
135
  Object.defineProperty(exports, "generateCodeVerifier", {
128
136
  enumerable: true,
129
- get: function () { return chunkI6MKRVUB_cjs.generateCodeVerifier; }
137
+ get: function () { return chunk2LD6Y65W_cjs.generateCodeVerifier; }
130
138
  });
131
139
  Object.defineProperty(exports, "retrieveCodeVerifier", {
132
140
  enumerable: true,
133
- get: function () { return chunkI6MKRVUB_cjs.retrieveCodeVerifier; }
141
+ get: function () { return chunk2LD6Y65W_cjs.retrieveCodeVerifier; }
134
142
  });
135
143
  Object.defineProperty(exports, "storeCodeVerifier", {
136
144
  enumerable: true,
137
- get: function () { return chunkI6MKRVUB_cjs.storeCodeVerifier; }
145
+ get: function () { return chunk2LD6Y65W_cjs.storeCodeVerifier; }
138
146
  });
139
147
  Object.defineProperty(exports, "useFFID", {
140
148
  enumerable: true,
141
- get: function () { return chunkI6MKRVUB_cjs.useFFID; }
149
+ get: function () { return chunk2LD6Y65W_cjs.useFFID; }
142
150
  });
143
151
  Object.defineProperty(exports, "useFFIDAnnouncements", {
144
152
  enumerable: true,
145
- get: function () { return chunkI6MKRVUB_cjs.useFFIDAnnouncements; }
153
+ get: function () { return chunk2LD6Y65W_cjs.useFFIDAnnouncements; }
146
154
  });
147
155
  Object.defineProperty(exports, "useSubscription", {
148
156
  enumerable: true,
149
- get: function () { return chunkI6MKRVUB_cjs.useSubscription; }
157
+ get: function () { return chunk2LD6Y65W_cjs.useSubscription; }
150
158
  });
151
159
  Object.defineProperty(exports, "withSubscription", {
152
160
  enumerable: true,
153
- get: function () { return chunkI6MKRVUB_cjs.withSubscription; }
161
+ get: function () { return chunk2LD6Y65W_cjs.withSubscription; }
154
162
  });
155
163
  exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
156
164
  exports.createKVCacheAdapter = createKVCacheAdapter;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDCreateCheckoutParams, l as FFIDCheckoutSessionResponse, m as FFIDCreatePortalParams, n as FFIDPortalSessionResponse, o as FFIDVerifyAccessTokenOptions, p as FFIDOAuthUserInfo, q as FFIDAuthMode, r as FFIDLogger, s as FFIDCacheAdapter, t as FFIDUser, u as FFIDOrganization, v as FFIDSubscription, w as FFIDSubscriptionContextValue, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index-p4dJw3qR.cjs';
2
- export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, E as FFIDAnnouncementBadge, G as FFIDAnnouncementList, H as FFIDAnnouncementsError, I as FFIDAnnouncementsErrorCode, J as FFIDAnnouncementsServerResponse, K as FFIDCacheConfig, M as FFIDContextValue, N as FFIDJwtClaims, O as FFIDLoginButton, P as FFIDMemberStatus, Q as FFIDOAuthTokenResponse, R as FFIDOAuthUserInfoMemberRole, S as FFIDOAuthUserInfoSubscription, T as FFIDOrganizationMember, U as FFIDOrganizationSwitcher, V as FFIDSeatModel, W as FFIDSubscriptionBadge, X as FFIDTokenIntrospectionResponse, Y as FFIDUserMenu, Z as UseFFIDAnnouncementsOptions, _ as UseFFIDAnnouncementsReturn, $ as useFFIDAnnouncements } from './index-p4dJw3qR.cjs';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDCreateCheckoutParams, l as FFIDCheckoutSessionResponse, m as FFIDCreatePortalParams, n as FFIDPortalSessionResponse, o as FFIDVerifyAccessTokenOptions, p as FFIDOAuthUserInfo, q as FFIDInquiryCreateParams, r as FFIDInquiryCreateResponse, s as FFIDAuthMode, t as FFIDLogger, u as FFIDCacheAdapter, v as FFIDUser, w as FFIDOrganization, x as FFIDSubscription, y as FFIDSubscriptionContextValue, z as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, A as FFIDAnnouncementsApiResponse, B as AnnouncementListResponse, C as FFIDAnnouncementsLogger } from './index-R2ALICqm.cjs';
2
+ export { D as Announcement, E as AnnouncementStatus, G as AnnouncementType, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDCacheConfig, O as FFIDContextValue, P as FFIDInquiryCategory, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormOrganization, T as FFIDInquiryFormPrefill, U as FFIDInquiryFormProps, V as FFIDInquiryFormSubmitData, W as FFIDInquiryFormSubmitResult, X as FFIDJwtClaims, Y as FFIDLoginButton, Z as FFIDMemberStatus, _ as FFIDOAuthTokenResponse, $ as FFIDOAuthUserInfoMemberRole, a0 as FFIDOAuthUserInfoSubscription, a1 as FFIDOrganizationMember, a2 as FFIDOrganizationSwitcher, a3 as FFIDSeatModel, a4 as FFIDSubscriptionBadge, a5 as FFIDTokenIntrospectionResponse, a6 as FFIDUserMenu, a7 as FFID_INQUIRY_CATEGORIES, a8 as UseFFIDAnnouncementsOptions, a9 as UseFFIDAnnouncementsReturn, aa as useFFIDAnnouncements } from './index-R2ALICqm.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode, ComponentType, FC } from 'react';
5
5
 
@@ -481,6 +481,10 @@ declare function createFFIDClient(config: FFIDConfig): {
481
481
  confirm: (params: FFIDNewsletterConfirmParams) => Promise<FFIDApiResponse<FFIDNewsletterConfirmResponse>>;
482
482
  unsubscribe: (params: FFIDNewsletterUnsubscribeParams) => Promise<FFIDApiResponse<FFIDNewsletterUnsubscribeResponse>>;
483
483
  };
484
+ /** Inquiry methods (create) */
485
+ inquiry: {
486
+ create: (params: FFIDInquiryCreateParams) => Promise<FFIDApiResponse<FFIDInquiryCreateResponse>>;
487
+ };
484
488
  /** Token store (token mode only) */
485
489
  tokenStore: TokenStore;
486
490
  /** Resolved auth mode */
@@ -829,4 +833,15 @@ declare function createNewsletterMethods(deps: NewsletterMethodsDeps): {
829
833
  };
830
834
  type FFIDNewsletterClient = ReturnType<typeof createNewsletterMethods>;
831
835
 
832
- export { AnnouncementListResponse, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUser, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
836
+ /** Inquiry methods - create external inquiries via the FFID public API. */
837
+
838
+ interface InquiryMethodsDeps {
839
+ fetchWithAuth: <T>(endpoint: string, options?: RequestInit) => Promise<FFIDApiResponse<T>>;
840
+ createError: (code: string, message: string) => FFIDError;
841
+ }
842
+ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
843
+ create: (params: FFIDInquiryCreateParams) => Promise<FFIDApiResponse<FFIDInquiryCreateResponse>>;
844
+ };
845
+ type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
846
+
847
+ export { AnnouncementListResponse, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUser, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDCreateCheckoutParams, l as FFIDCheckoutSessionResponse, m as FFIDCreatePortalParams, n as FFIDPortalSessionResponse, o as FFIDVerifyAccessTokenOptions, p as FFIDOAuthUserInfo, q as FFIDAuthMode, r as FFIDLogger, s as FFIDCacheAdapter, t as FFIDUser, u as FFIDOrganization, v as FFIDSubscription, w as FFIDSubscriptionContextValue, x as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, y as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, z as FFIDAnnouncementsLogger } from './index-p4dJw3qR.js';
2
- export { B as Announcement, C as AnnouncementStatus, D as AnnouncementType, E as FFIDAnnouncementBadge, G as FFIDAnnouncementList, H as FFIDAnnouncementsError, I as FFIDAnnouncementsErrorCode, J as FFIDAnnouncementsServerResponse, K as FFIDCacheConfig, M as FFIDContextValue, N as FFIDJwtClaims, O as FFIDLoginButton, P as FFIDMemberStatus, Q as FFIDOAuthTokenResponse, R as FFIDOAuthUserInfoMemberRole, S as FFIDOAuthUserInfoSubscription, T as FFIDOrganizationMember, U as FFIDOrganizationSwitcher, V as FFIDSeatModel, W as FFIDSubscriptionBadge, X as FFIDTokenIntrospectionResponse, Y as FFIDUserMenu, Z as UseFFIDAnnouncementsOptions, _ as UseFFIDAnnouncementsReturn, $ as useFFIDAnnouncements } from './index-p4dJw3qR.js';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDCreateCheckoutParams, l as FFIDCheckoutSessionResponse, m as FFIDCreatePortalParams, n as FFIDPortalSessionResponse, o as FFIDVerifyAccessTokenOptions, p as FFIDOAuthUserInfo, q as FFIDInquiryCreateParams, r as FFIDInquiryCreateResponse, s as FFIDAuthMode, t as FFIDLogger, u as FFIDCacheAdapter, v as FFIDUser, w as FFIDOrganization, x as FFIDSubscription, y as FFIDSubscriptionContextValue, z as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, A as FFIDAnnouncementsApiResponse, B as AnnouncementListResponse, C as FFIDAnnouncementsLogger } from './index-R2ALICqm.js';
2
+ export { D as Announcement, E as AnnouncementStatus, G as AnnouncementType, H as FFIDAnnouncementBadge, I as FFIDAnnouncementList, J as FFIDAnnouncementsError, K as FFIDAnnouncementsErrorCode, M as FFIDAnnouncementsServerResponse, N as FFIDCacheConfig, O as FFIDContextValue, P as FFIDInquiryCategory, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormOrganization, T as FFIDInquiryFormPrefill, U as FFIDInquiryFormProps, V as FFIDInquiryFormSubmitData, W as FFIDInquiryFormSubmitResult, X as FFIDJwtClaims, Y as FFIDLoginButton, Z as FFIDMemberStatus, _ as FFIDOAuthTokenResponse, $ as FFIDOAuthUserInfoMemberRole, a0 as FFIDOAuthUserInfoSubscription, a1 as FFIDOrganizationMember, a2 as FFIDOrganizationSwitcher, a3 as FFIDSeatModel, a4 as FFIDSubscriptionBadge, a5 as FFIDTokenIntrospectionResponse, a6 as FFIDUserMenu, a7 as FFID_INQUIRY_CATEGORIES, a8 as UseFFIDAnnouncementsOptions, a9 as UseFFIDAnnouncementsReturn, aa as useFFIDAnnouncements } from './index-R2ALICqm.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode, ComponentType, FC } from 'react';
5
5
 
@@ -481,6 +481,10 @@ declare function createFFIDClient(config: FFIDConfig): {
481
481
  confirm: (params: FFIDNewsletterConfirmParams) => Promise<FFIDApiResponse<FFIDNewsletterConfirmResponse>>;
482
482
  unsubscribe: (params: FFIDNewsletterUnsubscribeParams) => Promise<FFIDApiResponse<FFIDNewsletterUnsubscribeResponse>>;
483
483
  };
484
+ /** Inquiry methods (create) */
485
+ inquiry: {
486
+ create: (params: FFIDInquiryCreateParams) => Promise<FFIDApiResponse<FFIDInquiryCreateResponse>>;
487
+ };
484
488
  /** Token store (token mode only) */
485
489
  tokenStore: TokenStore;
486
490
  /** Resolved auth mode */
@@ -829,4 +833,15 @@ declare function createNewsletterMethods(deps: NewsletterMethodsDeps): {
829
833
  };
830
834
  type FFIDNewsletterClient = ReturnType<typeof createNewsletterMethods>;
831
835
 
832
- export { AnnouncementListResponse, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUser, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
836
+ /** Inquiry methods - create external inquiries via the FFID public API. */
837
+
838
+ interface InquiryMethodsDeps {
839
+ fetchWithAuth: <T>(endpoint: string, options?: RequestInit) => Promise<FFIDApiResponse<T>>;
840
+ createError: (code: string, message: string) => FFIDError;
841
+ }
842
+ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
843
+ create: (params: FFIDInquiryCreateParams) => Promise<FFIDApiResponse<FFIDInquiryCreateResponse>>;
844
+ };
845
+ type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
846
+
847
+ export { AnnouncementListResponse, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDBillingInterval, FFIDCacheAdapter, type FFIDCancelPendingDowngradeResponse, type FFIDCancelSubscriptionParams, type FFIDCancelSubscriptionResponse, type FFIDChangePlanParams, type FFIDChangePlanResponse, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListMembersResponse, type FFIDListPlansResponse, FFIDLogger, FFIDMemberRole, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, FFIDOAuthUserInfo, FFIDOrganization, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPlanChangeLineItem, type FFIDPlanChangePreview, type FFIDPlanChangePreviewResponse, type FFIDPlanInfo, FFIDPortalSessionResponse, type FFIDPreviewPlanChangeParams, FFIDProvider, type FFIDProviderProps, FFIDRedirectResult, FFIDRemoveMemberResponse, type FFIDResetSessionResponse, type FFIDServiceInfo, FFIDSessionResponse, type FFIDSubscribeParams, type FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, type FFIDSubscriptionDetail, FFIDSubscriptionStatus, type FFIDSubscriptionSummary, type FFIDSupportedCurrency, FFIDUpdateMemberRoleResponse, FFIDUser, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_NEWSLETTER_TYPES, type KVNamespaceLike, ListAnnouncementsOptions, type RedirectToAuthorizeOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext } from './chunk-YQPG6Z7W.js';
2
- export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-YQPG6Z7W.js';
1
+ import { useFFIDContext } from './chunk-5SD6KOYJ.js';
2
+ export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-5SD6KOYJ.js';
3
3
  import { useRef, useEffect } from 'react';
4
4
  import { jsx, Fragment } from 'react/jsx-runtime';
5
5