@feelflow/ffid-sdk 12.2.0 → 12.2.2
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 +1 -1
- package/dist/{FFIDCookieLink-yt5SUr-W.d.cts → FFIDCookieLink-B91Fpinc.d.cts} +2 -1
- package/dist/{FFIDCookieLink-yt5SUr-W.d.ts → FFIDCookieLink-B91Fpinc.d.ts} +2 -1
- package/dist/agency/index.d.cts +22 -1
- package/dist/agency/index.d.ts +22 -1
- package/dist/announcements/index.d.cts +2 -1
- package/dist/announcements/index.d.ts +2 -1
- package/dist/{chunk-LT7FQ7BT.cjs → chunk-4UCL6JN6.cjs} +8 -6
- package/dist/{chunk-75ISD4I4.js → chunk-OQCNCKJ4.js} +8 -6
- 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/consent/index.d.cts +4 -3
- package/dist/consent/index.d.ts +4 -3
- package/dist/{ffid-client-DMwmK8mM.d.cts → ffid-client-C4Mjg70P.d.cts} +5 -3
- package/dist/{ffid-client-Dr2KVlIZ.d.ts → ffid-client-E9ja3Jus.d.ts} +5 -3
- package/dist/{index-f9k9reXO.d.cts → index-BCX5kug1.d.cts} +251 -249
- package/dist/{index-f9k9reXO.d.ts → index-BCX5kug1.d.ts} +251 -249
- package/dist/index.cjs +93 -93
- package/dist/index.d.cts +113 -112
- package/dist/index.d.ts +113 -112
- package/dist/index.js +2 -2
- package/dist/legal/index.d.cts +2 -1
- package/dist/legal/index.d.ts +2 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +4 -3
- package/dist/server/index.d.ts +4 -3
- package/dist/server/index.js +1 -1
- package/dist/server/test/index.d.cts +3 -2
- package/dist/server/test/index.d.ts +3 -2
- package/dist/webhooks/index.d.cts +2 -1
- package/dist/webhooks/index.d.ts +2 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,118 +1,10 @@
|
|
|
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-
|
|
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-
|
|
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-
|
|
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-BCX5kug1.cjs';
|
|
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-BCX5kug1.cjs';
|
|
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-B91Fpinc.cjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* FFID SDK Shared Constants
|
|
10
|
-
*
|
|
11
|
-
* Constants shared across all SDK entry points.
|
|
12
|
-
* Centralizing these prevents drift during domain/URL changes.
|
|
13
|
-
*/
|
|
14
|
-
/** Default FFID API base URL (production) */
|
|
15
|
-
declare const DEFAULT_API_BASE_URL = "https://id.feelflow.net";
|
|
16
|
-
/**
|
|
17
|
-
* Recommended default OAuth scope set for FFID-connected services (v3.0.0+).
|
|
18
|
-
*
|
|
19
|
-
* Coverage:
|
|
20
|
-
* - `openid email profile` — OIDC standard claims (always required)
|
|
21
|
-
* - `subscription:read` — `/api/v1/subscriptions/ext/*` 系の **読み取り**
|
|
22
|
-
* (`check` / `plans` / 契約詳細・シート参照。プラン / 課金 gate)
|
|
23
|
-
* - `legal:read` — `/api/v1/legal/ext` 系(利用規約・同意状態)
|
|
24
|
-
*
|
|
25
|
-
* Add feature-specific scopes on top of this when needed (browser SDK):
|
|
26
|
-
* - `analytics:read` for `/api/v1/ext/analytics/config`
|
|
27
|
-
* - `organization:read` / `organization:write` for `/api/v1/organizations/ext/members`
|
|
28
|
-
* - `subscription:write` for every subscription **mutation** — `subscribe()`
|
|
29
|
-
* (`POST /ext/subscribe`), plan changes, and cancellation. `subscription:read`
|
|
30
|
-
* does NOT cover these despite the shared `/ext/*` prefix (FFID #4744)
|
|
31
|
-
* - `legal:write` for recording user consent
|
|
32
|
-
* - `profile:read` / `profile:write` for profile UI
|
|
33
|
-
* - `organization:api-key` for org-level API key issuance
|
|
34
|
-
*
|
|
35
|
-
* **Note**: kept as a widened `string` (not `as const`) so consumers can
|
|
36
|
-
* concatenate additional scopes (e.g. `\`${DEFAULT_OAUTH_SCOPES} analytics:read\``)
|
|
37
|
-
* and so it remains assignable to `FFIDConfig.scope: string`. `widget:verify`
|
|
38
|
-
* is intentionally excluded — it is a service-key-only scope (`/api/v1/widget/*`),
|
|
39
|
-
* not used by the browser OAuth flow.
|
|
40
|
-
*
|
|
41
|
-
* Survey: feel-flow/feelflow-id-platform#2656 issuecomment-4324082742
|
|
42
|
-
*/
|
|
43
|
-
declare const DEFAULT_OAUTH_SCOPES = "openid email profile subscription:read legal:read";
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Generate a random code verifier (43-128 characters, RFC 7636 Section 4.1).
|
|
47
|
-
*
|
|
48
|
-
* Uses crypto.getRandomValues for cryptographic randomness.
|
|
49
|
-
*/
|
|
50
|
-
declare function generateCodeVerifier(): string;
|
|
51
|
-
/**
|
|
52
|
-
* Generate S256 code challenge from a code verifier (RFC 7636 Section 4.2).
|
|
53
|
-
*
|
|
54
|
-
* Computes SHA-256 hash of the verifier, then base64url-encodes the result.
|
|
55
|
-
*
|
|
56
|
-
* @param verifier - The code verifier string
|
|
57
|
-
* @returns base64url-encoded SHA-256 hash
|
|
58
|
-
*/
|
|
59
|
-
declare function generateCodeChallenge(verifier: string): Promise<string>;
|
|
60
|
-
/** Logger interface matching FFIDLogger for optional warning output */
|
|
61
|
-
interface PKCELogger {
|
|
62
|
-
warn: (...args: unknown[]) => void;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Store code verifier for later retrieval.
|
|
66
|
-
*
|
|
67
|
-
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
68
|
-
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
69
|
-
* if at least one write succeeded.
|
|
70
|
-
*
|
|
71
|
-
* @param verifier - The code verifier to store
|
|
72
|
-
* @param logger - Optional logger for warning on storage failure
|
|
73
|
-
* @returns true if stored in at least one storage, false otherwise
|
|
74
|
-
*/
|
|
75
|
-
declare function storeCodeVerifier(verifier: string, logger?: PKCELogger): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Retrieve and remove the code verifier.
|
|
78
|
-
*
|
|
79
|
-
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
80
|
-
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
81
|
-
* verifier is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
82
|
-
*
|
|
83
|
-
* @param logger - Optional logger for warning on storage failure
|
|
84
|
-
*/
|
|
85
|
-
declare function retrieveCodeVerifier(logger?: PKCELogger): string | null;
|
|
86
|
-
|
|
87
|
-
/** Logger interface matching FFIDLogger for optional warning output */
|
|
88
|
-
interface StateLogger {
|
|
89
|
-
warn: (...args: unknown[]) => void;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Store the OAuth `state` for later retrieval.
|
|
93
|
-
*
|
|
94
|
-
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
95
|
-
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
96
|
-
* if at least one write succeeded.
|
|
97
|
-
*
|
|
98
|
-
* @param state - The OAuth state value to store
|
|
99
|
-
* @param logger - Optional logger for warning on storage failure
|
|
100
|
-
* @returns true if stored in at least one storage, false otherwise
|
|
101
|
-
*/
|
|
102
|
-
declare function storeState(state: string, logger?: StateLogger): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Retrieve and remove the OAuth `state`.
|
|
105
|
-
*
|
|
106
|
-
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
107
|
-
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
108
|
-
* state is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
109
|
-
*
|
|
110
|
-
* @param logger - Optional logger for warning on storage failure
|
|
111
|
-
*/
|
|
112
|
-
declare function retrieveState(logger?: StateLogger): string | null;
|
|
113
|
-
|
|
114
|
-
declare function cleanupStateStorage(logger?: StateLogger): void;
|
|
115
|
-
|
|
116
8
|
/**
|
|
117
9
|
* Billing checkout / portal session types.
|
|
118
10
|
*
|
|
@@ -1194,6 +1086,114 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
1194
1086
|
};
|
|
1195
1087
|
}
|
|
1196
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* FFID SDK Shared Constants
|
|
1091
|
+
*
|
|
1092
|
+
* Constants shared across all SDK entry points.
|
|
1093
|
+
* Centralizing these prevents drift during domain/URL changes.
|
|
1094
|
+
*/
|
|
1095
|
+
/** Default FFID API base URL (production) */
|
|
1096
|
+
declare const DEFAULT_API_BASE_URL = "https://id.feelflow.net";
|
|
1097
|
+
/**
|
|
1098
|
+
* Recommended default OAuth scope set for FFID-connected services (v3.0.0+).
|
|
1099
|
+
*
|
|
1100
|
+
* Coverage:
|
|
1101
|
+
* - `openid email profile` — OIDC standard claims (always required)
|
|
1102
|
+
* - `subscription:read` — `/api/v1/subscriptions/ext/*` 系の **読み取り**
|
|
1103
|
+
* (`check` / `plans` / 契約詳細・シート参照。プラン / 課金 gate)
|
|
1104
|
+
* - `legal:read` — `/api/v1/legal/ext` 系(利用規約・同意状態)
|
|
1105
|
+
*
|
|
1106
|
+
* Add feature-specific scopes on top of this when needed (browser SDK):
|
|
1107
|
+
* - `analytics:read` for `/api/v1/ext/analytics/config`
|
|
1108
|
+
* - `organization:read` / `organization:write` for `/api/v1/organizations/ext/members`
|
|
1109
|
+
* - `subscription:write` for every subscription **mutation** — `subscribe()`
|
|
1110
|
+
* (`POST /ext/subscribe`), plan changes, and cancellation. `subscription:read`
|
|
1111
|
+
* does NOT cover these despite the shared `/ext/*` prefix (FFID #4744)
|
|
1112
|
+
* - `legal:write` for recording user consent
|
|
1113
|
+
* - `profile:read` / `profile:write` for profile UI
|
|
1114
|
+
* - `organization:api-key` for org-level API key issuance
|
|
1115
|
+
*
|
|
1116
|
+
* **Note**: kept as a widened `string` (not `as const`) so consumers can
|
|
1117
|
+
* concatenate additional scopes (e.g. `\`${DEFAULT_OAUTH_SCOPES} analytics:read\``)
|
|
1118
|
+
* and so it remains assignable to `FFIDConfig.scope: string`. `widget:verify`
|
|
1119
|
+
* is intentionally excluded — it is a service-key-only scope (`/api/v1/widget/*`),
|
|
1120
|
+
* not used by the browser OAuth flow.
|
|
1121
|
+
*
|
|
1122
|
+
* Survey: feel-flow/feelflow-id-platform#2656 issuecomment-4324082742
|
|
1123
|
+
*/
|
|
1124
|
+
declare const DEFAULT_OAUTH_SCOPES = "openid email profile subscription:read legal:read";
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Generate a random code verifier (43-128 characters, RFC 7636 Section 4.1).
|
|
1128
|
+
*
|
|
1129
|
+
* Uses crypto.getRandomValues for cryptographic randomness.
|
|
1130
|
+
*/
|
|
1131
|
+
declare function generateCodeVerifier(): string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Generate S256 code challenge from a code verifier (RFC 7636 Section 4.2).
|
|
1134
|
+
*
|
|
1135
|
+
* Computes SHA-256 hash of the verifier, then base64url-encodes the result.
|
|
1136
|
+
*
|
|
1137
|
+
* @param verifier - The code verifier string
|
|
1138
|
+
* @returns base64url-encoded SHA-256 hash
|
|
1139
|
+
*/
|
|
1140
|
+
declare function generateCodeChallenge(verifier: string): Promise<string>;
|
|
1141
|
+
/** Logger interface matching FFIDLogger for optional warning output */
|
|
1142
|
+
interface PKCELogger {
|
|
1143
|
+
warn: (...args: unknown[]) => void;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Store code verifier for later retrieval.
|
|
1147
|
+
*
|
|
1148
|
+
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
1149
|
+
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
1150
|
+
* if at least one write succeeded.
|
|
1151
|
+
*
|
|
1152
|
+
* @param verifier - The code verifier to store
|
|
1153
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1154
|
+
* @returns true if stored in at least one storage, false otherwise
|
|
1155
|
+
*/
|
|
1156
|
+
declare function storeCodeVerifier(verifier: string, logger?: PKCELogger): boolean;
|
|
1157
|
+
/**
|
|
1158
|
+
* Retrieve and remove the code verifier.
|
|
1159
|
+
*
|
|
1160
|
+
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
1161
|
+
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
1162
|
+
* verifier is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
1163
|
+
*
|
|
1164
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1165
|
+
*/
|
|
1166
|
+
declare function retrieveCodeVerifier(logger?: PKCELogger): string | null;
|
|
1167
|
+
|
|
1168
|
+
/** Logger interface matching FFIDLogger for optional warning output */
|
|
1169
|
+
interface StateLogger {
|
|
1170
|
+
warn: (...args: unknown[]) => void;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Store the OAuth `state` for later retrieval.
|
|
1174
|
+
*
|
|
1175
|
+
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
1176
|
+
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
1177
|
+
* if at least one write succeeded.
|
|
1178
|
+
*
|
|
1179
|
+
* @param state - The OAuth state value to store
|
|
1180
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1181
|
+
* @returns true if stored in at least one storage, false otherwise
|
|
1182
|
+
*/
|
|
1183
|
+
declare function storeState(state: string, logger?: StateLogger): boolean;
|
|
1184
|
+
/**
|
|
1185
|
+
* Retrieve and remove the OAuth `state`.
|
|
1186
|
+
*
|
|
1187
|
+
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
1188
|
+
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
1189
|
+
* state is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
1190
|
+
*
|
|
1191
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1192
|
+
*/
|
|
1193
|
+
declare function retrieveState(logger?: StateLogger): string | null;
|
|
1194
|
+
|
|
1195
|
+
declare function cleanupStateStorage(logger?: StateLogger): void;
|
|
1196
|
+
|
|
1197
1197
|
/** OTP / magic link methods - sendOtp / verifyOtp */
|
|
1198
1198
|
|
|
1199
1199
|
/** Response from sendOtp */
|
|
@@ -3003,4 +3003,5 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
3003
3003
|
};
|
|
3004
3004
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
3005
3005
|
|
|
3006
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION,
|
|
3006
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAccountType, FFIDAnnouncementsApiResponse, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, FFIDBillingInterval, FFIDBuyCreditsUrlParams, FFIDCacheAdapter, FFIDCancelPendingDowngradeResponse, FFIDCancelSubscriptionParams, FFIDCancelSubscriptionResponse, FFIDCatalogEnvironment, FFIDCatalogHashError, FFIDChangePlanParams, FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDConfig, FFIDCreatePackCheckoutParams, FFIDCreditBalance, FFIDCreditConsumeParams, FFIDCreditConsumeResult, FFIDCreditHistoryPage, FFIDCreditPackCheckout, FFIDCreditPackList, FFIDError, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListCreditHistoryOptions, FFIDListPlansResponse, FFIDLogger, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, FFIDPlanChangePreviewResponse, FFIDPreviewPlanChangeParams, FFIDPreviewSeatChangeParams, FFIDProvider, FFIDPublishedCatalog, FFIDSDKError, FFIDSeatChangePreviewResponse, FFIDSeatsSummary, FFIDServiceAccessDecision, FFIDSessionResponse, FFIDSignOutResult, FFIDSubscribeParams, FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDSubscriptionDetail, FFIDSubscriptionStatus, FFIDTaxBehavior, FFIDUser, 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, ListAnnouncementsOptions, TokenStore, 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 };
|
|
3007
|
+
export type { AgencyInviteCookieOptions, CaptureAgencyInviteTokenOptions, CaptureAgencyInviteTokenResult, ComputeEffectiveStatusInput, ContractWizardFlowType, ContractWizardResubscribeOptions, ContractWizardSubscribeOptions, ContractWizardSubscriptionOptions, ExchangeCodeForTokensOptions, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAllowedLogoMimeType, FFIDAnnouncementsClient, FFIDAssignableMemberRole, FFIDAuthorizationError, FFIDAuthorizationErrorDetails, FFIDCanonicalJsonValue, FFIDCheckoutSessionResponse, FFIDClient, FFIDCompanySizeCode, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDCreditsClient, FFIDCreditsErrorCode, FFIDErrorCode, FFIDIndustryCode, FFIDInquiryClient, FFIDInvitationStatus, FFIDInviteMemberRequest, FFIDInviteMemberResponse, FFIDLeaveOrganizationParams, FFIDLeaveOrganizationResponse, FFIDListMembersResponse, FFIDListingConsentInput, FFIDLoginHistoryEntry, FFIDLoginHistoryResponse, FFIDLogoWallEntry, FFIDLogoWallResponse, FFIDMemberRole, FFIDMemberSeatAssignmentResult, FFIDMemberStatus, FFIDNewsletterBodySource, FFIDNewsletterCampaignStatus, FFIDNewsletterClient, FFIDNewsletterConfirmParams, FFIDNewsletterConfirmResponse, FFIDNewsletterDispatchParams, FFIDNewsletterDispatchResponse, FFIDNewsletterSegment, FFIDNewsletterSubscribeOptions, FFIDNewsletterSubscribeParams, FFIDNewsletterSubscribeResponse, FFIDNewsletterType, FFIDNewsletterUnsubscribeParams, FFIDNewsletterUnsubscribeResponse, FFIDOAuthDenialReason, FFIDOAuthTokenResponse, FFIDOrganizationDomain, FFIDOrganizationDomainsResponse, FFIDOrganizationLogoUploadResponse, FFIDOrganizationMember, FFIDOrganizationNotificationPreferences, FFIDOrganizationNotificationPreferencesResponse, FFIDOrganizationProfile, FFIDOrganizationProfileErrorCode, FFIDOrganizationProfileResponse, FFIDOtpSendResponse, FFIDOtpVerifyResponse, FFIDPasswordResetConfirmResponse, FFIDPasswordResetResponse, FFIDPasswordResetVerifyResponse, FFIDPaymentConfiguration, FFIDPortalSessionResponse, FFIDProfileCallOptions, FFIDProviderProps, FFIDProvisionMemberPlan, FFIDProvisionMemberPlanStatus, FFIDProvisionMemberResult, FFIDProvisionMemberStatus, FFIDProvisionOrganizationDryRun, FFIDProvisionOrganizationMemberInput, FFIDProvisionOrganizationOutcome, FFIDProvisionOrganizationParams, FFIDProvisionOrganizationResponse, FFIDProvisionUserDryRun, FFIDProvisionUserOutcome, FFIDProvisionUserParams, FFIDProvisionUserProfileInput, FFIDProvisionUserResponse, FFIDProvisionedOrganization, FFIDProvisionedUser, FFIDRedirectErrorCode, FFIDRedirectResult, FFIDRemoveMemberResponse, FFIDResetSessionResponse, FFIDScopeHashInput, FFIDScopeHashPlan, FFIDSubscriptionErrorCode, FFIDTaxConfiguration, FFIDTokenIntrospectionResponse, FFIDUpdateMemberRoleResponse, FFIDUpdateNotificationPreferencesRequest, FFIDUpdateUserProfileRequest, FFIDUploadOrganizationLogoParams, FFIDUpsertOrganizationProfileParams, FFIDUpsertOrganizationProfileRequest, FFIDUserProfile, HandleRedirectCallbackClient, HandleRedirectCallbackOptions, KVNamespaceLike, NormalizeRedirectUriResult, ReadAgencyInviteTokenOptions, RedirectToAuthorizeOptions, UseFFIDReturn, UseRequireActiveSubscriptionOptions, UseRequireActiveSubscriptionReturn, WithFFIDAuthOptions, WithSubscriptionOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,118 +1,10 @@
|
|
|
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-
|
|
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-
|
|
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-
|
|
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-BCX5kug1.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-BCX5kug1.js';
|
|
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-B91Fpinc.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* FFID SDK Shared Constants
|
|
10
|
-
*
|
|
11
|
-
* Constants shared across all SDK entry points.
|
|
12
|
-
* Centralizing these prevents drift during domain/URL changes.
|
|
13
|
-
*/
|
|
14
|
-
/** Default FFID API base URL (production) */
|
|
15
|
-
declare const DEFAULT_API_BASE_URL = "https://id.feelflow.net";
|
|
16
|
-
/**
|
|
17
|
-
* Recommended default OAuth scope set for FFID-connected services (v3.0.0+).
|
|
18
|
-
*
|
|
19
|
-
* Coverage:
|
|
20
|
-
* - `openid email profile` — OIDC standard claims (always required)
|
|
21
|
-
* - `subscription:read` — `/api/v1/subscriptions/ext/*` 系の **読み取り**
|
|
22
|
-
* (`check` / `plans` / 契約詳細・シート参照。プラン / 課金 gate)
|
|
23
|
-
* - `legal:read` — `/api/v1/legal/ext` 系(利用規約・同意状態)
|
|
24
|
-
*
|
|
25
|
-
* Add feature-specific scopes on top of this when needed (browser SDK):
|
|
26
|
-
* - `analytics:read` for `/api/v1/ext/analytics/config`
|
|
27
|
-
* - `organization:read` / `organization:write` for `/api/v1/organizations/ext/members`
|
|
28
|
-
* - `subscription:write` for every subscription **mutation** — `subscribe()`
|
|
29
|
-
* (`POST /ext/subscribe`), plan changes, and cancellation. `subscription:read`
|
|
30
|
-
* does NOT cover these despite the shared `/ext/*` prefix (FFID #4744)
|
|
31
|
-
* - `legal:write` for recording user consent
|
|
32
|
-
* - `profile:read` / `profile:write` for profile UI
|
|
33
|
-
* - `organization:api-key` for org-level API key issuance
|
|
34
|
-
*
|
|
35
|
-
* **Note**: kept as a widened `string` (not `as const`) so consumers can
|
|
36
|
-
* concatenate additional scopes (e.g. `\`${DEFAULT_OAUTH_SCOPES} analytics:read\``)
|
|
37
|
-
* and so it remains assignable to `FFIDConfig.scope: string`. `widget:verify`
|
|
38
|
-
* is intentionally excluded — it is a service-key-only scope (`/api/v1/widget/*`),
|
|
39
|
-
* not used by the browser OAuth flow.
|
|
40
|
-
*
|
|
41
|
-
* Survey: feel-flow/feelflow-id-platform#2656 issuecomment-4324082742
|
|
42
|
-
*/
|
|
43
|
-
declare const DEFAULT_OAUTH_SCOPES = "openid email profile subscription:read legal:read";
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Generate a random code verifier (43-128 characters, RFC 7636 Section 4.1).
|
|
47
|
-
*
|
|
48
|
-
* Uses crypto.getRandomValues for cryptographic randomness.
|
|
49
|
-
*/
|
|
50
|
-
declare function generateCodeVerifier(): string;
|
|
51
|
-
/**
|
|
52
|
-
* Generate S256 code challenge from a code verifier (RFC 7636 Section 4.2).
|
|
53
|
-
*
|
|
54
|
-
* Computes SHA-256 hash of the verifier, then base64url-encodes the result.
|
|
55
|
-
*
|
|
56
|
-
* @param verifier - The code verifier string
|
|
57
|
-
* @returns base64url-encoded SHA-256 hash
|
|
58
|
-
*/
|
|
59
|
-
declare function generateCodeChallenge(verifier: string): Promise<string>;
|
|
60
|
-
/** Logger interface matching FFIDLogger for optional warning output */
|
|
61
|
-
interface PKCELogger {
|
|
62
|
-
warn: (...args: unknown[]) => void;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Store code verifier for later retrieval.
|
|
66
|
-
*
|
|
67
|
-
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
68
|
-
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
69
|
-
* if at least one write succeeded.
|
|
70
|
-
*
|
|
71
|
-
* @param verifier - The code verifier to store
|
|
72
|
-
* @param logger - Optional logger for warning on storage failure
|
|
73
|
-
* @returns true if stored in at least one storage, false otherwise
|
|
74
|
-
*/
|
|
75
|
-
declare function storeCodeVerifier(verifier: string, logger?: PKCELogger): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Retrieve and remove the code verifier.
|
|
78
|
-
*
|
|
79
|
-
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
80
|
-
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
81
|
-
* verifier is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
82
|
-
*
|
|
83
|
-
* @param logger - Optional logger for warning on storage failure
|
|
84
|
-
*/
|
|
85
|
-
declare function retrieveCodeVerifier(logger?: PKCELogger): string | null;
|
|
86
|
-
|
|
87
|
-
/** Logger interface matching FFIDLogger for optional warning output */
|
|
88
|
-
interface StateLogger {
|
|
89
|
-
warn: (...args: unknown[]) => void;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Store the OAuth `state` for later retrieval.
|
|
93
|
-
*
|
|
94
|
-
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
95
|
-
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
96
|
-
* if at least one write succeeded.
|
|
97
|
-
*
|
|
98
|
-
* @param state - The OAuth state value to store
|
|
99
|
-
* @param logger - Optional logger for warning on storage failure
|
|
100
|
-
* @returns true if stored in at least one storage, false otherwise
|
|
101
|
-
*/
|
|
102
|
-
declare function storeState(state: string, logger?: StateLogger): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Retrieve and remove the OAuth `state`.
|
|
105
|
-
*
|
|
106
|
-
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
107
|
-
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
108
|
-
* state is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
109
|
-
*
|
|
110
|
-
* @param logger - Optional logger for warning on storage failure
|
|
111
|
-
*/
|
|
112
|
-
declare function retrieveState(logger?: StateLogger): string | null;
|
|
113
|
-
|
|
114
|
-
declare function cleanupStateStorage(logger?: StateLogger): void;
|
|
115
|
-
|
|
116
8
|
/**
|
|
117
9
|
* Billing checkout / portal session types.
|
|
118
10
|
*
|
|
@@ -1194,6 +1086,114 @@ interface FFIDTokenIntrospectionResponse {
|
|
|
1194
1086
|
};
|
|
1195
1087
|
}
|
|
1196
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* FFID SDK Shared Constants
|
|
1091
|
+
*
|
|
1092
|
+
* Constants shared across all SDK entry points.
|
|
1093
|
+
* Centralizing these prevents drift during domain/URL changes.
|
|
1094
|
+
*/
|
|
1095
|
+
/** Default FFID API base URL (production) */
|
|
1096
|
+
declare const DEFAULT_API_BASE_URL = "https://id.feelflow.net";
|
|
1097
|
+
/**
|
|
1098
|
+
* Recommended default OAuth scope set for FFID-connected services (v3.0.0+).
|
|
1099
|
+
*
|
|
1100
|
+
* Coverage:
|
|
1101
|
+
* - `openid email profile` — OIDC standard claims (always required)
|
|
1102
|
+
* - `subscription:read` — `/api/v1/subscriptions/ext/*` 系の **読み取り**
|
|
1103
|
+
* (`check` / `plans` / 契約詳細・シート参照。プラン / 課金 gate)
|
|
1104
|
+
* - `legal:read` — `/api/v1/legal/ext` 系(利用規約・同意状態)
|
|
1105
|
+
*
|
|
1106
|
+
* Add feature-specific scopes on top of this when needed (browser SDK):
|
|
1107
|
+
* - `analytics:read` for `/api/v1/ext/analytics/config`
|
|
1108
|
+
* - `organization:read` / `organization:write` for `/api/v1/organizations/ext/members`
|
|
1109
|
+
* - `subscription:write` for every subscription **mutation** — `subscribe()`
|
|
1110
|
+
* (`POST /ext/subscribe`), plan changes, and cancellation. `subscription:read`
|
|
1111
|
+
* does NOT cover these despite the shared `/ext/*` prefix (FFID #4744)
|
|
1112
|
+
* - `legal:write` for recording user consent
|
|
1113
|
+
* - `profile:read` / `profile:write` for profile UI
|
|
1114
|
+
* - `organization:api-key` for org-level API key issuance
|
|
1115
|
+
*
|
|
1116
|
+
* **Note**: kept as a widened `string` (not `as const`) so consumers can
|
|
1117
|
+
* concatenate additional scopes (e.g. `\`${DEFAULT_OAUTH_SCOPES} analytics:read\``)
|
|
1118
|
+
* and so it remains assignable to `FFIDConfig.scope: string`. `widget:verify`
|
|
1119
|
+
* is intentionally excluded — it is a service-key-only scope (`/api/v1/widget/*`),
|
|
1120
|
+
* not used by the browser OAuth flow.
|
|
1121
|
+
*
|
|
1122
|
+
* Survey: feel-flow/feelflow-id-platform#2656 issuecomment-4324082742
|
|
1123
|
+
*/
|
|
1124
|
+
declare const DEFAULT_OAUTH_SCOPES = "openid email profile subscription:read legal:read";
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Generate a random code verifier (43-128 characters, RFC 7636 Section 4.1).
|
|
1128
|
+
*
|
|
1129
|
+
* Uses crypto.getRandomValues for cryptographic randomness.
|
|
1130
|
+
*/
|
|
1131
|
+
declare function generateCodeVerifier(): string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Generate S256 code challenge from a code verifier (RFC 7636 Section 4.2).
|
|
1134
|
+
*
|
|
1135
|
+
* Computes SHA-256 hash of the verifier, then base64url-encodes the result.
|
|
1136
|
+
*
|
|
1137
|
+
* @param verifier - The code verifier string
|
|
1138
|
+
* @returns base64url-encoded SHA-256 hash
|
|
1139
|
+
*/
|
|
1140
|
+
declare function generateCodeChallenge(verifier: string): Promise<string>;
|
|
1141
|
+
/** Logger interface matching FFIDLogger for optional warning output */
|
|
1142
|
+
interface PKCELogger {
|
|
1143
|
+
warn: (...args: unknown[]) => void;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Store code verifier for later retrieval.
|
|
1147
|
+
*
|
|
1148
|
+
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
1149
|
+
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
1150
|
+
* if at least one write succeeded.
|
|
1151
|
+
*
|
|
1152
|
+
* @param verifier - The code verifier to store
|
|
1153
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1154
|
+
* @returns true if stored in at least one storage, false otherwise
|
|
1155
|
+
*/
|
|
1156
|
+
declare function storeCodeVerifier(verifier: string, logger?: PKCELogger): boolean;
|
|
1157
|
+
/**
|
|
1158
|
+
* Retrieve and remove the code verifier.
|
|
1159
|
+
*
|
|
1160
|
+
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
1161
|
+
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
1162
|
+
* verifier is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
1163
|
+
*
|
|
1164
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1165
|
+
*/
|
|
1166
|
+
declare function retrieveCodeVerifier(logger?: PKCELogger): string | null;
|
|
1167
|
+
|
|
1168
|
+
/** Logger interface matching FFIDLogger for optional warning output */
|
|
1169
|
+
interface StateLogger {
|
|
1170
|
+
warn: (...args: unknown[]) => void;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Store the OAuth `state` for later retrieval.
|
|
1174
|
+
*
|
|
1175
|
+
* Writes to both sessionStorage (primary) and localStorage (fallback for iOS
|
|
1176
|
+
* WebKit sessionStorage eviction during external OAuth bounces). Returns true
|
|
1177
|
+
* if at least one write succeeded.
|
|
1178
|
+
*
|
|
1179
|
+
* @param state - The OAuth state value to store
|
|
1180
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1181
|
+
* @returns true if stored in at least one storage, false otherwise
|
|
1182
|
+
*/
|
|
1183
|
+
declare function storeState(state: string, logger?: StateLogger): boolean;
|
|
1184
|
+
/**
|
|
1185
|
+
* Retrieve and remove the OAuth `state`.
|
|
1186
|
+
*
|
|
1187
|
+
* Reads from sessionStorage first, falls back to localStorage (with 5-minute TTL).
|
|
1188
|
+
* Removes from all storages after retrieval (one-time use). Returns null if no
|
|
1189
|
+
* state is stored, the fallback is stale (>5 min), or storage is unavailable.
|
|
1190
|
+
*
|
|
1191
|
+
* @param logger - Optional logger for warning on storage failure
|
|
1192
|
+
*/
|
|
1193
|
+
declare function retrieveState(logger?: StateLogger): string | null;
|
|
1194
|
+
|
|
1195
|
+
declare function cleanupStateStorage(logger?: StateLogger): void;
|
|
1196
|
+
|
|
1197
1197
|
/** OTP / magic link methods - sendOtp / verifyOtp */
|
|
1198
1198
|
|
|
1199
1199
|
/** Response from sendOtp */
|
|
@@ -3003,4 +3003,5 @@ declare function createInquiryMethods(deps: InquiryMethodsDeps): {
|
|
|
3003
3003
|
};
|
|
3004
3004
|
type FFIDInquiryClient = ReturnType<typeof createInquiryMethods>;
|
|
3005
3005
|
|
|
3006
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION,
|
|
3006
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, AnnouncementListResponse, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EffectiveSubscriptionStatus, FFIDAccountType, FFIDAnnouncementsApiResponse, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, FFIDBillingInterval, FFIDBuyCreditsUrlParams, FFIDCacheAdapter, FFIDCancelPendingDowngradeResponse, FFIDCancelSubscriptionParams, FFIDCancelSubscriptionResponse, FFIDCatalogEnvironment, FFIDCatalogHashError, FFIDChangePlanParams, FFIDChangePlanResponse, FFIDCheckServiceAccessParams, FFIDConfig, FFIDCreatePackCheckoutParams, FFIDCreditBalance, FFIDCreditConsumeParams, FFIDCreditConsumeResult, FFIDCreditHistoryPage, FFIDCreditPackCheckout, FFIDCreditPackList, FFIDError, FFIDInquiryCreateParams, FFIDInquiryCreateResponse, FFIDListCreditHistoryOptions, FFIDListPlansResponse, FFIDLogger, FFIDOAuthUserInfo, FFIDOAuthUserInfoSubscription, FFIDOrganization, FFIDPlanChangePreviewResponse, FFIDPreviewPlanChangeParams, FFIDPreviewSeatChangeParams, FFIDProvider, FFIDPublishedCatalog, FFIDSDKError, FFIDSeatChangePreviewResponse, FFIDSeatsSummary, FFIDServiceAccessDecision, FFIDSessionResponse, FFIDSignOutResult, FFIDSubscribeParams, FFIDSubscribeResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDSubscriptionDetail, FFIDSubscriptionStatus, FFIDTaxBehavior, FFIDUser, 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, ListAnnouncementsOptions, TokenStore, 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 };
|
|
3007
|
+
export type { AgencyInviteCookieOptions, CaptureAgencyInviteTokenOptions, CaptureAgencyInviteTokenResult, ComputeEffectiveStatusInput, ContractWizardFlowType, ContractWizardResubscribeOptions, ContractWizardSubscribeOptions, ContractWizardSubscriptionOptions, ExchangeCodeForTokensOptions, FFIDAddMemberParams, FFIDAddMemberRequest, FFIDAddMemberResponse, FFIDAllowedLogoMimeType, FFIDAnnouncementsClient, FFIDAssignableMemberRole, FFIDAuthorizationError, FFIDAuthorizationErrorDetails, FFIDCanonicalJsonValue, FFIDCheckoutSessionResponse, FFIDClient, FFIDCompanySizeCode, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDCreditsClient, FFIDCreditsErrorCode, FFIDErrorCode, FFIDIndustryCode, FFIDInquiryClient, FFIDInvitationStatus, FFIDInviteMemberRequest, FFIDInviteMemberResponse, FFIDLeaveOrganizationParams, FFIDLeaveOrganizationResponse, FFIDListMembersResponse, FFIDListingConsentInput, FFIDLoginHistoryEntry, FFIDLoginHistoryResponse, FFIDLogoWallEntry, FFIDLogoWallResponse, FFIDMemberRole, FFIDMemberSeatAssignmentResult, FFIDMemberStatus, FFIDNewsletterBodySource, FFIDNewsletterCampaignStatus, FFIDNewsletterClient, FFIDNewsletterConfirmParams, FFIDNewsletterConfirmResponse, FFIDNewsletterDispatchParams, FFIDNewsletterDispatchResponse, FFIDNewsletterSegment, FFIDNewsletterSubscribeOptions, FFIDNewsletterSubscribeParams, FFIDNewsletterSubscribeResponse, FFIDNewsletterType, FFIDNewsletterUnsubscribeParams, FFIDNewsletterUnsubscribeResponse, FFIDOAuthDenialReason, FFIDOAuthTokenResponse, FFIDOrganizationDomain, FFIDOrganizationDomainsResponse, FFIDOrganizationLogoUploadResponse, FFIDOrganizationMember, FFIDOrganizationNotificationPreferences, FFIDOrganizationNotificationPreferencesResponse, FFIDOrganizationProfile, FFIDOrganizationProfileErrorCode, FFIDOrganizationProfileResponse, FFIDOtpSendResponse, FFIDOtpVerifyResponse, FFIDPasswordResetConfirmResponse, FFIDPasswordResetResponse, FFIDPasswordResetVerifyResponse, FFIDPaymentConfiguration, FFIDPortalSessionResponse, FFIDProfileCallOptions, FFIDProviderProps, FFIDProvisionMemberPlan, FFIDProvisionMemberPlanStatus, FFIDProvisionMemberResult, FFIDProvisionMemberStatus, FFIDProvisionOrganizationDryRun, FFIDProvisionOrganizationMemberInput, FFIDProvisionOrganizationOutcome, FFIDProvisionOrganizationParams, FFIDProvisionOrganizationResponse, FFIDProvisionUserDryRun, FFIDProvisionUserOutcome, FFIDProvisionUserParams, FFIDProvisionUserProfileInput, FFIDProvisionUserResponse, FFIDProvisionedOrganization, FFIDProvisionedUser, FFIDRedirectErrorCode, FFIDRedirectResult, FFIDRemoveMemberResponse, FFIDResetSessionResponse, FFIDScopeHashInput, FFIDScopeHashPlan, FFIDSubscriptionErrorCode, FFIDTaxConfiguration, FFIDTokenIntrospectionResponse, FFIDUpdateMemberRoleResponse, FFIDUpdateNotificationPreferencesRequest, FFIDUpdateUserProfileRequest, FFIDUploadOrganizationLogoParams, FFIDUpsertOrganizationProfileParams, FFIDUpsertOrganizationProfileRequest, FFIDUserProfile, HandleRedirectCallbackClient, HandleRedirectCallbackOptions, KVNamespaceLike, NormalizeRedirectUriResult, ReadAgencyInviteTokenOptions, RedirectToAuthorizeOptions, UseFFIDReturn, UseRequireActiveSubscriptionOptions, UseRequireActiveSubscriptionReturn, WithFFIDAuthOptions, WithSubscriptionOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext, useSubscription } from './chunk-
|
|
2
|
-
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_CREDITS_CONSUME_MAX_AMOUNT, FFID_CREDITS_CONSUME_MIN_AMOUNT, FFID_CREDITS_ERROR_CODES, FFID_CREDITS_FEATURE_PATTERN, FFID_CREDITS_HISTORY_DEFAULT_LIMIT, FFID_CREDITS_HISTORY_MAX_LIMIT, FFID_CREDITS_HISTORY_MIN_LIMIT, FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN, FFID_CREDITS_LOW_THRESHOLD_PERCENT, FFID_CREDITS_METADATA_MAX_BYTES, FFID_CREDIT_GRANT_KINDS, FFID_CREDIT_HISTORY_TYPES, FFID_CREDIT_PACK_MAX_QUANTITY, FFID_CREDIT_PACK_MIN_QUANTITY, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, 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, canonicalizeCatalogValue, captureAgencyInviteToken, clearAgencyInviteToken, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, getFFIDAuthorizationError, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, isFFIDOAuthDenialReason, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, validatePublishedCatalog, withSubscription } from './chunk-
|
|
1
|
+
import { useFFIDContext, useSubscription } from './chunk-OQCNCKJ4.js';
|
|
2
|
+
export { ACCESS_GRANTING_EFFECTIVE_STATUSES, AGENCY_INVITE_COOKIE_MAX_AGE_SEC, AGENCY_INVITE_COOKIE_NAME, AGENCY_INVITE_TOKEN_PARAM, AGENCY_INVITE_TOKEN_REDACTION, BLOCKING_EFFECTIVE_STATUSES, CATALOG_HASH_PATTERN, DEFAULT_API_BASE_URL, DEFAULT_OAUTH_SCOPES, EFFECTIVE_SUBSCRIPTION_STATUSES, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDCatalogHashError, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ALLOWED_ORGANIZATION_LOGO_MIME_TYPES, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_CATALOG_ENVIRONMENTS, FFID_CATALOG_PUBLICATION_STATUSES, FFID_COMPANY_SIZE_CODES, FFID_CREDITS_CONSUME_MAX_AMOUNT, FFID_CREDITS_CONSUME_MIN_AMOUNT, FFID_CREDITS_ERROR_CODES, FFID_CREDITS_FEATURE_PATTERN, FFID_CREDITS_HISTORY_DEFAULT_LIMIT, FFID_CREDITS_HISTORY_MAX_LIMIT, FFID_CREDITS_HISTORY_MIN_LIMIT, FFID_CREDITS_IDEMPOTENCY_KEY_PATTERN, FFID_CREDITS_LOW_THRESHOLD_PERCENT, FFID_CREDITS_METADATA_MAX_BYTES, FFID_CREDIT_GRANT_KINDS, FFID_CREDIT_HISTORY_TYPES, FFID_CREDIT_PACK_MAX_QUANTITY, FFID_CREDIT_PACK_MIN_QUANTITY, FFID_ERROR_CODES, FFID_INDUSTRY_CODES, FFID_INQUIRY_ACQUISITION_SOURCES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, 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, canonicalizeCatalogValue, captureAgencyInviteToken, clearAgencyInviteToken, cleanupStateStorage as clearState, computeEffectiveStatusFromSession, computeFFIDCheckoutCopyHash, computeLegalDisclosureHash, computePaymentConfigurationHash, computePraxisCopyHash, computeScopeHash, computeTaxConfigurationHash, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, getFFIDAuthorizationError, handleRedirectCallback, hasAccessFromUserinfo, hashCanonicalJson, isBlockedFromUserinfo, isFFIDInquiryAcquisitionSource, isFFIDInquiryCategorySite2026, isFFIDOAuthDenialReason, normalizeRedirectUri, readAgencyInviteCookie, readAgencyInviteToken, redactAgencyInviteToken, retrieveCodeVerifier, retrieveState, sha256Hex, storeCodeVerifier, storeState, useFFID, useFFIDAnnouncements, useSubscription, validatePublishedCatalog, withSubscription } from './chunk-OQCNCKJ4.js';
|
|
3
3
|
export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, FFIDAnalyticsProvider, FFIDConsentError, FFIDCookieBanner, FFIDCookieLink, FFIDCookieSettings, FFID_CONSENT_ERROR_CODES, clearConsentDismissalTimestamp, decodeConsentCookie, encodeConsentCookie, readConsentCookie, readConsentDismissalTimestamp, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp } from './chunk-S2AEBJRX.js';
|
|
4
4
|
import { useEffect, useRef } from 'react';
|
|
5
5
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
package/dist/legal/index.d.cts
CHANGED
|
@@ -364,4 +364,5 @@ declare function createFFIDLegalClient(config: FFIDLegalClientConfig): {
|
|
|
364
364
|
/** Type of the FFID Legal client */
|
|
365
365
|
type FFIDLegalClient = ReturnType<typeof createFFIDLegalClient>;
|
|
366
366
|
|
|
367
|
-
export {
|
|
367
|
+
export { FFID_LEGAL_ERROR_CODES, createFFIDLegalClient };
|
|
368
|
+
export type { FFIDAgreementCheckResult, FFIDAgreementHistoryResponse, FFIDAgreementMethod, FFIDLegalApiResponse, FFIDLegalClient, FFIDLegalClientConfig, FFIDLegalDocument, FFIDLegalDocumentType, FFIDLegalError, FFIDLegalErrorCode, FFIDLegalLogger, FFIDLegalSdkErrorCode, FFIDLegalServerError, FFIDLegalServerErrorCode, FFIDLegalServerResponse, FFIDPendingAgreement, FFIDPendingAgreementsResponse, FFIDRecordAgreementRequest, FFIDRecordAgreementResponse, FFIDServiceUserAgreement };
|
package/dist/legal/index.d.ts
CHANGED
|
@@ -364,4 +364,5 @@ declare function createFFIDLegalClient(config: FFIDLegalClientConfig): {
|
|
|
364
364
|
/** Type of the FFID Legal client */
|
|
365
365
|
type FFIDLegalClient = ReturnType<typeof createFFIDLegalClient>;
|
|
366
366
|
|
|
367
|
-
export {
|
|
367
|
+
export { FFID_LEGAL_ERROR_CODES, createFFIDLegalClient };
|
|
368
|
+
export type { FFIDAgreementCheckResult, FFIDAgreementHistoryResponse, FFIDAgreementMethod, FFIDLegalApiResponse, FFIDLegalClient, FFIDLegalClientConfig, FFIDLegalDocument, FFIDLegalDocumentType, FFIDLegalError, FFIDLegalErrorCode, FFIDLegalLogger, FFIDLegalSdkErrorCode, FFIDLegalServerError, FFIDLegalServerErrorCode, FFIDLegalServerResponse, FFIDPendingAgreement, FFIDPendingAgreementsResponse, FFIDRecordAgreementRequest, FFIDRecordAgreementResponse, FFIDServiceUserAgreement };
|
package/dist/server/index.cjs
CHANGED
|
@@ -1389,7 +1389,7 @@ var FFID_ORGANIZATION_PROFILE_ERROR_CODES = {
|
|
|
1389
1389
|
};
|
|
1390
1390
|
|
|
1391
1391
|
// src/client/version-check.ts
|
|
1392
|
-
var SDK_VERSION = "12.2.
|
|
1392
|
+
var SDK_VERSION = "12.2.2";
|
|
1393
1393
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
1394
1394
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
1395
1395
|
function sdkHeaders() {
|