@feelflow/ffid-sdk 2.7.0 → 2.8.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.
@@ -619,7 +619,7 @@ function createMembersMethods(deps) {
619
619
  }
620
620
 
621
621
  // src/client/version-check.ts
622
- var SDK_VERSION = "2.7.0";
622
+ var SDK_VERSION = "2.8.0";
623
623
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
624
624
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
625
625
  function sdkHeaders() {
@@ -1675,6 +1675,56 @@ function createNewsletterMethods(deps) {
1675
1675
  return { subscribe, confirm, unsubscribe };
1676
1676
  }
1677
1677
 
1678
+ // src/inquiry/ffid-inquiry-client.ts
1679
+ var EXT_INQUIRY_ENDPOINT = "/api/v1/ext/inquiry";
1680
+ function trimOrEmpty2(s) {
1681
+ return typeof s === "string" ? s.trim() : "";
1682
+ }
1683
+ function createInquiryMethods(deps) {
1684
+ const { fetchWithAuth, createError } = deps;
1685
+ async function create(params) {
1686
+ const email = trimOrEmpty2(params.email);
1687
+ const name = trimOrEmpty2(params.name);
1688
+ const message = trimOrEmpty2(params.message);
1689
+ const termsVersion = trimOrEmpty2(params.termsVersion);
1690
+ const privacyVersion = trimOrEmpty2(params.privacyVersion);
1691
+ if (!email) return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
1692
+ if (!name) return { error: createError("VALIDATION_ERROR", "name \u306F\u5FC5\u9808\u3067\u3059") };
1693
+ if (!message) return { error: createError("VALIDATION_ERROR", "message \u306F\u5FC5\u9808\u3067\u3059") };
1694
+ if (!termsVersion) {
1695
+ return { error: createError("VALIDATION_ERROR", "termsVersion \u306F\u5FC5\u9808\u3067\u3059") };
1696
+ }
1697
+ if (!privacyVersion) {
1698
+ return { error: createError("VALIDATION_ERROR", "privacyVersion \u306F\u5FC5\u9808\u3067\u3059") };
1699
+ }
1700
+ const inquiryFollowupOptIn = params.inquiryFollowupOptIn === true;
1701
+ const generalNewsletterOptIn = params.generalNewsletterOptIn === true;
1702
+ return fetchWithAuth(EXT_INQUIRY_ENDPOINT, {
1703
+ method: "POST",
1704
+ body: JSON.stringify({
1705
+ email,
1706
+ name,
1707
+ message,
1708
+ category: params.category,
1709
+ company: params.company,
1710
+ phone: params.phone,
1711
+ locale: params.locale,
1712
+ termsVersion,
1713
+ privacyVersion,
1714
+ // The ext endpoint still accepts the legacy single-flag field, but
1715
+ // the SDK always submits the 2-layer model. `newsletterOptIn` is
1716
+ // passed as the union of the two new flags only to satisfy the
1717
+ // current schema's required bool — the server preferentially
1718
+ // reads `inquiryFollowupOptIn` / `generalNewsletterOptIn`.
1719
+ newsletterOptIn: inquiryFollowupOptIn || generalNewsletterOptIn,
1720
+ inquiryFollowupOptIn,
1721
+ generalNewsletterOptIn
1722
+ })
1723
+ });
1724
+ }
1725
+ return { create };
1726
+ }
1727
+
1678
1728
  // src/client/ffid-client.ts
1679
1729
  var UNAUTHORIZED_STATUS2 = 401;
1680
1730
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -1955,6 +2005,10 @@ function createFFIDClient(config) {
1955
2005
  baseUrl,
1956
2006
  createError
1957
2007
  });
