infrawrench-sdk 0.43.0 → 1.0.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.
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v0.43.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.0.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 0.43.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.0.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -882,6 +882,185 @@ module Infrawrench
882
882
  end
883
883
  end
884
884
 
885
+ # `client.alert_rules.deliveries`
886
+ class AlertRulesDeliveriesNamespace
887
+ # @api private
888
+ # @param transport [Transport]
889
+ def initialize(transport)
890
+ @transport = transport
891
+ end
892
+
893
+ # Acknowledge an alert, cancelling its escalation
894
+ #
895
+ # A conditional update: only a delivery still in `awaiting_ack` can move, so
896
+ # two people pressing at once produce one acknowledgement and an alert that
897
+ # already escalated cannot be retroactively silenced.
898
+ #
899
+ # POST /api/org/{orgId}/alert-rules/deliveries/{id}/ack
900
+ #
901
+ # Raises on 401: Unauthenticated
902
+ #
903
+ # Raises on 403: Forbidden
904
+ #
905
+ # Raises on 404: Not found
906
+ #
907
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
908
+ # constructed with.
909
+ # @param id [String]
910
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
911
+ # @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
912
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
913
+ def ack(id:, org_id: nil, request_options: nil)
914
+ @transport.request(
915
+ http_method: "POST",
916
+ path: "/api/org/{orgId}/alert-rules/deliveries/{id}/ack",
917
+ path_params: { "orgId" => org_id, "id" => id },
918
+ request_options: request_options
919
+ )
920
+ end
921
+
922
+ # Drop held or awaiting-acknowledgement deliveries
923
+ #
924
+ # POST /api/org/{orgId}/alert-rules/deliveries/cancel
925
+ #
926
+ # Raises on 400: Bad request
927
+ #
928
+ # Raises on 403: Forbidden
929
+ #
930
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
931
+ # constructed with.
932
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
933
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
934
+ # @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
935
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
936
+ def cancel(org_id: nil, body: nil, request_options: nil)
937
+ @transport.request(
938
+ http_method: "POST",
939
+ path: "/api/org/{orgId}/alert-rules/deliveries/cancel",
940
+ path_params: { "orgId" => org_id },
941
+ body: body,
942
+ request_options: request_options
943
+ )
944
+ end
945
+
946
+ # List recent held and escalating alerts
947
+ #
948
+ # Only alerts a rule created follow-up work for appear here: one held by
949
+ # quiet hours, or one waiting on an acknowledgement. An alert that went
950
+ # straight out leaves no row.
951
+ #
952
+ # GET /api/org/{orgId}/alert-rules/deliveries
953
+ #
954
+ # Raises on 403: Forbidden
955
+ #
956
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
957
+ # constructed with.
958
+ # @param limit [Integer, nil]
959
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
960
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<AlertDelivery>` — see
961
+ # `sig/infrawrench/sdk.rbs`.
962
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
963
+ def list(org_id: nil, limit: nil, request_options: nil)
964
+ @transport.request(
965
+ http_method: "GET",
966
+ path: "/api/org/{orgId}/alert-rules/deliveries",
967
+ path_params: { "orgId" => org_id },
968
+ query: { "limit" => limit },
969
+ request_options: request_options
970
+ )
971
+ end
972
+ end
973
+
974
+ # `client.alert_rules`
975
+ class AlertRulesNamespace
976
+ # @return [AlertRulesDeliveriesNamespace] `client.alert_rules.deliveries`
977
+ attr_reader :deliveries
978
+
979
+ # @api private
980
+ # @param transport [Transport]
981
+ def initialize(transport)
982
+ @transport = transport
983
+ @deliveries = AlertRulesDeliveriesNamespace.new(@transport)
984
+ end
985
+
986
+ # Persist the default rule so it can be edited
987
+ #
988
+ # A no-op when the organization already has rules.
989
+ #
990
+ # POST /api/org/{orgId}/alert-rules/adopt-defaults
991
+ #
992
+ # Raises on 403: Forbidden
993
+ #
994
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
995
+ # constructed with.
996
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
997
+ # @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
998
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
999
+ def adopt_defaults(org_id: nil, request_options: nil)
1000
+ @transport.request(
1001
+ http_method: "POST",
1002
+ path: "/api/org/{orgId}/alert-rules/adopt-defaults",
1003
+ path_params: { "orgId" => org_id },
1004
+ request_options: request_options
1005
+ )
1006
+ end
1007
+
1008
+ # Get the organization's alert routing rules
1009
+ #
1010
+ # Returns the rules in evaluation order, plus the channels and accounts a
1011
+ # rule can name so a client can render destinations by name. An organization
1012
+ # that has saved no rules gets the synthesized default with `usingDefaults:
1013
+ # true`.
1014
+ #
1015
+ # GET /api/org/{orgId}/alert-rules
1016
+ #
1017
+ # Raises on 403: Forbidden
1018
+ #
1019
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
1020
+ # constructed with.
1021
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
1022
+ # @return [Hash] Parsed JSON, shaped as `AlertRulesResponse` — see
1023
+ # `sig/infrawrench/sdk.rbs`.
1024
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
1025
+ def get(org_id: nil, request_options: nil)
1026
+ @transport.request(
1027
+ http_method: "GET",
1028
+ path: "/api/org/{orgId}/alert-rules",
1029
+ path_params: { "orgId" => org_id },
1030
+ request_options: request_options
1031
+ )
1032
+ end
1033
+
1034
+ # Replace the organization's alert routing rules
1035
+ #
1036
+ # Whole-list replacement in one transaction. Order is part of the meaning —
1037
+ # a rule is only correct relative to the ones above it — so a reorder
1038
+ # applied as several requests would leave a window in which alerts route
1039
+ # somewhere nobody asked for. Positions are re-derived from array order.
1040
+ #
1041
+ # PUT /api/org/{orgId}/alert-rules
1042
+ #
1043
+ # Raises on 400: Bad request
1044
+ #
1045
+ # Raises on 403: Forbidden
1046
+ #
1047
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
1048
+ # constructed with.
1049
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
1050
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
1051
+ # @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
1052
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
1053
+ def update(org_id: nil, body: nil, request_options: nil)
1054
+ @transport.request(
1055
+ http_method: "PUT",
1056
+ path: "/api/org/{orgId}/alert-rules",
1057
+ path_params: { "orgId" => org_id },
1058
+ body: body,
1059
+ request_options: request_options
1060
+ )
1061
+ end
1062
+ end
1063
+
885
1064
  # `client.api_keys`
