UNPKG

@datadog/datadog-api-client

Version:
659 lines (658 loc) 27 kB
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; import { Configuration } from "../../datadog-api-client-common/configuration"; import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http"; import { ListSourcemapsResponse } from "../models/ListSourcemapsResponse"; import { RUMAggregateRequest } from "../models/RUMAggregateRequest"; import { RUMAnalyticsAggregateResponse } from "../models/RUMAnalyticsAggregateResponse"; import { RUMApplicationCreateRequest } from "../models/RUMApplicationCreateRequest"; import { RUMApplicationResponse } from "../models/RUMApplicationResponse"; import { RUMApplicationsResponse } from "../models/RUMApplicationsResponse"; import { RUMApplicationUpdateRequest } from "../models/RUMApplicationUpdateRequest"; import { RUMEvent } from "../models/RUMEvent"; import { RUMEventsResponse } from "../models/RUMEventsResponse"; import { RUMSearchEventsRequest } from "../models/RUMSearchEventsRequest"; import { RUMSort } from "../models/RUMSort"; import { ServiceRepositoryInfoRequest } from "../models/ServiceRepositoryInfoRequest"; import { ServiceRepositoryInfoResponse } from "../models/ServiceRepositoryInfoResponse"; import { SourcemapFileResponse } from "../models/SourcemapFileResponse"; import { SourcemapMapKind } from "../models/SourcemapMapKind"; import { SourcemapsResponse } from "../models/SourcemapsResponse"; export declare class RUMApiRequestFactory extends BaseAPIRequestFactory { aggregateRUMEvents(body: RUMAggregateRequest, _options?: Configuration): Promise<RequestContext>; createRUMApplication(body: RUMApplicationCreateRequest, _options?: Configuration): Promise<RequestContext>; deleteRUMApplication(id: string, _options?: Configuration): Promise<RequestContext>; deleteSourcemaps(mapkind: SourcemapMapKind, dryRun: boolean, filterService?: Array<string>, filterVersion?: Array<string>, filterVariant?: Array<string>, filterId?: Array<string>, filterBuildId?: Array<string>, filterUuid?: Array<string>, filterPlatform?: Array<string>, filterBuildNumber?: Array<string>, filterBundleName?: Array<string>, filterArch?: Array<string>, filterSymbolSource?: Array<string>, filterOrigin?: Array<string>, filterOriginVersion?: Array<string>, filterFilename?: string, filterDebugId?: string, filterGnuBuildId?: string, filterGoBuildId?: string, filterFileHash?: string, _options?: Configuration): Promise<RequestContext>; getRUMApplication(id: string, _options?: Configuration): Promise<RequestContext>; getRUMApplications(_options?: Configuration): Promise<RequestContext>; getServiceRepositoryInfo(body: ServiceRepositoryInfoRequest, _options?: Configuration): Promise<RequestContext>; getSourcemaps(filename: string, service: string, version: string, _options?: Configuration): Promise<RequestContext>; listRUMEvents(filterQuery?: string, filterFrom?: Date, filterTo?: Date, sort?: RUMSort, pageCursor?: string, pageLimit?: number, _options?: Configuration): Promise<RequestContext>; listSourcemaps(mapkind?: SourcemapMapKind, pageSize?: number, pageNumber?: number, filterService?: Array<string>, filterVersion?: Array<string>, filterVariant?: Array<string>, filterId?: Array<string>, filterBuildId?: Array<string>, filterUuid?: Array<string>, filterPlatform?: Array<string>, filterBuildNumber?: Array<string>, filterBundleName?: Array<string>, filterArch?: Array<string>, filterSymbolSource?: Array<string>, filterOrigin?: Array<string>, filterOriginVersion?: Array<string>, filterFilename?: string, filterDebugId?: string, filterGnuBuildId?: string, filterGoBuildId?: string, filterFileHash?: string, _options?: Configuration): Promise<RequestContext>; restoreSourcemaps(mapkind: SourcemapMapKind, dryRun: boolean, filterService?: Array<string>, filterVersion?: Array<string>, filterVariant?: Array<string>, filterId?: Array<string>, filterBuildId?: Array<string>, filterUuid?: Array<string>, filterPlatform?: Array<string>, filterBuildNumber?: Array<string>, filterBundleName?: Array<string>, filterArch?: Array<string>, filterSymbolSource?: Array<string>, filterOrigin?: Array<string>, filterOriginVersion?: Array<string>, filterFilename?: string, filterDebugId?: string, filterGnuBuildId?: string, filterGoBuildId?: string, filterFileHash?: string, _options?: Configuration): Promise<RequestContext>; searchRUMEvents(body: RUMSearchEventsRequest, _options?: Configuration): Promise<RequestContext>; updateRUMApplication(id: string, body: RUMApplicationUpdateRequest, _options?: Configuration): Promise<RequestContext>; } export declare class RUMApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to aggregateRUMEvents * @throws ApiException if the response code was not in [200, 299] */ aggregateRUMEvents(response: ResponseContext): Promise<RUMAnalyticsAggregateResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createRUMApplication * @throws ApiException if the response code was not in [200, 299] */ createRUMApplication(response: ResponseContext): Promise<RUMApplicationResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteRUMApplication * @throws ApiException if the response code was not in [200, 299] */ deleteRUMApplication(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteSourcemaps * @throws ApiException if the response code was not in [200, 299] */ deleteSourcemaps(response: ResponseContext): Promise<SourcemapsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getRUMApplication * @throws ApiException if the response code was not in [200, 299] */ getRUMApplication(response: ResponseContext): Promise<RUMApplicationResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getRUMApplications * @throws ApiException if the response code was not in [200, 299] */ getRUMApplications(response: ResponseContext): Promise<RUMApplicationsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getServiceRepositoryInfo * @throws ApiException if the response code was not in [200, 299] */ getServiceRepositoryInfo(response: ResponseContext): Promise<ServiceRepositoryInfoResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getSourcemaps * @throws ApiException if the response code was not in [200, 299] */ getSourcemaps(response: ResponseContext): Promise<SourcemapFileResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listRUMEvents * @throws ApiException if the response code was not in [200, 299] */ listRUMEvents(response: ResponseContext): Promise<RUMEventsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listSourcemaps * @throws ApiException if the response code was not in [200, 299] */ listSourcemaps(response: ResponseContext): Promise<ListSourcemapsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to restoreSourcemaps * @throws ApiException if the response code was not in [200, 299] */ restoreSourcemaps(response: ResponseContext): Promise<SourcemapsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to searchRUMEvents * @throws ApiException if the response code was not in [200, 299] */ searchRUMEvents(response: ResponseContext): Promise<RUMEventsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateRUMApplication * @throws ApiException if the response code was not in [200, 299] */ updateRUMApplication(response: ResponseContext): Promise<RUMApplicationResponse>; } export interface RUMApiAggregateRUMEventsRequest { /** * @type RUMAggregateRequest */ body: RUMAggregateRequest; } export interface RUMApiCreateRUMApplicationRequest { /** * @type RUMApplicationCreateRequest */ body: RUMApplicationCreateRequest; } export interface RUMApiDeleteRUMApplicationRequest { /** * RUM application ID. * @type string */ id: string; } export interface RUMApiDeleteSourcemapsRequest { /** * The type of source map. Valid values are `js`, `jvm`, `ios`, * `react`, `flutter`, `elf`, `ndk`, `il2cpp`. * @type SourcemapMapKind */ mapkind: SourcemapMapKind; /** * When set to `true`, returns the source maps that would be deleted * without performing the actual deletion. When set to `false`, * performs the deletion. * @type boolean */ dryRun: boolean; /** * Filter by service names (multiple values allowed). Required for * `js`, `jvm`, `react`, and `flutter` map kinds. * @type Array<string> */ filterService?: Array<string>; /** * Filter by version values (multiple values allowed, maximum 10). * Required for `js`, `jvm`, `react`, and `flutter` map kinds. * @type Array<string> */ filterVersion?: Array<string>; /** * Filter by variant values (multiple values allowed). Supported for `jvm`. * @type Array<string> */ filterVariant?: Array<string>; /** * Filter by source map ID values (multiple values allowed). Supported for all map kinds. * @type Array<string> */ filterId?: Array<string>; /** * Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. * @type Array<string> */ filterBuildId?: Array<string>; /** * Filter by UUID values (multiple values allowed). Supported for `ios`. * @type Array<string> */ filterUuid?: Array<string>; /** * Filter by platform values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterPlatform?: Array<string>; /** * Filter by build number values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterBuildNumber?: Array<string>; /** * Filter by bundle name values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterBundleName?: Array<string>; /** * Filter by architecture values (multiple values allowed). Supported * for `flutter`, `elf`, and `ndk`. * @type Array<string> */ filterArch?: Array<string>; /** * Filter by symbol source values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterSymbolSource?: Array<string>; /** * Filter by origin values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterOrigin?: Array<string>; /** * Filter by origin version values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterOriginVersion?: Array<string>; /** * Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. * @type string */ filterFilename?: string; /** * Filter by debug ID (single value). Supported for `react`. * @type string */ filterDebugId?: string; /** * Filter by GNU build ID (single value). Supported for `elf`. * @type string */ filterGnuBuildId?: string; /** * Filter by Go build ID (single value). Supported for `elf`. * @type string */ filterGoBuildId?: string; /** * Filter by file hash (single value). Supported for `elf`. * @type string */ filterFileHash?: string; } export interface RUMApiGetRUMApplicationRequest { /** * RUM application ID. * @type string */ id: string; } export interface RUMApiGetServiceRepositoryInfoRequest { /** * @type ServiceRepositoryInfoRequest */ body: ServiceRepositoryInfoRequest; } export interface RUMApiGetSourcemapsRequest { /** * The path to the source map file. * @type string */ filename: string; /** * The service name associated with the source map. * @type string */ service: string; /** * The version of the service associated with the source map. * @type string */ version: string; } export interface RUMApiListRUMEventsRequest { /** * Search query following RUM syntax. * @type string */ filterQuery?: string; /** * Minimum timestamp for requested events. * @type Date */ filterFrom?: Date; /** * Maximum timestamp for requested events. * @type Date */ filterTo?: Date; /** * Order of events in results. * @type RUMSort */ sort?: RUMSort; /** * List following results with a cursor provided in the previous query. * @type string */ pageCursor?: string; /** * Maximum number of events in the response. * @type number */ pageLimit?: number; } export interface RUMApiListSourcemapsRequest { /** * The type of source map. Defaults to `js`. * @type SourcemapMapKind */ mapkind?: SourcemapMapKind; /** * The number of results to return per page. Must be at least 1. * @type number */ pageSize?: number; /** * The page number to retrieve, starting from 1. * @type number */ pageNumber?: number; /** * Filter by service names (multiple values allowed). Required for * `js`, `jvm`, `react`, and `flutter` map kinds. * @type Array<string> */ filterService?: Array<string>; /** * Filter by version values (multiple values allowed). Required for * `js`, `jvm`, `react`, and `flutter` map kinds. * @type Array<string> */ filterVersion?: Array<string>; /** * Filter by variant values (multiple values allowed). Supported for `jvm`. * @type Array<string> */ filterVariant?: Array<string>; /** * Filter by source map ID values (multiple values allowed). Supported for all map kinds. * @type Array<string> */ filterId?: Array<string>; /** * Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. * @type Array<string> */ filterBuildId?: Array<string>; /** * Filter by UUID values (multiple values allowed). Supported for `ios`. * @type Array<string> */ filterUuid?: Array<string>; /** * Filter by platform values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterPlatform?: Array<string>; /** * Filter by build number values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterBuildNumber?: Array<string>; /** * Filter by bundle name values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterBundleName?: Array<string>; /** * Filter by architecture values (multiple values allowed). Supported * for `flutter`, `elf`, and `ndk`. * @type Array<string> */ filterArch?: Array<string>; /** * Filter by symbol source values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterSymbolSource?: Array<string>; /** * Filter by origin values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterOrigin?: Array<string>; /** * Filter by origin version values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterOriginVersion?: Array<string>; /** * Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. * @type string */ filterFilename?: string; /** * Filter by debug ID (single value). Supported for `react`. * @type string */ filterDebugId?: string; /** * Filter by GNU build ID (single value). Supported for `elf`. * @type string */ filterGnuBuildId?: string; /** * Filter by Go build ID (single value). Supported for `elf`. * @type string */ filterGoBuildId?: string; /** * Filter by file hash (single value). Supported for `elf`. * @type string */ filterFileHash?: string; } export interface RUMApiRestoreSourcemapsRequest { /** * The type of source map. Valid values are `js`, `jvm`, `ios`, * `react`, `flutter`, `elf`, `ndk`, `il2cpp`. * @type SourcemapMapKind */ mapkind: SourcemapMapKind; /** * When set to `true`, returns the source maps that would be restored * without performing the actual restoration. When set to `false`, * performs the restoration. * @type boolean */ dryRun: boolean; /** * Filter by service names (multiple values allowed). Required for * `js`, `jvm`, `react`, and `flutter` map kinds. * @type Array<string> */ filterService?: Array<string>; /** * Filter by version values (multiple values allowed, maximum 10). * Required for `js`, `jvm`, `react`, and `flutter` map kinds. * @type Array<string> */ filterVersion?: Array<string>; /** * Filter by variant values (multiple values allowed). Supported for `jvm`. * @type Array<string> */ filterVariant?: Array<string>; /** * Filter by source map ID values (multiple values allowed). Supported for all map kinds. * @type Array<string> */ filterId?: Array<string>; /** * Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. * @type Array<string> */ filterBuildId?: Array<string>; /** * Filter by UUID values (multiple values allowed). Supported for `ios`. * @type Array<string> */ filterUuid?: Array<string>; /** * Filter by platform values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterPlatform?: Array<string>; /** * Filter by build number values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterBuildNumber?: Array<string>; /** * Filter by bundle name values (multiple values allowed). Supported for `react`. * @type Array<string> */ filterBundleName?: Array<string>; /** * Filter by architecture values (multiple values allowed). Supported * for `flutter`, `elf`, and `ndk`. * @type Array<string> */ filterArch?: Array<string>; /** * Filter by symbol source values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterSymbolSource?: Array<string>; /** * Filter by origin values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterOrigin?: Array<string>; /** * Filter by origin version values (multiple values allowed). Supported for `elf`. * @type Array<string> */ filterOriginVersion?: Array<string>; /** * Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. * @type string */ filterFilename?: string; /** * Filter by debug ID (single value). Supported for `react`. * @type string */ filterDebugId?: string; /** * Filter by GNU build ID (single value). Supported for `elf`. * @type string */ filterGnuBuildId?: string; /** * Filter by Go build ID (single value). Supported for `elf`. * @type string */ filterGoBuildId?: string; /** * Filter by file hash (single value). Supported for `elf`. * @type string */ filterFileHash?: string; } export interface RUMApiSearchRUMEventsRequest { /** * @type RUMSearchEventsRequest */ body: RUMSearchEventsRequest; } export interface RUMApiUpdateRUMApplicationRequest { /** * RUM application ID. * @type string */ id: string; /** * @type RUMApplicationUpdateRequest */ body: RUMApplicationUpdateRequest; } export declare class RUMApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: RUMApiRequestFactory, responseProcessor?: RUMApiResponseProcessor); /** * The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. * @param param The request object */ aggregateRUMEvents(param: RUMApiAggregateRUMEventsRequest, options?: Configuration): Promise<RUMAnalyticsAggregateResponse>; /** * Create a new RUM application in your organization. * @param param The request object */ createRUMApplication(param: RUMApiCreateRUMApplicationRequest, options?: Configuration): Promise<RUMApplicationResponse>; /** * Delete an existing RUM application in your organization. * @param param The request object */ deleteRUMApplication(param: RUMApiDeleteRUMApplicationRequest, options?: Configuration): Promise<void>; /** * Deletes source maps matching the specified filter criteria. Supports * dry-run mode to preview which source maps would be deleted without * performing the actual deletion. * @param param The request object */ deleteSourcemaps(param: RUMApiDeleteSourcemapsRequest, options?: Configuration): Promise<SourcemapsResponse>; /** * Get the RUM application with given ID in your organization. * @param param The request object */ getRUMApplication(param: RUMApiGetRUMApplicationRequest, options?: Configuration): Promise<RUMApplicationResponse>; /** * List all the RUM applications in your organization. * @param param The request object */ getRUMApplications(options?: Configuration): Promise<RUMApplicationsResponse>; /** * Returns the repository URL and commit SHA associated with a given service and version. * @param param The request object */ getServiceRepositoryInfo(param: RUMApiGetServiceRepositoryInfoRequest, options?: Configuration): Promise<ServiceRepositoryInfoResponse>; /** * Retrieves the content of a specific JavaScript source map file by its * filename, service name, and version. * @param param The request object */ getSourcemaps(param: RUMApiGetSourcemapsRequest, options?: Configuration): Promise<SourcemapFileResponse>; /** * List endpoint returns events that match a RUM search query. * [Results are paginated][1]. * * Use this endpoint to see your latest RUM events. * * [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination * @param param The request object */ listRUMEvents(param?: RUMApiListRUMEventsRequest, options?: Configuration): Promise<RUMEventsResponse>; /** * Provide a paginated version of listRUMEvents returning a generator with all the items. */ listRUMEventsWithPagination(param?: RUMApiListRUMEventsRequest, options?: Configuration): AsyncGenerator<RUMEvent>; /** * Retrieves a paginated list of source maps matching the specified filter criteria. * @param param The request object */ listSourcemaps(param?: RUMApiListSourcemapsRequest, options?: Configuration): Promise<ListSourcemapsResponse>; /** * Restores previously deleted source maps matching the specified filter * criteria. Supports dry-run mode to preview which source maps would be * restored without performing the actual restoration. * @param param The request object */ restoreSourcemaps(param: RUMApiRestoreSourcemapsRequest, options?: Configuration): Promise<SourcemapsResponse>; /** * List endpoint returns RUM events that match a RUM search query. * [Results are paginated][1]. * * Use this endpoint to build complex RUM events filtering and search. * * [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination * @param param The request object */ searchRUMEvents(param: RUMApiSearchRUMEventsRequest, options?: Configuration): Promise<RUMEventsResponse>; /** * Provide a paginated version of searchRUMEvents returning a generator with all the items. */ searchRUMEventsWithPagination(param: RUMApiSearchRUMEventsRequest, options?: Configuration): AsyncGenerator<RUMEvent>; /** * Update the RUM application with given ID in your organization. * @param param The request object */ updateRUMApplication(param: RUMApiUpdateRUMApplicationRequest, options?: Configuration): Promise<RUMApplicationResponse>; }