2008
+ const inquiry = createInquiryMethods({
2009
+ fetchWithAuth,
2010
+ createError
2011
+ });
1958
2012
  const verifyAccessToken = createVerifyAccessToken({
1959
2013
  authMode,
1960
2014
  baseUrl,
@@ -2011,6 +2065,8 @@ function createFFIDClient(config) {
2011
2065
  verifyOtp,
2012
2066
  /** Newsletter methods (subscribe / confirm / unsubscribe) */
2013
2067
  newsletter,
2068
+ /** Inquiry methods (create) */
2069
+ inquiry,
2014
2070
  /** Token store (token mode only) */
2015
2071
  tokenStore,
2016
2072
  /** Resolved auth mode */
@@ -3355,4 +3411,359 @@ function FFIDAnnouncementList({
3355
3411
  );
3356
3412
  }
3357
3413
 
3358
- 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, useFFIDContext, useSubscription, withSubscription };
3414
+ // src/inquiry/types.ts
3415
+ var FFID_INQUIRY_CATEGORIES = [
3416
+ "general",
3417
+ "sales",
3418
+ "support",
3419
+ "partnership",
3420
+ "press",
3421
+ "other"
3422
+ ];
3423
+ var DEFAULT_CATEGORY_LABELS_JA = {
3424
+ general: "\u4E00\u822C\u7684\u306A\u304A\u554F\u3044\u5408\u308F\u305B",
3425
+ sales: "\u3054\u5C0E\u5165\u30FB\u304A\u898B\u7A4D\u3082\u308A",
3426
+ support: "\u30B5\u30DD\u30FC\u30C8",
3427
+ partnership: "\u30D1\u30FC\u30C8\u30CA\u30FC\u30B7\u30C3\u30D7",
3428
+ press: "\u53D6\u6750\u30FB\u30D7\u30EC\u30B9",
3429
+ other: "\u305D\u306E\u4ED6"
3430
+ };
3431
+ function defaultCategories() {
3432
+ return FFID_INQUIRY_CATEGORIES.map((value) => ({
3433
+ value,
3434
+ label: DEFAULT_CATEGORY_LABELS_JA[value]
3435
+ }));
3436
+ }
3437
+ var labelStyle = {
3438
+ display: "block",
3439
+ fontSize: FONT_SIZE_SM,
3440
+ fontWeight: 500,
3441
+ marginBottom: SPACING_SM
3442
+ };
3443
+ var inputStyle = {
3444
+ width: "100%",
3445
+ padding: `${SPACING_SM}px ${SPACING_MD}px`,
3446
+ fontSize: FONT_SIZE_SM,
3447
+ border: BORDER_DEFAULT,
3448
+ borderRadius: BORDER_RADIUS_SM,
3449
+ background: COLOR_BG_WHITE,
3450
+ boxSizing: "border-box"
3451
+ };
3452
+ var readOnlyStyle = {
3453
+ ...inputStyle,
3454
+ background: "#f9fafb",
3455
+ color: COLOR_TEXT_MUTED,
3456
+ cursor: "not-allowed"
3457
+ };
3458
+ var fieldsetStyle = {
3459
+ marginBottom: SPACING_LG
3460
+ };
3461
+ var errorTextStyle = {
3462
+ fontSize: FONT_SIZE_XS,
3463
+ color: COLOR_DANGER,
3464
+ marginTop: SPACING_XS
3465
+ };
3466
+ var submitButtonStyle = {
3467
+ padding: `${SPACING_MD}px ${SPACING_LG}px`,
3468
+ fontSize: FONT_SIZE_SM,
3469
+ fontWeight: 600,
3470
+ color: COLOR_BG_WHITE,
3471
+ background: COLOR_PRIMARY,
3472
+ border: "none",
3473
+ borderRadius: BORDER_RADIUS_MD,
3474
+ cursor: "pointer"
3475
+ };
3476
+ function FFIDInquiryForm({
3477
+ mode,
3478
+ prefill,
3479
+ organizations = [],
3480
+ preselectedOrganizationId,
3481
+ categories,
3482
+ termsVersion,
3483
+ privacyVersion,
3484
+ termsHref,
3485
+ privacyHref,
3486
+ turnstileToken = null,
3487
+ turnstileSlot,
3488
+ onSubmit,
3489
+ locale = "ja",
3490
+ className
3491
+ }) {
3492
+ const isAuth = mode === "authenticated";
3493
+ const categoryOptions = useMemo(
3494
+ () => categories ?? defaultCategories(),
3495
+ [categories]
3496
+ );
3497
+ const initialOrgId = useMemo(() => {
3498
+ if (!isAuth) return null;
3499
+ if (preselectedOrganizationId !== void 0) return preselectedOrganizationId;
3500
+ if (organizations.length === 1) return organizations[0].id;
3501
+ return null;
3502
+ }, [isAuth, organizations, preselectedOrganizationId]);
3503
+ const [name, setName] = useState(prefill?.name ?? "");
3504
+ const [email, setEmail] = useState(prefill?.email ?? "");
3505
+ const [company, setCompany] = useState("");
3506
+ const [phone, setPhone] = useState("");
3507
+ const [category, setCategory] = useState(categoryOptions[0]?.value ?? "general");
3508
+ const [message, setMessage] = useState("");
3509
+ const [organizationId, setOrganizationId] = useState(initialOrgId);
3510
+ const [inquiryFollowup, setInquiryFollowup] = useState(false);
3511
+ const [general, setGeneral] = useState(false);
3512
+ const [agreedLegal, setAgreedLegal] = useState(false);
3513
+ const [submitting, setSubmitting] = useState(false);
3514
+ const [formError, setFormError] = useState(null);
3515
+ const [successMessage, setSuccessMessage] = useState(null);
3516
+ async function handleSubmit(e) {
3517
+ e.preventDefault();
3518
+ setFormError(null);
3519
+ if (!agreedLegal) {
3520
+ setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3521
+ return;
3522
+ }
3523
+ if (!message.trim()) {
3524
+ setFormError("\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3525
+ return;
3526
+ }
3527
+ if (!isAuth) {
3528
+ if (!name.trim() || !email.trim()) {
3529
+ setFormError("\u304A\u540D\u524D\u3068\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3530
+ return;
3531
+ }
3532
+ }
3533
+ setSubmitting(true);
3534
+ try {
3535
+ const result = await onSubmit({
3536
+ name: name.trim(),
3537
+ email: email.trim(),
3538
+ company: company.trim() || null,
3539
+ phone: phone.trim() || null,
3540
+ category,
3541
+ message: message.trim(),
3542
+ organizationId,
3543
+ inquiryFollowupOptIn: inquiryFollowup,
3544
+ generalNewsletterOptIn: general,
3545
+ termsVersion,
3546
+ privacyVersion,
3547
+ turnstileToken: turnstileToken ?? null,
3548
+ locale
3549
+ });
3550
+ if (result.ok) {
3551
+ setSuccessMessage(
3552
+ result.message ?? (result.requiresDoubleOptIn ? "\u304A\u554F\u3044\u5408\u308F\u305B\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u30E1\u30EB\u30DE\u30AC\u306E\u8CFC\u8AAD\u78BA\u8A8D\u30E1\u30FC\u30EB\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F\u306E\u3067\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002" : "\u304A\u554F\u3044\u5408\u308F\u305B\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u62C5\u5F53\u8005\u3088\u308A\u3054\u9023\u7D61\u3044\u305F\u3057\u307E\u3059\u3002")
3553
+ );
3554
+ setMessage("");
3555
+ } else {
3556
+ setFormError(result.message);
3557
+ }
3558
+ } catch (err) {
3559
+ setFormError(
3560
+ err instanceof Error ? err.message : "\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3561
+ );
3562
+ } finally {
3563
+ setSubmitting(false);
3564
+ }
3565
+ }
3566
+ if (successMessage) {
3567
+ return /* @__PURE__ */ jsx(
3568
+ "div",
3569
+ {
3570
+ role: "status",
3571
+ className,
3572
+ style: {
3573
+ padding: SPACING_LG,
3574
+ border: BORDER_DEFAULT,
3575
+ borderRadius: BORDER_RADIUS_MD,
3576
+ background: "#f0fdf4",
3577
+ color: "#166534",
3578
+ fontSize: FONT_SIZE_SM
3579
+ },
3580
+ children: successMessage
3581
+ }
3582
+ );
3583
+ }
3584
+ const showOrgBlock = isAuth && organizations.length >= 1;
3585
+ return /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className, noValidate: true, children: [
3586
+ showOrgBlock && /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3587
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3588
+ /* @__PURE__ */ jsxs(
3589
+ "select",
3590
+ {
3591
+ id: "ffid-inquiry-org",
3592
+ style: inputStyle,
3593
+ value: organizationId ?? "",
3594
+ onChange: (e) => setOrganizationId(e.target.value || null),
3595
+ children: [
3596
+ /* @__PURE__ */ jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3597
+ organizations.map((org) => /* @__PURE__ */ jsxs("option", { value: org.id, children: [
3598
+ org.name,
3599
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3600
+ ] }, org.id))
3601
+ ]
3602
+ }
3603
+ )
3604
+ ] }),
3605
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3606
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3607
+ /* @__PURE__ */ jsx(
3608
+ "input",
3609
+ {
3610
+ id: "ffid-inquiry-name",
3611
+ style: isAuth ? readOnlyStyle : inputStyle,
3612
+ type: "text",
3613
+ value: name,
3614
+ onChange: (e) => setName(e.target.value),
3615
+ readOnly: isAuth,
3616
+ required: true
3617
+ }
3618
+ )
3619
+ ] }),
3620
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3621
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3622
+ /* @__PURE__ */ jsx(
3623
+ "input",
3624
+ {
3625
+ id: "ffid-inquiry-email",
3626
+ style: isAuth ? readOnlyStyle : inputStyle,
3627
+ type: "email",
3628
+ value: email,
3629
+ onChange: (e) => setEmail(e.target.value),
3630
+ readOnly: isAuth,
3631
+ required: true
3632
+ }
3633
+ )
3634
+ ] }),
3635
+ !isAuth && /* @__PURE__ */ jsxs(Fragment, { children: [
3636
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3637
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3638
+ /* @__PURE__ */ jsx(
3639
+ "input",
3640
+ {
3641
+ id: "ffid-inquiry-company",
3642
+ style: inputStyle,
3643
+ type: "text",
3644
+ value: company,
3645
+ onChange: (e) => setCompany(e.target.value)
3646
+ }
3647
+ )
3648
+ ] }),
3649
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3650
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3651
+ /* @__PURE__ */ jsx(
3652
+ "input",
3653
+ {
3654
+ id: "ffid-inquiry-phone",
3655
+ style: inputStyle,
3656
+ type: "tel",
3657
+ value: phone,
3658
+ onChange: (e) => setPhone(e.target.value)
3659
+ }
3660
+ )
3661
+ ] })
3662
+ ] }),
3663
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3664
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3665
+ /* @__PURE__ */ jsx(
3666
+ "select",
3667
+ {
3668
+ id: "ffid-inquiry-category",
3669
+ style: inputStyle,
3670
+ value: category,
3671
+ onChange: (e) => setCategory(e.target.value),
3672
+ children: categoryOptions.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value))
3673
+ }
3674
+ )
3675
+ ] }),
3676
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3677
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3678
+ /* @__PURE__ */ jsx(
3679
+ "textarea",
3680
+ {
3681
+ id: "ffid-inquiry-message",
3682
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3683
+ value: message,
3684
+ onChange: (e) => setMessage(e.target.value),
3685
+ required: true,
3686
+ maxLength: 1e4
3687
+ }
3688
+ )
3689
+ ] }),
3690
+ /* @__PURE__ */ jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3691
+ /* @__PURE__ */ jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3692
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3693
+ /* @__PURE__ */ jsx(
3694
+ "input",
3695
+ {
3696
+ type: "checkbox",
3697
+ checked: inquiryFollowup,
3698
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3699
+ }
3700
+ ),
3701
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3702
+ ] }),
3703
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3704
+ /* @__PURE__ */ jsx(
3705
+ "input",
3706
+ {
3707
+ type: "checkbox",
3708
+ checked: general,
3709
+ onChange: (e) => setGeneral(e.target.checked)
3710
+ }
3711
+ ),
3712
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3713
+ ] })
3714
+ ] }),
3715
+ /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3716
+ /* @__PURE__ */ jsx(
3717
+ "input",
3718
+ {
3719
+ type: "checkbox",
3720
+ checked: agreedLegal,
3721
+ onChange: (e) => setAgreedLegal(e.target.checked),
3722
+ required: true
3723
+ }
3724
+ ),
3725
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3726
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3727
+ "\u5229\u7528\u898F\u7D04 (v",
3728
+ termsVersion,
3729
+ ")"
3730
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3731
+ "\u5229\u7528\u898F\u7D04 (v",
3732
+ termsVersion,
3733
+ ")"
3734
+ ] }),
3735
+ " ",
3736
+ "\u3068",
3737
+ " ",
3738
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3739
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3740
+ privacyVersion,
3741
+ ")"
3742
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3743
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3744
+ privacyVersion,
3745
+ ")"
3746
+ ] }),
3747
+ " ",
3748
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3749
+ ] })
3750
+ ] }) }),
3751
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3752
+ formError && /* @__PURE__ */ jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3753
+ /* @__PURE__ */ jsx(
3754
+ "button",
3755
+ {
3756
+ type: "submit",
3757
+ style: {
3758
+ ...submitButtonStyle,
3759
+ opacity: submitting ? 0.6 : 1,
3760
+ cursor: submitting ? "not-allowed" : "pointer"
3761
+ },
3762
+ disabled: submitting,
3763
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3764
+ }
3765
+ )
3766
+ ] });
3767
+ }
3768
+
3769
+ 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, useFFIDContext, useSubscription, withSubscription };
@@ -1,30 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkI6MKRVUB_cjs = require('../chunk-I6MKRVUB.cjs');
3
+ var chunkGB5OHEVY_cjs = require('../chunk-GB5OHEVY.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkI6MKRVUB_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkGB5OHEVY_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkI6MKRVUB_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkGB5OHEVY_cjs.FFIDAnnouncementList; }
14
+ });
15
+ Object.defineProperty(exports, "FFIDInquiryForm", {
16
+ enumerable: true,
17
+ get: function () { return chunkGB5OHEVY_cjs.FFIDInquiryForm; }
14
18
  });
