diff --git a/sdk/storage/storage-queue/src/AccountSASPermissions.ts b/sdk/storage/storage-queue/src/AccountSASPermissions.ts index 82bd66ba54e7..3a25106193ae 100644 --- a/sdk/storage/storage-queue/src/AccountSASPermissions.ts +++ b/sdk/storage/storage-queue/src/AccountSASPermissions.ts @@ -4,7 +4,7 @@ * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the * values are set, this should be serialized with toString and set as the permissions field on an - * {@link IAccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but * the order of the permissions is particular and this class guarantees correctness. * * @export @@ -122,7 +122,7 @@ export class AccountSASPermissions { /** * Produces the SAS permissions string for an Azure Storage account. - * Call this method to set IAccountSASSignatureValues Permissions field. + * Call this method to set AccountSASSignatureValues Permissions field. * * Using this method will guarantee the resource types are in * an order accepted by the service. diff --git a/sdk/storage/storage-queue/src/AccountSASResourceTypes.ts b/sdk/storage/storage-queue/src/AccountSASResourceTypes.ts index 4c2f35bb256d..d98715edbbdf 100644 --- a/sdk/storage/storage-queue/src/AccountSASResourceTypes.ts +++ b/sdk/storage/storage-queue/src/AccountSASResourceTypes.ts @@ -4,7 +4,7 @@ * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the * values are set, this should be serialized with toString and set as the resources field on an - * {@link IAccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but * the order of the resources is particular and this class guarantees correctness. * * @export diff --git a/sdk/storage/storage-queue/src/AccountSASServices.ts b/sdk/storage/storage-queue/src/AccountSASServices.ts index 60d43e0a2db8..1dc9f5e974ac 100644 --- a/sdk/storage/storage-queue/src/AccountSASServices.ts +++ b/sdk/storage/storage-queue/src/AccountSASServices.ts @@ -4,7 +4,7 @@ * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value * to true means that any SAS which uses these permissions will grant access to that service. Once all the * values are set, this should be serialized with toString and set as the services field on an - * {@link IAccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but * the order of the services is particular and this class guarantees correctness. * * @export diff --git a/sdk/storage/storage-queue/src/IAccountSASSignatureValues.ts b/sdk/storage/storage-queue/src/AccountSASSignatureValues.ts similarity index 85% rename from sdk/storage/storage-queue/src/IAccountSASSignatureValues.ts rename to sdk/storage/storage-queue/src/AccountSASSignatureValues.ts index c93a6c567e3a..fa8279412458 100644 --- a/sdk/storage/storage-queue/src/IAccountSASSignatureValues.ts +++ b/sdk/storage/storage-queue/src/AccountSASSignatureValues.ts @@ -2,7 +2,7 @@ import { AccountSASPermissions } from "./AccountSASPermissions"; import { AccountSASResourceTypes } from "./AccountSASResourceTypes"; import { AccountSASServices } from "./AccountSASServices"; import { SharedKeyCredential } from "./credentials/SharedKeyCredential"; -import { IIPRange, ipRangeToString } from "./IIPRange"; +import { IPRange, ipRangeToString } from "./IPRange"; import { SASProtocol, SASQueryParameters } from "./SASQueryParameters"; import { SERVICE_VERSION } from "./utils/constants"; import { truncatedISO8061Date } from "./utils/utils.common"; @@ -10,7 +10,7 @@ import { truncatedISO8061Date } from "./utils/utils.common"; /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * IAccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once + * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once * all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS * which can actually be applied to queue urls. Note: that both this class and {@link SASQueryParameters} exist because * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST @@ -23,14 +23,14 @@ import { truncatedISO8061Date } from "./utils/utils.common"; * for descriptions of the parameters, including which are required * * @export - * @class IAccountSASSignatureValues + * @class AccountSASSignatureValues */ -export interface IAccountSASSignatureValues { +export interface AccountSASSignatureValues { /** * If not provided, this defaults to the service version targeted by this version of the library. * * @type {string} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ version?: string; @@ -38,7 +38,7 @@ export interface IAccountSASSignatureValues { * Optional. SAS protocols allowed. * * @type {SASProtocol} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ protocol?: SASProtocol; @@ -46,7 +46,7 @@ export interface IAccountSASSignatureValues { * Optional. When the SAS will take effect. * * @type {Date} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ startTime?: Date; @@ -54,7 +54,7 @@ export interface IAccountSASSignatureValues { * The time after which the SAS will no longer work. * * @type {Date} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ expiryTime: Date; @@ -63,24 +63,24 @@ export interface IAccountSASSignatureValues { * constructing the permissions string. * * @type {string} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ permissions: string; /** * Optional. IP range allowed. * - * @type {IIPRange} - * @memberof IAccountSASSignatureValues + * @type {IPRange} + * @memberof AccountSASSignatureValues */ - ipRange?: IIPRange; + ipRange?: IPRange; /** * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to * construct this value. * * @type {string} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ services: string; @@ -89,7 +89,7 @@ export interface IAccountSASSignatureValues { * to {@link AccountSASResourceTypes} to construct this value. * * @type {string} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ resourceTypes: string; } @@ -104,10 +104,10 @@ export interface IAccountSASSignatureValues { * * @param {SharedKeyCredential} sharedKeyCredential * @returns {SASQueryParameters} - * @memberof IAccountSASSignatureValues + * @memberof AccountSASSignatureValues */ export function generateAccountSASQueryParameters( - accountSASSignatureValues: IAccountSASSignatureValues, + accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: SharedKeyCredential ): SASQueryParameters { const version = accountSASSignatureValues.version diff --git a/sdk/storage/storage-queue/src/IIPRange.ts b/sdk/storage/storage-queue/src/IPRange.ts similarity index 81% rename from sdk/storage/storage-queue/src/IIPRange.ts rename to sdk/storage/storage-queue/src/IPRange.ts index aa15037871e6..0386f2db7bd8 100644 --- a/sdk/storage/storage-queue/src/IIPRange.ts +++ b/sdk/storage/storage-queue/src/IPRange.ts @@ -2,9 +2,9 @@ * Allowed IP range for a SAS. * * @export - * @interface IIPRange + * @interface IPRange */ -export interface IIPRange { +export interface IPRange { /** * Starting IP address in the IP range. * If end IP doesn't provide, start IP will the only IP allowed. @@ -29,9 +29,9 @@ export interface IIPRange { * "8.8.8.8" or "1.1.1.1-255.255.255.255" * * @export - * @param {IIPRange} ipRange + * @param {IPRange} ipRange * @returns {string} */ -export function ipRangeToString(ipRange: IIPRange): string { +export function ipRangeToString(ipRange: IPRange): string { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } diff --git a/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts b/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts index d6f1057480b4..60862297ad05 100644 --- a/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/LoggingPolicyFactory.ts @@ -6,14 +6,14 @@ import { LoggingPolicy } from "./policies/LoggingPolicy"; * RequestLogOptions configures the retry policy's behavior. * * @export - * @interface IRequestLogOptions + * @interface RequestLogOptions */ -export interface IRequestLogOptions { +export interface RequestLogOptions { /** * LogWarningIfTryOverThreshold logs a warning if a tried operation takes longer than the specified * duration in ms. Default is 3000ms. * @type {number} - * @memberof IRequestLogOptions + * @memberof RequestLogOptions */ logWarningIfTryOverThreshold: number; } @@ -26,9 +26,9 @@ export interface IRequestLogOptions { * @implements {RequestPolicyFactory} */ export class LoggingPolicyFactory implements RequestPolicyFactory { - private readonly loggingOptions?: IRequestLogOptions; + private readonly loggingOptions?: RequestLogOptions; - constructor(loggingOptions?: IRequestLogOptions) { + constructor(loggingOptions?: RequestLogOptions) { this.loggingOptions = loggingOptions; } diff --git a/sdk/storage/storage-queue/src/Pipeline.ts b/sdk/storage/storage-queue/src/Pipeline.ts index 8e116c127c55..fd22548ccf99 100644 --- a/sdk/storage/storage-queue/src/Pipeline.ts +++ b/sdk/storage/storage-queue/src/Pipeline.ts @@ -33,9 +33,9 @@ export { * Option interface for Pipeline constructor. * * @export - * @interface IPipelineOptions + * @interface PipelineOptions */ -export interface IPipelineOptions { +export interface PipelineOptions { logger?: IHttpPipelineLogger; HTTPClient?: IHttpClient; } @@ -52,16 +52,16 @@ export interface IPipelineOptions { */ export class Pipeline { public readonly factories: RequestPolicyFactory[]; - public readonly options: IPipelineOptions; + public readonly options: PipelineOptions; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * * @param {RequestPolicyFactory[]} factories - * @param {IPipelineOptions} [options={}] + * @param {PipelineOptions} [options={}] * @memberof Pipeline */ - constructor(factories: RequestPolicyFactory[], options: IPipelineOptions = {}) { + constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) { this.factories = factories; this.options = options; } diff --git a/sdk/storage/storage-queue/src/QueueClient.ts b/sdk/storage/storage-queue/src/QueueClient.ts index 7c1bd1904291..36f1707ff80d 100644 --- a/sdk/storage/storage-queue/src/QueueClient.ts +++ b/sdk/storage/storage-queue/src/QueueClient.ts @@ -2,17 +2,17 @@ import { HttpResponse } from "@azure/ms-rest-js"; import * as Models from "./generated/lib/models"; import { Aborter } from "./Aborter"; import { Queue } from "./generated/lib/operations"; -import { IMetadata } from "./models"; +import { Metadata } from "./models"; import { Pipeline } from "./Pipeline"; import { QueueServiceClient } from "./QueueServiceClient"; import { StorageClient } from "./StorageClient"; import { appendToURLPath, truncatedISO8061Date } from "./utils/utils.common"; -export interface IQueueCreateOptions { - metadata?: IMetadata; +export interface QueueCreateOptions { + metadata?: Metadata; } -export interface ISignedIdentifier { +export interface SignedIdentifier { /** * @member {string} id a unique id */ @@ -38,7 +38,7 @@ export interface ISignedIdentifier { } export declare type QueueGetAccessPolicyResponse = { - signedIdentifiers: ISignedIdentifier[]; + signedIdentifiers: SignedIdentifier[]; } & Models.QueueGetAccessPolicyHeaders & { /** * The underlying HTTP response. @@ -124,13 +124,13 @@ export class QueueClient extends StorageClient { * * @param {Aborter} aborter Create a new Aborter instance with Aborter.none or Aborter.timeout(), * goto documents of Aborter for more examples about request cancellation - * @param {IQueueCreateOptions} [options] + * @param {QueueCreateOptions} [options] * @returns {Promise} * @memberof QueueURL */ public async create( aborter: Aborter, - options: IQueueCreateOptions = {} + options: QueueCreateOptions = {} ): Promise { return this.queueContext.create({ ...options, @@ -178,13 +178,13 @@ export class QueueClient extends StorageClient { * * @param {Aborter} aborter Create a new Aborter instance with Aborter.none or Aborter.timeout(), * goto documents of Aborter for more examples about request cancellation - * @param {IMetadata} [metadata] If no metadata provided, all existing metadata will be removed. + * @param {Metadata} [metadata] If no metadata provided, all existing metadata will be removed. * @returns {Promise} * @memberof QueueURL */ public async setMetadata( aborter: Aborter, - metadata?: IMetadata + metadata?: Metadata ): Promise { return this.queueContext.setMetadata({ abortSignal: aborter, @@ -202,7 +202,7 @@ export class QueueClient extends StorageClient { * * @param {Aborter} aborter Create a new Aborter instance with Aborter.none or Aborter.timeout(), * goto documents of Aborter for more examples about request cancellation - * @param {IQueueGetAccessPolicyOptions} [options] + * @param {QueueGetAccessPolicyOptions} [options] * @returns {Promise} * @memberof QueueURL */ @@ -241,14 +241,14 @@ export class QueueClient extends StorageClient { * @param {Aborter} aborter Create a new Aborter instance with Aborter.none or Aborter.timeout(), * goto documents of Aborter for more examples about request cancellation * @param {PublicAccessType} [access] - * @param {ISignedIdentifier[]} [queueAcl] - * @param {IQueueSetAccessPolicyOptions} [options] + * @param {SignedIdentifier[]} [queueAcl] + * @param {QueueSetAccessPolicyOptions} [options] * @returns {Promise} * @memberof QueueURL */ public async setAccessPolicy( aborter: Aborter, - queueAcl?: ISignedIdentifier[] + queueAcl?: SignedIdentifier[] ): Promise { const acl: Models.SignedIdentifier[] = []; for (const identifier of queueAcl || []) { diff --git a/sdk/storage/storage-queue/src/QueueSASPermissions.ts b/sdk/storage/storage-queue/src/QueueSASPermissions.ts index faaa5e30a6fe..1dabf4124e1e 100644 --- a/sdk/storage/storage-queue/src/QueueSASPermissions.ts +++ b/sdk/storage/storage-queue/src/QueueSASPermissions.ts @@ -4,7 +4,7 @@ * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a Queue. Setting * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all * the values are set, this should be serialized with toString and set as the permissions field on a - * {@link IQueueSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * {@link QueueSASSignatureValues} object. It is possible to construct the permissions string without this class, but * the order of the permissions is particular and this class guarantees correctness. * * @export diff --git a/sdk/storage/storage-queue/src/IQueueSASSignatureValues.ts b/sdk/storage/storage-queue/src/QueueSASSignatureValues.ts similarity index 85% rename from sdk/storage/storage-queue/src/IQueueSASSignatureValues.ts rename to sdk/storage/storage-queue/src/QueueSASSignatureValues.ts index f96df7a36393..0414f566dba7 100644 --- a/sdk/storage/storage-queue/src/IQueueSASSignatureValues.ts +++ b/sdk/storage/storage-queue/src/QueueSASSignatureValues.ts @@ -1,6 +1,6 @@ import { QueueSASPermissions } from "./QueueSASPermissions"; import { SharedKeyCredential } from "./credentials/SharedKeyCredential"; -import { IIPRange, ipRangeToString } from "./IIPRange"; +import { IPRange, ipRangeToString } from "./IPRange"; import { SASProtocol } from "./SASQueryParameters"; import { SASQueryParameters } from "./SASQueryParameters"; import { SERVICE_VERSION } from "./utils/constants"; @@ -9,18 +9,18 @@ import { truncatedISO8061Date } from "./utils/utils.common"; /** * ONLY AVAILABLE IN NODE.JS RUNTIME. * - * IQueueSASSignatureValues is used to help generating Queue service SAS tokens for queues. + * QueueSASSignatureValues is used to help generating Queue service SAS tokens for queues. * * @export - * @class IQueueSASSignatureValues + * @class QueueSASSignatureValues */ -export interface IQueueSASSignatureValues { +export interface QueueSASSignatureValues { /** * The version of the service this SAS will target. If not specified, it will default to the version targeted by the * library. * * @type {string} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ version?: string; @@ -28,7 +28,7 @@ export interface IQueueSASSignatureValues { * Optional. SAS protocols, HTTPS only or HTTPSandHTTP * * @type {SASProtocol} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ protocol?: SASProtocol; @@ -36,7 +36,7 @@ export interface IQueueSASSignatureValues { * Optional. When the SAS will take effect. * * @type {Date} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ startTime?: Date; @@ -44,7 +44,7 @@ export interface IQueueSASSignatureValues { * Optional only when identifier is provided. The time after which the SAS will no longer work. * * @type {Date} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ expiryTime?: Date; @@ -54,23 +54,23 @@ export interface IQueueSASSignatureValues { * being accessed for help constructing the permissions string. * * @type {string} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ permissions?: string; /** * Optional. IP ranges allowed in this SAS. * - * @type {IIPRange} - * @memberof IQueueSASSignatureValues + * @type {IPRange} + * @memberof QueueSASSignatureValues */ - ipRange?: IIPRange; + ipRange?: IPRange; /** * The name of the queue the SAS user may access. * * @type {string} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ queueName: string; @@ -80,7 +80,7 @@ export interface IQueueSASSignatureValues { * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy * * @type {string} - * @memberof IQueueSASSignatureValues + * @memberof QueueSASSignatureValues */ identifier?: string; } @@ -98,12 +98,12 @@ export interface IQueueSASSignatureValues { * this constructor. * * @export - * @param {IQueueSASSignatureValues} queueSASSignatureValues + * @param {QueueSASSignatureValues} queueSASSignatureValues * @param {SharedKeyCredential} sharedKeyCredential * @returns {SASQueryParameters} */ export function generateQueueSASQueryParameters( - queueSASSignatureValues: IQueueSASSignatureValues, + queueSASSignatureValues: QueueSASSignatureValues, sharedKeyCredential: SharedKeyCredential ): SASQueryParameters { if ( diff --git a/sdk/storage/storage-queue/src/QueueServiceClient.ts b/sdk/storage/storage-queue/src/QueueServiceClient.ts index df636c5b9b55..8b5b184c112e 100644 --- a/sdk/storage/storage-queue/src/QueueServiceClient.ts +++ b/sdk/storage/storage-queue/src/QueueServiceClient.ts @@ -5,7 +5,7 @@ import { Service } from "./generated/lib/operations"; import { Pipeline } from "./Pipeline"; import { StorageClient } from "./StorageClient"; -export interface IServiceListQueuesSegmentOptions { +export interface ServiceListQueuesSegmentOptions { /** * @member {string} [prefix] Filters the results to return only queues * whose name begins with the specified prefix. @@ -139,14 +139,14 @@ export class QueueServiceClient extends StorageClient { * with the current page. The NextMarker value can be used as the value for * the marker parameter in a subsequent call to request the next page of list * items. The marker value is opaque to the client. - * @param {IServiceListQueuesSegmentOptions} [options] + * @param {ServiceListQueuesSegmentOptions} [options] * @returns {Promise} * @memberof QueueServiceClient */ public async listQueuesSegment( aborter: Aborter, marker?: string, - options: IServiceListQueuesSegmentOptions = {} + options: ServiceListQueuesSegmentOptions = {} ): Promise { return this.serviceContext.listQueuesSegment({ abortSignal: aborter, diff --git a/sdk/storage/storage-queue/src/RetryPolicyFactory.ts b/sdk/storage/storage-queue/src/RetryPolicyFactory.ts index 670a370b41ac..3d29ac8867bc 100644 --- a/sdk/storage/storage-queue/src/RetryPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/RetryPolicyFactory.ts @@ -6,9 +6,9 @@ import { RetryPolicy, RetryPolicyType } from "./policies/RetryPolicy"; * Retry options interface. * * @export - * @interface IRetryOptions + * @interface RetryOptions */ -export interface IRetryOptions { +export interface RetryOptions { /** * Optional. RetryPolicyType, default is exponential retry policy. * @@ -23,7 +23,7 @@ export interface IRetryOptions { * A value smaller than 1 means default retry number of attempts. * * @type {number} - * @memberof IRetryOptions + * @memberof RetryOptions */ readonly maxTries?: number; @@ -34,7 +34,7 @@ export interface IRetryOptions { * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations * * @type {number} - * @memberof IRetryOptions + * @memberof RetryOptions */ readonly tryTimeoutInMs?: number; @@ -44,7 +44,7 @@ export interface IRetryOptions { * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs. * * @type {number} - * @memberof IRetryOptions + * @memberof RetryOptions */ readonly retryDelayInMs?: number; @@ -53,7 +53,7 @@ export interface IRetryOptions { * If you specify 0, then you must also specify 0 for retryDelayInMs. * * @type {number} - * @memberof IRetryOptions + * @memberof RetryOptions */ readonly maxRetryDelayInMs?: number; @@ -66,7 +66,7 @@ export interface IRetryOptions { * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs} * * @type {string} - * @memberof IRetryOptions + * @memberof RetryOptions */ readonly secondaryHost?: string; } @@ -79,14 +79,14 @@ export interface IRetryOptions { * @implements {RequestPolicyFactory} */ export class RetryPolicyFactory implements RequestPolicyFactory { - private retryOptions?: IRetryOptions; + private retryOptions?: RetryOptions; /** * Creates an instance of RetryPolicyFactory. - * @param {IRetryOptions} [retryOptions] + * @param {RetryOptions} [retryOptions] * @memberof RetryPolicyFactory */ - constructor(retryOptions?: IRetryOptions) { + constructor(retryOptions?: RetryOptions) { this.retryOptions = retryOptions; } diff --git a/sdk/storage/storage-queue/src/SASQueryParameters.ts b/sdk/storage/storage-queue/src/SASQueryParameters.ts index 8a747c24ae42..38cfd1b6f499 100644 --- a/sdk/storage/storage-queue/src/SASQueryParameters.ts +++ b/sdk/storage/storage-queue/src/SASQueryParameters.ts @@ -1,4 +1,4 @@ -import { IIPRange, ipRangeToString } from "./IIPRange"; +import { IPRange, ipRangeToString } from "./IPRange"; import { truncatedISO8061Date } from "./utils/utils.common"; /** @@ -21,7 +21,7 @@ export enum SASProtocol { /** * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link IAccountSASSignatureValues} and {@link IQueueSASSignatureValues} + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link QueueSASSignatureValues} * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should * be taken here in case there are existing query parameters, which might affect the appropriate means of appending * these query parameters). @@ -92,7 +92,7 @@ export class SASQueryParameters { public readonly resourceTypes?: string; /** - * Optional. The signed identifier (only for {@link IQueueSASSignatureValues}). + * Optional. The signed identifier (only for {@link QueueSASSignatureValues}). * * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy * @@ -102,7 +102,7 @@ export class SASQueryParameters { public readonly identifier?: string; /** - * Optional. The storage queue (only for {@link IQueueSASSignatureValues}). + * Optional. The storage queue (only for {@link QueueSASSignatureValues}). * * @type {string} * @memberof SASQueryParameters @@ -121,19 +121,19 @@ export class SASQueryParameters { * Inner value of getter ipRange. * * @private - * @type {IIPRange} + * @type {IPRange} * @memberof SASQueryParameters */ - private readonly ipRangeInner?: IIPRange; + private readonly ipRangeInner?: IPRange; /** * Optional. IP range allowed for this SAS. * * @readonly - * @type {(IIPRange | undefined)} + * @type {(IPRange | undefined)} * @memberof SASQueryParameters */ - public get ipRange(): IIPRange | undefined { + public get ipRange(): IPRange | undefined { if (this.ipRangeInner) { return { end: this.ipRangeInner.end, @@ -154,7 +154,7 @@ export class SASQueryParameters { * @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s) * @param {Date} [startTime] Representing the start time for this SAS token * @param {Date} [expiryTime] Representing the expiry time for this SAS token - * @param {IIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token + * @param {IPRange} [ipRange] Representing the range of valid IP addresses for this SAS token * @param {string} [identifier] Representing the signed identifier (only for Service SAS) * @param {string} [resource] Representing the storage queue (only for Service SAS) * @memberof SASQueryParameters @@ -168,7 +168,7 @@ export class SASQueryParameters { protocol?: SASProtocol, startTime?: Date, expiryTime?: Date, - ipRange?: IIPRange, + ipRange?: IPRange, identifier?: string, resource?: string ) { diff --git a/sdk/storage/storage-queue/src/StorageClient.ts b/sdk/storage/storage-queue/src/StorageClient.ts index 6af5f149bfdf..5efc34b484b0 100644 --- a/sdk/storage/storage-queue/src/StorageClient.ts +++ b/sdk/storage/storage-queue/src/StorageClient.ts @@ -5,8 +5,8 @@ import { Credential } from "./credentials/Credential"; import { StorageClientContext } from "./generated/lib/storageClientContext"; import { LoggingPolicyFactory } from "./LoggingPolicyFactory"; import { IHttpClient, IHttpPipelineLogger, Pipeline } from "./Pipeline"; -import { IRetryOptions, RetryPolicyFactory } from "./RetryPolicyFactory"; -import { ITelemetryOptions, TelemetryPolicyFactory } from "./TelemetryPolicyFactory"; +import { RetryOptions, RetryPolicyFactory } from "./RetryPolicyFactory"; +import { TelemetryOptions, TelemetryPolicyFactory } from "./TelemetryPolicyFactory"; import { UniqueRequestIDPolicyFactory } from "./UniqueRequestIDPolicyFactory"; export { deserializationPolicy }; @@ -15,17 +15,17 @@ export { deserializationPolicy }; * Option interface for Pipeline.newPipeline method. * * @export - * @interface INewPipelineOptions + * @interface NewPipelineOptions */ -export interface INewPipelineOptions { +export interface NewPipelineOptions { /** * Telemetry configures the built-in telemetry policy behavior. * - * @type {ITelemetryOptions} - * @memberof INewPipelineOptions + * @type {TelemetryOptions} + * @memberof NewPipelineOptions */ - telemetry?: ITelemetryOptions; - retryOptions?: IRetryOptions; + telemetry?: TelemetryOptions; + retryOptions?: RetryOptions; logger?: IHttpPipelineLogger; httpClient?: IHttpClient; @@ -43,13 +43,13 @@ export abstract class StorageClient { * * @static * @param {Credential} credential Such as AnonymousCredential, SharedKeyCredential or TokenCredential. - * @param {INewPipelineOptions} [pipelineOptions] Optional. Options. + * @param {NewPipelineOptions} [pipelineOptions] Optional. Options. * @returns {Pipeline} A new Pipeline object. * @memberof Pipeline */ public static newPipeline( credential: Credential, - pipelineOptions: INewPipelineOptions = {} + pipelineOptions: NewPipelineOptions = {} ): Pipeline { // Order is important. Closer to the API at the top & closer to the network at the bottom. // The credential's policy factory must appear close to the wire so it can sign any diff --git a/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts b/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts index a75dad719028..28acfba15f2b 100644 --- a/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts +++ b/sdk/storage/storage-queue/src/TelemetryPolicyFactory.ts @@ -13,9 +13,9 @@ import { SDK_VERSION } from "./utils/constants"; * Interface of TelemetryPolicy options. * * @export - * @interface ITelemetryOptions + * @interface TelemetryOptions */ -export interface ITelemetryOptions { +export interface TelemetryOptions { value: string; } @@ -31,10 +31,10 @@ export class TelemetryPolicyFactory implements RequestPolicyFactory { /** * Creates an instance of TelemetryPolicyFactory. - * @param {ITelemetryOptions} [telemetry] + * @param {TelemetryOptions} [telemetry] * @memberof TelemetryPolicyFactory */ - constructor(telemetry?: ITelemetryOptions) { + constructor(telemetry?: TelemetryOptions) { const userAgentInfo: string[] = []; if (isNode) { diff --git a/sdk/storage/storage-queue/src/index.browser.ts b/sdk/storage/storage-queue/src/index.browser.ts index 3ed516df1d8b..d79ce2fc1508 100644 --- a/sdk/storage/storage-queue/src/index.browser.ts +++ b/sdk/storage/storage-queue/src/index.browser.ts @@ -6,7 +6,7 @@ export * from "./Aborter"; export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; export * from "./credentials/TokenCredential"; -export { IIPRange } from "./IIPRange"; +export { IPRange } from "./IPRange"; export * from "./MessageIdClient"; export * from "./MessagesClient"; export * from "./Pipeline"; diff --git a/sdk/storage/storage-queue/src/index.ts b/sdk/storage/storage-queue/src/index.ts index cb5d3a0c7cca..e1f59140b7e9 100644 --- a/sdk/storage/storage-queue/src/index.ts +++ b/sdk/storage/storage-queue/src/index.ts @@ -6,12 +6,12 @@ export * from "./Aborter"; export * from "./AccountSASPermissions"; export * from "./AccountSASResourceTypes"; export * from "./AccountSASServices"; -export * from "./IAccountSASSignatureValues"; +export * from "./AccountSASSignatureValues"; export * from "./credentials/AnonymousCredential"; export * from "./credentials/Credential"; export * from "./credentials/SharedKeyCredential"; export * from "./credentials/TokenCredential"; -export { IIPRange } from "./IIPRange"; +export { IPRange } from "./IPRange"; export * from "./MessageIdClient"; export * from "./MessagesClient"; export * from "./Pipeline"; @@ -24,7 +24,7 @@ export * from "./TelemetryPolicyFactory"; export * from "./policies/TokenCredentialPolicy"; export * from "./QueueClient"; export * from "./QueueSASPermissions"; -export * from "./IQueueSASSignatureValues"; +export * from "./QueueSASSignatureValues"; export * from "./UniqueRequestIDPolicyFactory"; export * from "./QueueServiceClient"; export * from "./StorageClient"; diff --git a/sdk/storage/storage-queue/src/models.ts b/sdk/storage/storage-queue/src/models.ts index 38beb06f8eb2..9ef7cda44ddd 100644 --- a/sdk/storage/storage-queue/src/models.ts +++ b/sdk/storage/storage-queue/src/models.ts @@ -1,3 +1,3 @@ -export interface IMetadata { +export interface Metadata { [propertyName: string]: string; } diff --git a/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts b/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts index 0d1fa108a316..ca9ad64099d7 100644 --- a/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/LoggingPolicy.ts @@ -7,12 +7,12 @@ import { WebResource } from "@azure/ms-rest-js"; -import { IRequestLogOptions } from "../LoggingPolicyFactory"; +import { RequestLogOptions } from "../LoggingPolicyFactory"; import { HTTPURLConnection, URLConstants } from "../utils/constants"; import { getURLParameter, setURLParameter } from "../utils/utils.common"; -// Default values of IRetryOptions -const DEFAULT_REQUEST_LOG_OPTIONS: IRequestLogOptions = { +// Default values of RetryOptions +const DEFAULT_REQUEST_LOG_OPTIONS: RequestLogOptions = { logWarningIfTryOverThreshold: 3000 }; @@ -27,19 +27,19 @@ export class LoggingPolicy extends BaseRequestPolicy { private operationStartTime: Date = new Date(); private requestStartTime: Date = new Date(); - private readonly loggingOptions: IRequestLogOptions; + private readonly loggingOptions: RequestLogOptions; /** * Creates an instance of LoggingPolicy. * @param {RequestPolicy} nextPolicy * @param {RequestPolicyOptions} options - * @param {IRequestLogOptions} [loggingOptions=DEFAULT_REQUEST_LOG_OPTIONS] + * @param {RequestLogOptions} [loggingOptions=DEFAULT_REQUEST_LOG_OPTIONS] * @memberof LoggingPolicy */ constructor( nextPolicy: RequestPolicy, options: RequestPolicyOptions, - loggingOptions: IRequestLogOptions = DEFAULT_REQUEST_LOG_OPTIONS + loggingOptions: RequestLogOptions = DEFAULT_REQUEST_LOG_OPTIONS ) { super(nextPolicy, options); this.loggingOptions = loggingOptions; diff --git a/sdk/storage/storage-queue/src/policies/RetryPolicy.ts b/sdk/storage/storage-queue/src/policies/RetryPolicy.ts index 771ff296038d..b59b08839e8c 100644 --- a/sdk/storage/storage-queue/src/policies/RetryPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/RetryPolicy.ts @@ -10,7 +10,7 @@ import { WebResource } from "@azure/ms-rest-js"; -import { IRetryOptions } from "../RetryPolicyFactory"; +import { RetryOptions } from "../RetryPolicyFactory"; import { URLConstants } from "../utils/constants"; import { setURLHost, setURLParameter } from "../utils/utils.common"; @@ -18,10 +18,10 @@ import { setURLHost, setURLParameter } from "../utils/utils.common"; * A factory method used to generated a RetryPolicy factory. * * @export - * @param {IRetryOptions} retryOptions + * @param {RetryOptions} retryOptions * @returns */ -export function NewRetryPolicyFactory(retryOptions?: IRetryOptions): RequestPolicyFactory { +export function NewRetryPolicyFactory(retryOptions?: RetryOptions): RequestPolicyFactory { return { create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions): RetryPolicy => { return new RetryPolicy(nextPolicy, options, retryOptions); @@ -46,8 +46,8 @@ export enum RetryPolicyType { FIXED } -// Default values of IRetryOptions -const DEFAULT_RETRY_OPTIONS: IRetryOptions = { +// Default values of RetryOptions +const DEFAULT_RETRY_OPTIONS: RetryOptions = { maxRetryDelayInMs: 120 * 1000, maxTries: 4, retryDelayInMs: 4 * 1000, @@ -67,23 +67,23 @@ export class RetryPolicy extends BaseRequestPolicy { * RetryOptions. * * @private - * @type {IRetryOptions} + * @type {RetryOptions} * @memberof RetryPolicy */ - private readonly retryOptions: IRetryOptions; + private readonly retryOptions: RetryOptions; /** * Creates an instance of RetryPolicy. * * @param {RequestPolicy} nextPolicy * @param {RequestPolicyOptions} options - * @param {IRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS] + * @param {RetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS] * @memberof RetryPolicy */ constructor( nextPolicy: RequestPolicy, options: RequestPolicyOptions, - retryOptions: IRetryOptions = DEFAULT_RETRY_OPTIONS + retryOptions: RetryOptions = DEFAULT_RETRY_OPTIONS ) { super(nextPolicy, options); diff --git a/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts b/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts index cedefe68fde4..2d324245209d 100644 --- a/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts +++ b/sdk/storage/storage-queue/src/policies/TelemetryPolicy.ts @@ -29,7 +29,7 @@ export class TelemetryPolicy extends BaseRequestPolicy { * Creates an instance of TelemetryPolicy. * @param {RequestPolicy} nextPolicy * @param {RequestPolicyOptions} options - * @param {ITelemetryOptions} [telemetry] + * @param {TelemetryOptions} [telemetry] * @memberof TelemetryPolicy */ constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, telemetry: string) { diff --git a/sdk/storage/storage-queue/test/utils/InjectorPolicy.ts b/sdk/storage/storage-queue/test/utils/InjectorPolicy.ts index 3d41732dcddb..735225b3334c 100644 --- a/sdk/storage/storage-queue/test/utils/InjectorPolicy.ts +++ b/sdk/storage/storage-queue/test/utils/InjectorPolicy.ts @@ -7,7 +7,7 @@ import { RestError } from "../../src"; -export interface INextInjectErrorHolder { +export interface NextInjectErrorHolder { nextInjectError?: RestError; } diff --git a/sdk/storage/storage-queue/tslint.json b/sdk/storage/storage-queue/tslint.json index ae2eb09109a7..498d029bd134 100644 --- a/sdk/storage/storage-queue/tslint.json +++ b/sdk/storage/storage-queue/tslint.json @@ -4,7 +4,8 @@ "jsRules": {}, "rules": { "trailing-comma": false, - "arrow-parens": false + "arrow-parens": false, + "interface-name": [true, "never-prefix"] }, "rulesDirectory": [], "linterOptions": {