infrawrench-sdk 1.68.0 → 1.69.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e730f32935d656b33da8b472498c2da67181b07b510dfb6f80f46f6e1e23e1a
4
- data.tar.gz: 335c07095699c735df7ecfdd6d87f7acebaf5b41e47022765f048bffd8dc1060
3
+ metadata.gz: 46cb020003e6f0ccd4c0df6c8eaa6941ace890215f3818597b2d3a188d151f7c
4
+ data.tar.gz: e392a0ed1b80a61ee7f0dc476c785ad97fc69ee6d58160f79ae402579fd808ee
5
5
  SHA512:
6
- metadata.gz: ad0d25573ec5f7a5315f58256a2984518991b6ebdeaa8f6417d7a6dcaadba1660c26d8f0aa98c79f7cd1d0d3eb5727885e65bc5d6a243a5b5bd6e9149c31ae8a
7
- data.tar.gz: c963363c2702cc417615a9aee8d7de9f5db30c9b1dd8a3359ce137de9cbe8be30cda0ec2e629c56a57f018d9962dbf7784a461b0eb6a6bc0aa01128a24349511
6
+ metadata.gz: dda0c71d25b1d8a63605f0bda392441bfaf6bf7037ea86bc241c2e445512612004db1f07cb6d8f64f04c34d7f23dfcefc2fb6b0f3f2585b311df1bd12a872c42
7
+ data.tar.gz: f0d91cee4b944347d3899857752f0a75d25927924e6bd0fddf99bf9611b0a94d031bad2f8a67400ddf4cb364cdd0fb78e0ad9c8bd33cd222da4e44af96256768
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # infrawrench-sdk
2
2
 
3
- Generated Ruby client for the Infrawrench API (API version `1.68.0`).
3
+ Generated Ruby client for the Infrawrench API (API version `1.69.0`).
4
4
 
5
5
  **Do not edit this gem by hand** — it is regenerated from `openapi.json` and is
6
6
  not checked into the repository. Run
@@ -41,7 +41,7 @@ Every method takes an optional trailing `request_options:` hash (`:headers`,
41
41
  Responses are the plain `Hash`/`Array` that `JSON.parse` returns, with String
42
42
  keys spelled exactly as the wire spells them. There are no model classes — see
43
43
  [`sig/infrawrench/sdk.rbs`](./sig/infrawrench/sdk.rbs) for the shape of every one of the
44
- 892 schemas, as RBS type aliases that steep and TypeProf can read.
44
+ 900 schemas, as RBS type aliases that steep and TypeProf can read.
45
45
 
46
46
  Non-2xx responses raise `Infrawrench::ApiError`, which carries `#status`,
47
47
  the parsed `#body`, and the machine-readable `#code` when the API sends one —
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -17,8 +17,8 @@ require_relative "lib/infrawrench/version"
17
17
  Gem::Specification.new do |spec|
18
18
  spec.name = "infrawrench-sdk"
19
19
  spec.version = Infrawrench::VERSION
20
- spec.summary = "Generated Ruby client for the Infrawrench API (v1.68.0)."
21
- spec.description = "Generated Ruby client for the Infrawrench API (v1.68.0). Covers the published API surface only — operations marked x-internal in the spec are not generated. No runtime dependencies."
20
+ spec.summary = "Generated Ruby client for the Infrawrench API (v1.69.0)."
21
+ spec.description = "Generated Ruby client for the Infrawrench API (v1.69.0). Covers the published API surface only — operations marked x-internal in the spec are not generated. No runtime dependencies."
22
22
  spec.authors = ["Infrawrench LLC", "Astrid Gealer"]
23
23
  spec.email = ["astrid@infrawrench.com"]
24
24
  spec.homepage = "https://infrawrench.com/docs/team-and-billing/client-sdks"
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -3673,6 +3673,31 @@ module Infrawrench
3673
3673
  )
3674
3674
  end
3675
3675
 
