@feelflow/ffid-sdk 2.21.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agency/index.cjs +3 -3
- package/dist/agency/index.d.cts +1 -1
- package/dist/agency/index.d.ts +1 -1
- package/dist/agency/index.js +2 -2
- package/dist/announcements/index.cjs +2 -2
- package/dist/announcements/index.js +1 -1
- package/dist/{chunk-HUU4Q5VH.cjs → chunk-HZZQ2BX7.cjs} +83 -11
- package/dist/chunk-JEVK2XUM.js +5 -0
- package/dist/{chunk-YUIITYBE.cjs → chunk-MDHKSVLP.cjs} +2 -0
- package/dist/{chunk-I7NEMG52.js → chunk-RRN3DTET.js} +83 -12
- 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/constants-D61jqRIO.d.cts +35 -0
- package/dist/constants-D61jqRIO.d.ts +35 -0
- package/dist/{ffid-client-DgJRU-YZ.d.cts → ffid-client-DM_t1seS.d.cts} +71 -1
- package/dist/{ffid-client-DgJRU-YZ.d.ts → ffid-client-DM_t1seS.d.ts} +71 -1
- package/dist/{index-Dr5G9HQ4.d.cts → index-COnReU8h.d.cts} +24 -2
- package/dist/{index-Dr5G9HQ4.d.ts → index-COnReU8h.d.ts} +24 -2
- package/dist/index.cjs +37 -31
- package/dist/index.d.cts +101 -7
- package/dist/index.d.ts +101 -7
- package/dist/index.js +4 -3
- package/dist/legal/index.cjs +3 -3
- package/dist/legal/index.d.cts +1 -1
- package/dist/legal/index.d.ts +1 -1
- package/dist/legal/index.js +2 -2
- package/dist/server/index.cjs +83 -11
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +78 -10
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-QBRM2RRC.js +0 -4
- package/dist/constants-DvTGHPZn.d.cts +0 -10
- package/dist/constants-DvTGHPZn.d.ts +0 -10
|
@@ -127,6 +127,40 @@ interface FFIDNewsletterUnsubscribeParams {
|
|
|
127
127
|
interface FFIDNewsletterUnsubscribeResponse {
|
|
128
128
|
ok: true;
|
|
129
129
|
}
|
|
130
|
+
type FFIDNewsletterCampaignStatus = 'draft' | 'queued' | 'sending' | 'sent' | 'failed' | 'cancelled';
|
|
131
|
+
type FFIDNewsletterSegment = {
|
|
132
|
+
type: 'all';
|
|
133
|
+
} | {
|
|
134
|
+
type: 'filter';
|
|
135
|
+
conditions: Record<string, unknown>;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Body source XOR — exactly one of `htmlBody` / `templateId` must be set.
|
|
139
|
+
* V1 only ships `htmlBody`; `templateId` is reserved for SendGrid dynamic
|
|
140
|
+
* templates and is rejected server-side until that work lands.
|
|
141
|
+
*/
|
|
142
|
+
type FFIDNewsletterBodySource = {
|
|
143
|
+
htmlBody: string;
|
|
144
|
+
templateId?: never;
|
|
145
|
+
} | {
|
|
146
|
+
templateId: string;
|
|
147
|
+
htmlBody?: never;
|
|
148
|
+
};
|
|
149
|
+
interface FFIDNewsletterDispatchParams {
|
|
150
|
+
subject: string;
|
|
151
|
+
/** Optional landing-page URL persisted on `newsletter_campaigns.article_url`. */
|
|
152
|
+
articleUrl?: string;
|
|
153
|
+
body: FFIDNewsletterBodySource;
|
|
154
|
+
/** Defaults to `{ type: 'all' }` server-side when omitted. */
|
|
155
|
+
segment?: FFIDNewsletterSegment;
|
|
156
|
+
}
|
|
157
|
+
interface FFIDNewsletterDispatchResponse {
|
|
158
|
+
campaignId: string;
|
|
159
|
+
totalRecipients: number;
|
|
160
|
+
status: FFIDNewsletterCampaignStatus;
|
|
161
|
+
sentCount: number;
|
|
162
|
+
failedCount: number;
|
|
163
|
+
}
|
|
130
164
|
|
|
131
165
|
/** Cache adapter interface for FFID SDK token verification */
|
|
132
166
|
/**
|
|
@@ -589,6 +623,19 @@ interface FFIDVerifyAccessTokenOptions {
|
|
|
589
623
|
interface FFIDConfig {
|
|
590
624
|
/** Service code to identify your application */
|
|
591
625
|
serviceCode: string;
|
|
626
|
+
/**
|
|
627
|
+
* OAuth 2.0 scope (space-separated). Required since v3.0.0 (#2674).
|
|
628
|
+
*
|
|
629
|
+
* Use `DEFAULT_OAUTH_SCOPES` from `@feelflow/ffid-sdk` for the recommended
|
|
630
|
+
* baseline, or specify a least-privilege subset for your use case. Phase 3
|
|
631
|
+
* of `feelflow-id-platform#2656` will reject `/oauth/authorize` requests
|
|
632
|
+
* without this parameter, so passing an empty string here is also rejected
|
|
633
|
+
* — **except** in `service-key` mode (server-to-server, never calls
|
|
634
|
+
* `/oauth/authorize`), where `''` is permitted at runtime.
|
|
635
|
+
*
|
|
636
|
+
* @example 'openid email profile subscription:read legal:read'
|
|
637
|
+
*/
|
|
638
|
+
scope: string;
|
|
592
639
|
/** FFID API base URL (defaults to production) */
|
|
593
640
|
apiBaseUrl?: string | undefined;
|
|
594
641
|
/**
|
|
@@ -1009,10 +1056,32 @@ interface ContractWizardSubscriptionOptions {
|
|
|
1009
1056
|
|
|
1010
1057
|
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
|
1011
1058
|
|
|
1059
|
+
/**
|
|
1060
|
+
* `screen_hint=signup` query value for `/oauth/authorize` (#2908 / #2911).
|
|
1061
|
+
* Forwards to Supabase Auth signup screen; only the `'signup'` value is
|
|
1062
|
+
* propagated (no-op when `'login'` or omitted).
|
|
1063
|
+
*/
|
|
1064
|
+
declare const SCREEN_HINT_SIGNUP: "signup";
|
|
1065
|
+
/** `screen_hint=login` (no-op marker; default screen is login) */
|
|
1066
|
+
declare const SCREEN_HINT_LOGIN: "login";
|
|
1012
1067
|
/** Options for redirectToAuthorize */
|
|
1013
1068
|
interface RedirectToAuthorizeOptions {
|
|
1014
1069
|
/** Target organization ID — triggers org-scoped OAuth re-authorization */
|
|
1015
1070
|
organizationId?: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* Initial Supabase Auth screen hint (#2908 / #2911).
|
|
1073
|
+
*
|
|
1074
|
+
* - `'signup'`: forwards `?screen_hint=signup` so the FFID OAuth flow lands
|
|
1075
|
+
* on the signup screen (used by external services that want to deep-link
|
|
1076
|
+
* new users into the signup CTA).
|
|
1077
|
+
* - `'login'` / `undefined`: no `screen_hint` param is added — the default
|
|
1078
|
+
* login screen is shown.
|
|
1079
|
+
*
|
|
1080
|
+
* In cookie mode, `'signup'` redirects to the FFID `/signup` page instead
|
|
1081
|
+
* of `/login` so the SDK contract (signup-screen intent) stays consistent
|
|
1082
|
+
* regardless of `authMode`.
|
|
1083
|
+
*/
|
|
1084
|
+
screenHint?: typeof SCREEN_HINT_SIGNUP | typeof SCREEN_HINT_LOGIN;
|
|
1016
1085
|
}
|
|
1017
1086
|
|
|
1018
1087
|
/**
|
|
@@ -1060,7 +1129,7 @@ declare function createTokenStore(storageType?: 'localStorage' | 'memory'): Toke
|
|
|
1060
1129
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
1061
1130
|
getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
|
|
1062
1131
|
signOut: () => Promise<FFIDApiResponse<void>>;
|
|
1063
|
-
redirectToLogin: () => Promise<FFIDRedirectResult>;
|
|
1132
|
+
redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
|
|
1064
1133
|
redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
|
|
1065
1134
|
redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
|
|
1066
1135
|
getLoginUrl: (redirectUrl?: string) => string;
|
|
@@ -1125,6 +1194,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1125
1194
|
subscribe: (params: FFIDNewsletterSubscribeParams) => Promise<FFIDApiResponse<FFIDNewsletterSubscribeResponse>>;
|
|
1126
1195
|
confirm: (params: FFIDNewsletterConfirmParams) => Promise<FFIDApiResponse<FFIDNewsletterConfirmResponse>>;
|
|
1127
1196
|
unsubscribe: (params: FFIDNewsletterUnsubscribeParams) => Promise<FFIDApiResponse<FFIDNewsletterUnsubscribeResponse>>;
|
|
1197
|
+
dispatch: (params: FFIDNewsletterDispatchParams) => Promise<FFIDApiResponse<FFIDNewsletterDispatchResponse>>;
|
|
1128
1198
|
};
|
|
1129
1199
|
/** Inquiry methods (create) */
|
|
1130
1200
|
inquiry: {
|
|
@@ -127,6 +127,40 @@ interface FFIDNewsletterUnsubscribeParams {
|
|
|
127
127
|
interface FFIDNewsletterUnsubscribeResponse {
|
|
128
128
|
ok: true;
|
|
129
129
|
}
|
|
130
|
+
type FFIDNewsletterCampaignStatus = 'draft' | 'queued' | 'sending' | 'sent' | 'failed' | 'cancelled';
|
|
131
|
+
type FFIDNewsletterSegment = {
|
|
132
|
+
type: 'all';
|
|
133
|
+
} | {
|
|
134
|
+
type: 'filter';
|
|
135
|
+
conditions: Record<string, unknown>;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Body source XOR — exactly one of `htmlBody` / `templateId` must be set.
|
|
139
|
+
* V1 only ships `htmlBody`; `templateId` is reserved for SendGrid dynamic
|
|
140
|
+
* templates and is rejected server-side until that work lands.
|
|
141
|
+
*/
|
|
142
|
+
type FFIDNewsletterBodySource = {
|
|
143
|
+
htmlBody: string;
|
|
144
|
+
templateId?: never;
|
|
145
|
+
} | {
|
|
146
|
+
templateId: string;
|
|
147
|
+
htmlBody?: never;
|
|
148
|
+
};
|
|
149
|
+
interface FFIDNewsletterDispatchParams {
|
|
150
|
+
subject: string;
|
|
151
|
+
/** Optional landing-page URL persisted on `newsletter_campaigns.article_url`. */
|
|
152
|
+
articleUrl?: string;
|
|
153
|
+
body: FFIDNewsletterBodySource;
|
|
154
|
+
/** Defaults to `{ type: 'all' }` server-side when omitted. */
|
|
155
|
+
segment?: FFIDNewsletterSegment;
|
|
156
|
+
}
|
|
157
|
+
interface FFIDNewsletterDispatchResponse {
|
|
158
|
+
campaignId: string;
|
|
159
|
+
totalRecipients: number;
|
|
160
|
+
status: FFIDNewsletterCampaignStatus;
|
|
161
|
+
sentCount: number;
|
|
162
|
+
failedCount: number;
|
|
163
|
+
}
|
|
130
164
|
|
|
131
165
|
/** Cache adapter interface for FFID SDK token verification */
|
|
132
166
|
/**
|
|
@@ -589,6 +623,19 @@ interface FFIDVerifyAccessTokenOptions {
|
|
|
589
623
|
interface FFIDConfig {
|
|
590
624
|
/** Service code to identify your application */
|
|
591
625
|
serviceCode: string;
|
|
626
|
+
/**
|
|
627
|
+
* OAuth 2.0 scope (space-separated). Required since v3.0.0 (#2674).
|
|
628
|
+
*
|
|
629
|
+
* Use `DEFAULT_OAUTH_SCOPES` from `@feelflow/ffid-sdk` for the recommended
|
|
630
|
+
* baseline, or specify a least-privilege subset for your use case. Phase 3
|
|
631
|
+
* of `feelflow-id-platform#2656` will reject `/oauth/authorize` requests
|
|
632
|
+
* without this parameter, so passing an empty string here is also rejected
|
|
633
|
+
* — **except** in `service-key` mode (server-to-server, never calls
|
|
634
|
+
* `/oauth/authorize`), where `''` is permitted at runtime.
|
|
635
|
+
*
|
|
636
|
+
* @example 'openid email profile subscription:read legal:read'
|
|
637
|
+
*/
|
|
638
|
+
scope: string;
|
|
592
639
|
/** FFID API base URL (defaults to production) */
|
|
593
640
|
apiBaseUrl?: string | undefined;
|
|
594
641
|
/**
|
|
@@ -1009,10 +1056,32 @@ interface ContractWizardSubscriptionOptions {
|
|
|
1009
1056
|
|
|
1010
1057
|
/** Redirect and URL generation - redirectToLogin / redirectToAuthorize / redirectToLogout / getLoginUrl / getSignupUrl / getLogoutUrl */
|
|
1011
1058
|
|
|
1059
|
+
/**
|
|
1060
|
+
* `screen_hint=signup` query value for `/oauth/authorize` (#2908 / #2911).
|
|
1061
|
+
* Forwards to Supabase Auth signup screen; only the `'signup'` value is
|
|
1062
|
+
* propagated (no-op when `'login'` or omitted).
|
|
1063
|
+
*/
|
|
1064
|
+
declare const SCREEN_HINT_SIGNUP: "signup";
|
|
1065
|
+
/** `screen_hint=login` (no-op marker; default screen is login) */
|
|
1066
|
+
declare const SCREEN_HINT_LOGIN: "login";
|
|
1012
1067
|
/** Options for redirectToAuthorize */
|
|
1013
1068
|
interface RedirectToAuthorizeOptions {
|
|
1014
1069
|
/** Target organization ID — triggers org-scoped OAuth re-authorization */
|
|
1015
1070
|
organizationId?: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* Initial Supabase Auth screen hint (#2908 / #2911).
|
|
1073
|
+
*
|
|
1074
|
+
* - `'signup'`: forwards `?screen_hint=signup` so the FFID OAuth flow lands
|
|
1075
|
+
* on the signup screen (used by external services that want to deep-link
|
|
1076
|
+
* new users into the signup CTA).
|
|
1077
|
+
* - `'login'` / `undefined`: no `screen_hint` param is added — the default
|
|
1078
|
+
* login screen is shown.
|
|
1079
|
+
*
|
|
1080
|
+
* In cookie mode, `'signup'` redirects to the FFID `/signup` page instead
|
|
1081
|
+
* of `/login` so the SDK contract (signup-screen intent) stays consistent
|
|
1082
|
+
* regardless of `authMode`.
|
|
1083
|
+
*/
|
|
1084
|
+
screenHint?: typeof SCREEN_HINT_SIGNUP | typeof SCREEN_HINT_LOGIN;
|
|
1016
1085
|
}
|
|
1017
1086
|
|
|
1018
1087
|
/**
|
|
@@ -1060,7 +1129,7 @@ declare function createTokenStore(storageType?: 'localStorage' | 'memory'): Toke
|
|
|
1060
1129
|
declare function createFFIDClient(config: FFIDConfig): {
|
|
1061
1130
|
getSession: () => Promise<FFIDApiResponse<FFIDSessionResponse>>;
|
|
1062
1131
|
signOut: () => Promise<FFIDApiResponse<void>>;
|
|
1063
|
-
redirectToLogin: () => Promise<FFIDRedirectResult>;
|
|
1132
|
+
redirectToLogin: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
|
|
1064
1133
|
redirectToAuthorize: (options?: RedirectToAuthorizeOptions) => Promise<FFIDRedirectResult>;
|
|
1065
1134
|
redirectToLogout: (postLogoutRedirectUri?: string) => FFIDRedirectResult;
|
|
1066
1135
|
getLoginUrl: (redirectUrl?: string) => string;
|
|
@@ -1125,6 +1194,7 @@ declare function createFFIDClient(config: FFIDConfig): {
|
|
|
1125
1194
|
subscribe: (params: FFIDNewsletterSubscribeParams) => Promise<FFIDApiResponse<FFIDNewsletterSubscribeResponse>>;
|
|
1126
1195
|
confirm: (params: FFIDNewsletterConfirmParams) => Promise<FFIDApiResponse<FFIDNewsletterConfirmResponse>>;
|
|
1127
1196
|
unsubscribe: (params: FFIDNewsletterUnsubscribeParams) => Promise<FFIDApiResponse<FFIDNewsletterUnsubscribeResponse>>;
|
|
1197
|
+
dispatch: (params: FFIDNewsletterDispatchParams) => Promise<FFIDApiResponse<FFIDNewsletterDispatchResponse>>;
|
|
1128
1198
|
};
|
|
1129
1199
|
/** Inquiry methods (create) */
|
|
1130
1200
|
inquiry: {
|
|
@@ -192,6 +192,19 @@ interface FFIDVerifyAccessTokenOptions {
|
|
|
192
192
|
interface FFIDConfig {
|
|
193
193
|
/** Service code to identify your application */
|
|
194
194
|
serviceCode: string;
|
|
195
|
+
/**
|
|
196
|
+
* OAuth 2.0 scope (space-separated). Required since v3.0.0 (#2674).
|
|
197
|
+
*
|
|
198
|
+
* Use `DEFAULT_OAUTH_SCOPES` from `@feelflow/ffid-sdk` for the recommended
|
|
199
|
+
* baseline, or specify a least-privilege subset for your use case. Phase 3
|
|
200
|
+
* of `feelflow-id-platform#2656` will reject `/oauth/authorize` requests
|
|
201
|
+
* without this parameter, so passing an empty string here is also rejected
|
|
202
|
+
* — **except** in `service-key` mode (server-to-server, never calls
|
|
203
|
+
* `/oauth/authorize`), where `''` is permitted at runtime.
|
|
204
|
+
*
|
|
205
|
+
* @example 'openid email profile subscription:read legal:read'
|
|
206
|
+
*/
|
|
207
|
+
scope: string;
|
|
195
208
|
/** FFID API base URL (defaults to production) */
|
|
196
209
|
apiBaseUrl?: string | undefined;
|
|
197
210
|
/**
|
|
@@ -289,8 +302,17 @@ interface FFIDContextValue {
|
|
|
289
302
|
isAuthenticated: boolean;
|
|
290
303
|
/** Any authentication error */
|
|
291
304
|
error: FFIDError | null;
|
|
292
|
-
/**
|
|
293
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Redirect to FFID login page.
|
|
307
|
+
*
|
|
308
|
+
* @param options.screenHint `'signup'` to deep-link into the signup screen
|
|
309
|
+
* (forwards `screen_hint=signup` in token mode / redirects to `/signup`
|
|
310
|
+
* in cookie mode). `'login'` and `undefined` use the default login flow.
|
|
311
|
+
* See `RedirectToAuthorizeOptions` (#2908 / #2911).
|
|
312
|
+
*/
|
|
313
|
+
login: (options?: {
|
|
314
|
+
screenHint?: 'signup' | 'login';
|
|
315
|
+
}) => void;
|
|
294
316
|
/** Sign out and clear session */
|
|
295
317
|
logout: () => Promise<void>;
|
|
296
318
|
/**
|
|
@@ -192,6 +192,19 @@ interface FFIDVerifyAccessTokenOptions {
|
|
|
192
192
|
interface FFIDConfig {
|
|
193
193
|
/** Service code to identify your application */
|
|
194
194
|
serviceCode: string;
|
|
195
|
+
/**
|
|
196
|
+
* OAuth 2.0 scope (space-separated). Required since v3.0.0 (#2674).
|
|
197
|
+
*
|
|
198
|
+
* Use `DEFAULT_OAUTH_SCOPES` from `@feelflow/ffid-sdk` for the recommended
|
|
199
|
+
* baseline, or specify a least-privilege subset for your use case. Phase 3
|
|
200
|
+
* of `feelflow-id-platform#2656` will reject `/oauth/authorize` requests
|
|
201
|
+
* without this parameter, so passing an empty string here is also rejected
|
|
202
|
+
* — **except** in `service-key` mode (server-to-server, never calls
|
|
203
|
+
* `/oauth/authorize`), where `''` is permitted at runtime.
|
|
204
|
+
*
|
|
205
|
+
* @example 'openid email profile subscription:read legal:read'
|
|
206
|
+
*/
|
|
207
|
+
scope: string;
|
|
195
208
|
/** FFID API base URL (defaults to production) */
|
|
196
209
|
apiBaseUrl?: string | undefined;
|
|
197
210
|
/**
|
|
@@ -289,8 +302,17 @@ interface FFIDContextValue {
|
|
|
289
302
|
isAuthenticated: boolean;
|
|
290
303
|
/** Any authentication error */
|
|
291
304
|
error: FFIDError | null;
|
|
292
|
-
/**
|
|
293
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Redirect to FFID login page.
|
|
307
|
+
*
|
|
308
|
+
* @param options.screenHint `'signup'` to deep-link into the signup screen
|
|
309
|
+
* (forwards `screen_hint=signup` in token mode / redirects to `/signup`
|
|
310
|
+
* in cookie mode). `'login'` and `undefined` use the default login flow.
|
|
311
|
+
* See `RedirectToAuthorizeOptions` (#2908 / #2911).
|
|
312
|
+
*/
|
|
313
|
+
login: (options?: {
|
|
314
|
+
screenHint?: 'signup' | 'login';
|
|
315
|
+
}) => void;
|
|
294
316
|
/** Sign out and clear session */
|
|
295
317
|
logout: () => Promise<void>;
|
|
296
318
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHZZQ2BX7_cjs = require('./chunk-HZZQ2BX7.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -53,8 +53,8 @@ function defaultRedirect(url) {
|
|
|
53
53
|
}
|
|
54
54
|
function useRequireActiveSubscription(options) {
|
|
55
55
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
56
|
-
const { isLoading, error } =
|
|
57
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
56
|
+
const { isLoading, error } = chunkHZZQ2BX7_cjs.useFFIDContext();
|
|
57
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkHZZQ2BX7_cjs.useSubscription();
|
|
58
58
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
59
59
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
60
60
|
react.useEffect(() => {
|
|
@@ -75,7 +75,7 @@ function useRequireActiveSubscription(options) {
|
|
|
75
75
|
}
|
|
76
76
|
function withFFIDAuth(Component, options = {}) {
|
|
77
77
|
const WrappedComponent = (props) => {
|
|
78
|
-
const { isLoading, isAuthenticated, login } =
|
|
78
|
+
const { isLoading, isAuthenticated, login } = chunkHZZQ2BX7_cjs.useFFIDContext();
|
|
79
79
|
const hasRedirected = react.useRef(false);
|
|
80
80
|
react.useEffect(() => {
|
|
81
81
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -100,115 +100,121 @@ function withFFIDAuth(Component, options = {}) {
|
|
|
100
100
|
|
|
101
101
|
// src/newsletter/types.ts
|
|
102
102
|
var FFID_NEWSLETTER_TYPES = ["inquiry_followup", "general"];
|
|
103
|
+
var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
|
|
103
104
|
|
|
104
105
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
105
106
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkHZZQ2BX7_cjs.DEFAULT_API_BASE_URL; }
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () { return chunkHZZQ2BX7_cjs.DEFAULT_OAUTH_SCOPES; }
|
|
107
112
|
});
|
|
108
113
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
109
114
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDAnnouncementBadge; }
|
|
111
116
|
});
|
|
112
117
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
113
118
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDAnnouncementList; }
|
|
115
120
|
});
|
|
116
121
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
117
122
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDInquiryForm; }
|
|
119
124
|
});
|
|
120
125
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
121
126
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDLoginButton; }
|
|
123
128
|
});
|
|
124
129
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
125
130
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDOrganizationSwitcher; }
|
|
127
132
|
});
|
|
128
133
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
129
134
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDProvider; }
|
|
131
136
|
});
|
|
132
137
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
133
138
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDSDKError; }
|
|
135
140
|
});
|
|
136
141
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
137
142
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDSubscriptionBadge; }
|
|
139
144
|
});
|
|
140
145
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
141
146
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFIDUserMenu; }
|
|
143
148
|
});
|
|
144
149
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
145
150
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
147
152
|
});
|
|
148
153
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
149
154
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
151
156
|
});
|
|
152
157
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
153
158
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkHZZQ2BX7_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
155
160
|
});
|
|
156
161
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
157
162
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkHZZQ2BX7_cjs.computeEffectiveStatusFromSession; }
|
|
159
164
|
});
|
|
160
165
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
161
166
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkHZZQ2BX7_cjs.createFFIDAnnouncementsClient; }
|
|
163
168
|
});
|
|
164
169
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
165
170
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkHZZQ2BX7_cjs.createFFIDClient; }
|
|
167
172
|
});
|
|
168
173
|
Object.defineProperty(exports, "createTokenStore", {
|
|
169
174
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkHZZQ2BX7_cjs.createTokenStore; }
|
|
171
176
|
});
|
|
172
177
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
173
178
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkHZZQ2BX7_cjs.generateCodeChallenge; }
|
|
175
180
|
});
|
|
176
181
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
177
182
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkHZZQ2BX7_cjs.generateCodeVerifier; }
|
|
179
184
|
});
|
|
180
185
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
181
186
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkHZZQ2BX7_cjs.isFFIDInquiryCategorySite2026; }
|
|
183
188
|
});
|
|
184
189
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
185
190
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkHZZQ2BX7_cjs.normalizeRedirectUri; }
|
|
187
192
|
});
|
|
188
193
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
189
194
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkHZZQ2BX7_cjs.retrieveCodeVerifier; }
|
|
191
196
|
});
|
|
192
197
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
193
198
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkHZZQ2BX7_cjs.storeCodeVerifier; }
|
|
195
200
|
});
|
|
196
201
|
Object.defineProperty(exports, "useFFID", {
|
|
197
202
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkHZZQ2BX7_cjs.useFFID; }
|
|
199
204
|
});
|
|
200
205
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
201
206
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkHZZQ2BX7_cjs.useFFIDAnnouncements; }
|
|
203
208
|
});
|
|
204
209
|
Object.defineProperty(exports, "useSubscription", {
|
|
205
210
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkHZZQ2BX7_cjs.useSubscription; }
|
|
207
212
|
});
|
|
208
213
|
Object.defineProperty(exports, "withSubscription", {
|
|
209
214
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkHZZQ2BX7_cjs.withSubscription; }
|
|
211
216
|
});
|
|
217
|
+
exports.FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS;
|
|
212
218
|
exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
|
|
213
219
|
exports.createKVCacheAdapter = createKVCacheAdapter;
|
|
214
220
|
exports.createMemoryCacheAdapter = createMemoryCacheAdapter;
|