@feelflow/ffid-sdk 1.1.1 → 1.2.1

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.
@@ -187,6 +187,7 @@ var OAUTH_TOKEN_ENDPOINT = "/api/v1/oauth/token";
187
187
  var OAUTH_USERINFO_ENDPOINT = "/api/v1/oauth/userinfo";
188
188
  var OAUTH_AUTHORIZE_ENDPOINT = "/api/v1/oauth/authorize";
189
189
  var OAUTH_REVOKE_ENDPOINT = "/api/v1/oauth/revoke";
190
+ var EXT_CHECK_ENDPOINT = "/api/v1/subscriptions/ext/check";
190
191
  var SDK_LOG_PREFIX = "[FFID SDK]";
191
192
  var MS_PER_SECOND = 1e3;
192
193
  var UNAUTHORIZED_STATUS = 401;
@@ -208,17 +209,11 @@ var consoleLogger = {
208
209
  error: (...args) => console.error(SDK_LOG_PREFIX, ...args)
209
210
  };
210
211
  var FFID_ERROR_CODES = {
211
- /** Network request failed (fetch threw) */
212
212
  NETWORK_ERROR: "NETWORK_ERROR",
213
- /** Server returned non-JSON response (e.g., HTML error page) */
214
213
  PARSE_ERROR: "PARSE_ERROR",
215
- /** Server returned error without structured error body */
216
214
  UNKNOWN_ERROR: "UNKNOWN_ERROR",
217
- /** Token exchange failed */
218
215
  TOKEN_EXCHANGE_ERROR: "TOKEN_EXCHANGE_ERROR",
219
- /** Token refresh failed */
220
216
  TOKEN_REFRESH_ERROR: "TOKEN_REFRESH_ERROR",
221
- /** No tokens available */
222
217
  NO_TOKENS: "NO_TOKENS"
223
218
  };