3676
+ # List a metric's labels
3677
+ #
3678
+ # The label keys the metric's values carry, each with its distinct values
3679
+ # (at most 500) and its cost mapping. A mapped label nobody has reported yet
3680
+ # is listed with no values.
3681
+ #
3682
+ # GET /api/org/{orgId}/business-metrics/{id}/labels
3683
+ #
3684
+ # Raises on 404: Not found
3685
+ #
3686
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
3687
+ # constructed with.
3688
+ # @param id [String] Metric id or key
3689
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
3690
+ # @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
3691
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
3692
+ def labels(id:, org_id: nil, request_options: nil)
3693
+ @transport.request(
3694
+ http_method: "GET",
3695
+ path: "/api/org/{orgId}/business-metrics/{id}/labels",
3696
+ path_params: { "orgId" => org_id, "id" => id },
3697
+ request_options: request_options
3698
+ )
3699
+ end
3700
+
3676
3701
  # Query unit costs or margin
3677
3702
  #
3678
3703
  # Divide spend by the metric, bucketed as asked. Three properties of the
@@ -3687,9 +3712,11 @@ module Infrawrench
3687
3712
  # - **Currencies are never merged.** Spend in a currency with no stated rate
3688
3713
  # keeps its own series rather than being dropped or added to another.
3689
3714
  #
3690
- # There is no `groupBy`: a per-group ratio would need a per-group
3691
- # denominator, and dividing each service's spend by the whole customer count
3692
- # produces numbers that do not sum to the real one.
3715
+ # There is no spend `groupBy`: a per-group ratio needs a per-group
3716
+ # denominator. Split by a metric label with `groupByLabel` instead; in a
3717
+ # ratio mode the label must be mapped to the cost dimension its values name
3718
+ # (`labelMappings` on the metric), so each label value's spend is divided by
3719
+ # its own volume.
3693
3720
  #
3694
3721
  # _Requires permission: `costs:read`._
3695
3722
  #
@@ -3750,6 +3777,57 @@ module Infrawrench
3750
3777
  request_options: request_options
3751
3778
  )
3752
3779
  end
3780
+
3781
+ # Query cost per usage unit
3782
+ #
3783
+ # Spend divided by the usage quantity providers report in one `usageUnit`,
3784
+ # with no business metric involved. Both halves come from the same cost rows
3785
+ # (those reported in that unit), so the numerator is exactly the spend that
3786
+ # bought the denominator. A bucket with no usage is a gap (`no_usage`),
3787
+ # never 0. Labels do not apply.
3788
+ #
3789
+ # POST /api/org/{orgId}/business-metrics/usage-unit-costs
3790
+ #
3791
+ # Raises on 400: Bad request
3792
+ #
3793
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
3794
+ # constructed with.
3795
+ # @param body [Hash] Request body, shaped as `UnitCostQueryRequest`.
3796
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
3797
+ # @return [Hash] Parsed JSON, shaped as `UnitCostQueryResponse` — see
3798
+ # `sig/infrawrench/sdk.rbs`.
3799
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
3800
+ def usage_unit_costs(body:, org_id: nil, request_options: nil)
3801
+ @transport.request(
3802
+ http_method: "POST",
3803
+ path: "/api/org/{orgId}/business-metrics/usage-unit-costs",
3804
+ path_params: { "orgId" => org_id },
3805
+ body: body,
3806
+ request_options: request_options
3807
+ )
3808
+ end
3809
+
3810
+ # List usage units
3811
+ #
3812
+ # The provider usage units the organization's cost rows carry over the last
3813
+ # 90 days, most spend first, with a few of the services reporting each.
3814
+ # Backs the per-usage-unit picker.
3815
+ #
3816
+ # GET /api/org/{orgId}/business-metrics/usage-units
3817
+ #
3818
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
3819
+ # constructed with.
3820
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
3821
+ # @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
3822
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
3823
+ def usage_units(org_id: nil, request_options: nil)
3824
+ @transport.request(
3825
+ http_method: "GET",
3826
+ path: "/api/org/{orgId}/business-metrics/usage-units",
3827
+ path_params: { "orgId" => org_id },
3828
+ request_options: request_options
3829
+ )
3830
+ end
3753
3831
  end
3754
3832
 
