@firebase/storage-types 0.7.0 → 0.8.0-20230201003102
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/CHANGELOG.md +11 -0
- package/index.d.ts +48 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @firebase/storage-types
|
|
2
2
|
|
|
3
|
+
## 0.8.0-20230201003102
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`825e648b8`](https://github.com/firebase/firebase-js-sdk/commit/825e648b81ca63c7bc64f8700f7a46eb320b2106) [#6974](https://github.com/firebase/firebase-js-sdk/pull/6974) (fixes [#6944](https://github.com/firebase/firebase-js-sdk/issues/6944)) - Fixed issue where users were unable to check if an Error was an instance of `StorageError`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`0bab0b7a7`](https://github.com/firebase/firebase-js-sdk/commit/0bab0b7a786d1563bf665904c7097d1fe06efce5)]:
|
|
12
|
+
- @firebase/util@1.9.1-20230201003102
|
|
13
|
+
|
|
3
14
|
## 0.7.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/index.d.ts
CHANGED
|
@@ -91,16 +91,60 @@ export interface UploadMetadata extends SettableMetadata {
|
|
|
91
91
|
md5Hash?: string | null;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
interface FirebaseStorageError extends FirebaseError {
|
|
95
|
-
serverResponse: string | null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
94
|
export interface StorageObserver<T> {
|
|
99
95
|
next?: NextFn<T> | null;
|
|
100
96
|
error?: (error: FirebaseStorageError) => void | null;
|
|
101
97
|
complete?: CompleteFn | null;
|
|
102
98
|
}
|
|
103
99
|
|
|
100
|
+
export enum StorageErrorCode {
|
|
101
|
+
UNKNOWN = 'unknown',
|
|
102
|
+
OBJECT_NOT_FOUND = 'object-not-found',
|
|
103
|
+
BUCKET_NOT_FOUND = 'bucket-not-found',
|
|
104
|
+
PROJECT_NOT_FOUND = 'project-not-found',
|
|
105
|
+
QUOTA_EXCEEDED = 'quota-exceeded',
|
|
106
|
+
UNAUTHENTICATED = 'unauthenticated',
|
|
107
|
+
UNAUTHORIZED = 'unauthorized',
|
|
108
|
+
UNAUTHORIZED_APP = 'unauthorized-app',
|
|
109
|
+
RETRY_LIMIT_EXCEEDED = 'retry-limit-exceeded',
|
|
110
|
+
INVALID_CHECKSUM = 'invalid-checksum',
|
|
111
|
+
CANCELED = 'canceled',
|
|
112
|
+
INVALID_EVENT_NAME = 'invalid-event-name',
|
|
113
|
+
INVALID_URL = 'invalid-url',
|
|
114
|
+
INVALID_DEFAULT_BUCKET = 'invalid-default-bucket',
|
|
115
|
+
NO_DEFAULT_BUCKET = 'no-default-bucket',
|
|
116
|
+
CANNOT_SLICE_BLOB = 'cannot-slice-blob',
|
|
117
|
+
SERVER_FILE_WRONG_SIZE = 'server-file-wrong-size',
|
|
118
|
+
NO_DOWNLOAD_URL = 'no-download-url',
|
|
119
|
+
INVALID_ARGUMENT = 'invalid-argument',
|
|
120
|
+
INVALID_ARGUMENT_COUNT = 'invalid-argument-count',
|
|
121
|
+
APP_DELETED = 'app-deleted',
|
|
122
|
+
INVALID_ROOT_OPERATION = 'invalid-root-operation',
|
|
123
|
+
INVALID_FORMAT = 'invalid-format',
|
|
124
|
+
INTERNAL_ERROR = 'internal-error',
|
|
125
|
+
UNSUPPORTED_ENVIRONMENT = 'unsupported-environment'
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface FirebaseStorageError extends FirebaseError {
|
|
129
|
+
/**
|
|
130
|
+
* Stores custom error data unque to StorageError.
|
|
131
|
+
*/
|
|
132
|
+
customData: {
|
|
133
|
+
serverResponse: string | null;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
get status(): number;
|
|
137
|
+
set status(status: number);
|
|
138
|
+
/**
|
|
139
|
+
* Compares a StorageErrorCode against this error's code, filtering out the prefix.
|
|
140
|
+
*/
|
|
141
|
+
_codeEquals(code: StorageErrorCode): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Optional response message that was added by the server.
|
|
144
|
+
*/
|
|
145
|
+
get serverResponse(): null | string;
|
|
146
|
+
set serverResponse(serverResponse: string | null);
|
|
147
|
+
}
|
|
104
148
|
export interface UploadTask {
|
|
105
149
|
cancel(): boolean;
|
|
106
150
|
catch(onRejected: (error: FirebaseStorageError) => any): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/storage-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-20230201003102",
|
|
4
4
|
"description": "@firebase/storage Types",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"@firebase/app-types": "0.x",
|
|
16
|
-
"@firebase/util": "1.
|
|
16
|
+
"@firebase/util": "1.9.1-20230201003102"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"directory": "packages/storage-types",
|