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
62 changes: 60 additions & 2 deletions vantage_sdk/models/gen_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,20 @@
from .update_financial_commitment_report_date_interval import UpdateFinancialCommitmentReportDateInterval
from .update_financial_commitment_report_date_bucket import UpdateFinancialCommitmentReportDateBucket
from .update_financial_commitment_report import UpdateFinancialCommitmentReport
from .update_dashboard_widget_settings_kpi_type import UpdateDashboardWidgetSettingsKpiType
from .update_dashboard_widget_settings_kpi_calculation import UpdateDashboardWidgetSettingsKpiCalculation
from .update_dashboard_widget_settings_display_type import UpdateDashboardWidgetSettingsDisplayType
from .update_dashboard_widget_settings import UpdateDashboardWidgetSettings
from .update_dashboard_widget import UpdateDashboardWidget
from .update_dashboard_widget1_widgetable_type import UpdateDashboardWidget1WidgetableType
from .update_dashboard_widget1_settings_kpi_type import UpdateDashboardWidget1SettingsKpiType
from .update_dashboard_widget1_settings_kpi_calculation import UpdateDashboardWidget1SettingsKpiCalculation
from .update_dashboard_widget1_settings_grid import UpdateDashboardWidget1SettingsGrid
from .update_dashboard_widget1_settings_display_type import UpdateDashboardWidget1SettingsDisplayType
from .update_dashboard_widget1_settings import UpdateDashboardWidget1Settings
from .update_dashboard_widget1_content_type import UpdateDashboardWidget1ContentType
from .update_dashboard_widget1_content import UpdateDashboardWidget1Content
from .update_dashboard_notification_frequency import UpdateDashboardNotificationFrequency
from .update_dashboard_notification import UpdateDashboardNotification
from .update_dashboard_date_interval import UpdateDashboardDateInterval
from .update_dashboard_date_bin import UpdateDashboardDateBin
from .update_dashboard import UpdateDashboard
Expand Down Expand Up @@ -299,9 +310,17 @@
from .data_export import DataExport
from .dashboards_get_parameters_query import DashboardsGetParametersQuery
from .dashboards import Dashboards
from .dashboard_widget_widgetable_type import DashboardWidgetWidgetableType
from .dashboard_widget_settings_kpi_type import DashboardWidgetSettingsKpiType
from .dashboard_widget_settings_kpi_calculation import DashboardWidgetSettingsKpiCalculation
from .dashboard_widget_settings_display_type import DashboardWidgetSettingsDisplayType
from .dashboard_widget_settings import DashboardWidgetSettings
from .dashboard_widget_grid_layout import DashboardWidgetGridLayout
from .dashboard_widget import DashboardWidget
from .dashboard_notifications_get_parameters_query import DashboardNotificationsGetParametersQuery
from .dashboard_notifications import DashboardNotifications
from .dashboard_notification_frequency import DashboardNotificationFrequency
from .dashboard_notification import DashboardNotification
from .dashboard_date_interval import DashboardDateInterval
from .dashboard_date_bin import DashboardDateBin
from .dashboard import Dashboard
Expand Down Expand Up @@ -358,9 +377,17 @@
from .create_financial_commitment_report_date_interval import CreateFinancialCommitmentReportDateInterval
from .create_financial_commitment_report_date_bucket import CreateFinancialCommitmentReportDateBucket
from .create_financial_commitment_report import CreateFinancialCommitmentReport
from .create_dashboard_widget_widgetable_type import CreateDashboardWidgetWidgetableType
from .create_dashboard_widget_settings_kpi_type import CreateDashboardWidgetSettingsKpiType
from .create_dashboard_widget_settings_kpi_calculation import CreateDashboardWidgetSettingsKpiCalculation
from .create_dashboard_widget_settings_grid import CreateDashboardWidgetSettingsGrid
from .create_dashboard_widget_settings_display_type import CreateDashboardWidgetSettingsDisplayType
from .create_dashboard_widget_settings import CreateDashboardWidgetSettings
from .create_dashboard_widget_content_type import CreateDashboardWidgetContentType
from .create_dashboard_widget_content import CreateDashboardWidgetContent
from .create_dashboard_widget import CreateDashboardWidget
from .create_dashboard_notification_frequency import CreateDashboardNotificationFrequency
from .create_dashboard_notification import CreateDashboardNotification
from .create_dashboard_date_interval import CreateDashboardDateInterval
from .create_dashboard_date_bin import CreateDashboardDateBin
from .create_dashboard import CreateDashboard
Expand Down Expand Up @@ -558,6 +585,8 @@
from .kubernetes_efficiency_reports_data_exports_post_parameters_query_groupings import KubernetesEfficiencyReportsDataExportsPostParametersQueryGroupings as KubernetesEfficiencyReportsDataExportsPostParametersQueryGroupingsKubernetesEfficiencyReportsDataExportsPostParametersQueryGroupings
from .kubernetes_efficiency_reports_kubernetes_efficiency_report_token_costs_get_parameters_query_groupings1 import KubernetesEfficiencyReportsKubernetesEfficiencyReportTokenCostsGetParametersQueryGroupings as KubernetesEfficiencyReportsKubernetesEfficiencyReportTokenCostsGetParametersQueryGroupings1KubernetesEfficiencyReportsKubernetesEfficiencyReportTokenCostsGetParametersQueryGroupings
from .kubernetes_efficiency_reports_kubernetes_efficiency_report_token_costs_get_parameters_query_groupings import KubernetesEfficiencyReportsKubernetesEfficiencyReportTokenCostsGetParametersQueryGroupings as KubernetesEfficiencyReportsKubernetesEfficiencyReportTokenCostsGetParametersQueryGroupingsKubernetesEfficiencyReportsKubernetesEfficiencyReportTokenCostsGetParametersQueryGroupings
from .update_dashboard_widget1 import UpdateDashboardWidget as UpdateDashboardWidget1UpdateDashboardWidget
from .update_dashboard_widget import UpdateDashboardWidget as UpdateDashboardWidgetUpdateDashboardWidget
from .update_financial_commitment_report_groupings1 import UpdateFinancialCommitmentReportGroupings as UpdateFinancialCommitmentReportGroupings1UpdateFinancialCommitmentReportGroupings
from .update_financial_commitment_report_groupings import UpdateFinancialCommitmentReportGroupings as UpdateFinancialCommitmentReportGroupingsUpdateFinancialCommitmentReportGroupings
from .update_kubernetes_efficiency_report_groupings1 import UpdateKubernetesEfficiencyReportGroupings as UpdateKubernetesEfficiencyReportGroupings1UpdateKubernetesEfficiencyReportGroupings
Expand Down Expand Up @@ -748,9 +777,17 @@
"CreateDashboard",
"CreateDashboardDateBin",
"CreateDashboardDateInterval",
"CreateDashboardNotification",
"CreateDashboardNotificationFrequency",
"CreateDashboardWidget",
"CreateDashboardWidgetContent",
"CreateDashboardWidgetContentType",
"CreateDashboardWidgetSettings",
"CreateDashboardWidgetSettingsDisplayType",
"CreateDashboardWidgetSettingsGrid",
"CreateDashboardWidgetSettingsKpiCalculation",
"CreateDashboardWidgetSettingsKpiType",
"CreateDashboardWidgetWidgetableType",
"CreateFinancialCommitmentReport",
"CreateFinancialCommitmentReportDateBucket",
"CreateFinancialCommitmentReportDateInterval",
Expand Down Expand Up @@ -813,9 +850,17 @@
"Dashboard",
"DashboardDateBin",
"DashboardDateInterval",
"DashboardNotification",
"DashboardNotificationFrequency",
"DashboardNotifications",
"DashboardNotificationsGetParametersQuery",
"DashboardWidget",
"DashboardWidgetGridLayout",
"DashboardWidgetSettings",
"DashboardWidgetSettingsDisplayType",
"DashboardWidgetSettingsKpiCalculation",
"DashboardWidgetSettingsKpiType",
"DashboardWidgetWidgetableType",
"Dashboards",
"DashboardsGetParametersQuery",
"DataExport",
Expand Down Expand Up @@ -1042,9 +1087,22 @@
"UpdateDashboard",
"UpdateDashboardDateBin",
"UpdateDashboardDateInterval",
"UpdateDashboardWidget",
"UpdateDashboardNotification",
"UpdateDashboardNotificationFrequency",
"UpdateDashboardWidget1Content",
"UpdateDashboardWidget1ContentType",
"UpdateDashboardWidget1Settings",
"UpdateDashboardWidget1SettingsDisplayType",
"UpdateDashboardWidget1SettingsGrid",
"UpdateDashboardWidget1SettingsKpiCalculation",
"UpdateDashboardWidget1SettingsKpiType",
"UpdateDashboardWidget1UpdateDashboardWidget",
"UpdateDashboardWidget1WidgetableType",
"UpdateDashboardWidgetSettings",
"UpdateDashboardWidgetSettingsDisplayType",
"UpdateDashboardWidgetSettingsKpiCalculation",
"UpdateDashboardWidgetSettingsKpiType",
"UpdateDashboardWidgetUpdateDashboardWidget",
"UpdateFinancialCommitmentReport",
"UpdateFinancialCommitmentReportDateBucket",
"UpdateFinancialCommitmentReportDateInterval",
Expand Down
1 change: 1 addition & 0 deletions vantage_sdk/models/gen_models/cost_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class CostProvider(StrEnum):
openrouter = 'openrouter'
deepgram = 'deepgram'
crusoe = 'crusoe'
sentry_billing = 'sentry_billing'