3755
3833
  # `client.calendar.subscriptions`
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -15,5 +15,5 @@
15
15
  # Kept in its own file so the gemspec can read the version without loading the
16
16
  # client — a gemspec that pulls in net/http is a gemspec that can fail to parse.
17
17
  module Infrawrench
18
- VERSION = "1.68.0"
18
+ VERSION = "1.69.0"
19
19
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -1,7 +1,7 @@
1
- # infrawrench-sdk v1.68.0 | MIT | Copyright (c) 2026 Infrawrench LLC
1
+ # infrawrench-sdk v1.69.0 | MIT | Copyright (c) 2026 Infrawrench LLC
2
2
  # https://github.com/Infrawrench/Infrawrench
3
3
  #
4
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.68.0).
4
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.69.0).
5
5
  #
6
6
  # DO NOT EDIT. Regenerate with:
7
7
  # pnpm --filter @infrawrench/web generate:sdk
@@ -1261,6 +1261,8 @@ module Infrawrench
1261
1261
  "currency" => String | nil,
1262
1262
  "costScope" => Array[business_metric_scope_term],
1263
1263
  "savedFilterId" => String | nil,
1264
+ "labelMappings" => Array[business_metric_label_mapping],
1265
+ "thresholds" => Array[unit_cost_threshold],
1264
1266
  "createdByUserId" => String | nil,
1265
1267
  "createdAt" => String,
1266
1268
  "updatedAt" => String,
@@ -1385,7 +1387,9 @@ module Infrawrench
1385
1387
  "kind" => business_metric_kind,
1386
1388
  ?"currency" => String,
1387
1389
  ?"costScope" => Array[business_metric_scope_term],
1388
- ?"savedFilterId" => String
1390
+ ?"savedFilterId" => String,
1391
+ ?"labelMappings" => Array[business_metric_label_mapping],
1392
+ ?"thresholds" => Array[unit_cost_threshold]
1389
1393
  }
1390
1394
 
1391
1395
  # What the metric's numbers are. `count` is a unit-less quantity (customers,
@@ -1397,6 +1401,65 @@ module Infrawrench
1397
1401
  # Spec schema: `BusinessMetricKind`.
1398
1402
  type business_metric_kind = "count" | "currency"
1399
1403
 
1404
+ # Joins a label to a cost dimension so unit cost and margin can be computed
1405
+ # per label value (cost per customer). Ratio modes refuse an unmapped label:
1406
+ # without a per-value numerator the only spend available is the whole scope's.
1407
+ #
1408
+ # Spec schema: `BusinessMetricLabelMapping`.
1409
+ type business_metric_label_mapping = { "label" => String, "target" => business_metric_label_target }
1410
+
1411
+ # Spec schema: `BusinessMetricLabelSummary`.
1412
+ type business_metric_label_summary = {
1413
+ "key" => String,
1414
+ "values" => Array[String],
1415
+ "truncated" => bool,
1416
+ "mapping" => business_metric_label_target
1417
+ & ({
1418
+ "kind" => "dimension",
1419
+ "dimension" => "provider"
1420
+ | "account"
1421
+ | "service"
1422
+ | "region"
1423
+ | "resource"
1424
+ | "tag"
1425
+ | "charge_type"
1426
+ | "commitment"
1427
+ | "virtual_tag",
1428
+ ?"tagKey" => String
1429
+ }
1430
+ | { "kind" => "cost_centre" }
1431
+ | nil)
1432
+ }
1433
+
1434
+ # Where a label's values live on the cost side. A `dimension` target matches
1435
+ # label values to dimension values exactly; `cost_centre` matches a centre by
1436
+ # id or, case-insensitively, by name.
1437
+ #
1438
+ # Spec schema: `BusinessMetricLabelTarget`.
1439
+ type business_metric_label_target = {
1440
+ "kind" => "dimension",
1441
+ "dimension" => "provider"
1442
+ | "account"
1443
+ | "service"
1444
+ | "region"
1445
+ | "resource"
1446
+ | "tag"
1447
+ | "charge_type"
1448
+ | "commitment"
1449
+ | "virtual_tag",
1450
+ ?"tagKey" => String
1451
+ }
1452
+ | { "kind" => "cost_centre" }
1453
+
1454
+ # A value's labels, e.g. `{ "customer": "acme", "plan": "pro" }`. At most 8,
1455
+ # keys are slugs, values up to 200 characters. Rows partition the metric: a
1456
+ # day's total is the sum of every row for it, so report a breakdown or a
1457
+ # total, never both. The same day with the same labels restates; different
1458
+ # labels are a different row.
1459
+ #
1460
+ # Spec schema: `BusinessMetricLabels`.
1461
+ type business_metric_labels = Hash[String, String]
1462
+
1400
1463
  # Spec schema: `BusinessMetricScopeTerm`.
