appcenter-cli
Version:
Command line tool for Visual Studio App Center
53 lines (52 loc) • 1.92 kB
JavaScript
;
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileAssetsImpl = void 0;
const coreClient = require("@azure/core-client");
const Mappers = require("../models/mappers");
const Parameters = require("../models/parameters");
/** Class containing FileAssets operations. */
class FileAssetsImpl {
/**
* Initialize a new instance of the class FileAssets class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Create a new asset to upload a file
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
create(ownerName, appName, options) {
return this.client.sendOperationRequest({ ownerName, appName, options }, createOperationSpec);
}
}
exports.FileAssetsImpl = FileAssetsImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/file_asset",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.PathsUd9Bz2V01AppsOwnerNameAppNameFileAssetPostResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.Paths1V86Qb5V01AppsOwnerNameAppNameFileAssetPostResponsesDefaultContentApplicationJsonSchema
}
},
requestBody: Parameters.payload,
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.contentType, Parameters.accept],
mediaType: "json",
serializer
};