UNPKG

appcenter-cli

Version:

Command line tool for Visual Studio App Center

160 lines (159 loc) 5.88 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.CrashGroupsImpl = void 0; const coreClient = require("@azure/core-client"); const Mappers = require("../models/mappers"); const Parameters = require("../models/parameters"); /** Class containing CrashGroups operations. */ class CrashGroupsImpl { /** * Initialize a new instance of the class CrashGroups class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Gets a stacktrace for a specific crash. * @param crashGroupId id of a specific group * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ getStacktrace(crashGroupId, ownerName, appName, options) { return this.client.sendOperationRequest({ crashGroupId, ownerName, appName, options }, getStacktraceOperationSpec); } /** * Gets a specific group. * @param crashGroupId id of a specific group * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ get(crashGroupId, ownerName, appName, options) { return this.client.sendOperationRequest({ crashGroupId, ownerName, appName, options }, getOperationSpec); } /** * Updates a group. * @param crashGroupId id of a specific group * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ update(crashGroupId, ownerName, appName, options) { return this.client.sendOperationRequest({ crashGroupId, ownerName, appName, options }, updateOperationSpec); } /** * Gets a list of crash groups and whether the list contains all available groups. * @param ownerName The name of the owner * @param appName The name of the application * @param options The options parameters. */ list(ownerName, appName, options) { return this.client.sendOperationRequest({ ownerName, appName, options }, listOperationSpec); } } exports.CrashGroupsImpl = CrashGroupsImpl; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getStacktraceOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/stacktrace", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Stacktrace }, default: { bodyMapper: Mappers.Paths11Adk1LV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdStacktraceGetResponsesDefaultContentApplicationJsonSchema } }, queryParameters: [Parameters.groupingOnly], urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.crashGroupId ], headerParameters: [Parameters.accept], serializer }; const getOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsHnvr1EV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdGetResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.PathsNzisgxV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdGetResponsesDefaultContentApplicationJsonSchema } }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.crashGroupId ], headerParameters: [Parameters.accept], serializer }; const updateOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.Paths6Qmpl3V01AppsOwnerNameAppNameCrashGroupsCrashGroupIdPatchResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.Paths1D54ZerV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdPatchResponsesDefaultContentApplicationJsonSchema } }, requestBody: { parameterPath: { status: ["options", "status"], annotation: ["options", "annotation"] }, mapper: Object.assign(Object.assign({}, Mappers.PathsT60UxpV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdPatchRequestbodyContentApplicationJsonSchema), { required: true }) }, urlParameters: [ Parameters.$host, Parameters.ownerName, Parameters.appName, Parameters.crashGroupId ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; const listOperationSpec = { path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PathsScc799V01AppsOwnerNameAppNameCrashGroupsGetResponses200ContentApplicationJsonSchema }, default: { bodyMapper: Mappers.PathsFkuj51V01AppsOwnerNameAppNameCrashGroupsGetResponsesDefaultContentApplicationJsonSchema } }, queryParameters: [ Parameters.appVersion1, Parameters.lastOccurrenceFrom, Parameters.lastOccurrenceTo, Parameters.groupType, Parameters.groupStatus, Parameters.groupTextSearch, Parameters.orderby1, Parameters.continuationToken ], urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName], headerParameters: [Parameters.accept], serializer };