From 4d58b112e5128a5e48651f2a72d95542954ae826 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 20 Dec 2021 16:18:19 -0800 Subject: [PATCH] Fix use of hidden tag in Event Hubs packages (#19477) --- .../event-hubs/src/diagnostics/instrumentEventData.ts | 2 +- sdk/eventhub/event-hubs/src/eventData.ts | 8 ++++---- sdk/eventhub/event-hubs/src/eventHubReceiver.ts | 10 ---------- sdk/eventhub/event-hubs/src/eventHubSender.ts | 7 ------- sdk/eventhub/event-hubs/src/impl/awaitableQueue.ts | 2 +- sdk/eventhub/event-hubs/src/linkEntity.ts | 6 +----- .../loadBalancerStrategies/loadBalancingStrategy.ts | 1 - sdk/eventhub/event-hubs/src/log.ts | 2 +- sdk/eventhub/event-hubs/src/managementClient.ts | 4 ---- sdk/eventhub/event-hubs/src/pumpManager.ts | 8 -------- sdk/eventhub/event-hubs/src/util/constants.ts | 2 +- .../src/blobCheckpointStore.ts | 1 - .../src/tableCheckpointStore.ts | 1 - 13 files changed, 9 insertions(+), 45 deletions(-) diff --git a/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts b/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts index a3e9aa48cb26..040c4906e543 100644 --- a/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts +++ b/sdk/eventhub/event-hubs/src/diagnostics/instrumentEventData.ts @@ -13,7 +13,7 @@ import { SpanContext } from "@azure/core-tracing"; import { createMessageSpan } from "./tracing"; /** - * @hidden + * @internal */ export const TRACEPARENT_PROPERTY = "Diagnostic-Id"; diff --git a/sdk/eventhub/event-hubs/src/eventData.ts b/sdk/eventhub/event-hubs/src/eventData.ts index fa7ed8420b30..2031335ae00e 100644 --- a/sdk/eventhub/event-hubs/src/eventData.ts +++ b/sdk/eventhub/event-hubs/src/eventData.ts @@ -8,7 +8,7 @@ import { isDefined, isObjectWithProperties, objectHasProperty } from "./util/typ /** * Describes the delivery annotations. - * @hidden + * @internal */ export interface EventHubDeliveryAnnotations extends DeliveryAnnotations { /** @@ -35,7 +35,7 @@ export interface EventHubDeliveryAnnotations extends DeliveryAnnotations { /** * Map containing message attributes that will be held in the message header. - * @hidden + * @internal */ export interface EventHubMessageAnnotations extends MessageAnnotations { /** @@ -62,7 +62,7 @@ export interface EventHubMessageAnnotations extends MessageAnnotations { /** * Describes the structure of an event to be sent or received from the EventHub. - * @hidden + * @internal */ export interface EventDataInternal { /** @@ -157,7 +157,7 @@ const messagePropertiesMap = { * Converts the AMQP message to an EventData. * @param msg - The AMQP message that needs to be converted to EventData. * @param skipParsingBodyAsJson - Boolean to skip running JSON.parse() on message body when body type is `content`. - * @hidden + * @internal */ export function fromRheaMessage( msg: RheaMessage, diff --git a/sdk/eventhub/event-hubs/src/eventHubReceiver.ts b/sdk/eventhub/event-hubs/src/eventHubReceiver.ts index cfd6b4565877..14d6d86a253e 100644 --- a/sdk/eventhub/event-hubs/src/eventHubReceiver.ts +++ b/sdk/eventhub/event-hubs/src/eventHubReceiver.ts @@ -27,9 +27,6 @@ import { EventHubConsumerOptions } from "./models/private"; import { LinkEntity } from "./linkEntity"; import { getRetryAttemptTimeoutInMs } from "./util/retries"; -/** - * @hidden - */ interface CreateReceiverOptions { onMessage: OnAmqpEvent; onError: OnAmqpEvent; @@ -190,7 +187,6 @@ export class EventHubReceiver extends LinkEntity { /** * Instantiates a receiver that can be used to receive events over an AMQP receiver link in * either batching or streaming mode. - * @hidden * @param context - The connection context corresponding to the EventHubClient instance * @param consumerGroup - The consumer group from which the receiver should receive events from. * @param partitionId - The Partition ID from which to receive. @@ -373,7 +369,6 @@ export class EventHubReceiver extends LinkEntity { /** * Clears the user-provided handlers and updates the receiving messages flag. - * @hidden */ clearHandlers(): void { if (this._abortSignal && this._onAbort) { @@ -390,7 +385,6 @@ export class EventHubReceiver extends LinkEntity { /** * Closes the underlying AMQP receiver. - * @hidden */ async close(): Promise { try { @@ -415,7 +409,6 @@ export class EventHubReceiver extends LinkEntity { /** * Determines whether the AMQP receiver link is open. If open then returns true else returns false. - * @hidden * @returns boolean */ isOpen(): boolean { @@ -433,7 +426,6 @@ export class EventHubReceiver extends LinkEntity { /** * Registers the user's onMessage and onError handlers. * Sends buffered events from the queue before adding additional credits to the AMQP link. - * @hidden */ registerHandlers( onMessage: OnMessage, @@ -552,7 +544,6 @@ export class EventHubReceiver extends LinkEntity { /** * Creates a new AMQP receiver under a new AMQP session. - * @hidden */ async initialize({ abortSignal, @@ -626,7 +617,6 @@ export class EventHubReceiver extends LinkEntity { /** * Creates the options that need to be specified while creating an AMQP receiver link. - * @hidden */ private _createReceiverOptions(options: CreateReceiverOptions): RheaReceiverOptions { const rcvrOptions: RheaReceiverOptions = { diff --git a/sdk/eventhub/event-hubs/src/eventHubSender.ts b/sdk/eventhub/event-hubs/src/eventHubSender.ts index 56a3eeba9d3a..0e35016899f0 100644 --- a/sdk/eventhub/event-hubs/src/eventHubSender.ts +++ b/sdk/eventhub/event-hubs/src/eventHubSender.ts @@ -71,7 +71,6 @@ export class EventHubSender extends LinkEntity { /** * Creates a new EventHubSender instance. - * @hidden * @param context - The connection context. * @param partitionId - The EventHub partition id to which the sender * wants to send the event data. @@ -163,7 +162,6 @@ export class EventHubSender extends LinkEntity { /** * Deletes the sender from the context. Clears the token renewal timer. Closes the sender link. - * @hidden * @returns Promise */ async close(): Promise { @@ -188,7 +186,6 @@ export class EventHubSender extends LinkEntity { /** * Determines whether the AMQP sender link is open. If open then returns true else returns false. - * @hidden * @returns boolean */ isOpen(): boolean { @@ -224,7 +221,6 @@ export class EventHubSender extends LinkEntity { * Send a batch of EventData to the EventHub. The "message_annotations", * "application_properties" and "properties" of the first message will be set as that * of the envelope (batch message). - * @hidden * @param events - An array of EventData objects to be sent in a Batch message. * @param options - Options to control the way the events are batched along with request options */ @@ -323,7 +319,6 @@ export class EventHubSender extends LinkEntity { * * We have implemented a synchronous send over here in the sense that we shall be waiting * for the message to be accepted or rejected and accordingly resolve or reject the promise. - * @hidden * @param rheaMessage - The message to be sent to EventHub. * @returns Promise */ @@ -497,7 +492,6 @@ export class EventHubSender extends LinkEntity { /** * Initializes the sender session on the connection. * Should only be called from _createLinkIfNotOpen - * @hidden */ private async _init( options: AwaitableSenderOptions & { @@ -562,7 +556,6 @@ export class EventHubSender extends LinkEntity { /** * Creates a new sender to the given event hub, and optionally to a given partition if it is * not present in the context or returns the one present in the context. - * @hidden * @param partitionId - Partition ID to which it will send event data. */ static create(context: ConnectionContext, partitionId?: string): EventHubSender { diff --git a/sdk/eventhub/event-hubs/src/impl/awaitableQueue.ts b/sdk/eventhub/event-hubs/src/impl/awaitableQueue.ts index e4c8a0a6363b..5900f8b034a9 100644 --- a/sdk/eventhub/event-hubs/src/impl/awaitableQueue.ts +++ b/sdk/eventhub/event-hubs/src/impl/awaitableQueue.ts @@ -7,7 +7,7 @@ * This differs from ordinary Queues in that `shift` returns a Promise for a value. * This allows a consumer of the queue to request an item that the queue does not yet have. * - * @hidden + * @internal */ export class AwaitableQueue { private readonly _items: T[]; diff --git a/sdk/eventhub/event-hubs/src/linkEntity.ts b/sdk/eventhub/event-hubs/src/linkEntity.ts index 183260e6cce3..c40eeb5bdbe4 100644 --- a/sdk/eventhub/event-hubs/src/linkEntity.ts +++ b/sdk/eventhub/event-hubs/src/linkEntity.ts @@ -11,7 +11,7 @@ import { logger } from "./log"; import { v4 as uuid } from "uuid"; /** - * @hidden + * @internal */ export interface LinkEntityOptions { /** @@ -95,7 +95,6 @@ export class LinkEntity { protected _tokenTimeoutInMs?: number; /** * Creates a new LinkEntity instance. - * @hidden * @param context - The connection context. * @param options - Options that can be provided while creating the LinkEntity. */ @@ -110,7 +109,6 @@ export class LinkEntity { /** * Negotiates cbs claim for the LinkEntity. - * @hidden * @returns Promise */ protected async _negotiateClaim({ @@ -213,7 +211,6 @@ export class LinkEntity { /** * Ensures that the token is renewed within the predefined renewal margin. - * @hidden */ protected _ensureTokenRenewal(): void { if (!this._tokenTimeoutInMs) { @@ -257,7 +254,6 @@ export class LinkEntity { /** * Closes the Sender|Receiver link and it's underlying session and also removes it from the * internal map. - * @hidden * @param link - The Sender or Receiver link that needs to be closed and * removed. */ diff --git a/sdk/eventhub/event-hubs/src/loadBalancerStrategies/loadBalancingStrategy.ts b/sdk/eventhub/event-hubs/src/loadBalancerStrategies/loadBalancingStrategy.ts index 729e13e80c71..871ffa978b9e 100644 --- a/sdk/eventhub/event-hubs/src/loadBalancerStrategies/loadBalancingStrategy.ts +++ b/sdk/eventhub/event-hubs/src/loadBalancerStrategies/loadBalancingStrategy.ts @@ -58,7 +58,6 @@ interface EventProcessorCounts { * * @param partitionOwnershipMap - The existing PartitionOwnerships mapped by partition. * @param expirationIntervalInMs - The length of time a PartitionOwnership claim is valid. - * @hidden */ function getActivePartitionOwnerships( partitionOwnershipMap: Map, diff --git a/sdk/eventhub/event-hubs/src/log.ts b/sdk/eventhub/event-hubs/src/log.ts index ca8142903f03..0c4ac10ee758 100644 --- a/sdk/eventhub/event-hubs/src/log.ts +++ b/sdk/eventhub/event-hubs/src/log.ts @@ -13,7 +13,7 @@ export const logger = createClientLogger("event-hubs"); /** * Logs the error's stack trace to "verbose" if a stack trace is available. * @param error - Error containing a stack trace. - * @hidden + * @internal */ export function logErrorStackTrace(error: unknown): void { if (isObjectWithProperties(error, ["stack"]) && error.stack) { diff --git a/sdk/eventhub/event-hubs/src/managementClient.ts b/sdk/eventhub/event-hubs/src/managementClient.ts index b27eef60ad8e..c26e31a053b6 100644 --- a/sdk/eventhub/event-hubs/src/managementClient.ts +++ b/sdk/eventhub/event-hubs/src/managementClient.ts @@ -117,7 +117,6 @@ export class ManagementClient extends LinkEntity { /** * Instantiates the management client. - * @hidden * @param context - The connection context. * @param address - The address for the management endpoint. For IotHub it will be * `/messages/events/$management`. @@ -155,7 +154,6 @@ export class ManagementClient extends LinkEntity { /** * Provides the eventhub runtime information. - * @hidden */ async getEventHubProperties( options: OperationOptions & { retryOptions?: RetryOptions } = {} @@ -211,7 +209,6 @@ export class ManagementClient extends LinkEntity { /** * Provides information about the specified partition. - * @hidden * @param partitionId - Partition ID for which partition information is required. */ async getPartitionProperties( @@ -285,7 +282,6 @@ export class ManagementClient extends LinkEntity { /** * Closes the AMQP management session to the Event Hub for this client, * returning a promise that will be resolved when disconnection is completed. - * @hidden */ async close(): Promise { try { diff --git a/sdk/eventhub/event-hubs/src/pumpManager.ts b/sdk/eventhub/event-hubs/src/pumpManager.ts index d64c14f7b311..0585e4c9a272 100644 --- a/sdk/eventhub/event-hubs/src/pumpManager.ts +++ b/sdk/eventhub/event-hubs/src/pumpManager.ts @@ -48,7 +48,6 @@ export interface PumpManager { * The PumpManager handles the creation and removal of PartitionPumps. * It also starts a PartitionPump when it is created, and stops a * PartitionPump when it is removed. - * @hidden * @internal */ export class PumpManagerImpl implements PumpManager { @@ -58,9 +57,6 @@ export class PumpManagerImpl implements PumpManager { [partitionId: string]: PartitionPump | undefined; } = {}; - /** - * @hidden - */ constructor(eventProcessorName: string, eventProcessorOptions: CommonEventProcessorOptions) { this._eventProcessorName = eventProcessorName; this._options = eventProcessorOptions; @@ -68,7 +64,6 @@ export class PumpManagerImpl implements PumpManager { /** * Returns a list of partitionIds that are actively receiving messages. - * @hidden */ public receivingFromPartitions(): string[] { return Object.keys(this._partitionIdToPumps).filter((id) => { @@ -91,7 +86,6 @@ export class PumpManagerImpl implements PumpManager { * @param startPosition - The position in the partition to start reading from. * @param connectionContext - The ConnectionContext to forward to the PartitionPump. * @param partitionProcessor - The PartitionProcessor to forward to the PartitionPump. - * @hidden */ public async createPump( startPosition: EventPosition, @@ -147,7 +141,6 @@ export class PumpManagerImpl implements PumpManager { * Stop a PartitionPump and removes it from the internal map. * @param partitionId - The partitionId to remove the associated PartitionPump from. * @param reason - The reason for removing the pump. - * @hidden */ public async removePump(partitionId: string, reason: CloseReason): Promise { try { @@ -172,7 +165,6 @@ export class PumpManagerImpl implements PumpManager { /** * Stops all PartitionPumps and removes them from the internal map. * @param reason - The reason for removing the pump. - * @hidden */ public async removeAllPumps(reason: CloseReason): Promise { const partitionIds = Object.keys(this._partitionIdToPumps); diff --git a/sdk/eventhub/event-hubs/src/util/constants.ts b/sdk/eventhub/event-hubs/src/util/constants.ts index 9d077b36eab9..fbc1dd786221 100644 --- a/sdk/eventhub/event-hubs/src/util/constants.ts +++ b/sdk/eventhub/event-hubs/src/util/constants.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. /** - * @hidden + * @internal */ export const packageJsonInfo = { name: "@azure/event-hubs", diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/src/blobCheckpointStore.ts b/sdk/eventhub/eventhubs-checkpointstore-blob/src/blobCheckpointStore.ts index 114854dfd57f..0fd1a6d434b8 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/src/blobCheckpointStore.ts +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/src/blobCheckpointStore.ts @@ -342,7 +342,6 @@ type CheckpointMetadata = { }; /** - * @hidden * @internal */ export function parseIntOrThrow( diff --git a/sdk/eventhub/eventhubs-checkpointstore-table/src/tableCheckpointStore.ts b/sdk/eventhub/eventhubs-checkpointstore-table/src/tableCheckpointStore.ts index ddbbf5a6bcb4..df267e58b80d 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-table/src/tableCheckpointStore.ts +++ b/sdk/eventhub/eventhubs-checkpointstore-table/src/tableCheckpointStore.ts @@ -38,7 +38,6 @@ export interface CheckpointEntity { /** * An ownership entity of type PartitionOwnership to be stored in the table * @internal - * @hidden */ export interface PartitionOwnershipEntity { /**