infrawrench-sdk 1.68.0 → 1.70.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: 25274888c2afd271d21ac34a80c020079cd99ed264ce715da1bcb6b311573ddc
4
+ data.tar.gz: 041d1961dd6889020b688e6501107a813309ab7745e3c454742c130d235e50f3
5
5
  SHA512:
6
- metadata.gz: ad0d25573ec5f7a5315f58256a2984518991b6ebdeaa8f6417d7a6dcaadba1660c26d8f0aa98c79f7cd1d0d3eb5727885e65bc5d6a243a5b5bd6e9149c31ae8a
7
- data.tar.gz: c963363c2702cc417615a9aee8d7de9f5db30c9b1dd8a3359ce137de9cbe8be30cda0ec2e629c56a57f018d9962dbf7784a461b0eb6a6bc0aa01128a24349511
6
+ metadata.gz: a0e88496bc0e3e0ad7565f8b008092fafaa47af64c7051bfbabc47ec7aace870ded89b85254adbef3d700bef696c57279f26dd33f307bf08806974ec7602f2e5
7
+ data.tar.gz: a8c608690950d6183a5cd10ebdee7d5ba3edc229bed66e72738ea2b869fbc37a29e76ab0646e761d4a161eaa7daaa0a7fcece77806ed797160a943607246884b
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.70.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
+ 903 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.70.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.70.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.70.0)."
21
+ spec.description = "Generated Ruby client for the Infrawrench API (v1.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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.70.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,
@@ -4013,7 +4091,8 @@ module Infrawrench
4013
4091
  "amount" => Numeric | nil,
4014
4092
  "detail" => Hash[String, String | Numeric | nil | nil],
4015
4093
  "firedAt" => String,
4016
- "notifiedAt" => String | nil
4094
+ "notifiedAt" => String | nil,
4095
+ ?"remediation" => finding_remediation
4017
4096
  }
4018
4097
 
4019
4098
  # Spec schema: `EnvironmentCaptureDraft`.
@@ -4393,6 +4472,23 @@ module Infrawrench
4393
4472
  # Spec schema: `FileGithubIssueResult`.
4394
4473
  type file_github_issue_result = { "action" => "created" | "commented", "link" => github_issue_link }
4395
4474
 
4475
+ # Idle commitments only: the provider's commands for inspecting and acting on
4476
+ # the commitment. Null for the other kinds.
4477
+ #
4478
+ # Spec schema: `FindingRemediation`.
4479
+ type finding_remediation = {
4480
+ "commands" => Array[remediation_command],
4481
+ "placeholders" => Array[remediation_placeholder],
4482
+ "iac" => {
4483
+ "address" => String,
4484
+ "stateLabel" => String | nil,
4485
+ "attributeChanges" => Array[{ "attribute" => String, "from" => String | nil, "to" => String | nil }],
4486
+ "commands" => Array[remediation_command]
4487
+ }
4488
+ | nil
4489
+ }
4490
+ | nil
4491
+
4396
4492
  # Spec schema: `FocusExportRequest`.
4397
4493
  type focus_export_request = {
4398
4494
  "from" => String,
@@ -6270,7 +6366,8 @@ module Infrawrench
6270
6366
  "reason" => String,
6271
6367
  "cost" => orphan_cost_annotation,
6272
6368
  "owner" => resource_owner_annotation,
6273
- "lastSyncedAt" => String | nil
6369
+ "lastSyncedAt" => String | nil,
6370
+ ?"remediation" => finding_remediation & Hash[String, untyped]
6274
6371
  }
6275
6372
 
6276
6373
  # Spec schema: `OversizedAccountGroup`.
@@ -6303,7 +6400,8 @@ module Infrawrench
6303
6400
  "currentMonthlyKgCo2e" => Numeric | nil,
6304
6401
  "monthlyKgCo2eSaving" => Numeric | nil,
6305
6402
  "resizeNote" => String | nil,
6306
- "lastSyncedAt" => String | nil
6403
+ "lastSyncedAt" => String | nil,
6404
+ ?"remediation" => finding_remediation & Hash[String, untyped]
6307
6405
  }
