@google-cloud/storage
Advanced tools
Comparing version 5.15.3 to 5.15.4
@@ -109,3 +109,3 @@ import { BodyResponseCallback, DecorateRequestOptions, Metadata } from '@google-cloud/common'; | ||
* For more detailed information, see | ||
* [About Access Control Lists](http://goo.gl/6qBBPO). | ||
* {@link http://goo.gl/6qBBPO| About Access Control Lists}. | ||
* | ||
@@ -112,0 +112,0 @@ * @constructor Acl |
@@ -61,2 +61,3 @@ "use strict"; | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -89,2 +90,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -114,2 +116,3 @@ this.owners = {}; | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -140,2 +143,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -165,2 +169,3 @@ this.readers = {}; | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -191,2 +196,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -291,3 +297,3 @@ this.writers = {}; | ||
* For more detailed information, see | ||
* [About Access Control Lists](http://goo.gl/6qBBPO). | ||
* {@link http://goo.gl/6qBBPO| About Access Control Lists}. | ||
* | ||
@@ -318,4 +324,4 @@ * @constructor Acl | ||
* | ||
* @see [BucketAccessControls: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert} | ||
* @see [ObjectAccessControls: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert| BucketAccessControls: insert API Documentation} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} | ||
* | ||
@@ -335,2 +341,3 @@ * @param {object} options Configuration options. | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -367,2 +374,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/acl.js</caption> | ||
@@ -416,4 +424,4 @@ * region_tag:storage_add_file_owner | ||
* | ||
* @see [BucketAccessControls: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete} | ||
* @see [ObjectAccessControls: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete| BucketAccessControls: delete API Documentation} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete| ObjectAccessControls: delete API Documentation} | ||
* | ||
@@ -430,2 +438,3 @@ * @param {object} options Configuration object. | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -454,2 +463,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/acl.js</caption> | ||
@@ -499,4 +509,4 @@ * region_tag:storage_remove_bucket_owner | ||
* | ||
* @see [BucketAccessControls: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get} | ||
* @see [ObjectAccessControls: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get| BucketAccessControls: get API Documentation} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get| ObjectAccessControls: get API Documentation} | ||
* | ||
@@ -515,2 +525,3 @@ * @param {object|function} [options] Configuration options. If you want to | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -552,2 +563,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/acl.js</caption> | ||
@@ -615,4 +627,4 @@ * region_tag:storage_print_file_acl | ||
* | ||
* @see [BucketAccessControls: update API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update} | ||
* @see [ObjectAccessControls: update API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update| BucketAccessControls: update API Documentation} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update| ObjectAccessControls: update API Documentation} | ||
* | ||
@@ -631,2 +643,3 @@ * @param {object} options Configuration options. | ||
* @example | ||
* ``` | ||
* const storage = require('@google-cloud/storage')(); | ||
@@ -659,2 +672,3 @@ * const myBucket = storage.bucket('my-bucket'); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -661,0 +675,0 @@ update(options, callback) { |
@@ -236,7 +236,8 @@ /// <reference types="node" /> | ||
* | ||
* @see [Cloud Storage IAM Management](https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management) | ||
* @see [Granting, Changing, and Revoking Access](https://cloud.google.com/iam/docs/granting-changing-revoking-access) | ||
* @see [IAM Roles](https://cloud.google.com/iam/docs/understanding-roles) | ||
* See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} | ||
* See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} | ||
* See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} | ||
* | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -261,2 +262,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/iam.js</caption> | ||
@@ -289,4 +291,3 @@ * region_tag:storage_view_bucket_iam_members | ||
* Buckets also have | ||
* [default | ||
* ACLs](https://cloud.google.com/storage/docs/access-control/lists#default) | ||
* {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} | ||
* for all created files. Default ACLs specify permissions that all new | ||
@@ -297,4 +298,4 @@ * objects added to the bucket will inherit by default. You can add, delete, | ||
* | ||
* @see [About Access Control Lists]{@link http://goo.gl/6qBBPO} | ||
* @see [Default ACLs]{@link https://cloud.google.com/storage/docs/access-control/lists#default} | ||
* See {@link http://goo.gl/6qBBPO| About Access Control Lists} | ||
* See {@link https://cloud.google.com/storage/docs/access-control/lists#default| Default ACLs} | ||
* | ||
@@ -304,4 +305,3 @@ * @name Bucket#acl | ||
* @property {Acl} default Cloud Storage Buckets have | ||
* [default | ||
* ACLs](https://cloud.google.com/storage/docs/access-control/lists#default) | ||
* {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} | ||
* for all created files. You can add, delete, get, and update entities and | ||
@@ -312,2 +312,3 @@ * permissions for these as well. The method signatures and examples are all | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -336,2 +337,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/acl.js</caption> | ||
@@ -384,2 +386,3 @@ * region_tag:storage_print_bucket_acl | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -428,2 +431,3 @@ * const storage = new Storage(); | ||
* }, callback); | ||
* ``` | ||
*/ | ||
@@ -442,5 +446,7 @@ /** | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const bucket = storage.bucket('albums'); | ||
* ``` | ||
*/ | ||
@@ -503,4 +509,3 @@ declare class Bucket extends ServiceObject { | ||
* @param {string} [options.encryptionKey] A custom encryption key. See | ||
* [Customer-supplied Encryption | ||
* Keys](https://cloud.google.com/storage/docs/encryption#customer-supplied). | ||
* {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. | ||
* @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will | ||
@@ -515,2 +520,3 @@ * be used to encrypt the object. Must be in the format: | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -520,2 +526,3 @@ * const storage = new Storage(); | ||
* const file = bucket.file('my-existing-file.png'); | ||
* ``` | ||
*/ | ||
@@ -550,2 +557,3 @@ file(name: string, options?: FileOptions): File; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -555,2 +563,3 @@ * const storage = new Storage(); | ||
* const notification = bucket.notification('1'); | ||
* ``` | ||
*/ | ||
@@ -579,2 +588,3 @@ notification(id: string): Notification; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -585,2 +595,3 @@ * const storage = new Storage(); | ||
* bucket.setUserProject('grape-spaceship-123'); | ||
* ``` | ||
*/ | ||
@@ -587,0 +598,0 @@ setUserProject(userProject: string): void; |
@@ -9,3 +9,3 @@ import { Metadata, ServiceObject } from '@google-cloud/common'; | ||
* | ||
* @see [Object Change Notification]{@link https://cloud.google.com/storage/docs/object-change-notification} | ||
* See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification} | ||
* | ||
@@ -18,5 +18,7 @@ * @class | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const channel = storage.channel('id', 'resource-id'); | ||
* ``` | ||
*/ | ||
@@ -23,0 +25,0 @@ declare class Channel extends ServiceObject { |
@@ -22,3 +22,3 @@ "use strict"; | ||
* | ||
* @see [Object Change Notification]{@link https://cloud.google.com/storage/docs/object-change-notification} | ||
* See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification} | ||
* | ||
@@ -31,5 +31,7 @@ * @class | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const channel = storage.channel('id', 'resource-id'); | ||
* ``` | ||
*/ | ||
@@ -72,2 +74,3 @@ class Channel extends common_1.ServiceObject { | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -88,2 +91,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -90,0 +94,0 @@ stop(callback) { |
@@ -265,3 +265,3 @@ /// <reference types="node" /> | ||
* | ||
* @see [About Access Control lists]{@link http://goo.gl/6qBBPO} | ||
* See {@link http://goo.gl/6qBBPO| About Access Control lists} | ||
* | ||
@@ -272,2 +272,3 @@ * @name File#acl | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -295,2 +296,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -329,2 +331,3 @@ /** | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -335,4 +338,15 @@ * const storage = new Storage(); | ||
* const file = myBucket.file('my-file'); | ||
* ``` | ||
*/ | ||
constructor(bucket: Bucket, name: string, options?: FileOptions); | ||
/** | ||
* A helper method for determining if a request should be retried based on preconditions. | ||
* This should only be used for methods where the idempotency is determined by | ||
* `ifGenerationMatch` | ||
* | ||
* A request should not be retried under the following conditions: | ||
* - if precondition option `ifGenerationMatch` is not set OR | ||
* - if `idempotencyStrategy` is set to `RetryNever` | ||
*/ | ||
private shouldRetryBasedOnPreconditionAndIdempotencyStrat; | ||
copy(destination: string | Bucket | File, options?: CopyOptions): Promise<CopyResponse>; | ||
@@ -376,3 +390,3 @@ copy(destination: string | Bucket | File, callback: CopyCallback): void; | ||
* For faster crc32c computation, you must manually install | ||
* [`fast-crc32c`](https://www.npmjs.com/package/fast-crc32c): | ||
* {@link https://www.npmjs.com/package/fast-crc32c| `fast-crc32c`}: | ||
* | ||
@@ -388,2 +402,3 @@ * $ npm install --save fast-crc32c | ||
* @example | ||
* ``` | ||
* //- | ||
@@ -436,2 +451,3 @@ * // <h4>Downloading a File</h4> | ||
* .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); | ||
* ``` | ||
*/ | ||
@@ -446,4 +462,3 @@ createReadStream(options?: CreateReadStreamOptions): Readable; | ||
* uploads.** A full JSON file path to use with `gcs-resumable-upload`. | ||
* This maps to the [configstore option by the same | ||
* name](https://github.com/yeoman/configstore/tree/0df1ec950d952b1f0dfb39ce22af8e505dffc71a#configpath). | ||
* This maps to the {@link https://github.com/yeoman/configstore/tree/0df1ec950d952b1f0dfb39ce22af8e505dffc71a#configpath| configstore option by the same name}. | ||
* @property {string} [contentType] Alias for | ||
@@ -457,4 +472,3 @@ * `options.metadata.contentType`. If set to `auto`, the file name is used | ||
* @property {object} [metadata] See the examples below or | ||
* [Objects: insert request | ||
* body](https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON) | ||
* {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body} | ||
* for more details. | ||
@@ -517,3 +531,3 @@ * @property {number} [offset] The starting byte of the upload stream, for | ||
* Resumable uploads require write access to the $HOME directory. Through | ||
* [`config-store`](https://www.npmjs.com/package/configstore), some metadata | ||
* {@link https://www.npmjs.com/package/configstore| `config-store`}, some metadata | ||
* is stored. By default, if the directory is not writable, we will fall back | ||
@@ -532,3 +546,3 @@ * to a simple upload. However, if you explicitly request a resumable upload, | ||
* For faster crc32c computation, you must manually install | ||
* [`fast-crc32c`](https://www.npmjs.com/package/fast-crc32c): | ||
* {@link https://www.npmjs.com/package/fast-crc32c| `fast-crc32c`}: | ||
* | ||
@@ -540,4 +554,4 @@ * $ npm install --save fast-crc32c | ||
* | ||
* @see [Upload Options (Simple or Resumable)]{@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload} | ||
* @see [Objects: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload| Upload Options (Simple or Resumable)} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert| Objects: insert API Documentation} | ||
* | ||
@@ -548,2 +562,3 @@ * @param {CreateWriteStreamOptions} [options] Configuration options. | ||
* @example | ||
* ``` | ||
* const fs = require('fs'); | ||
@@ -606,2 +621,3 @@ * const {Storage} = require('@google-cloud/storage'); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -627,2 +643,3 @@ createWriteStream(options?: CreateWriteStreamOptions): Writable; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -641,2 +658,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
*/ | ||
@@ -650,3 +668,3 @@ deleteResumableCache(): void; | ||
* | ||
* @see [Customer-supplied Encryption Keys]{@link https://cloud.google.com/storage/docs/encryption#customer-supplied} | ||
* See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} | ||
* | ||
@@ -657,2 +675,3 @@ * @param {string|buffer} encryptionKey An AES-256 encryption key. | ||
* @example | ||
* ``` | ||
* const crypto = require('crypto'); | ||
@@ -684,2 +703,3 @@ * const {Storage} = require('@google-cloud/storage'); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/encryption.js</caption> | ||
@@ -721,2 +741,3 @@ * region_tag:storage_upload_encrypted_file | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -729,2 +750,3 @@ * const storage = new Storage(); | ||
* const publicUrl = file.publicUrl(); | ||
* ``` | ||
*/ | ||
@@ -756,2 +778,3 @@ publicUrl(): string; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -763,2 +786,3 @@ * const storage = new Storage(); | ||
* file.setUserProject('grape-spaceship-123'); | ||
* ``` | ||
*/ | ||
@@ -769,3 +793,3 @@ setUserProject(userProject: string): void; | ||
* | ||
* @see [gcs-resumable-upload]{@link https://github.com/googleapis/gcs-resumable-upload} | ||
* See {@link https://github.com/googleapis/gcs-resumable-upload| gcs-resumable-upload} | ||
* | ||
@@ -772,0 +796,0 @@ * @param {Duplexify} stream - Duplexify stream of data to pipe to the file. |
@@ -44,3 +44,3 @@ import { Metadata, ServiceObject } from '@google-cloud/common'; | ||
* | ||
* @see [HMAC keys documentation]{@link https://cloud.google.com/storage/docs/authentication/hmackeys} | ||
* See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} | ||
* | ||
@@ -68,7 +68,9 @@ * @class | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const hmacKey = storage.hmacKey('access-id'); | ||
* ``` | ||
*/ | ||
constructor(storage: Storage, accessId: string, options?: HmacKeyOptions); | ||
} |
@@ -32,3 +32,3 @@ "use strict"; | ||
* | ||
* @see [HMAC keys documentation]{@link https://cloud.google.com/storage/docs/authentication/hmackeys} | ||
* See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} | ||
* | ||
@@ -55,5 +55,7 @@ * @class | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const hmacKey = storage.hmacKey('access-id'); | ||
* ``` | ||
*/ | ||
@@ -88,2 +90,3 @@ constructor(storage, accessId, options) { | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -120,2 +123,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -154,2 +158,3 @@ delete: true, | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -179,2 +184,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -202,2 +208,3 @@ get: true, | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -228,2 +235,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -263,2 +271,3 @@ getMetadata: true, | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -290,2 +299,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -292,0 +302,0 @@ setMetadata: { |
@@ -85,5 +85,5 @@ import { Metadata } from '@google-cloud/common'; | ||
* | ||
* @see [Cloud Storage IAM Management](https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management) | ||
* @see [Granting, Changing, and Revoking Access](https://cloud.google.com/iam/docs/granting-changing-revoking-access) | ||
* @see [IAM Roles](https://cloud.google.com/iam/docs/understanding-roles) | ||
* See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} | ||
* See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} | ||
* See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} | ||
* | ||
@@ -94,2 +94,3 @@ * @constructor Iam | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -99,2 +100,3 @@ * const storage = new Storage(); | ||
* // bucket.iam | ||
* ``` | ||
*/ | ||
@@ -101,0 +103,0 @@ declare class Iam { |
@@ -23,5 +23,5 @@ "use strict"; | ||
* | ||
* @see [Cloud Storage IAM Management](https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management) | ||
* @see [Granting, Changing, and Revoking Access](https://cloud.google.com/iam/docs/granting-changing-revoking-access) | ||
* @see [IAM Roles](https://cloud.google.com/iam/docs/understanding-roles) | ||
* See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} | ||
* See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} | ||
* See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} | ||
* | ||
@@ -32,2 +32,3 @@ * @constructor Iam | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -37,2 +38,3 @@ * const storage = new Storage(); | ||
* // bucket.iam | ||
* ``` | ||
*/ | ||
@@ -54,3 +56,3 @@ class Iam { | ||
* based on the feature syntax in the policy fetched. | ||
* @see [IAM Policy versions]{@link https://cloud.google.com/iam/docs/policies#versions} | ||
* See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} | ||
* @property {string} [userProject] The ID of the project which will be | ||
@@ -71,3 +73,3 @@ * billed for the request. | ||
* 3 or greater. | ||
* @see [IAM Policy versions]{@link https://cloud.google.com/iam/docs/policies#versions} | ||
* See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} | ||
*/ | ||
@@ -102,5 +104,6 @@ /** | ||
* | ||
* @see [Buckets: setIamPolicy API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy| Buckets: setIamPolicy API Documentation} | ||
* | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -126,2 +129,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/iam.js</caption> | ||
@@ -156,6 +160,7 @@ * region_tag:storage_view_bucket_iam_members | ||
* | ||
* @see [Buckets: setIamPolicy API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy} | ||
* @see [IAM Roles](https://cloud.google.com/iam/docs/understanding-roles) | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy| Buckets: setIamPolicy API Documentation} | ||
* See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} | ||
* | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -185,2 +190,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/iam.js</caption> | ||
@@ -218,5 +224,6 @@ * region_tag:storage_add_bucket_iam_member | ||
* | ||
* @see [Buckets: testIamPermissions API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions| Buckets: testIamPermissions API Documentation} | ||
* | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -261,2 +268,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -263,0 +271,0 @@ testPermissions(permissions, optionsOrCallback, callback) { |
@@ -11,18 +11,31 @@ /** | ||
* | ||
* @example <caption>Install the client library with <a | ||
* href="https://www.npmjs.com/">npm</a>:</caption> npm install --save | ||
* @google-cloud/storage | ||
* @example | ||
* Install the client library with <a href="https://www.npmjs.com/">npm</a>: | ||
* ``` | ||
* npm install --save @google-cloud/storage | ||
* ``` | ||
* | ||
* @example <caption>Import the client library</caption> | ||
* @example | ||
* Import the client library | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* ``` | ||
* | ||
* @example <caption>Create a client that uses <a | ||
* @example | ||
* Create a client that uses <a | ||
* href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application | ||
* Default Credentials (ADC)</a>:</caption> const storage = new Storage(); | ||
* Default Credentials (ADC)</a>: | ||
* ``` | ||
* const storage = new Storage(); | ||
* ``` | ||
* | ||
* @example <caption>Create a client with <a | ||
* @example | ||
* Create a client with <a | ||
* href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit | ||
* credentials</a>:</caption> const storage = new Storage({ projectId: | ||
* credentials</a>: | ||
* ``` | ||
* const storage = new Storage({ projectId: | ||
* 'your-project-id', keyFilename: '/path/to/keyfile.json' | ||
* }); | ||
* ``` | ||
* | ||
@@ -29,0 +42,0 @@ * @example <caption>include:samples/quickstart.js</caption> |
@@ -72,3 +72,3 @@ import { Metadata, MetadataCallback, ServiceObject } from '@google-cloud/common'; | ||
* | ||
* @see [Cloud Pub/Sub Notifications for Google Cloud Storage]{@link https://cloud.google.com/storage/docs/pubsub-notifications} | ||
* See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage} | ||
* | ||
@@ -82,2 +82,3 @@ * @class | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -88,2 +89,3 @@ * const storage = new Storage(); | ||
* const notification = myBucket.notification('1'); | ||
* ``` | ||
*/ | ||
@@ -90,0 +92,0 @@ declare class Notification extends ServiceObject { |
@@ -33,3 +33,3 @@ "use strict"; | ||
* | ||
* @see [Cloud Pub/Sub Notifications for Google Cloud Storage]{@link https://cloud.google.com/storage/docs/pubsub-notifications} | ||
* See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage} | ||
* | ||
@@ -43,2 +43,3 @@ * @class | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -49,2 +50,3 @@ * const storage = new Storage(); | ||
* const notification = myBucket.notification('1'); | ||
* ``` | ||
*/ | ||
@@ -57,3 +59,3 @@ class Notification extends common_1.ServiceObject { | ||
* | ||
* @see [Notifications: insert]{@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} | ||
* @method Notification#create | ||
@@ -76,2 +78,3 @@ * | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -95,2 +98,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -115,2 +119,3 @@ create: true, | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -129,2 +134,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -148,3 +154,3 @@ exists: true, | ||
* | ||
* @see [Notifications: delete API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete| Notifications: delete API Documentation} | ||
* | ||
@@ -158,2 +164,3 @@ * @param {object} [options] Configuration options. | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -173,2 +180,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/deleteNotification.js</caption> | ||
@@ -191,3 +199,3 @@ * region_tag:storage_delete_bucket_notification | ||
* | ||
* @see [Notifications: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} | ||
* | ||
@@ -204,2 +212,3 @@ * @param {object} [options] Configuration options. | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -221,2 +230,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -261,3 +271,3 @@ get(optionsOrCallback, callback) { | ||
* | ||
* @see [Notifications: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} | ||
* | ||
@@ -271,2 +281,3 @@ * @param {object} [options] Configuration options. | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -287,2 +298,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/getMetadataNotifications.js</caption> | ||
@@ -289,0 +301,0 @@ * region_tag:storage_print_pubsub_bucket_notification |
@@ -158,3 +158,3 @@ /// <reference types="node" /> | ||
* | ||
* @see [About Access Control Lists]{@link https://cloud.google.com/storage/docs/access-control/lists} | ||
* See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists} | ||
* | ||
@@ -168,2 +168,3 @@ * @name Storage#acl | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -203,2 +204,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -215,2 +217,3 @@ /** | ||
* @example | ||
* ``` | ||
* storage.getBucketsStream() | ||
@@ -233,2 +236,3 @@ * .on('error', console.error) | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -245,2 +249,3 @@ /** | ||
* @example | ||
* ``` | ||
* storage.getHmacKeysStream() | ||
@@ -263,2 +268,3 @@ * .on('error', console.error) | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -272,6 +278,6 @@ /** | ||
* To learn more about ACLs, read this overview on | ||
* [Access Control](https://cloud.google.com/storage/docs/access-control). | ||
* {@link https://cloud.google.com/storage/docs/access-control| Access Control}. | ||
* | ||
* @see [Cloud Storage overview]{@link https://cloud.google.com/storage/docs/overview} | ||
* @see [Access Control]{@link https://cloud.google.com/storage/docs/access-control} | ||
* See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview} | ||
* See {@link https://cloud.google.com/storage/docs/access-control| Access Control} | ||
* | ||
@@ -382,8 +388,13 @@ * @class | ||
* | ||
* @example <caption>Create a client that uses Application Default Credentials | ||
* (ADC)</caption> | ||
* @example | ||
* Create a client that uses Application Default Credentials | ||
* (ADC) | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* ``` | ||
* | ||
* @example <caption>Create a client with explicit credentials</caption> | ||
* @example | ||
* Create a client with explicit credentials | ||
* ``` | ||
* const storage = new Storage({ | ||
@@ -393,3 +404,4 @@ * projectId: 'your-project-id', | ||
* }); | ||
* | ||
* ``` | ||
* @param {StorageOptions} [options] Configuration options. | ||
@@ -413,2 +425,3 @@ */ | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -418,2 +431,3 @@ * const storage = new Storage(); | ||
* const photos = storage.bucket('photos'); | ||
* ``` | ||
*/ | ||
@@ -430,5 +444,7 @@ bucket(name: string, options?: BucketOptions): Bucket; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const channel = storage.channel('id', 'resource-id'); | ||
* ``` | ||
*/ | ||
@@ -493,2 +509,3 @@ channel(id: string, resourceId: string): Channel; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -527,2 +544,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -551,5 +569,7 @@ getHmacKeys(options?: GetHmacKeysOptions): Promise<GetHmacKeysResponse>; | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const hmacKey = storage.hmacKey('ACCESS_ID'); | ||
* ``` | ||
*/ | ||
@@ -556,0 +576,0 @@ hmacKey(accessId: string, options?: HmacKeyOptions): HmacKey; |
@@ -92,3 +92,3 @@ "use strict"; | ||
for (const e of err.errors) { | ||
const reason = (_a = e.reason) === null || _a === void 0 ? void 0 : _a.toLowerCase(); | ||
const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toLowerCase(); | ||
if ((reason && reason.includes('eai_again')) || //DNS lookup error | ||
@@ -123,3 +123,3 @@ reason === 'econnreset' || | ||
* | ||
* @see [About Access Control Lists]{@link https://cloud.google.com/storage/docs/access-control/lists} | ||
* See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists} | ||
* | ||
@@ -133,2 +133,3 @@ * @name Storage#acl | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -168,2 +169,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -180,2 +182,3 @@ /** | ||
* @example | ||
* ``` | ||
* storage.getBucketsStream() | ||
@@ -198,2 +201,3 @@ * .on('error', console.error) | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -210,2 +214,3 @@ /** | ||
* @example | ||
* ``` | ||
* storage.getHmacKeysStream() | ||
@@ -228,2 +233,3 @@ * .on('error', console.error) | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -237,6 +243,6 @@ /** | ||
* To learn more about ACLs, read this overview on | ||
* [Access Control](https://cloud.google.com/storage/docs/access-control). | ||
* {@link https://cloud.google.com/storage/docs/access-control| Access Control}. | ||
* | ||
* @see [Cloud Storage overview]{@link https://cloud.google.com/storage/docs/overview} | ||
* @see [Access Control]{@link https://cloud.google.com/storage/docs/access-control} | ||
* See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview} | ||
* See {@link https://cloud.google.com/storage/docs/access-control| Access Control} | ||
* | ||
@@ -300,8 +306,13 @@ * @class | ||
* | ||
* @example <caption>Create a client that uses Application Default Credentials | ||
* (ADC)</caption> | ||
* @example | ||
* Create a client that uses Application Default Credentials | ||
* (ADC) | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* ``` | ||
* | ||
* @example <caption>Create a client with explicit credentials</caption> | ||
* @example | ||
* Create a client with explicit credentials | ||
* ``` | ||
* const storage = new Storage({ | ||
@@ -311,3 +322,4 @@ * projectId: 'your-project-id', | ||
* }); | ||
* | ||
* ``` | ||
* @param {StorageOptions} [options] Configuration options. | ||
@@ -408,2 +420,3 @@ */ | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -413,2 +426,3 @@ * const storage = new Storage(); | ||
* const photos = storage.bucket('photos'); | ||
* ``` | ||
*/ | ||
@@ -430,5 +444,7 @@ bucket(name, options) { | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const channel = storage.channel('id', 'resource-id'); | ||
* ``` | ||
*/ | ||
@@ -480,7 +496,6 @@ channel(id, resourceId) { | ||
* a name that is already in use. For more information, see | ||
* [Bucket Naming | ||
* Guidelines](https://cloud.google.com/storage/docs/bucketnaming.html#requirements). | ||
* {@link https://cloud.google.com/storage/docs/bucketnaming.html#requirements| Bucket Naming Guidelines}. | ||
* | ||
* @see [Buckets: insert API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert} | ||
* @see [Storage Classes]{@link https://cloud.google.com/storage/docs/storage-classes} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert| Buckets: insert API Documentation} | ||
* See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} | ||
* | ||
@@ -495,2 +510,3 @@ * @param {string} name Name of the bucket to create. | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -548,2 +564,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/buckets.js</caption> | ||
@@ -652,3 +669,3 @@ * region_tag:storage_create_bucket | ||
* | ||
* @see [HMAC keys documentation]{@link https://cloud.google.com/storage/docs/authentication/hmackeys} | ||
* See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} | ||
* | ||
@@ -661,2 +678,3 @@ * @param {string} serviceAccountEmail The service account's email address | ||
* @example | ||
* ``` | ||
* const {Storage} = require('google-cloud/storage'); | ||
@@ -684,2 +702,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -746,3 +765,3 @@ createHmacKey(serviceAccountEmail, optionsOrCb, cb) { | ||
* | ||
* @see [Buckets: list API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list| Buckets: list API Documentation} | ||
* | ||
@@ -754,2 +773,3 @@ * @param {GetBucketsRequest} [query] Query object for listing buckets. | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -793,2 +813,3 @@ * const storage = new Storage(); | ||
* | ||
* ``` | ||
* @example <caption>include:samples/buckets.js</caption> | ||
@@ -850,4 +871,3 @@ * region_tag:storage_list_buckets | ||
* @property {object} 1 The full | ||
* [API | ||
* response](https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource). | ||
* {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. | ||
*/ | ||
@@ -861,4 +881,3 @@ /** | ||
* @param {object} apiResponse The full | ||
* [API | ||
* response](https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource). | ||
* {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. | ||
*/ | ||
@@ -869,4 +888,4 @@ /** | ||
* | ||
* @see [Projects.serviceAccount: get API Documentation]{@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get} | ||
* @see [Projects.serviceAccount Resource]{@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get| Projects.serviceAccount: get API Documentation} | ||
* See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| Projects.serviceAccount Resource} | ||
* | ||
@@ -880,2 +899,3 @@ * @param {object} [options] Configuration object. | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
@@ -897,2 +917,3 @@ * const storage = new Storage(); | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -935,5 +956,7 @@ getServiceAccount(optionsOrCallback, cb) { | ||
* @example | ||
* ``` | ||
* const {Storage} = require('@google-cloud/storage'); | ||
* const storage = new Storage(); | ||
* const hmacKey = storage.hmacKey('ACCESS_ID'); | ||
* ``` | ||
*/ | ||
@@ -940,0 +963,0 @@ hmacKey(accessId, options) { |
@@ -19,3 +19,3 @@ /// <reference types="node" /> | ||
* | ||
* @see [MDN: fixedEncodeURIComponent]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent} | ||
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent} | ||
* | ||
@@ -22,0 +22,0 @@ * @param {string} str The URI component to encode. |
@@ -37,3 +37,3 @@ "use strict"; | ||
* | ||
* @see [MDN: fixedEncodeURIComponent]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent} | ||
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent} | ||
* | ||
@@ -40,0 +40,0 @@ * @param {string} str The URI component to encode. |
{ | ||
"name": "@google-cloud/storage", | ||
"description": "Cloud Storage Client Library for Node.js", | ||
"version": "5.15.3", | ||
"version": "5.15.4", | ||
"license": "Apache-2.0", | ||
@@ -86,3 +86,3 @@ "author": "Google Inc.", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^11.13.4", | ||
"@types/node": "^16.0.0", | ||
"@types/node-fetch": "^2.1.3", | ||
@@ -92,3 +92,3 @@ "@types/proxyquire": "^1.3.28", | ||
"@types/sinon": "^10.0.0", | ||
"@types/tmp": "0.2.1", | ||
"@types/tmp": "0.2.2", | ||
"@types/uuid": "^8.0.0", | ||
@@ -95,0 +95,0 @@ "@types/xdg-basedir": "^2.0.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
617502
12321