Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37460,12 +37460,17 @@ components:
type: integer
type: object
Event:
additionalProperties: {}
description: The metadata associated with a request.
properties:
id:
description: Event ID.
example: "6509751066204996294"
type: string
integration_id:
description: The integration ID of the event.
example: "custom-events"
type: string
name:
description: The event name.
type: string
Expand All @@ -37478,8 +37483,13 @@ components:
description: Event type.
example: "error_tracking_alert"
type: string
uid:
description: A unique identifier for the event. You can use this identifier to query or reference the event.
example: "AaBJ4QimAABPmEWRwc_8yAAA"
type: string
type: object
EventAttributes:
additionalProperties: {}
description: Object description of attributes from your event.
properties:
aggregation_key:
Expand Down Expand Up @@ -37729,16 +37739,27 @@ components:
- CUSTOM_EVENTS
EventPriority:
description: |-
The priority of the event's monitor. For example, `normal` or `low`.
The priority of the event alert. Legacy events use `normal` or `low`.
Alert events use `1` (highest priority) through `5` (lowest priority).
enum:
- normal
- low
- "1"
- "2"
- "3"
- "4"
- "5"
example: "normal"
nullable: true
type: string
x-enum-varnames:
- NORMAL
- LOW
- PRIORITY_ONE
- PRIORITY_TWO
- PRIORITY_THREE
- PRIORITY_FOUR
- PRIORITY_FIVE
EventResponse:
description: The object description of an event after being processed and stored by Datadog.
properties:
Expand Down Expand Up @@ -37774,13 +37795,15 @@ components:
type: object
EventStatusType:
description: |-
If an alert event is enabled, its status is one of the following:
`failure`, `error`, `warning`, `info`, `success`, `user_update`,
`recommendation`, or `snapshot`.
The event status. Legacy events can use `failure`, `error`, `warning`,
`info`, `success`, `user_update`, `recommendation`, or `snapshot`.
Alert events can use `error`, `warn`, or `ok`.
enum:
- failure
- error
- warn
- warning
- ok
- info
- success
- user_update
Expand All @@ -37791,7 +37814,9 @@ components:
x-enum-varnames:
- FAILURE
- ERROR
- WARN
- WARNING
- OK
- INFO
- SUCCESS
- USER_UPDATE
Expand Down Expand Up @@ -38046,7 +38071,7 @@ components:
type: string
limit:
default: 10
description: The maximum number of logs in the response.
description: The maximum number of events in the response.
example: 25
format: int32
maximum: 1000
Expand Down
16 changes: 16 additions & 0 deletions services/events/src/v2/models/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export class Event {
* Event ID.
*/
"id"?: string;
/**
* The integration ID of the event.
*/
"integrationId"?: string;
/**
* The event name.
*/
Expand All @@ -20,6 +24,10 @@ export class Event {
* Event type.
*/
"type"?: string;
/**
* A unique identifier for the event. You can use this identifier to query or reference the event.
*/
"uid"?: string;
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand All @@ -39,6 +47,10 @@ export class Event {
baseName: "id",
type: "string",
},
integrationId: {
baseName: "integration_id",
type: "string",
},
name: {
baseName: "name",
type: "string",
Expand All @@ -52,6 +64,10 @@ export class Event {
baseName: "type",
type: "string",
},
uid: {
baseName: "uid",
type: "string",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
Expand Down
9 changes: 5 additions & 4 deletions services/events/src/v2/models/EventAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export class EventAttributes {
*/
"monitorId"?: number;
/**
* The priority of the event's monitor. For example, `normal` or `low`.
* The priority of the event alert. Legacy events use `normal` or `low`.
* Alert events use `1` (highest priority) through `5` (lowest priority).
*/
"priority"?: EventPriority;
/**
Expand All @@ -74,9 +75,9 @@ export class EventAttributes {
*/
"sourcecategory"?: string;
/**
* If an alert event is enabled, its status is one of the following:
* `failure`, `error`, `warning`, `info`, `success`, `user_update`,
* `recommendation`, or `snapshot`.
* The event status. Legacy events can use `failure`, `error`, `warning`,
* `info`, `success`, `user_update`, `recommendation`, or `snapshot`.
* Alert events can use `error`, `warn`, or `ok`.
*/
"status"?: EventStatusType;
/**
Expand Down
18 changes: 16 additions & 2 deletions services/events/src/v2/models/EventPriority.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import { UnparsedObject } from "@datadog/datadog-api-client";

/**
* The priority of the event's monitor. For example, `normal` or `low`.
* The priority of the event alert. Legacy events use `normal` or `low`.
* Alert events use `1` (highest priority) through `5` (lowest priority).
*/
export type EventPriority = typeof NORMAL | typeof LOW | UnparsedObject;
export type EventPriority =
| typeof NORMAL
| typeof LOW
| typeof PRIORITY_ONE
| typeof PRIORITY_TWO
| typeof PRIORITY_THREE
| typeof PRIORITY_FOUR
| typeof PRIORITY_FIVE
| UnparsedObject;
export const NORMAL = "normal";
export const LOW = "low";
export const PRIORITY_ONE = "1";
export const PRIORITY_TWO = "2";
export const PRIORITY_THREE = "3";
export const PRIORITY_FOUR = "4";
export const PRIORITY_FIVE = "5";
10 changes: 7 additions & 3 deletions services/events/src/v2/models/EventStatusType.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { UnparsedObject } from "@datadog/datadog-api-client";

/**
* If an alert event is enabled, its status is one of the following:
* `failure`, `error`, `warning`, `info`, `success`, `user_update`,
* `recommendation`, or `snapshot`.
* The event status. Legacy events can use `failure`, `error`, `warning`,
* `info`, `success`, `user_update`, `recommendation`, or `snapshot`.
* Alert events can use `error`, `warn`, or `ok`.
*/
export type EventStatusType =
| typeof FAILURE
| typeof ERROR
| typeof WARN
| typeof WARNING
| typeof OK
| typeof INFO
| typeof SUCCESS
| typeof USER_UPDATE
Expand All @@ -17,7 +19,9 @@ export type EventStatusType =
| UnparsedObject;
export const FAILURE = "failure";
export const ERROR = "error";
export const WARN = "warn";
export const WARNING = "warning";
export const OK = "ok";
export const INFO = "info";
export const SUCCESS = "success";
export const USER_UPDATE = "user_update";
Expand Down
2 changes: 1 addition & 1 deletion services/events/src/v2/models/EventsRequestPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class EventsRequestPage {
*/
"cursor"?: string;
/**
* The maximum number of logs in the response.
* The maximum number of events in the response.
*/
"limit"?: number;
/**
Expand Down
4 changes: 3 additions & 1 deletion services/events/src/v2/models/TypingInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ export const TypingInfo: ModelTypingInfo = {
EventCategory: ["change", "alert"],
EventCreateRequestType: ["event"],
EventPayloadIntegrationId: ["custom-events"],
EventPriority: ["normal", "low"],
EventPriority: ["normal", "low", "1", "2", "3", "4", "5"],
EventStatusType: [
"failure",
"error",
"warn",
"warning",
"ok",
"info",
"success",
"user_update",
Expand Down
Loading