Skip to content
Open
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
43 changes: 43 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -28381,6 +28417,9 @@ components:
- month_to_date
- 1y
- alert
- full_week
- full_month
- year_to_date
example: 5m
type: string
x-enum-varnames:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 7 additions & 0 deletions packages/datadog-api-client-v1/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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: ["=", ">", ">=", "<", "<="],
Expand Down Expand Up @@ -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"],
Expand Down Expand Up @@ -2890,6 +2895,7 @@ const typeMap: { [index: string]: any } = {
WebhooksIntegrationUpdateRequest: WebhooksIntegrationUpdateRequest,
Widget: Widget,
WidgetAxis: WidgetAxis,
WidgetCalendarAlignedSpan: WidgetCalendarAlignedSpan,
WidgetConditionalFormat: WidgetConditionalFormat,
WidgetCustomLink: WidgetCustomLink,
WidgetEvent: WidgetEvent,
Expand Down Expand Up @@ -3139,6 +3145,7 @@ const oneOfMap: { [index: string]: string[] } = {
"WidgetLegacyLiveSpan",
"WidgetNewLiveSpan",
"WidgetNewFixedSpan",
"WidgetCalendarAlignedSpan",
],
WildcardWidgetRequest: [
"TreeMapWidgetRequest",
Expand Down
Original file line number Diff line number Diff line change
@@ -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() {}
}
Original file line number Diff line number Diff line change
@@ -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";
6 changes: 6 additions & 0 deletions packages/datadog-api-client-v1/models/WidgetLiveSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v1/models/WidgetTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -17,4 +18,5 @@ export type WidgetTime =
| WidgetLegacyLiveSpan
| WidgetNewLiveSpan
| WidgetNewFixedSpan
| WidgetCalendarAlignedSpan
| UnparsedObject;
Loading