@firebase/storage 0.13.3 → 0.13.4
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.
- package/dist/index.browser.cjs.js +3571 -3571
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.cjs.js +3571 -3571
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +3571 -3571
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +3596 -3596
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +3596 -3596
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api.browser.d.ts +47 -47
- package/dist/node-esm/src/api.d.ts +200 -200
- package/dist/node-esm/src/api.node.d.ts +47 -47
- package/dist/node-esm/src/constants.d.ts +20 -20
- package/dist/node-esm/src/implementation/async.d.ts +22 -22
- package/dist/node-esm/src/implementation/backoff.d.ts +43 -43
- package/dist/node-esm/src/implementation/blob.d.ts +34 -34
- package/dist/node-esm/src/implementation/connection.d.ts +56 -56
- package/dist/node-esm/src/implementation/constants.d.ts +48 -48
- package/dist/node-esm/src/implementation/error.d.ts +126 -126
- package/dist/node-esm/src/implementation/failrequest.d.ts +29 -29
- package/dist/node-esm/src/implementation/fs.d.ts +17 -17
- package/dist/node-esm/src/implementation/json.d.ts +7 -7
- package/dist/node-esm/src/implementation/list.d.ts +19 -19
- package/dist/node-esm/src/implementation/location.d.ts +32 -32
- package/dist/node-esm/src/implementation/metadata.d.ts +40 -40
- package/dist/node-esm/src/implementation/observer.d.ts +47 -47
- package/dist/node-esm/src/implementation/path.d.ts +31 -31
- package/dist/node-esm/src/implementation/request.d.ts +47 -47
- package/dist/node-esm/src/implementation/requestinfo.d.ts +73 -73
- package/dist/node-esm/src/implementation/requests.d.ts +84 -84
- package/dist/node-esm/src/implementation/string.d.ts +73 -73
- package/dist/node-esm/src/implementation/taskenums.d.ts +77 -77
- package/dist/node-esm/src/implementation/type.d.ts +23 -23
- package/dist/node-esm/src/implementation/url.d.ts +22 -22
- package/dist/node-esm/src/implementation/utils.d.ts +23 -23
- package/dist/node-esm/src/index.d.ts +7 -7
- package/dist/node-esm/src/index.node.d.ts +7 -7
- package/dist/node-esm/src/list.d.ts +41 -41
- package/dist/node-esm/src/metadata.d.ts +27 -27
- package/dist/node-esm/src/platform/base64.d.ts +20 -20
- package/dist/node-esm/src/platform/browser/base64.d.ts +19 -19
- package/dist/node-esm/src/platform/browser/connection.d.ts +55 -55
- package/dist/node-esm/src/platform/connection.d.ts +22 -22
- package/dist/node-esm/src/platform/node/base64.d.ts +19 -19
- package/dist/node-esm/src/platform/node/connection.d.ts +58 -59
- package/dist/node-esm/src/public-types.d.ts +424 -424
- package/dist/node-esm/src/reference.d.ts +208 -208
- package/dist/node-esm/src/service.d.ts +130 -130
- package/dist/node-esm/src/task.d.ts +148 -148
- package/dist/node-esm/test/browser/blob.test.d.ts +17 -17
- package/dist/node-esm/test/browser/connection.test.d.ts +17 -17
- package/dist/node-esm/test/browser/string.browser.test.d.ts +17 -17
- package/dist/node-esm/test/integration/integration.test.d.ts +24 -24
- package/dist/node-esm/test/node/connection.test.d.ts +17 -17
- package/dist/node-esm/test/node/stream.test.d.ts +17 -17
- package/dist/node-esm/test/unit/connection.d.ts +47 -47
- package/dist/node-esm/test/unit/index.test.d.ts +4 -4
- package/dist/node-esm/test/unit/location.test.d.ts +1 -1
- package/dist/node-esm/test/unit/reference.test.d.ts +1 -1
- package/dist/node-esm/test/unit/request.test.d.ts +1 -1
- package/dist/node-esm/test/unit/requests.test.d.ts +1 -1
- package/dist/node-esm/test/unit/service.test.d.ts +1 -1
- package/dist/node-esm/test/unit/string.test.d.ts +1 -1
- package/dist/node-esm/test/unit/task.test.d.ts +1 -1
- package/dist/node-esm/test/unit/testshared.d.ts +60 -60
- package/dist/node-esm/test/unit/utils.test.d.ts +17 -17
- package/dist/src/api.browser.d.ts +47 -47
- package/dist/src/api.d.ts +200 -200
- package/dist/src/api.node.d.ts +47 -47
- package/dist/src/constants.d.ts +20 -20
- package/dist/src/implementation/async.d.ts +22 -22
- package/dist/src/implementation/backoff.d.ts +43 -43
- package/dist/src/implementation/blob.d.ts +34 -34
- package/dist/src/implementation/connection.d.ts +56 -56
- package/dist/src/implementation/constants.d.ts +48 -48
- package/dist/src/implementation/error.d.ts +126 -126
- package/dist/src/implementation/failrequest.d.ts +29 -29
- package/dist/src/implementation/fs.d.ts +17 -17
- package/dist/src/implementation/json.d.ts +7 -7
- package/dist/src/implementation/list.d.ts +19 -19
- package/dist/src/implementation/location.d.ts +32 -32
- package/dist/src/implementation/metadata.d.ts +40 -40
- package/dist/src/implementation/observer.d.ts +47 -47
- package/dist/src/implementation/path.d.ts +31 -31
- package/dist/src/implementation/request.d.ts +47 -47
- package/dist/src/implementation/requestinfo.d.ts +73 -73
- package/dist/src/implementation/requests.d.ts +84 -84
- package/dist/src/implementation/string.d.ts +73 -73
- package/dist/src/implementation/taskenums.d.ts +77 -77
- package/dist/src/implementation/type.d.ts +23 -23
- package/dist/src/implementation/url.d.ts +22 -22
- package/dist/src/implementation/utils.d.ts +23 -23
- package/dist/src/index.d.ts +7 -7
- package/dist/src/index.node.d.ts +7 -7
- package/dist/src/list.d.ts +41 -41
- package/dist/src/metadata.d.ts +27 -27
- package/dist/src/platform/base64.d.ts +20 -20
- package/dist/src/platform/browser/base64.d.ts +19 -19
- package/dist/src/platform/browser/connection.d.ts +55 -55
- package/dist/src/platform/connection.d.ts +22 -22
- package/dist/src/platform/node/base64.d.ts +19 -19
- package/dist/src/platform/node/connection.d.ts +58 -59
- package/dist/src/public-types.d.ts +424 -424
- package/dist/src/reference.d.ts +208 -208
- package/dist/src/service.d.ts +130 -130
- package/dist/src/task.d.ts +148 -148
- package/dist/test/browser/blob.test.d.ts +17 -17
- package/dist/test/browser/connection.test.d.ts +17 -17
- package/dist/test/browser/string.browser.test.d.ts +17 -17
- package/dist/test/integration/integration.test.d.ts +24 -24
- package/dist/test/node/connection.test.d.ts +17 -17
- package/dist/test/node/stream.test.d.ts +17 -17
- package/dist/test/unit/connection.d.ts +47 -47
- package/dist/test/unit/index.test.d.ts +4 -4
- package/dist/test/unit/location.test.d.ts +1 -1
- package/dist/test/unit/reference.test.d.ts +1 -1
- package/dist/test/unit/request.test.d.ts +1 -1
- package/dist/test/unit/requests.test.d.ts +1 -1
- package/dist/test/unit/service.test.d.ts +1 -1
- package/dist/test/unit/string.test.d.ts +1 -1
- package/dist/test/unit/task.test.d.ts +1 -1
- package/dist/test/unit/testshared.d.ts +60 -60
- package/dist/test/unit/utils.test.d.ts +17 -17
- package/package.json +6 -6
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
/**
|
|
18
|
-
* @fileoverview Enumerations used for upload tasks.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* An event that is triggered on a task.
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
export
|
|
25
|
-
/**
|
|
26
|
-
* An event that is triggered on a task.
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
export declare const TaskEvent: {
|
|
30
|
-
/**
|
|
31
|
-
* For this event,
|
|
32
|
-
* <ul>
|
|
33
|
-
* <li>The `next` function is triggered on progress updates and when the
|
|
34
|
-
* task is paused/resumed with an `UploadTaskSnapshot` as the first
|
|
35
|
-
* argument.</li>
|
|
36
|
-
* <li>The `error` function is triggered if the upload is canceled or fails
|
|
37
|
-
* for another reason.</li>
|
|
38
|
-
* <li>The `complete` function is triggered if the upload completes
|
|
39
|
-
* successfully.</li>
|
|
40
|
-
* </ul>
|
|
41
|
-
*/
|
|
42
|
-
STATE_CHANGED: string;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Internal enum for task state.
|
|
46
|
-
*/
|
|
47
|
-
export declare const enum InternalTaskState {
|
|
48
|
-
RUNNING = "running",
|
|
49
|
-
PAUSING = "pausing",
|
|
50
|
-
PAUSED = "paused",
|
|
51
|
-
SUCCESS = "success",
|
|
52
|
-
CANCELING = "canceling",
|
|
53
|
-
CANCELED = "canceled",
|
|
54
|
-
ERROR = "error"
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Represents the current state of a running upload.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export
|
|
61
|
-
/**
|
|
62
|
-
* Represents the current state of a running upload.
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
export declare const TaskState: {
|
|
66
|
-
/** The task is currently transferring data. */
|
|
67
|
-
readonly RUNNING: "running";
|
|
68
|
-
/** The task was paused by the user. */
|
|
69
|
-
readonly PAUSED: "paused";
|
|
70
|
-
/** The task completed successfully. */
|
|
71
|
-
readonly SUCCESS: "success";
|
|
72
|
-
/** The task was canceled. */
|
|
73
|
-
readonly CANCELED: "canceled";
|
|
74
|
-
/** The task failed with an error. */
|
|
75
|
-
readonly ERROR: "error";
|
|
76
|
-
};
|
|
77
|
-
export declare function taskStateFromInternalTaskState(state: InternalTaskState): TaskState;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
/**
|
|
18
|
+
* @fileoverview Enumerations used for upload tasks.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* An event that is triggered on a task.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export type TaskEvent = string;
|
|
25
|
+
/**
|
|
26
|
+
* An event that is triggered on a task.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const TaskEvent: {
|
|
30
|
+
/**
|
|
31
|
+
* For this event,
|
|
32
|
+
* <ul>
|
|
33
|
+
* <li>The `next` function is triggered on progress updates and when the
|
|
34
|
+
* task is paused/resumed with an `UploadTaskSnapshot` as the first
|
|
35
|
+
* argument.</li>
|
|
36
|
+
* <li>The `error` function is triggered if the upload is canceled or fails
|
|
37
|
+
* for another reason.</li>
|
|
38
|
+
* <li>The `complete` function is triggered if the upload completes
|
|
39
|
+
* successfully.</li>
|
|
40
|
+
* </ul>
|
|
41
|
+
*/
|
|
42
|
+
STATE_CHANGED: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Internal enum for task state.
|
|
46
|
+
*/
|
|
47
|
+
export declare const enum InternalTaskState {
|
|
48
|
+
RUNNING = "running",
|
|
49
|
+
PAUSING = "pausing",
|
|
50
|
+
PAUSED = "paused",
|
|
51
|
+
SUCCESS = "success",
|
|
52
|
+
CANCELING = "canceling",
|
|
53
|
+
CANCELED = "canceled",
|
|
54
|
+
ERROR = "error"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Represents the current state of a running upload.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export type TaskState = (typeof TaskState)[keyof typeof TaskState];
|
|
61
|
+
/**
|
|
62
|
+
* Represents the current state of a running upload.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export declare const TaskState: {
|
|
66
|
+
/** The task is currently transferring data. */
|
|
67
|
+
readonly RUNNING: "running";
|
|
68
|
+
/** The task was paused by the user. */
|
|
69
|
+
readonly PAUSED: "paused";
|
|
70
|
+
/** The task completed successfully. */
|
|
71
|
+
readonly SUCCESS: "success";
|
|
72
|
+
/** The task was canceled. */
|
|
73
|
+
readonly CANCELED: "canceled";
|
|
74
|
+
/** The task failed with an error. */
|
|
75
|
+
readonly ERROR: "error";
|
|
76
|
+
};
|
|
77
|
+
export declare function taskStateFromInternalTaskState(state: InternalTaskState): TaskState;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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 declare function isJustDef<T>(p: T | null | undefined): p is T | null;
|
|
18
|
-
export declare function isFunction(p: unknown): p is Function;
|
|
19
|
-
export declare function isNonArrayObject(p: unknown): boolean;
|
|
20
|
-
export declare function isString(p: unknown): p is string;
|
|
21
|
-
export declare function isNativeBlob(p: unknown): p is Blob;
|
|
22
|
-
export declare function isNativeBlobDefined(): boolean;
|
|
23
|
-
export declare function validateNumber(argument: string, minValue: number, maxValue: number, value: number): void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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 declare function isJustDef<T>(p: T | null | undefined): p is T | null;
|
|
18
|
+
export declare function isFunction(p: unknown): p is Function;
|
|
19
|
+
export declare function isNonArrayObject(p: unknown): boolean;
|
|
20
|
+
export declare function isString(p: unknown): p is string;
|
|
21
|
+
export declare function isNativeBlob(p: unknown): p is Blob;
|
|
22
|
+
export declare function isNativeBlobDefined(): boolean;
|
|
23
|
+
export declare function validateNumber(argument: string, minValue: number, maxValue: number, value: number): void;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
/**
|
|
18
|
-
* @fileoverview Functions to create and manipulate URLs for the server API.
|
|
19
|
-
*/
|
|
20
|
-
import { UrlParams } from './requestinfo';
|
|
21
|
-
export declare function makeUrl(urlPart: string, host: string, protocol: string): string;
|
|
22
|
-
export declare function makeQueryString(params: UrlParams): string;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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
|
+
/**
|
|
18
|
+
* @fileoverview Functions to create and manipulate URLs for the server API.
|
|
19
|
+
*/
|
|
20
|
+
import { UrlParams } from './requestinfo';
|
|
21
|
+
export declare function makeUrl(urlPart: string, host: string, protocol: string): string;
|
|
22
|
+
export declare function makeQueryString(params: UrlParams): string;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 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
|
-
/**
|
|
18
|
-
* Checks the status code to see if the action should be retried.
|
|
19
|
-
*
|
|
20
|
-
* @param status Current HTTP status code returned by server.
|
|
21
|
-
* @param additionalRetryCodes additional retry codes to check against
|
|
22
|
-
*/
|
|
23
|
-
export declare function isRetryStatusCode(status: number, additionalRetryCodes: number[]): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
/**
|
|
18
|
+
* Checks the status code to see if the action should be retried.
|
|
19
|
+
*
|
|
20
|
+
* @param status Current HTTP status code returned by server.
|
|
21
|
+
* @param additionalRetryCodes additional retry codes to check against
|
|
22
|
+
*/
|
|
23
|
+
export declare function isRetryStatusCode(status: number, additionalRetryCodes: number[]): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Storage for Firebase
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
export * from './api';
|
|
7
|
-
export * from './api.browser';
|
|
1
|
+
/**
|
|
2
|
+
* Cloud Storage for Firebase
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export * from './api';
|
|
7
|
+
export * from './api.browser';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Storage for Firebase
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
export * from './api';
|
|
7
|
-
export * from './api.node';
|
|
1
|
+
/**
|
|
2
|
+
* Cloud Storage for Firebase
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export * from './api';
|
|
7
|
+
export * from './api.node';
|
|
@@ -1,41 +1,41 @@
|
|
|
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
|
-
import { Reference } from './reference';
|
|
18
|
-
/**
|
|
19
|
-
* Result returned by `list()`.
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export interface ListResult {
|
|
23
|
-
/**
|
|
24
|
-
* References to prefixes (sub-folders). You can call list() on them to
|
|
25
|
-
* get its contents.
|
|
26
|
-
*
|
|
27
|
-
* Folders are implicit based on '/' in the object paths.
|
|
28
|
-
* For example, if a bucket has two objects '/a/b/1' and '/a/b/2', list('/a')
|
|
29
|
-
* will return '/a/b' as a prefix.
|
|
30
|
-
*/
|
|
31
|
-
prefixes: Reference[];
|
|
32
|
-
/**
|
|
33
|
-
* Objects in this directory.
|
|
34
|
-
* You can call getMetadata() and getDownloadUrl() on them.
|
|
35
|
-
*/
|
|
36
|
-
items: Reference[];
|
|
37
|
-
/**
|
|
38
|
-
* If set, there might be more results for this list. Use this token to resume the list.
|
|
39
|
-
*/
|
|
40
|
-
nextPageToken?: string;
|
|
41
|
-
}
|
|
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
|
+
import { Reference } from './reference';
|
|
18
|
+
/**
|
|
19
|
+
* Result returned by `list()`.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export interface ListResult {
|
|
23
|
+
/**
|
|
24
|
+
* References to prefixes (sub-folders). You can call list() on them to
|
|
25
|
+
* get its contents.
|
|
26
|
+
*
|
|
27
|
+
* Folders are implicit based on '/' in the object paths.
|
|
28
|
+
* For example, if a bucket has two objects '/a/b/1' and '/a/b/2', list('/a')
|
|
29
|
+
* will return '/a/b' as a prefix.
|
|
30
|
+
*/
|
|
31
|
+
prefixes: Reference[];
|
|
32
|
+
/**
|
|
33
|
+
* Objects in this directory.
|
|
34
|
+
* You can call getMetadata() and getDownloadUrl() on them.
|
|
35
|
+
*/
|
|
36
|
+
items: Reference[];
|
|
37
|
+
/**
|
|
38
|
+
* If set, there might be more results for this list. Use this token to resume the list.
|
|
39
|
+
*/
|
|
40
|
+
nextPageToken?: string;
|
|
41
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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 { FullMetadata } from './public-types';
|
|
18
|
-
/**
|
|
19
|
-
* @fileoverview Documentation for the metadata format.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* The full set of object metadata, including read-only properties.
|
|
23
|
-
*/
|
|
24
|
-
interface Metadata extends FullMetadata {
|
|
25
|
-
[prop: string]: unknown;
|
|
26
|
-
}
|
|
27
|
-
export { Metadata };
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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 { FullMetadata } from './public-types';
|
|
18
|
+
/**
|
|
19
|
+
* @fileoverview Documentation for the metadata format.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The full set of object metadata, including read-only properties.
|
|
23
|
+
*/
|
|
24
|
+
interface Metadata extends FullMetadata {
|
|
25
|
+
[prop: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export { Metadata };
|
|
@@ -1,20 +1,20 @@
|
|
|
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
|
-
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
-
export declare function decodeBase64(encoded: string): string;
|
|
19
|
-
/** Converts a Uint8Array to a string. */
|
|
20
|
-
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
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
|
+
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
+
export declare function decodeBase64(encoded: string): string;
|
|
19
|
+
/** Converts a Uint8Array to a string. */
|
|
20
|
+
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
@@ -1,19 +1,19 @@
|
|
|
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
|
-
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
-
export declare function decodeBase64(encoded: string): string;
|
|
19
|
-
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
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
|
+
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
+
export declare function decodeBase64(encoded: string): string;
|
|
19
|
+
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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 { Connection, ConnectionType, ErrorCode, Headers } from '../../implementation/connection';
|
|
18
|
-
/**
|
|
19
|
-
* Network layer for browsers. We use this instead of goog.net.XhrIo because
|
|
20
|
-
* goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android.
|
|
21
|
-
*/
|
|
22
|
-
declare abstract class XhrConnection<T extends ConnectionType> implements Connection<T> {
|
|
23
|
-
protected xhr_: XMLHttpRequest;
|
|
24
|
-
private errorCode_;
|
|
25
|
-
private sendPromise_;
|
|
26
|
-
protected sent_: boolean;
|
|
27
|
-
constructor();
|
|
28
|
-
abstract initXhr(): void;
|
|
29
|
-
send(url: string, method: string, body?: ArrayBufferView | Blob | string, headers?: Headers): Promise<void>;
|
|
30
|
-
getErrorCode(): ErrorCode;
|
|
31
|
-
getStatus(): number;
|
|
32
|
-
getResponse(): T;
|
|
33
|
-
getErrorText(): string;
|
|
34
|
-
/** Aborts the request. */
|
|
35
|
-
abort(): void;
|
|
36
|
-
getResponseHeader(header: string): string | null;
|
|
37
|
-
addUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
38
|
-
removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
39
|
-
}
|
|
40
|
-
export declare class XhrTextConnection extends XhrConnection<string> {
|
|
41
|
-
initXhr(): void;
|
|
42
|
-
}
|
|
43
|
-
export declare function newTextConnection(): Connection<string>;
|
|
44
|
-
export declare class XhrBytesConnection extends XhrConnection<ArrayBuffer> {
|
|
45
|
-
private data_?;
|
|
46
|
-
initXhr(): void;
|
|
47
|
-
}
|
|
48
|
-
export declare function newBytesConnection(): Connection<ArrayBuffer>;
|
|
49
|
-
export declare class XhrBlobConnection extends XhrConnection<Blob> {
|
|
50
|
-
initXhr(): void;
|
|
51
|
-
}
|
|
52
|
-
export declare function newBlobConnection(): Connection<Blob>;
|
|
53
|
-
export declare function newStreamConnection(): Connection<ReadableStream>;
|
|
54
|
-
export declare function injectTestConnection(factory: (() => Connection<string>) | null): void;
|
|
55
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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 { Connection, ConnectionType, ErrorCode, Headers } from '../../implementation/connection';
|
|
18
|
+
/**
|
|
19
|
+
* Network layer for browsers. We use this instead of goog.net.XhrIo because
|
|
20
|
+
* goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android.
|
|
21
|
+
*/
|
|
22
|
+
declare abstract class XhrConnection<T extends ConnectionType> implements Connection<T> {
|
|
23
|
+
protected xhr_: XMLHttpRequest;
|
|
24
|
+
private errorCode_;
|
|
25
|
+
private sendPromise_;
|
|
26
|
+
protected sent_: boolean;
|
|
27
|
+
constructor();
|
|
28
|
+
abstract initXhr(): void;
|
|
29
|
+
send(url: string, method: string, body?: ArrayBufferView | Blob | string, headers?: Headers): Promise<void>;
|
|
30
|
+
getErrorCode(): ErrorCode;
|
|
31
|
+
getStatus(): number;
|
|
32
|
+
getResponse(): T;
|
|
33
|
+
getErrorText(): string;
|
|
34
|
+
/** Aborts the request. */
|
|
35
|
+
abort(): void;
|
|
36
|
+
getResponseHeader(header: string): string | null;
|
|
37
|
+
addUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
38
|
+
removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
39
|
+
}
|
|
40
|
+
export declare class XhrTextConnection extends XhrConnection<string> {
|
|
41
|
+
initXhr(): void;
|
|
42
|
+
}
|
|
43
|
+
export declare function newTextConnection(): Connection<string>;
|
|
44
|
+
export declare class XhrBytesConnection extends XhrConnection<ArrayBuffer> {
|
|
45
|
+
private data_?;
|
|
46
|
+
initXhr(): void;
|
|
47
|
+
}
|
|
48
|
+
export declare function newBytesConnection(): Connection<ArrayBuffer>;
|
|
49
|
+
export declare class XhrBlobConnection extends XhrConnection<Blob> {
|
|
50
|
+
initXhr(): void;
|
|
51
|
+
}
|
|
52
|
+
export declare function newBlobConnection(): Connection<Blob>;
|
|
53
|
+
export declare function newStreamConnection(): Connection<ReadableStream>;
|
|
54
|
+
export declare function injectTestConnection(factory: (() => Connection<string>) | null): void;
|
|
55
|
+
export {};
|