/** * Dynatrace Configuration API * Documentation of the Dynatrace Configuration API. Refer to the [help page](https://www.dynatrace.com/support/help/shortlink/config-api) to read about use-cases and examples. Notes about compatibility: * Operations marked as early adopter or preview may be changed in non-compatible ways, although we try to avoid this. * We may add new enum constants without incrementing the API version; thus, clients need to handle unknown enum constants gracefully. * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import localVarRequest = require('request'); import http = require('http'); /* tslint:disable:no-unused-locals */ import { ErrorEnvelope } from '../model/errorEnvelope'; import { SupportedVersion } from '../model/supportedVersion'; import { SymbolFile } from '../model/symbolFile'; import { SymbolFileClientLinkDto } from '../model/symbolFileClientLinkDto'; import { SymbolFileList } from '../model/symbolFileList'; import { SymbolFilePinning } from '../model/symbolFilePinning'; import { SymbolFileStorageInfo } from '../model/symbolFileStorageInfo'; import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'https://dynatrace.nonprod.jbhunt.com/e/2063b0c9-e776-4494-9095-10036c37e2ab/api/config/v1'; // =============================================== // This file is autogenerated - Please do not edit // =============================================== export enum MobileDeobfuscationAndSymbolicationApiApiKeys { Api-Token, } export class MobileDeobfuscationAndSymbolicationApi { protected _basePath = defaultBasePath; protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { 'default': new VoidAuth(), 'Api-Token': new ApiKeyAuth('header', 'Authorization'), } protected interceptors: Interceptor[] = []; constructor(basePath?: string); constructor(basePathOrUsername: string, password?: string, basePath?: string) { if (password) { if (basePath) { this.basePath = basePath; } } else { if (basePathOrUsername) { this.basePath = basePathOrUsername } } } set useQuerystring(value: boolean) { this._useQuerystring = value; } set basePath(basePath: string) { this._basePath = basePath; } set defaultHeaders(defaultHeaders: any) { this._defaultHeaders = defaultHeaders; } get defaultHeaders() { return this._defaultHeaders; } get basePath() { return this._basePath; } public setDefaultAuthentication(auth: Authentication) { this.authentications.default = auth; } public setApiKey(key: MobileDeobfuscationAndSymbolicationApiApiKeys, value: string) { (this.authentications as any)[MobileDeobfuscationAndSymbolicationApiApiKeys[key]].apiKey = value; } public addInterceptor(interceptor: Interceptor) { this.interceptors.push(interceptor); } /** * * @summary Upload a symbolication file. Either a ProGuard file for Android or a zip file containing all the iOS dSYM files. * @param applicationId The application id used in Dynatrace of the app this file belongs to * @param packageName The CFBundleIdentifier (iOS) or the package name (Android) which identifies the app associated with the uploaded file * @param os The operating system the file belongs to * @param versionCode The version code (Android) / CFBundleVersion (iOS) the file belongs to * @param versionName The version name (Android) / CFBundleShortVersionString (iOS) the file belongs to * @param body The file to be uploaded. A proguard file (*.txt) for Android or the zip file produced by the DTXDSSClient provided with the OneAgent for iOS. * @param contentType */ public async createOrUpdate (applicationId: string, packageName: string, os: 'ANDROID' | 'IOS' | 'TVOS', versionCode: string, versionName: string, body: RequestFile, contentType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}/{packageName}/{os}/{versionCode}/{versionName}' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))) .replace('{' + 'packageName' + '}', encodeURIComponent(String(packageName))) .replace('{' + 'os' + '}', encodeURIComponent(String(os))) .replace('{' + 'versionCode' + '}', encodeURIComponent(String(versionCode))) .replace('{' + 'versionName' + '}', encodeURIComponent(String(versionName))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['*/*']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling createOrUpdate.'); } // verify required parameter 'packageName' is not null or undefined if (packageName === null || packageName === undefined) { throw new Error('Required parameter packageName was null or undefined when calling createOrUpdate.'); } // verify required parameter 'os' is not null or undefined if (os === null || os === undefined) { throw new Error('Required parameter os was null or undefined when calling createOrUpdate.'); } // verify required parameter 'versionCode' is not null or undefined if (versionCode === null || versionCode === undefined) { throw new Error('Required parameter versionCode was null or undefined when calling createOrUpdate.'); } // verify required parameter 'versionName' is not null or undefined if (versionName === null || versionName === undefined) { throw new Error('Required parameter versionName was null or undefined when calling createOrUpdate.'); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createOrUpdate.'); } localVarHeaderParams['content-type'] = ObjectSerializer.serialize(contentType, "string"); (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "RequestFile") }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Pin or unpin all symbolication files of a app version. A pinned file will not be deleted automtically, when running out of space. * @param applicationId The application id used in Dynatrace of the app which should be (un)pinned * @param packageName The CFBundleIdentifier (iOS) or the package name (Android) which identifies the app associated with the files to be (un)pinned * @param os The operating system for which the files will be (un)pinned * @param versionCode The version code (Android) / CFBundleVersion (iOS) the file belongs to * @param versionName The version name (Android) / CFBundleShortVersionString (iOS) the file belongs to * @param symbolFilePinning JSON body of the request, containing the pinning status to set. */ public async createOrUpdatePinning (applicationId: string, packageName: string, os: 'ANDROID' | 'IOS' | 'TVOS', versionCode: string, versionName: string, symbolFilePinning?: SymbolFilePinning, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}/{packageName}/{os}/{versionCode}/{versionName}/pinning' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))) .replace('{' + 'packageName' + '}', encodeURIComponent(String(packageName))) .replace('{' + 'os' + '}', encodeURIComponent(String(os))) .replace('{' + 'versionCode' + '}', encodeURIComponent(String(versionCode))) .replace('{' + 'versionName' + '}', encodeURIComponent(String(versionName))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['*/*']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling createOrUpdatePinning.'); } // verify required parameter 'packageName' is not null or undefined if (packageName === null || packageName === undefined) { throw new Error('Required parameter packageName was null or undefined when calling createOrUpdatePinning.'); } // verify required parameter 'os' is not null or undefined if (os === null || os === undefined) { throw new Error('Required parameter os was null or undefined when calling createOrUpdatePinning.'); } // verify required parameter 'versionCode' is not null or undefined if (versionCode === null || versionCode === undefined) { throw new Error('Required parameter versionCode was null or undefined when calling createOrUpdatePinning.'); } // verify required parameter 'versionName' is not null or undefined if (versionName === null || versionName === undefined) { throw new Error('Required parameter versionName was null or undefined when calling createOrUpdatePinning.'); } (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(symbolFilePinning, "SymbolFilePinning") }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Deletes all symbolication file belonging to the Dynatrace App specified * @param applicationId The application id used in Dynatrace of the mobile application the files will be deleted */ public async deleteApp (applicationId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['*/*']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling deleteApp.'); } (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Delete the symbolication file belonging to the given application, os and version * @param applicationId The application id used in Dynatrace of the mobile application where a file should be deleted * @param packageName The CFBundleIdentifier (iOS) or the package name (Android) which identifies the app associated with the file to be deleted * @param os The operating system the file belongs to * @param versionCode The version code (Android) / CFBundleVersion (iOS) of the file to be deleted * @param versionName The version name (Android) / CFBundleShortVersionString (iOS) of the file to be deleted */ public async deleteSingleFile (applicationId: string, packageName: string, os: 'ANDROID' | 'IOS' | 'TVOS', versionCode: string, versionName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}/{packageName}/{os}/{versionCode}/{versionName}' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))) .replace('{' + 'packageName' + '}', encodeURIComponent(String(packageName))) .replace('{' + 'os' + '}', encodeURIComponent(String(os))) .replace('{' + 'versionCode' + '}', encodeURIComponent(String(versionCode))) .replace('{' + 'versionName' + '}', encodeURIComponent(String(versionName))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['*/*']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling deleteSingleFile.'); } // verify required parameter 'packageName' is not null or undefined if (packageName === null || packageName === undefined) { throw new Error('Required parameter packageName was null or undefined when calling deleteSingleFile.'); } // verify required parameter 'os' is not null or undefined if (os === null || os === undefined) { throw new Error('Required parameter os was null or undefined when calling deleteSingleFile.'); } // verify required parameter 'versionCode' is not null or undefined if (versionCode === null || versionCode === undefined) { throw new Error('Required parameter versionCode was null or undefined when calling deleteSingleFile.'); } // verify required parameter 'versionName' is not null or undefined if (versionName === null || versionName === undefined) { throw new Error('Required parameter versionName was null or undefined when calling deleteSingleFile.'); } (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'DELETE', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Lists the metadata of all symbolication files (ProGuard files for Android or dSYM files for iOS Apps) from the Symbol File Store. */ public async getAll (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: SymbolFileList; }> { const localVarPath = this.basePath + '/symfiles'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json; charset=utf-8']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body: SymbolFileList; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "SymbolFileList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Lists the metadata of all symbolication files (ProGuard files for Android or dSYM files for iOS Apps) for one single mobile application from the Symbol File Store of this tenant. * @param applicationId The application id used in Dynatrace for the mobile application to be queried */ public async getAllPerApplication (applicationId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: SymbolFileList; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json; charset=utf-8']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling getAllPerApplication.'); } (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body: SymbolFileList; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "SymbolFileList"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Gets a download link for the latest version of the DTXDSSClient. */ public async getDssClientUrl (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: SymbolFileClientLinkDto; }> { const localVarPath = this.basePath + '/symfiles/dtxdss-download'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json; charset=utf-8']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body: SymbolFileClientLinkDto; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "SymbolFileClientLinkDto"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Retrieves information about used/empty diskspace, number of stored files,.... */ public async getInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: SymbolFileStorageInfo; }> { const localVarPath = this.basePath + '/symfiles/info'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json; charset=utf-8']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body: SymbolFileStorageInfo; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "SymbolFileStorageInfo"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Gets the metadata of the symbolication file belonging to the specified app version. There always can exist only one file per os and version * @param applicationId The application id used in Dynatrace for the mobile application to be queried * @param packageName The CFBundleIdentifier (iOS) or the package name (Android) which identifies the app to be queried * @param os The operating system for which the file should be displayed. * @param versionCode The version code (Android) / CFBundleVersion (iOS) of the file to be retrieved * @param versionName The version name (Android) / CFBundleShortVersionString (iOS) of the file to be retrieved */ public async getSingle (applicationId: string, packageName: string, os: 'ANDROID' | 'IOS' | 'TVOS', versionCode: string, versionName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: SymbolFile; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}/{packageName}/{os}/{versionCode}/{versionName}' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))) .replace('{' + 'packageName' + '}', encodeURIComponent(String(packageName))) .replace('{' + 'os' + '}', encodeURIComponent(String(os))) .replace('{' + 'versionCode' + '}', encodeURIComponent(String(versionCode))) .replace('{' + 'versionName' + '}', encodeURIComponent(String(versionName))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json; charset=utf-8']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling getSingle.'); } // verify required parameter 'packageName' is not null or undefined if (packageName === null || packageName === undefined) { throw new Error('Required parameter packageName was null or undefined when calling getSingle.'); } // verify required parameter 'os' is not null or undefined if (os === null || os === undefined) { throw new Error('Required parameter os was null or undefined when calling getSingle.'); } // verify required parameter 'versionCode' is not null or undefined if (versionCode === null || versionCode === undefined) { throw new Error('Required parameter versionCode was null or undefined when calling getSingle.'); } // verify required parameter 'versionName' is not null or undefined if (versionName === null || versionName === undefined) { throw new Error('Required parameter versionName was null or undefined when calling getSingle.'); } (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body: SymbolFile; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "SymbolFile"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Returns the supported file format version for iOS symbol files. */ public async getSupportedVersion (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: SupportedVersion; }> { const localVarPath = this.basePath + '/symfiles/ios/supportedversion'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json; charset=utf-8']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body: SupportedVersion; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "SupportedVersion"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } /** * * @summary Validate updates of existing request attribute for the `PUT /{applicationId}/{packageName}/{os}/{versionName}/pinning` request. * @param applicationId The application id used in Dynatrace of the app which should be (un)pinned * @param packageName The CFBundleIdentifier (iOS) or the package name (Android) which identifies the app associated with the files to be (un)pinned * @param os The operating system for which the files will be (un)pinned * @param versionCode The version code (Android) / CFBundleVersion (iOS) the file belongs to * @param versionName The version name (Android) / CFBundleShortVersionString (iOS) the file belongs to * @param symbolFilePinning JSON body of the request, containing the pinning status to set. */ public async validatePinning (applicationId: string, packageName: string, os: 'ANDROID' | 'IOS' | 'TVOS', versionCode: string, versionName: string, symbolFilePinning?: SymbolFilePinning, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/symfiles/{applicationId}/{packageName}/{os}/{versionCode}/{versionName}/pinning/validator' .replace('{' + 'applicationId' + '}', encodeURIComponent(String(applicationId))) .replace('{' + 'packageName' + '}', encodeURIComponent(String(packageName))) .replace('{' + 'os' + '}', encodeURIComponent(String(os))) .replace('{' + 'versionCode' + '}', encodeURIComponent(String(versionCode))) .replace('{' + 'versionName' + '}', encodeURIComponent(String(versionName))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['*/*']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; // verify required parameter 'applicationId' is not null or undefined if (applicationId === null || applicationId === undefined) { throw new Error('Required parameter applicationId was null or undefined when calling validatePinning.'); } // verify required parameter 'packageName' is not null or undefined if (packageName === null || packageName === undefined) { throw new Error('Required parameter packageName was null or undefined when calling validatePinning.'); } // verify required parameter 'os' is not null or undefined if (os === null || os === undefined) { throw new Error('Required parameter os was null or undefined when calling validatePinning.'); } // verify required parameter 'versionCode' is not null or undefined if (versionCode === null || versionCode === undefined) { throw new Error('Required parameter versionCode was null or undefined when calling validatePinning.'); } // verify required parameter 'versionName' is not null or undefined if (versionName === null || versionName === undefined) { throw new Error('Required parameter versionName was null or undefined when calling validatePinning.'); } (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'PUT', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(symbolFilePinning, "SymbolFilePinning") }; let authenticationPromise = Promise.resolve(); if (this.authentications.Api-Token.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.Api-Token.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); } }