@feelflow/ffid-sdk 5.25.0 → 5.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-HIKX4AVY.js → chunk-75UNNOLV.js} +438 -35
- package/dist/{chunk-ZFKXOTFF.cjs → chunk-S5FV6H2U.cjs} +453 -34
- 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/{ffid-client-BZERrMAF.d.cts → ffid-client-B_VBvIt4.d.cts} +141 -1
- package/dist/{ffid-client-CFZPX5ej.d.ts → ffid-client-DEM1nYqe.d.ts} +141 -1
- package/dist/{index-Dd6CMIBd.d.cts → index-_-MqJCN3.d.cts} +68 -2
- package/dist/{index-Dd6CMIBd.d.ts → index-_-MqJCN3.d.ts} +68 -2
- package/dist/index.cjs +106 -42
- package/dist/index.d.cts +287 -3
- package/dist/index.d.ts +287 -3
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +436 -36
- package/dist/server/index.d.cts +180 -3
- package/dist/server/index.d.ts +180 -3
- package/dist/server/index.js +423 -37
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
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-75UNNOLV.js';
|
|
@@ -46,6 +46,20 @@ type FFIDInquiryCategory = (typeof FFID_INQUIRY_CATEGORIES)[number];
|
|
|
46
46
|
*/
|
|
47
47
|
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"];
|
|
48
48
|
type FFIDInquiryCategorySite2026 = (typeof FFID_INQUIRY_CATEGORIES_SITE_2026)[number];
|
|
49
|
+
/**
|
|
50
|
+
* Acquisition-source ("how did you first hear about us") survey slugs
|
|
51
|
+
* accepted by `/api/v1/ext/inquiry` (feelflow-id-platform#4377). Mirrors
|
|
52
|
+
* feelflow-website-2026 `ACQUISITION_SOURCE_OPTIONS`
|
|
53
|
+
* (`feelflow-site/src/lib/acquisition-source.ts`); FFID
|
|
54
|
+
* `src/lib/inquiry/acquisition-sources.ts` is the persistence-side
|
|
55
|
+
* source of truth.
|
|
56
|
+
*
|
|
57
|
+
* Unlike `category`, the server validates this field strictly: a value
|
|
58
|
+
* outside this list is rejected with `INQUIRY_VALIDATION_ERROR` rather than
|
|
59
|
+
* stored as-is. Ship a new slug to FFID first, then start sending it.
|
|
60
|
+
*/
|
|
61
|
+
declare const FFID_INQUIRY_ACQUISITION_SOURCES: readonly ["referral", "generative-ai", "social-media", "networking-event", "web-search", "company-blog", "sales-outreach", "press-release", "web-advertising", "other"];
|
|
62
|
+
type FFIDInquiryAcquisitionSource = (typeof FFID_INQUIRY_ACQUISITION_SOURCES)[number];
|
|
49
63
|
/**
|
|
50
64
|
* Parameters for `client.inquiry.create()`. When submitting from a
|
|
51
65
|
* server-side SDK (Service API Key), set `source` to a stable
|
|
@@ -65,6 +79,18 @@ interface FFIDInquiryCreateParams {
|
|
|
65
79
|
name: string;
|
|
66
80
|
message: string;
|
|
67
81
|
category?: FFIDInquiryCategorySite2026 | FFIDInquiryCategory | (string & {});
|
|
82
|
+
/**
|
|
83
|
+
* "How did you first hear about us" survey answer (#4377). Optional and
|
|
84
|
+
* backward compatible — `undefined` and `null` are both normalized to
|
|
85
|
+
* an omitted key on the wire (`null` is accepted so
|
|
86
|
+
* `FFIDInquiryFormSubmitData.acquisitionSource` can be forwarded
|
|
87
|
+
* verbatim) and the row is stored with NULL.
|
|
88
|
+
* Server-side validation is a strict allowlist (unlike `category`):
|
|
89
|
+
* values outside {@link FFID_INQUIRY_ACQUISITION_SOURCES} fail with
|
|
90
|
+
* `INQUIRY_VALIDATION_ERROR`. Narrow untrusted strings with
|
|
91
|
+
* {@link isFFIDInquiryAcquisitionSource} before submitting.
|
|
92
|
+
*/
|
|
93
|
+
acquisitionSource?: FFIDInquiryAcquisitionSource | null;
|
|
68
94
|
company?: string;
|
|
69
95
|
phone?: string;
|
|
70
96
|
locale?: 'ja' | 'en';
|
|
@@ -1396,6 +1422,107 @@ type FFIDRedirectResult = {
|
|
|
1396
1422
|
code?: FFIDRedirectErrorCode;
|
|
1397
1423
|
};
|
|
1398
1424
|
|
|
1425
|
+
/** Deployment environments a catalog publication can apply to (single source) */
|
|
1426
|
+
declare const FFID_CATALOG_ENVIRONMENTS: readonly ["staging", "production"];
|
|
1427
|
+
/** Deployment environment a catalog publication applies to */
|
|
1428
|
+
type FFIDCatalogEnvironment = (typeof FFID_CATALOG_ENVIRONMENTS)[number];
|
|
1429
|
+
/**
|
|
1430
|
+
* Tax behavior of a published price.
|
|
1431
|
+
* `inclusive`: displayed price contains Stripe-calculated tax (Personal/Pro).
|
|
1432
|
+
* `exclusive`: tax is added on top of the base price (Team).
|
|
1433
|
+
*/
|
|
1434
|
+
type FFIDTaxBehavior = 'inclusive' | 'exclusive';
|
|
1435
|
+
/**
|
|
1436
|
+
* Publication lifecycle statuses (single source — the type, the SDK runtime
|
|
1437
|
+
* validator, and consumer sets all derive from this tuple so a new literal
|
|
1438
|
+
* cannot be added to one side only).
|
|
1439
|
+
*/
|
|
1440
|
+
declare const FFID_CATALOG_PUBLICATION_STATUSES: readonly ["approved", "superseded", "revoking", "revoked"];
|
|
1441
|
+
/**
|
|
1442
|
+
* Publication lifecycle status.
|
|
1443
|
+
* - `approved`: sellable — the only status that permits new paid checkout
|
|
1444
|
+
* - `superseded`: replaced by a newer revision (old sessions may sell through
|
|
1445
|
+
* until `sellThroughUntil`)
|
|
1446
|
+
* - `revoking`: emergency stop in progress — never sellable
|
|
1447
|
+
* - `revoked`: emergency stop completed — never sellable
|
|
1448
|
+
*/
|
|
1449
|
+
type FFIDCatalogPublicationStatus = (typeof FFID_CATALOG_PUBLICATION_STATUSES)[number];
|
|
1450
|
+
/**
|
|
1451
|
+
* Human-approved publication record binding a catalog revision to the
|
|
1452
|
+
* content/config hashes reviewed at approval time.
|
|
1453
|
+
*
|
|
1454
|
+
* All `*Hash` fields are lowercase SHA-256 hex computed with the shared
|
|
1455
|
+
* canonicalization helpers in `shared/catalog-hash` — consumers re-hash the
|
|
1456
|
+
* content they actually render and must refuse new sales on any mismatch.
|
|
1457
|
+
*/
|
|
1458
|
+
interface FFIDCatalogPublication {
|
|
1459
|
+
serviceCode: string;
|
|
1460
|
+
environment: FFIDCatalogEnvironment;
|
|
1461
|
+
catalogVersion: string;
|
|
1462
|
+
praxisCopyHash: string;
|
|
1463
|
+
ffidCheckoutCopyHash: string;
|
|
1464
|
+
legalDisclosureHash: string;
|
|
1465
|
+
taxConfigurationHash: string;
|
|
1466
|
+
paymentConfigurationHash: string;
|
|
1467
|
+
scopeHash: string;
|
|
1468
|
+
/** Monotonically increasing per (service, environment) publication counter */
|
|
1469
|
+
salesEpoch: number;
|
|
1470
|
+
/** FFID-generated immutable human-review approval ID */
|
|
1471
|
+
approvalId: string;
|
|
1472
|
+
/** ISO 8601 timestamp of the recorded human review */
|
|
1473
|
+
reviewedAt: string;
|
|
1474
|
+
/** ISO 8601 timestamp the publication became effective */
|
|
1475
|
+
effectiveAt: string;
|
|
1476
|
+
/** ISO 8601 timestamp the publication was superseded (null while current) */
|
|
1477
|
+
supersededAt: string | null;
|
|
1478
|
+
/** ISO 8601 upper bound for old-session sell-through (null unless superseded) */
|
|
1479
|
+
sellThroughUntil: string | null;
|
|
1480
|
+
/** ISO 8601 timestamp an emergency revoke took effect (null unless revoking/revoked) */
|
|
1481
|
+
revocationEffectiveAt: string | null;
|
|
1482
|
+
status: FFIDCatalogPublicationStatus;
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* A plan inside a published catalog revision (public-safe snapshot).
|
|
1486
|
+
* Never contains Stripe Product/Price identifiers or other secrets.
|
|
1487
|
+
*/
|
|
1488
|
+
interface FFIDPublishedPlan {
|
|
1489
|
+
/**
|
|
1490
|
+
* Plan code — always a lowercase slug (`^[a-z0-9][a-z0-9_-]*$`).
|
|
1491
|
+
* Per-service open set; see the FFID repo's
|
|
1492
|
+
* `docs/04-api/PLAN_CODE_CONTRACT.md` for the full guarantees.
|
|
1493
|
+
*/
|
|
1494
|
+
code: string;
|
|
1495
|
+
name: string;
|
|
1496
|
+
description: string | null;
|
|
1497
|
+
/** Monthly price in the catalog currency; null when monthly is not offered */
|
|
1498
|
+
priceMonthly: number | null;
|
|
1499
|
+
/** Yearly price in the catalog currency; null when yearly is not offered */
|
|
1500
|
+
priceYearly: number | null;
|
|
1501
|
+
currency: string;
|
|
1502
|
+
/** Billing intervals actually purchasable for this plan */
|
|
1503
|
+
billingIntervals: FFIDBillingInterval[];
|
|
1504
|
+
taxBehavior: FFIDTaxBehavior;
|
|
1505
|
+
minSeats: number;
|
|
1506
|
+
maxSeats: number | null;
|
|
1507
|
+
displayOrder: number;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Response of GET /api/v1/subscriptions/ext/catalog/{serviceCode}.
|
|
1511
|
+
*
|
|
1512
|
+
* `catalogVersion` always equals `publication.catalogVersion`; it is hoisted
|
|
1513
|
+
* to the top level so consumers can pin the version (e.g. as
|
|
1514
|
+
* `expectedCatalogVersion` for checkout) without digging into the publication.
|
|
1515
|
+
*/
|
|
1516
|
+
interface FFIDPublishedCatalog {
|
|
1517
|
+
service: {
|
|
1518
|
+
code: string;
|
|
1519
|
+
name: string;
|
|
1520
|
+
};
|
|
1521
|
+
catalogVersion: string;
|
|
1522
|
+
publication: FFIDCatalogPublication;
|
|
1523
|
+
plans: FFIDPublishedPlan[];
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1399
1526
|
/**
|
|
1400
1527
|
* FFID SDK Type Definitions
|
|
1401
1528
|
*
|
|
@@ -1503,6 +1630,12 @@ interface FFIDSubscription {
|
|
|
1503
1630
|
organizationName?: string | null | undefined;
|
|
1504
1631
|
}
|
|
1505
1632
|
/** OAuth userinfo subscription summary */
|
|
1633
|
+
type FFIDSeatAssignmentStatus = 'active' | 'revoking' | 'revoked';
|
|
1634
|
+
interface FFIDSeatAssignmentClaim {
|
|
1635
|
+
organizationId: string;
|
|
1636
|
+
subscriptionId: string;
|
|
1637
|
+
status: FFIDSeatAssignmentStatus;
|
|
1638
|
+
}
|
|
1506
1639
|
interface FFIDOAuthUserInfoSubscription {
|
|
1507
1640
|
subscriptionId: string | null;
|
|
1508
1641
|
status: FFIDSubscriptionStatus | null;
|
|
@@ -1520,6 +1653,12 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
1520
1653
|
organizationId: string | null;
|
|
1521
1654
|
organizationName?: string | null | undefined;
|
|
1522
1655
|
hasSeatAssignment: boolean | null;
|
|
1656
|
+
/**
|
|
1657
|
+
* Organization/subscription-bound seat claim (#4352). `undefined` means an
|
|
1658
|
+
* older FFID omitted the field; `null` means a present claim was malformed.
|
|
1659
|
+
* Only `status === 'active'` grants Team access.
|
|
1660
|
+
*/
|
|
1661
|
+
seatAssignment: FFIDSeatAssignmentClaim | null | undefined;
|
|
1523
1662
|
/**
|
|
1524
1663
|
* Stripe `cancel_at_period_end` (#3464, SDK 5.8.0). `true` while the
|
|
1525
1664
|
* subscription is scheduled to terminate at `currentPeriodEnd`. The
|
|
@@ -2069,6 +2208,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2069
2208
|
assignSeats: (params: FFIDAssignSeatsParams) => Promise<FFIDApiResponse<FFIDAssignSeatsResponse>>;
|
|
2070
2209
|
unassignSeat: (params: FFIDUnassignSeatParams) => Promise<FFIDApiResponse<FFIDUnassignSeatResponse>>;
|
|
2071
2210
|
listPlans: () => Promise<FFIDApiResponse<FFIDListPlansResponse>>;
|
|
2211
|
+
getPublishedCatalog: (serviceCode: string) => Promise<FFIDApiResponse<FFIDPublishedCatalog>>;
|
|
2072
2212
|
getSubscription: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDSubscriptionDetail>>;
|
|
2073
2213
|
subscribe: (params: FFIDSubscribeParams) => Promise<FFIDApiResponse<FFIDSubscribeResponse>>;
|
|
2074
2214
|
changePlan: (params: FFIDChangePlanParams) => Promise<FFIDApiResponse<FFIDChangePlanResponse>>;
|
|
@@ -2128,4 +2268,4 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2128
2268
|
/** Type of the FFID client */
|
|
2129
2269
|
type FFIDClient = ReturnType<typeof createFFIDClient>;
|
|
2130
2270
|
|
|
2131
|
-
export { type
|
|
2271
|
+
export { FFID_CATALOG_ENVIRONMENTS as $, type FFIDPasswordResetVerifyResponse as A, type FFIDProfileCallOptions as B, type FFIDProvisionMemberPlan as C, type FFIDProvisionMemberPlanStatus as D, type FFIDProvisionMemberResult as E, type FFIDLogger as F, type FFIDProvisionMemberStatus as G, type FFIDProvisionOrganizationDryRun as H, type FFIDProvisionOrganizationMemberInput as I, type FFIDProvisionOrganizationOutcome as J, type FFIDProvisionOrganizationParams as K, type FFIDProvisionOrganizationResponse as L, type FFIDProvisionUserDryRun as M, type FFIDProvisionUserOutcome as N, type FFIDProvisionUserParams as O, type FFIDProvisionUserProfileInput as P, type FFIDProvisionUserResponse as Q, type FFIDProvisionedOrganization as R, type FFIDProvisionedUser as S, type FFIDPublishedPlan as T, type FFIDRemoveMemberResponse as U, type FFIDResetSessionResponse as V, type FFIDSubscription as W, type FFIDUpdateMemberRoleResponse as X, type FFIDUpdateUserProfileRequest as Y, type FFIDUser as Z, type FFIDUserProfile as _, type FFIDError as a, FFID_CATALOG_PUBLICATION_STATUSES as a0, type TokenData as a1, type TokenStore as a2, createFFIDClient as a3, createTokenStore as a4, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type FFIDCatalogEnvironment as f, type FFIDBillingInterval as g, type FFIDTaxBehavior as h, type FFIDPublishedCatalog as i, type FFIDAddMemberParams as j, type FFIDAddMemberRequest as k, type FFIDAddMemberResponse as l, type FFIDAssignableMemberRole as m, type FFIDCacheConfig as n, type FFIDCatalogPublication as o, type FFIDCatalogPublicationStatus as p, type FFIDClient as q, type FFIDConfig as r, type FFIDListMembersResponse as s, type FFIDMemberRole as t, type FFIDOrganization as u, type FFIDOrganizationMember as v, type FFIDOtpSendResponse as w, type FFIDOtpVerifyResponse as x, type FFIDPasswordResetConfirmResponse as y, type FFIDPasswordResetResponse as z };
|
|
@@ -46,6 +46,20 @@ type FFIDInquiryCategory = (typeof FFID_INQUIRY_CATEGORIES)[number];
|
|
|
46
46
|
*/
|
|
47
47
|
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"];
|
|
48
48
|
type FFIDInquiryCategorySite2026 = (typeof FFID_INQUIRY_CATEGORIES_SITE_2026)[number];
|
|
49
|
+
/**
|
|
50
|
+
* Acquisition-source ("how did you first hear about us") survey slugs
|
|
51
|
+
* accepted by `/api/v1/ext/inquiry` (feelflow-id-platform#4377). Mirrors
|
|
52
|
+
* feelflow-website-2026 `ACQUISITION_SOURCE_OPTIONS`
|
|
53
|
+
* (`feelflow-site/src/lib/acquisition-source.ts`); FFID
|
|
54
|
+
* `src/lib/inquiry/acquisition-sources.ts` is the persistence-side
|
|
55
|
+
* source of truth.
|
|
56
|
+
*
|
|
57
|
+
* Unlike `category`, the server validates this field strictly: a value
|
|
58
|
+
* outside this list is rejected with `INQUIRY_VALIDATION_ERROR` rather than
|
|
59
|
+
* stored as-is. Ship a new slug to FFID first, then start sending it.
|
|
60
|
+
*/
|
|
61
|
+
declare const FFID_INQUIRY_ACQUISITION_SOURCES: readonly ["referral", "generative-ai", "social-media", "networking-event", "web-search", "company-blog", "sales-outreach", "press-release", "web-advertising", "other"];
|
|
62
|
+
type FFIDInquiryAcquisitionSource = (typeof FFID_INQUIRY_ACQUISITION_SOURCES)[number];
|
|
49
63
|
/**
|
|
50
64
|
* Parameters for `client.inquiry.create()`. When submitting from a
|
|
51
65
|
* server-side SDK (Service API Key), set `source` to a stable
|
|
@@ -65,6 +79,18 @@ interface FFIDInquiryCreateParams {
|
|
|
65
79
|
name: string;
|
|
66
80
|
message: string;
|
|
67
81
|
category?: FFIDInquiryCategorySite2026 | FFIDInquiryCategory | (string & {});
|
|
82
|
+
/**
|
|
83
|
+
* "How did you first hear about us" survey answer (#4377). Optional and
|
|
84
|
+
* backward compatible — `undefined` and `null` are both normalized to
|
|
85
|
+
* an omitted key on the wire (`null` is accepted so
|
|
86
|
+
* `FFIDInquiryFormSubmitData.acquisitionSource` can be forwarded
|
|
87
|
+
* verbatim) and the row is stored with NULL.
|
|
88
|
+
* Server-side validation is a strict allowlist (unlike `category`):
|
|
89
|
+
* values outside {@link FFID_INQUIRY_ACQUISITION_SOURCES} fail with
|
|
90
|
+
* `INQUIRY_VALIDATION_ERROR`. Narrow untrusted strings with
|
|
91
|
+
* {@link isFFIDInquiryAcquisitionSource} before submitting.
|
|
92
|
+
*/
|
|
93
|
+
acquisitionSource?: FFIDInquiryAcquisitionSource | null;
|
|
68
94
|
company?: string;
|
|
69
95
|
phone?: string;
|
|
70
96
|
locale?: 'ja' | 'en';
|
|
@@ -1396,6 +1422,107 @@ type FFIDRedirectResult = {
|
|
|
1396
1422
|
code?: FFIDRedirectErrorCode;
|
|
1397
1423
|
};
|
|
1398
1424
|
|
|
1425
|
+
/** Deployment environments a catalog publication can apply to (single source) */
|
|
1426
|
+
declare const FFID_CATALOG_ENVIRONMENTS: readonly ["staging", "production"];
|
|
1427
|
+
/** Deployment environment a catalog publication applies to */
|
|
1428
|
+
type FFIDCatalogEnvironment = (typeof FFID_CATALOG_ENVIRONMENTS)[number];
|
|
1429
|
+
/**
|
|
1430
|
+
* Tax behavior of a published price.
|
|
1431
|
+
* `inclusive`: displayed price contains Stripe-calculated tax (Personal/Pro).
|
|
1432
|
+
* `exclusive`: tax is added on top of the base price (Team).
|
|
1433
|
+
*/
|
|
1434
|
+
type FFIDTaxBehavior = 'inclusive' | 'exclusive';
|
|
1435
|
+
/**
|
|
1436
|
+
* Publication lifecycle statuses (single source — the type, the SDK runtime
|
|
1437
|
+
* validator, and consumer sets all derive from this tuple so a new literal
|
|
1438
|
+
* cannot be added to one side only).
|
|
1439
|
+
*/
|
|
1440
|
+
declare const FFID_CATALOG_PUBLICATION_STATUSES: readonly ["approved", "superseded", "revoking", "revoked"];
|
|
1441
|
+
/**
|
|
1442
|
+
* Publication lifecycle status.
|
|
1443
|
+
* - `approved`: sellable — the only status that permits new paid checkout
|
|
1444
|
+
* - `superseded`: replaced by a newer revision (old sessions may sell through
|
|
1445
|
+
* until `sellThroughUntil`)
|
|
1446
|
+
* - `revoking`: emergency stop in progress — never sellable
|
|
1447
|
+
* - `revoked`: emergency stop completed — never sellable
|
|
1448
|
+
*/
|
|
1449
|
+
type FFIDCatalogPublicationStatus = (typeof FFID_CATALOG_PUBLICATION_STATUSES)[number];
|
|
1450
|
+
/**
|
|
1451
|
+
* Human-approved publication record binding a catalog revision to the
|
|
1452
|
+
* content/config hashes reviewed at approval time.
|
|
1453
|
+
*
|
|
1454
|
+
* All `*Hash` fields are lowercase SHA-256 hex computed with the shared
|
|
1455
|
+
* canonicalization helpers in `shared/catalog-hash` — consumers re-hash the
|
|
1456
|
+
* content they actually render and must refuse new sales on any mismatch.
|
|
1457
|
+
*/
|
|
1458
|
+
interface FFIDCatalogPublication {
|
|
1459
|
+
serviceCode: string;
|
|
1460
|
+
environment: FFIDCatalogEnvironment;
|
|
1461
|
+
catalogVersion: string;
|
|
1462
|
+
praxisCopyHash: string;
|
|
1463
|
+
ffidCheckoutCopyHash: string;
|
|
1464
|
+
legalDisclosureHash: string;
|
|
1465
|
+
taxConfigurationHash: string;
|
|
1466
|
+
paymentConfigurationHash: string;
|
|
1467
|
+
scopeHash: string;
|
|
1468
|
+
/** Monotonically increasing per (service, environment) publication counter */
|
|
1469
|
+
salesEpoch: number;
|
|
1470
|
+
/** FFID-generated immutable human-review approval ID */
|
|
1471
|
+
approvalId: string;
|
|
1472
|
+
/** ISO 8601 timestamp of the recorded human review */
|
|
1473
|
+
reviewedAt: string;
|
|
1474
|
+
/** ISO 8601 timestamp the publication became effective */
|
|
1475
|
+
effectiveAt: string;
|
|
1476
|
+
/** ISO 8601 timestamp the publication was superseded (null while current) */
|
|
1477
|
+
supersededAt: string | null;
|
|
1478
|
+
/** ISO 8601 upper bound for old-session sell-through (null unless superseded) */
|
|
1479
|
+
sellThroughUntil: string | null;
|
|
1480
|
+
/** ISO 8601 timestamp an emergency revoke took effect (null unless revoking/revoked) */
|
|
1481
|
+
revocationEffectiveAt: string | null;
|
|
1482
|
+
status: FFIDCatalogPublicationStatus;
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* A plan inside a published catalog revision (public-safe snapshot).
|
|
1486
|
+
* Never contains Stripe Product/Price identifiers or other secrets.
|
|
1487
|
+
*/
|
|
1488
|
+
interface FFIDPublishedPlan {
|
|
1489
|
+
/**
|
|
1490
|
+
* Plan code — always a lowercase slug (`^[a-z0-9][a-z0-9_-]*$`).
|
|
1491
|
+
* Per-service open set; see the FFID repo's
|
|
1492
|
+
* `docs/04-api/PLAN_CODE_CONTRACT.md` for the full guarantees.
|
|
1493
|
+
*/
|
|
1494
|
+
code: string;
|
|
1495
|
+
name: string;
|
|
1496
|
+
description: string | null;
|
|
1497
|
+
/** Monthly price in the catalog currency; null when monthly is not offered */
|
|
1498
|
+
priceMonthly: number | null;
|
|
1499
|
+
/** Yearly price in the catalog currency; null when yearly is not offered */
|
|
1500
|
+
priceYearly: number | null;
|
|
1501
|
+
currency: string;
|
|
1502
|
+
/** Billing intervals actually purchasable for this plan */
|
|
1503
|
+
billingIntervals: FFIDBillingInterval[];
|
|
1504
|
+
taxBehavior: FFIDTaxBehavior;
|
|
1505
|
+
minSeats: number;
|
|
1506
|
+
maxSeats: number | null;
|
|
1507
|
+
displayOrder: number;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Response of GET /api/v1/subscriptions/ext/catalog/{serviceCode}.
|
|
1511
|
+
*
|
|
1512
|
+
* `catalogVersion` always equals `publication.catalogVersion`; it is hoisted
|
|
1513
|
+
* to the top level so consumers can pin the version (e.g. as
|
|
1514
|
+
* `expectedCatalogVersion` for checkout) without digging into the publication.
|
|
1515
|
+
*/
|
|
1516
|
+
interface FFIDPublishedCatalog {
|
|
1517
|
+
service: {
|
|
1518
|
+
code: string;
|
|
1519
|
+
name: string;
|
|
1520
|
+
};
|
|
1521
|
+
catalogVersion: string;
|
|
1522
|
+
publication: FFIDCatalogPublication;
|
|
1523
|
+
plans: FFIDPublishedPlan[];
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1399
1526
|
/**
|
|
1400
1527
|
* FFID SDK Type Definitions
|
|
1401
1528
|
*
|
|
@@ -1503,6 +1630,12 @@ interface FFIDSubscription {
|
|
|
1503
1630
|
organizationName?: string | null | undefined;
|
|
1504
1631
|
}
|
|
1505
1632
|
/** OAuth userinfo subscription summary */
|
|
1633
|
+
type FFIDSeatAssignmentStatus = 'active' | 'revoking' | 'revoked';
|
|
1634
|
+
interface FFIDSeatAssignmentClaim {
|
|
1635
|
+
organizationId: string;
|
|
1636
|
+
subscriptionId: string;
|
|
1637
|
+
status: FFIDSeatAssignmentStatus;
|
|
1638
|
+
}
|
|
1506
1639
|
interface FFIDOAuthUserInfoSubscription {
|
|
1507
1640
|
subscriptionId: string | null;
|
|
1508
1641
|
status: FFIDSubscriptionStatus | null;
|
|
@@ -1520,6 +1653,12 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
1520
1653
|
organizationId: string | null;
|
|
1521
1654
|
organizationName?: string | null | undefined;
|
|
1522
1655
|
hasSeatAssignment: boolean | null;
|
|
1656
|
+
/**
|
|
1657
|
+
* Organization/subscription-bound seat claim (#4352). `undefined` means an
|
|
1658
|
+
* older FFID omitted the field; `null` means a present claim was malformed.
|
|
1659
|
+
* Only `status === 'active'` grants Team access.
|
|
1660
|
+
*/
|
|
1661
|
+
seatAssignment: FFIDSeatAssignmentClaim | null | undefined;
|
|
1523
1662
|
/**
|
|
1524
1663
|
* Stripe `cancel_at_period_end` (#3464, SDK 5.8.0). `true` while the
|
|
1525
1664
|
* subscription is scheduled to terminate at `currentPeriodEnd`. The
|
|
@@ -2069,6 +2208,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2069
2208
|
assignSeats: (params: FFIDAssignSeatsParams) => Promise<FFIDApiResponse<FFIDAssignSeatsResponse>>;
|
|
2070
2209
|
unassignSeat: (params: FFIDUnassignSeatParams) => Promise<FFIDApiResponse<FFIDUnassignSeatResponse>>;
|
|
2071
2210
|
listPlans: () => Promise<FFIDApiResponse<FFIDListPlansResponse>>;
|
|
2211
|
+
getPublishedCatalog: (serviceCode: string) => Promise<FFIDApiResponse<FFIDPublishedCatalog>>;
|
|
2072
2212
|
getSubscription: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDSubscriptionDetail>>;
|
|
2073
2213
|
subscribe: (params: FFIDSubscribeParams) => Promise<FFIDApiResponse<FFIDSubscribeResponse>>;
|
|
2074
2214
|
changePlan: (params: FFIDChangePlanParams) => Promise<FFIDApiResponse<FFIDChangePlanResponse>>;
|
|
@@ -2128,4 +2268,4 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
2128
2268
|
/** Type of the FFID client */
|
|
2129
2269
|
type FFIDClient = ReturnType<typeof createFFIDClient>;
|
|
2130
2270
|
|
|
2131
|
-
export { type
|
|
2271
|
+
export { FFID_CATALOG_ENVIRONMENTS as $, type FFIDPasswordResetVerifyResponse as A, type FFIDProfileCallOptions as B, type FFIDProvisionMemberPlan as C, type FFIDProvisionMemberPlanStatus as D, type FFIDProvisionMemberResult as E, type FFIDLogger as F, type FFIDProvisionMemberStatus as G, type FFIDProvisionOrganizationDryRun as H, type FFIDProvisionOrganizationMemberInput as I, type FFIDProvisionOrganizationOutcome as J, type FFIDProvisionOrganizationParams as K, type FFIDProvisionOrganizationResponse as L, type FFIDProvisionUserDryRun as M, type FFIDProvisionUserOutcome as N, type FFIDProvisionUserParams as O, type FFIDProvisionUserProfileInput as P, type FFIDProvisionUserResponse as Q, type FFIDProvisionedOrganization as R, type FFIDProvisionedUser as S, type FFIDPublishedPlan as T, type FFIDRemoveMemberResponse as U, type FFIDResetSessionResponse as V, type FFIDSubscription as W, type FFIDUpdateMemberRoleResponse as X, type FFIDUpdateUserProfileRequest as Y, type FFIDUser as Z, type FFIDUserProfile as _, type FFIDError as a, FFID_CATALOG_PUBLICATION_STATUSES as a0, type TokenData as a1, type TokenStore as a2, createFFIDClient as a3, createTokenStore as a4, type FFIDCacheAdapter as b, type FFIDVerifyAccessTokenOptions as c, type FFIDApiResponse as d, type FFIDOAuthUserInfo as e, type FFIDCatalogEnvironment as f, type FFIDBillingInterval as g, type FFIDTaxBehavior as h, type FFIDPublishedCatalog as i, type FFIDAddMemberParams as j, type FFIDAddMemberRequest as k, type FFIDAddMemberResponse as l, type FFIDAssignableMemberRole as m, type FFIDCacheConfig as n, type FFIDCatalogPublication as o, type FFIDCatalogPublicationStatus as p, type FFIDClient as q, type FFIDConfig as r, type FFIDListMembersResponse as s, type FFIDMemberRole as t, type FFIDOrganization as u, type FFIDOrganizationMember as v, type FFIDOtpSendResponse as w, type FFIDOtpVerifyResponse as x, type FFIDPasswordResetConfirmResponse as y, type FFIDPasswordResetResponse as z };
|
|
@@ -318,6 +318,12 @@ interface FFIDSubscription {
|
|
|
318
318
|
organizationName?: string | null | undefined;
|
|
319
319
|
}
|
|
320
320
|
/** OAuth userinfo subscription summary */
|
|
321
|
+
type FFIDSeatAssignmentStatus = 'active' | 'revoking' | 'revoked';
|
|
322
|
+
interface FFIDSeatAssignmentClaim {
|
|
323
|
+
organizationId: string;
|
|
324
|
+
subscriptionId: string;
|
|
325
|
+
status: FFIDSeatAssignmentStatus;
|
|
326
|
+
}
|
|
321
327
|
interface FFIDOAuthUserInfoSubscription {
|
|
322
328
|
subscriptionId: string | null;
|
|
323
329
|
status: FFIDSubscriptionStatus | null;
|
|
@@ -335,6 +341,12 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
335
341
|
organizationId: string | null;
|
|
336
342
|
organizationName?: string | null | undefined;
|
|
337
343
|
hasSeatAssignment: boolean | null;
|
|
344
|
+
/**
|
|
345
|
+
* Organization/subscription-bound seat claim (#4352). `undefined` means an
|
|
346
|
+
* older FFID omitted the field; `null` means a present claim was malformed.
|
|
347
|
+
* Only `status === 'active'` grants Team access.
|
|
348
|
+
*/
|
|
349
|
+
seatAssignment: FFIDSeatAssignmentClaim | null | undefined;
|
|
338
350
|
/**
|
|
339
351
|
* Stripe `cancel_at_period_end` (#3464, SDK 5.8.0). `true` while the
|
|
340
352
|
* subscription is scheduled to terminate at `currentPeriodEnd`. The
|
|
@@ -1024,6 +1036,26 @@ type FFIDInquiryCategorySite2026 = (typeof FFID_INQUIRY_CATEGORIES_SITE_2026)[nu
|
|
|
1024
1036
|
* parameter) to the canonical union.
|
|
1025
1037
|
*/
|
|
1026
1038
|
declare const isFFIDInquiryCategorySite2026: (value: string) => value is FFIDInquiryCategorySite2026;
|
|
1039
|
+
/**
|
|
1040
|
+
* Acquisition-source ("how did you first hear about us") survey slugs
|
|
1041
|
+
* accepted by `/api/v1/ext/inquiry` (feelflow-id-platform#4377). Mirrors
|
|
1042
|
+
* feelflow-website-2026 `ACQUISITION_SOURCE_OPTIONS`
|
|
1043
|
+
* (`feelflow-site/src/lib/acquisition-source.ts`); FFID
|
|
1044
|
+
* `src/lib/inquiry/acquisition-sources.ts` is the persistence-side
|
|
1045
|
+
* source of truth.
|
|
1046
|
+
*
|
|
1047
|
+
* Unlike `category`, the server validates this field strictly: a value
|
|
1048
|
+
* outside this list is rejected with `INQUIRY_VALIDATION_ERROR` rather than
|
|
1049
|
+
* stored as-is. Ship a new slug to FFID first, then start sending it.
|
|
1050
|
+
*/
|
|
1051
|
+
declare const FFID_INQUIRY_ACQUISITION_SOURCES: readonly ["referral", "generative-ai", "social-media", "networking-event", "web-search", "company-blog", "sales-outreach", "press-release", "web-advertising", "other"];
|
|
1052
|
+
type FFIDInquiryAcquisitionSource = (typeof FFID_INQUIRY_ACQUISITION_SOURCES)[number];
|
|
1053
|
+
/**
|
|
1054
|
+
* Runtime type guard for the acquisition-source allowlist. Use when
|
|
1055
|
+
* narrowing an unknown string (e.g., a URL query parameter or analytics
|
|
1056
|
+
* value) before passing it to `client.inquiry.create()`.
|
|
1057
|
+
*/
|
|
1058
|
+
declare const isFFIDInquiryAcquisitionSource: (value: string) => value is FFIDInquiryAcquisitionSource;
|
|
1027
1059
|
/**
|
|
1028
1060
|
* Parameters for `client.inquiry.create()`. When submitting from a
|
|
1029
1061
|
* server-side SDK (Service API Key), set `source` to a stable
|
|
@@ -1043,6 +1075,18 @@ interface FFIDInquiryCreateParams {
|
|
|
1043
1075
|
name: string;
|
|
1044
1076
|
message: string;
|
|
1045
1077
|
category?: FFIDInquiryCategorySite2026 | FFIDInquiryCategory | (string & {});
|
|
1078
|
+
/**
|
|
1079
|
+
* "How did you first hear about us" survey answer (#4377). Optional and
|
|
1080
|
+
* backward compatible — `undefined` and `null` are both normalized to
|
|
1081
|
+
* an omitted key on the wire (`null` is accepted so
|
|
1082
|
+
* `FFIDInquiryFormSubmitData.acquisitionSource` can be forwarded
|
|
1083
|
+
* verbatim) and the row is stored with NULL.
|
|
1084
|
+
* Server-side validation is a strict allowlist (unlike `category`):
|
|
1085
|
+
* values outside {@link FFID_INQUIRY_ACQUISITION_SOURCES} fail with
|
|
1086
|
+
* `INQUIRY_VALIDATION_ERROR`. Narrow untrusted strings with
|
|
1087
|
+
* {@link isFFIDInquiryAcquisitionSource} before submitting.
|
|
1088
|
+
*/
|
|
1089
|
+
acquisitionSource?: FFIDInquiryAcquisitionSource | null;
|
|
1046
1090
|
company?: string;
|
|
1047
1091
|
phone?: string;
|
|
1048
1092
|
locale?: 'ja' | 'en';
|
|
@@ -1408,6 +1452,15 @@ interface FFIDInquiryFormSubmitData {
|
|
|
1408
1452
|
company: string | null;
|
|
1409
1453
|
phone: string | null;
|
|
1410
1454
|
category: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* Acquisition-source slug forwarded verbatim from the
|
|
1457
|
+
* `acquisitionSource` prop (#4377). `null` when the consumer does not
|
|
1458
|
+
* collect the survey — existing `onSubmit` handlers that ignore the
|
|
1459
|
+
* field keep working unchanged. Typed as the closed allowlist union so
|
|
1460
|
+
* the payload can be handed to `client.inquiry.create()` without a
|
|
1461
|
+
* re-narrowing cast.
|
|
1462
|
+
*/
|
|
1463
|
+
acquisitionSource: FFIDInquiryAcquisitionSource | null;
|
|
1411
1464
|
message: string;
|
|
1412
1465
|
organizationId: string | null;
|
|
1413
1466
|
inquiryFollowupOptIn: boolean;
|
|
@@ -1437,6 +1490,19 @@ interface FFIDInquiryFormProps {
|
|
|
1437
1490
|
privacyHref?: string;
|
|
1438
1491
|
/** Must be refreshed by the consumer when the Turnstile widget reissues a token. */
|
|
1439
1492
|
turnstileToken?: string | null;
|
|
1493
|
+
/**
|
|
1494
|
+
* Acquisition-source survey answer collected by the consumer's own UI
|
|
1495
|
+
* (#4377). The form renders no input for it — like `turnstileToken`,
|
|
1496
|
+
* it is a consumer-controlled value passed through into
|
|
1497
|
+
* `FFIDInquiryFormSubmitData.acquisitionSource` on every submit /
|
|
1498
|
+
* `onChange` broadcast. Typed as the closed
|
|
1499
|
+
* `FFID_INQUIRY_ACQUISITION_SOURCES` union so an invalid slug (e.g. a
|
|
1500
|
+
* display label, or a new value not yet deployed to FFID) fails at the
|
|
1501
|
+
* consumer's compile step instead of rejecting every end-user
|
|
1502
|
+
* submission with `INQUIRY_VALIDATION_ERROR` at runtime. Narrow
|
|
1503
|
+
* untrusted strings with `isFFIDInquiryAcquisitionSource` first.
|
|
1504
|
+
*/
|
|
1505
|
+
acquisitionSource?: FFIDInquiryAcquisitionSource | null;
|
|
1440
1506
|
/** Slot for the consumer's Turnstile widget (anonymous mode only). */
|
|
1441
1507
|
turnstileSlot?: ReactNode;
|
|
1442
1508
|
onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
|
|
@@ -1522,6 +1588,6 @@ interface FFIDInquiryFormProps {
|
|
|
1522
1588
|
interface FFIDInquiryFormPlaceholderContext {
|
|
1523
1589
|
category: string | null;
|
|
1524
1590
|
}
|
|
1525
|
-
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1591
|
+
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, acquisitionSource, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1526
1592
|
|
|
1527
|
-
export { type
|
|
1593
|
+
export { type FFIDInquiryFormSubmitData as $, type AnnouncementListResponse as A, type AnnouncementStatus as B, type AnnouncementType as C, EFFECTIVE_SUBSCRIPTION_STATUSES as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementBadge as G, FFIDAnnouncementList as H, type FFIDAnnouncementsError as I, type FFIDAnnouncementsErrorCode as J, type FFIDAnnouncementsServerResponse as K, type ListAnnouncementsOptions as L, type FFIDApiResponseMeta as M, type FFIDCacheConfig as N, type FFIDContextValue as O, type FFIDInquiryAcquisitionSource as P, type FFIDInquiryCategory as Q, type FFIDInquiryCategorySite2026 as R, FFIDInquiryForm as S, type TokenStore as T, type FFIDInquiryFormCategoryItem as U, type FFIDInquiryFormClassNames as V, type FFIDInquiryFormLegalLayout as W, type FFIDInquiryFormOrganization as X, type FFIDInquiryFormPlaceholderContext as Y, type FFIDInquiryFormPrefill as Z, type FFIDInquiryFormProps as _, type FFIDOAuthUserInfoSubscription as a, type FFIDInquiryFormSubmitResult as a0, type FFIDJwtClaims as a1, FFIDLoginButton as a2, type FFIDOAuthUserInfoMemberRole as a3, FFIDOrganizationSwitcher as a4, type FFIDSeatAssignmentClaim as a5, type FFIDSeatAssignmentStatus as a6, type FFIDSeatModel as a7, type FFIDServiceAccessDenialReason as a8, type FFIDServiceAccessFailPolicy as a9, FFIDSubscriptionBadge as aa, FFIDUserMenu as ab, FFID_INQUIRY_ACQUISITION_SOURCES as ac, FFID_INQUIRY_CATEGORIES as ad, FFID_INQUIRY_CATEGORIES_SITE_2026 as ae, type TokenData as af, type UseFFIDAnnouncementsOptions as ag, type UseFFIDAnnouncementsReturn as ah, createTokenStore as ai, isFFIDInquiryAcquisitionSource as aj, isFFIDInquiryCategorySite2026 as ak, useFFIDAnnouncements as al, type FFIDAnnouncementBadgeClassNames as am, type FFIDAnnouncementBadgeProps as an, type FFIDAnnouncementListClassNames as ao, type FFIDAnnouncementListProps as ap, type FFIDLoginButtonProps as aq, type FFIDOrganizationSwitcherClassNames as ar, type FFIDOrganizationSwitcherProps as as, type FFIDSubscriptionBadgeClassNames as at, type FFIDSubscriptionBadgeProps as au, type FFIDUserMenuClassNames as av, type FFIDUserMenuProps as aw, type FFIDPrompt as b, type FFIDConfig as c, type FFIDApiResponse as d, type FFIDSessionResponse as e, type FFIDSignOutResult as f, type FFIDError as g, type FFIDSubscriptionCheckResponse as h, type FFIDCheckServiceAccessParams as i, type FFIDServiceAccessDecision as j, type FFIDAnalyticsConfig as k, type FFIDVerifyAccessTokenOptions as l, type FFIDOAuthUserInfo as m, type FFIDInquiryCreateParams as n, type FFIDInquiryCreateResponse as o, type FFIDAuthMode as p, type FFIDLogger as q, type FFIDCacheAdapter as r, type FFIDUser as s, type FFIDOrganization as t, type FFIDSubscription as u, type FFIDSubscriptionContextValue as v, type FFIDAnnouncementsClientConfig as w, type FFIDAnnouncementsApiResponse as x, type FFIDAnnouncementsLogger as y, type Announcement as z };
|
|
@@ -318,6 +318,12 @@ interface FFIDSubscription {
|
|
|
318
318
|
organizationName?: string | null | undefined;
|
|
319
319
|
}
|
|
320
320
|
/** OAuth userinfo subscription summary */
|
|
321
|
+
type FFIDSeatAssignmentStatus = 'active' | 'revoking' | 'revoked';
|
|
322
|
+
interface FFIDSeatAssignmentClaim {
|
|
323
|
+
organizationId: string;
|
|
324
|
+
subscriptionId: string;
|
|
325
|
+
status: FFIDSeatAssignmentStatus;
|
|
326
|
+
}
|
|
321
327
|
interface FFIDOAuthUserInfoSubscription {
|
|
322
328
|
subscriptionId: string | null;
|
|
323
329
|
status: FFIDSubscriptionStatus | null;
|
|
@@ -335,6 +341,12 @@ interface FFIDOAuthUserInfoSubscription {
|
|
|
335
341
|
organizationId: string | null;
|
|
336
342
|
organizationName?: string | null | undefined;
|
|
337
343
|
hasSeatAssignment: boolean | null;
|
|
344
|
+
/**
|
|
345
|
+
* Organization/subscription-bound seat claim (#4352). `undefined` means an
|
|
346
|
+
* older FFID omitted the field; `null` means a present claim was malformed.
|
|
347
|
+
* Only `status === 'active'` grants Team access.
|
|
348
|
+
*/
|
|
349
|
+
seatAssignment: FFIDSeatAssignmentClaim | null | undefined;
|
|
338
350
|
/**
|
|
339
351
|
* Stripe `cancel_at_period_end` (#3464, SDK 5.8.0). `true` while the
|
|
340
352
|
* subscription is scheduled to terminate at `currentPeriodEnd`. The
|
|
@@ -1024,6 +1036,26 @@ type FFIDInquiryCategorySite2026 = (typeof FFID_INQUIRY_CATEGORIES_SITE_2026)[nu
|
|
|
1024
1036
|
* parameter) to the canonical union.
|
|
1025
1037
|
*/
|
|
1026
1038
|
declare const isFFIDInquiryCategorySite2026: (value: string) => value is FFIDInquiryCategorySite2026;
|
|
1039
|
+
/**
|
|
1040
|
+
* Acquisition-source ("how did you first hear about us") survey slugs
|
|
1041
|
+
* accepted by `/api/v1/ext/inquiry` (feelflow-id-platform#4377). Mirrors
|
|
1042
|
+
* feelflow-website-2026 `ACQUISITION_SOURCE_OPTIONS`
|
|
1043
|
+
* (`feelflow-site/src/lib/acquisition-source.ts`); FFID
|
|
1044
|
+
* `src/lib/inquiry/acquisition-sources.ts` is the persistence-side
|
|
1045
|
+
* source of truth.
|
|
1046
|
+
*
|
|
1047
|
+
* Unlike `category`, the server validates this field strictly: a value
|
|
1048
|
+
* outside this list is rejected with `INQUIRY_VALIDATION_ERROR` rather than
|
|
1049
|
+
* stored as-is. Ship a new slug to FFID first, then start sending it.
|
|
1050
|
+
*/
|
|
1051
|
+
declare const FFID_INQUIRY_ACQUISITION_SOURCES: readonly ["referral", "generative-ai", "social-media", "networking-event", "web-search", "company-blog", "sales-outreach", "press-release", "web-advertising", "other"];
|
|
1052
|
+
type FFIDInquiryAcquisitionSource = (typeof FFID_INQUIRY_ACQUISITION_SOURCES)[number];
|
|
1053
|
+
/**
|
|
1054
|
+
* Runtime type guard for the acquisition-source allowlist. Use when
|
|
1055
|
+
* narrowing an unknown string (e.g., a URL query parameter or analytics
|
|
1056
|
+
* value) before passing it to `client.inquiry.create()`.
|
|
1057
|
+
*/
|
|
1058
|
+
declare const isFFIDInquiryAcquisitionSource: (value: string) => value is FFIDInquiryAcquisitionSource;
|
|
1027
1059
|
/**
|
|
1028
1060
|
* Parameters for `client.inquiry.create()`. When submitting from a
|
|
1029
1061
|
* server-side SDK (Service API Key), set `source` to a stable
|
|
@@ -1043,6 +1075,18 @@ interface FFIDInquiryCreateParams {
|
|
|
1043
1075
|
name: string;
|
|
1044
1076
|
message: string;
|
|
1045
1077
|
category?: FFIDInquiryCategorySite2026 | FFIDInquiryCategory | (string & {});
|
|
1078
|
+
/**
|
|
1079
|
+
* "How did you first hear about us" survey answer (#4377). Optional and
|
|
1080
|
+
* backward compatible — `undefined` and `null` are both normalized to
|
|
1081
|
+
* an omitted key on the wire (`null` is accepted so
|
|
1082
|
+
* `FFIDInquiryFormSubmitData.acquisitionSource` can be forwarded
|
|
1083
|
+
* verbatim) and the row is stored with NULL.
|
|
1084
|
+
* Server-side validation is a strict allowlist (unlike `category`):
|
|
1085
|
+
* values outside {@link FFID_INQUIRY_ACQUISITION_SOURCES} fail with
|
|
1086
|
+
* `INQUIRY_VALIDATION_ERROR`. Narrow untrusted strings with
|
|
1087
|
+
* {@link isFFIDInquiryAcquisitionSource} before submitting.
|
|
1088
|
+
*/
|
|
1089
|
+
acquisitionSource?: FFIDInquiryAcquisitionSource | null;
|
|
1046
1090
|
company?: string;
|
|
1047
1091
|
phone?: string;
|
|
1048
1092
|
locale?: 'ja' | 'en';
|
|
@@ -1408,6 +1452,15 @@ interface FFIDInquiryFormSubmitData {
|
|
|
1408
1452
|
company: string | null;
|
|
1409
1453
|
phone: string | null;
|
|
1410
1454
|
category: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* Acquisition-source slug forwarded verbatim from the
|
|
1457
|
+
* `acquisitionSource` prop (#4377). `null` when the consumer does not
|
|
1458
|
+
* collect the survey — existing `onSubmit` handlers that ignore the
|
|
1459
|
+
* field keep working unchanged. Typed as the closed allowlist union so
|
|
1460
|
+
* the payload can be handed to `client.inquiry.create()` without a
|
|
1461
|
+
* re-narrowing cast.
|
|
1462
|
+
*/
|
|
1463
|
+
acquisitionSource: FFIDInquiryAcquisitionSource | null;
|
|
1411
1464
|
message: string;
|
|
1412
1465
|
organizationId: string | null;
|
|
1413
1466
|
inquiryFollowupOptIn: boolean;
|
|
@@ -1437,6 +1490,19 @@ interface FFIDInquiryFormProps {
|
|
|
1437
1490
|
privacyHref?: string;
|
|
1438
1491
|
/** Must be refreshed by the consumer when the Turnstile widget reissues a token. */
|
|
1439
1492
|
turnstileToken?: string | null;
|
|
1493
|
+
/**
|
|
1494
|
+
* Acquisition-source survey answer collected by the consumer's own UI
|
|
1495
|
+
* (#4377). The form renders no input for it — like `turnstileToken`,
|
|
1496
|
+
* it is a consumer-controlled value passed through into
|
|
1497
|
+
* `FFIDInquiryFormSubmitData.acquisitionSource` on every submit /
|
|
1498
|
+
* `onChange` broadcast. Typed as the closed
|
|
1499
|
+
* `FFID_INQUIRY_ACQUISITION_SOURCES` union so an invalid slug (e.g. a
|
|
1500
|
+
* display label, or a new value not yet deployed to FFID) fails at the
|
|
1501
|
+
* consumer's compile step instead of rejecting every end-user
|
|
1502
|
+
* submission with `INQUIRY_VALIDATION_ERROR` at runtime. Narrow
|
|
1503
|
+
* untrusted strings with `isFFIDInquiryAcquisitionSource` first.
|
|
1504
|
+
*/
|
|
1505
|
+
acquisitionSource?: FFIDInquiryAcquisitionSource | null;
|
|
1440
1506
|
/** Slot for the consumer's Turnstile widget (anonymous mode only). */
|
|
1441
1507
|
turnstileSlot?: ReactNode;
|
|
1442
1508
|
onSubmit: (data: FFIDInquiryFormSubmitData) => Promise<FFIDInquiryFormSubmitResult>;
|
|
@@ -1522,6 +1588,6 @@ interface FFIDInquiryFormProps {
|
|
|
1522
1588
|
interface FFIDInquiryFormPlaceholderContext {
|
|
1523
1589
|
category: string | null;
|
|
1524
1590
|
}
|
|
1525
|
-
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1591
|
+
declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, acquisitionSource, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
|
|
1526
1592
|
|
|
1527
|
-
export { type
|
|
1593
|
+
export { type FFIDInquiryFormSubmitData as $, type AnnouncementListResponse as A, type AnnouncementStatus as B, type AnnouncementType as C, EFFECTIVE_SUBSCRIPTION_STATUSES as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementBadge as G, FFIDAnnouncementList as H, type FFIDAnnouncementsError as I, type FFIDAnnouncementsErrorCode as J, type FFIDAnnouncementsServerResponse as K, type ListAnnouncementsOptions as L, type FFIDApiResponseMeta as M, type FFIDCacheConfig as N, type FFIDContextValue as O, type FFIDInquiryAcquisitionSource as P, type FFIDInquiryCategory as Q, type FFIDInquiryCategorySite2026 as R, FFIDInquiryForm as S, type TokenStore as T, type FFIDInquiryFormCategoryItem as U, type FFIDInquiryFormClassNames as V, type FFIDInquiryFormLegalLayout as W, type FFIDInquiryFormOrganization as X, type FFIDInquiryFormPlaceholderContext as Y, type FFIDInquiryFormPrefill as Z, type FFIDInquiryFormProps as _, type FFIDOAuthUserInfoSubscription as a, type FFIDInquiryFormSubmitResult as a0, type FFIDJwtClaims as a1, FFIDLoginButton as a2, type FFIDOAuthUserInfoMemberRole as a3, FFIDOrganizationSwitcher as a4, type FFIDSeatAssignmentClaim as a5, type FFIDSeatAssignmentStatus as a6, type FFIDSeatModel as a7, type FFIDServiceAccessDenialReason as a8, type FFIDServiceAccessFailPolicy as a9, FFIDSubscriptionBadge as aa, FFIDUserMenu as ab, FFID_INQUIRY_ACQUISITION_SOURCES as ac, FFID_INQUIRY_CATEGORIES as ad, FFID_INQUIRY_CATEGORIES_SITE_2026 as ae, type TokenData as af, type UseFFIDAnnouncementsOptions as ag, type UseFFIDAnnouncementsReturn as ah, createTokenStore as ai, isFFIDInquiryAcquisitionSource as aj, isFFIDInquiryCategorySite2026 as ak, useFFIDAnnouncements as al, type FFIDAnnouncementBadgeClassNames as am, type FFIDAnnouncementBadgeProps as an, type FFIDAnnouncementListClassNames as ao, type FFIDAnnouncementListProps as ap, type FFIDLoginButtonProps as aq, type FFIDOrganizationSwitcherClassNames as ar, type FFIDOrganizationSwitcherProps as as, type FFIDSubscriptionBadgeClassNames as at, type FFIDSubscriptionBadgeProps as au, type FFIDUserMenuClassNames as av, type FFIDUserMenuProps as aw, type FFIDPrompt as b, type FFIDConfig as c, type FFIDApiResponse as d, type FFIDSessionResponse as e, type FFIDSignOutResult as f, type FFIDError as g, type FFIDSubscriptionCheckResponse as h, type FFIDCheckServiceAccessParams as i, type FFIDServiceAccessDecision as j, type FFIDAnalyticsConfig as k, type FFIDVerifyAccessTokenOptions as l, type FFIDOAuthUserInfo as m, type FFIDInquiryCreateParams as n, type FFIDInquiryCreateResponse as o, type FFIDAuthMode as p, type FFIDLogger as q, type FFIDCacheAdapter as r, type FFIDUser as s, type FFIDOrganization as t, type FFIDSubscription as u, type FFIDSubscriptionContextValue as v, type FFIDAnnouncementsClientConfig as w, type FFIDAnnouncementsApiResponse as x, type FFIDAnnouncementsLogger as y, type Announcement as z };
|