@google-cloud/storage
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -256,3 +256,3 @@ /** | ||
getFilesStream: Function; | ||
constructor(storage: any, name: any, options?: any); | ||
constructor(storage: Storage, name: string, options?: any); | ||
/** | ||
@@ -315,3 +315,3 @@ * @typedef {array} CombineResponse | ||
*/ | ||
combine(sources: any, destination: any, options: any, callback: any): void; | ||
combine(sources: string[] | File[], destination: any, options: any, callback: any): void; | ||
/** | ||
@@ -372,3 +372,3 @@ * @typedef {array} CreateChannelResponse | ||
*/ | ||
createChannel(id: any, config: any, options: any, callback: any): void; | ||
createChannel(id: string, config: any, options: any, callback?: any): void; | ||
/** | ||
@@ -460,3 +460,3 @@ * Metadata to set for the Notification. | ||
*/ | ||
createNotification(topic: any, options: any, callback: any): void; | ||
createNotification(topic: string, options: any, callback?: any): void; | ||
/** | ||
@@ -572,3 +572,3 @@ * @typedef {array} DeleteBucketResponse | ||
*/ | ||
deleteFiles(query: DeleteFilesRequest, callback: any): void; | ||
deleteFiles(query: DeleteFilesRequest, callback?: any): void; | ||
/** | ||
@@ -621,3 +621,3 @@ * @typedef {array} DeleteLabelsResponse | ||
*/ | ||
deleteLabels(labels: any, callback?: any): void; | ||
deleteLabels(labels: string | string[], callback?: any): void; | ||
/** | ||
@@ -667,3 +667,3 @@ * @typedef {array} DisableRequesterPaysResponse | ||
*/ | ||
disableRequesterPays(callback: any): void; | ||
disableRequesterPays(callback?: any): void; | ||
/** | ||
@@ -772,3 +772,3 @@ * @typedef {array} EnableRequesterPaysResponse | ||
*/ | ||
file(name: any, options?: FileOptions): File; | ||
file(name: string, options?: FileOptions): File; | ||
/** | ||
@@ -1029,3 +1029,3 @@ * @typedef {array} GetBucketResponse | ||
*/ | ||
getNotifications(options: any, callback: any): void; | ||
getNotifications(options: any, callback?: any): void; | ||
/** | ||
@@ -1117,3 +1117,3 @@ * @typedef {array} MakeBucketPrivateResponse | ||
*/ | ||
makePrivate(options: any, callback: any): void; | ||
makePrivate(options: any, callback?: any): void; | ||
/** | ||
@@ -1203,3 +1203,3 @@ * @typedef {array} MakeBucketPublicResponse | ||
*/ | ||
makePublic(options: any, callback: any): void; | ||
makePublic(options: any, callback?: any): void; | ||
/** | ||
@@ -1218,3 +1218,3 @@ * Get a reference to a Cloud Pub/Sub Notification. | ||
*/ | ||
notification(id: any): Notification; | ||
notification(id: string): Notification; | ||
/** | ||
@@ -1391,3 +1391,3 @@ * Makes request and applies userProject query parameter if necessary. | ||
*/ | ||
setUserProject(userProject: any): void; | ||
setUserProject(userProject: string): void; | ||
/** | ||
@@ -1595,3 +1595,3 @@ * @typedef {array} UploadResponse | ||
*/ | ||
upload(pathString: any, options: any, callback: any): void; | ||
upload(pathString: string, options: any, callback?: any): void; | ||
/** | ||
@@ -1598,0 +1598,0 @@ * Iterate over all of a bucket's files, calling `file.makePublic()` (public) |
@@ -17,2 +17,3 @@ /*! | ||
import { ServiceObject } from '@google-cloud/common'; | ||
import { Storage } from '.'; | ||
/** | ||
@@ -34,3 +35,3 @@ * Create a channel object to interact with a Cloud Storage channel. | ||
declare class Channel extends ServiceObject { | ||
constructor(storage: any, id: any, resourceId: any); | ||
constructor(storage: Storage, id: string, resourceId: string); | ||
/** | ||
@@ -68,3 +69,3 @@ * @typedef {array} StopResponse | ||
*/ | ||
stop(callback: any): void; | ||
stop(callback?: any): void; | ||
} | ||
@@ -71,0 +72,0 @@ /** |
@@ -62,2 +62,34 @@ /*! | ||
} | ||
export interface CreateReadStreamOptions { | ||
/** | ||
* The ID of the project which will be billed for the request. | ||
*/ | ||
userProject?: string; | ||
/** | ||
* By default, data integrity is validated with a | ||
* CRC32c checksum. You may use MD5 if preferred, but that hash is not | ||
* supported for composite objects. An error will be raised if MD5 is | ||
* specified but is not available. You may also choose to skip validation | ||
* completely, however this is **not recommended**. | ||
*/ | ||
validation?: 'md5' | 'crc32c' | false | true; | ||
/** | ||
* A byte offset to begin the file's download | ||
* from. Default is 0. NOTE: Byte ranges are inclusive; that is, | ||
* `options.start = 0` and `options.end = 999` represent the first 1000 | ||
* bytes in a file or object. NOTE: when specifying a byte range, data | ||
* integrity is not available. | ||
*/ | ||
start?: number; | ||
/** | ||
* A byte offset to stop reading the file at. | ||
* NOTE: Byte ranges are inclusive; that is, `options.start = 0` and | ||
* `options.end = 999` represent the first 1000 bytes in a file or object. | ||
* NOTE: when specifying a byte range, data integrity is not available. | ||
*/ | ||
end?: number; | ||
} | ||
export interface FileCallback { | ||
(err: Error | null, file?: File | null, apiResponse?: r.Response): void; | ||
} | ||
/** | ||
@@ -144,3 +176,3 @@ * A File object is created from your {@link Bucket} object using | ||
private encryptionKeyInterceptor?; | ||
constructor(bucket: any, name: any, options?: FileOptions); | ||
constructor(bucket: Bucket, name: string, options?: FileOptions); | ||
/** | ||
@@ -270,3 +302,4 @@ * @typedef {array} CopyResponse | ||
*/ | ||
copy(destination: any, options: CopyOptions, callback?: any): void; | ||
copy(destination: string | Bucket | File, callback: FileCallback): any; | ||
copy(destination: string | Bucket | File, options: CopyOptions, callback: FileCallback): any; | ||
/** | ||
@@ -360,3 +393,3 @@ * Create a readable stream to read the contents of the remote file. It can be | ||
*/ | ||
createReadStream(options: any): Duplex; | ||
createReadStream(options?: CreateReadStreamOptions): Duplex; | ||
/** | ||
@@ -438,3 +471,3 @@ * @typedef {array} CreateResumableUploadResponse | ||
*/ | ||
createResumableUpload(options: any, callback: any): void; | ||
createResumableUpload(options: any, callback?: any): void; | ||
/** | ||
@@ -588,3 +621,3 @@ * Create a writable stream to overwrite the contents of the file in your | ||
*/ | ||
createWriteStream(options: any): Duplex; | ||
createWriteStream(options?: any): Duplex; | ||
/** | ||
@@ -692,3 +725,3 @@ * @typedef {array} DeleteFileResponse | ||
*/ | ||
download(options: any, callback: any): void; | ||
download(options?: any, callback?: any): void; | ||
/** | ||
@@ -1356,3 +1389,3 @@ * @typedef {array} FileExistsResponse | ||
*/ | ||
save(data: any, options: any, callback: any): void; | ||
save(data: any, options: any, callback?: any): void; | ||
/** | ||
@@ -1475,3 +1508,3 @@ * @typedef {array} SetFileMetadataResponse | ||
*/ | ||
setUserProject(userProject: any): void; | ||
setUserProject(userProject: string): void; | ||
/** | ||
@@ -1478,0 +1511,0 @@ * This creates a gcs-resumable-upload upload stream. |
@@ -81,3 +81,3 @@ /*! | ||
*/ | ||
getPolicy(options: any, callback: any): void; | ||
getPolicy(options: any, callback?: any): void; | ||
/** | ||
@@ -144,3 +144,3 @@ * @typedef {array} SetPolicyResponse | ||
*/ | ||
setPolicy(policy: any, options: any, callback: any): void; | ||
setPolicy(policy: any, options: any, callback?: any): void; | ||
/** | ||
@@ -212,4 +212,4 @@ * @typedef {array} TestIamPermissionsResponse | ||
*/ | ||
testPermissions(permissions: any, options: any, callback: any): void; | ||
testPermissions(permissions: any, options: any, callback?: any): void; | ||
} | ||
export { Iam }; |
@@ -17,2 +17,3 @@ /*! | ||
import { ServiceObject } from '@google-cloud/common'; | ||
import { Bucket } from './bucket'; | ||
/** | ||
@@ -39,3 +40,3 @@ * A Notification object is created from your {@link Bucket} object using | ||
declare class Notification extends ServiceObject { | ||
constructor(bucket: any, id: any); | ||
constructor(bucket: Bucket, id: string); | ||
/** | ||
@@ -42,0 +43,0 @@ * @typedef {array} DeleteNotificationResponse |
@@ -7,2 +7,8 @@ # Changelog | ||
## v2.0.3 | ||
### Implementation Changes | ||
- Improve TypeScript types ([#381](https://github.com/googleapis/nodejs-storage/pull/381)) | ||
- Make some parameters optional ([#380](https://github.com/googleapis/nodejs-storage/pull/380)) | ||
## v2.0.2 | ||
@@ -9,0 +15,0 @@ |
{ | ||
"name": "@google-cloud/storage", | ||
"description": "Cloud Storage Client Library for Node.js", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
492152
10687