6308
6406
 
6309
6407
  # Spec schema: `OversizedSizeSummary`.
@@ -7180,6 +7278,18 @@ module Infrawrench
7180
7278
  "notice" => String
7181
7279
  }
7182
7280
 
7281
+ # Spec schema: `RemediationCommand`.
7282
+ type remediation_command = {
7283
+ "tool" => String,
7284
+ "command" => String,
7285
+ "description" => String,
7286
+ "destructive" => bool,
7287
+ ?"placeholders" => Array[remediation_placeholder]
7288
+ }
7289
+
7290
+ # Spec schema: `RemediationPlaceholder`.
7291
+ type remediation_placeholder = { "name" => String, "description" => String }
7292
+
7183
7293
  # Spec schema: `ReorderRequest`.
7184
7294
  type reorder_request = {
7185
7295
  ?"cards" => Array[{ "kind" => "resource" | "workflow" | "widget", "id" => String }],
@@ -8708,7 +8818,8 @@ module Infrawrench
8708
8818
  "projectedMonthlySaving" => Numeric | nil,
8709
8819
  "currency" => String | nil,
8710
8820
  "createdAt" => String,
8711
- "updatedAt" => String
8821
+ "updatedAt" => String,
8822
+ ?"remediation" => finding_remediation & Hash[String, untyped]
8712
8823
  }
8713
8824
 
8714
8825
  # Spec schema: `SleepScheduleCreate`.
@@ -9205,13 +9316,27 @@ module Infrawrench
9205
9316
  "uri" => String | nil
9206
9317
  }
9207
9318
 
9319
+ # Spec schema: `UnitCostLabelFilter`.
9320
+ type unit_cost_label_filter = { "key" => String, "op" => "in" | "not_in", "values" => Array[String] }
9321
+
9322
+ # `unit_cost` is spend ÷ metric value. `margin` is `(revenue − spend) ÷
9323
+ # revenue` as a fraction, with the absolute margin beside it, and needs a
9324
+ # `currency` metric. `usage_unit_cost` is spend ÷ the usage quantity providers
9325
+ # report in one `usageUnit`, and needs no metric (use `POST
9326
+ # /business-metrics/usage-unit-costs`). `raw_metric` plots the metric itself
9327
+ # beside spend, where zero and negative values are real points.
9328
+ #
9329
+ # Spec schema: `UnitCostMode`.
9330
+ type unit_cost_mode = "unit_cost" | "margin" | "usage_unit_cost" | "raw_metric"
9331
+
9208
9332
  # Spec schema: `UnitCostPoint`.
9209
9333
  type unit_cost_point = {
9210
9334
  "bucket" => String,
9211
9335
  "value" => Numeric | nil,
9212
9336
  "cost" => Numeric,
9213
9337
  "metricValue" => Numeric | nil,
9214
- ?"gap" => "no_metric_value" | "non_positive_metric_value" | "unconvertible_currency",
9338
+ ?"absoluteMargin" => Numeric | nil,
9339
+ ?"gap" => "no_metric_value" | "non_positive_metric_value" | "unconvertible_currency" | "no_usage",
9215
9340
  "reportedDays" => Integer,
9216
9341
  "bucketDays" => Integer
9217
9342
  }
@@ -9221,7 +9346,11 @@ module Infrawrench
9221
9346
  "from" => String,
9222
9347
  "to" => String,
9223
9348
  "binning" => "hourly" | "daily" | "weekly" | "monthly" | "quarterly" | "cumulative",
9224
- ?"mode" => "unit_cost" | "margin",
9349
+ ?"mode" => unit_cost_mode,
9350
+ ?"scale" => unit_cost_scale,
9351
+ ?"labelFilters" => Array[unit_cost_label_filter],
9352
+ ?"groupByLabel" => String,
9353
+ ?"usageUnit" => String,
9225
9354
  ?"filters" => Array[business_metric_scope_term],
9226
9355
  ?"query" => String,
9227
9356
  ?"savedFilterId" => String,
@@ -9233,15 +9362,20 @@ module Infrawrench
9233
9362
  # Spec schema: `UnitCostQueryResponse`.
