1 | import { ApiError, BodyResponseCallback, DecorateRequestOptions, DeleteCallback, ExistsCallback, GetConfig, MetadataCallback, ServiceObject, SetMetadataResponse } from './nodejs-common/index.js';
|
2 | import { RequestResponse } from './nodejs-common/service-object.js';
|
3 | import * as http from 'http';
|
4 | import { Acl, AclMetadata } from './acl.js';
|
5 | import { Channel } from './channel.js';
|
6 | import { File, FileOptions, CreateResumableUploadOptions, CreateWriteStreamOptions } from './file.js';
|
7 | import { Iam } from './iam.js';
|
8 | import { Notification } from './notification.js';
|
9 | import { Storage, Cors, PreconditionOptions, BucketOptions } from './storage.js';
|
10 | import { GetSignedUrlResponse, GetSignedUrlCallback, SignerGetSignedUrlConfig, URLSigner, Query } from './signer.js';
|
11 | import { Readable } from 'stream';
|
12 | import { CRC32CValidatorGenerator } from './crc32c.js';
|
13 | import { URL } from 'url';
|
14 | import { BaseMetadata, SetMetadataOptions } from './nodejs-common/service-object.js';
|
15 | export type GetFilesResponse = [
|
16 | File[],
|
17 | (GetFilesOptions | {}) & Partial<Pick<GetFilesOptions, 'pageToken'>>,
|
18 | unknown
|
19 | ];
|
20 | export interface GetFilesCallback {
|
21 | (err: Error | null, files?: File[], nextQuery?: {}, apiResponse?: unknown): void;
|
22 | }
|
23 | interface WatchAllOptions {
|
24 | delimiter?: string;
|
25 | maxResults?: number;
|
26 | pageToken?: string;
|
27 | prefix?: string;
|
28 | projection?: string;
|
29 | userProject?: string;
|
30 | versions?: boolean;
|
31 | }
|
32 | export interface AddLifecycleRuleOptions extends PreconditionOptions {
|
33 | append?: boolean;
|
34 | }
|
35 | export interface LifecycleAction {
|
36 | type: 'Delete' | 'SetStorageClass' | 'AbortIncompleteMultipartUpload';
|
37 | storageClass?: string;
|
38 | }
|
39 | export interface LifecycleCondition {
|
40 | age?: number;
|
41 | createdBefore?: Date | string;
|
42 | customTimeBefore?: Date | string;
|
43 | daysSinceCustomTime?: number;
|
44 | daysSinceNoncurrentTime?: number;
|
45 | isLive?: boolean;
|
46 | matchesPrefix?: string[];
|
47 | matchesSuffix?: string[];
|
48 | matchesStorageClass?: string[];
|
49 | noncurrentTimeBefore?: Date | string;
|
50 | numNewerVersions?: number;
|
51 | }
|
52 | export interface LifecycleRule {
|
53 | action: LifecycleAction;
|
54 | condition: LifecycleCondition;
|
55 | }
|
56 | export interface LifecycleCondition {
|
57 | age?: number;
|
58 | createdBefore?: Date | string;
|
59 | customTimeBefore?: Date | string;
|
60 | daysSinceCustomTime?: number;
|
61 | daysSinceNoncurrentTime?: number;
|
62 | isLive?: boolean;
|
63 | matchesPrefix?: string[];
|
64 | matchesSuffix?: string[];
|
65 | matchesStorageClass?: string[];
|
66 | noncurrentTimeBefore?: Date | string;
|
67 | numNewerVersions?: number;
|
68 | }
|
69 | export interface LifecycleRule {
|
70 | action: LifecycleAction;
|
71 | condition: LifecycleCondition;
|
72 | }
|
73 | export interface EnableLoggingOptions extends PreconditionOptions {
|
74 | bucket?: string | Bucket;
|
75 | prefix: string;
|
76 | }
|
77 | export interface GetFilesOptions {
|
78 | autoPaginate?: boolean;
|
79 | delimiter?: string;
|
80 | endOffset?: string;
|
81 | includeFoldersAsPrefixes?: boolean;
|
82 | includeTrailingDelimiter?: boolean;
|
83 | prefix?: string;
|
84 | matchGlob?: string;
|
85 | maxApiCalls?: number;
|
86 | maxResults?: number;
|
87 | pageToken?: string;
|
88 | softDeleted?: boolean;
|
89 | startOffset?: string;
|
90 | userProject?: string;
|
91 | versions?: boolean;
|
92 | fields?: string;
|
93 | }
|
94 | export interface CombineOptions extends PreconditionOptions {
|
95 | kmsKeyName?: string;
|
96 | userProject?: string;
|
97 | }
|
98 | export interface CombineCallback {
|
99 | (err: Error | null, newFile: File | null, apiResponse: unknown): void;
|
100 | }
|
101 | export type CombineResponse = [File, unknown];
|
102 | export interface CreateChannelConfig extends WatchAllOptions {
|
103 | address: string;
|
104 | }
|
105 | export interface CreateChannelOptions {
|
106 | userProject?: string;
|
107 | }
|
108 | export type CreateChannelResponse = [Channel, unknown];
|
109 | export interface CreateChannelCallback {
|
110 | (err: Error | null, channel: Channel | null, apiResponse: unknown): void;
|
111 | }
|
112 | export interface CreateNotificationOptions {
|
113 | customAttributes?: {
|
114 | [key: string]: string;
|
115 | };
|
116 | eventTypes?: string[];
|
117 | objectNamePrefix?: string;
|
118 | payloadFormat?: string;
|
119 | userProject?: string;
|
120 | }
|
121 | export interface CreateNotificationCallback {
|
122 | (err: Error | null, notification: Notification | null, apiResponse: unknown): void;
|
123 | }
|
124 | export type CreateNotificationResponse = [Notification, unknown];
|
125 | export interface DeleteBucketOptions {
|
126 | ignoreNotFound?: boolean;
|
127 | userProject?: string;
|
128 | }
|
129 | export type DeleteBucketResponse = [unknown];
|
130 | export interface DeleteBucketCallback extends DeleteCallback {
|
131 | (err: Error | null, apiResponse: unknown): void;
|
132 | }
|
133 | export interface DeleteFilesOptions extends GetFilesOptions, PreconditionOptions {
|
134 | force?: boolean;
|
135 | }
|
136 | export interface DeleteFilesCallback {
|
137 | (err: Error | Error[] | null, apiResponse?: object): void;
|
138 | }
|
139 | export type DeleteLabelsResponse = [unknown];
|
140 | export type DeleteLabelsCallback = SetLabelsCallback;
|
141 | export type DeleteLabelsOptions = PreconditionOptions;
|
142 | export type DisableRequesterPaysOptions = PreconditionOptions;
|
143 | export type DisableRequesterPaysResponse = [unknown];
|
144 | export interface DisableRequesterPaysCallback {
|
145 | (err?: Error | null, apiResponse?: object): void;
|
146 | }
|
147 | export type EnableRequesterPaysResponse = [unknown];
|
148 | export interface EnableRequesterPaysCallback {
|
149 | (err?: Error | null, apiResponse?: unknown): void;
|
150 | }
|
151 | export type EnableRequesterPaysOptions = PreconditionOptions;
|
152 | export interface BucketExistsOptions extends GetConfig {
|
153 | userProject?: string;
|
154 | }
|
155 | export type BucketExistsResponse = [boolean];
|
156 | export type BucketExistsCallback = ExistsCallback;
|
157 | export interface GetBucketOptions extends GetConfig {
|
158 | userProject?: string;
|
159 | }
|
160 | export type GetBucketResponse = [Bucket, unknown];
|
161 | export interface GetBucketCallback {
|
162 | (err: ApiError | null, bucket: Bucket | null, apiResponse: unknown): void;
|
163 | }
|
164 | export interface GetLabelsOptions {
|
165 | userProject?: string;
|
166 | }
|
167 | export type GetLabelsResponse = [unknown];
|
168 | export interface GetLabelsCallback {
|
169 | (err: Error | null, labels: object | null): void;
|
170 | }
|
171 | export interface BucketMetadata extends BaseMetadata {
|
172 | acl?: AclMetadata[] | null;
|
173 | autoclass?: {
|
174 | enabled?: boolean;
|
175 | toggleTime?: string;
|
176 | terminalStorageClass?: string;
|
177 | terminalStorageClassUpdateTime?: string;
|
178 | };
|
179 | billing?: {
|
180 | requesterPays?: boolean;
|
181 | };
|
182 | cors?: Cors[];
|
183 | customPlacementConfig?: {
|
184 | dataLocations?: string[];
|
185 | };
|
186 | defaultEventBasedHold?: boolean;
|
187 | defaultObjectAcl?: AclMetadata[];
|
188 | encryption?: {
|
189 | defaultKmsKeyName?: string;
|
190 | } | null;
|
191 | hierarchicalNamespace?: {
|
192 | enabled?: boolean;
|
193 | };
|
194 | iamConfiguration?: {
|
195 | publicAccessPrevention?: string;
|
196 | uniformBucketLevelAccess?: {
|
197 | enabled?: boolean;
|
198 | lockedTime?: string;
|
199 | };
|
200 | };
|
201 | labels?: {
|
202 | [key: string]: string | null;
|
203 | };
|
204 | lifecycle?: {
|
205 | rule?: LifecycleRule[];
|
206 | } | null;
|
207 | location?: string;
|
208 | locationType?: string;
|
209 | logging?: {
|
210 | logBucket?: string;
|
211 | logObjectPrefix?: string;
|
212 | };
|
213 | metageneration?: string;
|
214 | name?: string;
|
215 | objectRetention?: {
|
216 | mode?: string;
|
217 | };
|
218 | owner?: {
|
219 | entity?: string;
|
220 | entityId?: string;
|
221 | };
|
222 | projectNumber?: string | number;
|
223 | retentionPolicy?: {
|
224 | effectiveTime?: string;
|
225 | isLocked?: boolean;
|
226 | retentionPeriod?: string | number;
|
227 | } | null;
|
228 | rpo?: string;
|
229 | softDeletePolicy?: {
|
230 | retentionDurationSeconds?: string | number;
|
231 | readonly effectiveTime?: string;
|
232 | };
|
233 | storageClass?: string;
|
234 | timeCreated?: string;
|
235 | updated?: string;
|
236 | versioning?: {
|
237 | enabled?: boolean;
|
238 | };
|
239 | website?: {
|
240 | mainPageSuffix?: string;
|
241 | notFoundPage?: string;
|
242 | };
|
243 | }
|
244 | export type GetBucketMetadataResponse = [BucketMetadata, unknown];
|
245 | export interface GetBucketMetadataCallback {
|
246 | (err: ApiError | null, metadata: BucketMetadata | null, apiResponse: unknown): void;
|
247 | }
|
248 | export interface GetBucketMetadataOptions {
|
249 | userProject?: string;
|
250 | }
|
251 | export interface GetBucketSignedUrlConfig extends Pick<SignerGetSignedUrlConfig, 'host' | 'signingEndpoint'> {
|
252 | action: 'list';
|
253 | version?: 'v2' | 'v4';
|
254 | cname?: string;
|
255 | virtualHostedStyle?: boolean;
|
256 | expires: string | number | Date;
|
257 | extensionHeaders?: http.OutgoingHttpHeaders;
|
258 | queryParams?: Query;
|
259 | }
|
260 | export declare enum BucketActionToHTTPMethod {
|
261 | list = "GET"
|
262 | }
|
263 | export declare enum AvailableServiceObjectMethods {
|
264 | setMetadata = 0,
|
265 | delete = 1
|
266 | }
|
267 | export interface GetNotificationsOptions {
|
268 | userProject?: string;
|
269 | }
|
270 | export interface GetNotificationsCallback {
|
271 | (err: Error | null, notifications: Notification[] | null, apiResponse: unknown): void;
|
272 | }
|
273 | export type GetNotificationsResponse = [Notification[], unknown];
|
274 | export interface MakeBucketPrivateOptions {
|
275 | includeFiles?: boolean;
|
276 | force?: boolean;
|
277 | metadata?: BucketMetadata;
|
278 | userProject?: string;
|
279 | preconditionOpts?: PreconditionOptions;
|
280 | }
|
281 | export type MakeBucketPrivateResponse = [File[]];
|
282 | export interface MakeBucketPrivateCallback {
|
283 | (err?: Error | null, files?: File[]): void;
|
284 | }
|
285 | export interface MakeBucketPublicOptions {
|
286 | includeFiles?: boolean;
|
287 | force?: boolean;
|
288 | }
|
289 | export interface MakeBucketPublicCallback {
|
290 | (err?: Error | null, files?: File[]): void;
|
291 | }
|
292 | export type MakeBucketPublicResponse = [File[]];
|
293 | export interface SetBucketMetadataOptions extends PreconditionOptions {
|
294 | userProject?: string;
|
295 | }
|
296 | export type SetBucketMetadataResponse = [BucketMetadata];
|
297 | export interface SetBucketMetadataCallback {
|
298 | (err?: Error | null, metadata?: BucketMetadata): void;
|
299 | }
|
300 | export interface BucketLockCallback {
|
301 | (err?: Error | null, apiResponse?: unknown): void;
|
302 | }
|
303 | export type BucketLockResponse = [unknown];
|
304 | export interface Labels {
|
305 | [key: string]: string;
|
306 | }
|
307 | export interface SetLabelsOptions extends PreconditionOptions {
|
308 | userProject?: string;
|
309 | }
|
310 | export type SetLabelsResponse = [unknown];
|
311 | export interface SetLabelsCallback {
|
312 | (err?: Error | null, metadata?: unknown): void;
|
313 | }
|
314 | export interface SetBucketStorageClassOptions extends PreconditionOptions {
|
315 | userProject?: string;
|
316 | }
|
317 | export interface SetBucketStorageClassCallback {
|
318 | (err?: Error | null): void;
|
319 | }
|
320 | export type UploadResponse = [File, unknown];
|
321 | export interface UploadCallback {
|
322 | (err: Error | null, file?: File | null, apiResponse?: unknown): void;
|
323 | }
|
324 | export interface UploadOptions extends CreateResumableUploadOptions, CreateWriteStreamOptions {
|
325 | destination?: string | File;
|
326 | encryptionKey?: string | Buffer;
|
327 | kmsKeyName?: string;
|
328 | onUploadProgress?: (progressEvent: any) => void;
|
329 | }
|
330 | export interface MakeAllFilesPublicPrivateOptions {
|
331 | force?: boolean;
|
332 | private?: boolean;
|
333 | public?: boolean;
|
334 | userProject?: string;
|
335 | }
|
336 | interface MakeAllFilesPublicPrivateCallback {
|
337 | (err?: Error | Error[] | null, files?: File[]): void;
|
338 | }
|
339 | type MakeAllFilesPublicPrivateResponse = [File[]];
|
340 | export declare enum BucketExceptionMessages {
|
341 | PROVIDE_SOURCE_FILE = "You must provide at least one source file.",
|
342 | DESTINATION_FILE_NOT_SPECIFIED = "A destination file must be specified.",
|
343 | CHANNEL_ID_REQUIRED = "An ID is required to create a channel.",
|
344 | TOPIC_NAME_REQUIRED = "A valid topic name is required.",
|
345 | CONFIGURATION_OBJECT_PREFIX_REQUIRED = "A configuration object with a prefix is required.",
|
346 | SPECIFY_FILE_NAME = "A file name must be specified.",
|
347 | METAGENERATION_NOT_PROVIDED = "A metageneration must be provided.",
|
348 | SUPPLY_NOTIFICATION_ID = "You must supply a notification ID."
|
349 | }
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 |
|
383 |
|
384 |
|
385 |
|
386 |
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 |
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 |
|
498 |
|
499 |
|
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 |
|
506 |
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
|
523 |
|
524 |
|
525 |
|
526 |
|
527 |
|
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 |
|
565 |
|
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 | declare class Bucket extends ServiceObject<Bucket, BucketMetadata> {
|
628 | name: string;
|
629 | |
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 | storage: Storage;
|
636 | |
637 |
|
638 |
|
639 |
|
640 |
|
641 | userProject?: string;
|
642 | acl: Acl;
|
643 | iam: Iam;
|
644 | crc32cGenerator: CRC32CValidatorGenerator;
|
645 | getFilesStream(query?: GetFilesOptions): Readable;
|
646 | signer?: URLSigner;
|
647 | private instanceRetryValue?;
|
648 | instancePreconditionOpts?: PreconditionOptions;
|
649 | constructor(storage: Storage, name: string, options?: BucketOptions);
|
650 | /**
|
651 | * The bucket's Cloud Storage URI (`gs:
|
652 | *
|
653 | * @example
|
654 | * ```ts
|
655 | * const {Storage} = require('@google-cloud/storage');
|
656 | * const storage = new Storage();
|
657 | * const bucket = storage.bucket('my-bucket');
|
658 | *
|
659 | *
|
660 | * const href = bucket.cloudStorageURI.href;
|
661 | * ```
|
662 | */
|
663 | get cloudStorageURI(): URL;
|
664 | addLifecycleRule(rule: LifecycleRule | LifecycleRule[], options?: AddLifecycleRuleOptions): Promise<SetBucketMetadataResponse>;
|
665 | addLifecycleRule(rule: LifecycleRule | LifecycleRule[], options: AddLifecycleRuleOptions, callback: SetBucketMetadataCallback): void;
|
666 | addLifecycleRule(rule: LifecycleRule | LifecycleRule[], callback: SetBucketMetadataCallback): void;
|
667 | combine(sources: string[] | File[], destination: string | File, options?: CombineOptions): Promise<CombineResponse>;
|
668 | combine(sources: string[] | File[], destination: string | File, options: CombineOptions, callback: CombineCallback): void;
|
669 | combine(sources: string[] | File[], destination: string | File, callback: CombineCallback): void;
|
670 | createChannel(id: string, config: CreateChannelConfig, options?: CreateChannelOptions): Promise<CreateChannelResponse>;
|
671 | createChannel(id: string, config: CreateChannelConfig, callback: CreateChannelCallback): void;
|
672 | createChannel(id: string, config: CreateChannelConfig, options: CreateChannelOptions, callback: CreateChannelCallback): void;
|
673 | createNotification(topic: string, options?: CreateNotificationOptions): Promise<CreateNotificationResponse>;
|
674 | createNotification(topic: string, options: CreateNotificationOptions, callback: CreateNotificationCallback): void;
|
675 | createNotification(topic: string, callback: CreateNotificationCallback): void;
|
676 | deleteFiles(query?: DeleteFilesOptions): Promise<void>;
|
677 | deleteFiles(callback: DeleteFilesCallback): void;
|
678 | deleteFiles(query: DeleteFilesOptions, callback: DeleteFilesCallback): void;
|
679 | deleteLabels(labels?: string | string[]): Promise<DeleteLabelsResponse>;
|
680 | deleteLabels(options: DeleteLabelsOptions): Promise<DeleteLabelsResponse>;
|
681 | deleteLabels(callback: DeleteLabelsCallback): void;
|
682 | deleteLabels(labels: string | string[], options: DeleteLabelsOptions): Promise<DeleteLabelsResponse>;
|
683 | deleteLabels(labels: string | string[], callback: DeleteLabelsCallback): void;
|
684 | deleteLabels(labels: string | string[], options: DeleteLabelsOptions, callback: DeleteLabelsCallback): void;
|
685 | disableRequesterPays(options?: DisableRequesterPaysOptions): Promise<DisableRequesterPaysResponse>;
|
686 | disableRequesterPays(callback: DisableRequesterPaysCallback): void;
|
687 | disableRequesterPays(options: DisableRequesterPaysOptions, callback: DisableRequesterPaysCallback): void;
|
688 | enableLogging(config: EnableLoggingOptions): Promise<SetBucketMetadataResponse>;
|
689 | enableLogging(config: EnableLoggingOptions, callback: SetBucketMetadataCallback): void;
|
690 | enableRequesterPays(options?: EnableRequesterPaysOptions): Promise<EnableRequesterPaysResponse>;
|
691 | enableRequesterPays(callback: EnableRequesterPaysCallback): void;
|
692 | enableRequesterPays(options: EnableRequesterPaysOptions, callback: EnableRequesterPaysCallback): void;
|
693 | |
694 |
|
695 |
|
696 |
|
697 |
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 |
|
708 |
|
709 |
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 |
|
717 |
|
718 |
|
719 | file(name: string, options?: FileOptions): File;
|
720 | getFiles(query?: GetFilesOptions): Promise<GetFilesResponse>;
|
721 | getFiles(query: GetFilesOptions, callback: GetFilesCallback): void;
|
722 | getFiles(callback: GetFilesCallback): void;
|
723 | getLabels(options?: GetLabelsOptions): Promise<GetLabelsResponse>;
|
724 | getLabels(callback: GetLabelsCallback): void;
|
725 | getLabels(options: GetLabelsOptions, callback: GetLabelsCallback): void;
|
726 | getNotifications(options?: GetNotificationsOptions): Promise<GetNotificationsResponse>;
|
727 | getNotifications(callback: GetNotificationsCallback): void;
|
728 | getNotifications(options: GetNotificationsOptions, callback: GetNotificationsCallback): void;
|
729 | getSignedUrl(cfg: GetBucketSignedUrlConfig): Promise<GetSignedUrlResponse>;
|
730 | getSignedUrl(cfg: GetBucketSignedUrlConfig, callback: GetSignedUrlCallback): void;
|
731 | lock(metageneration: number | string): Promise<BucketLockResponse>;
|
732 | lock(metageneration: number | string, callback: BucketLockCallback): void;
|
733 | makePrivate(options?: MakeBucketPrivateOptions): Promise<MakeBucketPrivateResponse>;
|
734 | makePrivate(callback: MakeBucketPrivateCallback): void;
|
735 | makePrivate(options: MakeBucketPrivateOptions, callback: MakeBucketPrivateCallback): void;
|
736 | makePublic(options?: MakeBucketPublicOptions): Promise<MakeBucketPublicResponse>;
|
737 | makePublic(callback: MakeBucketPublicCallback): void;
|
738 | makePublic(options: MakeBucketPublicOptions, callback: MakeBucketPublicCallback): void;
|
739 | |
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 | notification(id: string): Notification;
|
755 | removeRetentionPeriod(options?: SetBucketMetadataOptions): Promise<SetBucketMetadataResponse>;
|
756 | removeRetentionPeriod(callback: SetBucketMetadataCallback): void;
|
757 | removeRetentionPeriod(options: SetBucketMetadataOptions, callback: SetBucketMetadataCallback): void;
|
758 | request(reqOpts: DecorateRequestOptions): Promise<RequestResponse>;
|
759 | request(reqOpts: DecorateRequestOptions, callback: BodyResponseCallback): void;
|
760 | setLabels(labels: Labels, options?: SetLabelsOptions): Promise<SetLabelsResponse>;
|
761 | setLabels(labels: Labels, callback: SetLabelsCallback): void;
|
762 | setLabels(labels: Labels, options: SetLabelsOptions, callback: SetLabelsCallback): void;
|
763 | setMetadata(metadata: BucketMetadata, options?: SetMetadataOptions): Promise<SetMetadataResponse<BucketMetadata>>;
|
764 | setMetadata(metadata: BucketMetadata, callback: MetadataCallback<BucketMetadata>): void;
|
765 | setMetadata(metadata: BucketMetadata, options: SetMetadataOptions, callback: MetadataCallback<BucketMetadata>): void;
|
766 | setRetentionPeriod(duration: number, options?: SetBucketMetadataOptions): Promise<SetBucketMetadataResponse>;
|
767 | setRetentionPeriod(duration: number, callback: SetBucketMetadataCallback): void;
|
768 | setRetentionPeriod(duration: number, options: SetBucketMetadataOptions, callback: SetBucketMetadataCallback): void;
|
769 | setCorsConfiguration(corsConfiguration: Cors[], options?: SetBucketMetadataOptions): Promise<SetBucketMetadataResponse>;
|
770 | setCorsConfiguration(corsConfiguration: Cors[], callback: SetBucketMetadataCallback): void;
|
771 | setCorsConfiguration(corsConfiguration: Cors[], options: SetBucketMetadataOptions, callback: SetBucketMetadataCallback): void;
|
772 | setStorageClass(storageClass: string, options?: SetBucketStorageClassOptions): Promise<SetBucketMetadataResponse>;
|
773 | setStorageClass(storageClass: string, callback: SetBucketStorageClassCallback): void;
|
774 | setStorageClass(storageClass: string, options: SetBucketStorageClassOptions, callback: SetBucketStorageClassCallback): void;
|
775 | |
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 | setUserProject(userProject: string): void;
|
791 | upload(pathString: string, options?: UploadOptions): Promise<UploadResponse>;
|
792 | upload(pathString: string, options: UploadOptions, callback: UploadCallback): void;
|
793 | upload(pathString: string, callback: UploadCallback): void;
|
794 | makeAllFilesPublicPrivate_(options?: MakeAllFilesPublicPrivateOptions): Promise<MakeAllFilesPublicPrivateResponse>;
|
795 | makeAllFilesPublicPrivate_(callback: MakeAllFilesPublicPrivateCallback): void;
|
796 | makeAllFilesPublicPrivate_(options: MakeAllFilesPublicPrivateOptions, callback: MakeAllFilesPublicPrivateCallback): void;
|
797 | getId(): string;
|
798 | disableAutoRetryConditionallyIdempotent_(coreOpts: any, methodType: AvailableServiceObjectMethods, localPreconditionOptions?: PreconditionOptions): void;
|
799 | }
|
800 |
|
801 |
|
802 |
|
803 |
|
804 |
|
805 | export { Bucket };
|
806 |
|
\ | No newline at end of file |