Skip to content
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
4 changes: 2 additions & 2 deletions sdk/storage/storage-queue/src/AccountSASPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-queue/src/AccountSASResourceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-queue/src/AccountSASServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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";

/**
* 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
Expand All @@ -23,38 +23,38 @@ 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;

/**
* Optional. SAS protocols allowed.
*
* @type {SASProtocol}
* @memberof IAccountSASSignatureValues
* @memberof AccountSASSignatureValues
*/
protocol?: SASProtocol;

/**
* Optional. When the SAS will take effect.
*
* @type {Date}
* @memberof IAccountSASSignatureValues
* @memberof AccountSASSignatureValues
*/
startTime?: Date;

/**
* The time after which the SAS will no longer work.
*
* @type {Date}
* @memberof IAccountSASSignatureValues
* @memberof AccountSASSignatureValues
*/
expiryTime: Date;

Expand All @@ -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;

Expand All @@ -89,7 +89,7 @@ export interface IAccountSASSignatureValues {
* to {@link AccountSASResourceTypes} to construct this value.
*
* @type {string}
* @memberof IAccountSASSignatureValues
* @memberof AccountSASSignatureValues
*/
resourceTypes: string;
}
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}
10 changes: 5 additions & 5 deletions sdk/storage/storage-queue/src/LoggingPolicyFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down
10 changes: 5 additions & 5 deletions sdk/storage/storage-queue/src/Pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
26 changes: 13 additions & 13 deletions sdk/storage/storage-queue/src/QueueClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -38,7 +38,7 @@ export interface ISignedIdentifier {
}

export declare type QueueGetAccessPolicyResponse = {
signedIdentifiers: ISignedIdentifier[];
signedIdentifiers: SignedIdentifier[];
} & Models.QueueGetAccessPolicyHeaders & {
/**
* The underlying HTTP response.
Expand Down Expand Up @@ -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<Models.QueueCreateResponse>}
* @memberof QueueURL
*/
public async create(
aborter: Aborter,
options: IQueueCreateOptions = {}
options: QueueCreateOptions = {}
): Promise<Models.QueueCreateResponse> {
return this.queueContext.create({
...options,
Expand Down Expand Up @@ -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<Models.QueueSetMetadataResponse>}
* @memberof QueueURL
*/
public async setMetadata(
aborter: Aborter,
metadata?: IMetadata
metadata?: Metadata
): Promise<Models.QueueSetMetadataResponse> {
return this.queueContext.setMetadata({
abortSignal: aborter,
Expand All @@ -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<QueueGetAccessPolicyResponse>}
* @memberof QueueURL
*/
Expand Down Expand Up @@ -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<Models.QueueSetAccessPolicyResponse>}
* @memberof QueueURL
*/
public async setAccessPolicy(
aborter: Aborter,
queueAcl?: ISignedIdentifier[]
queueAcl?: SignedIdentifier[]
): Promise<Models.QueueSetAccessPolicyResponse> {
const acl: Models.SignedIdentifier[] = [];
for (const identifier of queueAcl || []) {
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-queue/src/QueueSASPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading