@firebase/storage-compat 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,54 +1,54 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { UploadTask, StorageError, TaskEvent, StorageObserver } from '@firebase/storage';
18
- import { UploadTaskSnapshotCompat } from './tasksnapshot';
19
- import { ReferenceCompat } from './reference';
20
- import * as types from '@firebase/storage-types';
21
- import { Compat } from '@firebase/util';
22
- export declare class UploadTaskCompat implements types.UploadTask, Compat<UploadTask> {
23
- readonly _delegate: UploadTask;
24
- private readonly _ref;
25
- constructor(_delegate: UploadTask, _ref: ReferenceCompat);
26
- get snapshot(): UploadTaskSnapshotCompat;
27
- cancel: () => boolean;
28
- catch: (onRejected: (error: StorageError) => unknown) => Promise<unknown>;
29
- pause: () => boolean;
30
- resume: () => boolean;
31
- then(onFulfilled?: ((a: UploadTaskSnapshotCompat) => unknown) | null, onRejected?: ((a: StorageError) => unknown) | null): Promise<unknown>;
32
- on(type: TaskEvent, nextOrObserver?: types.StorageObserver<UploadTaskSnapshotCompat> | null | ((a: UploadTaskSnapshotCompat) => unknown), error?: ((error: StorageError) => void) | null, completed?: () => void | null): Unsubscribe | Subscribe<UploadTaskSnapshotCompat>;
33
- }
34
- /**
35
- * Subscribes to an event stream.
36
- */
37
- export declare type Subscribe<T> = (next?: NextFn<T> | StorageObserver<T>, error?: ErrorFn, complete?: CompleteFn) => Unsubscribe;
38
- /**
39
- * Unsubscribes from a stream.
40
- */
41
- export declare type Unsubscribe = () => void;
42
- /**
43
- * Function that is called once for each value in a stream of values.
44
- */
45
- export declare type NextFn<T> = (value: T) => void;
46
- /**
47
- * A function that is called with a `FirebaseStorageError`
48
- * if the event stream ends due to an error.
49
- */
50
- export declare type ErrorFn = (error: StorageError) => void;
51
- /**
52
- * A function that is called if the event stream ends normally.
53
- */
54
- export declare type CompleteFn = () => void;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { UploadTask, StorageError, TaskEvent, StorageObserver } from '@firebase/storage';
18
+ import { UploadTaskSnapshotCompat } from './tasksnapshot';
19
+ import { ReferenceCompat } from './reference';
20
+ import * as types from '@firebase/storage-types';
21
+ import { Compat } from '@firebase/util';
22
+ export declare class UploadTaskCompat implements types.UploadTask, Compat<UploadTask> {
23
+ readonly _delegate: UploadTask;
24
+ private readonly _ref;
25
+ constructor(_delegate: UploadTask, _ref: ReferenceCompat);
26
+ get snapshot(): UploadTaskSnapshotCompat;
27
+ cancel: () => boolean;
28
+ catch: (onRejected: (error: StorageError) => unknown) => Promise<unknown>;
29
+ pause: () => boolean;
30
+ resume: () => boolean;
31
+ then(onFulfilled?: ((a: UploadTaskSnapshotCompat) => unknown) | null, onRejected?: ((a: StorageError) => unknown) | null): Promise<unknown>;
32
+ on(type: TaskEvent, nextOrObserver?: types.StorageObserver<UploadTaskSnapshotCompat> | null | ((a: UploadTaskSnapshotCompat) => unknown), error?: ((error: StorageError) => void) | null, completed?: () => void | null): Unsubscribe | Subscribe<UploadTaskSnapshotCompat>;
33
+ }
34
+ /**
35
+ * Subscribes to an event stream.
36
+ */
37
+ export type Subscribe<T> = (next?: NextFn<T> | StorageObserver<T>, error?: ErrorFn, complete?: CompleteFn) => Unsubscribe;
38
+ /**
39
+ * Unsubscribes from a stream.
40
+ */
41
+ export type Unsubscribe = () => void;
42
+ /**
43
+ * Function that is called once for each value in a stream of values.
44
+ */
45
+ export type NextFn<T> = (value: T) => void;
46
+ /**
47
+ * A function that is called with a `FirebaseStorageError`
48
+ * if the event stream ends due to an error.
49
+ */
50
+ export type ErrorFn = (error: StorageError) => void;
51
+ /**
52
+ * A function that is called if the event stream ends normally.
53
+ */
54
+ export type CompleteFn = () => void;
@@ -1,31 +1,31 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { UploadTaskSnapshot } from '@firebase/storage';
18
- import { ReferenceCompat } from './reference';
19
- import { UploadTaskCompat } from './task';
20
- import * as types from '@firebase/storage-types';
21
- import { Compat } from '@firebase/util';
22
- export declare class UploadTaskSnapshotCompat implements types.UploadTaskSnapshot, Compat<UploadTaskSnapshot> {
23
- readonly _delegate: UploadTaskSnapshot;
24
- readonly task: UploadTaskCompat;
25
- readonly ref: ReferenceCompat;
26
- constructor(_delegate: UploadTaskSnapshot, task: UploadTaskCompat, ref: ReferenceCompat);
27
- get bytesTransferred(): number;
28
- get metadata(): types.FullMetadata;
29
- get state(): string;
30
- get totalBytes(): number;
31
- }
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { UploadTaskSnapshot } from '@firebase/storage';
18
+ import { ReferenceCompat } from './reference';
19
+ import { UploadTaskCompat } from './task';
20
+ import * as types from '@firebase/storage-types';
21
+ import { Compat } from '@firebase/util';
22
+ export declare class UploadTaskSnapshotCompat implements types.UploadTaskSnapshot, Compat<UploadTaskSnapshot> {
23
+ readonly _delegate: UploadTaskSnapshot;
24
+ readonly task: UploadTaskCompat;
25
+ readonly ref: ReferenceCompat;
26
+ constructor(_delegate: UploadTaskSnapshot, task: UploadTaskCompat, ref: ReferenceCompat);
27
+ get bytesTransferred(): number;
28
+ get metadata(): types.FullMetadata;
29
+ get state(): string;
30
+ get totalBytes(): number;
31
+ }
@@ -1,23 +1,23 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '@firebase/auth-compat';
18
- import * as storage from '@firebase/storage-types';
19
- import '../../src/index';
20
- export declare const PROJECT_ID: any;
21
- export declare const STORAGE_BUCKET: any;
22
- export declare const API_KEY: any;
23
- export declare function withTestInstance(fn: (storage: storage.FirebaseStorage) => void | Promise<void>): Promise<void>;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '@firebase/auth-compat';
18
+ import * as storage from '@firebase/storage-types';
19
+ import '../../src/index';
20
+ export declare const PROJECT_ID: any;
21
+ export declare const STORAGE_BUCKET: any;
22
+ export declare const API_KEY: any;
23
+ export declare function withTestInstance(fn: (storage: storage.FirebaseStorage) => void | Promise<void>): Promise<void>;
@@ -1,17 +1,17 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- export {};
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export {};
@@ -1,22 +1,22 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '../setup';
18
- import '../../src/index';
19
- export declare const PROJECT_ID: any;
20
- export declare const STORAGE_BUCKET: any;
21
- export declare const API_KEY: any;
22
- export declare const AUTH_DOMAIN: any;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '../setup';
18
+ import '../../src/index';
19
+ export declare const PROJECT_ID: any;
20
+ export declare const STORAGE_BUCKET: any;
21
+ export declare const API_KEY: any;
22
+ export declare const AUTH_DOMAIN: any;
@@ -1,17 +1,17 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '../setup';
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '../setup';
@@ -1,17 +1,17 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '../setup';
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '../setup';
@@ -1,22 +1,22 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { FirebaseApp } from '@firebase/app-types';
18
- import { FirebaseStorage } from '@firebase/storage';
19
- import { StorageServiceCompat } from '../src/service';
20
- export declare function makeTestCompatStorage(app: FirebaseApp, storage: FirebaseStorage): StorageServiceCompat;
21
- export declare const fakeApp: FirebaseApp;
22
- export declare const fakeStorage: FirebaseStorage;
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseApp } from '@firebase/app-types';
18
+ import { FirebaseStorage } from '@firebase/storage';
19
+ import { StorageServiceCompat } from '../src/service';
20
+ export declare function makeTestCompatStorage(app: FirebaseApp, storage: FirebaseStorage): StorageServiceCompat;
21
+ export declare const fakeApp: FirebaseApp;
22
+ export declare const fakeStorage: FirebaseStorage;