Skip to content

Commit 0e9bf88

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f1b97e5 of spec repo
1 parent b323d97 commit 0e9bf88

29 files changed

Lines changed: 2660 additions & 19 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 472 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Create a timestamp override for an incident returns "Created" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createIncidentTimestampOverride"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiCreateIncidentTimestampOverrideRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
timestampType: "created",
16+
timestampValue: new Date(2024, 12, 29, 10, 0, 0, 0),
17+
},
18+
type: "incidents_timestamp_overrides",
19+
},
20+
},
21+
incidentId: "9cecfde8-e35d-4387-8985-9b30dcb9cb1c",
22+
};
23+
24+
apiInstance
25+
.createIncidentTimestampOverride(params)
26+
.then((data: v2.IncidentTimestampOverrideResponse) => {
27+
console.log(
28+
"API called successfully. Returned data: " + JSON.stringify(data)
29+
);
30+
})
31+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Delete a timestamp override for an incident returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.deleteIncidentTimestampOverride"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiDeleteIncidentTimestampOverrideRequest = {
12+
incidentId: "9cecfde8-e35d-4387-8985-9b30dcb9cb1c",
13+
timestampOverrideId: "6f48a86f-9a39-4bcf-a76b-9a1b20188995",
14+
};
15+
16+
apiInstance
17+
.deleteIncidentTimestampOverride(params)
18+
.then((data: any) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.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+
* List timestamp overrides for an incident returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listIncidentTimestampOverrides"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiListIncidentTimestampOverridesRequest = {
12+
incidentId: "9cecfde8-e35d-4387-8985-9b30dcb9cb1c",
13+
};
14+
15+
apiInstance
16+
.listIncidentTimestampOverrides(params)
17+
.then((data: v2.IncidentTimestampOverridesResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Update a timestamp override for an incident returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateIncidentTimestampOverride"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiUpdateIncidentTimestampOverrideRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
timestampValue: new Date(2024, 12, 29, 11, 0, 0, 0),
16+
},
17+
type: "incidents_timestamp_overrides",
18+
},
19+
},
20+
incidentId: "9cecfde8-e35d-4387-8985-9b30dcb9cb1c",
21+
timestampOverrideId: "6f48a86f-9a39-4bcf-a76b-9a1b20188995",
22+
};
23+
24+
apiInstance
25+
.updateIncidentTimestampOverride(params)
26+
.then((data: v2.IncidentTimestampOverrideResponse) => {
27+
console.log(
28+
"API called successfully. Returned data: " + JSON.stringify(data)
29+
);
30+
})
31+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6465,6 +6465,66 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
64656465
},
64666466
"operationResponseType": "IncidentTodoResponse",
64676467
},
6468+
"v2.ListIncidentTimestampOverrides": {
6469+
"incidentId": {
6470+
"type": "string",
6471+
"format": "uuid",
6472+
},
6473+
"include": {
6474+
"type": "string",
6475+
"format": "",
6476+
},
6477+
"includeDeleted": {
6478+
"type": "boolean",
6479+
"format": "",
6480+
},
6481+
"operationResponseType": "IncidentTimestampOverridesResponse",
6482+
},
6483+
"v2.CreateIncidentTimestampOverride": {
6484+
"incidentId": {
6485+
"type": "string",
6486+
"format": "uuid",
6487+
},
6488+
"include": {
6489+
"type": "string",
6490+
"format": "",
6491+
},
6492+
"body": {
6493+
"type": "IncidentTimestampOverrideCreateRequest",
6494+
"format": "",
6495+
},
6496+
"operationResponseType": "IncidentTimestampOverrideResponse",
6497+
},
6498+
"v2.DeleteIncidentTimestampOverride": {
6499+
"incidentId": {
6500+
"type": "string",
6501+
"format": "uuid",
6502+
},
6503+
"timestampOverrideId": {
6504+
"type": "string",
6505+
"format": "uuid",
6506+
},
6507+
"operationResponseType": "{}",
6508+
},
6509+
"v2.UpdateIncidentTimestampOverride": {
6510+
"incidentId": {
6511+
"type": "string",
6512+
"format": "uuid",
6513+
},
6514+
"timestampOverrideId": {
6515+
"type": "string",
6516+
"format": "uuid",
6517+
},
6518+
"include": {
6519+
"type": "string",
6520+
"format": "",
6521+
},
6522+
"body": {
6523+
"type": "IncidentTimestampOverridePatchRequest",
6524+
"format": "",
6525+
},
6526+
"operationResponseType": "IncidentTimestampOverrideResponse",
6527+
},
64686528
"v2.ListAWSAccounts": {
64696529
"awsAccountId": {
64706530
"type": "string",

features/v2/incidents.feature

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,33 @@ Feature: Incidents
2121
When the request is sent
2222
Then the response status is 200 OK
2323

24+
@generated @skip @team:Datadog/incident-app
25+
Scenario: Create a timestamp override for an incident returns "Bad Request" response
26+
Given operation "CreateIncidentTimestampOverride" enabled
27+
And new "CreateIncidentTimestampOverride" request
28+
And request contains "incident_id" parameter from "REPLACE.ME"
29+
And body with value {"data": {"attributes": {"timestamp_type": "created", "timestamp_value": "2024-12-29T10:00:00Z"}, "type": "incidents_timestamp_overrides"}}
30+
When the request is sent
31+
Then the response status is 400 Bad Request
32+
33+
@generated @skip @team:Datadog/incident-app
34+
Scenario: Create a timestamp override for an incident returns "Created" response
35+
Given operation "CreateIncidentTimestampOverride" enabled
36+
And new "CreateIncidentTimestampOverride" request
37+
And request contains "incident_id" parameter from "REPLACE.ME"
38+
And body with value {"data": {"attributes": {"timestamp_type": "created", "timestamp_value": "2024-12-29T10:00:00Z"}, "type": "incidents_timestamp_overrides"}}
39+
When the request is sent
40+
Then the response status is 201 Created
41+
42+
@generated @skip @team:Datadog/incident-app
43+
Scenario: Create a timestamp override for an incident returns "Not Found" response
44+
Given operation "CreateIncidentTimestampOverride" enabled
45+
And new "CreateIncidentTimestampOverride" request
46+
And request contains "incident_id" parameter from "REPLACE.ME"
47+
And body with value {"data": {"attributes": {"timestamp_type": "created", "timestamp_value": "2024-12-29T10:00:00Z"}, "type": "incidents_timestamp_overrides"}}
48+
When the request is sent
49+
Then the response status is 404 Not Found
50+
2451
@skip @team:DataDog/incident-app
2552
Scenario: Create an incident impact returns "Bad Request" response
2653
Given operation "CreateIncidentImpact" enabled
@@ -330,6 +357,24 @@ Feature: Incidents
330357
When the request is sent
331358
Then the response status is 404 Not Found
332359

360+
@generated @skip @team:Datadog/incident-app
361+
Scenario: Delete a timestamp override for an incident returns "No Content" response
362+
Given operation "DeleteIncidentTimestampOverride" enabled
363+
And new "DeleteIncidentTimestampOverride" request
364+
And request contains "incident_id" parameter from "REPLACE.ME"
365+
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
366+
When the request is sent
367+
Then the response status is 204 No Content
368+
369+
@generated @skip @team:Datadog/incident-app
370+
Scenario: Delete a timestamp override for an incident returns "Not Found" response
371+
Given operation "DeleteIncidentTimestampOverride" enabled
372+
And new "DeleteIncidentTimestampOverride" request
373+
And request contains "incident_id" parameter from "REPLACE.ME"
374+
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
375+
When the request is sent
376+
Then the response status is 404 Not Found
377+
333378
@generated @skip @team:DataDog/incident-app
334379
Scenario: Delete an existing incident returns "Bad Request" response
335380
Given operation "DeleteIncident" enabled
@@ -1018,6 +1063,22 @@ Feature: Incidents
10181063
When the request is sent
10191064
Then the response status is 200 OK
10201065

1066+
@generated @skip @team:Datadog/incident-app
1067+
Scenario: List timestamp overrides for an incident returns "Not Found" response
1068+
Given operation "ListIncidentTimestampOverrides" enabled
1069+
And new "ListIncidentTimestampOverrides" request
1070+
And request contains "incident_id" parameter from "REPLACE.ME"
1071+
When the request is sent
1072+
Then the response status is 404 Not Found
1073+
1074+
@generated @skip @team:Datadog/incident-app
1075+
Scenario: List timestamp overrides for an incident returns "OK" response
1076+
Given operation "ListIncidentTimestampOverrides" enabled
1077+
And new "ListIncidentTimestampOverrides" request
1078+
And request contains "incident_id" parameter from "REPLACE.ME"
1079+
When the request is sent
1080+
Then the response status is 200 OK
1081+
10211082
@team:DataDog/incident-app
10221083
Scenario: Remove commander from an incident returns "OK" response
10231084
Given operation "UpdateIncident" enabled
@@ -1066,6 +1127,36 @@ Feature: Incidents
10661127
Then the response status is 200 OK
10671128
And the response has 3 items
10681129

1130+
@generated @skip @team:Datadog/incident-app
1131+
Scenario: Update a timestamp override for an incident returns "Bad Request" response
1132+
Given operation "UpdateIncidentTimestampOverride" enabled
1133+
And new "UpdateIncidentTimestampOverride" request
1134+
And request contains "incident_id" parameter from "REPLACE.ME"
1135+
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
1136+
And body with value {"data": {"attributes": {"timestamp_value": "2024-12-29T11:00:00Z"}, "type": "incidents_timestamp_overrides"}}
1137+
When the request is sent
1138+
Then the response status is 400 Bad Request
1139+
1140+
@generated @skip @team:Datadog/incident-app
1141+
Scenario: Update a timestamp override for an incident returns "Not Found" response
1142+
Given operation "UpdateIncidentTimestampOverride" enabled
1143+
And new "UpdateIncidentTimestampOverride" request
1144+
And request contains "incident_id" parameter from "REPLACE.ME"
1145+
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
1146+
And body with value {"data": {"attributes": {"timestamp_value": "2024-12-29T11:00:00Z"}, "type": "incidents_timestamp_overrides"}}
1147+
When the request is sent
1148+
Then the response status is 404 Not Found
1149+
1150+
@generated @skip @team:Datadog/incident-app
1151+
Scenario: Update a timestamp override for an incident returns "OK" response
1152+
Given operation "UpdateIncidentTimestampOverride" enabled
1153+
And new "UpdateIncidentTimestampOverride" request
1154+
And request contains "incident_id" parameter from "REPLACE.ME"
1155+
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
1156+
And body with value {"data": {"attributes": {"timestamp_value": "2024-12-29T11:00:00Z"}, "type": "incidents_timestamp_overrides"}}
1157+
When the request is sent
1158+
Then the response status is 200 OK
1159+
10691160
@generated @skip @team:DataDog/incident-app
10701161
Scenario: Update an existing incident integration metadata returns "Bad Request" response
10711162
Given operation "UpdateIncidentIntegration" enabled

features/v2/undo.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,30 @@
20132013
"type": "idempotent"
20142014
}
20152015
},
2016+
"ListIncidentTimestampOverrides": {
2017+
"tag": "Incidents",
2018+
"undo": {
2019+
"type": "safe"
2020+
}
2021+
},
2022+
"CreateIncidentTimestampOverride": {
2023+
"tag": "Incidents",
2024+
"undo": {
2025+
"type": "unsafe"
2026+
}
2027+
},
2028+
"DeleteIncidentTimestampOverride": {
2029+
"tag": "Incidents",
2030+
"undo": {
2031+
"type": "idempotent"
2032+
}
2033+
},
2034+
"UpdateIncidentTimestampOverride": {
2035+
"tag": "Incidents",
2036+
"undo": {
2037+
"type": "idempotent"
2038+
}
2039+
},
20162040
"ListAWSAccounts": {
20172041
"tag": "AWS Integration",
20182042
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ export function createConfiguration(
290290
"v2.createIncidentNotificationTemplate": false,
291291
"v2.createIncidentPostmortemAttachment": false,
292292
"v2.createIncidentPostmortemTemplate": false,
293+
"v2.createIncidentTimestampOverride": false,
293294
"v2.createIncidentTodo": false,
294295
"v2.createIncidentType": false,
295296
"v2.deleteGlobalIncidentHandle": false,
@@ -299,6 +300,7 @@ export function createConfiguration(
299300
"v2.deleteIncidentNotificationRule": false,
300301
"v2.deleteIncidentNotificationTemplate": false,
301302
"v2.deleteIncidentPostmortemTemplate": false,
303+
"v2.deleteIncidentTimestampOverride": false,
302304
"v2.deleteIncidentTodo": false,
303305
"v2.deleteIncidentType": false,
304306
"v2.getGlobalIncidentSettings": false,
@@ -316,6 +318,7 @@ export function createConfiguration(
316318
"v2.listIncidentNotificationTemplates": false,
317319
"v2.listIncidentPostmortemTemplates": false,
318320
"v2.listIncidents": false,
321+
"v2.listIncidentTimestampOverrides": false,
319322
"v2.listIncidentTodos": false,
320323
"v2.listIncidentTypes": false,
321324
"v2.searchIncidents": false,
@@ -327,6 +330,7 @@ export function createConfiguration(
327330
"v2.updateIncidentNotificationRule": false,
328331
"v2.updateIncidentNotificationTemplate": false,
329332
"v2.updateIncidentPostmortemTemplate": false,
333+
"v2.updateIncidentTimestampOverride": false,
330334
"v2.updateIncidentTodo": false,
331335
"v2.updateIncidentType": false,
332336
"v2.createJiraIssueTemplate": false,

0 commit comments

Comments
 (0)