UNPKG

@sap/adp-cf

Version:
32 lines (31 loc) 1.32 kB
/// <reference types="node" /> import { HTML5Content, ServiceKeys, Uaa, AppParams } from "../models/Types"; export default class HTML5RepoUtils { /** * Get HTML5 repo credentials * @param {string} spaceGuid space guid * @param {CFUtil} cfUtil utility to communicate with CF * @returns {Promise<any>} credentials json object */ static getHtml5RepoCredentials(spaceGuid: string): Promise<ServiceKeys>; /** * Download base app manifest.json and xs-app.json from HTML5 repository * @static * @param {*} spaceGuid current space guid * @param {IAppParams} parameters appName, appVersion, appHostId * @return {Promise<AdmZip.IZipEntry[]>} manifest.json and xs-app.json * @memberof HTML5RepoUtils */ static downloadAppContent(spaceGuid: string, parameters: AppParams): Promise<HTML5Content>; /** * Download zip from HTML5 repository * @static * @param {string} token html5 reposiotry token * @param {string} appHostId appHostId where content is stored * @param {string} uri url with parameters * @return {Promise<Buffer>} file buffer content * @memberof HTML5RepoUtils */ static downloadZip(token: string, appHostId: string, uri: string): Promise<Buffer>; static getToken(uaa: Uaa): Promise<string>; }