@firebase/storage 0.7.0 → 0.7.1-2022028193537

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/compat/cjs/compat/reference.d.ts +4 -4
  3. package/dist/compat/cjs/exp/api.d.ts +26 -25
  4. package/dist/compat/cjs/exp/public-types.d.ts +1 -1
  5. package/dist/compat/cjs/index.js +4 -4
  6. package/dist/compat/cjs/index.js.map +1 -1
  7. package/dist/compat/cjs/src/reference.d.ts +4 -4
  8. package/dist/compat/esm2017/compat/reference.d.ts +4 -4
  9. package/dist/compat/esm2017/exp/api.d.ts +26 -25
  10. package/dist/compat/esm2017/exp/public-types.d.ts +1 -1
  11. package/dist/compat/esm2017/index.js +4 -4
  12. package/dist/compat/esm2017/index.js.map +1 -1
  13. package/dist/compat/esm2017/src/reference.d.ts +4 -4
  14. package/dist/compat/esm5/compat/reference.d.ts +4 -4
  15. package/dist/compat/esm5/exp/api.d.ts +26 -25
  16. package/dist/compat/esm5/exp/public-types.d.ts +1 -1
  17. package/dist/compat/esm5/index.js +4 -4
  18. package/dist/compat/esm5/index.js.map +1 -1
  19. package/dist/compat/esm5/src/reference.d.ts +4 -4
  20. package/dist/compat/reference.d.ts +4 -4
  21. package/dist/exp/api.d.ts +26 -25
  22. package/dist/exp/public-types.d.ts +1 -1
  23. package/dist/index.browser.cjs.js +26 -25
  24. package/dist/index.browser.cjs.js.map +1 -1
  25. package/dist/index.browser.esm.js +26 -25
  26. package/dist/index.browser.esm.js.map +1 -1
  27. package/dist/index.browser.esm2017.js +26 -25
  28. package/dist/index.browser.esm2017.js.map +1 -1
  29. package/dist/index.node.cjs.js +26 -25
  30. package/dist/index.node.cjs.js.map +1 -1
  31. package/dist/src/reference.d.ts +4 -4
  32. package/exp/dist/compat/reference.d.ts +4 -4
  33. package/exp/dist/exp/api.d.ts +26 -25
  34. package/exp/dist/exp/public-types.d.ts +1 -1
  35. package/exp/dist/index.browser.esm2017.js +25 -24
  36. package/exp/dist/index.browser.esm2017.js.map +1 -1
  37. package/exp/dist/index.browser.esm5.js +25 -24
  38. package/exp/dist/index.browser.esm5.js.map +1 -1
  39. package/exp/dist/index.node.cjs.js +25 -24
  40. package/exp/dist/index.node.cjs.js.map +1 -1
  41. package/exp/dist/src/reference.d.ts +4 -4
  42. package/exp/dist/storage-public.d.ts +27 -26
  43. package/exp/dist/storage.d.ts +27 -26
  44. package/package.json +2 -2
@@ -151,7 +151,7 @@ export declare function listAll(ref: Reference): Promise<ListResult>;
151
151
  */
152
152
  export declare function list(ref: Reference, options?: ListOptions | null): Promise<ListResult>;
153
153
  /**
154
- * A promise that resolves with the metadata for this object. If this
154
+ * A `Promise` that resolves with the metadata for this object. If this
155
155
  * object doesn't exist or metadata cannot be retreived, the promise is
156
156
  * rejected.
157
157
  * @public
@@ -165,7 +165,7 @@ export declare function getMetadata(ref: Reference): Promise<Metadata>;
165
165
  * @param metadata - The new metadata for the object.
166
166
  * Only values that have been explicitly set will be changed. Explicitly
167
167
  * setting a value to null will remove the metadata.
168
- * @returns A promise that resolves
168
+ * @returns A `Promise` that resolves
169
169
  * with the new metadata for this object.
170
170
  * See `firebaseStorage.Reference.prototype.getMetadata`
171
171
  */
