Skip to content

Commit 2ff30d0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit af48fc6 of spec repo (#4578)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b7c3588 commit 2ff30d0

8 files changed

Lines changed: 226 additions & 4 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46414,6 +46414,9 @@ components:
4641446414
IncidentTypeAttributes:
4641546415
description: Incident type's attributes.
4641646416
properties:
46417+
configuration:
46418+
$ref: "#/components/schemas/IncidentTypeConfiguration"
46419+
readOnly: true
4641746420
createdAt:
4641846421
description: Timestamp when the incident type was created.
4641946422
format: date-time
@@ -46455,6 +46458,53 @@ components:
4645546458
required:
4645646459
- name
4645746460
type: object
46461+
IncidentTypeConfiguration:
46462+
description: >-
46463+
The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
46464+
properties:
46465+
allow_incident_deletion:
46466+
default: false
46467+
description: Whether incidents of this type can be deleted.
46468+
example: false
46469+
type: boolean
46470+
allow_workflows:
46471+
default: true
46472+
description: Whether automation workflows can be triggered for incidents of this type.
46473+
example: true
46474+
type: boolean
46475+
create_message:
46476+
description: An optional message shown to users when they declare an incident of this type.
46477+
example: "Create an incident here"
46478+
type: string
46479+
disable_out_of_the_box_postmortem_template:
46480+
default: false
46481+
description: Whether the out-of-the-box postmortem template is disabled for incidents of this type.
46482+
example: false
46483+
type: boolean
46484+
editable_timestamps:
46485+
default: false
46486+
description: Whether responders can edit incident timestamps for incidents of this type.
46487+
example: false
46488+
type: boolean
46489+
private_incidents:
46490+
default: false
46491+
description: >-
46492+
Whether responders can create private incidents of this type. This is an opt-in setting, distinct from `private_incidents_by_default`, which controls whether incidents are created private automatically.
46493+
example: false
46494+
type: boolean
46495+
private_incidents_by_default:
46496+
default: false
46497+
description: Whether incidents of this type are created as private by default.
46498+
example: false
46499+
type: boolean
46500+
slug_source:
46501+
$ref: "#/components/schemas/IncidentTypeSlugSource"
46502+
test_incidents:
46503+
default: true
46504+
description: Whether incidents of this type are treated as test incidents.
46505+
example: true
46506+
type: boolean
46507+
type: object
4645846508
IncidentTypeCreateData:
4645946509
description: Incident type data for a create request.
4646046510
properties:
@@ -46549,6 +46599,18 @@ components:
4654946599
required:
4655046600
- data
4655146601
type: object
46602+
IncidentTypeSlugSource:
46603+
default: default
46604+
description: >-
46605+
When set to `servicenow`, incidents will display the ServiceNow record ID instead of the public ID. If no ServiceNow integration exists, the public ID will be displayed.
46606+
enum:
46607+
- default
46608+
- servicenow
46609+
example: default
46610+
type: string
46611+
x-enum-varnames:
46612+
- DEFAULT
46613+
- SERVICENOW
4655246614
IncidentTypeType:
4655346615
default: incident_types
4655446616
description: Incident type resource type.
@@ -46561,6 +46623,8 @@ components:
4656146623
IncidentTypeUpdateAttributes:
4656246624
description: Incident type's attributes for updates.
4656346625
properties:
46626+
configuration:
46627+
$ref: "#/components/schemas/IncidentTypeConfiguration"
4656446628
createdAt:
4656546629
description: Timestamp when the incident type was created.
4656646630
format: date-time

features/v2/incidents.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Feature: Incidents
166166
Scenario: Create an incident type returns "Bad Request" response
167167
Given operation "CreateIncidentType" enabled
168168
And new "CreateIncidentType" request
169-
And body with value {"data": {"attributes": {"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
169+
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
170170
When the request is sent
171171
Then the response status is 400 Bad Request
172172

@@ -182,7 +182,7 @@ Feature: Incidents
182182
Scenario: Create an incident type returns "Not Found" response
183183
Given operation "CreateIncidentType" enabled
184184
And new "CreateIncidentType" request
185-
And body with value {"data": {"attributes": {"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
185+
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
186186
When the request is sent
187187
Then the response status is 404 Not Found
188188

@@ -1298,7 +1298,7 @@ Feature: Incidents
12981298
Given operation "UpdateIncidentType" enabled
12991299
And new "UpdateIncidentType" request
13001300
And request contains "incident_type_id" parameter from "REPLACE.ME"
1301-
And body with value {"data": {"attributes": {"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
1301+
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
13021302
When the request is sent
13031303
Then the response status is 400 Bad Request
13041304

@@ -1307,7 +1307,7 @@ Feature: Incidents
13071307
Given operation "UpdateIncidentType" enabled
13081308
And new "UpdateIncidentType" request
13091309
And request contains "incident_type_id" parameter from "REPLACE.ME"
1310-
And body with value {"data": {"attributes": {"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
1310+
And body with value {"data": {"attributes": {"configuration": {"allow_incident_deletion": false, "allow_workflows": true, "create_message": "Create an incident here", "disable_out_of_the_box_postmortem_template": false, "editable_timestamps": false, "private_incidents": false, "private_incidents_by_default": false, "slug_source": "default", "test_incidents": true}, "description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.", "is_default": false, "name": "Security Incident"}, "id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}
13111311
When the request is sent
13121312
Then the response status is 404 Not Found
13131313

packages/datadog-api-client-v2/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,6 +4465,7 @@ export { IncidentTrigger } from "./models/IncidentTrigger";
44654465
export { IncidentTriggerWrapper } from "./models/IncidentTriggerWrapper";
44664466
export { IncidentType } from "./models/IncidentType";
44674467
export { IncidentTypeAttributes } from "./models/IncidentTypeAttributes";
4468+
export { IncidentTypeConfiguration } from "./models/IncidentTypeConfiguration";
44684469
export { IncidentTypeCreateData } from "./models/IncidentTypeCreateData";
44694470
export { IncidentTypeCreateRequest } from "./models/IncidentTypeCreateRequest";
44704471
export { IncidentTypeListResponse } from "./models/IncidentTypeListResponse";
@@ -4473,6 +4474,7 @@ export { IncidentTypePatchData } from "./models/IncidentTypePatchData";
44734474
export { IncidentTypePatchRequest } from "./models/IncidentTypePatchRequest";
44744475
export { IncidentTypeRelationships } from "./models/IncidentTypeRelationships";
44754476
export { IncidentTypeResponse } from "./models/IncidentTypeResponse";
4477+
export { IncidentTypeSlugSource } from "./models/IncidentTypeSlugSource";
44764478
export { IncidentTypeType } from "./models/IncidentTypeType";
44774479
export { IncidentTypeUpdateAttributes } from "./models/IncidentTypeUpdateAttributes";
44784480
export { IncidentUpdateAttributes } from "./models/IncidentUpdateAttributes";

packages/datadog-api-client-v2/models/IncidentTypeAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { IncidentTypeConfiguration } from "./IncidentTypeConfiguration";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

910
/**
1011
* Incident type's attributes.
1112
*/
1213
export class IncidentTypeAttributes {
14+
/**
15+
* The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
16+
*/
17+
"configuration"?: IncidentTypeConfiguration;
1318
/**
1419
* Timestamp when the incident type was created.
1520
*/
@@ -59,6 +64,10 @@ export class IncidentTypeAttributes {
5964
* @ignore
6065
*/
6166
static readonly attributeTypeMap: AttributeTypeMap = {
67+
configuration: {
68+
baseName: "configuration",
69+
type: "IncidentTypeConfiguration",
70+
},
6271
createdAt: {
6372
baseName: "createdAt",
6473
type: "Date",
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { IncidentTypeSlugSource } from "./IncidentTypeSlugSource";
7+
8+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
9+
10+
/**
11+
* The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
12+
*/
13+
export class IncidentTypeConfiguration {
14+
/**
15+
* Whether incidents of this type can be deleted.
16+
*/
17+
"allowIncidentDeletion"?: boolean;
18+
/**
19+
* Whether automation workflows can be triggered for incidents of this type.
20+
*/
21+
"allowWorkflows"?: boolean;
22+
/**
23+
* An optional message shown to users when they declare an incident of this type.
24+
*/
25+
"createMessage"?: string;
26+
/**
27+
* Whether the out-of-the-box postmortem template is disabled for incidents of this type.
28+
*/
29+
"disableOutOfTheBoxPostmortemTemplate"?: boolean;
30+
/**
31+
* Whether responders can edit incident timestamps for incidents of this type.
32+
*/
33+
"editableTimestamps"?: boolean;
34+
/**
35+
* Whether responders can create private incidents of this type. This is an opt-in setting, distinct from `private_incidents_by_default`, which controls whether incidents are created private automatically.
36+
*/
37+
"privateIncidents"?: boolean;
38+
/**
39+
* Whether incidents of this type are created as private by default.
40+
*/
41+
"privateIncidentsByDefault"?: boolean;
42+
/**
43+
* When set to `servicenow`, incidents will display the ServiceNow record ID instead of the public ID. If no ServiceNow integration exists, the public ID will be displayed.
44+
*/
45+
"slugSource"?: IncidentTypeSlugSource;
46+
/**
47+
* Whether incidents of this type are treated as test incidents.
48+
*/
49+
"testIncidents"?: boolean;
50+
51+
/**
52+
* A container for additional, undeclared properties.
53+
* This is a holder for any undeclared properties as specified with
54+
* the 'additionalProperties' keyword in the OAS document.
55+
*/
56+
"additionalProperties"?: { [key: string]: any };
57+
58+
/**
59+
* @ignore
60+
*/
61+
"_unparsed"?: boolean;
62+
63+
/**
64+
* @ignore
65+
*/
66+
static readonly attributeTypeMap: AttributeTypeMap = {
67+
allowIncidentDeletion: {
68+
baseName: "allow_incident_deletion",
69+
type: "boolean",
70+
},
71+
allowWorkflows: {
72+
baseName: "allow_workflows",
73+
type: "boolean",
74+
},
75+
createMessage: {
76+
baseName: "create_message",
77+
type: "string",
78+
},
79+
disableOutOfTheBoxPostmortemTemplate: {
80+
baseName: "disable_out_of_the_box_postmortem_template",
81+
type: "boolean",
82+
},
83+
editableTimestamps: {
84+
baseName: "editable_timestamps",
85+
type: "boolean",
86+
},
87+
privateIncidents: {
88+
baseName: "private_incidents",
89+
type: "boolean",
90+
},
91+
privateIncidentsByDefault: {
92+
baseName: "private_incidents_by_default",
93+
type: "boolean",
94+
},
95+
slugSource: {
96+
baseName: "slug_source",
97+
type: "IncidentTypeSlugSource",
98+
},
99+
testIncidents: {
100+
baseName: "test_incidents",
101+
type: "boolean",
102+
},
103+
additionalProperties: {
104+
baseName: "additionalProperties",
105+
type: "{ [key: string]: any; }",
106+
},
107+
};
108+
109+
/**
110+
* @ignore
111+
*/
112+
static getAttributeTypeMap(): AttributeTypeMap {
113+
return IncidentTypeConfiguration.attributeTypeMap;
114+
}
115+
116+
public constructor() {}
117+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { UnparsedObject } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* When set to `servicenow`, incidents will display the ServiceNow record ID instead of the public ID. If no ServiceNow integration exists, the public ID will be displayed.
11+
*/
12+
13+
export type IncidentTypeSlugSource =
14+
| typeof DEFAULT
15+
| typeof SERVICENOW
16+
| UnparsedObject;
17+
export const DEFAULT = "default";
18+
export const SERVICENOW = "servicenow";

packages/datadog-api-client-v2/models/IncidentTypeUpdateAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { IncidentTypeConfiguration } from "./IncidentTypeConfiguration";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

910
/**
1011
* Incident type's attributes for updates.
1112
*/
1213
export class IncidentTypeUpdateAttributes {
14+
/**
15+
* The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
16+
*/
17+
"configuration"?: IncidentTypeConfiguration;
1318
/**
1419
* Timestamp when the incident type was created.
1520
*/
@@ -59,6 +64,10 @@ export class IncidentTypeUpdateAttributes {
5964
* @ignore
6065
*/
6166
static readonly attributeTypeMap: AttributeTypeMap = {
67+
configuration: {
68+
baseName: "configuration",
69+
type: "IncidentTypeConfiguration",
70+
},
6271
createdAt: {
6372
baseName: "createdAt",
6473
type: "Date",

packages/datadog-api-client-v2/models/ObjectSerializer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,6 +2085,7 @@ import { IncidentTodoResponseData } from "./IncidentTodoResponseData";
20852085
import { IncidentTrigger } from "./IncidentTrigger";
20862086
import { IncidentTriggerWrapper } from "./IncidentTriggerWrapper";
20872087
import { IncidentTypeAttributes } from "./IncidentTypeAttributes";
2088+
import { IncidentTypeConfiguration } from "./IncidentTypeConfiguration";
20882089
import { IncidentTypeCreateData } from "./IncidentTypeCreateData";
20892090
import { IncidentTypeCreateRequest } from "./IncidentTypeCreateRequest";
20902091
import { IncidentTypeListResponse } from "./IncidentTypeListResponse";
@@ -6233,6 +6234,7 @@ const enumsMap: { [key: string]: any[] } = {
62336234
IncidentTodoAnonymousAssigneeSource: ["slack", "microsoft_teams"],
62346235
IncidentTodoType: ["incident_todos"],
62356236
IncidentType: ["incidents"],
6237+
IncidentTypeSlugSource: ["default", "servicenow"],
62366238
IncidentTypeType: ["incident_types"],
62376239
IncidentUserDefinedFieldCategory: ["what_happened", "why_it_happened"],
62386240
IncidentUserDefinedFieldCollected: [
@@ -10553,6 +10555,7 @@ const typeMap: { [index: string]: any } = {
1055310555
IncidentTrigger: IncidentTrigger,
1055410556
IncidentTriggerWrapper: IncidentTriggerWrapper,
1055510557
IncidentTypeAttributes: IncidentTypeAttributes,
10558+
IncidentTypeConfiguration: IncidentTypeConfiguration,
1055610559
IncidentTypeCreateData: IncidentTypeCreateData,
1055710560
IncidentTypeCreateRequest: IncidentTypeCreateRequest,
1055810561
IncidentTypeListResponse: IncidentTypeListResponse,

0 commit comments

Comments
 (0)