diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 8f7dd59808d6..614dd8c07312 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2623,6 +2623,122 @@ components: nullable: true type: array type: object + EmbeddedAppWidgetDefinition: + additionalProperties: false + anyOf: + - required: + - app_id + - required: + - template_id + description: The embedded app widget displays an App Builder app on a dashboard. Exactly one of `app_id` or `template_id` must be provided; they cannot be provided together. + properties: + app_id: + description: UUID of the App Builder app to embed. + example: "7e7745f9-4343-4927-b038-80934a355915" + type: string + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + description: + description: The description of the widget. + maxLength: 5000 + type: string + inputs: + description: Inputs passed to the embedded app. + items: + $ref: '#/components/schemas/EmbeddedAppWidgetInput' + type: array + template_id: + description: ID of the built-in app template to embed. + example: ec2_manager + type: string + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/EmbeddedAppWidgetDefinitionType' + required: + - type + type: object + EmbeddedAppWidgetDefinitionType: + default: embedded_app + description: Type of the embedded app widget. + enum: + - embedded_app + example: embedded_app + type: string + x-enum-varnames: + - EMBEDDED_APP + EmbeddedAppWidgetInput: + additionalProperties: false + description: An input passed to the embedded app. + properties: + name: + description: Name of the app input. + example: environment + type: string + value: + $ref: '#/components/schemas/EmbeddedAppWidgetInputValue' + required: + - name + - value + type: object + EmbeddedAppWidgetInputValue: + description: Value of the app input. This can be a string, number, boolean, object, or a non-empty homogeneous array of those types. + example: production + oneOf: + - type: string + - format: double + type: number + - type: boolean + - $ref: '#/components/schemas/EmbeddedAppWidgetInputValueObject' + - $ref: '#/components/schemas/EmbeddedAppWidgetInputValueStringArray' + - $ref: '#/components/schemas/EmbeddedAppWidgetInputValueNumberArray' + - $ref: '#/components/schemas/EmbeddedAppWidgetInputValueBooleanArray' + - $ref: '#/components/schemas/EmbeddedAppWidgetInputValueObjectArray' + EmbeddedAppWidgetInputValueBooleanArray: + description: An array of boolean values passed to the embedded app. + items: + description: A boolean value passed to the embedded app. + type: boolean + type: array + x-generate-alias-as-model: true + EmbeddedAppWidgetInputValueNumberArray: + description: An array of numeric values passed to the embedded app. + items: + description: A numeric value passed to the embedded app. + format: double + type: number + type: array + x-generate-alias-as-model: true + EmbeddedAppWidgetInputValueObject: + additionalProperties: {} + description: An arbitrary object value passed to the embedded app. + type: object + EmbeddedAppWidgetInputValueObjectArray: + description: An array of object values passed to the embedded app. + items: + additionalProperties: {} + description: An object value passed to the embedded app. + type: object + type: array + x-generate-alias-as-model: true + EmbeddedAppWidgetInputValueStringArray: + description: An array of string values passed to the embedded app. + items: + description: A string value passed to the embedded app. + type: string + type: array + x-generate-alias-as-model: true Event: description: Object representing an event. properties: @@ -28167,6 +28283,7 @@ components: - $ref: '#/components/schemas/CheckStatusWidgetDefinition' - $ref: '#/components/schemas/CohortWidgetDefinition' - $ref: '#/components/schemas/DistributionWidgetDefinition' + - $ref: '#/components/schemas/EmbeddedAppWidgetDefinition' - $ref: '#/components/schemas/EventStreamWidgetDefinition' - $ref: '#/components/schemas/EventTimelineWidgetDefinition' - $ref: '#/components/schemas/FreeTextWidgetDefinition' diff --git a/packages/datadog-api-client-v1/index.ts b/packages/datadog-api-client-v1/index.ts index ab5937fca116..3c24a2b3c184 100644 --- a/packages/datadog-api-client-v1/index.ts +++ b/packages/datadog-api-client-v1/index.ts @@ -456,6 +456,10 @@ export { DistributionWidgetYAxis } from "./models/DistributionWidgetYAxis"; export { Downtime } from "./models/Downtime"; export { DowntimeChild } from "./models/DowntimeChild"; export { DowntimeRecurrence } from "./models/DowntimeRecurrence"; +export { EmbeddedAppWidgetDefinition } from "./models/EmbeddedAppWidgetDefinition"; +export { EmbeddedAppWidgetDefinitionType } from "./models/EmbeddedAppWidgetDefinitionType"; +export { EmbeddedAppWidgetInput } from "./models/EmbeddedAppWidgetInput"; +export { EmbeddedAppWidgetInputValue } from "./models/EmbeddedAppWidgetInputValue"; export { Event } from "./models/Event"; export { EventAlertType } from "./models/EventAlertType"; export { EventCreateRequest } from "./models/EventCreateRequest"; diff --git a/packages/datadog-api-client-v1/models/EmbeddedAppWidgetDefinition.ts b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetDefinition.ts new file mode 100644 index 000000000000..2ac3b87fa6ab --- /dev/null +++ b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetDefinition.ts @@ -0,0 +1,119 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { EmbeddedAppWidgetDefinitionType } from "./EmbeddedAppWidgetDefinitionType"; +import { EmbeddedAppWidgetInput } from "./EmbeddedAppWidgetInput"; +import { WidgetCustomLink } from "./WidgetCustomLink"; +import { WidgetTextAlign } from "./WidgetTextAlign"; +import { WidgetTime } from "./WidgetTime"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The embedded app widget displays an App Builder app on a dashboard. Exactly one of `app_id` or `template_id` must be provided; they cannot be provided together. + */ +export class EmbeddedAppWidgetDefinition { + /** + * UUID of the App Builder app to embed. + */ + "appId"?: string; + /** + * List of custom links. + */ + "customLinks"?: Array; + /** + * The description of the widget. + */ + "description"?: string; + /** + * Inputs passed to the embedded app. + */ + "inputs"?: Array; + /** + * ID of the built-in app template to embed. + */ + "templateId"?: string; + /** + * Time setting for the widget. + */ + "time"?: WidgetTime; + /** + * Title of the widget. + */ + "title"?: string; + /** + * How to align the text on the widget. + */ + "titleAlign"?: WidgetTextAlign; + /** + * Size of the title. + */ + "titleSize"?: string; + /** + * Type of the embedded app widget. + */ + "type": EmbeddedAppWidgetDefinitionType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + appId: { + baseName: "app_id", + type: "string", + }, + customLinks: { + baseName: "custom_links", + type: "Array", + }, + description: { + baseName: "description", + type: "string", + }, + inputs: { + baseName: "inputs", + type: "Array", + }, + templateId: { + baseName: "template_id", + type: "string", + }, + time: { + baseName: "time", + type: "WidgetTime", + }, + title: { + baseName: "title", + type: "string", + }, + titleAlign: { + baseName: "title_align", + type: "WidgetTextAlign", + }, + titleSize: { + baseName: "title_size", + type: "string", + }, + type: { + baseName: "type", + type: "EmbeddedAppWidgetDefinitionType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return EmbeddedAppWidgetDefinition.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v1/models/EmbeddedAppWidgetDefinitionType.ts b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetDefinitionType.ts new file mode 100644 index 000000000000..ff4e7d453339 --- /dev/null +++ b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetDefinitionType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Type of the embedded app widget. + */ + +export type EmbeddedAppWidgetDefinitionType = + | typeof EMBEDDED_APP + | UnparsedObject; +export const EMBEDDED_APP = "embedded_app"; diff --git a/packages/datadog-api-client-v1/models/EmbeddedAppWidgetInput.ts b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetInput.ts new file mode 100644 index 000000000000..423c43ee8f05 --- /dev/null +++ b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetInput.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { EmbeddedAppWidgetInputValue } from "./EmbeddedAppWidgetInputValue"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * An input passed to the embedded app. + */ +export class EmbeddedAppWidgetInput { + /** + * Name of the app input. + */ + "name": string; + /** + * Value of the app input. This can be a string, number, boolean, object, or a non-empty homogeneous array of those types. + */ + "value": EmbeddedAppWidgetInputValue; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "EmbeddedAppWidgetInputValue", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return EmbeddedAppWidgetInput.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v1/models/EmbeddedAppWidgetInputValue.ts b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetInputValue.ts new file mode 100644 index 000000000000..ee8187dd5c5f --- /dev/null +++ b/packages/datadog-api-client-v1/models/EmbeddedAppWidgetInputValue.ts @@ -0,0 +1,22 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Value of the app input. This can be a string, number, boolean, object, or a non-empty homogeneous array of those types. + */ + +export type EmbeddedAppWidgetInputValue = + | string + | number + | boolean + | { [key: string]: any } + | Array + | Array + | Array + | Array<{ [key: string]: any }> + | UnparsedObject; diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index b5dd6bc0c9db..542dc0e8491a 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -85,6 +85,8 @@ import { DistributionWidgetYAxis } from "./DistributionWidgetYAxis"; import { Downtime } from "./Downtime"; import { DowntimeChild } from "./DowntimeChild"; import { DowntimeRecurrence } from "./DowntimeRecurrence"; +import { EmbeddedAppWidgetDefinition } from "./EmbeddedAppWidgetDefinition"; +import { EmbeddedAppWidgetInput } from "./EmbeddedAppWidgetInput"; import { Event } from "./Event"; import { EventCreateRequest } from "./EventCreateRequest"; import { EventCreateResponse } from "./EventCreateResponse"; @@ -864,6 +866,7 @@ const enumsMap: { [key: string]: any[] } = { DistributionPointsContentEncoding: ["deflate"], DistributionPointsType: ["distribution"], DistributionWidgetDefinitionType: ["distribution"], + EmbeddedAppWidgetDefinitionType: ["embedded_app"], EventAlertType: [ "error", "warning", @@ -2180,6 +2183,8 @@ const typeMap: { [index: string]: any } = { Downtime: Downtime, DowntimeChild: DowntimeChild, DowntimeRecurrence: DowntimeRecurrence, + EmbeddedAppWidgetDefinition: EmbeddedAppWidgetDefinition, + EmbeddedAppWidgetInput: EmbeddedAppWidgetInput, Event: Event, EventCreateRequest: EventCreateRequest, EventCreateResponse: EventCreateResponse, @@ -2963,6 +2968,16 @@ const oneOfMap: { [index: string]: string[] } = { "FormulaAndFunctionApmResourceStatsQueryDefinition", "FormulaAndFunctionApmMetricsQueryDefinition", ], + EmbeddedAppWidgetInputValue: [ + "string", + "number", + "boolean", + "{ [key: string]: any; }", + "Array", + "Array", + "Array", + "Array<{ [key: string]: any; }>", + ], EventsAggregation: ["EventsAggregationValue", "string"], FormulaAndFunctionEventQueryGroupByConfig: [ "Array", @@ -3145,6 +3160,7 @@ const oneOfMap: { [index: string]: string[] } = { "CheckStatusWidgetDefinition", "CohortWidgetDefinition", "DistributionWidgetDefinition", + "EmbeddedAppWidgetDefinition", "EventStreamWidgetDefinition", "EventTimelineWidgetDefinition", "FreeTextWidgetDefinition", diff --git a/packages/datadog-api-client-v1/models/WidgetDefinition.ts b/packages/datadog-api-client-v1/models/WidgetDefinition.ts index feba6d1b35ca..20be888146f5 100644 --- a/packages/datadog-api-client-v1/models/WidgetDefinition.ts +++ b/packages/datadog-api-client-v1/models/WidgetDefinition.ts @@ -10,6 +10,7 @@ import { ChangeWidgetDefinition } from "./ChangeWidgetDefinition"; import { CheckStatusWidgetDefinition } from "./CheckStatusWidgetDefinition"; import { CohortWidgetDefinition } from "./CohortWidgetDefinition"; import { DistributionWidgetDefinition } from "./DistributionWidgetDefinition"; +import { EmbeddedAppWidgetDefinition } from "./EmbeddedAppWidgetDefinition"; import { EventStreamWidgetDefinition } from "./EventStreamWidgetDefinition"; import { EventTimelineWidgetDefinition } from "./EventTimelineWidgetDefinition"; import { FreeTextWidgetDefinition } from "./FreeTextWidgetDefinition"; @@ -59,6 +60,7 @@ export type WidgetDefinition = | CheckStatusWidgetDefinition | CohortWidgetDefinition | DistributionWidgetDefinition + | EmbeddedAppWidgetDefinition | EventStreamWidgetDefinition | EventTimelineWidgetDefinition | FreeTextWidgetDefinition