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/services/dashboards/src/v1/index.ts b/services/dashboards/src/v1/index.ts index 3e071de4bbc6..9de96a8e803f 100644 --- a/services/dashboards/src/v1/index.ts +++ b/services/dashboards/src/v1/index.ts @@ -396,6 +396,8 @@ export { ViewingPreferencesTheme } from "./models/ViewingPreferencesTheme"; 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/services/dashboards/src/v1/models/TypingInfo.ts b/services/dashboards/src/v1/models/TypingInfo.ts index 7f1156659fa1..bb41c2082f2b 100644 --- a/services/dashboards/src/v1/models/TypingInfo.ts +++ b/services/dashboards/src/v1/models/TypingInfo.ts @@ -216,6 +216,7 @@ import { UserJourneySearchTarget } from "./UserJourneySearchTarget"; import { ViewingPreferences } from "./ViewingPreferences"; import { Widget } from "./Widget"; import { WidgetAxis } from "./WidgetAxis"; +import { WidgetCalendarAlignedSpan } from "./WidgetCalendarAlignedSpan"; import { WidgetConditionalFormat } from "./WidgetConditionalFormat"; import { WidgetCustomLink } from "./WidgetCustomLink"; import { WidgetEvent } from "./WidgetEvent"; @@ -591,6 +592,7 @@ export const TypingInfo: ModelTypingInfo = { ], ViewingPreferencesTheme: ["system", "light", "dark"], WidgetAggregator: ["avg", "last", "max", "min", "sum", "percentile"], + WidgetCalendarAlignedSpanType: ["daily", "weekly", "monthly", "yearly"], WidgetChangeType: ["absolute", "relative"], WidgetColorPreference: ["background", "text"], WidgetComparator: ["=", ">", ">=", "<", "<="], @@ -638,6 +640,9 @@ export const TypingInfo: ModelTypingInfo = { "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"], @@ -815,6 +820,7 @@ export const TypingInfo: ModelTypingInfo = { "WidgetLegacyLiveSpan", "WidgetNewLiveSpan", "WidgetNewFixedSpan", + "WidgetCalendarAlignedSpan", ], WildcardWidgetRequest: [ "TreeMapWidgetRequest", @@ -1063,6 +1069,7 @@ export const TypingInfo: ModelTypingInfo = { ViewingPreferences: ViewingPreferences, Widget: Widget, WidgetAxis: WidgetAxis, + WidgetCalendarAlignedSpan: WidgetCalendarAlignedSpan, WidgetConditionalFormat: WidgetConditionalFormat, WidgetCustomLink: WidgetCustomLink, WidgetEvent: WidgetEvent, diff --git a/services/dashboards/src/v1/models/WidgetCalendarAlignedSpan.ts b/services/dashboards/src/v1/models/WidgetCalendarAlignedSpan.ts new file mode 100644 index 000000000000..50ffee38acb1 --- /dev/null +++ b/services/dashboards/src/v1/models/WidgetCalendarAlignedSpan.ts @@ -0,0 +1,73 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { WidgetCalendarAlignedSpanType } from "./WidgetCalendarAlignedSpanType"; + +/** + * 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/services/dashboards/src/v1/models/WidgetCalendarAlignedSpanType.ts b/services/dashboards/src/v1/models/WidgetCalendarAlignedSpanType.ts new file mode 100644 index 000000000000..94d8e7418b47 --- /dev/null +++ b/services/dashboards/src/v1/models/WidgetCalendarAlignedSpanType.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * 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/services/dashboards/src/v1/models/WidgetLiveSpan.ts b/services/dashboards/src/v1/models/WidgetLiveSpan.ts index 342a57ec9a7a..017ada56bebd 100644 --- a/services/dashboards/src/v1/models/WidgetLiveSpan.ts +++ b/services/dashboards/src/v1/models/WidgetLiveSpan.ts @@ -21,6 +21,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"; @@ -39,3 +42,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/services/dashboards/src/v1/models/WidgetTime.ts b/services/dashboards/src/v1/models/WidgetTime.ts index 7b0446ca928b..41844a4377d0 100644 --- a/services/dashboards/src/v1/models/WidgetTime.ts +++ b/services/dashboards/src/v1/models/WidgetTime.ts @@ -1,5 +1,6 @@ import { UnparsedObject } from "@datadog/datadog-api-client"; +import { WidgetCalendarAlignedSpan } from "./WidgetCalendarAlignedSpan"; import { WidgetLegacyLiveSpan } from "./WidgetLegacyLiveSpan"; import { WidgetNewFixedSpan } from "./WidgetNewFixedSpan"; import { WidgetNewLiveSpan } from "./WidgetNewLiveSpan"; @@ -11,4 +12,5 @@ export type WidgetTime = | WidgetLegacyLiveSpan | WidgetNewLiveSpan | WidgetNewFixedSpan + | WidgetCalendarAlignedSpan | UnparsedObject; diff --git a/services/notebooks/src/v1/index.ts b/services/notebooks/src/v1/index.ts index 131453394c56..44fb3a846c79 100644 --- a/services/notebooks/src/v1/index.ts +++ b/services/notebooks/src/v1/index.ts @@ -182,6 +182,8 @@ export { UserJourneySearchGraphFilter } from "./models/UserJourneySearchGraphFil export { UserJourneySearchTarget } from "./models/UserJourneySearchTarget"; export { WidgetAggregator } from "./models/WidgetAggregator"; export { WidgetAxis } from "./models/WidgetAxis"; +export { WidgetCalendarAlignedSpan } from "./models/WidgetCalendarAlignedSpan"; +export { WidgetCalendarAlignedSpanType } from "./models/WidgetCalendarAlignedSpanType"; export { WidgetComparator } from "./models/WidgetComparator"; export { WidgetConditionalFormat } from "./models/WidgetConditionalFormat"; export { WidgetCustomLink } from "./models/WidgetCustomLink"; diff --git a/services/notebooks/src/v1/models/TypingInfo.ts b/services/notebooks/src/v1/models/TypingInfo.ts index 720065587eb7..87d1e97f5d60 100644 --- a/services/notebooks/src/v1/models/TypingInfo.ts +++ b/services/notebooks/src/v1/models/TypingInfo.ts @@ -104,6 +104,7 @@ import { UserJourneySearchFilters } from "./UserJourneySearchFilters"; import { UserJourneySearchGraphFilter } from "./UserJourneySearchGraphFilter"; import { UserJourneySearchTarget } from "./UserJourneySearchTarget"; import { WidgetAxis } from "./WidgetAxis"; +import { WidgetCalendarAlignedSpan } from "./WidgetCalendarAlignedSpan"; import { WidgetConditionalFormat } from "./WidgetConditionalFormat"; import { WidgetCustomLink } from "./WidgetCustomLink"; import { WidgetEvent } from "./WidgetEvent"; @@ -307,6 +308,7 @@ export const TypingInfo: ModelTypingInfo = { "__dd.time_to_convert", ], WidgetAggregator: ["avg", "last", "max", "min", "sum", "percentile"], + WidgetCalendarAlignedSpanType: ["daily", "weekly", "monthly", "yearly"], WidgetComparator: ["=", ">", ">=", "<", "<="], WidgetDisplayType: ["area", "bars", "line", "overlay"], WidgetFormulaCellDisplayModeOptionsTrendType: ["area", "line", "bars"], @@ -332,6 +334,9 @@ export const TypingInfo: ModelTypingInfo = { "month_to_date", "1y", "alert", + "full_week", + "full_month", + "year_to_date", ], WidgetLiveSpanUnit: ["minute", "hour", "day", "week", "month", "year"], WidgetMessageDisplay: ["inline", "expanded-md", "expanded-lg"], @@ -428,6 +433,7 @@ export const TypingInfo: ModelTypingInfo = { "WidgetLegacyLiveSpan", "WidgetNewLiveSpan", "WidgetNewFixedSpan", + "WidgetCalendarAlignedSpan", ], }, typeMap: { @@ -555,6 +561,7 @@ export const TypingInfo: ModelTypingInfo = { UserJourneySearchGraphFilter: UserJourneySearchGraphFilter, UserJourneySearchTarget: UserJourneySearchTarget, WidgetAxis: WidgetAxis, + WidgetCalendarAlignedSpan: WidgetCalendarAlignedSpan, WidgetConditionalFormat: WidgetConditionalFormat, WidgetCustomLink: WidgetCustomLink, WidgetEvent: WidgetEvent, diff --git a/services/notebooks/src/v1/models/WidgetCalendarAlignedSpan.ts b/services/notebooks/src/v1/models/WidgetCalendarAlignedSpan.ts new file mode 100644 index 000000000000..50ffee38acb1 --- /dev/null +++ b/services/notebooks/src/v1/models/WidgetCalendarAlignedSpan.ts @@ -0,0 +1,73 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { WidgetCalendarAlignedSpanType } from "./WidgetCalendarAlignedSpanType"; + +/** + * 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/services/notebooks/src/v1/models/WidgetCalendarAlignedSpanType.ts b/services/notebooks/src/v1/models/WidgetCalendarAlignedSpanType.ts new file mode 100644 index 000000000000..94d8e7418b47 --- /dev/null +++ b/services/notebooks/src/v1/models/WidgetCalendarAlignedSpanType.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * 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/services/notebooks/src/v1/models/WidgetLiveSpan.ts b/services/notebooks/src/v1/models/WidgetLiveSpan.ts index 342a57ec9a7a..017ada56bebd 100644 --- a/services/notebooks/src/v1/models/WidgetLiveSpan.ts +++ b/services/notebooks/src/v1/models/WidgetLiveSpan.ts @@ -21,6 +21,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"; @@ -39,3 +42,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/services/notebooks/src/v1/models/WidgetTime.ts b/services/notebooks/src/v1/models/WidgetTime.ts index 7b0446ca928b..41844a4377d0 100644 --- a/services/notebooks/src/v1/models/WidgetTime.ts +++ b/services/notebooks/src/v1/models/WidgetTime.ts @@ -1,5 +1,6 @@ import { UnparsedObject } from "@datadog/datadog-api-client"; +import { WidgetCalendarAlignedSpan } from "./WidgetCalendarAlignedSpan"; import { WidgetLegacyLiveSpan } from "./WidgetLegacyLiveSpan"; import { WidgetNewFixedSpan } from "./WidgetNewFixedSpan"; import { WidgetNewLiveSpan } from "./WidgetNewLiveSpan"; @@ -11,4 +12,5 @@ export type WidgetTime = | WidgetLegacyLiveSpan | WidgetNewLiveSpan | WidgetNewFixedSpan + | WidgetCalendarAlignedSpan | UnparsedObject;