UNPKG

1.76 kBTypeScriptView Raw
1/// <reference types="node" />
2import * as restm from 'typed-rest-client/RestClient';
3import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
4import FileContainerApiBase = require("./FileContainerApiBase");
5import FileContainerInterfaces = require("./interfaces/FileContainerInterfaces");
6export interface IFileContainerApi extends FileContainerApiBase.IFileContainerApiBase {
7 createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise<FileContainerInterfaces.FileContainerItem>;
8 getItem(containerId: number, scope?: string, itemPath?: string, downloadFileName?: string): Promise<restm.IRestResponse<NodeJS.ReadableStream>>;
9}
10export declare class FileContainerApi extends FileContainerApiBase.FileContainerApiBase implements IFileContainerApi {
11 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
12 /**
13 * @param {number} containerId
14 * @param {string} scope
15 * @param {string} itemPath
16 * @param {string} downloadFileName
17 */
18 getItem(containerId: number, scope?: string, itemPath?: string, downloadFileName?: string): Promise<restm.IRestResponse<NodeJS.ReadableStream>>;
19 createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise<FileContainerInterfaces.FileContainerItem>;
20 _createItem(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void;
21}