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
2 changes: 1 addition & 1 deletion sdk/storage/storage-file/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
2 changes: 1 addition & 1 deletion sdk/storage/storage-file/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-file/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 file 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
40 changes: 20 additions & 20 deletions sdk/storage/storage-file/src/DirectoryClient.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { Aborter } from "./Aborter";
import * as Models from "./generated/lib/models";
import { Directory } from "./generated/lib/operations";
import { IMetadata } from "./models";
import { Metadata } from "./models";
import { Pipeline } from "./Pipeline";
import { ShareClient } from "./ShareClient";
import { StorageClient } from "./StorageClient";
import { appendToURLPath } from "./utils/utils.common";

export interface IDirectoryCreateOptions {
export interface DirectoryCreateOptions {
abortSignal?: Aborter;
/**
* A name-value pair
* to associate with a file storage object.
*
* @type {IMetadata}
* @memberof IDirectoryCreateOptions
* @type {Metadata}
* @memberof DirectoryCreateOptions
*/
metadata?: IMetadata;
metadata?: Metadata;
}

export interface IDirectoryListFilesAndDirectoriesSegmentOptions {
export interface DirectoryListFilesAndDirectoriesSegmentOptions {
abortSignal?: Aborter;
/**
* Filters the results to return only entries whose
* name begins with the specified prefix.
*
* @type {string}
* @memberof IDirectoryListFilesAndDirectoriesSegmentOptions
* @memberof DirectoryListFilesAndDirectoriesSegmentOptions
*/
prefix?: string;

Expand All @@ -36,20 +36,20 @@ export interface IDirectoryListFilesAndDirectoriesSegmentOptions {
* greater than 5,000, the server will return up to 5,000 items.
*
* @type {number}
* @memberof IDirectoryListFilesAndDirectoriesSegmentOptions
* @memberof DirectoryListFilesAndDirectoriesSegmentOptions
*/
maxresults?: number;
}

export interface IDirectoryDeleteOptions {
export interface DirectoryDeleteOptions {
abortSignal?: Aborter;
}

export interface IDirectoryGetPropertiesOptions {
export interface DirectoryGetPropertiesOptions {
abortSignal?: Aborter;
}

export interface IDirectorySetMetadataOptions {
export interface DirectorySetMetadataOptions {
abortSignal?: Aborter;
}

Expand Down Expand Up @@ -135,12 +135,12 @@ export class DirectoryClient extends StorageClient {
* Creates a new directory under the specified share or parent directory.
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
*
* @param {IDirectoryCreateOptions} [options]
* @param {DirectoryCreateOptions} [options]
* @returns {Promise<Models.DirectoryCreateResponse>}
* @memberof DirectoryClient
*/
public async create(
options: IDirectoryCreateOptions = {}
options: DirectoryCreateOptions = {}
): Promise<Models.DirectoryCreateResponse> {
const aborter = options.abortSignal || Aborter.none;
return this.context.create({
Expand All @@ -159,7 +159,7 @@ export class DirectoryClient extends StorageClient {
* @memberof DirectoryClient
*/
public async getProperties(
options: IDirectoryGetPropertiesOptions = {}
options: DirectoryGetPropertiesOptions = {}
): Promise<Models.DirectoryGetPropertiesResponse> {
const aborter = options.abortSignal || Aborter.none;
return this.context.getProperties({
Expand All @@ -176,7 +176,7 @@ export class DirectoryClient extends StorageClient {
* @memberof DirectoryClient
*/
public async delete(
options: IDirectoryDeleteOptions = {}
options: DirectoryDeleteOptions = {}
): Promise<Models.DirectoryDeleteResponse> {
const aborter = options.abortSignal || Aborter.none;
return this.context.deleteMethod({
Expand All @@ -188,13 +188,13 @@ export class DirectoryClient extends StorageClient {
* Updates user defined metadata for the specified directory.
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-directory-metadata
*
* @param {IMetadata} [metadata] If no metadata provided, all existing directory metadata will be removed
* @param {Metadata} [metadata] If no metadata provided, all existing directory metadata will be removed
* @returns {Promise<Models.DirectorySetMetadataResponse>}
* @memberof DirectoryClient
*/
public async setMetadata(
metadata?: IMetadata,
options: IDirectorySetMetadataOptions = {}
metadata?: Metadata,
options: DirectorySetMetadataOptions = {}
): Promise<Models.DirectorySetMetadataResponse> {
const aborter = options.abortSignal || Aborter.none;
return this.context.setMetadata({
Expand All @@ -209,13 +209,13 @@ export class DirectoryClient extends StorageClient {
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-directories-and-files
*
* @param {string} [marker]
* @param {IDirectoryListFilesAndDirectoriesSegmentOptions} [options]
* @param {DirectoryListFilesAndDirectoriesSegmentOptions} [options]
* @returns {Promise<Models.DirectoryListFilesAndDirectoriesSegmentResponse>}
* @memberof DirectoryClient
*/
public async listFilesAndDirectoriesSegment(
marker?: string,
options: IDirectoryListFilesAndDirectoriesSegmentOptions = {}
options: DirectoryListFilesAndDirectoriesSegmentOptions = {}
): Promise<Models.DirectoryListFilesAndDirectoriesSegmentResponse> {
const aborter = options.abortSignal || Aborter.none;
return this.context.listFilesAndDirectoriesSegment({
Expand Down
Loading