Skip to content

Commit 7a42db5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add user status to schema and fix escalation policy included (#2201)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent ce42b5d commit 7a42db5

10 files changed

+256
-16
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-05-01 18:50:09.495821",
8-
"spec_repo_commit": "7eb88f6a"
7+
"regenerated": "2025-05-02 04:31:15.271278",
8+
"spec_repo_commit": "272cce39"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-01 18:50:09.512639",
13-
"spec_repo_commit": "7eb88f6a"
12+
"regenerated": "2025-05-02 04:31:15.291066",
13+
"spec_repo_commit": "272cce39"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13547,9 +13547,8 @@ components:
1354713547
oneOf:
1354813548
- $ref: '#/components/schemas/TeamReference'
1354913549
- $ref: '#/components/schemas/EscalationPolicyStep'
13550-
- $ref: '#/components/schemas/UserTarget'
13551-
- $ref: '#/components/schemas/ScheduleTarget'
13552-
- $ref: '#/components/schemas/TeamTarget'
13550+
- $ref: '#/components/schemas/EscalationPolicyUser'
13551+
- $ref: '#/components/schemas/ScheduleData'
1355313552
EscalationPolicyStep:
1355413553
description: Represents a single step in an escalation policy, including its
1355513554
attributes, relationships, and resource type.
@@ -13795,6 +13794,44 @@ components:
1379513794
type: string
1379613795
x-enum-varnames:
1379713796
- POLICIES
13797+
EscalationPolicyUser:
13798+
description: Represents a user object in the context of an escalation policy,
13799+
including their `id`, type, and basic attributes.
13800+
properties:
13801+
attributes:
13802+
$ref: '#/components/schemas/EscalationPolicyUserAttributes'
13803+
id:
13804+
description: The unique user identifier.
13805+
type: string
13806+
type:
13807+
$ref: '#/components/schemas/EscalationPolicyUserType'
13808+
required:
13809+
- type
13810+
type: object
13811+
EscalationPolicyUserAttributes:
13812+
description: Provides basic user information for an escalation policy, including
13813+
a name and email address.
13814+
properties:
13815+
email:
13816+
description: The user's email address.
13817+
example: jane.doe@example.com
13818+
type: string
13819+
name:
13820+
description: The user's name.
13821+
example: Jane Doe
13822+
type: string
13823+
status:
13824+
$ref: '#/components/schemas/UserAttributesStatus'
13825+
type: object
13826+
EscalationPolicyUserType:
13827+
default: users
13828+
description: Users resource type.
13829+
enum:
13830+
- users
13831+
example: users
13832+
type: string
13833+
x-enum-varnames:
13834+
- USERS
1379813835
EscalationTarget:
1379913836
description: Represents an escalation target, which can be a team, user, or
1380013837
schedule.
@@ -31730,6 +31767,8 @@ components:
3173031767
description: The user's name.
3173131768
example: Jane Doe
3173231769
type: string
31770+
status:
31771+
$ref: '#/components/schemas/UserAttributesStatus'
3173331772
type: object
3173431773
ScheduleUserType:
3173531774
default: users
@@ -38564,6 +38603,17 @@ components:
3856438603
description: Whether the user is verified.
3856538604
type: boolean
3856638605
type: object
38606+
UserAttributesStatus:
38607+
description: The user's status.
38608+
enum:
38609+
- active
38610+
- deactivated
38611+
- pending
38612+
type: string
38613+
x-enum-varnames:
38614+
- ACTIVE
38615+
- DEACTIVATED
38616+
- PENDING
3856738617
UserCreateAttributes:
3856838618
description: Attributes of the created user.
3856938619
properties:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,9 @@ export { EscalationPolicyUpdateRequestDataRelationshipsTeams } from "./models/Es
15101510
export { EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItems } from "./models/EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItems";
15111511
export { EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItemsType } from "./models/EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItemsType";
15121512
export { EscalationPolicyUpdateRequestDataType } from "./models/EscalationPolicyUpdateRequestDataType";
1513+
export { EscalationPolicyUser } from "./models/EscalationPolicyUser";
1514+
export { EscalationPolicyUserAttributes } from "./models/EscalationPolicyUserAttributes";
1515+
export { EscalationPolicyUserType } from "./models/EscalationPolicyUserType";
15131516
export { EscalationTarget } from "./models/EscalationTarget";
15141517
export { Event } from "./models/Event";
15151518
export { EventAttributes } from "./models/EventAttributes";
@@ -3086,6 +3089,7 @@ export { UsageTimeSeriesObject } from "./models/UsageTimeSeriesObject";
30863089
export { UsageTimeSeriesType } from "./models/UsageTimeSeriesType";
30873090
export { User } from "./models/User";
30883091
export { UserAttributes } from "./models/UserAttributes";
3092+
export { UserAttributesStatus } from "./models/UserAttributesStatus";
30893093
export { UserCreateAttributes } from "./models/UserCreateAttributes";
30903094
export { UserCreateData } from "./models/UserCreateData";
30913095
export { UserCreateRequest } from "./models/UserCreateRequest";

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Copyright 2020-Present Datadog, Inc.
55
*/
66
import { EscalationPolicyStep } from "./EscalationPolicyStep";
7-
import { ScheduleTarget } from "./ScheduleTarget";
7+
import { EscalationPolicyUser } from "./EscalationPolicyUser";
8+
import { ScheduleData } from "./ScheduleData";
89
import { TeamReference } from "./TeamReference";
9-
import { TeamTarget } from "./TeamTarget";
10-
import { UserTarget } from "./UserTarget";
1110

1211
import { UnparsedObject } from "../../datadog-api-client-common/util";
1312

@@ -18,7 +17,6 @@ import { UnparsedObject } from "../../datadog-api-client-common/util";
1817
export type EscalationPolicyIncluded =
1918
| TeamReference
2019
| EscalationPolicyStep
21-
| UserTarget
22-
| ScheduleTarget
23-
| TeamTarget
20+
| EscalationPolicyUser
21+
| ScheduleData
2422
| UnparsedObject;
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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 { EscalationPolicyUserAttributes } from "./EscalationPolicyUserAttributes";
7+
import { EscalationPolicyUserType } from "./EscalationPolicyUserType";
8+
9+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
10+
11+
/**
12+
* Represents a user object in the context of an escalation policy, including their `id`, type, and basic attributes.
13+
*/
14+
export class EscalationPolicyUser {
15+
/**
16+
* Provides basic user information for an escalation policy, including a name and email address.
17+
*/
18+
"attributes"?: EscalationPolicyUserAttributes;
19+
/**
20+
* The unique user identifier.
21+
*/
22+
"id"?: string;
23+
/**
24+
* Users resource type.
25+
*/
26+
"type": EscalationPolicyUserType;
27+
28+
/**
29+
* A container for additional, undeclared properties.
30+
* This is a holder for any undeclared properties as specified with
31+
* the 'additionalProperties' keyword in the OAS document.
32+
*/
33+
"additionalProperties"?: { [key: string]: any };
34+
35+
/**
36+
* @ignore
37+
*/
38+
"_unparsed"?: boolean;
39+
40+
/**
41+
* @ignore
42+
*/
43+
static readonly attributeTypeMap: AttributeTypeMap = {
44+
attributes: {
45+
baseName: "attributes",
46+
type: "EscalationPolicyUserAttributes",
47+
},
48+
id: {
49+
baseName: "id",
50+
type: "string",
51+
},
52+
type: {
53+
baseName: "type",
54+
type: "EscalationPolicyUserType",
55+
required: true,
56+
},
57+
additionalProperties: {
58+
baseName: "additionalProperties",
59+
type: "any",
60+
},
61+
};
62+
63+
/**
64+
* @ignore
65+
*/
66+
static getAttributeTypeMap(): AttributeTypeMap {
67+
return EscalationPolicyUser.attributeTypeMap;
68+
}
69+
70+
public constructor() {}
71+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 { UserAttributesStatus } from "./UserAttributesStatus";
7+
8+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
9+
10+
/**
11+
* Provides basic user information for an escalation policy, including a name and email address.
12+
*/
13+
export class EscalationPolicyUserAttributes {
14+
/**
15+
* The user's email address.
16+
*/
17+
"email"?: string;
18+
/**
19+
* The user's name.
20+
*/
21+
"name"?: string;
22+
/**
23+
* The user's status.
24+
*/
25+
"status"?: UserAttributesStatus;
26+
27+
/**
28+
* A container for additional, undeclared properties.
29+
* This is a holder for any undeclared properties as specified with
30+
* the 'additionalProperties' keyword in the OAS document.
31+
*/
32+
"additionalProperties"?: { [key: string]: any };
33+
34+
/**
35+
* @ignore
36+
*/
37+
"_unparsed"?: boolean;
38+
39+
/**
40+
* @ignore
41+
*/
42+
static readonly attributeTypeMap: AttributeTypeMap = {
43+
email: {
44+
baseName: "email",
45+
type: "string",
46+
},
47+
name: {
48+
baseName: "name",
49+
type: "string",
50+
},
51+
status: {
52+
baseName: "status",
53+
type: "UserAttributesStatus",
54+
},
55+
additionalProperties: {
56+
baseName: "additionalProperties",
57+
type: "any",
58+
},
59+
};
60+
61+
/**
62+
* @ignore
63+
*/
64+
static getAttributeTypeMap(): AttributeTypeMap {
65+
return EscalationPolicyUserAttributes.attributeTypeMap;
66+
}
67+
68+
public constructor() {}
69+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
* Users resource type.
11+
*/
12+
13+
export type EscalationPolicyUserType = typeof USERS | UnparsedObject;
14+
export const USERS = "users";

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ import { EscalationPolicyUpdateRequestDataAttributesStepsItemsTargetsItems } fro
613613
import { EscalationPolicyUpdateRequestDataRelationships } from "./EscalationPolicyUpdateRequestDataRelationships";
614614
import { EscalationPolicyUpdateRequestDataRelationshipsTeams } from "./EscalationPolicyUpdateRequestDataRelationshipsTeams";
615615
import { EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItems } from "./EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItems";
616+
import { EscalationPolicyUser } from "./EscalationPolicyUser";
617+
import { EscalationPolicyUserAttributes } from "./EscalationPolicyUserAttributes";
616618
import { Event } from "./Event";
617619
import { EventAttributes } from "./EventAttributes";
618620
import { EventCreateRequest } from "./EventCreateRequest";
@@ -2218,6 +2220,7 @@ const enumsMap: { [key: string]: any[] } = {
22182220
],
22192221
EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItemsType: ["teams"],
22202222
EscalationPolicyUpdateRequestDataType: ["policies"],
2223+
EscalationPolicyUserType: ["users"],
22212224
EventCategory: ["change"],
22222225
EventCreateRequestType: ["event"],
22232226
EventPriority: ["normal", "low"],
@@ -3023,6 +3026,7 @@ const enumsMap: { [key: string]: any[] } = {
30233026
TokenType: ["SECRET"],
30243027
TriggerSource: ["security_findings", "security_signals"],
30253028
UsageTimeSeriesType: ["usage_timeseries"],
3029+
UserAttributesStatus: ["active", "deactivated", "pending"],
30263030
UserInvitationsType: ["user_invitations"],
30273031
UserResourceType: ["user"],
30283032
UserTargetType: ["users"],
@@ -3852,6 +3856,8 @@ const typeMap: { [index: string]: any } = {
38523856
EscalationPolicyUpdateRequestDataRelationshipsTeams,
38533857
EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItems:
38543858
EscalationPolicyUpdateRequestDataRelationshipsTeamsDataItems,
3859+
EscalationPolicyUser: EscalationPolicyUser,
3860+
EscalationPolicyUserAttributes: EscalationPolicyUserAttributes,
38553861
Event: Event,
38563862
EventAttributes: EventAttributes,
38573863
EventCreateRequest: EventCreateRequest,
@@ -5399,9 +5405,8 @@ const oneOfMap: { [index: string]: string[] } = {
53995405
EscalationPolicyIncluded: [
54005406
"TeamReference",
54015407
"EscalationPolicyStep",
5402-
"UserTarget",
5403-
"ScheduleTarget",
5404-
"TeamTarget",
5408+
"EscalationPolicyUser",
5409+
"ScheduleData",
54055410
],
54065411
EscalationTarget: ["TeamTarget", "UserTarget", "ScheduleTarget"],
54075412
EventPayloadAttributes: ["ChangeEventCustomAttributes"],

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

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

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

@@ -18,6 +19,10 @@ export class ScheduleUserAttributes {
1819
* The user's name.
1920
*/
2021
"name"?: string;
22+
/**
23+
* The user's status.
24+
*/
25+
"status"?: UserAttributesStatus;
2126

2227
/**
2328
* A container for additional, undeclared properties.
@@ -43,6 +48,10 @@ export class ScheduleUserAttributes {
4348
baseName: "name",
4449
type: "string",
4550
},
51+
status: {
52+
baseName: "status",
53+
type: "UserAttributesStatus",
54+
},
4655
additionalProperties: {
4756
baseName: "additionalProperties",
4857
type: "any",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
* The user's status.
11+
*/
12+
13+
export type UserAttributesStatus =
14+
| typeof ACTIVE
15+
| typeof DEACTIVATED
16+
| typeof PENDING
17+
| UnparsedObject;
18+
export const ACTIVE = "active";
19+
export const DEACTIVATED = "deactivated";
20+
export const PENDING = "pending";

0 commit comments

Comments
 (0)