@c8y/client
Version:
Client application programming interface to access the Cumulocity IoT-Platform REST services.
39 lines • 1.93 kB
TypeScript
import { IFetchClient, Service, IResult, IFetchResponse } from '../core';
import { IApplication } from './IApplication';
import { IApplicationBinary } from './IApplicationBinary';
import { Stream } from 'stream';
import { IUploadParamsOverride } from './IUploadParamsOverride';
export declare class ApplicationBinaryService extends Service<IApplicationBinary> {
protected baseUrl: any;
protected listUrl: string;
protected propertyName: string;
constructor(client: IFetchClient, applicationOrId: string | number | IApplication);
upload(binary: ArrayBuffer | Stream | Buffer | File | Blob, fileName?: string, uploadParamsOverride?: IUploadParamsOverride): Promise<IResult<IApplicationBinary>>;
uploadApplicationVersion(archive: File, version: string, tags?: string[]): Promise<IResult<IApplicationBinary>>;
uploadWithProgressXhr(binary: ArrayBuffer | Stream | Buffer | File | Blob, onProgress: any, fileName?: string, uploadParamsOverride?: IUploadParamsOverride): XMLHttpRequest;
getXMLHttpResponse(xhr: any): Promise<IApplication>;
list(filter?: any): Promise<import("../core").IResultList<IApplicationBinary>>;
delete(binaryOrId: string | number | IApplicationBinary): Promise<IResult<null>>;
listPlugins(): Promise<{
res: IFetchResponse;
data: any;
}>;
addPlugin(pluginName: string, pluginFile: Stream | Buffer | ArrayBuffer): Promise<{
res: IFetchResponse;
data: any;
}>;
removePlugin(pluginName: string): Promise<{
res: IFetchResponse;
data: any;
}>;
updateFiles(files: Array<{
path: string;
contents: Blob | string | Stream | Buffer | ArrayBuffer;
}>): Promise<{
res: IFetchResponse;
data: any;
}>;
downloadArchive(binaryId: number | string): Promise<IFetchResponse>;
private createBinaryRequestBody;
}
//# sourceMappingURL=ApplicationBinaryService.d.ts.map