From 8eff962cab608341a6f2fedc640a0e32d96f26e2 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Sun, 9 Nov 2025 11:15:19 +0800 Subject: pain --- .../@firebase/storage/dist/src/api.browser.d.ts | 47 +++ .../@firebase/storage/dist/src/api.d.ts | 200 ++++++++++ .../@firebase/storage/dist/src/api.node.d.ts | 47 +++ .../@firebase/storage/dist/src/constants.d.ts | 20 + .../storage/dist/src/implementation/async.d.ts | 22 ++ .../storage/dist/src/implementation/backoff.d.ts | 43 +++ .../storage/dist/src/implementation/blob.d.ts | 34 ++ .../dist/src/implementation/connection.d.ts | 56 +++ .../storage/dist/src/implementation/constants.d.ts | 48 +++ .../storage/dist/src/implementation/error.d.ts | 126 ++++++ .../dist/src/implementation/failrequest.d.ts | 29 ++ .../storage/dist/src/implementation/fs.d.ts | 17 + .../storage/dist/src/implementation/json.d.ts | 7 + .../storage/dist/src/implementation/list.d.ts | 19 + .../storage/dist/src/implementation/location.d.ts | 32 ++ .../storage/dist/src/implementation/metadata.d.ts | 40 ++ .../storage/dist/src/implementation/observer.d.ts | 47 +++ .../storage/dist/src/implementation/path.d.ts | 31 ++ .../storage/dist/src/implementation/request.d.ts | 47 +++ .../dist/src/implementation/requestinfo.d.ts | 73 ++++ .../storage/dist/src/implementation/requests.d.ts | 84 ++++ .../storage/dist/src/implementation/string.d.ts | 73 ++++ .../storage/dist/src/implementation/taskenums.d.ts | 77 ++++ .../storage/dist/src/implementation/type.d.ts | 23 ++ .../storage/dist/src/implementation/url.d.ts | 22 ++ .../storage/dist/src/implementation/utils.d.ts | 23 ++ .../@firebase/storage/dist/src/index.d.ts | 7 + .../@firebase/storage/dist/src/index.node.d.ts | 7 + .../@firebase/storage/dist/src/list.d.ts | 41 ++ .../@firebase/storage/dist/src/metadata.d.ts | 27 ++ .../storage/dist/src/platform/base64.d.ts | 20 + .../storage/dist/src/platform/browser/base64.d.ts | 19 + .../dist/src/platform/browser/connection.d.ts | 55 +++ .../storage/dist/src/platform/connection.d.ts | 22 ++ .../storage/dist/src/platform/node/base64.d.ts | 19 + .../storage/dist/src/platform/node/connection.d.ts | 58 +++ .../@firebase/storage/dist/src/public-types.d.ts | 424 +++++++++++++++++++++ .../@firebase/storage/dist/src/reference.d.ts | 208 ++++++++++ .../@firebase/storage/dist/src/service.d.ts | 131 +++++++ .../@firebase/storage/dist/src/task.d.ts | 148 +++++++ .../@firebase/storage/dist/src/tsdoc-metadata.json | 11 + 41 files changed, 2484 insertions(+) create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/api.browser.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/api.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/api.node.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/constants.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/async.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/backoff.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/blob.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/connection.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/constants.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/error.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/failrequest.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/fs.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/json.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/list.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/location.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/metadata.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/observer.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/path.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/request.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/requestinfo.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/requests.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/string.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/taskenums.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/type.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/url.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/implementation/utils.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/index.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/index.node.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/list.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/metadata.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/platform/base64.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/base64.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/connection.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/platform/connection.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/platform/node/base64.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/platform/node/connection.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/public-types.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/reference.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/service.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/task.d.ts create mode 100644 frontend-old/node_modules/@firebase/storage/dist/src/tsdoc-metadata.json (limited to 'frontend-old/node_modules/@firebase/storage/dist/src') diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/api.browser.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/api.browser.d.ts new file mode 100644 index 0000000..00e4761 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/api.browser.d.ts @@ -0,0 +1,47 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { StorageReference } from './public-types'; +/** + * Downloads the data at the object's location. Returns an error if the object + * is not found. + * + * To use this functionality, you have to whitelist your app's origin in your + * Cloud Storage bucket. See also + * https://cloud.google.com/storage/docs/configuring-cors + * + * This API is not available in Node. + * + * @public + * @param ref - StorageReference where data should be downloaded. + * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to + * retrieve. + * @returns A Promise that resolves with a Blob containing the object's bytes + */ +export declare function getBlob(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; +/** + * Downloads the data at the object's location. Raises an error event if the + * object is not found. + * + * This API is only available in Node. + * + * @public + * @param ref - StorageReference where data should be downloaded. + * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to + * retrieve. + * @returns A stream with the object's data as bytes + */ +export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/api.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/api.d.ts new file mode 100644 index 0000000..3ba97cc --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/api.d.ts @@ -0,0 +1,200 @@ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseApp } from '@firebase/app'; +import { StorageReference, FirebaseStorage, UploadResult, ListOptions, ListResult, UploadTask, SettableMetadata, UploadMetadata, FullMetadata } from './public-types'; +import { Reference } from './reference'; +import { EmulatorMockTokenOptions } from '@firebase/util'; +import { StringFormat } from './implementation/string'; +export { EmulatorMockTokenOptions } from '@firebase/util'; +export { StorageError, StorageErrorCode } from './implementation/error'; +/** + * Public types. + */ +export * from './public-types'; +export { Location as _Location } from './implementation/location'; +export { UploadTask as _UploadTask } from './task'; +export type { Reference as _Reference } from './reference'; +export type { FirebaseStorageImpl as _FirebaseStorageImpl } from './service'; +export { FbsBlob as _FbsBlob } from './implementation/blob'; +export { dataFromString as _dataFromString } from './implementation/string'; +export { invalidRootOperation as _invalidRootOperation, invalidArgument as _invalidArgument } from './implementation/error'; +export { TaskEvent as _TaskEvent, TaskState as _TaskState } from './implementation/taskenums'; +export { StringFormat }; +/** + * Downloads the data at the object's location. Returns an error if the object + * is not found. + * + * To use this functionality, you have to whitelist your app's origin in your + * Cloud Storage bucket. See also + * https://cloud.google.com/storage/docs/configuring-cors + * + * @public + * @param ref - StorageReference where data should be downloaded. + * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to + * retrieve. + * @returns A Promise containing the object's bytes + */ +export declare function getBytes(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; +/** + * Uploads data to this object's location. + * The upload is not resumable. + * @public + * @param ref - {@link StorageReference} where data should be uploaded. + * @param data - The data to upload. + * @param metadata - Metadata for the data to upload. + * @returns A Promise containing an UploadResult + */ +export declare function uploadBytes(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Promise; +/** + * Uploads a string to this object's location. + * The upload is not resumable. + * @public + * @param ref - {@link StorageReference} where string should be uploaded. + * @param value - The string to upload. + * @param format - The format of the string to upload. + * @param metadata - Metadata for the string to upload. + * @returns A Promise containing an UploadResult + */ +export declare function uploadString(ref: StorageReference, value: string, format?: StringFormat, metadata?: UploadMetadata): Promise; +/** + * Uploads data to this object's location. + * The upload can be paused and resumed, and exposes progress updates. + * @public + * @param ref - {@link StorageReference} where data should be uploaded. + * @param data - The data to upload. + * @param metadata - Metadata for the data to upload. + * @returns An UploadTask + */ +export declare function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask; +/** + * A `Promise` that resolves with the metadata for this object. If this + * object doesn't exist or metadata cannot be retrieved, the promise is + * rejected. + * @public + * @param ref - {@link StorageReference} to get metadata from. + */ +export declare function getMetadata(ref: StorageReference): Promise; +/** + * Updates the metadata for this object. + * @public + * @param ref - {@link StorageReference} to update metadata for. + * @param metadata - The new metadata for the object. + * Only values that have been explicitly set will be changed. Explicitly + * setting a value to null will remove the metadata. + * @returns A `Promise` that resolves with the new metadata for this object. + */ +export declare function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise; +/** + * List items (files) and prefixes (folders) under this storage reference. + * + * List API is only available for Firebase Rules Version 2. + * + * GCS is a key-blob store. Firebase Storage imposes the semantic of '/' + * delimited folder structure. + * Refer to GCS's List API if you want to learn more. + * + * To adhere to Firebase Rules's Semantics, Firebase Storage does not + * support objects whose paths end with "/" or contain two consecutive + * "/"s. Firebase Storage List API will filter these unsupported objects. + * list() may fail if there are too many unsupported objects in the bucket. + * @public + * + * @param ref - {@link StorageReference} to get list from. + * @param options - See {@link ListOptions} for details. + * @returns A `Promise` that resolves with the items and prefixes. + * `prefixes` contains references to sub-folders and `items` + * contains references to objects in this folder. `nextPageToken` + * can be used to get the rest of the results. + */ +export declare function list(ref: StorageReference, options?: ListOptions): Promise; +/** + * List all items (files) and prefixes (folders) under this storage reference. + * + * This is a helper method for calling list() repeatedly until there are + * no more results. The default pagination size is 1000. + * + * Note: The results may not be consistent if objects are changed while this + * operation is running. + * + * Warning: `listAll` may potentially consume too many resources if there are + * too many results. + * @public + * @param ref - {@link StorageReference} to get list from. + * + * @returns A `Promise` that resolves with all the items and prefixes under + * the current storage reference. `prefixes` contains references to + * sub-directories and `items` contains references to objects in this + * folder. `nextPageToken` is never returned. + */ +export declare function listAll(ref: StorageReference): Promise; +/** + * Returns the download URL for the given {@link StorageReference}. + * @public + * @param ref - {@link StorageReference} to get the download URL for. + * @returns A `Promise` that resolves with the download + * URL for this object. + */ +export declare function getDownloadURL(ref: StorageReference): Promise; +/** + * Deletes the object at this location. + * @public + * @param ref - {@link StorageReference} for object to delete. + * @returns A `Promise` that resolves if the deletion succeeds. + */ +export declare function deleteObject(ref: StorageReference): Promise; +/** + * Returns a {@link StorageReference} for the given url. + * @param storage - {@link FirebaseStorage} instance. + * @param url - URL. If empty, returns root reference. + * @public + */ +export declare function ref(storage: FirebaseStorage, url?: string): StorageReference; +/** + * Returns a {@link StorageReference} for the given path in the + * default bucket. + * @param storageOrRef - {@link FirebaseStorage} or {@link StorageReference}. + * @param pathOrUrlStorage - path. If empty, returns root reference (if {@link FirebaseStorage} + * instance provided) or returns same reference (if {@link StorageReference} provided). + * @public + */ +export declare function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference; +/** + * @internal + */ +export declare function _getChild(ref: StorageReference, childPath: string): Reference; +/** + * Gets a {@link FirebaseStorage} instance for the given Firebase app. + * @public + * @param app - Firebase app to get {@link FirebaseStorage} instance for. + * @param bucketUrl - The gs:// url to your Firebase Storage Bucket. + * If not passed, uses the app's default Storage Bucket. + * @returns A {@link FirebaseStorage} instance. + */ +export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage; +/** + * Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator. + * + * @param storage - The {@link FirebaseStorage} instance + * @param host - The emulator host (ex: localhost) + * @param port - The emulator port (ex: 5001) + * @param options - Emulator options. `options.mockUserToken` is the mock auth + * token to use for unit testing Security Rules. + * @public + */ +export declare function connectStorageEmulator(storage: FirebaseStorage, host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; +}): void; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/api.node.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/api.node.d.ts new file mode 100644 index 0000000..00e4761 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/api.node.d.ts @@ -0,0 +1,47 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { StorageReference } from './public-types'; +/** + * Downloads the data at the object's location. Returns an error if the object + * is not found. + * + * To use this functionality, you have to whitelist your app's origin in your + * Cloud Storage bucket. See also + * https://cloud.google.com/storage/docs/configuring-cors + * + * This API is not available in Node. + * + * @public + * @param ref - StorageReference where data should be downloaded. + * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to + * retrieve. + * @returns A Promise that resolves with a Blob containing the object's bytes + */ +export declare function getBlob(ref: StorageReference, maxDownloadSizeBytes?: number): Promise; +/** + * Downloads the data at the object's location. Raises an error event if the + * object is not found. + * + * This API is only available in Node. + * + * @public + * @param ref - StorageReference where data should be downloaded. + * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to + * retrieve. + * @returns A stream with the object's data as bytes + */ +export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/constants.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/constants.d.ts new file mode 100644 index 0000000..c9c810f --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/constants.d.ts @@ -0,0 +1,20 @@ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Type constant for Firebase Storage. + */ +export declare const STORAGE_TYPE = "storage"; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/async.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/async.d.ts new file mode 100644 index 0000000..9d01868 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/async.d.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Returns a function that invokes f with its arguments asynchronously as a + * microtask, i.e. as soon as possible after the current script returns back + * into browser code. + */ +export declare function async(f: Function): Function; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/backoff.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/backoff.d.ts new file mode 100644 index 0000000..39ab9b7 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/backoff.d.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Provides a method for running a function with exponential + * backoff. + */ +type id = (p1: boolean) => void; +export { id }; +/** + * Accepts a callback for an action to perform (`doRequest`), + * and then a callback for when the backoff has completed (`backoffCompleteCb`). + * The callback sent to start requires an argument to call (`onRequestComplete`). + * When `start` calls `doRequest`, it passes a callback for when the request has + * completed, `onRequestComplete`. Based on this, the backoff continues, with + * another call to `doRequest` and the above loop continues until the timeout + * is hit, or a successful response occurs. + * @description + * @param doRequest Callback to perform request + * @param backoffCompleteCb Callback to call when backoff has been completed + */ +export declare function start(doRequest: (onRequestComplete: (success: boolean) => void, canceled: boolean) => void, backoffCompleteCb: (...args: any[]) => unknown, timeout: number): id; +/** + * Stops the retry loop from repeating. + * If the function is currently "in between" retries, it is invoked immediately + * with the second parameter as "true". Otherwise, it will be invoked once more + * after the current invocation finishes iff the current invocation would have + * triggered another retry. + */ +export declare function stop(id: id): void; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/blob.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/blob.d.ts new file mode 100644 index 0000000..419491b --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/blob.d.ts @@ -0,0 +1,34 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @param opt_elideCopy - If true, doesn't copy mutable input data + * (e.g. Uint8Arrays). Pass true only if you know the objects will not be + * modified after this blob's construction. + * + * @internal + */ +export declare class FbsBlob { + private data_; + private size_; + private type_; + constructor(data: Blob | Uint8Array | ArrayBuffer, elideCopy?: boolean); + size(): number; + type(): string; + slice(startByte: number, endByte: number): FbsBlob | null; + static getBlob(...args: Array): FbsBlob | null; + uploadData(): Blob | Uint8Array; +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/connection.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/connection.d.ts new file mode 100644 index 0000000..269f2d9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/connection.d.ts @@ -0,0 +1,56 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** Network headers */ +export type Headers = Record; +/** Response type exposed by the networking APIs. */ +export type ConnectionType = string | ArrayBuffer | Blob | ReadableStream; +/** + * A lightweight wrapper around XMLHttpRequest with a + * goog.net.XhrIo-like interface. + * + * You can create a new connection by invoking `newTextConnection()`, + * `newBytesConnection()` or `newStreamConnection()`. + */ +export interface Connection { + /** + * Sends a request to the provided URL. + * + * This method never rejects its promise. In case of encountering an error, + * it sets an error code internally which can be accessed by calling + * getErrorCode() by callers. + */ + send(url: string, method: string, isUsingEmulator: boolean, body?: ArrayBufferView | Blob | string | null, headers?: Headers): Promise; + getErrorCode(): ErrorCode; + getStatus(): number; + getResponse(): T; + getErrorText(): string; + /** + * Abort the request. + */ + abort(): void; + getResponseHeader(header: string): string | null; + addUploadProgressListener(listener: (p1: ProgressEvent) => void): void; + removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void; +} +/** + * Error codes for requests made by the XhrIo wrapper. + */ +export declare enum ErrorCode { + NO_ERROR = 0, + NETWORK_ERROR = 1, + ABORT = 2 +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/constants.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/constants.d.ts new file mode 100644 index 0000000..957b4d6 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/constants.d.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Constants used in the Firebase Storage library. + */ +/** + * Domain name for firebase storage. + */ +export declare const DEFAULT_HOST = "firebasestorage.googleapis.com"; +/** + * The key in Firebase config json for the storage bucket. + */ +export declare const CONFIG_STORAGE_BUCKET_KEY = "storageBucket"; +/** + * 2 minutes + * + * The timeout for all operations except upload. + */ +export declare const DEFAULT_MAX_OPERATION_RETRY_TIME: number; +/** + * 10 minutes + * + * The timeout for upload. + */ +export declare const DEFAULT_MAX_UPLOAD_RETRY_TIME: number; +/** + * 1 second + */ +export declare const DEFAULT_MIN_SLEEP_TIME_MILLIS = 1000; +/** + * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported + * enough for us to use it directly. + */ +export declare const MIN_SAFE_INTEGER = -9007199254740991; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/error.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/error.d.ts new file mode 100644 index 0000000..dfc0884 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/error.d.ts @@ -0,0 +1,126 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseError } from '@firebase/util'; +/** + * An error returned by the Firebase Storage SDK. + * @public + */ +export declare class StorageError extends FirebaseError { + private status_; + private readonly _baseMessage; + /** + * Stores custom error data unique to the `StorageError`. + */ + customData: { + serverResponse: string | null; + }; + /** + * @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and + * added to the end of the message. + * @param message - Error message. + * @param status_ - Corresponding HTTP Status Code + */ + constructor(code: StorageErrorCode, message: string, status_?: number); + get status(): number; + set status(status: number); + /** + * Compares a `StorageErrorCode` against this error's code, filtering out the prefix. + */ + _codeEquals(code: StorageErrorCode): boolean; + /** + * Optional response message that was added by the server. + */ + get serverResponse(): null | string; + set serverResponse(serverResponse: string | null); +} +export declare const errors: {}; +/** + * @public + * Error codes that can be attached to `StorageError` objects. + */ +export declare enum StorageErrorCode { + UNKNOWN = "unknown", + OBJECT_NOT_FOUND = "object-not-found", + BUCKET_NOT_FOUND = "bucket-not-found", + PROJECT_NOT_FOUND = "project-not-found", + QUOTA_EXCEEDED = "quota-exceeded", + UNAUTHENTICATED = "unauthenticated", + UNAUTHORIZED = "unauthorized", + UNAUTHORIZED_APP = "unauthorized-app", + RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded", + INVALID_CHECKSUM = "invalid-checksum", + CANCELED = "canceled", + INVALID_EVENT_NAME = "invalid-event-name", + INVALID_URL = "invalid-url", + INVALID_DEFAULT_BUCKET = "invalid-default-bucket", + NO_DEFAULT_BUCKET = "no-default-bucket", + CANNOT_SLICE_BLOB = "cannot-slice-blob", + SERVER_FILE_WRONG_SIZE = "server-file-wrong-size", + NO_DOWNLOAD_URL = "no-download-url", + INVALID_ARGUMENT = "invalid-argument", + INVALID_ARGUMENT_COUNT = "invalid-argument-count", + APP_DELETED = "app-deleted", + INVALID_ROOT_OPERATION = "invalid-root-operation", + INVALID_FORMAT = "invalid-format", + INTERNAL_ERROR = "internal-error", + UNSUPPORTED_ENVIRONMENT = "unsupported-environment" +} +export declare function prependCode(code: StorageErrorCode): string; +export declare function unknown(): StorageError; +export declare function objectNotFound(path: string): StorageError; +export declare function bucketNotFound(bucket: string): StorageError; +export declare function projectNotFound(project: string): StorageError; +export declare function quotaExceeded(bucket: string): StorageError; +export declare function unauthenticated(): StorageError; +export declare function unauthorizedApp(): StorageError; +export declare function unauthorized(path: string): StorageError; +export declare function retryLimitExceeded(): StorageError; +export declare function invalidChecksum(path: string, checksum: string, calculated: string): StorageError; +export declare function canceled(): StorageError; +export declare function invalidEventName(name: string): StorageError; +export declare function invalidUrl(url: string): StorageError; +export declare function invalidDefaultBucket(bucket: string): StorageError; +export declare function noDefaultBucket(): StorageError; +export declare function cannotSliceBlob(): StorageError; +export declare function serverFileWrongSize(): StorageError; +export declare function noDownloadURL(): StorageError; +export declare function missingPolyFill(polyFill: string): StorageError; +/** + * @internal + */ +export declare function invalidArgument(message: string): StorageError; +export declare function invalidArgumentCount(argMin: number, argMax: number, fnName: string, real: number): StorageError; +export declare function appDeleted(): StorageError; +/** + * @param name - The name of the operation that was invalid. + * + * @internal + */ +export declare function invalidRootOperation(name: string): StorageError; +/** + * @param format - The format that was not valid. + * @param message - A message describing the format violation. + */ +export declare function invalidFormat(format: string, message: string): StorageError; +/** + * @param message - A message describing the internal error. + */ +export declare function unsupportedEnvironment(message: string): StorageError; +/** + * @param message - A message describing the internal error. + */ +export declare function internalError(message: string): StorageError; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/failrequest.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/failrequest.d.ts new file mode 100644 index 0000000..89d079c --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/failrequest.d.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { StorageError } from './error'; +import { Request } from './request'; +/** + * A request whose promise always fails. + */ +export declare class FailRequest implements Request { + promise_: Promise; + constructor(error: StorageError); + /** @inheritDoc */ + getPromise(): Promise; + /** @inheritDoc */ + cancel(_appDelete?: boolean): void; +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/fs.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/fs.d.ts new file mode 100644 index 0000000..30cd68d --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/fs.d.ts @@ -0,0 +1,17 @@ +/** + * Concatenates one or more values together and converts them to a Blob. + * + * @param args The values that will make up the resulting blob. + * @return The blob. + */ +export declare function getBlob(...args: Array): Blob; +/** + * Slices the blob. The returned blob contains data from the start byte + * (inclusive) till the end byte (exclusive). Negative indices cannot be used. + * + * @param blob The blob to be sliced. + * @param start Index of the starting byte. + * @param end Index of the ending byte. + * @return The blob slice or null if not supported. + */ +export declare function sliceBlob(blob: Blob, start: number, end: number): Blob | null; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/json.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/json.d.ts new file mode 100644 index 0000000..58151dc --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/json.d.ts @@ -0,0 +1,7 @@ +/** + * Returns the Object resulting from parsing the given JSON, or null if the + * given string does not represent a JSON object. + */ +export declare function jsonObjectOrNull(s: string): { + [name: string]: unknown; +} | null; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/list.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/list.d.ts new file mode 100644 index 0000000..9107503 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/list.d.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { ListResult } from '../list'; +import { FirebaseStorageImpl } from '../service'; +export declare function fromResponseString(service: FirebaseStorageImpl, bucket: string, resourceString: string): ListResult | null; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/location.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/location.d.ts new file mode 100644 index 0000000..f6e1ab6 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/location.d.ts @@ -0,0 +1,32 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Firebase Storage location data. + * + * @internal + */ +export declare class Location { + readonly bucket: string; + private path_; + constructor(bucket: string, path: string); + get path(): string; + get isRoot(): boolean; + fullServerUrl(): string; + bucketOnlyServerUrl(): string; + static makeFromBucketSpec(bucketString: string, host: string): Location; + static makeFromUrl(url: string, host: string): Location; +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/metadata.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/metadata.d.ts new file mode 100644 index 0000000..fadfd35 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/metadata.d.ts @@ -0,0 +1,40 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Documentation for the metadata format + */ +import { Metadata } from '../metadata'; +import { FirebaseStorageImpl } from '../service'; +export declare function noXform_(metadata: Metadata, value: T): T; +declare class Mapping { + server: string; + local: string; + writable: boolean; + xform: (p1: Metadata, p2?: T) => T | undefined; + constructor(server: string, local?: string | null, writable?: boolean, xform?: ((p1: Metadata, p2?: T) => T | undefined) | null); +} +type Mappings = Array | Mapping>; +export { Mappings }; +export declare function xformPath(fullPath: string | undefined): string | undefined; +export declare function getMappings(): Mappings; +export declare function addRef(metadata: Metadata, service: FirebaseStorageImpl): void; +export declare function fromResource(service: FirebaseStorageImpl, resource: { + [name: string]: unknown; +}, mappings: Mappings): Metadata; +export declare function fromResourceString(service: FirebaseStorageImpl, resourceString: string, mappings: Mappings): Metadata | null; +export declare function downloadUrlFromResourceString(metadata: Metadata, resourceString: string, host: string, protocol: string): string | null; +export declare function toResourceString(metadata: Partial, mappings: Mappings): string; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/observer.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/observer.d.ts new file mode 100644 index 0000000..0702651 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/observer.d.ts @@ -0,0 +1,47 @@ +import { StorageError } from './error'; +/** + * Function that is called once for each value in a stream of values. + */ +export type NextFn = (value: T) => void; +/** + * A function that is called with a `StorageError` + * if the event stream ends due to an error. + */ +export type ErrorFn = (error: StorageError) => void; +/** + * A function that is called if the event stream ends normally. + */ +export type CompleteFn = () => void; +/** + * Unsubscribes from a stream. + */ +export type Unsubscribe = () => void; +/** + * An observer identical to the `Observer` defined in packages/util except the + * error passed into the ErrorFn is specifically a `StorageError`. + */ +export interface StorageObserver { + /** + * Function that is called once for each value in the event stream. + */ + next?: NextFn; + /** + * A function that is called with a `StorageError` + * if the event stream ends due to an error. + */ + error?: ErrorFn; + /** + * A function that is called if the event stream ends normally. + */ + complete?: CompleteFn; +} +/** + * Subscribes to an event stream. + */ +export type Subscribe = (next?: NextFn | StorageObserver, error?: ErrorFn, complete?: CompleteFn) => Unsubscribe; +export declare class Observer implements StorageObserver { + next?: NextFn; + error?: ErrorFn; + complete?: CompleteFn; + constructor(nextOrObserver?: NextFn | StorageObserver, error?: ErrorFn, complete?: CompleteFn); +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/path.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/path.d.ts new file mode 100644 index 0000000..f566805 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/path.d.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Contains helper methods for manipulating paths. + */ +/** + * @return Null if the path is already at the root. + */ +export declare function parent(path: string): string | null; +export declare function child(path: string, childPath: string): string; +/** + * Returns the last component of a path. + * '/foo/bar' -> 'bar' + * '/foo/bar/baz/' -> 'baz/' + * '/a' -> 'a' + */ +export declare function lastComponent(path: string): string; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/request.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/request.d.ts new file mode 100644 index 0000000..1b01a28 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/request.d.ts @@ -0,0 +1,47 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { RequestInfo } from './requestinfo'; +import { Connection, Headers, ConnectionType } from './connection'; +export interface Request { + getPromise(): Promise; + /** + * Cancels the request. IMPORTANT: the promise may still be resolved with an + * appropriate value (if the request is finished before you call this method, + * but the promise has not yet been resolved), so don't just assume it will be + * rejected if you call this function. + * @param appDelete - True if the cancelation came from the app being deleted. + */ + cancel(appDelete?: boolean): void; +} +/** + * A collection of information about the result of a network request. + * @param opt_canceled - Defaults to false. + */ +export declare class RequestEndStatus { + wasSuccessCode: boolean; + connection: Connection | null; + /** + * True if the request was canceled. + */ + canceled: boolean; + constructor(wasSuccessCode: boolean, connection: Connection | null, canceled?: boolean); +} +export declare function addAuthHeader_(headers: Headers, authToken: string | null): void; +export declare function addVersionHeader_(headers: Headers, firebaseVersion?: string): void; +export declare function addGmpidHeader_(headers: Headers, appId: string | null): void; +export declare function addAppCheckHeader_(headers: Headers, appCheckToken: string | null): void; +export declare function makeRequest(requestInfo: RequestInfo, appId: string | null, authToken: string | null, appCheckToken: string | null, requestFactory: () => Connection, firebaseVersion?: string, retry?: boolean, isUsingEmulator?: boolean): Request; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/requestinfo.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/requestinfo.d.ts new file mode 100644 index 0000000..fec97c9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/requestinfo.d.ts @@ -0,0 +1,73 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { StorageError } from './error'; +import { Headers, Connection, ConnectionType } from './connection'; +/** + * Type for url params stored in RequestInfo. + */ +export interface UrlParams { + [name: string]: string | number; +} +/** + * A function that converts a server response to the API type expected by the + * SDK. + * + * @param I - the type of the backend's network response + * @param O - the output response type used by the rest of the SDK. + */ +export type RequestHandler = (connection: Connection, response: I) => O; +/** A function to handle an error. */ +export type ErrorHandler = (connection: Connection, response: StorageError) => StorageError; +/** + * Contains a fully specified request. + * + * @param I - the type of the backend's network response. + * @param O - the output response type used by the rest of the SDK. + */ +export declare class RequestInfo { + url: string; + method: string; + /** + * Returns the value with which to resolve the request's promise. Only called + * if the request is successful. Throw from this function to reject the + * returned Request's promise with the thrown error. + * Note: The XhrIo passed to this function may be reused after this callback + * returns. Do not keep a reference to it in any way. + */ + handler: RequestHandler; + timeout: number; + urlParams: UrlParams; + headers: Headers; + body: Blob | string | Uint8Array | null; + errorHandler: ErrorHandler | null; + /** + * Called with the current number of bytes uploaded and total size (-1 if not + * computable) of the request body (i.e. used to report upload progress). + */ + progressCallback: ((p1: number, p2: number) => void) | null; + successCodes: number[]; + additionalRetryCodes: number[]; + constructor(url: string, method: string, + /** + * Returns the value with which to resolve the request's promise. Only called + * if the request is successful. Throw from this function to reject the + * returned Request's promise with the thrown error. + * Note: The XhrIo passed to this function may be reused after this callback + * returns. Do not keep a reference to it in any way. + */ + handler: RequestHandler, timeout: number); +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/requests.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/requests.d.ts new file mode 100644 index 0000000..a019496 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/requests.d.ts @@ -0,0 +1,84 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Defines methods for interacting with the network. + */ +import { Metadata } from '../metadata'; +import { ListResult } from '../list'; +import { FbsBlob } from './blob'; +import { StorageError } from './error'; +import { Location } from './location'; +import { Mappings } from './metadata'; +import { RequestInfo } from './requestinfo'; +import { Connection, ConnectionType } from './connection'; +import { FirebaseStorageImpl } from '../service'; +/** + * Throws the UNKNOWN StorageError if cndn is false. + */ +export declare function handlerCheck(cndn: boolean): void; +export declare function metadataHandler(service: FirebaseStorageImpl, mappings: Mappings): (p1: Connection, p2: string) => Metadata; +export declare function listHandler(service: FirebaseStorageImpl, bucket: string): (p1: Connection, p2: string) => ListResult; +export declare function downloadUrlHandler(service: FirebaseStorageImpl, mappings: Mappings): (p1: Connection, p2: string) => string | null; +export declare function sharedErrorHandler(location: Location): (p1: Connection, p2: StorageError) => StorageError; +export declare function objectErrorHandler(location: Location): (p1: Connection, p2: StorageError) => StorageError; +export declare function getMetadata(service: FirebaseStorageImpl, location: Location, mappings: Mappings): RequestInfo; +export declare function list(service: FirebaseStorageImpl, location: Location, delimiter?: string, pageToken?: string | null, maxResults?: number | null): RequestInfo; +export declare function getBytes(service: FirebaseStorageImpl, location: Location, maxDownloadSizeBytes?: number): RequestInfo; +export declare function getDownloadUrl(service: FirebaseStorageImpl, location: Location, mappings: Mappings): RequestInfo; +export declare function updateMetadata(service: FirebaseStorageImpl, location: Location, metadata: Partial, mappings: Mappings): RequestInfo; +export declare function deleteObject(service: FirebaseStorageImpl, location: Location): RequestInfo; +export declare function determineContentType_(metadata: Metadata | null, blob: FbsBlob | null): string; +export declare function metadataForUpload_(location: Location, blob: FbsBlob, metadata?: Metadata | null): Metadata; +/** + * Prepare RequestInfo for uploads as Content-Type: multipart. + */ +export declare function multipartUpload(service: FirebaseStorageImpl, location: Location, mappings: Mappings, blob: FbsBlob, metadata?: Metadata | null): RequestInfo; +/** + * @param current The number of bytes that have been uploaded so far. + * @param total The total number of bytes in the upload. + * @param opt_finalized True if the server has finished the upload. + * @param opt_metadata The upload metadata, should + * only be passed if opt_finalized is true. + */ +export declare class ResumableUploadStatus { + current: number; + total: number; + finalized: boolean; + metadata: Metadata | null; + constructor(current: number, total: number, finalized?: boolean, metadata?: Metadata | null); +} +export declare function checkResumeHeader_(xhr: Connection, allowed?: string[]): string; +export declare function createResumableUpload(service: FirebaseStorageImpl, location: Location, mappings: Mappings, blob: FbsBlob, metadata?: Metadata | null): RequestInfo; +/** + * @param url From a call to fbs.requests.createResumableUpload. + */ +export declare function getResumableUploadStatus(service: FirebaseStorageImpl, location: Location, url: string, blob: FbsBlob): RequestInfo; +/** + * Any uploads via the resumable upload API must transfer a number of bytes + * that is a multiple of this number. + */ +export declare const RESUMABLE_UPLOAD_CHUNK_SIZE: number; +/** + * @param url From a call to fbs.requests.createResumableUpload. + * @param chunkSize Number of bytes to upload. + * @param status The previous status. + * If not passed or null, we start from the beginning. + * @throws fbs.Error If the upload is already complete, the passed in status + * has a final size inconsistent with the blob, or the blob cannot be sliced + * for upload. + */ +export declare function continueResumableUpload(location: Location, service: FirebaseStorageImpl, url: string, blob: FbsBlob, chunkSize: number, mappings: Mappings, status?: ResumableUploadStatus | null, progressCallback?: ((p1: number, p2: number) => void) | null): RequestInfo; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/string.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/string.d.ts new file mode 100644 index 0000000..0549cf9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/string.d.ts @@ -0,0 +1,73 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * An enumeration of the possible string formats for upload. + * @public + */ +export type StringFormat = (typeof StringFormat)[keyof typeof StringFormat]; +/** + * An enumeration of the possible string formats for upload. + * @public + */ +export declare const StringFormat: { + /** + * Indicates the string should be interpreted "raw", that is, as normal text. + * The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte + * sequence. + * Example: The string 'Hello! \\ud83d\\ude0a' becomes the byte sequence + * 48 65 6c 6c 6f 21 20 f0 9f 98 8a + */ + readonly RAW: "raw"; + /** + * Indicates the string should be interpreted as base64-encoded data. + * Padding characters (trailing '='s) are optional. + * Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence + * ad 69 8e fb e1 3a b7 bf eb 97 + */ + readonly BASE64: "base64"; + /** + * Indicates the string should be interpreted as base64url-encoded data. + * Padding characters (trailing '='s) are optional. + * Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence + * ad 69 8e fb e1 3a b7 bf eb 97 + */ + readonly BASE64URL: "base64url"; + /** + * Indicates the string is a data URL, such as one obtained from + * canvas.toDataURL(). + * Example: the string 'data:application/octet-stream;base64,aaaa' + * becomes the byte sequence + * 69 a6 9a + * (the content-type "application/octet-stream" is also applied, but can + * be overridden in the metadata object). + */ + readonly DATA_URL: "data_url"; +}; +export declare class StringData { + data: Uint8Array; + contentType: string | null; + constructor(data: Uint8Array, contentType?: string | null); +} +/** + * @internal + */ +export declare function dataFromString(format: StringFormat, stringData: string): StringData; +export declare function utf8Bytes_(value: string): Uint8Array; +export declare function percentEncodedBytes_(value: string): Uint8Array; +export declare function base64Bytes_(format: StringFormat, value: string): Uint8Array; +export declare function dataURLBytes_(dataUrl: string): Uint8Array; +export declare function dataURLContentType_(dataUrl: string): string | null; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/taskenums.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/taskenums.d.ts new file mode 100644 index 0000000..6c6d880 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/taskenums.d.ts @@ -0,0 +1,77 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Enumerations used for upload tasks. + */ +/** + * An event that is triggered on a task. + * @internal + */ +export type TaskEvent = string; +/** + * An event that is triggered on a task. + * @internal + */ +export declare const TaskEvent: { + /** + * For this event, + *
    + *
  • The `next` function is triggered on progress updates and when the + * task is paused/resumed with an `UploadTaskSnapshot` as the first + * argument.
  • + *
  • The `error` function is triggered if the upload is canceled or fails + * for another reason.
  • + *
  • The `complete` function is triggered if the upload completes + * successfully.
  • + *
+ */ + STATE_CHANGED: string; +}; +/** + * Internal enum for task state. + */ +export declare const enum InternalTaskState { + RUNNING = "running", + PAUSING = "pausing", + PAUSED = "paused", + SUCCESS = "success", + CANCELING = "canceling", + CANCELED = "canceled", + ERROR = "error" +} +/** + * Represents the current state of a running upload. + * @internal + */ +export type TaskState = (typeof TaskState)[keyof typeof TaskState]; +/** + * Represents the current state of a running upload. + * @internal + */ +export declare const TaskState: { + /** The task is currently transferring data. */ + readonly RUNNING: "running"; + /** The task was paused by the user. */ + readonly PAUSED: "paused"; + /** The task completed successfully. */ + readonly SUCCESS: "success"; + /** The task was canceled. */ + readonly CANCELED: "canceled"; + /** The task failed with an error. */ + readonly ERROR: "error"; +}; +export declare function taskStateFromInternalTaskState(state: InternalTaskState): TaskState; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/type.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/type.d.ts new file mode 100644 index 0000000..ed70cc9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/type.d.ts @@ -0,0 +1,23 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export declare function isJustDef(p: T | null | undefined): p is T | null; +export declare function isFunction(p: unknown): p is Function; +export declare function isNonArrayObject(p: unknown): boolean; +export declare function isString(p: unknown): p is string; +export declare function isNativeBlob(p: unknown): p is Blob; +export declare function isNativeBlobDefined(): boolean; +export declare function validateNumber(argument: string, minValue: number, maxValue: number, value: number): void; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/url.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/url.d.ts new file mode 100644 index 0000000..caf7f3c --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/url.d.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Functions to create and manipulate URLs for the server API. + */ +import { UrlParams } from './requestinfo'; +export declare function makeUrl(urlPart: string, host: string, protocol: string): string; +export declare function makeQueryString(params: UrlParams): string; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/implementation/utils.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/utils.d.ts new file mode 100644 index 0000000..b91f9dc --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/implementation/utils.d.ts @@ -0,0 +1,23 @@ +/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Checks the status code to see if the action should be retried. + * + * @param status Current HTTP status code returned by server. + * @param additionalRetryCodes additional retry codes to check against + */ +export declare function isRetryStatusCode(status: number, additionalRetryCodes: number[]): boolean; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/index.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/index.d.ts new file mode 100644 index 0000000..62b1e67 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/index.d.ts @@ -0,0 +1,7 @@ +/** + * Cloud Storage for Firebase + * + * @packageDocumentation + */ +export * from './api'; +export * from './api.browser'; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/index.node.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/index.node.d.ts new file mode 100644 index 0000000..2f613cd --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/index.node.d.ts @@ -0,0 +1,7 @@ +/** + * Cloud Storage for Firebase + * + * @packageDocumentation + */ +export * from './api'; +export * from './api.node'; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/list.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/list.d.ts new file mode 100644 index 0000000..1f015e5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/list.d.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Reference } from './reference'; +/** + * Result returned by `list()`. + * @public + */ +export interface ListResult { + /** + * References to prefixes (sub-folders). You can call list() on them to + * get its contents. + * + * Folders are implicit based on '/' in the object paths. + * For example, if a bucket has two objects '/a/b/1' and '/a/b/2', list('/a') + * will return '/a/b' as a prefix. + */ + prefixes: Reference[]; + /** + * Objects in this directory. + * You can call getMetadata() and getDownloadUrl() on them. + */ + items: Reference[]; + /** + * If set, there might be more results for this list. Use this token to resume the list. + */ + nextPageToken?: string; +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/metadata.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/metadata.d.ts new file mode 100644 index 0000000..48fa64f --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/metadata.d.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FullMetadata } from './public-types'; +/** + * @fileoverview Documentation for the metadata format. + */ +/** + * The full set of object metadata, including read-only properties. + */ +interface Metadata extends FullMetadata { + [prop: string]: unknown; +} +export { Metadata }; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/platform/base64.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/platform/base64.d.ts new file mode 100644 index 0000000..7dac903 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/platform/base64.d.ts @@ -0,0 +1,20 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** Converts a Base64 encoded string to a binary string. */ +export declare function decodeBase64(encoded: string): string; +/** Converts a Uint8Array to a string. */ +export declare function decodeUint8Array(data: Uint8Array): string; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/base64.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/base64.d.ts new file mode 100644 index 0000000..23c84f2 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/base64.d.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** Converts a Base64 encoded string to a binary string. */ +export declare function decodeBase64(encoded: string): string; +export declare function decodeUint8Array(data: Uint8Array): string; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/connection.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/connection.d.ts new file mode 100644 index 0000000..14415da --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/platform/browser/connection.d.ts @@ -0,0 +1,55 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Connection, ConnectionType, ErrorCode, Headers } from '../../implementation/connection'; +/** + * Network layer for browsers. We use this instead of goog.net.XhrIo because + * goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android. + */ +declare abstract class XhrConnection implements Connection { + protected xhr_: XMLHttpRequest; + private errorCode_; + private sendPromise_; + protected sent_: boolean; + constructor(); + abstract initXhr(): void; + send(url: string, method: string, isUsingEmulator: boolean, body?: ArrayBufferView | Blob | string, headers?: Headers): Promise; + getErrorCode(): ErrorCode; + getStatus(): number; + getResponse(): T; + getErrorText(): string; + /** Aborts the request. */ + abort(): void; + getResponseHeader(header: string): string | null; + addUploadProgressListener(listener: (p1: ProgressEvent) => void): void; + removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void; +} +export declare class XhrTextConnection extends XhrConnection { + initXhr(): void; +} +export declare function newTextConnection(): Connection; +export declare class XhrBytesConnection extends XhrConnection { + private data_?; + initXhr(): void; +} +export declare function newBytesConnection(): Connection; +export declare class XhrBlobConnection extends XhrConnection { + initXhr(): void; +} +export declare function newBlobConnection(): Connection; +export declare function newStreamConnection(): Connection; +export declare function injectTestConnection(factory: (() => Connection) | null): void; +export {}; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/platform/connection.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/platform/connection.d.ts new file mode 100644 index 0000000..72ed64b --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/platform/connection.d.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Connection } from '../implementation/connection'; +export declare function injectTestConnection(factory: (() => Connection) | null): void; +export declare function newTextConnection(): Connection; +export declare function newBytesConnection(): Connection; +export declare function newBlobConnection(): Connection; +export declare function newStreamConnection(): Connection>; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/platform/node/base64.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/platform/node/base64.d.ts new file mode 100644 index 0000000..23c84f2 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/platform/node/base64.d.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** Converts a Base64 encoded string to a binary string. */ +export declare function decodeBase64(encoded: string): string; +export declare function decodeUint8Array(data: Uint8Array): string; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/platform/node/connection.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/platform/node/connection.d.ts new file mode 100644 index 0000000..a4e71fa --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/platform/node/connection.d.ts @@ -0,0 +1,58 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Connection, ConnectionType, ErrorCode } from '../../implementation/connection'; +/** + * Network layer that works in Node. + * + * This network implementation should not be used in browsers as it does not + * support progress updates. + */ +declare abstract class FetchConnection implements Connection { + protected errorCode_: ErrorCode; + protected statusCode_: number | undefined; + protected body_: ArrayBuffer | undefined; + protected errorText_: string; + protected headers_: Headers | undefined; + protected sent_: boolean; + constructor(); + send(url: string, method: string, isUsingEmulator: boolean, body?: NodeJS.ArrayBufferView | Blob | string, headers?: Record): Promise; + getErrorCode(): ErrorCode; + getStatus(): number; + abstract getResponse(): T; + getErrorText(): string; + abort(): void; + getResponseHeader(header: string): string | null; + addUploadProgressListener(listener: (p1: ProgressEvent) => void): void; + removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void; +} +export declare class FetchTextConnection extends FetchConnection { + getResponse(): string; +} +export declare function newTextConnection(): Connection; +export declare class FetchBytesConnection extends FetchConnection { + getResponse(): ArrayBuffer; +} +export declare function newBytesConnection(): Connection; +export declare class FetchStreamConnection extends FetchConnection> { + private stream_; + send(url: string, method: string, isUsingEmulator: boolean, body?: NodeJS.ArrayBufferView | Blob | string, headers?: Record): Promise; + getResponse(): ReadableStream; +} +export declare function newStreamConnection(): Connection>; +export declare function newBlobConnection(): Connection; +export declare function injectTestConnection(factory: (() => Connection) | null): void; +export {}; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/public-types.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/public-types.d.ts new file mode 100644 index 0000000..033bd3c --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/public-types.d.ts @@ -0,0 +1,424 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseApp, _FirebaseService } from '@firebase/app'; +import { CompleteFn, NextFn, Subscribe, Unsubscribe } from '@firebase/util'; +import { StorageError } from './implementation/error'; +/** + * A Firebase Storage instance. + * @public + */ +export interface FirebaseStorage extends _FirebaseService { + /** + * The {@link @firebase/app#FirebaseApp} associated with this `FirebaseStorage` instance. + */ + readonly app: FirebaseApp; + /** + * The maximum time to retry uploads in milliseconds. + */ + maxUploadRetryTime: number; + /** + * The maximum time to retry operations other than uploads or downloads in + * milliseconds. + */ + maxOperationRetryTime: number; +} +/** + * Represents a reference to a Google Cloud Storage object. Developers can + * upload, download, and delete objects, as well as get/set object metadata. + * @public + */ +export interface StorageReference { + /** + * Returns a gs:// URL for this object in the form + * `gs://///` + * @returns The gs:// URL. + */ + toString(): string; + /** + * A reference to the root of this object's bucket. + */ + root: StorageReference; + /** + * The name of the bucket containing this reference's object. + */ + bucket: string; + /** + * The full path of this object. + */ + fullPath: string; + /** + * The short name of this object, which is the last component of the full path. + * For example, if fullPath is 'full/path/image.png', name is 'image.png'. + */ + name: string; + /** + * The {@link FirebaseStorage} instance associated with this reference. + */ + storage: FirebaseStorage; + /** + * A reference pointing to the parent location of this reference, or null if + * this reference is the root. + */ + parent: StorageReference | null; +} +/** + * The options `list()` accepts. + * @public + */ +export interface ListOptions { + /** + * If set, limits the total number of `prefixes` and `items` to return. + * The default and maximum maxResults is 1000. + */ + maxResults?: number | null; + /** + * The `nextPageToken` from a previous call to `list()`. If provided, + * listing is resumed from the previous position. + */ + pageToken?: string | null; +} +/** + * Result returned by list(). + * @public + */ +export interface ListResult { + /** + * References to prefixes (sub-folders). You can call list() on them to + * get its contents. + * + * Folders are implicit based on '/' in the object paths. + * For example, if a bucket has two objects '/a/b/1' and '/a/b/2', list('/a') + * will return '/a/b' as a prefix. + */ + prefixes: StorageReference[]; + /** + * Objects in this directory. + * You can call getMetadata() and getDownloadUrl() on them. + */ + items: StorageReference[]; + /** + * If set, there might be more results for this list. Use this token to resume the list. + */ + nextPageToken?: string; +} +/** + * Object metadata that can be set at any time. + * @public + */ +export interface SettableMetadata { + /** + * Served as the 'Cache-Control' header on object download. + */ + cacheControl?: string | undefined; + /** + * Served as the 'Content-Disposition' header on object download. + */ + contentDisposition?: string | undefined; + /** + * Served as the 'Content-Encoding' header on object download. + */ + contentEncoding?: string | undefined; + /** + * Served as the 'Content-Language' header on object download. + */ + contentLanguage?: string | undefined; + /** + * Served as the 'Content-Type' header on object download. + */ + contentType?: string | undefined; + /** + * Additional user-defined custom metadata. + */ + customMetadata?: { + [key: string]: string; + } | undefined; +} +/** + * Object metadata that can be set at upload. + * @public + */ +export interface UploadMetadata extends SettableMetadata { + /** + * A Base64-encoded MD5 hash of the object being uploaded. + */ + md5Hash?: string | undefined; +} +/** + * The full set of object metadata, including read-only properties. + * @public + */ +export interface FullMetadata extends UploadMetadata { + /** + * The bucket this object is contained in. + */ + bucket: string; + /** + * The full path of this object. + */ + fullPath: string; + /** + * The object's generation. + * {@link https://cloud.google.com/storage/docs/metadata#generation-number} + */ + generation: string; + /** + * The object's metageneration. + * {@link https://cloud.google.com/storage/docs/metadata#generation-number} + */ + metageneration: string; + /** + * The short name of this object, which is the last component of the full path. + * For example, if fullPath is 'full/path/image.png', name is 'image.png'. + */ + name: string; + /** + * The size of this object, in bytes. + */ + size: number; + /** + * A date string representing when this object was created. + */ + timeCreated: string; + /** + * A date string representing when this object was last updated. + */ + updated: string; + /** + * Tokens to allow access to the download URL. + */ + downloadTokens: string[] | undefined; + /** + * `StorageReference` associated with this upload. + */ + ref?: StorageReference | undefined; +} +/** + * An event that is triggered on a task. + * @public + */ +export type TaskEvent = 'state_changed'; +/** + * Represents the current state of a running upload. + * @public + */ +export type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error'; +/** + * A stream observer for Firebase Storage. + * @public + */ +export interface StorageObserver { + next?: NextFn | null; + error?: (error: StorageError) => void | null; + complete?: CompleteFn | null; +} +/** + * Represents the process of uploading an object. Allows you to monitor and + * manage the upload. + * @public + */ +export interface UploadTask { + /** + * Cancels a running task. Has no effect on a complete or failed task. + * @returns True if the cancel had an effect. + */ + cancel(): boolean; + /** + * Equivalent to calling `then(null, onRejected)`. + */ + catch(onRejected: (error: StorageError) => unknown): Promise; + /** + * Listens for events on this task. + * + * Events have three callback functions (referred to as `next`, `error`, and + * `complete`). + * + * If only the event is passed, a function that can be used to register the + * callbacks is returned. Otherwise, the callbacks are passed after the event. + * + * Callbacks can be passed either as three separate arguments or as the + * `next`, `error`, and `complete` properties of an object. Any of the three + * callbacks is optional, as long as at least one is specified. In addition, + * when you add your callbacks, you get a function back. You can call this + * function to unregister the associated callbacks. + * + * @example **Pass callbacks separately or in an object.** + * ```javascript + * var next = function(snapshot) {}; + * var error = function(error) {}; + * var complete = function() {}; + * + * // The first example. + * uploadTask.on( + * firebase.storage.TaskEvent.STATE_CHANGED, + * next, + * error, + * complete); + * + * // This is equivalent to the first example. + * uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, { + * 'next': next, + * 'error': error, + * 'complete': complete + * }); + * + * // This is equivalent to the first example. + * var subscribe = uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED); + * subscribe(next, error, complete); + * + * // This is equivalent to the first example. + * var subscribe = uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED); + * subscribe({ + * 'next': next, + * 'error': error, + * 'complete': complete + * }); + * ``` + * + * @example **Any callback is optional.** + * ```javascript + * // Just listening for completion, this is legal. + * uploadTask.on( + * firebase.storage.TaskEvent.STATE_CHANGED, + * null, + * null, + * function() { + * console.log('upload complete!'); + * }); + * + * // Just listening for progress/state changes, this is legal. + * uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, function(snapshot) { + * var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100; + * console.log(percent + "% done"); + * }); + * + * // This is also legal. + * uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, { + * 'complete': function() { + * console.log('upload complete!'); + * } + * }); + * ``` + * + * @example **Use the returned function to remove callbacks.** + * ```javascript + * var unsubscribe = uploadTask.on( + * firebase.storage.TaskEvent.STATE_CHANGED, + * function(snapshot) { + * var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100; + * console.log(percent + "% done"); + * // Stop after receiving one update. + * unsubscribe(); + * }); + * + * // This code is equivalent to the above. + * var handle = uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED); + * unsubscribe = handle(function(snapshot) { + * var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100; + * console.log(percent + "% done"); + * // Stop after receiving one update. + * unsubscribe(); + * }); + * ``` + * + * @param event - The type of event to listen for. + * @param nextOrObserver - + * The `next` function, which gets called for each item in + * the event stream, or an observer object with some or all of these three + * properties (`next`, `error`, `complete`). + * @param error - A function that gets called with a `StorageError` + * if the event stream ends due to an error. + * @param completed - A function that gets called if the + * event stream ends normally. + * @returns + * If only the event argument is passed, returns a function you can use to + * add callbacks (see the examples above). If more than just the event + * argument is passed, returns a function you can call to unregister the + * callbacks. + */ + on(event: TaskEvent, nextOrObserver?: StorageObserver | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError) => unknown) | null, complete?: Unsubscribe | null): Unsubscribe | Subscribe; + /** + * Pauses a currently running task. Has no effect on a paused or failed task. + * @returns True if the operation took effect, false if ignored. + */ + pause(): boolean; + /** + * Resumes a paused task. Has no effect on a currently running or failed task. + * @returns True if the operation took effect, false if ignored. + */ + resume(): boolean; + /** + * A snapshot of the current task state. + */ + snapshot: UploadTaskSnapshot; + /** + * This object behaves like a Promise, and resolves with its snapshot data + * when the upload completes. + * @param onFulfilled - The fulfillment callback. Promise chaining works as normal. + * @param onRejected - The rejection callback. + */ + then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: StorageError) => unknown) | null): Promise; +} +/** + * Holds data about the current state of the upload task. + * @public + */ +export interface UploadTaskSnapshot { + /** + * The number of bytes that have been successfully uploaded so far. + */ + bytesTransferred: number; + /** + * Before the upload completes, contains the metadata sent to the server. + * After the upload completes, contains the metadata sent back from the server. + */ + metadata: FullMetadata; + /** + * The reference that spawned this snapshot's upload task. + */ + ref: StorageReference; + /** + * The current state of the task. + */ + state: TaskState; + /** + * The task of which this is a snapshot. + */ + task: UploadTask; + /** + * The total number of bytes to be uploaded. + */ + totalBytes: number; +} +/** + * Result returned from a non-resumable upload. + * @public + */ +export interface UploadResult { + /** + * Contains the metadata sent back from the server. + */ + readonly metadata: FullMetadata; + /** + * The reference that spawned this upload. + */ + readonly ref: StorageReference; +} +declare module '@firebase/component' { + interface NameServiceMapping { + 'storage': FirebaseStorage; + } +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/reference.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/reference.d.ts new file mode 100644 index 0000000..68e93d7 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/reference.d.ts @@ -0,0 +1,208 @@ +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Location } from './implementation/location'; +import { ListOptions, UploadResult } from './public-types'; +import { StringFormat } from './implementation/string'; +import { Metadata } from './metadata'; +import { FirebaseStorageImpl } from './service'; +import { ListResult } from './list'; +import { UploadTask } from './task'; +/** + * Provides methods to interact with a bucket in the Firebase Storage service. + * @internal + * @param _location - An fbs.location, or the URL at + * which to base this object, in one of the following forms: + * gs:/// + * http[s]://firebasestorage.googleapis.com/ + * /b//o/ + * Any query or fragment strings will be ignored in the http[s] + * format. If no value is passed, the storage object will use a URL based on + * the project ID of the base firebase.App instance. + */ +export declare class Reference { + private _service; + _location: Location; + constructor(_service: FirebaseStorageImpl, location: string | Location); + /** + * Returns the URL for the bucket and path this object references, + * in the form gs:/// + * @override + */ + toString(): string; + protected _newRef(service: FirebaseStorageImpl, location: Location): Reference; + /** + * A reference to the root of this object's bucket. + */ + get root(): Reference; + /** + * The name of the bucket containing this reference's object. + */ + get bucket(): string; + /** + * The full path of this object. + */ + get fullPath(): string; + /** + * The short name of this object, which is the last component of the full path. + * For example, if fullPath is 'full/path/image.png', name is 'image.png'. + */ + get name(): string; + /** + * The `StorageService` instance this `StorageReference` is associated with. + */ + get storage(): FirebaseStorageImpl; + /** + * A `StorageReference` pointing to the parent location of this `StorageReference`, or null if + * this reference is the root. + */ + get parent(): Reference | null; + /** + * Utility function to throw an error in methods that do not accept a root reference. + */ + _throwIfRoot(name: string): void; +} +/** + * Download the bytes at the object's location. + * @returns A Promise containing the downloaded bytes. + */ +export declare function getBytesInternal(ref: Reference, maxDownloadSizeBytes?: number): Promise; +/** + * Download the bytes at the object's location. + * @returns A Promise containing the downloaded blob. + */ +export declare function getBlobInternal(ref: Reference, maxDownloadSizeBytes?: number): Promise; +/** Stream the bytes at the object's location. */ +export declare function getStreamInternal(ref: Reference, maxDownloadSizeBytes?: number): ReadableStream; +/** + * Uploads data to this object's location. + * The upload is not resumable. + * + * @param ref - StorageReference where data should be uploaded. + * @param data - The data to upload. + * @param metadata - Metadata for the newly uploaded data. + * @returns A Promise containing an UploadResult + */ +export declare function uploadBytes(ref: Reference, data: Blob | Uint8Array | ArrayBuffer, metadata?: Metadata): Promise; +/** + * Uploads data to this object's location. + * The upload can be paused and resumed, and exposes progress updates. + * @public + * @param ref - StorageReference where data should be uploaded. + * @param data - The data to upload. + * @param metadata - Metadata for the newly uploaded data. + * @returns An UploadTask + */ +export declare function uploadBytesResumable(ref: Reference, data: Blob | Uint8Array | ArrayBuffer, metadata?: Metadata): UploadTask; +/** + * Uploads a string to this object's location. + * The upload is not resumable. + * @public + * @param ref - StorageReference where string should be uploaded. + * @param value - The string to upload. + * @param format - The format of the string to upload. + * @param metadata - Metadata for the newly uploaded string. + * @returns A Promise containing an UploadResult + */ +export declare function uploadString(ref: Reference, value: string, format?: StringFormat, metadata?: Metadata): Promise; +/** + * List all items (files) and prefixes (folders) under this storage reference. + * + * This is a helper method for calling list() repeatedly until there are + * no more results. The default pagination size is 1000. + * + * Note: The results may not be consistent if objects are changed while this + * operation is running. + * + * Warning: listAll may potentially consume too many resources if there are + * too many results. + * @public + * @param ref - StorageReference to get list from. + * + * @returns A Promise that resolves with all the items and prefixes under + * the current storage reference. `prefixes` contains references to + * sub-directories and `items` contains references to objects in this + * folder. `nextPageToken` is never returned. + */ +export declare function listAll(ref: Reference): Promise; +/** + * List items (files) and prefixes (folders) under this storage reference. + * + * List API is only available for Firebase Rules Version 2. + * + * GCS is a key-blob store. Firebase Storage imposes the semantic of '/' + * delimited folder structure. + * Refer to GCS's List API if you want to learn more. + * + * To adhere to Firebase Rules's Semantics, Firebase Storage does not + * support objects whose paths end with "/" or contain two consecutive + * "/"s. Firebase Storage List API will filter these unsupported objects. + * list() may fail if there are too many unsupported objects in the bucket. + * @public + * + * @param ref - StorageReference to get list from. + * @param options - See ListOptions for details. + * @returns A Promise that resolves with the items and prefixes. + * `prefixes` contains references to sub-folders and `items` + * contains references to objects in this folder. `nextPageToken` + * can be used to get the rest of the results. + */ +export declare function list(ref: Reference, options?: ListOptions | null): Promise; +/** + * A `Promise` that resolves with the metadata for this object. If this + * object doesn't exist or metadata cannot be retrieved, the promise is + * rejected. + * @public + * @param ref - StorageReference to get metadata from. + */ +export declare function getMetadata(ref: Reference): Promise; +/** + * Updates the metadata for this object. + * @public + * @param ref - StorageReference to update metadata for. + * @param metadata - The new metadata for the object. + * Only values that have been explicitly set will be changed. Explicitly + * setting a value to null will remove the metadata. + * @returns A `Promise` that resolves + * with the new metadata for this object. + * See `firebaseStorage.Reference.prototype.getMetadata` + */ +export declare function updateMetadata(ref: Reference, metadata: Partial): Promise; +/** + * Returns the download URL for the given Reference. + * @public + * @returns A `Promise` that resolves with the download + * URL for this object. + */ +export declare function getDownloadURL(ref: Reference): Promise; +/** + * Deletes the object at this location. + * @public + * @param ref - StorageReference for object to delete. + * @returns A `Promise` that resolves if the deletion succeeds. + */ +export declare function deleteObject(ref: Reference): Promise; +/** + * Returns reference for object obtained by appending `childPath` to `ref`. + * + * @param ref - StorageReference to get child of. + * @param childPath - Child path from provided ref. + * @returns A reference to the object obtained by + * appending childPath, removing any duplicate, beginning, or trailing + * slashes. + * + */ +export declare function _getChild(ref: Reference, childPath: string): Reference; diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/service.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/service.d.ts new file mode 100644 index 0000000..5dd6bb0 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/service.d.ts @@ -0,0 +1,131 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Location } from './implementation/location'; +import { Request } from './implementation/request'; +import { RequestInfo } from './implementation/requestinfo'; +import { Reference } from './reference'; +import { Provider } from '@firebase/component'; +import { FirebaseAuthInternalName } from '@firebase/auth-interop-types'; +import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseStorage } from './public-types'; +import { EmulatorMockTokenOptions } from '@firebase/util'; +import { Connection, ConnectionType } from './implementation/connection'; +export declare function isUrl(path?: string): boolean; +/** + * Returns a storage Reference for the given url. + * @param storage - `Storage` instance. + * @param url - URL. If empty, returns root reference. + * @public + */ +export declare function ref(storage: FirebaseStorageImpl, url?: string): Reference; +/** + * Returns a storage Reference for the given path in the + * default bucket. + * @param storageOrRef - `Storage` service or storage `Reference`. + * @param pathOrUrlStorage - path. If empty, returns root reference (if Storage + * instance provided) or returns same reference (if Reference provided). + * @public + */ +export declare function ref(storageOrRef: FirebaseStorageImpl | Reference, path?: string): Reference; +export declare function connectStorageEmulator(storage: FirebaseStorageImpl, host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; +}): void; +/** + * A service that provides Firebase Storage Reference instances. + * @param opt_url - gs:// url to a custom Storage Bucket + * + * @internal + */ +export declare class FirebaseStorageImpl implements FirebaseStorage { + /** + * FirebaseApp associated with this StorageService instance. + */ + readonly app: FirebaseApp; + readonly _authProvider: Provider; + /** + * @internal + */ + readonly _appCheckProvider: Provider; + /** + * @internal + */ + readonly _url?: string | undefined; + readonly _firebaseVersion?: string | undefined; + _isUsingEmulator: boolean; + _bucket: Location | null; + /** + * This string can be in the formats: + * - host + * - host:port + */ + private _host; + _protocol: string; + protected readonly _appId: string | null; + private readonly _requests; + private _deleted; + private _maxOperationRetryTime; + private _maxUploadRetryTime; + _overrideAuthToken?: string; + constructor( + /** + * FirebaseApp associated with this StorageService instance. + */ + app: FirebaseApp, _authProvider: Provider, + /** + * @internal + */ + _appCheckProvider: Provider, + /** + * @internal + */ + _url?: string | undefined, _firebaseVersion?: string | undefined, _isUsingEmulator?: boolean); + /** + * The host string for this service, in the form of `host` or + * `host:port`. + */ + get host(): string; + set host(host: string); + /** + * The maximum time to retry uploads in milliseconds. + */ + get maxUploadRetryTime(): number; + set maxUploadRetryTime(time: number); + /** + * The maximum time to retry operations other than uploads or downloads in + * milliseconds. + */ + get maxOperationRetryTime(): number; + set maxOperationRetryTime(time: number); + _getAuthToken(): Promise; + _getAppCheckToken(): Promise; + /** + * Stop running requests and prevent more from being created. + */ + _delete(): Promise; + /** + * Returns a new firebaseStorage.Reference object referencing this StorageService + * at the given Location. + */ + _makeStorageReference(loc: Location): Reference; + /** + * @param requestInfo - HTTP RequestInfo object + * @param authToken - Firebase auth token + */ + _makeRequest(requestInfo: RequestInfo, requestFactory: () => Connection, authToken: string | null, appCheckToken: string | null, retry?: boolean): Request; + makeRequestWithTokens(requestInfo: RequestInfo, requestFactory: () => Connection): Promise; +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/task.d.ts b/frontend-old/node_modules/@firebase/storage/dist/src/task.d.ts new file mode 100644 index 0000000..19afdfd --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/task.d.ts @@ -0,0 +1,148 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @fileoverview Defines types for interacting with blob transfer tasks. + */ +import { FbsBlob } from './implementation/blob'; +import { StorageError } from './implementation/error'; +import { InternalTaskState, TaskEvent } from './implementation/taskenums'; +import { Metadata } from './metadata'; +import { Subscribe, Unsubscribe } from './implementation/observer'; +import { UploadTaskSnapshot, StorageObserver } from './public-types'; +import { Reference } from './reference'; +import { CompleteFn } from '@firebase/util'; +/** + * Represents a blob being uploaded. Can be used to pause/resume/cancel the + * upload and manage callbacks for various events. + * @internal + */ +export declare class UploadTask { + private _ref; + /** + * The data to be uploaded. + */ + _blob: FbsBlob; + /** + * Metadata related to the upload. + */ + _metadata: Metadata | null; + private _mappings; + /** + * Number of bytes transferred so far. + */ + _transferred: number; + private _needToFetchStatus; + private _needToFetchMetadata; + private _observers; + private _resumable; + /** + * Upload state. + */ + _state: InternalTaskState; + private _error?; + private _uploadUrl?; + private _request?; + private _chunkMultiplier; + private _errorHandler; + private _metadataErrorHandler; + private _resolve?; + private _reject?; + private pendingTimeout?; + private _promise; + private sleepTime; + private maxSleepTime; + isExponentialBackoffExpired(): boolean; + /** + * @param ref - The firebaseStorage.Reference object this task came + * from, untyped to avoid cyclic dependencies. + * @param blob - The blob to upload. + */ + constructor(ref: Reference, blob: FbsBlob, metadata?: Metadata | null); + private _makeProgressCallback; + private _shouldDoResumable; + private _start; + private _resolveToken; + private _createResumable; + private _fetchStatus; + private _continueUpload; + private _increaseMultiplier; + private _fetchMetadata; + private _oneShotUpload; + private _updateProgress; + private _transition; + private completeTransitions_; + /** + * A snapshot of the current task state. + */ + get snapshot(): UploadTaskSnapshot; + /** + * Adds a callback for an event. + * @param type - The type of event to listen for. + * @param nextOrObserver - + * The `next` function, which gets called for each item in + * the event stream, or an observer object with some or all of these three + * properties (`next`, `error`, `complete`). + * @param error - A function that gets called with a `StorageError` + * if the event stream ends due to an error. + * @param completed - A function that gets called if the + * event stream ends normally. + * @returns + * If only the event argument is passed, returns a function you can use to + * add callbacks (see the examples above). If more than just the event + * argument is passed, returns a function you can call to unregister the + * callbacks. + */ + on(type: TaskEvent, nextOrObserver?: StorageObserver | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: StorageError) => unknown) | null, completed?: CompleteFn | null): Unsubscribe | Subscribe; + /** + * This object behaves like a Promise, and resolves with its snapshot data + * when the upload completes. + * @param onFulfilled - The fulfillment callback. Promise chaining works as normal. + * @param onRejected - The rejection callback. + */ + then(onFulfilled?: ((value: UploadTaskSnapshot) => U | Promise) | null, onRejected?: ((error: StorageError) => U | Promise) | null): Promise; + /** + * Equivalent to calling `then(null, onRejected)`. + */ + catch(onRejected: (p1: StorageError) => T | Promise): Promise; + /** + * Adds the given observer. + */ + private _addObserver; + /** + * Removes the given observer. + */ + private _removeObserver; + private _notifyObservers; + private _finishPromise; + private _notifyObserver; + /** + * Resumes a paused task. Has no effect on a currently running or failed task. + * @returns True if the operation took effect, false if ignored. + */ + resume(): boolean; + /** + * Pauses a currently running task. Has no effect on a paused or failed task. + * @returns True if the operation took effect, false if ignored. + */ + pause(): boolean; + /** + * Cancels a currently running or paused task. Has no effect on a complete or + * failed task. + * @returns True if the operation took effect, false if ignored. + */ + cancel(): boolean; +} diff --git a/frontend-old/node_modules/@firebase/storage/dist/src/tsdoc-metadata.json b/frontend-old/node_modules/@firebase/storage/dist/src/tsdoc-metadata.json new file mode 100644 index 0000000..6af1f6a --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage/dist/src/tsdoc-metadata.json @@ -0,0 +1,11 @@ +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "0.1.2" + } + ] +} -- cgit v1.2.3