@zuzjs/flare 0.2.9 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +66 -7
- package/dist/index.d.ts +66 -7
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -15,10 +15,20 @@ interface FlareConfig {
|
|
|
15
15
|
* Example: '/api/flare' (relative, browser resolves against current origin)
|
|
16
16
|
*/
|
|
17
17
|
httpBase?: string;
|
|
18
|
+
/**
|
|
19
|
+
* WebSocket path used for realtime transport.
|
|
20
|
+
* Defaults to '/' for backward compatibility.
|
|
21
|
+
*/
|
|
22
|
+
wsPath?: string;
|
|
18
23
|
/** Unique identifier for the application. */
|
|
19
24
|
appId: string;
|
|
20
25
|
/** API key for the application. */
|
|
21
26
|
apiKey?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Request content type for credential auth endpoints (/auth/token, /auth/register).
|
|
29
|
+
* Defaults to OAuth-compatible form encoding.
|
|
30
|
+
*/
|
|
31
|
+
authRequestContentType?: "application/x-www-form-urlencoded" | "application/json";
|
|
22
32
|
/** Public key for the application. */
|
|
23
33
|
publicKey?: string;
|
|
24
34
|
/** Whether to automatically reconnect on connection loss. */
|
|
@@ -35,7 +45,17 @@ interface FlareConfig {
|
|
|
35
45
|
connectionTimeout?: number;
|
|
36
46
|
/** Enable automatic push notification registration on supported platforms. */
|
|
37
47
|
pushNotifications?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Optional per-collection mapper registry for shaping inbound data.
|
|
50
|
+
*
|
|
51
|
+
* Keys can be:
|
|
52
|
+
* - base collection names (e.g. "boards")
|
|
53
|
+
* - join aliases (`join(..., { as: "team" })` => "team")
|
|
54
|
+
*/
|
|
55
|
+
dataMapper?: DataMapperRegistry;
|
|
38
56
|
}
|
|
57
|
+
type DataMapperFn<TRow = any, TMapped = any> = (row: TRow) => TMapped;
|
|
58
|
+
type DataMapperRegistry = Record<string, DataMapperFn<any, any>>;
|
|
39
59
|
type FlareAuthProviderId = "credentials" | "anonymous" | "google" | "facebook" | "github" | "dropbox" | "apple" | "twitter";
|
|
40
60
|
interface FlareAuthProviderPublicConfig {
|
|
41
61
|
enabled: boolean;
|
|
@@ -876,6 +896,10 @@ declare class FlareBase<TPresetMap extends QueryPresetMap = {}> {
|
|
|
876
896
|
protected fromWireField(field: string): string;
|
|
877
897
|
protected normalizeOutboundData(value: unknown): unknown;
|
|
878
898
|
protected normalizeInboundData(value: unknown): unknown;
|
|
899
|
+
private getDataMapper;
|
|
900
|
+
private runMapper;
|
|
901
|
+
private applyJoinAliasMappers;
|
|
902
|
+
mapInboundResult(collection: string, payload: unknown, query?: StructuredQuery): unknown;
|
|
879
903
|
protected normalizeOutboundAnyFilter(filter: Record<string, unknown>): Record<string, unknown>;
|
|
880
904
|
protected normalizeOutboundQuery(query: unknown): unknown;
|
|
881
905
|
protected timedFetch(label: string, input: string, init?: RequestInit): Promise<{
|
|
@@ -976,6 +1000,7 @@ declare class FlareBase<TPresetMap extends QueryPresetMap = {}> {
|
|
|
976
1000
|
* domain and one from the Next.js domain.
|
|
977
1001
|
*/
|
|
978
1002
|
declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBase<TPresetMap> {
|
|
1003
|
+
static AUTH_TRACE_STORAGE_KEY: string;
|
|
979
1004
|
protected authToken?: string;
|
|
980
1005
|
protected userId?: string;
|
|
981
1006
|
protected authGuard?: AuthGuard;
|
|
@@ -987,9 +1012,16 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
987
1012
|
protected socketAuthSyncPromise?: Promise<void>;
|
|
988
1013
|
protected pushServiceWorkerInitPromise?: Promise<ServiceWorkerRegistration | null>;
|
|
989
1014
|
protected authSession: FlareAuthSession | null;
|
|
1015
|
+
protected authBootstrapPromise?: Promise<void>;
|
|
1016
|
+
protected authBootstrapAttempted: boolean;
|
|
990
1017
|
protected authStateListeners: AuthStateListener[];
|
|
991
1018
|
protected authConfigListeners: AuthConfigListener[];
|
|
992
1019
|
protected currentProfile: FlareAuthUser | undefined;
|
|
1020
|
+
protected isAuthTraceEnabled(): boolean;
|
|
1021
|
+
setAuthTrace(enabled: boolean, persist?: boolean): void;
|
|
1022
|
+
protected traceAuth(event: string, details?: Record<string, unknown>): void;
|
|
1023
|
+
private getAuthRequestContentType;
|
|
1024
|
+
private buildAuthRequestBody;
|
|
993
1025
|
private getDefaultCsrfCookieName;
|
|
994
1026
|
getCsrfCookieName(): string;
|
|
995
1027
|
/**
|
|
@@ -1033,7 +1065,7 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1033
1065
|
protected fetchAuthConfig(): Promise<FlareAuthConfig>;
|
|
1034
1066
|
onAuthConfigLoaded(listener: AuthConfigListener): () => void;
|
|
1035
1067
|
protected setProfile(profile: FlareAuthUser): void;
|
|
1036
|
-
protected setAuthSession(session: FlareAuthSession | null): void;
|
|
1068
|
+
protected setAuthSession(session: FlareAuthSession | null, source?: string): void;
|
|
1037
1069
|
onAuthStateChanged(listener: AuthStateListener): () => void;
|
|
1038
1070
|
onAuthStateChange(listener: AuthStateListener): () => void;
|
|
1039
1071
|
get currentUser(): FlareAuthUser | undefined;
|
|
@@ -1071,7 +1103,10 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1071
1103
|
}): Promise<{
|
|
1072
1104
|
kind?: string;
|
|
1073
1105
|
verificationRequired: true;
|
|
1106
|
+
verification_required: true;
|
|
1074
1107
|
emailSent: boolean;
|
|
1108
|
+
email_sent: boolean;
|
|
1109
|
+
message?: string;
|
|
1075
1110
|
preview?: {
|
|
1076
1111
|
code: string;
|
|
1077
1112
|
link: string;
|
|
@@ -1079,10 +1114,20 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1079
1114
|
} | (AuthResult & {
|
|
1080
1115
|
kind?: string;
|
|
1081
1116
|
accessToken: string;
|
|
1117
|
+
access_token: string;
|
|
1118
|
+
token_type: string;
|
|
1119
|
+
expires_in: number;
|
|
1082
1120
|
refreshToken: string | null;
|
|
1121
|
+
refresh_token: string | null;
|
|
1122
|
+
scope: string;
|
|
1123
|
+
expires_at: string | number;
|
|
1124
|
+
sid: string;
|
|
1083
1125
|
authToken: AuthToken;
|
|
1084
|
-
|
|
1085
|
-
|
|
1126
|
+
auth_token: AuthToken;
|
|
1127
|
+
verificationRequired: false;
|
|
1128
|
+
verification_required: false;
|
|
1129
|
+
emailSent: boolean;
|
|
1130
|
+
email_sent: boolean;
|
|
1086
1131
|
preview?: {
|
|
1087
1132
|
code: string;
|
|
1088
1133
|
link: string;
|
|
@@ -1095,7 +1140,10 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1095
1140
|
}): Promise<{
|
|
1096
1141
|
kind?: string;
|
|
1097
1142
|
verificationRequired: true;
|
|
1143
|
+
verification_required: true;
|
|
1098
1144
|
emailSent: boolean;
|
|
1145
|
+
email_sent: boolean;
|
|
1146
|
+
message?: string;
|
|
1099
1147
|
preview?: {
|
|
1100
1148
|
code: string;
|
|
1101
1149
|
link: string;
|
|
@@ -1103,10 +1151,20 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1103
1151
|
} | (AuthResult & {
|
|
1104
1152
|
kind?: string;
|
|
1105
1153
|
accessToken: string;
|
|
1154
|
+
access_token: string;
|
|
1155
|
+
token_type: string;
|
|
1156
|
+
expires_in: number;
|
|
1106
1157
|
refreshToken: string | null;
|
|
1158
|
+
refresh_token: string | null;
|
|
1159
|
+
scope: string;
|
|
1160
|
+
expires_at: string | number;
|
|
1161
|
+
sid: string;
|
|
1107
1162
|
authToken: AuthToken;
|
|
1108
|
-
|
|
1109
|
-
|
|
1163
|
+
auth_token: AuthToken;
|
|
1164
|
+
verificationRequired: false;
|
|
1165
|
+
verification_required: false;
|
|
1166
|
+
emailSent: boolean;
|
|
1167
|
+
email_sent: boolean;
|
|
1110
1168
|
preview?: {
|
|
1111
1169
|
code: string;
|
|
1112
1170
|
link: string;
|
|
@@ -1165,6 +1223,7 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1165
1223
|
email: string;
|
|
1166
1224
|
}>;
|
|
1167
1225
|
sendAccountRecovery(email: string): Promise<{
|
|
1226
|
+
kind?: string;
|
|
1168
1227
|
sent: boolean;
|
|
1169
1228
|
emailSent?: boolean;
|
|
1170
1229
|
preview?: {
|
|
@@ -1267,7 +1326,7 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1267
1326
|
protected requestEmailPasswordToken(email: string, password: string, scope?: string[]): Promise<AuthToken & {
|
|
1268
1327
|
kind: string;
|
|
1269
1328
|
}>;
|
|
1270
|
-
protected fetchAuthMe(token
|
|
1329
|
+
protected fetchAuthMe(token?: string): Promise<{
|
|
1271
1330
|
id?: string;
|
|
1272
1331
|
email?: string | null;
|
|
1273
1332
|
email_verified?: boolean;
|
|
@@ -1494,4 +1553,4 @@ declare const getFlare: () => FlareClient | null;
|
|
|
1494
1553
|
*/
|
|
1495
1554
|
declare const disconnectFlare: () => void;
|
|
1496
1555
|
|
|
1497
|
-
export { type AggregateFunction, type AggregateSpec, type AndFilter, type AnyFilter, type AuthConfigListener, type AuthConfigResponse, type AuthResult, type AuthStateListener, type AuthWithPendingVerificationResult, type AuthWithTokenResult, type BaseMessage, type BrowserPushRegistrationOptions, type BrowserPushTokenOptions, type ChangeEvent, type ChangeOperation, type CollectionExternalStore, type CollectionPresetMethods, type CollectionQuery, CollectionReference, type CollectionStream, type CollectionStreamListener, type CollectionStreamMeta, type CollectionStreamOptions, type ConnectionState, type CsrfProxyConfig, type CursorValue, type DocAddedCallback, type DocChangedCallback, type DocDeletedCallback, type DocUpdatedCallback, DocumentQueryBuilder, DocumentReference, type DocumentSnapshot, type EmailLinkVerifyResult, type EmailSendResult, FlareAction, type FlareAuthConfig, type FlareAuthProviderId, type FlareAuthProviderPublicConfig, type FlareAuthSession, type FlareAuthUser, FlareClient, type FlareConfig, FlareError, FlareErrors, FlareEvent, FlareResponseCodes, type FlareRule, type GroupByClause, type HavingClause, type JoinClause, type JoinQueryPattern, type NestedJoinClause, type OfflineOperation, type OrFilter, type OrderByClause, type PresenceCallback, type PresenceJoinCallback, type PresenceLeaveCallback, type PresenceMember, type PushSendResult, type QueryConfig, type QueryOperator, type QueryPresetMap, type QueryPresetParams, type QueryPresetRow, type QueryPresetSpec, type QuerySnapshot, type RegisterPushTokenInput, type RulePermission, type SecurityRuleEntry, type SecurityRulesMap, type SendEmailInput, type SendPushNotificationInput, type SnapshotEvent, type StreamFlushReason, type StructuredJoinClause, type StructuredQuery, type SubscribeMessage, type SubscribeOptions, type SubscriptionCallback, type SubscriptionData, type SubscriptionError, type SubscriptionErrorCallback, type SubscriptionHandle, type VectorFieldConfig, type VectorSearchClause, type VerifyEmailLinkInput, type WhereCondition, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, disconnectFlare, extractCsrfFromRequest, flareRulesToSecurityMap, getFlare, parseValue, parseWhereCondition, securityMapToFlareRules };
|
|
1556
|
+
export { type AggregateFunction, type AggregateSpec, type AndFilter, type AnyFilter, type AuthConfigListener, type AuthConfigResponse, type AuthResult, type AuthStateListener, type AuthWithPendingVerificationResult, type AuthWithTokenResult, type BaseMessage, type BrowserPushRegistrationOptions, type BrowserPushTokenOptions, type ChangeEvent, type ChangeOperation, type CollectionExternalStore, type CollectionPresetMethods, type CollectionQuery, CollectionReference, type CollectionStream, type CollectionStreamListener, type CollectionStreamMeta, type CollectionStreamOptions, type ConnectionState, type CsrfProxyConfig, type CursorValue, type DataMapperFn, type DataMapperRegistry, type DocAddedCallback, type DocChangedCallback, type DocDeletedCallback, type DocUpdatedCallback, DocumentQueryBuilder, DocumentReference, type DocumentSnapshot, type EmailLinkVerifyResult, type EmailSendResult, FlareAction, type FlareAuthConfig, type FlareAuthProviderId, type FlareAuthProviderPublicConfig, type FlareAuthSession, type FlareAuthUser, FlareClient, type FlareConfig, FlareError, FlareErrors, FlareEvent, FlareResponseCodes, type FlareRule, type GroupByClause, type HavingClause, type JoinClause, type JoinQueryPattern, type NestedJoinClause, type OfflineOperation, type OrFilter, type OrderByClause, type PresenceCallback, type PresenceJoinCallback, type PresenceLeaveCallback, type PresenceMember, type PushSendResult, type QueryConfig, type QueryOperator, type QueryPresetMap, type QueryPresetParams, type QueryPresetRow, type QueryPresetSpec, type QuerySnapshot, type RegisterPushTokenInput, type RulePermission, type SecurityRuleEntry, type SecurityRulesMap, type SendEmailInput, type SendPushNotificationInput, type SnapshotEvent, type StreamFlushReason, type StructuredJoinClause, type StructuredQuery, type SubscribeMessage, type SubscribeOptions, type SubscriptionCallback, type SubscriptionData, type SubscriptionError, type SubscriptionErrorCallback, type SubscriptionHandle, type VectorFieldConfig, type VectorSearchClause, type VerifyEmailLinkInput, type WhereCondition, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, disconnectFlare, extractCsrfFromRequest, flareRulesToSecurityMap, getFlare, parseValue, parseWhereCondition, securityMapToFlareRules };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,10 +15,20 @@ interface FlareConfig {
|
|
|
15
15
|
* Example: '/api/flare' (relative, browser resolves against current origin)
|
|
16
16
|
*/
|
|
17
17
|
httpBase?: string;
|
|
18
|
+
/**
|
|
19
|
+
* WebSocket path used for realtime transport.
|
|
20
|
+
* Defaults to '/' for backward compatibility.
|
|
21
|
+
*/
|
|
22
|
+
wsPath?: string;
|
|
18
23
|
/** Unique identifier for the application. */
|
|
19
24
|
appId: string;
|
|
20
25
|
/** API key for the application. */
|
|
21
26
|
apiKey?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Request content type for credential auth endpoints (/auth/token, /auth/register).
|
|
29
|
+
* Defaults to OAuth-compatible form encoding.
|
|
30
|
+
*/
|
|
31
|
+
authRequestContentType?: "application/x-www-form-urlencoded" | "application/json";
|
|
22
32
|
/** Public key for the application. */
|
|
23
33
|
publicKey?: string;
|
|
24
34
|
/** Whether to automatically reconnect on connection loss. */
|
|
@@ -35,7 +45,17 @@ interface FlareConfig {
|
|
|
35
45
|
connectionTimeout?: number;
|
|
36
46
|
/** Enable automatic push notification registration on supported platforms. */
|
|
37
47
|
pushNotifications?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Optional per-collection mapper registry for shaping inbound data.
|
|
50
|
+
*
|
|
51
|
+
* Keys can be:
|
|
52
|
+
* - base collection names (e.g. "boards")
|
|
53
|
+
* - join aliases (`join(..., { as: "team" })` => "team")
|
|
54
|
+
*/
|
|
55
|
+
dataMapper?: DataMapperRegistry;
|
|
38
56
|
}
|
|
57
|
+
type DataMapperFn<TRow = any, TMapped = any> = (row: TRow) => TMapped;
|
|
58
|
+
type DataMapperRegistry = Record<string, DataMapperFn<any, any>>;
|
|
39
59
|
type FlareAuthProviderId = "credentials" | "anonymous" | "google" | "facebook" | "github" | "dropbox" | "apple" | "twitter";
|
|
40
60
|
interface FlareAuthProviderPublicConfig {
|
|
41
61
|
enabled: boolean;
|
|
@@ -876,6 +896,10 @@ declare class FlareBase<TPresetMap extends QueryPresetMap = {}> {
|
|
|
876
896
|
protected fromWireField(field: string): string;
|
|
877
897
|
protected normalizeOutboundData(value: unknown): unknown;
|
|
878
898
|
protected normalizeInboundData(value: unknown): unknown;
|
|
899
|
+
private getDataMapper;
|
|
900
|
+
private runMapper;
|
|
901
|
+
private applyJoinAliasMappers;
|
|
902
|
+
mapInboundResult(collection: string, payload: unknown, query?: StructuredQuery): unknown;
|
|
879
903
|
protected normalizeOutboundAnyFilter(filter: Record<string, unknown>): Record<string, unknown>;
|
|
880
904
|
protected normalizeOutboundQuery(query: unknown): unknown;
|
|
881
905
|
protected timedFetch(label: string, input: string, init?: RequestInit): Promise<{
|
|
@@ -976,6 +1000,7 @@ declare class FlareBase<TPresetMap extends QueryPresetMap = {}> {
|
|
|
976
1000
|
* domain and one from the Next.js domain.
|
|
977
1001
|
*/
|
|
978
1002
|
declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBase<TPresetMap> {
|
|
1003
|
+
static AUTH_TRACE_STORAGE_KEY: string;
|
|
979
1004
|
protected authToken?: string;
|
|
980
1005
|
protected userId?: string;
|
|
981
1006
|
protected authGuard?: AuthGuard;
|
|
@@ -987,9 +1012,16 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
987
1012
|
protected socketAuthSyncPromise?: Promise<void>;
|
|
988
1013
|
protected pushServiceWorkerInitPromise?: Promise<ServiceWorkerRegistration | null>;
|
|
989
1014
|
protected authSession: FlareAuthSession | null;
|
|
1015
|
+
protected authBootstrapPromise?: Promise<void>;
|
|
1016
|
+
protected authBootstrapAttempted: boolean;
|
|
990
1017
|
protected authStateListeners: AuthStateListener[];
|
|
991
1018
|
protected authConfigListeners: AuthConfigListener[];
|
|
992
1019
|
protected currentProfile: FlareAuthUser | undefined;
|
|
1020
|
+
protected isAuthTraceEnabled(): boolean;
|
|
1021
|
+
setAuthTrace(enabled: boolean, persist?: boolean): void;
|
|
1022
|
+
protected traceAuth(event: string, details?: Record<string, unknown>): void;
|
|
1023
|
+
private getAuthRequestContentType;
|
|
1024
|
+
private buildAuthRequestBody;
|
|
993
1025
|
private getDefaultCsrfCookieName;
|
|
994
1026
|
getCsrfCookieName(): string;
|
|
995
1027
|
/**
|
|
@@ -1033,7 +1065,7 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1033
1065
|
protected fetchAuthConfig(): Promise<FlareAuthConfig>;
|
|
1034
1066
|
onAuthConfigLoaded(listener: AuthConfigListener): () => void;
|
|
1035
1067
|
protected setProfile(profile: FlareAuthUser): void;
|
|
1036
|
-
protected setAuthSession(session: FlareAuthSession | null): void;
|
|
1068
|
+
protected setAuthSession(session: FlareAuthSession | null, source?: string): void;
|
|
1037
1069
|
onAuthStateChanged(listener: AuthStateListener): () => void;
|
|
1038
1070
|
onAuthStateChange(listener: AuthStateListener): () => void;
|
|
1039
1071
|
get currentUser(): FlareAuthUser | undefined;
|
|
@@ -1071,7 +1103,10 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1071
1103
|
}): Promise<{
|
|
1072
1104
|
kind?: string;
|
|
1073
1105
|
verificationRequired: true;
|
|
1106
|
+
verification_required: true;
|
|
1074
1107
|
emailSent: boolean;
|
|
1108
|
+
email_sent: boolean;
|
|
1109
|
+
message?: string;
|
|
1075
1110
|
preview?: {
|
|
1076
1111
|
code: string;
|
|
1077
1112
|
link: string;
|
|
@@ -1079,10 +1114,20 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1079
1114
|
} | (AuthResult & {
|
|
1080
1115
|
kind?: string;
|
|
1081
1116
|
accessToken: string;
|
|
1117
|
+
access_token: string;
|
|
1118
|
+
token_type: string;
|
|
1119
|
+
expires_in: number;
|
|
1082
1120
|
refreshToken: string | null;
|
|
1121
|
+
refresh_token: string | null;
|
|
1122
|
+
scope: string;
|
|
1123
|
+
expires_at: string | number;
|
|
1124
|
+
sid: string;
|
|
1083
1125
|
authToken: AuthToken;
|
|
1084
|
-
|
|
1085
|
-
|
|
1126
|
+
auth_token: AuthToken;
|
|
1127
|
+
verificationRequired: false;
|
|
1128
|
+
verification_required: false;
|
|
1129
|
+
emailSent: boolean;
|
|
1130
|
+
email_sent: boolean;
|
|
1086
1131
|
preview?: {
|
|
1087
1132
|
code: string;
|
|
1088
1133
|
link: string;
|
|
@@ -1095,7 +1140,10 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1095
1140
|
}): Promise<{
|
|
1096
1141
|
kind?: string;
|
|
1097
1142
|
verificationRequired: true;
|
|
1143
|
+
verification_required: true;
|
|
1098
1144
|
emailSent: boolean;
|
|
1145
|
+
email_sent: boolean;
|
|
1146
|
+
message?: string;
|
|
1099
1147
|
preview?: {
|
|
1100
1148
|
code: string;
|
|
1101
1149
|
link: string;
|
|
@@ -1103,10 +1151,20 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1103
1151
|
} | (AuthResult & {
|
|
1104
1152
|
kind?: string;
|
|
1105
1153
|
accessToken: string;
|
|
1154
|
+
access_token: string;
|
|
1155
|
+
token_type: string;
|
|
1156
|
+
expires_in: number;
|
|
1106
1157
|
refreshToken: string | null;
|
|
1158
|
+
refresh_token: string | null;
|
|
1159
|
+
scope: string;
|
|
1160
|
+
expires_at: string | number;
|
|
1161
|
+
sid: string;
|
|
1107
1162
|
authToken: AuthToken;
|
|
1108
|
-
|
|
1109
|
-
|
|
1163
|
+
auth_token: AuthToken;
|
|
1164
|
+
verificationRequired: false;
|
|
1165
|
+
verification_required: false;
|
|
1166
|
+
emailSent: boolean;
|
|
1167
|
+
email_sent: boolean;
|
|
1110
1168
|
preview?: {
|
|
1111
1169
|
code: string;
|
|
1112
1170
|
link: string;
|
|
@@ -1165,6 +1223,7 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1165
1223
|
email: string;
|
|
1166
1224
|
}>;
|
|
1167
1225
|
sendAccountRecovery(email: string): Promise<{
|
|
1226
|
+
kind?: string;
|
|
1168
1227
|
sent: boolean;
|
|
1169
1228
|
emailSent?: boolean;
|
|
1170
1229
|
preview?: {
|
|
@@ -1267,7 +1326,7 @@ declare class FlareAuth<TPresetMap extends QueryPresetMap = {}> extends FlareBas
|
|
|
1267
1326
|
protected requestEmailPasswordToken(email: string, password: string, scope?: string[]): Promise<AuthToken & {
|
|
1268
1327
|
kind: string;
|
|
1269
1328
|
}>;
|
|
1270
|
-
protected fetchAuthMe(token
|
|
1329
|
+
protected fetchAuthMe(token?: string): Promise<{
|
|
1271
1330
|
id?: string;
|
|
1272
1331
|
email?: string | null;
|
|
1273
1332
|
email_verified?: boolean;
|
|
@@ -1494,4 +1553,4 @@ declare const getFlare: () => FlareClient | null;
|
|
|
1494
1553
|
*/
|
|
1495
1554
|
declare const disconnectFlare: () => void;
|
|
1496
1555
|
|
|
1497
|
-
export { type AggregateFunction, type AggregateSpec, type AndFilter, type AnyFilter, type AuthConfigListener, type AuthConfigResponse, type AuthResult, type AuthStateListener, type AuthWithPendingVerificationResult, type AuthWithTokenResult, type BaseMessage, type BrowserPushRegistrationOptions, type BrowserPushTokenOptions, type ChangeEvent, type ChangeOperation, type CollectionExternalStore, type CollectionPresetMethods, type CollectionQuery, CollectionReference, type CollectionStream, type CollectionStreamListener, type CollectionStreamMeta, type CollectionStreamOptions, type ConnectionState, type CsrfProxyConfig, type CursorValue, type DocAddedCallback, type DocChangedCallback, type DocDeletedCallback, type DocUpdatedCallback, DocumentQueryBuilder, DocumentReference, type DocumentSnapshot, type EmailLinkVerifyResult, type EmailSendResult, FlareAction, type FlareAuthConfig, type FlareAuthProviderId, type FlareAuthProviderPublicConfig, type FlareAuthSession, type FlareAuthUser, FlareClient, type FlareConfig, FlareError, FlareErrors, FlareEvent, FlareResponseCodes, type FlareRule, type GroupByClause, type HavingClause, type JoinClause, type JoinQueryPattern, type NestedJoinClause, type OfflineOperation, type OrFilter, type OrderByClause, type PresenceCallback, type PresenceJoinCallback, type PresenceLeaveCallback, type PresenceMember, type PushSendResult, type QueryConfig, type QueryOperator, type QueryPresetMap, type QueryPresetParams, type QueryPresetRow, type QueryPresetSpec, type QuerySnapshot, type RegisterPushTokenInput, type RulePermission, type SecurityRuleEntry, type SecurityRulesMap, type SendEmailInput, type SendPushNotificationInput, type SnapshotEvent, type StreamFlushReason, type StructuredJoinClause, type StructuredQuery, type SubscribeMessage, type SubscribeOptions, type SubscriptionCallback, type SubscriptionData, type SubscriptionError, type SubscriptionErrorCallback, type SubscriptionHandle, type VectorFieldConfig, type VectorSearchClause, type VerifyEmailLinkInput, type WhereCondition, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, disconnectFlare, extractCsrfFromRequest, flareRulesToSecurityMap, getFlare, parseValue, parseWhereCondition, securityMapToFlareRules };
|
|
1556
|
+
export { type AggregateFunction, type AggregateSpec, type AndFilter, type AnyFilter, type AuthConfigListener, type AuthConfigResponse, type AuthResult, type AuthStateListener, type AuthWithPendingVerificationResult, type AuthWithTokenResult, type BaseMessage, type BrowserPushRegistrationOptions, type BrowserPushTokenOptions, type ChangeEvent, type ChangeOperation, type CollectionExternalStore, type CollectionPresetMethods, type CollectionQuery, CollectionReference, type CollectionStream, type CollectionStreamListener, type CollectionStreamMeta, type CollectionStreamOptions, type ConnectionState, type CsrfProxyConfig, type CursorValue, type DataMapperFn, type DataMapperRegistry, type DocAddedCallback, type DocChangedCallback, type DocDeletedCallback, type DocUpdatedCallback, DocumentQueryBuilder, DocumentReference, type DocumentSnapshot, type EmailLinkVerifyResult, type EmailSendResult, FlareAction, type FlareAuthConfig, type FlareAuthProviderId, type FlareAuthProviderPublicConfig, type FlareAuthSession, type FlareAuthUser, FlareClient, type FlareConfig, FlareError, FlareErrors, FlareEvent, FlareResponseCodes, type FlareRule, type GroupByClause, type HavingClause, type JoinClause, type JoinQueryPattern, type NestedJoinClause, type OfflineOperation, type OrFilter, type OrderByClause, type PresenceCallback, type PresenceJoinCallback, type PresenceLeaveCallback, type PresenceMember, type PushSendResult, type QueryConfig, type QueryOperator, type QueryPresetMap, type QueryPresetParams, type QueryPresetRow, type QueryPresetSpec, type QuerySnapshot, type RegisterPushTokenInput, type RulePermission, type SecurityRuleEntry, type SecurityRulesMap, type SendEmailInput, type SendPushNotificationInput, type SnapshotEvent, type StreamFlushReason, type StructuredJoinClause, type StructuredQuery, type SubscribeMessage, type SubscribeOptions, type SubscriptionCallback, type SubscriptionData, type SubscriptionError, type SubscriptionErrorCallback, type SubscriptionHandle, type VectorFieldConfig, type VectorSearchClause, type VerifyEmailLinkInput, type WhereCondition, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, disconnectFlare, extractCsrfFromRequest, flareRulesToSecurityMap, getFlare, parseValue, parseWhereCondition, securityMapToFlareRules };
|