@feelflow/ffid-sdk 1.9.1 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-S7GPQ4OJ.js → chunk-GW23IWNE.js} +502 -387
- package/dist/{chunk-AD2MA4LH.cjs → chunk-WZZP7SQB.cjs} +502 -387
- package/dist/components/index.cjs +7 -7
- 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/{index-DsXjcF0i.d.cts → index-DMgtXEt5.d.cts} +20 -5
- package/dist/{index-DsXjcF0i.d.ts → index-DMgtXEt5.d.ts} +20 -5
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +1251 -0
- package/dist/server/index.d.cts +431 -0
- package/dist/server/index.d.ts +431 -0
- package/dist/server/index.js +1242 -0
- package/package.json +6 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWZZP7SQB_cjs = require('../chunk-WZZP7SQB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDAnnouncementBadge; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDAnnouncementList; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDLoginButton; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDOrganizationSwitcher; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDSubscriptionBadge; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDUserMenu; }
|
|
30
30
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as FFIDAnnouncementBadge, V as FFIDAnnouncementBadgeClassNames, W as FFIDAnnouncementBadgeProps, y as FFIDAnnouncementList, X as FFIDAnnouncementListClassNames, Y as FFIDAnnouncementListProps, H as FFIDLoginButton, Z as FFIDLoginButtonProps, M as FFIDOrganizationSwitcher, _ as FFIDOrganizationSwitcherClassNames, $ as FFIDOrganizationSwitcherProps, O as FFIDSubscriptionBadge, a0 as FFIDSubscriptionBadgeClassNames, a1 as FFIDSubscriptionBadgeProps, R as FFIDUserMenu, a2 as FFIDUserMenuClassNames, a3 as FFIDUserMenuProps } from '../index-DMgtXEt5.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as FFIDAnnouncementBadge, V as FFIDAnnouncementBadgeClassNames, W as FFIDAnnouncementBadgeProps, y as FFIDAnnouncementList, X as FFIDAnnouncementListClassNames, Y as FFIDAnnouncementListProps, H as FFIDLoginButton, Z as FFIDLoginButtonProps, M as FFIDOrganizationSwitcher, _ as FFIDOrganizationSwitcherClassNames, $ as FFIDOrganizationSwitcherProps, O as FFIDSubscriptionBadge, a0 as FFIDSubscriptionBadgeClassNames, a1 as FFIDSubscriptionBadgeProps, R as FFIDUserMenu, a2 as FFIDUserMenuClassNames, a3 as FFIDUserMenuProps } from '../index-DMgtXEt5.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-
|
|
1
|
+
export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-GW23IWNE.js';
|
|
@@ -28,6 +28,8 @@ interface FFIDCacheConfig {
|
|
|
28
28
|
* Core types for the FeelFlow ID SDK
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
+
/** Authentication mode for FFID client */
|
|
32
|
+
type FFIDAuthMode = 'cookie' | 'token' | 'service-key';
|
|
31
33
|
/**
|
|
32
34
|
* User information from FFID
|
|
33
35
|
*/
|
|
@@ -130,6 +132,17 @@ interface FFIDOAuthUserInfo {
|
|
|
130
132
|
organizationId?: string | null | undefined;
|
|
131
133
|
subscription?: FFIDOAuthUserInfoSubscription | undefined;
|
|
132
134
|
}
|
|
135
|
+
/** Options for verifyAccessToken */
|
|
136
|
+
interface FFIDVerifyAccessTokenOptions {
|
|
137
|
+
/**
|
|
138
|
+
* When true, fetches profile info (email, name, picture) via introspect API
|
|
139
|
+
* after local JWT verification. No effect when verifyStrategy is 'introspect'
|
|
140
|
+
* (profile is always included).
|
|
141
|
+
* Requires {@link FFIDConfig.serviceApiKey} to be configured when using jwt strategy.
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
includeProfile?: boolean;
|
|
145
|
+
}
|
|
133
146
|
/**
|
|
134
147
|
* SDK configuration options
|
|
135
148
|
*/
|
|
@@ -157,7 +170,7 @@ interface FFIDConfig {
|
|
|
157
170
|
/** Callback on authentication error */
|
|
158
171
|
onError?: ((error: FFIDError) => void) | undefined;
|
|
159
172
|
/** Authentication mode: 'cookie' (default), 'token' (OAuth Bearer), or 'service-key' (server-to-server) */
|
|
160
|
-
authMode?:
|
|
173
|
+
authMode?: FFIDAuthMode | undefined;
|
|
161
174
|
/** Client ID for token mode (defaults to serviceCode if not set) */
|
|
162
175
|
clientId?: string | undefined;
|
|
163
176
|
/** Custom redirect URI for OAuth flow (defaults to window.location.origin + window.location.pathname) */
|
|
@@ -169,14 +182,16 @@ interface FFIDConfig {
|
|
|
169
182
|
* - 'jwt': Local JWT verification via JWKS (default, lower latency)
|
|
170
183
|
* - 'introspect': Remote introspection via /api/v1/oauth/introspect
|
|
171
184
|
*
|
|
172
|
-
* JWT verification returns limited claims (no email/name/picture/subscription).
|
|
173
|
-
* Use 'introspect' if you need full user profile data
|
|
185
|
+
* JWT verification returns limited claims (no email/name/picture/subscription) by default.
|
|
186
|
+
* Use 'introspect' if you always need full user profile data, or pass
|
|
187
|
+
* { includeProfile: true } to verifyAccessToken() for on-demand profile fetching.
|
|
174
188
|
*/
|
|
175
189
|
verifyStrategy?: 'jwt' | 'introspect' | undefined;
|
|
176
190
|
/**
|
|
177
191
|
* Cache configuration for token verification results.
|
|
178
192
|
* When set, introspect/userinfo responses are cached to reduce API calls.
|
|
179
|
-
*
|
|
193
|
+
* Effective in service-key mode with verifyStrategy: 'introspect',
|
|
194
|
+
* or with verifyStrategy: 'jwt' when includeProfile: true is used.
|
|
180
195
|
*/
|
|
181
196
|
cache?: FFIDCacheConfig | undefined;
|
|
182
197
|
/**
|
|
@@ -761,4 +776,4 @@ interface FFIDAnnouncementListProps {
|
|
|
761
776
|
*/
|
|
762
777
|
declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
|
|
763
778
|
|
|
764
|
-
export { type
|
|
779
|
+
export { type FFIDOrganizationSwitcherProps as $, type AnnouncementListResponse as A, type FFIDAnnouncementsErrorCode as B, type FFIDAnnouncementsServerResponse as C, type FFIDCacheConfig as D, type FFIDContextValue as E, type FFIDConfig as F, type FFIDJwtClaims as G, FFIDLoginButton as H, type FFIDOAuthTokenResponse as I, type FFIDOAuthUserInfoMemberRole as J, type FFIDOAuthUserInfoSubscription as K, type ListAnnouncementsOptions as L, FFIDOrganizationSwitcher as M, type FFIDSeatModel as N, FFIDSubscriptionBadge as O, type FFIDSubscriptionStatus as P, type FFIDTokenIntrospectionResponse as Q, FFIDUserMenu as R, type UseFFIDAnnouncementsReturn as S, useFFIDAnnouncements as T, type UseFFIDAnnouncementsOptions as U, type FFIDAnnouncementBadgeClassNames as V, type FFIDAnnouncementBadgeProps as W, type FFIDAnnouncementListClassNames as X, type FFIDAnnouncementListProps as Y, type FFIDLoginButtonProps as Z, type FFIDOrganizationSwitcherClassNames as _, type FFIDApiResponse as a, type FFIDSubscriptionBadgeClassNames as a0, type FFIDSubscriptionBadgeProps as a1, type FFIDUserMenuClassNames as a2, type FFIDUserMenuProps as a3, type FFIDSessionResponse as b, type FFIDError as c, type FFIDSubscriptionCheckResponse as d, type FFIDCreateCheckoutParams as e, type FFIDCheckoutSessionResponse as f, type FFIDCreatePortalParams as g, type FFIDPortalSessionResponse as h, type FFIDVerifyAccessTokenOptions as i, type FFIDOAuthUserInfo as j, type FFIDAuthMode as k, type FFIDLogger as l, type FFIDCacheAdapter as m, type FFIDUser as n, type FFIDOrganization as o, type FFIDSubscription as p, type FFIDSubscriptionContextValue as q, type FFIDAnnouncementsClientConfig as r, type FFIDAnnouncementsApiResponse as s, type FFIDAnnouncementsLogger as t, type Announcement as u, type AnnouncementStatus as v, type AnnouncementType as w, FFIDAnnouncementBadge as x, FFIDAnnouncementList as y, type FFIDAnnouncementsError as z };
|
|
@@ -28,6 +28,8 @@ interface FFIDCacheConfig {
|
|
|
28
28
|
* Core types for the FeelFlow ID SDK
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
+
/** Authentication mode for FFID client */
|
|
32
|
+
type FFIDAuthMode = 'cookie' | 'token' | 'service-key';
|
|
31
33
|
/**
|
|
32
34
|
* User information from FFID
|
|
33
35
|
*/
|
|
@@ -130,6 +132,17 @@ interface FFIDOAuthUserInfo {
|
|
|
130
132
|
organizationId?: string | null | undefined;
|
|
131
133
|
subscription?: FFIDOAuthUserInfoSubscription | undefined;
|
|
132
134
|
}
|
|
135
|
+
/** Options for verifyAccessToken */
|
|
136
|
+
interface FFIDVerifyAccessTokenOptions {
|
|
137
|
+
/**
|
|
138
|
+
* When true, fetches profile info (email, name, picture) via introspect API
|
|
139
|
+
* after local JWT verification. No effect when verifyStrategy is 'introspect'
|
|
140
|
+
* (profile is always included).
|
|
141
|
+
* Requires {@link FFIDConfig.serviceApiKey} to be configured when using jwt strategy.
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
includeProfile?: boolean;
|
|
145
|
+
}
|
|
133
146
|
/**
|
|
134
147
|
* SDK configuration options
|
|
135
148
|
*/
|
|
@@ -157,7 +170,7 @@ interface FFIDConfig {
|
|
|
157
170
|
/** Callback on authentication error */
|
|
158
171
|
onError?: ((error: FFIDError) => void) | undefined;
|
|
159
172
|
/** Authentication mode: 'cookie' (default), 'token' (OAuth Bearer), or 'service-key' (server-to-server) */
|
|
160
|
-
authMode?:
|
|
173
|
+
authMode?: FFIDAuthMode | undefined;
|
|
161
174
|
/** Client ID for token mode (defaults to serviceCode if not set) */
|
|
162
175
|
clientId?: string | undefined;
|
|
163
176
|
/** Custom redirect URI for OAuth flow (defaults to window.location.origin + window.location.pathname) */
|
|
@@ -169,14 +182,16 @@ interface FFIDConfig {
|
|
|
169
182
|
* - 'jwt': Local JWT verification via JWKS (default, lower latency)
|
|
170
183
|
* - 'introspect': Remote introspection via /api/v1/oauth/introspect
|
|
171
184
|
*
|
|
172
|
-
* JWT verification returns limited claims (no email/name/picture/subscription).
|
|
173
|
-
* Use 'introspect' if you need full user profile data
|
|
185
|
+
* JWT verification returns limited claims (no email/name/picture/subscription) by default.
|
|
186
|
+
* Use 'introspect' if you always need full user profile data, or pass
|
|
187
|
+
* { includeProfile: true } to verifyAccessToken() for on-demand profile fetching.
|
|
174
188
|
*/
|
|
175
189
|
verifyStrategy?: 'jwt' | 'introspect' | undefined;
|
|
176
190
|
/**
|
|
177
191
|
* Cache configuration for token verification results.
|
|
178
192
|
* When set, introspect/userinfo responses are cached to reduce API calls.
|
|
179
|
-
*
|
|
193
|
+
* Effective in service-key mode with verifyStrategy: 'introspect',
|
|
194
|
+
* or with verifyStrategy: 'jwt' when includeProfile: true is used.
|
|
180
195
|
*/
|
|
181
196
|
cache?: FFIDCacheConfig | undefined;
|
|
182
197
|
/**
|
|
@@ -761,4 +776,4 @@ interface FFIDAnnouncementListProps {
|
|
|
761
776
|
*/
|
|
762
777
|
declare function FFIDAnnouncementList({ announcements, isLoading, className, classNames, style, formatDate, emptyMessage, loadingRender, renderItem, maxContentLines, }: FFIDAnnouncementListProps): react_jsx_runtime.JSX.Element;
|
|
763
778
|
|
|
764
|
-
export { type
|
|
779
|
+
export { type FFIDOrganizationSwitcherProps as $, type AnnouncementListResponse as A, type FFIDAnnouncementsErrorCode as B, type FFIDAnnouncementsServerResponse as C, type FFIDCacheConfig as D, type FFIDContextValue as E, type FFIDConfig as F, type FFIDJwtClaims as G, FFIDLoginButton as H, type FFIDOAuthTokenResponse as I, type FFIDOAuthUserInfoMemberRole as J, type FFIDOAuthUserInfoSubscription as K, type ListAnnouncementsOptions as L, FFIDOrganizationSwitcher as M, type FFIDSeatModel as N, FFIDSubscriptionBadge as O, type FFIDSubscriptionStatus as P, type FFIDTokenIntrospectionResponse as Q, FFIDUserMenu as R, type UseFFIDAnnouncementsReturn as S, useFFIDAnnouncements as T, type UseFFIDAnnouncementsOptions as U, type FFIDAnnouncementBadgeClassNames as V, type FFIDAnnouncementBadgeProps as W, type FFIDAnnouncementListClassNames as X, type FFIDAnnouncementListProps as Y, type FFIDLoginButtonProps as Z, type FFIDOrganizationSwitcherClassNames as _, type FFIDApiResponse as a, type FFIDSubscriptionBadgeClassNames as a0, type FFIDSubscriptionBadgeProps as a1, type FFIDUserMenuClassNames as a2, type FFIDUserMenuProps as a3, type FFIDSessionResponse as b, type FFIDError as c, type FFIDSubscriptionCheckResponse as d, type FFIDCreateCheckoutParams as e, type FFIDCheckoutSessionResponse as f, type FFIDCreatePortalParams as g, type FFIDPortalSessionResponse as h, type FFIDVerifyAccessTokenOptions as i, type FFIDOAuthUserInfo as j, type FFIDAuthMode as k, type FFIDLogger as l, type FFIDCacheAdapter as m, type FFIDUser as n, type FFIDOrganization as o, type FFIDSubscription as p, type FFIDSubscriptionContextValue as q, type FFIDAnnouncementsClientConfig as r, type FFIDAnnouncementsApiResponse as s, type FFIDAnnouncementsLogger as t, type Announcement as u, type AnnouncementStatus as v, type AnnouncementType as w, FFIDAnnouncementBadge as x, FFIDAnnouncementList as y, type FFIDAnnouncementsError as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWZZP7SQB_cjs = require('./chunk-WZZP7SQB.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -46,7 +46,7 @@ function createKVCacheAdapter(kv) {
|
|
|
46
46
|
}
|
|
47
47
|
function withFFIDAuth(Component, options = {}) {
|
|
48
48
|
const WrappedComponent = (props) => {
|
|
49
|
-
const { isLoading, isAuthenticated, login } =
|
|
49
|
+
const { isLoading, isAuthenticated, login } = chunkWZZP7SQB_cjs.useFFIDContext();
|
|
50
50
|
const hasRedirected = react.useRef(false);
|
|
51
51
|
react.useEffect(() => {
|
|
52
52
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -71,83 +71,83 @@ function withFFIDAuth(Component, options = {}) {
|
|
|
71
71
|
|
|
72
72
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkWZZP7SQB_cjs.DEFAULT_API_BASE_URL; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDAnnouncementBadge; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDAnnouncementList; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDLoginButton; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDOrganizationSwitcher; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDProvider; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDSubscriptionBadge; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkWZZP7SQB_cjs.FFIDUserMenu; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkWZZP7SQB_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkWZZP7SQB_cjs.createFFIDAnnouncementsClient; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkWZZP7SQB_cjs.createFFIDClient; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "createTokenStore", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkWZZP7SQB_cjs.createTokenStore; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkWZZP7SQB_cjs.generateCodeChallenge; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkWZZP7SQB_cjs.generateCodeVerifier; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkWZZP7SQB_cjs.retrieveCodeVerifier; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkWZZP7SQB_cjs.storeCodeVerifier; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "useFFID", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkWZZP7SQB_cjs.useFFID; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkWZZP7SQB_cjs.useFFIDAnnouncements; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "useSubscription", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkWZZP7SQB_cjs.useSubscription; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "withSubscription", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkWZZP7SQB_cjs.withSubscription; }
|
|
151
151
|
});
|
|
152
152
|
exports.createKVCacheAdapter = createKVCacheAdapter;
|
|
153
153
|
exports.createMemoryCacheAdapter = createMemoryCacheAdapter;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDConfig, a as FFIDApiResponse, b as FFIDSessionResponse, c as FFIDError, d as FFIDSubscriptionCheckResponse, e as FFIDCreateCheckoutParams, f as FFIDCheckoutSessionResponse, g as FFIDCreatePortalParams, h as FFIDPortalSessionResponse, i as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FFIDConfig, a as FFIDApiResponse, b as FFIDSessionResponse, c as FFIDError, d as FFIDSubscriptionCheckResponse, e as FFIDCreateCheckoutParams, f as FFIDCheckoutSessionResponse, g as FFIDCreatePortalParams, h as FFIDPortalSessionResponse, i as FFIDVerifyAccessTokenOptions, j as FFIDOAuthUserInfo, k as FFIDAuthMode, l as FFIDLogger, m as FFIDCacheAdapter, n as FFIDUser, o as FFIDOrganization, p as FFIDSubscription, q as FFIDSubscriptionContextValue, r as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, s as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, t as FFIDAnnouncementsLogger } from './index-DMgtXEt5.cjs';
|
|
2
|
+
export { u as Announcement, v as AnnouncementStatus, w as AnnouncementType, x as FFIDAnnouncementBadge, y as FFIDAnnouncementList, z as FFIDAnnouncementsError, B as FFIDAnnouncementsErrorCode, C as FFIDAnnouncementsServerResponse, D as FFIDCacheConfig, E as FFIDContextValue, G as FFIDJwtClaims, H as FFIDLoginButton, I as FFIDOAuthTokenResponse, J as FFIDOAuthUserInfoMemberRole, K as FFIDOAuthUserInfoSubscription, M as FFIDOrganizationSwitcher, N as FFIDSeatModel, O as FFIDSubscriptionBadge, P as FFIDSubscriptionStatus, Q as FFIDTokenIntrospectionResponse, R as FFIDUserMenu, U as UseFFIDAnnouncementsOptions, S as UseFFIDAnnouncementsReturn, T as useFFIDAnnouncements } from './index-DMgtXEt5.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
5
5
|
|
|
@@ -88,7 +88,7 @@ declare function retrieveCodeVerifier(): string | null;
|
|
|
88
88
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
89
89
|
getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
|
|
90
90
|
signOut: () => Promise<FFIDApiResponse<void>>;
|
|
91
|
-
redirectToLogin: () => boolean
|
|
91
|
+
redirectToLogin: () => Promise<boolean>;
|
|
92
92
|
getLoginUrl: (redirectUrl?: string) => string;
|
|
93
93
|
getSignupUrl: (redirectUrl?: string) => string;
|
|
94
94
|
createError: (code: string, message: string) => FFIDError;
|
|
@@ -100,11 +100,11 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
100
100
|
}) => Promise<FFIDApiResponse<FFIDSubscriptionCheckResponse>>;
|
|
101
101
|
createCheckoutSession: (params: FFIDCreateCheckoutParams) => Promise<FFIDApiResponse<FFIDCheckoutSessionResponse>>;
|
|
102
102
|
createPortalSession: (params: FFIDCreatePortalParams) => Promise<FFIDApiResponse<FFIDPortalSessionResponse>>;
|
|
103
|
-
verifyAccessToken: (accessToken: string) => Promise<FFIDApiResponse<FFIDOAuthUserInfo>>;
|
|
103
|
+
verifyAccessToken: (accessToken: string, options?: FFIDVerifyAccessTokenOptions) => Promise<FFIDApiResponse<FFIDOAuthUserInfo>>;
|
|
104
104
|
/** Token store (token mode only) */
|
|
105
105
|
tokenStore: TokenStore;
|
|
106
106
|
/** Resolved auth mode */
|
|
107
|
-
authMode:
|
|
107
|
+
authMode: FFIDAuthMode;
|
|
108
108
|
/** Resolved logger instance */
|
|
109
109
|
logger: FFIDLogger;
|
|
110
110
|
baseUrl: string;
|
|
@@ -366,4 +366,4 @@ declare function createFFIDAnnouncementsClient(config?: FFIDAnnouncementsClientC
|
|
|
366
366
|
/** Type of the FFID Announcements client */
|
|
367
367
|
type FFIDAnnouncementsClient = ReturnType<typeof createFFIDAnnouncementsClient>;
|
|
368
368
|
|
|
369
|
-
export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, FFIDCacheAdapter, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, FFIDLogger, FFIDOAuthUserInfo, FFIDOrganization, FFIDPortalSessionResponse, FFIDProvider, type FFIDProviderProps, FFIDSessionResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDUser, FFID_ANNOUNCEMENTS_ERROR_CODES, type KVNamespaceLike, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
|
|
369
|
+
export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, FFIDCacheAdapter, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, FFIDLogger, FFIDOAuthUserInfo, FFIDOrganization, FFIDPortalSessionResponse, FFIDProvider, type FFIDProviderProps, FFIDSessionResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDUser, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, type KVNamespaceLike, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FFIDConfig, a as FFIDApiResponse, b as FFIDSessionResponse, c as FFIDError, d as FFIDSubscriptionCheckResponse, e as FFIDCreateCheckoutParams, f as FFIDCheckoutSessionResponse, g as FFIDCreatePortalParams, h as FFIDPortalSessionResponse, i as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FFIDConfig, a as FFIDApiResponse, b as FFIDSessionResponse, c as FFIDError, d as FFIDSubscriptionCheckResponse, e as FFIDCreateCheckoutParams, f as FFIDCheckoutSessionResponse, g as FFIDCreatePortalParams, h as FFIDPortalSessionResponse, i as FFIDVerifyAccessTokenOptions, j as FFIDOAuthUserInfo, k as FFIDAuthMode, l as FFIDLogger, m as FFIDCacheAdapter, n as FFIDUser, o as FFIDOrganization, p as FFIDSubscription, q as FFIDSubscriptionContextValue, r as FFIDAnnouncementsClientConfig, L as ListAnnouncementsOptions, s as FFIDAnnouncementsApiResponse, A as AnnouncementListResponse, t as FFIDAnnouncementsLogger } from './index-DMgtXEt5.js';
|
|
2
|
+
export { u as Announcement, v as AnnouncementStatus, w as AnnouncementType, x as FFIDAnnouncementBadge, y as FFIDAnnouncementList, z as FFIDAnnouncementsError, B as FFIDAnnouncementsErrorCode, C as FFIDAnnouncementsServerResponse, D as FFIDCacheConfig, E as FFIDContextValue, G as FFIDJwtClaims, H as FFIDLoginButton, I as FFIDOAuthTokenResponse, J as FFIDOAuthUserInfoMemberRole, K as FFIDOAuthUserInfoSubscription, M as FFIDOrganizationSwitcher, N as FFIDSeatModel, O as FFIDSubscriptionBadge, P as FFIDSubscriptionStatus, Q as FFIDTokenIntrospectionResponse, R as FFIDUserMenu, U as UseFFIDAnnouncementsOptions, S as UseFFIDAnnouncementsReturn, T as useFFIDAnnouncements } from './index-DMgtXEt5.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode, ComponentType, FC } from 'react';
|
|
5
5
|
|
|
@@ -88,7 +88,7 @@ declare function retrieveCodeVerifier(): string | null;
|
|
|
88
88
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
89
89
|
getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
|
|
90
90
|
signOut: () => Promise<FFIDApiResponse<void>>;
|
|
91
|
-
redirectToLogin: () => boolean
|
|
91
|
+
redirectToLogin: () => Promise<boolean>;
|
|
92
92
|
getLoginUrl: (redirectUrl?: string) => string;
|
|
93
93
|
getSignupUrl: (redirectUrl?: string) => string;
|
|
94
94
|
createError: (code: string, message: string) => FFIDError;
|
|
@@ -100,11 +100,11 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
100
100
|
}) => Promise<FFIDApiResponse<FFIDSubscriptionCheckResponse>>;
|
|
101
101
|
createCheckoutSession: (params: FFIDCreateCheckoutParams) => Promise<FFIDApiResponse<FFIDCheckoutSessionResponse>>;
|
|
102
102
|
createPortalSession: (params: FFIDCreatePortalParams) => Promise<FFIDApiResponse<FFIDPortalSessionResponse>>;
|
|
103
|
-
verifyAccessToken: (accessToken: string) => Promise<FFIDApiResponse<FFIDOAuthUserInfo>>;
|
|
103
|
+
verifyAccessToken: (accessToken: string, options?: FFIDVerifyAccessTokenOptions) => Promise<FFIDApiResponse<FFIDOAuthUserInfo>>;
|
|
104
104
|
/** Token store (token mode only) */
|
|
105
105
|
tokenStore: TokenStore;
|
|
106
106
|
/** Resolved auth mode */
|
|
107
|
-
authMode:
|
|
107
|
+
authMode: FFIDAuthMode;
|
|
108
108
|
/** Resolved logger instance */
|
|
109
109
|
logger: FFIDLogger;
|
|
110
110
|
baseUrl: string;
|
|
@@ -366,4 +366,4 @@ declare function createFFIDAnnouncementsClient(config?: FFIDAnnouncementsClientC
|
|
|
366
366
|
/** Type of the FFID Announcements client */
|
|
367
367
|
type FFIDAnnouncementsClient = ReturnType<typeof createFFIDAnnouncementsClient>;
|
|
368
368
|
|
|
369
|
-
export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, FFIDCacheAdapter, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, FFIDLogger, FFIDOAuthUserInfo, FFIDOrganization, FFIDPortalSessionResponse, FFIDProvider, type FFIDProviderProps, FFIDSessionResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDUser, FFID_ANNOUNCEMENTS_ERROR_CODES, type KVNamespaceLike, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
|
|
369
|
+
export { AnnouncementListResponse, DEFAULT_API_BASE_URL, FFIDAnnouncementsApiResponse, type FFIDAnnouncementsClient, FFIDAnnouncementsClientConfig, FFIDAnnouncementsLogger, FFIDApiResponse, FFIDCacheAdapter, FFIDCheckoutSessionResponse, type FFIDClient, FFIDConfig, FFIDCreateCheckoutParams, FFIDCreatePortalParams, FFIDError, FFIDLogger, FFIDOAuthUserInfo, FFIDOrganization, FFIDPortalSessionResponse, FFIDProvider, type FFIDProviderProps, FFIDSessionResponse, FFIDSubscription, FFIDSubscriptionCheckResponse, FFIDSubscriptionContextValue, FFIDUser, FFIDVerifyAccessTokenOptions, FFID_ANNOUNCEMENTS_ERROR_CODES, type KVNamespaceLike, ListAnnouncementsOptions, type TokenData, type TokenStore, type UseFFIDReturn, type WithFFIDAuthOptions, type WithSubscriptionOptions, createFFIDAnnouncementsClient, createFFIDClient, createKVCacheAdapter, createMemoryCacheAdapter, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useSubscription, withFFIDAuth, withSubscription };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext } from './chunk-
|
|
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-
|
|
1
|
+
import { useFFIDContext } from './chunk-GW23IWNE.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-GW23IWNE.js';
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
4
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|