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 { ProductAnalyticsAnalyticsListRequest } from "../models/ProductAnalyticsAnalyticsListRequest"; import { ProductAnalyticsAnalyticsListResponse } from "../models/ProductAnalyticsAnalyticsListResponse"; import { ProductAnalyticsAnalyticsRequest } from "../models/ProductAnalyticsAnalyticsRequest"; import { ProductAnalyticsFormulaJourneyRequest } from "../models/ProductAnalyticsFormulaJourneyRequest"; import { ProductAnalyticsFormulaRetentionRequest } from "../models/ProductAnalyticsFormulaRetentionRequest"; import { ProductAnalyticsJourneyFunnelRequest } from "../models/ProductAnalyticsJourneyFunnelRequest"; import { ProductAnalyticsJourneyFunnelResponse } from "../models/ProductAnalyticsJourneyFunnelResponse"; import { ProductAnalyticsJourneyListRequest } from "../models/ProductAnalyticsJourneyListRequest"; import { ProductAnalyticsJourneyListResponse } from "../models/ProductAnalyticsJourneyListResponse"; import { ProductAnalyticsJourneyScalarRequest } from "../models/ProductAnalyticsJourneyScalarRequest"; import { ProductAnalyticsJourneyScalarResponse } from "../models/ProductAnalyticsJourneyScalarResponse"; import { ProductAnalyticsJourneyTimeseriesResponse } from "../models/ProductAnalyticsJourneyTimeseriesResponse"; import { ProductAnalyticsRetentionGridRequest } from "../models/ProductAnalyticsRetentionGridRequest"; import { ProductAnalyticsRetentionGridResponse } from "../models/ProductAnalyticsRetentionGridResponse"; import { ProductAnalyticsRetentionListRequest } from "../models/ProductAnalyticsRetentionListRequest"; import { ProductAnalyticsRetentionListResponse } from "../models/ProductAnalyticsRetentionListResponse"; import { ProductAnalyticsSankeyRequest } from "../models/ProductAnalyticsSankeyRequest"; import { ProductAnalyticsSankeyResponse } from "../models/ProductAnalyticsSankeyResponse"; import { ProductAnalyticsScalarResponse } from "../models/ProductAnalyticsScalarResponse"; import { ProductAnalyticsServerSideEventItem } from "../models/ProductAnalyticsServerSideEventItem"; import { ProductAnalyticsTimeseriesResponse } from "../models/ProductAnalyticsTimeseriesResponse"; export declare class ProductAnalyticsApiRequestFactory extends BaseAPIRequestFactory { queryProductAnalyticsJourneyFunnel(body: ProductAnalyticsJourneyFunnelRequest, _options?: Configuration): Promise; queryProductAnalyticsJourneyList(body: ProductAnalyticsJourneyListRequest, _options?: Configuration): Promise; queryProductAnalyticsJourneyScalar(body: ProductAnalyticsJourneyScalarRequest, _options?: Configuration): Promise; queryProductAnalyticsJourneyTimeseries(body: ProductAnalyticsFormulaJourneyRequest, _options?: Configuration): Promise; queryProductAnalyticsList(body: ProductAnalyticsAnalyticsListRequest, _options?: Configuration): Promise; queryProductAnalyticsRetentionGrid(body: ProductAnalyticsRetentionGridRequest, _options?: Configuration): Promise; queryProductAnalyticsRetentionList(body: ProductAnalyticsRetentionListRequest, _options?: Configuration): Promise; queryProductAnalyticsRetentionScalar(body: ProductAnalyticsFormulaRetentionRequest, _options?: Configuration): Promise; queryProductAnalyticsRetentionTimeseries(body: ProductAnalyticsFormulaRetentionRequest, _options?: Configuration): Promise; queryProductAnalyticsSankey(body: ProductAnalyticsSankeyRequest, _options?: Configuration): Promise; queryProductAnalyticsScalar(body: ProductAnalyticsAnalyticsRequest, _options?: Configuration): Promise; queryProductAnalyticsTimeseries(body: ProductAnalyticsAnalyticsRequest, _options?: Configuration): Promise; submitProductAnalyticsEvent(body: ProductAnalyticsServerSideEventItem, _options?: Configuration): Promise; } export declare class ProductAnalyticsApiResponseProcessor { /** * 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 queryProductAnalyticsJourneyFunnel * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsJourneyFunnel(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsJourneyList * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsJourneyList(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsJourneyScalar * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsJourneyScalar(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsJourneyTimeseries * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsJourneyTimeseries(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsList * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsList(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsRetentionGrid * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsRetentionGrid(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsRetentionList * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsRetentionList(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsRetentionScalar * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsRetentionScalar(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsRetentionTimeseries * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsRetentionTimeseries(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsSankey * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsSankey(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsScalar * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsScalar(response: ResponseContext): Promise; /** * 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 queryProductAnalyticsTimeseries * @throws ApiException if the response code was not in [200, 299] */ queryProductAnalyticsTimeseries(response: ResponseContext): Promise; /** * 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 submitProductAnalyticsEvent * @throws ApiException if the response code was not in [200, 299] */ submitProductAnalyticsEvent(response: ResponseContext): Promise; } export interface ProductAnalyticsApiQueryProductAnalyticsJourneyFunnelRequest { /** * @type ProductAnalyticsJourneyFunnelRequest */ body: ProductAnalyticsJourneyFunnelRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsJourneyListRequest { /** * @type ProductAnalyticsJourneyListRequest */ body: ProductAnalyticsJourneyListRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsJourneyScalarRequest { /** * @type ProductAnalyticsJourneyScalarRequest */ body: ProductAnalyticsJourneyScalarRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsJourneyTimeseriesRequest { /** * @type ProductAnalyticsFormulaJourneyRequest */ body: ProductAnalyticsFormulaJourneyRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsListRequest { /** * @type ProductAnalyticsAnalyticsListRequest */ body: ProductAnalyticsAnalyticsListRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsRetentionGridRequest { /** * The retention grid query. * @type ProductAnalyticsRetentionGridRequest */ body: ProductAnalyticsRetentionGridRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsRetentionListRequest { /** * The retention list query. * @type ProductAnalyticsRetentionListRequest */ body: ProductAnalyticsRetentionListRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsRetentionScalarRequest { /** * The retention scalar query. * @type ProductAnalyticsFormulaRetentionRequest */ body: ProductAnalyticsFormulaRetentionRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsRetentionTimeseriesRequest { /** * The retention timeseries query. * @type ProductAnalyticsFormulaRetentionRequest */ body: ProductAnalyticsFormulaRetentionRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsSankeyRequest { /** * The Sankey diagram query. * @type ProductAnalyticsSankeyRequest */ body: ProductAnalyticsSankeyRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsScalarRequest { /** * @type ProductAnalyticsAnalyticsRequest */ body: ProductAnalyticsAnalyticsRequest; } export interface ProductAnalyticsApiQueryProductAnalyticsTimeseriesRequest { /** * @type ProductAnalyticsAnalyticsRequest */ body: ProductAnalyticsAnalyticsRequest; } export interface ProductAnalyticsApiSubmitProductAnalyticsEventRequest { /** * Server-side event to send (JSON format). * @type ProductAnalyticsServerSideEventItem */ body: ProductAnalyticsServerSideEventItem; } export declare class ProductAnalyticsApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: ProductAnalyticsApiRequestFactory, responseProcessor?: ProductAnalyticsApiResponseProcessor); /** * Compute a funnel over an ordered sequence of Product Analytics events. * Returns the per-step conversion counts, conversion rates, and elapsed times, * optionally segmented by group-by facets. * @param param The request object */ queryProductAnalyticsJourneyFunnel(param: ProductAnalyticsApiQueryProductAnalyticsJourneyFunnelRequest, options?: Configuration): Promise; /** * Return the individual sessions that reached, or dropped off at, a given step of the journey. * Each row contains the identity join key, the event timestamp, and the columns requested * in `entity_columns`. * @param param The request object */ queryProductAnalyticsJourneyList(param: ProductAnalyticsApiQueryProductAnalyticsJourneyListRequest, options?: Configuration): Promise; /** * Compute scalar results for a journey query, such as the conversion count, * the conversion rate, or the time to convert, optionally segmented by group-by facets. * @param param The request object */ queryProductAnalyticsJourneyScalar(param: ProductAnalyticsApiQueryProductAnalyticsJourneyScalarRequest, options?: Configuration): Promise; /** * Compute timeseries results for a journey query. * Returns one series per group-by combination, bucketed by the requested interval. * @param param The request object */ queryProductAnalyticsJourneyTimeseries(param: ProductAnalyticsApiQueryProductAnalyticsJourneyTimeseriesRequest, options?: Configuration): Promise; /** * List the individual event records matching an analytics query. * Use `columns` to choose the attributes returned on each row, `sort` to order the rows, * and `limit` to cap how many are returned. * @param param The request object */ queryProductAnalyticsList(param: ProductAnalyticsApiQueryProductAnalyticsListRequest, options?: Configuration): Promise; /** * Compute a retention grid, showing how much of each cohort came back over each subsequent period. * Rows are cohorts, columns are return periods, and each cell holds the count and rate of entities that returned. * @param param The request object */ queryProductAnalyticsRetentionGrid(param: ProductAnalyticsApiQueryProductAnalyticsRetentionGridRequest, options?: Configuration): Promise; /** * List the individual users or accounts counted in one cell of the retention grid. * Set `computation_scope` to the cohort and return period you want to examine. * @param param The request object */ queryProductAnalyticsRetentionList(param: ProductAnalyticsApiQueryProductAnalyticsRetentionListRequest, options?: Configuration): Promise; /** * Compute retention as a single value per group, suitable for a query value or top list widget. * @param param The request object */ queryProductAnalyticsRetentionScalar(param: ProductAnalyticsApiQueryProductAnalyticsRetentionScalarRequest, options?: Configuration): Promise; /** * Compute retention as a series of values over time, using the same query definition as the * retention grid. * @param param The request object */ queryProductAnalyticsRetentionTimeseries(param: ProductAnalyticsApiQueryProductAnalyticsRetentionTimeseriesRequest, options?: Configuration): Promise; /** * Compute a Sankey diagram of how sessions flow between the values of two facets, * showing where users continue and where they drop off at each step. * @param param The request object */ queryProductAnalyticsSankey(param: ProductAnalyticsApiQueryProductAnalyticsSankeyRequest, options?: Configuration): Promise; /** * Compute scalar analytics results for Product Analytics data. * Returns aggregated values (counts, averages, percentiles) optionally grouped by facets. * @param param The request object */ queryProductAnalyticsScalar(param: ProductAnalyticsApiQueryProductAnalyticsScalarRequest, options?: Configuration): Promise; /** * Compute timeseries analytics results for Product Analytics data. * Returns time-bucketed values for charts and trend analysis. * The `compute.interval` field (milliseconds) is required for time bucketing. * @param param The request object */ queryProductAnalyticsTimeseries(param: ProductAnalyticsApiQueryProductAnalyticsTimeseriesRequest, options?: Configuration): Promise; /** * Send server-side events to Product Analytics. Server-side events are retained for 15 months. * * Server-Side events in Product Analytics are helpful for tracking events that occur on the server, * as opposed to client-side events, which are captured by Real User Monitoring (RUM) SDKs. * This allows for a more comprehensive view of the user journey by including actions that happen on the server. * Typical examples could be `checkout.completed` or `payment.processed`. * * Ingested server-side events are integrated into Product Analytics to allow users to select and filter * these events in the event picker, similar to how views or actions are handled. * * **Requirements:** * - At least one of `usr`, `account`, or `session` must be provided with a valid ID. * - The `application.id` must reference a Product Analytics-enabled application. * * **Custom Attributes:** * Any additional fields in the payload are flattened and searchable as facets. * For example, a payload with `{"customer": {"tier": "premium"}}` is searchable with * the syntax `@customer.tier:premium` in Datadog. * * The status codes answered by the HTTP API are: * - 202: Accepted: The request has been accepted for processing * - 400: Bad request (likely an issue in the payload formatting) * - 401: Unauthorized (likely a missing API Key) * - 403: Permission issue (likely using an invalid API Key) * - 408: Request Timeout, request should be retried after some time * - 413: Payload too large (batch is above 5MB uncompressed) * - 429: Too Many Requests, request should be retried after some time * - 500: Internal Server Error, the server encountered an unexpected condition that prevented it from fulfilling the request, request should be retried after some time * - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time * @param param The request object */ submitProductAnalyticsEvent(param: ProductAnalyticsApiSubmitProductAnalyticsEventRequest, options?: Configuration): Promise; }