UNPKG

4.7 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import FileContainerInterfaces = require("./interfaces/FileContainerInterfaces");
4import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
5export interface IFileContainerApiBase extends basem.ClientApiBase {
6 createItems(items: VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>, containerId: number, scope?: string): Promise<FileContainerInterfaces.FileContainerItem[]>;
7 deleteItem(containerId: number, itemPath: string, scope?: string): Promise<void>;
8 getContainers(scope?: string, artifactUris?: string): Promise<FileContainerInterfaces.FileContainer[]>;
9 getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean, preferRedirect?: boolean): Promise<FileContainerInterfaces.FileContainerItem[]>;
10}
11export declare class FileContainerApiBase extends basem.ClientApiBase implements IFileContainerApiBase {
12 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
13 /**
14 * Creates the specified items in the referenced container.
15 *
16 * @param {VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>} items
17 * @param {number} containerId
18 * @param {string} scope - A guid representing the scope of the container. This is often the project id.
19 */
20 createItems(items: VSSInterfaces.VssJsonCollectionWrapperV<FileContainerInterfaces.FileContainerItem[]>, containerId: number, scope?: string): Promise<FileContainerInterfaces.FileContainerItem[]>;
21 /**
22 * Deletes the specified items in a container.
23 *
24 * @param {number} containerId - Container Id.
25 * @param {string} itemPath - Path to delete.
26 * @param {string} scope - A guid representing the scope of the container. This is often the project id.
27 */
28 deleteItem(containerId: number, itemPath: string, scope?: string): Promise<void>;
29 /**
30 * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers
31 *
32 * @param {string} scope - A guid representing the scope of the container. This is often the project id.
33 * @param {string} artifactUris
34 */
35 getContainers(scope?: string, artifactUris?: string): Promise<FileContainerInterfaces.FileContainer[]>;
36 /**
37 * Gets the specified file container object in a format dependent upon the given parameters or HTTP Accept request header
38 *
39 * @param {number} containerId - The requested container Id
40 * @param {string} scope - A guid representing the scope of the container. This is often the project id.
41 * @param {string} itemPath - The path to the item of interest
42 * @param {boolean} metadata - If true, this overrides any specified format parameter or HTTP Accept request header to provide non-recursive information for the given itemPath
43 * @param {string} format - If specified, this overrides the HTTP Accept request header to return either 'json' or 'zip'. If $format is specified, then api-version should also be specified as a query parameter.
44 * @param {string} downloadFileName - If specified and returning other than JSON format, then this download name will be used (else defaults to itemPath)
45 * @param {boolean} includeDownloadTickets
46 * @param {boolean} isShallow - If true, returns only immediate children(files & folders) for the given itemPath. False will return all items recursively within itemPath.
47 * @param {boolean} ignoreRequestedMediaType - Set to true to ignore the HTTP Accept request header. Default is false.
48 * @param {boolean} includeBlobMetadata
49 * @param {boolean} saveAbsolutePath - Set to false to not save the absolute path to the specified directory of the artifact in the returned archive. Works only for artifact directories. Default is true.
50 * @param {boolean} preferRedirect - Set to true to get the redirect response which leads to the stream with content. Default is false.
51 */
52 getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean, preferRedirect?: boolean): Promise<FileContainerInterfaces.FileContainerItem[]>;
53}