@zuzjs/flare 0.2.20 → 0.2.21
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 +45 -0
- package/dist/grpc.d.cts +1 -1
- package/dist/grpc.d.ts +1 -1
- package/dist/{index-Y0Mq_6P9.d.cts → index-DlQgWDy-.d.cts} +35 -1
- package/dist/{index-Y0Mq_6P9.d.ts → index-DlQgWDy-.d.ts} +35 -1
- package/dist/{index-CVwSnXPP.d.cts → index-TRU0q-av.d.ts} +46 -2
- package/dist/{index-OUj3iEUt.d.ts → index-mMCJajDN.d.cts} +46 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +30 -30
- package/dist/index.d.ts +30 -30
- package/dist/index.js +2 -2
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as FlareClient } from './index-
|
|
2
|
-
export { B as BaseMessage, C as CollectionPresetMethods, a as CollectionQuery, b as CollectionReference, D as DocumentQueryBuilder, c as DocumentReference, d as FlareAction, e as FlareEvent, f as FlareStorage, S as SubscribeMessage, p as parseValue, g as parseWhereCondition } from './index-
|
|
3
|
-
import { F as FlareConfig } from './index-
|
|
4
|
-
export { A as AggregateFunction, a as AggregateSpec, b as AndFilter, c as AnyFilter, d as AuthConfigListener, e as AuthResult, f as AuthStateListener, g as AuthWithPendingVerificationResult, h as AuthWithTokenResult, B as BrowserPushRegistrationOptions, i as BrowserPushTokenOptions, j as BucketCorsRule, k as BucketPolicyInput, C as ChangeEvent,
|
|
1
|
+
import { F as FlareClient } from './index-mMCJajDN.cjs';
|
|
2
|
+
export { B as BaseMessage, C as CollectionPresetMethods, a as CollectionQuery, b as CollectionReference, D as DocumentQueryBuilder, c as DocumentReference, d as FlareAction, e as FlareEvent, f as FlareStorage, S as SubscribeMessage, p as parseValue, g as parseWhereCondition } from './index-mMCJajDN.cjs';
|
|
3
|
+
import { F as FlareConfig } from './index-DlQgWDy-.cjs';
|
|
4
|
+
export { A as AggregateFunction, a as AggregateSpec, b as AndFilter, c as AnyFilter, d as AuthConfigListener, e as AuthResult, f as AuthStateListener, g as AuthWithPendingVerificationResult, h as AuthWithTokenResult, B as BrowserPushRegistrationOptions, i as BrowserPushTokenOptions, j as BucketCorsRule, k as BucketPolicyInput, l as BulkWriteOperation, m as BulkWriteOptions, n as BulkWriteProgress, o as BulkWriteResult, C as ChangeEvent, p as ChangeOperation, q as CollectionExternalStore, r as CollectionStream, s as CollectionStreamListener, t as CollectionStreamMeta, u as CollectionStreamOptions, v as ConnectionState, w as CopyObjectInput, x as CursorValue, D as DataMapperFn, y as DataMapperRegistry, z as DeleteObjectInput, E as DeleteObjectsInput, G as DocAddedCallback, H as DocChangedCallback, I as DocDeletedCallback, J as DocUpdatedCallback, K as DocumentSnapshot, L as DownloadObjectInput, M as DownloadObjectResult, N as EmailLinkVerifyResult, O as EmailSendResult, P as FlareAuthConfig, Q as FlareAuthHydrationInput, R as FlareAuthHydrationOptions, S as FlareAuthProviderId, T as FlareAuthProviderPublicConfig, U as FlareAuthSession, V as FlareAuthUser, W as FlareRule, X as FlareStorageAutoConfig, Y as FlareStorageAwsConfig, Z as FlareStorageDeleteInput, _ as FlareStorageDownloadInput, $ as FlareStorageObjectResult, a0 as FlareStorageRulesHistoryResult, a1 as FlareStorageRulesPolicy, a2 as FlareStorageServer, a3 as FlareStorageServerInput, a4 as FlareStorageServerPatchInput, a5 as FlareStorageSignedAction, a6 as FlareStorageSignedUrlInput, a7 as FlareStorageSignedUrlResult, a8 as FlareStorageTransferManagerConfig, a9 as FlareStorageUploadInput, aa as GetObjectInput, ab as GetObjectResult, ac as GetObjectUrlInput, ad as GroupByClause, ae as HavingClause, af as HeadObjectInput, ag as HeadObjectsInput, ah as JoinClause, ai as JoinQueryPattern, aj as ListObjectsInput, ak as ListObjectsResult, al as NestedJoinClause, am as OfflineOperation, an as OrFilter, ao as OrderByClause, ap as PresenceCallback, aq as PresenceJoinCallback, ar as PresenceLeaveCallback, as as PresenceMember, at as PushSendResult, au as PutObjectInput, av as PutObjectResult, aw as QueryConfig, ax as QueryOperator, ay as QueryPresetMap, az as QueryPresetParams, aA as QueryPresetRow, aB as QueryPresetSpec, aC as QuerySnapshot, aD as RegisterPushTokenInput, aE as RulePermission, aF as SecurityRuleEntry, aG as SecurityRulesMap, aH as SendEmailInput, aI as SendPushNotificationInput, aJ as SnapshotEvent, aK as StorageBucket, aL as StorageBucketInput, aM as StorageObjectMeta, aN as StorageProgress, aO as StorageSignedUrlInput, aP as StreamFlushReason, aQ as StructuredJoinClause, aR as StructuredQuery, aS as SubscribeOptions, aT as SubscriptionCallback, aU as SubscriptionData, aV as SubscriptionError, aW as SubscriptionErrorCallback, aX as SubscriptionHandle, aY as UpdateManyItem, aZ as VectorFieldConfig, a_ as VectorSearchClause, a$ as VerifyEmailLinkInput, b0 as WhereCondition, b1 as flareRulesToSecurityMap, b2 as securityMapToFlareRules } from './index-DlQgWDy-.cjs';
|
|
5
5
|
export { Anonymous, Apple, AuthGuard, AuthToken, CreateUserWithEmailAndPasswordInput, Credentials, Dropbox, Facebook, GitHub, Google, NormalizedProfile, OAuthProvider, ProviderId, Providers, SignInAnonymouslyInput, SignInWithEmailAndPasswordInput, Twitter, setupProvider } from '@zuzjs/auth';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -119,6 +119,31 @@ declare class FlareError extends Error {
|
|
|
119
119
|
constructor(message: string, code: string, cause?: unknown | undefined);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Sentinel value that asks flare-node to write the current server timestamp.
|
|
124
|
+
*
|
|
125
|
+
* Usage:
|
|
126
|
+
* await collection("posts").doc(id).update({ updatedAt: ServerTimeStamp })
|
|
127
|
+
*/
|
|
128
|
+
declare const ServerTimeStamp: "ServerTimeStamp";
|
|
129
|
+
/**
|
|
130
|
+
* Object form of the same sentinel for payloads that prefer structured values.
|
|
131
|
+
*/
|
|
132
|
+
declare const ServerTimeStampField: {
|
|
133
|
+
readonly $serverTimestamp: true;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
type FlareTimestampInput = Date | string | number | {
|
|
137
|
+
$date?: string | number | {
|
|
138
|
+
$numberLong?: string;
|
|
139
|
+
};
|
|
140
|
+
} | null | undefined;
|
|
141
|
+
declare const toDate: (value: FlareTimestampInput) => Date | null;
|
|
142
|
+
declare const getDocumentTimestamp: (doc: Record<string, unknown> | null | undefined, field?: string) => Date | null;
|
|
143
|
+
declare const formatLocalDateTime: (value: FlareTimestampInput, options?: Intl.DateTimeFormatOptions, locale?: string) => string;
|
|
144
|
+
declare const diffMs: (a: FlareTimestampInput, b?: FlareTimestampInput) => number | null;
|
|
145
|
+
declare const timeAgo: (value: FlareTimestampInput, now?: FlareTimestampInput) => string;
|
|
146
|
+
|
|
122
147
|
declare enum FlareErrors {
|
|
123
148
|
authEmailNotVerified = "auth/email-not-verified",
|
|
124
149
|
authEmailAlreadyVerified = "auth/email-already-verified",
|
|
@@ -178,31 +203,6 @@ interface AuthConfigResponse {
|
|
|
178
203
|
ssr: Record<string, any>;
|
|
179
204
|
}
|
|
180
205
|
|
|
181
|
-
/**
|
|
182
|
-
* Sentinel value that asks flare-node to write the current server timestamp.
|
|
183
|
-
*
|
|
184
|
-
* Usage:
|
|
185
|
-
* await collection("posts").doc(id).update({ updatedAt: ServerTimeStamp })
|
|
186
|
-
*/
|
|
187
|
-
declare const ServerTimeStamp: "ServerTimeStamp";
|
|
188
|
-
/**
|
|
189
|
-
* Object form of the same sentinel for payloads that prefer structured values.
|
|
190
|
-
*/
|
|
191
|
-
declare const ServerTimeStampField: {
|
|
192
|
-
readonly $serverTimestamp: true;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
type FlareTimestampInput = Date | string | number | {
|
|
196
|
-
$date?: string | number | {
|
|
197
|
-
$numberLong?: string;
|
|
198
|
-
};
|
|
199
|
-
} | null | undefined;
|
|
200
|
-
declare const toDate: (value: FlareTimestampInput) => Date | null;
|
|
201
|
-
declare const getDocumentTimestamp: (doc: Record<string, unknown> | null | undefined, field?: string) => Date | null;
|
|
202
|
-
declare const formatLocalDateTime: (value: FlareTimestampInput, options?: Intl.DateTimeFormatOptions, locale?: string) => string;
|
|
203
|
-
declare const diffMs: (a: FlareTimestampInput, b?: FlareTimestampInput) => number | null;
|
|
204
|
-
declare const timeAgo: (value: FlareTimestampInput, now?: FlareTimestampInput) => string;
|
|
205
|
-
|
|
206
206
|
/**
|
|
207
207
|
* Initialize and connect to FlareServer
|
|
208
208
|
* Returns a singleton instance
|
|
@@ -217,4 +217,4 @@ declare const getFlare: () => FlareClient | null;
|
|
|
217
217
|
*/
|
|
218
218
|
declare const disconnectFlare: () => void;
|
|
219
219
|
|
|
220
|
-
export { type AuthConfigResponse, type CsrfProxyConfig, FlareClient, FlareConfig, FlareError, FlareErrors, FlareResponseCodes, type FlareTimestampInput, ServerTimeStamp, ServerTimeStampField, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, diffMs, disconnectFlare, extractCsrfFromRequest, formatLocalDateTime, getDocumentTimestamp, getFlare, timeAgo, toDate };
|
|
220
|
+
export { type AuthConfigResponse, type CsrfProxyConfig, FlareClient, FlareConfig, FlareError, FlareErrors, FlareResponseCodes, type FlareTimestampInput, ServerTimeStamp, ServerTimeStampField, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, FlareClient as default, diffMs, disconnectFlare, extractCsrfFromRequest, formatLocalDateTime, getDocumentTimestamp, getFlare, timeAgo, toDate };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as FlareClient } from './index-
|
|
2
|
-
export { B as BaseMessage, C as CollectionPresetMethods, a as CollectionQuery, b as CollectionReference, D as DocumentQueryBuilder, c as DocumentReference, d as FlareAction, e as FlareEvent, f as FlareStorage, S as SubscribeMessage, p as parseValue, g as parseWhereCondition } from './index-
|
|
3
|
-
import { F as FlareConfig } from './index-
|
|
4
|
-
export { A as AggregateFunction, a as AggregateSpec, b as AndFilter, c as AnyFilter, d as AuthConfigListener, e as AuthResult, f as AuthStateListener, g as AuthWithPendingVerificationResult, h as AuthWithTokenResult, B as BrowserPushRegistrationOptions, i as BrowserPushTokenOptions, j as BucketCorsRule, k as BucketPolicyInput, C as ChangeEvent,
|
|
1
|
+
import { F as FlareClient } from './index-TRU0q-av.js';
|
|
2
|
+
export { B as BaseMessage, C as CollectionPresetMethods, a as CollectionQuery, b as CollectionReference, D as DocumentQueryBuilder, c as DocumentReference, d as FlareAction, e as FlareEvent, f as FlareStorage, S as SubscribeMessage, p as parseValue, g as parseWhereCondition } from './index-TRU0q-av.js';
|
|
3
|
+
import { F as FlareConfig } from './index-DlQgWDy-.js';
|
|
4
|
+
export { A as AggregateFunction, a as AggregateSpec, b as AndFilter, c as AnyFilter, d as AuthConfigListener, e as AuthResult, f as AuthStateListener, g as AuthWithPendingVerificationResult, h as AuthWithTokenResult, B as BrowserPushRegistrationOptions, i as BrowserPushTokenOptions, j as BucketCorsRule, k as BucketPolicyInput, l as BulkWriteOperation, m as BulkWriteOptions, n as BulkWriteProgress, o as BulkWriteResult, C as ChangeEvent, p as ChangeOperation, q as CollectionExternalStore, r as CollectionStream, s as CollectionStreamListener, t as CollectionStreamMeta, u as CollectionStreamOptions, v as ConnectionState, w as CopyObjectInput, x as CursorValue, D as DataMapperFn, y as DataMapperRegistry, z as DeleteObjectInput, E as DeleteObjectsInput, G as DocAddedCallback, H as DocChangedCallback, I as DocDeletedCallback, J as DocUpdatedCallback, K as DocumentSnapshot, L as DownloadObjectInput, M as DownloadObjectResult, N as EmailLinkVerifyResult, O as EmailSendResult, P as FlareAuthConfig, Q as FlareAuthHydrationInput, R as FlareAuthHydrationOptions, S as FlareAuthProviderId, T as FlareAuthProviderPublicConfig, U as FlareAuthSession, V as FlareAuthUser, W as FlareRule, X as FlareStorageAutoConfig, Y as FlareStorageAwsConfig, Z as FlareStorageDeleteInput, _ as FlareStorageDownloadInput, $ as FlareStorageObjectResult, a0 as FlareStorageRulesHistoryResult, a1 as FlareStorageRulesPolicy, a2 as FlareStorageServer, a3 as FlareStorageServerInput, a4 as FlareStorageServerPatchInput, a5 as FlareStorageSignedAction, a6 as FlareStorageSignedUrlInput, a7 as FlareStorageSignedUrlResult, a8 as FlareStorageTransferManagerConfig, a9 as FlareStorageUploadInput, aa as GetObjectInput, ab as GetObjectResult, ac as GetObjectUrlInput, ad as GroupByClause, ae as HavingClause, af as HeadObjectInput, ag as HeadObjectsInput, ah as JoinClause, ai as JoinQueryPattern, aj as ListObjectsInput, ak as ListObjectsResult, al as NestedJoinClause, am as OfflineOperation, an as OrFilter, ao as OrderByClause, ap as PresenceCallback, aq as PresenceJoinCallback, ar as PresenceLeaveCallback, as as PresenceMember, at as PushSendResult, au as PutObjectInput, av as PutObjectResult, aw as QueryConfig, ax as QueryOperator, ay as QueryPresetMap, az as QueryPresetParams, aA as QueryPresetRow, aB as QueryPresetSpec, aC as QuerySnapshot, aD as RegisterPushTokenInput, aE as RulePermission, aF as SecurityRuleEntry, aG as SecurityRulesMap, aH as SendEmailInput, aI as SendPushNotificationInput, aJ as SnapshotEvent, aK as StorageBucket, aL as StorageBucketInput, aM as StorageObjectMeta, aN as StorageProgress, aO as StorageSignedUrlInput, aP as StreamFlushReason, aQ as StructuredJoinClause, aR as StructuredQuery, aS as SubscribeOptions, aT as SubscriptionCallback, aU as SubscriptionData, aV as SubscriptionError, aW as SubscriptionErrorCallback, aX as SubscriptionHandle, aY as UpdateManyItem, aZ as VectorFieldConfig, a_ as VectorSearchClause, a$ as VerifyEmailLinkInput, b0 as WhereCondition, b1 as flareRulesToSecurityMap, b2 as securityMapToFlareRules } from './index-DlQgWDy-.js';
|
|
5
5
|
export { Anonymous, Apple, AuthGuard, AuthToken, CreateUserWithEmailAndPasswordInput, Credentials, Dropbox, Facebook, GitHub, Google, NormalizedProfile, OAuthProvider, ProviderId, Providers, SignInAnonymouslyInput, SignInWithEmailAndPasswordInput, Twitter, setupProvider } from '@zuzjs/auth';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -119,6 +119,31 @@ declare class FlareError extends Error {
|
|
|
119
119
|
constructor(message: string, code: string, cause?: unknown | undefined);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Sentinel value that asks flare-node to write the current server timestamp.
|
|
124
|
+
*
|
|
125
|
+
* Usage:
|
|
126
|
+
* await collection("posts").doc(id).update({ updatedAt: ServerTimeStamp })
|
|
127
|
+
*/
|
|
128
|
+
declare const ServerTimeStamp: "ServerTimeStamp";
|
|
129
|
+
/**
|
|
130
|
+
* Object form of the same sentinel for payloads that prefer structured values.
|
|
131
|
+
*/
|
|
132
|
+
declare const ServerTimeStampField: {
|
|
133
|
+
readonly $serverTimestamp: true;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
type FlareTimestampInput = Date | string | number | {
|
|
137
|
+
$date?: string | number | {
|
|
138
|
+
$numberLong?: string;
|
|
139
|
+
};
|
|
140
|
+
} | null | undefined;
|
|
141
|
+
declare const toDate: (value: FlareTimestampInput) => Date | null;
|
|
142
|
+
declare const getDocumentTimestamp: (doc: Record<string, unknown> | null | undefined, field?: string) => Date | null;
|
|
143
|
+
declare const formatLocalDateTime: (value: FlareTimestampInput, options?: Intl.DateTimeFormatOptions, locale?: string) => string;
|
|
144
|
+
declare const diffMs: (a: FlareTimestampInput, b?: FlareTimestampInput) => number | null;
|
|
145
|
+
declare const timeAgo: (value: FlareTimestampInput, now?: FlareTimestampInput) => string;
|
|
146
|
+
|
|
122
147
|
declare enum FlareErrors {
|
|
123
148
|
authEmailNotVerified = "auth/email-not-verified",
|
|
124
149
|
authEmailAlreadyVerified = "auth/email-already-verified",
|
|
@@ -178,31 +203,6 @@ interface AuthConfigResponse {
|
|
|
178
203
|
ssr: Record<string, any>;
|
|
179
204
|
}
|
|
180
205
|
|
|
181
|
-
/**
|
|
182
|
-
* Sentinel value that asks flare-node to write the current server timestamp.
|
|
183
|
-
*
|
|
184
|
-
* Usage:
|
|
185
|
-
* await collection("posts").doc(id).update({ updatedAt: ServerTimeStamp })
|
|
186
|
-
*/
|
|
187
|
-
declare const ServerTimeStamp: "ServerTimeStamp";
|
|
188
|
-
/**
|
|
189
|
-
* Object form of the same sentinel for payloads that prefer structured values.
|
|
190
|
-
*/
|
|
191
|
-
declare const ServerTimeStampField: {
|
|
192
|
-
readonly $serverTimestamp: true;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
type FlareTimestampInput = Date | string | number | {
|
|
196
|
-
$date?: string | number | {
|
|
197
|
-
$numberLong?: string;
|
|
198
|
-
};
|
|
199
|
-
} | null | undefined;
|
|
200
|
-
declare const toDate: (value: FlareTimestampInput) => Date | null;
|
|
201
|
-
declare const getDocumentTimestamp: (doc: Record<string, unknown> | null | undefined, field?: string) => Date | null;
|
|
202
|
-
declare const formatLocalDateTime: (value: FlareTimestampInput, options?: Intl.DateTimeFormatOptions, locale?: string) => string;
|
|
203
|
-
declare const diffMs: (a: FlareTimestampInput, b?: FlareTimestampInput) => number | null;
|
|
204
|
-
declare const timeAgo: (value: FlareTimestampInput, now?: FlareTimestampInput) => string;
|
|
205
|
-
|
|
206
206
|
/**
|
|
207
207
|
* Initialize and connect to FlareServer
|
|
208
208
|
* Returns a singleton instance
|
|
@@ -217,4 +217,4 @@ declare const getFlare: () => FlareClient | null;
|
|
|
217
217
|
*/
|
|
218
218
|
declare const disconnectFlare: () => void;
|
|
219
219
|
|
|
220
|
-
export { type AuthConfigResponse, type CsrfProxyConfig, FlareClient, FlareConfig, FlareError, FlareErrors, FlareResponseCodes, type FlareTimestampInput, ServerTimeStamp, ServerTimeStampField, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, diffMs, disconnectFlare, extractCsrfFromRequest, formatLocalDateTime, getDocumentTimestamp, getFlare, timeAgo, toDate };
|
|
220
|
+
export { type AuthConfigResponse, type CsrfProxyConfig, FlareClient, FlareConfig, FlareError, FlareErrors, FlareResponseCodes, type FlareTimestampInput, ServerTimeStamp, ServerTimeStampField, buildFlareHeaders, connectApp, createCsrfProxy, createCsrfProxyHandler, FlareClient as default, diffMs, disconnectFlare, extractCsrfFromRequest, formatLocalDateTime, getDocumentTimestamp, getFlare, timeAgo, toDate };
|