886
1065
  class ApiKeysNamespace
887
1066
  # @api private
@@ -4708,10 +4887,11 @@ module Infrawrench
4708
4887
  @transport = transport
4709
4888
  end
4710
4889
 
4711
- # Route alerts to a Teams channel
4890
+ # Connect a Teams channel as an alert destination
4712
4891
  #
4713
4892
  # Adds a channel by webhook URL, or updates the one already holding that
4714
- # URL. Each trigger defaults to enabled. Responds 400 when the URL is not
4893
+ # URL. Which alerts reach it is decided by /alert-rules — connecting a
4894
+ # channel routes nothing to it on its own. Responds 400 when the URL is not
4715
4895
  # https or its host is not Microsoft-operated.
4716
4896
  #
4717
4897
  # POST /api/org/{orgId}/msteams/webhooks
@@ -4734,7 +4914,7 @@ module Infrawrench
4734
4914
  )
4735
4915
  end
4736
4916
 
4737
- # Stop routing alerts to a Teams channel
4917
+ # Disconnect a Teams channel
4738
4918
  #
4739
4919
  # DELETE /api/org/{orgId}/msteams/webhooks/{id}
4740
4920
  #
@@ -4755,7 +4935,7 @@ module Infrawrench
4755
4935
  )
4756
4936
  end
4757
4937
 
4758
- # Rename a Teams channel or change which alerts it receives
4938
+ # Rename a Teams channel
4759
4939
  #
4760
4940
  # The webhook URL is immutable — remove the channel and re-add it to change
4761
4941
  # it.
@@ -4798,8 +4978,8 @@ module Infrawrench
4798
4978
 