class CostProviderModel(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ class CostProviderAccountsGetParametersQueryProvider(StrEnum):
openrouter = 'openrouter'
deepgram = 'deepgram'
crusoe = 'crusoe'
sentry_billing = 'sentry_billing'
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ class CostReportsCostReportTokenForecastedCostsGetParametersQueryProvider(StrEnu
openrouter = 'openrouter'
deepgram = 'deepgram'
crusoe = 'crusoe'
sentry_billing = 'sentry_billing'
all = 'all'
2 changes: 1 addition & 1 deletion vantage_sdk/models/gen_models/create_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CreateDashboard(BaseModel):
populate_by_name=True,
)
title: Annotated[str, Field(description='The title of the Dashboard.')]
widgets: Annotated[Sequence[create_dashboard_widget.CreateDashboardWidget] | None, Field(description='The widgets to add to the Dashboard. Currently supports CostReport, ResourceReport, KubernetesEfficiencyReport, FinancialCommitmentReport, and RecommendationView.')] = None
widgets: Annotated[Sequence[create_dashboard_widget.CreateDashboardWidget] | None, Field(description='The widgets to add to the Dashboard. Report-backed widgets use widgetable_token. Free text widgets use widgetable_type set to free_text and require content.')] = None
saved_filter_tokens: Annotated[Sequence[str] | None, Field(description='The tokens of the Saved Filters used in the Dashboard.')] = None
date_bin: Annotated[create_dashboard_date_bin.CreateDashboardDateBin | None, Field(description='Determines how to group costs in the Dashboard.')] = None
date_interval: Annotated[create_dashboard_date_interval.CreateDashboardDateInterval | None, Field(description="Determines the date range in the Dashboard. Incompatible with 'start_date' and 'end_date' parameters.")] = None
Expand Down
23 changes: 23 additions & 0 deletions vantage_sdk/models/gen_models/create_dashboard_notification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field
from collections.abc import Sequence
from . import create_dashboard_notification_frequency


class CreateDashboardNotification(BaseModel):
"""
Create a DashboardNotification.
"""
model_config = ConfigDict(
populate_by_name=True,
)
title: Annotated[str, Field(description='The title of the DashboardNotification.')]
dashboard_token: Annotated[str, Field(description='The Dashboard token.')]
workspace_token: Annotated[str | None, Field(description='The token of the Workspace to add the DashboardNotification to. Required if the API token is associated with multiple Workspaces.')] = None
user_tokens: Annotated[Sequence[str] | None, Field(description='The Users that receive the notification.')] = None
recipient_emails: Annotated[Sequence[str] | None, Field(description="Email addresses that receive the notification. Must be organization users, on the account's SSO domain, or an approved third-party service address.")] = None
frequency: Annotated[create_dashboard_notification_frequency.CreateDashboardNotificationFrequency, Field(description='The frequency the DashboardNotification is sent. Possible values: daily, weekly, monthly.')]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class CreateDashboardNotificationFrequency(StrEnum):
"""
The frequency the DashboardNotification is sent. Possible values: daily, weekly, monthly.
"""
daily = 'daily'
weekly = 'weekly'
monthly = 'monthly'
10 changes: 6 additions & 4 deletions vantage_sdk/models/gen_models/create_dashboard_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
from __future__ import annotations
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field
from . import create_dashboard_widget_settings
from . import create_dashboard_widget_content, create_dashboard_widget_settings, create_dashboard_widget_widgetable_type


class CreateDashboardWidget(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
widgetable_token: Annotated[str, Field(description='The token of the represented Resource.')]
title: Annotated[str | None, Field(description='The title of the Widget (defaults to the title of the Resource).')] = None
settings: Annotated[create_dashboard_widget_settings.CreateDashboardWidgetSettings | None, Field(description='The settings for the DashboardWidget.')] = None
widgetable_token: Annotated[str | None, Field(description='The token of the represented Resource.')] = None
widgetable_type: Annotated[create_dashboard_widget_widgetable_type.CreateDashboardWidgetWidgetableType | None, Field(description='The widget type. Use free_text for a free text widget.')] = None
title: Annotated[str | None, Field(description='The title of the Widget (defaults to the Resource title, or Free Text for a free text widget).')] = None
content: Annotated[create_dashboard_widget_content.CreateDashboardWidgetContent | None, Field(description='The required rich-text document for a free text widget.')] = None
settings: Annotated[create_dashboard_widget_settings.CreateDashboardWidgetSettings | None, Field(description='The display and grid layout settings for the DashboardWidget.')] = None
19 changes: 19 additions & 0 deletions vantage_sdk/models/gen_models/create_dashboard_widget_content.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from typing import Annotated, Any
from pydantic import BaseModel, ConfigDict, Field
from collections.abc import Mapping, Sequence
from . import create_dashboard_widget_content_type


class CreateDashboardWidgetContent(BaseModel):
"""
The required rich-text document for a free text widget.
"""
model_config = ConfigDict(
populate_by_name=True,
)
type: Annotated[create_dashboard_widget_content_type.CreateDashboardWidgetContentType, Field(description='The TipTap document root type.')]
content: Sequence[Mapping[str, Any]] | None = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class CreateDashboardWidgetContentType(StrEnum):
"""
The TipTap document root type.
"""
doc = 'doc'
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
# filename: openapi_spec.json

from __future__ import annotations
from pydantic import BaseModel, ConfigDict
from . import create_dashboard_widget_settings_display_type
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field
from . import create_dashboard_widget_settings_display_type, create_dashboard_widget_settings_grid, create_dashboard_widget_settings_kpi_calculation, create_dashboard_widget_settings_kpi_type


class CreateDashboardWidgetSettings(BaseModel):
"""
The settings for the DashboardWidget.
The display and grid layout settings for the DashboardWidget.
"""
model_config = ConfigDict(
populate_by_name=True,
)
display_type: create_dashboard_widget_settings_display_type.CreateDashboardWidgetSettingsDisplayType
kpi_calculation: Annotated[create_dashboard_widget_settings_kpi_calculation.CreateDashboardWidgetSettingsKpiCalculation | None, Field(description='The aggregation used when display_type is kpi.')] = None
kpi_type: Annotated[create_dashboard_widget_settings_kpi_type.CreateDashboardWidgetSettingsKpiType | None, Field(description='The metric represented when display_type is kpi.')] = None
kpi_usage_unit: Annotated[str | None, Field(description='The usage unit represented when kpi_type is usage.')] = None
grid: Annotated[create_dashboard_widget_settings_grid.CreateDashboardWidgetSettingsGrid | None, Field(description="The widget's size and position in the dashboard's 12-column grid.")] = None
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
class CreateDashboardWidgetSettingsDisplayType(StrEnum):
table = 'table'
chart = 'chart'
kpi = 'kpi'
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field


class CreateDashboardWidgetSettingsGrid(BaseModel):
"""
The widget's size and position in the dashboard's 12-column grid.
"""
model_config = ConfigDict(
populate_by_name=True,
)
x: Annotated[int, Field(description='The zero-based horizontal position.', ge=0, le=11)]
y: Annotated[int, Field(description='The zero-based vertical position.')]
w: Annotated[int, Field(description='The widget width in grid columns.', ge=1, le=12)]
h: Annotated[int, Field(description='The widget height in grid rows.')]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class CreateDashboardWidgetSettingsKpiCalculation(StrEnum):
"""
The aggregation used when display_type is kpi.
"""
sum = 'sum'
average = 'average'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class CreateDashboardWidgetSettingsKpiType(StrEnum):
"""
The metric represented when display_type is kpi.
"""
cost = 'cost'
usage = 'usage'
count_ = 'count'
business_metric = 'business_metric'
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# generated by datamodel-codegen:
# filename: openapi_spec.json

from __future__ import annotations
from enum import StrEnum


class CreateDashboardWidgetWidgetableType(StrEnum):
"""
The widget type. Use free_text for a free text widget.
"""
free_text = 'free_text'
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ class CreateFinancialCommitmentReport(BaseModel):
date_interval: Annotated[create_financial_commitment_report_date_interval.CreateFinancialCommitmentReportDateInterval | None, Field(description="The date interval of the FinancialCommitmentReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_3_months'.")] = None
date_bucket: Annotated[create_financial_commitment_report_date_bucket.CreateFinancialCommitmentReportDateBucket | None, Field(description='The date bucket of the FinancialCommitmentReport.')] = None
on_demand_costs_scope: Annotated[create_financial_commitment_report_on_demand_costs_scope.CreateFinancialCommitmentReportOnDemandCostsScope | None, Field(description='The scope for the costs. Possible values: discountable, all.')] = None
groupings: Annotated[Sequence[create_financial_commitment_report_groupings.CreateFinancialCommitmentReportGroupings | create_financial_commitment_report_groupings1.CreateFinancialCommitmentReportGroupings] | None, Field(description='Grouping values for aggregating costs on the FinancialCommitmentReport. Group by up to 100 fields. Valid groupings: cost_type, commitment_type, commitment_id, service, resource_account_id, provider_account_id, region, cost_category, cost_sub_category, instance_type, tag:<label_name>.')] = None
groupings: Annotated[Sequence[create_financial_commitment_report_groupings.CreateFinancialCommitmentReportGroupings | create_financial_commitment_report_groupings1.CreateFinancialCommitmentReportGroupings] | None, Field(description='Grouping values for aggregating costs on the FinancialCommitmentReport. Group by up to 100 fields. Valid groupings: cost_type, provider, commitment_type, commitment_id, service, resource_account_id, provider_account_id, region, cost_category, cost_sub_category, instance_type, tag:<label_name>.')] = None
Loading