@azure/storage-blob 12.12.0-beta.1 → 12.12.0

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.
@@ -3,6 +3,7 @@
3
3
  import { AbortSignalLike } from '@azure/abort-controller';
4
4
  import { AzureLogger } from '@azure/logger';
5
5
  import { BaseRequestPolicy } from '@azure/core-http';
6
+ import { CancelOnProgress } from '@azure/core-lro';
6
7
  import * as coreHttp from '@azure/core-http';
7
8
  import { deserializationPolicy } from '@azure/core-http';
8
9
  import { HttpHeaders } from '@azure/core-http';
@@ -1625,7 +1626,7 @@ export declare class BlobClient extends StorageClient {
1625
1626
  * @param copySource - url to the source Azure Blob/File.
1626
1627
  * @param options - Optional options to the Blob Start Copy From URL operation.
1627
1628
  */
1628
- beginCopyFromURL(copySource: string, options?: BlobBeginCopyFromURLOptions): Promise<PollerLike<PollOperationState<BlobBeginCopyFromURLResponse>, BlobBeginCopyFromURLResponse>>;
1629
+ beginCopyFromURL(copySource: string, options?: BlobBeginCopyFromURLOptions): Promise<PollerLikeWithCancellation<PollOperationState<BlobBeginCopyFromURLResponse>, BlobBeginCopyFromURLResponse>>;
1629
1630
  /**
1630
1631
  * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero
1631
1632
  * length and full metadata. Version 2012-02-12 and newer.
@@ -8429,6 +8430,66 @@ export declare interface PipelineOptions {
8429
8430
 
8430
8431
  export { PollerLike }
8431
8432
 
8433
+ /**
8434
+ * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.
8435
+ */
8436
+ export declare interface PollerLikeWithCancellation<TState extends PollOperationState<TResult>, TResult> {
8437
+ /**
8438
+ * Returns a promise that will resolve once a single polling request finishes.
8439
+ * It does this by calling the update method of the Poller's operation.
8440
+ */
8441
+ poll(options?: {
8442
+ abortSignal?: AbortSignalLike;
8443
+ }): Promise<void>;
8444
+ /**
8445
+ * Returns a promise that will resolve once the underlying operation is completed.
8446
+ */
8447
+ pollUntilDone(): Promise<TResult>;
8448
+ /**
8449
+ * Invokes the provided callback after each polling is completed,
8450
+ * sending the current state of the poller's operation.
8451
+ *
8452
+ * It returns a method that can be used to stop receiving updates on the given callback function.
8453
+ */
8454
+ onProgress(callback: (state: TState) => void): CancelOnProgress;
8455
+ /**
8456
+ * Returns true if the poller has finished polling.
8457
+ */
8458
+ isDone(): boolean;
8459
+ /**
8460
+ * Stops the poller. After this, no manual or automated requests can be sent.
8461
+ */
8462
+ stopPolling(): void;
8463
+ /**
8464
+ * Returns true if the poller is stopped.
8465
+ */
8466
+ isStopped(): boolean;
8467
+ /**
8468
+ * Attempts to cancel the underlying operation.
8469
+ */
8470
+ cancelOperation(options?: {
8471
+ abortSignal?: AbortSignalLike;
8472
+ }): Promise<void>;
8473
+ /**
8474
+ * Returns the state of the operation.
8475
+ * The TState defined in PollerLike can be a subset of the TState defined in
8476
+ * the Poller implementation.
8477
+ */
8478
+ getOperationState(): TState;
8479
+ /**
8480
+ * Returns the result value of the operation,
8481
+ * regardless of the state of the poller.
8482
+ * It can return undefined or an incomplete form of the final TResult value
8483
+ * depending on the implementation.
8484
+ */
8485
+ getResult(): TResult | undefined;
8486
+ /**
8487
+ * Returns a serialized version of the poller's operation
8488
+ * by invoking the operation's toString method.
8489
+ */
8490
+ toString(): string;
8491
+ }
8492
+
8432
8493
  export { PollOperationState }
8433
8494
 
8434
8495
  /**