appcenter-cli
Version:
Command line tool for Visual Studio App Center
74 lines (73 loc) • 2.61 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.OrganizationImpl = void 0;
const coreClient = require("@azure/core-client");
const Mappers = require("../models/mappers");
const Parameters = require("../models/parameters");
/** Class containing Organization operations. */
class OrganizationImpl {
/**
* Initialize a new instance of the class Organization class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Sets the organization avatar
* @param orgName The organization's name
* @param options The options parameters.
*/
updateAvatar(orgName, options) {
return this.client.sendOperationRequest({ orgName, options }, updateAvatarOperationSpec);
}
/**
* Deletes the uploaded organization avatar
* @param orgName The organization's name
* @param options The options parameters.
*/
deleteAvatar(orgName, options) {
return this.client.sendOperationRequest({ orgName, options }, deleteAvatarOperationSpec);
}
}
exports.OrganizationImpl = OrganizationImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const updateAvatarOperationSpec = {
path: "/v0.1/orgs/{org_name}/avatar",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.Paths7Mbu6OV01OrgsOrgNameAvatarPostResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.Paths2Bw88TV01OrgsOrgNameAvatarPostResponsesDefaultContentApplicationJsonSchema
}
},
formDataParameters: [Parameters.avatar],
urlParameters: [Parameters.$host, Parameters.orgName],
headerParameters: [Parameters.contentType1, Parameters.accept1],
serializer
};
const deleteAvatarOperationSpec = {
path: "/v0.1/orgs/{org_name}/avatar",
httpMethod: "DELETE",
responses: {
200: {
bodyMapper: Mappers.PathsQe14CxV01OrgsOrgNameAvatarDeleteResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.Paths1Ytl347V01OrgsOrgNameAvatarDeleteResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [Parameters.$host, Parameters.orgName],
headerParameters: [Parameters.accept],
serializer
};