diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 583d0d86f5..c2f8e16d48 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -108739,6 +108739,33 @@ components: required: - aggregation type: object + ProductAnalyticsCoreUserJourney: + description: A sequence of events that users follow to use a feature. + properties: + expression: + description: Order of the steps, as step IDs joined by `->`. + example: node_0->node_1 + type: string + score: + description: Relevance score of the journey. Higher is more relevant. + example: 50 + format: int64 + type: integer + steps: + additionalProperties: + description: Event query of the step. + type: string + description: Map of step ID to the event query of the step. + example: + node_0: "@type:view @view.name:/checkout" + node_1: "@type:action @action.name:pay" + type: object + support: + description: Number of sessions that followed the journey. + example: 120 + format: int64 + type: integer + type: object ProductAnalyticsElapsedTime: description: Elapsed time statistics (min/max/avg in milliseconds). properties: @@ -108945,6 +108972,228 @@ components: type: string x-enum-varnames: - FORMULA_RETENTION_REQUEST + ProductAnalyticsFunnelStepSuggestionsRequest: + description: Request to get suggested next steps for a funnel. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequestData" + required: + - data + type: object + ProductAnalyticsFunnelStepSuggestionsRequestAttributes: + description: Attributes of a step suggestions request. + properties: + application_id: + description: Only use journeys from this RUM application. + example: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: string + expression: + description: Order of the funnel steps, as step IDs joined by `->`. + example: node_0->node_1 + type: string + steps: + additionalProperties: + description: Event query of the step. + type: string + description: |- + Map of step ID to the event query of the step. Steps are matched in the string sort + order of their IDs, so use zero-padded IDs such as `node_01`, `node_02`. Without padding, + `node_10` sorts before `node_2`. + example: + node_0: "@type:view @view.name:/checkout" + minProperties: 1 + type: object + required: + - expression + - steps + type: object + ProductAnalyticsFunnelStepSuggestionsRequestData: + description: Data of a step suggestions request. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsFunnelStepSuggestionsRequestType: + default: funnel_suggestions_steps_request + description: Type of a step suggestions request. + enum: + - funnel_suggestions_steps_request + example: funnel_suggestions_steps_request + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_STEPS_REQUEST + ProductAnalyticsFunnelStepSuggestionsResponse: + description: Suggested next steps for a funnel. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponseData" + type: object + ProductAnalyticsFunnelStepSuggestionsResponseAttributes: + description: Attributes of a step suggestions response. + properties: + steps: + description: Event queries of the suggested next steps, most relevant first. + example: + - "@type:action @action.name:pay" + items: + description: Event query of a suggested step. + type: string + type: array + type: object + ProductAnalyticsFunnelStepSuggestionsResponseData: + description: Data of a step suggestions response. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponseAttributes" + id: + description: ID of the response. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponseType" + type: object + ProductAnalyticsFunnelStepSuggestionsResponseType: + default: funnel_suggestions_steps_response + description: Type of a step suggestions response. + enum: + - funnel_suggestions_steps_response + example: funnel_suggestions_steps_response + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_STEPS_RESPONSE + ProductAnalyticsFunnelSuggestionsApplication: + description: Suggested features of one application. + properties: + application_id: + description: ID of the RUM application. + example: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: string + domains: + description: Feature areas of the application. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsDomain" + type: array + type: object + ProductAnalyticsFunnelSuggestionsDomain: + description: A feature area of an application, such as checkout or settings. + properties: + features: + description: Features in this area. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsFeature" + type: array + name: + description: Name of the feature area. + example: Checkout + type: string + type: object + ProductAnalyticsFunnelSuggestionsFeature: + description: A feature detected in the application, with the journeys users take to use it. + properties: + core_user_journeys: + description: The suggested journey that users follow to use the feature. Contains one journey. + items: + $ref: "#/components/schemas/ProductAnalyticsCoreUserJourney" + type: array + description: + description: Description of the feature. + example: Users enter a promo code and pay for their order. + type: string + id: + description: ID of the feature. + example: "12" + type: string + name: + description: Name of the feature. + example: Pay for an order + type: string + score: + description: Relevance score of the feature. Higher is more relevant. + example: 111 + format: int64 + type: integer + support: + description: Number of sessions that used the feature. + example: 222 + format: int64 + type: integer + type: object + ProductAnalyticsFunnelSuggestionsRequest: + description: Request to get suggested features and their journeys. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequestData" + required: + - data + type: object + ProductAnalyticsFunnelSuggestionsRequestAttributes: + description: Attributes of a feature suggestions request. + properties: + application_id: + description: Only return suggestions for this RUM application. + example: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: string + type: object + ProductAnalyticsFunnelSuggestionsRequestData: + description: Data of a feature suggestions request. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequestType" + required: + - type + type: object + ProductAnalyticsFunnelSuggestionsRequestType: + default: funnel_suggestions_request + description: Type of a feature suggestions request. + enum: + - funnel_suggestions_request + example: funnel_suggestions_request + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_REQUEST + ProductAnalyticsFunnelSuggestionsResponse: + description: Suggested features and their journeys. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponseData" + type: object + ProductAnalyticsFunnelSuggestionsResponseAttributes: + description: Attributes of a feature suggestions response. + properties: + applications: + description: Suggested features, grouped by application and feature area. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsApplication" + type: array + type: object + ProductAnalyticsFunnelSuggestionsResponseData: + description: Data of a feature suggestions response. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponseAttributes" + id: + description: ID of the response. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponseType" + type: object + ProductAnalyticsFunnelSuggestionsResponseType: + default: funnel_suggestions_response + description: Type of a feature suggestions response. + enum: + - funnel_suggestions_response + example: funnel_suggestions_response + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_RESPONSE ProductAnalyticsGraphQueryCompute: description: Defines the metric computed over the journey. properties: @@ -109180,6 +109429,155 @@ components: x-enum-varnames: - CONVERSION - DROP_OFF + ProductAnalyticsJourneyDropOffIssue: + description: An issue contributing to drop-off at the target step. + properties: + error_count: + description: Number of errors attributed to this issue. + example: 120 + format: int64 + type: integer + issue_id: + description: Identifier of the issue. + example: 00000000-0000-0000-0000-000000000001 + type: string + session_count: + description: Number of sessions affected by this issue. + example: 84 + format: int64 + type: integer + required: + - issue_id + - error_count + - session_count + type: object + ProductAnalyticsJourneyDropOffQuery: + description: Query definition for a journey drop-off analysis request. + properties: + sampling: + $ref: "#/components/schemas/ProductAnalyticsSampling" + search: + $ref: "#/components/schemas/ProductAnalyticsJourneySearch" + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyNodeTarget" + top_issue_count: + default: 5 + description: Maximum number of issues to return. + format: int64 + maximum: 100 + minimum: 1 + type: integer + required: + - search + type: object + ProductAnalyticsJourneyDropOffRequest: + description: Request body for a journey drop-off analysis. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequestData" + required: + - data + type: object + ProductAnalyticsJourneyDropOffRequestAttributes: + description: Attributes of a journey drop-off analysis request. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsJourneyDropOffRequestData: + description: The definition of a journey drop-off analysis request body. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsJourneyDropOffRequestType: + description: The resource type identifier for a journey drop-off analysis request. + enum: + - journey_drop_off_analysis_request + example: journey_drop_off_analysis_request + type: string + x-enum-varnames: + - JOURNEY_DROP_OFF_ANALYSIS_REQUEST + ProductAnalyticsJourneyDropOffResponse: + description: Response for a journey drop-off analysis. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponseData" + required: + - data + type: object + ProductAnalyticsJourneyDropOffResponseAttributes: + description: Attributes of a journey drop-off analysis response. + properties: + drop_off_count: + description: Number of sessions that reached the step before the target but not the target step. + example: 696 + format: int64 + type: integer + issues: + description: The issues most associated with the drop-off. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffIssue" + type: array + sessions_with_errors: + description: Number of dropped-off sessions that contained an error. + example: 84 + format: int64 + type: integer + sessions_with_frustration_signals: + description: Number of dropped-off sessions that contained a frustration signal. + example: 31 + format: int64 + type: integer + required: + - drop_off_count + - sessions_with_errors + - sessions_with_frustration_signals + - issues + type: object + ProductAnalyticsJourneyDropOffResponseData: + description: The journey drop-off analysis results. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponseAttributes" + id: + description: Identifier of this result. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsJourneyDropOffResponseType: + description: The resource type identifier for a journey drop-off analysis response. + enum: + - journey_drop_off_analysis_response + example: journey_drop_off_analysis_response + type: string + x-enum-varnames: + - JOURNEY_DROP_OFF_ANALYSIS_RESPONSE ProductAnalyticsJourneyEntity: description: The kind of entity returned by a journey list query. enum: @@ -110597,6 +110995,14 @@ components: oneOf: - $ref: "#/components/schemas/ProductAnalyticsRetentionCalendarTimeInterval" - $ref: "#/components/schemas/ProductAnalyticsRetentionFixedTimeInterval" + ProductAnalyticsSampling: + description: Sampling configuration for a query. + properties: + enabled: + default: false + description: Whether session sampling is enabled; reduces query cost at the cost of statistical precision. + type: boolean + type: object ProductAnalyticsSankeyAggregatedNode: description: One of the nodes rolled up into an aggregated node, retained so the roll-up can be broken down. properties: @@ -229416,6 +229822,83 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/product-analytics/journey/drop_off_analysis: + post: + description: |- + Analyze the drop-off at a given step of the journey. The journey must have at least two + steps, and only the `@session.id` join key is supported. Set `target` to the node to + analyze. It can't be the first step. When `target` is omitted, the last step is used. + Returns the number of sessions that reached the step before the target but not the target, + together with the issues and frustration signals most associated with the drop-off. + operationId: QueryProductAnalyticsJourneyDropOff + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + search: + expression: A -> B + node_objects: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + target: + type: node + value: B + top_issue_count: 5 + to: 1756857600000 + type: journey_drop_off_analysis_request + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + drop_off_count: 696 + issues: + - error_count: 120 + issue_id: 00000000-0000-0000-0000-000000000001 + session_count: 84 + sessions_with_errors: 84 + sessions_with_frustration_signals: 31 + id: 00000000-0000-0000-0000-000000000000 + type: journey_drop_off_analysis_response + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Analyze journey drop-off + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/product-analytics/journey/funnel: post: description: |- @@ -230077,6 +230560,130 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/suggestions/features: + post: + description: |- + Get the features that Product Analytics detected in your applications, grouped by + application and feature area. Each feature comes with a suggested journey that users + follow to use it, which you can use as funnel steps. + operationId: QueryProductAnalyticsFunnelSuggestions + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: funnel_suggestions_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + applications: + - application_id: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + domains: + - features: + - core_user_journeys: + - expression: node_0->node_1 + score: 50 + steps: + node_0: "@type:view @view.name:/checkout" + node_1: "@type:action @action.name:pay" + support: 120 + description: Users enter a promo code and pay for their order. + id: "12" + name: Pay for an order + score: 111 + support: 222 + name: Checkout + id: 00000000-0000-0000-0000-000000000000 + type: funnel_suggestions_response + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get feature suggestions + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/suggestions/features/steps: + post: + description: |- + Get the steps that users most often take after the existing steps of a funnel. + Suggestions come from the same precomputed journeys as feature suggestions. + Returns an empty list when no journey starts with the given steps. + operationId: QueryProductAnalyticsFunnelStepSuggestions + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + expression: node_0 + steps: + node_0: "@type:view @view.name:/checkout" + type: funnel_suggestions_steps_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + steps: + - "@type:action @action.name:pay" + id: 00000000-0000-0000-0000-000000000000 + type: funnel_suggestions_steps_response + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get funnel step suggestions + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/product-analytics/users/event_filtered_query: post: description: Query users filtered by both user properties and event platform data diff --git a/examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.py b/examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.py new file mode 100644 index 0000000000..6ce7a700fd --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.py @@ -0,0 +1,41 @@ +""" +Get funnel step suggestions returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request import ( + ProductAnalyticsFunnelStepSuggestionsRequest, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_attributes import ( + ProductAnalyticsFunnelStepSuggestionsRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_data import ( + ProductAnalyticsFunnelStepSuggestionsRequestData, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_type import ( + ProductAnalyticsFunnelStepSuggestionsRequestType, +) + +body = ProductAnalyticsFunnelStepSuggestionsRequest( + data=ProductAnalyticsFunnelStepSuggestionsRequestData( + attributes=ProductAnalyticsFunnelStepSuggestionsRequestAttributes( + application_id="40d8ca4b-2ac0-481f-b16e-f110699ecff6", + expression="node_0->node_1", + steps=dict( + node_0="@type:view @view.name:/checkout", + ), + ), + type=ProductAnalyticsFunnelStepSuggestionsRequestType.FUNNEL_SUGGESTIONS_STEPS_REQUEST, + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["query_product_analytics_funnel_step_suggestions"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_funnel_step_suggestions(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.py b/examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.py new file mode 100644 index 0000000000..92a435f7a1 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.py @@ -0,0 +1,37 @@ +""" +Get feature suggestions returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request import ( + ProductAnalyticsFunnelSuggestionsRequest, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_attributes import ( + ProductAnalyticsFunnelSuggestionsRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_data import ( + ProductAnalyticsFunnelSuggestionsRequestData, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_type import ( + ProductAnalyticsFunnelSuggestionsRequestType, +) + +body = ProductAnalyticsFunnelSuggestionsRequest( + data=ProductAnalyticsFunnelSuggestionsRequestData( + attributes=ProductAnalyticsFunnelSuggestionsRequestAttributes( + application_id="40d8ca4b-2ac0-481f-b16e-f110699ecff6", + ), + type=ProductAnalyticsFunnelSuggestionsRequestType.FUNNEL_SUGGESTIONS_REQUEST, + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["query_product_analytics_funnel_suggestions"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_funnel_suggestions(body=body) + + print(response) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.py b/examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.py new file mode 100644 index 0000000000..0292d5a313 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.py @@ -0,0 +1,130 @@ +""" +Analyze journey drop-off returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.product_analytics_api import ProductAnalyticsApi +from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery +from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource +from datadog_api_client.v2.model.product_analytics_event_search import ProductAnalyticsEventSearch +from datadog_api_client.v2.model.product_analytics_join_keys import ProductAnalyticsJoinKeys +from datadog_api_client.v2.model.product_analytics_journey_audience_account_query import ( + ProductAnalyticsJourneyAudienceAccountQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_filters import ( + ProductAnalyticsJourneyAudienceFilters, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_segment_query import ( + ProductAnalyticsJourneyAudienceSegmentQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_audience_user_query import ( + ProductAnalyticsJourneyAudienceUserQuery, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_query import ProductAnalyticsJourneyDropOffQuery +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request import ProductAnalyticsJourneyDropOffRequest +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_attributes import ( + ProductAnalyticsJourneyDropOffRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_data import ( + ProductAnalyticsJourneyDropOffRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_type import ( + ProductAnalyticsJourneyDropOffRequestType, +) +from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget +from datadog_api_client.v2.model.product_analytics_journey_node_target_type import ProductAnalyticsJourneyNodeTargetType +from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch +from datadog_api_client.v2.model.product_analytics_journey_search_filters import ProductAnalyticsJourneySearchFilters +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter import ( + ProductAnalyticsJourneySearchGraphFilter, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_name import ( + ProductAnalyticsJourneySearchGraphFilterName, +) +from datadog_api_client.v2.model.product_analytics_journey_search_graph_filter_operator import ( + ProductAnalyticsJourneySearchGraphFilterOperator, +) +from datadog_api_client.v2.model.product_analytics_sampling import ProductAnalyticsSampling + +body = ProductAnalyticsJourneyDropOffRequest( + data=ProductAnalyticsJourneyDropOffRequestData( + attributes=ProductAnalyticsJourneyDropOffRequestAttributes( + _from=1756425600000, + query=ProductAnalyticsJourneyDropOffQuery( + sampling=ProductAnalyticsSampling( + enabled=False, + ), + search=ProductAnalyticsJourneySearch( + expression="A -> B", + filters=ProductAnalyticsJourneySearchFilters( + audience_filters=ProductAnalyticsJourneyAudienceFilters( + accounts=[ + ProductAnalyticsJourneyAudienceAccountQuery( + name="enterprise_accounts", + ), + ], + formula="power_users AND NOT trial_segment", + segments=[ + ProductAnalyticsJourneyAudienceSegmentQuery( + name="trial_segment", + segment_id="00000000-0000-0000-0000-000000000000", + ), + ], + users=[ + ProductAnalyticsJourneyAudienceUserQuery( + name="power_users", + ), + ], + ), + graph_filters=[ + ProductAnalyticsJourneySearchGraphFilter( + name=ProductAnalyticsJourneySearchGraphFilterName.TIME_TO_CONVERT, + operator=ProductAnalyticsJourneySearchGraphFilterOperator.LESS_THAN_OR_EQUAL, + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="A", + ), + value=60000, + ), + ], + ), + join_keys=ProductAnalyticsJoinKeys( + primary="@session.id", + secondary=[], + ), + node_objects=dict( + A=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:view @view.name:Login", + ), + ), + B=ProductAnalyticsEventQuery( + data_source=ProductAnalyticsEventQueryDataSource.PRODUCT_ANALYTICS, + search=ProductAnalyticsEventSearch( + query="@type:action @action.target.name:Submit", + ), + ), + ), + ), + target=ProductAnalyticsJourneyNodeTarget( + type=ProductAnalyticsJourneyNodeTargetType.NODE, + value="B", + ), + top_issue_count=5, + ), + to=1756857600000, + ), + type=ProductAnalyticsJourneyDropOffRequestType.JOURNEY_DROP_OFF_ANALYSIS_REQUEST, + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["query_product_analytics_journey_drop_off"] = True +with ApiClient(configuration) as api_client: + api_instance = ProductAnalyticsApi(api_client) + response = api_instance.query_product_analytics_journey_drop_off(body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 7d8f36b32b..d9b5e62119 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -851,6 +851,9 @@ def __init__( "v2.update_org_group_policy": False, "v2.update_org_group_policy_override": False, "v2.list_role_templates": False, + "v2.query_product_analytics_funnel_step_suggestions": False, + "v2.query_product_analytics_funnel_suggestions": False, + "v2.query_product_analytics_journey_drop_off": False, "v2.query_product_analytics_journey_funnel": False, "v2.query_product_analytics_journey_list": False, "v2.query_product_analytics_journey_scalar": False, diff --git a/src/datadog_api_client/v2/api/product_analytics_api.py b/src/datadog_api_client/v2/api/product_analytics_api.py index 8c30924126..17cfca5470 100644 --- a/src/datadog_api_client/v2/api/product_analytics_api.py +++ b/src/datadog_api_client/v2/api/product_analytics_api.py @@ -13,6 +13,10 @@ from datadog_api_client.v2.model.product_analytics_scalar_response import ProductAnalyticsScalarResponse from datadog_api_client.v2.model.product_analytics_analytics_request import ProductAnalyticsAnalyticsRequest from datadog_api_client.v2.model.product_analytics_timeseries_response import ProductAnalyticsTimeseriesResponse +from datadog_api_client.v2.model.product_analytics_journey_drop_off_response import ( + ProductAnalyticsJourneyDropOffResponse, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request import ProductAnalyticsJourneyDropOffRequest from datadog_api_client.v2.model.product_analytics_journey_funnel_response import ProductAnalyticsJourneyFunnelResponse from datadog_api_client.v2.model.product_analytics_journey_funnel_request import ProductAnalyticsJourneyFunnelRequest from datadog_api_client.v2.model.product_analytics_journey_list_response import ProductAnalyticsJourneyListResponse @@ -32,6 +36,18 @@ ) from datadog_api_client.v2.model.product_analytics_sankey_response import ProductAnalyticsSankeyResponse from datadog_api_client.v2.model.product_analytics_sankey_request import ProductAnalyticsSankeyRequest +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response import ( + ProductAnalyticsFunnelSuggestionsResponse, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request import ( + ProductAnalyticsFunnelSuggestionsRequest, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response import ( + ProductAnalyticsFunnelStepSuggestionsResponse, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request import ( + ProductAnalyticsFunnelStepSuggestionsRequest, +) class ProductAnalyticsApi: @@ -49,6 +65,66 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._query_product_analytics_funnel_step_suggestions_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsFunnelStepSuggestionsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/product-analytics/suggestions/features/steps", + "operation_id": "query_product_analytics_funnel_step_suggestions", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsFunnelStepSuggestionsRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_funnel_suggestions_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsFunnelSuggestionsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/product-analytics/suggestions/features", + "operation_id": "query_product_analytics_funnel_suggestions", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsFunnelSuggestionsRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._query_product_analytics_journey_drop_off_endpoint = _Endpoint( + settings={ + "response_type": (ProductAnalyticsJourneyDropOffResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/product-analytics/journey/drop_off_analysis", + "operation_id": "query_product_analytics_journey_drop_off", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (ProductAnalyticsJourneyDropOffRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._query_product_analytics_journey_funnel_endpoint = _Endpoint( settings={ "response_type": (ProductAnalyticsJourneyFunnelResponse,), @@ -355,6 +431,62 @@ def __init__(self, api_client=None): api_client=api_client, ) + def query_product_analytics_funnel_step_suggestions( + self, + body: ProductAnalyticsFunnelStepSuggestionsRequest, + ) -> ProductAnalyticsFunnelStepSuggestionsResponse: + """Get funnel step suggestions. + + Get the steps that users most often take after the existing steps of a funnel. + Suggestions come from the same precomputed journeys as feature suggestions. + Returns an empty list when no journey starts with the given steps. + + :type body: ProductAnalyticsFunnelStepSuggestionsRequest + :rtype: ProductAnalyticsFunnelStepSuggestionsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_funnel_step_suggestions_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_funnel_suggestions( + self, + body: ProductAnalyticsFunnelSuggestionsRequest, + ) -> ProductAnalyticsFunnelSuggestionsResponse: + """Get feature suggestions. + + Get the features that Product Analytics detected in your applications, grouped by + application and feature area. Each feature comes with a suggested journey that users + follow to use it, which you can use as funnel steps. + + :type body: ProductAnalyticsFunnelSuggestionsRequest + :rtype: ProductAnalyticsFunnelSuggestionsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_funnel_suggestions_endpoint.call_with_http_info(**kwargs) + + def query_product_analytics_journey_drop_off( + self, + body: ProductAnalyticsJourneyDropOffRequest, + ) -> ProductAnalyticsJourneyDropOffResponse: + """Analyze journey drop-off. + + Analyze the drop-off at a given step of the journey. The journey must have at least two + steps, and only the ``@session.id`` join key is supported. Set ``target`` to the node to + analyze. It can't be the first step. When ``target`` is omitted, the last step is used. + Returns the number of sessions that reached the step before the target but not the target, + together with the issues and frustration signals most associated with the drop-off. + + :type body: ProductAnalyticsJourneyDropOffRequest + :rtype: ProductAnalyticsJourneyDropOffResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._query_product_analytics_journey_drop_off_endpoint.call_with_http_info(**kwargs) + def query_product_analytics_journey_funnel( self, body: ProductAnalyticsJourneyFunnelRequest, diff --git a/src/datadog_api_client/v2/model/product_analytics_core_user_journey.py b/src/datadog_api_client/v2/model/product_analytics_core_user_journey.py new file mode 100644 index 0000000000..90679a3e5f --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_core_user_journey.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsCoreUserJourney(ModelNormal): + @cached_property + def openapi_types(_): + return { + "expression": (str,), + "score": (int,), + "steps": ({str: (str,)},), + "support": (int,), + } + + attribute_map = { + "expression": "expression", + "score": "score", + "steps": "steps", + "support": "support", + } + + def __init__( + self_, + expression: Union[str, UnsetType] = unset, + score: Union[int, UnsetType] = unset, + steps: Union[Dict[str, str], UnsetType] = unset, + support: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + A sequence of events that users follow to use a feature. + + :param expression: Order of the steps, as step IDs joined by ``->``. + :type expression: str, optional + + :param score: Relevance score of the journey. Higher is more relevant. + :type score: int, optional + + :param steps: Map of step ID to the event query of the step. + :type steps: {str: (str,)}, optional + + :param support: Number of sessions that followed the journey. + :type support: int, optional + """ + if expression is not unset: + kwargs["expression"] = expression + if score is not unset: + kwargs["score"] = score + if steps is not unset: + kwargs["steps"] = steps + if support is not unset: + kwargs["support"] = support + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request.py new file mode 100644 index 0000000000..b91b1507c6 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_data import ( + ProductAnalyticsFunnelStepSuggestionsRequestData, + ) + + +class ProductAnalyticsFunnelStepSuggestionsRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_data import ( + ProductAnalyticsFunnelStepSuggestionsRequestData, + ) + + return { + "data": (ProductAnalyticsFunnelStepSuggestionsRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsFunnelStepSuggestionsRequestData, **kwargs): + """ + Request to get suggested next steps for a funnel. + + :param data: Data of a step suggestions request. + :type data: ProductAnalyticsFunnelStepSuggestionsRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_attributes.py new file mode 100644 index 0000000000..3681190af2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_attributes.py @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsFunnelStepSuggestionsRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "application_id": (str,), + "expression": (str,), + "steps": ({str: (str,)},), + } + + attribute_map = { + "application_id": "application_id", + "expression": "expression", + "steps": "steps", + } + + def __init__( + self_, expression: str, steps: Dict[str, str], application_id: Union[str, UnsetType] = unset, **kwargs + ): + """ + Attributes of a step suggestions request. + + :param application_id: Only use journeys from this RUM application. + :type application_id: str, optional + + :param expression: Order of the funnel steps, as step IDs joined by ``->``. + :type expression: str + + :param steps: Map of step ID to the event query of the step. Steps are matched in the string sort + order of their IDs, so use zero-padded IDs such as ``node_01`` , ``node_02``. Without padding, + ``node_10`` sorts before ``node_2``. + :type steps: {str: (str,)} + """ + if application_id is not unset: + kwargs["application_id"] = application_id + super().__init__(kwargs) + + self_.expression = expression + self_.steps = steps diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_data.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_data.py new file mode 100644 index 0000000000..5689e06ab5 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_data.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_attributes import ( + ProductAnalyticsFunnelStepSuggestionsRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_type import ( + ProductAnalyticsFunnelStepSuggestionsRequestType, + ) + + +class ProductAnalyticsFunnelStepSuggestionsRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_attributes import ( + ProductAnalyticsFunnelStepSuggestionsRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_type import ( + ProductAnalyticsFunnelStepSuggestionsRequestType, + ) + + return { + "attributes": (ProductAnalyticsFunnelStepSuggestionsRequestAttributes,), + "type": (ProductAnalyticsFunnelStepSuggestionsRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsFunnelStepSuggestionsRequestAttributes, + type: ProductAnalyticsFunnelStepSuggestionsRequestType, + **kwargs, + ): + """ + Data of a step suggestions request. + + :param attributes: Attributes of a step suggestions request. + :type attributes: ProductAnalyticsFunnelStepSuggestionsRequestAttributes + + :param type: Type of a step suggestions request. + :type type: ProductAnalyticsFunnelStepSuggestionsRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_type.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_type.py new file mode 100644 index 0000000000..b71845a2fc --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsFunnelStepSuggestionsRequestType(ModelSimple): + """ + Type of a step suggestions request. + + :param value: If omitted defaults to "funnel_suggestions_steps_request". Must be one of ["funnel_suggestions_steps_request"]. + :type value: str + """ + + allowed_values = { + "funnel_suggestions_steps_request", + } + FUNNEL_SUGGESTIONS_STEPS_REQUEST: ClassVar["ProductAnalyticsFunnelStepSuggestionsRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsFunnelStepSuggestionsRequestType.FUNNEL_SUGGESTIONS_STEPS_REQUEST = ( + ProductAnalyticsFunnelStepSuggestionsRequestType("funnel_suggestions_steps_request") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response.py new file mode 100644 index 0000000000..c2ff652a43 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_data import ( + ProductAnalyticsFunnelStepSuggestionsResponseData, + ) + + +class ProductAnalyticsFunnelStepSuggestionsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_data import ( + ProductAnalyticsFunnelStepSuggestionsResponseData, + ) + + return { + "data": (ProductAnalyticsFunnelStepSuggestionsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[ProductAnalyticsFunnelStepSuggestionsResponseData, UnsetType] = unset, **kwargs): + """ + Suggested next steps for a funnel. + + :param data: Data of a step suggestions response. + :type data: ProductAnalyticsFunnelStepSuggestionsResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_attributes.py new file mode 100644 index 0000000000..c2db910d78 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_attributes.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsFunnelStepSuggestionsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "steps": ([str],), + } + + attribute_map = { + "steps": "steps", + } + + def __init__(self_, steps: Union[List[str], UnsetType] = unset, **kwargs): + """ + Attributes of a step suggestions response. + + :param steps: Event queries of the suggested next steps, most relevant first. + :type steps: [str], optional + """ + if steps is not unset: + kwargs["steps"] = steps + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_data.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_data.py new file mode 100644 index 0000000000..890dd31ace --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_data.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_attributes import ( + ProductAnalyticsFunnelStepSuggestionsResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_type import ( + ProductAnalyticsFunnelStepSuggestionsResponseType, + ) + + +class ProductAnalyticsFunnelStepSuggestionsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_attributes import ( + ProductAnalyticsFunnelStepSuggestionsResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_type import ( + ProductAnalyticsFunnelStepSuggestionsResponseType, + ) + + return { + "attributes": (ProductAnalyticsFunnelStepSuggestionsResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsFunnelStepSuggestionsResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[ProductAnalyticsFunnelStepSuggestionsResponseAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[ProductAnalyticsFunnelStepSuggestionsResponseType, UnsetType] = unset, + **kwargs, + ): + """ + Data of a step suggestions response. + + :param attributes: Attributes of a step suggestions response. + :type attributes: ProductAnalyticsFunnelStepSuggestionsResponseAttributes, optional + + :param id: ID of the response. + :type id: str, optional + + :param type: Type of a step suggestions response. + :type type: ProductAnalyticsFunnelStepSuggestionsResponseType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_type.py b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_type.py new file mode 100644 index 0000000000..4f9ec368e2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_step_suggestions_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsFunnelStepSuggestionsResponseType(ModelSimple): + """ + Type of a step suggestions response. + + :param value: If omitted defaults to "funnel_suggestions_steps_response". Must be one of ["funnel_suggestions_steps_response"]. + :type value: str + """ + + allowed_values = { + "funnel_suggestions_steps_response", + } + FUNNEL_SUGGESTIONS_STEPS_RESPONSE: ClassVar["ProductAnalyticsFunnelStepSuggestionsResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsFunnelStepSuggestionsResponseType.FUNNEL_SUGGESTIONS_STEPS_RESPONSE = ( + ProductAnalyticsFunnelStepSuggestionsResponseType("funnel_suggestions_steps_response") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_application.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_application.py new file mode 100644 index 0000000000..a086e387bf --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_application.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_domain import ( + ProductAnalyticsFunnelSuggestionsDomain, + ) + + +class ProductAnalyticsFunnelSuggestionsApplication(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_domain import ( + ProductAnalyticsFunnelSuggestionsDomain, + ) + + return { + "application_id": (str,), + "domains": ([ProductAnalyticsFunnelSuggestionsDomain],), + } + + attribute_map = { + "application_id": "application_id", + "domains": "domains", + } + + def __init__( + self_, + application_id: Union[str, UnsetType] = unset, + domains: Union[List[ProductAnalyticsFunnelSuggestionsDomain], UnsetType] = unset, + **kwargs, + ): + """ + Suggested features of one application. + + :param application_id: ID of the RUM application. + :type application_id: str, optional + + :param domains: Feature areas of the application. + :type domains: [ProductAnalyticsFunnelSuggestionsDomain], optional + """ + if application_id is not unset: + kwargs["application_id"] = application_id + if domains is not unset: + kwargs["domains"] = domains + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_domain.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_domain.py new file mode 100644 index 0000000000..283a800760 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_domain.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_feature import ( + ProductAnalyticsFunnelSuggestionsFeature, + ) + + +class ProductAnalyticsFunnelSuggestionsDomain(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_feature import ( + ProductAnalyticsFunnelSuggestionsFeature, + ) + + return { + "features": ([ProductAnalyticsFunnelSuggestionsFeature],), + "name": (str,), + } + + attribute_map = { + "features": "features", + "name": "name", + } + + def __init__( + self_, + features: Union[List[ProductAnalyticsFunnelSuggestionsFeature], UnsetType] = unset, + name: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A feature area of an application, such as checkout or settings. + + :param features: Features in this area. + :type features: [ProductAnalyticsFunnelSuggestionsFeature], optional + + :param name: Name of the feature area. + :type name: str, optional + """ + if features is not unset: + kwargs["features"] = features + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_feature.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_feature.py new file mode 100644 index 0000000000..a542766e64 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_feature.py @@ -0,0 +1,86 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_core_user_journey import ProductAnalyticsCoreUserJourney + + +class ProductAnalyticsFunnelSuggestionsFeature(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_core_user_journey import ProductAnalyticsCoreUserJourney + + return { + "core_user_journeys": ([ProductAnalyticsCoreUserJourney],), + "description": (str,), + "id": (str,), + "name": (str,), + "score": (int,), + "support": (int,), + } + + attribute_map = { + "core_user_journeys": "core_user_journeys", + "description": "description", + "id": "id", + "name": "name", + "score": "score", + "support": "support", + } + + def __init__( + self_, + core_user_journeys: Union[List[ProductAnalyticsCoreUserJourney], UnsetType] = unset, + description: Union[str, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + score: Union[int, UnsetType] = unset, + support: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + A feature detected in the application, with the journeys users take to use it. + + :param core_user_journeys: The suggested journey that users follow to use the feature. Contains one journey. + :type core_user_journeys: [ProductAnalyticsCoreUserJourney], optional + + :param description: Description of the feature. + :type description: str, optional + + :param id: ID of the feature. + :type id: str, optional + + :param name: Name of the feature. + :type name: str, optional + + :param score: Relevance score of the feature. Higher is more relevant. + :type score: int, optional + + :param support: Number of sessions that used the feature. + :type support: int, optional + """ + if core_user_journeys is not unset: + kwargs["core_user_journeys"] = core_user_journeys + if description is not unset: + kwargs["description"] = description + if id is not unset: + kwargs["id"] = id + if name is not unset: + kwargs["name"] = name + if score is not unset: + kwargs["score"] = score + if support is not unset: + kwargs["support"] = support + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request.py new file mode 100644 index 0000000000..32ddc1d3d3 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_data import ( + ProductAnalyticsFunnelSuggestionsRequestData, + ) + + +class ProductAnalyticsFunnelSuggestionsRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_data import ( + ProductAnalyticsFunnelSuggestionsRequestData, + ) + + return { + "data": (ProductAnalyticsFunnelSuggestionsRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsFunnelSuggestionsRequestData, **kwargs): + """ + Request to get suggested features and their journeys. + + :param data: Data of a feature suggestions request. + :type data: ProductAnalyticsFunnelSuggestionsRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_attributes.py new file mode 100644 index 0000000000..68e530e5c4 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_attributes.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsFunnelSuggestionsRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "application_id": (str,), + } + + attribute_map = { + "application_id": "application_id", + } + + def __init__(self_, application_id: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes of a feature suggestions request. + + :param application_id: Only return suggestions for this RUM application. + :type application_id: str, optional + """ + if application_id is not unset: + kwargs["application_id"] = application_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_data.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_data.py new file mode 100644 index 0000000000..5e40f82dd8 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_attributes import ( + ProductAnalyticsFunnelSuggestionsRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_type import ( + ProductAnalyticsFunnelSuggestionsRequestType, + ) + + +class ProductAnalyticsFunnelSuggestionsRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_attributes import ( + ProductAnalyticsFunnelSuggestionsRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_type import ( + ProductAnalyticsFunnelSuggestionsRequestType, + ) + + return { + "attributes": (ProductAnalyticsFunnelSuggestionsRequestAttributes,), + "type": (ProductAnalyticsFunnelSuggestionsRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + type: ProductAnalyticsFunnelSuggestionsRequestType, + attributes: Union[ProductAnalyticsFunnelSuggestionsRequestAttributes, UnsetType] = unset, + **kwargs, + ): + """ + Data of a feature suggestions request. + + :param attributes: Attributes of a feature suggestions request. + :type attributes: ProductAnalyticsFunnelSuggestionsRequestAttributes, optional + + :param type: Type of a feature suggestions request. + :type type: ProductAnalyticsFunnelSuggestionsRequestType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_type.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_type.py new file mode 100644 index 0000000000..e55a9d4524 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsFunnelSuggestionsRequestType(ModelSimple): + """ + Type of a feature suggestions request. + + :param value: If omitted defaults to "funnel_suggestions_request". Must be one of ["funnel_suggestions_request"]. + :type value: str + """ + + allowed_values = { + "funnel_suggestions_request", + } + FUNNEL_SUGGESTIONS_REQUEST: ClassVar["ProductAnalyticsFunnelSuggestionsRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsFunnelSuggestionsRequestType.FUNNEL_SUGGESTIONS_REQUEST = ProductAnalyticsFunnelSuggestionsRequestType( + "funnel_suggestions_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response.py new file mode 100644 index 0000000000..d27cc17a87 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_data import ( + ProductAnalyticsFunnelSuggestionsResponseData, + ) + + +class ProductAnalyticsFunnelSuggestionsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_data import ( + ProductAnalyticsFunnelSuggestionsResponseData, + ) + + return { + "data": (ProductAnalyticsFunnelSuggestionsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[ProductAnalyticsFunnelSuggestionsResponseData, UnsetType] = unset, **kwargs): + """ + Suggested features and their journeys. + + :param data: Data of a feature suggestions response. + :type data: ProductAnalyticsFunnelSuggestionsResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_attributes.py new file mode 100644 index 0000000000..6fa72398f2 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_attributes.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_application import ( + ProductAnalyticsFunnelSuggestionsApplication, + ) + + +class ProductAnalyticsFunnelSuggestionsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_application import ( + ProductAnalyticsFunnelSuggestionsApplication, + ) + + return { + "applications": ([ProductAnalyticsFunnelSuggestionsApplication],), + } + + attribute_map = { + "applications": "applications", + } + + def __init__( + self_, applications: Union[List[ProductAnalyticsFunnelSuggestionsApplication], UnsetType] = unset, **kwargs + ): + """ + Attributes of a feature suggestions response. + + :param applications: Suggested features, grouped by application and feature area. + :type applications: [ProductAnalyticsFunnelSuggestionsApplication], optional + """ + if applications is not unset: + kwargs["applications"] = applications + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_data.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_data.py new file mode 100644 index 0000000000..82b80ef2af --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_data.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_attributes import ( + ProductAnalyticsFunnelSuggestionsResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_type import ( + ProductAnalyticsFunnelSuggestionsResponseType, + ) + + +class ProductAnalyticsFunnelSuggestionsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_attributes import ( + ProductAnalyticsFunnelSuggestionsResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_type import ( + ProductAnalyticsFunnelSuggestionsResponseType, + ) + + return { + "attributes": (ProductAnalyticsFunnelSuggestionsResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsFunnelSuggestionsResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[ProductAnalyticsFunnelSuggestionsResponseAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[ProductAnalyticsFunnelSuggestionsResponseType, UnsetType] = unset, + **kwargs, + ): + """ + Data of a feature suggestions response. + + :param attributes: Attributes of a feature suggestions response. + :type attributes: ProductAnalyticsFunnelSuggestionsResponseAttributes, optional + + :param id: ID of the response. + :type id: str, optional + + :param type: Type of a feature suggestions response. + :type type: ProductAnalyticsFunnelSuggestionsResponseType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_type.py b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_type.py new file mode 100644 index 0000000000..481be0b073 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_funnel_suggestions_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsFunnelSuggestionsResponseType(ModelSimple): + """ + Type of a feature suggestions response. + + :param value: If omitted defaults to "funnel_suggestions_response". Must be one of ["funnel_suggestions_response"]. + :type value: str + """ + + allowed_values = { + "funnel_suggestions_response", + } + FUNNEL_SUGGESTIONS_RESPONSE: ClassVar["ProductAnalyticsFunnelSuggestionsResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsFunnelSuggestionsResponseType.FUNNEL_SUGGESTIONS_RESPONSE = ( + ProductAnalyticsFunnelSuggestionsResponseType("funnel_suggestions_response") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_issue.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_issue.py new file mode 100644 index 0000000000..e29db92c1b --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_issue.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class ProductAnalyticsJourneyDropOffIssue(ModelNormal): + @cached_property + def openapi_types(_): + return { + "error_count": (int,), + "issue_id": (str,), + "session_count": (int,), + } + + attribute_map = { + "error_count": "error_count", + "issue_id": "issue_id", + "session_count": "session_count", + } + + def __init__(self_, error_count: int, issue_id: str, session_count: int, **kwargs): + """ + An issue contributing to drop-off at the target step. + + :param error_count: Number of errors attributed to this issue. + :type error_count: int + + :param issue_id: Identifier of the issue. + :type issue_id: str + + :param session_count: Number of sessions affected by this issue. + :type session_count: int + """ + super().__init__(kwargs) + + self_.error_count = error_count + self_.issue_id = issue_id + self_.session_count = session_count diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_query.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_query.py new file mode 100644 index 0000000000..8a518fa842 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_query.py @@ -0,0 +1,82 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_sampling import ProductAnalyticsSampling + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + + +class ProductAnalyticsJourneyDropOffQuery(ModelNormal): + validations = { + "top_issue_count": { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_sampling import ProductAnalyticsSampling + from datadog_api_client.v2.model.product_analytics_journey_search import ProductAnalyticsJourneySearch + from datadog_api_client.v2.model.product_analytics_journey_node_target import ProductAnalyticsJourneyNodeTarget + + return { + "sampling": (ProductAnalyticsSampling,), + "search": (ProductAnalyticsJourneySearch,), + "target": (ProductAnalyticsJourneyNodeTarget,), + "top_issue_count": (int,), + } + + attribute_map = { + "sampling": "sampling", + "search": "search", + "target": "target", + "top_issue_count": "top_issue_count", + } + + def __init__( + self_, + search: ProductAnalyticsJourneySearch, + sampling: Union[ProductAnalyticsSampling, UnsetType] = unset, + target: Union[ProductAnalyticsJourneyNodeTarget, UnsetType] = unset, + top_issue_count: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Query definition for a journey drop-off analysis request. + + :param sampling: Sampling configuration for a query. + :type sampling: ProductAnalyticsSampling, optional + + :param search: Defines the steps of the journey and the filters applied to it. + :type search: ProductAnalyticsJourneySearch + + :param target: A reference to a single step of the journey. + :type target: ProductAnalyticsJourneyNodeTarget, optional + + :param top_issue_count: Maximum number of issues to return. + :type top_issue_count: int, optional + """ + if sampling is not unset: + kwargs["sampling"] = sampling + if target is not unset: + kwargs["target"] = target + if top_issue_count is not unset: + kwargs["top_issue_count"] = top_issue_count + super().__init__(kwargs) + + self_.search = search diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request.py new file mode 100644 index 0000000000..5355c36464 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_data import ( + ProductAnalyticsJourneyDropOffRequestData, + ) + + +class ProductAnalyticsJourneyDropOffRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_data import ( + ProductAnalyticsJourneyDropOffRequestData, + ) + + return { + "data": (ProductAnalyticsJourneyDropOffRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyDropOffRequestData, **kwargs): + """ + Request body for a journey drop-off analysis. + + :param data: The definition of a journey drop-off analysis request body. + :type data: ProductAnalyticsJourneyDropOffRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_attributes.py new file mode 100644 index 0000000000..5f385ef986 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_attributes.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_drop_off_query import ProductAnalyticsJourneyDropOffQuery + + +class ProductAnalyticsJourneyDropOffRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_drop_off_query import ( + ProductAnalyticsJourneyDropOffQuery, + ) + + return { + "_from": (int,), + "query": (ProductAnalyticsJourneyDropOffQuery,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "query": "query", + "to": "to", + } + + def __init__(self_, _from: int, query: ProductAnalyticsJourneyDropOffQuery, to: int, **kwargs): + """ + Attributes of a journey drop-off analysis request. + + :param _from: Start of the query window, in epoch milliseconds. + :type _from: int + + :param query: Query definition for a journey drop-off analysis request. + :type query: ProductAnalyticsJourneyDropOffQuery + + :param to: End of the query window, in epoch milliseconds. + :type to: int + """ + super().__init__(kwargs) + + self_._from = _from + self_.query = query + self_.to = to diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_data.py new file mode 100644 index 0000000000..76f11bfe37 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_data.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_attributes import ( + ProductAnalyticsJourneyDropOffRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_type import ( + ProductAnalyticsJourneyDropOffRequestType, + ) + + +class ProductAnalyticsJourneyDropOffRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_attributes import ( + ProductAnalyticsJourneyDropOffRequestAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_type import ( + ProductAnalyticsJourneyDropOffRequestType, + ) + + return { + "attributes": (ProductAnalyticsJourneyDropOffRequestAttributes,), + "type": (ProductAnalyticsJourneyDropOffRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyDropOffRequestAttributes, + type: ProductAnalyticsJourneyDropOffRequestType, + **kwargs, + ): + """ + The definition of a journey drop-off analysis request body. + + :param attributes: Attributes of a journey drop-off analysis request. + :type attributes: ProductAnalyticsJourneyDropOffRequestAttributes + + :param type: The resource type identifier for a journey drop-off analysis request. + :type type: ProductAnalyticsJourneyDropOffRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_type.py new file mode 100644 index 0000000000..96127bfa4e --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_request_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyDropOffRequestType(ModelSimple): + """ + The resource type identifier for a journey drop-off analysis request. + + :param value: If omitted defaults to "journey_drop_off_analysis_request". Must be one of ["journey_drop_off_analysis_request"]. + :type value: str + """ + + allowed_values = { + "journey_drop_off_analysis_request", + } + JOURNEY_DROP_OFF_ANALYSIS_REQUEST: ClassVar["ProductAnalyticsJourneyDropOffRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyDropOffRequestType.JOURNEY_DROP_OFF_ANALYSIS_REQUEST = ProductAnalyticsJourneyDropOffRequestType( + "journey_drop_off_analysis_request" +) diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response.py new file mode 100644 index 0000000000..f6e9b7e9bd --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_data import ( + ProductAnalyticsJourneyDropOffResponseData, + ) + + +class ProductAnalyticsJourneyDropOffResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_data import ( + ProductAnalyticsJourneyDropOffResponseData, + ) + + return { + "data": (ProductAnalyticsJourneyDropOffResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ProductAnalyticsJourneyDropOffResponseData, **kwargs): + """ + Response for a journey drop-off analysis. + + :param data: The journey drop-off analysis results. + :type data: ProductAnalyticsJourneyDropOffResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_attributes.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_attributes.py new file mode 100644 index 0000000000..fc4f2b3ce7 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_attributes.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_drop_off_issue import ProductAnalyticsJourneyDropOffIssue + + +class ProductAnalyticsJourneyDropOffResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_drop_off_issue import ( + ProductAnalyticsJourneyDropOffIssue, + ) + + return { + "drop_off_count": (int,), + "issues": ([ProductAnalyticsJourneyDropOffIssue],), + "sessions_with_errors": (int,), + "sessions_with_frustration_signals": (int,), + } + + attribute_map = { + "drop_off_count": "drop_off_count", + "issues": "issues", + "sessions_with_errors": "sessions_with_errors", + "sessions_with_frustration_signals": "sessions_with_frustration_signals", + } + + def __init__( + self_, + drop_off_count: int, + issues: List[ProductAnalyticsJourneyDropOffIssue], + sessions_with_errors: int, + sessions_with_frustration_signals: int, + **kwargs, + ): + """ + Attributes of a journey drop-off analysis response. + + :param drop_off_count: Number of sessions that reached the step before the target but not the target step. + :type drop_off_count: int + + :param issues: The issues most associated with the drop-off. + :type issues: [ProductAnalyticsJourneyDropOffIssue] + + :param sessions_with_errors: Number of dropped-off sessions that contained an error. + :type sessions_with_errors: int + + :param sessions_with_frustration_signals: Number of dropped-off sessions that contained a frustration signal. + :type sessions_with_frustration_signals: int + """ + super().__init__(kwargs) + + self_.drop_off_count = drop_off_count + self_.issues = issues + self_.sessions_with_errors = sessions_with_errors + self_.sessions_with_frustration_signals = sessions_with_frustration_signals diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_data.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_data.py new file mode 100644 index 0000000000..f46db5bee0 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_data.py @@ -0,0 +1,68 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_attributes import ( + ProductAnalyticsJourneyDropOffResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_type import ( + ProductAnalyticsJourneyDropOffResponseType, + ) + + +class ProductAnalyticsJourneyDropOffResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_attributes import ( + ProductAnalyticsJourneyDropOffResponseAttributes, + ) + from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_type import ( + ProductAnalyticsJourneyDropOffResponseType, + ) + + return { + "attributes": (ProductAnalyticsJourneyDropOffResponseAttributes,), + "id": (str,), + "type": (ProductAnalyticsJourneyDropOffResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: ProductAnalyticsJourneyDropOffResponseAttributes, + id: str, + type: ProductAnalyticsJourneyDropOffResponseType, + **kwargs, + ): + """ + The journey drop-off analysis results. + + :param attributes: Attributes of a journey drop-off analysis response. + :type attributes: ProductAnalyticsJourneyDropOffResponseAttributes + + :param id: Identifier of this result. + :type id: str + + :param type: The resource type identifier for a journey drop-off analysis response. + :type type: ProductAnalyticsJourneyDropOffResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_type.py b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_type.py new file mode 100644 index 0000000000..4a9e399af3 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_journey_drop_off_response_type.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ProductAnalyticsJourneyDropOffResponseType(ModelSimple): + """ + The resource type identifier for a journey drop-off analysis response. + + :param value: If omitted defaults to "journey_drop_off_analysis_response". Must be one of ["journey_drop_off_analysis_response"]. + :type value: str + """ + + allowed_values = { + "journey_drop_off_analysis_response", + } + JOURNEY_DROP_OFF_ANALYSIS_RESPONSE: ClassVar["ProductAnalyticsJourneyDropOffResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ProductAnalyticsJourneyDropOffResponseType.JOURNEY_DROP_OFF_ANALYSIS_RESPONSE = ( + ProductAnalyticsJourneyDropOffResponseType("journey_drop_off_analysis_response") +) diff --git a/src/datadog_api_client/v2/model/product_analytics_sampling.py b/src/datadog_api_client/v2/model/product_analytics_sampling.py new file mode 100644 index 0000000000..82faaee368 --- /dev/null +++ b/src/datadog_api_client/v2/model/product_analytics_sampling.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ProductAnalyticsSampling(ModelNormal): + @cached_property + def openapi_types(_): + return { + "enabled": (bool,), + } + + attribute_map = { + "enabled": "enabled", + } + + def __init__(self_, enabled: Union[bool, UnsetType] = unset, **kwargs): + """ + Sampling configuration for a query. + + :param enabled: Whether session sampling is enabled; reduces query cost at the cost of statistical precision. + :type enabled: bool, optional + """ + if enabled is not unset: + kwargs["enabled"] = enabled + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f64e232c78..12ca5ef7a4 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -9306,6 +9306,7 @@ from datadog_api_client.v2.model.product_analytics_calendar_interval import ProductAnalyticsCalendarInterval from datadog_api_client.v2.model.product_analytics_calendar_interval_type import ProductAnalyticsCalendarIntervalType from datadog_api_client.v2.model.product_analytics_compute import ProductAnalyticsCompute +from datadog_api_client.v2.model.product_analytics_core_user_journey import ProductAnalyticsCoreUserJourney from datadog_api_client.v2.model.product_analytics_elapsed_time import ProductAnalyticsElapsedTime from datadog_api_client.v2.model.product_analytics_event_query import ProductAnalyticsEventQuery from datadog_api_client.v2.model.product_analytics_event_query_data_source import ProductAnalyticsEventQueryDataSource @@ -9335,6 +9336,63 @@ from datadog_api_client.v2.model.product_analytics_formula_retention_request_type import ( ProductAnalyticsFormulaRetentionRequestType, ) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request import ( + ProductAnalyticsFunnelStepSuggestionsRequest, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_attributes import ( + ProductAnalyticsFunnelStepSuggestionsRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_data import ( + ProductAnalyticsFunnelStepSuggestionsRequestData, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_request_type import ( + ProductAnalyticsFunnelStepSuggestionsRequestType, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response import ( + ProductAnalyticsFunnelStepSuggestionsResponse, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_attributes import ( + ProductAnalyticsFunnelStepSuggestionsResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_data import ( + ProductAnalyticsFunnelStepSuggestionsResponseData, +) +from datadog_api_client.v2.model.product_analytics_funnel_step_suggestions_response_type import ( + ProductAnalyticsFunnelStepSuggestionsResponseType, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_application import ( + ProductAnalyticsFunnelSuggestionsApplication, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_domain import ( + ProductAnalyticsFunnelSuggestionsDomain, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_feature import ( + ProductAnalyticsFunnelSuggestionsFeature, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request import ( + ProductAnalyticsFunnelSuggestionsRequest, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_attributes import ( + ProductAnalyticsFunnelSuggestionsRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_data import ( + ProductAnalyticsFunnelSuggestionsRequestData, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_request_type import ( + ProductAnalyticsFunnelSuggestionsRequestType, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response import ( + ProductAnalyticsFunnelSuggestionsResponse, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_attributes import ( + ProductAnalyticsFunnelSuggestionsResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_data import ( + ProductAnalyticsFunnelSuggestionsResponseData, +) +from datadog_api_client.v2.model.product_analytics_funnel_suggestions_response_type import ( + ProductAnalyticsFunnelSuggestionsResponseType, +) from datadog_api_client.v2.model.product_analytics_graph_query_compute import ProductAnalyticsGraphQueryCompute from datadog_api_client.v2.model.product_analytics_graph_query_group_by import ProductAnalyticsGraphQueryGroupBy from datadog_api_client.v2.model.product_analytics_graph_query_group_by_source import ( @@ -9361,6 +9419,30 @@ ProductAnalyticsJourneyComputedColumnName, ) from datadog_api_client.v2.model.product_analytics_journey_conversion_type import ProductAnalyticsJourneyConversionType +from datadog_api_client.v2.model.product_analytics_journey_drop_off_issue import ProductAnalyticsJourneyDropOffIssue +from datadog_api_client.v2.model.product_analytics_journey_drop_off_query import ProductAnalyticsJourneyDropOffQuery +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request import ProductAnalyticsJourneyDropOffRequest +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_attributes import ( + ProductAnalyticsJourneyDropOffRequestAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_data import ( + ProductAnalyticsJourneyDropOffRequestData, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_request_type import ( + ProductAnalyticsJourneyDropOffRequestType, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_response import ( + ProductAnalyticsJourneyDropOffResponse, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_attributes import ( + ProductAnalyticsJourneyDropOffResponseAttributes, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_data import ( + ProductAnalyticsJourneyDropOffResponseData, +) +from datadog_api_client.v2.model.product_analytics_journey_drop_off_response_type import ( + ProductAnalyticsJourneyDropOffResponseType, +) from datadog_api_client.v2.model.product_analytics_journey_entity import ProductAnalyticsJourneyEntity from datadog_api_client.v2.model.product_analytics_journey_funnel_compute import ProductAnalyticsJourneyFunnelCompute from datadog_api_client.v2.model.product_analytics_journey_funnel_query import ProductAnalyticsJourneyFunnelQuery @@ -9575,6 +9657,7 @@ from datadog_api_client.v2.model.product_analytics_retention_scope import ProductAnalyticsRetentionScope from datadog_api_client.v2.model.product_analytics_retention_search import ProductAnalyticsRetentionSearch from datadog_api_client.v2.model.product_analytics_retention_time_interval import ProductAnalyticsRetentionTimeInterval +from datadog_api_client.v2.model.product_analytics_sampling import ProductAnalyticsSampling from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node import ProductAnalyticsSankeyAggregatedNode from datadog_api_client.v2.model.product_analytics_sankey_aggregated_node_type import ( ProductAnalyticsSankeyAggregatedNodeType, @@ -20270,6 +20353,7 @@ "ProductAnalyticsCalendarInterval", "ProductAnalyticsCalendarIntervalType", "ProductAnalyticsCompute", + "ProductAnalyticsCoreUserJourney", "ProductAnalyticsElapsedTime", "ProductAnalyticsEventQuery", "ProductAnalyticsEventQueryDataSource", @@ -20285,6 +20369,25 @@ "ProductAnalyticsFormulaRetentionRequestAttributes", "ProductAnalyticsFormulaRetentionRequestData", "ProductAnalyticsFormulaRetentionRequestType", + "ProductAnalyticsFunnelStepSuggestionsRequest", + "ProductAnalyticsFunnelStepSuggestionsRequestAttributes", + "ProductAnalyticsFunnelStepSuggestionsRequestData", + "ProductAnalyticsFunnelStepSuggestionsRequestType", + "ProductAnalyticsFunnelStepSuggestionsResponse", + "ProductAnalyticsFunnelStepSuggestionsResponseAttributes", + "ProductAnalyticsFunnelStepSuggestionsResponseData", + "ProductAnalyticsFunnelStepSuggestionsResponseType", + "ProductAnalyticsFunnelSuggestionsApplication", + "ProductAnalyticsFunnelSuggestionsDomain", + "ProductAnalyticsFunnelSuggestionsFeature", + "ProductAnalyticsFunnelSuggestionsRequest", + "ProductAnalyticsFunnelSuggestionsRequestAttributes", + "ProductAnalyticsFunnelSuggestionsRequestData", + "ProductAnalyticsFunnelSuggestionsRequestType", + "ProductAnalyticsFunnelSuggestionsResponse", + "ProductAnalyticsFunnelSuggestionsResponseAttributes", + "ProductAnalyticsFunnelSuggestionsResponseData", + "ProductAnalyticsFunnelSuggestionsResponseType", "ProductAnalyticsGraphQueryCompute", "ProductAnalyticsGraphQueryGroupBy", "ProductAnalyticsGraphQueryGroupBySource", @@ -20299,6 +20402,16 @@ "ProductAnalyticsJourneyComputedColumn", "ProductAnalyticsJourneyComputedColumnName", "ProductAnalyticsJourneyConversionType", + "ProductAnalyticsJourneyDropOffIssue", + "ProductAnalyticsJourneyDropOffQuery", + "ProductAnalyticsJourneyDropOffRequest", + "ProductAnalyticsJourneyDropOffRequestAttributes", + "ProductAnalyticsJourneyDropOffRequestData", + "ProductAnalyticsJourneyDropOffRequestType", + "ProductAnalyticsJourneyDropOffResponse", + "ProductAnalyticsJourneyDropOffResponseAttributes", + "ProductAnalyticsJourneyDropOffResponseData", + "ProductAnalyticsJourneyDropOffResponseType", "ProductAnalyticsJourneyEntity", "ProductAnalyticsJourneyFunnelCompute", "ProductAnalyticsJourneyFunnelQuery", @@ -20403,6 +20516,7 @@ "ProductAnalyticsRetentionScope", "ProductAnalyticsRetentionSearch", "ProductAnalyticsRetentionTimeInterval", + "ProductAnalyticsSampling", "ProductAnalyticsSankeyAggregatedNode", "ProductAnalyticsSankeyAggregatedNodeType", "ProductAnalyticsSankeyDefinition", diff --git a/tests/v2/features/product_analytics.feature b/tests/v2/features/product_analytics.feature index 1af45e54a7..ae49816093 100644 --- a/tests/v2/features/product_analytics.feature +++ b/tests/v2/features/product_analytics.feature @@ -14,6 +14,24 @@ Feature: Product Analytics Given a valid "apiKeyAuth" key in the system And an instance of "ProductAnalytics" API + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Analyze journey drop-off returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyDropOff" enabled + And new "QueryProductAnalyticsJourneyDropOff" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"sampling": {"enabled": false}, "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}, "target": {"type": "node", "value": "A"}, "top_issue_count": 5}, "to": 1756857600000}, "type": "journey_drop_off_analysis_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:ddoghq/product-analytics-platform + Scenario: Analyze journey drop-off returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyDropOff" enabled + And new "QueryProductAnalyticsJourneyDropOff" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"sampling": {"enabled": false}, "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}, "target": {"type": "node", "value": "B"}, "top_issue_count": 5}, "to": 1756857600000}, "type": "journey_drop_off_analysis_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/product-analytics-platform Scenario: Compute a Sankey diagram returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -172,6 +190,42 @@ Feature: Product Analytics When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get feature suggestions returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelSuggestions" enabled + And new "QueryProductAnalyticsFunnelSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6"}, "type": "funnel_suggestions_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get feature suggestions returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelSuggestions" enabled + And new "QueryProductAnalyticsFunnelSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6"}, "type": "funnel_suggestions_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get funnel step suggestions returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelStepSuggestions" enabled + And new "QueryProductAnalyticsFunnelStepSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6", "expression": "node_0->node_1", "steps": {"node_0": "@type:view @view.name:/checkout"}}, "type": "funnel_suggestions_steps_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get funnel step suggestions returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelStepSuggestions" enabled + And new "QueryProductAnalyticsFunnelStepSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6", "expression": "node_0->node_1", "steps": {"node_0": "@type:view @view.name:/checkout"}}, "type": "funnel_suggestions_steps_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/product-analytics-platform Scenario: List analytics events returns "Bad Request" response Given a valid "appKeyAuth" key in the system diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 0d9b33aa46..3e70edcb48 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -7528,6 +7528,12 @@ "type": "safe" } }, + "QueryProductAnalyticsJourneyDropOff": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryProductAnalyticsJourneyFunnel": { "tag": "Product Analytics", "undo": { @@ -7582,6 +7588,18 @@ "type": "safe" } }, + "QueryProductAnalyticsFunnelSuggestions": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsFunnelStepSuggestions": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryEventFilteredUsers": { "tag": "Rum Audience Management", "undo": {