diff --git a/docs-devsite/firestore_.index.md b/docs-devsite/firestore_.index.md index 02a9b95f23c..8ab70e35fa6 100644 --- a/docs-devsite/firestore_.index.md +++ b/docs-devsite/firestore_.index.md @@ -30,8 +30,8 @@ export declare interface Index | Property | Type | Description | | --- | --- | --- | -| [collectionGroup](./firestore_.index.md#indexcollectiongroup) | string | (BETA) The ID of the collection to index. | -| [fields](./firestore_.index.md#indexfields) | [IndexField](./firestore_.indexfield.md#indexfield_interface)\[\] | (BETA) A list of fields to index. | +| [collectionGroup](./firestore_.index.md#indexcollectiongroup) | string | (Public Preview) The ID of the collection to index. | +| [fields](./firestore_.index.md#indexfields) | [IndexField](./firestore_.indexfield.md#indexfield_interface)\[\] | (Public Preview) A list of fields to index. | ## Index.collectionGroup diff --git a/docs-devsite/firestore_.indexconfiguration.md b/docs-devsite/firestore_.indexconfiguration.md index 4bf7e4278fb..e22725c5e0f 100644 --- a/docs-devsite/firestore_.indexconfiguration.md +++ b/docs-devsite/firestore_.indexconfiguration.md @@ -32,7 +32,7 @@ export declare interface IndexConfiguration | Property | Type | Description | | --- | --- | --- | -| [indexes](./firestore_.indexconfiguration.md#indexconfigurationindexes) | [Index](./firestore_.index.md#index_interface)\[\] | (BETA) A list of all Firestore indexes. | +| [indexes](./firestore_.indexconfiguration.md#indexconfigurationindexes) | [Index](./firestore_.index.md#index_interface)\[\] | (Public Preview) A list of all Firestore indexes. | ## IndexConfiguration.indexes diff --git a/docs-devsite/firestore_.indexfield.md b/docs-devsite/firestore_.indexfield.md index e05fae75804..384fe8b9c18 100644 --- a/docs-devsite/firestore_.indexfield.md +++ b/docs-devsite/firestore_.indexfield.md @@ -30,9 +30,9 @@ export declare interface IndexField | Property | Type | Description | | --- | --- | --- | -| [arrayConfig](./firestore_.indexfield.md#indexfieldarrayconfig) | 'CONTAINS' | (BETA) What type of array index to create. Set to CONTAINS for array-contains and array-contains-any indexes.Only one of arrayConfig or order should be set; | -| [fieldPath](./firestore_.indexfield.md#indexfieldfieldpath) | string | (BETA) The field path to index. | -| [order](./firestore_.indexfield.md#indexfieldorder) | 'ASCENDING' \| 'DESCENDING' | (BETA) What type of array index to create. Set to ASCENDING or 'DESCENDING for ==, !=, <=, <=, in and not-in\` filters.Only one of arrayConfig or order should be set. | +| [arrayConfig](./firestore_.indexfield.md#indexfieldarrayconfig) | 'CONTAINS' | (Public Preview) What type of array index to create. Set to CONTAINS for array-contains and array-contains-any indexes.Only one of arrayConfig or order should be set; | +| [fieldPath](./firestore_.indexfield.md#indexfieldfieldpath) | string | (Public Preview) The field path to index. | +| [order](./firestore_.indexfield.md#indexfieldorder) | 'ASCENDING' \| 'DESCENDING' | (Public Preview) What type of array index to create. Set to ASCENDING or 'DESCENDING for ==, !=, <=, <=, in and not-in\` filters.Only one of arrayConfig or order should be set. | ## IndexField.arrayConfig diff --git a/docs-devsite/firestore_.md b/docs-devsite/firestore_.md index 74e960c833b..ece87254ef1 100644 --- a/docs-devsite/firestore_.md +++ b/docs-devsite/firestore_.md @@ -17,7 +17,7 @@ https://github.com/firebase/firebase-js-sdk | --- | --- | | function(app, ...) | | [getFirestore(app)](./firestore_.md#getfirestore_cf608e1) | Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | -| [getFirestore(app, databaseId)](./firestore_.md#getfirestore_48de6cb) | (BETA) Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | +| [getFirestore(app, databaseId)](./firestore_.md#getfirestore_48de6cb) | (Public Preview) Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | | [initializeFirestore(app, settings, databaseId)](./firestore_.md#initializefirestore_fc7d200) | Initializes a new instance of [Firestore](./firestore_.firestore.md#firestore_class) with the provided settings. Can only be called before any other function, including [getFirestore()](./firestore_.md#getfirestore). If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore). | | function(firestore, ...) | | [clearIndexedDbPersistence(firestore)](./firestore_.md#clearindexeddbpersistence_231a8e0) | Clears the persistent storage. This includes pending writes and cached documents.Must be called while the [Firestore](./firestore_.firestore.md#firestore_class) instance is not started (after the app is terminated or when the app is first initialized). On startup, this function must be called before other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200) or [getFirestore()](./firestore_.md#getfirestore))). If the [Firestore](./firestore_.firestore.md#firestore_class) instance is still running, the promise will be rejected with the error code of failed-precondition.Note: clearIndexedDbPersistence() is primarily intended to help write reliable tests that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications that are sensitive to the disclosure of cached data in between user sessions, we strongly recommend not enabling persistence at all. | @@ -35,8 +35,8 @@ https://github.com/firebase/firebase-js-sdk | [onSnapshotsInSync(firestore, observer)](./firestore_.md#onsnapshotsinsync_2f0dfa4) | Attaches a listener for a snapshots-in-sync event. The snapshots-in-sync event indicates that all listeners affected by a given change have fired, even if a single server-generated change affects multiple listeners.NOTE: The snapshots-in-sync event only indicates that listeners are in sync with each other, but does not relate to whether those snapshots are in sync with the server. Use SnapshotMetadata in the individual listeners to determine if a snapshot is from the cache or the server. | | [onSnapshotsInSync(firestore, onSync)](./firestore_.md#onsnapshotsinsync_1901c06) | Attaches a listener for a snapshots-in-sync event. The snapshots-in-sync event indicates that all listeners affected by a given change have fired, even if a single server-generated change affects multiple listeners.NOTE: The snapshots-in-sync event only indicates that listeners are in sync with each other, but does not relate to whether those snapshots are in sync with the server. Use SnapshotMetadata in the individual listeners to determine if a snapshot is from the cache or the server. | | [runTransaction(firestore, updateFunction, options)](./firestore_.md#runtransaction_6f03ec4) | 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. | -| [setIndexConfiguration(firestore, configuration)](./firestore_.md#setindexconfiguration_c362f04) | (BETA) Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.Indexes are only supported with IndexedDb persistence. If IndexedDb is not enabled, any index configuration is ignored. | -| [setIndexConfiguration(firestore, json)](./firestore_.md#setindexconfiguration_90d0285) | (BETA) Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.Indexes are only supported with IndexedDb persistence. Invoke either enableIndexedDbPersistence() or enableMultiTabIndexedDbPersistence() before setting an index configuration. If IndexedDb is not enabled, any index configuration is ignored.The method accepts the JSON format exported by the Firebase CLI (firebase firestore:indexes). If the JSON format is invalid, this method throws an error. | +| [setIndexConfiguration(firestore, configuration)](./firestore_.md#setindexconfiguration_c362f04) | (Public Preview) Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.Indexes are only supported with IndexedDb persistence. If IndexedDb is not enabled, any index configuration is ignored. | +| [setIndexConfiguration(firestore, json)](./firestore_.md#setindexconfiguration_90d0285) | (Public Preview) Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.Indexes are only supported with IndexedDb persistence. Invoke either enableIndexedDbPersistence() or enableMultiTabIndexedDbPersistence() before setting an index configuration. If IndexedDb is not enabled, any index configuration is ignored.The method accepts the JSON format exported by the Firebase CLI (firebase firestore:indexes). If the JSON format is invalid, this method throws an error. | | [terminate(firestore)](./firestore_.md#terminate_231a8e0) | Terminates the provided [Firestore](./firestore_.firestore.md#firestore_class) instance.After calling terminate() only the clearIndexedDbPersistence() function may be used. Any other function will throw a FirestoreError.To restart after termination, create a new instance of FirebaseFirestore with [getFirestore()](./firestore_.md#getfirestore).Termination does not cancel any pending writes, and any promises that are awaiting a response from the server will not be resolved. If you have persistence enabled, the next time you start this instance, it will resume sending these writes to the server.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 clearIndexedDbPersistence() to ensure that all local state is destroyed between test runs. | | [waitForPendingWrites(firestore)](./firestore_.md#waitforpendingwrites_231a8e0) | Waits until all currently pending writes for the active user have been acknowledged by the backend.The returned promise resolves immediately if there are no outstanding writes. Otherwise, the promise waits for all previously issued writes (including those written in a previous app session), but it does not wait for writes that were added after the function is called. If you want to wait for additional writes, call waitForPendingWrites() again.Any outstanding waitForPendingWrites() promises are rejected during user changes. | | [writeBatch(firestore)](./firestore_.md#writebatch_231a8e0) | Creates a write batch, used for performing multiple writes as a single atomic operation. The maximum number of writes allowed in a single [WriteBatch](./firestore_.writebatch.md#writebatch_class) is 500.Unlike transactions, write batches are persisted offline and therefore are preferable when you don't need to condition your writes on read data. | @@ -49,7 +49,7 @@ https://github.com/firebase/firebase-js-sdk | [persistentMultipleTabManager()](./firestore_.md#persistentmultipletabmanager) | Creates an instance of PersistentMultipleTabManager. | | [serverTimestamp()](./firestore_.md#servertimestamp) | Returns a sentinel used with [setDoc()](./firestore_lite.md#setdoc_ee215ad) or [updateDoc()](./firestore_lite.md#updatedoc_51a65e3) to include a server-generated timestamp in the written data. | | function(databaseId, ...) | -| [getFirestore(databaseId)](./firestore_.md#getfirestore_53dc891) | (BETA) Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | +| [getFirestore(databaseId)](./firestore_.md#getfirestore_53dc891) | (Public Preview) Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | | function(elements, ...) | | [arrayRemove(elements)](./firestore_.md#arrayremove_7d853aa) | Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc_ee215ad) or 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. | | [arrayUnion(elements)](./firestore_.md#arrayunion_7d853aa) | Returns a special value that can be used with [setDoc()](./firestore_lite.md#setdoc_ee215ad) or [updateDoc()](./firestore_lite.md#updatedoc_51a65e3) 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. | @@ -170,9 +170,9 @@ https://github.com/firebase/firebase-js-sdk | [ExperimentalLongPollingOptions](./firestore_.experimentallongpollingoptions.md#experimentallongpollingoptions_interface) | Options that configure the SDK’s underlying network transport (WebChannel) when long-polling is used.Note: This interface is "experimental" and is subject to change.See FirestoreSettings.experimentalAutoDetectLongPolling, FirestoreSettings.experimentalForceLongPolling, and FirestoreSettings.experimentalLongPollingOptions. | | [FirestoreDataConverter](./firestore_.firestoredataconverter.md#firestoredataconverter_interface) | 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. | | [FirestoreSettings](./firestore_.firestoresettings.md#firestoresettings_interface) | Specifies custom configurations for your Cloud Firestore instance. You must set these before invoking any other methods. | -| [Index](./firestore_.index.md#index_interface) | (BETA) The SDK definition of a Firestore index. | -| [IndexConfiguration](./firestore_.indexconfiguration.md#indexconfiguration_interface) | (BETA) A list of Firestore indexes to speed up local query execution.See [JSON Format](https://firebase.google.com/docs/reference/firestore/indexes/#json_format) for a description of the format of the index definition. | -| [IndexField](./firestore_.indexfield.md#indexfield_interface) | (BETA) A single field element in an index configuration. | +| [Index](./firestore_.index.md#index_interface) | (Public Preview) The SDK definition of a Firestore index. | +| [IndexConfiguration](./firestore_.indexconfiguration.md#indexconfiguration_interface) | (Public Preview) A list of Firestore indexes to speed up local query execution.See [JSON Format](https://firebase.google.com/docs/reference/firestore/indexes/#json_format) for a description of the format of the index definition. | +| [IndexField](./firestore_.indexfield.md#indexfield_interface) | (Public Preview) A single field element in an index configuration. | | [LoadBundleTaskProgress](./firestore_.loadbundletaskprogress.md#loadbundletaskprogress_interface) | Represents a progress update or a final state from loading bundles. | | [MemoryCacheSettings](./firestore_.memorycachesettings.md#memorycachesettings_interface) | An settings object to configure an MemoryLocalCache instance. | | [MemoryEagerGarbageCollector](./firestore_.memoryeagergarbagecollector.md#memoryeagergarbagecollector_interface) | A garbage collector deletes documents whenever they are not part of any active queries, and have no local mutations attached to them.This collector tries to ensure lowest memory footprints from the SDK, at the risk of documents not being cached for offline queries or for direct queries to the cache.Use factory function to create an instance of this collector. | diff --git a/docs-devsite/firestore_lite.md b/docs-devsite/firestore_lite.md index da7d304e3d5..76c0a79820e 100644 --- a/docs-devsite/firestore_lite.md +++ b/docs-devsite/firestore_lite.md @@ -17,9 +17,9 @@ https://github.com/firebase/firebase-js-sdk | --- | --- | | function(app, ...) | | [getFirestore(app)](./firestore_lite.md#getfirestore_cf608e1) | Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | -| [getFirestore(app, databaseId)](./firestore_lite.md#getfirestore_48de6cb) | (BETA) Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | +| [getFirestore(app, databaseId)](./firestore_lite.md#getfirestore_48de6cb) | (Public Preview) Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | | [initializeFirestore(app, settings)](./firestore_lite.md#initializefirestore_87c6318) | Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore). If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore). | -| [initializeFirestore(app, settings, databaseId)](./firestore_lite.md#initializefirestore_37baaaf) | (BETA) Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore). If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore). | +| [initializeFirestore(app, settings, databaseId)](./firestore_lite.md#initializefirestore_37baaaf) | (Public Preview) Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore). If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore). | | function(firestore, ...) | | [collection(firestore, path, pathSegments)](./firestore_lite.md#collection_1eb4c23) | Gets a CollectionReference instance that refers to the collection at the specified absolute path. | | [collectionGroup(firestore, collectionId)](./firestore_lite.md#collectiongroup_1838fc3) | 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. | @@ -35,7 +35,7 @@ https://github.com/firebase/firebase-js-sdk | [getFirestore()](./firestore_lite.md#getfirestore) | Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | | [serverTimestamp()](./firestore_lite.md#servertimestamp) | Returns a sentinel used with [setDoc()](./firestore_lite.md#setdoc_ee215ad) or [updateDoc()](./firestore_lite.md#updatedoc_51a65e3) to include a server-generated timestamp in the written data. | | function(databaseId, ...) | -| [getFirestore(databaseId)](./firestore_lite.md#getfirestore_53dc891) | (BETA) Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | +| [getFirestore(databaseId)](./firestore_lite.md#getfirestore_53dc891) | (Public Preview) Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface). If no instance exists, initializes a new instance with default settings. | | function(elements, ...) | | [arrayRemove(elements)](./firestore_lite.md#arrayremove_7d853aa) | Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc_ee215ad) or 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. | | [arrayUnion(elements)](./firestore_lite.md#arrayunion_7d853aa) | Returns a special value that can be used with [setDoc()](./firestore_lite.md#setdoc_ee215ad) or [updateDoc()](./firestore_lite.md#updatedoc_51a65e3) 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. | diff --git a/repo-scripts/api-documenter/package.json b/repo-scripts/api-documenter/package.json index 66dd35f3c49..585890922a1 100644 --- a/repo-scripts/api-documenter/package.json +++ b/repo-scripts/api-documenter/package.json @@ -1,6 +1,6 @@ { "name": "@firebase/api-documenter", - "version": "0.4.0", + "version": "0.5.0", "description": "Read JSON files from api-extractor, generate documentation pages", "repository": { "directory": "repo-scripts/documenter", diff --git a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts index eb8798d3705..f12b99c09aa 100644 --- a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts +++ b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts @@ -277,7 +277,8 @@ export function createTitleCell( } /** - * This generates a DocTableCell for an ApiItem including the summary section and "(BETA)" annotation. + * This generates a DocTableCell for an ApiItem. This includes the summary section, and release + * annotations for public preview APIs. * * @remarks * We mostly assume that the input is an ApiDocumentedItem, but it's easier to perform this as a runtime @@ -293,7 +294,7 @@ export function createDescriptionCell( if (apiItem.releaseTag === ReleaseTag.Beta) { section.appendNodesInParagraph([ new DocEmphasisSpan({ configuration, bold: true, italic: true }, [ - new DocPlainText({ configuration, text: '(BETA)' }) + new DocPlainText({ configuration, text: '(Public Preview)' }) ]), new DocPlainText({ configuration, text: ' ' }) ]);