Skip to content

Commit 60596e6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e67df21 of spec repo
1 parent f18487c commit 60596e6

34 files changed

Lines changed: 2923 additions & 25 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 602 additions & 8 deletions
Large diffs are not rendered by default.

examples/v2/test-optimization/SearchFlakyTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const params: v2.TestOptimizationApiSearchFlakyTestsRequest = {
1313
data: {
1414
attributes: {
1515
filter: {
16+
includeHistory: true,
1617
query: `flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"`,
1718
},
18-
includeHistory: true,
1919
page: {
2020
cursor:
2121
"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",

examples/v2/test-optimization/SearchFlakyTests_1224086727.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const params: v2.TestOptimizationApiSearchFlakyTestsRequest = {
1313
data: {
1414
attributes: {
1515
filter: {
16+
includeHistory: true,
1617
query: `flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"`,
1718
},
18-
includeHistory: true,
1919
page: {
2020
cursor:
2121
"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",

examples/v2/test-optimization/SearchFlakyTests_209064879.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const params: v2.TestOptimizationApiSearchFlakyTestsRequest = {
1414
attributes: {
1515
filter: {
1616
query: `flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"`,
17+
includeHistory: true,
1718
},
1819
page: {
1920
limit: 10,
2021
},
2122
sort: "fqn",
22-
includeHistory: true,
2323
},
2424
type: "search_flaky_tests_request",
2525
},
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Create a widget returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.WidgetsApi(configuration);
9+
10+
const params: v2.WidgetsApiCreateWidgetRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
definition: {
15+
title: "My Widget",
16+
type: "bar_chart",
17+
},
18+
tags: [],
19+
},
20+
type: "widgets",
21+
},
22+
},
23+
experienceType: "ccm_reports",
24+
};
25+
26+
apiInstance
27+
.createWidget(params)
28+
.then((data: v2.WidgetResponse) => {
29+
console.log(
30+
"API called successfully. Returned data: " + JSON.stringify(data)
31+
);
32+
})
33+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Delete a widget returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.WidgetsApi(configuration);
9+
10+
const params: v2.WidgetsApiDeleteWidgetRequest = {
11+
experienceType: "ccm_reports",
12+
uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
13+
};
14+
15+
apiInstance
16+
.deleteWidget(params)
17+
.then((data: any) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));

examples/v2/widgets/GetWidget.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get a widget returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.WidgetsApi(configuration);
9+
10+
const params: v2.WidgetsApiGetWidgetRequest = {
11+
experienceType: "ccm_reports",
12+
uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
13+
};
14+
15+
apiInstance
16+
.getWidget(params)
17+
.then((data: v2.WidgetResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Search widgets returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.WidgetsApi(configuration);
9+
10+
const params: v2.WidgetsApiSearchWidgetsRequest = {
11+
experienceType: "ccm_reports",
12+
};
13+
14+
apiInstance
15+
.searchWidgets(params)
16+
.then((data: v2.WidgetListResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Update a widget returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.WidgetsApi(configuration);
9+
10+
const params: v2.WidgetsApiUpdateWidgetRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
definition: {
15+
title: "My Widget",
16+
type: "bar_chart",
17+
},
18+
tags: [],
19+
},
20+
type: "widgets",
21+
},
22+
},
23+
experienceType: "ccm_reports",
24+
uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
25+
};
26+
27+
apiInstance
28+
.updateWidget(params)
29+
.then((data: v2.WidgetResponse) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11751,6 +11751,93 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1175111751
},
1175211752
"operationResponseType": "PermissionsResponse",
1175311753
},
11754+
"v2.SearchWidgets": {
11755+
"experienceType": {
11756+
"type": "WidgetExperienceType",
11757+
"format": "",
11758+
},
11759+
"filterWidgetType": {
11760+
"type": "WidgetType",
11761+
"format": "",
11762+
},
11763+
"filterCreatorHandle": {
11764+
"type": "string",
11765+
"format": "",
11766+
},
11767+
"filterIsFavorited": {
11768+
"type": "boolean",
11769+
"format": "",
11770+
},
11771+
"filterTitle": {
11772+
"type": "string",
11773+
"format": "",
11774+
},
11775+
"filterTags": {
11776+
"type": "string",
11777+
"format": "",
11778+
},
11779+
"sort": {
11780+
"type": "string",
11781+
"format": "",
11782+
},
11783+
"pageNumber": {
11784+
"type": "number",
11785+
"format": "",
11786+
},
11787+
"pageSize": {
11788+
"type": "number",
11789+
"format": "",
11790+
},
11791+
"operationResponseType": "WidgetListResponse",
11792+
},
11793+
"v2.CreateWidget": {
11794+
"experienceType": {
11795+
"type": "WidgetExperienceType",
11796+
"format": "",
11797+
},
11798+
"body": {
11799+
"type": "CreateOrUpdateWidgetRequest",
11800+
"format": "",
11801+
},
11802+
"operationResponseType": "WidgetResponse",
11803+
},
11804+
"v2.GetWidget": {
11805+
"experienceType": {
11806+
"type": "WidgetExperienceType",
11807+
"format": "",
11808+
},
11809+
"uuid": {
11810+
"type": "string",
11811+
"format": "uuid",
11812+
},
11813+
"operationResponseType": "WidgetResponse",
11814+
},
11815+
"v2.UpdateWidget": {
11816+
"experienceType": {
11817+
"type": "WidgetExperienceType",
11818+
"format": "",
11819+
},
11820+
"uuid": {
11821+
"type": "string",
11822+
"format": "uuid",
11823+
},
11824+
"body": {
11825+
"type": "CreateOrUpdateWidgetRequest",
11826+
"format": "",
11827+
},
11828+
"operationResponseType": "WidgetResponse",
11829+
},
11830+
"v2.DeleteWidget": {
11831+
"experienceType": {
11832+
"type": "WidgetExperienceType",
11833+
"format": "",
11834+
},
11835+
"uuid": {
11836+
"type": "string",
11837+
"format": "uuid",
11838+
},
11839+
"operationResponseType": "{}",
11840+
},
1175411841
"v2.CreateWorkflow": {
1175511842
"body": {
1175611843
"type": "CreateWorkflowRequest",

0 commit comments

Comments
 (0)