@vantage-sh/vantage-client 2.7.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3591,6 +3591,14 @@ interface components {
3591
3591
  * @enum {string}
3592
3592
  */
3593
3593
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
3594
+ /**
3595
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
3596
+ * @default unit_cost
3597
+ * @enum {string}
3598
+ */
3599
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
3600
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
3601
+ label?: string;
3594
3602
  /** @description Include only values with these labels in the CostReport. */
3595
3603
  label_filter?: string[];
3596
3604
  /**
@@ -3668,6 +3676,14 @@ interface components {
3668
3676
  * @enum {string}
3669
3677
  */
3670
3678
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
3679
+ /**
3680
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
3681
+ * @default unit_cost
3682
+ * @enum {string}
3683
+ */
3684
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
3685
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
3686
+ label?: string;
3671
3687
  /** @description Include only values with these labels in the CostReport. */
3672
3688
  label_filter?: string[];
3673
3689
  /**
@@ -3964,13 +3980,7 @@ interface components {
3964
3980
  saved_filter_tokens?: string[] | null;
3965
3981
  /** @description The tokens for the BusinessMetrics assigned to the CostReport, the unit scale, and label filter. */
3966
3982
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
3967
- /**
3968
- * @description The default forecast selection for the CostReport.
3969
- * @example {
3970
- * "kind": "baseline"
3971
- * }
3972
- */
3973
- default_forecast: Record<string, any>;
3983
+ default_forecast: components["schemas"]["DefaultForecast"];
3974
3984
  /** @description The filter applied to the CostReport. Additional documentation available at https://docs.vantage.sh/vql. */
3975
3985
  filter: string | null;
3976
3986
  /**
@@ -4011,12 +4021,13 @@ interface components {
4011
4021
  */
4012
4022
  unallocated?: boolean | null;
4013
4023
  /**
4014
- * @description Report will aggregate by cost or usage.
4024
+ * @description Report will aggregate by cost, usage, or count.
4015
4025
  * @default cost
4026
+ * @enum {string|null}
4016
4027
  */
4017
- aggregate_by?: string | null;
4028
+ aggregate_by?: "cost" | "usage" | "count" | null;
4018
4029
  /**
4019
- * @description Report will show previous period costs or usage comparison.
4030
+ * @description Report will show previous period cost, usage, or count comparison.
4020
4031
  * @default true
4021
4032
  */
4022
4033
  show_previous_period?: boolean | null;
@@ -4098,11 +4109,25 @@ interface components {
4098
4109
  * ]
4099
4110
  * }
4100
4111
  */
4101
- label_filters?: Record<string, any> | null;
4112
+ label_filters?: {
4113
+ [key: string]: string[];
4114
+ } | null;
4115
+ };
4116
+ DefaultForecast: {
4117
+ /**
4118
+ * @description The default forecast selection kind.
4119
+ * @enum {string}
4120
+ */
4121
+ kind: "baseline" | "report_forecast";
4122
+ /** @description The token for the report forecast selected as the default. */
4123
+ report_forecast_token?: string | null;
4102
4124
  };
4103
4125
  ChartSettings: {
4104
- /** @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'. */
4105
- y_axis_dimension: string;
4126
+ /**
4127
+ * @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'.
4128
+ * @enum {string}
4129
+ */
4130
+ y_axis_dimension: "cost" | "usage" | "count";
4106
4131
  /** @description The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']. */
4107
4132
  x_axis_dimension: string[];
4108
4133
  };
