appcenter-cli
Version:
Command line tool for Visual Studio App Center
464 lines (463 loc) • 17.4 kB
JavaScript
"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.CrashesImpl = void 0;
const coreClient = require("@azure/core-client");
const Mappers = require("../models/mappers");
const Parameters = require("../models/parameters");
/** Class containing Crashes operations. */
class CrashesImpl {
/**
* Initialize a new instance of the class Crashes class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets a list of application versions.
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getAppVersions(ownerName, appName, options) {
return this.client.sendOperationRequest({ ownerName, appName, options }, getAppVersionsOperationSpec);
}
/**
* Gets whether the application has any crashes.
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getAppCrashesInfo(ownerName, appName, options) {
return this.client.sendOperationRequest({ ownerName, appName, options }, getAppCrashesInfoOperationSpec);
}
/**
* Get session logs by crash ID
* @param crashId The id of the a crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
listSessionLogs(crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashId, ownerName, appName, options }, listSessionLogsOperationSpec);
}
/**
* Gets content of the text attachment.
* @param crashId id of a specific crash
* @param attachmentId attachment id
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getCrashTextAttachmentContent(crashId, attachmentId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashId, attachmentId, ownerName, appName, options }, getCrashTextAttachmentContentOperationSpec);
}
/**
* Gets the URI location to download crash attachment.
* @param crashId id of a specific crash
* @param attachmentId attachment id
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getCrashAttachmentLocation(crashId, attachmentId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashId, attachmentId, ownerName, appName, options }, getCrashAttachmentLocationOperationSpec);
}
/**
* Gets all attachments for a specific crash.
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
listAttachments(crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashId, ownerName, appName, options }, listAttachmentsOperationSpec);
}
/**
* Gets a stacktrace for a specific crash.
* @param crashGroupId id of a specific group
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getStacktrace(crashGroupId, crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, crashId, ownerName, appName, options }, getStacktraceOperationSpec);
}
/**
* Gets the URI location to download json of a specific crash.
* @param crashGroupId id of a specific group
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getRawCrashLocation(crashGroupId, crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, crashId, ownerName, appName, options }, getRawCrashLocationOperationSpec);
}
/**
* Gets the native log of a specific crash as a text attachment.
* @param crashGroupId id of a specific group
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getNativeCrashDownload(crashGroupId, crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, crashId, ownerName, appName, options }, getNativeCrashDownloadOperationSpec);
}
/**
* Gets the native log of a specific crash.
* @param crashGroupId id of a specific group
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getNativeCrash(crashGroupId, crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, crashId, ownerName, appName, options }, getNativeCrashOperationSpec);
}
/**
* Gets a specific crash for an app.
* @param crashGroupId id of a specific group
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
get(crashGroupId, crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, crashId, ownerName, appName, options }, getOperationSpec);
}
/**
* Delete a specific crash and related attachments and blobs for an app.
* @param crashGroupId id of a specific group
* @param crashId id of a specific crash
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
delete(crashGroupId, crashId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, crashId, ownerName, appName, options }, deleteOperationSpec);
}
/**
* Gets all crashes of 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.
*/
list(crashGroupId, ownerName, appName, options) {
return this.client.sendOperationRequest({ crashGroupId, ownerName, appName, options }, listOperationSpec);
}
}
exports.CrashesImpl = CrashesImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getAppVersionsOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/versions",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "Paths1MuofruV01AppsOwnerNameAppNameVersionsGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper: Mappers.PathsDgnk0AV01AppsOwnerNameAppNameVersionsGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.accept],
serializer
};
const getAppCrashesInfoOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crashes_info",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PathsA8ApyzV01AppsOwnerNameAppNameCrashesInfoGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsBhrh3SV01AppsOwnerNameAppNameCrashesInfoGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.accept],
serializer
};
const listSessionLogsOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crashes/{crash_id}/session_logs",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Paths1Ut4QauV01AppsOwnerNameAppNameCrashesCrashIdSessionLogsGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsRtgrgxV01AppsOwnerNameAppNameCrashesCrashIdSessionLogsGetResponsesDefaultContentApplicationJsonSchema
}
},
queryParameters: [Parameters.date],
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId
],
headerParameters: [Parameters.accept],
serializer
};
const getCrashTextAttachmentContentOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crashes/{crash_id}/attachments/{attachment_id}/text",
httpMethod: "GET",
responses: {
200: {
bodyMapper: { type: { name: "String" } }
},
default: {
bodyMapper: Mappers.Paths2Myey8V01AppsOwnerNameAppNameCrashesCrashIdAttachmentsAttachmentIdTextGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.attachmentId
],
headerParameters: [Parameters.accept],
serializer
};
const getCrashAttachmentLocationOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crashes/{crash_id}/attachments/{attachment_id}/location",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Paths1520RtwV01AppsOwnerNameAppNameCrashesCrashIdAttachmentsAttachmentIdLocationGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsM7AdswV01AppsOwnerNameAppNameCrashesCrashIdAttachmentsAttachmentIdLocationGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.attachmentId
],
headerParameters: [Parameters.accept],
serializer
};
const listAttachmentsOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crashes/{crash_id}/attachments",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "Paths1Yzy65LV01AppsOwnerNameAppNameCrashesCrashIdAttachmentsGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper: Mappers.Paths1Kphy82V01AppsOwnerNameAppNameCrashesCrashIdAttachmentsGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId
],
headerParameters: [Parameters.accept],
serializer
};
const getStacktraceOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes/{crash_id}/stacktrace",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Stacktrace
},
default: {
bodyMapper: Mappers.Paths1Ow10Y0V01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdStacktraceGetResponsesDefaultContentApplicationJsonSchema
}
},
queryParameters: [Parameters.groupingOnly],
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};
const getRawCrashLocationOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes/{crash_id}/raw/location",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Paths5WkrbzV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdRawLocationGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.Paths1Ft0W9TV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdRawLocationGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};
const getNativeCrashDownloadOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes/{crash_id}/native/download",
httpMethod: "GET",
responses: {
200: {
bodyMapper: { type: { name: "String" } }
},
default: {
bodyMapper: Mappers.Paths1Oul3BhV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdNativeDownloadGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};
const getNativeCrashOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes/{crash_id}/native",
httpMethod: "GET",
responses: {
200: {
bodyMapper: { type: { name: "String" } }
},
default: {
bodyMapper: Mappers.PathsFd64KmV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdNativeGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes/{crash_id}",
httpMethod: "GET",
responses: {
201: {
bodyMapper: Mappers.Crash
},
default: {
bodyMapper: Mappers.Paths13Dx2ZcV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdGetResponsesDefaultContentApplicationJsonSchema
}
},
queryParameters: [
Parameters.groupingOnly,
Parameters.includeReport,
Parameters.includeLog,
Parameters.includeDetails,
Parameters.includeStacktrace
],
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};
const deleteOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes/{crash_id}",
httpMethod: "DELETE",
responses: {
200: {
bodyMapper: Mappers.Paths10HkftV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdDeleteResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsL75Q9YV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesCrashIdDeleteResponsesDefaultContentApplicationJsonSchema
}
},
queryParameters: [Parameters.retentionDelete],
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashId,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/crash_groups/{crash_group_id}/crashes",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: { type: { name: "Composite", className: "Crash" } }
}
}
},
default: {
bodyMapper: Mappers.Paths1U57JmnV01AppsOwnerNameAppNameCrashGroupsCrashGroupIdCrashesGetResponsesDefaultContentApplicationJsonSchema
}
},
queryParameters: [
Parameters.includeReport,
Parameters.includeLog,
Parameters.dateFrom,
Parameters.dateTo,
Parameters.appVersion1,
Parameters.errorType
],
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.crashGroupId
],
headerParameters: [Parameters.accept],
serializer
};