1401
1464
  type business_metric_scope_term = {
1402
1465
  "dimension" => "provider"
@@ -1449,12 +1512,20 @@ module Infrawrench
1449
1512
  "day" => String,
1450
1513
  "value" => Numeric,
1451
1514
  "label" => String | nil,
1515
+ "labels" => business_metric_labels,
1452
1516
  "source" => "api" | "workflow" | "import",
1453
1517
  "updatedAt" => String
1454
1518
  }
1455
1519
 
1456
1520
  # Spec schema: `BusinessMetricValuesInput`.
1457
- type business_metric_values_input = { "values" => Array[{ "date" => String, "value" => Numeric, ?"label" => String }] }
1521
+ type business_metric_values_input = {
1522
+ "values" => Array[{
1523
+ "date" => String,
1524
+ "value" => Numeric,
1525
+ ?"label" => String,
1526
+ ?"labels" => business_metric_labels
1527
+ }]
1528
+ }
1458
1529
 
1459
1530
  # Spec schema: `CalendarEvent`.
1460
1531
  type calendar_event = {
@@ -2748,7 +2819,14 @@ module Infrawrench
2748
2819
  ?"costBasis" => "cash" | "amortized" | "blended",
2749
2820
  ?"measure" => cost_measure,
2750
2821
  ?"usageUnit" => String,
2751
- ?"cumulative" => bool
2822
+ ?"cumulative" => bool,
2823
+ ?"unitCostMetricId" => String,
2824
+ ?"unitCostMode" => "unit_cost" | "margin" | "usage_unit_cost" | "raw_metric",
2825
+ ?"unitCostScale" => Numeric | Numeric | Numeric | Numeric | Numeric,
2826
+ ?"unitCostUsageUnit" => String,
2827
+ ?"unitCostLabelFilters" => Array[{ "key" => String, "op" => "in" | "not_in", "values" => Array[String] }],
2828
+ ?"unitCostGroupByLabel" => String,
2829
+ ?"adjusted" => bool
2752
2830
  }
2753
2831
 
2754
2832
  # What the Y axis sums. `cost` (the default) is money per currency. `usage`
@@ -4005,7 +4083,7 @@ module Infrawrench
4005
4083
  # Spec schema: `EfficiencyAlertEvent`.
4006
4084
  type efficiency_alert_event = {
4007
4085
  "id" => String,
4008
- "kind" => "commitment_expiry" | "commitment_idle" | "unit_cost_regression",
4086
+ "kind" => "commitment_expiry" | "commitment_idle" | "unit_cost_regression" | "unit_cost_threshold",
4009
4087
  "subject" => String,
4010
4088
  "accountId" => String | nil,
4011
4089
  "accountName" => String | nil,
@@ -9205,13 +9283,27 @@ module Infrawrench
9205
9283
  "uri" => String | nil
9206
9284
  }
9207
9285
 
9286
+ # Spec schema: `UnitCostLabelFilter`.
9287
+ type unit_cost_label_filter = { "key" => String, "op" => "in" | "not_in", "values" => Array[String] }
9288
+
9289
+ # `unit_cost` is spend ÷ metric value. `margin` is `(revenue − spend) ÷
9290
+ # revenue` as a fraction, with the absolute margin beside it, and needs a
9291
+ # `currency` metric. `usage_unit_cost` is spend ÷ the usage quantity providers
9292
+ # report in one `usageUnit`, and needs no metric (use `POST
9293
+ # /business-metrics/usage-unit-costs`). `raw_metric` plots the metric itself
9294
+ # beside spend, where zero and negative values are real points.
9295
+ #
9296
+ # Spec schema: `UnitCostMode`.
9297
+ type unit_cost_mode = "unit_cost" | "margin" | "usage_unit_cost" | "raw_metric"
9298
+
9208
9299
  # Spec schema: `UnitCostPoint`.
9209
9300
  type unit_cost_point = {
9210
9301
  "bucket" => String,
9211
9302
  "value" => Numeric | nil,
9212
9303
  "cost" => Numeric,
9213
9304
  "metricValue" => Numeric | nil,
9214
- ?"gap" => "no_metric_value" | "non_positive_metric_value" | "unconvertible_currency",
9305
+ ?"absoluteMargin" => Numeric | nil,
9306
+ ?"gap" => "no_metric_value" | "non_positive_metric_value" | "unconvertible_currency" | "no_usage",
9215
9307
  "reportedDays" => Integer,
9216
9308
  "bucketDays" => Integer
9217
9309
  }
@@ -9221,7 +9313,11 @@ module Infrawrench
9221
9313
  "from" => String,
9222
9314
  "to" => String,
9223
9315
  "binning" => "hourly" | "daily" | "weekly" | "monthly" | "quarterly" | "cumulative",
9224
- ?"mode" => "unit_cost" | "margin",
9316
+ ?"mode" => unit_cost_mode,
9317
+ ?"scale" => unit_cost_scale,
9318
+ ?"labelFilters" => Array[unit_cost_label_filter],
9319
+ ?"groupByLabel" => String,
9320
+ ?"usageUnit" => String,
9225
9321
  ?"filters" => Array[business_metric_scope_term],
9226
9322
  ?"query" => String,
9227
9323
  ?"savedFilterId" => String,
@@ -9233,15 +9329,20 @@ module Infrawrench
9233
9329
  # Spec schema: `UnitCostQueryResponse`.
9234
9330
  type unit_cost_query_response = {
9235
9331
  "metric" => {
9236
- "id" => String,
9237
- "key" => String,
9238
- "name" => String,
9239
- "unit" => String,
9240
- "kind" => business_metric_kind,
9241
- "currency" => String | nil
9242
- },
9243
- "mode" => "unit_cost" | "margin",
9332
+ "id" => String,
9333
+ "key" => String,
9334
+ "name" => String,
9335
+ "unit" => String,
9336
+ "kind" => business_metric_kind,
9337
+ "currency" => String | nil
9338
+ }
9339
+ | nil,
9340
+ "mode" => unit_cost_mode,
9244
9341
  "binning" => "hourly" | "daily" | "weekly" | "monthly" | "quarterly" | "cumulative",
9342
+ "scale" => unit_cost_scale,
9343
+ ?"usageUnit" => String,
9344
+ ?"groupByLabel" => String,
9345
+ ?"costPerLabel" => bool,
9245
9346
  "series" => Array[unit_cost_series],
9246
9347
  ?"conversion" => {
9247
9348
  "displayCurrency" => String,
@@ -9255,13 +9356,35 @@ module Infrawrench
9255
9356
  "partialBuckets" => Integer
9256
9357
  }
9257
9358
 
9359
+ # "Per N units": multiplies a ratio (cost per 1,000 requests) and divides a
9360
+ # raw metric. Margin ignores it. Absent is 1.
9361
+ #
9362
+ # Spec schema: `UnitCostScale`.
9363
+ type unit_cost_scale = Numeric | Numeric | Numeric | Numeric | Numeric
9364
+
9258
9365
  # Spec schema: `UnitCostSeries`.
