UNPKG

appcenter-cli

Version:

Command line tool for Visual Studio App Center

103 lines (102 loc) 3.59 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.LegacyCodePushAcquisitionImpl = void 0; const coreClient = require("@azure/core-client"); const Mappers = require("../models/mappers"); const Parameters = require("../models/parameters"); /** Class containing LegacyCodePushAcquisition operations. */ class LegacyCodePushAcquisitionImpl { /** * Initialize a new instance of the class LegacyCodePushAcquisition class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Check for updates * @param options The options parameters. */ updateCheck(options) { return this.client.sendOperationRequest({ options }, updateCheckOperationSpec); } /** * Report download of specified release * @param releaseMetadata Deployment status metric properties * @param options The options parameters. */ updateDownloadStatus(releaseMetadata, options) { return this.client.sendOperationRequest({ releaseMetadata, options }, updateDownloadStatusOperationSpec); } /** * Report deploy of specified release * @param releaseMetadata Deployment status metric properties * @param options The options parameters. */ updateInstallsStatus(releaseMetadata, options) { return this.client.sendOperationRequest({ releaseMetadata, options }, updateInstallsStatusOperationSpec); } } exports.LegacyCodePushAcquisitionImpl = LegacyCodePushAcquisitionImpl; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const updateCheckOperationSpec = { path: "/v0.1/legacy/updateCheck", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsJ7Rnt8V01LegacyUpdatecheckGetResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.PathsNsgzhkV01LegacyUpdatecheckGetResponsesDefaultContentApplicationJsonSchema } }, queryParameters: [ Parameters.deploymentKey, Parameters.appVersion, Parameters.packageHash, Parameters.label, Parameters.clientUniqueId, Parameters.isCompanion ], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], serializer }; const updateDownloadStatusOperationSpec = { path: "/v0.1/legacy/reportStatus/download", httpMethod: "POST", responses: { 200: {}, default: { bodyMapper: Mappers.Paths6DbuoaV01LegacyReportstatusDownloadPostResponsesDefaultContentApplicationJsonSchema } }, requestBody: Parameters.releaseMetadata, urlParameters: [Parameters.$host], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; const updateInstallsStatusOperationSpec = { path: "/v0.1/legacy/reportStatus/deploy", httpMethod: "POST", responses: { 200: {}, default: { bodyMapper: Mappers.Paths1Ho5Wt0V01LegacyReportstatusDeployPostResponsesDefaultContentApplicationJsonSchema } }, requestBody: Parameters.releaseMetadata1, urlParameters: [Parameters.$host], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer };