import IDataStore from "../../common/IDataStore" ; import IGCExtentProvider from "../../common/IGCExtentProvider" ; import * as Models from "../generated/artifacts/models" ; import Context from "../generated/Context" ; import { QUEUE_STATUSCODE } from "../utils/constants" ; /** MODELS FOR SERVICE */ interface IServiceAdditionalProperties { accountName : string ; } export type ServicePropertiesModel = Models . StorageServiceProperties & IServiceAdditionalProperties ; /** MODELS FOR QUEUE */ interface IQueueAdditionalProperties { queueAcl ? : Models . SignedIdentifier [ ] ; } export type QueueModel = Models . QueueItem & IQueueAdditionalProperties & IServiceAdditionalProperties ; export type QueueACL = Models . SignedIdentifier [ ] ; export interface IQueueMetadata { [ propertyName ] : string ; } /** MODELS FOR MESSAGE UPDATE */ interface IMessageUpdateProperties { accountName : string ; queueName : string ; messageId : string ; popReceipt : string ; timeNextVisible : Date ; } /** MODELS FOR MESSAGE */ interface IMessageAdditionalProperties { insertionTime : Date ; expirationTime : Date ; dequeueCount : number ; persistency : IExtentChunk ; } export type MessageModel = IMessageUpdateProperties & IMessageAdditionalProperties ; export type MessageUpdateProperties = IMessageUpdateProperties & { persistency ? : IExtentChunk ; } ; export interface export interface IExtentChunk { id : string ; offset : number ; count : number ; } export interface extends IDataStore export interface IQueueMetadataStore extends IGCExtentProvider , IDataStore { param { ServicePropertiesModel } updateProperties returns { Promise < void > } memberof updateServiceProperties ( updateProperties ) : Promise < void > ; param { string } account returns { ( Promise < ServicePropertiesModel | undefined > ) } memberof getServiceProperties ( account ) : Promise < ServicePropertiesModel | undefined > ; param { string } account param { string } prefix param { number } maxResults param { number } marker returns { ( Promise < [ QueueModel [ ] , number | undefined ] > ) } memberof listQueues ( account , prefix ? , maxResults ? , marker ? ) : Promise < [ QueueModel [ ] , number | undefined ] > ; param { string } account param { string } queue param { Context } context returns { Promise < QueueModel > } memberof getQueue ( account , queue , context ? ) : Promise < QueueModel > ; param { QueueModel } queue param { Context } context returns { Promise < QUEUE_STATUSCODE > } memberof createQueue ( queue , context ? ) : Promise < QUEUE_STATUSCODE > ; param { string } account param { string } queue param { Context } context returns { Promise < void > } memberof deleteQueue ( account , queue , context ? ) : Promise < void > ; param { string } account param { string } queue param { QueueACL } queueACL param { string } requestId returns { Promise < void > } memberof setQueueACL ( account , queue , queueACL ? , context ? ) : Promise < void > ; param { string } account param { string } queue param { QueueMetadata } metadata param { string } requestId returns { Promise < void > } memberof setQueueMetadata ( account , queue , metadata ? , context ? ) : Promise < void > ; param { string } account param { string } queue param { string } requestId returns { number } memberof getMessagesCount ( account , queue , context ? ) : Promise < number > ; param { MessageModel } message param { Context } context returns { Promise < void > } memberof insertMessage ( message , context ? ) : Promise < void > ; param { string } account param { string } queue param { number } numOfMessages param { Date } queryDate param { Context } context returns { Promise < MessageModel [ ] > } memberof peekMessages ( account , queue , numOfMessages ? , queryDate ? , context ? ) : Promise < MessageModel [ ] > ; param { string } account param { string } queue param { Date } timeNextVisible param { string } popReceipt param { number } numOfMessages param { Date } queryDate param { Context } context returns { Promise < MessageModel [ ] > } memberof getMessages ( account , queue , timeNextVisible , popReceipt , numOfMessages ? , queryDate ? , context ? ) : Promise < MessageModel [ ] > ; param { string } account param { string } queue param { string } messageId param { string } validatingPopReceipt param { string } requestId returns { Promise < void > } memberof deleteMessage ( account , queue , messageId , validatingPopReceipt , context ? ) : Promise < void > ; param { MessageUpdateProperties } message param { string } validatingPopReceipt param { Context } context returns { Promise < void > } memberof updateMessage ( message , validatingPopReceipt , context ? ) : Promise < void > ; param { string } account param { string } queue param { string } requestId returns { Promise < void > } memberof clearMessages ( account , queue , context ? ) : Promise < void > ; param { number } maxResults param { ( number | undefined ) } marker returns { ( Promise < [ MessageModel [ ] , number | undefined ] > ) } memberof listMessages ( maxResults ? , marker ? ) : Promise < [ MessageModel [ ] , number | undefined ] > ; } export default IQueueMetadataStore ;