4799
4979
  # List the organization's Teams channels
4800
4980
  #
4801
- # Returns the Teams channels alerts are routed to and which triggers each
4802
- # takes. Webhook URLs are never included.
4981
+ # Returns the Teams channels alerts can be routed to. Which alerts reach
4982
+ # each one is decided by /alert-rules. Webhook URLs are never included.
4803
4983
  #
4804
4984
  # GET /api/org/{orgId}/msteams/status
4805
4985
  #
@@ -4819,9 +4999,9 @@ module Infrawrench
4819
4999
 
4820
5000
  # Post a test card to every configured Teams channel
4821
5001
  #
4822
- # Ignores trigger opt-ins — every channel gets the test. Fails with the
4823
- # error Microsoft returned when nothing could be delivered (HTTP 404 usually
4824
- # means the Workflow was deleted or turned off).
5002
+ # Ignores routing rules — every channel gets the test. Fails with the error
5003
+ # Microsoft returned when nothing could be delivered (HTTP 404 usually means
5004
+ # the Workflow was deleted or turned off).
4825
5005
  #
4826
5006
  # POST /api/org/{orgId}/msteams/test
4827
5007
  #
@@ -4912,6 +5092,156 @@ module Infrawrench
4912
5092
  end
4913
5093
  end
4914
5094
 
5095
+ # `client.ownership`
5096
+ class OwnershipNamespace
5097
+ # @api private
5098
+ # @param transport [Transport]
5099
+ def initialize(transport)
5100
+ @transport = transport
5101
+ end
5102
+
5103
+ # Clear a resource's ownership
5104
+ #
5105
+ # Removes the ownership record. The resource itself is untouched.
5106
+ #
5107
+ # _Requires permission: `resources:write`._
5108
+ #
5109
+ # DELETE /api/org/{orgId}/ownership
5110
+ #
5111
+ # Raises on 400: Bad request
5112
+ #
5113
+ # Raises on 404: Not found
5114
+ #
5115
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
5116
+ # constructed with.
5117
+ # @param resource_id [String]
5118
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
5119
+ # @return [nil] This endpoint returns no content.
5120
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
5121
+ def delete(resource_id:, org_id: nil, request_options: nil)
5122
+ @transport.request(
5123
+ http_method: "DELETE",
5124
+ path: "/api/org/{orgId}/ownership",
5125
+ path_params: { "orgId" => org_id },
5126
+ query: { "resourceId" => resource_id },
5127
+ accept: :empty,
5128
+ request_options: request_options
5129
+ )
5130
+ end
5131
+
5132
+ # List resource ownership records
5133
+ #
5134
+ # Every ownership record in the organization — owner, purpose and
5135
+ # authorizing ticket, per resource. Only resources somebody has recorded
5136
+ # something about appear; an absent record means the resource is unowned.
5137
+ #
5138
+ # _Requires permission: `resources:read`._
5139
+ #
5140
+ # GET /api/org/{orgId}/ownership
5141
+ #
5142
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
5143
+ # constructed with.
5144
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
5145
+ # @return [Hash] Parsed JSON, shaped as `ResourceOwnershipListResponse` — see
5146
+ # `sig/infrawrench/sdk.rbs`.
5147
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
5148
+ def get(org_id: nil, request_options: nil)
5149
+ @transport.request(
5150
+ http_method: "GET",
5151
+ path: "/api/org/{orgId}/ownership",
5152
+ path_params: { "orgId" => org_id },
5153
+ request_options: request_options
5154
+ )
5155
+ end
5156
+
5157
+ # List people an owner can be set to
5158
+ #
5159
+ # Org members, as a minimal id/name/email projection for the owner picker.
5160
+ # Requires only `resources:read`, deliberately not `team:read`: recording
5161
+ # who owns a resource must not be reserved for whoever can also read roles
5162
+ # and membership.
5163
+ #
5164
+ # _Requires permission: `resources:read`._
5165
+ #
5166
+ # GET /api/org/{orgId}/ownership/members
5167
+ #
5168
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
5169
+ # constructed with.
5170
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
5171
+ # @return [Hash] Parsed JSON, shaped as `OwnerCandidateListResponse` — see
5172
+ # `sig/infrawrench/sdk.rbs`.
5173
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
5174
+ def members(org_id: nil, request_options: nil)
5175
+ @transport.request(
5176
+ http_method: "GET",
5177
+ path: "/api/org/{orgId}/ownership/members",
5178
+ path_params: { "orgId" => org_id },
5179
+ request_options: request_options
5180
+ )
5181
+ end
5182
+
5183
+ # Get one resource's ownership
5184
+ #
5185
+ # The ownership record for a single resource, or null when none is recorded.
5186
+ #
5187
+ # _Requires permission: `resources:read`._
5188
+ #
5189
+ # GET /api/org/{orgId}/ownership/resource
5190
+ #
5191
+ # Raises on 400: Bad request
5192
+ #
5193
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
5194
+ # constructed with.
5195
+ # @param resource_id [String]
5196
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
5197
+ # @return [Hash] Parsed JSON, shaped as `ResourceOwnershipEnvelope` — see
5198
+ # `sig/infrawrench/sdk.rbs`.
5199
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
5200
+ def resource(resource_id:, org_id: nil, request_options: nil)
5201
+ @transport.request(
5202
+ http_method: "GET",
5203
+ path: "/api/org/{orgId}/ownership/resource",
5204
+ path_params: { "orgId" => org_id },
5205
+ query: { "resourceId" => resource_id },
5206
+ request_options: request_options
5207
+ )
5208
+ end
5209
+
5210
+ # Set a resource's ownership
5211
+ #
5212
+ # Upsert keyed by `resourceId` — ownership is a property of the resource, so
5213
+ # there is no separate create and update. Omitted fields keep their value
5214
+ # and `null` clears one. Clearing every field removes the record entirely
5215
+ # and the response is `null`, which is the new truth rather than an empty
5216
+ # record. An `ownerUserId` must be a member of this organization: ownership
5217
+ # that looks routable but reaches nobody is worse than none.
5218
+ #
5219
+ # _Requires permission: `resources:write`._
5220
+ #
5221
+ # PUT /api/org/{orgId}/ownership
5222
+ #
5223
+ # Raises on 400: Bad request
5224
+ #
5225
+ # Raises on 404: Not found
5226
+ #
5227
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
5228
+ # constructed with.
5229
+ # @param body [Hash, nil] Request body, shaped as `ResourceOwnershipPatch`.
5230
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
5231
+ # @return [Hash] Parsed JSON, shaped as `ResourceOwnership & Hash | nil` — see
5232
+ # `sig/infrawrench/sdk.rbs`.
5233
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
5234
+ def update(org_id: nil, body: nil, request_options: nil)
5235
+ @transport.request(
5236
+ http_method: "PUT",
5237
+ path: "/api/org/{orgId}/ownership",
5238
+ path_params: { "orgId" => org_id },
5239
+ body: body,
5240
+ request_options: request_options
5241
+ )
5242
+ end
5243
+ end
5244
+
4915
5245
  # `client.pages`
4916
5246
  class PagesNamespace
4917
5247
  # @api private
@@ -7176,10 +7506,13 @@ module Infrawrench
7176
7506
  @transport = transport
7177
7507
  end
7178
7508
 
7179
- # Route alerts to a Slack channel
7509
+ # Connect a Slack channel as an alert destination
7180
7510
  #
7181
- # Adds a channel, or updates the trigger opt-ins of one already added. Each
7182
- # trigger defaults to enabled.
7511
+ # Adds a channel as a possible destination, or refreshes the cached name of
7512
+ # one already added. Which alerts reach it is decided by /alert-rules; an
7513
+ # organization with no rules falls back to the default (everything except
7514
+ # drift, everywhere), so a freshly added channel starts receiving alerts
7515
+ # without a second step.
7183
7516
  #
7184
7517
  # POST /api/org/{orgId}/slack/channels
7185
7518
  #
@@ -7203,7 +7536,7 @@ module Infrawrench
7203
7536
  )
7204
7537
  end
7205
7538
 
7206
- # Stop routing alerts to a channel
7539
+ # Disconnect a channel
7207
7540
  #
7208
7541
  # DELETE /api/org/{orgId}/slack/channels/{id}
7209
7542
  #
@@ -7224,7 +7557,7 @@ module Infrawrench
7224
7557
  )
7225
7558
  end
7226
7559
 
7227
- # Change which alerts a channel receives
7560
+ # Refresh a channel's cached name
7228
7561
  #
7229
7562
  # PATCH /api/org/{orgId}/slack/channels/{id}
7230
7563
  #
@@ -7368,9 +7701,9 @@ module Infrawrench
7368
7701
 
7369
7702
  # Post a test message to every configured channel
7370
7703
  #
7371
- # Ignores trigger opt-ins — every channel gets the test. Fails with the
7372
- # Slack error when nothing could be delivered (`not_in_channel` means the
7373
- # bot needs inviting to a private channel).
7704
+ # Ignores routing rules — every channel gets the test. Fails with the Slack
7705
+ # error when nothing could be delivered (`not_in_channel` means the bot
7706
+ # needs inviting to a private channel).
7374
7707
  #
7375
7708
  # POST /api/org/{orgId}/slack/test
7376
7709
  #
@@ -7894,6 +8227,41 @@ module Infrawrench
7894
8227
  end
7895
8228
  end
7896
8229
 
8230
+ # `client.status`
8231
+ class StatusNamespace
8232
+ # @api private
8233
+ # @param transport [Transport]
8234
+ def initialize(transport)
8235
+ @transport = transport
8236
+ end
8237
+
8238
+ # Read a public status page
8239
+ #
8240
+ # **Unauthenticated.** The only endpoint in this API that takes no
8241
+ # credentials — a status page exists for people with no account. The payload
8242
+ # carries labels, states and uptime history only: probe URLs, resource and
8243
+ # account ids, the organization id and error detail are never included. An
8244
+ # unpublished page and an unknown slug both answer 404, so the endpoint
8245
+ # cannot be used to confirm that a slug is real.
8246
+ #
8247
+ # GET /api/status/{slug}
8248
+ #
8249
+ # Raises on 404: Not found
8250
+ #
8251
+ # @param slug [String]
8252
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
8253
+ # @return [Hash] Parsed JSON, shaped as `PublicStatusPage` — see `sig/infrawrench/sdk.rbs`.
8254
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
8255
+ def get(slug:, request_options: nil)
8256
+ @transport.request(
8257
+ http_method: "GET",
8258
+ path: "/api/status/{slug}",
8259
+ path_params: { "slug" => slug },
8260
+ request_options: request_options
8261
+ )
8262
+ end
8263
+ end
8264
+
7897
8265
  # `client.status_incidents`
7898
8266
  class StatusIncidentsNamespace
7899
8267
  # @api private
@@ -7935,6 +8303,152 @@ module Infrawrench
7935
8303
  end
7936
8304
  end
7937
8305
 
8306
+ # `client.status_pages`
8307
+ class StatusPagesNamespace
8308
+ # @api private
8309
+ # @param transport [Transport]
8310
+ def initialize(transport)
8311
+ @transport = transport
8312
+ end
8313
+
8314
+ # Create a status page
8315
+ #
8316
+ # Creates a page with a freshly generated slug. `published` defaults to
8317
+ # false, so creating a page never exposes anything — publish it as a
8318
+ # separate, deliberate step.
8319
+ #
8320
+ # _Requires permission: `resources:write`._
8321
+ #
8322
+ # POST /api/org/{orgId}/status-pages
8323
+ #
8324
+ # Raises on 400: Bad request
8325
+ #
8326
+ # Raises on 404: Not found
8327
+ #
8328
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
8329
+ # constructed with.
8330
+ # @param body [Hash, nil] Request body, shaped as `StatusPageCreate`.
8331
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
8332
+ # @return [Hash] Parsed JSON, shaped as `StatusPage` — see `sig/infrawrench/sdk.rbs`.
8333
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
8334
+ def create(org_id: nil, body: nil, request_options: nil)
8335
+ @transport.request(
8336
+ http_method: "POST",
8337
+ path: "/api/org/{orgId}/status-pages",
8338
+ path_params: { "orgId" => org_id },
8339
+ body: body,
8340
+ request_options: request_options
8341
+ )
8342
+ end
8343
+
8344
+ # Delete a status page
8345
+ #
8346
+ # The page's link stops working. The probes it published are untouched.
8347
+ #
8348
+ # _Requires permission: `resources:write`._
8349
+ #
8350
+ # DELETE /api/org/{orgId}/status-pages/{id}
8351
+ #
8352
+ # Raises on 404: Not found
8353
+ #
8354
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
8355
+ # constructed with.
8356
+ # @param id [String]
8357
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
8358
+ # @return [nil] This endpoint returns no content.
8359
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
8360
+ def delete(id:, org_id: nil, request_options: nil)
8361
+ @transport.request(
8362
+ http_method: "DELETE",
8363
+ path: "/api/org/{orgId}/status-pages/{id}",
8364
+ path_params: { "orgId" => org_id, "id" => id },
8365
+ accept: :empty,
8366
+ request_options: request_options
8367
+ )
8368
+ end
8369
+
8370
+ # List status pages
8371
+ #
8372
+ # Every status page in the organization, with the probes each publishes and
8373
+ # whether it is currently reachable.
8374
+ #
8375
+ # _Requires permission: `resources:read`._
8376
+ #
8377
+ # GET /api/org/{orgId}/status-pages
8378
+ #
8379
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
8380
+ # constructed with.
8381
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
8382
+ # @return [Hash] Parsed JSON, shaped as `StatusPageListResponse` — see
8383
+ # `sig/infrawrench/sdk.rbs`.
8384
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
8385
+ def get(org_id: nil, request_options: nil)
8386
+ @transport.request(
8387
+ http_method: "GET",
8388
+ path: "/api/org/{orgId}/status-pages",
8389
+ path_params: { "orgId" => org_id },
8390
+ request_options: request_options
8391
+ )
8392
+ end
8393
+
8394
+ # Issue a new public link
8395
+ #
8396
+ # Replaces the slug, revoking the current public URL immediately — the
8397
+ # reroll for a link that ended up somewhere unintended. The page stays
8398
+ # published.
8399
+ #
8400
+ # _Requires permission: `resources:write`._
8401
+ #
8402
+ # POST /api/org/{orgId}/status-pages/{id}/rotate-slug
8403
+ #
8404
+ # Raises on 404: Not found
8405
+ #
8406
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
8407
+ # constructed with.
8408
+ # @param id [String]
8409
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
8410
+ # @return [Hash] Parsed JSON, shaped as `StatusPage` — see `sig/infrawrench/sdk.rbs`.
8411
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
8412
+ def rotate_slug(id:, org_id: nil, request_options: nil)
8413
+ @transport.request(
8414
+ http_method: "POST",
8415
+ path: "/api/org/{orgId}/status-pages/{id}/rotate-slug",
8416
+ path_params: { "orgId" => org_id, "id" => id },
8417
+ request_options: request_options
8418
+ )
8419
+ end
8420
+
8421
+ # Update a status page
8422
+ #
8423
+ # Omitted fields keep their value. `components`, when present, replaces the
8424
+ # whole ordered set — which is also how a reorder is expressed.
8425
+ #
8426
+ # _Requires permission: `resources:write`._
8427
+ #
8428
+ # PUT /api/org/{orgId}/status-pages/{id}
8429
+ #
8430
+ # Raises on 400: Bad request
8431
+ #
8432
+ # Raises on 404: Not found
8433
+ #
8434
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
8435
+ # constructed with.
8436
+ # @param id [String]
8437
+ # @param body [Hash, nil] Request body, shaped as `StatusPagePatch`.
8438
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
8439
+ # @return [Hash] Parsed JSON, shaped as `StatusPage` — see `sig/infrawrench/sdk.rbs`.
8440
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
8441
+ def update(id:, org_id: nil, body: nil, request_options: nil)
8442
+ @transport.request(
8443
+ http_method: "PUT",
8444
+ path: "/api/org/{orgId}/status-pages/{id}",
8445
+ path_params: { "orgId" => org_id, "id" => id },
8446
+ body: body,
8447
+ request_options: request_options
8448
+ )
8449
+ end
8450
+ end
8451
+
7938
8452
  # `client.storage`
