diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
| commit | 434aa8343fdcbb4d5002f934979913c099489bee (patch) | |
| tree | 55bab4ec5a6151be57797d34f61faf5ea744471b /frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api | |
| parent | 893c388d4e99442a36005e5971a87730623f946e (diff) | |
sdk, del
Diffstat (limited to 'frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api')
22 files changed, 0 insertions, 2915 deletions
diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/aggregate.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/aggregate.d.ts deleted file mode 100644 index 3927021..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/aggregate.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AggregateField, AggregateQuerySnapshot, AggregateSpec } from './aggregate_types'; -import { FieldPath } from './field_path'; -import { DocumentData, Query } from './reference'; -/** - * Calculates the number of documents in the result set of the given query - * without actually downloading the documents. - * - * Using this function to count the documents is efficient because only the - * final count, not the documents' data, is downloaded. This function can - * count the documents in cases where the result set is prohibitively large to - * download entirely (thousands of documents). - * - * @param query The query whose result set size is calculated. - * @returns A Promise that will be resolved with the count; the count can be - * retrieved from `snapshot.data().count`, where `snapshot` is the - * `AggregateQuerySnapshot` to which the returned Promise resolves. - */ -export declare function getCount<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Promise<AggregateQuerySnapshot<{ - count: AggregateField<number>; -}, AppModelType, DbModelType>>; -/** - * Calculates the specified aggregations over the documents in the result - * set of the given query without actually downloading the documents. - * - * Using this function to perform aggregations is efficient because only the - * final aggregation values, not the documents' data, are downloaded. This - * function can perform aggregations of the documents in cases where the result - * set is prohibitively large to download entirely (thousands of documents). - * - * @param query The query whose result set is aggregated over. - * @param aggregateSpec An `AggregateSpec` object that specifies the aggregates - * to perform over the result set. The AggregateSpec specifies aliases for each - * aggregate, which can be used to retrieve the aggregate result. - * @example - * ```typescript - * const aggregateSnapshot = await getAggregate(query, { - * countOfDocs: count(), - * totalHours: sum('hours'), - * averageScore: average('score') - * }); - * - * const countOfDocs: number = aggregateSnapshot.data().countOfDocs; - * const totalHours: number = aggregateSnapshot.data().totalHours; - * const averageScore: number | null = aggregateSnapshot.data().averageScore; - * ``` - */ -export declare function getAggregate<AggregateSpecType extends AggregateSpec, AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>, aggregateSpec: AggregateSpecType): Promise<AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>>; -/** - * Create an AggregateField object that can be used to compute the sum of - * a specified field over a range of documents in the result set of a query. - * @param field Specifies the field to sum across the result set. - */ -export declare function sum(field: string | FieldPath): AggregateField<number>; -/** - * Create an AggregateField object that can be used to compute the average of - * a specified field over a range of documents in the result set of a query. - * @param field Specifies the field to average across the result set. - */ -export declare function average(field: string | FieldPath): AggregateField<number | null>; -/** - * Create an AggregateField object that can be used to compute the count of - * documents in the result set of a query. - */ -export declare function count(): AggregateField<number>; -/** - * Compares two 'AggregateField` instances for equality. - * - * @param left Compare this AggregateField to the `right`. - * @param right Compare this AggregateField to the `left`. - */ -export declare function aggregateFieldEqual(left: AggregateField<unknown>, right: AggregateField<unknown>): boolean; -/** - * Compares two `AggregateQuerySnapshot` instances for equality. - * - * Two `AggregateQuerySnapshot` instances are considered "equal" if they have - * underlying queries that compare equal, and the same data. - * - * @param left - The first `AggregateQuerySnapshot` to compare. - * @param right - The second `AggregateQuerySnapshot` to compare. - * - * @returns `true` if the objects are "equal", as defined above, or `false` - * otherwise. - */ -export declare function aggregateQuerySnapshotEqual<AggregateSpecType extends AggregateSpec, AppModelType, DbModelType extends DocumentData>(left: AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>, right: AggregateQuerySnapshot<AggregateSpecType, AppModelType, DbModelType>): boolean; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/aggregate_types.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/aggregate_types.d.ts deleted file mode 100644 index 453dff1..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/aggregate_types.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { AggregateType } from '../core/aggregate'; -import { FieldPath as InternalFieldPath } from '../model/path'; -import { ApiClientObjectMap, Value } from '../protos/firestore_proto_api'; -import { average, count, sum } from './aggregate'; -import { DocumentData, Query } from './reference'; -import { AbstractUserDataWriter } from './user_data_writer'; -export { AggregateType }; -/** - * Represents an aggregation that can be performed by Firestore. - */ -export declare class AggregateField<T> { - readonly _internalFieldPath?: InternalFieldPath | undefined; - /** A type string to uniquely identify instances of this class. */ - readonly type = "AggregateField"; - /** Indicates the aggregation operation of this AggregateField. */ - readonly aggregateType: AggregateType; - /** - * Create a new AggregateField<T> - * @param aggregateType Specifies the type of aggregation operation to perform. - * @param _internalFieldPath Optionally specifies the field that is aggregated. - * @internal - */ - constructor(aggregateType?: AggregateType, _internalFieldPath?: InternalFieldPath | undefined); -} -/** - * The union of all `AggregateField` types that are supported by Firestore. - */ -export type AggregateFieldType = ReturnType<typeof sum> | ReturnType<typeof average> | ReturnType<typeof count>; -/** - * Specifies a set of aggregations and their aliases. - */ -export interface AggregateSpec { - [field: string]: AggregateFieldType; -} -/** - * A type whose keys are taken from an `AggregateSpec`, and whose values are the - * result of the aggregation performed by the corresponding `AggregateField` - * from the input `AggregateSpec`. - */ -export type AggregateSpecData<T extends AggregateSpec> = { - [P in keyof T]: T[P] extends AggregateField<infer U> ? U : never; -}; -/** - * The results of executing an aggregation query. - */ -export declare class AggregateQuerySnapshot<AggregateSpecType extends AggregateSpec, AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> { - private readonly _userDataWriter; - private readonly _data; - /** A type string to uniquely identify instances of this class. */ - readonly type = "AggregateQuerySnapshot"; - /** - * The underlying query over which the aggregations recorded in this - * `AggregateQuerySnapshot` were performed. - */ - readonly query: Query<AppModelType, DbModelType>; - /** @hideconstructor */ - constructor(query: Query<AppModelType, DbModelType>, _userDataWriter: AbstractUserDataWriter, _data: ApiClientObjectMap<Value>); - /** - * Returns the results of the aggregations performed over the underlying - * query. - * - * The keys of the returned object will be the same as those of the - * `AggregateSpec` object specified to the aggregation method, and the values - * will be the corresponding aggregation result. - * - * @returns The results of the aggregations performed over the underlying - * query. - */ - data(): AggregateSpecData<AggregateSpecType>; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/bytes.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/bytes.d.ts deleted file mode 100644 index e4b8e09..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/bytes.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ByteString } from '../util/byte_string'; -import { Property } from '../util/json_validation'; -/** - * An immutable object representing an array of bytes. - */ -export declare class Bytes { - _byteString: ByteString; - /** @hideconstructor */ - constructor(byteString: ByteString); - /** - * Creates a new `Bytes` object from the given Base64 string, converting it to - * bytes. - * - * @param base64 - The Base64 string used to create the `Bytes` object. - */ - static fromBase64String(base64: string): Bytes; - /** - * Creates a new `Bytes` object from the given Uint8Array. - * - * @param array - The Uint8Array used to create the `Bytes` object. - */ - static fromUint8Array(array: Uint8Array): Bytes; - /** - * Returns the underlying bytes as a Base64-encoded string. - * - * @returns The Base64-encoded string created from the `Bytes` object. - */ - toBase64(): string; - /** - * Returns the underlying bytes in a new `Uint8Array`. - * - * @returns The Uint8Array created from the `Bytes` object. - */ - toUint8Array(): Uint8Array; - /** - * Returns a string representation of the `Bytes` object. - * - * @returns A string representation of the `Bytes` object. - */ - toString(): string; - /** - * Returns true if this `Bytes` object is equal to the provided one. - * - * @param other - The `Bytes` object to compare against. - * @returns true if this `Bytes` object is equal to the provided one. - */ - isEqual(other: Bytes): boolean; - static _jsonSchemaVersion: string; - static _jsonSchema: { - type: Property<"string">; - bytes: Property<"string">; - }; - /** - * Returns a JSON-serializable representation of this `Bytes` instance. - * - * @returns a JSON representation of this object. - */ - toJSON(): object; - /** - * Builds a `Bytes` instance from a JSON object created by {@link Bytes.toJSON}. - * - * @param json a JSON object represention of a `Bytes` instance - * @returns an instance of {@link Bytes} if the JSON object could be parsed. Throws a - * {@link FirestoreError} if an error occurs. - */ - static fromJSON(json: object): Bytes; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/components.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/components.d.ts deleted file mode 100644 index a710e68..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/components.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { _FirebaseService } from '@firebase/app'; -import { CredentialsProvider } from '../api/credentials'; -import { User } from '../auth/user'; -import { DatabaseId, DatabaseInfo } from '../core/database_info'; -import { Datastore } from '../remote/datastore'; -import { FirestoreSettingsImpl } from './settings'; -export declare const LOG_TAG = "ComponentProvider"; -/** - * An interface implemented by FirebaseFirestore that provides compatibility - * with the usage in this file. - * - * This interface mainly exists to remove a cyclic dependency. - */ -export interface FirestoreService extends _FirebaseService { - _authCredentials: CredentialsProvider<User>; - _appCheckCredentials: CredentialsProvider<string>; - _persistenceKey: string; - _databaseId: DatabaseId; - _terminated: boolean; - _freezeSettings(): FirestoreSettingsImpl; -} -/** - * Returns an initialized and started Datastore for the given Firestore - * instance. Callers must invoke removeComponents() when the Firestore - * instance is terminated. - */ -export declare function getDatastore(firestore: FirestoreService): Datastore; -/** - * Removes all components associated with the provided instance. Must be called - * when the `Firestore` instance is terminated. - */ -export declare function removeComponents(firestore: FirestoreService): void; -export declare function makeDatabaseInfo(databaseId: DatabaseId, appId: string, persistenceKey: string, settings: FirestoreSettingsImpl): DatabaseInfo; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/database.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/database.d.ts deleted file mode 100644 index 988a791..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/database.d.ts +++ /dev/null @@ -1,179 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { FirebaseApp } from '@firebase/app'; -import { EmulatorMockTokenOptions } from '@firebase/util'; -import { CredentialsProvider } from '../api/credentials'; -import { User } from '../auth/user'; -import { DatabaseId } from '../core/database_info'; -import { FirestoreService } from './components'; -import { FirestoreSettingsImpl, PrivateSettings, FirestoreSettings } from './settings'; -export { EmulatorMockTokenOptions } from '@firebase/util'; -declare module '@firebase/component' { - interface NameServiceMapping { - 'firestore/lite': Firestore; - } -} -/** - * The Cloud Firestore service interface. - * - * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}. - */ -export declare class Firestore implements FirestoreService { - _authCredentials: CredentialsProvider<User>; - _appCheckCredentials: CredentialsProvider<string>; - readonly _databaseId: DatabaseId; - readonly _app?: FirebaseApp | undefined; - /** - * Whether it's a Firestore or Firestore Lite instance. - */ - type: 'firestore-lite' | 'firestore'; - readonly _persistenceKey: string; - private _settings; - private _settingsFrozen; - private _emulatorOptions; - private _terminateTask; - /** @hideconstructor */ - constructor(_authCredentials: CredentialsProvider<User>, _appCheckCredentials: CredentialsProvider<string>, _databaseId: DatabaseId, _app?: FirebaseApp | undefined); - /** - * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service - * instance. - */ - get app(): FirebaseApp; - get _initialized(): boolean; - get _terminated(): boolean; - _setSettings(settings: PrivateSettings): void; - _getSettings(): FirestoreSettingsImpl; - _getEmulatorOptions(): { - mockUserToken?: EmulatorMockTokenOptions | string; - }; - _freezeSettings(): FirestoreSettingsImpl; - _delete(): Promise<void>; - _restart(): Promise<void>; - /** Returns a JSON-serializable representation of this `Firestore` instance. */ - toJSON(): object; - /** - * Terminates all components used by this client. Subclasses can override - * this method to clean up their own dependencies, but must also call this - * method. - * - * Only ever called once. - */ - protected _terminate(): Promise<void>; -} -/** - * Initializes a new instance of Cloud Firestore with the provided settings. - * Can only be called before any other functions, including - * {@link (getFirestore:1)}. If the custom settings are empty, this function is - * equivalent to calling {@link (getFirestore:1)}. - * - * @param app - The {@link @firebase/app#FirebaseApp} with which the `Firestore` instance will - * be associated. - * @param settings - A settings object to configure the `Firestore` instance. - * @returns A newly initialized `Firestore` instance. - */ -export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore; -/** - * Initializes a new instance of Cloud Firestore with the provided settings. - * Can only be called before any other functions, including - * {@link (getFirestore:1)}. If the custom settings are empty, this function is - * equivalent to calling {@link (getFirestore:1)}. - * - * @param app - The {@link @firebase/app#FirebaseApp} with which the `Firestore` instance will - * be associated. - * @param settings - A settings object to configure the `Firestore` instance. - * @param databaseId - The name of the database. - * @returns A newly initialized `Firestore` instance. - * @beta - */ -export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings, databaseId?: string): Firestore; -/** - * Returns the existing default {@link Firestore} instance that is associated with the - * default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new - * instance with default settings. - * - * @returns The {@link Firestore} instance of the provided app. - */ -export declare function getFirestore(): Firestore; -/** - * Returns the existing default {@link Firestore} instance that is associated with the - * provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new - * instance with default settings. - * - * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore} - * instance is associated with. - * @returns The {@link Firestore} instance of the provided app. - */ -export declare function getFirestore(app: FirebaseApp): Firestore; -/** - * Returns the existing {@link Firestore} instance that is associated with the - * default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new - * instance with default settings. - * - * @param databaseId - The name of the database. - * @returns The {@link Firestore} instance of the provided app. - * @beta - */ -export declare function getFirestore(databaseId: string): Firestore; -/** - * Returns the existing {@link Firestore} instance that is associated with the - * provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new - * instance with default settings. - * - * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore} - * instance is associated with. - * @param databaseId - The name of the database. - * @returns The {@link Firestore} instance of the provided app. - * @beta - */ -export declare function getFirestore(app: FirebaseApp, databaseId: string): Firestore; -/** - * Modify this instance to communicate with the Cloud Firestore emulator. - * - * Note: This must be called before this instance has been used to do any - * operations. - * - * @param firestore - The `Firestore` instance to configure to connect to the - * emulator. - * @param host - the emulator host (ex: localhost). - * @param port - the emulator port (ex: 9000). - * @param options.mockUserToken - the mock auth token to use for unit testing - * Security Rules. - */ -export declare function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; -}): void; -/** - * Terminates the provided `Firestore` instance. - * - * After calling `terminate()` only the `clearIndexedDbPersistence()` functions - * may be used. Any other function will throw a `FirestoreError`. Termination - * does not cancel any pending writes, and any promises that are awaiting a - * response from the server will not be resolved. - * - * To restart after termination, create a new instance of `Firestore` with - * {@link (getFirestore:1)}. - * - * Note: Under normal circumstances, calling `terminate()` is not required. This - * function is useful only when you want to force this instance to release all of - * its resources or in combination with {@link clearIndexedDbPersistence} to - * ensure that all local state is destroyed between test runs. - * - * @param firestore - The `Firestore` instance to terminate. - * @returns A `Promise` that is resolved when the instance has been successfully - * terminated. - */ -export declare function terminate(firestore: Firestore): Promise<void>; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_path.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_path.d.ts deleted file mode 100644 index 38faa8f..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_path.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { FieldPath as InternalFieldPath } from '../model/path'; -/** - * A `FieldPath` refers to a field in a document. The path may consist of a - * single field name (referring to a top-level field in the document), or a - * list of field names (referring to a nested field in the document). - * - * Create a `FieldPath` by providing field names. If more than one field - * name is provided, the path will point to a nested field in a document. - */ -export declare class FieldPath { - /** Internal representation of a Firestore field path. */ - readonly _internalPath: InternalFieldPath; - /** - * Creates a `FieldPath` from the provided field names. If more than one field - * name is provided, the path will point to a nested field in a document. - * - * @param fieldNames - A list of field names. - */ - constructor(...fieldNames: string[]); - /** - * Returns true if this `FieldPath` is equal to the provided one. - * - * @param other - The `FieldPath` to compare against. - * @returns true if this `FieldPath` is equal to the provided one. - */ - isEqual(other: FieldPath): boolean; -} -/** - * Returns a special sentinel `FieldPath` to refer to the ID of a document. - * It can be used in queries to sort or filter by the document ID. - */ -export declare function documentId(): FieldPath; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_value.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_value.d.ts deleted file mode 100644 index 5e44c8e..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_value.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { ParseContext } from '../api/parse_context'; -import { FieldTransform } from '../model/mutation'; -/** - * Sentinel values that can be used when writing document fields with `set()` - * or `update()`. - */ -export declare abstract class FieldValue { - _methodName: string; - /** - * @param _methodName - The public API endpoint that returns this class. - * @hideconstructor - */ - constructor(_methodName: string); - /** Compares `FieldValue`s for equality. */ - abstract isEqual(other: FieldValue): boolean; - abstract _toFieldTransform(context: ParseContext): FieldTransform | null; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_value_impl.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_value_impl.d.ts deleted file mode 100644 index 019e460..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/field_value_impl.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { FieldValue } from './field_value'; -import { VectorValue } from './vector_value'; -/** - * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or - * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion. - */ -export declare function deleteField(): FieldValue; -/** - * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to - * include a server-generated timestamp in the written data. - */ -export declare function serverTimestamp(): FieldValue; -/** - * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link - * @firebase/firestore/lite#(updateDoc:1)} that tells the server to union the given elements with any array - * value that already exists on the server. Each specified element that doesn't - * already exist in the array will be added to the end. If the field being - * modified is not already an array it will be overwritten with an array - * containing exactly the specified elements. - * - * @param elements - The elements to union into the array. - * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or - * `updateDoc()`. - */ -export declare function arrayUnion(...elements: unknown[]): FieldValue; -/** - * Returns a special value that can be used with {@link (setDoc:1)} or {@link - * updateDoc:1} that tells the server to remove the given elements from any - * array value that already exists on the server. All instances of each element - * specified will be removed from the array. If the field being modified is not - * already an array it will be overwritten with an empty array. - * - * @param elements - The elements to remove from the array. - * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or - * `updateDoc()` - */ -export declare function arrayRemove(...elements: unknown[]): FieldValue; -/** - * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link - * @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by - * the given value. - * - * If either the operand or the current field value uses floating point - * precision, all arithmetic follows IEEE 754 semantics. If both values are - * integers, values outside of JavaScript's safe number range - * (`Number.MIN_SAFE_INTEGER` to `Number.MAX_SAFE_INTEGER`) are also subject to - * precision loss. Furthermore, once processed by the Firestore backend, all - * integer operations are capped between -2^63 and 2^63-1. - * - * If the current field value is not of type `number`, or if the field does not - * yet exist, the transformation sets the field to the given value. - * - * @param n - The value to increment by. - * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or - * `updateDoc()` - */ -export declare function increment(n: number): FieldValue; -/** - * Creates a new `VectorValue` constructed with a copy of the given array of numbers. - * - * @param values - Create a `VectorValue` instance with a copy of this array of numbers. - * - * @returns A new `VectorValue` constructed with a copy of the given array of numbers. - */ -export declare function vector(values?: number[]): VectorValue; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/geo_point.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/geo_point.d.ts deleted file mode 100644 index bfe8cd5..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/geo_point.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Property } from '../util/json_validation'; -/** - * An immutable object representing a geographic location in Firestore. The - * location is represented as latitude/longitude pair. - * - * Latitude values are in the range of [-90, 90]. - * Longitude values are in the range of [-180, 180]. - */ -export declare class GeoPoint { - private _lat; - private _long; - /** - * Creates a new immutable `GeoPoint` object with the provided latitude and - * longitude values. - * @param latitude - The latitude as number between -90 and 90. - * @param longitude - The longitude as number between -180 and 180. - */ - constructor(latitude: number, longitude: number); - /** - * The latitude of this `GeoPoint` instance. - */ - get latitude(): number; - /** - * The longitude of this `GeoPoint` instance. - */ - get longitude(): number; - /** - * Returns true if this `GeoPoint` is equal to the provided one. - * - * @param other - The `GeoPoint` to compare against. - * @returns true if this `GeoPoint` is equal to the provided one. - */ - isEqual(other: GeoPoint): boolean; - /** - * Actually private to JS consumers of our API, so this function is prefixed - * with an underscore. - */ - _compareTo(other: GeoPoint): number; - static _jsonSchemaVersion: string; - static _jsonSchema: { - type: Property<"string">; - latitude: Property<"number">; - longitude: Property<"number">; - }; - /** - * Returns a JSON-serializable representation of this `GeoPoint` instance. - * - * @returns a JSON representation of this object. - */ - toJSON(): { - latitude: number; - longitude: number; - type: string; - }; - /** - * Builds a `GeoPoint` instance from a JSON object created by {@link GeoPoint.toJSON}. - * - * @param json a JSON object represention of a `GeoPoint` instance - * @returns an instance of {@link GeoPoint} if the JSON object could be parsed. Throws a - * {@link FirestoreError} if an error occurs. - */ - static fromJSON(json: object): GeoPoint; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/query.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/query.d.ts deleted file mode 100644 index 9053d9d..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/query.d.ts +++ /dev/null @@ -1,404 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Bound } from '../core/bound'; -import { DatabaseId } from '../core/database_info'; -import { CompositeOperator, FieldFilter, Filter, Operator } from '../core/filter'; -import { Direction, OrderBy } from '../core/order_by'; -import { LimitType, Query as InternalQuery } from '../core/query'; -import { Document } from '../model/document'; -import { FieldPath as InternalFieldPath } from '../model/path'; -import { FieldPath } from './field_path'; -import { DocumentData, Query } from './reference'; -import { DocumentSnapshot } from './snapshot'; -import { UserDataReader } from './user_data_reader'; -export declare function validateHasExplicitOrderByForLimitToLast(query: InternalQuery): void; -/** Describes the different query constraints available in this SDK. */ -export type QueryConstraintType = 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore'; -/** - * An `AppliableConstraint` is an abstraction of a constraint that can be applied - * to a Firestore query. - */ -export declare abstract class AppliableConstraint { - /** - * Takes the provided {@link Query} and returns a copy of the {@link Query} with this - * {@link AppliableConstraint} applied. - */ - abstract _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; -} -/** - * A `QueryConstraint` is used to narrow the set of documents returned by a - * Firestore query. `QueryConstraint`s are created by invoking {@link where}, - * {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link - * (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and - * can then be passed to {@link (query:1)} to create a new query instance that - * also contains this `QueryConstraint`. - */ -export declare abstract class QueryConstraint extends AppliableConstraint { - /** The type of this query constraint */ - abstract readonly type: QueryConstraintType; - /** - * Takes the provided {@link Query} and returns a copy of the {@link Query} with this - * {@link AppliableConstraint} applied. - */ - abstract _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; -} -/** - * Creates a new immutable instance of {@link Query} that is extended to also - * include additional query constraints. - * - * @param query - The {@link Query} instance to use as a base for the new - * constraints. - * @param compositeFilter - The {@link QueryCompositeFilterConstraint} to - * apply. Create {@link QueryCompositeFilterConstraint} using {@link and} or - * {@link or}. - * @param queryConstraints - Additional {@link QueryNonFilterConstraint}s to - * apply (e.g. {@link orderBy}, {@link limit}). - * @throws if any of the provided query constraints cannot be combined with the - * existing or new constraints. - */ -export declare function query<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<AppModelType, DbModelType>; -/** - * Creates a new immutable instance of {@link Query} that is extended to also - * include additional query constraints. - * - * @param query - The {@link Query} instance to use as a base for the new - * constraints. - * @param queryConstraints - The list of {@link QueryConstraint}s to apply. - * @throws if any of the provided query constraints cannot be combined with the - * existing or new constraints. - */ -export declare function query<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>, ...queryConstraints: QueryConstraint[]): Query<AppModelType, DbModelType>; -/** - * A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by - * a Firestore query by filtering on one or more document fields. - * `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then - * be passed to {@link (query:1)} to create a new query instance that also contains - * this `QueryFieldFilterConstraint`. - */ -export declare class QueryFieldFilterConstraint extends QueryConstraint { - private readonly _field; - private _op; - private _value; - /** The type of this query constraint */ - readonly type = "where"; - /** - * @internal - */ - protected constructor(_field: InternalFieldPath, _op: Operator, _value: unknown); - static _create(_field: InternalFieldPath, _op: Operator, _value: unknown): QueryFieldFilterConstraint; - _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; - _parse<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): FieldFilter; -} -/** - * Filter conditions in a {@link where} clause are specified using the - * strings '<', '<=', '==', '!=', '>=', '>', 'array-contains', 'in', - * 'array-contains-any', and 'not-in'. - */ -export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in'; -/** - * Creates a {@link QueryFieldFilterConstraint} that enforces that documents - * must contain the specified field and that the value should satisfy the - * relation constraint provided. - * - * @param fieldPath - The path to compare - * @param opStr - The operation string (e.g "<", "<=", "==", "<", - * "<=", "!="). - * @param value - The value for comparison - * @returns The created {@link QueryFieldFilterConstraint}. - */ -export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryFieldFilterConstraint; -/** - * A `QueryCompositeFilterConstraint` is used to narrow the set of documents - * returned by a Firestore query by performing the logical OR or AND of multiple - * {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s. - * `QueryCompositeFilterConstraint`s are created by invoking {@link or} or - * {@link and} and can then be passed to {@link (query:1)} to create a new query - * instance that also contains the `QueryCompositeFilterConstraint`. - */ -export declare class QueryCompositeFilterConstraint extends AppliableConstraint { - /** The type of this query constraint */ - readonly type: 'or' | 'and'; - private readonly _queryConstraints; - /** - * @internal - */ - protected constructor( - /** The type of this query constraint */ - type: 'or' | 'and', _queryConstraints: QueryFilterConstraint[]); - static _create(type: 'or' | 'and', _queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint; - _parse<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Filter; - _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; - _getQueryConstraints(): readonly AppliableConstraint[]; - _getOperator(): CompositeOperator; -} -/** - * `QueryNonFilterConstraint` is a helper union type that represents - * QueryConstraints which are used to narrow or order the set of documents, - * but that do not explicitly filter on a document field. - * `QueryNonFilterConstraint`s are created by invoking {@link orderBy}, - * {@link (startAt:1)}, {@link (startAfter:1)}, {@link (endBefore:1)}, {@link (endAt:1)}, - * {@link limit} or {@link limitToLast} and can then be passed to {@link (query:1)} - * to create a new query instance that also contains the `QueryConstraint`. - */ -export type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint; -/** - * `QueryFilterConstraint` is a helper union type that represents - * {@link QueryFieldFilterConstraint} and {@link QueryCompositeFilterConstraint}. - */ -export type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCompositeFilterConstraint; -/** - * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of - * the given filter constraints. A disjunction filter includes a document if it - * satisfies any of the given filters. - * - * @param queryConstraints - Optional. The list of - * {@link QueryFilterConstraint}s to perform a disjunction for. These must be - * created with calls to {@link where}, {@link or}, or {@link and}. - * @returns The newly created {@link QueryCompositeFilterConstraint}. - */ -export declare function or(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint; -/** - * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of - * the given filter constraints. A conjunction filter includes a document if it - * satisfies all of the given filters. - * - * @param queryConstraints - Optional. The list of - * {@link QueryFilterConstraint}s to perform a conjunction for. These must be - * created with calls to {@link where}, {@link or}, or {@link and}. - * @returns The newly created {@link QueryCompositeFilterConstraint}. - */ -export declare function and(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint; -/** - * A `QueryOrderByConstraint` is used to sort the set of documents returned by a - * Firestore query. `QueryOrderByConstraint`s are created by invoking - * {@link orderBy} and can then be passed to {@link (query:1)} to create a new query - * instance that also contains this `QueryOrderByConstraint`. - * - * Note: Documents that do not contain the orderBy field will not be present in - * the query result. - */ -export declare class QueryOrderByConstraint extends QueryConstraint { - private readonly _field; - private _direction; - /** The type of this query constraint */ - readonly type = "orderBy"; - /** - * @internal - */ - protected constructor(_field: InternalFieldPath, _direction: Direction); - static _create(_field: InternalFieldPath, _direction: Direction): QueryOrderByConstraint; - _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; -} -/** - * The direction of a {@link orderBy} clause is specified as 'desc' or 'asc' - * (descending or ascending). - */ -export type OrderByDirection = 'desc' | 'asc'; -/** - * Creates a {@link QueryOrderByConstraint} that sorts the query result by the - * specified field, optionally in descending order instead of ascending. - * - * Note: Documents that do not contain the specified field will not be present - * in the query result. - * - * @param fieldPath - The field to sort by. - * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If - * not specified, order will be ascending. - * @returns The created {@link QueryOrderByConstraint}. - */ -export declare function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryOrderByConstraint; -/** - * A `QueryLimitConstraint` is used to limit the number of documents returned by - * a Firestore query. - * `QueryLimitConstraint`s are created by invoking {@link limit} or - * {@link limitToLast} and can then be passed to {@link (query:1)} to create a new - * query instance that also contains this `QueryLimitConstraint`. - */ -export declare class QueryLimitConstraint extends QueryConstraint { - /** The type of this query constraint */ - readonly type: 'limit' | 'limitToLast'; - private readonly _limit; - private readonly _limitType; - /** - * @internal - */ - protected constructor( - /** The type of this query constraint */ - type: 'limit' | 'limitToLast', _limit: number, _limitType: LimitType); - static _create(type: 'limit' | 'limitToLast', _limit: number, _limitType: LimitType): QueryLimitConstraint; - _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; -} -/** - * Creates a {@link QueryLimitConstraint} that only returns the first matching - * documents. - * - * @param limit - The maximum number of items to return. - * @returns The created {@link QueryLimitConstraint}. - */ -export declare function limit(limit: number): QueryLimitConstraint; -/** - * Creates a {@link QueryLimitConstraint} that only returns the last matching - * documents. - * - * You must specify at least one `orderBy` clause for `limitToLast` queries, - * otherwise an exception will be thrown during execution. - * - * @param limit - The maximum number of items to return. - * @returns The created {@link QueryLimitConstraint}. - */ -export declare function limitToLast(limit: number): QueryLimitConstraint; -/** - * A `QueryStartAtConstraint` is used to exclude documents from the start of a - * result set returned by a Firestore query. - * `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or - * {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a - * new query instance that also contains this `QueryStartAtConstraint`. - */ -export declare class QueryStartAtConstraint extends QueryConstraint { - /** The type of this query constraint */ - readonly type: 'startAt' | 'startAfter'; - private readonly _docOrFields; - private readonly _inclusive; - /** - * @internal - */ - protected constructor( - /** The type of this query constraint */ - type: 'startAt' | 'startAfter', _docOrFields: Array<unknown | DocumentSnapshot<unknown>>, _inclusive: boolean); - static _create(type: 'startAt' | 'startAfter', _docOrFields: Array<unknown | DocumentSnapshot<unknown>>, _inclusive: boolean): QueryStartAtConstraint; - _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; -} -/** - * Creates a {@link QueryStartAtConstraint} that modifies the result set to - * start at the provided document (inclusive). The starting position is relative - * to the order of the query. The document must contain all of the fields - * provided in the `orderBy` of this query. - * - * @param snapshot - The snapshot of the document to start at. - * @returns A {@link QueryStartAtConstraint} to pass to `query()`. - */ -export declare function startAt<AppModelType, DbModelType extends DocumentData>(snapshot: DocumentSnapshot<AppModelType, DbModelType>): QueryStartAtConstraint; -/** - * Creates a {@link QueryStartAtConstraint} that modifies the result set to - * start at the provided fields relative to the order of the query. The order of - * the field values must match the order of the order by clauses of the query. - * - * @param fieldValues - The field values to start this query at, in order - * of the query's order by. - * @returns A {@link QueryStartAtConstraint} to pass to `query()`. - */ -export declare function startAt(...fieldValues: unknown[]): QueryStartAtConstraint; -/** - * Creates a {@link QueryStartAtConstraint} that modifies the result set to - * start after the provided document (exclusive). The starting position is - * relative to the order of the query. The document must contain all of the - * fields provided in the orderBy of the query. - * - * @param snapshot - The snapshot of the document to start after. - * @returns A {@link QueryStartAtConstraint} to pass to `query()` - */ -export declare function startAfter<AppModelType, DbModelType extends DocumentData>(snapshot: DocumentSnapshot<AppModelType, DbModelType>): QueryStartAtConstraint; -/** - * Creates a {@link QueryStartAtConstraint} that modifies the result set to - * start after the provided fields relative to the order of the query. The order - * of the field values must match the order of the order by clauses of the query. - * - * @param fieldValues - The field values to start this query after, in order - * of the query's order by. - * @returns A {@link QueryStartAtConstraint} to pass to `query()` - */ -export declare function startAfter(...fieldValues: unknown[]): QueryStartAtConstraint; -/** - * A `QueryEndAtConstraint` is used to exclude documents from the end of a - * result set returned by a Firestore query. - * `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or - * {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new - * query instance that also contains this `QueryEndAtConstraint`. - */ -export declare class QueryEndAtConstraint extends QueryConstraint { - /** The type of this query constraint */ - readonly type: 'endBefore' | 'endAt'; - private readonly _docOrFields; - private readonly _inclusive; - /** - * @internal - */ - protected constructor( - /** The type of this query constraint */ - type: 'endBefore' | 'endAt', _docOrFields: Array<unknown | DocumentSnapshot<unknown>>, _inclusive: boolean); - static _create(type: 'endBefore' | 'endAt', _docOrFields: Array<unknown | DocumentSnapshot<unknown>>, _inclusive: boolean): QueryEndAtConstraint; - _apply<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Query<AppModelType, DbModelType>; -} -/** - * Creates a {@link QueryEndAtConstraint} that modifies the result set to end - * before the provided document (exclusive). The end position is relative to the - * order of the query. The document must contain all of the fields provided in - * the orderBy of the query. - * - * @param snapshot - The snapshot of the document to end before. - * @returns A {@link QueryEndAtConstraint} to pass to `query()` - */ -export declare function endBefore<AppModelType, DbModelType extends DocumentData>(snapshot: DocumentSnapshot<AppModelType, DbModelType>): QueryEndAtConstraint; -/** - * Creates a {@link QueryEndAtConstraint} that modifies the result set to end - * before the provided fields relative to the order of the query. The order of - * the field values must match the order of the order by clauses of the query. - * - * @param fieldValues - The field values to end this query before, in order - * of the query's order by. - * @returns A {@link QueryEndAtConstraint} to pass to `query()` - */ -export declare function endBefore(...fieldValues: unknown[]): QueryEndAtConstraint; -/** - * Creates a {@link QueryEndAtConstraint} that modifies the result set to end at - * the provided document (inclusive). The end position is relative to the order - * of the query. The document must contain all of the fields provided in the - * orderBy of the query. - * - * @param snapshot - The snapshot of the document to end at. - * @returns A {@link QueryEndAtConstraint} to pass to `query()` - */ -export declare function endAt<AppModelType, DbModelType extends DocumentData>(snapshot: DocumentSnapshot<AppModelType, DbModelType>): QueryEndAtConstraint; -/** - * Creates a {@link QueryEndAtConstraint} that modifies the result set to end at - * the provided fields relative to the order of the query. The order of the field - * values must match the order of the order by clauses of the query. - * - * @param fieldValues - The field values to end this query at, in order - * of the query's order by. - * @returns A {@link QueryEndAtConstraint} to pass to `query()` - */ -export declare function endAt(...fieldValues: unknown[]): QueryEndAtConstraint; -export declare function newQueryFilter(query: InternalQuery, methodName: string, dataReader: UserDataReader, databaseId: DatabaseId, fieldPath: InternalFieldPath, op: Operator, value: unknown): FieldFilter; -export declare function newQueryOrderBy(query: InternalQuery, fieldPath: InternalFieldPath, direction: Direction): OrderBy; -/** - * Create a `Bound` from a query and a document. - * - * Note that the `Bound` will always include the key of the document - * and so only the provided document will compare equal to the returned - * position. - * - * Will throw if the document does not contain all fields of the order by - * of the query or if any of the fields in the order by are an uncommitted - * server timestamp. - */ -export declare function newQueryBoundFromDocument(query: InternalQuery, databaseId: DatabaseId, methodName: string, doc: Document | null, inclusive: boolean): Bound; -/** - * Converts a list of field values to a `Bound` for the given query. - */ -export declare function newQueryBoundFromFields(query: InternalQuery, databaseId: DatabaseId, dataReader: UserDataReader, methodName: string, values: unknown[], inclusive: boolean): Bound; -export declare function validateQueryFilterConstraint(functionName: string, queryConstraint: AppliableConstraint): void; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/reference.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/reference.d.ts deleted file mode 100644 index fd89e5a..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/reference.d.ts +++ /dev/null @@ -1,362 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Query as InternalQuery } from '../core/query'; -import { DocumentKey } from '../model/document_key'; -import { ResourcePath } from '../model/path'; -import { Property } from '../util/json_validation'; -import { Firestore } from './database'; -import { FieldPath } from './field_path'; -import { FieldValue } from './field_value'; -import { FirestoreDataConverter } from './snapshot'; -import { NestedUpdateFields, Primitive } from './types'; -/** - * Document data (for use with {@link @firebase/firestore/lite#(setDoc:1)}) consists of fields mapped to - * values. - */ -export interface DocumentData { - /** A mapping between a field and its value. */ - [field: string]: any; -} -/** - * Similar to TypeScript's `Partial<T>`, but allows nested fields to be - * omitted and FieldValues to be passed in as property values. - */ -export type PartialWithFieldValue<T> = Partial<T> | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: PartialWithFieldValue<T[K]> | FieldValue; -} : never); -/** - * Allows FieldValues to be passed in as a property value while maintaining - * type safety. - */ -export type WithFieldValue<T> = T | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]: WithFieldValue<T[K]> | FieldValue; -} : never); -/** - * Update data (for use with {@link (updateDoc:1)}) that consists of field paths - * (e.g. 'foo' or 'foo.baz') mapped to values. Fields that contain dots - * reference nested fields within the document. FieldValues can be passed in - * as property values. - */ -export type UpdateData<T> = T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: UpdateData<T[K]> | FieldValue; -} & NestedUpdateFields<T> : Partial<T>; -/** - * An options object that configures the behavior of {@link @firebase/firestore/lite#(setDoc:1)}, {@link - * @firebase/firestore/lite#(WriteBatch.set:1)} and {@link @firebase/firestore/lite#(Transaction.set:1)} calls. These calls can be - * configured to perform granular merges instead of overwriting the target - * documents in their entirety by providing a `SetOptions` with `merge: true`. - * - * @param merge - Changes the behavior of a `setDoc()` call to only replace the - * values specified in its data argument. Fields omitted from the `setDoc()` - * call remain untouched. If your input sets any field to an empty map, all - * nested fields are overwritten. - * @param mergeFields - Changes the behavior of `setDoc()` calls to only replace - * the specified field paths. Any field path that is not specified is ignored - * and remains untouched. If your input sets any field to an empty map, all - * nested fields are overwritten. - */ -export type SetOptions = { - readonly merge?: boolean; -} | { - readonly mergeFields?: Array<string | FieldPath>; -}; -/** - * A `Query` refers to a query which you can read or listen to. You can also - * construct refined `Query` objects by adding filters and ordering. - */ -export declare class Query<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> { - /** - * If provided, the `FirestoreDataConverter` associated with this instance. - */ - readonly converter: FirestoreDataConverter<AppModelType, DbModelType> | null; - readonly _query: InternalQuery; - /** The type of this Firestore reference. */ - readonly type: 'query' | 'collection'; - /** - * The `Firestore` instance for the Firestore database (useful for performing - * transactions, etc.). - */ - readonly firestore: Firestore; - /** @hideconstructor protected */ - constructor(firestore: Firestore, - /** - * If provided, the `FirestoreDataConverter` associated with this instance. - */ - converter: FirestoreDataConverter<AppModelType, DbModelType> | null, _query: InternalQuery); - /** - * Removes the current converter. - * - * @param converter - `null` removes the current converter. - * @returns A `Query<DocumentData, DocumentData>` that does not use a - * converter. - */ - withConverter(converter: null): Query<DocumentData, DocumentData>; - /** - * Applies a custom data converter to this query, allowing you to use your own - * custom model objects with Firestore. When you call {@link getDocs} with - * the returned query, the provided converter will convert between Firestore - * data of type `NewDbModelType` and your custom type `NewAppModelType`. - * - * @param converter - Converts objects to and from Firestore. - * @returns A `Query` that uses the provided converter. - */ - withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): Query<NewAppModelType, NewDbModelType>; -} -/** - * A `DocumentReference` refers to a document location in a Firestore database - * and can be used to write, read, or listen to the location. The document at - * the referenced location may or may not exist. - */ -export declare class DocumentReference<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> { - /** - * If provided, the `FirestoreDataConverter` associated with this instance. - */ - readonly converter: FirestoreDataConverter<AppModelType, DbModelType> | null; - readonly _key: DocumentKey; - /** The type of this Firestore reference. */ - readonly type = "document"; - /** - * The {@link Firestore} instance the document is in. - * This is useful for performing transactions, for example. - */ - readonly firestore: Firestore; - /** @hideconstructor */ - constructor(firestore: Firestore, - /** - * If provided, the `FirestoreDataConverter` associated with this instance. - */ - converter: FirestoreDataConverter<AppModelType, DbModelType> | null, _key: DocumentKey); - get _path(): ResourcePath; - /** - * The document's identifier within its collection. - */ - get id(): string; - /** - * A string representing the path of the referenced document (relative - * to the root of the database). - */ - get path(): string; - /** - * The collection this `DocumentReference` belongs to. - */ - get parent(): CollectionReference<AppModelType, DbModelType>; - /** - * Applies a custom data converter to this `DocumentReference`, allowing you - * to use your own custom model objects with Firestore. When you call {@link - * @firebase/firestore/lite#(setDoc:1)}, {@link @firebase/firestore/lite#getDoc}, etc. with the returned `DocumentReference` - * instance, the provided converter will convert between Firestore data of - * type `NewDbModelType` and your custom type `NewAppModelType`. - * - * @param converter - Converts objects to and from Firestore. - * @returns A `DocumentReference` that uses the provided converter. - */ - withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): DocumentReference<NewAppModelType, NewDbModelType>; - /** - * Removes the current converter. - * - * @param converter - `null` removes the current converter. - * @returns A `DocumentReference<DocumentData, DocumentData>` that does not - * use a converter. - */ - withConverter(converter: null): DocumentReference<DocumentData, DocumentData>; - static _jsonSchemaVersion: string; - static _jsonSchema: { - type: Property<"string">; - referencePath: Property<"string">; - }; - /** - * Returns a JSON-serializable representation of this `DocumentReference` instance. - * - * @returns a JSON representation of this object. - */ - toJSON(): object; - /** - * Builds a `DocumentReference` instance from a JSON object created by - * {@link DocumentReference.toJSON}. - * - * @param firestore - The {@link Firestore} instance the snapshot should be loaded for. - * @param json a JSON object represention of a `DocumentReference` instance - * @returns an instance of {@link DocumentReference} if the JSON object could be parsed. Throws a - * {@link FirestoreError} if an error occurs. - */ - static fromJSON(firestore: Firestore, json: object): DocumentReference; - /** - * Builds a `DocumentReference` instance from a JSON object created by - * {@link DocumentReference.toJSON}. - * - * @param firestore - The {@link Firestore} instance the snapshot should be loaded for. - * @param json a JSON object represention of a `DocumentReference` instance - * @param converter - Converts objects to and from Firestore. - * @returns an instance of {@link DocumentReference} if the JSON object could be parsed. Throws a - * {@link FirestoreError} if an error occurs. - */ - static fromJSON<NewAppModelType = DocumentData, NewDbModelType extends DocumentData = DocumentData>(firestore: Firestore, json: object, converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): DocumentReference<NewAppModelType, NewDbModelType>; -} -/** - * A `CollectionReference` object can be used for adding documents, getting - * document references, and querying for documents (using {@link (query:1)}). - */ -export declare class CollectionReference<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> extends Query<AppModelType, DbModelType> { - readonly _path: ResourcePath; - /** The type of this Firestore reference. */ - readonly type = "collection"; - /** @hideconstructor */ - constructor(firestore: Firestore, converter: FirestoreDataConverter<AppModelType, DbModelType> | null, _path: ResourcePath); - /** The collection's identifier. */ - get id(): string; - /** - * A string representing the path of the referenced collection (relative - * to the root of the database). - */ - get path(): string; - /** - * A reference to the containing `DocumentReference` if this is a - * subcollection. If this isn't a subcollection, the reference is null. - */ - get parent(): DocumentReference<DocumentData, DocumentData> | null; - /** - * Applies a custom data converter to this `CollectionReference`, allowing you - * to use your own custom model objects with Firestore. When you call {@link - * addDoc} with the returned `CollectionReference` instance, the provided - * converter will convert between Firestore data of type `NewDbModelType` and - * your custom type `NewAppModelType`. - * - * @param converter - Converts objects to and from Firestore. - * @returns A `CollectionReference` that uses the provided converter. - */ - withConverter<NewAppModelType, NewDbModelType extends DocumentData = DocumentData>(converter: FirestoreDataConverter<NewAppModelType, NewDbModelType>): CollectionReference<NewAppModelType, NewDbModelType>; - /** - * Removes the current converter. - * - * @param converter - `null` removes the current converter. - * @returns A `CollectionReference<DocumentData, DocumentData>` that does not - * use a converter. - */ - withConverter(converter: null): CollectionReference<DocumentData, DocumentData>; -} -/** - * Gets a `CollectionReference` instance that refers to the collection at - * the specified absolute path. - * - * @param firestore - A reference to the root `Firestore` instance. - * @param path - A slash-separated path to a collection. - * @param pathSegments - Additional path segments to apply relative to the first - * argument. - * @throws If the final path has an even number of segments and does not point - * to a collection. - * @returns The `CollectionReference` instance. - */ -export declare function collection(firestore: Firestore, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>; -/** - * Gets a `CollectionReference` instance that refers to a subcollection of - * `reference` at the specified relative path. - * - * @param reference - A reference to a collection. - * @param path - A slash-separated path to a collection. - * @param pathSegments - Additional path segments to apply relative to the first - * argument. - * @throws If the final path has an even number of segments and does not point - * to a collection. - * @returns The `CollectionReference` instance. - */ -export declare function collection<AppModelType, DbModelType extends DocumentData>(reference: CollectionReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>; -/** - * Gets a `CollectionReference` instance that refers to a subcollection of - * `reference` at the specified relative path. - * - * @param reference - A reference to a Firestore document. - * @param path - A slash-separated path to a collection. - * @param pathSegments - Additional path segments that will be applied relative - * to the first argument. - * @throws If the final path has an even number of segments and does not point - * to a collection. - * @returns The `CollectionReference` instance. - */ -export declare function collection<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>; -/** - * Creates and returns a new `Query` instance that includes all documents in the - * database that are contained in a collection or subcollection with the - * given `collectionId`. - * - * @param firestore - A reference to the root `Firestore` instance. - * @param collectionId - Identifies the collections to query over. Every - * collection or subcollection with this ID as the last segment of its path - * will be included. Cannot contain a slash. - * @returns The created `Query`. - */ -export declare function collectionGroup(firestore: Firestore, collectionId: string): Query<DocumentData, DocumentData>; -/** - * Gets a `DocumentReference` instance that refers to the document at the - * specified absolute path. - * - * @param firestore - A reference to the root `Firestore` instance. - * @param path - A slash-separated path to a document. - * @param pathSegments - Additional path segments that will be applied relative - * to the first argument. - * @throws If the final path has an odd number of segments and does not point to - * a document. - * @returns The `DocumentReference` instance. - */ -export declare function doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>; -/** - * Gets a `DocumentReference` instance that refers to a document within - * `reference` at the specified relative path. If no path is specified, an - * automatically-generated unique ID will be used for the returned - * `DocumentReference`. - * - * @param reference - A reference to a collection. - * @param path - A slash-separated path to a document. Has to be omitted to use - * auto-generated IDs. - * @param pathSegments - Additional path segments that will be applied relative - * to the first argument. - * @throws If the final path has an odd number of segments and does not point to - * a document. - * @returns The `DocumentReference` instance. - */ -export declare function doc<AppModelType, DbModelType extends DocumentData>(reference: CollectionReference<AppModelType, DbModelType>, path?: string, ...pathSegments: string[]): DocumentReference<AppModelType, DbModelType>; -/** - * Gets a `DocumentReference` instance that refers to a document within - * `reference` at the specified relative path. - * - * @param reference - A reference to a Firestore document. - * @param path - A slash-separated path to a document. - * @param pathSegments - Additional path segments that will be applied relative - * to the first argument. - * @throws If the final path has an odd number of segments and does not point to - * a document. - * @returns The `DocumentReference` instance. - */ -export declare function doc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>; -/** - * Returns true if the provided references are equal. - * - * @param left - A reference to compare. - * @param right - A reference to compare. - * @returns true if the references point to the same location in the same - * Firestore database. - */ -export declare function refEqual<AppModelType, DbModelType extends DocumentData>(left: DocumentReference<AppModelType, DbModelType> | CollectionReference<AppModelType, DbModelType>, right: DocumentReference<AppModelType, DbModelType> | CollectionReference<AppModelType, DbModelType>): boolean; -/** - * Returns true if the provided queries point to the same collection and apply - * the same constraints. - * - * @param left - A `Query` to compare. - * @param right - A `Query` to compare. - * @returns true if the references point to the same location in the same - * Firestore database. - */ -export declare function queryEqual<AppModelType, DbModelType extends DocumentData>(left: Query<AppModelType, DbModelType>, right: Query<AppModelType, DbModelType>): boolean; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/reference_impl.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/reference_impl.d.ts deleted file mode 100644 index 724ae99..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/reference_impl.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { DocumentData as PublicDocumentData, SetOptions as PublicSetOptions } from '@firebase/firestore-types'; -import { ByteString } from '../util/byte_string'; -import { Bytes } from './bytes'; -import { Firestore } from './database'; -import { FieldPath } from './field_path'; -import { CollectionReference, DocumentData, DocumentReference, PartialWithFieldValue, Query, SetOptions, UpdateData, WithFieldValue } from './reference'; -import { DocumentSnapshot, QuerySnapshot } from './snapshot'; -import { UntypedFirestoreDataConverter } from './user_data_reader'; -import { AbstractUserDataWriter } from './user_data_writer'; -/** - * Converts custom model object of type T into `DocumentData` by applying the - * converter if it exists. - * - * This function is used when converting user objects to `DocumentData` - * because we want to provide the user with a more specific error message if - * their `set()` or fails due to invalid data originating from a `toFirestore()` - * call. - */ -export declare function applyFirestoreDataConverter<T>(converter: UntypedFirestoreDataConverter<T> | null, value: WithFieldValue<T> | PartialWithFieldValue<T>, options?: PublicSetOptions): PublicDocumentData; -export declare class LiteUserDataWriter extends AbstractUserDataWriter { - protected firestore: Firestore; - constructor(firestore: Firestore); - protected convertBytes(bytes: ByteString): Bytes; - protected convertReference(name: string): DocumentReference; -} -/** - * Reads the document referred to by the specified document reference. - * - * All documents are directly fetched from the server, even if the document was - * previously read or modified. Recent modifications are only reflected in the - * retrieved `DocumentSnapshot` if they have already been applied by the - * backend. If the client is offline, the read fails. If you like to use - * caching or see local modifications, please use the full Firestore SDK. - * - * @param reference - The reference of the document to fetch. - * @returns A Promise resolved with a `DocumentSnapshot` containing the current - * document contents. - */ -export declare function getDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>; -/** - * Executes the query and returns the results as a {@link QuerySnapshot}. - * - * All queries are executed directly by the server, even if the query was - * previously executed. Recent modifications are only reflected in the retrieved - * results if they have already been applied by the backend. If the client is - * offline, the operation fails. To see previously cached result and local - * modifications, use the full Firestore SDK. - * - * @param query - The `Query` to execute. - * @returns A Promise that will be resolved with the results of the query. - */ -export declare function getDocs<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>; -/** - * Writes to the document referred to by the specified `DocumentReference`. If - * the document does not yet exist, it will be created. - * - * The result of this write will only be reflected in document reads that occur - * after the returned promise resolves. If the client is offline, the - * write fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @param reference - A reference to the document to write. - * @param data - A map of the fields and values for the document. - * @throws Error - If the provided input is not a valid Firestore document. - * @returns A `Promise` resolved once the data has been successfully written - * to the backend. - */ -export declare function setDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): Promise<void>; -/** - * Writes to the document referred to by the specified `DocumentReference`. If - * the document does not yet exist, it will be created. If you provide `merge` - * or `mergeFields`, the provided data can be merged into an existing document. - * - * The result of this write will only be reflected in document reads that occur - * after the returned promise resolves. If the client is offline, the - * write fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @param reference - A reference to the document to write. - * @param data - A map of the fields and values for the document. - * @param options - An object to configure the set behavior. - * @throws Error - If the provided input is not a valid Firestore document. - * @returns A `Promise` resolved once the data has been successfully written - * to the backend. - */ -export declare function setDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): Promise<void>; -/** - * Updates fields in the document referred to by the specified - * `DocumentReference`. The update will fail if applied to a document that does - * not exist. - * - * The result of this update will only be reflected in document reads that occur - * after the returned promise resolves. If the client is offline, the - * update fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @param reference - A reference to the document to update. - * @param data - An object containing the fields and values with which to - * update the document. Fields can contain dots to reference nested fields - * within the document. - * @throws Error - If the provided input is not valid Firestore data. - * @returns A `Promise` resolved once the data has been successfully written - * to the backend. - */ -export declare function updateDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): Promise<void>; -/** - * Updates fields in the document referred to by the specified - * `DocumentReference` The update will fail if applied to a document that does - * not exist. - * - * Nested fields can be updated by providing dot-separated field path - * strings or by providing `FieldPath` objects. - * - * The result of this update will only be reflected in document reads that occur - * after the returned promise resolves. If the client is offline, the - * update fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @param reference - A reference to the document to update. - * @param field - The first field to update. - * @param value - The first value. - * @param moreFieldsAndValues - Additional key value pairs. - * @throws Error - If the provided input is not valid Firestore data. - * @returns A `Promise` resolved once the data has been successfully written - * to the backend. - */ -export declare function updateDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>; -/** - * Deletes the document referred to by the specified `DocumentReference`. - * - * The deletion will only be reflected in document reads that occur after the - * returned promise resolves. If the client is offline, the - * delete fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @param reference - A reference to the document to delete. - * @returns A `Promise` resolved once the document has been successfully - * deleted from the backend. - */ -export declare function deleteDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>): Promise<void>; -/** - * Add a new document to specified `CollectionReference` with the given data, - * assigning it a document ID automatically. - * - * The result of this write will only be reflected in document reads that occur - * after the returned promise resolves. If the client is offline, the - * write fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @param reference - A reference to the collection to add this document to. - * @param data - An Object containing the data for the new document. - * @throws Error - If the provided input is not a valid Firestore document. - * @returns A `Promise` resolved with a `DocumentReference` pointing to the - * newly created document after it has been written to the backend. - */ -export declare function addDoc<AppModelType, DbModelType extends DocumentData>(reference: CollectionReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): Promise<DocumentReference<AppModelType, DbModelType>>; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/settings.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/settings.d.ts deleted file mode 100644 index e86bdbe..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/settings.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EmulatorMockTokenOptions } from '@firebase/util'; -import { FirestoreLocalCache } from '../api/cache_config'; -import { CredentialsSettings } from '../api/credentials'; -import { ExperimentalLongPollingOptions } from '../api/long_polling_options'; -export declare const DEFAULT_HOST = "firestore.googleapis.com"; -export declare const DEFAULT_SSL = true; -/** - * Specifies custom configurations for your Cloud Firestore instance. - * You must set these before invoking any other methods. - */ -export interface FirestoreSettings { - /** The hostname to connect to. */ - host?: string; - /** Whether to use SSL when connecting. */ - ssl?: boolean; - /** - * Whether to skip nested properties that are set to `undefined` during - * object serialization. If set to `true`, these properties are skipped - * and not written to Firestore. If set to `false` or omitted, the SDK - * throws an exception when it encounters properties of type `undefined`. - */ - ignoreUndefinedProperties?: boolean; -} -/** - * @internal - * Undocumented, private additional settings not exposed in our public API. - */ -export interface PrivateSettings extends FirestoreSettings { - credentials?: CredentialsSettings; - cacheSizeBytes?: number; - experimentalForceLongPolling?: boolean; - experimentalAutoDetectLongPolling?: boolean; - experimentalLongPollingOptions?: ExperimentalLongPollingOptions; - useFetchStreams?: boolean; - emulatorOptions?: { - mockUserToken?: EmulatorMockTokenOptions | string; - }; - localCache?: FirestoreLocalCache; -} -/** - * A concrete type describing all the values that can be applied via a - * user-supplied `FirestoreSettings` object. This is a separate type so that - * defaults can be supplied and the value can be checked for equality. - */ -export declare class FirestoreSettingsImpl { - /** The hostname to connect to. */ - readonly host: string; - /** Whether to use SSL when connecting. */ - readonly ssl: boolean; - readonly cacheSizeBytes: number; - readonly experimentalForceLongPolling: boolean; - readonly experimentalAutoDetectLongPolling: boolean; - readonly experimentalLongPollingOptions: ExperimentalLongPollingOptions; - readonly ignoreUndefinedProperties: boolean; - readonly useFetchStreams: boolean; - readonly localCache?: FirestoreLocalCache; - readonly isUsingEmulator: boolean; - credentials?: any; - constructor(settings: PrivateSettings); - isEqual(other: FirestoreSettingsImpl): boolean; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/snapshot.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/snapshot.d.ts deleted file mode 100644 index 312e3f3..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/snapshot.d.ts +++ /dev/null @@ -1,367 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Compat } from '@firebase/util'; -import { Document } from '../model/document'; -import { DocumentKey } from '../model/document_key'; -import { FieldPath as InternalFieldPath } from '../model/path'; -import { Firestore } from './database'; -import { FieldPath } from './field_path'; -import { DocumentData, DocumentReference, PartialWithFieldValue, Query, SetOptions, WithFieldValue } from './reference'; -import { UntypedFirestoreDataConverter } from './user_data_reader'; -import { AbstractUserDataWriter } from './user_data_writer'; -/** - * Converter used by `withConverter()` to transform user objects of type - * `AppModelType` into Firestore data of type `DbModelType`. - * - * Using the converter allows you to specify generic type arguments when - * storing and retrieving objects from Firestore. - * - * In this context, an "AppModel" is a class that is used in an application to - * package together related information and functionality. Such a class could, - * for example, have properties with complex, nested data types, properties used - * for memoization, properties of types not supported by Firestore (such as - * `symbol` and `bigint`), and helper functions that perform compound - * operations. Such classes are not suitable and/or possible to store into a - * Firestore database. Instead, instances of such classes need to be converted - * to "plain old JavaScript objects" (POJOs) with exclusively primitive - * properties, potentially nested inside other POJOs or arrays of POJOs. In this - * context, this type is referred to as the "DbModel" and would be an object - * suitable for persisting into Firestore. For convenience, applications can - * implement `FirestoreDataConverter` and register the converter with Firestore - * objects, such as `DocumentReference` or `Query`, to automatically convert - * `AppModel` to `DbModel` when storing into Firestore, and convert `DbModel` - * to `AppModel` when retrieving from Firestore. - * - * @example - * - * Simple Example - * - * ```typescript - * const numberConverter = { - * toFirestore(value: WithFieldValue<number>) { - * return { value }; - * }, - * fromFirestore(snapshot: QueryDocumentSnapshot, options: SnapshotOptions) { - * return snapshot.data(options).value as number; - * } - * }; - * - * async function simpleDemo(db: Firestore): Promise<void> { - * const documentRef = doc(db, 'values/value123').withConverter(numberConverter); - * - * // converters are used with `setDoc`, `addDoc`, and `getDoc` - * await setDoc(documentRef, 42); - * const snapshot1 = await getDoc(documentRef); - * assertEqual(snapshot1.data(), 42); - * - * // converters are not used when writing data with `updateDoc` - * await updateDoc(documentRef, { value: 999 }); - * const snapshot2 = await getDoc(documentRef); - * assertEqual(snapshot2.data(), 999); - * } - * ``` - * - * Advanced Example - * - * ```typescript - * // The Post class is a model that is used by our application. - * // This class may have properties and methods that are specific - * // to our application execution, which do not need to be persisted - * // to Firestore. - * class Post { - * constructor( - * readonly title: string, - * readonly author: string, - * readonly lastUpdatedMillis: number - * ) {} - * toString(): string { - * return `${this.title} by ${this.author}`; - * } - * } - * - * // The PostDbModel represents how we want our posts to be stored - * // in Firestore. This DbModel has different properties (`ttl`, - * // `aut`, and `lut`) from the Post class we use in our application. - * interface PostDbModel { - * ttl: string; - * aut: { firstName: string; lastName: string }; - * lut: Timestamp; - * } - * - * // The `PostConverter` implements `FirestoreDataConverter` and specifies - * // how the Firestore SDK can convert `Post` objects to `PostDbModel` - * // objects and vice versa. - * class PostConverter implements FirestoreDataConverter<Post, PostDbModel> { - * toFirestore(post: WithFieldValue<Post>): WithFieldValue<PostDbModel> { - * return { - * ttl: post.title, - * aut: this._autFromAuthor(post.author), - * lut: this._lutFromLastUpdatedMillis(post.lastUpdatedMillis) - * }; - * } - * - * fromFirestore(snapshot: QueryDocumentSnapshot, options: SnapshotOptions): Post { - * const data = snapshot.data(options) as PostDbModel; - * const author = `${data.aut.firstName} ${data.aut.lastName}`; - * return new Post(data.ttl, author, data.lut.toMillis()); - * } - * - * _autFromAuthor( - * author: string | FieldValue - * ): { firstName: string; lastName: string } | FieldValue { - * if (typeof author !== 'string') { - * // `author` is a FieldValue, so just return it. - * return author; - * } - * const [firstName, lastName] = author.split(' '); - * return {firstName, lastName}; - * } - * - * _lutFromLastUpdatedMillis( - * lastUpdatedMillis: number | FieldValue - * ): Timestamp | FieldValue { - * if (typeof lastUpdatedMillis !== 'number') { - * // `lastUpdatedMillis` must be a FieldValue, so just return it. - * return lastUpdatedMillis; - * } - * return Timestamp.fromMillis(lastUpdatedMillis); - * } - * } - * - * async function advancedDemo(db: Firestore): Promise<void> { - * // Create a `DocumentReference` with a `FirestoreDataConverter`. - * const documentRef = doc(db, 'posts/post123').withConverter(new PostConverter()); - * - * // The `data` argument specified to `setDoc()` is type checked by the - * // TypeScript compiler to be compatible with `Post`. Since the `data` - * // argument is typed as `WithFieldValue<Post>` rather than just `Post`, - * // this allows properties of the `data` argument to also be special - * // Firestore values that perform server-side mutations, such as - * // `arrayRemove()`, `deleteField()`, and `serverTimestamp()`. - * await setDoc(documentRef, { - * title: 'My Life', - * author: 'Foo Bar', - * lastUpdatedMillis: serverTimestamp() - * }); - * - * // The TypeScript compiler will fail to compile if the `data` argument to - * // `setDoc()` is _not_ compatible with `WithFieldValue<Post>`. This - * // type checking prevents the caller from specifying objects with incorrect - * // properties or property values. - * // @ts-expect-error "Argument of type { ttl: string; } is not assignable - * // to parameter of type WithFieldValue<Post>" - * await setDoc(documentRef, { ttl: 'The Title' }); - * - * // When retrieving a document with `getDoc()` the `DocumentSnapshot` - * // object's `data()` method returns a `Post`, rather than a generic object, - * // which would have been returned if the `DocumentReference` did _not_ have a - * // `FirestoreDataConverter` attached to it. - * const snapshot1: DocumentSnapshot<Post> = await getDoc(documentRef); - * const post1: Post = snapshot1.data()!; - * if (post1) { - * assertEqual(post1.title, 'My Life'); - * assertEqual(post1.author, 'Foo Bar'); - * } - * - * // The `data` argument specified to `updateDoc()` is type checked by the - * // TypeScript compiler to be compatible with `PostDbModel`. Note that - * // unlike `setDoc()`, whose `data` argument must be compatible with `Post`, - * // the `data` argument to `updateDoc()` must be compatible with - * // `PostDbModel`. Similar to `setDoc()`, since the `data` argument is typed - * // as `WithFieldValue<PostDbModel>` rather than just `PostDbModel`, this - * // allows properties of the `data` argument to also be those special - * // Firestore values, like `arrayRemove()`, `deleteField()`, and - * // `serverTimestamp()`. - * await updateDoc(documentRef, { - * 'aut.firstName': 'NewFirstName', - * lut: serverTimestamp() - * }); - * - * // The TypeScript compiler will fail to compile if the `data` argument to - * // `updateDoc()` is _not_ compatible with `WithFieldValue<PostDbModel>`. - * // This type checking prevents the caller from specifying objects with - * // incorrect properties or property values. - * // @ts-expect-error "Argument of type { title: string; } is not assignable - * // to parameter of type WithFieldValue<PostDbModel>" - * await updateDoc(documentRef, { title: 'New Title' }); - * const snapshot2: DocumentSnapshot<Post> = await getDoc(documentRef); - * const post2: Post = snapshot2.data()!; - * if (post2) { - * assertEqual(post2.title, 'My Life'); - * assertEqual(post2.author, 'NewFirstName Bar'); - * } - * } - * ``` - */ -export interface FirestoreDataConverter<AppModelType, DbModelType extends DocumentData = DocumentData> { - /** - * Called by the Firestore SDK to convert a custom model object of type - * `AppModelType` into a plain JavaScript object (suitable for writing - * directly to the Firestore database) of type `DbModelType`. Used with - * {@link @firebase/firestore/lite#(setDoc:1)}, - * {@link @firebase/firestore/lite#(WriteBatch.set:1)} and - * {@link @firebase/firestore/lite#(Transaction.set:1)}. - * - * The `WithFieldValue<T>` type extends `T` to also allow FieldValues such as - * {@link (deleteField:1)} to be used as property values. - */ - toFirestore(modelObject: WithFieldValue<AppModelType>): WithFieldValue<DbModelType>; - /** - * Called by the Firestore SDK to convert a custom model object of type - * `AppModelType` into a plain JavaScript object (suitable for writing - * directly to the Firestore database) of type `DbModelType`. Used with - * {@link @firebase/firestore/lite#(setDoc:1)}, - * {@link @firebase/firestore/lite#(WriteBatch.set:1)} and - * {@link @firebase/firestore/lite#(Transaction.set:1)} with `merge:true` - * or `mergeFields`. - * - * The `PartialWithFieldValue<T>` type extends `Partial<T>` to allow - * FieldValues such as {@link (arrayUnion:1)} to be used as property values. - * It also supports nested `Partial` by allowing nested fields to be - * omitted. - */ - toFirestore(modelObject: PartialWithFieldValue<AppModelType>, options: SetOptions): PartialWithFieldValue<DbModelType>; - /** - * Called by the Firestore SDK to convert Firestore data into an object of - * type `AppModelType`. You can access your data by calling: - * `snapshot.data()`. - * - * - * Generally, the data returned from `snapshot.data()` can be cast to - * `DbModelType`; however, this is not guaranteed because Firestore does not - * enforce a schema on the database. For example, writes from a previous - * version of the application or writes from another client that did not use a - * type converter could have written data with different properties and/or - * property types. The implementation will need to choose whether to - * gracefully recover from non-conforming data or throw an error. - * - * @param snapshot - A `QueryDocumentSnapshot` containing your data and - * metadata. - */ - fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData, DocumentData>): AppModelType; -} -/** - * A `DocumentSnapshot` contains data read from a document in your Firestore - * database. The data can be extracted with `.data()` or `.get(<field>)` to - * get a specific field. - * - * For a `DocumentSnapshot` that points to a non-existing document, any data - * access will return 'undefined'. You can use the `exists()` method to - * explicitly verify a document's existence. - */ -export declare class DocumentSnapshot<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> { - _firestore: Firestore; - _userDataWriter: AbstractUserDataWriter; - _key: DocumentKey; - _document: Document | null; - _converter: UntypedFirestoreDataConverter<AppModelType, DbModelType> | null; - /** @hideconstructor protected */ - constructor(_firestore: Firestore, _userDataWriter: AbstractUserDataWriter, _key: DocumentKey, _document: Document | null, _converter: UntypedFirestoreDataConverter<AppModelType, DbModelType> | null); - /** Property of the `DocumentSnapshot` that provides the document's ID. */ - get id(): string; - /** - * The `DocumentReference` for the document included in the `DocumentSnapshot`. - */ - get ref(): DocumentReference<AppModelType, DbModelType>; - /** - * Signals whether or not the document at the snapshot's location exists. - * - * @returns true if the document exists. - */ - exists(): this is QueryDocumentSnapshot<AppModelType, DbModelType>; - /** - * Retrieves all fields in the document as an `Object`. Returns `undefined` if - * the document doesn't exist. - * - * @returns An `Object` containing all fields in the document or `undefined` - * if the document doesn't exist. - */ - data(): AppModelType | undefined; - /** - * Retrieves the field specified by `fieldPath`. Returns `undefined` if the - * document or field doesn't exist. - * - * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific - * field. - * @returns The data at the specified field location or undefined if no such - * field exists in the document. - */ - get(fieldPath: string | FieldPath): any; -} -/** - * A `QueryDocumentSnapshot` contains data read from a document in your - * Firestore database as part of a query. The document is guaranteed to exist - * and its data can be extracted with `.data()` or `.get(<field>)` to get a - * specific field. - * - * A `QueryDocumentSnapshot` offers the same API surface as a - * `DocumentSnapshot`. Since query results contain only existing documents, the - * `exists` property will always be true and `data()` will never return - * 'undefined'. - */ -export declare class QueryDocumentSnapshot<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> extends DocumentSnapshot<AppModelType, DbModelType> { - /** - * Retrieves all fields in the document as an `Object`. - * - * @override - * @returns An `Object` containing all fields in the document. - */ - data(): AppModelType; -} -/** - * A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects - * representing the results of a query. The documents can be accessed as an - * array via the `docs` property or enumerated using the `forEach` method. The - * number of documents can be determined via the `empty` and `size` - * properties. - */ -export declare class QuerySnapshot<AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData> { - readonly _docs: Array<QueryDocumentSnapshot<AppModelType, DbModelType>>; - /** - * The query on which you called {@link getDocs} in order to get this - * `QuerySnapshot`. - */ - readonly query: Query<AppModelType, DbModelType>; - /** @hideconstructor */ - constructor(_query: Query<AppModelType, DbModelType>, _docs: Array<QueryDocumentSnapshot<AppModelType, DbModelType>>); - /** An array of all the documents in the `QuerySnapshot`. */ - get docs(): Array<QueryDocumentSnapshot<AppModelType, DbModelType>>; - /** The number of documents in the `QuerySnapshot`. */ - get size(): number; - /** True if there are no documents in the `QuerySnapshot`. */ - get empty(): boolean; - /** - * Enumerates all of the documents in the `QuerySnapshot`. - * - * @param callback - A callback to be called with a `QueryDocumentSnapshot` for - * each document in the snapshot. - * @param thisArg - The `this` binding for the callback. - */ - forEach(callback: (result: QueryDocumentSnapshot<AppModelType, DbModelType>) => void, thisArg?: unknown): void; -} -/** - * Returns true if the provided snapshots are equal. - * - * @param left - A snapshot to compare. - * @param right - A snapshot to compare. - * @returns true if the snapshots are equal. - */ -export declare function snapshotEqual<AppModelType, DbModelType extends DocumentData>(left: DocumentSnapshot<AppModelType, DbModelType> | QuerySnapshot<AppModelType, DbModelType>, right: DocumentSnapshot<AppModelType, DbModelType> | QuerySnapshot<AppModelType, DbModelType>): boolean; -/** - * Helper that calls `fromDotSeparatedString()` but wraps any error thrown. - */ -export declare function fieldPathFromArgument(methodName: string, arg: string | FieldPath | Compat<FieldPath>): InternalFieldPath; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/timestamp.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/timestamp.d.ts deleted file mode 100644 index 6d14f82..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/timestamp.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Property } from '../util/json_validation'; -/** - * A `Timestamp` represents a point in time independent of any time zone or - * calendar, represented as seconds and fractions of seconds at nanosecond - * resolution in UTC Epoch time. - * - * It is encoded using the Proleptic Gregorian Calendar which extends the - * Gregorian calendar backwards to year one. It is encoded assuming all minutes - * are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59.999999999Z. - * - * For examples and further specifications, refer to the - * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}. - */ -export declare class Timestamp { - /** - * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. - */ - readonly seconds: number; - /** - * The fractions of a second at nanosecond resolution.* - */ - readonly nanoseconds: number; - /** - * Creates a new timestamp with the current date, with millisecond precision. - * - * @returns a new timestamp representing the current date. - */ - static now(): Timestamp; - /** - * Creates a new timestamp from the given date. - * - * @param date - The date to initialize the `Timestamp` from. - * @returns A new `Timestamp` representing the same point in time as the given - * date. - */ - static fromDate(date: Date): Timestamp; - /** - * Creates a new timestamp from the given number of milliseconds. - * - * @param milliseconds - Number of milliseconds since Unix epoch - * 1970-01-01T00:00:00Z. - * @returns A new `Timestamp` representing the same point in time as the given - * number of milliseconds. - */ - static fromMillis(milliseconds: number): Timestamp; - /** - * Creates a new timestamp. - * - * @param seconds - The number of seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * @param nanoseconds - The non-negative fractions of a second at nanosecond - * resolution. Negative second values with fractions must still have - * non-negative nanoseconds values that count forward in time. Must be - * from 0 to 999,999,999 inclusive. - */ - constructor( - /** - * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. - */ - seconds: number, - /** - * The fractions of a second at nanosecond resolution.* - */ - nanoseconds: number); - /** - * Converts a `Timestamp` to a JavaScript `Date` object. This conversion - * causes a loss of precision since `Date` objects only support millisecond - * precision. - * - * @returns JavaScript `Date` object representing the same point in time as - * this `Timestamp`, with millisecond precision. - */ - toDate(): Date; - /** - * Converts a `Timestamp` to a numeric timestamp (in milliseconds since - * epoch). This operation causes a loss of precision. - * - * @returns The point in time corresponding to this timestamp, represented as - * the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z. - */ - toMillis(): number; - _compareTo(other: Timestamp): number; - /** - * Returns true if this `Timestamp` is equal to the provided one. - * - * @param other - The `Timestamp` to compare against. - * @returns true if this `Timestamp` is equal to the provided one. - */ - isEqual(other: Timestamp): boolean; - /** Returns a textual representation of this `Timestamp`. */ - toString(): string; - static _jsonSchemaVersion: string; - static _jsonSchema: { - type: Property<"string">; - seconds: Property<"number">; - nanoseconds: Property<"number">; - }; - /** - * Returns a JSON-serializable representation of this `Timestamp`. - */ - toJSON(): { - seconds: number; - nanoseconds: number; - type: string; - }; - /** - * Builds a `Timestamp` instance from a JSON object created by {@link Timestamp.toJSON}. - */ - static fromJSON(json: object): Timestamp; - /** - * Converts this object to a primitive string, which allows `Timestamp` objects - * to be compared using the `>`, `<=`, `>=` and `>` operators. - */ - valueOf(): string; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/transaction.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/transaction.d.ts deleted file mode 100644 index eee3374..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/transaction.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Transaction as InternalTransaction } from '../core/transaction'; -import { Firestore } from './database'; -import { FieldPath } from './field_path'; -import { DocumentData, DocumentReference, PartialWithFieldValue, SetOptions, UpdateData, WithFieldValue } from './reference'; -import { DocumentSnapshot } from './snapshot'; -import { TransactionOptions } from './transaction_options'; -/** - * A reference to a transaction. - * - * The `Transaction` object passed to a transaction's `updateFunction` provides - * the methods to read and write data within the transaction context. See - * {@link runTransaction}. - */ -export declare class Transaction { - protected readonly _firestore: Firestore; - private readonly _transaction; - private readonly _dataReader; - /** @hideconstructor */ - constructor(_firestore: Firestore, _transaction: InternalTransaction); - /** - * Reads the document referenced by the provided {@link DocumentReference}. - * - * @param documentRef - A reference to the document to be read. - * @returns A `DocumentSnapshot` with the read data. - */ - get<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>; - /** - * Writes to the document referred to by the provided {@link - * DocumentReference}. If the document does not exist yet, it will be created. - * - * @param documentRef - A reference to the document to be set. - * @param data - An object of the fields and values for the document. - * @throws Error - If the provided input is not a valid Firestore document. - * @returns This `Transaction` instance. Used for chaining method calls. - */ - set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): this; - /** - * Writes to the document referred to by the provided {@link - * DocumentReference}. If the document does not exist yet, it will be created. - * If you provide `merge` or `mergeFields`, the provided data can be merged - * into an existing document. - * - * @param documentRef - A reference to the document to be set. - * @param data - An object of the fields and values for the document. - * @param options - An object to configure the set behavior. - * @throws Error - If the provided input is not a valid Firestore document. - * @returns This `Transaction` instance. Used for chaining method calls. - */ - set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): this; - /** - * Updates fields in the document referred to by the provided {@link - * DocumentReference}. The update will fail if applied to a document that does - * not exist. - * - * @param documentRef - A reference to the document to be updated. - * @param data - An object containing the fields and values with which to - * update the document. Fields can contain dots to reference nested fields - * within the document. - * @throws Error - If the provided input is not valid Firestore data. - * @returns This `Transaction` instance. Used for chaining method calls. - */ - update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): this; - /** - * Updates fields in the document referred to by the provided {@link - * DocumentReference}. The update will fail if applied to a document that does - * not exist. - * - * Nested fields can be updated by providing dot-separated field path - * strings or by providing `FieldPath` objects. - * - * @param documentRef - A reference to the document to be updated. - * @param field - The first field to update. - * @param value - The first value. - * @param moreFieldsAndValues - Additional key/value pairs. - * @throws Error - If the provided input is not valid Firestore data. - * @returns This `Transaction` instance. Used for chaining method calls. - */ - update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; - /** - * Deletes the document referred to by the provided {@link DocumentReference}. - * - * @param documentRef - A reference to the document to be deleted. - * @returns This `Transaction` instance. Used for chaining method calls. - */ - delete<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>): this; -} -/** - * Executes the given `updateFunction` and then attempts to commit the changes - * applied within the transaction. If any document read within the transaction - * has changed, Cloud Firestore retries the `updateFunction`. If it fails to - * commit after 5 attempts, the transaction fails. - * - * The maximum number of writes allowed in a single transaction is 500. - * - * @param firestore - A reference to the Firestore database to run this - * transaction against. - * @param updateFunction - The function to execute within the transaction - * context. - * @param options - An options object to configure maximum number of attempts to - * commit. - * @returns If the transaction completed successfully or was explicitly aborted - * (the `updateFunction` returned a failed promise), the promise returned by the - * `updateFunction `is returned here. Otherwise, if the transaction failed, a - * rejected promise with the corresponding failure error is returned. - */ -export declare function runTransaction<T>(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise<T>, options?: TransactionOptions): Promise<T>; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/transaction_options.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/transaction_options.d.ts deleted file mode 100644 index 113fb49..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/transaction_options.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Options to customize transaction behavior. - */ -export declare interface TransactionOptions { - /** Maximum number of attempts to commit, after which transaction fails. Default is 5. */ - readonly maxAttempts?: number; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/types.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/types.d.ts deleted file mode 100644 index 5c56c2d..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/types.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { UpdateData } from './reference'; -/** - * These types primarily exist to support the `UpdateData`, - * `WithFieldValue`, and `PartialWithFieldValue` types and are not consumed - * directly by the end developer. - */ -/** Primitive types. */ -export type Primitive = string | number | boolean | undefined | null; -/** - * For each field (e.g. 'bar'), find all nested keys (e.g. {'bar.baz': T1, - * 'bar.qux': T2}). Intersect them together to make a single map containing - * all possible keys that are all marked as optional - */ -export type NestedUpdateFields<T extends Record<string, unknown>> = UnionToIntersection<{ - [K in keyof T & string]: ChildUpdateFields<K, T[K]>; -}[keyof T & string]>; -/** - * Helper for calculating the nested fields for a given type T1. This is needed - * to distribute union types such as `undefined | {...}` (happens for optional - * props) or `{a: A} | {b: B}`. - * - * In this use case, `V` is used to distribute the union types of `T[K]` on - * `Record`, since `T[K]` is evaluated as an expression and not distributed. - * - * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types - */ -export type ChildUpdateFields<K extends string, V> = V extends Record<string, unknown> ? AddPrefixToKeys<K, UpdateData<V>> : never; -/** - * Returns a new map where every key is prefixed with the outer key appended - * to a dot. - */ -export type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = { - [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K]; -}; -/** - * Given a union type `U = T1 | T2 | ...`, returns an intersected type - * `(T1 & T2 & ...)`. - * - * Uses distributive conditional types and inference from conditional types. - * This works because multiple candidates for the same type variable in - * contra-variant positions causes an intersection type to be inferred. - * https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-inference-in-conditional-types - * https://stackoverflow.com/questions/50374908/transform-union-type-to-intersection-type - */ -export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/user_data_reader.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/user_data_reader.d.ts deleted file mode 100644 index 821bb46..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/user_data_reader.d.ts +++ /dev/null @@ -1,224 +0,0 @@ -/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { DocumentData, FieldPath as PublicFieldPath, SetOptions } from '@firebase/firestore-types'; -import { Compat } from '@firebase/util'; -import { ParseContext } from '../api/parse_context'; -import { DatabaseId } from '../core/database_info'; -import { DocumentKey } from '../model/document_key'; -import { FieldMask } from '../model/field_mask'; -import { FieldTransform, Mutation, Precondition } from '../model/mutation'; -import { ObjectValue } from '../model/object_value'; -import { FieldPath as InternalFieldPath } from '../model/path'; -import { MapValue as ProtoMapValue, Value as ProtoValue } from '../protos/firestore_proto_api'; -import { JsonProtoSerializer } from '../remote/serializer'; -import { FirestoreError } from '../util/error'; -import { Dict } from '../util/obj'; -import { Firestore } from './database'; -import { FieldValue } from './field_value'; -import { PartialWithFieldValue, WithFieldValue } from './reference'; -import { VectorValue } from './vector_value'; -/** - * An untyped Firestore Data Converter interface that is shared between the - * lite, firestore-exp and classic SDK. - */ -export interface UntypedFirestoreDataConverter<AppModelType, DbModelType extends DocumentData = DocumentData> { - toFirestore(modelObject: WithFieldValue<AppModelType>): WithFieldValue<DbModelType>; - toFirestore(modelObject: PartialWithFieldValue<AppModelType>, options: SetOptions): PartialWithFieldValue<DbModelType>; - fromFirestore(snapshot: unknown, options?: unknown): AppModelType; -} -/** The result of parsing document data (e.g. for a setData call). */ -export declare class ParsedSetData { - readonly data: ObjectValue; - readonly fieldMask: FieldMask | null; - readonly fieldTransforms: FieldTransform[]; - constructor(data: ObjectValue, fieldMask: FieldMask | null, fieldTransforms: FieldTransform[]); - toMutation(key: DocumentKey, precondition: Precondition): Mutation; -} -/** The result of parsing "update" data (i.e. for an updateData call). */ -export declare class ParsedUpdateData { - readonly data: ObjectValue; - readonly fieldMask: FieldMask; - readonly fieldTransforms: FieldTransform[]; - constructor(data: ObjectValue, fieldMask: FieldMask, fieldTransforms: FieldTransform[]); - toMutation(key: DocumentKey, precondition: Precondition): Mutation; -} -export declare const enum UserDataSource { - Set = 0, - Update = 1, - MergeSet = 2, - /** - * Indicates the source is a where clause, cursor bound, arrayUnion() - * element, etc. Of note, isWrite(source) will return false. - */ - Argument = 3, - /** - * Indicates that the source is an Argument that may directly contain nested - * arrays (e.g. the operand of an `in` query). - */ - ArrayArgument = 4 -} -/** Contains the settings that are mutated as we parse user data. */ -interface ContextSettings { - /** Indicates what kind of API method this data came from. */ - readonly dataSource: UserDataSource; - /** The name of the method the user called to create the ParseContext. */ - readonly methodName: string; - /** The document the user is attempting to modify, if that applies. */ - readonly targetDoc?: DocumentKey; - /** - * A path within the object being parsed. This could be an empty path (in - * which case the context represents the root of the data being parsed), or a - * nonempty path (indicating the context represents a nested location within - * the data). - */ - readonly path?: InternalFieldPath; - /** - * Whether or not this context corresponds to an element of an array. - * If not set, elements are treated as if they were outside of arrays. - */ - readonly arrayElement?: boolean; - /** - * Whether or not a converter was specified in this context. If true, error - * messages will reference the converter when invalid data is provided. - */ - readonly hasConverter?: boolean; -} -/** A "context" object passed around while parsing user data. */ -declare class ParseContextImpl implements ParseContext { - readonly settings: ContextSettings; - readonly databaseId: DatabaseId; - readonly serializer: JsonProtoSerializer; - readonly ignoreUndefinedProperties: boolean; - readonly fieldTransforms: FieldTransform[]; - readonly fieldMask: InternalFieldPath[]; - /** - * Initializes a ParseContext with the given source and path. - * - * @param settings - The settings for the parser. - * @param databaseId - The database ID of the Firestore instance. - * @param serializer - The serializer to use to generate the Value proto. - * @param ignoreUndefinedProperties - Whether to ignore undefined properties - * rather than throw. - * @param fieldTransforms - A mutable list of field transforms encountered - * while parsing the data. - * @param fieldMask - A mutable list of field paths encountered while parsing - * the data. - * - * TODO(b/34871131): We don't support array paths right now, so path can be - * null to indicate the context represents any location within an array (in - * which case certain features will not work and errors will be somewhat - * compromised). - */ - constructor(settings: ContextSettings, databaseId: DatabaseId, serializer: JsonProtoSerializer, ignoreUndefinedProperties: boolean, fieldTransforms?: FieldTransform[], fieldMask?: InternalFieldPath[]); - get path(): InternalFieldPath | undefined; - get dataSource(): UserDataSource; - /** Returns a new context with the specified settings overwritten. */ - contextWith(configuration: Partial<ContextSettings>): ParseContextImpl; - childContextForField(field: string): ParseContextImpl; - childContextForFieldPath(field: InternalFieldPath): ParseContextImpl; - childContextForArray(index: number): ParseContextImpl; - createError(reason: string): FirestoreError; - /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ - contains(fieldPath: InternalFieldPath): boolean; - private validatePath; - private validatePathSegment; -} -/** - * Helper for parsing raw user input (provided via the API) into internal model - * classes. - */ -export declare class UserDataReader { - private readonly databaseId; - private readonly ignoreUndefinedProperties; - private readonly serializer; - constructor(databaseId: DatabaseId, ignoreUndefinedProperties: boolean, serializer?: JsonProtoSerializer); - /** Creates a new top-level parse context. */ - createContext(dataSource: UserDataSource, methodName: string, targetDoc?: DocumentKey, hasConverter?: boolean): ParseContextImpl; -} -export declare function newUserDataReader(firestore: Firestore): UserDataReader; -/** Parse document data from a set() call. */ -export declare function parseSetData(userDataReader: UserDataReader, methodName: string, targetDoc: DocumentKey, input: unknown, hasConverter: boolean, options?: SetOptions): ParsedSetData; -export declare class DeleteFieldValueImpl extends FieldValue { - _toFieldTransform(context: ParseContextImpl): null; - isEqual(other: FieldValue): boolean; -} -export declare class ServerTimestampFieldValueImpl extends FieldValue { - _toFieldTransform(context: ParseContextImpl): FieldTransform; - isEqual(other: FieldValue): boolean; -} -export declare class ArrayUnionFieldValueImpl extends FieldValue { - private readonly _elements; - constructor(methodName: string, _elements: unknown[]); - _toFieldTransform(context: ParseContextImpl): FieldTransform; - isEqual(other: FieldValue): boolean; -} -export declare class ArrayRemoveFieldValueImpl extends FieldValue { - private readonly _elements; - constructor(methodName: string, _elements: unknown[]); - _toFieldTransform(context: ParseContextImpl): FieldTransform; - isEqual(other: FieldValue): boolean; -} -export declare class NumericIncrementFieldValueImpl extends FieldValue { - private readonly _operand; - constructor(methodName: string, _operand: number); - _toFieldTransform(context: ParseContextImpl): FieldTransform; - isEqual(other: FieldValue): boolean; -} -/** Parse update data from an update() call. */ -export declare function parseUpdateData(userDataReader: UserDataReader, methodName: string, targetDoc: DocumentKey, input: unknown): ParsedUpdateData; -/** Parse update data from a list of field/value arguments. */ -export declare function parseUpdateVarargs(userDataReader: UserDataReader, methodName: string, targetDoc: DocumentKey, field: string | PublicFieldPath | Compat<PublicFieldPath>, value: unknown, moreFieldsAndValues: unknown[]): ParsedUpdateData; -/** - * Parse a "query value" (e.g. value in a where filter or a value in a cursor - * bound). - * - * @param allowArrays - Whether the query value is an array that may directly - * contain additional arrays (e.g. the operand of an `in` query). - */ -export declare function parseQueryValue(userDataReader: UserDataReader, methodName: string, input: unknown, allowArrays?: boolean): ProtoValue; -/** - * Parses user data to Protobuf Values. - * - * @param input - Data to be parsed. - * @param context - A context object representing the current path being parsed, - * the source of the data being parsed, etc. - * @returns The parsed value, or null if the value was a FieldValue sentinel - * that should not be included in the resulting parsed data. - */ -export declare function parseData(input: unknown, context: ParseContextImpl): ProtoValue | null; -export declare function parseObject(obj: Dict<unknown>, context: ParseContextImpl): { - mapValue: ProtoMapValue; -}; -/** - * Creates a new VectorValue proto value (using the internal format). - */ -export declare function parseVectorValue(value: VectorValue, context: ParseContextImpl): ProtoValue; -/** - * Helper that calls fromDotSeparatedString() but wraps any error thrown. - */ -export declare function fieldPathFromArgument(methodName: string, path: string | PublicFieldPath | Compat<PublicFieldPath>, targetDoc?: DocumentKey): InternalFieldPath; -/** - * Wraps fromDotSeparatedString with an error message about the method that - * was thrown. - * @param methodName - The publicly visible method name - * @param path - The dot-separated string form of a field path which will be - * split on dots. - * @param targetDoc - The document against which the field path will be - * evaluated. - */ -export declare function fieldPathFromDotSeparatedString(methodName: string, path: string, targetDoc?: DocumentKey): InternalFieldPath; -export {}; diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/user_data_writer.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/user_data_writer.d.ts deleted file mode 100644 index 391593a..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/user_data_writer.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { DocumentData } from '@firebase/firestore-types'; -import { DatabaseId } from '../core/database_info'; -import { DocumentKey } from '../model/document_key'; -import { ApiClientObjectMap, MapValue as ProtoMapValue, Value, Value as ProtoValue } from '../protos/firestore_proto_api'; -import { ByteString } from '../util/byte_string'; -import { VectorValue } from './vector_value'; -export type ServerTimestampBehavior = 'estimate' | 'previous' | 'none'; -/** - * Converts Firestore's internal types to the JavaScript types that we expose - * to the user. - * - * @internal - */ -export declare abstract class AbstractUserDataWriter { - convertValue(value: ProtoValue, serverTimestampBehavior?: ServerTimestampBehavior): unknown; - private convertObject; - /** - * @internal - */ - convertObjectMap(fields: ApiClientObjectMap<Value> | undefined, serverTimestampBehavior?: ServerTimestampBehavior): DocumentData; - /** - * @internal - */ - convertVectorValue(mapValue: ProtoMapValue): VectorValue; - private convertGeoPoint; - private convertArray; - private convertServerTimestamp; - private convertTimestamp; - protected convertDocumentKey(name: string, expectedDatabaseId: DatabaseId): DocumentKey; - protected abstract convertReference(name: string): unknown; - protected abstract convertBytes(bytes: ByteString): unknown; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/vector_value.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/vector_value.d.ts deleted file mode 100644 index b4808e0..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/vector_value.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @license - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Property } from '../util/json_validation'; -/** - * Represents a vector type in Firestore documents. - * Create an instance with <code>{@link vector}</code>. - * - * @class VectorValue - */ -export declare class VectorValue { - private readonly _values; - /** - * @private - * @internal - */ - constructor(values: number[] | undefined); - /** - * Returns a copy of the raw number array form of the vector. - */ - toArray(): number[]; - /** - * Returns `true` if the two `VectorValue` values have the same raw number arrays, returns `false` otherwise. - */ - isEqual(other: VectorValue): boolean; - static _jsonSchemaVersion: string; - static _jsonSchema: { - type: Property<"string">; - vectorValues: Property<"object">; - }; - /** - * Returns a JSON-serializable representation of this `VectorValue` instance. - * - * @returns a JSON representation of this object. - */ - toJSON(): object; - /** - * Builds a `VectorValue` instance from a JSON object created by {@link VectorValue.toJSON}. - * - * @param json a JSON object represention of a `VectorValue` instance. - * @returns an instance of {@link VectorValue} if the JSON object could be parsed. Throws a - * {@link FirestoreError} if an error occurs. - */ - static fromJSON(json: object): VectorValue; -} diff --git a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/write_batch.d.ts b/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/write_batch.d.ts deleted file mode 100644 index 4835feb..0000000 --- a/frontend-old/node_modules/@firebase/firestore/dist/firestore/src/lite-api/write_batch.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Compat } from '@firebase/util'; -import { Mutation } from '../model/mutation'; -import { Firestore } from './database'; -import { FieldPath } from './field_path'; -import { DocumentData, DocumentReference, PartialWithFieldValue, SetOptions, UpdateData, WithFieldValue } from './reference'; -/** - * A write batch, used to perform multiple writes as a single atomic unit. - * - * A `WriteBatch` object can be acquired by calling {@link writeBatch}. It - * provides methods for adding writes to the write batch. None of the writes - * will be committed (or visible locally) until {@link WriteBatch.commit} is - * called. - */ -export declare class WriteBatch { - private readonly _firestore; - private readonly _commitHandler; - private readonly _dataReader; - private _mutations; - private _committed; - /** @hideconstructor */ - constructor(_firestore: Firestore, _commitHandler: (m: Mutation[]) => Promise<void>); - /** - * Writes to the document referred to by the provided {@link - * DocumentReference}. If the document does not exist yet, it will be created. - * - * @param documentRef - A reference to the document to be set. - * @param data - An object of the fields and values for the document. - * @returns This `WriteBatch` instance. Used for chaining method calls. - */ - set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): WriteBatch; - /** - * Writes to the document referred to by the provided {@link - * DocumentReference}. If the document does not exist yet, it will be created. - * If you provide `merge` or `mergeFields`, the provided data can be merged - * into an existing document. - * - * @param documentRef - A reference to the document to be set. - * @param data - An object of the fields and values for the document. - * @param options - An object to configure the set behavior. - * @throws Error - If the provided input is not a valid Firestore document. - * @returns This `WriteBatch` instance. Used for chaining method calls. - */ - set<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): WriteBatch; - /** - * Updates fields in the document referred to by the provided {@link - * DocumentReference}. The update will fail if applied to a document that does - * not exist. - * - * @param documentRef - A reference to the document to be updated. - * @param data - An object containing the fields and values with which to - * update the document. Fields can contain dots to reference nested fields - * within the document. - * @throws Error - If the provided input is not valid Firestore data. - * @returns This `WriteBatch` instance. Used for chaining method calls. - */ - update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): WriteBatch; - /** - * Updates fields in the document referred to by this {@link - * DocumentReference}. The update will fail if applied to a document that does - * not exist. - * - * Nested fields can be update by providing dot-separated field path strings - * or by providing `FieldPath` objects. - * - * @param documentRef - A reference to the document to be updated. - * @param field - The first field to update. - * @param value - The first value. - * @param moreFieldsAndValues - Additional key value pairs. - * @throws Error - If the provided input is not valid Firestore data. - * @returns This `WriteBatch` instance. Used for chaining method calls. - */ - update<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; - /** - * Deletes the document referred to by the provided {@link DocumentReference}. - * - * @param documentRef - A reference to the document to be deleted. - * @returns This `WriteBatch` instance. Used for chaining method calls. - */ - delete<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType>): WriteBatch; - /** - * Commits all of the writes in this write batch as a single atomic unit. - * - * The result of these writes will only be reflected in document reads that - * occur after the returned promise resolves. If the client is offline, the - * write fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @returns A `Promise` resolved once all of the writes in the batch have been - * successfully written to the backend as an atomic unit (note that it won't - * resolve while you're offline). - */ - commit(): Promise<void>; - private _verifyNotCommitted; -} -export declare function validateReference<AppModelType, DbModelType extends DocumentData>(documentRef: DocumentReference<AppModelType, DbModelType> | Compat<DocumentReference<AppModelType, DbModelType>>, firestore: Firestore): DocumentReference<AppModelType, DbModelType>; -/** - * Creates a write batch, used for performing multiple writes as a single - * atomic operation. The maximum number of writes allowed in a single WriteBatch - * is 500. - * - * The result of these writes will only be reflected in document reads that - * occur after the returned promise resolves. If the client is offline, the - * write fails. If you would like to see local modifications or buffer writes - * until the client is online, use the full Firestore SDK. - * - * @returns A `WriteBatch` that can be used to atomically execute multiple - * writes. - */ -export declare function writeBatch(firestore: Firestore): WriteBatch; |
