import { Service } from '../Core/index'; import { StackItemAdd, StackItemRemove, StackListRequest, StackListResponse, StackListeners, StackRequest } from './StackTypes'; /** * Data stacks * * Stacks are a per-user named persistent queue of data * An administrator creates a stack service * End-users can push data on an arbitrary number of their own arbitrary named stacks * */ export declare class Stack extends Service { /** * Get deployment type associated to Stack service * @return {string} */ static readonly DEPLOYMENT_TYPE: string; /** * Get default deployment id associated to Stack service * @return {string} */ static readonly DEFAULT_DEPLOYMENT_ID: string; /** * Data stack user API * * Data is stored on a per user basis. However, notifications can be sent to a configurable set of listeners. * Stack names are arbitrary and do not need to be explicitly initialized. * @access public * */ /** * Lists the listeners * * Returns the whole list of listeners for the given stack. * @access public * */ getListeners(body: StackRequest): Promise; /** * Lists content * * Returns a paginated list of contents for the given stack. * Content is sorted according to the statically configured order. * @access public * */ list(body: StackListRequest): Promise; /** * Empties a stack * * Removes all items from the given stack. * @access public * */ purge(body: StackRequest): Promise; /** * Pushes an item * * Pushes an item onto the given stack. * The stack does not need to be created. * @access public * */ push(body: StackItemAdd): Promise; /** * Removes items * * Removes the item with the given guid from the given stack. * @access public * */ remove(body: StackItemRemove): Promise; /** * Sets the listeners * * Sets the listeners for the given stack. * @access public * */ setListeners(body: StackListeners): Promise; /** * Updates an item * * Updates an existing item of the given stack. * The item MUST exist prior to the call. * @access public * */ update(body: StackItemAdd): Promise; }