@@ -4162,6 +4187,14 @@ interface components {
4162
4187
  * @enum {string}
4163
4188
  */
4164
4189
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
4190
+ /**
4191
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
4192
+ * @default unit_cost
4193
+ * @enum {string}
4194
+ */
4195
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
4196
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
4197
+ label?: string;
4165
4198
  /** @description Include only values with these labels in the CostReport. */
4166
4199
  label_filter?: string[];
4167
4200
  /**
@@ -4215,12 +4248,13 @@ interface components {
4215
4248
  */
4216
4249
  unallocated?: boolean;
4217
4250
  /**
4218
- * @description Report will aggregate by cost or usage.
4251
+ * @description Report will aggregate by cost, usage, or count.
4219
4252
  * @default cost
4253
+ * @enum {string}
4220
4254
  */
4221
- aggregate_by?: string;
4255
+ aggregate_by?: "cost" | "usage" | "count";
4222
4256
  /**
4223
- * @description Report will show previous period costs or usage comparison.
4257
+ * @description Report will show previous period cost, usage, or count comparison.
4224
4258
  * @default true
4225
4259
  */
4226
4260
  show_previous_period?: boolean;
@@ -4259,8 +4293,11 @@ interface components {
4259
4293
  chart_settings?: {
4260
4294
  /** @description The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']. */
4261
4295
  x_axis_dimension?: string[];
4262
- /** @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'. */
4263
- y_axis_dimension?: string;
4296
+ /**
4297
+ * @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'.
4298
+ * @enum {string}
4299
+ */
4300
+ y_axis_dimension?: "cost" | "usage" | "count";
4264
4301
  };
4265
4302
  };
4266
4303
  /** @description Update a CostReport. */
@@ -4283,6 +4320,14 @@ interface components {
4283
4320
  * @enum {string}
4284
4321
  */
4285
4322
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
4323
+ /**
4324
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
4325
+ * @default unit_cost
4326
+ * @enum {string}
4327
+ */
4328
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
4329
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
4330
+ label?: string;
4286
4331
  /** @description Include only values with these labels in the CostReport. */
4287
4332
  label_filter?: string[];
4288
4333
  /**
@@ -4327,9 +4372,12 @@ interface components {
4327
4372
  amortize?: boolean | null;
4328
4373
  /** @description Report will show unallocated costs. */
4329
4374
  unallocated?: boolean | null;
4330
- /** @description Report will aggregate by cost or usage. */
4331
- aggregate_by?: string | null;
4332
- /** @description Report will show previous period costs or usage comparison. */
4375
+ /**
4376
+ * @description Report will aggregate by cost, usage, or count.
4377
+ * @enum {string|null}
4378
+ */
4379
+ aggregate_by?: "cost" | "usage" | "count" | null;
4380
+ /** @description Report will show previous period cost, usage, or count comparison. */
4333
4381
  show_previous_period?: boolean | null;
4334
4382
  /** @description Report will restrict date ranges to completed periods only. */
4335
4383
  complete_period?: boolean;
@@ -4338,8 +4386,11 @@ interface components {
4338
4386
  chart_settings?: {
4339
4387
  /** @description The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']. */
4340
4388
  x_axis_dimension?: string[];
4341
- /** @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'. */
4342
- y_axis_dimension?: string;
4389
+ /**
4390
+ * @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'.
4391
+ * @enum {string}
4392
+ */
4393
+ y_axis_dimension?: "cost" | "usage" | "count";
4343
4394
  };
4344
4395
  /** @description The previous period start date of the CostReport. ISO 8601 Formatted. */
4345
4396
  previous_period_start_date?: string;
@@ -4423,12 +4474,13 @@ interface components {
4423
4474
  */
4424
4475
  unallocated?: boolean;
4425
4476
  /**
4426
- * @description Results will aggregate by cost or usage.
4477
+ * @description Results will aggregate by cost, usage, or count.
4427
4478
  * @default cost
4479
+ * @enum {string}
4428
4480
  */
4429
- aggregate_by?: string;
4481
+ aggregate_by?: "cost" | "usage" | "count";
4430
4482
  /**
4431
- * @description Results will show previous period costs or usage comparison.
4483
+ * @description Results will show previous period cost, usage, or count comparison.
4432
4484
  * @default true
4433
4485
  */
4434
4486
  show_previous_period?: boolean;
@@ -4440,6 +4492,13 @@ interface components {
4440
4492
  total_cost: components["schemas"]["CostPartial"];
4441
4493
  /** @description The sum of all usage for the CostReport for the requested period, rounded to 2 decimal places, grouped by usage unit. */
4442
4494
  total_usage?: components["schemas"]["UsagePartial"][];
4495
+ /**
4496
+ * Format: int64
4497
+ * @description The sum of the date-binned counts. Present when settings.aggregate_by is 'count'.
4498
+ */
4499
+ total_count?: number | null;
4500
+ /** @description Distinct Group By permutation counts for the full requested period, unaffected by page and limit. Bins without cost are omitted. Present when settings.aggregate_by is 'count'. */
4501
+ counts?: components["schemas"]["CostCount"][];
4443
4502
  costs: components["schemas"]["Cost"][];
4444
4503
  };
4445
4504
  CostPartial: {
@@ -4466,6 +4525,19 @@ interface components {
4466
4525
  */
4467
4526
  unit: string;
4468
4527
  };
4528
+ CostCount: {
4529
+ /**
4530
+ * @description The date bin for the count. ISO 8601 Formatted.
4531
+ * @example 2023-09-05+00:00
4532
+ */
4533
+ accrued_at: string;
4534
+ /**
4535
+ * Format: int64
4536
+ * @description The number of distinct Group By permutations carrying cost in the date bin.
4537
+ * @example 2
4538
+ */
4539
+ count: number;
4540
+ };
4469
4541
  /** @description Cost model */
4470
4542
  Cost: {
4471
4543
  links?: components["schemas"]["Links"];
@@ -9121,6 +9193,8 @@ interface operations {
9121
9193
  start_date?: string;
9122
9194
  /** @description Return values matching any exact label value. For multi-label metrics, matches values under any label key. */
9123
9195
  label_values?: string[];
9196
+ /** @description Sum values by UTC day or month while preserving labels. When omitted, values are returned without aggregation. */
9197
+ date_bin?: "day" | "month";
9124
9198
  };
9125
9199
  header?: never;
9126
9200
  path: {
@@ -9156,6 +9230,15 @@ interface operations {
9156
9230
  "application/json": components["schemas"]["BusinessMetricValues"];
9157
9231
  };
9158
9232
  };
9233
+ /** @description BadRequest */
9234
+ 400: {
9235
+ headers: {
9236
+ [name: string]: unknown;
9237
+ };
9238
+ content: {
9239
+ "application/json": components["schemas"]["Errors"];
9240
+ };
9241
+ };
9159
9242
  /** @description NotFound */
9160
9243
  404: {
9161
9244
  headers: {
@@ -10523,9 +10606,9 @@ interface operations {
10523
10606
  "settings[amortize]"?: boolean;
10524
10607
  /** @description Results will show unallocated costs. */
10525
10608
  "settings[unallocated]"?: boolean;
10526
- /** @description Results will aggregate by cost or usage. */
10527
- "settings[aggregate_by]"?: string;
10528
- /** @description Results will show previous period costs or usage comparison. */
10609
+ /** @description Results will aggregate by cost, usage, or count. */
10610
+ "settings[aggregate_by]"?: "cost" | "usage" | "count";
10611
+ /** @description Results will show previous period cost, usage, or count comparison. */
10529
10612
  "settings[show_previous_period]"?: boolean;
10530
10613
  };
10531
10614
  header?: never;
@@ -19852,7 +19935,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19852
19935
  folder_token?: string | null;
19853
19936
  saved_filter_tokens?: string[] | null;
19854
19937
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19855
- default_forecast: Record<string, any>;
19938
+ default_forecast: components["schemas"]["DefaultForecast"];
19856
19939
  filter: string | null;
19857
19940
  groupings?: string | null;
19858
19941
  settings?: {
@@ -19862,7 +19945,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19862
19945
  include_tax?: boolean | null;
19863
19946
  amortize?: boolean | null;
19864
19947
  unallocated?: boolean | null;
19865
- aggregate_by?: string | null;
19948
+ aggregate_by?: "cost" | "usage" | "count" | null;
19866
19949
  show_previous_period?: boolean | null;
19867
19950
  complete_period?: boolean | null;
19868
19951
  };
@@ -19882,7 +19965,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19882
19965
  folder_token?: string | null;
19883
19966
  saved_filter_tokens?: string[] | null;
19884
19967
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19885
- default_forecast: Record<string, any>;
19968
+ default_forecast: components["schemas"]["DefaultForecast"];
19886
19969
  filter: string | null;
19887
19970
  groupings?: string | null;
19888
19971
  settings?: {
@@ -19892,7 +19975,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19892
19975
  include_tax?: boolean | null;
19893
19976
  amortize?: boolean | null;
19894
19977
  unallocated?: boolean | null;
19895
- aggregate_by?: string | null;
19978
+ aggregate_by?: "cost" | "usage" | "count" | null;
19896
19979
  show_previous_period?: boolean | null;
19897
19980
  complete_period?: boolean | null;
19898
19981
  };
@@ -19916,7 +19999,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19916
19999
  folder_token?: string | null;
19917
20000
  saved_filter_tokens?: string[] | null;
19918
20001
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19919
- default_forecast: Record<string, any>;
20002
+ default_forecast: components["schemas"]["DefaultForecast"];
19920
20003
  filter: string | null;
19921
20004
  groupings?: string | null;
19922
20005
  settings?: {
@@ -19926,7 +20009,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19926
20009
  include_tax?: boolean | null;
19927
20010
  amortize?: boolean | null;
19928
20011
  unallocated?: boolean | null;
19929
- aggregate_by?: string | null;
20012
+ aggregate_by?: "cost" | "usage" | "count" | null;
19930
20013
  show_previous_period?: boolean | null;
19931
20014
  complete_period?: boolean | null;
19932
20015
  };
@@ -19946,7 +20029,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19946
20029
  folder_token?: string | null;
19947
20030
  saved_filter_tokens?: string[] | null;
19948
20031
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19949
- default_forecast: Record<string, any>;
20032
+ default_forecast: components["schemas"]["DefaultForecast"];
19950
20033
  filter: string | null;
19951
20034
  groupings?: string | null;
19952
20035
  settings?: {
@@ -19956,7 +20039,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19956
20039
  include_tax?: boolean | null;
19957
20040
  amortize?: boolean | null;
19958
20041
  unallocated?: boolean | null;
19959
- aggregate_by?: string | null;
20042
+ aggregate_by?: "cost" | "usage" | "count" | null;
19960
20043
  show_previous_period?: boolean | null;
19961
20044
  complete_period?: boolean | null;
19962
20045
  };
@@ -19980,7 +20063,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19980
20063
  folder_token?: string | null;
19981
20064
  saved_filter_tokens?: string[] | null;
19982
20065
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19983
- default_forecast: Record<string, any>;
20066
+ default_forecast: components["schemas"]["DefaultForecast"];
19984
20067
  filter: string | null;
19985
20068
  groupings?: string | null;
19986
20069
  settings?: {
@@ -19990,7 +20073,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19990
20073
  include_tax?: boolean | null;
19991
20074
  amortize?: boolean | null;
19992
20075
  unallocated?: boolean | null;
19993
- aggregate_by?: string | null;
20076
+ aggregate_by?: "cost" | "usage" | "count" | null;
19994
20077
  show_previous_period?: boolean | null;
19995
20078
  complete_period?: boolean | null;
19996
20079
  };
@@ -20010,7 +20093,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
20010
20093
  folder_token?: string | null;
20011
20094
  saved_filter_tokens?: string[] | null;
20012
20095
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
20013
- default_forecast: Record<string, any>;
20096
+ default_forecast: components["schemas"]["DefaultForecast"];
20014
20097
  filter: string | null;
20015
20098
  groupings?: string | null;
20016
20099
  settings?: {
@@ -20020,7 +20103,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
20020
20103
  include_tax?: boolean | null;
20021
20104
  amortize?: boolean | null;
20022
20105
  unallocated?: boolean | null;
20023
- aggregate_by?: string | null;
20106
+ aggregate_by?: "cost" | "usage" | "count" | null;
20024
20107
  show_previous_period?: boolean | null;
20025
20108
  complete_period?: boolean | null;
20026
20109
  };
@@ -20062,6 +20145,8 @@ declare class CostsApi<NeverThrow extends boolean> {
20062
20145
  links?: components["schemas"]["Links"];
20063
20146
  total_cost: components["schemas"]["CostPartial"];
20064
20147
  total_usage?: components["schemas"]["UsagePartial"][];
20148
+ total_count?: number | null;
20149
+ counts?: components["schemas"]["CostCount"][];
20065
20150
  costs: components["schemas"]["Cost"][];
20066
20151
  }, "total_usage"> & {
20067
20152
  total_usage?: {
@@ -20071,6 +20156,8 @@ declare class CostsApi<NeverThrow extends boolean> {
20071
20156
  links?: components["schemas"]["Links"];
20072
20157
  total_cost: components["schemas"]["CostPartial"];
20073
20158
  total_usage?: components["schemas"]["UsagePartial"][];
20159
+ total_count?: number | null;
20160
+ counts?: components["schemas"]["CostCount"][];
20074
20161
  costs: components["schemas"]["Cost"][];
20075
20162
  }, "total_usage"> & {
20076
20163
  total_usage?: {
package/dist/index.d.ts CHANGED
@@ -3591,6 +3591,14 @@ interface components {
3591
3591
  * @enum {string}
3592
3592
  */
3593
3593
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
3594
+ /**
3595
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
3596
+ * @default unit_cost
3597
+ * @enum {string}
3598
+ */
3599
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
3600
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
3601
+ label?: string;
3594
3602
  /** @description Include only values with these labels in the CostReport. */
3595
3603
  label_filter?: string[];
3596
3604
  /**
@@ -3668,6 +3676,14 @@ interface components {
3668
3676
  * @enum {string}
3669
3677
  */
3670
3678
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
3679
+ /**
3680
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
3681
+ * @default unit_cost
3682
+ * @enum {string}
3683
+ */
3684
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
3685
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
3686
+ label?: string;
3671
3687
  /** @description Include only values with these labels in the CostReport. */
3672
3688
  label_filter?: string[];
3673
3689
  /**
@@ -3964,13 +3980,7 @@ interface components {
3964
3980
  saved_filter_tokens?: string[] | null;
3965
3981
  /** @description The tokens for the BusinessMetrics assigned to the CostReport, the unit scale, and label filter. */
3966
3982
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
3967
- /**
3968
- * @description The default forecast selection for the CostReport.
3969
- * @example {
3970
- * "kind": "baseline"
3971
- * }
3972
- */
3973
- default_forecast: Record<string, any>;
3983
+ default_forecast: components["schemas"]["DefaultForecast"];
3974
3984
  /** @description The filter applied to the CostReport. Additional documentation available at https://docs.vantage.sh/vql. */
3975
3985
  filter: string | null;
3976
3986
  /**
@@ -4011,12 +4021,13 @@ interface components {
4011
4021
  */
4012
4022
  unallocated?: boolean | null;
4013
4023
  /**
4014
- * @description Report will aggregate by cost or usage.
4024
+ * @description Report will aggregate by cost, usage, or count.
4015
4025
  * @default cost
4026
+ * @enum {string|null}
4016
4027
  */
4017
- aggregate_by?: string | null;
4028
+ aggregate_by?: "cost" | "usage" | "count" | null;
4018
4029
  /**
4019
- * @description Report will show previous period costs or usage comparison.
4030
+ * @description Report will show previous period cost, usage, or count comparison.
4020
4031
  * @default true
4021
4032
  */
4022
4033
  show_previous_period?: boolean | null;
@@ -4098,11 +4109,25 @@ interface components {
4098
4109
  * ]
4099
4110
  * }
4100
4111
  */
4101
- label_filters?: Record<string, any> | null;
4112
+ label_filters?: {
4113
+ [key: string]: string[];
4114
+ } | null;
4115
+ };
4116
+ DefaultForecast: {
4117
+ /**
4118
+ * @description The default forecast selection kind.
4119
+ * @enum {string}
4120
+ */
4121
+ kind: "baseline" | "report_forecast";
4122
+ /** @description The token for the report forecast selected as the default. */
4123
+ report_forecast_token?: string | null;
4102
4124
  };
4103
4125
  ChartSettings: {
4104
- /** @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'. */
4105
- y_axis_dimension: string;
4126
+ /**
4127
+ * @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'.
4128
+ * @enum {string}
4129
+ */
4130
+ y_axis_dimension: "cost" | "usage" | "count";
4106
4131
  /** @description The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']. */
4107
4132
  x_axis_dimension: string[];
4108
4133
  };
@@ -4162,6 +4187,14 @@ interface components {
4162
4187
  * @enum {string}
4163
4188
  */
4164
4189
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
4190
+ /**
4191
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
4192
+ * @default unit_cost
4193
+ * @enum {string}
4194
+ */
4195
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
4196
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
4197
+ label?: string;
4165
4198
  /** @description Include only values with these labels in the CostReport. */
4166
4199
  label_filter?: string[];
4167
4200
  /**
@@ -4215,12 +4248,13 @@ interface components {
4215
4248
  */
4216
4249
  unallocated?: boolean;
4217
4250
  /**
4218
- * @description Report will aggregate by cost or usage.
4251
+ * @description Report will aggregate by cost, usage, or count.
4219
4252
  * @default cost
4253
+ * @enum {string}
4220
4254
  */
4221
- aggregate_by?: string;
4255
+ aggregate_by?: "cost" | "usage" | "count";
4222
4256
  /**
4223
- * @description Report will show previous period costs or usage comparison.
4257
+ * @description Report will show previous period cost, usage, or count comparison.
4224
4258
  * @default true
4225
4259
  */
4226
4260
  show_previous_period?: boolean;
@@ -4259,8 +4293,11 @@ interface components {
4259
4293
  chart_settings?: {
4260
4294
  /** @description The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']. */
4261
4295
  x_axis_dimension?: string[];
4262
- /** @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'. */
4263
- y_axis_dimension?: string;
4296
+ /**
4297
+ * @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'.
4298
+ * @enum {string}
4299
+ */
4300
+ y_axis_dimension?: "cost" | "usage" | "count";
4264
4301
  };
4265
4302
  };
4266
4303
  /** @description Update a CostReport. */
@@ -4283,6 +4320,14 @@ interface components {
4283
4320
  * @enum {string}
4284
4321
  */
4285
4322
  unit_scale?: "per_unit" | "per_hundred" | "per_thousand" | "per_million" | "per_billion";
4323
+ /**
4324
+ * @description The calculation type applied when this BusinessMetric is used in the CostReport.
4325
+ * @default unit_cost
4326
+ * @enum {string}
4327
+ */
4328
+ calculation_type?: "unit_cost" | "gross_margin" | "usage_unit_cost" | "raw_business_metric";
4329
+ /** @description Optional custom display name for this BusinessMetric on the CostReport. When omitted, a default is derived from the calculation type. */
4330
+ label?: string;
4286
4331
  /** @description Include only values with these labels in the CostReport. */
4287
4332
  label_filter?: string[];
4288
4333
  /**
@@ -4327,9 +4372,12 @@ interface components {
4327
4372
  amortize?: boolean | null;
4328
4373
  /** @description Report will show unallocated costs. */
4329
4374
  unallocated?: boolean | null;
4330
- /** @description Report will aggregate by cost or usage. */
4331
- aggregate_by?: string | null;
4332
- /** @description Report will show previous period costs or usage comparison. */
4375
+ /**
4376
+ * @description Report will aggregate by cost, usage, or count.
4377
+ * @enum {string|null}
4378
+ */
4379
+ aggregate_by?: "cost" | "usage" | "count" | null;
4380
+ /** @description Report will show previous period cost, usage, or count comparison. */
4333
4381
  show_previous_period?: boolean | null;
4334
4382
  /** @description Report will restrict date ranges to completed periods only. */
4335
4383
  complete_period?: boolean;
@@ -4338,8 +4386,11 @@ interface components {
4338
4386
  chart_settings?: {
4339
4387
  /** @description The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']. */
4340
4388
  x_axis_dimension?: string[];
4341
- /** @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'. */
4342
- y_axis_dimension?: string;
4389
+ /**
4390
+ * @description The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage', 'count'. Defaults to 'cost'.
4391
+ * @enum {string}
4392
+ */
4393
+ y_axis_dimension?: "cost" | "usage" | "count";
4343
4394
  };
4344
4395
  /** @description The previous period start date of the CostReport. ISO 8601 Formatted. */
4345
4396
  previous_period_start_date?: string;
@@ -4423,12 +4474,13 @@ interface components {
4423
4474
  */
4424
4475
  unallocated?: boolean;
4425
4476
  /**
4426
- * @description Results will aggregate by cost or usage.
4477
+ * @description Results will aggregate by cost, usage, or count.
4427
4478
  * @default cost
4479
+ * @enum {string}
4428
4480
  */
4429
- aggregate_by?: string;
4481
+ aggregate_by?: "cost" | "usage" | "count";
4430
4482
  /**
4431
- * @description Results will show previous period costs or usage comparison.
4483
+ * @description Results will show previous period cost, usage, or count comparison.
4432
4484
  * @default true
4433
4485
  */
4434
4486
  show_previous_period?: boolean;
@@ -4440,6 +4492,13 @@ interface components {
4440
4492
  total_cost: components["schemas"]["CostPartial"];
4441
4493
  /** @description The sum of all usage for the CostReport for the requested period, rounded to 2 decimal places, grouped by usage unit. */
4442
4494
  total_usage?: components["schemas"]["UsagePartial"][];
4495
+ /**
4496
+ * Format: int64
4497
+ * @description The sum of the date-binned counts. Present when settings.aggregate_by is 'count'.
4498
+ */
4499
+ total_count?: number | null;
4500
+ /** @description Distinct Group By permutation counts for the full requested period, unaffected by page and limit. Bins without cost are omitted. Present when settings.aggregate_by is 'count'. */
4501
+ counts?: components["schemas"]["CostCount"][];
4443
4502
  costs: components["schemas"]["Cost"][];
4444
4503
  };
4445
4504
  CostPartial: {
@@ -4466,6 +4525,19 @@ interface components {
4466
4525
  */
4467
4526
  unit: string;
4468
4527
  };
4528
+ CostCount: {
4529
+ /**
4530
+ * @description The date bin for the count. ISO 8601 Formatted.
4531
+ * @example 2023-09-05+00:00
4532
+ */
4533
+ accrued_at: string;
4534
+ /**
4535
+ * Format: int64
4536
+ * @description The number of distinct Group By permutations carrying cost in the date bin.
4537
+ * @example 2
4538
+ */
4539
+ count: number;
4540
+ };
4469
4541
  /** @description Cost model */
4470
4542
  Cost: {
4471
4543
  links?: components["schemas"]["Links"];
@@ -9121,6 +9193,8 @@ interface operations {
9121
9193
  start_date?: string;
9122
9194
  /** @description Return values matching any exact label value. For multi-label metrics, matches values under any label key. */
9123
9195
  label_values?: string[];
9196
+ /** @description Sum values by UTC day or month while preserving labels. When omitted, values are returned without aggregation. */
9197
+ date_bin?: "day" | "month";
9124
9198
  };
9125
9199
  header?: never;
9126
9200
  path: {
@@ -9156,6 +9230,15 @@ interface operations {
9156
9230
  "application/json": components["schemas"]["BusinessMetricValues"];
9157
9231
  };
9158
9232
  };
9233
+ /** @description BadRequest */
9234
+ 400: {
9235
+ headers: {
9236
+ [name: string]: unknown;
9237
+ };
9238
+ content: {
9239
+ "application/json": components["schemas"]["Errors"];
9240
+ };
9241
+ };
9159
9242
  /** @description NotFound */
9160
9243
  404: {
9161
9244
  headers: {
@@ -10523,9 +10606,9 @@ interface operations {
10523
10606
  "settings[amortize]"?: boolean;
10524
10607
  /** @description Results will show unallocated costs. */
10525
10608
  "settings[unallocated]"?: boolean;
10526
- /** @description Results will aggregate by cost or usage. */
10527
- "settings[aggregate_by]"?: string;
10528
- /** @description Results will show previous period costs or usage comparison. */
10609
+ /** @description Results will aggregate by cost, usage, or count. */
10610
+ "settings[aggregate_by]"?: "cost" | "usage" | "count";
10611
+ /** @description Results will show previous period cost, usage, or count comparison. */
10529
10612
  "settings[show_previous_period]"?: boolean;
10530
10613
  };
10531
10614
  header?: never;
@@ -19852,7 +19935,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19852
19935
  folder_token?: string | null;
19853
19936
  saved_filter_tokens?: string[] | null;
19854
19937
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19855
- default_forecast: Record<string, any>;
19938
+ default_forecast: components["schemas"]["DefaultForecast"];
19856
19939
  filter: string | null;
19857
19940
  groupings?: string | null;
19858
19941
  settings?: {
@@ -19862,7 +19945,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19862
19945
  include_tax?: boolean | null;
19863
19946
  amortize?: boolean | null;
19864
19947
  unallocated?: boolean | null;
19865
- aggregate_by?: string | null;
19948
+ aggregate_by?: "cost" | "usage" | "count" | null;
19866
19949
  show_previous_period?: boolean | null;
19867
19950
  complete_period?: boolean | null;
19868
19951
  };
@@ -19882,7 +19965,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19882
19965
  folder_token?: string | null;
19883
19966
  saved_filter_tokens?: string[] | null;
19884
19967
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19885
- default_forecast: Record<string, any>;
19968
+ default_forecast: components["schemas"]["DefaultForecast"];
19886
19969
  filter: string | null;
19887
19970
  groupings?: string | null;
19888
19971
  settings?: {
@@ -19892,7 +19975,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19892
19975
  include_tax?: boolean | null;
19893
19976
  amortize?: boolean | null;
19894
19977
  unallocated?: boolean | null;
19895
- aggregate_by?: string | null;
19978
+ aggregate_by?: "cost" | "usage" | "count" | null;
19896
19979
  show_previous_period?: boolean | null;
19897
19980
  complete_period?: boolean | null;
19898
19981
  };
@@ -19916,7 +19999,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19916
19999
  folder_token?: string | null;
19917
20000
  saved_filter_tokens?: string[] | null;
19918
20001
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19919
- default_forecast: Record<string, any>;
20002
+ default_forecast: components["schemas"]["DefaultForecast"];
19920
20003
  filter: string | null;
19921
20004
  groupings?: string | null;
19922
20005
  settings?: {
@@ -19926,7 +20009,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19926
20009
  include_tax?: boolean | null;
19927
20010
  amortize?: boolean | null;
19928
20011
  unallocated?: boolean | null;
19929
- aggregate_by?: string | null;
20012
+ aggregate_by?: "cost" | "usage" | "count" | null;
19930
20013
  show_previous_period?: boolean | null;
19931
20014
  complete_period?: boolean | null;
19932
20015
  };
@@ -19946,7 +20029,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19946
20029
  folder_token?: string | null;
19947
20030
  saved_filter_tokens?: string[] | null;
19948
20031
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19949
- default_forecast: Record<string, any>;
20032
+ default_forecast: components["schemas"]["DefaultForecast"];
19950
20033
  filter: string | null;
19951
20034
  groupings?: string | null;
19952
20035
  settings?: {
@@ -19956,7 +20039,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19956
20039
  include_tax?: boolean | null;
19957
20040
  amortize?: boolean | null;
19958
20041
  unallocated?: boolean | null;
19959
- aggregate_by?: string | null;
20042
+ aggregate_by?: "cost" | "usage" | "count" | null;
19960
20043
  show_previous_period?: boolean | null;
19961
20044
  complete_period?: boolean | null;
19962
20045
  };
@@ -19980,7 +20063,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19980
20063
  folder_token?: string | null;
19981
20064
  saved_filter_tokens?: string[] | null;
19982
20065
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
19983
- default_forecast: Record<string, any>;
20066
+ default_forecast: components["schemas"]["DefaultForecast"];
19984
20067
  filter: string | null;
19985
20068
  groupings?: string | null;
19986
20069
  settings?: {
@@ -19990,7 +20073,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
19990
20073
  include_tax?: boolean | null;
19991
20074
  amortize?: boolean | null;
19992
20075
  unallocated?: boolean | null;
19993
- aggregate_by?: string | null;
20076
+ aggregate_by?: "cost" | "usage" | "count" | null;
19994
20077
  show_previous_period?: boolean | null;
19995
20078
  complete_period?: boolean | null;
19996
20079
  };
@@ -20010,7 +20093,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
20010
20093
  folder_token?: string | null;
20011
20094
  saved_filter_tokens?: string[] | null;
20012
20095
  business_metric_tokens_with_metadata: components["schemas"]["AttachedBusinessMetricForCostReport"][];
20013
- default_forecast: Record<string, any>;
20096
+ default_forecast: components["schemas"]["DefaultForecast"];
20014
20097
  filter: string | null;
20015
20098
  groupings?: string | null;
20016
20099
  settings?: {
@@ -20020,7 +20103,7 @@ declare class CostReportsApi<NeverThrow extends boolean> {
20020
20103
  include_tax?: boolean | null;
20021
20104
  amortize?: boolean | null;
20022
20105
  unallocated?: boolean | null;
20023
- aggregate_by?: string | null;
20106
+ aggregate_by?: "cost" | "usage" | "count" | null;
20024
20107
  show_previous_period?: boolean | null;
20025
20108
  complete_period?: boolean | null;
20026
20109
  };
@@ -20062,6 +20145,8 @@ declare class CostsApi<NeverThrow extends boolean> {
20062
20145
  links?: components["schemas"]["Links"];
20063
20146
  total_cost: components["schemas"]["CostPartial"];
20064
20147
  total_usage?: components["schemas"]["UsagePartial"][];
20148
+ total_count?: number | null;
20149
+ counts?: components["schemas"]["CostCount"][];
20065
20150
  costs: components["schemas"]["Cost"][];
20066
20151
  }, "total_usage"> & {
20067
20152
  total_usage?: {
@@ -20071,6 +20156,8 @@ declare class CostsApi<NeverThrow extends boolean> {
20071
20156
  links?: components["schemas"]["Links"];
20072
20157
  total_cost: components["schemas"]["CostPartial"];
20073
20158
  total_usage?: components["schemas"]["UsagePartial"][];
20159
+ total_count?: number | null;
20160
+ counts?: components["schemas"]["CostCount"][];
20074
20161
  costs: components["schemas"]["Cost"][];
20075
20162
  }, "total_usage"> & {
20076
20163
  total_usage?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vantage-sh/vantage-client",
3
- "version": "2.7.0",
3
+ "version": "2.10.0",
4
4
  "description": "The Vantage Client SDK for TypeScript and JavaScript applications.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",