From 3176e935245bc4cc016796bcef00f10a7ac831ef Mon Sep 17 00:00:00 2001 From: dwyfrequency Date: Fri, 6 May 2022 15:57:22 -0400 Subject: [PATCH 1/3] Update API Extractor line endings to 'lf' --- common/api-review/analytics.api.md | 410 --------- common/api-review/app-check.api.md | 105 --- common/api-review/app.api.md | 115 --- common/api-review/auth.api.md | 831 ------------------ common/api-review/database.api.md | 246 ------ common/api-review/firestore-lite.api.md | 378 -------- common/api-review/firestore.api.md | 530 ----------- common/api-review/functions.api.md | 52 -- common/api-review/installations.api.md | 42 - common/api-review/messaging-sw.api.md | 69 -- common/api-review/messaging.api.md | 70 -- common/api-review/performance.api.md | 55 -- common/api-review/remote-config.api.md | 80 -- common/api-review/rules-unit-testing.api.md | 101 --- common/api-review/storage.api.md | 347 -------- common/api-review/util.api.md | 453 ---------- config/api-extractor.json | 29 +- .../src/schemas/api-documenter-template.json | 2 +- 18 files changed, 13 insertions(+), 3902 deletions(-) delete mode 100644 common/api-review/analytics.api.md delete mode 100644 common/api-review/app-check.api.md delete mode 100644 common/api-review/app.api.md delete mode 100644 common/api-review/auth.api.md delete mode 100644 common/api-review/database.api.md delete mode 100644 common/api-review/firestore-lite.api.md delete mode 100644 common/api-review/firestore.api.md delete mode 100644 common/api-review/functions.api.md delete mode 100644 common/api-review/installations.api.md delete mode 100644 common/api-review/messaging-sw.api.md delete mode 100644 common/api-review/messaging.api.md delete mode 100644 common/api-review/performance.api.md delete mode 100644 common/api-review/remote-config.api.md delete mode 100644 common/api-review/rules-unit-testing.api.md delete mode 100644 common/api-review/storage.api.md delete mode 100644 common/api-review/util.api.md diff --git a/common/api-review/analytics.api.md b/common/api-review/analytics.api.md deleted file mode 100644 index 091c3ffe7d3..00000000000 --- a/common/api-review/analytics.api.md +++ /dev/null @@ -1,410 +0,0 @@ -## API Report File for "@firebase/analytics" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; - -// @public -export interface Analytics { - app: FirebaseApp; -} - -// @public -export interface AnalyticsCallOptions { - global: boolean; -} - -// @public -export interface AnalyticsSettings { - config?: GtagConfigParams | EventParams; -} - -// @public -export interface ControlParams { - // (undocumented) - event_callback?: () => void; - // (undocumented) - event_timeout?: number; - // (undocumented) - groups?: string | string[]; - // (undocumented) - send_to?: string | string[]; -} - -// @public -export type Currency = string | number; - -// @public -export type CustomEventName = T extends EventNameString ? never : T; - -// @public -export interface CustomParams { - // (undocumented) - [key: string]: unknown; -} - -// @public -export type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results'; - -// @public -export interface EventParams { - // (undocumented) - [key: string]: unknown; - // (undocumented) - affiliation?: string; - // (undocumented) - checkout_option?: string; - // (undocumented) - checkout_step?: number; - // (undocumented) - content_type?: string; - // (undocumented) - coupon?: string; - // (undocumented) - currency?: string; - // (undocumented) - description?: string; - // (undocumented) - event_category?: string; - // (undocumented) - event_label?: string; - // (undocumented) - fatal?: boolean; - firebase_screen?: string; - firebase_screen_class?: string; - // (undocumented) - item_id?: string; - // (undocumented) - item_list_id?: string; - // (undocumented) - item_list_name?: string; - // (undocumented) - items?: Item[]; - // (undocumented) - method?: string; - // (undocumented) - number?: string; - // (undocumented) - page_location?: string; - // (undocumented) - page_path?: string; - // (undocumented) - page_title?: string; - // (undocumented) - payment_type?: string; - // (undocumented) - promotion_id?: string; - // (undocumented) - promotion_name?: string; - // (undocumented) - promotions?: Promotion[]; - // (undocumented) - screen_name?: string; - // (undocumented) - search_term?: string; - // (undocumented) - shipping?: Currency; - // (undocumented) - shipping_tier?: string; - // (undocumented) - tax?: Currency; - // (undocumented) - transaction_id?: string; - // (undocumented) - value?: number; -} - -// @public -export function getAnalytics(app?: FirebaseApp): Analytics; - -// @public -export interface GtagConfigParams { - 'allow_google_signals?': boolean; - // (undocumented) - [key: string]: unknown; - 'allow_ad_personalization_signals'?: boolean; - 'cookie_domain'?: string; - 'cookie_expires'?: number; - 'cookie_flags'?: string; - 'cookie_prefix'?: string; - 'cookie_update'?: boolean; - 'page_location'?: string; - 'page_title'?: string; - 'send_page_view'?: boolean; -} - -// @public -export function initializeAnalytics(app: FirebaseApp, options?: AnalyticsSettings): Analytics; - -// @public -export function isSupported(): Promise; - -// @public -export interface Item { - // (undocumented) - affiliation?: string; - // @deprecated (undocumented) - brand?: string; - // @deprecated (undocumented) - category?: string; - // (undocumented) - coupon?: string; - // (undocumented) - creative_name?: string; - // (undocumented) - creative_slot?: string; - // (undocumented) - discount?: Currency; - // @deprecated (undocumented) - id?: string; - // (undocumented) - index?: number; - // (undocumented) - item_brand?: string; - // (undocumented) - item_category?: string; - // (undocumented) - item_category2?: string; - // (undocumented) - item_category3?: string; - // (undocumented) - item_category4?: string; - // (undocumented) - item_category5?: string; - // (undocumented) - item_id?: string; - // (undocumented) - item_list_id?: string; - // (undocumented) - item_list_name?: string; - // (undocumented) - item_name?: string; - // (undocumented) - item_variant?: string; - // (undocumented) - location_id?: string; - // @deprecated (undocumented) - name?: string; - // (undocumented) - price?: Currency; - // (undocumented) - promotion_id?: string; - // (undocumented) - promotion_name?: string; - // (undocumented) - quantity?: number; -} - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'add_payment_info', eventParams?: { - coupon?: EventParams['coupon']; - currency?: EventParams['currency']; - items?: EventParams['items']; - payment_type?: EventParams['payment_type']; - value?: EventParams['value']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'add_shipping_info', eventParams?: { - coupon?: EventParams['coupon']; - currency?: EventParams['currency']; - items?: EventParams['items']; - shipping_tier?: EventParams['shipping_tier']; - value?: EventParams['value']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: { - currency?: EventParams['currency']; - value?: EventParams['value']; - items?: EventParams['items']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'begin_checkout', eventParams?: { - currency?: EventParams['currency']; - coupon?: EventParams['coupon']; - value?: EventParams['value']; - items?: EventParams['items']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'checkout_progress', eventParams?: { - currency?: EventParams['currency']; - coupon?: EventParams['coupon']; - value?: EventParams['value']; - items?: EventParams['items']; - checkout_step?: EventParams['checkout_step']; - checkout_option?: EventParams['checkout_option']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'exception', eventParams?: { - description?: EventParams['description']; - fatal?: EventParams['fatal']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'generate_lead', eventParams?: { - value?: EventParams['value']; - currency?: EventParams['currency']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'login', eventParams?: { - method?: EventParams['method']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'page_view', eventParams?: { - page_title?: string; - page_location?: string; - page_path?: string; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'purchase' | 'refund', eventParams?: { - value?: EventParams['value']; - currency?: EventParams['currency']; - transaction_id: EventParams['transaction_id']; - tax?: EventParams['tax']; - shipping?: EventParams['shipping']; - items?: EventParams['items']; - coupon?: EventParams['coupon']; - affiliation?: EventParams['affiliation']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'screen_view', eventParams?: { - firebase_screen: EventParams['firebase_screen']; - firebase_screen_class: EventParams['firebase_screen_class']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'search' | 'view_search_results', eventParams?: { - search_term?: EventParams['search_term']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'select_content', eventParams?: { - content_type?: EventParams['content_type']; - item_id?: EventParams['item_id']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'select_item', eventParams?: { - items?: EventParams['items']; - item_list_name?: EventParams['item_list_name']; - item_list_id?: EventParams['item_list_id']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: { - items?: EventParams['items']; - promotion_id?: EventParams['promotion_id']; - promotion_name?: EventParams['promotion_name']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'set_checkout_option', eventParams?: { - checkout_step?: EventParams['checkout_step']; - checkout_option?: EventParams['checkout_option']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'share', eventParams?: { - method?: EventParams['method']; - content_type?: EventParams['content_type']; - item_id?: EventParams['item_id']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'sign_up', eventParams?: { - method?: EventParams['method']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'timing_complete', eventParams?: { - name: string; - value: number; - event_category?: string; - event_label?: string; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'view_cart' | 'view_item', eventParams?: { - currency?: EventParams['currency']; - items?: EventParams['items']; - value?: EventParams['value']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: 'view_item_list', eventParams?: { - items?: EventParams['items']; - item_list_name?: EventParams['item_list_name']; - item_list_id?: EventParams['item_list_id']; - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public -export function logEvent(analyticsInstance: Analytics, eventName: CustomEventName, eventParams?: { - [key: string]: any; -}, options?: AnalyticsCallOptions): void; - -// @public @deprecated -export interface Promotion { - // (undocumented) - creative_name?: string; - // (undocumented) - creative_slot?: string; - // (undocumented) - id?: string; - // (undocumented) - name?: string; -} - -// @public -export function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void; - -// @public -export function setCurrentScreen(analyticsInstance: Analytics, screenName: string, options?: AnalyticsCallOptions): void; - -// @public -export function settings(options: SettingsOptions): void; - -// @public -export interface SettingsOptions { - dataLayerName?: string; - gtagName?: string; -} - -// @public -export function setUserId(analyticsInstance: Analytics, id: string, options?: AnalyticsCallOptions): void; - -// @public -export function setUserProperties(analyticsInstance: Analytics, properties: CustomParams, options?: AnalyticsCallOptions): void; - - -``` diff --git a/common/api-review/app-check.api.md b/common/api-review/app-check.api.md deleted file mode 100644 index 7a67b90bd71..00000000000 --- a/common/api-review/app-check.api.md +++ /dev/null @@ -1,105 +0,0 @@ -## API Report File for "@firebase/app-check" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; -import { PartialObserver } from '@firebase/util'; -import { Unsubscribe } from '@firebase/util'; - -// @public -export interface AppCheck { - app: FirebaseApp; -} - -// @internal (undocumented) -export type _AppCheckComponentName = 'app-check'; - -// @internal (undocumented) -export type _AppCheckInternalComponentName = 'app-check-internal'; - -// @public -export interface AppCheckOptions { - isTokenAutoRefreshEnabled?: boolean; - provider: CustomProvider | ReCaptchaV3Provider | ReCaptchaEnterpriseProvider; -} - -// @public -export interface AppCheckToken { - readonly expireTimeMillis: number; - // (undocumented) - readonly token: string; -} - -// @public -export type AppCheckTokenListener = (token: AppCheckTokenResult) => void; - -// @public -export interface AppCheckTokenResult { - readonly token: string; -} - -// Warning: (ae-forgotten-export) The symbol "AppCheckProvider" needs to be exported by the entry point index.d.ts -// -// @public -export class CustomProvider implements AppCheckProvider { - constructor(_customProviderOptions: CustomProviderOptions); - // Warning: (ae-forgotten-export) The symbol "AppCheckTokenInternal" needs to be exported by the entry point index.d.ts - // - // @internal (undocumented) - getToken(): Promise; - // @internal (undocumented) - initialize(app: FirebaseApp): void; - // @internal (undocumented) - isEqual(otherProvider: unknown): boolean; -} - -// @public -export interface CustomProviderOptions { - getToken: () => Promise; -} - -// @public -export function getToken(appCheckInstance: AppCheck, forceRefresh?: boolean): Promise; - -// @public -export function initializeAppCheck(app: FirebaseApp | undefined, options: AppCheckOptions): AppCheck; - -// @public -export function onTokenChanged(appCheckInstance: AppCheck, observer: PartialObserver): Unsubscribe; - -// @public -export function onTokenChanged(appCheckInstance: AppCheck, onNext: (tokenResult: AppCheckTokenResult) => void, onError?: (error: Error) => void, onCompletion?: () => void): Unsubscribe; - -export { PartialObserver } - -// @public -export class ReCaptchaEnterpriseProvider implements AppCheckProvider { - constructor(_siteKey: string); - // @internal - getToken(): Promise; - // @internal (undocumented) - initialize(app: FirebaseApp): void; - // @internal (undocumented) - isEqual(otherProvider: unknown): boolean; - } - -// @public -export class ReCaptchaV3Provider implements AppCheckProvider { - constructor(_siteKey: string); - // @internal - getToken(): Promise; - // @internal (undocumented) - initialize(app: FirebaseApp): void; - // @internal (undocumented) - isEqual(otherProvider: unknown): boolean; - } - -// @public -export function setTokenAutoRefreshEnabled(appCheckInstance: AppCheck, isTokenAutoRefreshEnabled: boolean): void; - -export { Unsubscribe } - - -``` diff --git a/common/api-review/app.api.md b/common/api-review/app.api.md deleted file mode 100644 index 8d35bc4096f..00000000000 --- a/common/api-review/app.api.md +++ /dev/null @@ -1,115 +0,0 @@ -## API Report File for "@firebase/app" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { Component } from '@firebase/component'; -import { ComponentContainer } from '@firebase/component'; -import { FirebaseError } from '@firebase/util'; -import { LogCallback } from '@firebase/logger'; -import { LogLevelString } from '@firebase/logger'; -import { LogOptions } from '@firebase/logger'; -import { Name } from '@firebase/component'; -import { Provider } from '@firebase/component'; - -// @internal (undocumented) -export function _addComponent(app: FirebaseApp, component: Component): void; - -// @internal (undocumented) -export function _addOrOverwriteComponent(app: FirebaseApp, component: Component): void; - -// @internal (undocumented) -export const _apps: Map; - -// @internal -export function _clearComponents(): void; - -// @internal -export const _components: Map>; - -// @internal -export const _DEFAULT_ENTRY_NAME = "[DEFAULT]"; - -// @public -export function deleteApp(app: FirebaseApp): Promise; - -// @public -export interface FirebaseApp { - automaticDataCollectionEnabled: boolean; - readonly name: string; - readonly options: FirebaseOptions; -} - -// @internal (undocumented) -export interface _FirebaseAppInternal extends FirebaseApp { - // (undocumented) - checkDestroyed(): void; - // (undocumented) - container: ComponentContainer; - // (undocumented) - isDeleted: boolean; -} - -// @public -export interface FirebaseAppSettings { - automaticDataCollectionEnabled?: boolean; - name?: string; -} - -export { FirebaseError } - -// @public -export interface FirebaseOptions { - apiKey?: string; - appId?: string; - authDomain?: string; - databaseURL?: string; - measurementId?: string; - messagingSenderId?: string; - projectId?: string; - storageBucket?: string; -} - -// @internal (undocumented) -export interface _FirebaseService { - // (undocumented) - app: FirebaseApp; - _delete(): Promise; -} - -// @public -export function getApp(name?: string): FirebaseApp; - -// @public -export function getApps(): FirebaseApp[]; - -// @internal (undocumented) -export function _getProvider(app: FirebaseApp, name: T): Provider; - -// @public -export function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp; - -// @public -export function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp; - -// @public -export function onLog(logCallback: LogCallback | null, options?: LogOptions): void; - -// @internal (undocumented) -export function _registerComponent(component: Component): boolean; - -// @public -export function registerVersion(libraryKeyOrName: string, version: string, variant?: string): void; - -// @internal (undocumented) -export function _removeServiceInstance(app: FirebaseApp, name: T, instanceIdentifier?: string): void; - -// @public -export const SDK_VERSION: string; - -// @public -export function setLogLevel(logLevel: LogLevelString): void; - - -``` diff --git a/common/api-review/auth.api.md b/common/api-review/auth.api.md deleted file mode 100644 index 71abf31003e..00000000000 --- a/common/api-review/auth.api.md +++ /dev/null @@ -1,831 +0,0 @@ -## API Report File for "@firebase/auth" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { CompleteFn } from '@firebase/util'; -import { ErrorFactory } from '@firebase/util'; -import { ErrorFn } from '@firebase/util'; -import { FirebaseApp } from '@firebase/app'; -import { FirebaseError } from '@firebase/util'; -import { NextFn } from '@firebase/util'; -import { Observer } from '@firebase/util'; -import { Unsubscribe } from '@firebase/util'; - -// @public -export interface ActionCodeInfo { - data: { - email?: string | null; - multiFactorInfo?: MultiFactorInfo | null; - previousEmail?: string | null; - }; - operation: typeof ActionCodeOperation[keyof typeof ActionCodeOperation]; -} - -// @public -export const ActionCodeOperation: { - readonly EMAIL_SIGNIN: "EMAIL_SIGNIN"; - readonly PASSWORD_RESET: "PASSWORD_RESET"; - readonly RECOVER_EMAIL: "RECOVER_EMAIL"; - readonly REVERT_SECOND_FACTOR_ADDITION: "REVERT_SECOND_FACTOR_ADDITION"; - readonly VERIFY_AND_CHANGE_EMAIL: "VERIFY_AND_CHANGE_EMAIL"; - readonly VERIFY_EMAIL: "VERIFY_EMAIL"; -}; - -// @public -export interface ActionCodeSettings { - android?: { - installApp?: boolean; - minimumVersion?: string; - packageName: string; - }; - dynamicLinkDomain?: string; - handleCodeInApp?: boolean; - iOS?: { - bundleId: string; - }; - url: string; -} - -// @public -export class ActionCodeURL { - // @internal - constructor(actionLink: string); - readonly apiKey: string; - readonly code: string; - readonly continueUrl: string | null; - readonly languageCode: string | null; - readonly operation: string; - static parseLink(link: string): ActionCodeURL | null; - readonly tenantId: string | null; -} - -// @public -export interface AdditionalUserInfo { - readonly isNewUser: boolean; - readonly profile: Record | null; - readonly providerId: string | null; - readonly username?: string | null; -} - -// @public -export interface ApplicationVerifier { - readonly type: string; - verify(): Promise; -} - -// @public -export function applyActionCode(auth: Auth, oobCode: string): Promise; - -// @public -export interface Auth { - readonly app: FirebaseApp; - beforeAuthStateChanged(callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; - readonly config: Config; - readonly currentUser: User | null; - readonly emulatorConfig: EmulatorConfig | null; - languageCode: string | null; - readonly name: string; - onAuthStateChanged(nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; - onIdTokenChanged(nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; - setPersistence(persistence: Persistence): Promise; - readonly settings: AuthSettings; - signOut(): Promise; - tenantId: string | null; - updateCurrentUser(user: User | null): Promise; - useDeviceLanguage(): void; -} - -// @public -export class AuthCredential { - // @internal - protected constructor( - providerId: string, - signInMethod: string); - // Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts - // - // @internal (undocumented) - _getIdTokenResponse(_auth: AuthInternal): Promise; - // @internal (undocumented) - _getReauthenticationResolver(_auth: AuthInternal): Promise; - // Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts - // - // @internal (undocumented) - _linkToIdToken(_auth: AuthInternal, _idToken: string): Promise; - readonly providerId: string; - readonly signInMethod: string; - toJSON(): object; -} - -// @public -export interface AuthError extends FirebaseError { - readonly customData: { - readonly appName: string; - readonly email?: string; - readonly phoneNumber?: string; - readonly tenantId?: string; - }; -} - -// @public -export const AuthErrorCodes: { - readonly ADMIN_ONLY_OPERATION: "auth/admin-restricted-operation"; - readonly ARGUMENT_ERROR: "auth/argument-error"; - readonly APP_NOT_AUTHORIZED: "auth/app-not-authorized"; - readonly APP_NOT_INSTALLED: "auth/app-not-installed"; - readonly CAPTCHA_CHECK_FAILED: "auth/captcha-check-failed"; - readonly CODE_EXPIRED: "auth/code-expired"; - readonly CORDOVA_NOT_READY: "auth/cordova-not-ready"; - readonly CORS_UNSUPPORTED: "auth/cors-unsupported"; - readonly CREDENTIAL_ALREADY_IN_USE: "auth/credential-already-in-use"; - readonly CREDENTIAL_MISMATCH: "auth/custom-token-mismatch"; - readonly CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "auth/requires-recent-login"; - readonly DEPENDENT_SDK_INIT_BEFORE_AUTH: "auth/dependent-sdk-initialized-before-auth"; - readonly DYNAMIC_LINK_NOT_ACTIVATED: "auth/dynamic-link-not-activated"; - readonly EMAIL_CHANGE_NEEDS_VERIFICATION: "auth/email-change-needs-verification"; - readonly EMAIL_EXISTS: "auth/email-already-in-use"; - readonly EMULATOR_CONFIG_FAILED: "auth/emulator-config-failed"; - readonly EXPIRED_OOB_CODE: "auth/expired-action-code"; - readonly EXPIRED_POPUP_REQUEST: "auth/cancelled-popup-request"; - readonly INTERNAL_ERROR: "auth/internal-error"; - readonly INVALID_API_KEY: "auth/invalid-api-key"; - readonly INVALID_APP_CREDENTIAL: "auth/invalid-app-credential"; - readonly INVALID_APP_ID: "auth/invalid-app-id"; - readonly INVALID_AUTH: "auth/invalid-user-token"; - readonly INVALID_AUTH_EVENT: "auth/invalid-auth-event"; - readonly INVALID_CERT_HASH: "auth/invalid-cert-hash"; - readonly INVALID_CODE: "auth/invalid-verification-code"; - readonly INVALID_CONTINUE_URI: "auth/invalid-continue-uri"; - readonly INVALID_CORDOVA_CONFIGURATION: "auth/invalid-cordova-configuration"; - readonly INVALID_CUSTOM_TOKEN: "auth/invalid-custom-token"; - readonly INVALID_DYNAMIC_LINK_DOMAIN: "auth/invalid-dynamic-link-domain"; - readonly INVALID_EMAIL: "auth/invalid-email"; - readonly INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme"; - readonly INVALID_IDP_RESPONSE: "auth/invalid-credential"; - readonly INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload"; - readonly INVALID_MFA_SESSION: "auth/invalid-multi-factor-session"; - readonly INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id"; - readonly INVALID_OAUTH_PROVIDER: "auth/invalid-oauth-provider"; - readonly INVALID_OOB_CODE: "auth/invalid-action-code"; - readonly INVALID_ORIGIN: "auth/unauthorized-domain"; - readonly INVALID_PASSWORD: "auth/wrong-password"; - readonly INVALID_PERSISTENCE: "auth/invalid-persistence-type"; - readonly INVALID_PHONE_NUMBER: "auth/invalid-phone-number"; - readonly INVALID_PROVIDER_ID: "auth/invalid-provider-id"; - readonly INVALID_RECIPIENT_EMAIL: "auth/invalid-recipient-email"; - readonly INVALID_SENDER: "auth/invalid-sender"; - readonly INVALID_SESSION_INFO: "auth/invalid-verification-id"; - readonly INVALID_TENANT_ID: "auth/invalid-tenant-id"; - readonly MFA_INFO_NOT_FOUND: "auth/multi-factor-info-not-found"; - readonly MFA_REQUIRED: "auth/multi-factor-auth-required"; - readonly MISSING_ANDROID_PACKAGE_NAME: "auth/missing-android-pkg-name"; - readonly MISSING_APP_CREDENTIAL: "auth/missing-app-credential"; - readonly MISSING_AUTH_DOMAIN: "auth/auth-domain-config-required"; - readonly MISSING_CODE: "auth/missing-verification-code"; - readonly MISSING_CONTINUE_URI: "auth/missing-continue-uri"; - readonly MISSING_IFRAME_START: "auth/missing-iframe-start"; - readonly MISSING_IOS_BUNDLE_ID: "auth/missing-ios-bundle-id"; - readonly MISSING_OR_INVALID_NONCE: "auth/missing-or-invalid-nonce"; - readonly MISSING_MFA_INFO: "auth/missing-multi-factor-info"; - readonly MISSING_MFA_SESSION: "auth/missing-multi-factor-session"; - readonly MISSING_PHONE_NUMBER: "auth/missing-phone-number"; - readonly MISSING_SESSION_INFO: "auth/missing-verification-id"; - readonly MODULE_DESTROYED: "auth/app-deleted"; - readonly NEED_CONFIRMATION: "auth/account-exists-with-different-credential"; - readonly NETWORK_REQUEST_FAILED: "auth/network-request-failed"; - readonly NULL_USER: "auth/null-user"; - readonly NO_AUTH_EVENT: "auth/no-auth-event"; - readonly NO_SUCH_PROVIDER: "auth/no-such-provider"; - readonly OPERATION_NOT_ALLOWED: "auth/operation-not-allowed"; - readonly OPERATION_NOT_SUPPORTED: "auth/operation-not-supported-in-this-environment"; - readonly POPUP_BLOCKED: "auth/popup-blocked"; - readonly POPUP_CLOSED_BY_USER: "auth/popup-closed-by-user"; - readonly PROVIDER_ALREADY_LINKED: "auth/provider-already-linked"; - readonly QUOTA_EXCEEDED: "auth/quota-exceeded"; - readonly REDIRECT_CANCELLED_BY_USER: "auth/redirect-cancelled-by-user"; - readonly REDIRECT_OPERATION_PENDING: "auth/redirect-operation-pending"; - readonly REJECTED_CREDENTIAL: "auth/rejected-credential"; - readonly SECOND_FACTOR_ALREADY_ENROLLED: "auth/second-factor-already-in-use"; - readonly SECOND_FACTOR_LIMIT_EXCEEDED: "auth/maximum-second-factor-count-exceeded"; - readonly TENANT_ID_MISMATCH: "auth/tenant-id-mismatch"; - readonly TIMEOUT: "auth/timeout"; - readonly TOKEN_EXPIRED: "auth/user-token-expired"; - readonly TOO_MANY_ATTEMPTS_TRY_LATER: "auth/too-many-requests"; - readonly UNAUTHORIZED_DOMAIN: "auth/unauthorized-continue-uri"; - readonly UNSUPPORTED_FIRST_FACTOR: "auth/unsupported-first-factor"; - readonly UNSUPPORTED_PERSISTENCE: "auth/unsupported-persistence-type"; - readonly UNSUPPORTED_TENANT_OPERATION: "auth/unsupported-tenant-operation"; - readonly UNVERIFIED_EMAIL: "auth/unverified-email"; - readonly USER_CANCELLED: "auth/user-cancelled"; - readonly USER_DELETED: "auth/user-not-found"; - readonly USER_DISABLED: "auth/user-disabled"; - readonly USER_MISMATCH: "auth/user-mismatch"; - readonly USER_SIGNED_OUT: "auth/user-signed-out"; - readonly WEAK_PASSWORD: "auth/weak-password"; - readonly WEB_STORAGE_UNSUPPORTED: "auth/web-storage-unsupported"; - readonly ALREADY_INITIALIZED: "auth/already-initialized"; -}; - -// @public -export interface AuthErrorMap { -} - -// @public -export interface AuthProvider { - readonly providerId: string; -} - -// @public -export interface AuthSettings { - appVerificationDisabledForTesting: boolean; -} - -// @public -export function beforeAuthStateChanged(auth: Auth, callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; - -// @public -export const browserLocalPersistence: Persistence; - -// @public -export const browserPopupRedirectResolver: PopupRedirectResolver; - -// @public -export const browserSessionPersistence: Persistence; - -// @public -export function checkActionCode(auth: Auth, oobCode: string): Promise; - -export { CompleteFn } - -// @public -export interface Config { - apiHost: string; - apiKey: string; - apiScheme: string; - authDomain?: string; - sdkClientVersion: string; - tokenApiHost: string; -} - -// @public -export interface ConfirmationResult { - confirm(verificationCode: string): Promise; - readonly verificationId: string; -} - -// @public -export function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise; - -// @public -export function connectAuthEmulator(auth: Auth, url: string, options?: { - disableWarnings: boolean; -}): void; - -// @public -export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; - -// @public -export type CustomParameters = Record; - -// @public -export const debugErrorMap: AuthErrorMap; - -// @public -export function deleteUser(user: User): Promise; - -// @public -export interface Dependencies { - errorMap?: AuthErrorMap; - persistence?: Persistence | Persistence[]; - popupRedirectResolver?: PopupRedirectResolver; -} - -// @public -export class EmailAuthCredential extends AuthCredential { - // @internal (undocumented) - readonly _email: string; - // @internal (undocumented) - static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential; - // @internal (undocumented) - static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential; - static fromJSON(json: object | string): EmailAuthCredential | null; - // @internal (undocumented) - _getIdTokenResponse(auth: AuthInternal): Promise; - // @internal (undocumented) - _getReauthenticationResolver(auth: AuthInternal): Promise; - // @internal (undocumented) - _linkToIdToken(auth: AuthInternal, idToken: string): Promise; - // @internal (undocumented) - readonly _password: string; - // @internal (undocumented) - readonly _tenantId: string | null; - toJSON(): object; -} - -// @public -export class EmailAuthProvider implements AuthProvider { - static credential(email: string, password: string): EmailAuthCredential; - static credentialWithLink(email: string, emailLink: string): EmailAuthCredential; - static readonly EMAIL_LINK_SIGN_IN_METHOD: 'emailLink'; - static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: 'password'; - static readonly PROVIDER_ID: 'password'; - readonly providerId: "password"; -} - -// @public -export interface EmulatorConfig { - readonly host: string; - readonly options: { - readonly disableWarnings: boolean; - }; - readonly port: number | null; - readonly protocol: string; -} - -export { ErrorFn } - -// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.d.ts -// -// @public -export class FacebookAuthProvider extends BaseOAuthProvider { - constructor(); - static credential(accessToken: string): OAuthCredential; - static credentialFromError(error: FirebaseError): OAuthCredential | null; - static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; - static readonly FACEBOOK_SIGN_IN_METHOD: 'facebook.com'; - static readonly PROVIDER_ID: 'facebook.com'; -} - -// @public -export const FactorId: { - readonly PHONE: "phone"; -}; - -// @public -export function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise; - -// @public -export function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null; - -// @public -export function getAuth(app?: FirebaseApp): Auth; - -// @public -export function getIdToken(user: User, forceRefresh?: boolean): Promise; - -// @public -export function getIdTokenResult(user: User, forceRefresh?: boolean): Promise; - -// @public -export function getMultiFactorResolver(auth: Auth, error: MultiFactorError): MultiFactorResolver; - -// @public -export function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver): Promise; - -// @public -export class GithubAuthProvider extends BaseOAuthProvider { - constructor(); - static credential(accessToken: string): OAuthCredential; - static credentialFromError(error: FirebaseError): OAuthCredential | null; - static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; - static readonly GITHUB_SIGN_IN_METHOD: 'github.com'; - static readonly PROVIDER_ID: 'github.com'; -} - -// @public -export class GoogleAuthProvider extends BaseOAuthProvider { - constructor(); - static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential; - static credentialFromError(error: FirebaseError): OAuthCredential | null; - static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; - static readonly GOOGLE_SIGN_IN_METHOD: 'google.com'; - static readonly PROVIDER_ID: 'google.com'; -} - -// @public -export interface IdTokenResult { - authTime: string; - claims: ParsedToken; - expirationTime: string; - issuedAtTime: string; - signInProvider: string | null; - signInSecondFactor: string | null; - token: string; -} - -// @public -export const indexedDBLocalPersistence: Persistence; - -// @public -export function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth; - -// @public -export const inMemoryPersistence: Persistence; - -// @public -export function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean; - -// @public -export function linkWithCredential(user: User, credential: AuthCredential): Promise; - -// @public -export function linkWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise; - -// @public -export function linkWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; - -// @public -export function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; - -// @public -export function multiFactor(user: User): MultiFactorUser; - -// @public -export interface MultiFactorAssertion { - readonly factorId: typeof FactorId[keyof typeof FactorId]; -} - -// @public -export interface MultiFactorError extends AuthError { - readonly customData: AuthError['customData'] & { - readonly operationType: typeof OperationType[keyof typeof OperationType]; - }; -} - -// @public -export interface MultiFactorInfo { - readonly displayName?: string | null; - readonly enrollmentTime: string; - readonly factorId: typeof FactorId[keyof typeof FactorId]; - readonly uid: string; -} - -// @public -export interface MultiFactorResolver { - readonly hints: MultiFactorInfo[]; - resolveSignIn(assertion: MultiFactorAssertion): Promise; - readonly session: MultiFactorSession; -} - -// @public -export interface MultiFactorSession { -} - -// @public -export interface MultiFactorUser { - enroll(assertion: MultiFactorAssertion, displayName?: string | null): Promise; - readonly enrolledFactors: MultiFactorInfo[]; - getSession(): Promise; - unenroll(option: MultiFactorInfo | string): Promise; -} - -export { NextFn } - -// @public -export type NextOrObserver = NextFn | Observer; - -// @public -export class OAuthCredential extends AuthCredential { - accessToken?: string; - static fromJSON(json: string | object): OAuthCredential | null; - // Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts - // - // @internal (undocumented) - static _fromParams(params: OAuthCredentialParams): OAuthCredential; - // @internal (undocumented) - _getIdTokenResponse(auth: AuthInternal): Promise; - // @internal (undocumented) - _getReauthenticationResolver(auth: AuthInternal): Promise; - idToken?: string; - // @internal (undocumented) - _linkToIdToken(auth: AuthInternal, idToken: string): Promise; - secret?: string; - toJSON(): object; -} - -// @public -export interface OAuthCredentialOptions { - accessToken?: string; - idToken?: string; - rawNonce?: string; -} - -// @public -export class OAuthProvider extends BaseOAuthProvider { - credential(params: OAuthCredentialOptions): OAuthCredential; - static credentialFromError(error: FirebaseError): OAuthCredential | null; - static credentialFromJSON(json: object | string): OAuthCredential; - static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; - } - -// @public -export function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; - -// @public -export function onIdTokenChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; - -// @public -export const OperationType: { - readonly LINK: "link"; - readonly REAUTHENTICATE: "reauthenticate"; - readonly SIGN_IN: "signIn"; -}; - -// @public -export function parseActionCodeURL(link: string): ActionCodeURL | null; - -// @public -export interface ParsedToken { - [key: string]: string | object | undefined; - 'auth_time'?: string; - 'exp'?: string; - 'firebase'?: { - 'sign_in_provider'?: string; - 'sign_in_second_factor'?: string; - }; - 'iat'?: string; - 'sub'?: string; -} - -// @public -export interface Persistence { - readonly type: 'SESSION' | 'LOCAL' | 'NONE'; -} - -// @public -export class PhoneAuthCredential extends AuthCredential { - static fromJSON(json: object | string): PhoneAuthCredential | null; - // @internal (undocumented) - static _fromTokenResponse(phoneNumber: string, temporaryProof: string): PhoneAuthCredential; - // @internal (undocumented) - static _fromVerification(verificationId: string, verificationCode: string): PhoneAuthCredential; - // @internal (undocumented) - _getIdTokenResponse(auth: AuthInternal): Promise; - // @internal (undocumented) - _getReauthenticationResolver(auth: AuthInternal): Promise; - // @internal (undocumented) - _linkToIdToken(auth: AuthInternal, idToken: string): Promise; - // Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.d.ts - // - // @internal (undocumented) - _makeVerificationRequest(): SignInWithPhoneNumberRequest; - toJSON(): object; -} - -// @public -export class PhoneAuthProvider { - constructor(auth: Auth); - static credential(verificationId: string, verificationCode: string): PhoneAuthCredential; - static credentialFromError(error: FirebaseError): AuthCredential | null; - static credentialFromResult(userCredential: UserCredential): AuthCredential | null; - static readonly PHONE_SIGN_IN_METHOD: 'phone'; - static readonly PROVIDER_ID: 'phone'; - readonly providerId: "phone"; - verifyPhoneNumber(phoneOptions: PhoneInfoOptions | string, applicationVerifier: ApplicationVerifier): Promise; -} - -// @public -export type PhoneInfoOptions = PhoneSingleFactorInfoOptions | PhoneMultiFactorEnrollInfoOptions | PhoneMultiFactorSignInInfoOptions; - -// @public -export interface PhoneMultiFactorAssertion extends MultiFactorAssertion { -} - -// @public -export interface PhoneMultiFactorEnrollInfoOptions { - phoneNumber: string; - session: MultiFactorSession; -} - -// @public -export class PhoneMultiFactorGenerator { - static assertion(credential: PhoneAuthCredential): PhoneMultiFactorAssertion; - static FACTOR_ID: string; -} - -// @public -export interface PhoneMultiFactorInfo extends MultiFactorInfo { - readonly phoneNumber: string; -} - -// @public -export interface PhoneMultiFactorSignInInfoOptions { - multiFactorHint?: MultiFactorInfo; - multiFactorUid?: string; - session: MultiFactorSession; -} - -// @public -export interface PhoneSingleFactorInfoOptions { - phoneNumber: string; -} - -// @public -export interface PopupRedirectResolver { -} - -// @public -export const prodErrorMap: AuthErrorMap; - -// @public -export const ProviderId: { - readonly FACEBOOK: "facebook.com"; - readonly GITHUB: "github.com"; - readonly GOOGLE: "google.com"; - readonly PASSWORD: "password"; - readonly PHONE: "phone"; - readonly TWITTER: "twitter.com"; -}; - -// @public -export interface ReactNativeAsyncStorage { - getItem(key: string): Promise; - removeItem(key: string): Promise; - setItem(key: string, value: string): Promise; -} - -// @public -export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise; - -// @public -export function reauthenticateWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise; - -// @public -export function reauthenticateWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; - -// @public -export function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; - -// @public -export interface RecaptchaParameters { - // (undocumented) - [key: string]: any; -} - -// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.d.ts -// -// @public -export class RecaptchaVerifier implements ApplicationVerifierInternal { - constructor(containerOrId: HTMLElement | string, parameters: RecaptchaParameters, authExtern: Auth); - clear(): void; - // Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.d.ts - // - // @internal (undocumented) - readonly _recaptchaLoader: ReCaptchaLoader; - render(): Promise; - // @internal (undocumented) - _reset(): void; - readonly type = "recaptcha"; - verify(): Promise; - } - -// @public -export function reload(user: User): Promise; - -// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.d.ts -// -// @public -export class SAMLAuthProvider extends FederatedAuthProvider { - constructor(providerId: string); - static credentialFromError(error: FirebaseError): AuthCredential | null; - static credentialFromJSON(json: string | object): AuthCredential; - static credentialFromResult(userCredential: UserCredential): AuthCredential | null; - } - -// @public -export function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise; - -// @public -export function sendPasswordResetEmail(auth: Auth, email: string, actionCodeSettings?: ActionCodeSettings): Promise; - -// @public -export function sendSignInLinkToEmail(auth: Auth, email: string, actionCodeSettings: ActionCodeSettings): Promise; - -// @public -export function setPersistence(auth: Auth, persistence: Persistence): Promise; - -// @public -export function signInAnonymously(auth: Auth): Promise; - -// @public -export const SignInMethod: { - readonly EMAIL_LINK: "emailLink"; - readonly EMAIL_PASSWORD: "password"; - readonly FACEBOOK: "facebook.com"; - readonly GITHUB: "github.com"; - readonly GOOGLE: "google.com"; - readonly PHONE: "phone"; - readonly TWITTER: "twitter.com"; -}; - -// @public -export function signInWithCredential(auth: Auth, credential: AuthCredential): Promise; - -// @public -export function signInWithCustomToken(auth: Auth, customToken: string): Promise; - -// @public -export function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; - -// @public -export function signInWithEmailLink(auth: Auth, email: string, emailLink?: string): Promise; - -// @public -export function signInWithPhoneNumber(auth: Auth, phoneNumber: string, appVerifier: ApplicationVerifier): Promise; - -// @public -export function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; - -// @public -export function signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; - -// @public -export function signOut(auth: Auth): Promise; - -// @public -export class TwitterAuthProvider extends BaseOAuthProvider { - constructor(); - static credential(token: string, secret: string): OAuthCredential; - static credentialFromError(error: FirebaseError): OAuthCredential | null; - static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; - static readonly PROVIDER_ID: 'twitter.com'; - static readonly TWITTER_SIGN_IN_METHOD: 'twitter.com'; -} - -// @public -export function unlink(user: User, providerId: string): Promise; - -export { Unsubscribe } - -// @public -export function updateCurrentUser(auth: Auth, user: User | null): Promise; - -// @public -export function updateEmail(user: User, newEmail: string): Promise; - -// @public -export function updatePassword(user: User, newPassword: string): Promise; - -// @public -export function updatePhoneNumber(user: User, credential: PhoneAuthCredential): Promise; - -// @public -export function updateProfile(user: User, { displayName, photoURL: photoUrl }: { - displayName?: string | null; - photoURL?: string | null; -}): Promise; - -// @public -export function useDeviceLanguage(auth: Auth): void; - -// @public -export interface User extends UserInfo { - delete(): Promise; - readonly emailVerified: boolean; - getIdToken(forceRefresh?: boolean): Promise; - getIdTokenResult(forceRefresh?: boolean): Promise; - readonly isAnonymous: boolean; - readonly metadata: UserMetadata; - readonly providerData: UserInfo[]; - readonly refreshToken: string; - reload(): Promise; - readonly tenantId: string | null; - toJSON(): object; -} - -// @public -export interface UserCredential { - operationType: typeof OperationType[keyof typeof OperationType]; - providerId: string | null; - user: User; -} - -// @public -export interface UserInfo { - readonly displayName: string | null; - readonly email: string | null; - readonly phoneNumber: string | null; - readonly photoURL: string | null; - readonly providerId: string; - readonly uid: string; -} - -// @public -export interface UserMetadata { - readonly creationTime?: string; - readonly lastSignInTime?: string; -} - -// @public -export type UserProfile = Record; - -// @public -export function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise; - -// @public -export function verifyPasswordResetCode(auth: Auth, code: string): Promise; - - -``` diff --git a/common/api-review/database.api.md b/common/api-review/database.api.md deleted file mode 100644 index dcf73c73714..00000000000 --- a/common/api-review/database.api.md +++ /dev/null @@ -1,246 +0,0 @@ -## API Report File for "@firebase/database" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { EmulatorMockTokenOptions } from '@firebase/util'; -import { FirebaseApp } from '@firebase/app'; - -// @public -export function child(parent: DatabaseReference, path: string): DatabaseReference; - -// @public -export function connectDatabaseEmulator(db: Database, host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; -}): void; - -// @public -export class Database { - readonly app: FirebaseApp; - readonly 'type' = "database"; -} - -// @public -export interface DatabaseReference extends Query { - readonly key: string | null; - readonly parent: DatabaseReference | null; - readonly root: DatabaseReference; -} - -// @public -export class DataSnapshot { - child(path: string): DataSnapshot; - exists(): boolean; - exportVal(): any; - forEach(action: (child: DataSnapshot) => boolean | void): boolean; - hasChild(path: string): boolean; - hasChildren(): boolean; - get key(): string | null; - get priority(): string | number | null; - readonly ref: DatabaseReference; - get size(): number; - toJSON(): object | null; - val(): any; -} - -export { EmulatorMockTokenOptions } - -// @public -export function enableLogging(enabled: boolean, persistent?: boolean): any; - -// @public -export function enableLogging(logger: (message: string) => unknown): any; - -// @public -export function endAt(value: number | string | boolean | null, key?: string): QueryConstraint; - -// @public -export function endBefore(value: number | string | boolean | null, key?: string): QueryConstraint; - -// @public -export function equalTo(value: number | string | boolean | null, key?: string): QueryConstraint; - -// @public -export type EventType = 'value' | 'child_added' | 'child_changed' | 'child_moved' | 'child_removed'; - -// @public -export function forceLongPolling(): void; - -// @public -export function forceWebSockets(): void; - -// @public -export function get(query: Query): Promise; - -// @public -export function getDatabase(app?: FirebaseApp, url?: string): Database; - -// @public -export function goOffline(db: Database): void; - -// @public -export function goOnline(db: Database): void; - -// @public -export function increment(delta: number): object; - -// @public -export function limitToFirst(limit: number): QueryConstraint; - -// @public -export function limitToLast(limit: number): QueryConstraint; - -// @public -export interface ListenOptions { - readonly onlyOnce?: boolean; -} - -// @public -export function off(query: Query, eventType?: EventType, callback?: (snapshot: DataSnapshot, previousChildName?: string | null) => unknown): void; - -// @public -export function onChildAdded(query: Query, callback: (snapshot: DataSnapshot, previousChildName?: string | null) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; - -// @public -export function onChildAdded(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildAdded(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildChanged(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; - -// @public -export function onChildChanged(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildChanged(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildMoved(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; - -// @public -export function onChildMoved(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildMoved(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; - -// @public -export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export class OnDisconnect { - cancel(): Promise; - remove(): Promise; - set(value: unknown): Promise; - setWithPriority(value: unknown, priority: number | string | null): Promise; - update(values: object): Promise; -} - -// @public -export function onDisconnect(ref: DatabaseReference): OnDisconnect; - -// @public -export function onValue(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; - -// @public -export function onValue(query: Query, callback: (snapshot: DataSnapshot) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function onValue(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; - -// @public -export function orderByChild(path: string): QueryConstraint; - -// @public -export function orderByKey(): QueryConstraint; - -// @public -export function orderByPriority(): QueryConstraint; - -// @public -export function orderByValue(): QueryConstraint; - -// @public -export function push(parent: DatabaseReference, value?: unknown): ThenableReference; - -// @public -export interface Query { - isEqual(other: Query | null): boolean; - readonly ref: DatabaseReference; - toJSON(): string; - toString(): string; -} - -// @public -export function query(query: Query, ...queryConstraints: QueryConstraint[]): Query; - -// @public -export abstract class QueryConstraint { - abstract readonly type: QueryConstraintType; -} - -// @public -export type QueryConstraintType = 'endAt' | 'endBefore' | 'startAt' | 'startAfter' | 'limitToFirst' | 'limitToLast' | 'orderByChild' | 'orderByKey' | 'orderByPriority' | 'orderByValue' | 'equalTo'; - -// @public -export function ref(db: Database, path?: string): DatabaseReference; - -// @public -export function refFromURL(db: Database, url: string): DatabaseReference; - -// @public -export function remove(ref: DatabaseReference): Promise; - -// @public -export function runTransaction(ref: DatabaseReference, transactionUpdate: (currentData: any) => unknown, options?: TransactionOptions): Promise; - -// @public -export function serverTimestamp(): object; - -// @public -export function set(ref: DatabaseReference, value: unknown): Promise; - -// @public -export function setPriority(ref: DatabaseReference, priority: string | number | null): Promise; - -// @public -export function setWithPriority(ref: DatabaseReference, value: unknown, priority: string | number | null): Promise; - -// @public -export function startAfter(value: number | string | boolean | null, key?: string): QueryConstraint; - -// @public -export function startAt(value?: number | string | boolean | null, key?: string): QueryConstraint; - -// @public -export interface ThenableReference extends DatabaseReference, Pick, 'then' | 'catch'> { -} - -// @public -export interface TransactionOptions { - readonly applyLocally?: boolean; -} - -// @public -export class TransactionResult { - readonly committed: boolean; - readonly snapshot: DataSnapshot; - toJSON(): object; -} - -// @public -export type Unsubscribe = () => void; - -// @public -export function update(ref: DatabaseReference, values: object): Promise; - - -``` diff --git a/common/api-review/firestore-lite.api.md b/common/api-review/firestore-lite.api.md deleted file mode 100644 index 477962a737f..00000000000 --- a/common/api-review/firestore-lite.api.md +++ /dev/null @@ -1,378 +0,0 @@ -## API Report File for "@firebase/firestore-lite" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { EmulatorMockTokenOptions } from '@firebase/util'; -import { FirebaseApp } from '@firebase/app'; -import { FirebaseError } from '@firebase/util'; -import { LogLevelString as LogLevel } from '@firebase/logger'; - -// @public -export function addDoc(reference: CollectionReference, data: WithFieldValue): Promise>; - -// @public -export type AddPrefixToKeys> = { - [K in keyof T & string as `${Prefix}.${K}`]+?: T[K]; -}; - -// @public -export function arrayRemove(...elements: unknown[]): FieldValue; - -// @public -export function arrayUnion(...elements: unknown[]): FieldValue; - -// @public -export class Bytes { - static fromBase64String(base64: string): Bytes; - static fromUint8Array(array: Uint8Array): Bytes; - isEqual(other: Bytes): boolean; - toBase64(): string; - toString(): string; - toUint8Array(): Uint8Array; -} - -// @public -export type ChildUpdateFields = V extends Record ? AddPrefixToKeys> : never; - -// @public -export function collection(firestore: Firestore, path: string, ...pathSegments: string[]): CollectionReference; - -// @public -export function collection(reference: CollectionReference, path: string, ...pathSegments: string[]): CollectionReference; - -// @public -export function collection(reference: DocumentReference, path: string, ...pathSegments: string[]): CollectionReference; - -// @public -export function collectionGroup(firestore: Firestore, collectionId: string): Query; - -// @public -export class CollectionReference extends Query { - get id(): string; - get parent(): DocumentReference | null; - get path(): string; - readonly type = "collection"; - withConverter(converter: FirestoreDataConverter): CollectionReference; - withConverter(converter: null): CollectionReference; -} - -// @public -export function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; -}): void; - -// @public -export function deleteDoc(reference: DocumentReference): Promise; - -// @public -export function deleteField(): FieldValue; - -// @public -export function doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference; - -// @public -export function doc(reference: CollectionReference, path?: string, ...pathSegments: string[]): DocumentReference; - -// @public -export function doc(reference: DocumentReference, path: string, ...pathSegments: string[]): DocumentReference; - -// @public -export interface DocumentData { - [field: string]: any; -} - -// @public -export function documentId(): FieldPath; - -// @public -export class DocumentReference { - readonly converter: FirestoreDataConverter | null; - readonly firestore: Firestore; - get id(): string; - get parent(): CollectionReference; - get path(): string; - readonly type = "document"; - withConverter(converter: FirestoreDataConverter): DocumentReference; - withConverter(converter: null): DocumentReference; -} - -// @public -export class DocumentSnapshot { - protected constructor(); - data(): T | undefined; - exists(): this is QueryDocumentSnapshot; - get(fieldPath: string | FieldPath): any; - get id(): string; - get ref(): DocumentReference; -} - -export { EmulatorMockTokenOptions } - -// @public -export function endAt(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function endAt(...fieldValues: unknown[]): QueryConstraint; - -// @public -export function endBefore(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function endBefore(...fieldValues: unknown[]): QueryConstraint; - -// @public -export class FieldPath { - constructor(...fieldNames: string[]); - isEqual(other: FieldPath): boolean; -} - -// @public -export abstract class FieldValue { - abstract isEqual(other: FieldValue): boolean; -} - -// @public -export class Firestore { - get app(): FirebaseApp; - toJSON(): object; - type: 'firestore-lite' | 'firestore'; -} - -// @public -export interface FirestoreDataConverter { - fromFirestore(snapshot: QueryDocumentSnapshot): T; - toFirestore(modelObject: WithFieldValue): DocumentData; - toFirestore(modelObject: PartialWithFieldValue, options: SetOptions): DocumentData; -} - -// @public -export class FirestoreError extends FirebaseError { - readonly code: FirestoreErrorCode; - readonly message: string; - readonly stack?: string; -} - -// @public -export type FirestoreErrorCode = 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; - -// @public -export class GeoPoint { - constructor(latitude: number, longitude: number); - isEqual(other: GeoPoint): boolean; - get latitude(): number; - get longitude(): number; - toJSON(): { - latitude: number; - longitude: number; - }; -} - -// @public -export function getDoc(reference: DocumentReference): Promise>; - -// @public -export function getDocs(query: Query): Promise>; - -// @public -export function getFirestore(app?: FirebaseApp): Firestore; - -// @public -export function increment(n: number): FieldValue; - -// @public -export function initializeFirestore(app: FirebaseApp, settings: Settings): Firestore; - -// @public -export function limit(limit: number): QueryConstraint; - -// @public -export function limitToLast(limit: number): QueryConstraint; - -export { LogLevel } - -// @public -export type NestedUpdateFields> = UnionToIntersection<{ - [K in keyof T & string]: ChildUpdateFields; -}[keyof T & string]>; - -// @public -export function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryConstraint; - -// @public -export type OrderByDirection = 'desc' | 'asc'; - -// @public -export type PartialWithFieldValue = Partial | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: PartialWithFieldValue | FieldValue; -} : never); - -// @public -export type Primitive = string | number | boolean | undefined | null; - -// @public -export class Query { - protected constructor(); - readonly converter: FirestoreDataConverter | null; - readonly firestore: Firestore; - readonly type: 'query' | 'collection'; - withConverter(converter: null): Query; - withConverter(converter: FirestoreDataConverter): Query; -} - -// @public -export function query(query: Query, ...queryConstraints: QueryConstraint[]): Query; - -// @public -export abstract class QueryConstraint { - abstract readonly type: QueryConstraintType; -} - -// @public -export type QueryConstraintType = 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore'; - -// @public -export class QueryDocumentSnapshot extends DocumentSnapshot { - // @override - data(): T; -} - -// @public -export function queryEqual(left: Query, right: Query): boolean; - -// @public -export class QuerySnapshot { - get docs(): Array>; - get empty(): boolean; - forEach(callback: (result: QueryDocumentSnapshot) => void, thisArg?: unknown): void; - readonly query: Query; - get size(): number; -} - -// @public -export function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; - -// @public -export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise, options?: TransactionOptions): Promise; - -// @public -export function serverTimestamp(): FieldValue; - -// @public -export function setDoc(reference: DocumentReference, data: WithFieldValue): Promise; - -// @public -export function setDoc(reference: DocumentReference, data: PartialWithFieldValue, options: SetOptions): Promise; - -// @public -export function setLogLevel(logLevel: LogLevel): void; - -// @public -export type SetOptions = { - readonly merge?: boolean; -} | { - readonly mergeFields?: Array; -}; - -// @public -export interface Settings { - host?: string; - ignoreUndefinedProperties?: boolean; - ssl?: boolean; -} - -// @public -export function snapshotEqual(left: DocumentSnapshot | QuerySnapshot, right: DocumentSnapshot | QuerySnapshot): boolean; - -// @public -export function startAfter(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function startAfter(...fieldValues: unknown[]): QueryConstraint; - -// @public -export function startAt(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function startAt(...fieldValues: unknown[]): QueryConstraint; - -// @public -export function terminate(firestore: Firestore): Promise; - -// @public -export class Timestamp { - constructor( - seconds: number, - nanoseconds: number); - static fromDate(date: Date): Timestamp; - static fromMillis(milliseconds: number): Timestamp; - isEqual(other: Timestamp): boolean; - readonly nanoseconds: number; - static now(): Timestamp; - readonly seconds: number; - toDate(): Date; - toJSON(): { - seconds: number; - nanoseconds: number; - }; - toMillis(): number; - toString(): string; - valueOf(): string; -} - -// @public -export class Transaction { - delete(documentRef: DocumentReference): this; - get(documentRef: DocumentReference): Promise>; - set(documentRef: DocumentReference, data: WithFieldValue): this; - set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): this; - update(documentRef: DocumentReference, data: UpdateData): this; - update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; -} - -// @public -export interface TransactionOptions { - readonly maxAttempts?: number; -} - -// @public -export type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public -export type UpdateData = T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: UpdateData | FieldValue; -} & NestedUpdateFields : Partial; - -// @public -export function updateDoc(reference: DocumentReference, data: UpdateData): Promise; - -// @public -export function updateDoc(reference: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise; - -// @public -export function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryConstraint; - -// @public -export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in'; - -// @public -export type WithFieldValue = T | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]: WithFieldValue | FieldValue; -} : never); - -// @public -export class WriteBatch { - commit(): Promise; - delete(documentRef: DocumentReference): WriteBatch; - set(documentRef: DocumentReference, data: WithFieldValue): WriteBatch; - set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): WriteBatch; - update(documentRef: DocumentReference, data: UpdateData): WriteBatch; - update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; -} - -// @public -export function writeBatch(firestore: Firestore): WriteBatch; - - -``` diff --git a/common/api-review/firestore.api.md b/common/api-review/firestore.api.md deleted file mode 100644 index 80a772e4db7..00000000000 --- a/common/api-review/firestore.api.md +++ /dev/null @@ -1,530 +0,0 @@ -## API Report File for "@firebase/firestore" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { EmulatorMockTokenOptions } from '@firebase/util'; -import { FirebaseApp } from '@firebase/app'; -import { FirebaseError } from '@firebase/util'; -import { LogLevelString as LogLevel } from '@firebase/logger'; - -// @public -export function addDoc(reference: CollectionReference, data: WithFieldValue): Promise>; - -// @public -export type AddPrefixToKeys> = { - [K in keyof T & string as `${Prefix}.${K}`]+?: T[K]; -}; - -// @public -export function arrayRemove(...elements: unknown[]): FieldValue; - -// @public -export function arrayUnion(...elements: unknown[]): FieldValue; - -// @public -export class Bytes { - static fromBase64String(base64: string): Bytes; - static fromUint8Array(array: Uint8Array): Bytes; - isEqual(other: Bytes): boolean; - toBase64(): string; - toString(): string; - toUint8Array(): Uint8Array; -} - -// @public -export const CACHE_SIZE_UNLIMITED = -1; - -// @public -export type ChildUpdateFields = V extends Record ? AddPrefixToKeys> : never; - -// @public -export function clearIndexedDbPersistence(firestore: Firestore): Promise; - -// @public -export function collection(firestore: Firestore, path: string, ...pathSegments: string[]): CollectionReference; - -// @public -export function collection(reference: CollectionReference, path: string, ...pathSegments: string[]): CollectionReference; - -// @public -export function collection(reference: DocumentReference, path: string, ...pathSegments: string[]): CollectionReference; - -// @public -export function collectionGroup(firestore: Firestore, collectionId: string): Query; - -// @public -export class CollectionReference extends Query { - get id(): string; - get parent(): DocumentReference | null; - get path(): string; - readonly type = "collection"; - withConverter(converter: FirestoreDataConverter): CollectionReference; - withConverter(converter: null): CollectionReference; -} - -// @public -export function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; -}): void; - -// @public -export function deleteDoc(reference: DocumentReference): Promise; - -// @public -export function deleteField(): FieldValue; - -// @public -export function disableNetwork(firestore: Firestore): Promise; - -// @public -export function doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference; - -// @public -export function doc(reference: CollectionReference, path?: string, ...pathSegments: string[]): DocumentReference; - -// @public -export function doc(reference: DocumentReference, path: string, ...pathSegments: string[]): DocumentReference; - -// @public -export interface DocumentChange { - readonly doc: QueryDocumentSnapshot; - readonly newIndex: number; - readonly oldIndex: number; - readonly type: DocumentChangeType; -} - -// @public -export type DocumentChangeType = 'added' | 'removed' | 'modified'; - -// @public -export interface DocumentData { - [field: string]: any; -} - -// @public -export function documentId(): FieldPath; - -// @public -export class DocumentReference { - readonly converter: FirestoreDataConverter | null; - readonly firestore: Firestore; - get id(): string; - get parent(): CollectionReference; - get path(): string; - readonly type = "document"; - withConverter(converter: FirestoreDataConverter): DocumentReference; - withConverter(converter: null): DocumentReference; -} - -// @public -export class DocumentSnapshot { - protected constructor(); - data(options?: SnapshotOptions): T | undefined; - exists(): this is QueryDocumentSnapshot; - get(fieldPath: string | FieldPath, options?: SnapshotOptions): any; - get id(): string; - readonly metadata: SnapshotMetadata; - get ref(): DocumentReference; -} - -export { EmulatorMockTokenOptions } - -// @public -export function enableIndexedDbPersistence(firestore: Firestore, persistenceSettings?: PersistenceSettings): Promise; - -// @public -export function enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise; - -// @public -export function enableNetwork(firestore: Firestore): Promise; - -// @public -export function endAt(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function endAt(...fieldValues: unknown[]): QueryConstraint; - -// @public -export function endBefore(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function endBefore(...fieldValues: unknown[]): QueryConstraint; - -// @public -export class FieldPath { - constructor(...fieldNames: string[]); - isEqual(other: FieldPath): boolean; -} - -// @public -export abstract class FieldValue { - abstract isEqual(other: FieldValue): boolean; -} - -// @public -export class Firestore { - get app(): FirebaseApp; - toJSON(): object; - type: 'firestore-lite' | 'firestore'; -} - -// @public -export interface FirestoreDataConverter { - fromFirestore(snapshot: QueryDocumentSnapshot, options?: SnapshotOptions): T; - toFirestore(modelObject: WithFieldValue): DocumentData; - toFirestore(modelObject: PartialWithFieldValue, options: SetOptions): DocumentData; -} - -// @public -export class FirestoreError extends FirebaseError { - readonly code: FirestoreErrorCode; - readonly message: string; - readonly stack?: string; -} - -// @public -export type FirestoreErrorCode = 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; - -// @public -export interface FirestoreSettings { - cacheSizeBytes?: number; - experimentalAutoDetectLongPolling?: boolean; - experimentalForceLongPolling?: boolean; - host?: string; - ignoreUndefinedProperties?: boolean; - ssl?: boolean; -} - -// @public -export class GeoPoint { - constructor(latitude: number, longitude: number); - isEqual(other: GeoPoint): boolean; - get latitude(): number; - get longitude(): number; - toJSON(): { - latitude: number; - longitude: number; - }; -} - -// @public -export function getDoc(reference: DocumentReference): Promise>; - -// @public -export function getDocFromCache(reference: DocumentReference): Promise>; - -// @public -export function getDocFromServer(reference: DocumentReference): Promise>; - -// @public -export function getDocs(query: Query): Promise>; - -// @public -export function getDocsFromCache(query: Query): Promise>; - -// @public -export function getDocsFromServer(query: Query): Promise>; - -// @public -export function getFirestore(app?: FirebaseApp): Firestore; - -// @public -export function increment(n: number): FieldValue; - -// @public -export function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore; - -// @public -export function limit(limit: number): QueryConstraint; - -// @public -export function limitToLast(limit: number): QueryConstraint; - -// @public -export function loadBundle(firestore: Firestore, bundleData: ReadableStream | ArrayBuffer | string): LoadBundleTask; - -// @public -export class LoadBundleTask implements PromiseLike { - catch(onRejected: (a: Error) => R | PromiseLike): Promise; - onProgress(next?: (progress: LoadBundleTaskProgress) => unknown, error?: (err: Error) => unknown, complete?: () => void): void; - then(onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike, onRejected?: (a: Error) => R | PromiseLike): Promise; -} - -// @public -export interface LoadBundleTaskProgress { - bytesLoaded: number; - documentsLoaded: number; - taskState: TaskState; - totalBytes: number; - totalDocuments: number; -} - -export { LogLevel } - -// @public -export function namedQuery(firestore: Firestore, name: string): Promise; - -// @public -export type NestedUpdateFields> = UnionToIntersection<{ - [K in keyof T & string]: ChildUpdateFields; -}[keyof T & string]>; - -// @public -export function onSnapshot(reference: DocumentReference, observer: { - next?: (snapshot: DocumentSnapshot) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; -}): Unsubscribe; - -// @public -export function onSnapshot(reference: DocumentReference, options: SnapshotListenOptions, observer: { - next?: (snapshot: DocumentSnapshot) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; -}): Unsubscribe; - -// @public -export function onSnapshot(reference: DocumentReference, onNext: (snapshot: DocumentSnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - -// @public -export function onSnapshot(reference: DocumentReference, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - -// @public -export function onSnapshot(query: Query, observer: { - next?: (snapshot: QuerySnapshot) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; -}): Unsubscribe; - -// @public -export function onSnapshot(query: Query, options: SnapshotListenOptions, observer: { - next?: (snapshot: QuerySnapshot) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; -}): Unsubscribe; - -// @public -export function onSnapshot(query: Query, onNext: (snapshot: QuerySnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - -// @public -export function onSnapshot(query: Query, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; - -// @public -export function onSnapshotsInSync(firestore: Firestore, observer: { - next?: (value: void) => void; - error?: (error: FirestoreError) => void; - complete?: () => void; -}): Unsubscribe; - -// @public -export function onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe; - -// @public -export function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryConstraint; - -// @public -export type OrderByDirection = 'desc' | 'asc'; - -// @public -export type PartialWithFieldValue = Partial | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: PartialWithFieldValue | FieldValue; -} : never); - -// @public -export interface PersistenceSettings { - forceOwnership?: boolean; -} - -// @public -export type Primitive = string | number | boolean | undefined | null; - -// @public -export class Query { - protected constructor(); - readonly converter: FirestoreDataConverter | null; - readonly firestore: Firestore; - readonly type: 'query' | 'collection'; - withConverter(converter: null): Query; - withConverter(converter: FirestoreDataConverter): Query; -} - -// @public -export function query(query: Query, ...queryConstraints: QueryConstraint[]): Query; - -// @public -export abstract class QueryConstraint { - abstract readonly type: QueryConstraintType; -} - -// @public -export type QueryConstraintType = 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore'; - -// @public -export class QueryDocumentSnapshot extends DocumentSnapshot { - // @override - data(options?: SnapshotOptions): T; -} - -// @public -export function queryEqual(left: Query, right: Query): boolean; - -// @public -export class QuerySnapshot { - docChanges(options?: SnapshotListenOptions): Array>; - get docs(): Array>; - get empty(): boolean; - forEach(callback: (result: QueryDocumentSnapshot) => void, thisArg?: unknown): void; - readonly metadata: SnapshotMetadata; - readonly query: Query; - get size(): number; -} - -// @public -export function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; - -// @public -export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise, options?: TransactionOptions): Promise; - -// @public -export function serverTimestamp(): FieldValue; - -// @public -export function setDoc(reference: DocumentReference, data: WithFieldValue): Promise; - -// @public -export function setDoc(reference: DocumentReference, data: PartialWithFieldValue, options: SetOptions): Promise; - -// @public -export function setLogLevel(logLevel: LogLevel): void; - -// @public -export type SetOptions = { - readonly merge?: boolean; -} | { - readonly mergeFields?: Array; -}; - -// @public -export function snapshotEqual(left: DocumentSnapshot | QuerySnapshot, right: DocumentSnapshot | QuerySnapshot): boolean; - -// @public -export interface SnapshotListenOptions { - readonly includeMetadataChanges?: boolean; -} - -// @public -export class SnapshotMetadata { - readonly fromCache: boolean; - readonly hasPendingWrites: boolean; - isEqual(other: SnapshotMetadata): boolean; -} - -// @public -export interface SnapshotOptions { - readonly serverTimestamps?: 'estimate' | 'previous' | 'none'; -} - -// @public -export function startAfter(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function startAfter(...fieldValues: unknown[]): QueryConstraint; - -// @public -export function startAt(snapshot: DocumentSnapshot): QueryConstraint; - -// @public -export function startAt(...fieldValues: unknown[]): QueryConstraint; - -// @public -export type TaskState = 'Error' | 'Running' | 'Success'; - -// @public -export function terminate(firestore: Firestore): Promise; - -// @public -export class Timestamp { - constructor( - seconds: number, - nanoseconds: number); - static fromDate(date: Date): Timestamp; - static fromMillis(milliseconds: number): Timestamp; - isEqual(other: Timestamp): boolean; - readonly nanoseconds: number; - static now(): Timestamp; - readonly seconds: number; - toDate(): Date; - toJSON(): { - seconds: number; - nanoseconds: number; - }; - toMillis(): number; - toString(): string; - valueOf(): string; -} - -// @public -export class Transaction { - delete(documentRef: DocumentReference): this; - get(documentRef: DocumentReference): Promise>; - set(documentRef: DocumentReference, data: WithFieldValue): this; - set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): this; - update(documentRef: DocumentReference, data: UpdateData): this; - update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; -} - -// @public -export interface TransactionOptions { - readonly maxAttempts?: number; -} - -// @public -export type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public -export interface Unsubscribe { - (): void; -} - -// @public -export type UpdateData = T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: UpdateData | FieldValue; -} & NestedUpdateFields : Partial; - -// @public -export function updateDoc(reference: DocumentReference, data: UpdateData): Promise; - -// @public -export function updateDoc(reference: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise; - -// @public -export function waitForPendingWrites(firestore: Firestore): Promise; - -// @public -export function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryConstraint; - -// @public -export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in'; - -// @public -export type WithFieldValue = T | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]: WithFieldValue | FieldValue; -} : never); - -// @public -export class WriteBatch { - commit(): Promise; - delete(documentRef: DocumentReference): WriteBatch; - set(documentRef: DocumentReference, data: WithFieldValue): WriteBatch; - set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): WriteBatch; - update(documentRef: DocumentReference, data: UpdateData): WriteBatch; - update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; -} - -// @public -export function writeBatch(firestore: Firestore): WriteBatch; - - -``` diff --git a/common/api-review/functions.api.md b/common/api-review/functions.api.md deleted file mode 100644 index 4203be6645f..00000000000 --- a/common/api-review/functions.api.md +++ /dev/null @@ -1,52 +0,0 @@ -## API Report File for "@firebase/functions" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; -import { FirebaseError } from '@firebase/util'; - -// @public -export function connectFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void; - -// @public -export interface Functions { - app: FirebaseApp; - customDomain: string | null; - region: string; -} - -// @public -export interface FunctionsError extends FirebaseError { - readonly code: FunctionsErrorCode; - readonly details?: unknown; -} - -// @public -export type FunctionsErrorCode = 'ok' | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; - -// @public -export function getFunctions(app?: FirebaseApp, regionOrCustomDomain?: string): Functions; - -// @public -export type HttpsCallable = (data?: RequestData | null) => Promise>; - -// @public -export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable; - -// @public -export function httpsCallableFromURL(functionsInstance: Functions, url: string, options?: HttpsCallableOptions): HttpsCallable; - -// @public -export interface HttpsCallableOptions { - timeout?: number; -} - -// @public -export interface HttpsCallableResult { - readonly data: ResponseData; -} - - -``` diff --git a/common/api-review/installations.api.md b/common/api-review/installations.api.md deleted file mode 100644 index 4b1465b1cb8..00000000000 --- a/common/api-review/installations.api.md +++ /dev/null @@ -1,42 +0,0 @@ -## API Report File for "@firebase/installations" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; - -// @public -export function deleteInstallations(installations: Installations): Promise; - -// @internal -export interface _FirebaseInstallationsInternal { - getId(): Promise; - getToken(forceRefresh?: boolean): Promise; -} - -// @public -export function getId(installations: Installations): Promise; - -// @public -export function getInstallations(app?: FirebaseApp): Installations; - -// @public -export function getToken(installations: Installations, forceRefresh?: boolean): Promise; - -// @public -export type IdChangeCallbackFn = (installationId: string) => void; - -// @public -export type IdChangeUnsubscribeFn = () => void; - -// @public -export interface Installations { - app: FirebaseApp; -} - -// @public -export function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn; - - -``` diff --git a/common/api-review/messaging-sw.api.md b/common/api-review/messaging-sw.api.md deleted file mode 100644 index bff14180926..00000000000 --- a/common/api-review/messaging-sw.api.md +++ /dev/null @@ -1,69 +0,0 @@ -## API Report File for "@firebase/messaging-sw" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; -import { NextFn } from '@firebase/util'; -import { Observer } from '@firebase/util'; -import { Unsubscribe } from '@firebase/util'; - -// @public -export function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void; - -// @public -export interface FcmOptions { - analyticsLabel?: string; - link?: string; -} - -// @public -export function getMessaging(app?: FirebaseApp): Messaging; - -// @public -export interface GetTokenOptions { - serviceWorkerRegistration?: ServiceWorkerRegistration; - vapidKey?: string; -} - -// @public -export function isSupported(): Promise; - -// @public -export interface MessagePayload { - collapseKey: string; - data?: { - [key: string]: string; - }; - fcmOptions?: FcmOptions; - from: string; - messageId: string; - notification?: NotificationPayload; -} - -// @public -export interface Messaging { - app: FirebaseApp; -} - -export { NextFn } - -// @public -export interface NotificationPayload { - body?: string; - image?: string; - title?: string; -} - -export { Observer } - -// @public -export function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn | Observer): Unsubscribe; - -export { Unsubscribe } - - -// (No @packageDocumentation comment for this package) - -``` diff --git a/common/api-review/messaging.api.md b/common/api-review/messaging.api.md deleted file mode 100644 index f01c41abdac..00000000000 --- a/common/api-review/messaging.api.md +++ /dev/null @@ -1,70 +0,0 @@ -## API Report File for "@firebase/messaging" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; -import { NextFn } from '@firebase/util'; -import { Observer } from '@firebase/util'; -import { Unsubscribe } from '@firebase/util'; - -// @public -export function deleteToken(messaging: Messaging): Promise; - -// @public -export interface FcmOptions { - analyticsLabel?: string; - link?: string; -} - -// @public -export function getMessaging(app?: FirebaseApp): Messaging; - -// @public -export function getToken(messaging: Messaging, options?: GetTokenOptions): Promise; - -// @public -export interface GetTokenOptions { - serviceWorkerRegistration?: ServiceWorkerRegistration; - vapidKey?: string; -} - -// @public -export function isSupported(): Promise; - -// @public -export interface MessagePayload { - collapseKey: string; - data?: { - [key: string]: string; - }; - fcmOptions?: FcmOptions; - from: string; - messageId: string; - notification?: NotificationPayload; -} - -// @public -export interface Messaging { - app: FirebaseApp; -} - -export { NextFn } - -// @public -export interface NotificationPayload { - body?: string; - image?: string; - title?: string; -} - -export { Observer } - -// @public -export function onMessage(messaging: Messaging, nextOrObserver: NextFn | Observer): Unsubscribe; - -export { Unsubscribe } - - -``` diff --git a/common/api-review/performance.api.md b/common/api-review/performance.api.md deleted file mode 100644 index 0de7ee63704..00000000000 --- a/common/api-review/performance.api.md +++ /dev/null @@ -1,55 +0,0 @@ -## API Report File for "@firebase/performance" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; - -// @public -export interface FirebasePerformance { - app: FirebaseApp; - dataCollectionEnabled: boolean; - instrumentationEnabled: boolean; -} - -// @public -export function getPerformance(app?: FirebaseApp): FirebasePerformance; - -// @public -export function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance; - -// @public -export interface PerformanceSettings { - dataCollectionEnabled?: boolean; - instrumentationEnabled?: boolean; -} - -// @public -export interface PerformanceTrace { - getAttribute(attr: string): string | undefined; - getAttributes(): { - [key: string]: string; - }; - getMetric(metricName: string): number; - incrementMetric(metricName: string, num?: number): void; - putAttribute(attr: string, value: string): void; - putMetric(metricName: string, num: number): void; - record(startTime: number, duration: number, options?: { - metrics?: { - [key: string]: number; - }; - attributes?: { - [key: string]: string; - }; - }): void; - removeAttribute(attr: string): void; - start(): void; - stop(): void; -} - -// @public -export function trace(performance: FirebasePerformance, name: string): PerformanceTrace; - - -``` diff --git a/common/api-review/remote-config.api.md b/common/api-review/remote-config.api.md deleted file mode 100644 index b5d02381cc3..00000000000 --- a/common/api-review/remote-config.api.md +++ /dev/null @@ -1,80 +0,0 @@ -## API Report File for "@firebase/remote-config" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { FirebaseApp } from '@firebase/app'; - -// @public -export function activate(remoteConfig: RemoteConfig): Promise; - -// @public -export function ensureInitialized(remoteConfig: RemoteConfig): Promise; - -// @public -export function fetchAndActivate(remoteConfig: RemoteConfig): Promise; - -// @public -export function fetchConfig(remoteConfig: RemoteConfig): Promise; - -// @public -export type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle'; - -// @public -export function getAll(remoteConfig: RemoteConfig): Record; - -// @public -export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean; - -// @public -export function getNumber(remoteConfig: RemoteConfig, key: string): number; - -// @public (undocumented) -export function getRemoteConfig(app?: FirebaseApp): RemoteConfig; - -// @public -export function getString(remoteConfig: RemoteConfig, key: string): string; - -// @public -export function getValue(remoteConfig: RemoteConfig, key: string): Value; - -// @public -export function isSupported(): Promise; - -// @public -export type LogLevel = 'debug' | 'error' | 'silent'; - -// @public -export interface RemoteConfig { - app: FirebaseApp; - defaultConfig: { - [key: string]: string | number | boolean; - }; - fetchTimeMillis: number; - lastFetchStatus: FetchStatus; - settings: RemoteConfigSettings; -} - -// @public -export interface RemoteConfigSettings { - fetchTimeoutMillis: number; - minimumFetchIntervalMillis: number; -} - -// @public -export function setLogLevel(remoteConfig: RemoteConfig, logLevel: LogLevel): void; - -// @public -export interface Value { - asBoolean(): boolean; - asNumber(): number; - asString(): string; - getSource(): ValueSource; -} - -// @public -export type ValueSource = 'static' | 'default' | 'remote'; - - -``` diff --git a/common/api-review/rules-unit-testing.api.md b/common/api-review/rules-unit-testing.api.md deleted file mode 100644 index b4aaf9bc379..00000000000 --- a/common/api-review/rules-unit-testing.api.md +++ /dev/null @@ -1,101 +0,0 @@ -## API Report File for "@firebase/rules-unit-testing" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { default as firebase_2 } from 'firebase/compat/app'; -import { FirebaseSignInProvider } from '@firebase/util'; - -// @public -export function assertFails(pr: Promise): Promise; - -// @public -export function assertSucceeds(pr: Promise): Promise; - -// @public -export type EmulatorConfig = { - rules?: string; -} & (HostAndPort | {}); - -// @public -export interface HostAndPort { - host: string; - port: number; -} - -// @public -export function initializeTestEnvironment(config: TestEnvironmentConfig): Promise; - -// @public -export interface RulesTestContext { - database(databaseURL?: string): firebase_2.database.Database; - firestore(settings?: firebase_2.firestore.Settings): firebase_2.firestore.Firestore; - storage(bucketUrl?: string): firebase_2.storage.Storage; -} - -// @public -export interface RulesTestEnvironment { - authenticatedContext(user_id: string, tokenOptions?: TokenOptions): RulesTestContext; - cleanup(): Promise; - clearDatabase(): Promise; - clearFirestore(): Promise; - clearStorage(): Promise; - readonly emulators: { - database?: HostAndPort; - firestore?: HostAndPort; - storage?: HostAndPort; - }; - readonly projectId: string; - unauthenticatedContext(): RulesTestContext; - // (undocumented) - withSecurityRulesDisabled(callback: (context: RulesTestContext) => Promise): Promise; -} - -// @public -export interface TestEnvironmentConfig { - database?: EmulatorConfig; - firestore?: EmulatorConfig; - hub?: HostAndPort; - projectId?: string; - storage?: EmulatorConfig; -} - -// @public -export type TokenOptions = { - iat?: number; - exp?: number; - auth_time?: number; - provider_id?: 'anonymous'; - email?: string; - email_verified?: boolean; - phone_number?: string; - name?: string; - picture?: string; - firebase?: { - sign_in_provider: FirebaseSignInProvider; - identities?: { - [provider in FirebaseSignInProvider]?: string[]; - }; - }; - aud?: string; - iss?: string; - [claim: string]: unknown; - uid?: never; - sub?: never; - user_id?: never; -}; - -// @public -export function withFunctionTriggersDisabled(fn: () => TResult | Promise): Promise; - -// @public -export function withFunctionTriggersDisabled(hub: { - host: string; - port: number; -}, fn: () => TResult | Promise): Promise; - - -// (No @packageDocumentation comment for this package) - -``` diff --git a/common/api-review/storage.api.md b/common/api-review/storage.api.md deleted file mode 100644 index b893b9f256d..00000000000 --- a/common/api-review/storage.api.md +++ /dev/null @@ -1,347 +0,0 @@ -## API Report File for "@firebase/storage" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types'; -import { CompleteFn } from '@firebase/util'; -import { EmulatorMockTokenOptions } from '@firebase/util'; -import { FirebaseApp } from '@firebase/app'; -import { FirebaseAuthInternalName } from '@firebase/auth-interop-types'; -import { FirebaseError } from '@firebase/util'; -import { _FirebaseService } from '@firebase/app'; -import { NextFn } from '@firebase/util'; -import { Provider } from '@firebase/component'; -import { Subscribe } from '@firebase/util'; -import { Unsubscribe } from '@firebase/util'; - -// @public -export function connectStorageEmulator(storage: FirebaseStorage, host: string, port: number, options?: { - mockUserToken?: EmulatorMockTokenOptions | string; -}): void; - -// Warning: (ae-forgotten-export) The symbol "StringData" needs to be exported by the entry point index.d.ts -// -// @internal (undocumented) -export function _dataFromString(format: StringFormat, stringData: string): StringData; - -// @public -export function deleteObject(ref: StorageReference): Promise; - -export { EmulatorMockTokenOptions } - -// @internal (undocumented) -export class _FbsBlob { - constructor(data: Blob | Uint8Array | ArrayBuffer, elideCopy?: boolean); - // (undocumented) - static getBlob(...args: Array): _FbsBlob | null; - // (undocumented) - size(): number; - // (undocumented) - slice(startByte: number, endByte: number): _FbsBlob | null; - // (undocumented) - type(): string; - // (undocumented) - uploadData(): Blob | Uint8Array; -} - -// @public -export interface FirebaseStorage extends _FirebaseService { - readonly app: FirebaseApp; - maxOperationRetryTime: number; - maxUploadRetryTime: number; -} - -// @internal -export class _FirebaseStorageImpl implements FirebaseStorage { - constructor( - app: FirebaseApp, _authProvider: Provider, - _appCheckProvider: Provider, - _url?: string | undefined, _firebaseVersion?: string | undefined); - readonly app: FirebaseApp; - // (undocumented) - readonly _appCheckProvider: Provider; - // (undocumented) - protected readonly _appId: string | null; - // (undocumented) - readonly _authProvider: Provider; - // (undocumented) - _bucket: _Location | null; - _delete(): Promise; - // (undocumented) - readonly _firebaseVersion?: string | undefined; - // (undocumented) - _getAppCheckToken(): Promise; - // (undocumented) - _getAuthToken(): Promise; - get host(): string; - set host(host: string); - // Warning: (ae-forgotten-export) The symbol "ConnectionType" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RequestInfo" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Connection" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Request" needs to be exported by the entry point index.d.ts - // - // (undocumented) - _makeRequest(requestInfo: RequestInfo_2, requestFactory: () => Connection, authToken: string | null, appCheckToken: string | null): Request_2; - // (undocumented) - makeRequestWithTokens(requestInfo: RequestInfo_2, requestFactory: () => Connection): Promise; - _makeStorageReference(loc: _Location): _Reference; - get maxOperationRetryTime(): number; - set maxOperationRetryTime(time: number); - get maxUploadRetryTime(): number; - set maxUploadRetryTime(time: number); - // (undocumented) - _overrideAuthToken?: string; - // (undocumented) - _protocol: string; - // (undocumented) - readonly _url?: string | undefined; -} - -// @public -export interface FullMetadata extends UploadMetadata { - bucket: string; - downloadTokens: string[] | undefined; - fullPath: string; - generation: string; - metageneration: string; - name: string; - ref?: StorageReference | undefined; - size: number; - timeCreated: string; - updated: string; -} - -// @public -export function getBlob(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; - -// @public -export function getBytes(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; - -// @internal (undocumented) -export function _getChild(ref: StorageReference, childPath: string): _Reference; - -// @public -export function getDownloadURL(ref: StorageReference): Promise; - -// @public -export function getMetadata(ref: StorageReference): Promise; - -// @public -export function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage; - -// @public -export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): NodeJS.ReadableStream; - -// Warning: (ae-forgotten-export) The symbol "StorageError" needs to be exported by the entry point index.d.ts -// -// @internal (undocumented) -export function _invalidArgument(message: string): StorageError_2; - -// @internal (undocumented) -export function _invalidRootOperation(name: string): StorageError_2; - -// @public -export function list(ref: StorageReference, options?: ListOptions): Promise; - -// @public -export function listAll(ref: StorageReference): Promise; - -// @public -export interface ListOptions { - maxResults?: number | null; - pageToken?: string | null; -} - -// @public -export interface ListResult { - items: StorageReference[]; - nextPageToken?: string; - prefixes: StorageReference[]; -} - -// @internal -export class _Location { - constructor(bucket: string, path: string); - // (undocumented) - readonly bucket: string; - // (undocumented) - bucketOnlyServerUrl(): string; - // (undocumented) - fullServerUrl(): string; - // (undocumented) - get isRoot(): boolean; - // (undocumented) - static makeFromBucketSpec(bucketString: string, host: string): _Location; - // (undocumented) - static makeFromUrl(url: string, host: string): _Location; - // (undocumented) - get path(): string; - } - -// @public -export function ref(storage: FirebaseStorage, url?: string): StorageReference; - -// @public -export function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference; - -// @internal -export class _Reference { - constructor(_service: _FirebaseStorageImpl, location: string | _Location); - get bucket(): string; - get fullPath(): string; - // (undocumented) - _location: _Location; - get name(): string; - // (undocumented) - protected _newRef(service: _FirebaseStorageImpl, location: _Location): _Reference; - get parent(): _Reference | null; - get root(): _Reference; - get storage(): _FirebaseStorageImpl; - _throwIfRoot(name: string): void; - // @override - toString(): string; -} - -// @public -export interface SettableMetadata { - cacheControl?: string | undefined; - contentDisposition?: string | undefined; - contentEncoding?: string | undefined; - contentLanguage?: string | undefined; - contentType?: string | undefined; - customMetadata?: { - [key: string]: string; - } | undefined; -} - -// @public -export interface StorageError extends FirebaseError { - serverResponse: string | null; -} - -// @public -export interface StorageObserver { - // (undocumented) - complete?: CompleteFn | null; - // (undocumented) - error?: (error: StorageError) => void | null; - // (undocumented) - next?: NextFn | null; -} - -// @public -export interface StorageReference { - bucket: string; - fullPath: string; - name: string; - parent: StorageReference | null; - root: StorageReference; - storage: FirebaseStorage; - toString(): string; -} - -// @public -export type StringFormat = typeof StringFormat[keyof typeof StringFormat]; - -// @public -export const StringFormat: { - readonly RAW: "raw"; - readonly BASE64: "base64"; - readonly BASE64URL: "base64url"; - readonly DATA_URL: "data_url"; -}; - -// @public -export type TaskEvent = 'state_changed'; - -// @internal -export type _TaskEvent = string; - -// @internal -export const _TaskEvent: { - STATE_CHANGED: string; -}; - -// @public -export type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error'; - -// @internal -export type _TaskState = typeof _TaskState[keyof typeof _TaskState]; - -// @internal -export const _TaskState: { - readonly RUNNING: "running"; - readonly PAUSED: "paused"; - readonly SUCCESS: "success"; - readonly CANCELED: "canceled"; - readonly ERROR: "error"; -}; - -// @public -export function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise; - -// @public -export function uploadBytes(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Promise; - -// @public -export function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask; - -// @public -export interface UploadMetadata extends SettableMetadata { - md5Hash?: string | undefined; -} - -// @public -export interface UploadResult { - readonly metadata: FullMetadata; - readonly ref: StorageReference; -} - -// @public -export function uploadString(ref: StorageReference, value: string, format?: StringFormat, metadata?: UploadMetadata): Promise; - -// @public -export interface UploadTask { - cancel(): boolean; - catch(onRejected: (error: StorageError) => unknown): Promise; - on(event: TaskEvent, nextOrObserver?: StorageObserver | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError) => unknown) | null, complete?: Unsubscribe | null): Unsubscribe | Subscribe; - pause(): boolean; - resume(): boolean; - snapshot: UploadTaskSnapshot; - then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: StorageError) => unknown) | null): Promise; -} - -// @internal -export class _UploadTask { - constructor(ref: _Reference, blob: _FbsBlob, metadata?: Metadata | null); - _blob: _FbsBlob; - cancel(): boolean; - catch(onRejected: (p1: StorageError_2) => T | Promise): Promise; - // Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts - _metadata: Metadata | null; - // Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts - on(type: _TaskEvent, nextOrObserver?: StorageObserver | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError_2) => unknown) | null, completed?: Unsubscribe_2 | null): Unsubscribe_2 | Subscribe_2; - pause(): boolean; - resume(): boolean; - get snapshot(): UploadTaskSnapshot; - // Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts - _state: InternalTaskState; - then(onFulfilled?: ((value: UploadTaskSnapshot) => U | Promise) | null, onRejected?: ((error: StorageError_2) => U | Promise) | null): Promise; - _transferred: number; - } - -// @public -export interface UploadTaskSnapshot { - bytesTransferred: number; - metadata: FullMetadata; - ref: StorageReference; - state: TaskState; - task: UploadTask; - totalBytes: number; -} - - -``` diff --git a/common/api-review/util.api.md b/common/api-review/util.api.md deleted file mode 100644 index adfb36a4b09..00000000000 --- a/common/api-review/util.api.md +++ /dev/null @@ -1,453 +0,0 @@ -## API Report File for "@firebase/util" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -// Warning: (ae-missing-release-tag) "areCookiesEnabled" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function areCookiesEnabled(): boolean; - -// Warning: (ae-missing-release-tag) "assert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const assert: (assertion: unknown, message: string) => void; - -// Warning: (ae-missing-release-tag) "assertionError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const assertionError: (message: string) => Error; - -// Warning: (ae-missing-release-tag) "async" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function async(fn: Function, onError?: ErrorFn): Function; - -// Warning: (ae-forgotten-export) The symbol "Base64" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "base64" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const base64: Base64; - -// Warning: (ae-missing-release-tag) "base64Decode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const base64Decode: (str: string) => string | null; - -// Warning: (ae-missing-release-tag) "base64Encode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const base64Encode: (str: string) => string; - -// Warning: (ae-missing-release-tag) "base64urlEncodeWithoutPadding" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const base64urlEncodeWithoutPadding: (str: string) => string; - -// Warning: (ae-missing-release-tag) "calculateBackoffMillis" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function calculateBackoffMillis(backoffCount: number, intervalMillis?: number, backoffFactor?: number): number; - -// Warning: (ae-missing-release-tag) "Compat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export interface Compat { - // (undocumented) - _delegate: T; -} - -// Warning: (ae-missing-release-tag) "CompleteFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type CompleteFn = () => void; - -// Warning: (ae-missing-release-tag) "CONSTANTS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const CONSTANTS: { - NODE_CLIENT: boolean; - NODE_ADMIN: boolean; - SDK_VERSION: string; -}; - -// Warning: (ae-missing-release-tag) "contains" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function contains(obj: T, key: string): boolean; - -// Warning: (ae-missing-release-tag) "createMockUserToken" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function createMockUserToken(token: EmulatorMockTokenOptions, projectId?: string): string; - -// Warning: (ae-missing-release-tag) "createSubscribe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function createSubscribe(executor: Executor, onNoObservers?: Executor): Subscribe; - -// Warning: (ae-forgotten-export) The symbol "DecodedToken" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "decode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const decode: (token: string) => DecodedToken; - -// Warning: (ae-missing-release-tag) "deepCopy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function deepCopy(value: T): T; - -// Warning: (ae-missing-release-tag) "deepEqual" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function deepEqual(a: object, b: object): boolean; - -// Warning: (ae-missing-release-tag) "deepExtend" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function deepExtend(target: unknown, source: unknown): unknown; - -// Warning: (ae-missing-release-tag) "Deferred" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export class Deferred { - constructor(); - // (undocumented) - promise: Promise; - // (undocumented) - reject: (value?: unknown) => void; - // (undocumented) - resolve: (value?: unknown) => void; - wrapCallback(callback?: (error?: unknown, value?: unknown) => void): (error: unknown, value?: unknown) => void; -} - -// Warning: (ae-forgotten-export) The symbol "FirebaseIdToken" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EmulatorMockTokenOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type EmulatorMockTokenOptions = ({ - user_id: string; -} | { - sub: string; -}) & Partial; - -// Warning: (ae-missing-release-tag) "ErrorData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface ErrorData { - // (undocumented) - [key: string]: unknown; -} - -// Warning: (ae-missing-release-tag) "ErrorFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export class ErrorFactory { - constructor(service: string, serviceName: string, errors: ErrorMap); - // (undocumented) - create(code: K, ...data: K extends keyof ErrorParams ? [ErrorParams[K]] : []): FirebaseError; - } - -// Warning: (ae-missing-release-tag) "ErrorFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type ErrorFn = (error: Error) => void; - -// Warning: (ae-missing-release-tag) "ErrorMap" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export type ErrorMap = { - readonly [K in ErrorCode]: string; -}; - -// Warning: (ae-missing-release-tag) "errorPrefix" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function errorPrefix(fnName: string, argName: string): string; - -// Warning: (ae-missing-release-tag) "Executor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type Executor = (observer: Observer) => void; - -// Warning: (ae-missing-release-tag) "extractQuerystring" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function extractQuerystring(url: string): string; - -// Warning: (ae-missing-release-tag) "FirebaseError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export class FirebaseError extends Error { - constructor( - code: string, message: string, - customData?: Record | undefined); - readonly code: string; - customData?: Record | undefined; - readonly name: string; -} - -// Warning: (ae-missing-release-tag) "FirebaseSignInProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export type FirebaseSignInProvider = 'custom' | 'email' | 'password' | 'phone' | 'anonymous' | 'google.com' | 'facebook.com' | 'github.com' | 'twitter.com' | 'microsoft.com' | 'apple.com'; - -// Warning: (ae-missing-release-tag) "getGlobal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function getGlobal(): typeof globalThis; - -// Warning: (ae-missing-release-tag) "getModularInstance" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function getModularInstance(service: Compat | ExpService): ExpService; - -// Warning: (ae-missing-release-tag) "getUA" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function getUA(): string; - -// Warning: (ae-missing-release-tag) "isAdmin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const isAdmin: (token: string) => boolean; - -// Warning: (ae-missing-release-tag) "isBrowser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isBrowser(): boolean; - -// Warning: (ae-missing-release-tag) "isBrowserExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function isBrowserExtension(): boolean; - -// Warning: (ae-missing-release-tag) "isElectron" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isElectron(): boolean; - -// Warning: (ae-missing-release-tag) "isEmpty" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function isEmpty(obj: object): obj is {}; - -// Warning: (ae-missing-release-tag) "isIE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isIE(): boolean; - -// Warning: (ae-missing-release-tag) "isIndexedDBAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isIndexedDBAvailable(): boolean; - -// Warning: (ae-missing-release-tag) "isMobileCordova" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isMobileCordova(): boolean; - -// Warning: (ae-missing-release-tag) "isNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isNode(): boolean; - -// Warning: (ae-missing-release-tag) "isNodeSdk" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isNodeSdk(): boolean; - -// Warning: (ae-missing-release-tag) "isReactNative" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isReactNative(): boolean; - -// Warning: (ae-missing-release-tag) "isSafari" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isSafari(): boolean; - -// Warning: (ae-missing-release-tag) "issuedAtTime" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const issuedAtTime: (token: string) => number | null; - -// Warning: (ae-missing-release-tag) "isUWP" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function isUWP(): boolean; - -// Warning: (ae-missing-release-tag) "isValidFormat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const isValidFormat: (token: string) => boolean; - -// Warning: (ae-missing-release-tag) "isValidTimestamp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const isValidTimestamp: (token: string) => boolean; - -// Warning: (ae-missing-release-tag) "jsonEval" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function jsonEval(str: string): unknown; - -// Warning: (ae-missing-release-tag) "map" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function map(obj: { - [key in K]: V; -}, fn: (value: V, key: K, obj: { - [key in K]: V; -}) => U, contextObj?: unknown): { - [key in K]: U; -}; - -// Warning: (ae-missing-release-tag) "MAX_VALUE_MILLIS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const MAX_VALUE_MILLIS: number; - -// Warning: (ae-missing-release-tag) "NextFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export type NextFn = (value: T) => void; - -// Warning: (ae-missing-release-tag) "Observable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Observable { - // (undocumented) - subscribe: Subscribe; -} - -// Warning: (ae-missing-release-tag) "Observer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Observer { - // (undocumented) - complete: CompleteFn; - // (undocumented) - error: ErrorFn; - // (undocumented) - next: NextFn; -} - -// Warning: (ae-missing-release-tag) "ordinal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function ordinal(i: number): string; - -// Warning: (ae-missing-release-tag) "PartialObserver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type PartialObserver = Partial>; - -// Warning: (ae-missing-release-tag) "querystring" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function querystring(querystringParams: { - [key: string]: string | number; -}): string; - -// Warning: (ae-missing-release-tag) "querystringDecode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function querystringDecode(querystring: string): Record; - -// Warning: (ae-missing-release-tag) "RANDOM_FACTOR" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const RANDOM_FACTOR = 0.5; - -// Warning: (ae-missing-release-tag) "safeGet" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function safeGet(obj: T, key: K): T[K] | undefined; - -// Warning: (ae-missing-release-tag) "Sha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export class Sha1 { - constructor(); - // (undocumented) - blockSize: number; - compress_(buf: number[] | Uint8Array | string, offset?: number): void; - // @override (undocumented) - digest(): number[]; - // (undocumented) - reset(): void; - // (undocumented) - update(bytes?: number[] | Uint8Array | string, length?: number): void; - } - -// Warning: (ae-missing-release-tag) "stringify" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function stringify(data: unknown): string; - -// Warning: (ae-missing-release-tag) "stringLength" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const stringLength: (str: string) => number; - -// Warning: (ae-missing-release-tag) "StringLike" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface StringLike { - // (undocumented) - toString(): string; -} - -// Warning: (ae-missing-release-tag) "stringToByteArray" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const stringToByteArray: (str: string) => number[]; - -// Warning: (ae-missing-release-tag) "Subscribe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export interface Subscribe { - // (undocumented) - (next?: NextFn, error?: ErrorFn, complete?: CompleteFn): Unsubscribe; - // (undocumented) - (observer: PartialObserver): Unsubscribe; -} - -// Warning: (ae-missing-release-tag) "Unsubscribe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type Unsubscribe = () => void; - -// Warning: (ae-missing-release-tag) "validateArgCount" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export const validateArgCount: (fnName: string, minCount: number, maxCount: number, argCount: number) => void; - -// Warning: (ae-missing-release-tag) "validateCallback" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function validateCallback(fnName: string, argumentName: string, callback: Function, optional: boolean): void; - -// Warning: (ae-missing-release-tag) "validateContextObject" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function validateContextObject(fnName: string, argumentName: string, context: unknown, optional: boolean): void; - -// Warning: (ae-missing-release-tag) "validateIndexedDBOpenable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export function validateIndexedDBOpenable(): Promise; - -// Warning: (ae-missing-release-tag) "validateNamespace" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function validateNamespace(fnName: string, namespace: string, optional: boolean): void; - - -// (No @packageDocumentation comment for this package) - -``` diff --git a/config/api-extractor.json b/config/api-extractor.json index 0b1649b9c4f..1e9d03986ff 100644 --- a/config/api-extractor.json +++ b/config/api-extractor.json @@ -45,8 +45,8 @@ * * SUPPORTED TOKENS: , , */ - // Project should set this value to its entry point d.ts file. - // "mainEntryPointFilePath": "/lib/index.d.ts", + // Project should set this value to its entry point d.ts file. + // "mainEntryPointFilePath": "/lib/index.d.ts", /** * A list of NPM package names whose exports should be treated as part of this package. @@ -61,7 +61,7 @@ * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been * local files for library1. */ - "bundledPackages": [ ], + "bundledPackages": [], /** * Determines how the TypeScript compiler engine will be invoked by API Extractor. @@ -79,7 +79,6 @@ * DEFAULT VALUE: "/tsconfig.json" */ // "tsconfigFilePath": "/tsconfig.json", - /** * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. * The object must conform to the TypeScript tsconfig schema: @@ -93,7 +92,6 @@ // "overrideTsconfig": { // . . . // } - /** * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when @@ -138,7 +136,7 @@ * SUPPORTED TOKENS: , , * DEFAULT VALUE: "/etc/" */ - "reportFolder": "/../../common/api-review/", + "reportFolder": "/../../common/api-review/" /** * Specifies the folder where the temporary report file is written. The file name portion is determined by @@ -163,7 +161,7 @@ /** * (REQUIRED) Whether to generate a doc model file. */ - "enabled": true, + "enabled": true /** * The output path for the doc model file. The file extension should be ".api.json". @@ -184,7 +182,7 @@ /** * (REQUIRED) Whether to generate the .d.ts rollup file. */ - "enabled": false, + "enabled": false /** * Specifies the output path for a .d.ts rollup file to be generated without any trimming. @@ -212,7 +210,6 @@ */ // "betaTrimmedFilePath": "/dist/-beta.d.ts", - /** * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. * This file will include only declarations that are marked as "@public". @@ -247,7 +244,6 @@ * DEFAULT VALUE: true */ // "enabled": true, - /** * Specifies where the TSDoc metadata file should be written. * @@ -271,7 +267,7 @@ * * DEFAULT VALUE: "crlf" */ - // "newlineKind": "crlf", + "newlineKind": "lf", /** * Configures how API Extractor reports error and warning messages produced during analysis. @@ -304,7 +300,7 @@ * * DEFAULT VALUE: "warning" */ - "logLevel": "warning", + "logLevel": "warning" /** * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), @@ -314,7 +310,7 @@ * DEFAULT VALUE: false */ // "addToApiReportFile": false - }, + } // "TS2551": { // "logLevel": "warning", @@ -333,9 +329,9 @@ */ "extractorMessageReporting": { "default": { - "logLevel": "warning", + "logLevel": "warning" // "addToApiReportFile": false - }, + } // "ae-extra-release-tag": { // "logLevel": "warning", @@ -354,7 +350,7 @@ */ "tsdocMessageReporting": { "default": { - "logLevel": "warning", + "logLevel": "warning" // "addToApiReportFile": false } @@ -366,5 +362,4 @@ // . . . } } - } diff --git a/repo-scripts/api-documenter/src/schemas/api-documenter-template.json b/repo-scripts/api-documenter/src/schemas/api-documenter-template.json index 1e57fd7f120..94da49b03e9 100644 --- a/repo-scripts/api-documenter/src/schemas/api-documenter-template.json +++ b/repo-scripts/api-documenter/src/schemas/api-documenter-template.json @@ -17,7 +17,7 @@ * * DEFAULT VALUE: "crlf" */ - // "newlineKind": "crlf", + "newlineKind": "lf", /** * This enables an experimental feature that will be officially released with the next major version From a36d5459e07be9afae2e7c809396d1c1b0c3c89a Mon Sep 17 00:00:00 2001 From: dwyfrequency Date: Fri, 6 May 2022 15:59:58 -0400 Subject: [PATCH 2/3] Switch API docs to lf line endings --- common/api-review/analytics.api.md | 410 ++++++++++ common/api-review/app-check.api.md | 105 +++ common/api-review/app.api.md | 115 +++ common/api-review/auth.api.md | 827 ++++++++++++++++++++ common/api-review/database.api.md | 240 ++++++ common/api-review/firestore-lite.api.md | 373 +++++++++ common/api-review/firestore.api.md | 525 +++++++++++++ common/api-review/functions.api.md | 52 ++ common/api-review/installations.api.md | 42 + common/api-review/messaging-sw.api.md | 69 ++ common/api-review/messaging.api.md | 70 ++ common/api-review/performance.api.md | 55 ++ common/api-review/remote-config.api.md | 80 ++ common/api-review/rules-unit-testing.api.md | 101 +++ common/api-review/storage.api.md | 347 ++++++++ common/api-review/util.api.md | 453 +++++++++++ 16 files changed, 3864 insertions(+) create mode 100644 common/api-review/analytics.api.md create mode 100644 common/api-review/app-check.api.md create mode 100644 common/api-review/app.api.md create mode 100644 common/api-review/auth.api.md create mode 100644 common/api-review/database.api.md create mode 100644 common/api-review/firestore-lite.api.md create mode 100644 common/api-review/firestore.api.md create mode 100644 common/api-review/functions.api.md create mode 100644 common/api-review/installations.api.md create mode 100644 common/api-review/messaging-sw.api.md create mode 100644 common/api-review/messaging.api.md create mode 100644 common/api-review/performance.api.md create mode 100644 common/api-review/remote-config.api.md create mode 100644 common/api-review/rules-unit-testing.api.md create mode 100644 common/api-review/storage.api.md create mode 100644 common/api-review/util.api.md diff --git a/common/api-review/analytics.api.md b/common/api-review/analytics.api.md new file mode 100644 index 00000000000..091c3ffe7d3 --- /dev/null +++ b/common/api-review/analytics.api.md @@ -0,0 +1,410 @@ +## API Report File for "@firebase/analytics" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; + +// @public +export interface Analytics { + app: FirebaseApp; +} + +// @public +export interface AnalyticsCallOptions { + global: boolean; +} + +// @public +export interface AnalyticsSettings { + config?: GtagConfigParams | EventParams; +} + +// @public +export interface ControlParams { + // (undocumented) + event_callback?: () => void; + // (undocumented) + event_timeout?: number; + // (undocumented) + groups?: string | string[]; + // (undocumented) + send_to?: string | string[]; +} + +// @public +export type Currency = string | number; + +// @public +export type CustomEventName = T extends EventNameString ? never : T; + +// @public +export interface CustomParams { + // (undocumented) + [key: string]: unknown; +} + +// @public +export type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results'; + +// @public +export interface EventParams { + // (undocumented) + [key: string]: unknown; + // (undocumented) + affiliation?: string; + // (undocumented) + checkout_option?: string; + // (undocumented) + checkout_step?: number; + // (undocumented) + content_type?: string; + // (undocumented) + coupon?: string; + // (undocumented) + currency?: string; + // (undocumented) + description?: string; + // (undocumented) + event_category?: string; + // (undocumented) + event_label?: string; + // (undocumented) + fatal?: boolean; + firebase_screen?: string; + firebase_screen_class?: string; + // (undocumented) + item_id?: string; + // (undocumented) + item_list_id?: string; + // (undocumented) + item_list_name?: string; + // (undocumented) + items?: Item[]; + // (undocumented) + method?: string; + // (undocumented) + number?: string; + // (undocumented) + page_location?: string; + // (undocumented) + page_path?: string; + // (undocumented) + page_title?: string; + // (undocumented) + payment_type?: string; + // (undocumented) + promotion_id?: string; + // (undocumented) + promotion_name?: string; + // (undocumented) + promotions?: Promotion[]; + // (undocumented) + screen_name?: string; + // (undocumented) + search_term?: string; + // (undocumented) + shipping?: Currency; + // (undocumented) + shipping_tier?: string; + // (undocumented) + tax?: Currency; + // (undocumented) + transaction_id?: string; + // (undocumented) + value?: number; +} + +// @public +export function getAnalytics(app?: FirebaseApp): Analytics; + +// @public +export interface GtagConfigParams { + 'allow_google_signals?': boolean; + // (undocumented) + [key: string]: unknown; + 'allow_ad_personalization_signals'?: boolean; + 'cookie_domain'?: string; + 'cookie_expires'?: number; + 'cookie_flags'?: string; + 'cookie_prefix'?: string; + 'cookie_update'?: boolean; + 'page_location'?: string; + 'page_title'?: string; + 'send_page_view'?: boolean; +} + +// @public +export function initializeAnalytics(app: FirebaseApp, options?: AnalyticsSettings): Analytics; + +// @public +export function isSupported(): Promise; + +// @public +export interface Item { + // (undocumented) + affiliation?: string; + // @deprecated (undocumented) + brand?: string; + // @deprecated (undocumented) + category?: string; + // (undocumented) + coupon?: string; + // (undocumented) + creative_name?: string; + // (undocumented) + creative_slot?: string; + // (undocumented) + discount?: Currency; + // @deprecated (undocumented) + id?: string; + // (undocumented) + index?: number; + // (undocumented) + item_brand?: string; + // (undocumented) + item_category?: string; + // (undocumented) + item_category2?: string; + // (undocumented) + item_category3?: string; + // (undocumented) + item_category4?: string; + // (undocumented) + item_category5?: string; + // (undocumented) + item_id?: string; + // (undocumented) + item_list_id?: string; + // (undocumented) + item_list_name?: string; + // (undocumented) + item_name?: string; + // (undocumented) + item_variant?: string; + // (undocumented) + location_id?: string; + // @deprecated (undocumented) + name?: string; + // (undocumented) + price?: Currency; + // (undocumented) + promotion_id?: string; + // (undocumented) + promotion_name?: string; + // (undocumented) + quantity?: number; +} + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'add_payment_info', eventParams?: { + coupon?: EventParams['coupon']; + currency?: EventParams['currency']; + items?: EventParams['items']; + payment_type?: EventParams['payment_type']; + value?: EventParams['value']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'add_shipping_info', eventParams?: { + coupon?: EventParams['coupon']; + currency?: EventParams['currency']; + items?: EventParams['items']; + shipping_tier?: EventParams['shipping_tier']; + value?: EventParams['value']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: { + currency?: EventParams['currency']; + value?: EventParams['value']; + items?: EventParams['items']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'begin_checkout', eventParams?: { + currency?: EventParams['currency']; + coupon?: EventParams['coupon']; + value?: EventParams['value']; + items?: EventParams['items']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'checkout_progress', eventParams?: { + currency?: EventParams['currency']; + coupon?: EventParams['coupon']; + value?: EventParams['value']; + items?: EventParams['items']; + checkout_step?: EventParams['checkout_step']; + checkout_option?: EventParams['checkout_option']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'exception', eventParams?: { + description?: EventParams['description']; + fatal?: EventParams['fatal']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'generate_lead', eventParams?: { + value?: EventParams['value']; + currency?: EventParams['currency']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'login', eventParams?: { + method?: EventParams['method']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'page_view', eventParams?: { + page_title?: string; + page_location?: string; + page_path?: string; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'purchase' | 'refund', eventParams?: { + value?: EventParams['value']; + currency?: EventParams['currency']; + transaction_id: EventParams['transaction_id']; + tax?: EventParams['tax']; + shipping?: EventParams['shipping']; + items?: EventParams['items']; + coupon?: EventParams['coupon']; + affiliation?: EventParams['affiliation']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'screen_view', eventParams?: { + firebase_screen: EventParams['firebase_screen']; + firebase_screen_class: EventParams['firebase_screen_class']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'search' | 'view_search_results', eventParams?: { + search_term?: EventParams['search_term']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'select_content', eventParams?: { + content_type?: EventParams['content_type']; + item_id?: EventParams['item_id']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'select_item', eventParams?: { + items?: EventParams['items']; + item_list_name?: EventParams['item_list_name']; + item_list_id?: EventParams['item_list_id']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: { + items?: EventParams['items']; + promotion_id?: EventParams['promotion_id']; + promotion_name?: EventParams['promotion_name']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'set_checkout_option', eventParams?: { + checkout_step?: EventParams['checkout_step']; + checkout_option?: EventParams['checkout_option']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'share', eventParams?: { + method?: EventParams['method']; + content_type?: EventParams['content_type']; + item_id?: EventParams['item_id']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'sign_up', eventParams?: { + method?: EventParams['method']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'timing_complete', eventParams?: { + name: string; + value: number; + event_category?: string; + event_label?: string; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'view_cart' | 'view_item', eventParams?: { + currency?: EventParams['currency']; + items?: EventParams['items']; + value?: EventParams['value']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: 'view_item_list', eventParams?: { + items?: EventParams['items']; + item_list_name?: EventParams['item_list_name']; + item_list_id?: EventParams['item_list_id']; + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public +export function logEvent(analyticsInstance: Analytics, eventName: CustomEventName, eventParams?: { + [key: string]: any; +}, options?: AnalyticsCallOptions): void; + +// @public @deprecated +export interface Promotion { + // (undocumented) + creative_name?: string; + // (undocumented) + creative_slot?: string; + // (undocumented) + id?: string; + // (undocumented) + name?: string; +} + +// @public +export function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void; + +// @public +export function setCurrentScreen(analyticsInstance: Analytics, screenName: string, options?: AnalyticsCallOptions): void; + +// @public +export function settings(options: SettingsOptions): void; + +// @public +export interface SettingsOptions { + dataLayerName?: string; + gtagName?: string; +} + +// @public +export function setUserId(analyticsInstance: Analytics, id: string, options?: AnalyticsCallOptions): void; + +// @public +export function setUserProperties(analyticsInstance: Analytics, properties: CustomParams, options?: AnalyticsCallOptions): void; + + +``` diff --git a/common/api-review/app-check.api.md b/common/api-review/app-check.api.md new file mode 100644 index 00000000000..9623a51c9ad --- /dev/null +++ b/common/api-review/app-check.api.md @@ -0,0 +1,105 @@ +## API Report File for "@firebase/app-check" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; +import { PartialObserver } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export interface AppCheck { + app: FirebaseApp; +} + +// @internal (undocumented) +export type _AppCheckComponentName = 'app-check'; + +// @internal (undocumented) +export type _AppCheckInternalComponentName = 'app-check-internal'; + +// @public +export interface AppCheckOptions { + isTokenAutoRefreshEnabled?: boolean; + provider: CustomProvider | ReCaptchaV3Provider | ReCaptchaEnterpriseProvider; +} + +// @public +export interface AppCheckToken { + readonly expireTimeMillis: number; + // (undocumented) + readonly token: string; +} + +// @public +export type AppCheckTokenListener = (token: AppCheckTokenResult) => void; + +// @public +export interface AppCheckTokenResult { + readonly token: string; +} + +// Warning: (ae-forgotten-export) The symbol "AppCheckProvider" needs to be exported by the entry point index.d.ts +// +// @public +export class CustomProvider implements AppCheckProvider { + constructor(_customProviderOptions: CustomProviderOptions); + // Warning: (ae-forgotten-export) The symbol "AppCheckTokenInternal" needs to be exported by the entry point index.d.ts + // + // @internal (undocumented) + getToken(): Promise; + // @internal (undocumented) + initialize(app: FirebaseApp): void; + // @internal (undocumented) + isEqual(otherProvider: unknown): boolean; +} + +// @public +export interface CustomProviderOptions { + getToken: () => Promise; +} + +// @public +export function getToken(appCheckInstance: AppCheck, forceRefresh?: boolean): Promise; + +// @public +export function initializeAppCheck(app: FirebaseApp | undefined, options: AppCheckOptions): AppCheck; + +// @public +export function onTokenChanged(appCheckInstance: AppCheck, observer: PartialObserver): Unsubscribe; + +// @public +export function onTokenChanged(appCheckInstance: AppCheck, onNext: (tokenResult: AppCheckTokenResult) => void, onError?: (error: Error) => void, onCompletion?: () => void): Unsubscribe; + +export { PartialObserver } + +// @public +export class ReCaptchaEnterpriseProvider implements AppCheckProvider { + constructor(_siteKey: string); + // @internal + getToken(): Promise; + // @internal (undocumented) + initialize(app: FirebaseApp): void; + // @internal (undocumented) + isEqual(otherProvider: unknown): boolean; + } + +// @public +export class ReCaptchaV3Provider implements AppCheckProvider { + constructor(_siteKey: string); + // @internal + getToken(): Promise; + // @internal (undocumented) + initialize(app: FirebaseApp): void; + // @internal (undocumented) + isEqual(otherProvider: unknown): boolean; + } + +// @public +export function setTokenAutoRefreshEnabled(appCheckInstance: AppCheck, isTokenAutoRefreshEnabled: boolean): void; + +export { Unsubscribe } + + +``` diff --git a/common/api-review/app.api.md b/common/api-review/app.api.md new file mode 100644 index 00000000000..8d35bc4096f --- /dev/null +++ b/common/api-review/app.api.md @@ -0,0 +1,115 @@ +## API Report File for "@firebase/app" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Component } from '@firebase/component'; +import { ComponentContainer } from '@firebase/component'; +import { FirebaseError } from '@firebase/util'; +import { LogCallback } from '@firebase/logger'; +import { LogLevelString } from '@firebase/logger'; +import { LogOptions } from '@firebase/logger'; +import { Name } from '@firebase/component'; +import { Provider } from '@firebase/component'; + +// @internal (undocumented) +export function _addComponent(app: FirebaseApp, component: Component): void; + +// @internal (undocumented) +export function _addOrOverwriteComponent(app: FirebaseApp, component: Component): void; + +// @internal (undocumented) +export const _apps: Map; + +// @internal +export function _clearComponents(): void; + +// @internal +export const _components: Map>; + +// @internal +export const _DEFAULT_ENTRY_NAME = "[DEFAULT]"; + +// @public +export function deleteApp(app: FirebaseApp): Promise; + +// @public +export interface FirebaseApp { + automaticDataCollectionEnabled: boolean; + readonly name: string; + readonly options: FirebaseOptions; +} + +// @internal (undocumented) +export interface _FirebaseAppInternal extends FirebaseApp { + // (undocumented) + checkDestroyed(): void; + // (undocumented) + container: ComponentContainer; + // (undocumented) + isDeleted: boolean; +} + +// @public +export interface FirebaseAppSettings { + automaticDataCollectionEnabled?: boolean; + name?: string; +} + +export { FirebaseError } + +// @public +export interface FirebaseOptions { + apiKey?: string; + appId?: string; + authDomain?: string; + databaseURL?: string; + measurementId?: string; + messagingSenderId?: string; + projectId?: string; + storageBucket?: string; +} + +// @internal (undocumented) +export interface _FirebaseService { + // (undocumented) + app: FirebaseApp; + _delete(): Promise; +} + +// @public +export function getApp(name?: string): FirebaseApp; + +// @public +export function getApps(): FirebaseApp[]; + +// @internal (undocumented) +export function _getProvider(app: FirebaseApp, name: T): Provider; + +// @public +export function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp; + +// @public +export function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp; + +// @public +export function onLog(logCallback: LogCallback | null, options?: LogOptions): void; + +// @internal (undocumented) +export function _registerComponent(component: Component): boolean; + +// @public +export function registerVersion(libraryKeyOrName: string, version: string, variant?: string): void; + +// @internal (undocumented) +export function _removeServiceInstance(app: FirebaseApp, name: T, instanceIdentifier?: string): void; + +// @public +export const SDK_VERSION: string; + +// @public +export function setLogLevel(logLevel: LogLevelString): void; + + +``` diff --git a/common/api-review/auth.api.md b/common/api-review/auth.api.md new file mode 100644 index 00000000000..dd72fae445e --- /dev/null +++ b/common/api-review/auth.api.md @@ -0,0 +1,827 @@ +## API Report File for "@firebase/auth" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CompleteFn } from '@firebase/util'; +import { ErrorFactory } from '@firebase/util'; +import { ErrorFn } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseError } from '@firebase/util'; +import { NextFn } from '@firebase/util'; +import { Observer } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export interface ActionCodeInfo { + data: { + email?: string | null; + multiFactorInfo?: MultiFactorInfo | null; + previousEmail?: string | null; + }; + operation: typeof ActionCodeOperation[keyof typeof ActionCodeOperation]; +} + +// @public +export const ActionCodeOperation: { + readonly EMAIL_SIGNIN: "EMAIL_SIGNIN"; + readonly PASSWORD_RESET: "PASSWORD_RESET"; + readonly RECOVER_EMAIL: "RECOVER_EMAIL"; + readonly REVERT_SECOND_FACTOR_ADDITION: "REVERT_SECOND_FACTOR_ADDITION"; + readonly VERIFY_AND_CHANGE_EMAIL: "VERIFY_AND_CHANGE_EMAIL"; + readonly VERIFY_EMAIL: "VERIFY_EMAIL"; +}; + +// @public +export interface ActionCodeSettings { + android?: { + installApp?: boolean; + minimumVersion?: string; + packageName: string; + }; + dynamicLinkDomain?: string; + handleCodeInApp?: boolean; + iOS?: { + bundleId: string; + }; + url: string; +} + +// @public +export class ActionCodeURL { + // @internal + constructor(actionLink: string); + readonly apiKey: string; + readonly code: string; + readonly continueUrl: string | null; + readonly languageCode: string | null; + readonly operation: string; + static parseLink(link: string): ActionCodeURL | null; + readonly tenantId: string | null; +} + +// @public +export interface AdditionalUserInfo { + readonly isNewUser: boolean; + readonly profile: Record | null; + readonly providerId: string | null; + readonly username?: string | null; +} + +// @public +export interface ApplicationVerifier { + readonly type: string; + verify(): Promise; +} + +// @public +export function applyActionCode(auth: Auth, oobCode: string): Promise; + +// @public +export interface Auth { + readonly app: FirebaseApp; + readonly config: Config; + readonly currentUser: User | null; + readonly emulatorConfig: EmulatorConfig | null; + languageCode: string | null; + readonly name: string; + onAuthStateChanged(nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + onIdTokenChanged(nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + setPersistence(persistence: Persistence): Promise; + readonly settings: AuthSettings; + signOut(): Promise; + tenantId: string | null; + updateCurrentUser(user: User | null): Promise; + useDeviceLanguage(): void; +} + +// @public +export class AuthCredential { + // @internal + protected constructor( + providerId: string, + signInMethod: string); + // Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts + // + // @internal (undocumented) + _getIdTokenResponse(_auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(_auth: AuthInternal): Promise; + // Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts + // + // @internal (undocumented) + _linkToIdToken(_auth: AuthInternal, _idToken: string): Promise; + readonly providerId: string; + readonly signInMethod: string; + toJSON(): object; +} + +// @public +export interface AuthError extends FirebaseError { + readonly customData: { + readonly appName: string; + readonly email?: string; + readonly phoneNumber?: string; + readonly tenantId?: string; + }; +} + +// @public +export const AuthErrorCodes: { + readonly ADMIN_ONLY_OPERATION: "auth/admin-restricted-operation"; + readonly ARGUMENT_ERROR: "auth/argument-error"; + readonly APP_NOT_AUTHORIZED: "auth/app-not-authorized"; + readonly APP_NOT_INSTALLED: "auth/app-not-installed"; + readonly CAPTCHA_CHECK_FAILED: "auth/captcha-check-failed"; + readonly CODE_EXPIRED: "auth/code-expired"; + readonly CORDOVA_NOT_READY: "auth/cordova-not-ready"; + readonly CORS_UNSUPPORTED: "auth/cors-unsupported"; + readonly CREDENTIAL_ALREADY_IN_USE: "auth/credential-already-in-use"; + readonly CREDENTIAL_MISMATCH: "auth/custom-token-mismatch"; + readonly CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "auth/requires-recent-login"; + readonly DEPENDENT_SDK_INIT_BEFORE_AUTH: "auth/dependent-sdk-initialized-before-auth"; + readonly DYNAMIC_LINK_NOT_ACTIVATED: "auth/dynamic-link-not-activated"; + readonly EMAIL_CHANGE_NEEDS_VERIFICATION: "auth/email-change-needs-verification"; + readonly EMAIL_EXISTS: "auth/email-already-in-use"; + readonly EMULATOR_CONFIG_FAILED: "auth/emulator-config-failed"; + readonly EXPIRED_OOB_CODE: "auth/expired-action-code"; + readonly EXPIRED_POPUP_REQUEST: "auth/cancelled-popup-request"; + readonly INTERNAL_ERROR: "auth/internal-error"; + readonly INVALID_API_KEY: "auth/invalid-api-key"; + readonly INVALID_APP_CREDENTIAL: "auth/invalid-app-credential"; + readonly INVALID_APP_ID: "auth/invalid-app-id"; + readonly INVALID_AUTH: "auth/invalid-user-token"; + readonly INVALID_AUTH_EVENT: "auth/invalid-auth-event"; + readonly INVALID_CERT_HASH: "auth/invalid-cert-hash"; + readonly INVALID_CODE: "auth/invalid-verification-code"; + readonly INVALID_CONTINUE_URI: "auth/invalid-continue-uri"; + readonly INVALID_CORDOVA_CONFIGURATION: "auth/invalid-cordova-configuration"; + readonly INVALID_CUSTOM_TOKEN: "auth/invalid-custom-token"; + readonly INVALID_DYNAMIC_LINK_DOMAIN: "auth/invalid-dynamic-link-domain"; + readonly INVALID_EMAIL: "auth/invalid-email"; + readonly INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme"; + readonly INVALID_IDP_RESPONSE: "auth/invalid-credential"; + readonly INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload"; + readonly INVALID_MFA_SESSION: "auth/invalid-multi-factor-session"; + readonly INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id"; + readonly INVALID_OAUTH_PROVIDER: "auth/invalid-oauth-provider"; + readonly INVALID_OOB_CODE: "auth/invalid-action-code"; + readonly INVALID_ORIGIN: "auth/unauthorized-domain"; + readonly INVALID_PASSWORD: "auth/wrong-password"; + readonly INVALID_PERSISTENCE: "auth/invalid-persistence-type"; + readonly INVALID_PHONE_NUMBER: "auth/invalid-phone-number"; + readonly INVALID_PROVIDER_ID: "auth/invalid-provider-id"; + readonly INVALID_RECIPIENT_EMAIL: "auth/invalid-recipient-email"; + readonly INVALID_SENDER: "auth/invalid-sender"; + readonly INVALID_SESSION_INFO: "auth/invalid-verification-id"; + readonly INVALID_TENANT_ID: "auth/invalid-tenant-id"; + readonly MFA_INFO_NOT_FOUND: "auth/multi-factor-info-not-found"; + readonly MFA_REQUIRED: "auth/multi-factor-auth-required"; + readonly MISSING_ANDROID_PACKAGE_NAME: "auth/missing-android-pkg-name"; + readonly MISSING_APP_CREDENTIAL: "auth/missing-app-credential"; + readonly MISSING_AUTH_DOMAIN: "auth/auth-domain-config-required"; + readonly MISSING_CODE: "auth/missing-verification-code"; + readonly MISSING_CONTINUE_URI: "auth/missing-continue-uri"; + readonly MISSING_IFRAME_START: "auth/missing-iframe-start"; + readonly MISSING_IOS_BUNDLE_ID: "auth/missing-ios-bundle-id"; + readonly MISSING_OR_INVALID_NONCE: "auth/missing-or-invalid-nonce"; + readonly MISSING_MFA_INFO: "auth/missing-multi-factor-info"; + readonly MISSING_MFA_SESSION: "auth/missing-multi-factor-session"; + readonly MISSING_PHONE_NUMBER: "auth/missing-phone-number"; + readonly MISSING_SESSION_INFO: "auth/missing-verification-id"; + readonly MODULE_DESTROYED: "auth/app-deleted"; + readonly NEED_CONFIRMATION: "auth/account-exists-with-different-credential"; + readonly NETWORK_REQUEST_FAILED: "auth/network-request-failed"; + readonly NULL_USER: "auth/null-user"; + readonly NO_AUTH_EVENT: "auth/no-auth-event"; + readonly NO_SUCH_PROVIDER: "auth/no-such-provider"; + readonly OPERATION_NOT_ALLOWED: "auth/operation-not-allowed"; + readonly OPERATION_NOT_SUPPORTED: "auth/operation-not-supported-in-this-environment"; + readonly POPUP_BLOCKED: "auth/popup-blocked"; + readonly POPUP_CLOSED_BY_USER: "auth/popup-closed-by-user"; + readonly PROVIDER_ALREADY_LINKED: "auth/provider-already-linked"; + readonly QUOTA_EXCEEDED: "auth/quota-exceeded"; + readonly REDIRECT_CANCELLED_BY_USER: "auth/redirect-cancelled-by-user"; + readonly REDIRECT_OPERATION_PENDING: "auth/redirect-operation-pending"; + readonly REJECTED_CREDENTIAL: "auth/rejected-credential"; + readonly SECOND_FACTOR_ALREADY_ENROLLED: "auth/second-factor-already-in-use"; + readonly SECOND_FACTOR_LIMIT_EXCEEDED: "auth/maximum-second-factor-count-exceeded"; + readonly TENANT_ID_MISMATCH: "auth/tenant-id-mismatch"; + readonly TIMEOUT: "auth/timeout"; + readonly TOKEN_EXPIRED: "auth/user-token-expired"; + readonly TOO_MANY_ATTEMPTS_TRY_LATER: "auth/too-many-requests"; + readonly UNAUTHORIZED_DOMAIN: "auth/unauthorized-continue-uri"; + readonly UNSUPPORTED_FIRST_FACTOR: "auth/unsupported-first-factor"; + readonly UNSUPPORTED_PERSISTENCE: "auth/unsupported-persistence-type"; + readonly UNSUPPORTED_TENANT_OPERATION: "auth/unsupported-tenant-operation"; + readonly UNVERIFIED_EMAIL: "auth/unverified-email"; + readonly USER_CANCELLED: "auth/user-cancelled"; + readonly USER_DELETED: "auth/user-not-found"; + readonly USER_DISABLED: "auth/user-disabled"; + readonly USER_MISMATCH: "auth/user-mismatch"; + readonly USER_SIGNED_OUT: "auth/user-signed-out"; + readonly WEAK_PASSWORD: "auth/weak-password"; + readonly WEB_STORAGE_UNSUPPORTED: "auth/web-storage-unsupported"; + readonly ALREADY_INITIALIZED: "auth/already-initialized"; +}; + +// @public +export interface AuthErrorMap { +} + +// @public +export interface AuthProvider { + readonly providerId: string; +} + +// @public +export interface AuthSettings { + appVerificationDisabledForTesting: boolean; +} + +// @public +export const browserLocalPersistence: Persistence; + +// @public +export const browserPopupRedirectResolver: PopupRedirectResolver; + +// @public +export const browserSessionPersistence: Persistence; + +// @public +export function checkActionCode(auth: Auth, oobCode: string): Promise; + +export { CompleteFn } + +// @public +export interface Config { + apiHost: string; + apiKey: string; + apiScheme: string; + authDomain?: string; + sdkClientVersion: string; + tokenApiHost: string; +} + +// @public +export interface ConfirmationResult { + confirm(verificationCode: string): Promise; + readonly verificationId: string; +} + +// @public +export function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise; + +// @public +export function connectAuthEmulator(auth: Auth, url: string, options?: { + disableWarnings: boolean; +}): void; + +// @public +export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; + +// @public +export type CustomParameters = Record; + +// @public +export const debugErrorMap: AuthErrorMap; + +// @public +export function deleteUser(user: User): Promise; + +// @public +export interface Dependencies { + errorMap?: AuthErrorMap; + persistence?: Persistence | Persistence[]; + popupRedirectResolver?: PopupRedirectResolver; +} + +// @public +export class EmailAuthCredential extends AuthCredential { + // @internal (undocumented) + readonly _email: string; + // @internal (undocumented) + static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential; + // @internal (undocumented) + static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential; + static fromJSON(json: object | string): EmailAuthCredential | null; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + // @internal (undocumented) + readonly _password: string; + // @internal (undocumented) + readonly _tenantId: string | null; + toJSON(): object; +} + +// @public +export class EmailAuthProvider implements AuthProvider { + static credential(email: string, password: string): EmailAuthCredential; + static credentialWithLink(email: string, emailLink: string): EmailAuthCredential; + static readonly EMAIL_LINK_SIGN_IN_METHOD: 'emailLink'; + static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: 'password'; + static readonly PROVIDER_ID: 'password'; + readonly providerId: "password"; +} + +// @public +export interface EmulatorConfig { + readonly host: string; + readonly options: { + readonly disableWarnings: boolean; + }; + readonly port: number | null; + readonly protocol: string; +} + +export { ErrorFn } + +// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.d.ts +// +// @public +export class FacebookAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(accessToken: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly FACEBOOK_SIGN_IN_METHOD: 'facebook.com'; + static readonly PROVIDER_ID: 'facebook.com'; +} + +// @public +export const FactorId: { + readonly PHONE: "phone"; +}; + +// @public +export function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise; + +// @public +export function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null; + +// @public +export function getAuth(app?: FirebaseApp): Auth; + +// @public +export function getIdToken(user: User, forceRefresh?: boolean): Promise; + +// @public +export function getIdTokenResult(user: User, forceRefresh?: boolean): Promise; + +// @public +export function getMultiFactorResolver(auth: Auth, error: MultiFactorError): MultiFactorResolver; + +// @public +export function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver): Promise; + +// @public +export class GithubAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(accessToken: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly GITHUB_SIGN_IN_METHOD: 'github.com'; + static readonly PROVIDER_ID: 'github.com'; +} + +// @public +export class GoogleAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly GOOGLE_SIGN_IN_METHOD: 'google.com'; + static readonly PROVIDER_ID: 'google.com'; +} + +// @public +export interface IdTokenResult { + authTime: string; + claims: ParsedToken; + expirationTime: string; + issuedAtTime: string; + signInProvider: string | null; + signInSecondFactor: string | null; + token: string; +} + +// @public +export const indexedDBLocalPersistence: Persistence; + +// @public +export function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth; + +// @public +export const inMemoryPersistence: Persistence; + +// @public +export function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean; + +// @public +export function linkWithCredential(user: User, credential: AuthCredential): Promise; + +// @public +export function linkWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise; + +// @public +export function linkWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function multiFactor(user: User): MultiFactorUser; + +// @public +export interface MultiFactorAssertion { + readonly factorId: typeof FactorId[keyof typeof FactorId]; +} + +// @public +export interface MultiFactorError extends AuthError { + readonly customData: AuthError['customData'] & { + readonly operationType: typeof OperationType[keyof typeof OperationType]; + }; +} + +// @public +export interface MultiFactorInfo { + readonly displayName?: string | null; + readonly enrollmentTime: string; + readonly factorId: typeof FactorId[keyof typeof FactorId]; + readonly uid: string; +} + +// @public +export interface MultiFactorResolver { + readonly hints: MultiFactorInfo[]; + resolveSignIn(assertion: MultiFactorAssertion): Promise; + readonly session: MultiFactorSession; +} + +// @public +export interface MultiFactorSession { +} + +// @public +export interface MultiFactorUser { + enroll(assertion: MultiFactorAssertion, displayName?: string | null): Promise; + readonly enrolledFactors: MultiFactorInfo[]; + getSession(): Promise; + unenroll(option: MultiFactorInfo | string): Promise; +} + +export { NextFn } + +// @public +export type NextOrObserver = NextFn | Observer; + +// @public +export class OAuthCredential extends AuthCredential { + accessToken?: string; + static fromJSON(json: string | object): OAuthCredential | null; + // Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts + // + // @internal (undocumented) + static _fromParams(params: OAuthCredentialParams): OAuthCredential; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + idToken?: string; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + secret?: string; + toJSON(): object; +} + +// @public +export interface OAuthCredentialOptions { + accessToken?: string; + idToken?: string; + rawNonce?: string; +} + +// @public +export class OAuthProvider extends BaseOAuthProvider { + credential(params: OAuthCredentialOptions): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromJSON(json: object | string): OAuthCredential; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + } + +// @public +export function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + +// @public +export function onIdTokenChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + +// @public +export const OperationType: { + readonly LINK: "link"; + readonly REAUTHENTICATE: "reauthenticate"; + readonly SIGN_IN: "signIn"; +}; + +// @public +export function parseActionCodeURL(link: string): ActionCodeURL | null; + +// @public +export interface ParsedToken { + [key: string]: string | object | undefined; + 'auth_time'?: string; + 'exp'?: string; + 'firebase'?: { + 'sign_in_provider'?: string; + 'sign_in_second_factor'?: string; + }; + 'iat'?: string; + 'sub'?: string; +} + +// @public +export interface Persistence { + readonly type: 'SESSION' | 'LOCAL' | 'NONE'; +} + +// @public +export class PhoneAuthCredential extends AuthCredential { + static fromJSON(json: object | string): PhoneAuthCredential | null; + // @internal (undocumented) + static _fromTokenResponse(phoneNumber: string, temporaryProof: string): PhoneAuthCredential; + // @internal (undocumented) + static _fromVerification(verificationId: string, verificationCode: string): PhoneAuthCredential; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + // Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.d.ts + // + // @internal (undocumented) + _makeVerificationRequest(): SignInWithPhoneNumberRequest; + toJSON(): object; +} + +// @public +export class PhoneAuthProvider { + constructor(auth: Auth); + static credential(verificationId: string, verificationCode: string): PhoneAuthCredential; + static credentialFromError(error: FirebaseError): AuthCredential | null; + static credentialFromResult(userCredential: UserCredential): AuthCredential | null; + static readonly PHONE_SIGN_IN_METHOD: 'phone'; + static readonly PROVIDER_ID: 'phone'; + readonly providerId: "phone"; + verifyPhoneNumber(phoneOptions: PhoneInfoOptions | string, applicationVerifier: ApplicationVerifier): Promise; +} + +// @public +export type PhoneInfoOptions = PhoneSingleFactorInfoOptions | PhoneMultiFactorEnrollInfoOptions | PhoneMultiFactorSignInInfoOptions; + +// @public +export interface PhoneMultiFactorAssertion extends MultiFactorAssertion { +} + +// @public +export interface PhoneMultiFactorEnrollInfoOptions { + phoneNumber: string; + session: MultiFactorSession; +} + +// @public +export class PhoneMultiFactorGenerator { + static assertion(credential: PhoneAuthCredential): PhoneMultiFactorAssertion; + static FACTOR_ID: string; +} + +// @public +export interface PhoneMultiFactorInfo extends MultiFactorInfo { + readonly phoneNumber: string; +} + +// @public +export interface PhoneMultiFactorSignInInfoOptions { + multiFactorHint?: MultiFactorInfo; + multiFactorUid?: string; + session: MultiFactorSession; +} + +// @public +export interface PhoneSingleFactorInfoOptions { + phoneNumber: string; +} + +// @public +export interface PopupRedirectResolver { +} + +// @public +export const prodErrorMap: AuthErrorMap; + +// @public +export const ProviderId: { + readonly FACEBOOK: "facebook.com"; + readonly GITHUB: "github.com"; + readonly GOOGLE: "google.com"; + readonly PASSWORD: "password"; + readonly PHONE: "phone"; + readonly TWITTER: "twitter.com"; +}; + +// @public +export interface ReactNativeAsyncStorage { + getItem(key: string): Promise; + removeItem(key: string): Promise; + setItem(key: string, value: string): Promise; +} + +// @public +export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise; + +// @public +export function reauthenticateWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise; + +// @public +export function reauthenticateWithPopup(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export interface RecaptchaParameters { + // (undocumented) + [key: string]: any; +} + +// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.d.ts +// +// @public +export class RecaptchaVerifier implements ApplicationVerifierInternal { + constructor(containerOrId: HTMLElement | string, parameters: RecaptchaParameters, authExtern: Auth); + clear(): void; + // Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.d.ts + // + // @internal (undocumented) + readonly _recaptchaLoader: ReCaptchaLoader; + render(): Promise; + // @internal (undocumented) + _reset(): void; + readonly type = "recaptcha"; + verify(): Promise; + } + +// @public +export function reload(user: User): Promise; + +// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.d.ts +// +// @public +export class SAMLAuthProvider extends FederatedAuthProvider { + constructor(providerId: string); + static credentialFromError(error: FirebaseError): AuthCredential | null; + static credentialFromJSON(json: string | object): AuthCredential; + static credentialFromResult(userCredential: UserCredential): AuthCredential | null; + } + +// @public +export function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise; + +// @public +export function sendPasswordResetEmail(auth: Auth, email: string, actionCodeSettings?: ActionCodeSettings): Promise; + +// @public +export function sendSignInLinkToEmail(auth: Auth, email: string, actionCodeSettings: ActionCodeSettings): Promise; + +// @public +export function setPersistence(auth: Auth, persistence: Persistence): Promise; + +// @public +export function signInAnonymously(auth: Auth): Promise; + +// @public +export const SignInMethod: { + readonly EMAIL_LINK: "emailLink"; + readonly EMAIL_PASSWORD: "password"; + readonly FACEBOOK: "facebook.com"; + readonly GITHUB: "github.com"; + readonly GOOGLE: "google.com"; + readonly PHONE: "phone"; + readonly TWITTER: "twitter.com"; +}; + +// @public +export function signInWithCredential(auth: Auth, credential: AuthCredential): Promise; + +// @public +export function signInWithCustomToken(auth: Auth, customToken: string): Promise; + +// @public +export function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; + +// @public +export function signInWithEmailLink(auth: Auth, email: string, emailLink?: string): Promise; + +// @public +export function signInWithPhoneNumber(auth: Auth, phoneNumber: string, appVerifier: ApplicationVerifier): Promise; + +// @public +export function signInWithPopup(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function signOut(auth: Auth): Promise; + +// @public +export class TwitterAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(token: string, secret: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly PROVIDER_ID: 'twitter.com'; + static readonly TWITTER_SIGN_IN_METHOD: 'twitter.com'; +} + +// @public +export function unlink(user: User, providerId: string): Promise; + +export { Unsubscribe } + +// @public +export function updateCurrentUser(auth: Auth, user: User | null): Promise; + +// @public +export function updateEmail(user: User, newEmail: string): Promise; + +// @public +export function updatePassword(user: User, newPassword: string): Promise; + +// @public +export function updatePhoneNumber(user: User, credential: PhoneAuthCredential): Promise; + +// @public +export function updateProfile(user: User, { displayName, photoURL: photoUrl }: { + displayName?: string | null; + photoURL?: string | null; +}): Promise; + +// @public +export function useDeviceLanguage(auth: Auth): void; + +// @public +export interface User extends UserInfo { + delete(): Promise; + readonly emailVerified: boolean; + getIdToken(forceRefresh?: boolean): Promise; + getIdTokenResult(forceRefresh?: boolean): Promise; + readonly isAnonymous: boolean; + readonly metadata: UserMetadata; + readonly providerData: UserInfo[]; + readonly refreshToken: string; + reload(): Promise; + readonly tenantId: string | null; + toJSON(): object; +} + +// @public +export interface UserCredential { + operationType: typeof OperationType[keyof typeof OperationType]; + providerId: string | null; + user: User; +} + +// @public +export interface UserInfo { + readonly displayName: string | null; + readonly email: string | null; + readonly phoneNumber: string | null; + readonly photoURL: string | null; + readonly providerId: string; + readonly uid: string; +} + +// @public +export interface UserMetadata { + readonly creationTime?: string; + readonly lastSignInTime?: string; +} + +// @public +export type UserProfile = Record; + +// @public +export function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise; + +// @public +export function verifyPasswordResetCode(auth: Auth, code: string): Promise; + + +``` diff --git a/common/api-review/database.api.md b/common/api-review/database.api.md new file mode 100644 index 00000000000..6d0315dd25d --- /dev/null +++ b/common/api-review/database.api.md @@ -0,0 +1,240 @@ +## API Report File for "@firebase/database" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { EmulatorMockTokenOptions } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; + +// @public +export function child(parent: DatabaseReference, path: string): DatabaseReference; + +// @public +export function connectDatabaseEmulator(db: Database, host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; +}): void; + +// @public +export class Database { + readonly app: FirebaseApp; + readonly 'type' = "database"; +} + +// @public +export interface DatabaseReference extends Query { + readonly key: string | null; + readonly parent: DatabaseReference | null; + readonly root: DatabaseReference; +} + +// @public +export class DataSnapshot { + child(path: string): DataSnapshot; + exists(): boolean; + exportVal(): any; + forEach(action: (child: DataSnapshot) => boolean | void): boolean; + hasChild(path: string): boolean; + hasChildren(): boolean; + get key(): string | null; + get priority(): string | number | null; + readonly ref: DatabaseReference; + get size(): number; + toJSON(): object | null; + val(): any; +} + +export { EmulatorMockTokenOptions } + +// @public +export function enableLogging(enabled: boolean, persistent?: boolean): any; + +// @public +export function enableLogging(logger: (message: string) => unknown): any; + +// @public +export function endAt(value: number | string | boolean | null, key?: string): QueryConstraint; + +// @public +export function endBefore(value: number | string | boolean | null, key?: string): QueryConstraint; + +// @public +export function equalTo(value: number | string | boolean | null, key?: string): QueryConstraint; + +// @public +export type EventType = 'value' | 'child_added' | 'child_changed' | 'child_moved' | 'child_removed'; + +// @public +export function get(query: Query): Promise; + +// @public +export function getDatabase(app?: FirebaseApp, url?: string): Database; + +// @public +export function goOffline(db: Database): void; + +// @public +export function goOnline(db: Database): void; + +// @public +export function increment(delta: number): object; + +// @public +export function limitToFirst(limit: number): QueryConstraint; + +// @public +export function limitToLast(limit: number): QueryConstraint; + +// @public +export interface ListenOptions { + readonly onlyOnce?: boolean; +} + +// @public +export function off(query: Query, eventType?: EventType, callback?: (snapshot: DataSnapshot, previousChildName?: string | null) => unknown): void; + +// @public +export function onChildAdded(query: Query, callback: (snapshot: DataSnapshot, previousChildName?: string | null) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; + +// @public +export function onChildAdded(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildAdded(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildChanged(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; + +// @public +export function onChildChanged(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildChanged(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildMoved(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; + +// @public +export function onChildMoved(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildMoved(query: Query, callback: (snapshot: DataSnapshot, previousChildName: string | null) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; + +// @public +export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export class OnDisconnect { + cancel(): Promise; + remove(): Promise; + set(value: unknown): Promise; + setWithPriority(value: unknown, priority: number | string | null): Promise; + update(values: object): Promise; +} + +// @public +export function onDisconnect(ref: DatabaseReference): OnDisconnect; + +// @public +export function onValue(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback?: (error: Error) => unknown): Unsubscribe; + +// @public +export function onValue(query: Query, callback: (snapshot: DataSnapshot) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function onValue(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe; + +// @public +export function orderByChild(path: string): QueryConstraint; + +// @public +export function orderByKey(): QueryConstraint; + +// @public +export function orderByPriority(): QueryConstraint; + +// @public +export function orderByValue(): QueryConstraint; + +// @public +export function push(parent: DatabaseReference, value?: unknown): ThenableReference; + +// @public +export interface Query { + isEqual(other: Query | null): boolean; + readonly ref: DatabaseReference; + toJSON(): string; + toString(): string; +} + +// @public +export function query(query: Query, ...queryConstraints: QueryConstraint[]): Query; + +// @public +export abstract class QueryConstraint { + abstract readonly type: QueryConstraintType; +} + +// @public +export type QueryConstraintType = 'endAt' | 'endBefore' | 'startAt' | 'startAfter' | 'limitToFirst' | 'limitToLast' | 'orderByChild' | 'orderByKey' | 'orderByPriority' | 'orderByValue' | 'equalTo'; + +// @public +export function ref(db: Database, path?: string): DatabaseReference; + +// @public +export function refFromURL(db: Database, url: string): DatabaseReference; + +// @public +export function remove(ref: DatabaseReference): Promise; + +// @public +export function runTransaction(ref: DatabaseReference, transactionUpdate: (currentData: any) => unknown, options?: TransactionOptions): Promise; + +// @public +export function serverTimestamp(): object; + +// @public +export function set(ref: DatabaseReference, value: unknown): Promise; + +// @public +export function setPriority(ref: DatabaseReference, priority: string | number | null): Promise; + +// @public +export function setWithPriority(ref: DatabaseReference, value: unknown, priority: string | number | null): Promise; + +// @public +export function startAfter(value: number | string | boolean | null, key?: string): QueryConstraint; + +// @public +export function startAt(value?: number | string | boolean | null, key?: string): QueryConstraint; + +// @public +export interface ThenableReference extends DatabaseReference, Pick, 'then' | 'catch'> { +} + +// @public +export interface TransactionOptions { + readonly applyLocally?: boolean; +} + +// @public +export class TransactionResult { + readonly committed: boolean; + readonly snapshot: DataSnapshot; + toJSON(): object; +} + +// @public +export type Unsubscribe = () => void; + +// @public +export function update(ref: DatabaseReference, values: object): Promise; + + +``` diff --git a/common/api-review/firestore-lite.api.md b/common/api-review/firestore-lite.api.md new file mode 100644 index 00000000000..db2e44f8cbd --- /dev/null +++ b/common/api-review/firestore-lite.api.md @@ -0,0 +1,373 @@ +## API Report File for "@firebase/firestore-lite" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { EmulatorMockTokenOptions } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseError } from '@firebase/util'; +import { LogLevelString as LogLevel } from '@firebase/logger'; + +// @public +export function addDoc(reference: CollectionReference, data: WithFieldValue): Promise>; + +// @public +export type AddPrefixToKeys> = { + [K in keyof T & string as `${Prefix}.${K}`]+?: T[K]; +}; + +// @public +export function arrayRemove(...elements: unknown[]): FieldValue; + +// @public +export function arrayUnion(...elements: unknown[]): FieldValue; + +// @public +export class Bytes { + static fromBase64String(base64: string): Bytes; + static fromUint8Array(array: Uint8Array): Bytes; + isEqual(other: Bytes): boolean; + toBase64(): string; + toString(): string; + toUint8Array(): Uint8Array; +} + +// @public +export type ChildUpdateFields = V extends Record ? AddPrefixToKeys> : never; + +// @public +export function collection(firestore: Firestore, path: string, ...pathSegments: string[]): CollectionReference; + +// @public +export function collection(reference: CollectionReference, path: string, ...pathSegments: string[]): CollectionReference; + +// @public +export function collection(reference: DocumentReference, path: string, ...pathSegments: string[]): CollectionReference; + +// @public +export function collectionGroup(firestore: Firestore, collectionId: string): Query; + +// @public +export class CollectionReference extends Query { + get id(): string; + get parent(): DocumentReference | null; + get path(): string; + readonly type = "collection"; + withConverter(converter: FirestoreDataConverter): CollectionReference; + withConverter(converter: null): CollectionReference; +} + +// @public +export function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; +}): void; + +// @public +export function deleteDoc(reference: DocumentReference): Promise; + +// @public +export function deleteField(): FieldValue; + +// @public +export function doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference; + +// @public +export function doc(reference: CollectionReference, path?: string, ...pathSegments: string[]): DocumentReference; + +// @public +export function doc(reference: DocumentReference, path: string, ...pathSegments: string[]): DocumentReference; + +// @public +export interface DocumentData { + [field: string]: any; +} + +// @public +export function documentId(): FieldPath; + +// @public +export class DocumentReference { + readonly converter: FirestoreDataConverter | null; + readonly firestore: Firestore; + get id(): string; + get parent(): CollectionReference; + get path(): string; + readonly type = "document"; + withConverter(converter: FirestoreDataConverter): DocumentReference; + withConverter(converter: null): DocumentReference; +} + +// @public +export class DocumentSnapshot { + protected constructor(); + data(): T | undefined; + exists(): this is QueryDocumentSnapshot; + get(fieldPath: string | FieldPath): any; + get id(): string; + get ref(): DocumentReference; +} + +export { EmulatorMockTokenOptions } + +// @public +export function endAt(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function endAt(...fieldValues: unknown[]): QueryConstraint; + +// @public +export function endBefore(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function endBefore(...fieldValues: unknown[]): QueryConstraint; + +// @public +export class FieldPath { + constructor(...fieldNames: string[]); + isEqual(other: FieldPath): boolean; +} + +// @public +export abstract class FieldValue { + abstract isEqual(other: FieldValue): boolean; +} + +// @public +export class Firestore { + get app(): FirebaseApp; + toJSON(): object; + type: 'firestore-lite' | 'firestore'; +} + +// @public +export interface FirestoreDataConverter { + fromFirestore(snapshot: QueryDocumentSnapshot): T; + toFirestore(modelObject: WithFieldValue): DocumentData; + toFirestore(modelObject: PartialWithFieldValue, options: SetOptions): DocumentData; +} + +// @public +export class FirestoreError extends FirebaseError { + readonly code: FirestoreErrorCode; + readonly message: string; + readonly stack?: string; +} + +// @public +export type FirestoreErrorCode = 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; + +// @public +export class GeoPoint { + constructor(latitude: number, longitude: number); + isEqual(other: GeoPoint): boolean; + get latitude(): number; + get longitude(): number; + toJSON(): { + latitude: number; + longitude: number; + }; +} + +// @public +export function getDoc(reference: DocumentReference): Promise>; + +// @public +export function getDocs(query: Query): Promise>; + +// @public +export function getFirestore(app?: FirebaseApp): Firestore; + +// @public +export function increment(n: number): FieldValue; + +// @public +export function initializeFirestore(app: FirebaseApp, settings: Settings): Firestore; + +// @public +export function limit(limit: number): QueryConstraint; + +// @public +export function limitToLast(limit: number): QueryConstraint; + +export { LogLevel } + +// @public +export type NestedUpdateFields> = UnionToIntersection<{ + [K in keyof T & string]: ChildUpdateFields; +}[keyof T & string]>; + +// @public +export function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryConstraint; + +// @public +export type OrderByDirection = 'desc' | 'asc'; + +// @public +export type PartialWithFieldValue = Partial | (T extends Primitive ? T : T extends {} ? { + [K in keyof T]?: PartialWithFieldValue | FieldValue; +} : never); + +// @public +export type Primitive = string | number | boolean | undefined | null; + +// @public +export class Query { + protected constructor(); + readonly converter: FirestoreDataConverter | null; + readonly firestore: Firestore; + readonly type: 'query' | 'collection'; + withConverter(converter: null): Query; + withConverter(converter: FirestoreDataConverter): Query; +} + +// @public +export function query(query: Query, ...queryConstraints: QueryConstraint[]): Query; + +// @public +export abstract class QueryConstraint { + abstract readonly type: QueryConstraintType; +} + +// @public +export type QueryConstraintType = 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore'; + +// @public +export class QueryDocumentSnapshot extends DocumentSnapshot { + // @override + data(): T; +} + +// @public +export function queryEqual(left: Query, right: Query): boolean; + +// @public +export class QuerySnapshot { + get docs(): Array>; + get empty(): boolean; + forEach(callback: (result: QueryDocumentSnapshot) => void, thisArg?: unknown): void; + readonly query: Query; + get size(): number; +} + +// @public +export function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; + +// @public +export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise): Promise; + +// @public +export function serverTimestamp(): FieldValue; + +// @public +export function setDoc(reference: DocumentReference, data: WithFieldValue): Promise; + +// @public +export function setDoc(reference: DocumentReference, data: PartialWithFieldValue, options: SetOptions): Promise; + +// @public +export function setLogLevel(logLevel: LogLevel): void; + +// @public +export type SetOptions = { + readonly merge?: boolean; +} | { + readonly mergeFields?: Array; +}; + +// @public +export interface Settings { + host?: string; + ignoreUndefinedProperties?: boolean; + ssl?: boolean; +} + +// @public +export function snapshotEqual(left: DocumentSnapshot | QuerySnapshot, right: DocumentSnapshot | QuerySnapshot): boolean; + +// @public +export function startAfter(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function startAfter(...fieldValues: unknown[]): QueryConstraint; + +// @public +export function startAt(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function startAt(...fieldValues: unknown[]): QueryConstraint; + +// @public +export function terminate(firestore: Firestore): Promise; + +// @public +export class Timestamp { + constructor( + seconds: number, + nanoseconds: number); + static fromDate(date: Date): Timestamp; + static fromMillis(milliseconds: number): Timestamp; + isEqual(other: Timestamp): boolean; + readonly nanoseconds: number; + static now(): Timestamp; + readonly seconds: number; + toDate(): Date; + toJSON(): { + seconds: number; + nanoseconds: number; + }; + toMillis(): number; + toString(): string; + valueOf(): string; +} + +// @public +export class Transaction { + delete(documentRef: DocumentReference): this; + get(documentRef: DocumentReference): Promise>; + set(documentRef: DocumentReference, data: WithFieldValue): this; + set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): this; + update(documentRef: DocumentReference, data: UpdateData): this; + update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; +} + +// @public +export type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; + +// @public +export type UpdateData = T extends Primitive ? T : T extends {} ? { + [K in keyof T]?: UpdateData | FieldValue; +} & NestedUpdateFields : Partial; + +// @public +export function updateDoc(reference: DocumentReference, data: UpdateData): Promise; + +// @public +export function updateDoc(reference: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise; + +// @public +export function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryConstraint; + +// @public +export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in'; + +// @public +export type WithFieldValue = T | (T extends Primitive ? T : T extends {} ? { + [K in keyof T]: WithFieldValue | FieldValue; +} : never); + +// @public +export class WriteBatch { + commit(): Promise; + delete(documentRef: DocumentReference): WriteBatch; + set(documentRef: DocumentReference, data: WithFieldValue): WriteBatch; + set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): WriteBatch; + update(documentRef: DocumentReference, data: UpdateData): WriteBatch; + update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; +} + +// @public +export function writeBatch(firestore: Firestore): WriteBatch; + + +``` diff --git a/common/api-review/firestore.api.md b/common/api-review/firestore.api.md new file mode 100644 index 00000000000..534c9f451d5 --- /dev/null +++ b/common/api-review/firestore.api.md @@ -0,0 +1,525 @@ +## API Report File for "@firebase/firestore" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { EmulatorMockTokenOptions } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseError } from '@firebase/util'; +import { LogLevelString as LogLevel } from '@firebase/logger'; + +// @public +export function addDoc(reference: CollectionReference, data: WithFieldValue): Promise>; + +// @public +export type AddPrefixToKeys> = { + [K in keyof T & string as `${Prefix}.${K}`]+?: T[K]; +}; + +// @public +export function arrayRemove(...elements: unknown[]): FieldValue; + +// @public +export function arrayUnion(...elements: unknown[]): FieldValue; + +// @public +export class Bytes { + static fromBase64String(base64: string): Bytes; + static fromUint8Array(array: Uint8Array): Bytes; + isEqual(other: Bytes): boolean; + toBase64(): string; + toString(): string; + toUint8Array(): Uint8Array; +} + +// @public +export const CACHE_SIZE_UNLIMITED = -1; + +// @public +export type ChildUpdateFields = V extends Record ? AddPrefixToKeys> : never; + +// @public +export function clearIndexedDbPersistence(firestore: Firestore): Promise; + +// @public +export function collection(firestore: Firestore, path: string, ...pathSegments: string[]): CollectionReference; + +// @public +export function collection(reference: CollectionReference, path: string, ...pathSegments: string[]): CollectionReference; + +// @public +export function collection(reference: DocumentReference, path: string, ...pathSegments: string[]): CollectionReference; + +// @public +export function collectionGroup(firestore: Firestore, collectionId: string): Query; + +// @public +export class CollectionReference extends Query { + get id(): string; + get parent(): DocumentReference | null; + get path(): string; + readonly type = "collection"; + withConverter(converter: FirestoreDataConverter): CollectionReference; + withConverter(converter: null): CollectionReference; +} + +// @public +export function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; +}): void; + +// @public +export function deleteDoc(reference: DocumentReference): Promise; + +// @public +export function deleteField(): FieldValue; + +// @public +export function disableNetwork(firestore: Firestore): Promise; + +// @public +export function doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference; + +// @public +export function doc(reference: CollectionReference, path?: string, ...pathSegments: string[]): DocumentReference; + +// @public +export function doc(reference: DocumentReference, path: string, ...pathSegments: string[]): DocumentReference; + +// @public +export interface DocumentChange { + readonly doc: QueryDocumentSnapshot; + readonly newIndex: number; + readonly oldIndex: number; + readonly type: DocumentChangeType; +} + +// @public +export type DocumentChangeType = 'added' | 'removed' | 'modified'; + +// @public +export interface DocumentData { + [field: string]: any; +} + +// @public +export function documentId(): FieldPath; + +// @public +export class DocumentReference { + readonly converter: FirestoreDataConverter | null; + readonly firestore: Firestore; + get id(): string; + get parent(): CollectionReference; + get path(): string; + readonly type = "document"; + withConverter(converter: FirestoreDataConverter): DocumentReference; + withConverter(converter: null): DocumentReference; +} + +// @public +export class DocumentSnapshot { + protected constructor(); + data(options?: SnapshotOptions): T | undefined; + exists(): this is QueryDocumentSnapshot; + get(fieldPath: string | FieldPath, options?: SnapshotOptions): any; + get id(): string; + readonly metadata: SnapshotMetadata; + get ref(): DocumentReference; +} + +export { EmulatorMockTokenOptions } + +// @public +export function enableIndexedDbPersistence(firestore: Firestore, persistenceSettings?: PersistenceSettings): Promise; + +// @public +export function enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise; + +// @public +export function enableNetwork(firestore: Firestore): Promise; + +// @public +export function endAt(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function endAt(...fieldValues: unknown[]): QueryConstraint; + +// @public +export function endBefore(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function endBefore(...fieldValues: unknown[]): QueryConstraint; + +// @public +export class FieldPath { + constructor(...fieldNames: string[]); + isEqual(other: FieldPath): boolean; +} + +// @public +export abstract class FieldValue { + abstract isEqual(other: FieldValue): boolean; +} + +// @public +export class Firestore { + get app(): FirebaseApp; + toJSON(): object; + type: 'firestore-lite' | 'firestore'; +} + +// @public +export interface FirestoreDataConverter { + fromFirestore(snapshot: QueryDocumentSnapshot, options?: SnapshotOptions): T; + toFirestore(modelObject: WithFieldValue): DocumentData; + toFirestore(modelObject: PartialWithFieldValue, options: SetOptions): DocumentData; +} + +// @public +export class FirestoreError extends FirebaseError { + readonly code: FirestoreErrorCode; + readonly message: string; + readonly stack?: string; +} + +// @public +export type FirestoreErrorCode = 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; + +// @public +export interface FirestoreSettings { + cacheSizeBytes?: number; + experimentalAutoDetectLongPolling?: boolean; + experimentalForceLongPolling?: boolean; + host?: string; + ignoreUndefinedProperties?: boolean; + ssl?: boolean; +} + +// @public +export class GeoPoint { + constructor(latitude: number, longitude: number); + isEqual(other: GeoPoint): boolean; + get latitude(): number; + get longitude(): number; + toJSON(): { + latitude: number; + longitude: number; + }; +} + +// @public +export function getDoc(reference: DocumentReference): Promise>; + +// @public +export function getDocFromCache(reference: DocumentReference): Promise>; + +// @public +export function getDocFromServer(reference: DocumentReference): Promise>; + +// @public +export function getDocs(query: Query): Promise>; + +// @public +export function getDocsFromCache(query: Query): Promise>; + +// @public +export function getDocsFromServer(query: Query): Promise>; + +// @public +export function getFirestore(app?: FirebaseApp): Firestore; + +// @public +export function increment(n: number): FieldValue; + +// @public +export function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore; + +// @public +export function limit(limit: number): QueryConstraint; + +// @public +export function limitToLast(limit: number): QueryConstraint; + +// @public +export function loadBundle(firestore: Firestore, bundleData: ReadableStream | ArrayBuffer | string): LoadBundleTask; + +// @public +export class LoadBundleTask implements PromiseLike { + catch(onRejected: (a: Error) => R | PromiseLike): Promise; + onProgress(next?: (progress: LoadBundleTaskProgress) => unknown, error?: (err: Error) => unknown, complete?: () => void): void; + then(onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike, onRejected?: (a: Error) => R | PromiseLike): Promise; +} + +// @public +export interface LoadBundleTaskProgress { + bytesLoaded: number; + documentsLoaded: number; + taskState: TaskState; + totalBytes: number; + totalDocuments: number; +} + +export { LogLevel } + +// @public +export function namedQuery(firestore: Firestore, name: string): Promise; + +// @public +export type NestedUpdateFields> = UnionToIntersection<{ + [K in keyof T & string]: ChildUpdateFields; +}[keyof T & string]>; + +// @public +export function onSnapshot(reference: DocumentReference, observer: { + next?: (snapshot: DocumentSnapshot) => void; + error?: (error: FirestoreError) => void; + complete?: () => void; +}): Unsubscribe; + +// @public +export function onSnapshot(reference: DocumentReference, options: SnapshotListenOptions, observer: { + next?: (snapshot: DocumentSnapshot) => void; + error?: (error: FirestoreError) => void; + complete?: () => void; +}): Unsubscribe; + +// @public +export function onSnapshot(reference: DocumentReference, onNext: (snapshot: DocumentSnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; + +// @public +export function onSnapshot(reference: DocumentReference, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; + +// @public +export function onSnapshot(query: Query, observer: { + next?: (snapshot: QuerySnapshot) => void; + error?: (error: FirestoreError) => void; + complete?: () => void; +}): Unsubscribe; + +// @public +export function onSnapshot(query: Query, options: SnapshotListenOptions, observer: { + next?: (snapshot: QuerySnapshot) => void; + error?: (error: FirestoreError) => void; + complete?: () => void; +}): Unsubscribe; + +// @public +export function onSnapshot(query: Query, onNext: (snapshot: QuerySnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; + +// @public +export function onSnapshot(query: Query, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe; + +// @public +export function onSnapshotsInSync(firestore: Firestore, observer: { + next?: (value: void) => void; + error?: (error: FirestoreError) => void; + complete?: () => void; +}): Unsubscribe; + +// @public +export function onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe; + +// @public +export function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryConstraint; + +// @public +export type OrderByDirection = 'desc' | 'asc'; + +// @public +export type PartialWithFieldValue = Partial | (T extends Primitive ? T : T extends {} ? { + [K in keyof T]?: PartialWithFieldValue | FieldValue; +} : never); + +// @public +export interface PersistenceSettings { + forceOwnership?: boolean; +} + +// @public +export type Primitive = string | number | boolean | undefined | null; + +// @public +export class Query { + protected constructor(); + readonly converter: FirestoreDataConverter | null; + readonly firestore: Firestore; + readonly type: 'query' | 'collection'; + withConverter(converter: null): Query; + withConverter(converter: FirestoreDataConverter): Query; +} + +// @public +export function query(query: Query, ...queryConstraints: QueryConstraint[]): Query; + +// @public +export abstract class QueryConstraint { + abstract readonly type: QueryConstraintType; +} + +// @public +export type QueryConstraintType = 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore'; + +// @public +export class QueryDocumentSnapshot extends DocumentSnapshot { + // @override + data(options?: SnapshotOptions): T; +} + +// @public +export function queryEqual(left: Query, right: Query): boolean; + +// @public +export class QuerySnapshot { + docChanges(options?: SnapshotListenOptions): Array>; + get docs(): Array>; + get empty(): boolean; + forEach(callback: (result: QueryDocumentSnapshot) => void, thisArg?: unknown): void; + readonly metadata: SnapshotMetadata; + readonly query: Query; + get size(): number; +} + +// @public +export function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; + +// @public +export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise): Promise; + +// @public +export function serverTimestamp(): FieldValue; + +// @public +export function setDoc(reference: DocumentReference, data: WithFieldValue): Promise; + +// @public +export function setDoc(reference: DocumentReference, data: PartialWithFieldValue, options: SetOptions): Promise; + +// @public +export function setLogLevel(logLevel: LogLevel): void; + +// @public +export type SetOptions = { + readonly merge?: boolean; +} | { + readonly mergeFields?: Array; +}; + +// @public +export function snapshotEqual(left: DocumentSnapshot | QuerySnapshot, right: DocumentSnapshot | QuerySnapshot): boolean; + +// @public +export interface SnapshotListenOptions { + readonly includeMetadataChanges?: boolean; +} + +// @public +export class SnapshotMetadata { + readonly fromCache: boolean; + readonly hasPendingWrites: boolean; + isEqual(other: SnapshotMetadata): boolean; +} + +// @public +export interface SnapshotOptions { + readonly serverTimestamps?: 'estimate' | 'previous' | 'none'; +} + +// @public +export function startAfter(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function startAfter(...fieldValues: unknown[]): QueryConstraint; + +// @public +export function startAt(snapshot: DocumentSnapshot): QueryConstraint; + +// @public +export function startAt(...fieldValues: unknown[]): QueryConstraint; + +// @public +export type TaskState = 'Error' | 'Running' | 'Success'; + +// @public +export function terminate(firestore: Firestore): Promise; + +// @public +export class Timestamp { + constructor( + seconds: number, + nanoseconds: number); + static fromDate(date: Date): Timestamp; + static fromMillis(milliseconds: number): Timestamp; + isEqual(other: Timestamp): boolean; + readonly nanoseconds: number; + static now(): Timestamp; + readonly seconds: number; + toDate(): Date; + toJSON(): { + seconds: number; + nanoseconds: number; + }; + toMillis(): number; + toString(): string; + valueOf(): string; +} + +// @public +export class Transaction { + delete(documentRef: DocumentReference): this; + get(documentRef: DocumentReference): Promise>; + set(documentRef: DocumentReference, data: WithFieldValue): this; + set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): this; + update(documentRef: DocumentReference, data: UpdateData): this; + update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; +} + +// @public +export type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; + +// @public +export interface Unsubscribe { + (): void; +} + +// @public +export type UpdateData = T extends Primitive ? T : T extends {} ? { + [K in keyof T]?: UpdateData | FieldValue; +} & NestedUpdateFields : Partial; + +// @public +export function updateDoc(reference: DocumentReference, data: UpdateData): Promise; + +// @public +export function updateDoc(reference: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise; + +// @public +export function waitForPendingWrites(firestore: Firestore): Promise; + +// @public +export function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryConstraint; + +// @public +export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in'; + +// @public +export type WithFieldValue = T | (T extends Primitive ? T : T extends {} ? { + [K in keyof T]: WithFieldValue | FieldValue; +} : never); + +// @public +export class WriteBatch { + commit(): Promise; + delete(documentRef: DocumentReference): WriteBatch; + set(documentRef: DocumentReference, data: WithFieldValue): WriteBatch; + set(documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions): WriteBatch; + update(documentRef: DocumentReference, data: UpdateData): WriteBatch; + update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch; +} + +// @public +export function writeBatch(firestore: Firestore): WriteBatch; + + +``` diff --git a/common/api-review/functions.api.md b/common/api-review/functions.api.md new file mode 100644 index 00000000000..8c68b578020 --- /dev/null +++ b/common/api-review/functions.api.md @@ -0,0 +1,52 @@ +## API Report File for "@firebase/functions" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; +import { FirebaseError } from '@firebase/util'; + +// @public +export function connectFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void; + +// @public +export interface Functions { + app: FirebaseApp; + customDomain: string | null; + region: string; +} + +// @public +export interface FunctionsError extends FirebaseError { + readonly code: FunctionsErrorCode; + readonly details?: unknown; +} + +// @public +export type FunctionsErrorCode = 'ok' | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; + +// @public +export function getFunctions(app?: FirebaseApp, regionOrCustomDomain?: string): Functions; + +// @public +export type HttpsCallable = (data?: RequestData | null) => Promise>; + +// @public +export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable; + +// @public +export function httpsCallableFromURL(functionsInstance: Functions, url: string, options?: HttpsCallableOptions): HttpsCallable; + +// @public +export interface HttpsCallableOptions { + timeout?: number; +} + +// @public +export interface HttpsCallableResult { + readonly data: ResponseData; +} + + +``` diff --git a/common/api-review/installations.api.md b/common/api-review/installations.api.md new file mode 100644 index 00000000000..2df6c545fd2 --- /dev/null +++ b/common/api-review/installations.api.md @@ -0,0 +1,42 @@ +## API Report File for "@firebase/installations" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; + +// @public +export function deleteInstallations(installations: Installations): Promise; + +// @internal +export interface _FirebaseInstallationsInternal { + getId(): Promise; + getToken(forceRefresh?: boolean): Promise; +} + +// @public +export function getId(installations: Installations): Promise; + +// @public +export function getInstallations(app?: FirebaseApp): Installations; + +// @public +export function getToken(installations: Installations, forceRefresh?: boolean): Promise; + +// @public +export type IdChangeCallbackFn = (installationId: string) => void; + +// @public +export type IdChangeUnsubscribeFn = () => void; + +// @public +export interface Installations { + app: FirebaseApp; +} + +// @public +export function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn; + + +``` diff --git a/common/api-review/messaging-sw.api.md b/common/api-review/messaging-sw.api.md new file mode 100644 index 00000000000..88150fd0cc5 --- /dev/null +++ b/common/api-review/messaging-sw.api.md @@ -0,0 +1,69 @@ +## API Report File for "@firebase/messaging-sw" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; +import { NextFn } from '@firebase/util'; +import { Observer } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void; + +// @public +export interface FcmOptions { + analyticsLabel?: string; + link?: string; +} + +// @public +export function getMessaging(app?: FirebaseApp): Messaging; + +// @public +export interface GetTokenOptions { + serviceWorkerRegistration?: ServiceWorkerRegistration; + vapidKey?: string; +} + +// @public +export function isSupported(): Promise; + +// @public +export interface MessagePayload { + collapseKey: string; + data?: { + [key: string]: string; + }; + fcmOptions?: FcmOptions; + from: string; + messageId: string; + notification?: NotificationPayload; +} + +// @public +export interface Messaging { + app: FirebaseApp; +} + +export { NextFn } + +// @public +export interface NotificationPayload { + body?: string; + image?: string; + title?: string; +} + +export { Observer } + +// @public +export function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn | Observer): Unsubscribe; + +export { Unsubscribe } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/common/api-review/messaging.api.md b/common/api-review/messaging.api.md new file mode 100644 index 00000000000..e48cecb6871 --- /dev/null +++ b/common/api-review/messaging.api.md @@ -0,0 +1,70 @@ +## API Report File for "@firebase/messaging" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; +import { NextFn } from '@firebase/util'; +import { Observer } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export function deleteToken(messaging: Messaging): Promise; + +// @public +export interface FcmOptions { + analyticsLabel?: string; + link?: string; +} + +// @public +export function getMessaging(app?: FirebaseApp): Messaging; + +// @public +export function getToken(messaging: Messaging, options?: GetTokenOptions): Promise; + +// @public +export interface GetTokenOptions { + serviceWorkerRegistration?: ServiceWorkerRegistration; + vapidKey?: string; +} + +// @public +export function isSupported(): Promise; + +// @public +export interface MessagePayload { + collapseKey: string; + data?: { + [key: string]: string; + }; + fcmOptions?: FcmOptions; + from: string; + messageId: string; + notification?: NotificationPayload; +} + +// @public +export interface Messaging { + app: FirebaseApp; +} + +export { NextFn } + +// @public +export interface NotificationPayload { + body?: string; + image?: string; + title?: string; +} + +export { Observer } + +// @public +export function onMessage(messaging: Messaging, nextOrObserver: NextFn | Observer): Unsubscribe; + +export { Unsubscribe } + + +``` diff --git a/common/api-review/performance.api.md b/common/api-review/performance.api.md new file mode 100644 index 00000000000..eae553afc91 --- /dev/null +++ b/common/api-review/performance.api.md @@ -0,0 +1,55 @@ +## API Report File for "@firebase/performance" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; + +// @public +export interface FirebasePerformance { + app: FirebaseApp; + dataCollectionEnabled: boolean; + instrumentationEnabled: boolean; +} + +// @public +export function getPerformance(app?: FirebaseApp): FirebasePerformance; + +// @public +export function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance; + +// @public +export interface PerformanceSettings { + dataCollectionEnabled?: boolean; + instrumentationEnabled?: boolean; +} + +// @public +export interface PerformanceTrace { + getAttribute(attr: string): string | undefined; + getAttributes(): { + [key: string]: string; + }; + getMetric(metricName: string): number; + incrementMetric(metricName: string, num?: number): void; + putAttribute(attr: string, value: string): void; + putMetric(metricName: string, num: number): void; + record(startTime: number, duration: number, options?: { + metrics?: { + [key: string]: number; + }; + attributes?: { + [key: string]: string; + }; + }): void; + removeAttribute(attr: string): void; + start(): void; + stop(): void; +} + +// @public +export function trace(performance: FirebasePerformance, name: string): PerformanceTrace; + + +``` diff --git a/common/api-review/remote-config.api.md b/common/api-review/remote-config.api.md new file mode 100644 index 00000000000..980d8f3d287 --- /dev/null +++ b/common/api-review/remote-config.api.md @@ -0,0 +1,80 @@ +## API Report File for "@firebase/remote-config" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { FirebaseApp } from '@firebase/app'; + +// @public +export function activate(remoteConfig: RemoteConfig): Promise; + +// @public +export function ensureInitialized(remoteConfig: RemoteConfig): Promise; + +// @public +export function fetchAndActivate(remoteConfig: RemoteConfig): Promise; + +// @public +export function fetchConfig(remoteConfig: RemoteConfig): Promise; + +// @public +export type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle'; + +// @public +export function getAll(remoteConfig: RemoteConfig): Record; + +// @public +export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean; + +// @public +export function getNumber(remoteConfig: RemoteConfig, key: string): number; + +// @public (undocumented) +export function getRemoteConfig(app?: FirebaseApp): RemoteConfig; + +// @public +export function getString(remoteConfig: RemoteConfig, key: string): string; + +// @public +export function getValue(remoteConfig: RemoteConfig, key: string): Value; + +// @public +export function isSupported(): Promise; + +// @public +export type LogLevel = 'debug' | 'error' | 'silent'; + +// @public +export interface RemoteConfig { + app: FirebaseApp; + defaultConfig: { + [key: string]: string | number | boolean; + }; + fetchTimeMillis: number; + lastFetchStatus: FetchStatus; + settings: RemoteConfigSettings; +} + +// @public +export interface RemoteConfigSettings { + fetchTimeoutMillis: number; + minimumFetchIntervalMillis: number; +} + +// @public +export function setLogLevel(remoteConfig: RemoteConfig, logLevel: LogLevel): void; + +// @public +export interface Value { + asBoolean(): boolean; + asNumber(): number; + asString(): string; + getSource(): ValueSource; +} + +// @public +export type ValueSource = 'static' | 'default' | 'remote'; + + +``` diff --git a/common/api-review/rules-unit-testing.api.md b/common/api-review/rules-unit-testing.api.md new file mode 100644 index 00000000000..e0a646d01bd --- /dev/null +++ b/common/api-review/rules-unit-testing.api.md @@ -0,0 +1,101 @@ +## API Report File for "@firebase/rules-unit-testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { default as firebase_2 } from 'firebase/compat/app'; +import { FirebaseSignInProvider } from '@firebase/util'; + +// @public +export function assertFails(pr: Promise): Promise; + +// @public +export function assertSucceeds(pr: Promise): Promise; + +// @public +export type EmulatorConfig = { + rules?: string; +} & (HostAndPort | {}); + +// @public +export interface HostAndPort { + host: string; + port: number; +} + +// @public +export function initializeTestEnvironment(config: TestEnvironmentConfig): Promise; + +// @public +export interface RulesTestContext { + database(databaseURL?: string): firebase_2.database.Database; + firestore(settings?: firebase_2.firestore.Settings): firebase_2.firestore.Firestore; + storage(bucketUrl?: string): firebase_2.storage.Storage; +} + +// @public +export interface RulesTestEnvironment { + authenticatedContext(user_id: string, tokenOptions?: TokenOptions): RulesTestContext; + cleanup(): Promise; + clearDatabase(): Promise; + clearFirestore(): Promise; + clearStorage(): Promise; + readonly emulators: { + database?: HostAndPort; + firestore?: HostAndPort; + storage?: HostAndPort; + }; + readonly projectId: string; + unauthenticatedContext(): RulesTestContext; + // (undocumented) + withSecurityRulesDisabled(callback: (context: RulesTestContext) => Promise): Promise; +} + +// @public +export interface TestEnvironmentConfig { + database?: EmulatorConfig; + firestore?: EmulatorConfig; + hub?: HostAndPort; + projectId?: string; + storage?: EmulatorConfig; +} + +// @public +export type TokenOptions = { + iat?: number; + exp?: number; + auth_time?: number; + provider_id?: 'anonymous'; + email?: string; + email_verified?: boolean; + phone_number?: string; + name?: string; + picture?: string; + firebase?: { + sign_in_provider: FirebaseSignInProvider; + identities?: { + [provider in FirebaseSignInProvider]?: string[]; + }; + }; + aud?: string; + iss?: string; + [claim: string]: unknown; + uid?: never; + sub?: never; + user_id?: never; +}; + +// @public +export function withFunctionTriggersDisabled(fn: () => TResult | Promise): Promise; + +// @public +export function withFunctionTriggersDisabled(hub: { + host: string; + port: number; +}, fn: () => TResult | Promise): Promise; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/common/api-review/storage.api.md b/common/api-review/storage.api.md new file mode 100644 index 00000000000..4715253d510 --- /dev/null +++ b/common/api-review/storage.api.md @@ -0,0 +1,347 @@ +## API Report File for "@firebase/storage" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types'; +import { CompleteFn } from '@firebase/util'; +import { EmulatorMockTokenOptions } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseAuthInternalName } from '@firebase/auth-interop-types'; +import { FirebaseError } from '@firebase/util'; +import { _FirebaseService } from '@firebase/app'; +import { NextFn } from '@firebase/util'; +import { Provider } from '@firebase/component'; +import { Subscribe } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export function connectStorageEmulator(storage: FirebaseStorage, host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; +}): void; + +// Warning: (ae-forgotten-export) The symbol "StringData" needs to be exported by the entry point index.d.ts +// +// @internal (undocumented) +export function _dataFromString(format: StringFormat, stringData: string): StringData; + +// @public +export function deleteObject(ref: StorageReference): Promise; + +export { EmulatorMockTokenOptions } + +// @internal (undocumented) +export class _FbsBlob { + constructor(data: Blob | Uint8Array | ArrayBuffer, elideCopy?: boolean); + // (undocumented) + static getBlob(...args: Array): _FbsBlob | null; + // (undocumented) + size(): number; + // (undocumented) + slice(startByte: number, endByte: number): _FbsBlob | null; + // (undocumented) + type(): string; + // (undocumented) + uploadData(): Blob | Uint8Array; +} + +// @public +export interface FirebaseStorage extends _FirebaseService { + readonly app: FirebaseApp; + maxOperationRetryTime: number; + maxUploadRetryTime: number; +} + +// @internal +export class _FirebaseStorageImpl implements FirebaseStorage { + constructor( + app: FirebaseApp, _authProvider: Provider, + _appCheckProvider: Provider, + _url?: string | undefined, _firebaseVersion?: string | undefined); + readonly app: FirebaseApp; + // (undocumented) + readonly _appCheckProvider: Provider; + // (undocumented) + protected readonly _appId: string | null; + // (undocumented) + readonly _authProvider: Provider; + // (undocumented) + _bucket: _Location | null; + _delete(): Promise; + // (undocumented) + readonly _firebaseVersion?: string | undefined; + // (undocumented) + _getAppCheckToken(): Promise; + // (undocumented) + _getAuthToken(): Promise; + get host(): string; + set host(host: string); + // Warning: (ae-forgotten-export) The symbol "ConnectionType" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "RequestInfo" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "Connection" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "Request" needs to be exported by the entry point index.d.ts + // + // (undocumented) + _makeRequest(requestInfo: RequestInfo_2, requestFactory: () => Connection, authToken: string | null, appCheckToken: string | null): Request_2; + // (undocumented) + makeRequestWithTokens(requestInfo: RequestInfo_2, requestFactory: () => Connection): Promise; + _makeStorageReference(loc: _Location): _Reference; + get maxOperationRetryTime(): number; + set maxOperationRetryTime(time: number); + get maxUploadRetryTime(): number; + set maxUploadRetryTime(time: number); + // (undocumented) + _overrideAuthToken?: string; + // (undocumented) + _protocol: string; + // (undocumented) + readonly _url?: string | undefined; +} + +// @public +export interface FullMetadata extends UploadMetadata { + bucket: string; + downloadTokens: string[] | undefined; + fullPath: string; + generation: string; + metageneration: string; + name: string; + ref?: StorageReference | undefined; + size: number; + timeCreated: string; + updated: string; +} + +// @public +export function getBlob(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; + +// @public +export function getBytes(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; + +// @internal (undocumented) +export function _getChild(ref: StorageReference, childPath: string): _Reference; + +// @public +export function getDownloadURL(ref: StorageReference): Promise; + +// @public +export function getMetadata(ref: StorageReference): Promise; + +// @public +export function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage; + +// @public +export function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): NodeJS.ReadableStream; + +// Warning: (ae-forgotten-export) The symbol "StorageError" needs to be exported by the entry point index.d.ts +// +// @internal (undocumented) +export function _invalidArgument(message: string): StorageError_2; + +// @internal (undocumented) +export function _invalidRootOperation(name: string): StorageError_2; + +// @public +export function list(ref: StorageReference, options?: ListOptions): Promise; + +// @public +export function listAll(ref: StorageReference): Promise; + +// @public +export interface ListOptions { + maxResults?: number | null; + pageToken?: string | null; +} + +// @public +export interface ListResult { + items: StorageReference[]; + nextPageToken?: string; + prefixes: StorageReference[]; +} + +// @internal +export class _Location { + constructor(bucket: string, path: string); + // (undocumented) + readonly bucket: string; + // (undocumented) + bucketOnlyServerUrl(): string; + // (undocumented) + fullServerUrl(): string; + // (undocumented) + get isRoot(): boolean; + // (undocumented) + static makeFromBucketSpec(bucketString: string, host: string): _Location; + // (undocumented) + static makeFromUrl(url: string, host: string): _Location; + // (undocumented) + get path(): string; + } + +// @public +export function ref(storage: FirebaseStorage, url?: string): StorageReference; + +// @public +export function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference; + +// @internal +export class _Reference { + constructor(_service: _FirebaseStorageImpl, location: string | _Location); + get bucket(): string; + get fullPath(): string; + // (undocumented) + _location: _Location; + get name(): string; + // (undocumented) + protected _newRef(service: _FirebaseStorageImpl, location: _Location): _Reference; + get parent(): _Reference | null; + get root(): _Reference; + get storage(): _FirebaseStorageImpl; + _throwIfRoot(name: string): void; + // @override + toString(): string; +} + +// @public +export interface SettableMetadata { + cacheControl?: string | undefined; + contentDisposition?: string | undefined; + contentEncoding?: string | undefined; + contentLanguage?: string | undefined; + contentType?: string | undefined; + customMetadata?: { + [key: string]: string; + } | undefined; +} + +// @public +export interface StorageError extends FirebaseError { + serverResponse: string | null; +} + +// @public +export interface StorageObserver { + // (undocumented) + complete?: CompleteFn | null; + // (undocumented) + error?: (error: StorageError) => void | null; + // (undocumented) + next?: NextFn | null; +} + +// @public +export interface StorageReference { + bucket: string; + fullPath: string; + name: string; + parent: StorageReference | null; + root: StorageReference; + storage: FirebaseStorage; + toString(): string; +} + +// @public +export type StringFormat = typeof StringFormat[keyof typeof StringFormat]; + +// @public +export const StringFormat: { + readonly RAW: "raw"; + readonly BASE64: "base64"; + readonly BASE64URL: "base64url"; + readonly DATA_URL: "data_url"; +}; + +// @public +export type TaskEvent = 'state_changed'; + +// @internal +export type _TaskEvent = string; + +// @internal +export const _TaskEvent: { + STATE_CHANGED: string; +}; + +// @public +export type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error'; + +// @internal +export type _TaskState = typeof _TaskState[keyof typeof _TaskState]; + +// @internal +export const _TaskState: { + readonly RUNNING: "running"; + readonly PAUSED: "paused"; + readonly SUCCESS: "success"; + readonly CANCELED: "canceled"; + readonly ERROR: "error"; +}; + +// @public +export function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise; + +// @public +export function uploadBytes(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Promise; + +// @public +export function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask; + +// @public +export interface UploadMetadata extends SettableMetadata { + md5Hash?: string | undefined; +} + +// @public +export interface UploadResult { + readonly metadata: FullMetadata; + readonly ref: StorageReference; +} + +// @public +export function uploadString(ref: StorageReference, value: string, format?: StringFormat, metadata?: UploadMetadata): Promise; + +// @public +export interface UploadTask { + cancel(): boolean; + catch(onRejected: (error: StorageError) => unknown): Promise; + on(event: TaskEvent, nextOrObserver?: StorageObserver | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError) => unknown) | null, complete?: Unsubscribe | null): Unsubscribe | Subscribe; + pause(): boolean; + resume(): boolean; + snapshot: UploadTaskSnapshot; + then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: StorageError) => unknown) | null): Promise; +} + +// @internal +export class _UploadTask { + constructor(ref: _Reference, blob: _FbsBlob, metadata?: Metadata | null); + _blob: _FbsBlob; + cancel(): boolean; + catch(onRejected: (p1: StorageError_2) => T | Promise): Promise; + // Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts + _metadata: Metadata | null; + // Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts + on(type: _TaskEvent, nextOrObserver?: StorageObserver | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError_2) => unknown) | null, completed?: Unsubscribe_2 | null): Unsubscribe_2 | Subscribe_2; + pause(): boolean; + resume(): boolean; + get snapshot(): UploadTaskSnapshot; + // Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts + _state: InternalTaskState; + then(onFulfilled?: ((value: UploadTaskSnapshot) => U | Promise) | null, onRejected?: ((error: StorageError_2) => U | Promise) | null): Promise; + _transferred: number; + } + +// @public +export interface UploadTaskSnapshot { + bytesTransferred: number; + metadata: FullMetadata; + ref: StorageReference; + state: TaskState; + task: UploadTask; + totalBytes: number; +} + + +``` diff --git a/common/api-review/util.api.md b/common/api-review/util.api.md new file mode 100644 index 00000000000..4c1f055e022 --- /dev/null +++ b/common/api-review/util.api.md @@ -0,0 +1,453 @@ +## API Report File for "@firebase/util" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// Warning: (ae-missing-release-tag) "areCookiesEnabled" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function areCookiesEnabled(): boolean; + +// Warning: (ae-missing-release-tag) "assert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const assert: (assertion: unknown, message: string) => void; + +// Warning: (ae-missing-release-tag) "assertionError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const assertionError: (message: string) => Error; + +// Warning: (ae-missing-release-tag) "async" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function async(fn: Function, onError?: ErrorFn): Function; + +// Warning: (ae-forgotten-export) The symbol "Base64" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "base64" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const base64: Base64; + +// Warning: (ae-missing-release-tag) "base64Decode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const base64Decode: (str: string) => string | null; + +// Warning: (ae-missing-release-tag) "base64Encode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const base64Encode: (str: string) => string; + +// Warning: (ae-missing-release-tag) "base64urlEncodeWithoutPadding" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const base64urlEncodeWithoutPadding: (str: string) => string; + +// Warning: (ae-missing-release-tag) "calculateBackoffMillis" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function calculateBackoffMillis(backoffCount: number, intervalMillis?: number, backoffFactor?: number): number; + +// Warning: (ae-missing-release-tag) "Compat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface Compat { + // (undocumented) + _delegate: T; +} + +// Warning: (ae-missing-release-tag) "CompleteFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type CompleteFn = () => void; + +// Warning: (ae-missing-release-tag) "CONSTANTS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const CONSTANTS: { + NODE_CLIENT: boolean; + NODE_ADMIN: boolean; + SDK_VERSION: string; +}; + +// Warning: (ae-missing-release-tag) "contains" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function contains(obj: T, key: string): boolean; + +// Warning: (ae-missing-release-tag) "createMockUserToken" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function createMockUserToken(token: EmulatorMockTokenOptions, projectId?: string): string; + +// Warning: (ae-missing-release-tag) "createSubscribe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function createSubscribe(executor: Executor, onNoObservers?: Executor): Subscribe; + +// Warning: (ae-forgotten-export) The symbol "DecodedToken" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "decode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const decode: (token: string) => DecodedToken; + +// Warning: (ae-missing-release-tag) "deepCopy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function deepCopy(value: T): T; + +// Warning: (ae-missing-release-tag) "deepEqual" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function deepEqual(a: object, b: object): boolean; + +// Warning: (ae-missing-release-tag) "deepExtend" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function deepExtend(target: unknown, source: unknown): unknown; + +// Warning: (ae-missing-release-tag) "Deferred" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export class Deferred { + constructor(); + // (undocumented) + promise: Promise; + // (undocumented) + reject: (value?: unknown) => void; + // (undocumented) + resolve: (value?: unknown) => void; + wrapCallback(callback?: (error?: unknown, value?: unknown) => void): (error: unknown, value?: unknown) => void; +} + +// Warning: (ae-forgotten-export) The symbol "FirebaseIdToken" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmulatorMockTokenOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type EmulatorMockTokenOptions = ({ + user_id: string; +} | { + sub: string; +}) & Partial; + +// Warning: (ae-missing-release-tag) "ErrorData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ErrorData { + // (undocumented) + [key: string]: unknown; +} + +// Warning: (ae-missing-release-tag) "ErrorFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class ErrorFactory { + constructor(service: string, serviceName: string, errors: ErrorMap); + // (undocumented) + create(code: K, ...data: K extends keyof ErrorParams ? [ErrorParams[K]] : []): FirebaseError; + } + +// Warning: (ae-missing-release-tag) "ErrorFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ErrorFn = (error: Error) => void; + +// Warning: (ae-missing-release-tag) "ErrorMap" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export type ErrorMap = { + readonly [K in ErrorCode]: string; +}; + +// Warning: (ae-missing-release-tag) "errorPrefix" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function errorPrefix(fnName: string, argName: string): string; + +// Warning: (ae-missing-release-tag) "Executor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type Executor = (observer: Observer) => void; + +// Warning: (ae-missing-release-tag) "extractQuerystring" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function extractQuerystring(url: string): string; + +// Warning: (ae-missing-release-tag) "FirebaseError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class FirebaseError extends Error { + constructor( + code: string, message: string, + customData?: Record | undefined); + readonly code: string; + customData?: Record | undefined; + readonly name: string; +} + +// Warning: (ae-missing-release-tag) "FirebaseSignInProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export type FirebaseSignInProvider = 'custom' | 'email' | 'password' | 'phone' | 'anonymous' | 'google.com' | 'facebook.com' | 'github.com' | 'twitter.com' | 'microsoft.com' | 'apple.com'; + +// Warning: (ae-missing-release-tag) "getGlobal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function getGlobal(): typeof globalThis; + +// Warning: (ae-missing-release-tag) "getModularInstance" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function getModularInstance(service: Compat | ExpService): ExpService; + +// Warning: (ae-missing-release-tag) "getUA" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function getUA(): string; + +// Warning: (ae-missing-release-tag) "isAdmin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const isAdmin: (token: string) => boolean; + +// Warning: (ae-missing-release-tag) "isBrowser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isBrowser(): boolean; + +// Warning: (ae-missing-release-tag) "isBrowserExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function isBrowserExtension(): boolean; + +// Warning: (ae-missing-release-tag) "isElectron" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isElectron(): boolean; + +// Warning: (ae-missing-release-tag) "isEmpty" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function isEmpty(obj: object): obj is {}; + +// Warning: (ae-missing-release-tag) "isIE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isIE(): boolean; + +// Warning: (ae-missing-release-tag) "isIndexedDBAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isIndexedDBAvailable(): boolean; + +// Warning: (ae-missing-release-tag) "isMobileCordova" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isMobileCordova(): boolean; + +// Warning: (ae-missing-release-tag) "isNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isNode(): boolean; + +// Warning: (ae-missing-release-tag) "isNodeSdk" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isNodeSdk(): boolean; + +// Warning: (ae-missing-release-tag) "isReactNative" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isReactNative(): boolean; + +// Warning: (ae-missing-release-tag) "isSafari" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isSafari(): boolean; + +// Warning: (ae-missing-release-tag) "issuedAtTime" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const issuedAtTime: (token: string) => number | null; + +// Warning: (ae-missing-release-tag) "isUWP" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function isUWP(): boolean; + +// Warning: (ae-missing-release-tag) "isValidFormat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const isValidFormat: (token: string) => boolean; + +// Warning: (ae-missing-release-tag) "isValidTimestamp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const isValidTimestamp: (token: string) => boolean; + +// Warning: (ae-missing-release-tag) "jsonEval" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function jsonEval(str: string): unknown; + +// Warning: (ae-missing-release-tag) "map" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function map(obj: { + [key in K]: V; +}, fn: (value: V, key: K, obj: { + [key in K]: V; +}) => U, contextObj?: unknown): { + [key in K]: U; +}; + +// Warning: (ae-missing-release-tag) "MAX_VALUE_MILLIS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const MAX_VALUE_MILLIS: number; + +// Warning: (ae-missing-release-tag) "NextFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export type NextFn = (value: T) => void; + +// Warning: (ae-missing-release-tag) "Observable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Observable { + // (undocumented) + subscribe: Subscribe; +} + +// Warning: (ae-missing-release-tag) "Observer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Observer { + // (undocumented) + complete: CompleteFn; + // (undocumented) + error: ErrorFn; + // (undocumented) + next: NextFn; +} + +// Warning: (ae-missing-release-tag) "ordinal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function ordinal(i: number): string; + +// Warning: (ae-missing-release-tag) "PartialObserver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type PartialObserver = Partial>; + +// Warning: (ae-missing-release-tag) "querystring" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function querystring(querystringParams: { + [key: string]: string | number; +}): string; + +// Warning: (ae-missing-release-tag) "querystringDecode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function querystringDecode(querystring: string): Record; + +// Warning: (ae-missing-release-tag) "RANDOM_FACTOR" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const RANDOM_FACTOR = 0.5; + +// Warning: (ae-missing-release-tag) "safeGet" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function safeGet(obj: T, key: K): T[K] | undefined; + +// Warning: (ae-missing-release-tag) "Sha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export class Sha1 { + constructor(); + // (undocumented) + blockSize: number; + compress_(buf: number[] | Uint8Array | string, offset?: number): void; + // @override (undocumented) + digest(): number[]; + // (undocumented) + reset(): void; + // (undocumented) + update(bytes?: number[] | Uint8Array | string, length?: number): void; + } + +// Warning: (ae-missing-release-tag) "stringify" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function stringify(data: unknown): string; + +// Warning: (ae-missing-release-tag) "stringLength" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const stringLength: (str: string) => number; + +// Warning: (ae-missing-release-tag) "StringLike" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface StringLike { + // (undocumented) + toString(): string; +} + +// Warning: (ae-missing-release-tag) "stringToByteArray" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const stringToByteArray: (str: string) => number[]; + +// Warning: (ae-missing-release-tag) "Subscribe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface Subscribe { + // (undocumented) + (next?: NextFn, error?: ErrorFn, complete?: CompleteFn): Unsubscribe; + // (undocumented) + (observer: PartialObserver): Unsubscribe; +} + +// Warning: (ae-missing-release-tag) "Unsubscribe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type Unsubscribe = () => void; + +// Warning: (ae-missing-release-tag) "validateArgCount" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export const validateArgCount: (fnName: string, minCount: number, maxCount: number, argCount: number) => void; + +// Warning: (ae-missing-release-tag) "validateCallback" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function validateCallback(fnName: string, argumentName: string, callback: Function, optional: boolean): void; + +// Warning: (ae-missing-release-tag) "validateContextObject" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function validateContextObject(fnName: string, argumentName: string, context: unknown, optional: boolean): void; + +// Warning: (ae-missing-release-tag) "validateIndexedDBOpenable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export function validateIndexedDBOpenable(): Promise; + +// Warning: (ae-missing-release-tag) "validateNamespace" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function validateNamespace(fnName: string, namespace: string, optional: boolean): void; + + +// (No @packageDocumentation comment for this package) + +``` From 8c8b262c1726ba904664991a5bd4e6107c3ee096 Mon Sep 17 00:00:00 2001 From: dwyfrequency Date: Fri, 6 May 2022 20:22:45 +0000 Subject: [PATCH 3/3] Update API reports --- common/api-review/auth.api.md | 4 ++++ common/api-review/database.api.md | 6 ++++++ common/api-review/firestore-lite.api.md | 7 ++++++- common/api-review/firestore.api.md | 7 ++++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/common/api-review/auth.api.md b/common/api-review/auth.api.md index dd72fae445e..cf49354d41d 100644 --- a/common/api-review/auth.api.md +++ b/common/api-review/auth.api.md @@ -81,6 +81,7 @@ export function applyActionCode(auth: Auth, oobCode: string): Promise; // @public export interface Auth { readonly app: FirebaseApp; + beforeAuthStateChanged(callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; readonly config: Config; readonly currentUser: User | null; readonly emulatorConfig: EmulatorConfig | null; @@ -241,6 +242,9 @@ export interface AuthSettings { appVerificationDisabledForTesting: boolean; } +// @public +export function beforeAuthStateChanged(auth: Auth, callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; + // @public export const browserLocalPersistence: Persistence; diff --git a/common/api-review/database.api.md b/common/api-review/database.api.md index 6d0315dd25d..8b3ef1ac7fb 100644 --- a/common/api-review/database.api.md +++ b/common/api-review/database.api.md @@ -64,6 +64,12 @@ export function equalTo(value: number | string | boolean | null, key?: string): // @public export type EventType = 'value' | 'child_added' | 'child_changed' | 'child_moved' | 'child_removed'; +// @public +export function forceLongPolling(): void; + +// @public +export function forceWebSockets(): void; + // @public export function get(query: Query): Promise; diff --git a/common/api-review/firestore-lite.api.md b/common/api-review/firestore-lite.api.md index db2e44f8cbd..a96f3ada5cb 100644 --- a/common/api-review/firestore-lite.api.md +++ b/common/api-review/firestore-lite.api.md @@ -254,7 +254,7 @@ export class QuerySnapshot { export function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; // @public -export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise): Promise; +export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise, options?: TransactionOptions): Promise; // @public export function serverTimestamp(): FieldValue; @@ -331,6 +331,11 @@ export class Transaction { update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; } +// @public +export interface TransactionOptions { + readonly maxAttempts?: number; +} + // @public export type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never; diff --git a/common/api-review/firestore.api.md b/common/api-review/firestore.api.md index 534c9f451d5..db36b60482c 100644 --- a/common/api-review/firestore.api.md +++ b/common/api-review/firestore.api.md @@ -385,7 +385,7 @@ export class QuerySnapshot { export function refEqual(left: DocumentReference | CollectionReference, right: DocumentReference | CollectionReference): boolean; // @public -export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise): Promise; +export function runTransaction(firestore: Firestore, updateFunction: (transaction: Transaction) => Promise, options?: TransactionOptions): Promise; // @public export function serverTimestamp(): FieldValue; @@ -475,6 +475,11 @@ export class Transaction { update(documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): this; } +// @public +export interface TransactionOptions { + readonly maxAttempts?: number; +} + // @public export type UnionToIntersection = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;