@feelflow/ffid-sdk 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/{chunk-KJUA77BM.js → chunk-424GEJSP.js} +145 -21
- package/dist/{chunk-5ZMR3NNO.cjs → chunk-KMGY6PQY.cjs} +147 -20
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-BuT9VaRt.d.cts → index-DT3wF1vZ.d.cts} +133 -10
- package/dist/{index-BuT9VaRt.d.ts → index-DT3wF1vZ.d.ts} +133 -10
- package/dist/index.cjs +37 -25
- package/dist/index.d.cts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +70 -2
- package/dist/server/index.d.cts +105 -3
- package/dist/server/index.d.ts +105 -3
- package/dist/server/index.js +70 -2
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKMGY6PQY_cjs = require('../chunk-KMGY6PQY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDInquiryForm; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDLoginButton; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDOrganizationSwitcher; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDSubscriptionBadge; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDUserMenu; }
|
|
34
34
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { J as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, K as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, T as FFIDInquiryForm, U as FFIDInquiryFormCategoryItem, V as FFIDInquiryFormClassNames, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a7 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-DT3wF1vZ.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { J as FFIDAnnouncementBadge, ai as FFIDAnnouncementBadgeClassNames, aj as FFIDAnnouncementBadgeProps, K as FFIDAnnouncementList, ak as FFIDAnnouncementListClassNames, al as FFIDAnnouncementListProps, T as FFIDInquiryForm, U as FFIDInquiryFormCategoryItem, V as FFIDInquiryFormClassNames, W as FFIDInquiryFormOrganization, X as FFIDInquiryFormPlaceholderContext, Y as FFIDInquiryFormPrefill, Z as FFIDInquiryFormProps, _ as FFIDInquiryFormSubmitData, $ as FFIDInquiryFormSubmitResult, a1 as FFIDLoginButton, am as FFIDLoginButtonProps, a7 as FFIDOrganizationSwitcher, an as FFIDOrganizationSwitcherClassNames, ao as FFIDOrganizationSwitcherProps, a9 as FFIDSubscriptionBadge, ap as FFIDSubscriptionBadgeClassNames, aq as FFIDSubscriptionBadgeProps, ab as FFIDUserMenu, ar as FFIDUserMenuClassNames, as as FFIDUserMenuProps } from '../index-DT3wF1vZ.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-
|
|
1
|
+
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-424GEJSP.js';
|
|
@@ -426,6 +426,64 @@ interface FFIDUpdateMemberRoleResponse {
|
|
|
426
426
|
interface FFIDRemoveMemberResponse {
|
|
427
427
|
message: string;
|
|
428
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
* User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
|
|
431
|
+
*
|
|
432
|
+
* Mirrors the FFID backend `UserProfile` shape exposed via
|
|
433
|
+
* `GET /api/v1/users/ext/me` and `PUT /api/v1/users/ext/me`.
|
|
434
|
+
*/
|
|
435
|
+
interface FFIDUserProfile {
|
|
436
|
+
/** User ID (UUID) */
|
|
437
|
+
id: string;
|
|
438
|
+
/** Email address */
|
|
439
|
+
email: string;
|
|
440
|
+
/** Display name (nullable when not set) */
|
|
441
|
+
displayName: string | null;
|
|
442
|
+
/** Avatar URL (nullable when not set) */
|
|
443
|
+
avatarUrl: string | null;
|
|
444
|
+
/** Phone number (nullable when not set) */
|
|
445
|
+
phone: string | null;
|
|
446
|
+
/** Company name (nullable when not set) */
|
|
447
|
+
companyName: string | null;
|
|
448
|
+
/** Department (nullable when not set) */
|
|
449
|
+
department: string | null;
|
|
450
|
+
/** Job title (nullable when not set) */
|
|
451
|
+
jobTitle: string | null;
|
|
452
|
+
/** IANA timezone (e.g. 'Asia/Tokyo') */
|
|
453
|
+
timezone: string;
|
|
454
|
+
/** Locale (e.g. 'ja', 'en') */
|
|
455
|
+
locale: string;
|
|
456
|
+
/** Arbitrary user preferences bag */
|
|
457
|
+
preferences: Record<string, unknown>;
|
|
458
|
+
/** Account creation timestamp (ISO 8601) */
|
|
459
|
+
createdAt: string;
|
|
460
|
+
/** Profile last-updated timestamp (ISO 8601) */
|
|
461
|
+
updatedAt: string;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Request payload for `updateProfile`.
|
|
465
|
+
*
|
|
466
|
+
* Mirrors the FFID backend `UpdateUserProfileRequest` shape. All fields are
|
|
467
|
+
* optional — only the supplied keys will be updated (partial update semantics).
|
|
468
|
+
*/
|
|
469
|
+
interface FFIDUpdateUserProfileRequest {
|
|
470
|
+
/** Display name */
|
|
471
|
+
displayName?: string;
|
|
472
|
+
/** Phone number */
|
|
473
|
+
phone?: string;
|
|
474
|
+
/** Company name */
|
|
475
|
+
companyName?: string;
|
|
476
|
+
/** Department */
|
|
477
|
+
department?: string;
|
|
478
|
+
/** Job title */
|
|
479
|
+
jobTitle?: string;
|
|
480
|
+
/** IANA timezone */
|
|
481
|
+
timezone?: string;
|
|
482
|
+
/** Locale */
|
|
483
|
+
locale?: string;
|
|
484
|
+
/** Arbitrary user preferences bag */
|
|
485
|
+
preferences?: Record<string, unknown>;
|
|
486
|
+
}
|
|
429
487
|
/**
|
|
430
488
|
* Result of a redirect operation (redirectToLogin / redirectToAuthorize / redirectToLogout)
|
|
431
489
|
*
|
|
@@ -638,21 +696,69 @@ declare function useFFIDAnnouncements(options?: UseFFIDAnnouncementsOptions): Us
|
|
|
638
696
|
* `<FFIDInquiryForm />` and submit through either endpoint.
|
|
639
697
|
*/
|
|
640
698
|
/**
|
|
641
|
-
*
|
|
642
|
-
*
|
|
699
|
+
* Legacy 6-value canonical categories. Retained for historical DB rows
|
|
700
|
+
* (the pre-2026 values `general`, `sales`, `support`, `press` still appear
|
|
701
|
+
* in older inquiries) and for 2.x backwards compatibility with SDK
|
|
702
|
+
* consumers that pinned to this exact set.
|
|
703
|
+
*
|
|
704
|
+
* Note: `partnership` and `other` intentionally also appear in
|
|
705
|
+
* {@link FFID_INQUIRY_CATEGORIES_SITE_2026}; the legacy-only subset is
|
|
706
|
+
* `general`, `sales`, `support`, `press`.
|
|
707
|
+
*
|
|
708
|
+
* @deprecated New integrations should use
|
|
709
|
+
* {@link FFID_INQUIRY_CATEGORIES_SITE_2026} (13 values, aligned with
|
|
710
|
+
* feelflow-website-2026 `/contact`). This legacy constant remains
|
|
711
|
+
* exported for 2.x compatibility and may be removed in 3.x.
|
|
643
712
|
*/
|
|
644
713
|
declare const FFID_INQUIRY_CATEGORIES: readonly ["general", "sales", "support", "partnership", "press", "other"];
|
|
714
|
+
/**
|
|
715
|
+
* Type alias derived from the legacy 6-value list. Still referenced by
|
|
716
|
+
* {@link FFIDInquiryCreateParams.category} so existing callers compile
|
|
717
|
+
* without changes; no `@deprecated` on the type itself because the
|
|
718
|
+
* actionable migration target is the runtime constant above, and
|
|
719
|
+
* propagating `@deprecated` to the type would surface false-positive
|
|
720
|
+
* warnings on public API that deliberately accepts both shapes.
|
|
721
|
+
*/
|
|
645
722
|
type FFIDInquiryCategory = (typeof FFID_INQUIRY_CATEGORIES)[number];
|
|
723
|
+
/**
|
|
724
|
+
* 13-value category list that mirrors feelflow-website-2026
|
|
725
|
+
* `/contact` (`feelflow-site/src/lib/contact-schema.ts` `CATEGORY_OPTIONS`).
|
|
726
|
+
*
|
|
727
|
+
* Source-of-truth ownership: **the site repo is authoritative**; this
|
|
728
|
+
* constant is a delayed-sync snapshot shipped through the SDK so
|
|
729
|
+
* consumers can get autocomplete without depending on the site repo.
|
|
730
|
+
* Drift between site and the FFID admin UI is detected automatically by
|
|
731
|
+
* `scripts/sync-inquiry-categories.ts` (SDK-side drift is a separate
|
|
732
|
+
* follow-up and today is caught only if the SDK snapshot is updated
|
|
733
|
+
* alongside the admin UI constants).
|
|
734
|
+
*/
|
|
735
|
+
declare const FFID_INQUIRY_CATEGORIES_SITE_2026: readonly ["consulting", "saas", "development", "agent-hub", "ai-feel-chatbot", "knowledge-db", "biz-simulator", "discussion-board", "realtime-ai", "partnership", "media", "recruiting", "other"];
|
|
736
|
+
type FFIDInquiryCategorySite2026 = (typeof FFID_INQUIRY_CATEGORIES_SITE_2026)[number];
|
|
737
|
+
/**
|
|
738
|
+
* Runtime type guard for the 13-value site-2026 list. Use when narrowing
|
|
739
|
+
* an unknown string (e.g., a value read from analytics or a URL query
|
|
740
|
+
* parameter) to the canonical union.
|
|
741
|
+
*/
|
|
742
|
+
declare const isFFIDInquiryCategorySite2026: (value: string) => value is FFIDInquiryCategorySite2026;
|
|
646
743
|
/**
|
|
647
744
|
* Parameters for `client.inquiry.create()`. When submitting from a
|
|
648
745
|
* server-side SDK (Service API Key), set `source` to a stable
|
|
649
746
|
* origin string so admins can trace the submission back.
|
|
747
|
+
*
|
|
748
|
+
* `category` accepts any string at the SDK boundary to keep the SDK
|
|
749
|
+
* forward-compatible with new site-side categories added before the SDK
|
|
750
|
+
* re-publishes. FFID ext-endpoint validation (`/api/v1/ext/inquiry`) is
|
|
751
|
+
* lenient — `z.string().max(100).optional()` — so unknown strings flow
|
|
752
|
+
* through to the DB unchanged. Note: the `(string & {})` arm of the
|
|
753
|
+
* union intentionally keeps autocomplete active while allowing arbitrary
|
|
754
|
+
* strings; callers using exhaustive `switch` statements should include
|
|
755
|
+
* a `default` branch.
|
|
650
756
|
*/
|
|
651
757
|
interface FFIDInquiryCreateParams {
|
|
652
758
|
email: string;
|
|
653
759
|
name: string;
|
|
654
760
|
message: string;
|
|
655
|
-
category?: FFIDInquiryCategory | (string & {});
|
|
761
|
+
category?: FFIDInquiryCategorySite2026 | FFIDInquiryCategory | (string & {});
|
|
656
762
|
company?: string;
|
|
657
763
|
phone?: string;
|
|
658
764
|
locale?: 'ja' | 'en';
|
|
@@ -1040,12 +1146,29 @@ interface FFIDInquiryFormProps {
|
|
|
1040
1146
|
turnstileSlot?: ReactNode;
|
|
1041
1147
|
onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
|
|
1042
1148
|
/**
|
|
1043
|
-
* Called after every change to
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
* `
|
|
1048
|
-
*
|
|
1149
|
+
* Called after every change to the submittable form state — initial
|
|
1150
|
+
* mount, every user keystroke, and every checkbox / select toggle.
|
|
1151
|
+
* Consent checkboxes are intentionally excluded — they are not part
|
|
1152
|
+
* of `FFIDInquiryFormSubmitData`. Emitted values use the same
|
|
1153
|
+
* normalization as `onSubmit` (trimmed strings; empty `company` /
|
|
1154
|
+
* `phone` become `null`). React StrictMode double-invokes effects in
|
|
1155
|
+
* dev, so expect two calls per mount.
|
|
1156
|
+
*
|
|
1157
|
+
* Suppressed in two cases:
|
|
1158
|
+
* - While the success view is rendered (truthy `successMessage`).
|
|
1159
|
+
* The form internally clears `message` after a successful submit,
|
|
1160
|
+
* and surfacing that reset would look like a "user cleared the
|
|
1161
|
+
* field" event in consumer analytics. The gate uses the same
|
|
1162
|
+
* truthy check as the render, so a consumer that returns
|
|
1163
|
+
* `{ ok: true, message: '' }` (which keeps the form visible because
|
|
1164
|
+
* the success view requires a truthy `successMessage`) keeps
|
|
1165
|
+
* broadcasting normally.
|
|
1166
|
+
* - In `requireCategorySelection` mode while no category is selected.
|
|
1167
|
+
* Emitting an empty `category` would violate the
|
|
1168
|
+
* `FFIDInquiryFormSubmitData.category: string` contract; consumers
|
|
1169
|
+
* who need to observe the unselected state can read it from a
|
|
1170
|
+
* function-form `messagePlaceholder` (`{ category: null }`) or
|
|
1171
|
+
* from their own `prefill.category` state.
|
|
1049
1172
|
*/
|
|
1050
1173
|
onChange?: (data: FFIDInquiryFormSubmitData) => void;
|
|
1051
1174
|
/**
|
|
@@ -1106,4 +1229,4 @@ interface FFIDInquiryFormPlaceholderContext {
|
|
|
1106
1229
|
}
|
|
1107
1230
|
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, separateLegalCheckboxes, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1108
1231
|
|
|
1109
|
-
export { type
|
|
1232
|
+
export { type FFIDInquiryFormSubmitResult as $, type FFIDSubscriptionContextValue as A, type FFIDAnnouncementsClientConfig as B, type FFIDAnnouncementsApiResponse as C, type AnnouncementListResponse as D, type FFIDAnnouncementsLogger as E, type FFIDSubscriptionStatus as F, type Announcement as G, type AnnouncementStatus as H, type AnnouncementType as I, FFIDAnnouncementBadge as J, FFIDAnnouncementList as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsError as M, type FFIDAnnouncementsErrorCode as N, type FFIDAnnouncementsServerResponse as O, type FFIDCacheConfig as P, type FFIDContextValue as Q, type FFIDInquiryCategory as R, type FFIDInquiryCategorySite2026 as S, FFIDInquiryForm as T, type FFIDInquiryFormCategoryItem as U, type FFIDInquiryFormClassNames as V, type FFIDInquiryFormOrganization as W, type FFIDInquiryFormPlaceholderContext as X, type FFIDInquiryFormPrefill as Y, type FFIDInquiryFormProps as Z, type FFIDInquiryFormSubmitData as _, type FFIDConfig as a, type FFIDJwtClaims as a0, FFIDLoginButton as a1, type FFIDMemberStatus as a2, type FFIDOAuthTokenResponse as a3, type FFIDOAuthUserInfoMemberRole as a4, type FFIDOAuthUserInfoSubscription as a5, type FFIDOrganizationMember as a6, FFIDOrganizationSwitcher as a7, type FFIDSeatModel as a8, FFIDSubscriptionBadge as a9, type FFIDTokenIntrospectionResponse as aa, FFIDUserMenu as ab, FFID_INQUIRY_CATEGORIES as ac, FFID_INQUIRY_CATEGORIES_SITE_2026 as ad, type UseFFIDAnnouncementsOptions as ae, type UseFFIDAnnouncementsReturn as af, isFFIDInquiryCategorySite2026 as ag, useFFIDAnnouncements as ah, type FFIDAnnouncementBadgeClassNames as ai, type FFIDAnnouncementBadgeProps as aj, type FFIDAnnouncementListClassNames as ak, type FFIDAnnouncementListProps as al, type FFIDLoginButtonProps as am, type FFIDOrganizationSwitcherClassNames as an, type FFIDOrganizationSwitcherProps as ao, type FFIDSubscriptionBadgeClassNames as ap, type FFIDSubscriptionBadgeProps as aq, type FFIDUserMenuClassNames as ar, type FFIDUserMenuProps as as, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDUserProfile as k, type FFIDUpdateUserProfileRequest as l, type FFIDCreateCheckoutParams as m, type FFIDCheckoutSessionResponse as n, type FFIDCreatePortalParams as o, type FFIDPortalSessionResponse as p, type FFIDVerifyAccessTokenOptions as q, type FFIDOAuthUserInfo as r, type FFIDInquiryCreateParams as s, type FFIDInquiryCreateResponse as t, type FFIDAuthMode as u, type FFIDLogger as v, type FFIDCacheAdapter as w, type FFIDUser as x, type FFIDOrganization as y, type FFIDSubscription as z };
|
|
@@ -426,6 +426,64 @@ interface FFIDUpdateMemberRoleResponse {
|
|
|
426
426
|
interface FFIDRemoveMemberResponse {
|
|
427
427
|
message: string;
|
|
428
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
* User profile for the authenticated user (returned by `getProfile` / `updateProfile`).
|
|
431
|
+
*
|
|
432
|
+
* Mirrors the FFID backend `UserProfile` shape exposed via
|
|
433
|
+
* `GET /api/v1/users/ext/me` and `PUT /api/v1/users/ext/me`.
|
|
434
|
+
*/
|
|
435
|
+
interface FFIDUserProfile {
|
|
436
|
+
/** User ID (UUID) */
|
|
437
|
+
id: string;
|
|
438
|
+
/** Email address */
|
|
439
|
+
email: string;
|
|
440
|
+
/** Display name (nullable when not set) */
|
|
441
|
+
displayName: string | null;
|
|
442
|
+
/** Avatar URL (nullable when not set) */
|
|
443
|
+
avatarUrl: string | null;
|
|
444
|
+
/** Phone number (nullable when not set) */
|
|
445
|
+
phone: string | null;
|
|
446
|
+
/** Company name (nullable when not set) */
|
|
447
|
+
companyName: string | null;
|
|
448
|
+
/** Department (nullable when not set) */
|
|
449
|
+
department: string | null;
|
|
450
|
+
/** Job title (nullable when not set) */
|
|
451
|
+
jobTitle: string | null;
|
|
452
|
+
/** IANA timezone (e.g. 'Asia/Tokyo') */
|
|
453
|
+
timezone: string;
|
|
454
|
+
/** Locale (e.g. 'ja', 'en') */
|
|
455
|
+
locale: string;
|
|
456
|
+
/** Arbitrary user preferences bag */
|
|
457
|
+
preferences: Record<string, unknown>;
|
|
458
|
+
/** Account creation timestamp (ISO 8601) */
|
|
459
|
+
createdAt: string;
|
|
460
|
+
/** Profile last-updated timestamp (ISO 8601) */
|
|
461
|
+
updatedAt: string;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Request payload for `updateProfile`.
|
|
465
|
+
*
|
|
466
|
+
* Mirrors the FFID backend `UpdateUserProfileRequest` shape. All fields are
|
|
467
|
+
* optional — only the supplied keys will be updated (partial update semantics).
|
|
468
|
+
*/
|
|
469
|
+
interface FFIDUpdateUserProfileRequest {
|
|
470
|
+
/** Display name */
|
|
471
|
+
displayName?: string;
|
|
472
|
+
/** Phone number */
|
|
473
|
+
phone?: string;
|
|
474
|
+
/** Company name */
|
|
475
|
+
companyName?: string;
|
|
476
|
+
/** Department */
|
|
477
|
+
department?: string;
|
|
478
|
+
/** Job title */
|
|
479
|
+
jobTitle?: string;
|
|
480
|
+
/** IANA timezone */
|
|
481
|
+
timezone?: string;
|
|
482
|
+
/** Locale */
|
|
483
|
+
locale?: string;
|
|
484
|
+
/** Arbitrary user preferences bag */
|
|
485
|
+
preferences?: Record<string, unknown>;
|
|
486
|
+
}
|
|
429
487
|
/**
|
|
430
488
|
* Result of a redirect operation (redirectToLogin / redirectToAuthorize / redirectToLogout)
|
|
431
489
|
*
|
|
@@ -638,21 +696,69 @@ declare function useFFIDAnnouncements(options?: UseFFIDAnnouncementsOptions): Us
|
|
|
638
696
|
* `<FFIDInquiryForm />` and submit through either endpoint.
|
|
639
697
|
*/
|
|
640
698
|
/**
|
|
641
|
-
*
|
|
642
|
-
*
|
|
699
|
+
* Legacy 6-value canonical categories. Retained for historical DB rows
|
|
700
|
+
* (the pre-2026 values `general`, `sales`, `support`, `press` still appear
|
|
701
|
+
* in older inquiries) and for 2.x backwards compatibility with SDK
|
|
702
|
+
* consumers that pinned to this exact set.
|
|
703
|
+
*
|
|
704
|
+
* Note: `partnership` and `other` intentionally also appear in
|
|
705
|
+
* {@link FFID_INQUIRY_CATEGORIES_SITE_2026}; the legacy-only subset is
|
|
706
|
+
* `general`, `sales`, `support`, `press`.
|
|
707
|
+
*
|
|
708
|
+
* @deprecated New integrations should use
|
|
709
|
+
* {@link FFID_INQUIRY_CATEGORIES_SITE_2026} (13 values, aligned with
|
|
710
|
+
* feelflow-website-2026 `/contact`). This legacy constant remains
|
|
711
|
+
* exported for 2.x compatibility and may be removed in 3.x.
|
|
643
712
|
*/
|
|
644
713
|
declare const FFID_INQUIRY_CATEGORIES: readonly ["general", "sales", "support", "partnership", "press", "other"];
|
|
714
|
+
/**
|
|
715
|
+
* Type alias derived from the legacy 6-value list. Still referenced by
|
|
716
|
+
* {@link FFIDInquiryCreateParams.category} so existing callers compile
|
|
717
|
+
* without changes; no `@deprecated` on the type itself because the
|
|
718
|
+
* actionable migration target is the runtime constant above, and
|
|
719
|
+
* propagating `@deprecated` to the type would surface false-positive
|
|
720
|
+
* warnings on public API that deliberately accepts both shapes.
|
|
721
|
+
*/
|
|
645
722
|
type FFIDInquiryCategory = (typeof FFID_INQUIRY_CATEGORIES)[number];
|
|
723
|
+
/**
|
|
724
|
+
* 13-value category list that mirrors feelflow-website-2026
|
|
725
|
+
* `/contact` (`feelflow-site/src/lib/contact-schema.ts` `CATEGORY_OPTIONS`).
|
|
726
|
+
*
|
|
727
|
+
* Source-of-truth ownership: **the site repo is authoritative**; this
|
|
728
|
+
* constant is a delayed-sync snapshot shipped through the SDK so
|
|
729
|
+
* consumers can get autocomplete without depending on the site repo.
|
|
730
|
+
* Drift between site and the FFID admin UI is detected automatically by
|
|
731
|
+
* `scripts/sync-inquiry-categories.ts` (SDK-side drift is a separate
|
|
732
|
+
* follow-up and today is caught only if the SDK snapshot is updated
|
|
733
|
+
* alongside the admin UI constants).
|
|
734
|
+
*/
|
|
735
|
+
declare const FFID_INQUIRY_CATEGORIES_SITE_2026: readonly ["consulting", "saas", "development", "agent-hub", "ai-feel-chatbot", "knowledge-db", "biz-simulator", "discussion-board", "realtime-ai", "partnership", "media", "recruiting", "other"];
|
|
736
|
+
type FFIDInquiryCategorySite2026 = (typeof FFID_INQUIRY_CATEGORIES_SITE_2026)[number];
|
|
737
|
+
/**
|
|
738
|
+
* Runtime type guard for the 13-value site-2026 list. Use when narrowing
|
|
739
|
+
* an unknown string (e.g., a value read from analytics or a URL query
|
|
740
|
+
* parameter) to the canonical union.
|
|
741
|
+
*/
|
|
742
|
+
declare const isFFIDInquiryCategorySite2026: (value: string) => value is FFIDInquiryCategorySite2026;
|
|
646
743
|
/**
|
|
647
744
|
* Parameters for `client.inquiry.create()`. When submitting from a
|
|
648
745
|
* server-side SDK (Service API Key), set `source` to a stable
|
|
649
746
|
* origin string so admins can trace the submission back.
|
|
747
|
+
*
|
|
748
|
+
* `category` accepts any string at the SDK boundary to keep the SDK
|
|
749
|
+
* forward-compatible with new site-side categories added before the SDK
|
|
750
|
+
* re-publishes. FFID ext-endpoint validation (`/api/v1/ext/inquiry`) is
|
|
751
|
+
* lenient — `z.string().max(100).optional()` — so unknown strings flow
|
|
752
|
+
* through to the DB unchanged. Note: the `(string & {})` arm of the
|
|
753
|
+
* union intentionally keeps autocomplete active while allowing arbitrary
|
|
754
|
+
* strings; callers using exhaustive `switch` statements should include
|
|
755
|
+
* a `default` branch.
|
|
650
756
|
*/
|
|
651
757
|
interface FFIDInquiryCreateParams {
|
|
652
758
|
email: string;
|
|
653
759
|
name: string;
|
|
654
760
|
message: string;
|
|
655
|
-
category?: FFIDInquiryCategory | (string & {});
|
|
761
|
+
category?: FFIDInquiryCategorySite2026 | FFIDInquiryCategory | (string & {});
|
|
656
762
|
company?: string;
|
|
657
763
|
phone?: string;
|
|
658
764
|
locale?: 'ja' | 'en';
|
|
@@ -1040,12 +1146,29 @@ interface FFIDInquiryFormProps {
|
|
|
1040
1146
|
turnstileSlot?: ReactNode;
|
|
1041
1147
|
onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
|
|
1042
1148
|
/**
|
|
1043
|
-
* Called after every change to
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
* `
|
|
1048
|
-
*
|
|
1149
|
+
* Called after every change to the submittable form state — initial
|
|
1150
|
+
* mount, every user keystroke, and every checkbox / select toggle.
|
|
1151
|
+
* Consent checkboxes are intentionally excluded — they are not part
|
|
1152
|
+
* of `FFIDInquiryFormSubmitData`. Emitted values use the same
|
|
1153
|
+
* normalization as `onSubmit` (trimmed strings; empty `company` /
|
|
1154
|
+
* `phone` become `null`). React StrictMode double-invokes effects in
|
|
1155
|
+
* dev, so expect two calls per mount.
|
|
1156
|
+
*
|
|
1157
|
+
* Suppressed in two cases:
|
|
1158
|
+
* - While the success view is rendered (truthy `successMessage`).
|
|
1159
|
+
* The form internally clears `message` after a successful submit,
|
|
1160
|
+
* and surfacing that reset would look like a "user cleared the
|
|
1161
|
+
* field" event in consumer analytics. The gate uses the same
|
|
1162
|
+
* truthy check as the render, so a consumer that returns
|
|
1163
|
+
* `{ ok: true, message: '' }` (which keeps the form visible because
|
|
1164
|
+
* the success view requires a truthy `successMessage`) keeps
|
|
1165
|
+
* broadcasting normally.
|
|
1166
|
+
* - In `requireCategorySelection` mode while no category is selected.
|
|
1167
|
+
* Emitting an empty `category` would violate the
|
|
1168
|
+
* `FFIDInquiryFormSubmitData.category: string` contract; consumers
|
|
1169
|
+
* who need to observe the unselected state can read it from a
|
|
1170
|
+
* function-form `messagePlaceholder` (`{ category: null }`) or
|
|
1171
|
+
* from their own `prefill.category` state.
|
|
1049
1172
|
*/
|
|
1050
1173
|
onChange?: (data: FFIDInquiryFormSubmitData) => void;
|
|
1051
1174
|
/**
|
|
@@ -1106,4 +1229,4 @@ interface FFIDInquiryFormPlaceholderContext {
|
|
|
1106
1229
|
}
|
|
1107
1230
|
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, separateLegalCheckboxes, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1108
1231
|
|
|
1109
|
-
export { type
|
|
1232
|
+
export { type FFIDInquiryFormSubmitResult as $, type FFIDSubscriptionContextValue as A, type FFIDAnnouncementsClientConfig as B, type FFIDAnnouncementsApiResponse as C, type AnnouncementListResponse as D, type FFIDAnnouncementsLogger as E, type FFIDSubscriptionStatus as F, type Announcement as G, type AnnouncementStatus as H, type AnnouncementType as I, FFIDAnnouncementBadge as J, FFIDAnnouncementList as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsError as M, type FFIDAnnouncementsErrorCode as N, type FFIDAnnouncementsServerResponse as O, type FFIDCacheConfig as P, type FFIDContextValue as Q, type FFIDInquiryCategory as R, type FFIDInquiryCategorySite2026 as S, FFIDInquiryForm as T, type FFIDInquiryFormCategoryItem as U, type FFIDInquiryFormClassNames as V, type FFIDInquiryFormOrganization as W, type FFIDInquiryFormPlaceholderContext as X, type FFIDInquiryFormPrefill as Y, type FFIDInquiryFormProps as Z, type FFIDInquiryFormSubmitData as _, type FFIDConfig as a, type FFIDJwtClaims as a0, FFIDLoginButton as a1, type FFIDMemberStatus as a2, type FFIDOAuthTokenResponse as a3, type FFIDOAuthUserInfoMemberRole as a4, type FFIDOAuthUserInfoSubscription as a5, type FFIDOrganizationMember as a6, FFIDOrganizationSwitcher as a7, type FFIDSeatModel as a8, FFIDSubscriptionBadge as a9, type FFIDTokenIntrospectionResponse as aa, FFIDUserMenu as ab, FFID_INQUIRY_CATEGORIES as ac, FFID_INQUIRY_CATEGORIES_SITE_2026 as ad, type UseFFIDAnnouncementsOptions as ae, type UseFFIDAnnouncementsReturn as af, isFFIDInquiryCategorySite2026 as ag, useFFIDAnnouncements as ah, type FFIDAnnouncementBadgeClassNames as ai, type FFIDAnnouncementBadgeProps as aj, type FFIDAnnouncementListClassNames as ak, type FFIDAnnouncementListProps as al, type FFIDLoginButtonProps as am, type FFIDOrganizationSwitcherClassNames as an, type FFIDOrganizationSwitcherProps as ao, type FFIDSubscriptionBadgeClassNames as ap, type FFIDSubscriptionBadgeProps as aq, type FFIDUserMenuClassNames as ar, type FFIDUserMenuProps as as, type FFIDApiResponse as b, type FFIDSessionResponse as c, type FFIDRedirectResult as d, type FFIDError as e, type FFIDSubscriptionCheckResponse as f, type FFIDListMembersResponse as g, type FFIDMemberRole as h, type FFIDUpdateMemberRoleResponse as i, type FFIDRemoveMemberResponse as j, type FFIDUserProfile as k, type FFIDUpdateUserProfileRequest as l, type FFIDCreateCheckoutParams as m, type FFIDCheckoutSessionResponse as n, type FFIDCreatePortalParams as o, type FFIDPortalSessionResponse as p, type FFIDVerifyAccessTokenOptions as q, type FFIDOAuthUserInfo as r, type FFIDInquiryCreateParams as s, type FFIDInquiryCreateResponse as t, type FFIDAuthMode as u, type FFIDLogger as v, type FFIDCacheAdapter as w, type FFIDUser as x, type FFIDOrganization as y, type FFIDSubscription as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKMGY6PQY_cjs = require('./chunk-KMGY6PQY.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 } =
|
|
49
|
+
const { isLoading, isAuthenticated, login } = chunkKMGY6PQY_cjs.useFFIDContext();
|
|
50
50
|
const hasRedirected = react.useRef(false);
|
|
51
51
|
react.useEffect(() => {
|
|
52
52
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -74,95 +74,107 @@ 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
|
|
77
|
+
get: function () { return chunkKMGY6PQY_cjs.DEFAULT_API_BASE_URL; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDAnnouncementBadge; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDAnnouncementList; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDInquiryForm; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDLoginButton; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDOrganizationSwitcher; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDProvider; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDSDKError; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDSubscriptionBadge; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkKMGY6PQY_cjs.FFIDUserMenu; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkKMGY6PQY_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkKMGY6PQY_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () { return chunkKMGY6PQY_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
122
126
|
});
|
|
123
127
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
124
128
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkKMGY6PQY_cjs.createFFIDAnnouncementsClient; }
|
|
126
130
|
});
|
|
127
131
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
128
132
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkKMGY6PQY_cjs.createFFIDClient; }
|
|
130
134
|
});
|
|
131
135
|
Object.defineProperty(exports, "createTokenStore", {
|
|
132
136
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkKMGY6PQY_cjs.createTokenStore; }
|
|
134
138
|
});
|
|
135
139
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
136
140
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkKMGY6PQY_cjs.generateCodeChallenge; }
|
|
138
142
|
});
|
|
139
143
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
140
144
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkKMGY6PQY_cjs.generateCodeVerifier; }
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function () { return chunkKMGY6PQY_cjs.isFFIDInquiryCategorySite2026; }
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () { return chunkKMGY6PQY_cjs.normalizeRedirectUri; }
|
|
142
154
|
});
|
|
143
155
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
144
156
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkKMGY6PQY_cjs.retrieveCodeVerifier; }
|
|
146
158
|
});
|
|
147
159
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
148
160
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkKMGY6PQY_cjs.storeCodeVerifier; }
|
|
150
162
|
});
|
|
151
163
|
Object.defineProperty(exports, "useFFID", {
|
|
152
164
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkKMGY6PQY_cjs.useFFID; }
|
|
154
166
|
});
|
|
155
167
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
156
168
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkKMGY6PQY_cjs.useFFIDAnnouncements; }
|
|
158
170
|
});
|
|
159
171
|
Object.defineProperty(exports, "useSubscription", {
|
|
160
172
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkKMGY6PQY_cjs.useSubscription; }
|
|
162
174
|
});
|
|
163
175
|
Object.defineProperty(exports, "withSubscription", {
|
|
164
176
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkKMGY6PQY_cjs.withSubscription; }
|
|
166
178
|
});
|
|
167
179
|
exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
|
|
168
180
|
exports.createKVCacheAdapter = createKVCacheAdapter;
|