UNPKG

appcenter-cli

Version:

Command line tool for Visual Studio App Center

64 lines (63 loc) 2.52 kB
"use strict"; /* * 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.DeploymentReleasesImpl = void 0; const coreClient = require("@azure/core-client"); const Mappers = require("../models/mappers"); const Parameters = require("../models/parameters"); /** Class containing DeploymentReleases operations. */ class DeploymentReleasesImpl { /** * Initialize a new instance of the class DeploymentReleases class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Modifies a CodePush release metadata under the given Deployment * @param deploymentName deployment name * @param releaseLabel release label * @param ownerName The name of the owner * @param appName The name of the application * @param release Release modification. All fields are optional and only provided fields will get * updated. * @param options The options parameters. */ update(deploymentName, releaseLabel, ownerName, appName, release, options) { return this.client.sendOperationRequest({ deploymentName, releaseLabel, ownerName, appName, release, options }, updateOperationSpec); } } exports.DeploymentReleasesImpl = DeploymentReleasesImpl; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const updateOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/deployments/{deployment_name}/releases/{release_label}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.PathsIvaackV01AppsOwnerNameAppNameDeploymentsDeploymentNameReleasesReleaseLabelPatchResponses200ContentApplicationJsonSchema }, 204: {}, default: { bodyMapper: Mappers.PathsIsso8KV01AppsOwnerNameAppNameDeploymentsDeploymentNameReleasesReleaseLabelPatchResponsesDefaultContentApplicationJsonSchema } }, requestBody: Parameters.release, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.deploymentName, Parameters.releaseLabel1 ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer };