import ICleaner from "../../common/ICleaner" ; import IDataStore from "../../common/IDataStore" ; import IGCExtentProvider from "../../common/IGCExtentProvider" ; import * as Models from "../generated/artifacts/models" ; import Context from "../generated/Context" ; export interface export interface IExtentChunk { id : string ; offset : number ; count : number ; } export const ZERO_EXTENT_ID = "*ZERO*" ; /** MODELS FOR SERVICE */ interface IServiceAdditionalProperties { accountName : string ; } export type ServicePropertiesModel = Models . StorageServiceProperties & IServiceAdditionalProperties ; /** MODELS FOR CONTAINER */ interface IContainerAdditionalProperties { accountName : string ; leaseDurationSeconds ? : number ; leaseId ? : string ; leaseExpireTime ? : Date ; leaseBreakTime ? : Date ; containerAcl ? : Models . SignedIdentifier [ ] ; } export type ContainerModel = Models . ContainerItem & IContainerAdditionalProperties ; export interface IContainerMetadata { [ propertyName ] : string ; } export type GetContainerPropertiesResponse = Models . ContainerItem ; interface IGetContainerAccessPolicyResponse { properties : Models . ContainerProperties ; containerAcl ? : Models . SignedIdentifier [ ] ; } export type GetContainerAccessPolicyResponse = IGetContainerAccessPolicyResponse ; interface ISetContainerAccessPolicyOptions { lastModified : Date ; etag : string ; containerAcl ? : Models . SignedIdentifier [ ] ; publicAccess ? : Models . PublicAccessType ; leaseAccessConditions ? : Models . LeaseAccessConditions ; modifiedAccessConditions ? : Models . ModifiedAccessConditions ; } export type SetContainerAccessPolicyOptions = ISetContainerAccessPolicyOptions ; interface IContainerLeaseResponse { properties : Models . ContainerProperties ; leaseId ? : string ; leaseTime ? : number ; } export type AcquireContainerLeaseResponse = IContainerLeaseResponse ; export type ReleaseContainerLeaseResponse = Models . ContainerProperties ; export type RenewContainerLeaseResponse = IContainerLeaseResponse ; export type BreakContainerLeaseResponse = IContainerLeaseResponse ; export type ChangeContainerLeaseResponse = IContainerLeaseResponse ; /** MODELS FOR BLOBS */ interface IPersistencyPropertiesRequired { type { IExtentChunk } memberof persistency : IExtentChunk ; } interface IPersistencyPropertiesOptional { type { IExtentChunk } memberof persistency ? : IExtentChunk ; } interface IBlockBlobAdditionalProperties { type { boolean } memberof isCommitted : boolean ; type { PersistencyBlockModel [ ] } memberof committedBlocksInOrder ? : PersistencyBlockModel [ ] ; } /**
 * PageRange model with pointers to persistency chunk.
 */ export type PersistencyPageRange = IPersistencyPropertiesRequired & Models . PageRange ; interface IPageBlobAdditionalProperties { pageRangesInOrder ? : PersistencyPageRange [ ] ; } interface IBlobAdditionalProperties { accountName : string ; containerName : string ; leaseDurationSeconds ? : number ; leaseId ? : string ; leaseExpireTime ? : Date ; leaseBreakTime ? : Date ; } export type BlobModel = IBlobAdditionalProperties & IPageBlobAdditionalProperties & IBlockBlobAdditionalProperties & Models . BlobItem & IPersistencyPropertiesOptional ; interface IGetBlobPropertiesRes { properties : Models . BlobProperties ; metadata ? : Models . BlobMetadata ; blobCommittedBlockCount ? : number ; } export type GetBlobPropertiesRes = IGetBlobPropertiesRes ; interface IBlobLeaseResponse { properties : Models . BlobProperties ; leaseId ? : string ; leaseTime ? : number ; } export type AcquireBlobLeaseResponse = IBlobLeaseResponse ; export type ReleaseBlobLeaseResponse = Models . ContainerProperties ; export type RenewBlobLeaseResponse = IBlobLeaseResponse ; export type BreakBlobLeaseResponse = IBlobLeaseResponse ; export type ChangeBlobLeaseResponse = IBlobLeaseResponse ; interface ICreateSnapshotResponse { properties : Models . BlobProperties ; snapshot : string ; } export type CreateSnapshotResponse = ICreateSnapshotResponse ; interface IBlobId { account : string ; container : string ; blob : string ; snapshot ? : string ; } export type BlobId = IBlobId ; interface IGetPageRangeResponse { pageRangesInOrder ? : PersistencyPageRange [ ] ; properties : Models . BlobProperties ; } export type GetPageRangeResponse = IGetPageRangeResponse ; /** MODELS FOR BLOCKS */ interface IBlockAdditionalProperties { accountName : string ; containerName : string ; blobName : string ; isCommitted : boolean ; } export type PersistencyBlockModel = Models . Block & IPersistencyPropertiesRequired ; export type BlockModel = IBlockAdditionalProperties & PersistencyBlockModel ; export interface extends IDataStore export interface IBlobMetadataStore extends IGCExtentProvider , IDataStore , ICleaner { param { ServicePropertiesModel } serviceProperties returns { Promise < ServicePropertiesModel > } memberof setServiceProperties ( context , serviceProperties ) : Promise < ServicePropertiesModel > ; param { string } account returns { Promise < ServicePropertiesModel | undefined > } memberof getServiceProperties ( context , account ) : Promise < ServicePropertiesModel | undefined > ; param { string } account param { string } prefix param { number } maxResults param { number } marker returns { ( Promise < [ ContainerModel [ ] , number | undefined ] > ) } memberof listContainers ( context , account , prefix ? , maxResults ? , marker ? ) : Promise < [ ContainerModel [ ] , string | undefined ] > ; param { ContainerModel } container param { Context } context returns { Promise < ContainerModel > } memberof createContainer ( context , container ) : Promise < ContainerModel > ; param { string } account param { string } container param { Context } context param { Models . LeaseAccessConditions } leaseAccessConditions returns { Promise < GetContainerPropertiesResponse > } memberof getContainerProperties ( context , account , container , leaseAccessConditions ? ) : Promise < GetContainerPropertiesResponse > ; param { string } account param { string } container param { Context } context param { Models . ContainerDeleteMethodOptionalParams } options returns { Promise < void > } memberof deleteContainer ( context , account , container , options ? ) : Promise < void > ; param { Context } context param { string } account param { string } container param { Date } lastModified param { string } etag param { IContainerMetadata } metadata param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < void > } memberof setContainerMetadata ( context , account , container , lastModified , etag , metadata ? , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < void > ; param { string } account param { string } container param { Context } context param { Models . LeaseAccessConditions } leaseAccessConditions returns { Promise < GetContainerAccessPolicyResponse > } memberof getContainerACL ( context , account , container , leaseAccessConditions ? ) : Promise < GetContainerAccessPolicyResponse > ; param { string } account param { string } container param { SetContainerAccessPolicyOptions } setAclModel param { Context } context returns { Promise < void > } memberof setContainerACL ( context , account , container , setAclModel ) : Promise < void > ; param { string } account param { string } container param { Models . ContainerAcquireLeaseOptionalParams } options param { Context } context returns { Promise < AcquireContainerLeaseResponse > } memberof acquireContainerLease ( context , account , container , options ? ) : Promise < AcquireContainerLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } leaseId param { Models . ContainerReleaseLeaseOptionalParams } options returns { Promise < ReleaseContainerLeaseResponse > } memberof releaseContainerLease ( context , account , container , leaseId , options ? ) : Promise < ReleaseContainerLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } leaseId param { Models . ContainerRenewLeaseOptionalParams } options returns { Promise < RenewContainerLeaseResponse > } memberof renewContainerLease ( context , account , container , leaseId , options ? ) : Promise < RenewContainerLeaseResponse > ; param { Context } context param { string } account param { string } container param { ( number | undefined ) } breakPeriod param { Models . ContainerBreakLeaseOptionalParams } options returns { Promise < BreakContainerLeaseResponse > } memberof breakContainerLease ( context , account , container , breakPeriod , options ? ) : Promise < BreakContainerLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } leaseId param { string } proposedLeaseId param { Models . ContainerChangeLeaseOptionalParams } options returns { Promise < ChangeContainerLeaseResponse > } memberof changeContainerLease ( context , account , container , leaseId , proposedLeaseId , options ? ) : Promise < ChangeContainerLeaseResponse > ; param { string } account param { string } container param { Context } context returns { Promise < void > } memberof checkContainerExist ( context , account , container ) : Promise < void > ; listBlobs ( context , account , container , blob ? , prefix ? , maxResults ? , marker ? , includeSnapshots ? , includeUncommittedBlobs ? ) : Promise < [ BlobModel [ ] , string | undefined ] > ; listAllBlobs ( maxResults ? , marker ? , includeSnapshots ? , includeUncommittedBlobs ? ) : Promise < [ BlobModel [ ] , string | undefined ] > ; param { Context } context param { BlobModel } blob param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < void > } memberof createBlob ( context , blob , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < void > ; param { Context } context param { string } account param { string } container param { string } blob param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . BlobMetadata } metadata param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < CreateSnapshotResponse > } memberof createSnapshot ( context , account , container , blob , leaseAccessConditions ? , metadata ? , modifiedAccessConditions ? ) : Promise < CreateSnapshotResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { ( string | undefined ) } snapshot param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < BlobModel > } memberof downloadBlob ( context , account , container , blob , snapshot , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < BlobModel > ; param { Context } context param { string } account param { string } container param { string } blob param { ( string | undefined ) } snapshot param { ( Models . LeaseAccessConditions | undefined ) } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < GetBlobPropertiesRes > } memberof getBlobProperties ( context , account , container , blob , snapshot , leaseAccessConditions , modifiedAccessConditions ? ) : Promise < GetBlobPropertiesRes > ; param { Context } context param { string } account param { string } container param { string } blob param { Models . BlobDeleteMethodOptionalParams } options returns { Promise < void > } memberof deleteBlob ( context , account , container , blob , options ) : Promise < void > ; param { Context } context param { string } account param { string } container param { string } blob param { ( Models . LeaseAccessConditions | undefined ) } leaseAccessConditions param { ( Models . BlobHTTPHeaders | undefined ) } blobHTTPHeaders param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < Models . BlobProperties > } memberof setBlobHTTPHeaders ( context , account , container , blob , leaseAccessConditions , blobHTTPHeaders , modifiedAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { string } account param { string } container param { string } blob param { ( Models . LeaseAccessConditions | undefined ) } leaseAccessConditions param { ( Models . BlobMetadata | undefined ) } metadata param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < Models . BlobProperties > } memberof setBlobMetadata ( context , account , container , blob , leaseAccessConditions , metadata , modifiedAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { string } account param { string } container param { string } blob param { number } duration param { string } proposedLeaseId param { Models . BlobAcquireLeaseOptionalParams } options returns { Promise < AcquireBlobLeaseResponse > } memberof acquireBlobLease ( context , account , container , blob , duration , proposedLeaseId ? , options ? ) : Promise < AcquireBlobLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { string } leaseId param { Models . BlobReleaseLeaseOptionalParams } options returns { Promise < ReleaseBlobLeaseResponse > } memberof releaseBlobLease ( context , account , container , blob , leaseId , options ? ) : Promise < ReleaseBlobLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { string } leaseId param { Models . BlobRenewLeaseOptionalParams } options returns { Promise < RenewBlobLeaseResponse > } memberof renewBlobLease ( context , account , container , blob , leaseId , options ? ) : Promise < RenewBlobLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { string } leaseId param { string } proposedLeaseId param { Models . BlobChangeLeaseOptionalParams } option returns { Promise < ChangeBlobLeaseResponse > } memberof changeBlobLease ( context , account , container , blob , leaseId , proposedLeaseId , option ? ) : Promise < ChangeBlobLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { number } breakPeriod param { Models . BlobBreakLeaseOptionalParams } option returns { Promise < BreakBlobLeaseResponse > } memberof breakBlobLease ( context , account , container , blob , breakPeriod ? , option ? ) : Promise < BreakBlobLeaseResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { string } snapshot returns { Promise < void > } memberof checkBlobExist ( context , account , container , blob , snapshot ? ) : Promise < void > ; param { string } account param { string } container param { string } blob param { string } snapshot returns { ( Promise < * { blobType : Models . BlobType | undefined ; isCommitted : boolean } | undefined * > ) } memberof getBlobType ( account , container , blob , snapshot ? ) : Promise < { blobType : Models . BlobType | undefined ; isCommitted : boolean ; } | undefined > ; param { Context } context param { BlobId } source param { BlobId } destination param { string } copySource param { ( Models . BlobMetadata | undefined ) } metadata param { ( Models . AccessTier | undefined ) } tier param { Models . BlobStartCopyFromURLOptionalParams } leaseAccessConditions returns { Promise < Models . BlobProperties > } memberof startCopyFromURL ( context , source , destination , copySource , metadata , tier , leaseAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { BlobId } source param { BlobId } destination param { string } copySource param { ( Models . BlobMetadata | undefined ) } metadata param { ( Models . AccessTier | undefined ) } tier param { Models . BlobCopyFromURLOptionalParams } leaseAccessConditions returns { Promise < Models . BlobProperties > } memberof copyFromURL ( context , source , destination , copySource , metadata , tier , leaseAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { string } account param { string } container param { string } blob param { Models . AccessTier } tier param { ( Models . LeaseAccessConditions | undefined ) } leaseAccessConditions returns { ( Promise < 200 | 202 > ) } memberof setTier ( context , account , container , blob , tier , leaseAccessConditions ) : Promise < 200 | 202 > ; param { BlockModel } block param { Context } context returns { Promise < void > } memberof stageBlock ( context , block , leaseAccessConditions ) : Promise < void > ; param { Context } context param { BlockModel } block param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions param { Models . AppendPositionAccessConditions } appendPositionAccessConditions returns { Promise < Models . BlobProperties > } memberof appendBlock ( context , block , leaseAccessConditions ? , modifiedAccessConditions ? , appendPositionAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { BlobModel } blob param { { blockName : string ; blockCommitType : string } [ ] } blockList param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < void > } memberof commitBlockList ( context , blob , blockList , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < void > ; param { string } account param { string } container param { string } blob param { string } snapshot param { ( boolean | undefined ) } isCommitted param { Context } context returns { Promise < { properties : Models . BlobProperties ; uncommittedBlocks : Models . Block [ ] ; committedBlocks : Models . Block [ ] ; * } > } memberof getBlockList ( context , account , container , blob , snapshot , isCommitted , leaseAccessConditions ) : Promise < { properties : Models . BlobProperties ; uncommittedBlocks : Models . Block [ ] ; committedBlocks : Models . Block [ ] ; } > ; param { Context } context param { BlobModel } blob param { number } start param { number } end param { IExtentChunk } persistency param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions param { Models . SequenceNumberAccessConditions } sequenceNumberAccessConditions returns { Promise < Models . BlobProperties > } memberof uploadPages ( context , blob , start , end , persistency , leaseAccessConditions ? , modifiedAccessConditions ? , sequenceNumberAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { BlobModel } blob param { number } start param { number } end param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions param { Models . SequenceNumberAccessConditions } sequenceNumberAccessConditions returns { Promise < Models . BlobProperties > } memberof clearRange ( context , blob , start , end , leaseAccessConditions ? , modifiedAccessConditions ? , sequenceNumberAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { string } account param { string } container param { string } blob param { string } snapshot param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < GetPageRangeResponse > } memberof getPageRanges ( context , account , container , blob , snapshot ? , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < GetPageRangeResponse > ; param { Context } context param { string } account param { string } container param { string } blob param { number } blobContentLength param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < Models . BlobProperties > } memberof resizePageBlob ( context , account , container , blob , blobContentLength , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < Models . BlobProperties > ; param { Context } context param { string } account param { string } container param { string } blob param { Models . SequenceNumberActionType } sequenceNumberAction param { ( number | undefined ) } blobSequenceNumber param { Models . LeaseAccessConditions } leaseAccessConditions param { Models . ModifiedAccessConditions } modifiedAccessConditions returns { Promise < Models . BlobProperties > } memberof updateSequenceNumber ( context , account , container , blob , sequenceNumberAction , blobSequenceNumber , leaseAccessConditions ? , modifiedAccessConditions ? ) : Promise < Models . BlobProperties > ; /**
     * Gets uncommitted blocks list for a blob from persistency layer.
     */ listUncommittedBlockPersistencyChunks ( marker ? , maxResults ? ) : Promise < [ IExtentChunk [ ] , string | undefined ] > ; } export default IBlobMetadataStore ;