diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index b41f414fd369..b96c7babe92b 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -27920,6 +27920,42 @@ components: WidgetBackgroundColor: description: "Background color of the widget. Supported values are `white`, `blue`, `purple`, `pink`, `orange`, `yellow`, `green`, `gray`, `vivid_blue`, `vivid_purple`, `vivid_pink`, `vivid_orange`, `vivid_yellow`, `vivid_green`, and `transparent`." type: string + WidgetCalendarAlignedSpan: + description: Used for calendar-aligned time spans, such as the current month or previous year. + properties: + hide_incomplete_cost_data: + description: Whether to hide incomplete cost data in the widget. + type: boolean + offset: + description: Number of completed periods before the current period. 0 represents the current period. + example: 1 + format: int64 + minimum: 0 + type: integer + timezone: + description: Time zone used to align the calendar period. + example: UTC + type: string + type: + $ref: "#/components/schemas/WidgetCalendarAlignedSpanType" + required: + - type + - offset + type: object + WidgetCalendarAlignedSpanType: + description: Calendar-aligned time span type. + enum: + - daily + - weekly + - monthly + - yearly + example: daily + type: string + x-enum-varnames: + - DAILY + - WEEKLY + - MONTHLY + - YEARLY WidgetChangeType: description: Show the absolute or the relative change. enum: @@ -28381,6 +28417,9 @@ components: - month_to_date - 1y - alert + - full_week + - full_month + - year_to_date example: 5m type: string x-enum-varnames: @@ -28401,6 +28440,9 @@ components: - MONTH_TO_DATE - PAST_ONE_YEAR - ALERT + - FULL_WEEK + - FULL_MONTH + - YEAR_TO_DATE WidgetLiveSpanUnit: description: Unit of the time span. enum: @@ -28784,6 +28826,7 @@ components: - $ref: "#/components/schemas/WidgetLegacyLiveSpan" - $ref: "#/components/schemas/WidgetNewLiveSpan" - $ref: "#/components/schemas/WidgetNewFixedSpan" + - $ref: "#/components/schemas/WidgetCalendarAlignedSpan" WidgetTimeWindows: description: Define a time window. enum: diff --git a/packages/datadog-api-client-v1/index.ts b/packages/datadog-api-client-v1/index.ts index cac976b3e612..321a337f2259 100644 --- a/packages/datadog-api-client-v1/index.ts +++ b/packages/datadog-api-client-v1/index.ts @@ -1416,6 +1416,8 @@ export { WebhooksIntegrationUpdateRequest } from "./models/WebhooksIntegrationUp export { Widget } from "./models/Widget"; export { WidgetAggregator } from "./models/WidgetAggregator"; export { WidgetAxis } from "./models/WidgetAxis"; +export { WidgetCalendarAlignedSpan } from "./models/WidgetCalendarAlignedSpan"; +export { WidgetCalendarAlignedSpanType } from "./models/WidgetCalendarAlignedSpanType"; export { WidgetChangeType } from "./models/WidgetChangeType"; export { WidgetColorPreference } from "./models/WidgetColorPreference"; export { WidgetComparator } from "./models/WidgetComparator"; diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index d5a8c46cc114..243f5834bc1b 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -742,6 +742,7 @@ import { WebhooksIntegrationCustomVariableUpdateRequest } from "./WebhooksIntegr import { WebhooksIntegrationUpdateRequest } from "./WebhooksIntegrationUpdateRequest"; import { Widget } from "./Widget"; import { WidgetAxis } from "./WidgetAxis"; +import { WidgetCalendarAlignedSpan } from "./WidgetCalendarAlignedSpan"; import { WidgetConditionalFormat } from "./WidgetConditionalFormat"; import { WidgetCustomLink } from "./WidgetCustomLink"; import { WidgetEvent } from "./WidgetEvent"; @@ -1950,6 +1951,7 @@ const enumsMap: { [key: string]: any[] } = { ViewingPreferencesTheme: ["system", "light", "dark"], WebhooksIntegrationEncoding: ["json", "form"], WidgetAggregator: ["avg", "last", "max", "min", "sum", "percentile"], + WidgetCalendarAlignedSpanType: ["daily", "weekly", "monthly", "yearly"], WidgetChangeType: ["absolute", "relative"], WidgetColorPreference: ["background", "text"], WidgetComparator: ["=", ">", ">=", "<", "<="], @@ -1992,6 +1994,9 @@ const enumsMap: { [key: string]: any[] } = { "month_to_date", "1y", "alert", + "full_week", + "full_month", + "year_to_date", ], WidgetLiveSpanUnit: ["minute", "hour", "day", "week", "month", "year"], WidgetMargin: ["sm", "md", "lg", "small", "large"], @@ -2890,6 +2895,7 @@ const typeMap: { [index: string]: any } = { WebhooksIntegrationUpdateRequest: WebhooksIntegrationUpdateRequest, Widget: Widget, WidgetAxis: WidgetAxis, + WidgetCalendarAlignedSpan: WidgetCalendarAlignedSpan, WidgetConditionalFormat: WidgetConditionalFormat, WidgetCustomLink: WidgetCustomLink, WidgetEvent: WidgetEvent, @@ -3139,6 +3145,7 @@ const oneOfMap: { [index: string]: string[] } = { "WidgetLegacyLiveSpan", "WidgetNewLiveSpan", "WidgetNewFixedSpan", + "WidgetCalendarAlignedSpan", ], WildcardWidgetRequest: [ "TreeMapWidgetRequest", diff --git a/packages/datadog-api-client-v1/models/WidgetCalendarAlignedSpan.ts b/packages/datadog-api-client-v1/models/WidgetCalendarAlignedSpan.ts new file mode 100644 index 000000000000..a8e7eab8203f --- /dev/null +++ b/packages/datadog-api-client-v1/models/WidgetCalendarAlignedSpan.ts @@ -0,0 +1,80 @@ +/** + * 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 { WidgetCalendarAlignedSpanType } from "./WidgetCalendarAlignedSpanType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Used for calendar-aligned time spans, such as the current month or previous year. + */ +export class WidgetCalendarAlignedSpan { + /** + * Whether to hide incomplete cost data in the widget. + */ + "hideIncompleteCostData"?: boolean; + /** + * Number of completed periods before the current period. 0 represents the current period. + */ + "offset": number; + /** + * Time zone used to align the calendar period. + */ + "timezone"?: string; + /** + * Calendar-aligned time span type. + */ + "type": WidgetCalendarAlignedSpanType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + hideIncompleteCostData: { + baseName: "hide_incomplete_cost_data", + type: "boolean", + }, + offset: { + baseName: "offset", + type: "number", + required: true, + format: "int64", + }, + timezone: { + baseName: "timezone", + type: "string", + }, + type: { + baseName: "type", + type: "WidgetCalendarAlignedSpanType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return WidgetCalendarAlignedSpan.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v1/models/WidgetCalendarAlignedSpanType.ts b/packages/datadog-api-client-v1/models/WidgetCalendarAlignedSpanType.ts new file mode 100644 index 000000000000..2efb9a3b0711 --- /dev/null +++ b/packages/datadog-api-client-v1/models/WidgetCalendarAlignedSpanType.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"; + +/** + * Calendar-aligned time span type. + */ + +export type WidgetCalendarAlignedSpanType = + | typeof DAILY + | typeof WEEKLY + | typeof MONTHLY + | typeof YEARLY + | UnparsedObject; +export const DAILY = "daily"; +export const WEEKLY = "weekly"; +export const MONTHLY = "monthly"; +export const YEARLY = "yearly"; diff --git a/packages/datadog-api-client-v1/models/WidgetLiveSpan.ts b/packages/datadog-api-client-v1/models/WidgetLiveSpan.ts index e46d46044012..e2145576d06c 100644 --- a/packages/datadog-api-client-v1/models/WidgetLiveSpan.ts +++ b/packages/datadog-api-client-v1/models/WidgetLiveSpan.ts @@ -28,6 +28,9 @@ export type WidgetLiveSpan = | typeof MONTH_TO_DATE | typeof PAST_ONE_YEAR | typeof ALERT + | typeof FULL_WEEK + | typeof FULL_MONTH + | typeof YEAR_TO_DATE | UnparsedObject; export const PAST_ONE_MINUTE = "1m"; export const PAST_FIVE_MINUTES = "5m"; @@ -46,3 +49,6 @@ export const WEEK_TO_DATE = "week_to_date"; export const MONTH_TO_DATE = "month_to_date"; export const PAST_ONE_YEAR = "1y"; export const ALERT = "alert"; +export const FULL_WEEK = "full_week"; +export const FULL_MONTH = "full_month"; +export const YEAR_TO_DATE = "year_to_date"; diff --git a/packages/datadog-api-client-v1/models/WidgetTime.ts b/packages/datadog-api-client-v1/models/WidgetTime.ts index a585d2e601fd..1d0a2effa590 100644 --- a/packages/datadog-api-client-v1/models/WidgetTime.ts +++ b/packages/datadog-api-client-v1/models/WidgetTime.ts @@ -3,6 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { WidgetCalendarAlignedSpan } from "./WidgetCalendarAlignedSpan"; import { WidgetLegacyLiveSpan } from "./WidgetLegacyLiveSpan"; import { WidgetNewFixedSpan } from "./WidgetNewFixedSpan"; import { WidgetNewLiveSpan } from "./WidgetNewLiveSpan"; @@ -17,4 +18,5 @@ export type WidgetTime = | WidgetLegacyLiveSpan | WidgetNewLiveSpan | WidgetNewFixedSpan + | WidgetCalendarAlignedSpan | UnparsedObject;