UNPKG

appcenter-cli

Version:

Command line tool for Visual Studio App Center

73 lines (72 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.RepositoriesImpl = void 0; const coreClient = require("@azure/core-client"); const Mappers = require("../models/mappers"); const Parameters = require("../models/parameters"); /** Class containing Repositories operations. */ class RepositoriesImpl { /** * Initialize a new instance of the class Repositories class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Gets the repositories available from the source code host * @param sourceHost The source host * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ list(sourceHost, ownerName, appName, options) { return this.client.sendOperationRequest({ sourceHost, ownerName, appName, options }, listOperationSpec); } } exports.RepositoriesImpl = RepositoriesImpl; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/source_hosts/{source_host}/repositories", httpMethod: "GET", responses: { 200: { bodyMapper: { type: { name: "Sequence", element: { type: { name: "Composite", className: "PathsFt7OwuV01AppsOwnerNameAppNameSourceHostsSourceHostRepositoriesGetResponses200ContentApplicationJsonSchemaItems" } } } } }, default: { bodyMapper: Mappers.Paths19B6FnrV01AppsOwnerNameAppNameSourceHostsSourceHostRepositoriesGetResponsesDefaultContentApplicationJsonSchema } }, queryParameters: [ Parameters.vstsAccountName, Parameters.vstsProjectId, Parameters.serviceConnectionId, Parameters.form ], urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.sourceHost ], headerParameters: [Parameters.accept], serializer };