UNPKG

appcenter-cli

Version:

Command line tool for Visual Studio App Center

427 lines (426 loc) 15.4 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.BuildsImpl = void 0; const coreClient = require("@azure/core-client"); const Mappers = require("../models/mappers"); const Parameters = require("../models/parameters"); /** Class containing Builds operations. */ class BuildsImpl { /** * Initialize a new instance of the class Builds class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Gets the Xcode versions available to this app * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ listXcodeVersions(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, listXcodeVersionsOperationSpec); } /** * Gets the Xamarin SDK bundles available to this app * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ listXamarinSDKBundles(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, listXamarinSDKBundlesOperationSpec); } /** * Returns available toolsets for application * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ listToolsets(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, listToolsetsOperationSpec); } /** * Get the build log * @param buildId The build ID * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ getLog(buildId, ownerName, appName, options) { return this.client.sendOperationRequest({ buildId, ownerName, appName, options }, getLogOperationSpec); } /** * Gets the download URI * @param buildId The build ID * @param downloadType The download type * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ getDownloadUri(buildId, downloadType, ownerName, appName, options) { return this.client.sendOperationRequest({ buildId, downloadType, ownerName, appName, options }, getDownloadUriOperationSpec); } /** * Distribute a build * @param buildId The build ID * @param ownerName The name of the owner * @param appName The name of the application * @param distributeInfo The distribution details * @param options The options parameters. */ distribute(buildId, ownerName, appName, distributeInfo, options) { return this.client.sendOperationRequest({ buildId, ownerName, appName, distributeInfo, options }, distributeOperationSpec); } /** * Returns the build detail for the given build ID * @param buildId The build ID * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ get(buildId, ownerName, appName, options) { return this.client.sendOperationRequest({ buildId, ownerName, appName, options }, getOperationSpec); } /** * Cancels a build * @param buildId The build ID * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ update(buildId, ownerName, appName, options) { return this.client.sendOperationRequest({ buildId, ownerName, appName, options }, updateOperationSpec); } /** * Application specific build service status * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ getStatusByAppId(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, getStatusByAppIdOperationSpec); } /** * Returns the projects in the repository for the branch, for all toolsets * @param branch The branch name * @param os The desired OS for the project scan; normally the same as the app OS * @param platform The desired platform for the project scan * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ listToolsetProjects(branch, os, platform, ownerName, appName, options) { return this.client.sendOperationRequest({ branch, os, platform, ownerName, appName, options }, listToolsetProjectsOperationSpec); } /** * Returns the list of builds for the branch * @param branch The branch name * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ listByBranch(branch, ownerName, appName, options) { return this.client.sendOperationRequest({ branch, ownerName, appName, options }, listByBranchOperationSpec); } /** * Create a build * @param branch The branch name * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ create(branch, ownerName, appName, options) { return this.client.sendOperationRequest({ branch, ownerName, appName, options }, createOperationSpec); } /** * Returns the list of Git branches for this application * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ listBranches(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, listBranchesOperationSpec); } } exports.BuildsImpl = BuildsImpl; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listXcodeVersionsOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/xcode_versions", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "PathsSnbseaV01AppsOwnerNameAppNameXcodeVersionsGetResponses200ContentApplicationJsonSchemaItems" } } } } }, default: { bodyMapper: Mappers.Paths9Yy0MkV01AppsOwnerNameAppNameXcodeVersionsGetResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer }; const listXamarinSDKBundlesOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/xamarin_sdk_bundles", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "Paths1Nv9E3SV01AppsOwnerNameAppNameXamarinSdkBundlesGetResponses200ContentApplicationJsonSchemaItems" } } } } }, default: { bodyMapper: Mappers.Paths1G32ByzV01AppsOwnerNameAppNameXamarinSdkBundlesGetResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer }; const listToolsetsOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/toolsets", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsJw4J38V01AppsOwnerNameAppNameToolsetsGetResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.Paths1Dh1CmbV01AppsOwnerNameAppNameToolsetsGetResponsesDefaultContentApplicationJsonSchema } }, queryParameters: [Parameters.tools], urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer }; const getLogOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}/logs", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Paths1A4WxwuV01AppsOwnerNameAppNameBuildsBuildIdLogsGetResponses200ContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.buildId ], headerParameters: [Parameters.accept], serializer }; const getDownloadUriOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}/downloads/{download_type}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsQ75XzuV01AppsOwnerNameAppNameBuildsBuildIdDownloadsDownloadTypeGetResponses200ContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.buildId, Parameters.downloadType ], headerParameters: [Parameters.accept], serializer }; const distributeOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}/distribute", httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.Paths1D42Nj4V01AppsOwnerNameAppNameBuildsBuildIdDistributePostResponses200ContentApplicationJsonSchema } }, requestBody: Parameters.distributeInfo, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.buildId ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; const getOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsN3VrpV01AppsOwnerNameAppNameBuildsBuildIdGetResponses200ContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.buildId ], headerParameters: [Parameters.accept], serializer }; const updateOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.Paths1Kppxb1V01AppsOwnerNameAppNameBuildsBuildIdPatchResponses200ContentApplicationJsonSchema } }, requestBody: { parameterPath: { status: ["options", "status"] }, mapper: Object.assign(Object.assign({}, Mappers.PathsFcn32WV01AppsOwnerNameAppNameBuildsBuildIdPatchRequestbodyContentApplicationJsonSchema), { required: true }) }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.buildId ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; const getStatusByAppIdOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/build_service_status", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsPo7UnwV01AppsOwnerNameAppNameBuildServiceStatusGetResponses200ContentApplicationJsonSchema }, default: {} }, urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer }; const listToolsetProjectsOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/branches/{branch}/toolset_projects", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Paths17D5VcoV01AppsOwnerNameAppNameBranchesBranchToolsetProjectsGetResponses200ContentApplicationJsonSchema } }, queryParameters: [ Parameters.os, Parameters.platform, Parameters.maxSearchDepth ], urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.branch ], headerParameters: [Parameters.accept], serializer }; const listByBranchOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/branches/{branch}/builds", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "PathsRyxelmV01AppsOwnerNameAppNameBranchesBranchBuildsGetResponses200ContentApplicationJsonSchemaItems" } } } } } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.branch ], headerParameters: [Parameters.accept], serializer }; const createOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/branches/{branch}/builds", httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.PathsIgnnsjV01AppsOwnerNameAppNameBranchesBranchBuildsPostResponses200ContentApplicationJsonSchema } }, requestBody: { parameterPath: { sourceVersion: ["options", "sourceVersion"], debug: ["options", "debug"] }, mapper: Mappers.Paths1Jgsne9V01AppsOwnerNameAppNameBranchesBranchBuildsPostRequestbodyContentApplicationJsonSchema }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.branch ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; const listBranchesOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/branches", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "Paths5Mg2CrV01AppsOwnerNameAppNameBranchesGetResponses200ContentApplicationJsonSchemaItems" } } } } }, default: { bodyMapper: Mappers.Paths1WpnegrV01AppsOwnerNameAppNameBranchesGetResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer };