infrawrench-sdk 1.16.0 → 1.17.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: ed2bbb041647f781da0b26a0d376c2cedcf6a4904aa085405ee8c7bd5d477de9
4
- data.tar.gz: fc6adc2c9b7edd3188848c118b52f322ce2e54bd1d613fc927cc718401759df8
3
+ metadata.gz: 359ea68464e3400d21793fcb623a2f4d3652d4438d0943d15d3a89ed08ba2d40
4
+ data.tar.gz: d85bcd64441a864f5cc4fa8433242a907fe169f89663e66dd8d81595d42fbe52
5
5
  SHA512:
6
- metadata.gz: cfa7d9ba7d12d044aca5221751c60b316d4ac51133f6c17967417deaea411f688dafbce45af8c18836fd421cf9f1469b1972eb068c5fb085501efb3f7d14ff62
7
- data.tar.gz: 1eb649eb2e24e58172ec86e6b84a4d90c2c8739bb7d01804defc426845bc566261a69f241f9b6af1cc7db1ea4ee888274ff2415a645c50efcc441d068962cc9d
6
+ metadata.gz: e2ce4ad9fff0121b54795ee4185628084ae0d7832d9970633a3a0f82ca1f98787c098f17a326ca62b62f88452a4836555fe91abd77302be4ccf00ba45953e002
7
+ data.tar.gz: 8b216cbe55353f50c523ca02ed4e5c86db7a396f63313b629eed0a5747af7d8ec11640a018fab31a4a975537e38bdd5f6935ba3ad41b58aedf0342f62092ca77
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.16.0`).
3
+ Generated Ruby client for the Infrawrench API (API version `1.17.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
- 596 schemas, as RBS type aliases that steep and TypeProf can read.
44
+ 601 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.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.17.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.16.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.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.16.0)."
21
- spec.description = "Generated Ruby client for the Infrawrench API (v1.16.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.17.0)."
21
+ spec.description = "Generated Ruby client for the Infrawrench API (v1.17.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.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.17.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.16.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -2571,16 +2571,165 @@ module Infrawrench
2571
2571
  end
2572
2572
  end
2573
2573
 
2574
+ # `client.changes.revert`
2575
+ class ChangesRevertNamespace
2576
+ # @api private
2577
+ # @param transport [Transport]
2578
+ def initialize(transport)
2579
+ @transport = transport
2580
+ end
2581
+
2582
+ # Revert one change event
2583
+ #
2584
+ # Applies the inverse patch through the plugin's ordinary `updateResource`
2585
+ # path — the same call the Edit form makes — and only for the fields the dry
2586
+ # run marked `revertible`.
2587
+ #
2588
+ # The plan is rebuilt against a fresh live read immediately before the
2589
+ # write, so a field that moved between the preview and the apply becomes a
2590
+ # conflict and drops out of the patch.
2591
+ #
2592
+ # **This is a last-moment re-read, not an atomic compare-and-swap.** The gap
2593
+ # between reading a field and writing it is one provider round-trip wide,
2594
+ # and a third party writing inside that gap will be overwritten without
2595
+ # warning. It cannot be closed generically: the plugin update contract
2596
+ # carries no expected value, ETag or version token, so no conditional write
2597
+ # can be expressed for a provider that supports one. Treat the conflict
2598
+ # detection as a strong guard against stale plans, not as a mutual-exclusion
2599
+ # guarantee against other writers.
2600
+ #
2601
+ # Reverts of the *same event* are mutually exclusive: the event is claimed
2602
+ # with a conditional update under a five-minute lease, so two concurrent
2603
+ # reverts cannot both reach the provider and the loser gets `409`. A
2604
+ # provider failure releases the claim immediately; a process that dies
2605
+ # mid-write leaves a claim that expires, so an interrupted revert is
2606
+ # retryable rather than permanently stuck. `revertedAt` is only set once the
2607
+ # provider accepted the write.
2608
+ #
2609
+ # The claim carries an owner token, and every write that ends a revert is
2610
+ # fenced on it. An attempt whose provider call outlives the lease can
2611
+ # therefore neither release nor complete the claim that replaced it — it
2612
+ # gets `409` with `appliedFields` naming what it did write, so the caller
2613
+ # can reconcile rather than assume. Two attempts can overlap in that case,
2614
+ # but they cannot disagree: both invert the same recorded event to the same
2615
+ # values, so the second one's patch is a subset of the first's.
2616
+ #
2617
+ # If a write reaches the provider but recording it fails, the response is
2618
+ # `500` with `appliedFields` — the resource moved and the timeline has not
2619
+ # caught up. The claim is deliberately held in that case, and the next
2620
+ # attempt after the lease expires finds every field already back and records
2621
+ # the revert without touching the provider again, answering `200` with
2622
+ # `reconciled: true` and an empty `appliedFields`. A resource put back by
2623
+ # hand is not mistaken for this: reconciliation only happens on an event
2624
+ # whose claim was still outstanding, which is the only state in which an
2625
+ # unrecorded write is possible.
2626
+ #
2627
+ # Blocked with `423` while an org change freeze is in effect. Every attempt
2628
+ # whose write reached the provider is audit-logged as
2629
+ # `resource.change_revert`, including one that lost its claim or could not
2630
+ # record — the entry's `outcome` is `recorded`, `superseded`, `unrecorded`
2631
+ # or `reconciled`, so a contested outcome reads as one mutation rather than
2632
+ # as several reverts. An attempt that neither wrote nor recorded anything
2633
+ # logs nothing. Attribution is best-effort: no transaction spans a
2634
+ # third-party cloud API and Infrawrench's database, so if the audit insert
2635
+ # itself fails the response carries `auditRecorded: false` and the details
2636
+ # go to the server log rather than being silently dropped.
2637
+ #
2638
+ # The stored resource snapshot is deliberately left untouched, so the next
2639
+ # poll observes the reverted state and records it as an ordinary change
2640
+ # event.
2641
+ #
2642
+ # POST /api/org/{orgId}/changes/{changeId}/revert
2643
+ #
2644
+ # Raises on 400: Bad request
2645
+ #
2646
+ # Raises on 404: Not found
2647
+ #
2648
+ # Raises on 409: Already reverted, another revert holds the event, nothing
2649
+ # in the plan is writable, or this attempt was superseded mid-write (its
2650
+ # lease lapsed). The body carries `code: change_revert_conflict` for all but
2651
+ # the writability case, and `appliedFields` when the provider write had
2652
+ # already landed.
2653
+ #
2654
+ # Raises on 423: Blocked by an active change freeze. Retry with the
2655
+ # `x-change-freeze-override: true` header if you hold `freezes:override`;
2656
+ # both blocks and overrides are audit-logged.
2657
+ #
2658
+ # Raises on 500: The provider accepted the write but it could not be
2659
+ # recorded against the event. The resource *has* been put back;
2660
+ # `appliedFields` names what changed. A later retry reconciles the timeline.
2661
+ #
2662
+ # Raises on 502: The provider couldn't be read. Nothing was written.
2663
+ #
2664
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
2665
+ # constructed with.
2666
+ # @param change_id [String]
2667
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
2668
+ # @return [Hash] Parsed JSON, shaped as `RevertApplyResponse` — see
2669
+ # `sig/infrawrench/sdk.rbs`.
2670
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
2671
+ def create(change_id:, org_id: nil, request_options: nil)
2672
+ @transport.request(
2673
+ http_method: "POST",
2674
+ path: "/api/org/{orgId}/changes/{changeId}/revert",
2675
+ path_params: { "orgId" => org_id, "changeId" => change_id },
2676
+ request_options: request_options
2677
+ )
2678
+ end
2679
+
2680
+ # Dry-run a revert of one change event
2681
+ #
2682
+ # Inverts the recorded diff and reconciles it against the resource's
2683
+ # *current* live fields, which is the whole point: the poller may have
2684
+ # recorded this hours ago and the world may have moved on. Read-only — it
2685
+ # reads from the provider and writes nothing.
2686
+ #
2687
+ # Only `updated` events with a field diff can be reverted. `outputs.*`
2688
+ # entries are provider-derived and are never written back, and whether a
2689
+ # field is writable at all is the plugin's own edit-form rule (`editable`,
2690
+ # minus `secret` and `association` kinds), so a revert can never issue a
2691
+ # provider call an edit could not.
2692
+ #
2693
+ # Gated on `resources:write` rather than `resources:read`: the plan names
2694
+ # the write it is offering to make.
2695
+ #
2696
+ # GET /api/org/{orgId}/changes/{changeId}/revert
2697
+ #
2698
+ # Raises on 404: Not found
2699
+ #
2700
+ # Raises on 502: The provider couldn't be read, so no plan can be made
2701
+ # safely. Nothing was written.
2702
+ #
2703
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
2704
+ # constructed with.
2705
+ # @param change_id [String]
2706
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
2707
+ # @return [Hash] Parsed JSON, shaped as `RevertPreviewResponse` — see
2708
+ # `sig/infrawrench/sdk.rbs`.
2709
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
2710
+ def get(change_id:, org_id: nil, request_options: nil)
2711
+ @transport.request(
2712
+ http_method: "GET",
2713
+ path: "/api/org/{orgId}/changes/{changeId}/revert",
2714
+ path_params: { "orgId" => org_id, "changeId" => change_id },
2715
+ request_options: request_options
2716
+ )
2717
+ end
2718
+ end
2719
+
2574
2720
  # `client.changes`
2575
2721
  class ChangesNamespace
2576
2722
  # @return [ChangesAlertSettingsNamespace] `client.changes.alert_settings`
2577
2723
  attr_reader :alert_settings
2724
+ # @return [ChangesRevertNamespace] `client.changes.revert`
2725
+ attr_reader :revert
2578
2726
 
2579
2727
  # @api private
2580
2728
  # @param transport [Transport]
2581
2729
  def initialize(transport)
2582
2730
  @transport = transport
2583
2731
  @alert_settings = ChangesAlertSettingsNamespace.new(@transport)
2732
+ @revert = ChangesRevertNamespace.new(@transport)
2584
2733
  end
2585
2734
 
2586
2735
  # Org-wide change timeline (paginated, filterable)
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.17.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.16.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.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.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.17.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.16.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.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.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.17.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.16.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.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.16.0"
18
+ VERSION = "1.17.0"
19
19
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.17.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.16.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.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.16.0 | MIT | Copyright (c) 2026 Infrawrench LLC
1
+ # infrawrench-sdk v1.17.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.16.0).
4
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.17.0).
5
5
  #
6
6
  # DO NOT EDIT. Regenerate with:
7
7
  # pnpm --filter @infrawrench/web generate:sdk
@@ -4602,7 +4602,8 @@ module Infrawrench
4602
4602
  "changeKind" => resource_change_kind,
4603
4603
  "diff" => Array[resource_field_change],
4604
4604
  ?"origin" => "schedule" | nil,
4605
- "createdAt" => String
4605
+ "createdAt" => String,
4606
+ ?"revertedAt" => String | nil
4606
4607
  }
4607
4608
 
4608
4609
  # Spec schema: `ResourceChangeFeedEntry`.
@@ -5166,6 +5167,58 @@ module Infrawrench
5166
5167
  ?"schedulable" => bool
5167
5168
  }
5168
5169
 
