@feelflow/ffid-sdk 3.1.0 → 4.1.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.
@@ -808,7 +808,7 @@ function createProfileMethods(deps) {
808
808
  }
809
809
 
810
810
  // src/client/version-check.ts
811
- var SDK_VERSION = "3.1.0";
811
+ var SDK_VERSION = "4.1.0";
812
812
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
813
813
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
814
814
  function sdkHeaders() {
@@ -4125,6 +4125,7 @@ var DEFAULT_CATEGORY_LABELS_JA = {
4125
4125
  };
4126
4126
  function defaultCategories() {
4127
4127
  return FFID_INQUIRY_CATEGORIES.map((value) => ({
4128
+ kind: "flat",
4128
4129
  value,
4129
4130
  label: DEFAULT_CATEGORY_LABELS_JA[value]
4130
4131
  }));
@@ -4134,7 +4135,7 @@ function warnOnGroupLabelConflicts(options) {
4134
4135
  const firstExplicitLabel = /* @__PURE__ */ new Map();
4135
4136
  const warnedGroups = /* @__PURE__ */ new Set();
4136
4137
  for (const opt of options) {
4137
- if (!opt.group || opt.groupLabel === void 0) continue;
4138
+ if (opt.kind !== "grouped") continue;
4138
4139
  const firstLabel = firstExplicitLabel.get(opt.group);
4139
4140
  if (firstLabel === void 0) {
4140
4141
  firstExplicitLabel.set(opt.group, opt.groupLabel);
@@ -4147,20 +4148,22 @@ function warnOnGroupLabelConflicts(options) {
4147
4148
  }
4148
4149
  }
4149
4150
  function renderCategoryOptions(options) {
4150
- const hasAnyGroup = options.some((o) => !!o.group);
4151
+ const hasAnyGroup = options.some((o) => o.kind === "grouped");
4151
4152
  if (!hasAnyGroup) {
4152
4153
  return options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value));
4153
4154
  }
4154
- const ungrouped = options.filter((o) => !o.group);
4155
+ const ungrouped = options.filter(
4156
+ (o) => o.kind === "flat"
4157
+ );
4155
4158
  const groupKeys = [];
4156
4159
  const groupLabelByKey = /* @__PURE__ */ new Map();
4157
4160
  const itemsByKey = /* @__PURE__ */ new Map();
4158
4161
  for (const opt of options) {
4159
- if (!opt.group) continue;
4162
+ if (opt.kind !== "grouped") continue;
4160
4163
  if (!itemsByKey.has(opt.group)) {
4161
4164
  groupKeys.push(opt.group);
4162
4165
  itemsByKey.set(opt.group, []);
4163
- groupLabelByKey.set(opt.group, opt.groupLabel ?? opt.group);
4166
+ groupLabelByKey.set(opt.group, opt.groupLabel);
4164
4167
  }
4165
4168
  itemsByKey.get(opt.group).push(opt);
4166
4169
  }
@@ -4183,7 +4186,7 @@ function FFIDInquiryForm({
4183
4186
  turnstileSlot,
4184
4187
  onSubmit,
4185
4188
  onChange,
4186
- separateLegalCheckboxes = false,
4189
+ legalLayout = "combined",
4187
4190
  messagePlaceholder,
4188
4191
  requireCategorySelection = false,
4189
4192
  unstyled = false,
@@ -4194,6 +4197,7 @@ function FFIDInquiryForm({
4194
4197
  const isAuth = mode === "authenticated";
4195
4198
  const isNameReadOnly = isAuth && !!prefill?.name;
4196
4199
  const isEmailReadOnly = isAuth;
4200
+ const usesSeparateLegalCheckboxes = legalLayout === "separate";
4197
4201
  const categoryOptions = react.useMemo(
4198
4202
  () => categories && categories.length > 0 ? categories : defaultCategories(),
4199
4203
  [categories]
@@ -4289,7 +4293,7 @@ function FFIDInquiryForm({
4289
4293
  async function handleSubmit(e) {
4290
4294
  e.preventDefault();
4291
4295
  setFormError(null);
4292
- if (separateLegalCheckboxes) {
4296
+ if (usesSeparateLegalCheckboxes) {
4293
4297
  const termsInvalid = !agreedTerms;
4294
4298
  const privacyInvalid = !agreedPrivacy;
4295
4299
  setAgreedTermsError(termsInvalid);
@@ -4551,7 +4555,7 @@ function FFIDInquiryForm({
4551
4555
  ]
4552
4556
  }
4553
4557
  ),
4554
- separateLegalCheckboxes ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: s(fieldsetStyle), className: classNames?.legalBlock, children: [
4558
+ usesSeparateLegalCheckboxes ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: s(fieldsetStyle), className: classNames?.legalBlock, children: [
4555
4559
  /* @__PURE__ */ jsxRuntime.jsxs("label", { style: s(legalRowFirst), className: classNames?.legalRow, children: [
4556
4560
  /* @__PURE__ */ jsxRuntime.jsx(
4557
4561
  "input",
@@ -806,7 +806,7 @@ function createProfileMethods(deps) {
806
806
  }
807
807
 
808
808
  // src/client/version-check.ts
809
- var SDK_VERSION = "3.1.0";
809
+ var SDK_VERSION = "4.1.0";
810
810
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
811
811
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
812
812
  function sdkHeaders() {
@@ -4123,6 +4123,7 @@ var DEFAULT_CATEGORY_LABELS_JA = {
4123
4123
  };
4124
4124
  function defaultCategories() {
4125
4125
  return FFID_INQUIRY_CATEGORIES.map((value) => ({
4126
+ kind: "flat",
4126
4127
  value,
4127
4128
  label: DEFAULT_CATEGORY_LABELS_JA[value]
4128
4129
  }));
@@ -4132,7 +4133,7 @@ function warnOnGroupLabelConflicts(options) {
4132
4133
  const firstExplicitLabel = /* @__PURE__ */ new Map();
4133
4134
  const warnedGroups = /* @__PURE__ */ new Set();
4134
4135
  for (const opt of options) {
4135
- if (!opt.group || opt.groupLabel === void 0) continue;
4136
+ if (opt.kind !== "grouped") continue;
4136
4137
  const firstLabel = firstExplicitLabel.get(opt.group);
4137
4138
  if (firstLabel === void 0) {
4138
4139
  firstExplicitLabel.set(opt.group, opt.groupLabel);
@@ -4145,20 +4146,22 @@ function warnOnGroupLabelConflicts(options) {
4145
4146
  }
4146
4147
  }
4147
4148
  function renderCategoryOptions(options) {
4148
- const hasAnyGroup = options.some((o) => !!o.group);
4149
+ const hasAnyGroup = options.some((o) => o.kind === "grouped");
4149
4150
  if (!hasAnyGroup) {
4150
4151
  return options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value));
4151
4152
  }
4152
- const ungrouped = options.filter((o) => !o.group);
4153
+ const ungrouped = options.filter(
4154
+ (o) => o.kind === "flat"
4155
+ );
4153
4156
  const groupKeys = [];
4154
4157
  const groupLabelByKey = /* @__PURE__ */ new Map();
4155
4158
  const itemsByKey = /* @__PURE__ */ new Map();
4156
4159
  for (const opt of options) {
4157
- if (!opt.group) continue;
4160
+ if (opt.kind !== "grouped") continue;
4158
4161
  if (!itemsByKey.has(opt.group)) {
4159
4162
  groupKeys.push(opt.group);
4160
4163
  itemsByKey.set(opt.group, []);
4161
- groupLabelByKey.set(opt.group, opt.groupLabel ?? opt.group);
4164
+ groupLabelByKey.set(opt.group, opt.groupLabel);
4162
4165
  }
4163
4166
  itemsByKey.get(opt.group).push(opt);
4164
4167
  }
@@ -4181,7 +4184,7 @@ function FFIDInquiryForm({
4181
4184
  turnstileSlot,
4182
4185
  onSubmit,
4183
4186
  onChange,
4184
- separateLegalCheckboxes = false,
4187
+ legalLayout = "combined",
4185
4188
  messagePlaceholder,
4186
4189
  requireCategorySelection = false,
4187
4190
  unstyled = false,
@@ -4192,6 +4195,7 @@ function FFIDInquiryForm({
4192
4195
  const isAuth = mode === "authenticated";
4193
4196
  const isNameReadOnly = isAuth && !!prefill?.name;
4194
4197
  const isEmailReadOnly = isAuth;
4198
+ const usesSeparateLegalCheckboxes = legalLayout === "separate";
4195
4199
  const categoryOptions = useMemo(
4196
4200
  () => categories && categories.length > 0 ? categories : defaultCategories(),
4197
4201
  [categories]
@@ -4287,7 +4291,7 @@ function FFIDInquiryForm({
4287
4291
  async function handleSubmit(e) {
4288
4292
  e.preventDefault();
4289
4293
  setFormError(null);
4290
- if (separateLegalCheckboxes) {
4294
+ if (usesSeparateLegalCheckboxes) {
4291
4295
  const termsInvalid = !agreedTerms;
4292
4296
  const privacyInvalid = !agreedPrivacy;
4293
4297
  setAgreedTermsError(termsInvalid);
@@ -4549,7 +4553,7 @@ function FFIDInquiryForm({
4549
4553
  ]
4550
4554
  }
4551
4555
  ),
4552
- separateLegalCheckboxes ? /* @__PURE__ */ jsxs("div", { style: s(fieldsetStyle), className: classNames?.legalBlock, children: [
4556
+ usesSeparateLegalCheckboxes ? /* @__PURE__ */ jsxs("div", { style: s(fieldsetStyle), className: classNames?.legalBlock, children: [
4553
4557
  /* @__PURE__ */ jsxs("label", { style: s(legalRowFirst), className: classNames?.legalRow, children: [
4554
4558
  /* @__PURE__ */ jsx(
4555
4559
  "input",
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkHZZQ2BX7_cjs = require('../chunk-HZZQ2BX7.cjs');
3
+ var chunkOYCNHBMG_cjs = require('../chunk-OYCNHBMG.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkHZZQ2BX7_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkOYCNHBMG_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkHZZQ2BX7_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkOYCNHBMG_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkHZZQ2BX7_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkOYCNHBMG_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkHZZQ2BX7_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkOYCNHBMG_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkHZZQ2BX7_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkOYCNHBMG_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkHZZQ2BX7_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkOYCNHBMG_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkHZZQ2BX7_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkOYCNHBMG_cjs.FFIDUserMenu; }
34
34
  });
@@ -1,3 +1,3 @@
1
- export { N as FFIDAnnouncementBadge, am as FFIDAnnouncementBadgeClassNames, an as FFIDAnnouncementBadgeProps, O as FFIDAnnouncementList, ao as FFIDAnnouncementListClassNames, ap as FFIDAnnouncementListProps, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormOrganization, _ as FFIDInquiryFormPlaceholderContext, $ as FFIDInquiryFormPrefill, a0 as FFIDInquiryFormProps, a1 as FFIDInquiryFormSubmitData, a2 as FFIDInquiryFormSubmitResult, a4 as FFIDLoginButton, aq as FFIDLoginButtonProps, aa as FFIDOrganizationSwitcher, ar as FFIDOrganizationSwitcherClassNames, as as FFIDOrganizationSwitcherProps, ad as FFIDSubscriptionBadge, at as FFIDSubscriptionBadgeClassNames, au as FFIDSubscriptionBadgeProps, af as FFIDUserMenu, av as FFIDUserMenuClassNames, aw as FFIDUserMenuProps } from '../index-COnReU8h.cjs';
1
+ export { N as FFIDAnnouncementBadge, an as FFIDAnnouncementBadgeClassNames, ao as FFIDAnnouncementBadgeProps, O as FFIDAnnouncementList, ap as FFIDAnnouncementListClassNames, aq as FFIDAnnouncementListProps, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormLegalLayout, _ as FFIDInquiryFormOrganization, $ as FFIDInquiryFormPlaceholderContext, a0 as FFIDInquiryFormPrefill, a1 as FFIDInquiryFormProps, a2 as FFIDInquiryFormSubmitData, a3 as FFIDInquiryFormSubmitResult, a5 as FFIDLoginButton, ar as FFIDLoginButtonProps, ab as FFIDOrganizationSwitcher, as as FFIDOrganizationSwitcherClassNames, at as FFIDOrganizationSwitcherProps, ae as FFIDSubscriptionBadge, au as FFIDSubscriptionBadgeClassNames, av as FFIDSubscriptionBadgeProps, ag as FFIDUserMenu, aw as FFIDUserMenuClassNames, ax as FFIDUserMenuProps } from '../index-Cn8-3hgb.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { N as FFIDAnnouncementBadge, am as FFIDAnnouncementBadgeClassNames, an as FFIDAnnouncementBadgeProps, O as FFIDAnnouncementList, ao as FFIDAnnouncementListClassNames, ap as FFIDAnnouncementListProps, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormOrganization, _ as FFIDInquiryFormPlaceholderContext, $ as FFIDInquiryFormPrefill, a0 as FFIDInquiryFormProps, a1 as FFIDInquiryFormSubmitData, a2 as FFIDInquiryFormSubmitResult, a4 as FFIDLoginButton, aq as FFIDLoginButtonProps, aa as FFIDOrganizationSwitcher, ar as FFIDOrganizationSwitcherClassNames, as as FFIDOrganizationSwitcherProps, ad as FFIDSubscriptionBadge, at as FFIDSubscriptionBadgeClassNames, au as FFIDSubscriptionBadgeProps, af as FFIDUserMenu, av as FFIDUserMenuClassNames, aw as FFIDUserMenuProps } from '../index-COnReU8h.js';
1
+ export { N as FFIDAnnouncementBadge, an as FFIDAnnouncementBadgeClassNames, ao as FFIDAnnouncementBadgeProps, O as FFIDAnnouncementList, ap as FFIDAnnouncementListClassNames, aq as FFIDAnnouncementListProps, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormLegalLayout, _ as FFIDInquiryFormOrganization, $ as FFIDInquiryFormPlaceholderContext, a0 as FFIDInquiryFormPrefill, a1 as FFIDInquiryFormProps, a2 as FFIDInquiryFormSubmitData, a3 as FFIDInquiryFormSubmitResult, a5 as FFIDLoginButton, ar as FFIDLoginButtonProps, ab as FFIDOrganizationSwitcher, as as FFIDOrganizationSwitcherClassNames, at as FFIDOrganizationSwitcherProps, ae as FFIDSubscriptionBadge, au as FFIDSubscriptionBadgeClassNames, av as FFIDSubscriptionBadgeProps, ag as FFIDUserMenu, aw as FFIDUserMenuClassNames, ax as FFIDUserMenuProps } from '../index-Cn8-3hgb.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-RRN3DTET.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-P7HSNT4U.js';
@@ -1062,8 +1062,6 @@ interface ContractWizardSubscriptionOptions {
1062
1062
  * propagated (no-op when `'login'` or omitted).
1063
1063
  */
1064
1064
  declare const SCREEN_HINT_SIGNUP: "signup";
1065
- /** `screen_hint=login` (no-op marker; default screen is login) */
1066
- declare const SCREEN_HINT_LOGIN: "login";
1067
1065
  /** Options for redirectToAuthorize */
1068
1066
  interface RedirectToAuthorizeOptions {
1069
1067
  /** Target organization ID — triggers org-scoped OAuth re-authorization */
@@ -1081,7 +1079,7 @@ interface RedirectToAuthorizeOptions {
1081
1079
  * of `/login` so the SDK contract (signup-screen intent) stays consistent
1082
1080
  * regardless of `authMode`.
1083
1081
  */
1084
- screenHint?: typeof SCREEN_HINT_SIGNUP | typeof SCREEN_HINT_LOGIN;
1082
+ screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
1085
1083
  }
1086
1084
 
1087
1085
  /**
@@ -1062,8 +1062,6 @@ interface ContractWizardSubscriptionOptions {
1062
1062
  * propagated (no-op when `'login'` or omitted).
1063
1063
  */
1064
1064
  declare const SCREEN_HINT_SIGNUP: "signup";
1065
- /** `screen_hint=login` (no-op marker; default screen is login) */
1066
- declare const SCREEN_HINT_LOGIN: "login";
1067
1065
  /** Options for redirectToAuthorize */
1068
1066
  interface RedirectToAuthorizeOptions {
1069
1067
  /** Target organization ID — triggers org-scoped OAuth re-authorization */
@@ -1081,7 +1079,7 @@ interface RedirectToAuthorizeOptions {
1081
1079
  * of `/login` so the SDK contract (signup-screen intent) stays consistent
1082
1080
  * regardless of `authMode`.
1083
1081
  */
1084
- screenHint?: typeof SCREEN_HINT_SIGNUP | typeof SCREEN_HINT_LOGIN;
1082
+ screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
1085
1083
  }
1086
1084
 
1087
1085
  /**
@@ -1203,13 +1203,24 @@ declare function FFIDAnnouncementList({ announcements, isLoading, className, cla
1203
1203
  * The single source of truth for consumers is `FFIDInquiryForm.tsx`.
1204
1204
  */
1205
1205
 
1206
- /** Category option rendered in the form select. */
1207
- interface FFIDInquiryFormCategoryItem {
1206
+ /** Legal agreement layout rendered by the inquiry form. */
1207
+ type FFIDInquiryFormLegalLayout = 'combined' | 'separate';
1208
+ /** Category option rendered as a top-level `<option>`. */
1209
+ interface FFIDInquiryFormFlatCategoryItem {
1210
+ kind: 'flat';
1208
1211
  value: string;
1209
1212
  label: string;
1210
- group?: string;
1211
- groupLabel?: string;
1212
1213
  }
1214
+ /** Category option rendered inside an `<optgroup>`. */
1215
+ interface FFIDInquiryFormGroupedCategoryItem {
1216
+ kind: 'grouped';
1217
+ value: string;
1218
+ label: string;
1219
+ group: string;
1220
+ groupLabel: string;
1221
+ }
1222
+ /** Category option rendered in the form select. */
1223
+ type FFIDInquiryFormCategoryItem = FFIDInquiryFormFlatCategoryItem | FFIDInquiryFormGroupedCategoryItem;
1213
1224
  /**
1214
1225
  * Per-slot `className` overrides. Every key is optional; when omitted,
1215
1226
  * the slot falls back to SDK defaults. Intended to be combined with
@@ -1374,11 +1385,11 @@ interface FFIDInquiryFormProps {
1374
1385
  */
1375
1386
  onChange?: (data: FFIDInquiryFormSubmitData) => void;
1376
1387
  /**
1377
- * When true, renders the legal agreement as two independent checkboxes
1378
- * (terms and privacy). Defaults to `false`, preserving the combined
1379
- * single-checkbox behavior from SDK ≤ 2.8.
1388
+ * Controls whether legal agreement is rendered as one combined checkbox
1389
+ * or two independent terms / privacy checkboxes. Defaults to `combined`,
1390
+ * preserving the single-checkbox behavior from SDK ≤ 3.x.
1380
1391
  */
1381
- separateLegalCheckboxes?: boolean;
1392
+ legalLayout?: FFIDInquiryFormLegalLayout;
1382
1393
  /**
1383
1394
  * Overrides the `<textarea>` placeholder. A plain string is applied
1384
1395
  * verbatim; a function is called with the currently selected category
@@ -1429,6 +1440,6 @@ interface FFIDInquiryFormProps {
1429
1440
  interface FFIDInquiryFormPlaceholderContext {
1430
1441
  category: string | null;
1431
1442
  }
1432
- 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;
1443
+ 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;
1433
1444
 
1434
- export { type FFIDInquiryFormPrefill as $, type FFIDOrganization as A, type FFIDSubscription as B, type FFIDSubscriptionContextValue as C, type FFIDAnnouncementsClientConfig as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type FFIDAnnouncementsApiResponse as G, type AnnouncementListResponse as H, type FFIDAnnouncementsLogger as I, type Announcement as J, type AnnouncementStatus as K, type ListAnnouncementsOptions as L, type AnnouncementType as M, FFIDAnnouncementBadge as N, FFIDAnnouncementList as O, type FFIDAnnouncementsError as P, type FFIDAnnouncementsErrorCode as Q, type FFIDAnnouncementsServerResponse as R, type FFIDCacheConfig as S, type FFIDContextValue as T, type FFIDInquiryCategory as U, type FFIDInquiryCategorySite2026 as V, FFIDInquiryForm as W, type FFIDInquiryFormCategoryItem as X, type FFIDInquiryFormClassNames as Y, type FFIDInquiryFormOrganization as Z, type FFIDInquiryFormPlaceholderContext as _, type FFIDConfig as a, type FFIDInquiryFormProps as a0, type FFIDInquiryFormSubmitData as a1, type FFIDInquiryFormSubmitResult as a2, type FFIDJwtClaims as a3, FFIDLoginButton as a4, type FFIDMemberStatus as a5, type FFIDOAuthTokenResponse as a6, type FFIDOAuthUserInfoMemberRole as a7, type FFIDOAuthUserInfoSubscription as a8, type FFIDOrganizationMember as a9, FFIDOrganizationSwitcher as aa, type FFIDRedirectErrorCode as ab, type FFIDSeatModel as ac, FFIDSubscriptionBadge as ad, type FFIDTokenIntrospectionResponse as ae, FFIDUserMenu as af, FFID_INQUIRY_CATEGORIES as ag, FFID_INQUIRY_CATEGORIES_SITE_2026 as ah, type UseFFIDAnnouncementsOptions as ai, type UseFFIDAnnouncementsReturn 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 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 FFIDProfileCallOptions as k, type FFIDUserProfile as l, type FFIDUpdateUserProfileRequest as m, type FFIDAnalyticsConfig as n, type FFIDCreateCheckoutParams as o, type FFIDCheckoutSessionResponse as p, type FFIDCreatePortalParams as q, type FFIDPortalSessionResponse as r, type FFIDVerifyAccessTokenOptions as s, type FFIDOAuthUserInfo as t, type FFIDInquiryCreateParams as u, type FFIDInquiryCreateResponse as v, type FFIDAuthMode as w, type FFIDLogger as x, type FFIDCacheAdapter as y, type FFIDUser as z };
1445
+ export { type FFIDInquiryFormPlaceholderContext as $, type FFIDOrganization as A, type FFIDSubscription as B, type FFIDSubscriptionContextValue as C, type FFIDAnnouncementsClientConfig as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type FFIDAnnouncementsApiResponse as G, type AnnouncementListResponse as H, type FFIDAnnouncementsLogger as I, type Announcement as J, type AnnouncementStatus as K, type ListAnnouncementsOptions as L, type AnnouncementType as M, FFIDAnnouncementBadge as N, FFIDAnnouncementList as O, type FFIDAnnouncementsError as P, type FFIDAnnouncementsErrorCode as Q, type FFIDAnnouncementsServerResponse as R, type FFIDCacheConfig as S, type FFIDContextValue as T, type FFIDInquiryCategory as U, type FFIDInquiryCategorySite2026 as V, FFIDInquiryForm as W, type FFIDInquiryFormCategoryItem as X, type FFIDInquiryFormClassNames as Y, type FFIDInquiryFormLegalLayout as Z, type FFIDInquiryFormOrganization as _, type FFIDConfig as a, type FFIDInquiryFormPrefill as a0, type FFIDInquiryFormProps as a1, type FFIDInquiryFormSubmitData as a2, type FFIDInquiryFormSubmitResult as a3, type FFIDJwtClaims as a4, FFIDLoginButton as a5, type FFIDMemberStatus as a6, type FFIDOAuthTokenResponse as a7, type FFIDOAuthUserInfoMemberRole as a8, type FFIDOAuthUserInfoSubscription as a9, type FFIDOrganizationMember as aa, FFIDOrganizationSwitcher as ab, type FFIDRedirectErrorCode as ac, type FFIDSeatModel as ad, FFIDSubscriptionBadge as ae, type FFIDTokenIntrospectionResponse as af, FFIDUserMenu as ag, FFID_INQUIRY_CATEGORIES as ah, FFID_INQUIRY_CATEGORIES_SITE_2026 as ai, type UseFFIDAnnouncementsOptions as aj, type UseFFIDAnnouncementsReturn as ak, isFFIDInquiryCategorySite2026 as al, useFFIDAnnouncements as am, type FFIDAnnouncementBadgeClassNames as an, type FFIDAnnouncementBadgeProps as ao, type FFIDAnnouncementListClassNames as ap, type FFIDAnnouncementListProps as aq, type FFIDLoginButtonProps as ar, type FFIDOrganizationSwitcherClassNames as as, type FFIDOrganizationSwitcherProps as at, type FFIDSubscriptionBadgeClassNames as au, type FFIDSubscriptionBadgeProps as av, type FFIDUserMenuClassNames as aw, type FFIDUserMenuProps as ax, 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 FFIDProfileCallOptions as k, type FFIDUserProfile as l, type FFIDUpdateUserProfileRequest as m, type FFIDAnalyticsConfig as n, type FFIDCreateCheckoutParams as o, type FFIDCheckoutSessionResponse as p, type FFIDCreatePortalParams as q, type FFIDPortalSessionResponse as r, type FFIDVerifyAccessTokenOptions as s, type FFIDOAuthUserInfo as t, type FFIDInquiryCreateParams as u, type FFIDInquiryCreateResponse as v, type FFIDAuthMode as w, type FFIDLogger as x, type FFIDCacheAdapter as y, type FFIDUser as z };
@@ -1203,13 +1203,24 @@ declare function FFIDAnnouncementList({ announcements, isLoading, className, cla
1203
1203
  * The single source of truth for consumers is `FFIDInquiryForm.tsx`.
1204
1204
  */
1205
1205
 
1206
- /** Category option rendered in the form select. */
1207
- interface FFIDInquiryFormCategoryItem {
1206
+ /** Legal agreement layout rendered by the inquiry form. */
1207
+ type FFIDInquiryFormLegalLayout = 'combined' | 'separate';
1208
+ /** Category option rendered as a top-level `<option>`. */
1209
+ interface FFIDInquiryFormFlatCategoryItem {
1210
+ kind: 'flat';
1208
1211
  value: string;
1209
1212
  label: string;
1210
- group?: string;
1211
- groupLabel?: string;
1212
1213
  }
1214
+ /** Category option rendered inside an `<optgroup>`. */
1215
+ interface FFIDInquiryFormGroupedCategoryItem {
1216
+ kind: 'grouped';
1217
+ value: string;
1218
+ label: string;
1219
+ group: string;
1220
+ groupLabel: string;
1221
+ }
1222
+ /** Category option rendered in the form select. */
1223
+ type FFIDInquiryFormCategoryItem = FFIDInquiryFormFlatCategoryItem | FFIDInquiryFormGroupedCategoryItem;
1213
1224
  /**
1214
1225
  * Per-slot `className` overrides. Every key is optional; when omitted,
1215
1226
  * the slot falls back to SDK defaults. Intended to be combined with
@@ -1374,11 +1385,11 @@ interface FFIDInquiryFormProps {
1374
1385
  */
1375
1386
  onChange?: (data: FFIDInquiryFormSubmitData) => void;
1376
1387
  /**
1377
- * When true, renders the legal agreement as two independent checkboxes
1378
- * (terms and privacy). Defaults to `false`, preserving the combined
1379
- * single-checkbox behavior from SDK ≤ 2.8.
1388
+ * Controls whether legal agreement is rendered as one combined checkbox
1389
+ * or two independent terms / privacy checkboxes. Defaults to `combined`,
1390
+ * preserving the single-checkbox behavior from SDK ≤ 3.x.
1380
1391
  */
1381
- separateLegalCheckboxes?: boolean;
1392
+ legalLayout?: FFIDInquiryFormLegalLayout;
1382
1393
  /**
1383
1394
  * Overrides the `<textarea>` placeholder. A plain string is applied
1384
1395
  * verbatim; a function is called with the currently selected category
@@ -1429,6 +1440,6 @@ interface FFIDInquiryFormProps {
1429
1440
  interface FFIDInquiryFormPlaceholderContext {
1430
1441
  category: string | null;
1431
1442
  }
1432
- 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;
1443
+ 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;
1433
1444
 
1434
- export { type FFIDInquiryFormPrefill as $, type FFIDOrganization as A, type FFIDSubscription as B, type FFIDSubscriptionContextValue as C, type FFIDAnnouncementsClientConfig as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type FFIDAnnouncementsApiResponse as G, type AnnouncementListResponse as H, type FFIDAnnouncementsLogger as I, type Announcement as J, type AnnouncementStatus as K, type ListAnnouncementsOptions as L, type AnnouncementType as M, FFIDAnnouncementBadge as N, FFIDAnnouncementList as O, type FFIDAnnouncementsError as P, type FFIDAnnouncementsErrorCode as Q, type FFIDAnnouncementsServerResponse as R, type FFIDCacheConfig as S, type FFIDContextValue as T, type FFIDInquiryCategory as U, type FFIDInquiryCategorySite2026 as V, FFIDInquiryForm as W, type FFIDInquiryFormCategoryItem as X, type FFIDInquiryFormClassNames as Y, type FFIDInquiryFormOrganization as Z, type FFIDInquiryFormPlaceholderContext as _, type FFIDConfig as a, type FFIDInquiryFormProps as a0, type FFIDInquiryFormSubmitData as a1, type FFIDInquiryFormSubmitResult as a2, type FFIDJwtClaims as a3, FFIDLoginButton as a4, type FFIDMemberStatus as a5, type FFIDOAuthTokenResponse as a6, type FFIDOAuthUserInfoMemberRole as a7, type FFIDOAuthUserInfoSubscription as a8, type FFIDOrganizationMember as a9, FFIDOrganizationSwitcher as aa, type FFIDRedirectErrorCode as ab, type FFIDSeatModel as ac, FFIDSubscriptionBadge as ad, type FFIDTokenIntrospectionResponse as ae, FFIDUserMenu as af, FFID_INQUIRY_CATEGORIES as ag, FFID_INQUIRY_CATEGORIES_SITE_2026 as ah, type UseFFIDAnnouncementsOptions as ai, type UseFFIDAnnouncementsReturn 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 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 FFIDProfileCallOptions as k, type FFIDUserProfile as l, type FFIDUpdateUserProfileRequest as m, type FFIDAnalyticsConfig as n, type FFIDCreateCheckoutParams as o, type FFIDCheckoutSessionResponse as p, type FFIDCreatePortalParams as q, type FFIDPortalSessionResponse as r, type FFIDVerifyAccessTokenOptions as s, type FFIDOAuthUserInfo as t, type FFIDInquiryCreateParams as u, type FFIDInquiryCreateResponse as v, type FFIDAuthMode as w, type FFIDLogger as x, type FFIDCacheAdapter as y, type FFIDUser as z };
1445
+ export { type FFIDInquiryFormPlaceholderContext as $, type FFIDOrganization as A, type FFIDSubscription as B, type FFIDSubscriptionContextValue as C, type FFIDAnnouncementsClientConfig as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, type FFIDAnnouncementsApiResponse as G, type AnnouncementListResponse as H, type FFIDAnnouncementsLogger as I, type Announcement as J, type AnnouncementStatus as K, type ListAnnouncementsOptions as L, type AnnouncementType as M, FFIDAnnouncementBadge as N, FFIDAnnouncementList as O, type FFIDAnnouncementsError as P, type FFIDAnnouncementsErrorCode as Q, type FFIDAnnouncementsServerResponse as R, type FFIDCacheConfig as S, type FFIDContextValue as T, type FFIDInquiryCategory as U, type FFIDInquiryCategorySite2026 as V, FFIDInquiryForm as W, type FFIDInquiryFormCategoryItem as X, type FFIDInquiryFormClassNames as Y, type FFIDInquiryFormLegalLayout as Z, type FFIDInquiryFormOrganization as _, type FFIDConfig as a, type FFIDInquiryFormPrefill as a0, type FFIDInquiryFormProps as a1, type FFIDInquiryFormSubmitData as a2, type FFIDInquiryFormSubmitResult as a3, type FFIDJwtClaims as a4, FFIDLoginButton as a5, type FFIDMemberStatus as a6, type FFIDOAuthTokenResponse as a7, type FFIDOAuthUserInfoMemberRole as a8, type FFIDOAuthUserInfoSubscription as a9, type FFIDOrganizationMember as aa, FFIDOrganizationSwitcher as ab, type FFIDRedirectErrorCode as ac, type FFIDSeatModel as ad, FFIDSubscriptionBadge as ae, type FFIDTokenIntrospectionResponse as af, FFIDUserMenu as ag, FFID_INQUIRY_CATEGORIES as ah, FFID_INQUIRY_CATEGORIES_SITE_2026 as ai, type UseFFIDAnnouncementsOptions as aj, type UseFFIDAnnouncementsReturn as ak, isFFIDInquiryCategorySite2026 as al, useFFIDAnnouncements as am, type FFIDAnnouncementBadgeClassNames as an, type FFIDAnnouncementBadgeProps as ao, type FFIDAnnouncementListClassNames as ap, type FFIDAnnouncementListProps as aq, type FFIDLoginButtonProps as ar, type FFIDOrganizationSwitcherClassNames as as, type FFIDOrganizationSwitcherProps as at, type FFIDSubscriptionBadgeClassNames as au, type FFIDSubscriptionBadgeProps as av, type FFIDUserMenuClassNames as aw, type FFIDUserMenuProps as ax, 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 FFIDProfileCallOptions as k, type FFIDUserProfile as l, type FFIDUpdateUserProfileRequest as m, type FFIDAnalyticsConfig as n, type FFIDCreateCheckoutParams as o, type FFIDCheckoutSessionResponse as p, type FFIDCreatePortalParams as q, type FFIDPortalSessionResponse as r, type FFIDVerifyAccessTokenOptions as s, type FFIDOAuthUserInfo as t, type FFIDInquiryCreateParams as u, type FFIDInquiryCreateResponse as v, type FFIDAuthMode as w, type FFIDLogger as x, type FFIDCacheAdapter as y, type FFIDUser as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHZZQ2BX7_cjs = require('./chunk-HZZQ2BX7.cjs');
3
+ var chunkOYCNHBMG_cjs = require('./chunk-OYCNHBMG.cjs');
4
4
  var react = require('react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
@@ -53,8 +53,8 @@ function defaultRedirect(url) {
53
53
  }
54
54
  function useRequireActiveSubscription(options) {
55
55
  const { redirectTo, allowGrace = true, onRedirect } = options;
56
- const { isLoading, error } = chunkHZZQ2BX7_cjs.useFFIDContext();
57
- const { effectiveStatus, isBlocked, isGrace } = chunkHZZQ2BX7_cjs.useSubscription();
56
+ const { isLoading, error } = chunkOYCNHBMG_cjs.useFFIDContext();
57
+ const { effectiveStatus, isBlocked, isGrace } = chunkOYCNHBMG_cjs.useSubscription();
58
58
  const hasFetchError = error !== null && effectiveStatus === null;
59
59
  const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
60
60
  react.useEffect(() => {
@@ -75,7 +75,7 @@ function useRequireActiveSubscription(options) {
75
75
  }
76
76
  function withFFIDAuth(Component, options = {}) {
77
77
  const WrappedComponent = (props) => {
78
- const { isLoading, isAuthenticated, login } = chunkHZZQ2BX7_cjs.useFFIDContext();
78
+ const { isLoading, isAuthenticated, login } = chunkOYCNHBMG_cjs.useFFIDContext();
79
79
  const hasRedirected = react.useRef(false);
80
80
  react.useEffect(() => {
81
81
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -104,115 +104,115 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
104
104
 
105
105
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
106
106
  enumerable: true,
107
- get: function () { return chunkHZZQ2BX7_cjs.DEFAULT_API_BASE_URL; }
107
+ get: function () { return chunkOYCNHBMG_cjs.DEFAULT_API_BASE_URL; }
108
108
  });
109
109
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
110
110
  enumerable: true,
111
- get: function () { return chunkHZZQ2BX7_cjs.DEFAULT_OAUTH_SCOPES; }
111
+ get: function () { return chunkOYCNHBMG_cjs.DEFAULT_OAUTH_SCOPES; }
112
112
  });
113
113
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
114
114
  enumerable: true,
115
- get: function () { return chunkHZZQ2BX7_cjs.FFIDAnnouncementBadge; }
115
+ get: function () { return chunkOYCNHBMG_cjs.FFIDAnnouncementBadge; }
116
116
  });
117
117
  Object.defineProperty(exports, "FFIDAnnouncementList", {
118
118
  enumerable: true,
119
- get: function () { return chunkHZZQ2BX7_cjs.FFIDAnnouncementList; }
119
+ get: function () { return chunkOYCNHBMG_cjs.FFIDAnnouncementList; }
120
120
  });
121
121
  Object.defineProperty(exports, "FFIDInquiryForm", {
122
122
  enumerable: true,
123
- get: function () { return chunkHZZQ2BX7_cjs.FFIDInquiryForm; }
123
+ get: function () { return chunkOYCNHBMG_cjs.FFIDInquiryForm; }
124
124
  });
125
125
  Object.defineProperty(exports, "FFIDLoginButton", {
126
126
  enumerable: true,
127
- get: function () { return chunkHZZQ2BX7_cjs.FFIDLoginButton; }
127
+ get: function () { return chunkOYCNHBMG_cjs.FFIDLoginButton; }
128
128
  });
129
129
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
130
130
  enumerable: true,
131
- get: function () { return chunkHZZQ2BX7_cjs.FFIDOrganizationSwitcher; }
131
+ get: function () { return chunkOYCNHBMG_cjs.FFIDOrganizationSwitcher; }
132
132
  });
133
133
  Object.defineProperty(exports, "FFIDProvider", {
134
134
  enumerable: true,
135
- get: function () { return chunkHZZQ2BX7_cjs.FFIDProvider; }
135
+ get: function () { return chunkOYCNHBMG_cjs.FFIDProvider; }
136
136
  });
137
137
  Object.defineProperty(exports, "FFIDSDKError", {
138
138
  enumerable: true,
139
- get: function () { return chunkHZZQ2BX7_cjs.FFIDSDKError; }
139
+ get: function () { return chunkOYCNHBMG_cjs.FFIDSDKError; }
140
140
  });
141
141
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
142
142
  enumerable: true,
143
- get: function () { return chunkHZZQ2BX7_cjs.FFIDSubscriptionBadge; }
143
+ get: function () { return chunkOYCNHBMG_cjs.FFIDSubscriptionBadge; }
144
144
  });
145
145
  Object.defineProperty(exports, "FFIDUserMenu", {
146
146
  enumerable: true,
147
- get: function () { return chunkHZZQ2BX7_cjs.FFIDUserMenu; }
147
+ get: function () { return chunkOYCNHBMG_cjs.FFIDUserMenu; }
148
148
  });
149
149
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
150
150
  enumerable: true,
151
- get: function () { return chunkHZZQ2BX7_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
151
+ get: function () { return chunkOYCNHBMG_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
152
152
  });
153
153
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
154
154
  enumerable: true,
155
- get: function () { return chunkHZZQ2BX7_cjs.FFID_INQUIRY_CATEGORIES; }
155
+ get: function () { return chunkOYCNHBMG_cjs.FFID_INQUIRY_CATEGORIES; }
156
156
  });
157
157
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
158
158
  enumerable: true,
159
- get: function () { return chunkHZZQ2BX7_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
159
+ get: function () { return chunkOYCNHBMG_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
160
160
  });
161
161
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
162
162
  enumerable: true,
163
- get: function () { return chunkHZZQ2BX7_cjs.computeEffectiveStatusFromSession; }
163
+ get: function () { return chunkOYCNHBMG_cjs.computeEffectiveStatusFromSession; }
164
164
  });
165
165
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
166
166
  enumerable: true,
167
- get: function () { return chunkHZZQ2BX7_cjs.createFFIDAnnouncementsClient; }
167
+ get: function () { return chunkOYCNHBMG_cjs.createFFIDAnnouncementsClient; }
168
168
  });
169
169
  Object.defineProperty(exports, "createFFIDClient", {
170
170
  enumerable: true,
171
- get: function () { return chunkHZZQ2BX7_cjs.createFFIDClient; }
171
+ get: function () { return chunkOYCNHBMG_cjs.createFFIDClient; }
172
172
  });
173
173
  Object.defineProperty(exports, "createTokenStore", {
174
174
  enumerable: true,
175
- get: function () { return chunkHZZQ2BX7_cjs.createTokenStore; }
175
+ get: function () { return chunkOYCNHBMG_cjs.createTokenStore; }
176
176
  });
177
177
  Object.defineProperty(exports, "generateCodeChallenge", {
178
178
  enumerable: true,
179
- get: function () { return chunkHZZQ2BX7_cjs.generateCodeChallenge; }
179
+ get: function () { return chunkOYCNHBMG_cjs.generateCodeChallenge; }
180
180
  });
181
181
  Object.defineProperty(exports, "generateCodeVerifier", {
182
182
  enumerable: true,
183
- get: function () { return chunkHZZQ2BX7_cjs.generateCodeVerifier; }
183
+ get: function () { return chunkOYCNHBMG_cjs.generateCodeVerifier; }
184
184
  });
185
185
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
186
186
  enumerable: true,
187
- get: function () { return chunkHZZQ2BX7_cjs.isFFIDInquiryCategorySite2026; }
187
+ get: function () { return chunkOYCNHBMG_cjs.isFFIDInquiryCategorySite2026; }
188
188
  });
189
189
  Object.defineProperty(exports, "normalizeRedirectUri", {
190
190
  enumerable: true,
191
- get: function () { return chunkHZZQ2BX7_cjs.normalizeRedirectUri; }
191
+ get: function () { return chunkOYCNHBMG_cjs.normalizeRedirectUri; }
192
192
  });
193
193
  Object.defineProperty(exports, "retrieveCodeVerifier", {
194
194
  enumerable: true,
195
- get: function () { return chunkHZZQ2BX7_cjs.retrieveCodeVerifier; }
195
+ get: function () { return chunkOYCNHBMG_cjs.retrieveCodeVerifier; }
196
196
  });
197
197
  Object.defineProperty(exports, "storeCodeVerifier", {
198
198
  enumerable: true,
199
- get: function () { return chunkHZZQ2BX7_cjs.storeCodeVerifier; }
199
+ get: function () { return chunkOYCNHBMG_cjs.storeCodeVerifier; }
200
200
  });
201
201
  Object.defineProperty(exports, "useFFID", {
202
202
  enumerable: true,
203
- get: function () { return chunkHZZQ2BX7_cjs.useFFID; }
203
+ get: function () { return chunkOYCNHBMG_cjs.useFFID; }
204
204
  });
205
205
  Object.defineProperty(exports, "useFFIDAnnouncements", {
206
206
  enumerable: true,
207
- get: function () { return chunkHZZQ2BX7_cjs.useFFIDAnnouncements; }
207
+ get: function () { return chunkOYCNHBMG_cjs.useFFIDAnnouncements; }
208
208
  });
209
209
  Object.defineProperty(exports, "useSubscription", {
210
210
  enumerable: true,
211
- get: function () { return chunkHZZQ2BX7_cjs.useSubscription; }
211
+ get: function () { return chunkOYCNHBMG_cjs.useSubscription; }
212
212
  });
213
213
  Object.defineProperty(exports, "withSubscription", {
214
214
  enumerable: true,
215
- get: function () { return chunkHZZQ2BX7_cjs.withSubscription; }
215
+ get: function () { return chunkOYCNHBMG_cjs.withSubscription; }
216
216
  });
217
217
  exports.FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS;
218
218
  exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDProfileCallOptions, l as FFIDUserProfile, m as FFIDUpdateUserProfileRequest, n as FFIDAnalyticsConfig, o as FFIDCreateCheckoutParams, p as FFIDCheckoutSessionResponse, q as FFIDCreatePortalParams, r as FFIDPortalSessionResponse, s as FFIDVerifyAccessTokenOptions, t as FFIDOAuthUserInfo, u as FFIDInquiryCreateParams, v as FFIDInquiryCreateResponse, w as FFIDAuthMode, x as FFIDLogger, y as FFIDCacheAdapter, z as FFIDUser, A as FFIDOrganization, B as FFIDSubscription, C as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, D as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, G as FFIDAnnouncementsApiResponse, H as AnnouncementListResponse, I as FFIDAnnouncementsLogger } from './index-COnReU8h.cjs';
2
- export { J as Announcement, K as AnnouncementStatus, M as AnnouncementType, N as FFIDAnnouncementBadge, O as FFIDAnnouncementList, P as FFIDAnnouncementsError, Q as FFIDAnnouncementsErrorCode, R as FFIDAnnouncementsServerResponse, S as FFIDCacheConfig, T as FFIDContextValue, U as FFIDInquiryCategory, V as FFIDInquiryCategorySite2026, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormOrganization, _ as FFIDInquiryFormPlaceholderContext, $ as FFIDInquiryFormPrefill, a0 as FFIDInquiryFormProps, a1 as FFIDInquiryFormSubmitData, a2 as FFIDInquiryFormSubmitResult, a3 as FFIDJwtClaims, a4 as FFIDLoginButton, a5 as FFIDMemberStatus, a6 as FFIDOAuthTokenResponse, a7 as FFIDOAuthUserInfoMemberRole, a8 as FFIDOAuthUserInfoSubscription, a9 as FFIDOrganizationMember, aa as FFIDOrganizationSwitcher, ab as FFIDRedirectErrorCode, ac as FFIDSeatModel, ad as FFIDSubscriptionBadge, ae as FFIDTokenIntrospectionResponse, af as FFIDUserMenu, ag as FFID_INQUIRY_CATEGORIES, ah as FFID_INQUIRY_CATEGORIES_SITE_2026, ai as UseFFIDAnnouncementsOptions, aj as UseFFIDAnnouncementsReturn, ak as isFFIDInquiryCategorySite2026, al as useFFIDAnnouncements } from './index-COnReU8h.cjs';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDProfileCallOptions, l as FFIDUserProfile, m as FFIDUpdateUserProfileRequest, n as FFIDAnalyticsConfig, o as FFIDCreateCheckoutParams, p as FFIDCheckoutSessionResponse, q as FFIDCreatePortalParams, r as FFIDPortalSessionResponse, s as FFIDVerifyAccessTokenOptions, t as FFIDOAuthUserInfo, u as FFIDInquiryCreateParams, v as FFIDInquiryCreateResponse, w as FFIDAuthMode, x as FFIDLogger, y as FFIDCacheAdapter, z as FFIDUser, A as FFIDOrganization, B as FFIDSubscription, C as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, D as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, G as FFIDAnnouncementsApiResponse, H as AnnouncementListResponse, I as FFIDAnnouncementsLogger } from './index-Cn8-3hgb.cjs';
2
+ export { J as Announcement, K as AnnouncementStatus, M as AnnouncementType, N as FFIDAnnouncementBadge, O as FFIDAnnouncementList, P as FFIDAnnouncementsError, Q as FFIDAnnouncementsErrorCode, R as FFIDAnnouncementsServerResponse, S as FFIDCacheConfig, T as FFIDContextValue, U as FFIDInquiryCategory, V as FFIDInquiryCategorySite2026, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormLegalLayout, _ as FFIDInquiryFormOrganization, $ as FFIDInquiryFormPlaceholderContext, a0 as FFIDInquiryFormPrefill, a1 as FFIDInquiryFormProps, a2 as FFIDInquiryFormSubmitData, a3 as FFIDInquiryFormSubmitResult, a4 as FFIDJwtClaims, a5 as FFIDLoginButton, a6 as FFIDMemberStatus, a7 as FFIDOAuthTokenResponse, a8 as FFIDOAuthUserInfoMemberRole, a9 as FFIDOAuthUserInfoSubscription, aa as FFIDOrganizationMember, ab as FFIDOrganizationSwitcher, ac as FFIDRedirectErrorCode, ad as FFIDSeatModel, ae as FFIDSubscriptionBadge, af as FFIDTokenIntrospectionResponse, ag as FFIDUserMenu, ah as FFID_INQUIRY_CATEGORIES, ai as FFID_INQUIRY_CATEGORIES_SITE_2026, aj as UseFFIDAnnouncementsOptions, ak as UseFFIDAnnouncementsReturn, al as isFFIDInquiryCategorySite2026, am as useFFIDAnnouncements } from './index-Cn8-3hgb.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode, ComponentType, FC } from 'react';
5
5
 
@@ -499,8 +499,6 @@ interface ContractWizardSubscriptionOptions {
499
499
  * propagated (no-op when `'login'` or omitted).
500
500
  */
501
501
  declare const SCREEN_HINT_SIGNUP: "signup";
502
- /** `screen_hint=login` (no-op marker; default screen is login) */
503
- declare const SCREEN_HINT_LOGIN: "login";
504
502
  /** Options for redirectToAuthorize */
505
503
  interface RedirectToAuthorizeOptions {
506
504
  /** Target organization ID — triggers org-scoped OAuth re-authorization */
@@ -518,7 +516,7 @@ interface RedirectToAuthorizeOptions {
518
516
  * of `/login` so the SDK contract (signup-screen intent) stays consistent
519
517
  * regardless of `authMode`.
520
518
  */
521
- screenHint?: typeof SCREEN_HINT_SIGNUP | typeof SCREEN_HINT_LOGIN;
519
+ screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
522
520
  }
523
521
 
524
522
  /** Creates an FFID API client instance */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDProfileCallOptions, l as FFIDUserProfile, m as FFIDUpdateUserProfileRequest, n as FFIDAnalyticsConfig, o as FFIDCreateCheckoutParams, p as FFIDCheckoutSessionResponse, q as FFIDCreatePortalParams, r as FFIDPortalSessionResponse, s as FFIDVerifyAccessTokenOptions, t as FFIDOAuthUserInfo, u as FFIDInquiryCreateParams, v as FFIDInquiryCreateResponse, w as FFIDAuthMode, x as FFIDLogger, y as FFIDCacheAdapter, z as FFIDUser, A as FFIDOrganization, B as FFIDSubscription, C as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, D as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, G as FFIDAnnouncementsApiResponse, H as AnnouncementListResponse, I as FFIDAnnouncementsLogger } from './index-COnReU8h.js';
2
- export { J as Announcement, K as AnnouncementStatus, M as AnnouncementType, N as FFIDAnnouncementBadge, O as FFIDAnnouncementList, P as FFIDAnnouncementsError, Q as FFIDAnnouncementsErrorCode, R as FFIDAnnouncementsServerResponse, S as FFIDCacheConfig, T as FFIDContextValue, U as FFIDInquiryCategory, V as FFIDInquiryCategorySite2026, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormOrganization, _ as FFIDInquiryFormPlaceholderContext, $ as FFIDInquiryFormPrefill, a0 as FFIDInquiryFormProps, a1 as FFIDInquiryFormSubmitData, a2 as FFIDInquiryFormSubmitResult, a3 as FFIDJwtClaims, a4 as FFIDLoginButton, a5 as FFIDMemberStatus, a6 as FFIDOAuthTokenResponse, a7 as FFIDOAuthUserInfoMemberRole, a8 as FFIDOAuthUserInfoSubscription, a9 as FFIDOrganizationMember, aa as FFIDOrganizationSwitcher, ab as FFIDRedirectErrorCode, ac as FFIDSeatModel, ad as FFIDSubscriptionBadge, ae as FFIDTokenIntrospectionResponse, af as FFIDUserMenu, ag as FFID_INQUIRY_CATEGORIES, ah as FFID_INQUIRY_CATEGORIES_SITE_2026, ai as UseFFIDAnnouncementsOptions, aj as UseFFIDAnnouncementsReturn, ak as isFFIDInquiryCategorySite2026, al as useFFIDAnnouncements } from './index-COnReU8h.js';
1
+ import { F as FFIDSubscriptionStatus, a as FFIDConfig, b as FFIDApiResponse, c as FFIDSessionResponse, d as FFIDRedirectResult, e as FFIDError, f as FFIDSubscriptionCheckResponse, g as FFIDListMembersResponse, h as FFIDMemberRole, i as FFIDUpdateMemberRoleResponse, j as FFIDRemoveMemberResponse, k as FFIDProfileCallOptions, l as FFIDUserProfile, m as FFIDUpdateUserProfileRequest, n as FFIDAnalyticsConfig, o as FFIDCreateCheckoutParams, p as FFIDCheckoutSessionResponse, q as FFIDCreatePortalParams, r as FFIDPortalSessionResponse, s as FFIDVerifyAccessTokenOptions, t as FFIDOAuthUserInfo, u as FFIDInquiryCreateParams, v as FFIDInquiryCreateResponse, w as FFIDAuthMode, x as FFIDLogger, y as FFIDCacheAdapter, z as FFIDUser, A as FFIDOrganization, B as FFIDSubscription, C as FFIDSubscriptionContextValue, E as EffectiveSubscriptionStatus, D as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, G as FFIDAnnouncementsApiResponse, H as AnnouncementListResponse, I as FFIDAnnouncementsLogger } from './index-Cn8-3hgb.js';
2
+ export { J as Announcement, K as AnnouncementStatus, M as AnnouncementType, N as FFIDAnnouncementBadge, O as FFIDAnnouncementList, P as FFIDAnnouncementsError, Q as FFIDAnnouncementsErrorCode, R as FFIDAnnouncementsServerResponse, S as FFIDCacheConfig, T as FFIDContextValue, U as FFIDInquiryCategory, V as FFIDInquiryCategorySite2026, W as FFIDInquiryForm, X as FFIDInquiryFormCategoryItem, Y as FFIDInquiryFormClassNames, Z as FFIDInquiryFormLegalLayout, _ as FFIDInquiryFormOrganization, $ as FFIDInquiryFormPlaceholderContext, a0 as FFIDInquiryFormPrefill, a1 as FFIDInquiryFormProps, a2 as FFIDInquiryFormSubmitData, a3 as FFIDInquiryFormSubmitResult, a4 as FFIDJwtClaims, a5 as FFIDLoginButton, a6 as FFIDMemberStatus, a7 as FFIDOAuthTokenResponse, a8 as FFIDOAuthUserInfoMemberRole, a9 as FFIDOAuthUserInfoSubscription, aa as FFIDOrganizationMember, ab as FFIDOrganizationSwitcher, ac as FFIDRedirectErrorCode, ad as FFIDSeatModel, ae as FFIDSubscriptionBadge, af as FFIDTokenIntrospectionResponse, ag as FFIDUserMenu, ah as FFID_INQUIRY_CATEGORIES, ai as FFID_INQUIRY_CATEGORIES_SITE_2026, aj as UseFFIDAnnouncementsOptions, ak as UseFFIDAnnouncementsReturn, al as isFFIDInquiryCategorySite2026, am as useFFIDAnnouncements } from './index-Cn8-3hgb.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode, ComponentType, FC } from 'react';
5
5
 
@@ -499,8 +499,6 @@ interface ContractWizardSubscriptionOptions {
499
499
  * propagated (no-op when `'login'` or omitted).
500
500
  */
501
501
  declare const SCREEN_HINT_SIGNUP: "signup";
502
- /** `screen_hint=login` (no-op marker; default screen is login) */
503
- declare const SCREEN_HINT_LOGIN: "login";
504
502
  /** Options for redirectToAuthorize */
505
503
  interface RedirectToAuthorizeOptions {
506
504
  /** Target organization ID — triggers org-scoped OAuth re-authorization */
@@ -518,7 +516,7 @@ interface RedirectToAuthorizeOptions {
518
516
  * of `/login` so the SDK contract (signup-screen intent) stays consistent
519
517
  * regardless of `authMode`.
520
518
  */
521
- screenHint?: typeof SCREEN_HINT_SIGNUP | typeof SCREEN_HINT_LOGIN;
519
+ screenHint?: typeof SCREEN_HINT_SIGNUP | 'login';
522
520
  }
523
521
 
524
522
  /** Creates an FFID API client instance */
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext, useSubscription } from './chunk-RRN3DTET.js';
2
- export { DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-RRN3DTET.js';
1
+ import { useFFIDContext, useSubscription } from './chunk-P7HSNT4U.js';
2
+ export { DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-P7HSNT4U.js';
3
3
  import { useEffect, useRef } from 'react';
4
4
  import { jsx, Fragment } from 'react/jsx-runtime';
5
5
 
@@ -803,7 +803,7 @@ function createProfileMethods(deps) {
803
803
  }
804
804
 
805
805
  // src/client/version-check.ts
806
- var SDK_VERSION = "3.1.0";
806
+ var SDK_VERSION = "4.1.0";
807
807
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
808
808
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
809
809
  function sdkHeaders() {
@@ -1,5 +1,5 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-DM_t1seS.cjs';
2
- export { f as FFIDCacheConfig, g as FFIDClient, h as FFIDConfig, i as FFIDOrganization, j as FFIDOtpSendResponse, k as FFIDOtpVerifyResponse, l as FFIDPasswordResetConfirmResponse, m as FFIDPasswordResetResponse, n as FFIDPasswordResetVerifyResponse, o as FFIDProfileCallOptions, p as FFIDResetSessionResponse, q as FFIDSubscription, r as FFIDUpdateUserProfileRequest, s as FFIDUser, t as FFIDUserProfile, T as TokenData, u as TokenStore, v as createFFIDClient, w as createTokenStore } from '../ffid-client-DM_t1seS.cjs';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-ZcJhRbD6.cjs';
2
+ export { f as FFIDCacheConfig, g as FFIDClient, h as FFIDConfig, i as FFIDOrganization, j as FFIDOtpSendResponse, k as FFIDOtpVerifyResponse, l as FFIDPasswordResetConfirmResponse, m as FFIDPasswordResetResponse, n as FFIDPasswordResetVerifyResponse, o as FFIDProfileCallOptions, p as FFIDResetSessionResponse, q as FFIDSubscription, r as FFIDUpdateUserProfileRequest, s as FFIDUser, t as FFIDUserProfile, T as TokenData, u as TokenStore, v as createFFIDClient, w as createTokenStore } from '../ffid-client-ZcJhRbD6.cjs';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.cjs';
4
4
 
5
5
  /** Token verification - verifyAccessToken() implementation */
@@ -1,5 +1,5 @@
1
- import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-DM_t1seS.js';
2
- export { f as FFIDCacheConfig, g as FFIDClient, h as FFIDConfig, i as FFIDOrganization, j as FFIDOtpSendResponse, k as FFIDOtpVerifyResponse, l as FFIDPasswordResetConfirmResponse, m as FFIDPasswordResetResponse, n as FFIDPasswordResetVerifyResponse, o as FFIDProfileCallOptions, p as FFIDResetSessionResponse, q as FFIDSubscription, r as FFIDUpdateUserProfileRequest, s as FFIDUser, t as FFIDUserProfile, T as TokenData, u as TokenStore, v as createFFIDClient, w as createTokenStore } from '../ffid-client-DM_t1seS.js';
1
+ import { F as FFIDLogger, a as FFIDError, b as FFIDCacheAdapter, c as FFIDVerifyAccessTokenOptions, d as FFIDApiResponse, e as FFIDOAuthUserInfo } from '../ffid-client-ZcJhRbD6.js';
2
+ export { f as FFIDCacheConfig, g as FFIDClient, h as FFIDConfig, i as FFIDOrganization, j as FFIDOtpSendResponse, k as FFIDOtpVerifyResponse, l as FFIDPasswordResetConfirmResponse, m as FFIDPasswordResetResponse, n as FFIDPasswordResetVerifyResponse, o as FFIDProfileCallOptions, p as FFIDResetSessionResponse, q as FFIDSubscription, r as FFIDUpdateUserProfileRequest, s as FFIDUser, t as FFIDUserProfile, T as TokenData, u as TokenStore, v as createFFIDClient, w as createTokenStore } from '../ffid-client-ZcJhRbD6.js';
3
3
  export { D as DEFAULT_API_BASE_URL, a as DEFAULT_OAUTH_SCOPES } from '../constants-D61jqRIO.js';
4
4
 
5
5
  /** Token verification - verifyAccessToken() implementation */
@@ -802,7 +802,7 @@ function createProfileMethods(deps) {
802
802
  }
803
803
 
804
804
  // src/client/version-check.ts
805
- var SDK_VERSION = "3.1.0";
805
+ var SDK_VERSION = "4.1.0";
806
806
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
807
807
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
808
808
  function sdkHeaders() {
@@ -1,4 +1,4 @@
1
- import { g as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-DM_t1seS.cjs';
1
+ import { g as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-ZcJhRbD6.cjs';
2
2
 
3
3
  /**
4
4
  * FFID SDK - Test mode client (E2E / integration test bypass)
@@ -1,4 +1,4 @@
1
- import { g as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-DM_t1seS.js';
1
+ import { g as FFIDClient, e as FFIDOAuthUserInfo } from '../../ffid-client-ZcJhRbD6.js';
2
2
 
3
3
  /**
4
4
  * FFID SDK - Test mode client (E2E / integration test bypass)
@@ -44,7 +44,7 @@ declare class FFIDWebhookPayloadError extends FFIDWebhookError {
44
44
  * Used by external services to handle real-time event notifications.
45
45
  */
46
46
  /** All supported webhook event types */
47
- type FFIDWebhookEventType = 'subscription.created' | 'subscription.updated' | 'subscription.canceled' | 'subscription.trial_ending' | 'subscription.payment_failed' | 'user.created' | 'user.updated' | 'user.deleted' | 'user.deletion_requested' | 'organization.created' | 'organization.updated' | 'organization.member.added' | 'organization.member.removed' | 'organization.member.role_changed' | 'legal.document.updated' | 'legal.agreement.required' | 'system.maintenance.scheduled' | 'system.maintenance.started' | 'system.maintenance.completed' | 'announcement.published' | 'test.ping';
47
+ type FFIDWebhookEventType = 'subscription.created' | 'subscription.updated' | 'subscription.canceled' | 'subscription.downgrade_scheduled' | 'subscription.downgrade_applied' | 'subscription.downgrade_canceled' | 'subscription.trial_ending' | 'subscription.payment_failed' | 'user.created' | 'user.updated' | 'user.deleted' | 'user.deletion_requested' | 'organization.created' | 'organization.updated' | 'organization.member.added' | 'organization.member.removed' | 'organization.member.role_changed' | 'legal.document.updated' | 'legal.agreement.required' | 'system.maintenance.scheduled' | 'system.maintenance.started' | 'system.maintenance.completed' | 'announcement.published' | 'test.ping';
48
48
  interface FFIDSubscriptionCreatedPayload {
49
49
  subscriptionId: string;
50
50
  organizationId?: string;
@@ -87,6 +87,48 @@ interface FFIDSubscriptionCanceledPayload {
87
87
  */
88
88
  expiredAt?: string;
89
89
  }
90
+ interface FFIDSubscriptionDowngradeScheduledPayload {
91
+ /** FFID subscription UUID. */
92
+ subscriptionId: string;
93
+ /** Organization UUID that owns the subscription. */
94
+ organizationId: string;
95
+ /** Plan UUID currently active on the subscription. */
96
+ currentPlanId: string;
97
+ /** Plan UUID scheduled to become active at period end. */
98
+ newPlanId: string;
99
+ /** Billing interval carried by the target period, typically 'monthly' or 'yearly'. */
100
+ billingInterval: string;
101
+ /** ISO timestamp when the downgrade was scheduled. */
102
+ scheduledAt: string;
103
+ /** ISO timestamp when the scheduled downgrade should take effect. */
104
+ effectiveAt: string;
105
+ }
106
+ interface FFIDSubscriptionDowngradeAppliedPayload {
107
+ /** FFID subscription UUID. */
108
+ subscriptionId: string;
109
+ /** Organization UUID that owns the subscription. */
110
+ organizationId: string;
111
+ /** Plan UUID active before the pending downgrade was applied. */
112
+ previousPlanId: string;
113
+ /** Plan UUID that became active after the downgrade was applied. */
114
+ newPlanId: string;
115
+ /** Billing interval on the applied downgraded plan, typically 'monthly' or 'yearly'. */
116
+ billingInterval: string;
117
+ /** ISO timestamp when FFID applied the pending downgrade. */
118
+ appliedAt: string;
119
+ }
120
+ interface FFIDSubscriptionDowngradeCanceledPayload {
121
+ /** FFID subscription UUID. */
122
+ subscriptionId: string;
123
+ /** Organization UUID that owns the subscription. */
124
+ organizationId: string;
125
+ /** Plan UUID that had been pending but was canceled before taking effect. */
126
+ canceledPlanId: string;
127
+ /** Plan UUID that remains active after canceling the pending downgrade. */
128
+ currentPlanId: string;
129
+ /** ISO timestamp when the pending downgrade was canceled. */
130
+ canceledAt: string;
131
+ }
90
132
  interface FFIDSubscriptionTrialEndingPayload {
91
133
  subscriptionId: string;
92
134
  organizationId?: string;
@@ -221,6 +263,9 @@ interface FFIDWebhookEventMap {
221
263
  'subscription.created': FFIDSubscriptionCreatedPayload;
222
264
  'subscription.updated': FFIDSubscriptionUpdatedPayload;
223
265
  'subscription.canceled': FFIDSubscriptionCanceledPayload;
266
+ 'subscription.downgrade_scheduled': FFIDSubscriptionDowngradeScheduledPayload;
267
+ 'subscription.downgrade_applied': FFIDSubscriptionDowngradeAppliedPayload;
268
+ 'subscription.downgrade_canceled': FFIDSubscriptionDowngradeCanceledPayload;
224
269
  'subscription.trial_ending': FFIDSubscriptionTrialEndingPayload;
225
270
  'subscription.payment_failed': FFIDSubscriptionPaymentFailedPayload;
226
271
  'user.created': FFIDUserCreatedPayload;
@@ -363,4 +408,4 @@ declare function createFFIDWebhookHandler(config: FFIDWebhookHandlerConfig): {
363
408
  /** Type of the FFID Webhook handler */
364
409
  type FFIDWebhookHandler = ReturnType<typeof createFFIDWebhookHandler>;
365
410
 
366
- export { DEFAULT_TOLERANCE_SECONDS, type FFIDLegalAgreementRequiredPayload, type FFIDLegalDocumentUpdatedPayload, type FFIDOrganizationCreatedPayload, type FFIDOrganizationMemberAddedPayload, type FFIDOrganizationMemberRemovedPayload, type FFIDOrganizationMemberRoleChangedPayload, type FFIDOrganizationUpdatedPayload, type FFIDSubscriptionCanceledPayload, type FFIDSubscriptionCreatedPayload, type FFIDSubscriptionPaymentFailedPayload, type FFIDSubscriptionTrialEndingPayload, type FFIDSubscriptionUpdatedPayload, type FFIDSystemMaintenancePayload, type FFIDTestPingPayload, type FFIDUserCreatedPayload, type FFIDUserDeletedPayload, type FFIDUserDeletionRequestedPayload, type FFIDUserUpdatedPayload, FFIDWebhookError, type FFIDWebhookEvent, type FFIDWebhookEventHandler, type FFIDWebhookEventMap, type FFIDWebhookEventType, type FFIDWebhookHandler, type FFIDWebhookHandlerConfig, type FFIDWebhookLogger, FFIDWebhookPayloadError, FFIDWebhookSignatureError, FFIDWebhookTimestampError, FFID_WEBHOOK_EVENT_ID_HEADER, FFID_WEBHOOK_SIGNATURE_HEADER, FFID_WEBHOOK_SIGNATURE_VERSION, FFID_WEBHOOK_TIMESTAMP_HEADER, computeSignature, createFFIDWebhookHandler, parseSignatureHeader, verifyWebhookSignature };
411
+ export { DEFAULT_TOLERANCE_SECONDS, type FFIDLegalAgreementRequiredPayload, type FFIDLegalDocumentUpdatedPayload, type FFIDOrganizationCreatedPayload, type FFIDOrganizationMemberAddedPayload, type FFIDOrganizationMemberRemovedPayload, type FFIDOrganizationMemberRoleChangedPayload, type FFIDOrganizationUpdatedPayload, type FFIDSubscriptionCanceledPayload, type FFIDSubscriptionCreatedPayload, type FFIDSubscriptionDowngradeAppliedPayload, type FFIDSubscriptionDowngradeCanceledPayload, type FFIDSubscriptionDowngradeScheduledPayload, type FFIDSubscriptionPaymentFailedPayload, type FFIDSubscriptionTrialEndingPayload, type FFIDSubscriptionUpdatedPayload, type FFIDSystemMaintenancePayload, type FFIDTestPingPayload, type FFIDUserCreatedPayload, type FFIDUserDeletedPayload, type FFIDUserDeletionRequestedPayload, type FFIDUserUpdatedPayload, FFIDWebhookError, type FFIDWebhookEvent, type FFIDWebhookEventHandler, type FFIDWebhookEventMap, type FFIDWebhookEventType, type FFIDWebhookHandler, type FFIDWebhookHandlerConfig, type FFIDWebhookLogger, FFIDWebhookPayloadError, FFIDWebhookSignatureError, FFIDWebhookTimestampError, FFID_WEBHOOK_EVENT_ID_HEADER, FFID_WEBHOOK_SIGNATURE_HEADER, FFID_WEBHOOK_SIGNATURE_VERSION, FFID_WEBHOOK_TIMESTAMP_HEADER, computeSignature, createFFIDWebhookHandler, parseSignatureHeader, verifyWebhookSignature };
@@ -44,7 +44,7 @@ declare class FFIDWebhookPayloadError extends FFIDWebhookError {
44
44
  * Used by external services to handle real-time event notifications.
45
45
  */
46
46
  /** All supported webhook event types */
47
- type FFIDWebhookEventType = 'subscription.created' | 'subscription.updated' | 'subscription.canceled' | 'subscription.trial_ending' | 'subscription.payment_failed' | 'user.created' | 'user.updated' | 'user.deleted' | 'user.deletion_requested' | 'organization.created' | 'organization.updated' | 'organization.member.added' | 'organization.member.removed' | 'organization.member.role_changed' | 'legal.document.updated' | 'legal.agreement.required' | 'system.maintenance.scheduled' | 'system.maintenance.started' | 'system.maintenance.completed' | 'announcement.published' | 'test.ping';
47
+ type FFIDWebhookEventType = 'subscription.created' | 'subscription.updated' | 'subscription.canceled' | 'subscription.downgrade_scheduled' | 'subscription.downgrade_applied' | 'subscription.downgrade_canceled' | 'subscription.trial_ending' | 'subscription.payment_failed' | 'user.created' | 'user.updated' | 'user.deleted' | 'user.deletion_requested' | 'organization.created' | 'organization.updated' | 'organization.member.added' | 'organization.member.removed' | 'organization.member.role_changed' | 'legal.document.updated' | 'legal.agreement.required' | 'system.maintenance.scheduled' | 'system.maintenance.started' | 'system.maintenance.completed' | 'announcement.published' | 'test.ping';
48
48
  interface FFIDSubscriptionCreatedPayload {
49
49
  subscriptionId: string;
50
50
  organizationId?: string;
@@ -87,6 +87,48 @@ interface FFIDSubscriptionCanceledPayload {
87
87
  */
88
88
  expiredAt?: string;
89
89
  }
90
+ interface FFIDSubscriptionDowngradeScheduledPayload {
91
+ /** FFID subscription UUID. */
92
+ subscriptionId: string;
93
+ /** Organization UUID that owns the subscription. */
94
+ organizationId: string;
95
+ /** Plan UUID currently active on the subscription. */
96
+ currentPlanId: string;
97
+ /** Plan UUID scheduled to become active at period end. */
98
+ newPlanId: string;
99
+ /** Billing interval carried by the target period, typically 'monthly' or 'yearly'. */
100
+ billingInterval: string;
101
+ /** ISO timestamp when the downgrade was scheduled. */
102
+ scheduledAt: string;
103
+ /** ISO timestamp when the scheduled downgrade should take effect. */
104
+ effectiveAt: string;
105
+ }
106
+ interface FFIDSubscriptionDowngradeAppliedPayload {
107
+ /** FFID subscription UUID. */
108
+ subscriptionId: string;
109
+ /** Organization UUID that owns the subscription. */
110
+ organizationId: string;
111
+ /** Plan UUID active before the pending downgrade was applied. */
112
+ previousPlanId: string;
113
+ /** Plan UUID that became active after the downgrade was applied. */
114
+ newPlanId: string;
115
+ /** Billing interval on the applied downgraded plan, typically 'monthly' or 'yearly'. */
116
+ billingInterval: string;
117
+ /** ISO timestamp when FFID applied the pending downgrade. */
118
+ appliedAt: string;
119
+ }
120
+ interface FFIDSubscriptionDowngradeCanceledPayload {
121
+ /** FFID subscription UUID. */
122
+ subscriptionId: string;
123
+ /** Organization UUID that owns the subscription. */
124
+ organizationId: string;
125
+ /** Plan UUID that had been pending but was canceled before taking effect. */
126
+ canceledPlanId: string;
127
+ /** Plan UUID that remains active after canceling the pending downgrade. */
128
+ currentPlanId: string;
129
+ /** ISO timestamp when the pending downgrade was canceled. */
130
+ canceledAt: string;
131
+ }
90
132
  interface FFIDSubscriptionTrialEndingPayload {
91
133
  subscriptionId: string;
92
134
  organizationId?: string;
@@ -221,6 +263,9 @@ interface FFIDWebhookEventMap {
221
263
  'subscription.created': FFIDSubscriptionCreatedPayload;
222
264
  'subscription.updated': FFIDSubscriptionUpdatedPayload;
223
265
  'subscription.canceled': FFIDSubscriptionCanceledPayload;
266
+ 'subscription.downgrade_scheduled': FFIDSubscriptionDowngradeScheduledPayload;
267
+ 'subscription.downgrade_applied': FFIDSubscriptionDowngradeAppliedPayload;
268
+ 'subscription.downgrade_canceled': FFIDSubscriptionDowngradeCanceledPayload;
224
269
  'subscription.trial_ending': FFIDSubscriptionTrialEndingPayload;
225
270
  'subscription.payment_failed': FFIDSubscriptionPaymentFailedPayload;
226
271
  'user.created': FFIDUserCreatedPayload;
@@ -363,4 +408,4 @@ declare function createFFIDWebhookHandler(config: FFIDWebhookHandlerConfig): {
363
408
  /** Type of the FFID Webhook handler */
364
409
  type FFIDWebhookHandler = ReturnType<typeof createFFIDWebhookHandler>;
365
410
 
366
- export { DEFAULT_TOLERANCE_SECONDS, type FFIDLegalAgreementRequiredPayload, type FFIDLegalDocumentUpdatedPayload, type FFIDOrganizationCreatedPayload, type FFIDOrganizationMemberAddedPayload, type FFIDOrganizationMemberRemovedPayload, type FFIDOrganizationMemberRoleChangedPayload, type FFIDOrganizationUpdatedPayload, type FFIDSubscriptionCanceledPayload, type FFIDSubscriptionCreatedPayload, type FFIDSubscriptionPaymentFailedPayload, type FFIDSubscriptionTrialEndingPayload, type FFIDSubscriptionUpdatedPayload, type FFIDSystemMaintenancePayload, type FFIDTestPingPayload, type FFIDUserCreatedPayload, type FFIDUserDeletedPayload, type FFIDUserDeletionRequestedPayload, type FFIDUserUpdatedPayload, FFIDWebhookError, type FFIDWebhookEvent, type FFIDWebhookEventHandler, type FFIDWebhookEventMap, type FFIDWebhookEventType, type FFIDWebhookHandler, type FFIDWebhookHandlerConfig, type FFIDWebhookLogger, FFIDWebhookPayloadError, FFIDWebhookSignatureError, FFIDWebhookTimestampError, FFID_WEBHOOK_EVENT_ID_HEADER, FFID_WEBHOOK_SIGNATURE_HEADER, FFID_WEBHOOK_SIGNATURE_VERSION, FFID_WEBHOOK_TIMESTAMP_HEADER, computeSignature, createFFIDWebhookHandler, parseSignatureHeader, verifyWebhookSignature };
411
+ export { DEFAULT_TOLERANCE_SECONDS, type FFIDLegalAgreementRequiredPayload, type FFIDLegalDocumentUpdatedPayload, type FFIDOrganizationCreatedPayload, type FFIDOrganizationMemberAddedPayload, type FFIDOrganizationMemberRemovedPayload, type FFIDOrganizationMemberRoleChangedPayload, type FFIDOrganizationUpdatedPayload, type FFIDSubscriptionCanceledPayload, type FFIDSubscriptionCreatedPayload, type FFIDSubscriptionDowngradeAppliedPayload, type FFIDSubscriptionDowngradeCanceledPayload, type FFIDSubscriptionDowngradeScheduledPayload, type FFIDSubscriptionPaymentFailedPayload, type FFIDSubscriptionTrialEndingPayload, type FFIDSubscriptionUpdatedPayload, type FFIDSystemMaintenancePayload, type FFIDTestPingPayload, type FFIDUserCreatedPayload, type FFIDUserDeletedPayload, type FFIDUserDeletionRequestedPayload, type FFIDUserUpdatedPayload, FFIDWebhookError, type FFIDWebhookEvent, type FFIDWebhookEventHandler, type FFIDWebhookEventMap, type FFIDWebhookEventType, type FFIDWebhookHandler, type FFIDWebhookHandlerConfig, type FFIDWebhookLogger, FFIDWebhookPayloadError, FFIDWebhookSignatureError, FFIDWebhookTimestampError, FFID_WEBHOOK_EVENT_ID_HEADER, FFID_WEBHOOK_SIGNATURE_HEADER, FFID_WEBHOOK_SIGNATURE_VERSION, FFID_WEBHOOK_TIMESTAMP_HEADER, computeSignature, createFFIDWebhookHandler, parseSignatureHeader, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feelflow/ffid-sdk",
3
- "version": "3.1.0",
3
+ "version": "4.1.0",
4
4
  "description": "FeelFlow ID Platform SDK for React/Next.js applications",
5
5
  "keywords": [
6
6
  "feelflow",