Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage] Follow TSDoc #13863

Merged
merged 2 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions sdk/storage/storage-blob-changefeed/src/AvroReaderFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import { AvroReadable, AvroReader } from "../../storage-internal-avro/src";

/**
* Creates AvroReaders. Allows us to inject mock AvroReaders in the Chunk unit tests.
*
* @export
* @class AvroReaderFactory
*/
export class AvroReaderFactory {
public create(headerAndDataStream: AvroReadable): AvroReader;
Expand Down
33 changes: 6 additions & 27 deletions sdk/storage/storage-blob-changefeed/src/BlobChangeFeedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,15 @@ import { TokenCredential } from "@azure/core-http";

/**
* Contains paged response data for the {@link BlobChangeFeedClient.listChanges} operation.
*
* @export
* @class BlobChangeFeedEventPage
*/
export class BlobChangeFeedEventPage {
/**
* Array of {@link BlobChangeFeedEvent}.
*
* @type {BlobChangeFeedEvent[]}
* @memberof BlobChangeFeedEventPage
*/
public events: BlobChangeFeedEvent[];

/**
* The token that keeps track of where to continue the iterator.
*
* @type {string}
* @memberof BlobChangeFeedEventPage
*/
public continuationToken: string;

Expand All @@ -48,8 +39,7 @@ export class BlobChangeFeedEventPage {
/**
* Creates a new Pipeline object with Credential provided.
*
* @export
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
* @param pipelineOptions - Optional. Options.
* @returns A new Pipeline object.
*/
Expand Down Expand Up @@ -80,17 +70,10 @@ function appendUserAgentPrefix(options?: StoragePipelineOptions): StoragePipelin
/**
* BlobChangeFeedClient.
* @see https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal
*
* @export
* @class BlobChangeFeedClient
*/
export class BlobChangeFeedClient {
/**
* blobServiceClient provided by @azure/storage-blob package.
*
* @private
* @type {BlobServiceClient}
* @memberof BlobChangeFeedClient
* blobServiceClient provided by `@azure/storage-blob` package.
*/
private blobServiceClient: BlobServiceClient;
private changeFeedFactory: ChangeFeedFactory;
Expand All @@ -106,7 +89,6 @@ export class BlobChangeFeedClient {
* SAS connection string example -
* `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param options - Optional. Options to configure the HTTP pipeline.
* @memberof BlobChangeFeedClient
*/
public static fromConnectionString(
connectionString: string,
Expand All @@ -126,9 +108,8 @@ export class BlobChangeFeedClient {
* @param url - A Client string pointing to Azure Storage blob service, such as
* "https://myaccount.blob.core.windows.net". You can append a SAS
* if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
* @param options - Optional. Options to configure the HTTP pipeline.
* @memberof BlobChangeFeedClient
*
* Example using DefaultAzureCredential from `@azure/identity`:
*
Expand Down Expand Up @@ -169,7 +150,6 @@ export class BlobChangeFeedClient {
* if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
* @param pipeline - Call newPipeline() to create a default
* pipeline, or provide a customized pipeline.
* @memberof BlobChangeFeedClient
*/
constructor(url: string, pipeline: Pipeline);
constructor(
Expand Down Expand Up @@ -324,27 +304,26 @@ export class BlobChangeFeedClient {
*
* @param options - Options to list change feed events.
* @returns An asyncIterableIterator that supports paging.
* @memberof BlobChangeFeedClient
*/
public listChanges(
options: BlobChangeFeedListChangesOptions = {}
): PagedAsyncIterableIterator<BlobChangeFeedEvent, BlobChangeFeedEventPage> {
const iter = this.getChange(options);
return {
/**
* @member {Promise} [next] The next method, part of the iteration protocol
* The next method, part of the iteration protocol
*/
async next() {
return iter.next();
},
/**
* @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings: PageSettings = {}) => {
return this.getPage(settings.continuationToken, settings.maxPageSize, options);
Expand Down
10 changes: 0 additions & 10 deletions sdk/storage/storage-blob-changefeed/src/ChangeFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,18 @@ import { CanonicalCode } from "@opentelemetry/api";

/**
* Options to configure {@link ChangeFeed.getChange} operation.
*
* @export
* @interface ChangeFeedGetChangeOptions
*/
export interface ChangeFeedGetChangeOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof ChangeFeedGetChangeOptions
*/
abortSignal?: AbortSignalLike;
}

export class ChangeFeed {
/**
* BlobContainerClient for making List Blob requests and creating Segments.
*
* @private
* @type {ContainerClient}
* @memberof ChangeFeed
*/
private readonly containerClient?: ContainerClient;

Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/storage-blob-changefeed/src/Chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,11 @@ import { AvroParseOptions } from "../../storage-internal-avro/src/AvroReader";

/**
* Options to configure {@link Chunk.getChange} operation.
*
* @export
* @interface ChunkGetChangeOptions
*/
export interface ChunkGetChangeOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof ChunkGetChangeOptions
*/
abortSignal?: AbortSignalLike;
}
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/storage-blob-changefeed/src/ChunkFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ import { CHANGE_FEED_CHUNK_BLOCK_DOWNLOAD_SIZE } from "./utils/constants";

/**
* Options to configure {@link ChunkFactory.create} operation.
*
* @export
* @interface CreateChunkOptions
*/
export interface CreateChunkOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof CreateChunkOptions
*/
abortSignal?: AbortSignalLike;
}
Expand Down
19 changes: 0 additions & 19 deletions sdk/storage/storage-blob-changefeed/src/LazyLoadingBlobStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export interface LazyLoadingBlobStreamOptions extends ReadableOptions, CommonOpt
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof LazyLoadingBlobStreamOptions
*/
abortSignal?: AbortSignalLike;
}
Expand All @@ -25,35 +22,21 @@ interface LazyLoadingBlobStreamDownloadBlockOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof LazyLoadingBlobStreamDownloadBlockOptions
*/
abortSignal?: AbortSignalLike;
}

/**
* This class generates a readable stream from a blobClient's data.
*
* @export
* @class LazyLoadingBlobStream
*/
export class LazyLoadingBlobStream extends Readable {
/**
* BlobClient to make download calls with.
*
* @private
* @type {BlobClient}
* @memberof LazyLoadingBlobStream
*/
private readonly blobClient: BlobClient;

/**
* The offset within the blob of the next block we will download.
*
* @private
* @type {number}
* @memberof LazyLoadingBlobStream
*/
private offset: number;

Expand All @@ -71,7 +54,6 @@ export class LazyLoadingBlobStream extends Readable {
* Creates an instance of LazyLoadingBlobStream.
*
* @param byteLength - The total length of data contained in the buffers
* @memberof LazyLoadingBlobStream
*/
constructor(
blobClient: BlobClient,
Expand Down Expand Up @@ -130,7 +112,6 @@ export class LazyLoadingBlobStream extends Readable {
* Internal _read() that will be called when the stream wants to pull more data in.
*
* @param size - Optional. The size of data to be read
* @memberof LazyLoadingBlobStream
*/
public async _read(size?: number) {
const { span, spanOptions } = createSpan(
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/storage-blob-changefeed/src/Segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@ import { CanonicalCode } from "@opentelemetry/api";

/**
* Options to configure {@link Segment.getChange} operation.
*
* @export
* @interface SegmentGetChangeOptions
*/
export interface SegmentGetChangeOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof SegmentGetChangeOptions
*/
abortSignal?: AbortSignalLike;
}
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/storage-blob-changefeed/src/SegmentFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@ export interface SegmentManifest {

/**
* Options to configure {@link SegmentFactory.create} operation.
*
* @export
* @interface CreateSegmentOptions
*/
export interface CreateSegmentOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof CreateSegmentOptions
*/
abortSignal?: AbortSignalLike;
}
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/storage-blob-changefeed/src/Shard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ import { CanonicalCode } from "@opentelemetry/api";

/**
* Options to configure {@link Shard.getChange} operation.
*
* @export
* @interface ShardGetChangeOptions
*/
export interface ShardGetChangeOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof ShardGetChangeOptions
*/
abortSignal?: AbortSignalLike;
}
Expand Down
6 changes: 0 additions & 6 deletions sdk/storage/storage-blob-changefeed/src/ShardFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ import { createSpan } from "./utils/tracing";

/**
* Options to configure {@link ShardFactory.create} operation.
*
* @export
* @interface CreateShardOptions
*/
export interface CreateShardOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the &commat;azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof CreateShardOptions
*/
abortSignal?: AbortSignalLike;
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob-changefeed/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import { createClientLogger } from "@azure/logger";

/**
* The @azure/logger configuration for this package.
* The `@azure/logger` configuration for this package.
*/
export const logger = createClientLogger("storage-blob-changefeed");
Loading