@feelflow/ffid-sdk 9.0.0 → 10.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.
- package/README.md +88 -2
- package/dist/{chunk-TUXIJEEZ.js → chunk-ITSQIAO5.js} +387 -46
- package/dist/{chunk-Q2ZQJS36.cjs → chunk-VHOIA25Y.cjs} +403 -45
- 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-B0cORHac.d.ts → ffid-client-DUbQLYTN.d.ts} +688 -377
- package/dist/{ffid-client-6aLs9Fqc.d.cts → ffid-client-qcfCWLfs.d.cts} +688 -377
- package/dist/{index-BG7g99pK.d.cts → index-CWGoIgYL.d.cts} +814 -2
- package/dist/{index-BG7g99pK.d.ts → index-CWGoIgYL.d.ts} +814 -2
- package/dist/index.cjs +142 -74
- package/dist/index.d.cts +211 -508
- package/dist/index.d.ts +211 -508
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +299 -13
- package/dist/server/index.d.cts +74 -3
- package/dist/server/index.d.ts +74 -3
- package/dist/server/index.js +297 -14
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/dist/webhooks/index.d.cts +74 -2
- package/dist/webhooks/index.d.ts +74 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FFIDOAuthUserInfoSubscription, a as FFIDAccountType, b as FFIDPrompt, c as FFIDConfig, d as FFIDApiResponse, e as FFIDSessionResponse, f as FFIDSignOutResult, g as FFIDError, h as FFIDSubscriptionCheckResponse, i as FFIDCheckServiceAccessParams, j as FFIDServiceAccessDecision, k as FFIDAnalyticsConfig, l as FFIDSeatsSummary, m as FFIDListPlansResponse, n as FFIDPublishedCatalog, o as FFIDSubscriptionDetail, p as FFIDSubscribeParams, q as FFIDSubscribeResponse, r as FFIDChangePlanParams, s as FFIDChangePlanResponse, t as FFIDCancelSubscriptionParams, u as FFIDCancelSubscriptionResponse, v as FFIDCancelPendingDowngradeResponse, w as FFIDPreviewPlanChangeParams, x as FFIDPlanChangePreviewResponse, y as FFIDPreviewSeatChangeParams, z as FFIDSeatChangePreviewResponse, A as FFIDVerifyAccessTokenOptions, B as FFIDOAuthUserInfo, C as FFIDInquiryCreateParams, D as FFIDInquiryCreateResponse, E as FFIDCreditBalance, G as FFIDListCreditHistoryOptions, H as FFIDCreditHistoryPage, I as FFIDCreditPackList, J as FFIDCreatePackCheckoutParams, K as FFIDCreditPackCheckout, L as FFIDCreditConsumeParams, M as FFIDCreditConsumeResult, N as FFIDBuyCreditsUrlParams, T as TokenStore, O as FFIDAuthMode, P as FFIDLogger, Q as FFIDCacheAdapter, R as FFIDUser, S as FFIDOrganization, U as FFIDSubscription, V as FFIDSubscriptionContextValue, W as EffectiveSubscriptionStatus, X as FFIDSubscriptionStatus, Y as FFIDCatalogEnvironment, Z as FFIDBillingInterval, _ as FFIDTaxBehavior, $ as FFIDAnnouncementsClientConfig, a0 as ListAnnouncementsOptions, a1 as FFIDAnnouncementsApiResponse, a2 as AnnouncementListResponse, a3 as FFIDAnnouncementsLogger } from './index-CWGoIgYL.js';
|
|
2
|
+
export { a4 as Announcement, a5 as AnnouncementStatus, a6 as AnnouncementType, a7 as EFFECTIVE_SUBSCRIPTION_STATUSES, a8 as FFIDAnnouncementBadge, a9 as FFIDAnnouncementList, aa as FFIDAnnouncementsError, ab as FFIDAnnouncementsErrorCode, ac as FFIDAnnouncementsServerResponse, ad as FFIDApiResponseMeta, ae as FFIDCacheConfig, af as FFIDCatalogPublication, ag as FFIDCatalogPublicationStatus, ah as FFIDContextValue, ai as FFIDCreditBreakdown, aj as FFIDCreditGrantKind, ak as FFIDCreditHistoryItem, al as FFIDCreditHistoryType, am as FFIDCreditPack, an as FFIDCreditsInsufficientDetails, ao as FFIDInquiryAcquisitionSource, ap as FFIDInquiryCategory, aq as FFIDInquiryCategorySite2026, ar as FFIDInquiryForm, as as FFIDInquiryFormCategoryItem, at as FFIDInquiryFormClassNames, au as FFIDInquiryFormLegalLayout, av as FFIDInquiryFormOrganization, aw as FFIDInquiryFormPlaceholderContext, ax as FFIDInquiryFormPrefill, ay as FFIDInquiryFormProps, az as FFIDInquiryFormSubmitData, aA as FFIDInquiryFormSubmitResult, aB as FFIDJwtClaims, aC as FFIDLoginButton, aD as FFIDOAuthUserInfoMemberRole, aE as FFIDOrganizationSwitcher, aF as FFIDPlanChangeLineItem, aG as FFIDPlanChangePreview, aH as FFIDPlanInfo, aI as FFIDPricingModel, aJ as FFIDPublishedPlan, aK as FFIDSeatAssignmentClaim, aL as FFIDSeatAssignmentStatus, aM as FFIDSeatChangeLineItem, aN as FFIDSeatChangePreview, aO as FFIDSeatModel, aP as FFIDServiceAccessDenialReason, aQ as FFIDServiceAccessFailPolicy, aR as FFIDServiceInfo, aS as FFIDSubscriptionBadge, aT as FFIDSubscriptionCheckCredits, aU as FFIDSubscriptionSummary, aV as FFIDSupportedCurrency, aW as FFIDUserMenu, aX as FFID_CATALOG_ENVIRONMENTS, aY as FFID_CATALOG_PUBLICATION_STATUSES, aZ as FFID_CREDITS_CONSUME_MAX_AMOUNT, a_ as FFID_CREDITS_CONSUME_MIN_AMOUNT, a$ as FFID_CREDITS_FEATURE_PATTERN, b0 as FFID_CREDITS_HISTORY_DEFAULT_LIMIT, b1 as FFID_CREDITS_HISTORY_MAX_LIMIT, b2 as FFID_CREDITS_HISTORY_MIN_LIMIT, b3 as FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN, b4 as FFID_CREDITS_LOW_THRESHOLD_PERCENT, b5 as FFID_CREDITS_METADATA_MAX_BYTES, b6 as FFID_CREDIT_GRANT_KINDS, b7 as FFID_CREDIT_HISTORY_TYPES, b8 as FFID_CREDIT_PACK_MAX_QUANTITY, b9 as FFID_CREDIT_PACK_MIN_QUANTITY, ba as FFID_INQUIRY_ACQUISITION_SOURCES, bb as FFID_INQUIRY_CATEGORIES, bc as FFID_INQUIRY_CATEGORIES_SITE_2026, bd as TokenData, be as UseFFIDAnnouncementsOptions, bf as UseFFIDAnnouncementsReturn, bg as createTokenStore, bh as isFFIDInquiryAcquisitionSource, bi as isFFIDInquiryCategorySite2026, bj as useFFIDAnnouncements } from './index-CWGoIgYL.js';
|
|
3
3
|
export { A as ALL_DENIED_EXCEPT_NECESSARY, i as CONSENT_COOKIE_NAME, j as CONSENT_DISMISSAL_TIMESTAMP_KEY, l as COOKIE_VERSION, D as DEFAULT_CONSENT_ERROR_MESSAGES, n as FFIDAnalyticsProvider, o as FFIDAnalyticsProviderProps, c as FFIDConsentCategories, q as FFIDConsentCategoryCode, e as FFIDConsentCategoryMetadata, v as FFIDConsentError, w as FFIDConsentErrorCode, x as FFIDConsentMergeStrategy, z as FFIDConsentMergeWarning, B as FFIDConsentMergeWarningEvent, F as FFIDConsentResult, H as FFIDConsentSource, a as FFIDConsentState, d as FFIDConsentSyncResult, L as FFIDCookieBanner, M as FFIDCookieBannerClassNames, N as FFIDCookieBannerProps, O as FFIDCookieLink, Q as FFIDCookieLinkProps, f as FFIDCookiePolicy, S as FFIDCookieSettings, T as FFIDCookieSettingsClassNames, U as FFIDCookieSettingsProps, Z as FFID_CONSENT_ERROR_CODES, ad as UseFFIDConsentPreferencesReturn, ae as UseFFIDConsentReturn, af as clearConsentDismissalTimestamp, ai as decodeConsentCookie, ak as encodeConsentCookie, am as readConsentCookie, an as readConsentDismissalTimestamp, ap as useFFIDConsent, aq as useFFIDConsentPreferences, ar as writeConsentCookie, as as writeConsentDismissalTimestamp } from './FFIDCookieLink-yt5SUr-W.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
@@ -159,403 +159,6 @@ interface FFIDCreatePortalParams {
|
|
|
159
159
|
returnUrl: string;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
/** Billing interval for subscriptions */
|
|
163
|
-
type FFIDBillingInterval = 'monthly' | 'yearly';
|
|
164
|
-
/**
|
|
165
|
-
* Supported currencies for billing responses.
|
|
166
|
-
* Mirrors the platform's `SupportedCurrency` enum (`jpy` = zero-decimal Japanese Yen, `usd` = US Dollar).
|
|
167
|
-
*/
|
|
168
|
-
type FFIDSupportedCurrency = 'jpy' | 'usd';
|
|
169
|
-
/** Service information returned by plans endpoint */
|
|
170
|
-
interface FFIDServiceInfo {
|
|
171
|
-
id: string;
|
|
172
|
-
code: string;
|
|
173
|
-
name: string;
|
|
174
|
-
description: string | null;
|
|
175
|
-
isActive: boolean;
|
|
176
|
-
createdAt: string;
|
|
177
|
-
plans: FFIDPlanInfo[];
|
|
178
|
-
}
|
|
179
|
-
/** Plan information returned by plans endpoint */
|
|
180
|
-
interface FFIDPlanInfo {
|
|
181
|
-
id: string;
|
|
182
|
-
serviceId: string;
|
|
183
|
-
code: string;
|
|
184
|
-
name: string;
|
|
185
|
-
description: string | null;
|
|
186
|
-
minSeats: number;
|
|
187
|
-
maxSeats: number | null;
|
|
188
|
-
seatSelectionEnabled: boolean;
|
|
189
|
-
trialDays: number;
|
|
190
|
-
/** flat: period fee; per_seat: multiply by selected quantity. Older servers omit this. */
|
|
191
|
-
pricingModel?: 'per_seat' | 'flat';
|
|
192
|
-
/**
|
|
193
|
-
* Monthly price in the smallest currency unit.
|
|
194
|
-
*
|
|
195
|
-
* `null` when the plan is not self-serve priced. Once the FFID #4482 rollout
|
|
196
|
-
* is enabled, `customPricing: true` (Enterprise / "contact us") plans return
|
|
197
|
-
* `null` here — branch on `customPricing` to render an inquiry CTA rather than
|
|
198
|
-
* a price. Standard plans always return a number.
|
|
199
|
-
*/
|
|
200
|
-
priceMonthly: number | null;
|
|
201
|
-
priceYearly: number | null;
|
|
202
|
-
currency: string;
|
|
203
|
-
isActive: boolean;
|
|
204
|
-
displayOrder: number;
|
|
205
|
-
customPricing: boolean;
|
|
206
|
-
createdAt: string;
|
|
207
|
-
}
|
|
208
|
-
/** Response from list plans endpoint */
|
|
209
|
-
interface FFIDListPlansResponse {
|
|
210
|
-
services: FFIDServiceInfo[];
|
|
211
|
-
count: number;
|
|
212
|
-
}
|
|
213
|
-
/** Subscription details returned by ext API (sanitized, no Stripe IDs) */
|
|
214
|
-
interface FFIDSubscriptionDetail {
|
|
215
|
-
id: string;
|
|
216
|
-
organizationId: string;
|
|
217
|
-
organizationName: string;
|
|
218
|
-
serviceCode: string;
|
|
219
|
-
serviceName: string;
|
|
220
|
-
planCode: string;
|
|
221
|
-
planName: string;
|
|
222
|
-
status: FFIDSubscriptionStatus;
|
|
223
|
-
paymentMethod: string | null;
|
|
224
|
-
billingInterval: FFIDBillingInterval;
|
|
225
|
-
quantity: number;
|
|
226
|
-
currentPeriodStart: string | null;
|
|
227
|
-
currentPeriodEnd: string | null;
|
|
228
|
-
trialStart: string | null;
|
|
229
|
-
trialEnd: string | null;
|
|
230
|
-
canceledAt: string | null;
|
|
231
|
-
/**
|
|
232
|
-
* `true` while a cancellation is reserved until the period end. `status` stays
|
|
233
|
-
* `active` until then; the subscription becomes `canceled` at `currentPeriodEnd`.
|
|
234
|
-
* The reservation can only be withdrawn in the FFID portal (there is no SDK method).
|
|
235
|
-
*/
|
|
236
|
-
cancelAtPeriodEnd: boolean;
|
|
237
|
-
/**
|
|
238
|
-
* Change reserved until the period end (null = nothing reserved).
|
|
239
|
-
*
|
|
240
|
-
* Every decrease — a lower plan, paid → free, fewer seats, yearly → monthly — is
|
|
241
|
-
* reserved instead of applied immediately (FFID #6327). The current plan, seats and
|
|
242
|
-
* interval stay in effect until `scheduledAt`. Withdraw it with `cancelPendingDowngrade()`.
|
|
243
|
-
*/
|
|
244
|
-
pendingDowngrade: {
|
|
245
|
-
/** Plan in effect after the period end. Equals `planCode` for a seat-only or interval-only reservation. */
|
|
246
|
-
planCode: string;
|
|
247
|
-
planName: string;
|
|
248
|
-
/** Billing interval in effect after the period end */
|
|
249
|
-
billingInterval: FFIDBillingInterval;
|
|
250
|
-
/**
|
|
251
|
-
* Seat count in effect after the period end. `null` = the seat count does not change.
|
|
252
|
-
* Seat reductions are made in the FFID portal; this lets you show them (8.0.0).
|
|
253
|
-
* FFID servers released before #6327 omit it, so compare with `== null` at runtime.
|
|
254
|
-
*/
|
|
255
|
-
quantity: number | null;
|
|
256
|
-
scheduledAt: string;
|
|
257
|
-
requestedAt: string;
|
|
258
|
-
} | null;
|
|
259
|
-
createdAt: string;
|
|
260
|
-
}
|
|
261
|
-
/** Parameters for subscribing to a plan */
|
|
262
|
-
interface FFIDSubscribeParams {
|
|
263
|
-
/** Organization ID (UUID) */
|
|
264
|
-
organizationId: string;
|
|
265
|
-
/** Plan code (e.g., 'free', 'basic', 'pro') */
|
|
266
|
-
planCode: string;
|
|
267
|
-
/** Billing interval (default: 'monthly') */
|
|
268
|
-
billingInterval?: FFIDBillingInterval;
|
|
269
|
-
/** Number of seats (default: plan's minSeats) */
|
|
270
|
-
quantity?: number;
|
|
271
|
-
/** User ID for seat auto-assignment (only needed for service-key mode) */
|
|
272
|
-
userId?: string;
|
|
273
|
-
}
|
|
274
|
-
/** Sanitized subscription fields returned by subscribe/reactivate endpoints (no Stripe IDs) */
|
|
275
|
-
interface FFIDSubscriptionSummary {
|
|
276
|
-
id: string;
|
|
277
|
-
organizationId: string;
|
|
278
|
-
serviceId: string;
|
|
279
|
-
planId: string;
|
|
280
|
-
status: FFIDSubscriptionStatus;
|
|
281
|
-
paymentMethod: string | null;
|
|
282
|
-
billingInterval: FFIDBillingInterval;
|
|
283
|
-
quantity: number;
|
|
284
|
-
currentPeriodStart: string | null;
|
|
285
|
-
currentPeriodEnd: string | null;
|
|
286
|
-
trialStart: string | null;
|
|
287
|
-
trialEnd: string | null;
|
|
288
|
-
canceledAt: string | null;
|
|
289
|
-
cancelAtPeriodEnd: boolean;
|
|
290
|
-
createdAt: string;
|
|
291
|
-
}
|
|
292
|
-
/** Response from subscribe endpoint */
|
|
293
|
-
interface FFIDSubscribeResponse {
|
|
294
|
-
subscription: FFIDSubscriptionSummary;
|
|
295
|
-
service: {
|
|
296
|
-
id: string;
|
|
297
|
-
code: string;
|
|
298
|
-
name: string;
|
|
299
|
-
};
|
|
300
|
-
plan: {
|
|
301
|
-
id: string;
|
|
302
|
-
code: string;
|
|
303
|
-
name: string;
|
|
304
|
-
priceMonthly: number;
|
|
305
|
-
priceYearly: number | null;
|
|
306
|
-
trialDays: number;
|
|
307
|
-
};
|
|
308
|
-
/** True if a canceled subscription was reactivated */
|
|
309
|
-
reactivated?: boolean;
|
|
310
|
-
/** True if Stripe checkout is needed (canceled paid plan reactivation) */
|
|
311
|
-
needsCheckout?: boolean;
|
|
312
|
-
}
|
|
313
|
-
/** Parameters for changing plan */
|
|
314
|
-
interface FFIDChangePlanParams {
|
|
315
|
-
/** Subscription ID (UUID) */
|
|
316
|
-
subscriptionId: string;
|
|
317
|
-
/** New plan code */
|
|
318
|
-
planCode: string;
|
|
319
|
-
/** New billing interval (default: keeps current) */
|
|
320
|
-
billingInterval?: FFIDBillingInterval;
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* Response from change plan endpoint.
|
|
324
|
-
*
|
|
325
|
-
* - An increase (higher plan / monthly → yearly) applies immediately and the difference up to
|
|
326
|
-
* the current period end is charged now. `pendingDowngrade` is absent.
|
|
327
|
-
* - A decrease (lower plan / paid → free / yearly → monthly) is reserved until the period end:
|
|
328
|
-
* `pendingDowngrade` is present and `subscription.planCode` is still the current plan.
|
|
329
|
-
* Nothing is charged or refunded. A contract that cannot be reserved still changes
|
|
330
|
-
* immediately, without a refund: one with no period end, or a paid → paid decrease on a
|
|
331
|
-
* contract without a Stripe subscription.
|
|
332
|
-
*/
|
|
333
|
-
interface FFIDChangePlanResponse {
|
|
334
|
-
message: string;
|
|
335
|
-
subscription: {
|
|
336
|
-
id: string;
|
|
337
|
-
organizationId: string;
|
|
338
|
-
serviceCode: string;
|
|
339
|
-
planCode: string;
|
|
340
|
-
planName: string;
|
|
341
|
-
billingInterval: FFIDBillingInterval;
|
|
342
|
-
status: FFIDSubscriptionStatus;
|
|
343
|
-
isUpgrade: boolean;
|
|
344
|
-
};
|
|
345
|
-
/** Present when the change is a decrease reserved until the period end */
|
|
346
|
-
pendingDowngrade?: {
|
|
347
|
-
planCode: string;
|
|
348
|
-
planName: string;
|
|
349
|
-
scheduledAt: string;
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
/** Parameters for canceling subscription */
|
|
353
|
-
interface FFIDCancelSubscriptionParams {
|
|
354
|
-
/** Subscription ID (UUID) */
|
|
355
|
-
subscriptionId: string;
|
|
356
|
-
/** Cancellation reason code */
|
|
357
|
-
reason?: 'too_expensive' | 'missing_features' | 'switched_service' | 'rarely_used' | 'customer_service' | 'other';
|
|
358
|
-
/** Additional cancellation details */
|
|
359
|
-
reasonDetails?: string;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Response from cancel subscription endpoint.
|
|
363
|
-
*
|
|
364
|
-
* Since 8.0.0 a contract billed through Stripe is **reserved** for cancellation at the period
|
|
365
|
-
* end (FFID #6327): `status` stays `active`, `cancelAtPeriodEnd` is `true` and `cancelAt` is the
|
|
366
|
-
* period end. Access continues until then and nothing is refunded. A contract that cannot be
|
|
367
|
-
* reserved (no Stripe subscription, no period end yet, or Stripe not configured on FFID) is
|
|
368
|
-
* canceled immediately (`status: 'canceled'`, `cancelAtPeriodEnd: false`, `cancelAt: null`).
|
|
369
|
-
* Branch on `cancelAtPeriodEnd`, not on whether the contract uses Stripe.
|
|
370
|
-
*
|
|
371
|
-
* Do not treat this response as "access revoked". The `subscription.canceled` webhook arrives
|
|
372
|
-
* at reservation (`source: 'user_initiated'`) and again at the period end
|
|
373
|
-
* (`source: 'stripe_confirmed'`); see `FFIDSubscriptionCanceledPayload`.
|
|
374
|
-
*/
|
|
375
|
-
interface FFIDCancelSubscriptionResponse {
|
|
376
|
-
message: string;
|
|
377
|
-
subscription: {
|
|
378
|
-
id: string;
|
|
379
|
-
organizationId: string;
|
|
380
|
-
/** `active` while the cancellation is reserved; `canceled` only for an immediate cancellation */
|
|
381
|
-
status: FFIDSubscriptionStatus;
|
|
382
|
-
canceledAt: string | null;
|
|
383
|
-
/** `true` when the cancellation is reserved until the period end */
|
|
384
|
-
cancelAtPeriodEnd: boolean;
|
|
385
|
-
/** When the reserved cancellation takes effect (the period end). `null` for an immediate cancellation */
|
|
386
|
-
cancelAt: string | null;
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Response from cancel pending downgrade endpoint.
|
|
391
|
-
*
|
|
392
|
-
* Withdraws the reserved change on the Stripe side as well, so the current plan, seats and
|
|
393
|
-
* interval simply continue after the period end. It does not withdraw a reserved
|
|
394
|
-
* cancellation — that is done in the FFID portal.
|
|
395
|
-
*/
|
|
396
|
-
interface FFIDCancelPendingDowngradeResponse {
|
|
397
|
-
message: string;
|
|
398
|
-
subscription: {
|
|
399
|
-
id: string;
|
|
400
|
-
organizationId: string;
|
|
401
|
-
serviceCode: string;
|
|
402
|
-
planCode: string;
|
|
403
|
-
billingInterval: FFIDBillingInterval;
|
|
404
|
-
status: FFIDSubscriptionStatus;
|
|
405
|
-
/** Always null after successful cancellation */
|
|
406
|
-
pendingDowngradePlanId: null;
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
/** Parameters for previewing plan change */
|
|
410
|
-
interface FFIDPreviewPlanChangeParams {
|
|
411
|
-
/** Subscription ID (UUID) */
|
|
412
|
-
subscriptionId: string;
|
|
413
|
-
/** New plan code */
|
|
414
|
-
planCode: string;
|
|
415
|
-
/** New billing interval (default: keeps current) */
|
|
416
|
-
billingInterval?: FFIDBillingInterval;
|
|
417
|
-
}
|
|
418
|
-
/** Plan change preview line item */
|
|
419
|
-
interface FFIDPlanChangeLineItem {
|
|
420
|
-
description: string;
|
|
421
|
-
amount: number;
|
|
422
|
-
}
|
|
423
|
-
/** Fields shared by every plan-change preview variant (internal; consumers use `FFIDPlanChangePreview`) */
|
|
424
|
-
interface FFIDPlanChangePreviewBase {
|
|
425
|
-
/** Discriminant for preview response variants (reserved for future unions with e.g. seat-change previews) */
|
|
426
|
-
type: 'plan-change';
|
|
427
|
-
/** Current plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
|
|
428
|
-
currentPlan: {
|
|
429
|
-
name: string;
|
|
430
|
-
price: number;
|
|
431
|
-
};
|
|
432
|
-
/** New plan display info. `price` is the period total: flat fee, or per-seat price times quantity. */
|
|
433
|
-
newPlan: {
|
|
434
|
-
name: string;
|
|
435
|
-
price: number;
|
|
436
|
-
};
|
|
437
|
-
billingInterval: FFIDBillingInterval;
|
|
438
|
-
isUpgrade: boolean;
|
|
439
|
-
/** Full amount of the next billing cycle at the new plan's standard price. Never overwritten by Stripe proration data. */
|
|
440
|
-
nextInvoiceAmount: number;
|
|
441
|
-
nextInvoiceDate: string | null;
|
|
442
|
-
currency: FFIDSupportedCurrency;
|
|
443
|
-
/** true when amounts are estimated from local prices (no Stripe proration data) */
|
|
444
|
-
isEstimate: boolean;
|
|
445
|
-
/** Reason why `isEstimate` is true. Only meaningful when `isEstimate === true`. */
|
|
446
|
-
estimateReason?: 'no_stripe_data' | 'custom_pricing' | 'stripe_error';
|
|
447
|
-
lineItems: FFIDPlanChangeLineItem[];
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Plan change proration preview. It is computed with the same rules as `changePlan()`.
|
|
451
|
-
*
|
|
452
|
-
* `willApplyAtPeriodEnd` is a discriminant that constrains related fields at the type level:
|
|
453
|
-
* - `true`: a decrease reserved until the period end. `proratedAmount` is always 0 (nothing is
|
|
454
|
-
* charged or refunded now); `effectiveDate` mirrors the subscription's `currentPeriodEnd`
|
|
455
|
-
* (may be `null` when the subscription has no active billing cycle yet).
|
|
456
|
-
* - `false`: immediate change. `effectiveDate` is always `null`. For an increase,
|
|
457
|
-
* `proratedAmount` is the difference up to the current period end that is charged now
|
|
458
|
-
* (possibly Stripe-refined). A decrease on a contract that cannot be reserved also lands here:
|
|
459
|
-
* `0` for a contract without a Stripe subscription (no refund), but Stripe's prorated amount —
|
|
460
|
-
* negative, credited on the next invoice — for a Stripe contract with no period end yet
|
|
461
|
-
* (e.g. during a trial).
|
|
462
|
-
*/
|
|
463
|
-
type FFIDPlanChangePreview = FFIDPlanChangePreviewBase & ({
|
|
464
|
-
willApplyAtPeriodEnd: true;
|
|
465
|
-
effectiveDate: string | null;
|
|
466
|
-
/** 0 on period-end-deferred changes; charge happens at the next invoice */
|
|
467
|
-
proratedAmount: 0;
|
|
468
|
-
} | {
|
|
469
|
-
willApplyAtPeriodEnd: false;
|
|
470
|
-
effectiveDate: null;
|
|
471
|
-
/** Difference up to the current period end charged now (see the type doc for the decrease cases) */
|
|
472
|
-
proratedAmount: number;
|
|
473
|
-
});
|
|
474
|
-
/** Response from plan change preview endpoint */
|
|
475
|
-
interface FFIDPlanChangePreviewResponse {
|
|
476
|
-
preview: FFIDPlanChangePreview;
|
|
477
|
-
}
|
|
478
|
-
/** Parameters for previewing a seat count change */
|
|
479
|
-
interface FFIDPreviewSeatChangeParams {
|
|
480
|
-
/** Subscription ID (UUID) */
|
|
481
|
-
subscriptionId: string;
|
|
482
|
-
/** New seat quantity. Must be an integer within the plan's allowed range. */
|
|
483
|
-
quantity: number;
|
|
484
|
-
}
|
|
485
|
-
/** Seat change preview line item */
|
|
486
|
-
interface FFIDSeatChangeLineItem {
|
|
487
|
-
description: string;
|
|
488
|
-
amount: number;
|
|
489
|
-
}
|
|
490
|
-
/**
|
|
491
|
-
* Seat change proration preview.
|
|
492
|
-
*
|
|
493
|
-
* Sister type to `FFIDPlanChangePreview`. The shared `type` discriminant lets
|
|
494
|
-
* consumers narrow a preview payload without inspecting unrelated fields.
|
|
495
|
-
*
|
|
496
|
-
* - `willApplyAtPeriodEnd=true`: a seat reduction reserved until the period end.
|
|
497
|
-
* `proratedAmount` is 0 and `effectiveDate` is when the new seat count applies.
|
|
498
|
-
* - Otherwise the change applies immediately. For an increase, `proratedAmount` is the amount
|
|
499
|
-
* charged now up to the current period end. A reduction that cannot be reserved is normally
|
|
500
|
-
* `0`, but can be negative (a credit on the next invoice) for a Stripe contract with no period
|
|
501
|
-
* end yet or when only the contract unit price is known.
|
|
502
|
-
* - `isEstimate=true` (default when Stripe is not configured or data is unavailable):
|
|
503
|
-
* `proratedAmount` is computed locally. `isEstimate=false`: it reflects Stripe's live
|
|
504
|
-
* proration calculation.
|
|
505
|
-
*
|
|
506
|
-
* `nextInvoiceAmount` is a local estimate: flat period fee, or `unitPrice * newQuantity`.
|
|
507
|
-
* Flat capacity changes have zero prorated cost.
|
|
508
|
-
*
|
|
509
|
-
* `pricingUnavailable=true` means custom pricing or an unverified contracted Stripe
|
|
510
|
-
* Price. Hide amounts; zero is not a quote. `custom_pricing` permits the existing
|
|
511
|
-
* unbilled seat-change flow. Require another preview before confirmation only when
|
|
512
|
-
* pricing is unavailable and the reason is not `custom_pricing`. `stripe_error` also
|
|
513
|
-
* covers invoice/address failures after the contract price is known; use
|
|
514
|
-
* `pricingUnavailable`, not the reason alone, to decide whether to hide amounts.
|
|
515
|
-
* `no_stripe_data` means invoice proration is unavailable even if the contract unit
|
|
516
|
-
* price is known. Portal seat PUT independently enforces subscription limits;
|
|
517
|
-
* external consumers should guide users to the FFID portal for seat changes.
|
|
518
|
-
*/
|
|
519
|
-
interface FFIDSeatChangePreview {
|
|
520
|
-
/** flat: unitPrice is the whole period fee; per_seat: multiply by capacity. */
|
|
521
|
-
pricingModel?: 'per_seat' | 'flat';
|
|
522
|
-
/** Discriminant for preview response variants (pairs with `FFIDPlanChangePreview.type`) */
|
|
523
|
-
type: 'seat-change';
|
|
524
|
-
currentQuantity: number;
|
|
525
|
-
newQuantity: number;
|
|
526
|
-
/** Per-seat price for the current billing interval */
|
|
527
|
-
unitPrice: number;
|
|
528
|
-
billingInterval: FFIDBillingInterval;
|
|
529
|
-
/**
|
|
530
|
-
* Amount charged now for the rest of the current billing period. A reserved seat reduction
|
|
531
|
-
* (`willApplyAtPeriodEnd: true`) is always `0`; see the type doc for reductions that cannot
|
|
532
|
-
* be reserved. Also `0` when `pricingUnavailable === true`; hide it instead of quoting zero.
|
|
533
|
-
*/
|
|
534
|
-
proratedAmount: number;
|
|
535
|
-
/** Next invoice full amount — flat period fee or per-seat price times newQuantity */
|
|
536
|
-
nextInvoiceAmount: number;
|
|
537
|
-
nextInvoiceDate: string | null;
|
|
538
|
-
currency: FFIDSupportedCurrency;
|
|
539
|
-
/** true when proratedAmount is a local estimate rather than Stripe invoice/proration data */
|
|
540
|
-
isEstimate: boolean;
|
|
541
|
-
/** Hide amounts: custom pricing or contracted Stripe Price could not be verified. */
|
|
542
|
-
pricingUnavailable?: boolean;
|
|
543
|
-
/** Reason why `isEstimate` is true. Only meaningful when `isEstimate === true`. */
|
|
544
|
-
estimateReason?: 'no_stripe_data' | 'custom_pricing' | 'stripe_error';
|
|
545
|
-
/**
|
|
546
|
-
* `true` when the seat reduction would be reserved until the period end (8.0.0).
|
|
547
|
-
* Absent or `false` = the change applies immediately.
|
|
548
|
-
*/
|
|
549
|
-
willApplyAtPeriodEnd?: boolean;
|
|
550
|
-
/** When the reserved seat count applies (present when `willApplyAtPeriodEnd` is `true`) */
|
|
551
|
-
effectiveDate?: string | null;
|
|
552
|
-
lineItems: FFIDSeatChangeLineItem[];
|
|
553
|
-
}
|
|
554
|
-
/** Response from seat change preview endpoint */
|
|
555
|
-
interface FFIDSeatChangePreviewResponse {
|
|
556
|
-
preview: FFIDSeatChangePreview;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
162
|
/** Member role in an organization */
|
|
560
163
|
type FFIDMemberRole = 'owner' | 'admin' | 'member' | 'viewer';
|
|
561
164
|
/** Member role assignable through organization member management APIs */
|
|
@@ -900,12 +503,28 @@ interface FFIDSeatAssignmentRecord {
|
|
|
900
503
|
createdAt: string;
|
|
901
504
|
updatedAt: string;
|
|
902
505
|
}
|
|
903
|
-
/**
|
|
506
|
+
/**
|
|
507
|
+
* GET /api/v1/subscriptions/ext/{id}/seats/assignments のレスポンス
|
|
508
|
+
*
|
|
509
|
+
* 10.0.0(破壊的変更): flat 契約では `totalSeats` = 人数枠(`maxMembers`)で、
|
|
510
|
+
* 無制限のプランでは `totalSeats` / `availableSeats` が `null` になる。
|
|
511
|
+
* `pricingModel` で分岐すること(#6395(10.0.0)で assignments にも追加。それより前の FFID は返さない)。
|
|
512
|
+
*/
|
|
904
513
|
interface FFIDListSeatAssignmentsResponse {
|
|
905
514
|
assignments: FFIDSeatAssignmentWithUser[];
|
|
906
|
-
|
|
515
|
+
/** 課金モデル。#6395(10.0.0)で assignments にも追加(それより前の FFID サーバーは返さない) */
|
|
516
|
+
pricingModel?: 'per_seat' | 'flat';
|
|
517
|
+
/** per_seat: 契約の席数。flat: 人数枠(`null` = 無制限) */
|
|
518
|
+
totalSeats: number | null;
|
|
907
519
|
assignedSeats: number;
|
|
908
|
-
|
|
520
|
+
/** 残り。flat で無制限のときは `null` */
|
|
521
|
+
availableSeats: number | null;
|
|
522
|
+
/** flat のみ: 人数枠(`null` = 無制限) */
|
|
523
|
+
maxMembers?: number | null;
|
|
524
|
+
/** flat のみ: 割り当て済みの人数 */
|
|
525
|
+
assignedMembers?: number;
|
|
526
|
+
/** flat のみ: 残りの人数枠(`null` = 無制限) */
|
|
527
|
+
availableMembers?: number | null;
|
|
909
528
|
}
|
|
910
529
|
/** listSeatAssignments のパラメータ */
|
|
911
530
|
interface FFIDListSeatAssignmentsParams {
|
|
@@ -1551,107 +1170,6 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
1551
1170
|
};
|
|
1552
1171
|
}
|
|
1553
1172
|
|
|
1554
|
-
/** Deployment environments a catalog publication can apply to (single source) */
|
|
1555
|
-
declare const FFID_CATALOG_ENVIRONMENTS: readonly ["staging", "production"];
|
|
1556
|
-
/** Deployment environment a catalog publication applies to */
|
|
1557
|
-
type FFIDCatalogEnvironment = (typeof FFID_CATALOG_ENVIRONMENTS)[number];
|
|
1558
|
-
/**
|
|
1559
|
-
* Tax behavior of a published price.
|
|
1560
|
-
* `inclusive`: displayed price contains Stripe-calculated tax.
|
|
1561
|
-
* `exclusive`: tax is added on top of the base price.
|
|
1562
|
-
*/
|
|
1563
|
-
type FFIDTaxBehavior = 'inclusive' | 'exclusive';
|
|
1564
|
-
/**
|
|
1565
|
-
* Publication lifecycle statuses (single source — the type, the SDK runtime
|
|
1566
|
-
* validator, and consumer sets all derive from this tuple so a new literal
|
|
1567
|
-
* cannot be added to one side only).
|
|
1568
|
-
*/
|
|
1569
|
-
declare const FFID_CATALOG_PUBLICATION_STATUSES: readonly ["approved", "superseded", "revoking", "revoked"];
|
|
1570
|
-
/**
|
|
1571
|
-
* Publication lifecycle status.
|
|
1572
|
-
* - `approved`: sellable — the only status that permits new paid checkout
|
|
1573
|
-
* - `superseded`: replaced by a newer revision (old sessions may sell through
|
|
1574
|
-
* until `sellThroughUntil`)
|
|
1575
|
-
* - `revoking`: emergency stop in progress — never sellable
|
|
1576
|
-
* - `revoked`: emergency stop completed — never sellable
|
|
1577
|
-
*/
|
|
1578
|
-
type FFIDCatalogPublicationStatus = (typeof FFID_CATALOG_PUBLICATION_STATUSES)[number];
|
|
1579
|
-
/**
|
|
1580
|
-
* Human-approved publication record binding a catalog revision to the
|
|
1581
|
-
* content/config hashes reviewed at approval time.
|
|
1582
|
-
*
|
|
1583
|
-
* All `*Hash` fields are lowercase SHA-256 hex computed with the shared
|
|
1584
|
-
* canonicalization helpers in `shared/catalog-hash` — consumers re-hash the
|
|
1585
|
-
* content they actually render and must refuse new sales on any mismatch.
|
|
1586
|
-
*/
|
|
1587
|
-
interface FFIDCatalogPublication {
|
|
1588
|
-
serviceCode: string;
|
|
1589
|
-
environment: FFIDCatalogEnvironment;
|
|
1590
|
-
catalogVersion: string;
|
|
1591
|
-
praxisCopyHash: string;
|
|
1592
|
-
ffidCheckoutCopyHash: string;
|
|
1593
|
-
legalDisclosureHash: string;
|
|
1594
|
-
taxConfigurationHash: string;
|
|
1595
|
-
paymentConfigurationHash: string;
|
|
1596
|
-
scopeHash: string;
|
|
1597
|
-
/** Monotonically increasing per (service, environment) publication counter */
|
|
1598
|
-
salesEpoch: number;
|
|
1599
|
-
/** FFID-generated immutable human-review approval ID */
|
|
1600
|
-
approvalId: string;
|
|
1601
|
-
/** ISO 8601 timestamp of the recorded human review */
|
|
1602
|
-
reviewedAt: string;
|
|
1603
|
-
/** ISO 8601 timestamp the publication became effective */
|
|
1604
|
-
effectiveAt: string;
|
|
1605
|
-
/** ISO 8601 timestamp the publication was superseded (null while current) */
|
|
1606
|
-
supersededAt: string | null;
|
|
1607
|
-
/** ISO 8601 upper bound for old-session sell-through (null unless superseded) */
|
|
1608
|
-
sellThroughUntil: string | null;
|
|
1609
|
-
/** ISO 8601 timestamp an emergency revoke took effect (null unless revoking/revoked) */
|
|
1610
|
-
revocationEffectiveAt: string | null;
|
|
1611
|
-
status: FFIDCatalogPublicationStatus;
|
|
1612
|
-
}
|
|
1613
|
-
/**
|
|
1614
|
-
* A plan inside a published catalog revision (public-safe snapshot).
|
|
1615
|
-
* Never contains Stripe Product/Price identifiers or other secrets.
|
|
1616
|
-
*/
|
|
1617
|
-
interface FFIDPublishedPlan {
|
|
1618
|
-
/**
|
|
1619
|
-
* Plan code — always a lowercase slug (`^[a-z0-9][a-z0-9_-]*$`).
|
|
1620
|
-
* Per-service open set; see the FFID repo's
|
|
1621
|
-
* `docs/04-api/PLAN_CODE_CONTRACT.md` for the full guarantees.
|
|
1622
|
-
*/
|
|
1623
|
-
code: string;
|
|
1624
|
-
name: string;
|
|
1625
|
-
description: string | null;
|
|
1626
|
-
/** Monthly price in the catalog currency; null when monthly is not offered */
|
|
1627
|
-
priceMonthly: number | null;
|
|
1628
|
-
/** Yearly price in the catalog currency; null when yearly is not offered */
|
|
1629
|
-
priceYearly: number | null;
|
|
1630
|
-
currency: string;
|
|
1631
|
-
/** Billing intervals actually purchasable for this plan */
|
|
1632
|
-
billingIntervals: FFIDBillingInterval[];
|
|
1633
|
-
taxBehavior: FFIDTaxBehavior;
|
|
1634
|
-
minSeats: number;
|
|
1635
|
-
maxSeats: number | null;
|
|
1636
|
-
displayOrder: number;
|
|
1637
|
-
}
|
|
1638
|
-
/**
|
|
1639
|
-
* Response of GET /api/v1/subscriptions/ext/catalog/{serviceCode}.
|
|
1640
|
-
*
|
|
1641
|
-
* `catalogVersion` always equals `publication.catalogVersion`; it is hoisted
|
|
1642
|
-
* to the top level so consumers can pin the version (e.g. as
|
|
1643
|
-
* `expectedCatalogVersion` for checkout) without digging into the publication.
|
|
1644
|
-
*/
|
|
1645
|
-
interface FFIDPublishedCatalog {
|
|
1646
|
-
service: {
|
|
1647
|
-
code: string;
|
|
1648
|
-
name: string;
|
|
1649
|
-
};
|
|
1650
|
-
catalogVersion: string;
|
|
1651
|
-
publication: FFIDCatalogPublication;
|
|
1652
|
-
plans: FFIDPublishedPlan[];
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
1173
|
/** OTP / magic link methods - sendOtp / verifyOtp */
|
|
1656
1174
|
|
|
1657
1175
|
/** Response from sendOtp */
|
|
@@ -1863,6 +1381,45 @@ declare const FFID_SUBSCRIPTION_ERROR_CODES: {
|
|
|
1863
1381
|
};
|
|
1864
1382
|
/** Union of `FFID_SUBSCRIPTION_ERROR_CODES` values */
|
|
1865
1383
|
type FFIDSubscriptionErrorCode = (typeof FFID_SUBSCRIPTION_ERROR_CODES)[keyof typeof FFID_SUBSCRIPTION_ERROR_CODES];
|
|
1384
|
+
/**
|
|
1385
|
+
* Server error codes of the Credits API and the flat-plan member limit (10.0.0,
|
|
1386
|
+
* FFID CREDITS_API §6). They arrive verbatim in `FFIDError.code`.
|
|
1387
|
+
*
|
|
1388
|
+
* - `CREDITS_INSUFFICIENT` (409, `credits.consume`): nothing was consumed and the
|
|
1389
|
+
* idempotency key is still unused. `details` is `FFIDCreditsInsufficientDetails`.
|
|
1390
|
+
* Do not retry automatically; show the credit purchase path.
|
|
1391
|
+
* - `CREDITS_IDEMPOTENCY_CONFLICT` (409): the same idempotency key with another amount.
|
|
1392
|
+
* A caller bug — do not retry.
|
|
1393
|
+
* - `CREDITS_NOT_APPLICABLE` (409): the contract's plan is per_seat (not credit-based).
|
|
1394
|
+
* - `CREDITS_BALANCE_CAP_EXCEEDED` (409): a grant would push the balance over the cap.
|
|
1395
|
+
* - `SEAT_BILLING_NOT_APPLICABLE` (409): seat-count changes on a flat contract.
|
|
1396
|
+
* - `MEMBER_LIMIT_REACHED` (409): seat assignment while the plan's member limit is full
|
|
1397
|
+
* (`details: { capacity, assigned }`).
|
|
1398
|
+
* - `CREDIT_PACK_NOT_FOUND` (404): unknown or inactive `packCode`.
|
|
1399
|
+
* - `CREDIT_PACK_REGION_NOT_SUPPORTED` (409): billing address outside the sales region.
|
|
1400
|
+
* - `CREDIT_PACK_STRIPE_NOT_SYNCED` / `CREDIT_PACK_STRIPE_OUT_OF_SYNC` (409): the pack
|
|
1401
|
+
* is waiting for an operator to sync its Stripe price.
|
|
1402
|
+
* - `CREDIT_PACK_CHANGED` (409): the pack changed while the checkout was being created.
|
|
1403
|
+
* Safe to retry.
|
|
1404
|
+
*
|
|
1405
|
+
* The values and statuses are checked against the FFID server's definitions by a test
|
|
1406
|
+
* in the FFID repository.
|
|
1407
|
+
*/
|
|
1408
|
+
declare const FFID_CREDITS_ERROR_CODES: {
|
|
1409
|
+
readonly CREDITS_INSUFFICIENT: "CREDITS_INSUFFICIENT";
|
|
1410
|
+
readonly CREDITS_IDEMPOTENCY_CONFLICT: "CREDITS_IDEMPOTENCY_CONFLICT";
|
|
1411
|
+
readonly CREDITS_NOT_APPLICABLE: "CREDITS_NOT_APPLICABLE";
|
|
1412
|
+
readonly CREDITS_BALANCE_CAP_EXCEEDED: "CREDITS_BALANCE_CAP_EXCEEDED";
|
|
1413
|
+
readonly SEAT_BILLING_NOT_APPLICABLE: "SEAT_BILLING_NOT_APPLICABLE";
|
|
1414
|
+
readonly MEMBER_LIMIT_REACHED: "MEMBER_LIMIT_REACHED";
|
|
1415
|
+
readonly CREDIT_PACK_NOT_FOUND: "CREDIT_PACK_NOT_FOUND";
|
|
1416
|
+
readonly CREDIT_PACK_REGION_NOT_SUPPORTED: "CREDIT_PACK_REGION_NOT_SUPPORTED";
|
|
1417
|
+
readonly CREDIT_PACK_STRIPE_NOT_SYNCED: "CREDIT_PACK_STRIPE_NOT_SYNCED";
|
|
1418
|
+
readonly CREDIT_PACK_STRIPE_OUT_OF_SYNC: "CREDIT_PACK_STRIPE_OUT_OF_SYNC";
|
|
1419
|
+
readonly CREDIT_PACK_CHANGED: "CREDIT_PACK_CHANGED";
|
|
1420
|
+
};
|
|
1421
|
+
/** Union of `FFID_CREDITS_ERROR_CODES` values */
|
|
1422
|
+
type FFIDCreditsErrorCode = (typeof FFID_CREDITS_ERROR_CODES)[keyof typeof FFID_CREDITS_ERROR_CODES];
|
|
1866
1423
|
|
|
1867
1424
|
/** Creates an FFID API client instance */
|
|
1868
1425
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
@@ -1950,6 +1507,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1950
1507
|
getInvoice: (params: FFIDGetInvoiceParams) => Promise<FFIDApiResponse<FFIDGetInvoiceResponse>>;
|
|
1951
1508
|
retryPayment: (params: FFIDRetryPaymentParams) => Promise<FFIDApiResponse<FFIDRetryPaymentSummary>>;
|
|
1952
1509
|
listSeatAssignments: (params: FFIDListSeatAssignmentsParams) => Promise<FFIDApiResponse<FFIDListSeatAssignmentsResponse>>;
|
|
1510
|
+
getSeats: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDSeatsSummary>>;
|
|
1953
1511
|
assignSeats: (params: FFIDAssignSeatsParams) => Promise<FFIDApiResponse<FFIDAssignSeatsResponse>>;
|
|
1954
1512
|
unassignSeat: (params: FFIDUnassignSeatParams) => Promise<FFIDApiResponse<FFIDUnassignSeatResponse>>;
|
|
1955
1513
|
listPlans: () => Promise<FFIDApiResponse<FFIDListPlansResponse>>;
|
|
@@ -1960,13 +1518,16 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1960
1518
|
cancelSubscription: (params: FFIDCancelSubscriptionParams) => Promise<FFIDApiResponse<FFIDCancelSubscriptionResponse>>;
|
|
1961
1519
|
cancelPendingDowngrade: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDCancelPendingDowngradeResponse>>;
|
|
1962
1520
|
previewPlanChange: (params: FFIDPreviewPlanChangeParams) => Promise<FFIDApiResponse<FFIDPlanChangePreviewResponse>>;
|
|
1521
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
1963
1522
|
previewSeatChange: (params: FFIDPreviewSeatChangeParams) => Promise<FFIDApiResponse<FFIDSeatChangePreviewResponse>>;
|
|
1964
1523
|
verifyAccessToken: (accessToken: string, options?: FFIDVerifyAccessTokenOptions) => Promise<FFIDApiResponse<FFIDOAuthUserInfo>>;
|
|
1965
1524
|
getSubscribeUrl: (options?: ContractWizardSubscribeOptions) => string;
|
|
1966
1525
|
redirectToSubscribe: (options?: ContractWizardSubscribeOptions) => FFIDRedirectResult;
|
|
1967
1526
|
getChangePlanUrl: (subscriptionId: string, options?: ContractWizardSubscriptionOptions) => string;
|
|
1968
1527
|
redirectToChangePlan: (subscriptionId: string, options?: ContractWizardSubscriptionOptions) => FFIDRedirectResult;
|
|
1528
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
1969
1529
|
getChangeSeatsUrl: (subscriptionId: string, options?: ContractWizardSubscriptionOptions) => string;
|
|
1530
|
+
/** @deprecated 10.0.0: per_seat (praxis) only; removed in 11.0.0 */
|
|
1970
1531
|
redirectToChangeSeats: (subscriptionId: string, options?: ContractWizardSubscriptionOptions) => FFIDRedirectResult;
|
|
1971
1532
|
getRecoverPaymentUrl: (subscriptionId: string, options?: ContractWizardSubscriptionOptions) => string;
|
|
1972
1533
|
redirectToRecoverPayment: (subscriptionId: string, options?: ContractWizardSubscriptionOptions) => FFIDRedirectResult;
|
|
@@ -1994,6 +1555,16 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1994
1555
|
inquiry: {
|
|
1995
1556
|
create: (params: FFIDInquiryCreateParams) => Promise<FFIDApiResponse<FFIDInquiryCreateResponse>>;
|
|
1996
1557
|
};
|
|
1558
|
+
/** Credits methods for flat plans (consume / balance / history / packs) */
|
|
1559
|
+
credits: {
|
|
1560
|
+
getBalance: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDCreditBalance>>;
|
|
1561
|
+
listHistory: (subscriptionId: string, options?: FFIDListCreditHistoryOptions) => Promise<FFIDApiResponse<FFIDCreditHistoryPage>>;
|
|
1562
|
+
listPacks: (packServiceCode?: string) => Promise<FFIDApiResponse<FFIDCreditPackList>>;
|
|
1563
|
+
createPackCheckout: (params: FFIDCreatePackCheckoutParams) => Promise<FFIDApiResponse<FFIDCreditPackCheckout>>;
|
|
1564
|
+
consume: (params: FFIDCreditConsumeParams) => Promise<FFIDApiResponse<FFIDCreditConsumeResult>>;
|
|
1565
|
+
getBuyCreditsUrl: (params: FFIDBuyCreditsUrlParams) => FFIDApiResponse<string>;
|
|
1566
|
+
redirectToBuyCredits: (params: FFIDBuyCreditsUrlParams) => FFIDRedirectResult;
|
|
1567
|
+
};
|
|
1997
1568
|
/** Token store (token mode only) */
|
|
1998
1569
|
tokenStore: TokenStore;
|
|
1999
1570
|
/**
|
|
@@ -2033,6 +1604,10 @@ declare class FFIDSDKError extends Error {
|
|
|
2033
1604
|
* validates the OAuth `state` against the value persisted at authorize time
|
|
2034
1605
|
* (CSRF protection, RFC 6749 §10.12), retrieves the PKCE verifier, exchanges
|
|
2035
1606
|
* the code for tokens, and cleans the params out of the URL on success.
|
|
1607
|
+
*
|
|
1608
|
+
* When FFID refused the user, the callback carries `error` (+ FFID's
|
|
1609
|
+
* `denial_reason`) instead of `code` (#6523). After the same `state` check the
|
|
1610
|
+
* error is returned as an authorization error (see `./authorization-error`).
|
|
2036
1611
|
*/
|
|
2037
1612
|
|
|
2038
1613
|
/**
|
|
@@ -2050,8 +1625,9 @@ interface HandleRedirectCallbackOptions {
|
|
|
2050
1625
|
url?: string | undefined;
|
|
2051
1626
|
/**
|
|
2052
1627
|
* Whether to remove `code` / `state` from the browser URL via
|
|
2053
|
-
* `window.history.replaceState` after a successful exchange
|
|
2054
|
-
* `
|
|
1628
|
+
* `window.history.replaceState` after a successful exchange — and, on an
|
|
1629
|
+
* authorization error, `state` only (#6523; see {@link ERROR_CALLBACK_CONSUMED_PARAMS}).
|
|
1630
|
+
* Defaults to `true`.
|
|
2055
1631
|
*
|
|
2056
1632
|
* Set to `false` to take over URL cleanup on the consumer side. This matters
|
|
2057
1633
|
* on Next.js App Router: the App Router patches `history.replaceState`, so
|
|
@@ -2071,7 +1647,9 @@ interface HandleRedirectCallbackOptions {
|
|
|
2071
1647
|
* Complete an OAuth authorization-code redirect.
|
|
2072
1648
|
*
|
|
2073
1649
|
* Behavior:
|
|
2074
|
-
* 1. Reads `code` + `state` from `options.url ?? window.location.search`.
|
|
1650
|
+
* 1. Reads `code` + `state` (or `error`) from `options.url ?? window.location.search`.
|
|
1651
|
+
* A URL with no `code` — and no `error` carrying a `state` — returns
|
|
1652
|
+
* `MISSING_AUTHORIZATION_CODE` without touching the stored state.
|
|
2075
1653
|
* 2. CSRF guard: if a `state` exists on EITHER side (a stored state from
|
|
2076
1654
|
* authorize OR a `state` on the callback URL), the two MUST match — mismatch,
|
|
2077
1655
|
* a missing stored state, or an **omitted** callback `state` all **fail closed**
|
|
@@ -2081,6 +1659,17 @@ interface HandleRedirectCallbackOptions {
|
|
|
2081
1659
|
* 3. Retrieves the PKCE verifier and exchanges the code for tokens.
|
|
2082
1660
|
* 4. On success, removes `code` + `state` from the browser URL (skipped when
|
|
2083
1661
|
* `options.cleanUrl` is `false` — the consumer then owns URL cleanup).
|
|
1662
|
+
* 5. When the URL carries `error` **and** `state` (FFID refused the user),
|
|
1663
|
+
* returns it as an authorization error after step 2 instead of exchanging
|
|
1664
|
+
* anything. Unlike a code callback there is no no-state leniency: the URL
|
|
1665
|
+
* `state` must match a stored one, so a crafted `?error=...&error_description=`
|
|
1666
|
+
* link cannot be shown as a denial (content spoofing). `code` is
|
|
1667
|
+
* the OAuth `error` (e.g. `access_denied`) and `details` holds FFID's
|
|
1668
|
+
* `denial_reason` — read it with `getFFIDAuthorizationError`. The PKCE
|
|
1669
|
+
* verifier is discarded and the consumed `state` is removed from the URL
|
|
1670
|
+
* (same `cleanUrl` rule), so a reload does not re-process it. `error` /
|
|
1671
|
+
* `error_description` / `denial_reason` stay in the URL.
|
|
1672
|
+
* Do not call `login()` again on this error: FFID refuses the same way.
|
|
2084
1673
|
*
|
|
2085
1674
|
* SSR-safe: when there is no `window` and no `options.url`, no exchange is
|
|
2086
1675
|
* attempted and an error result is returned.
|
|
@@ -2090,6 +1679,77 @@ interface HandleRedirectCallbackOptions {
|
|
|
2090
1679
|
*/
|
|
2091
1680
|
declare function handleRedirectCallback(client: HandleRedirectCallbackClient, options?: HandleRedirectCallbackOptions): Promise<FFIDApiResponse<void>>;
|
|
2092
1681
|
|
|
1682
|
+
/**
|
|
1683
|
+
* OAuth authorization errors returned to the service's `redirect_uri` (#6523)
|
|
1684
|
+
*
|
|
1685
|
+
* When FFID's `/oauth/authorize` refuses a user, it redirects back with
|
|
1686
|
+
* `error=<OAuth error>&error_description=...&state=...` (RFC 6749 §4.1.2.1). For
|
|
1687
|
+
* subscription / seat denials it also adds the FFID extension `denial_reason`
|
|
1688
|
+
* (#6498), so a service can tell "no seat in this organization" from "no
|
|
1689
|
+
* subscription" without parsing `error_description`.
|
|
1690
|
+
*
|
|
1691
|
+
* Both callback paths build the same {@link FFIDError} from those params:
|
|
1692
|
+
* - `handleRedirectCallback` / token-mode `FFIDProvider` (browser, PKCE)
|
|
1693
|
+
* - `createServerAuthClient().handleCallback` (confidential / BFF)
|
|
1694
|
+
*
|
|
1695
|
+
* `error.code` is the OAuth `error` value verbatim (e.g. `access_denied`), and
|
|
1696
|
+
* `error.details` is {@link FFIDAuthorizationErrorDetails}. Read it with
|
|
1697
|
+
* {@link getFFIDAuthorizationError}.
|
|
1698
|
+
*
|
|
1699
|
+
* This module has no browser dependency so the server entry can share it.
|
|
1700
|
+
*/
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* Values of FFID's `denial_reason` (the authorize error redirect and the
|
|
1704
|
+
* `/oauth/userinfo` 403; `/oauth/introspect` only answers `active: false`). Kept
|
|
1705
|
+
* identical to the FFID server's `DENIAL_REASONS` by a test in the FFID repository.
|
|
1706
|
+
*
|
|
1707
|
+
* This is a different vocabulary from `FFIDServiceAccessDenialReason`
|
|
1708
|
+
* (`checkServiceAccess()`), which is derived from the subscription status.
|
|
1709
|
+
*/
|
|
1710
|
+
declare const FFID_OAUTH_DENIAL_REASONS: readonly ["no_membership", "no_active_subscription", "no_seat_assignment", "subscription_expired", "member_limit_reached"];
|
|
1711
|
+
type FFIDOAuthDenialReason = (typeof FFID_OAUTH_DENIAL_REASONS)[number];
|
|
1712
|
+
/** Runtime guard for {@link FFIDOAuthDenialReason}. Unknown values are `false`. */
|
|
1713
|
+
declare function isFFIDOAuthDenialReason(value: unknown): value is FFIDOAuthDenialReason;
|
|
1714
|
+
/** `FFIDError.details` of an authorization error */
|
|
1715
|
+
interface FFIDAuthorizationErrorDetails {
|
|
1716
|
+
/** Marks the error as an authorize redirect error (vs. token / network errors) */
|
|
1717
|
+
source: 'authorization';
|
|
1718
|
+
/**
|
|
1719
|
+
* FFID's `denial_reason`. `null` when FFID did not send one (any OAuth error other
|
|
1720
|
+
* than a subscription / seat denial) **or** sent a value this SDK version does not
|
|
1721
|
+
* know — the error itself is still returned, only the reason is unknown.
|
|
1722
|
+
*/
|
|
1723
|
+
denialReason: FFIDOAuthDenialReason | null;
|
|
1724
|
+
/**
|
|
1725
|
+
* `error_description` as sent — short ASCII English meant for logs. The same text
|
|
1726
|
+
* is `error.message` (when FFID sent one), so show end users guidance chosen by
|
|
1727
|
+
* `denialReason` rather than the message itself.
|
|
1728
|
+
*/
|
|
1729
|
+
errorDescription: string | null;
|
|
1730
|
+
}
|
|
1731
|
+
/** An authorization error read back by {@link getFFIDAuthorizationError} */
|
|
1732
|
+
interface FFIDAuthorizationError {
|
|
1733
|
+
/** The OAuth `error` value, e.g. `access_denied`, `login_required` */
|
|
1734
|
+
oauthError: string;
|
|
1735
|
+
denialReason: FFIDOAuthDenialReason | null;
|
|
1736
|
+
errorDescription: string | null;
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* Read an authorization error (and FFID's `denial_reason`) from an {@link FFIDError},
|
|
1740
|
+
* e.g. `useFFID().error` or the result of `handleRedirectCallback` /
|
|
1741
|
+
* `createServerAuthClient().handleCallback`. Returns `null` for any other error.
|
|
1742
|
+
*
|
|
1743
|
+
* ```ts
|
|
1744
|
+
* const denial = getFFIDAuthorizationError(error)
|
|
1745
|
+
* if (denial?.denialReason === 'no_seat_assignment') {
|
|
1746
|
+
* // Ask an organization owner / admin to add the user. Do not call login() again:
|
|
1747
|
+
* // FFID would refuse the same way.
|
|
1748
|
+
* }
|
|
1749
|
+
* ```
|
|
1750
|
+
*/
|
|
1751
|
+
declare function getFFIDAuthorizationError(error: FFIDError | null | undefined): FFIDAuthorizationError | null;
|
|
1752
|
+
|
|
2093
1753
|
/**
|
|
2094
1754
|
* Redirect URI normalization (SDK copy)
|
|
2095
1755
|
*
|
|
@@ -2380,7 +2040,10 @@ interface FFIDProviderProps extends FFIDConfig {
|
|
|
2380
2040
|
* Set to `false` on Next.js App Router when the patched history API
|
|
2381
2041
|
* re-evaluating `useSearchParams()` (and re-running effects that depend on
|
|
2382
2042
|
* it) is a problem — then remove `code` / `state` yourself (keeping other
|
|
2383
|
-
* query params) after authentication completes.
|
|
2043
|
+
* query params) after authentication completes. When FFID refused the user
|
|
2044
|
+
* (`?error=` callback, #6523), the provider removes only the consumed `state`
|
|
2045
|
+
* under the same rule (`error` / `denial_reason` stay for the app to read), so
|
|
2046
|
+
* with `false` remove `state` too. Consumed callback params
|
|
2384
2047
|
* left in the URL fail on reload with `STATE_MISMATCH_ERROR` (the one-time
|
|
2385
2048
|
* OAuth `state` was already consumed), which also leaves an authenticated
|
|
2386
2049
|
* user rendered as signed-out until the URL is cleaned.
|
|
@@ -2915,6 +2578,46 @@ declare function hasAccessFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null
|
|
|
2915
2578
|
*/
|
|
2916
2579
|
declare function isBlockedFromUserinfo(sub: FFIDOAuthUserInfoSubscription | null | undefined): boolean;
|
|
2917
2580
|
|
|
2581
|
+
/**
|
|
2582
|
+
* Credits methods — `client.credits.*` (SDK 10.0.0 / FFID #6395, CREDITS_API.md v1.3.1).
|
|
2583
|
+
*
|
|
2584
|
+
* For `pricing_model='flat'` contracts. per_seat (praxis) contracts answer every
|
|
2585
|
+
* call with 409 `CREDITS_NOT_APPLICABLE`.
|
|
2586
|
+
*
|
|
2587
|
+
* Auth modes (CREDITS_API §2):
|
|
2588
|
+
* - `consume`: service-key only (`credits:write`). Other modes get `FORBIDDEN`
|
|
2589
|
+
* with `details.reason: 'api_key_required'` before the network — the same code
|
|
2590
|
+
* and shape the server returns.
|
|
2591
|
+
* - `createPackCheckout`: token (Bearer) only, by an owner / admin of the contract's
|
|
2592
|
+
* organization. Other modes get `FORBIDDEN` with `details.reason: 'bearer_required'`.
|
|
2593
|
+
* - `getBalance` / `listHistory` / `listPacks`: token or service-key.
|
|
2594
|
+
*
|
|
2595
|
+
* Nothing here throws: business errors such as `CREDITS_INSUFFICIENT` come back as
|
|
2596
|
+
* `{ error }` with the server's `details`.
|
|
2597
|
+
*/
|
|
2598
|
+
|
|
2599
|
+
/** Dependencies required by credits methods */
|
|
2600
|
+
interface CreditsMethodsDeps {
|
|
2601
|
+
fetchWithAuth: <T>(endpoint: string, options?: RequestInit) => Promise<FFIDApiResponse<T>>;
|
|
2602
|
+
createError: (code: string, message: string) => FFIDError;
|
|
2603
|
+
authMode: FFIDAuthMode;
|
|
2604
|
+
baseUrl: string;
|
|
2605
|
+
serviceCode: string;
|
|
2606
|
+
logger: FFIDLogger;
|
|
2607
|
+
}
|
|
2608
|
+
/** Create `client.credits.*` bound to the client's fetchWithAuth */
|
|
2609
|
+
declare function createCreditsMethods(deps: CreditsMethodsDeps): {
|
|
2610
|
+
getBalance: (subscriptionId: string) => Promise<FFIDApiResponse<FFIDCreditBalance>>;
|
|
2611
|
+
listHistory: (subscriptionId: string, options?: FFIDListCreditHistoryOptions) => Promise<FFIDApiResponse<FFIDCreditHistoryPage>>;
|
|
2612
|
+
listPacks: (packServiceCode?: string) => Promise<FFIDApiResponse<FFIDCreditPackList>>;
|
|
2613
|
+
createPackCheckout: (params: FFIDCreatePackCheckoutParams) => Promise<FFIDApiResponse<FFIDCreditPackCheckout>>;
|
|
2614
|
+
consume: (params: FFIDCreditConsumeParams) => Promise<FFIDApiResponse<FFIDCreditConsumeResult>>;
|
|
2615
|
+
getBuyCreditsUrl: (params: FFIDBuyCreditsUrlParams) => FFIDApiResponse<string>;
|
|
2616
|
+
redirectToBuyCredits: (params: FFIDBuyCreditsUrlParams) => FFIDRedirectResult;
|
|
2617
|
+
};
|
|
2618
|
+
/** Type of `client.credits` */
|
|
2619
|
+
type FFIDCreditsClient = ReturnType<typeof createCreditsMethods>;
|
|
2620
|
+
|
|
2918
2621
|
/**
|
|
2919
2622
|
* Catalog approval hash helpers (#4342 / ASDD-PRICING-002 SP4A)
|
|
2920
2623
|
*
|
|
@@ -3255,4 +2958,4 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
3255
2958
|
};
|
|
3256
2959
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
3257
2960
|
|
|
3258
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, type AgencyInviteCookieOptions, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, type CaptureAgencyInviteTokenOptions, type CaptureAgencyInviteTokenResult, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, type ExchangeCodeForTokensOptions, FFIDAccountType, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, type FFIDAllowedLogoMimeType, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDBillingInterval, FFIDCacheAdapter,
|
|
2961
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, type AgencyInviteCookieOptions, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, type CaptureAgencyInviteTokenOptions, type CaptureAgencyInviteTokenResult, type ComputeEffectiveStatusInput, type ContractWizardFlowType, type ContractWizardResubscribeOptions, type ContractWizardSubscribeOptions, type ContractWizardSubscriptionOptions, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, type ExchangeCodeForTokensOptions, FFIDAccountType, type FFIDAddMemberParams, type FFIDAddMemberRequest, type FFIDAddMemberResponse, type FFIDAllowedLogoMimeType, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDAssignableMemberRole, type FFIDAuthorizationError, type FFIDAuthorizationErrorDetails, FFIDBillingInterval, FFIDBuyCreditsUrlParams, FFIDCacheAdapter, FFIDCancelPendingDowngradeResponse, FFIDCancelSubscriptionParams, FFIDCancelSubscriptionResponse, type FFIDCanonicalJsonValue, FFIDCatalogEnvironment, FFIDCatalogHashError, FFIDChangePlanParams, FFIDChangePlanResponse, FFIDCheckServiceAccessParams, type FFIDCheckoutSessionResponse, type FFIDClient, type FFIDCompanySizeCode, FFIDConfig, type FFIDCreateCheckoutParams, FFIDCreatePackCheckoutParams, type FFIDCreatePortalParams, FFIDCreditBalance, FFIDCreditConsumeParams, FFIDCreditConsumeResult, FFIDCreditHistoryPage, FFIDCreditPackCheckout, FFIDCreditPackList, type FFIDCreditsClient, type FFIDCreditsErrorCode, FFIDError, type FFIDErrorCode, type FFIDIndustryCode, type FFIDInquiryClient, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, type FFIDInvitationStatus, type FFIDInviteMemberRequest, type FFIDInviteMemberResponse, type FFIDLeaveOrganizationParams, type FFIDLeaveOrganizationResponse, FFIDListCreditHistoryOptions, type FFIDListMembersResponse, FFIDListPlansResponse, type FFIDListingConsentInput, FFIDLogger, type FFIDLoginHistoryEntry, type FFIDLoginHistoryResponse, type FFIDLogoWallEntry, type FFIDLogoWallResponse, type FFIDMemberRole, type FFIDMemberStatus, type FFIDNewsletterBodySource, type FFIDNewsletterCampaignStatus, type FFIDNewsletterClient, type FFIDNewsletterConfirmParams, type FFIDNewsletterConfirmResponse, type FFIDNewsletterDispatchParams, type FFIDNewsletterDispatchResponse, type FFIDNewsletterSegment, type FFIDNewsletterSubscribeParams, type FFIDNewsletterSubscribeResponse, type FFIDNewsletterType, type FFIDNewsletterUnsubscribeParams, type FFIDNewsletterUnsubscribeResponse, type FFIDOAuthDenialReason, type FFIDOAuthTokenResponse, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, type FFIDOrganizationDomain, type FFIDOrganizationDomainsResponse, type FFIDOrganizationLogoUploadResponse, type FFIDOrganizationMember, type FFIDOrganizationNotificationPreferences, type FFIDOrganizationNotificationPreferencesResponse, type FFIDOrganizationProfile, type FFIDOrganizationProfileErrorCode, type FFIDOrganizationProfileResponse, type FFIDOtpSendResponse, type FFIDOtpVerifyResponse, type FFIDPasswordResetConfirmResponse, type FFIDPasswordResetResponse, type FFIDPasswordResetVerifyResponse, type FFIDPaymentConfiguration, FFIDPlanChangePreviewResponse, type FFIDPortalSessionResponse, FFIDPreviewPlanChangeParams, FFIDPreviewSeatChangeParams, type FFIDProfileCallOptions, FFIDProvider, type FFIDProviderProps, type FFIDProvisionMemberPlan, type FFIDProvisionMemberPlanStatus, type FFIDProvisionMemberResult, type FFIDProvisionMemberStatus, type FFIDProvisionOrganizationDryRun, type FFIDProvisionOrganizationMemberInput, type FFIDProvisionOrganizationOutcome, type FFIDProvisionOrganizationParams, type FFIDProvisionOrganizationResponse, type FFIDProvisionUserDryRun, type FFIDProvisionUserOutcome, type FFIDProvisionUserParams, type FFIDProvisionUserProfileInput, type FFIDProvisionUserResponse, type FFIDProvisionedOrganization, type FFIDProvisionedUser, FFIDPublishedCatalog, type FFIDRedirectErrorCode, type FFIDRedirectResult, type FFIDRemoveMemberResponse, type FFIDResetSessionResponse, FFIDSDKError, type FFIDScopeHashInput, type FFIDScopeHashPlan, FFIDSeatChangePreviewResponse, FFIDSeatsSummary, FFIDServiceAccessDecision, FFIDSessionResponse, FFIDSignOutResult, FFIDSubscribeParams, FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDSubscriptionDetail, type FFIDSubscriptionErrorCode, FFIDSubscriptionStatus, FFIDTaxBehavior, type FFIDTaxConfiguration, type FFIDTokenIntrospectionResponse, type FFIDUpdateMemberRoleResponse, type FFIDUpdateNotificationPreferencesRequest, type FFIDUpdateUserProfileRequest, type FFIDUploadOrganizationLogoParams, type FFIDUpsertOrganizationProfileParams, type FFIDUpsertOrganizationProfileRequest, FFIDUser, type FFIDUserProfile, FFIDVerifyAccessTokenOptions, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_COMPANY_SIZE_CODES, FFID_CREDITS_ERROR_CODES, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_BYTES, FFID_MAX_ORGANIZATION_LOGO_FILE_SIZE_MB, FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS, FFID_NEWSLETTER_TYPES, FFID_OAUTH_DENIAL_REASONS, FFID_ORGANIZATION_PROFILE_ERROR_CODES, FFID_SUBSCRIPTION_ERROR_CODES, type HandleRedirectCallbackClient, type HandleRedirectCallbackOptions, type KVNamespaceLike, ListAnnouncementsOptions, type NormalizeRedirectUriResult, type ReadAgencyInviteTokenOptions, type RedirectToAuthorizeOptions, TokenStore, type UseFFIDReturn, type UseRequireActiveSubscriptionOptions, type UseRequireActiveSubscriptionReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, canonicalizeCatalogValue, captureAgencyInviteToken, clearAgencyInviteToken, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, generateCodeChallenge, generateCodeVerifier, getFFIDAuthorizationError, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDOAuthDenialReason, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useRequireActiveSubscription, useSubscription, validatePublishedCatalog, withFFIDAuth, withSubscription };
|