// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Firebase App Distribution API Client for Deno * ============================================= * * * * Docs: https://firebase.google.com/products/app-distribution * Source: https://googleapis.deno.dev/v1/firebaseappdistribution:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class FirebaseAppDistribution { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://firebaseappdistribution.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Uploads a binary. Uploading a binary can result in a new release being * created, an update to an existing release, or a no-op if a release with the * same binary already exists. * * @param app The name of the app resource. Format: `projects/{project_number}/apps/{app_id}` */ async mediaUpload(app: string, req: GoogleFirebaseAppdistroV1UploadReleaseRequest): Promise { req = serializeGoogleFirebaseAppdistroV1UploadReleaseRequest(req); const url = new URL(`${this.#baseUrl}v1/${ app }/releases:upload`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets Android App Bundle (AAB) information for a Firebase app. * * @param name Required. The name of the `AabInfo` resource to retrieve. Format: `projects/{project_number}/apps/{app_id}/aabInfo` */ async projectsAppsGetAabInfo(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1AabInfo; } /** * Deletes releases. A maximum of 100 releases can be deleted per request. * * @param parent Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app_id}` */ async projectsAppsReleasesBatchDelete(parent: string, req: GoogleFirebaseAppdistroV1BatchDeleteReleasesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/releases:batchDelete`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Distributes a release to testers. This call does the following: 1. Creates * testers for the specified emails, if none exist. 2. Adds the testers and * groups to the release. 3. Sends new testers an invitation email. 4. Sends * existing testers a new release email. The request will fail with a * `INVALID_ARGUMENT` if it contains a group that doesn't exist. * * @param name Required. The name of the release resource to distribute. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}` */ async projectsAppsReleasesDistribute(name: string, req: GoogleFirebaseAppdistroV1DistributeReleaseRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:distribute`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleFirebaseAppdistroV1DistributeReleaseResponse; } /** * Deletes a feedback report. * * @param name Required. The name of the feedback report to delete. Format: projects/{project_number}/apps/{app}/releases/{release}/feedbackReports/{feedback_report} */ async projectsAppsReleasesFeedbackReportsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a feedback report. * * @param name Required. The name of the feedback report to retrieve. Format: projects/{project_number}/apps/{app}/releases/{release}/feedbackReports/{feedback_report} */ async projectsAppsReleasesFeedbackReportsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1FeedbackReport; } /** * Lists feedback reports. By default, sorts by `createTime` in descending * order. * * @param parent Required. The name of the release resource, which is the parent of the feedback report resources. Format: `projects/{project_number}/apps/{app}/releases/{release}` */ async projectsAppsReleasesFeedbackReportsList(parent: string, opts: ProjectsAppsReleasesFeedbackReportsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/feedbackReports`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1ListFeedbackReportsResponse; } /** * Gets a release. * * @param name Required. The name of the release resource to retrieve. Format: projects/{project_number}/apps/{app_id}/releases/{release_id} */ async projectsAppsReleasesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1Release; } /** * Lists releases. By default, sorts by `createTime` in descending order. * * @param parent Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app_id}` */ async projectsAppsReleasesList(parent: string, opts: ProjectsAppsReleasesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/releases`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1ListReleasesResponse; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsAppsReleasesOperationsCancel(name: string, req: GoogleLongrunningCancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsAppsReleasesOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * 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. * * @param name The name of the operation resource. */ async projectsAppsReleasesOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsAppsReleasesOperationsList(name: string, opts: ProjectsAppsReleasesOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Waits until the specified long-running operation is done or reaches at * most a specified timeout, returning the latest state. If the operation is * already done, the latest state is immediately returned. If the timeout * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC * timeout is used. If the server does not support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort * basis. It may return the latest state before the specified timeout * (including immediately), meaning even an immediate response is no guarantee * that the operation is done. * * @param name The name of the operation resource to wait on. */ async projectsAppsReleasesOperationsWait(name: string, req: GoogleLongrunningWaitOperationRequest): Promise { req = serializeGoogleLongrunningWaitOperationRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:wait`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Updates a release. * * @param name The name of the release resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}` */ async projectsAppsReleasesPatch(name: string, req: GoogleFirebaseAppdistroV1Release, opts: ProjectsAppsReleasesPatchOptions = {}): Promise { opts = serializeProjectsAppsReleasesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleFirebaseAppdistroV1Release; } /** * Batch adds members to a group. The testers will gain access to all * releases that the groups have access to. * * @param group Required. The name of the group resource to which testers are added. Format: `projects/{project_number}/groups/{group_alias}` */ async projectsGroupsBatchJoin(group: string, req: GoogleFirebaseAppdistroV1BatchJoinGroupRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ group }:batchJoin`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Batch removed members from a group. The testers will lose access to all * releases that the groups have access to. * * @param group Required. The name of the group resource from which testers are removed. Format: `projects/{project_number}/groups/{group_alias}` */ async projectsGroupsBatchLeave(group: string, req: GoogleFirebaseAppdistroV1BatchLeaveGroupRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ group }:batchLeave`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Create a group. * * @param parent Required. The name of the project resource, which is the parent of the group resource. Format: `projects/{project_number}` */ async projectsGroupsCreate(parent: string, req: GoogleFirebaseAppdistroV1Group, opts: ProjectsGroupsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/groups`); if (opts.groupId !== undefined) { url.searchParams.append("groupId", String(opts.groupId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleFirebaseAppdistroV1Group; } /** * Delete a group. * * @param name Required. The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` */ async projectsGroupsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Get a group. * * @param name Required. The name of the group resource to retrieve. Format: `projects/{project_number}/groups/{group_alias}` */ async projectsGroupsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1Group; } /** * List groups. * * @param parent Required. The name of the project resource, which is the parent of the group resources. Format: `projects/{project_number}` */ async projectsGroupsList(parent: string, opts: ProjectsGroupsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/groups`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1ListGroupsResponse; } /** * Update a group. * * @param name The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` */ async projectsGroupsPatch(name: string, req: GoogleFirebaseAppdistroV1Group, opts: ProjectsGroupsPatchOptions = {}): Promise { opts = serializeProjectsGroupsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleFirebaseAppdistroV1Group; } /** * Batch adds testers. This call adds testers for the specified emails if * they don't already exist. Returns all testers specified in the request, * including newly created and previously existing testers. This action is * idempotent. * * @param project Required. The name of the project resource. Format: `projects/{project_number}` */ async projectsTestersBatchAdd(project: string, req: GoogleFirebaseAppdistroV1BatchAddTestersRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ project }/testers:batchAdd`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleFirebaseAppdistroV1BatchAddTestersResponse; } /** * Batch removes testers. If found, this call deletes testers for the * specified emails. Returns all deleted testers. * * @param project Required. The name of the project resource. Format: `projects/{project_number}` */ async projectsTestersBatchRemove(project: string, req: GoogleFirebaseAppdistroV1BatchRemoveTestersRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ project }/testers:batchRemove`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleFirebaseAppdistroV1BatchRemoveTestersResponse; } /** * Lists testers and their resource ids. * * @param parent Required. The name of the project resource, which is the parent of the tester resources. Format: `projects/{project_number}` */ async projectsTestersList(parent: string, opts: ProjectsTestersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/testers`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleFirebaseAppdistroV1ListTestersResponse; } /** * Update a tester. If the testers joins a group they gain access to all * releases that the group has access to. * * @param name The name of the tester resource. Format: `projects/{project_number}/testers/{email_address}` */ async projectsTestersPatch(name: string, req: GoogleFirebaseAppdistroV1Tester, opts: ProjectsTestersPatchOptions = {}): Promise { opts = serializeProjectsTestersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleFirebaseAppdistroV1Tester; } } /** * Information to read/write to blobstore2. */ export interface GdataBlobstore2Info { /** * The blob generation id. */ blobGeneration?: bigint; /** * The blob id, e.g., /blobstore/prod/playground/scotty */ blobId?: string; /** * Read handle passed from Bigstore -> Scotty for a GCS download. This is a * signed, serialized blobstore2.ReadHandle proto which must never be set * outside of Bigstore, and is not applicable to non-GCS media downloads. */ downloadReadHandle?: Uint8Array; /** * The blob read token. Needed to read blobs that have not been replicated. * Might not be available until the final call. */ readToken?: string; /** * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a * signed, serialized blobstore2.BlobMetadataContainer proto which must never * be consumed outside of Bigstore, and is not applicable to non-GCS media * uploads. */ uploadMetadataContainer?: Uint8Array; } function serializeGdataBlobstore2Info(data: any): GdataBlobstore2Info { return { ...data, blobGeneration: data["blobGeneration"] !== undefined ? String(data["blobGeneration"]) : undefined, downloadReadHandle: data["downloadReadHandle"] !== undefined ? encodeBase64(data["downloadReadHandle"]) : undefined, uploadMetadataContainer: data["uploadMetadataContainer"] !== undefined ? encodeBase64(data["uploadMetadataContainer"]) : undefined, }; } function deserializeGdataBlobstore2Info(data: any): GdataBlobstore2Info { return { ...data, blobGeneration: data["blobGeneration"] !== undefined ? BigInt(data["blobGeneration"]) : undefined, downloadReadHandle: data["downloadReadHandle"] !== undefined ? decodeBase64(data["downloadReadHandle"] as string) : undefined, uploadMetadataContainer: data["uploadMetadataContainer"] !== undefined ? decodeBase64(data["uploadMetadataContainer"] as string) : undefined, }; } /** * A sequence of media data references representing composite data. Introduced * to support Bigstore composite objects. For details, visit * http://go/bigstore-composites. */ export interface GdataCompositeMedia { /** * Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should * be the byte representation of a blobstore.BlobRef. Since Blobstore is * deprecating v1, use blobstore2_info instead. For now, any v2 blob will also * be represented in this field as v1 BlobRef. */ blobRef?: Uint8Array; /** * Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to * a v2 blob. */ blobstore2Info?: GdataBlobstore2Info; /** * A binary data reference for a media download. Serves as a * technology-agnostic binary reference in some Google infrastructure. This * value is a serialized storage_cosmo.BinaryReference proto. Storing it as * bytes is a hack to get around the fact that the cosmo proto (as well as * others it includes) doesn't support JavaScript. This prevents us from * including the actual type of this field. */ cosmoBinaryReference?: Uint8Array; /** * crc32.c hash for the payload. */ crc32cHash?: number; /** * Media data, set if reference_type is INLINE */ inline?: Uint8Array; /** * Size of the data, in bytes */ length?: bigint; /** * MD5 hash for the payload. */ md5Hash?: Uint8Array; /** * Reference to a TI Blob, set if reference_type is BIGSTORE_REF. */ objectId?: GdataObjectId; /** * Path to the data, set if reference_type is PATH */ path?: string; /** * Describes what the field reference contains. */ referenceType?: | "PATH" | "BLOB_REF" | "INLINE" | "BIGSTORE_REF" | "COSMO_BINARY_REFERENCE"; /** * SHA-1 hash for the payload. */ sha1Hash?: Uint8Array; } function serializeGdataCompositeMedia(data: any): GdataCompositeMedia { return { ...data, blobRef: data["blobRef"] !== undefined ? encodeBase64(data["blobRef"]) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? serializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? encodeBase64(data["cosmoBinaryReference"]) : undefined, inline: data["inline"] !== undefined ? encodeBase64(data["inline"]) : undefined, length: data["length"] !== undefined ? String(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? encodeBase64(data["md5Hash"]) : undefined, objectId: data["objectId"] !== undefined ? serializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? encodeBase64(data["sha1Hash"]) : undefined, }; } function deserializeGdataCompositeMedia(data: any): GdataCompositeMedia { return { ...data, blobRef: data["blobRef"] !== undefined ? decodeBase64(data["blobRef"] as string) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? deserializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? decodeBase64(data["cosmoBinaryReference"] as string) : undefined, inline: data["inline"] !== undefined ? decodeBase64(data["inline"] as string) : undefined, length: data["length"] !== undefined ? BigInt(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? decodeBase64(data["md5Hash"] as string) : undefined, objectId: data["objectId"] !== undefined ? deserializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? decodeBase64(data["sha1Hash"] as string) : undefined, }; } /** * Detailed Content-Type information from Scotty. The Content-Type of the media * will typically be filled in by the header or Scotty's best_guess, but this * extended information provides the backend with more information so that it * can make a better decision if needed. This is only used on media upload * requests from Scotty. */ export interface GdataContentTypeInfo { /** * Scotty's best guess of what the content type of the file is. */ bestGuess?: string; /** * The content type of the file derived by looking at specific bytes (i.e. * "magic bytes") of the actual file. */ fromBytes?: string; /** * The content type of the file derived from the file extension of the * original file name used by the client. */ fromFileName?: string; /** * The content type of the file as specified in the request headers, * multipart headers, or RUPIO start request. */ fromHeader?: string; /** * The content type of the file derived from the file extension of the URL * path. The URL path is assumed to represent a file name (which is typically * only true for agents that are providing a REST API). */ fromUrlPath?: string; } /** * Backend response for a Diff get checksums response. For details on the * Scotty Diff protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffChecksumsResponse { /** * Exactly one of these fields must be populated. If checksums_location is * filled, the server will return the corresponding contents to the user. If * object_location is filled, the server will calculate the checksums based on * the content there and return that to the user. For details on the format of * the checksums, see http://go/scotty-diff-protocol. */ checksumsLocation?: GdataCompositeMedia; /** * The chunk size of checksums. Must be a multiple of 256KB. */ chunkSizeBytes?: bigint; /** * If set, calculate the checksums based on the contents and return them to * the caller. */ objectLocation?: GdataCompositeMedia; /** * The total size of the server object. */ objectSizeBytes?: bigint; /** * The object version of the object the checksums are being returned for. */ objectVersion?: string; } function serializeGdataDiffChecksumsResponse(data: any): GdataDiffChecksumsResponse { return { ...data, checksumsLocation: data["checksumsLocation"] !== undefined ? serializeGdataCompositeMedia(data["checksumsLocation"]) : undefined, chunkSizeBytes: data["chunkSizeBytes"] !== undefined ? String(data["chunkSizeBytes"]) : undefined, objectLocation: data["objectLocation"] !== undefined ? serializeGdataCompositeMedia(data["objectLocation"]) : undefined, objectSizeBytes: data["objectSizeBytes"] !== undefined ? String(data["objectSizeBytes"]) : undefined, }; } function deserializeGdataDiffChecksumsResponse(data: any): GdataDiffChecksumsResponse { return { ...data, checksumsLocation: data["checksumsLocation"] !== undefined ? deserializeGdataCompositeMedia(data["checksumsLocation"]) : undefined, chunkSizeBytes: data["chunkSizeBytes"] !== undefined ? BigInt(data["chunkSizeBytes"]) : undefined, objectLocation: data["objectLocation"] !== undefined ? deserializeGdataCompositeMedia(data["objectLocation"]) : undefined, objectSizeBytes: data["objectSizeBytes"] !== undefined ? BigInt(data["objectSizeBytes"]) : undefined, }; } /** * Backend response for a Diff download response. For details on the Scotty * Diff protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffDownloadResponse { /** * The original object location. */ objectLocation?: GdataCompositeMedia; } function serializeGdataDiffDownloadResponse(data: any): GdataDiffDownloadResponse { return { ...data, objectLocation: data["objectLocation"] !== undefined ? serializeGdataCompositeMedia(data["objectLocation"]) : undefined, }; } function deserializeGdataDiffDownloadResponse(data: any): GdataDiffDownloadResponse { return { ...data, objectLocation: data["objectLocation"] !== undefined ? deserializeGdataCompositeMedia(data["objectLocation"]) : undefined, }; } /** * A Diff upload request. For details on the Scotty Diff protocol, visit * http://go/scotty-diff-protocol. */ export interface GdataDiffUploadRequest { /** * The location of the checksums for the new object. Agents must clone the * object located here, as the upload server will delete the contents once a * response is received. For details on the format of the checksums, see * http://go/scotty-diff-protocol. */ checksumsInfo?: GdataCompositeMedia; /** * The location of the new object. Agents must clone the object located here, * as the upload server will delete the contents once a response is received. */ objectInfo?: GdataCompositeMedia; /** * The object version of the object that is the base version the incoming * diff script will be applied to. This field will always be filled in. */ objectVersion?: string; } function serializeGdataDiffUploadRequest(data: any): GdataDiffUploadRequest { return { ...data, checksumsInfo: data["checksumsInfo"] !== undefined ? serializeGdataCompositeMedia(data["checksumsInfo"]) : undefined, objectInfo: data["objectInfo"] !== undefined ? serializeGdataCompositeMedia(data["objectInfo"]) : undefined, }; } function deserializeGdataDiffUploadRequest(data: any): GdataDiffUploadRequest { return { ...data, checksumsInfo: data["checksumsInfo"] !== undefined ? deserializeGdataCompositeMedia(data["checksumsInfo"]) : undefined, objectInfo: data["objectInfo"] !== undefined ? deserializeGdataCompositeMedia(data["objectInfo"]) : undefined, }; } /** * Backend response for a Diff upload request. For details on the Scotty Diff * protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffUploadResponse { /** * The object version of the object at the server. Must be included in the * end notification response. The version in the end notification response * must correspond to the new version of the object that is now stored at the * server, after the upload. */ objectVersion?: string; /** * The location of the original file for a diff upload request. Must be * filled in if responding to an upload start notification. */ originalObject?: GdataCompositeMedia; } function serializeGdataDiffUploadResponse(data: any): GdataDiffUploadResponse { return { ...data, originalObject: data["originalObject"] !== undefined ? serializeGdataCompositeMedia(data["originalObject"]) : undefined, }; } function deserializeGdataDiffUploadResponse(data: any): GdataDiffUploadResponse { return { ...data, originalObject: data["originalObject"] !== undefined ? deserializeGdataCompositeMedia(data["originalObject"]) : undefined, }; } /** * Backend response for a Diff get version response. For details on the Scotty * Diff protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffVersionResponse { /** * The total size of the server object. */ objectSizeBytes?: bigint; /** * The version of the object stored at the server. */ objectVersion?: string; } function serializeGdataDiffVersionResponse(data: any): GdataDiffVersionResponse { return { ...data, objectSizeBytes: data["objectSizeBytes"] !== undefined ? String(data["objectSizeBytes"]) : undefined, }; } function deserializeGdataDiffVersionResponse(data: any): GdataDiffVersionResponse { return { ...data, objectSizeBytes: data["objectSizeBytes"] !== undefined ? BigInt(data["objectSizeBytes"]) : undefined, }; } /** * Parameters specific to media downloads. */ export interface GdataDownloadParameters { /** * A boolean to be returned in the response to Scotty. Allows/disallows gzip * encoding of the payload content when the server thinks it's advantageous * (hence, does not guarantee compression) which allows Scotty to GZip the * response to the client. */ allowGzipCompression?: boolean; /** * Determining whether or not Apiary should skip the inclusion of any * Content-Range header on its response to Scotty. */ ignoreRange?: boolean; } /** * A reference to data stored on the filesystem, on GFS or in blobstore. */ export interface GdataMedia { /** * Deprecated, use one of explicit hash type fields instead. Algorithm used * for calculating the hash. As of 2011/01/21, "MD5" is the only possible * value for this field. New values may be added at any time. */ algorithm?: string; /** * Use object_id instead. */ bigstoreObjectRef?: Uint8Array; /** * Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should * be the byte representation of a blobstore.BlobRef. Since Blobstore is * deprecating v1, use blobstore2_info instead. For now, any v2 blob will also * be represented in this field as v1 BlobRef. */ blobRef?: Uint8Array; /** * Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to * a v2 blob. */ blobstore2Info?: GdataBlobstore2Info; /** * A composite media composed of one or more media objects, set if * reference_type is COMPOSITE_MEDIA. The media length field must be set to * the sum of the lengths of all composite media objects. Note: All composite * media must have length specified. */ compositeMedia?: GdataCompositeMedia[]; /** * MIME type of the data */ contentType?: string; /** * Extended content type information provided for Scotty uploads. */ contentTypeInfo?: GdataContentTypeInfo; /** * A binary data reference for a media download. Serves as a * technology-agnostic binary reference in some Google infrastructure. This * value is a serialized storage_cosmo.BinaryReference proto. Storing it as * bytes is a hack to get around the fact that the cosmo proto (as well as * others it includes) doesn't support JavaScript. This prevents us from * including the actual type of this field. */ cosmoBinaryReference?: Uint8Array; /** * For Scotty Uploads: Scotty-provided hashes for uploads For Scotty * Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A * Hash provided by the agent to be used to verify the data being downloaded. * Currently only supported for inline payloads. Further, only crc32c_hash is * currently supported. */ crc32cHash?: number; /** * Set if reference_type is DIFF_CHECKSUMS_RESPONSE. */ diffChecksumsResponse?: GdataDiffChecksumsResponse; /** * Set if reference_type is DIFF_DOWNLOAD_RESPONSE. */ diffDownloadResponse?: GdataDiffDownloadResponse; /** * Set if reference_type is DIFF_UPLOAD_REQUEST. */ diffUploadRequest?: GdataDiffUploadRequest; /** * Set if reference_type is DIFF_UPLOAD_RESPONSE. */ diffUploadResponse?: GdataDiffUploadResponse; /** * Set if reference_type is DIFF_VERSION_RESPONSE. */ diffVersionResponse?: GdataDiffVersionResponse; /** * Parameters for a media download. */ downloadParameters?: GdataDownloadParameters; /** * Original file name */ filename?: string; /** * Deprecated, use one of explicit hash type fields instead. These two hash * related fields will only be populated on Scotty based media uploads and * will contain the content of the hash group in the NotificationRequest: * http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash * Hex encoded hash value of the uploaded media. */ hash?: string; /** * For Scotty uploads only. If a user sends a hash code and the backend has * requested that Scotty verify the upload against the client hash, Scotty * will perform the check on behalf of the backend and will reject it if the * hashes don't match. This is set to true if Scotty performed this * verification. */ hashVerified?: boolean; /** * Media data, set if reference_type is INLINE */ inline?: Uint8Array; /** * |is_potential_retry| is set false only when Scotty is certain that it has * not sent the request before. When a client resumes an upload, this field * must be set true in agent calls, because Scotty cannot be certain that it * has never sent the request before due to potential failure in the session * state persistence. */ isPotentialRetry?: boolean; /** * Size of the data, in bytes */ length?: bigint; /** * Scotty-provided MD5 hash for an upload. */ md5Hash?: Uint8Array; /** * Media id to forward to the operation GetMedia. Can be set if * reference_type is GET_MEDIA. */ mediaId?: Uint8Array; /** * Reference to a TI Blob, set if reference_type is BIGSTORE_REF. */ objectId?: GdataObjectId; /** * Path to the data, set if reference_type is PATH */ path?: string; /** * Describes what the field reference contains. */ referenceType?: | "PATH" | "BLOB_REF" | "INLINE" | "GET_MEDIA" | "COMPOSITE_MEDIA" | "BIGSTORE_REF" | "DIFF_VERSION_RESPONSE" | "DIFF_CHECKSUMS_RESPONSE" | "DIFF_DOWNLOAD_RESPONSE" | "DIFF_UPLOAD_REQUEST" | "DIFF_UPLOAD_RESPONSE" | "COSMO_BINARY_REFERENCE" | "ARBITRARY_BYTES"; /** * Scotty-provided SHA1 hash for an upload. */ sha1Hash?: Uint8Array; /** * Scotty-provided SHA256 hash for an upload. */ sha256Hash?: Uint8Array; /** * Time at which the media data was last updated, in milliseconds since UNIX * epoch */ timestamp?: bigint; /** * A unique fingerprint/version id for the media data */ token?: string; } function serializeGdataMedia(data: any): GdataMedia { return { ...data, bigstoreObjectRef: data["bigstoreObjectRef"] !== undefined ? encodeBase64(data["bigstoreObjectRef"]) : undefined, blobRef: data["blobRef"] !== undefined ? encodeBase64(data["blobRef"]) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? serializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, compositeMedia: data["compositeMedia"] !== undefined ? data["compositeMedia"].map((item: any) => (serializeGdataCompositeMedia(item))) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? encodeBase64(data["cosmoBinaryReference"]) : undefined, diffChecksumsResponse: data["diffChecksumsResponse"] !== undefined ? serializeGdataDiffChecksumsResponse(data["diffChecksumsResponse"]) : undefined, diffDownloadResponse: data["diffDownloadResponse"] !== undefined ? serializeGdataDiffDownloadResponse(data["diffDownloadResponse"]) : undefined, diffUploadRequest: data["diffUploadRequest"] !== undefined ? serializeGdataDiffUploadRequest(data["diffUploadRequest"]) : undefined, diffUploadResponse: data["diffUploadResponse"] !== undefined ? serializeGdataDiffUploadResponse(data["diffUploadResponse"]) : undefined, diffVersionResponse: data["diffVersionResponse"] !== undefined ? serializeGdataDiffVersionResponse(data["diffVersionResponse"]) : undefined, inline: data["inline"] !== undefined ? encodeBase64(data["inline"]) : undefined, length: data["length"] !== undefined ? String(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? encodeBase64(data["md5Hash"]) : undefined, mediaId: data["mediaId"] !== undefined ? encodeBase64(data["mediaId"]) : undefined, objectId: data["objectId"] !== undefined ? serializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? encodeBase64(data["sha1Hash"]) : undefined, sha256Hash: data["sha256Hash"] !== undefined ? encodeBase64(data["sha256Hash"]) : undefined, timestamp: data["timestamp"] !== undefined ? String(data["timestamp"]) : undefined, }; } function deserializeGdataMedia(data: any): GdataMedia { return { ...data, bigstoreObjectRef: data["bigstoreObjectRef"] !== undefined ? decodeBase64(data["bigstoreObjectRef"] as string) : undefined, blobRef: data["blobRef"] !== undefined ? decodeBase64(data["blobRef"] as string) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? deserializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, compositeMedia: data["compositeMedia"] !== undefined ? data["compositeMedia"].map((item: any) => (deserializeGdataCompositeMedia(item))) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? decodeBase64(data["cosmoBinaryReference"] as string) : undefined, diffChecksumsResponse: data["diffChecksumsResponse"] !== undefined ? deserializeGdataDiffChecksumsResponse(data["diffChecksumsResponse"]) : undefined, diffDownloadResponse: data["diffDownloadResponse"] !== undefined ? deserializeGdataDiffDownloadResponse(data["diffDownloadResponse"]) : undefined, diffUploadRequest: data["diffUploadRequest"] !== undefined ? deserializeGdataDiffUploadRequest(data["diffUploadRequest"]) : undefined, diffUploadResponse: data["diffUploadResponse"] !== undefined ? deserializeGdataDiffUploadResponse(data["diffUploadResponse"]) : undefined, diffVersionResponse: data["diffVersionResponse"] !== undefined ? deserializeGdataDiffVersionResponse(data["diffVersionResponse"]) : undefined, inline: data["inline"] !== undefined ? decodeBase64(data["inline"] as string) : undefined, length: data["length"] !== undefined ? BigInt(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? decodeBase64(data["md5Hash"] as string) : undefined, mediaId: data["mediaId"] !== undefined ? decodeBase64(data["mediaId"] as string) : undefined, objectId: data["objectId"] !== undefined ? deserializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? decodeBase64(data["sha1Hash"] as string) : undefined, sha256Hash: data["sha256Hash"] !== undefined ? decodeBase64(data["sha256Hash"] as string) : undefined, timestamp: data["timestamp"] !== undefined ? BigInt(data["timestamp"]) : undefined, }; } /** * This is a copy of the tech.blob.ObjectId proto, which could not be used * directly here due to transitive closure issues with JavaScript support; see * http://b/8801763. */ export interface GdataObjectId { /** * The name of the bucket to which this object belongs. */ bucketName?: string; /** * Generation of the object. Generations are monotonically increasing across * writes, allowing them to be be compared to determine which generation is * newer. If this is omitted in a request, then you are requesting the live * object. See http://go/bigstore-versions */ generation?: bigint; /** * The name of the object. */ objectName?: string; } function serializeGdataObjectId(data: any): GdataObjectId { return { ...data, generation: data["generation"] !== undefined ? String(data["generation"]) : undefined, }; } function deserializeGdataObjectId(data: any): GdataObjectId { return { ...data, generation: data["generation"] !== undefined ? BigInt(data["generation"]) : undefined, }; } /** * Android App Bundle (AAB) information for a Firebase app. */ export interface GoogleFirebaseAppdistroV1AabInfo { /** * App bundle integration state. Only valid for android apps. */ integrationState?: | "AAB_INTEGRATION_STATE_UNSPECIFIED" | "INTEGRATED" | "PLAY_ACCOUNT_NOT_LINKED" | "NO_APP_WITH_GIVEN_BUNDLE_ID_IN_PLAY_ACCOUNT" | "APP_NOT_PUBLISHED" | "AAB_STATE_UNAVAILABLE" | "PLAY_IAS_TERMS_NOT_ACCEPTED"; /** * The name of the `AabInfo` resource. Format: * `projects/{project_number}/apps/{app}/aabInfo` */ name?: string; /** * App bundle test certificate generated for the app. Set after the first app * bundle is uploaded for this app. */ testCertificate?: GoogleFirebaseAppdistroV1TestCertificate; } /** * The Request message for batch adding testers */ export interface GoogleFirebaseAppdistroV1BatchAddTestersRequest { /** * Required. The email addresses of the tester resources to create. A maximum * of 999 and a minimum of 1 tester can be created in a batch. */ emails?: string[]; } /** * The Response message for `BatchAddTesters`. */ export interface GoogleFirebaseAppdistroV1BatchAddTestersResponse { /** * The testers which are created and/or already exist */ testers?: GoogleFirebaseAppdistroV1Tester[]; } /** * The request message for `BatchDeleteReleases`. */ export interface GoogleFirebaseAppdistroV1BatchDeleteReleasesRequest { /** * Required. The names of the release resources to delete. Format: * `projects/{project_number}/apps/{app_id}/releases/{release_id}` A maximum * of 100 releases can be deleted per request. */ names?: string[]; } /** * The request message for `BatchJoinGroup` */ export interface GoogleFirebaseAppdistroV1BatchJoinGroupRequest { /** * Indicates whether to create tester resources based on `emails` if they * don't exist yet. */ createMissingTesters?: boolean; /** * Required. The emails of the testers to be added to the group. A maximum of * 999 and a minimum of 1 tester can be created in a batch. */ emails?: string[]; } /** * Request message for `BatchLeaveGroup` */ export interface GoogleFirebaseAppdistroV1BatchLeaveGroupRequest { /** * Required. The email addresses of the testers to be removed from the group. * A maximum of 999 and a minimum of 1 testers can be removed in a batch. */ emails?: string[]; } /** * The request message for `BatchRemoveTesters`. */ export interface GoogleFirebaseAppdistroV1BatchRemoveTestersRequest { /** * Required. The email addresses of the tester resources to removed. A * maximum of 999 and a minimum of 1 testers can be deleted in a batch. */ emails?: string[]; } /** * The response message for `BatchRemoveTesters` */ export interface GoogleFirebaseAppdistroV1BatchRemoveTestersResponse { /** * List of deleted tester emails */ emails?: string[]; } /** * The request message for `DistributeRelease`. */ export interface GoogleFirebaseAppdistroV1DistributeReleaseRequest { /** * A list of group aliases (IDs) to be given access to this release. A * combined maximum of 999 `testerEmails` and `groupAliases` can be specified * in a single request. */ groupAliases?: string[]; /** * A list of tester email addresses to be given access to this release. A * combined maximum of 999 `testerEmails` and `groupAliases` can be specified * in a single request. */ testerEmails?: string[]; } /** * The response message for `DistributeRelease`. */ export interface GoogleFirebaseAppdistroV1DistributeReleaseResponse { } /** * A feedback report submitted by a tester for a release. */ export interface GoogleFirebaseAppdistroV1FeedbackReport { /** * Output only. The time when the feedback report was created. */ readonly createTime?: Date; /** * Output only. A link to the Firebase console displaying the feedback * report. */ readonly firebaseConsoleUri?: string; /** * The name of the feedback report resource. Format: * `projects/{project_number}/apps/{app}/releases/{release}/feedbackReports/{feedback_report}` */ name?: string; /** * Output only. A signed link (which expires in one hour) that lets you * directly download the screenshot. */ readonly screenshotUri?: string; /** * Output only. The resource name of the tester who submitted the feedback * report. */ readonly tester?: string; /** * Output only. The text of the feedback report. */ readonly text?: string; } /** * A group which can contain testers. A group can be invited to test apps in a * Firebase project. */ export interface GoogleFirebaseAppdistroV1Group { /** * Required. The display name of the group. */ displayName?: string; /** * Output only. The number of invite links for this group. */ readonly inviteLinkCount?: number; /** * The name of the group resource. Format: * `projects/{project_number}/groups/{group_alias}` */ name?: string; /** * Output only. The number of releases this group is permitted to access. */ readonly releaseCount?: number; /** * Output only. The number of testers who are members of this group. */ readonly testerCount?: number; } /** * The response message for `ListFeedbackReports`. */ export interface GoogleFirebaseAppdistroV1ListFeedbackReportsResponse { /** * The feedback reports */ feedbackReports?: GoogleFirebaseAppdistroV1FeedbackReport[]; /** * A short-lived token, which can be sent as `pageToken` to retrieve the next * page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The response message for `ListGroups`. */ export interface GoogleFirebaseAppdistroV1ListGroupsResponse { /** * The groups listed. */ groups?: GoogleFirebaseAppdistroV1Group[]; /** * A short-lived token, which can be sent as `pageToken` to retrieve the next * page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * The response message for `ListReleases`. */ export interface GoogleFirebaseAppdistroV1ListReleasesResponse { /** * A short-lived token, which can be sent as `pageToken` to retrieve the next * page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The releases */ releases?: GoogleFirebaseAppdistroV1Release[]; } /** * The response message for `ListTesters`. */ export interface GoogleFirebaseAppdistroV1ListTestersResponse { /** * A short-lived token, which can be sent as `pageToken` to retrieve the next * page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The testers listed. */ testers?: GoogleFirebaseAppdistroV1Tester[]; } /** * A release of a Firebase app. */ export interface GoogleFirebaseAppdistroV1Release { /** * Output only. A signed link (which expires in one hour) to directly * download the app binary (IPA/APK/AAB) file. */ readonly binaryDownloadUri?: string; /** * Output only. Build version of the release. For an Android release, the * build version is the `versionCode`. For an iOS release, the build version * is the `CFBundleVersion`. */ readonly buildVersion?: string; /** * Output only. The time the release was created. */ readonly createTime?: Date; /** * Output only. Display version of the release. For an Android release, the * display version is the `versionName`. For an iOS release, the display * version is the `CFBundleShortVersionString`. */ readonly displayVersion?: string; /** * Output only. A link to the Firebase console displaying a single release. */ readonly firebaseConsoleUri?: string; /** * The name of the release resource. Format: * `projects/{project_number}/apps/{app_id}/releases/{release_id}` */ name?: string; /** * Notes of the release. */ releaseNotes?: GoogleFirebaseAppdistroV1ReleaseNotes; /** * Output only. A link to the release in the tester web clip or Android app * that lets testers (which were granted access to the app) view release notes * and install the app onto their devices. */ readonly testingUri?: string; } /** * Notes that belong to a release. */ export interface GoogleFirebaseAppdistroV1ReleaseNotes { /** * The text of the release notes. */ text?: string; } /** * App bundle test certificate */ export interface GoogleFirebaseAppdistroV1TestCertificate { /** * Hex string of MD5 hash of the test certificate used to resign the AAB */ hashMd5?: string; /** * Hex string of SHA1 hash of the test certificate used to resign the AAB */ hashSha1?: string; /** * Hex string of SHA256 hash of the test certificate used to resign the AAB */ hashSha256?: string; } /** * A person that can be invited to test apps in a Firebase project. */ export interface GoogleFirebaseAppdistroV1Tester { /** * The name of the tester associated with the Google account used to accept * the tester invitation. */ displayName?: string; /** * The resource names of the groups this tester belongs to. */ groups?: string[]; /** * Output only. The time the tester was last active. This is the most recent * time the tester installed one of the apps. If they've never installed one * or if the release no longer exists, this is the time the tester was added * to the project. */ readonly lastActivityTime?: Date; /** * The name of the tester resource. Format: * `projects/{project_number}/testers/{email_address}` */ name?: string; } /** * Operation metadata for `UploadRelease`. */ export interface GoogleFirebaseAppdistroV1UploadReleaseMetadata { } /** * Request message for `UploadRelease`. */ export interface GoogleFirebaseAppdistroV1UploadReleaseRequest { /** * Binary to upload */ blob?: GdataMedia; } function serializeGoogleFirebaseAppdistroV1UploadReleaseRequest(data: any): GoogleFirebaseAppdistroV1UploadReleaseRequest { return { ...data, blob: data["blob"] !== undefined ? serializeGdataMedia(data["blob"]) : undefined, }; } function deserializeGoogleFirebaseAppdistroV1UploadReleaseRequest(data: any): GoogleFirebaseAppdistroV1UploadReleaseRequest { return { ...data, blob: data["blob"] !== undefined ? deserializeGdataMedia(data["blob"]) : undefined, }; } /** * Response message for `UploadRelease`. */ export interface GoogleFirebaseAppdistroV1UploadReleaseResponse { /** * Release associated with the uploaded binary. */ release?: GoogleFirebaseAppdistroV1Release; /** * Result of upload release. */ result?: | "UPLOAD_RELEASE_RESULT_UNSPECIFIED" | "RELEASE_CREATED" | "RELEASE_UPDATED" | "RELEASE_UNMODIFIED"; } /** * The request message for Operations.CancelOperation. */ export interface GoogleLongrunningCancelOperationRequest { } /** * The response message for Operations.ListOperations. */ export interface GoogleLongrunningListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: GoogleLongrunningOperation[]; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface GoogleLongrunningOperation { /** * 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; /** * The error result of the operation in case of failure or cancellation. */ error?: GoogleRpcStatus; /** * 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 }; /** * 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; /** * The normal, successful response of the operation. 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 }; } /** * The request message for Operations.WaitOperation. */ export interface GoogleLongrunningWaitOperationRequest { /** * The maximum duration to wait before timing out. If left blank, the wait * will be at most the time permitted by the underlying HTTP/RPC protocol. If * RPC context deadline is also specified, the shorter one will be used. */ timeout?: number /* Duration */; } function serializeGoogleLongrunningWaitOperationRequest(data: any): GoogleLongrunningWaitOperationRequest { return { ...data, timeout: data["timeout"] !== undefined ? data["timeout"] : undefined, }; } function deserializeGoogleLongrunningWaitOperationRequest(data: any): GoogleLongrunningWaitOperationRequest { return { ...data, timeout: data["timeout"] !== undefined ? data["timeout"] : undefined, }; } /** * 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); } */ export interface GoogleProtobufEmpty { } /** * 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 GoogleRpcStatus { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * 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; } /** * Additional options for * FirebaseAppDistribution#projectsAppsReleasesFeedbackReportsList. */ export interface ProjectsAppsReleasesFeedbackReportsListOptions { /** * The maximum number of feedback reports to return. The service may return * fewer than this value. The valid range is [1-100]; If unspecified (0), at * most 25 feedback reports are returned. Values above 100 are coerced to 100. */ pageSize?: number; /** * A page token, received from a previous `ListFeedbackReports` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListFeedbackReports` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for FirebaseAppDistribution#projectsAppsReleasesList. */ export interface ProjectsAppsReleasesListOptions { /** * The expression to filter releases listed in the response. To learn more * about filtering, refer to [Google's AIP-160 standard](http://aip.dev/160). * Supported fields: - `releaseNotes.text` supports `=` (can contain a * wildcard character (`*`) at the beginning or end of the string) - * `createTime` supports `<`, `<=`, `>` and `>=`, and expects an RFC-3339 * formatted string Examples: - `createTime <= "2021-09-08T00:00:00+04:00"` - * `releaseNotes.text="fixes" AND createTime >= "2021-09-08T00:00:00.0Z"` - * `releaseNotes.text="*v1.0.0-rc*"` */ filter?: string; /** * The fields used to order releases. Supported fields: - `createTime` To * specify descending order for a field, append a "desc" suffix, for example, * `createTime desc`. If this parameter is not set, releases are ordered by * `createTime` in descending order. */ orderBy?: string; /** * The maximum number of releases to return. The service may return fewer * than this value. The valid range is [1-100]; If unspecified (0), at most 25 * releases are returned. Values above 100 are coerced to 100. */ pageSize?: number; /** * A page token, received from a previous `ListReleases` call. Provide this * to retrieve the subsequent page. When paginating, all other parameters * provided to `ListReleases` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * FirebaseAppDistribution#projectsAppsReleasesOperationsList. */ export interface ProjectsAppsReleasesOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for FirebaseAppDistribution#projectsAppsReleasesPatch. */ export interface ProjectsAppsReleasesPatchOptions { /** * The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsAppsReleasesPatchOptions(data: any): ProjectsAppsReleasesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsAppsReleasesPatchOptions(data: any): ProjectsAppsReleasesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for FirebaseAppDistribution#projectsGroupsCreate. */ export interface ProjectsGroupsCreateOptions { /** * Optional. The "alias" to use for the group, which will become the final * component of the group's resource name. This value must be unique per * project. The field is named `groupId` to comply with AIP guidance for * user-specified IDs. This value should be 4-63 characters, and valid * characters are `/a-z-/`. If not set, it will be generated based on the * display name. */ groupId?: string; } /** * Additional options for FirebaseAppDistribution#projectsGroupsList. */ export interface ProjectsGroupsListOptions { /** * Optional. The maximum number of groups to return. The service may return * fewer than this value. The valid range is [1-1000]; If unspecified (0), at * most 25 groups are returned. Values above 1000 are coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListGroups` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListGroups` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for FirebaseAppDistribution#projectsGroupsPatch. */ export interface ProjectsGroupsPatchOptions { /** * The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsGroupsPatchOptions(data: any): ProjectsGroupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsGroupsPatchOptions(data: any): ProjectsGroupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for FirebaseAppDistribution#projectsTestersList. */ export interface ProjectsTestersListOptions { /** * Optional. The expression to filter testers listed in the response. To * learn more about filtering, refer to [Google's AIP-160 * standard](http://aip.dev/160). Supported fields: - `name` - `displayName` - * `groups` Example: - `name = "projects/-/testers/*@example.com"` - * `displayName = "Joe Sixpack"` - `groups = "projects/*\/groups/qa-team"` */ filter?: string; /** * Optional. The maximum number of testers to return. The service may return * fewer than this value. The valid range is [1-1000]; If unspecified (0), at * most 10 testers are returned. Values above 1000 are coerced to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListTesters` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListTesters` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for FirebaseAppDistribution#projectsTestersPatch. */ export interface ProjectsTestersPatchOptions { /** * The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsTestersPatchOptions(data: any): ProjectsTestersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsTestersPatchOptions(data: any): ProjectsTestersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function decodeBase64(b64: string): Uint8Array { const binString = atob(b64); const size = binString.length; const bytes = new Uint8Array(size); for (let i = 0; i < size; i++) { bytes[i] = binString.charCodeAt(i); } return bytes; } const base64abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]; /** * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation * @param data */ function encodeBase64(uint8: Uint8Array): string { let result = "", i; const l = uint8.length; for (i = 2; i < l; i += 3) { result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; result += base64abc[uint8[i] & 0x3f]; } if (i === l + 1) { // 1 octet yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[(uint8[i - 2] & 0x03) << 4]; result += "=="; } if (i === l) { // 2 octets yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[(uint8[i - 1] & 0x0f) << 2]; result += "="; } return result; }