224
219
  function createFFIDClient(config) {
@@ -228,6 +223,10 @@ function createFFIDClient(config) {
228
223
  const baseUrl = config.apiBaseUrl ?? DEFAULT_API_BASE_URL;
229
224
  const authMode = config.authMode ?? "cookie";
230
225
  const clientId = config.clientId ?? config.serviceCode;
226
+ const serviceApiKey = config.serviceApiKey?.trim();
227
+ if (authMode === "service-key" && !serviceApiKey) {
228
+ throw new Error("FFID Client: service-key \u30E2\u30FC\u30C9\u3067\u306F serviceApiKey \u304C\u5FC5\u9808\u3067\u3059");
229
+ }
231
230
  const logger = config.logger ?? (config.debug ? consoleLogger : noopLogger);
232
231
  const tokenStore = authMode === "token" ? createTokenStore() : createTokenStore("memory");
233
232
  async function fetchWithAuth(endpoint, options = {}) {
@@ -296,6 +295,17 @@ function createFFIDClient(config) {
296
295
  return { data: raw.data };
297
296
  }
298
297
  function buildFetchOptions(options) {
298
+ if (authMode === "service-key") {
299
+ return {
300
+ ...options,
301
+ credentials: "omit",
302
+ headers: {
303
+ "Content-Type": "application/json",
304
+ "X-Service-Api-Key": serviceApiKey,
305
+ ...options.headers
306
+ }
307
+ };
308
+ }
299
309
  if (authMode === "token") {
300
310
  const tokens = tokenStore.getTokens();
301
311
  const headers = {
@@ -682,6 +692,21 @@ function createFFIDClient(config) {
682
692
  function createError(code, message) {
683
693
  return { code, message };
684
694
  }
695
+ async function checkSubscription(params) {
696
+ if (!params.userId || !params.organizationId) {
697
+ return {
698
+ error: createError("VALIDATION_ERROR", "userId \u3068 organizationId \u306F\u5FC5\u9808\u3067\u3059")
699
+ };
700
+ }
701
+ const query = new URLSearchParams({
702
+ userId: params.userId,
703
+ organizationId: params.organizationId,
704
+ serviceCode: config.serviceCode
705
+ });
706
+ return fetchWithAuth(
707
+ `${EXT_CHECK_ENDPOINT}?${query.toString()}`
708
+ );
709
+ }
685
710
  return {
686
711
  getSession,
687
712
  signOut,
@@ -691,6 +716,7 @@ function createFFIDClient(config) {
691
716
  createError,
692
717
  exchangeCodeForTokens,
693
718
  refreshAccessToken,
719
+ checkSubscription,
694
720
  /** Token store (token mode only) */
695
721
  tokenStore,
696
722
  /** Resolved auth mode */
@@ -1992,6 +2018,7 @@ exports.FFIDSubscriptionBadge = FFIDSubscriptionBadge;
1992
2018
  exports.FFIDUserMenu = FFIDUserMenu;
1993
2019
  exports.FFID_ANNOUNCEMENTS_ERROR_CODES = FFID_ANNOUNCEMENTS_ERROR_CODES;
1994
2020
  exports.createFFIDAnnouncementsClient = createFFIDAnnouncementsClient;
2021
+ exports.createFFIDClient = createFFIDClient;
1995
2022
  exports.createTokenStore = createTokenStore;
1996
2023
  exports.generateCodeChallenge = generateCodeChallenge;
1997
2024
  exports.generateCodeVerifier = generateCodeVerifier;
@@ -185,6 +185,7 @@ var OAUTH_TOKEN_ENDPOINT = "/api/v1/oauth/token";
185
185
  var OAUTH_USERINFO_ENDPOINT = "/api/v1/oauth/userinfo";
186
186
  var OAUTH_AUTHORIZE_ENDPOINT = "/api/v1/oauth/authorize";
187
187
  var OAUTH_REVOKE_ENDPOINT = "/api/v1/oauth/revoke";
188
+ var EXT_CHECK_ENDPOINT = "/api/v1/subscriptions/ext/check";
188
189
  var SDK_LOG_PREFIX = "[FFID SDK]";
189
190
  var MS_PER_SECOND = 1e3;
190
191
  var UNAUTHORIZED_STATUS = 401;
@@ -206,17 +207,11 @@ var consoleLogger = {
206
207
  error: (...args) => console.error(SDK_LOG_PREFIX, ...args)
207
208
  };
208
209
  var FFID_ERROR_CODES = {
209
- /** Network request failed (fetch threw) */
210
210
  NETWORK_ERROR: "NETWORK_ERROR",
211
- /** Server returned non-JSON response (e.g., HTML error page) */
212
211
  PARSE_ERROR: "PARSE_ERROR",
213
- /** Server returned error without structured error body */
214
212
  UNKNOWN_ERROR: "UNKNOWN_ERROR",
215
- /** Token exchange failed */
216
213
  TOKEN_EXCHANGE_ERROR: "TOKEN_EXCHANGE_ERROR",
217
- /** Token refresh failed */
218
214
  TOKEN_REFRESH_ERROR: "TOKEN_REFRESH_ERROR",
219
- /** No tokens available */
220
215
  NO_TOKENS: "NO_TOKENS"
221
216
  };
222
217
  function createFFIDClient(config) {
@@ -226,6 +221,10 @@ function createFFIDClient(config) {
226
221
  const baseUrl = config.apiBaseUrl ?? DEFAULT_API_BASE_URL;
227
222
  const authMode = config.authMode ?? "cookie";
228
223
  const clientId = config.clientId ?? config.serviceCode;
224
+ const serviceApiKey = config.serviceApiKey?.trim();
225
+ if (authMode === "service-key" && !serviceApiKey) {
226
+ throw new Error("FFID Client: service-key \u30E2\u30FC\u30C9\u3067\u306F serviceApiKey \u304C\u5FC5\u9808\u3067\u3059");
227
+ }
229
228
  const logger = config.logger ?? (config.debug ? consoleLogger : noopLogger);
230
229
  const tokenStore = authMode === "token" ? createTokenStore() : createTokenStore("memory");
231
230
  async function fetchWithAuth(endpoint, options = {}) {
@@ -294,6 +293,17 @@ function createFFIDClient(config) {
294
293
  return { data: raw.data };
295
294
  }
296
295
  function buildFetchOptions(options) {
296
+ if (authMode === "service-key") {
297
+ return {
298
+ ...options,
299
+ credentials: "omit",
300
+ headers: {
301
+ "Content-Type": "application/json",
302
+ "X-Service-Api-Key": serviceApiKey,
303
+ ...options.headers
304
+ }
305
+ };
306
+ }
297
307
  if (authMode === "token") {
298
308
  const tokens = tokenStore.getTokens();
299
309
  const headers = {
@@ -680,6 +690,21 @@ function createFFIDClient(config) {
680
690
  function createError(code, message) {
681
691
  return { code, message };
682
692
  }
693
+ async function checkSubscription(params) {
694
+ if (!params.userId || !params.organizationId) {
695
+ return {
696
+ error: createError("VALIDATION_ERROR", "userId \u3068 organizationId \u306F\u5FC5\u9808\u3067\u3059")
697
+ };
698
+ }
699
+ const query = new URLSearchParams({
700
+ userId: params.userId,
701
+ organizationId: params.organizationId,
702
+ serviceCode: config.serviceCode
703
+ });
704
+ return fetchWithAuth(
705
+ `${EXT_CHECK_ENDPOINT}?${query.toString()}`
706
+ );
707
+ }
683
708
  return {
684
709
  getSession,
685
710
  signOut,
@@ -689,6 +714,7 @@ function createFFIDClient(config) {
689
714
  createError,
690
715
  exchangeCodeForTokens,
691
716
  refreshAccessToken,
717
+ checkSubscription,
692
718
  /** Token store (token mode only) */
693
719
  tokenStore,
694
720
  /** Resolved auth mode */
@@ -1980,4 +2006,4 @@ function FFIDAnnouncementList({
1980
2006
  );
1981
2007
  }
1982
2008
 
1983
- export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
2009
+ export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
@@ -1,30 +1,30 @@
1
1
  'use strict';
2
2
 
3
- var chunk4QMSVP3G_cjs = require('../chunk-4QMSVP3G.cjs');
3
+ var chunk5SXV6Y7Z_cjs = require('../chunk-5SXV6Y7Z.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunk4QMSVP3G_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunk4QMSVP3G_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDLoginButton", {
16
16
  enumerable: true,
17
- get: function () { return chunk4QMSVP3G_cjs.FFIDLoginButton; }
17
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDLoginButton; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
20
20
  enumerable: true,
21
- get: function () { return chunk4QMSVP3G_cjs.FFIDOrganizationSwitcher; }
21
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDOrganizationSwitcher; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
24
24
  enumerable: true,
25
- get: function () { return chunk4QMSVP3G_cjs.FFIDSubscriptionBadge; }
25
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDSubscriptionBadge; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDUserMenu", {
28
28
  enumerable: true,
29
- get: function () { return chunk4QMSVP3G_cjs.FFIDUserMenu; }
29
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDUserMenu; }
30
30
  });
@@ -1,3 +1,3 @@
1
- export { k as FFIDAnnouncementBadge, H as FFIDAnnouncementBadgeClassNames, I as FFIDAnnouncementBadgeProps, l as FFIDAnnouncementList, J as FFIDAnnouncementListClassNames, K as FFIDAnnouncementListProps, s as FFIDLoginButton, M as FFIDLoginButtonProps, x as FFIDOrganizationSwitcher, N as FFIDOrganizationSwitcherClassNames, O as FFIDOrganizationSwitcherProps, C as FFIDSubscriptionBadge, P as FFIDSubscriptionBadgeClassNames, Q as FFIDSubscriptionBadgeProps, D as FFIDUserMenu, R as FFIDUserMenuClassNames, S as FFIDUserMenuProps } from '../index-CyYHo3-R.cjs';
1
+ export { o as FFIDAnnouncementBadge, J as FFIDAnnouncementBadgeClassNames, K as FFIDAnnouncementBadgeProps, p as FFIDAnnouncementList, M as FFIDAnnouncementListClassNames, N as FFIDAnnouncementListProps, u as FFIDLoginButton, O as FFIDLoginButtonProps, z as FFIDOrganizationSwitcher, P as FFIDOrganizationSwitcherClassNames, Q as FFIDOrganizationSwitcherProps, D as FFIDSubscriptionBadge, R as FFIDSubscriptionBadgeClassNames, S as FFIDSubscriptionBadgeProps, G as FFIDUserMenu, T as FFIDUserMenuClassNames, V as FFIDUserMenuProps } from '../index-Bzwet6m2.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { k as FFIDAnnouncementBadge, H as FFIDAnnouncementBadgeClassNames, I as FFIDAnnouncementBadgeProps, l as FFIDAnnouncementList, J as FFIDAnnouncementListClassNames, K as FFIDAnnouncementListProps, s as FFIDLoginButton, M as FFIDLoginButtonProps, x as FFIDOrganizationSwitcher, N as FFIDOrganizationSwitcherClassNames, O as FFIDOrganizationSwitcherProps, C as FFIDSubscriptionBadge, P as FFIDSubscriptionBadgeClassNames, Q as FFIDSubscriptionBadgeProps, D as FFIDUserMenu, R as FFIDUserMenuClassNames, S as FFIDUserMenuProps } from '../index-CyYHo3-R.js';
1
+ export { o as FFIDAnnouncementBadge, J as FFIDAnnouncementBadgeClassNames, K as FFIDAnnouncementBadgeProps, p as FFIDAnnouncementList, M as FFIDAnnouncementListClassNames, N as FFIDAnnouncementListProps, u as FFIDLoginButton, O as FFIDLoginButtonProps, z as FFIDOrganizationSwitcher, P as FFIDOrganizationSwitcherClassNames, Q as FFIDOrganizationSwitcherProps, D as FFIDSubscriptionBadge, R as FFIDSubscriptionBadgeClassNames, S as FFIDSubscriptionBadgeProps, G as FFIDUserMenu, T as FFIDUserMenuClassNames, V as FFIDUserMenuProps } from '../index-Bzwet6m2.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-USE5Q2OF.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-ELCMZ7KU.js';
@@ -133,10 +133,12 @@ interface FFIDConfig {
133
133
  onAuthStateChange?: ((user: FFIDUser | null) => void) | undefined;
134
134
  /** Callback on authentication error */
135
135
  onError?: ((error: FFIDError) => void) | undefined;
136
- /** Authentication mode: 'cookie' (default) or 'token' (OAuth Bearer) */
137
- authMode?: 'cookie' | 'token' | undefined;
136
+ /** Authentication mode: 'cookie' (default), 'token' (OAuth Bearer), or 'service-key' (server-to-server) */
137
+ authMode?: 'cookie' | 'token' | 'service-key' | undefined;
138
138
  /** Client ID for token mode (defaults to serviceCode if not set) */
139
139
  clientId?: string | undefined;
140
+ /** Service API key for service-key mode (X-Service-Api-Key header) */
141
+ serviceApiKey?: string | undefined;
140
142
  }
141
143
  /**
142
144
  * FFID context value provided to consumers
@@ -232,6 +234,19 @@ type FFIDApiResponse<T> = {
232
234
  data?: undefined;
233
235
  error: FFIDError;
234
236
  };
237
+ /**
238
+ * Subscription check response from ext/check endpoint
239
+ */
240
+ /** Subscription status values matching the FFID platform's SubscriptionStatus type */
241
+ type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
242
+ interface FFIDSubscriptionCheckResponse {
243
+ hasActiveSubscription: boolean;
244
+ organizationId: string | null;
245
+ subscriptionId: string | null;
246
+ status: FFIDSubscriptionStatus | null;
247
+ planCode: string | null;
248
+ currentPeriodEnd: string | null;
249
+ }
235
250
  /**
236
251
  * OAuth 2.0 token response from FFID token endpoint
237
252
  */
@@ -603,4 +618,4 @@ interface FFIDAnnouncementListProps {
603
618
  */
604
619
  declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
605
620
 
606
- export { type AnnouncementListResponse as A, type FFIDSubscription as B, FFIDSubscriptionBadge as C, FFIDUserMenu as D, type UseFFIDAnnouncementsReturn as E, type FFIDConfig as F, useFFIDAnnouncements as G, type FFIDAnnouncementBadgeClassNames as H, type FFIDAnnouncementBadgeProps as I, type FFIDAnnouncementListClassNames as J, type FFIDAnnouncementListProps as K, type ListAnnouncementsOptions as L, type FFIDLoginButtonProps as M, type FFIDOrganizationSwitcherClassNames as N, type FFIDOrganizationSwitcherProps as O, type FFIDSubscriptionBadgeClassNames as P, type FFIDSubscriptionBadgeProps as Q, type FFIDUserMenuClassNames as R, type FFIDUserMenuProps as S, type UseFFIDAnnouncementsOptions as U, type FFIDUser as a, type FFIDOrganization as b, type FFIDError as c, type FFIDSubscriptionContextValue as d, type FFIDAnnouncementsClientConfig as e, type FFIDAnnouncementsApiResponse as f, type FFIDAnnouncementsLogger as g, type Announcement as h, type AnnouncementStatus as i, type AnnouncementType as j, FFIDAnnouncementBadge as k, FFIDAnnouncementList as l, type FFIDAnnouncementsError as m, type FFIDAnnouncementsErrorCode as n, type FFIDAnnouncementsServerResponse as o, type FFIDApiResponse as p, type FFIDContextValue as q, type FFIDLogger as r, FFIDLoginButton as s, type FFIDOAuthTokenResponse as t, type FFIDOAuthUserInfo as u, type FFIDOAuthUserInfoMemberRole as v, type FFIDOAuthUserInfoSubscription as w, FFIDOrganizationSwitcher as x, type FFIDSeatModel as y, type FFIDSessionResponse as z };
621
+ export { type AnnouncementListResponse as A, type FFIDSeatModel as B, type FFIDSubscription as C, FFIDSubscriptionBadge as D, type FFIDSubscriptionStatus as E, type FFIDConfig as F, FFIDUserMenu as G, type UseFFIDAnnouncementsReturn as H, useFFIDAnnouncements as I, type FFIDAnnouncementBadgeClassNames as J, type FFIDAnnouncementBadgeProps as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementListClassNames as M, type FFIDAnnouncementListProps as N, type FFIDLoginButtonProps as O, type FFIDOrganizationSwitcherClassNames as P, type FFIDOrganizationSwitcherProps as Q, type FFIDSubscriptionBadgeClassNames as R, type FFIDSubscriptionBadgeProps as S, type FFIDUserMenuClassNames as T, type UseFFIDAnnouncementsOptions as U, type FFIDUserMenuProps as V, type FFIDApiResponse as a, type FFIDSessionResponse as b, type FFIDError as c, type FFIDSubscriptionCheckResponse as d, type FFIDLogger as e, type FFIDUser as f, type FFIDOrganization as g, type FFIDSubscriptionContextValue as h, type FFIDAnnouncementsClientConfig as i, type FFIDAnnouncementsApiResponse as j, type FFIDAnnouncementsLogger as k, type Announcement as l, type AnnouncementStatus as m, type AnnouncementType as n, FFIDAnnouncementBadge as o, FFIDAnnouncementList as p, type FFIDAnnouncementsError as q, type FFIDAnnouncementsErrorCode as r, type FFIDAnnouncementsServerResponse as s, type FFIDContextValue as t, FFIDLoginButton as u, type FFIDOAuthTokenResponse as v, type FFIDOAuthUserInfo as w, type FFIDOAuthUserInfoMemberRole as x, type FFIDOAuthUserInfoSubscription as y, FFIDOrganizationSwitcher as z };
@@ -133,10 +133,12 @@ interface FFIDConfig {
133
133
  onAuthStateChange?: ((user: FFIDUser | null) => void) | undefined;
134
134
  /** Callback on authentication error */
135
135
  onError?: ((error: FFIDError) => void) | undefined;
136
- /** Authentication mode: 'cookie' (default) or 'token' (OAuth Bearer) */
137
- authMode?: 'cookie' | 'token' | undefined;
136
+ /** Authentication mode: 'cookie' (default), 'token' (OAuth Bearer), or 'service-key' (server-to-server) */
137
+ authMode?: 'cookie' | 'token' | 'service-key' | undefined;
138
138
  /** Client ID for token mode (defaults to serviceCode if not set) */
139
139
  clientId?: string | undefined;
140
+ /** Service API key for service-key mode (X-Service-Api-Key header) */
141
+ serviceApiKey?: string | undefined;
140
142
  }
141
143
  /**
142
144
  * FFID context value provided to consumers
@@ -232,6 +234,19 @@ type FFIDApiResponse<T> = {
232
234
  data?: undefined;
233
235
  error: FFIDError;
234
236
  };
237
+ /**
238
+ * Subscription check response from ext/check endpoint
239
+ */
240
+ /** Subscription status values matching the FFID platform's SubscriptionStatus type */
241
+ type FFIDSubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'pending_invoice' | 'paused' | 'incomplete' | 'incomplete_expired' | 'unpaid';
242
+ interface FFIDSubscriptionCheckResponse {
243
+ hasActiveSubscription: boolean;
244
+ organizationId: string | null;
245
+ subscriptionId: string | null;
246
+ status: FFIDSubscriptionStatus | null;
247
+ planCode: string | null;
248
+ currentPeriodEnd: string | null;
249
+ }
235
250
  /**
236
251
  * OAuth 2.0 token response from FFID token endpoint
237
252
  */
@@ -603,4 +618,4 @@ interface FFIDAnnouncementListProps {
603
618
  */
604
619
  declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
605
620
 
606
- export { type AnnouncementListResponse as A, type FFIDSubscription as B, FFIDSubscriptionBadge as C, FFIDUserMenu as D, type UseFFIDAnnouncementsReturn as E, type FFIDConfig as F, useFFIDAnnouncements as G, type FFIDAnnouncementBadgeClassNames as H, type FFIDAnnouncementBadgeProps as I, type FFIDAnnouncementListClassNames as J, type FFIDAnnouncementListProps as K, type ListAnnouncementsOptions as L, type FFIDLoginButtonProps as M, type FFIDOrganizationSwitcherClassNames as N, type FFIDOrganizationSwitcherProps as O, type FFIDSubscriptionBadgeClassNames as P, type FFIDSubscriptionBadgeProps as Q, type FFIDUserMenuClassNames as R, type FFIDUserMenuProps as S, type UseFFIDAnnouncementsOptions as U, type FFIDUser as a, type FFIDOrganization as b, type FFIDError as c, type FFIDSubscriptionContextValue as d, type FFIDAnnouncementsClientConfig as e, type FFIDAnnouncementsApiResponse as f, type FFIDAnnouncementsLogger as g, type Announcement as h, type AnnouncementStatus as i, type AnnouncementType as j, FFIDAnnouncementBadge as k, FFIDAnnouncementList as l, type FFIDAnnouncementsError as m, type FFIDAnnouncementsErrorCode as n, type FFIDAnnouncementsServerResponse as o, type FFIDApiResponse as p, type FFIDContextValue as q, type FFIDLogger as r, FFIDLoginButton as s, type FFIDOAuthTokenResponse as t, type FFIDOAuthUserInfo as u, type FFIDOAuthUserInfoMemberRole as v, type FFIDOAuthUserInfoSubscription as w, FFIDOrganizationSwitcher as x, type FFIDSeatModel as y, type FFIDSessionResponse as z };
621
+ export { type AnnouncementListResponse as A, type FFIDSeatModel as B, type FFIDSubscription as C, FFIDSubscriptionBadge as D, type FFIDSubscriptionStatus as E, type FFIDConfig as F, FFIDUserMenu as G, type UseFFIDAnnouncementsReturn as H, useFFIDAnnouncements as I, type FFIDAnnouncementBadgeClassNames as J, type FFIDAnnouncementBadgeProps as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementListClassNames as M, type FFIDAnnouncementListProps as N, type FFIDLoginButtonProps as O, type FFIDOrganizationSwitcherClassNames as P, type FFIDOrganizationSwitcherProps as Q, type FFIDSubscriptionBadgeClassNames as R, type FFIDSubscriptionBadgeProps as S, type FFIDUserMenuClassNames as T, type UseFFIDAnnouncementsOptions as U, type FFIDUserMenuProps as V, type FFIDApiResponse as a, type FFIDSessionResponse as b, type FFIDError as c, type FFIDSubscriptionCheckResponse as d, type FFIDLogger as e, type FFIDUser as f, type FFIDOrganization as g, type FFIDSubscriptionContextValue as h, type FFIDAnnouncementsClientConfig as i, type FFIDAnnouncementsApiResponse as j, type FFIDAnnouncementsLogger as k, type Announcement as l, type AnnouncementStatus as m, type AnnouncementType as n, FFIDAnnouncementBadge as o, FFIDAnnouncementList as p, type FFIDAnnouncementsError as q, type FFIDAnnouncementsErrorCode as r, type FFIDAnnouncementsServerResponse as s, type FFIDContextValue as t, FFIDLoginButton as u, type FFIDOAuthTokenResponse as v, type FFIDOAuthUserInfo as w, type FFIDOAuthUserInfoMemberRole as x, type FFIDOAuthUserInfoSubscription as y, FFIDOrganizationSwitcher as z };
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunk4QMSVP3G_cjs = require('./chunk-4QMSVP3G.cjs');
3
+ var chunk5SXV6Y7Z_cjs = require('./chunk-5SXV6Y7Z.cjs');
4
4
  var react = require('react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
7
7
  function withFFIDAuth(Component, options = {}) {
8
8
  const WrappedComponent = (props) => {
9
- const { isLoading, isAuthenticated, login } = chunk4QMSVP3G_cjs.useFFIDContext();
9
+ const { isLoading, isAuthenticated, login } = chunk5SXV6Y7Z_cjs.useFFIDContext();
10
10
  const hasRedirected = react.useRef(false);
11
11
  react.useEffect(() => {
12
12
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -31,78 +31,82 @@ function withFFIDAuth(Component, options = {}) {
31
31
 
32
32
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
33
33
  enumerable: true,
34
- get: function () { return chunk4QMSVP3G_cjs.DEFAULT_API_BASE_URL; }
34
+ get: function () { return chunk5SXV6Y7Z_cjs.DEFAULT_API_BASE_URL; }
35
35
  });
36
36
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
37
37
  enumerable: true,
38
- get: function () { return chunk4QMSVP3G_cjs.FFIDAnnouncementBadge; }
38
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDAnnouncementBadge; }
39
39
  });
40
40
  Object.defineProperty(exports, "FFIDAnnouncementList", {
41
41
  enumerable: true,
42
- get: function () { return chunk4QMSVP3G_cjs.FFIDAnnouncementList; }
42
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDAnnouncementList; }
43
43
  });
44
44
  Object.defineProperty(exports, "FFIDLoginButton", {
45
45
  enumerable: true,
46
- get: function () { return chunk4QMSVP3G_cjs.FFIDLoginButton; }
46
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDLoginButton; }
47
47
  });
48
48
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
49
49
  enumerable: true,
50
- get: function () { return chunk4QMSVP3G_cjs.FFIDOrganizationSwitcher; }
50
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDOrganizationSwitcher; }
51
51
  });
52
52
  Object.defineProperty(exports, "FFIDProvider", {
53
53
  enumerable: true,
54
- get: function () { return chunk4QMSVP3G_cjs.FFIDProvider; }
54
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDProvider; }
55
55
  });
56
56
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
57
57
  enumerable: true,
58
- get: function () { return chunk4QMSVP3G_cjs.FFIDSubscriptionBadge; }
58
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDSubscriptionBadge; }
59
59
  });
60
60
  Object.defineProperty(exports, "FFIDUserMenu", {
61
61
  enumerable: true,
62
- get: function () { return chunk4QMSVP3G_cjs.FFIDUserMenu; }
62
+ get: function () { return chunk5SXV6Y7Z_cjs.FFIDUserMenu; }
63
63
  });
64
64
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
65
65
  enumerable: true,
66
- get: function () { return chunk4QMSVP3G_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
66
+ get: function () { return chunk5SXV6Y7Z_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
67
67
  });
68
68
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
69
69
  enumerable: true,
70
- get: function () { return chunk4QMSVP3G_cjs.createFFIDAnnouncementsClient; }
70
+ get: function () { return chunk5SXV6Y7Z_cjs.createFFIDAnnouncementsClient; }
71
+ });
72
+ Object.defineProperty(exports, "createFFIDClient", {
73
+ enumerable: true,
74
+ get: function () { return chunk5SXV6Y7Z_cjs.createFFIDClient; }
71
75
  });
72
76
  Object.defineProperty(exports, "createTokenStore", {
73
77
  enumerable: true,
74
- get: function () { return chunk4QMSVP3G_cjs.createTokenStore; }
78
+ get: function () { return chunk5SXV6Y7Z_cjs.createTokenStore; }
75
79
  });
76
80
  Object.defineProperty(exports, "generateCodeChallenge", {
77
81
  enumerable: true,
78
- get: function () { return chunk4QMSVP3G_cjs.generateCodeChallenge; }
82
+ get: function () { return chunk5SXV6Y7Z_cjs.generateCodeChallenge; }
79
83
  });
80
84
  Object.defineProperty(exports, "generateCodeVerifier", {
81
85
  enumerable: true,
82
- get: function () { return chunk4QMSVP3G_cjs.generateCodeVerifier; }
86
+ get: function () { return chunk5SXV6Y7Z_cjs.generateCodeVerifier; }
83
87
  });
84
88
  Object.defineProperty(exports, "retrieveCodeVerifier", {
85
89
  enumerable: true,
86
- get: function () { return chunk4QMSVP3G_cjs.retrieveCodeVerifier; }
90
+ get: function () { return chunk5SXV6Y7Z_cjs.retrieveCodeVerifier; }
87
91
  });
88
92
  Object.defineProperty(exports, "storeCodeVerifier", {
89
93
  enumerable: true,
90
- get: function () { return chunk4QMSVP3G_cjs.storeCodeVerifier; }
94
+ get: function () { return chunk5SXV6Y7Z_cjs.storeCodeVerifier; }
91
95
  });
92
96
  Object.defineProperty(exports, "useFFID", {
93
97
  enumerable: true,
94
- get: function () { return chunk4QMSVP3G_cjs.useFFID; }
98
+ get: function () { return chunk5SXV6Y7Z_cjs.useFFID; }
95
99
  });
96
100
  Object.defineProperty(exports, "useFFIDAnnouncements", {
97
101
  enumerable: true,
98
- get: function () { return chunk4QMSVP3G_cjs.useFFIDAnnouncements; }
102
+ get: function () { return chunk5SXV6Y7Z_cjs.useFFIDAnnouncements; }
99
103
  });
100
104
  Object.defineProperty(exports, "useSubscription", {
101
105
  enumerable: true,
102
- get: function () { return chunk4QMSVP3G_cjs.useSubscription; }
106
+ get: function () { return chunk5SXV6Y7Z_cjs.useSubscription; }
103
107
  });
104
108
  Object.defineProperty(exports, "withSubscription", {
105
109
  enumerable: true,
106
- get: function () { return chunk4QMSVP3G_cjs.withSubscription; }
110
+ get: function () { return chunk5SXV6Y7Z_cjs.withSubscription; }
107
111
  });
108
112
  exports.withFFIDAuth = withFFIDAuth;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
+ import { F as FFIDConfig, a as FFIDApiResponse, b as FFIDSessionResponse, c as FFIDError, d as FFIDSubscriptionCheckResponse, e as FFIDLogger, f as FFIDUser, g as FFIDOrganization, h as FFIDSubscriptionContextValue, i as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, j as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, k as FFIDAnnouncementsLogger } from './index-Bzwet6m2.cjs';
2
+ export { l as Announcement, m as AnnouncementStatus, n as AnnouncementType, o as FFIDAnnouncementBadge, p as FFIDAnnouncementList, q as FFIDAnnouncementsError, r as FFIDAnnouncementsErrorCode, s as FFIDAnnouncementsServerResponse, t as FFIDContextValue, u as FFIDLoginButton, v as FFIDOAuthTokenResponse, w as FFIDOAuthUserInfo, x as FFIDOAuthUserInfoMemberRole, y as FFIDOAuthUserInfoSubscription, z as FFIDOrganizationSwitcher, B as FFIDSeatModel, C as FFIDSubscription, D as FFIDSubscriptionBadge, E as FFIDSubscriptionStatus, G as FFIDUserMenu, U as UseFFIDAnnouncementsOptions, H as UseFFIDAnnouncementsReturn, I as useFFIDAnnouncements } from './index-Bzwet6m2.cjs';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
4
  import { ReactNode, ComponentType, FC } from 'react';
3
- import { F as FFIDConfig, a as FFIDUser, b as FFIDOrganization, c as FFIDError, d as FFIDSubscriptionContextValue, e as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, f as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, g as FFIDAnnouncementsLogger } from './index-CyYHo3-R.cjs';
4
- export { h as Announcement, i as AnnouncementStatus, j as AnnouncementType, k as FFIDAnnouncementBadge, l as FFIDAnnouncementList, m as FFIDAnnouncementsError, n as FFIDAnnouncementsErrorCode, o as FFIDAnnouncementsServerResponse, p as FFIDApiResponse, q as FFIDContextValue, r as FFIDLogger, s as FFIDLoginButton, t as FFIDOAuthTokenResponse, u as FFIDOAuthUserInfo, v as FFIDOAuthUserInfoMemberRole, w as FFIDOAuthUserInfoSubscription, x as FFIDOrganizationSwitcher, y as FFIDSeatModel, z as FFIDSessionResponse, B as FFIDSubscription, C as FFIDSubscriptionBadge, D as FFIDUserMenu, U as UseFFIDAnnouncementsOptions, E as UseFFIDAnnouncementsReturn, G as useFFIDAnnouncements } from './index-CyYHo3-R.cjs';
5
5
 
6
6
  /**
7
7
  * FFID SDK Shared Constants
@@ -84,6 +84,35 @@ declare function storeCodeVerifier(verifier: string): void;
84
84
  */
85
85
  declare function retrieveCodeVerifier(): string | null;
86
86
 
87
+ /** FFID API Client - Supports cookie, token, and service-key auth modes */
88
+
89
+ /** Creates an FFID API client instance */
90
+ declare function createFFIDClient(config: FFIDConfig): {
91
+ getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
92
+ signOut: () => Promise<FFIDApiResponse<void>>;
93
+ redirectToLogin: () => boolean;
94
+ getLoginUrl: (redirectUrl?: string) => string;
95
+ getSignupUrl: (redirectUrl?: string) => string;
96
+ createError: (code: string, message: string) => FFIDError;
97
+ exchangeCodeForTokens: (code: string, codeVerifier?: string) => Promise<FFIDApiResponse<void>>;
98
+ refreshAccessToken: () => Promise<FFIDApiResponse<void>>;
99
+ checkSubscription: (params: {
100
+ userId: string;
101
+ organizationId: string;
102
+ }) => Promise<FFIDApiResponse<FFIDSubscriptionCheckResponse>>;
103
+ /** Token store (token mode only) */
104
+ tokenStore: TokenStore;
105
+ /** Resolved auth mode */
106
+ authMode: "cookie" | "token" | "service-key";
107
+ /** Resolved logger instance */
108
+ logger: FFIDLogger;
109
+ baseUrl: string;
110
+ serviceCode: string;
111
+ clientId: string;
112
+ };
113
+ /** Type of the FFID client */
114
+ type FFIDClient = ReturnType<typeof createFFIDClient>;
115
+
87
116
  /**
88
117
  * Props for FFIDProvider component
89
118
  */
@@ -310,4 +339,4 @@ declare function createFFIDAnnouncementsClient(config?: FFIDAnnouncementsClientC
310
339
  /** Type of the FFID Announcements client */
311
340
  type FFIDAnnouncementsClient = ReturnType<typeof createFFIDAnnouncementsClient>;
312
341
 
313
- export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDConfig, FFIDError, FFIDOrganization, FFIDProvider, type FFIDProviderProps, FFIDSubscriptionContextValue, FFIDUser, FFID_ANNOUNCEMENTS_ERROR_CODES, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
342
+ export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDClient, FFIDConfig, FFIDError, FFIDLogger, FFIDOrganization, FFIDProvider, type FFIDProviderProps, FFIDSessionResponse, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDUser, FFID_ANNOUNCEMENTS_ERROR_CODES, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import { F as FFIDConfig, a as FFIDApiResponse, b as FFIDSessionResponse, c as FFIDError, d as FFIDSubscriptionCheckResponse, e as FFIDLogger, f as FFIDUser, g as FFIDOrganization, h as FFIDSubscriptionContextValue, i as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, j as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, k as FFIDAnnouncementsLogger } from './index-Bzwet6m2.js';
2
+ export { l as Announcement, m as AnnouncementStatus, n as AnnouncementType, o as FFIDAnnouncementBadge, p as FFIDAnnouncementList, q as FFIDAnnouncementsError, r as FFIDAnnouncementsErrorCode, s as FFIDAnnouncementsServerResponse, t as FFIDContextValue, u as FFIDLoginButton, v as FFIDOAuthTokenResponse, w as FFIDOAuthUserInfo, x as FFIDOAuthUserInfoMemberRole, y as FFIDOAuthUserInfoSubscription, z as FFIDOrganizationSwitcher, B as FFIDSeatModel, C as FFIDSubscription, D as FFIDSubscriptionBadge, E as FFIDSubscriptionStatus, G as FFIDUserMenu, U as UseFFIDAnnouncementsOptions, H as UseFFIDAnnouncementsReturn, I as useFFIDAnnouncements } from './index-Bzwet6m2.js';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
4
  import { ReactNode, ComponentType, FC } from 'react';
3
- import { F as FFIDConfig, a as FFIDUser, b as FFIDOrganization, c as FFIDError, d as FFIDSubscriptionContextValue, e as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, f as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, g as FFIDAnnouncementsLogger } from './index-CyYHo3-R.js';
4
- export { h as Announcement, i as AnnouncementStatus, j as AnnouncementType, k as FFIDAnnouncementBadge, l as FFIDAnnouncementList, m as FFIDAnnouncementsError, n as FFIDAnnouncementsErrorCode, o as FFIDAnnouncementsServerResponse, p as FFIDApiResponse, q as FFIDContextValue, r as FFIDLogger, s as FFIDLoginButton, t as FFIDOAuthTokenResponse, u as FFIDOAuthUserInfo, v as FFIDOAuthUserInfoMemberRole, w as FFIDOAuthUserInfoSubscription, x as FFIDOrganizationSwitcher, y as FFIDSeatModel, z as FFIDSessionResponse, B as FFIDSubscription, C as FFIDSubscriptionBadge, D as FFIDUserMenu, U as UseFFIDAnnouncementsOptions, E as UseFFIDAnnouncementsReturn, G as useFFIDAnnouncements } from './index-CyYHo3-R.js';
5
5
 
6
6
  /**
7
7
  * FFID SDK Shared Constants
@@ -84,6 +84,35 @@ declare function storeCodeVerifier(verifier: string): void;
84
84
  */
85
85
  declare function retrieveCodeVerifier(): string | null;
86
86
 
87
+ /** FFID API Client - Supports cookie, token, and service-key auth modes */
88
+
89
+ /** Creates an FFID API client instance */
90
+ declare function createFFIDClient(config: FFIDConfig): {
91
+ getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
92
+ signOut: () => Promise<FFIDApiResponse<void>>;
93
+ redirectToLogin: () => boolean;
94
+ getLoginUrl: (redirectUrl?: string) => string;
95
+ getSignupUrl: (redirectUrl?: string) => string;
96
+ createError: (code: string, message: string) => FFIDError;
97
+ exchangeCodeForTokens: (code: string, codeVerifier?: string) => Promise<FFIDApiResponse<void>>;
98
+ refreshAccessToken: () => Promise<FFIDApiResponse<void>>;
99
+ checkSubscription: (params: {
100
+ userId: string;
101
+ organizationId: string;
102
+ }) => Promise<FFIDApiResponse<FFIDSubscriptionCheckResponse>>;
103
+ /** Token store (token mode only) */
104
+ tokenStore: TokenStore;
105
+ /** Resolved auth mode */
106
+ authMode: "cookie" | "token" | "service-key";
107
+ /** Resolved logger instance */
108
+ logger: FFIDLogger;
109
+ baseUrl: string;
110
+ serviceCode: string;
111
+ clientId: string;
112
+ };
113
+ /** Type of the FFID client */
114
+ type FFIDClient = ReturnType<typeof createFFIDClient>;
115
+
87
116
  /**
88
117
  * Props for FFIDProvider component
89
118
  */
@@ -310,4 +339,4 @@ declare function createFFIDAnnouncementsClient(config?: FFIDAnnouncementsClientC
310
339
  /** Type of the FFID Announcements client */
311
340
  type FFIDAnnouncementsClient = ReturnType<typeof createFFIDAnnouncementsClient>;
312
341
 
313
- export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDConfig, FFIDError, FFIDOrganization, FFIDProvider, type FFIDProviderProps, FFIDSubscriptionContextValue, FFIDUser, FFID_ANNOUNCEMENTS_ERROR_CODES, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
342
+ export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, type FFIDClient, FFIDConfig, FFIDError, FFIDLogger, FFIDOrganization, FFIDProvider, type FFIDProviderProps, FFIDSessionResponse, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDUser, FFID_ANNOUNCEMENTS_ERROR_CODES, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useFFIDContext } from './chunk-USE5Q2OF.js';
2
- export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-USE5Q2OF.js';
1
+ import { useFFIDContext } from './chunk-ELCMZ7KU.js';
2
+ export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-ELCMZ7KU.js';
3
3
  import { useRef, useEffect } from 'react';
4
4
  import { jsx, Fragment } from 'react/jsx-runtime';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feelflow/ffid-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "description": "FeelFlow ID Platform SDK for React/Next.js applications",
5
5
  "keywords": [
6
6
  "feelflow",