diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
| commit | 8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch) | |
| tree | 05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/storage-compat/dist/esm/src | |
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/storage-compat/dist/esm/src')
6 files changed, 330 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/index.d.ts b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/index.d.ts new file mode 100644 index 0000000..4cce481 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/index.d.ts @@ -0,0 +1,49 @@ +/** + * @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 { _FirebaseNamespace } from '@firebase/app-types/private'; +import * as types from '@firebase/storage-types'; +export declare function registerStorage(instance: _FirebaseNamespace): void; +/** + * Define extension behavior for `registerStorage` + */ +declare module '@firebase/app-compat' { + interface FirebaseNamespace { + storage?: { + (app?: FirebaseApp, url?: string): types.FirebaseStorage; + Storage: typeof types.FirebaseStorage; + StringFormat: { + BASE64: types.StringFormat; + BASE64URL: types.StringFormat; + DATA_URL: types.StringFormat; + RAW: types.StringFormat; + }; + TaskEvent: { + STATE_CHANGED: types.TaskEvent; + }; + TaskState: { + CANCELED: types.TaskState; + ERROR: types.TaskState; + PAUSED: types.TaskState; + RUNNING: types.TaskState; + SUCCESS: types.TaskState; + }; + }; + } + interface FirebaseApp { + storage?(storageBucket?: string): types.FirebaseStorage; + } +} diff --git a/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/list.d.ts b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/list.d.ts new file mode 100644 index 0000000..1d6ae28 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/list.d.ts @@ -0,0 +1,29 @@ +/** + * @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 { ListResult } from '@firebase/storage'; +import * as types from '@firebase/storage-types'; +import { ReferenceCompat } from './reference'; +import { StorageServiceCompat } from './service'; +import { Compat } from '@firebase/util'; +export declare class ListResultCompat implements types.ListResult, Compat<ListResult> { + readonly _delegate: ListResult; + private readonly _service; + constructor(_delegate: ListResult, _service: StorageServiceCompat); + get prefixes(): ReferenceCompat[]; + get items(): ReferenceCompat[]; + get nextPageToken(): string | null; +} diff --git a/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/reference.d.ts b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/reference.d.ts new file mode 100644 index 0000000..20baac5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/reference.d.ts @@ -0,0 +1,121 @@ +/** + * @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 { StorageReference, StringFormat } from '@firebase/storage'; +import { StorageServiceCompat } from './service'; +import * as types from '@firebase/storage-types'; +import { Compat } from '@firebase/util'; +export declare class ReferenceCompat implements types.Reference, Compat<StorageReference> { + readonly _delegate: StorageReference; + storage: StorageServiceCompat; + constructor(_delegate: StorageReference, storage: StorageServiceCompat); + get name(): string; + get bucket(): string; + get fullPath(): string; + toString(): string; + /** + * @returns A reference to the object obtained by + * appending childPath, removing any duplicate, beginning, or trailing + * slashes. + */ + child(childPath: string): types.Reference; + get root(): types.Reference; + /** + * @returns A reference to the parent of the + * current object, or null if the current object is the root. + */ + get parent(): types.Reference | null; + /** + * Uploads a blob to this object's location. + * @param data - The blob to upload. + * @returns An UploadTask that lets you control and + * observe the upload. + */ + put(data: Blob | Uint8Array | ArrayBuffer, metadata?: types.FullMetadata): types.UploadTask; + /** + * Uploads a string to this object's location. + * @param value - The string to upload. + * @param format - The format of the string to upload. + * @returns An UploadTask that lets you control and + * observe the upload. + */ + putString(value: string, format?: StringFormat, metadata?: types.UploadMetadata): types.UploadTask; + /** + * 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. + * + * @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. + */ + listAll(): Promise<types.ListResult>; + /** + * 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. + * + * @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. + */ + list(options?: types.ListOptions | null): Promise<types.ListResult>; + /** + * 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. + */ + getMetadata(): Promise<types.FullMetadata>; + /** + * Updates the metadata for this object. + * @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 + */ + updateMetadata(metadata: types.SettableMetadata): Promise<types.FullMetadata>; + /** + * @returns A `Promise` that resolves with the download + * URL for this object. + */ + getDownloadURL(): Promise<string>; + /** + * Deletes the object at this location. + * @returns A `Promise` that resolves if the deletion succeeds. + */ + delete(): Promise<void>; + private _throwIfRoot; +} diff --git a/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/service.d.ts b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/service.d.ts new file mode 100644 index 0000000..5fd32c3 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/service.d.ts @@ -0,0 +1,46 @@ +/** + * @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 * as types from '@firebase/storage-types'; +import { FirebaseApp } from '@firebase/app-types'; +import { FirebaseStorage } from '@firebase/storage'; +import { Compat, EmulatorMockTokenOptions } from '@firebase/util'; +/** + * A service that provides firebaseStorage.Reference instances. + * @param opt_url gs:// url to a custom Storage Bucket + */ +export declare class StorageServiceCompat implements types.FirebaseStorage, Compat<FirebaseStorage> { + app: FirebaseApp; + readonly _delegate: FirebaseStorage; + constructor(app: FirebaseApp, _delegate: FirebaseStorage); + get maxOperationRetryTime(): number; + get maxUploadRetryTime(): number; + /** + * Returns a firebaseStorage.Reference for the given path in the default + * bucket. + */ + ref(path?: string): types.Reference; + /** + * Returns a firebaseStorage.Reference object for the given absolute URL, + * which must be a gs:// or http[s]:// URL. + */ + refFromURL(url: string): types.Reference; + setMaxUploadRetryTime(time: number): void; + setMaxOperationRetryTime(time: number): void; + useEmulator(host: string, port: number, options?: { + mockUserToken?: EmulatorMockTokenOptions | string; + }): void; +} diff --git a/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/task.d.ts b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/task.d.ts new file mode 100644 index 0000000..97e2bd5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/task.d.ts @@ -0,0 +1,54 @@ +/** + * @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 { UploadTask, StorageError, TaskEvent, StorageObserver } from '@firebase/storage'; +import { UploadTaskSnapshotCompat } from './tasksnapshot'; +import { ReferenceCompat } from './reference'; +import * as types from '@firebase/storage-types'; +import { Compat } from '@firebase/util'; +export declare class UploadTaskCompat implements types.UploadTask, Compat<UploadTask> { + readonly _delegate: UploadTask; + private readonly _ref; + constructor(_delegate: UploadTask, _ref: ReferenceCompat); + get snapshot(): UploadTaskSnapshotCompat; + cancel: () => boolean; + catch: (onRejected: (error: StorageError) => unknown) => Promise<unknown>; + pause: () => boolean; + resume: () => boolean; + then(onFulfilled?: ((a: UploadTaskSnapshotCompat) => unknown) | null, onRejected?: ((a: StorageError) => unknown) | null): Promise<unknown>; + on(type: TaskEvent, nextOrObserver?: types.StorageObserver<UploadTaskSnapshotCompat> | null | ((a: UploadTaskSnapshotCompat) => unknown), error?: ((error: StorageError) => void) | null, completed?: () => void | null): Unsubscribe | Subscribe<UploadTaskSnapshotCompat>; +} +/** + * Subscribes to an event stream. + */ +export type Subscribe<T> = (next?: NextFn<T> | StorageObserver<T>, error?: ErrorFn, complete?: CompleteFn) => Unsubscribe; +/** + * Unsubscribes from a stream. + */ +export type Unsubscribe = () => void; +/** + * Function that is called once for each value in a stream of values. + */ +export type NextFn<T> = (value: T) => void; +/** + * A function that is called with a `FirebaseStorageError` + * 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; diff --git a/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/tasksnapshot.d.ts b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/tasksnapshot.d.ts new file mode 100644 index 0000000..eac3b70 --- /dev/null +++ b/frontend-old/node_modules/@firebase/storage-compat/dist/esm/src/tasksnapshot.d.ts @@ -0,0 +1,31 @@ +/** + * @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 { UploadTaskSnapshot } from '@firebase/storage'; +import { ReferenceCompat } from './reference'; +import { UploadTaskCompat } from './task'; +import * as types from '@firebase/storage-types'; +import { Compat } from '@firebase/util'; +export declare class UploadTaskSnapshotCompat implements types.UploadTaskSnapshot, Compat<UploadTaskSnapshot> { + readonly _delegate: UploadTaskSnapshot; + readonly task: UploadTaskCompat; + readonly ref: ReferenceCompat; + constructor(_delegate: UploadTaskSnapshot, task: UploadTaskCompat, ref: ReferenceCompat); + get bytesTransferred(): number; + get metadata(): types.FullMetadata; + get state(): string; + get totalBytes(): number; +} |