5170
+ # Spec schema: `RevertApplyResponse`.
5171
+ type revert_apply_response = {
5172
+ "changeId" => String,
5173
+ "resourceId" => resource_id,
5174
+ "appliedFields" => Array[String],
5175
+ "plan" => revert_plan,
5176
+ "revertedAt" => String,
5177
+ ?"reconciled" => bool,
5178
+ ?"auditRecorded" => bool
5179
+ }
5180
+
5181
+ # Spec schema: `RevertFieldPlan`.
5182
+ type revert_field_plan = {
5183
+ "field" => String,
5184
+ ?"revertTo" => untyped,
5185
+ ?"changedTo" => untyped,
5186
+ ?"current" => untyped,
5187
+ "status" => revert_field_status,
5188
+ "reason" => String
5189
+ }
5190
+
5191
+ # What a revert would do to one field. `revertible` — the field still holds
5192
+ # the value the change set, and the plugin's edit form can write the old one
5193
+ # back. `already-reverted` — it is already at the old value; nothing to do.
5194
+ # `conflict` — it changed again since, so reverting would discard the newer
5195
+ # value. `not-writable` — outside the plugin's editable surface, or the old
5196
+ # value is not something the edit form can submit. `provider-derived` — an
5197
+ # `outputs.*` entry, which the provider computes rather than accepts.
5198
+ #
5199
+ # Spec schema: `RevertFieldStatus`.
5200
+ type revert_field_status = "revertible" | "already-reverted" | "conflict" | "not-writable" | "provider-derived"
5201
+
5202
+ # Spec schema: `RevertPlan`.
5203
+ type revert_plan = {
5204
+ "fields" => Array[revert_field_plan],
5205
+ "revertibleFields" => Array[String],
5206
+ "revertible" => bool,
5207
+ "blockedReason" => String | nil
5208
+ }
5209
+
5210
+ # Spec schema: `RevertPreviewResponse`.
5211
+ type revert_preview_response = {
5212
+ "changeId" => String,
5213
+ "resourceId" => resource_id,
5214
+ "displayName" => String,
5215
+ "pluginId" => String,
5216
+ "resourceTypeId" => String,
5217
+ "accountId" => String,
5218
+ "plan" => revert_plan,
5219
+ "revertedAt" => String | nil
5220
+ }
5221
+
5169
5222
  # Spec schema: `RightsizingListResponse`.
5170
5223
  type rightsizing_list_response = {
5171
5224
  "accounts" => Array[oversized_account_group],
@@ -6363,8 +6416,15 @@ module Infrawrench
6363
6416
  def update: (?org_id: String?, ?body: drift_alert_settings_update?, ?request_options: Hash[Symbol, untyped]?) -> drift_alert_settings
6364
6417
  end
6365
6418
 
6419
+ class ChangesRevertNamespace
6420
+ def initialize: (Transport) -> void
6421
+ def create: (change_id: String, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> revert_apply_response
6422
+ def get: (change_id: String, ?org_id: String?, ?request_options: Hash[Symbol, untyped]?) -> revert_preview_response
6423
+ end
6424
+
6366
6425
  class ChangesNamespace
6367
6426
  attr_reader alert_settings: ChangesAlertSettingsNamespace
6427
+ attr_reader revert: ChangesRevertNamespace
6368
6428
  def initialize: (Transport) -> void
6369
6429
  def get: (?org_id: String?, ?page: Integer?, ?page_size: Integer?, ?account_id: String?, ?resource_id: String?, ?kind: resource_change_kind?, ?from: String?, ?to: String?, ?request_options: Hash[Symbol, untyped]?) -> resource_change_feed_response
6370
6430
  def resource: (resource_id: String, ?org_id: String?, ?limit: Integer?, ?request_options: Hash[Symbol, untyped]?) -> resource_change_list_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.16.0
4
+ version: 1.17.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-08-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Generated Ruby client for the Infrawrench API (v1.16.0). Covers the published
14
+ description: Generated Ruby client for the Infrawrench API (v1.17.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.16.0).
61
+ summary: Generated Ruby client for the Infrawrench API (v1.17.0).
62
62
  test_files: []