@@ -173,7 +173,7 @@ export declare function updateMetadata(ref: Reference, metadata: Partial<Metadat
173
173
  /**
174
174
  * Returns the download URL for the given Reference.
175
175
  * @public
176
- * @returns A promise that resolves with the download
176
+ * @returns A `Promise` that resolves with the download
177
177
  * URL for this object.
178
178
  */
179
179
  export declare function getDownloadURL(ref: Reference): Promise<string>;
@@ -181,7 +181,7 @@ export declare function getDownloadURL(ref: Reference): Promise<string>;
181
181
  * Deletes the object at this location.
182
182
  * @public
183
183
  * @param ref - StorageReference for object to delete.
184
- * @returns A promise that resolves if the deletion succeeds.
184
+ * @returns A `Promise` that resolves if the deletion succeeds.
185
185
  */
186
186
  export declare function deleteObject(ref: Reference): Promise<void>;
187
187
  /**
@@ -93,7 +93,7 @@ export declare class ReferenceCompat implements types.Reference, Compat<StorageR
93
93
  */
94
94
  list(options?: types.ListOptions | null): Promise<types.ListResult>;
95
95
  /**
96
- * A promise that resolves with the metadata for this object. If this
96
+ * A `Promise` that resolves with the metadata for this object. If this
97
97
  * object doesn't exist or metadata cannot be retreived, the promise is
98
98
  * rejected.
99
99
  */
@@ -103,19 +103,19 @@ export declare class ReferenceCompat implements types.Reference, Compat<StorageR
103
103
  * @param metadata - The new metadata for the object.
104
104
  * Only values that have been explicitly set will be changed. Explicitly
105
105
  * setting a value to null will remove the metadata.
106
- * @returns A promise that resolves
106
+ * @returns A `Promise` that resolves
107
107
  * with the new metadata for this object.
108
108
  * @see firebaseStorage.Reference.prototype.getMetadata
109
109
  */
110
110
  updateMetadata(metadata: types.SettableMetadata): Promise<types.FullMetadata>;
111
111
  /**
112
- * @returns A promise that resolves with the download
112
+ * @returns A `Promise` that resolves with the download
113
113
  * URL for this object.
114
114
  */
115
115
  getDownloadURL(): Promise<string>;
116
116
  /**
117
117
  * Deletes the object at this location.
118
- * @returns A promise that resolves if the deletion succeeds.
118
+ * @returns A `Promise` that resolves if the deletion succeeds.
119
119
  */
120
120
  delete(): Promise<void>;
121
121
  private _throwIfRoot;
package/dist/exp/api.d.ts CHANGED
@@ -58,21 +58,21 @@ export declare function uploadString(ref: StorageReference, value: string, forma
58
58
  */
59
59
  export declare function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask;
60
60
  /**
61
- * A promise that resolves with the metadata for this object. If this
61
+ * A `Promise` that resolves with the metadata for this object. If this
62
62
  * object doesn't exist or metadata cannot be retreived, the promise is
63
63
  * rejected.
64
64
  * @public
65
- * @param ref - StorageReference to get metadata from.
65
+ * @param ref - {@link StorageReference} to get metadata from.
66
66
  */
67
67
  export declare function getMetadata(ref: StorageReference): Promise<FullMetadata>;
68
68
  /**
69
69
  * Updates the metadata for this object.
70
70
  * @public
71
- * @param ref - StorageReference to update metadata for.
71
+ * @param ref - {@link StorageReference} to update metadata for.
72
72
  * @param metadata - The new metadata for the object.
73
73
  * Only values that have been explicitly set will be changed. Explicitly
74
74
  * setting a value to null will remove the metadata.
75
- * @returns A promise that resolves with the new metadata for this object.
75
+ * @returns A `Promise` that resolves with the new metadata for this object.
76
76
  */
77
77
  export declare function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise<FullMetadata>;
78
78
  /**
@@ -90,9 +90,9 @@ export declare function updateMetadata(ref: StorageReference, metadata: Settable
90
90
  * list() may fail if there are too many unsupported objects in the bucket.
91
91
  * @public
92
92
  *
93
- * @param ref - StorageReference to get list from.
94
- * @param options - See ListOptions for details.
95
- * @returns A Promise that resolves with the items and prefixes.
93
+ * @param ref - {@link StorageReference} to get list from.
94
+ * @param options - See {@link ListOptions} for details.
95
+ * @returns A `Promise` that resolves with the items and prefixes.
96
96
  * `prefixes` contains references to sub-folders and `items`
97
97
  * contains references to objects in this folder. `nextPageToken`
98
98
  * can be used to get the rest of the results.
@@ -107,44 +107,45 @@ export declare function list(ref: StorageReference, options?: ListOptions): Prom
107
107
  * Note: The results may not be consistent if objects are changed while this
108
108
  * operation is running.
109
109
  *
110
- * Warning: listAll may potentially consume too many resources if there are
110
+ * Warning: `listAll` may potentially consume too many resources if there are
111
111
  * too many results.
112
112
  * @public
113
- * @param ref - StorageReference to get list from.
113
+ * @param ref - {@link StorageReference} to get list from.
114
114
  *
115
- * @returns A Promise that resolves with all the items and prefixes under
115
+ * @returns A `Promise` that resolves with all the items and prefixes under
116
116
  * the current storage reference. `prefixes` contains references to
117
117
  * sub-directories and `items` contains references to objects in this
118
118
  * folder. `nextPageToken` is never returned.
119
119
  */
120
120
  export declare function listAll(ref: StorageReference): Promise<ListResult>;
121
121
  /**
122
- * Returns the download URL for the given Reference.
122
+ * Returns the download URL for the given {@link StorageReference}.
123
123
  * @public
124
- * @returns A promise that resolves with the download
124
+ * @param ref - {@link StorageReference} to get the download URL for.
125
+ * @returns A `Promise` that resolves with the download
125
126
  * URL for this object.
126
127
  */
127
128
  export declare function getDownloadURL(ref: StorageReference): Promise<string>;
128
129
  /**
129
130
  * Deletes the object at this location.
130
131
  * @public
131
- * @param ref - StorageReference for object to delete.
132
- * @returns A promise that resolves if the deletion succeeds.
132
+ * @param ref - {@link StorageReference} for object to delete.
133
+ * @returns A `Promise` that resolves if the deletion succeeds.
133
134
  */
134
135
  export declare function deleteObject(ref: StorageReference): Promise<void>;
135
136
  /**
136
- * Returns a StorageReference for the given url.
137
- * @param storage - `StorageService` instance.
137
+ * Returns a {@link StorageReference} for the given url.
138
+ * @param storage - {@link FirebaseStorage} instance.
138
139
  * @param url - URL. If empty, returns root reference.
139
140
  * @public
140
141
  */
141
142
  export declare function ref(storage: FirebaseStorage, url?: string): StorageReference;
142
143
  /**
143
- * Returns a StorageReference for the given path in the
144
+ * Returns a {@link StorageReference} for the given path in the
144
145
  * default bucket.
145
- * @param storageOrRef - `StorageService` or `StorageReference`.
146
- * @param pathOrUrlStorage - path. If empty, returns root reference (if Storage
147
- * instance provided) or returns same reference (if Reference provided).
146
+ * @param storageOrRef - {@link FirebaseStorage} or {@link StorageReference}.
147
+ * @param pathOrUrlStorage - path. If empty, returns root reference (if {@link FirebaseStorage}
148
+ * instance provided) or returns same reference (if {@link StorageReference} provided).
148
149
  * @public
149
150
  */
150
151
  export declare function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference;
@@ -154,18 +155,18 @@ export declare function ref(storageOrRef: FirebaseStorage | StorageReference, pa
154
155
  export declare function _getChild(ref: StorageReference, childPath: string): Reference;
155
156
  export { StringFormat } from '../src/implementation/string';
156
157
  /**
157
- * Gets a Firebase StorageService instance for the given Firebase app.
158
+ * Gets a {@link FirebaseStorage} instance for the given Firebase app.
158
159
  * @public
159
- * @param app - Firebase app to get Storage instance for.
160
+ * @param app - Firebase app to get {@link FirebaseStorage} instance for.
160
161
  * @param bucketUrl - The gs:// url to your Firebase Storage Bucket.
161
162
  * If not passed, uses the app's default Storage Bucket.
162
- * @returns A Firebase StorageService instance.
163
+ * @returns A {@link FirebaseStorage} instance.
163
164
  */
164
165
  export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage;
165
166
  /**
166
- * Modify this `StorageService` instance to communicate with the Cloud Storage emulator.
167
+ * Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
167
168
  *
168
- * @param storage - The `StorageService` instance
169
+ * @param storage - The {@link FirebaseStorage} instance
169
170
  * @param host - The emulator host (ex: localhost)
170
171
  * @param port - The emulator port (ex: 5001)
171
172
  * @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.
@@ -65,7 +65,7 @@ export interface StorageReference {
65
65
  */
66
66
  name: string;
67
67
  /**
68
- * The StorageService associated with this reference.
68
+ * The {@link FirebaseStorage} instance associated with this reference.
69
69
  */
70
70
  storage: FirebaseStorage;
71
71
  /**
@@ -2934,7 +2934,7 @@ function list$1(ref, options) {
2934
2934
  });
2935
2935
  }
2936
2936
  /**
2937
- * A promise that resolves with the metadata for this object. If this
2937
+ * A `Promise` that resolves with the metadata for this object. If this
2938
2938
  * object doesn't exist or metadata cannot be retreived, the promise is
2939
2939
  * rejected.
2940
2940
  * @public
@@ -2961,7 +2961,7 @@ function getMetadata$1(ref) {
2961
2961
  * @param metadata - The new metadata for the object.
2962
2962
  * Only values that have been explicitly set will be changed. Explicitly
2963
2963
  * setting a value to null will remove the metadata.
2964
- * @returns A promise that resolves
2964
+ * @returns A `Promise` that resolves
2965
2965
  * with the new metadata for this object.
2966
2966
  * See `firebaseStorage.Reference.prototype.getMetadata`
2967
2967
  */
@@ -2982,7 +2982,7 @@ function updateMetadata$1(ref, metadata) {
2982
2982
  /**
2983
2983
  * Returns the download URL for the given Reference.
2984
2984
  * @public
2985
- * @returns A promise that resolves with the download
2985
+ * @returns A `Promise` that resolves with the download
2986
2986
  * URL for this object.
2987
2987
  */
2988
2988
  function getDownloadURL$1(ref) {
@@ -3010,7 +3010,7 @@ function getDownloadURL$1(ref) {
3010
3010
  * Deletes the object at this location.
3011
3011
  * @public
3012
3012
  * @param ref - StorageReference for object to delete.
3013
- * @returns A promise that resolves if the deletion succeeds.
3013
+ * @returns A `Promise` that resolves if the deletion succeeds.
3014
3014
  */
3015
3015
  function deleteObject$1(ref) {
3016
3016
  return tslib.__awaiter(this, void 0, void 0, function () {
@@ -3353,11 +3353,11 @@ function uploadBytesResumable(ref, data, metadata) {
3353
3353
  return uploadBytesResumable$1(ref, data, metadata);
3354
3354
  }
3355
3355
  /**
3356
- * A promise that resolves with the metadata for this object. If this
3356
+ * A `Promise` that resolves with the metadata for this object. If this
3357
3357
  * object doesn't exist or metadata cannot be retreived, the promise is
3358
3358
  * rejected.
3359
3359
  * @public
3360
- * @param ref - StorageReference to get metadata from.
3360
+ * @param ref - {@link StorageReference} to get metadata from.
3361
3361
  */
3362
3362
  function getMetadata(ref) {
3363
3363
  ref = util.getModularInstance(ref);
@@ -3366,11 +3366,11 @@ function getMetadata(ref) {
3366
3366
  /**
3367
3367
  * Updates the metadata for this object.
3368
3368
  * @public
3369
- * @param ref - StorageReference to update metadata for.
3369
+ * @param ref - {@link StorageReference} to update metadata for.
3370
3370
  * @param metadata - The new metadata for the object.
3371
3371
  * Only values that have been explicitly set will be changed. Explicitly
3372
3372
  * setting a value to null will remove the metadata.
3373
- * @returns A promise that resolves with the new metadata for this object.
3373
+ * @returns A `Promise` that resolves with the new metadata for this object.
3374
3374
  */
3375
3375
  function updateMetadata(ref, metadata) {
3376
3376
  ref = util.getModularInstance(ref);
@@ -3391,9 +3391,9 @@ function updateMetadata(ref, metadata) {
3391
3391
  * list() may fail if there are too many unsupported objects in the bucket.
3392
3392
  * @public
3393
3393
  *
3394
- * @param ref - StorageReference to get list from.
3395
- * @param options - See ListOptions for details.
3396
- * @returns A Promise that resolves with the items and prefixes.
3394
+ * @param ref - {@link StorageReference} to get list from.
3395
+ * @param options - See {@link ListOptions} for details.
3396
+ * @returns A `Promise` that resolves with the items and prefixes.
3397
3397
  * `prefixes` contains references to sub-folders and `items`
3398
3398
  * contains references to objects in this folder. `nextPageToken`
3399
3399
  * can be used to get the rest of the results.
@@ -3411,12 +3411,12 @@ function list(ref, options) {
3411
3411
  * Note: The results may not be consistent if objects are changed while this
3412
3412
  * operation is running.
3413
3413
  *
3414
- * Warning: listAll may potentially consume too many resources if there are
3414
+ * Warning: `listAll` may potentially consume too many resources if there are
3415
3415
  * too many results.
3416
3416
  * @public
3417
- * @param ref - StorageReference to get list from.
3417
+ * @param ref - {@link StorageReference} to get list from.
3418
3418
  *
3419
- * @returns A Promise that resolves with all the items and prefixes under
3419
+ * @returns A `Promise` that resolves with all the items and prefixes under
3420
3420
  * the current storage reference. `prefixes` contains references to
3421
3421
  * sub-directories and `items` contains references to objects in this
3422
3422
  * folder. `nextPageToken` is never returned.
@@ -3426,9 +3426,10 @@ function listAll(ref) {
3426
3426
  return listAll$1(ref);
3427
3427
  }
3428
3428
  /**
3429
- * Returns the download URL for the given Reference.
3429
+ * Returns the download URL for the given {@link StorageReference}.
3430
3430
  * @public
3431
- * @returns A promise that resolves with the download
3431
+ * @param ref - {@link StorageReference} to get the download URL for.
3432
+ * @returns A `Promise` that resolves with the download
3432
3433
  * URL for this object.
3433
3434
  */
3434
3435
  function getDownloadURL(ref) {
@@ -3438,8 +3439,8 @@ function getDownloadURL(ref) {
3438
3439
  /**
3439
3440
  * Deletes the object at this location.
3440
3441
  * @public
3441
- * @param ref - StorageReference for object to delete.
3442
- * @returns A promise that resolves if the deletion succeeds.
3442
+ * @param ref - {@link StorageReference} for object to delete.
3443
+ * @returns A `Promise` that resolves if the deletion succeeds.
3443
3444
  */
3444
3445
  function deleteObject(ref) {
3445
3446
  ref = util.getModularInstance(ref);
@@ -3456,9 +3457,9 @@ function _getChild(ref, childPath) {
3456
3457
  return _getChild$1(ref, childPath);
3457
3458
  }
3458
3459
  /**
3459
- * Modify this `StorageService` instance to communicate with the Cloud Storage emulator.
3460
+ * Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
3460
3461
  *
3461
- * @param storage - The `StorageService` instance
3462
+ * @param storage - The {@link FirebaseStorage} instance
3462
3463
  * @param host - The emulator host (ex: localhost)
3463
3464
  * @param port - The emulator port (ex: 5001)
3464
3465
  * @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.
@@ -3767,7 +3768,7 @@ var ReferenceCompat = /** @class */ (function () {
3767
3768
  return list(this._delegate, options || undefined).then(function (r) { return new ListResultCompat(r, _this.storage); });
3768
3769
  };
3769
3770
  /**
3770
- * A promise that resolves with the metadata for this object. If this
3771
+ * A `Promise` that resolves with the metadata for this object. If this
3771
3772
  * object doesn't exist or metadata cannot be retreived, the promise is
3772
3773
  * rejected.
3773
3774
  */
@@ -3779,7 +3780,7 @@ var ReferenceCompat = /** @class */ (function () {
3779
3780
  * @param metadata - The new metadata for the object.
3780
3781
  * Only values that have been explicitly set will be changed. Explicitly
3781
3782
  * setting a value to null will remove the metadata.
3782
- * @returns A promise that resolves
3783
+ * @returns A `Promise` that resolves
3783
3784
  * with the new metadata for this object.
3784
3785
  * @see firebaseStorage.Reference.prototype.getMetadata
3785
3786
  */
@@ -3787,7 +3788,7 @@ var ReferenceCompat = /** @class */ (function () {
3787
3788
  return updateMetadata(this._delegate, metadata);
3788
3789
  };
3789
3790
  /**
3790
- * @returns A promise that resolves with the download
3791
+ * @returns A `Promise` that resolves with the download
3791
3792
  * URL for this object.
3792
3793
  */
3793
3794
  ReferenceCompat.prototype.getDownloadURL = function () {
@@ -3795,7 +3796,7 @@ var ReferenceCompat = /** @class */ (function () {
3795
3796
  };
3796
3797
  /**
3797
3798
  * Deletes the object at this location.
3798
- * @returns A promise that resolves if the deletion succeeds.
3799
+ * @returns A `Promise` that resolves if the deletion succeeds.
3799
3800
  */
3800
3801
  ReferenceCompat.prototype.delete = function () {
3801
3802
  this._throwIfRoot('delete');
@@ -3888,7 +3889,7 @@ var StorageServiceCompat = /** @class */ (function () {
3888
3889
  }());
3889
3890
 
3890
3891
  var name = "@firebase/storage";
3891
- var version = "0.7.0";
3892
+ var version = "0.7.1-2022028193537";
3892
3893
 
3893
3894
  /**
3894
3895
  * @license