UNPKG

googleapis

Version:
843 lines 185 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace firebase_v1beta1 { export interface Options extends GlobalOptions { version: 'v1beta1'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Firebase Management API * * The Firebase Management API enables programmatic setup and management of Firebase projects, including a project&#39;s Firebase resources and Firebase apps. * * @example * ```js * const {google} = require('googleapis'); * const firebase = google.firebase('v1beta1'); * ``` */ export class Firebase { context: APIRequestContext; availableProjects: Resource$Availableprojects; operations: Resource$Operations; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * All fields are required. */ export interface Schema$AddFirebaseRequest { /** * Deprecated. Instead, to set a Project's default GCP resource location, call [`FinalizeDefaultLocation`](../projects.defaultLocation/finalize) after you add Firebase resources to the GCP `Project`. The ID of the Project's default GCP resource location. The location must be one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). */ locationId?: string | null; /** * Deprecated. Instead, to link a Project with a Google Analytics account, call [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) after you add Firebase resources to the GCP `Project`. The region code (CLDR) that the account will use for Google Analytics data For example: US, GB, or DE In Java, use `com.google.i18n.identifiers.RegionCode`. */ regionCode?: string | null; /** * Deprecated. Instead, to link a Project with a Google Analytics account, call [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) after you add Firebase resources to the GCP `Project`. The time zone that the account will use for Google Analytics data. For example: America/Los_Angeles or Africa/Abidjan */ timeZone?: string | null; } export interface Schema$AddGoogleAnalyticsRequest { /** * The ID for the existing [Google Analytics account](http://www.google.com/analytics/) that you want to link with the `FirebaseProject`. Specifying this field will provision a new Google Analytics property in your Google Analytics account and associate the new property with the `FirebaseProject`. */ analyticsAccountId?: string | null; /** * The ID for the existing Google Analytics property that you want to associate with the `FirebaseProject`. */ analyticsPropertyId?: string | null; } export interface Schema$AdminSdkConfig { /** * The default Firebase Realtime Database URL. */ databaseURL?: string | null; /** * The ID of the Project's default GCP resource location. The location is one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). This field is omitted if the default GCP resource location has not been finalized yet. To set a Project's default GCP resource location, call [`FinalizeDefaultLocation`](../projects.defaultLocation/finalize) after you add Firebase resources to the Project. */ locationId?: string | null; /** * Immutable. A user-assigned unique identifier for the `FirebaseProject`. This identifier may appear in URLs or names for some Firebase resources associated with the Project, but it should generally be treated as a convenience alias to reference the Project. */ projectId?: string | null; /** * The default Cloud Storage for Firebase storage bucket name. */ storageBucket?: string | null; } export interface Schema$AnalyticsDetails { /** * The Analytics Property object associated with the specified `FirebaseProject`. This object contains the details of the Google Analytics property associated with the Project. */ analyticsProperty?: Schema$AnalyticsProperty; /** * - For `AndroidApps` and `IosApps`: a map of `app` to `streamId` for each Firebase App in the specified `FirebaseProject`. Each `app` and `streamId` appears only once. - For `WebApps`: a map of `app` to `streamId` and `measurementId` for each `WebApp` in the specified `FirebaseProject`. Each `app`, `streamId`, and `measurementId` appears only once. */ streamMappings?: Schema$StreamMapping[]; } /** * Details of a Google Analytics property */ export interface Schema$AnalyticsProperty { /** * The display name of the Google Analytics property associated with the specified `FirebaseProject`. */ displayName?: string | null; /** * The globally unique, Google-assigned identifier of the Google Analytics property associated with the specified `FirebaseProject`. If you called [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) to link the `FirebaseProject` with a Google Analytics account, the value in this `id` field is the same as the ID of the property either specified or provisioned with that call to `AddGoogleAnalytics`. */ id?: string | null; } /** * Details of a Firebase App for Android. */ export interface Schema$AndroidApp { /** * Immutable. The globally unique, Firebase-assigned identifier for the `AndroidApp`. This identifier should be treated as an opaque token, as the data format is not specified. */ appId?: string | null; /** * The user-assigned display name for the `AndroidApp`. */ displayName?: string | null; /** * The resource name of the AndroidApp, in the format: projects/ PROJECT_IDENTIFIER/androidApps/APP_ID * PROJECT_IDENTIFIER: the parent Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see [`appId`](../projects.androidApps#AndroidApp.FIELDS.app_id)). */ name?: string | null; /** * Immutable. The canonical package name of the Android app as would appear in the Google Play Developer Console. */ packageName?: string | null; /** * Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `AndroidApp`. */ projectId?: string | null; } /** * Configuration metadata of a single Firebase App for Android. */ export interface Schema$AndroidAppConfig { /** * The contents of the JSON configuration file. */ configFileContents?: string | null; /** * The filename that the configuration artifact for the `AndroidApp` is typically saved as. For example: `google-services.json` */ configFilename?: string | null; } /** * The default resources associated with the Project. */ export interface Schema$DefaultResources { /** * The default Firebase Hosting site name, in the format: PROJECT_ID Though rare, your `projectId` might already be used as the name for an existing Hosting site in another project (learn more about creating non-default, [additional sites](https://firebase.google.com/docs/hosting/multisites)). In these cases, your `projectId` is appended with a hyphen then five alphanumeric characters to create your default Hosting site name. For example, if your `projectId` is `myproject123`, your default Hosting site name might be: `myproject123-a5c16` */ hostingSite?: string | null; /** * The ID of the Project's default GCP resource location. The location is one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). This field is omitted if the default GCP resource location has not been finalized yet. To set a Project's default GCP resource location, call [`FinalizeDefaultLocation`](../projects.defaultLocation/finalize) after you add Firebase resources to the Project. */ locationId?: string | null; /** * The default Firebase Realtime Database instance name, in the format: PROJECT_ID Though rare, your `projectId` might already be used as the name for an existing Realtime Database instance in another project (learn more about [database sharding](https://firebase.google.com/docs/database/usage/sharding)). In these cases, your `projectId` is appended with a hyphen then five alphanumeric characters to create your default Realtime Database instance name. For example, if your `projectId` is `myproject123`, your default database instance name might be: `myproject123-a5c16` */ realtimeDatabaseInstance?: string | null; /** * The default Cloud Storage for Firebase storage bucket, in the format: PROJECT_ID.appspot.com */ storageBucket?: string | null; } /** * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`. */ export interface Schema$Empty { } export interface Schema$FinalizeDefaultLocationRequest { /** * The ID of the Project's default GCP resource location. The location must be one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). */ locationId?: string | null; } /** * A high-level summary of an App. */ export interface Schema$FirebaseAppInfo { /** * Output only. Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified. */ appId?: string | null; /** * The user-assigned display name of the Firebase App. */ displayName?: string | null; /** * The resource name of the Firebase App, in the format: projects/PROJECT_ID /iosApps/APP_ID or projects/PROJECT_ID/androidApps/APP_ID or projects/ PROJECT_ID/webApps/APP_ID */ name?: string | null; /** * Output only. Immutable. The platform-specific identifier of the App. *Note:* For most use cases, use `appId`, which is the canonical, globally unique identifier for referencing an App. This string is derived from a native identifier for each platform: `packageName` for an `AndroidApp`, `bundleId` for an `IosApp`, and `webId` for a `WebApp`. Its contents should be treated as opaque, as the native identifier format may change as platforms evolve. This string is only unique within a `FirebaseProject` and its associated Apps. */ namespace?: string | null; /** * The platform of the Firebase App. */ platform?: string | null; } /** * A `FirebaseProject` is the top-level Firebase entity. It is the container for Firebase Apps, Firebase Hosting sites, storage systems (Firebase Realtime Database, Cloud Firestore, Cloud Storage buckets), and other Firebase and Google Cloud Platform (GCP) resources. You create a `FirebaseProject` by calling AddFirebase and specifying an *existing* [GCP `Project`](https://cloud.google.com/resource-manager/reference/rest/v1/projects). This adds Firebase resources to the existing GCP `Project`. Since a FirebaseProject is actually also a GCP `Project`, a `FirebaseProject` has the same underlying GCP identifiers (`projectNumber` and `projectId`). This allows for easy interop with Google APIs. */ export interface Schema$FirebaseProject { /** * The user-assigned display name of the Project. */ displayName?: string | null; /** * The resource name of the Project, in the format: projects/PROJECT_IDENTIFIER PROJECT_IDENTIFIER: the Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. */ name?: string | null; /** * Immutable. A user-assigned unique identifier for the Project. This identifier may appear in URLs or names for some Firebase resources associated with the Project, but it should generally be treated as a convenience alias to reference the Project. */ projectId?: string | null; /** * Immutable. The globally unique, Google-assigned canonical identifier for the Project. Use this identifier when configuring integrations and/or making API calls to Firebase or third-party services. */ projectNumber?: string | null; /** * The default Firebase resources associated with the Project. */ resources?: Schema$DefaultResources; /** * Output only. The lifecycle state of the Project. Updates to the state must be performed via com.google.cloudresourcemanager.v1.Projects.DeleteProject and com.google.cloudresourcemanager.v1.Projects.UndeleteProject */ state?: string | null; } /** * Details of a Firebase App for iOS. */ export interface Schema$IosApp { /** * Immutable. The globally unique, Firebase-assigned identifier for the `IosApp`. This identifier should be treated as an opaque token, as the data format is not specified. */ appId?: string | null; /** * The automatically generated Apple ID assigned to the iOS app by Apple in the iOS App Store. */ appStoreId?: string | null; /** * Immutable. The canonical bundle ID of the iOS app as it would appear in the iOS AppStore. */ bundleId?: string | null; /** * The user-assigned display name for the `IosApp`. */ displayName?: string | null; /** * The resource name of the IosApp, in the format: projects/PROJECT_IDENTIFIER /iosApps/APP_ID * PROJECT_IDENTIFIER: the parent Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see [`appId`](../projects.iosApps#IosApp.FIELDS.app_id)). */ name?: string | null; /** * Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `IosApp`. */ projectId?: string | null; } /** * Configuration metadata of a single Firebase App for iOS. */ export interface Schema$IosAppConfig { /** * The content of the XML configuration file. */ configFileContents?: string | null; /** * The filename that the configuration artifact for the `IosApp` is typically saved as. For example: `GoogleService-Info.plist` */ configFilename?: string | null; } export interface Schema$ListAndroidAppsResponse { /** * List of each `AndroidApp` associated with the specified `FirebaseProject`. */ apps?: Schema$AndroidApp[]; /** * If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListAndroidApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; } export interface Schema$ListAvailableLocationsResponse { /** * One page of results from a call to `ListAvailableLocations`. */ locations?: Schema$Location[]; /** * If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results and all available locations have been listed. This token can be used in a subsequent call to `ListAvailableLocations` to find more locations. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; } export interface Schema$ListAvailableProjectsResponse { /** * If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent calls to `ListAvailableProjects` to find the next group of Projects. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; /** * The list of GCP `Projects` which can have Firebase resources added to them. */ projectInfo?: Schema$ProjectInfo[]; } export interface Schema$ListFirebaseProjectsResponse { /** * If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent calls to `ListFirebaseProjects` to find the next group of Projects. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; /** * One page of the list of Projects that are accessible to the caller. */ results?: Schema$FirebaseProject[]; } export interface Schema$ListIosAppsResponse { /** * List of each `IosApp` associated with the specified `FirebaseProject`. */ apps?: Schema$IosApp[]; /** * If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListIosApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; } export interface Schema$ListShaCertificatesResponse { /** * The list of each `ShaCertificate` associated with the `AndroidApp`. */ certificates?: Schema$ShaCertificate[]; } export interface Schema$ListWebAppsResponse { /** * List of each `WebApp` associated with the specified `FirebaseProject`. */ apps?: Schema$WebApp[]; /** * If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListWebApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; } /** * A GCP resource location that can be selected for a FirebaseProject. */ export interface Schema$Location { /** * Products and services that are available in the GCP resource location. */ features?: string[] | null; /** * The ID of the GCP resource location. It will be one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations#types). */ locationId?: string | null; /** * Indicates whether the GCP resource location is a [regional or multi-regional location](https://firebase.google.com/docs/projects/locations#types) for data replication. */ type?: string | null; } /** * This is proto2's version of MessageSet. */ export interface Schema$MessageSet { } /** * This resource represents a long-running operation that is the result of a network API call. */ export interface Schema$Operation { /** * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ done?: boolean | null; /** * The error result of the operation in case of failure or cancellation. */ error?: Schema$Status; /** * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any; } | null; /** * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`. */ name?: string | null; /** * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any; } | null; } /** * A reference to a Google Cloud Platform (GCP) `Project`. */ export interface Schema$ProjectInfo { /** * The user-assigned display name of the GCP `Project`, for example: `My App` */ displayName?: string | null; /** * The ID of the Project's default GCP resource location. The location is one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). Not all Projects will have this field populated. If it is not populated, it means that the Project does not yet have a default GCP resource location. To set a Project's default GCP resource location, call [`FinalizeDefaultLocation`](../projects.defaultLocation/finalize) after you add Firebase resources to the Project. */ locationId?: string | null; /** * The resource name of the GCP `Project` to which Firebase resources can be added, in the format: projects/PROJECT_IDENTIFIER Refer to the `FirebaseProject` [`name`](../projects#FirebaseProject.FIELDS.name) field for details about PROJECT_IDENTIFIER values. */ project?: string | null; } export interface Schema$RemoveAnalyticsRequest { /** * Optional. The ID of the Google Analytics property associated with the specified `FirebaseProject`. - If not set, then the Google Analytics property that is currently associated with the specified `FirebaseProject` is removed. - If set, and the specified `FirebaseProject` is currently associated with a *different* Google Analytics property, then the response is a `412 Precondition Failed` error. */ analyticsPropertyId?: string | null; } export interface Schema$SearchFirebaseAppsResponse { /** * One page of results from a call to `SearchFirebaseApps`. */ apps?: Schema$FirebaseAppInfo[]; /** * If the result list is too large to fit in a single response, then a token is returned. This token can be used in a subsequent calls to `SearchFirebaseApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. */ nextPageToken?: string | null; } /** * A SHA-1 or SHA-256 certificate associated with the AndroidApp. */ export interface Schema$ShaCertificate { /** * The type of SHA certificate encoded in the hash. */ certType?: string | null; /** * The resource name of the ShaCertificate for the AndroidApp, in the format: projects/PROJECT_IDENTIFIER/androidApps/APP_ID/sha/SHA_HASH * PROJECT_IDENTIFIER: the parent Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see [`appId`](../projects.androidApps#AndroidApp.FIELDS.app_id)). * SHA_HASH: the certificate hash for the App (see [`shaHash`](../projects.androidApps.sha#ShaCertificate.FIELDS.sha_hash)). */ name?: string | null; /** * The certificate hash for the `AndroidApp`. */ shaHash?: string | null; } /** * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ export interface Schema$Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number | null; /** * A list of messages that carry the error details. There is a common set of message types for APIs to use. */ details?: Array<{ [key: string]: any; }> | null; /** * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */ message?: string | null; } /** * Wire-format for a Status object */ export interface Schema$StatusProto { /** * The canonical error code (see codes.proto) that most closely corresponds to this status. May be missing. */ canonicalCode?: number | null; /** * Numeric code drawn from the space specified below. Often, this is the canonical error space, and code is drawn from google3/util/task/codes.proto */ code?: number | null; /** * Detail message */ message?: string | null; /** * message_set associates an arbitrary proto message with the status. */ messageSet?: Schema$MessageSet; /** * The following are usually only present when code != 0 Space to which this status belongs */ space?: string | null; } /** * A mapping of a Firebase App to a Google Analytics data stream */ export interface Schema$StreamMapping { /** * The resource name of the Firebase App associated with the Google Analytics data stream, in the format: projects/PROJECT_IDENTIFIER/androidApps/APP_ID or projects/PROJECT_IDENTIFIER/iosApps/APP_ID or projects/PROJECT_IDENTIFIER /webApps/APP_ID Refer to the `FirebaseProject` [`name`](../projects#FirebaseProject.FIELDS.name) field for details about PROJECT_IDENTIFIER values. */ app?: string | null; /** * Applicable for Firebase Web Apps only. The unique Google-assigned identifier of the Google Analytics web stream associated with the Firebase Web App. Firebase SDKs use this ID to interact with Google Analytics APIs. Learn more about this ID and Google Analytics web streams in the [Analytics documentation](https://support.google.com/analytics/topic/9303475). */ measurementId?: string | null; /** * The unique Google-assigned identifier of the Google Analytics data stream associated with the Firebase App. Learn more about Google Analytics data streams in the [Analytics documentation](https://support.google.com/analytics/answer/9303323). */ streamId?: string | null; } /** * Details of a Firebase App for the web. */ export interface Schema$WebApp { /** * Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified. */ appId?: string | null; /** * The URLs where the `WebApp` is hosted. */ appUrls?: string[] | null; /** * The user-assigned display name for the `WebApp`. */ displayName?: string | null; /** * The resource name of the WebApp, in the format: projects/PROJECT_IDENTIFIER /webApps/APP_ID * PROJECT_IDENTIFIER: the parent Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see [`appId`](../projects.webApps#WebApp.FIELDS.app_id)). */ name?: string | null; /** * Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `WebApp`. */ projectId?: string | null; /** * Output only. Immutable. A unique, Firebase-assigned identifier for the `WebApp`. This identifier is only used to populate the `namespace` value for the `WebApp`. For most use cases, use `appId` to identify or reference the App. The `webId` value is only unique within a `FirebaseProject` and its associated Apps. */ webId?: string | null; } /** * Configuration metadata of a single Firebase App for the web. */ export interface Schema$WebAppConfig { /** * The API key associated with the `WebApp`. */ apiKey?: string | null; /** * Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. */ appId?: string | null; /** * The domain Firebase Auth configures for OAuth redirects, in the format: PROJECT_ID.firebaseapp.com */ authDomain?: string | null; /** * The default Firebase Realtime Database URL. */ databaseURL?: string | null; /** * The ID of the Project's default GCP resource location. The location is one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). This field is omitted if the default GCP resource location has not been finalized yet. To set a Project's default GCP resource location, call [`FinalizeDefaultLocation`](../projects.defaultLocation/finalize) after you add Firebase resources to the Project. */ locationId?: string | null; /** * The unique Google-assigned identifier of the Google Analytics web stream associated with the `WebApp`. Firebase SDKs use this ID to interact with Google Analytics APIs. This field is only present if the `WebApp` is linked to a web stream in a Google Analytics App + Web property. Learn more about this ID and Google Analytics web streams in the [Analytics documentation](https://support.google.com/analytics/topic/9303475). To generate a `measurementId` and link the `WebApp` with a Google Analytics web stream, call [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics). For apps using the Firebase JavaScript SDK v7.20.0 and later, Firebase dynamically fetches the `measurementId` when your app initializes Analytics. Having this ID in your config object is optional, but it does serve as a fallback in the rare case that the dynamic fetch fails. */ measurementId?: string | null; /** * The sender ID for use with Firebase Cloud Messaging. */ messagingSenderId?: string | null; /** * Immutable. A user-assigned unique identifier for the `FirebaseProject`. */ projectId?: string | null; /** * The default Cloud Storage for Firebase storage bucket name. */ storageBucket?: string | null; } export class Resource$Availableprojects { context: APIRequestContext; constructor(context: APIRequestContext); /** * Lists each [Google Cloud Platform (GCP) `Project`] (https://cloud.google.com/resource-manager/reference/rest/v1/projects) that can have Firebase resources added to it. A Project will only be listed if: - The caller has sufficient [Google IAM](https://cloud.google.com/iam) permissions to call AddFirebase. - The Project is not already a FirebaseProject. - The Project is not in an Organization which has policies that prevent Firebase resources from being added. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/firebase.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const firebase = google.firebase('v1beta1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await firebase.availableProjects.list({ * // The maximum number of Projects to return in the response. The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. This value cannot be negative. * pageSize: 'placeholder-value', * // Token returned from a previous call to `ListAvailableProjects` indicating where in the set of Projects to resume listing. * pageToken: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { * // "nextPageToken": "my_nextPageToken", * // "projectInfo": [] * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ list(params: Params$Resource$Availableprojects$List, options: StreamMethodOptions): GaxiosPromise<Readable>; list(params?: Params$Resource$Availableprojects$List, options?: MethodOptions): GaxiosPromise<Schema$ListAvailableProjectsResponse>; list(params: Params$Resource$Availableprojects$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; list(params: Params$Resource$Availableprojects$List, options: MethodOptions | BodyResponseCallback<Schema$ListAvailableProjectsResponse>, callback: BodyResponseCallback<Schema$ListAvailableProjectsResponse>): void; list(params: Params$Resource$Availableprojects$List, callback: BodyResponseCallback<Schema$ListAvailableProjectsResponse>): void; list(callback: BodyResponseCallback<Schema$ListAvailableProjectsResponse>): void; } export interface Params$Resource$Availableprojects$List extends StandardParameters { /** * The maximum number of Projects to return in the response. The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. This value cannot be negative. */ pageSize?: number; /** * Token returned from a previous call to `ListAvailableProjects` indicating where in the set of Projects to resume listing. */ pageToken?: string; } export class Resource$Operations { context: APIRequestContext; constructor(context: APIRequestContext); /** * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/firebase.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const firebase = google.firebase('v1beta1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await firebase.operations.get({ * // The name of the operation resource. * name: 'operations/.*', * }); * console.log(res.data); * * // Example response * // { * // "done": false, * // "error": {}, * // "metadata": {}, * // "name": "my_name", * // "response": {} * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ get(params: Params$Resource$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>; get(params?: Params$Resource$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>; get(params: Params$Resource$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; get(params: Params$Resource$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void; get(params: Params$Resource$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void; get(callback: BodyResponseCallback<Schema$Operation>): void; } export interface Params$Resource$Operations$Get extends StandardParameters { /** * The name of the operation resource. */ name?: string; } export class Resource$Projects { context: APIRequestContext; androidApps: Resource$Projects$Androidapps; availableLocations: Resource$Projects$Availablelocations; defaultLocation: Resource$Projects$Defaultlocation; iosApps: Resource$Projects$Iosapps; webApps: Resource$Projects$Webapps; constructor(context: APIRequestContext); /** * Adds Firebase resources to the specified existing [Google Cloud Platform (GCP) `Project`] (https://cloud.google.com/resource-manager/reference/rest/v1/projects). Since a FirebaseProject is actually also a GCP `Project`, a `FirebaseProject` has the same underlying GCP identifiers (`projectNumber` and `projectId`). This allows for easy interop with Google APIs. The result of this call is an [`Operation`](../../v1beta1/operations). Poll the `Operation` to track the provisioning process by calling GetOperation until [`done`](../../v1beta1/operations#Operation.FIELDS.done) is `true`. When `done` is `true`, the `Operation` has either succeeded or failed. If the `Operation` succeeded, its [`response`](../../v1beta1/operations#Operation.FIELDS.response) is set to a FirebaseProject; if the `Operation` failed, its [`error`](../../v1beta1/operations#Operation.FIELDS.error) is set to a google.rpc.Status. The `Operation` is automatically deleted after completion, so there is no need to call DeleteOperation. This method does not modify any billing account information on the underlying GCP `Project`. To call `AddFirebase`, a project member or service account must have the following permissions (the IAM roles of Editor and Owner contain these permissions): `firebase.projects.update`, `resourcemanager.projects.get`, `serviceusage.services.enable`, and `serviceusage.services.get`. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/firebase.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const firebase = google.firebase('v1beta1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/firebase', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await firebase.projects.addFirebase({ * // The resource name of the GCP `Project` to which Firebase resources will be added, in the format: projects/PROJECT_IDENTIFIER Refer to the `FirebaseProject` [`name`](../projects#FirebaseProject.FIELDS.name) field for details about PROJECT_IDENTIFIER values. After calling `AddFirebase`, the unique Project identifiers ( [`projectNumber`](https://cloud.google.com/resource-manager/reference/rest/v1/projects#Project.FIELDS.project_number) and [`projectId`](https://cloud.google.com/resource-manager/reference/rest/v1/projects#Project.FIELDS.project_id)) of the underlying GCP `Project` are also the identifiers of the FirebaseProject. * project: 'projects/my-project', * * // Request body metadata * requestBody: { * // request body parameters * // { * // "locationId": "my_locationId", * // "regionCode": "my_regionCode", * // "timeZone": "my_timeZone" * // } * }, * }); * console.log(res.data); * * // Example response * // { * // "done": false, * // "error": {}, * // "metadata": {}, * // "name": "my_name", * // "response": {} * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ addFirebase(params: Params$Resource$Projects$Addfirebase, options: StreamMethodOptions): GaxiosPromise<Readable>; addFirebase(params?: Params$Resource$Projects$Addfirebase, options?: MethodOptions): GaxiosPromise<Schema$Operation>; addFirebase(params: Params$Resource$Projects$Addfirebase, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; addFirebase(params: Params$Resource$Projects$Addfirebase, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void; addFirebase(params: Params$Resource$Projects$Addfirebase, callback: BodyResponseCallback<Schema$Operation>): void; addFirebase(callback: BodyResponseCallback<Schema$Operation>): void; /** * Links the specified FirebaseProject with an existing [Google Analytics account](http://www.google.com/analytics/). Using this call, you can either: - Specify an `analyticsAccountId` to provision a new Google Analytics property within the specified account and associate the new property with the `FirebaseProject`. - Specify an existing `analyticsPropertyId` to associate the property with the `FirebaseProject`. Note that when you call `AddGoogleAnalytics`: 1. The first check determines if any existing data streams in the Google Analytics property correspond to any existing Firebase Apps in the `FirebaseProject` (based on the `packageName` or `bundleId` associated with the data stream). Then, as applicable, the data streams and apps are linked. Note