9259
9366
  type unit_cost_series = {
9260
9367
  "currency" => String,
9368
+ ?"label" => { "key" => String, "value" => String | nil, ?"other" => bool },
9261
9369
  "points" => Array[unit_cost_point],
9262
9370
  "overallValue" => Numeric | nil,
9263
9371
  "overallCost" => Numeric,
9264
- "overallMetricValue" => Numeric | nil
9372
+ "overallMetricValue" => Numeric | nil,
9373
+ ?"overallAbsoluteMargin" => Numeric | nil
9374
+ }
9375
+
9376
+ # A standing limit, evaluated daily on the summed ratio over the trailing
9377
+ # window and routed under the unit-cost alert trigger. A window with fewer
9378
+ # than half its days reported is not judged.
9379
+ #
9380
+ # Spec schema: `UnitCostThreshold`.
9381
+ type unit_cost_threshold = {
9382
+ "mode" => "unit_cost" | "margin",
9383
+ "direction" => "above" | "below",
9384
+ "value" => Numeric,
9385
+ ?"scale" => unit_cost_scale,
9386
+ ?"groupByLabel" => String,
9387
+ ?"windowDays" => Integer
9265
9388
  }
9266
9389
 
9267
9390
  # Spec schema: `UnpinRequest`.
@@ -9792,8 +9915,11 @@ module Infrawrench
9792
9915
  def importer_options: (body: { "accountId" => String, "fieldKey" => String, "params" => Hash[String, String] }, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "options" => Array[{ "id" => String, "label" => String, ?"description" => String }] }
9793
9916
  def importer_preview: (body: business_metric_import_preview_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> business_metric_import_preview
9794
9917
  def importer_sources: (?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "sources" => Array[business_metric_source_account] }
9918
+ def labels: (id: String, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "labels" => Array[business_metric_label_summary] }
9795
9919
  def unit_costs: (id: String, body: unit_cost_query_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> unit_cost_query_response
9796
9920
  def update: (id: String, body: business_metric_input, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> business_metric
9921
+ def usage_unit_costs: (body: unit_cost_query_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> unit_cost_query_response
9922
+ def usage_units: (?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "units" => Array[{ "unit" => String, "usage" => Numeric, "services" => Array[String] }] }
9797
9923
  end
9798
9924
 
9799
9925
  class CalendarSubscriptionsNamespace
@@ -10066,7 +10192,7 @@ module Infrawrench
10066
10192
  def anomaly_precision: (?org_id: String?, ?months: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_anomaly_precision_report
10067
10193
  def anomaly_sensitivity: (?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_anomaly_sensitivity
10068
10194
  def dimensions: (dimension: "provider" | "account" | "service" | "region" | "resource" | "tag" | "charge_type" | "commitment" | "virtual_tag" | "tag-keys" | "usage-units" | "virtual-tag-keys", ?org_id: String?, ?tag_key: String?, ?include_hidden: "true" | "false"?, ?request_options: Hash[Symbol, untyped]?) -> cost_dimension_values
10069
- def efficiency_alerts: (?org_id: String?, ?kind: "commitment_expiry" | "commitment_idle" | "unit_cost_regression"?, ?limit: Integer?, ?request_options: Hash[Symbol, untyped]?) -> { "events" => Array[efficiency_alert_event] }
10195
+ def efficiency_alerts: (?org_id: String?, ?kind: "commitment_expiry" | "commitment_idle" | "unit_cost_regression" | "unit_cost_threshold"?, ?limit: Integer?, ?request_options: Hash[Symbol, untyped]?) -> { "events" => Array[efficiency_alert_event] }
10070
10196
  def focus_export: (body: focus_export_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> String
10071
10197
  def query: (body: cost_query_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_query_response
10072
10198
  def rows: (body: cost_push_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_push_response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infrawrench-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.68.0
4
+ version: 1.69.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infrawrench LLC
@@ -11,7 +11,7 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2026-10-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Generated Ruby client for the Infrawrench API (v1.68.0). Covers the published
14
+ description: Generated Ruby client for the Infrawrench API (v1.69.0). Covers the published
15
15
  API surface only — operations marked x-internal in the spec are not generated. No
16
16
  runtime dependencies.
17
17
  email:
@@ -58,5 +58,5 @@ requirements: []
58
58
  rubygems_version: 3.5.22
59
59
  signing_key:
60
60
  specification_version: 4
61
- summary: Generated Ruby client for the Infrawrench API (v1.68.0).
61
+ summary: Generated Ruby client for the Infrawrench API (v1.69.0).
62
62
  test_files: []