Skip to content

Commit 2f4a7ce

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Sync 'audience_management.yaml' files with backend (#2937)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent aeffb31 commit 2f4a7ce

File tree

68 files changed

+5436
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5436
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1065 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
@endpoint(rum-audience-management) @endpoint(rum-audience-management-v2)
2+
Feature: Rum Audience Management
3+
Auto-generated tag Rum Audience Management
4+
5+
Background:
6+
Given a valid "apiKeyAuth" key in the system
7+
And a valid "appKeyAuth" key in the system
8+
And an instance of "RumAudienceManagement" API
9+
10+
@generated @skip @team:DataDog/audience-management-backend
11+
Scenario: Create connection returns "Connection created successfully" response
12+
Given operation "CreateConnection" enabled
13+
And new "CreateConnection" request
14+
And request contains "entity" parameter from "REPLACE.ME"
15+
And body with value {"data": {"attributes": {"fields": [{"description": "Customer subscription tier from `CRM`", "display_name": "Customer Tier", "id": "customer_tier", "source_name": "subscription_tier", "type": "string"}, {"description": "Customer lifetime value in `USD`", "display_name": "Lifetime Value", "id": "lifetime_value", "source_name": "ltv", "type": "number"}], "join_attribute": "user_email", "join_type": "email", "type": "ref_table"}, "id": "crm-integration", "type": "connection_id"}}
16+
When the request is sent
17+
Then the response status is 201 Connection created successfully
18+
19+
@generated @skip @team:DataDog/audience-management-backend
20+
Scenario: Delete connection returns "Connection deleted successfully" response
21+
Given operation "DeleteConnection" enabled
22+
And new "DeleteConnection" request
23+
And request contains "id" parameter from "REPLACE.ME"
24+
And request contains "entity" parameter from "REPLACE.ME"
25+
When the request is sent
26+
Then the response status is 204 Connection deleted successfully
27+
28+
@generated @skip @team:DataDog/audience-management-backend
29+
Scenario: Get account facet info returns "Successful response with facet information" response
30+
Given operation "GetAccountFacetInfo" enabled
31+
And new "GetAccountFacetInfo" request
32+
And body with value {"data": {"attributes": {"facet_id": "first_browser_name", "limit": 10, "search": {"query": "user_org_id:5001 AND first_country_code:US"}, "term_search": {"value": "Chrome"}}, "id": "facet_info_request", "type": "users_facet_info_request"}}
33+
When the request is sent
34+
Then the response status is 200 Successful response with facet information
35+
36+
@generated @skip @team:DataDog/audience-management-backend
37+
Scenario: Get mapping returns "Successful response with entity mapping configuration" response
38+
Given operation "GetMapping" enabled
39+
And new "GetMapping" request
40+
And request contains "entity" parameter from "REPLACE.ME"
41+
When the request is sent
42+
Then the response status is 200 Successful response with entity mapping configuration
43+
44+
@generated @skip @team:DataDog/audience-management-backend
45+
Scenario: Get user facet info returns "Successful response with facet information" response
46+
Given operation "GetUserFacetInfo" enabled
47+
And new "GetUserFacetInfo" request
48+
And body with value {"data": {"attributes": {"facet_id": "first_browser_name", "limit": 10, "search": {"query": "user_org_id:5001 AND first_country_code:US"}, "term_search": {"value": "Chrome"}}, "id": "facet_info_request", "type": "users_facet_info_request"}}
49+
When the request is sent
50+
Then the response status is 200 Successful response with facet information
51+
52+
@generated @skip @team:DataDog/audience-management-backend
53+
Scenario: List connections returns "Successful response with list of connections" response
54+
Given operation "ListConnections" enabled
55+
And new "ListConnections" request
56+
And request contains "entity" parameter from "REPLACE.ME"
57+
When the request is sent
58+
Then the response status is 200 Successful response with list of connections
59+
60+
@generated @skip @team:DataDog/audience-management-backend
61+
Scenario: Query accounts returns "Successful response with account data" response
62+
Given operation "QueryAccounts" enabled
63+
And new "QueryAccounts" request
64+
And body with value {"data": {"attributes": {"limit": 20, "query": "plan_type:enterprise AND user_count:>100 AND subscription_status:active", "select_columns": ["account_id", "account_name", "user_count", "plan_type", "subscription_status", "created_at", "mrr", "industry"], "sort": {"field": "user_count", "order": "DESC"}, "wildcard_search_term": "tech"}, "id": "query_account_request", "type": "query_account_request"}}
65+
When the request is sent
66+
Then the response status is 200 Successful response with account data
67+
68+
@generated @skip @team:DataDog/audience-management-backend
69+
Scenario: Query event filtered users returns "Successful response with filtered user data" response
70+
Given operation "QueryEventFilteredUsers" enabled
71+
And new "QueryEventFilteredUsers" request
72+
And body with value {"data": {"attributes": {"event_query": {"query": "@type:view AND @view.loading_time:>3000 AND @application.name:ecommerce-platform", "time_frame": {"end": 1761309676, "start": 1760100076}}, "include_row_count": true, "limit": 25, "query": "user_org_id:5001 AND first_country_code:US AND first_browser_name:Chrome", "select_columns": ["user_id", "user_email", "first_country_code", "first_browser_name", "events_count", "session_count", "error_count", "avg_loading_time"]}, "id": "query_event_filtered_users_request", "type": "query_event_filtered_users_request"}}
73+
When the request is sent
74+
Then the response status is 200 Successful response with filtered user data
75+
76+
@generated @skip @team:DataDog/audience-management-backend
77+
Scenario: Query users returns "Successful response with user data" response
78+
Given operation "QueryUsers" enabled
79+
And new "QueryUsers" request
80+
And body with value {"data": {"attributes": {"limit": 25, "query": "user_email:*@techcorp.com AND first_country_code:US AND first_browser_name:Chrome", "select_columns": ["user_id", "user_email", "user_name", "user_org_id", "first_country_code", "first_browser_name", "first_device_type", "last_seen"], "sort": {"field": "first_seen", "order": "DESC"}, "wildcard_search_term": "john"}, "id": "query_users_request", "type": "query_users_request"}}
81+
When the request is sent
82+
Then the response status is 200 Successful response with user data
83+
84+
@generated @skip @team:DataDog/audience-management-backend
85+
Scenario: Update connection returns "Connection updated successfully" response
86+
Given operation "UpdateConnection" enabled
87+
And new "UpdateConnection" request
88+
And request contains "entity" parameter from "REPLACE.ME"
89+
And body with value {"data": {"attributes": {"fields_to_add": [{"description": "Net Promoter Score from customer surveys", "display_name": "NPS Score", "groups": ["Satisfaction", "Metrics"], "id": "nps_score", "source_name": "net_promoter_score", "type": "number"}], "fields_to_delete": ["old_revenue_field"], "fields_to_update": [{"field_id": "lifetime_value", "updated_display_name": "Customer Lifetime Value (`USD`)", "updated_groups": ["Financial", "Metrics"]}]}, "id": "crm-integration", "type": "connection_id"}}
90+
When the request is sent
91+
Then the response status is 200 Connection updated successfully

features/v2/undo.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,6 +2813,87 @@
28132813
"type": "safe"
28142814
}
28152815
},
2816+
"GetAccountFacetInfo": {
2817+
"tag": "Rum Audience Management",
2818+
"undo": {
2819+
"operationId": "TODO",
2820+
"parameters": [],
2821+
"type": "unsafe"
2822+
}
2823+
},
2824+
"QueryAccounts": {
2825+
"tag": "Rum Audience Management",
2826+
"undo": {
2827+
"operationId": "TODO",
2828+
"parameters": [],
2829+
"type": "unsafe"
2830+
}
2831+
},
2832+
"QueryEventFilteredUsers": {
2833+
"tag": "Rum Audience Management",
2834+
"undo": {
2835+
"operationId": "TODO",
2836+
"parameters": [],
2837+
"type": "unsafe"
2838+
}
2839+
},
2840+
"GetUserFacetInfo": {
2841+
"tag": "Rum Audience Management",
2842+
"undo": {
2843+
"operationId": "TODO",
2844+
"parameters": [],
2845+
"type": "unsafe"
2846+
}
2847+
},
2848+
"QueryUsers": {
2849+
"tag": "Rum Audience Management",
2850+
"undo": {
2851+
"operationId": "TODO",
2852+
"parameters": [],
2853+
"type": "unsafe"
2854+
}
2855+
},
2856+
"GetMapping": {
2857+
"tag": "Rum Audience Management",
2858+
"undo": {
2859+
"type": "safe"
2860+
}
2861+
},
2862+
"CreateConnection": {
2863+
"tag": "Rum Audience Management",
2864+
"undo": {
2865+
"operationId": "DeleteConnection",
2866+
"parameters": [
2867+
{
2868+
"name": "id",
2869+
"source": "<RESPONSE_PATH>"
2870+
},
2871+
{
2872+
"name": "entity",
2873+
"source": "<RESPONSE_PATH>"
2874+
}
2875+
],
2876+
"type": "unsafe"
2877+
}
2878+
},
2879+
"UpdateConnection": {
2880+
"tag": "Rum Audience Management",
2881+
"undo": {
2882+
"type": "idempotent"
2883+
}
2884+
},
2885+
"DeleteConnection": {
2886+
"tag": "Rum Audience Management",
2887+
"undo": {
2888+
"type": "idempotent"
2889+
}
2890+
},
2891+
"ListConnections": {
2892+
"tag": "Rum Audience Management",
2893+
"undo": {
2894+
"type": "safe"
2895+
}
2896+
},
28162897
"QueryScalarData": {
28172898
"tag": "Metrics",
28182899
"undo": {

packages/datadog-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ apiInstance
417417
| Restriction Policies | @datadog/datadog-api-client-restriction-policies | [README.md](../../services/restriction-policies/README.md) |
418418
| Roles | @datadog/datadog-api-client-roles | [README.md](../../services/roles/README.md) |
419419
| RUM | @datadog/datadog-api-client-rum | [README.md](../../services/rum/README.md) |
420+
| Rum Audience Management | @datadog/datadog-api-client-rum-audience-management | [README.md](../../services/rum-audience-management/README.md) |
420421
| Rum Metrics | @datadog/datadog-api-client-rum-metrics | [README.md](../../services/rum-metrics/README.md) |
421422
| Rum Retention Filters | @datadog/datadog-api-client-rum-retention-filters | [README.md](../../services/rum-retention-filters/README.md) |
422423
| Security Monitoring | @datadog/datadog-api-client-security-monitoring | [README.md](../../services/security-monitoring/README.md) |

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7509,6 +7509,88 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
75097509
},
75107510
operationResponseType: "ProcessSummariesResponse",
75117511
},
7512+
"RumAudienceManagementApi.V2.GetAccountFacetInfo": {
7513+
body: {
7514+
type: "FacetInfoRequest",
7515+
format: "",
7516+
},
7517+
operationResponseType: "FacetInfoResponse",
7518+
},
7519+
"RumAudienceManagementApi.V2.QueryAccounts": {
7520+
body: {
7521+
type: "QueryAccountRequest",
7522+
format: "",
7523+
},
7524+
operationResponseType: "QueryResponse",
7525+
},
7526+
"RumAudienceManagementApi.V2.QueryEventFilteredUsers": {
7527+
body: {
7528+
type: "QueryEventFilteredUsersRequest",
7529+
format: "",
7530+
},
7531+
operationResponseType: "QueryResponse",
7532+
},
7533+
"RumAudienceManagementApi.V2.GetUserFacetInfo": {
7534+
body: {
7535+
type: "FacetInfoRequest",
7536+
format: "",
7537+
},
7538+
operationResponseType: "FacetInfoResponse",
7539+
},
7540+
"RumAudienceManagementApi.V2.QueryUsers": {
7541+
body: {
7542+
type: "QueryUsersRequest",
7543+
format: "",
7544+
},
7545+
operationResponseType: "QueryResponse",
7546+
},
7547+
"RumAudienceManagementApi.V2.GetMapping": {
7548+
entity: {
7549+
type: "string",
7550+
format: "",
7551+
},
7552+
operationResponseType: "GetMappingResponse",
7553+
},
7554+
"RumAudienceManagementApi.V2.UpdateConnection": {
7555+
entity: {
7556+
type: "string",
7557+
format: "",
7558+
},
7559+
body: {
7560+
type: "UpdateConnectionRequest",
7561+
format: "",
7562+
},
7563+
operationResponseType: "{}",
7564+
},
7565+
"RumAudienceManagementApi.V2.CreateConnection": {
7566+
entity: {
7567+
type: "string",
7568+
format: "",
7569+
},
7570+
body: {
7571+
type: "CreateConnectionRequest",
7572+
format: "",
7573+
},
7574+
operationResponseType: "{}",
7575+
},
7576+
"RumAudienceManagementApi.V2.DeleteConnection": {
7577+
id: {
7578+
type: "string",
7579+
format: "",
7580+
},
7581+
entity: {
7582+
type: "string",
7583+
format: "",
7584+
},
7585+
operationResponseType: "{}",
7586+
},
7587+
"RumAudienceManagementApi.V2.ListConnections": {
7588+
entity: {
7589+
type: "string",
7590+
format: "",
7591+
},
7592+
operationResponseType: "ListConnectionsResponse",
7593+
},
75127594
"ReferenceTablesApi.V2.ListTables": {
75137595
pageLimit: {
75147596
type: "number",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# @datadog/datadog-api-client-rum-audience-management
2+
3+
## Description
4+
5+
Auto-generated tag Rum Audience Management
6+
7+
## Navigation
8+
9+
- [Installation](#installation)
10+
- [Getting Started](#getting-started)
11+
12+
## Installation
13+
14+
```sh
15+
# NPM
16+
npm install @datadog/datadog-api-client-rum-audience-management
17+
# Yarn
18+
yarn add @datadog/datadog-api-client-rum-audience-management
19+
```
20+
21+
## Getting Started
22+
```ts
23+
import { createConfiguration } from "@datadog/datadog-api-client";
24+
import { RumAudienceManagementApiV2 } from "@datadog/datadog-api-client-rum-audience-management";
25+
import { v2 } from "@datadog/datadog-api-client-rum-audience-management";
26+
27+
const configuration = createConfiguration();
28+
// Enable unstable operations
29+
const configurationOpts = {
30+
unstableOperations: {
31+
"RumAudienceManagementApi.v2.getAccountFacetInfo": true
32+
}
33+
}
34+
35+
const configuration = createConfiguration(configurationOpts);
36+
const apiInstance = new RumAudienceManagementApiV2(configuration);
37+
const params = {/* parameters */};
38+
39+
apiInstance.getAccountFacetInfo(params).then((data) => {
40+
console.log("API called successfully. Returned data: " + JSON.stringify(data));
41+
}).catch((error) => {
42+
console.error("Error calling API: " + error);
43+
});
44+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "@datadog/datadog-api-client-rum-audience-management",
3+
"description": "",
4+
"author": "",
5+
"keywords": [
6+
"api",
7+
"fetch",
8+
"typescript"
9+
],
10+
"license": "Apache-2.0",
11+
"licenses": [
12+
{
13+
"type": "Apache-2.0",
14+
"url": "http://www.apache.org/licenses/LICENSE-2.0"
15+
}
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/DataDog/datadog-api-client-typescript.git",
20+
"directory": "services/rum-audience-management"
21+
},
22+
"files": [
23+
"dist/**/*"
24+
],
25+
"main": "./dist/index.js",
26+
"typings": "./dist/index.d.ts",
27+
"scripts": {
28+
"prepack": "yarn workspace @datadog/datadog-api-client build && yarn build",
29+
"build": "yarn generate-version-files && tsc",
30+
"generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts"
31+
},
32+
"dependencies": {
33+
"@datadog/datadog-api-client": "^2.0.0-beta.0"
34+
},
35+
"devDependencies": {
36+
"typescript": "5.8.3"
37+
},
38+
"engines": {
39+
"node": ">=18.0.0"
40+
},
41+
"version": "0.0.1",
42+
"packageManager": "[email protected]"
43+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * as v2 from "./v2";
2+
3+
export { RumAudienceManagementApi as RumAudienceManagementApiV2 } from "./v2/RumAudienceManagementApi";

0 commit comments

Comments
 (0)