9234
9363
  type unit_cost_query_response = {
9235
9364
  "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",
9365
+ "id" => String,
9366
+ "key" => String,
9367
+ "name" => String,
9368
+ "unit" => String,
9369
+ "kind" => business_metric_kind,
9370
+ "currency" => String | nil
9371
+ }
9372
+ | nil,
9373
+ "mode" => unit_cost_mode,
9244
9374
  "binning" => "hourly" | "daily" | "weekly" | "monthly" | "quarterly" | "cumulative",
9375
+ "scale" => unit_cost_scale,
9376
+ ?"usageUnit" => String,
9377
+ ?"groupByLabel" => String,
9378
+ ?"costPerLabel" => bool,
9245
9379
  "series" => Array[unit_cost_series],
9246
9380
  ?"conversion" => {
9247
9381
  "displayCurrency" => String,
@@ -9255,13 +9389,35 @@ module Infrawrench
9255
9389
  "partialBuckets" => Integer
9256
9390
  }
9257
9391
 
9392
+ # "Per N units": multiplies a ratio (cost per 1,000 requests) and divides a
9393
+ # raw metric. Margin ignores it. Absent is 1.
9394
+ #
9395
+ # Spec schema: `UnitCostScale`.
9396
+ type unit_cost_scale = Numeric | Numeric | Numeric | Numeric | Numeric
9397
+
9258
9398
  # Spec schema: `UnitCostSeries`.
9259
9399
  type unit_cost_series = {
9260
9400
  "currency" => String,
9401
+ ?"label" => { "key" => String, "value" => String | nil, ?"other" => bool },
9261
9402
  "points" => Array[unit_cost_point],
9262
9403
  "overallValue" => Numeric | nil,
9263
9404
  "overallCost" => Numeric,
9264
- "overallMetricValue" => Numeric | nil
9405
+ "overallMetricValue" => Numeric | nil,
9406
+ ?"overallAbsoluteMargin" => Numeric | nil
9407
+ }
9408
+
9409
+ # A standing limit, evaluated daily on the summed ratio over the trailing
9410
+ # window and routed under the unit-cost alert trigger. A window with fewer
9411
+ # than half its days reported is not judged.
9412
+ #
9413
+ # Spec schema: `UnitCostThreshold`.
9414
+ type unit_cost_threshold = {
9415
+ "mode" => "unit_cost" | "margin",
9416
+ "direction" => "above" | "below",
9417
+ "value" => Numeric,
9418
+ ?"scale" => unit_cost_scale,
9419
+ ?"groupByLabel" => String,
9420
+ ?"windowDays" => Integer
9265
9421
  }
9266
9422
 
9267
9423
  # Spec schema: `UnpinRequest`.
@@ -9792,8 +9948,11 @@ module Infrawrench
9792
9948
  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
9949
  def importer_preview: (body: business_metric_import_preview_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> business_metric_import_preview
9794
9950
  def importer_sources: (?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "sources" => Array[business_metric_source_account] }
9951
+ def labels: (id: String, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "labels" => Array[business_metric_label_summary] }
9795
9952
  def unit_costs: (id: String, body: unit_cost_query_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> unit_cost_query_response
9796
9953
  def update: (id: String, body: business_metric_input, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> business_metric
9954
+ def usage_unit_costs: (body: unit_cost_query_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> unit_cost_query_response
9955
+ def usage_units: (?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> { "units" => Array[{ "unit" => String, "usage" => Numeric, "services" => Array[String] }] }
9797
9956
  end
9798
9957
 
9799
9958
  class CalendarSubscriptionsNamespace
@@ -10066,7 +10225,7 @@ module Infrawrench
10066
10225
  def anomaly_precision: (?org_id: String?, ?months: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_anomaly_precision_report
10067
10226
  def anomaly_sensitivity: (?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_anomaly_sensitivity
10068
10227
  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] }
10228
+ 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
10229
  def focus_export: (body: focus_export_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> String
10071
10230
  def query: (body: cost_query_request, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> cost_query_response
10072
10231
  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.70.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.70.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.70.0).
62
62
  test_files: []