7939
8453
  class StorageNamespace
7940
8454
  # @api private
@@ -8708,6 +9222,8 @@ module Infrawrench
8708
9222
  attr_reader :accounts
8709
9223
  # @return [AgentsNamespace] `client.agents`
8710
9224
  attr_reader :agents
9225
+ # @return [AlertRulesNamespace] `client.alert_rules`
9226
+ attr_reader :alert_rules
8711
9227
  # @return [ApiKeysNamespace] `client.api_keys`
8712
9228
  attr_reader :api_keys
8713
9229
  # @return [ArtifactsNamespace] `client.artifacts`
@@ -8772,6 +9288,8 @@ module Infrawrench
8772
9288
  attr_reader :orgs
8773
9289
  # @return [OrphansNamespace] `client.orphans`
8774
9290
  attr_reader :orphans
9291
+ # @return [OwnershipNamespace] `client.ownership`
9292
+ attr_reader :ownership
8775
9293
  # @return [PagesNamespace] `client.pages`
8776
9294
  attr_reader :pages
8777
9295
  # @return [PostureNamespace] `client.posture`
@@ -8802,8 +9320,12 @@ module Infrawrench
8802
9320
  attr_reader :ssh_keys
8803
9321
  # @return [SshTunnelsNamespace] `client.ssh_tunnels`
8804
9322
  attr_reader :ssh_tunnels
9323
+ # @return [StatusNamespace] `client.status`
9324
+ attr_reader :status
8805
9325
  # @return [StatusIncidentsNamespace] `client.status_incidents`
8806
9326
  attr_reader :status_incidents
9327
+ # @return [StatusPagesNamespace] `client.status_pages`
9328
+ attr_reader :status_pages
8807
9329
  # @return [StorageNamespace] `client.storage`
8808
9330
  attr_reader :storage
8809
9331
  # @return [TagPolicyNamespace] `client.tag_policy`
@@ -8823,6 +9345,7 @@ module Infrawrench
8823
9345
  @access_requests = AccessRequestsNamespace.new(@transport)
8824
9346
  @accounts = AccountsNamespace.new(@transport)
8825
9347
  @agents = AgentsNamespace.new(@transport)
9348
+ @alert_rules = AlertRulesNamespace.new(@transport)
8826
9349
  @api_keys = ApiKeysNamespace.new(@transport)
8827
9350
  @artifacts = ArtifactsNamespace.new(@transport)
8828
9351
  @associations = AssociationsNamespace.new(@transport)
@@ -8855,6 +9378,7 @@ module Infrawrench
8855
9378
  @msteams = MsteamsNamespace.new(@transport)
8856
9379
  @orgs = OrgsNamespace.new(@transport)
8857
9380
  @orphans = OrphansNamespace.new(@transport)
9381
+ @ownership = OwnershipNamespace.new(@transport)
8858
9382
  @pages = PagesNamespace.new(@transport)
8859
9383
  @posture = PostureNamespace.new(@transport)
8860
9384
  @probes = ProbesNamespace.new(@transport)
@@ -8870,7 +9394,9 @@ module Infrawrench
8870
9394
  @ssh_fanout = SshFanoutNamespace.new(@transport)
8871
9395
  @ssh_keys = SshKeysNamespace.new(@transport)
8872
9396
  @ssh_tunnels = SshTunnelsNamespace.new(@transport)
9397
+ @status = StatusNamespace.new(@transport)
8873
9398
  @status_incidents = StatusIncidentsNamespace.new(@transport)
9399
+ @status_pages = StatusPagesNamespace.new(@transport)
8874
9400
  @storage = StorageNamespace.new(@transport)
8875
9401
  @tag_policy = TagPolicyNamespace.new(@transport)
8876
9402
  @team = TeamNamespace.new(@transport)