15
19
  Object.defineProperty(exports, "FFIDLoginButton", {
16
20
  enumerable: true,
17
- get: function () { return chunkI6MKRVUB_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkGB5OHEVY_cjs.FFIDLoginButton; }
18
22
  });
19
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
20
24
  enumerable: true,
21
- get: function () { return chunkI6MKRVUB_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkGB5OHEVY_cjs.FFIDOrganizationSwitcher; }
22
26
  });
23
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
24
28
  enumerable: true,
25
- get: function () { return chunkI6MKRVUB_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkGB5OHEVY_cjs.FFIDSubscriptionBadge; }
26
30
  });
27
31
  Object.defineProperty(exports, "FFIDUserMenu", {
28
32
  enumerable: true,
29
- get: function () { return chunkI6MKRVUB_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkGB5OHEVY_cjs.FFIDUserMenu; }
30
34
  });
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a0 as FFIDAnnouncementBadgeClassNames, a1 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a2 as FFIDAnnouncementListClassNames, a3 as FFIDAnnouncementListProps, O as FFIDLoginButton, a4 as FFIDLoginButtonProps, U as FFIDOrganizationSwitcher, a5 as FFIDOrganizationSwitcherClassNames, a6 as FFIDOrganizationSwitcherProps, W as FFIDSubscriptionBadge, a7 as FFIDSubscriptionBadgeClassNames, a8 as FFIDSubscriptionBadgeProps, Y as FFIDUserMenu, a9 as FFIDUserMenuClassNames, aa as FFIDUserMenuProps } from '../index-p4dJw3qR.cjs';
1
+ export { E as FFIDAnnouncementBadge, a6 as FFIDAnnouncementBadgeClassNames, a7 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a8 as FFIDAnnouncementListClassNames, a9 as FFIDAnnouncementListProps, N as FFIDInquiryForm, O as FFIDInquiryFormOrganization, P as FFIDInquiryFormPrefill, Q as FFIDInquiryFormProps, R as FFIDInquiryFormSubmitData, S as FFIDInquiryFormSubmitResult, U as FFIDLoginButton, aa as FFIDLoginButtonProps, _ as FFIDOrganizationSwitcher, ab as FFIDOrganizationSwitcherClassNames, ac as FFIDOrganizationSwitcherProps, a0 as FFIDSubscriptionBadge, ad as FFIDSubscriptionBadgeClassNames, ae as FFIDSubscriptionBadgeProps, a2 as FFIDUserMenu, af as FFIDUserMenuClassNames, ag as FFIDUserMenuProps } from '../index-BBAzyBFG.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a0 as FFIDAnnouncementBadgeClassNames, a1 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a2 as FFIDAnnouncementListClassNames, a3 as FFIDAnnouncementListProps, O as FFIDLoginButton, a4 as FFIDLoginButtonProps, U as FFIDOrganizationSwitcher, a5 as FFIDOrganizationSwitcherClassNames, a6 as FFIDOrganizationSwitcherProps, W as FFIDSubscriptionBadge, a7 as FFIDSubscriptionBadgeClassNames, a8 as FFIDSubscriptionBadgeProps, Y as FFIDUserMenu, a9 as FFIDUserMenuClassNames, aa as FFIDUserMenuProps } from '../index-p4dJw3qR.js';
1
+ export { E as FFIDAnnouncementBadge, a6 as FFIDAnnouncementBadgeClassNames, a7 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a8 as FFIDAnnouncementListClassNames, a9 as FFIDAnnouncementListProps, N as FFIDInquiryForm, O as FFIDInquiryFormOrganization, P as FFIDInquiryFormPrefill, Q as FFIDInquiryFormProps, R as FFIDInquiryFormSubmitData, S as FFIDInquiryFormSubmitResult, U as FFIDLoginButton, aa as FFIDLoginButtonProps, _ as FFIDOrganizationSwitcher, ab as FFIDOrganizationSwitcherClassNames, ac as FFIDOrganizationSwitcherProps, a0 as FFIDSubscriptionBadge, ad as FFIDSubscriptionBadgeClassNames, ae as FFIDSubscriptionBadgeProps, a2 as FFIDUserMenu, af as FFIDUserMenuClassNames, ag as FFIDUserMenuProps } from '../index-BBAzyBFG.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-YQPG6Z7W.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-SR4UAQ3C.js';
@@ -844,4 +844,61 @@ interface FFIDAnnouncementListProps {
844
844
  */
845
845
  declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
846
846
 
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 };
847
+ /** Organization summary rendered in the selector. */
848
+ interface FFIDInquiryFormOrganization {
849
+ id: string;
850
+ name: string;
851
+ slug?: string;
852
+ role?: string;
853
+ }
854
+ interface FFIDInquiryFormPrefill {
855
+ name?: string;
856
+ email?: string;
857
+ }
858
+ interface FFIDInquiryFormSubmitData {
859
+ name: string;
860
+ email: string;
861
+ company: string | null;
862
+ phone: string | null;
863
+ category: string;
864
+ message: string;
865
+ organizationId: string | null;
866
+ inquiryFollowupOptIn: boolean;
867
+ generalNewsletterOptIn: boolean;
868
+ termsVersion: string;
869
+ privacyVersion: string;
870
+ turnstileToken: string | null;
871
+ locale: 'ja' | 'en';
872
+ }
873
+ type FFIDInquiryFormSubmitResult = {
874
+ ok: true;
875
+ requiresDoubleOptIn?: boolean;
876
+ message?: string;
877
+ } | {
878
+ ok: false;
879
+ message: string;
880
+ };
881
+ interface FFIDInquiryFormProps {
882
+ mode: 'anonymous' | 'authenticated';
883
+ prefill?: FFIDInquiryFormPrefill;
884
+ organizations?: FFIDInquiryFormOrganization[];
885
+ preselectedOrganizationId?: string | null;
886
+ categories?: ReadonlyArray<{
887
+ value: string;
888
+ label: string;
889
+ }>;
890
+ termsVersion: string;
891
+ privacyVersion: string;
892
+ termsHref?: string;
893
+ privacyHref?: string;
894
+ /** Must be refreshed by the consumer when the Turnstile widget reissues a token. */
895
+ turnstileToken?: string | null;
896
+ /** Slot for the consumer's Turnstile widget (anonymous mode only). */
897
+ turnstileSlot?: ReactNode;
898
+ onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
899
+ locale?: 'ja' | 'en';
900
+ className?: string;
901
+ }
902
+ declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
903
+
904
+ export { type FFIDSeatModel 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, FFIDInquiryForm as N, type FFIDInquiryFormOrganization as O, type FFIDInquiryFormPrefill as P, type FFIDInquiryFormProps as Q, type FFIDInquiryFormSubmitData as R, type FFIDInquiryFormSubmitResult as S, type FFIDJwtClaims as T, FFIDLoginButton as U, type FFIDMemberStatus as V, type FFIDOAuthTokenResponse as W, type FFIDOAuthUserInfoMemberRole as X, type FFIDOAuthUserInfoSubscription as Y, type FFIDOrganizationMember as Z, FFIDOrganizationSwitcher as _, type FFIDConfig as a, FFIDSubscriptionBadge as a0, type FFIDTokenIntrospectionResponse as a1, FFIDUserMenu as a2, type UseFFIDAnnouncementsOptions as a3, type UseFFIDAnnouncementsReturn as a4, useFFIDAnnouncements as a5, type FFIDAnnouncementBadgeClassNames as a6, type FFIDAnnouncementBadgeProps as a7, type FFIDAnnouncementListClassNames as a8, type FFIDAnnouncementListProps as a9, type FFIDLoginButtonProps as aa, type FFIDOrganizationSwitcherClassNames as ab, type FFIDOrganizationSwitcherProps as ac, type FFIDSubscriptionBadgeClassNames as ad, type FFIDSubscriptionBadgeProps as ae, type FFIDUserMenuClassNames as af, type FFIDUserMenuProps as ag, 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 };
@@ -844,4 +844,61 @@ interface FFIDAnnouncementListProps {
844
844
  */
845
845
  declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
846
846
 
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 };
847
+ /** Organization summary rendered in the selector. */
848
+ interface FFIDInquiryFormOrganization {
849
+ id: string;
850
+ name: string;
851
+ slug?: string;
852
+ role?: string;
853
+ }
854
+ interface FFIDInquiryFormPrefill {
855
+ name?: string;
856
+ email?: string;
857
+ }
858
+ interface FFIDInquiryFormSubmitData {
859
+ name: string;
860
+ email: string;
861
+ company: string | null;
862
+ phone: string | null;
863
+ category: string;
864
+ message: string;
865
+ organizationId: string | null;
866
+ inquiryFollowupOptIn: boolean;
867
+ generalNewsletterOptIn: boolean;
868
+ termsVersion: string;
869
+ privacyVersion: string;
870
+ turnstileToken: string | null;
871
+ locale: 'ja' | 'en';
872
+ }
873
+ type FFIDInquiryFormSubmitResult = {
874
+ ok: true;
875
+ requiresDoubleOptIn?: boolean;
876
+ message?: string;
877
+ } | {
878
+ ok: false;
879
+ message: string;
880
+ };
881
+ interface FFIDInquiryFormProps {
882
+ mode: 'anonymous' | 'authenticated';
883
+ prefill?: FFIDInquiryFormPrefill;
884
+ organizations?: FFIDInquiryFormOrganization[];
885
+ preselectedOrganizationId?: string | null;
886
+ categories?: ReadonlyArray<{
887
+ value: string;
888
+ label: string;
889
+ }>;
890
+ termsVersion: string;
891
+ privacyVersion: string;
892
+ termsHref?: string;
893
+ privacyHref?: string;
894
+ /** Must be refreshed by the consumer when the Turnstile widget reissues a token. */
895
+ turnstileToken?: string | null;
896
+ /** Slot for the consumer's Turnstile widget (anonymous mode only). */
897
+ turnstileSlot?: ReactNode;
898
+ onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
899
+ locale?: 'ja' | 'en';
900
+ className?: string;
901
+ }
902
+ declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
903
+
904
+ export { type FFIDSeatModel 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, FFIDInquiryForm as N, type FFIDInquiryFormOrganization as O, type FFIDInquiryFormPrefill as P, type FFIDInquiryFormProps as Q, type FFIDInquiryFormSubmitData as R, type FFIDInquiryFormSubmitResult as S, type FFIDJwtClaims as T, FFIDLoginButton as U, type FFIDMemberStatus as V, type FFIDOAuthTokenResponse as W, type FFIDOAuthUserInfoMemberRole as X, type FFIDOAuthUserInfoSubscription as Y, type FFIDOrganizationMember as Z, FFIDOrganizationSwitcher as _, type FFIDConfig as a, FFIDSubscriptionBadge as a0, type FFIDTokenIntrospectionResponse as a1, FFIDUserMenu as a2, type UseFFIDAnnouncementsOptions as a3, type UseFFIDAnnouncementsReturn as a4, useFFIDAnnouncements as a5, type FFIDAnnouncementBadgeClassNames as a6, type FFIDAnnouncementBadgeProps as a7, type FFIDAnnouncementListClassNames as a8, type FFIDAnnouncementListProps as a9, type FFIDLoginButtonProps as aa, type FFIDOrganizationSwitcherClassNames as ab, type FFIDOrganizationSwitcherProps as ac, type FFIDSubscriptionBadgeClassNames as ad, type FFIDSubscriptionBadgeProps as ae, type FFIDUserMenuClassNames as af, type FFIDUserMenuProps as ag, 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 };