infrawrench-sdk 1.52.0 → 1.55.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 +4 -4
- data/README.md +2 -2
- data/infrawrench-sdk.gemspec +4 -4
- data/lib/infrawrench/client.rb +858 -32
- data/lib/infrawrench/sdk.rb +2 -2
- data/lib/infrawrench/transport.rb +2 -2
- data/lib/infrawrench/version.rb +3 -3
- data/lib/infrawrench-sdk.rb +2 -2
- data/sig/infrawrench/sdk.rbs +516 -14
- metadata +3 -3
data/lib/infrawrench/client.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# infrawrench-sdk v1.
|
|
3
|
+
# infrawrench-sdk v1.55.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.
|
|
6
|
+
# Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.55.0).
|
|
7
7
|
#
|
|
8
8
|
# DO NOT EDIT. Regenerate with:
|
|
9
9
|
# pnpm --filter @infrawrench/web generate:sdk
|
|
@@ -2502,6 +2502,68 @@ module Infrawrench
|
|
|
2502
2502
|
)
|
|
2503
2503
|
end
|
|
2504
2504
|
|
|
2505
|
+
# Preview a rule or customer pricing against a month of spend
|
|
2506
|
+
#
|
|
2507
|
+
# Prices one calendar month (last month by default) twice: with the saved
|
|
2508
|
+
# rules and settings, and with the candidate rule or customer settings
|
|
2509
|
+
# swapped in. Nothing is written. Returns both totals, every effect,
|
|
2510
|
+
# re-rating coverage, any expression failures and the lines that moved most.
|
|
2511
|
+
#
|
|
2512
|
+
# Requires `costs:read`, and `invoices:read` as well when a customer is
|
|
2513
|
+
# named.
|
|
2514
|
+
#
|
|
2515
|
+
# _Requires permission: `costs:read`._
|
|
2516
|
+
#
|
|
2517
|
+
# POST /api/org/{orgId}/billing-rules/preview
|
|
2518
|
+
#
|
|
2519
|
+
# Raises on 400: Bad request
|
|
2520
|
+
#
|
|
2521
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
2522
|
+
# constructed with.
|
|
2523
|
+
# @param body [Hash] Request body, shaped as `PricingPreviewRequest`.
|
|
2524
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
2525
|
+
# @return [Hash] Parsed JSON, shaped as `PricingPreviewResult` — see
|
|
2526
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
2527
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
2528
|
+
def preview(body:, org_id: nil, request_options: nil)
|
|
2529
|
+
@transport.request(
|
|
2530
|
+
http_method: "POST",
|
|
2531
|
+
path: "/api/org/{orgId}/billing-rules/preview",
|
|
2532
|
+
path_params: { "orgId" => org_id },
|
|
2533
|
+
body: body,
|
|
2534
|
+
request_options: request_options
|
|
2535
|
+
)
|
|
2536
|
+
end
|
|
2537
|
+
|
|
2538
|
+
# Reorder billing rules
|
|
2539
|
+
#
|
|
2540
|
+
# Rewrites every rule's priority to match the given order (10, 20, 30…) in
|
|
2541
|
+
# one transaction and one audit entry. The list must name every rule exactly
|
|
2542
|
+
# once.
|
|
2543
|
+
#
|
|
2544
|
+
# _Requires permission: `org:settings:write`._
|
|
2545
|
+
#
|
|
2546
|
+
# POST /api/org/{orgId}/billing-rules/reorder
|
|
2547
|
+
#
|
|
2548
|
+
# Raises on 400: Bad request
|
|
2549
|
+
#
|
|
2550
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
2551
|
+
# constructed with.
|
|
2552
|
+
# @param body [Hash] Request body, shaped as `BillingRuleOrder`.
|
|
2553
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
2554
|
+
# @return [Array<Hash>] Parsed JSON, shaped as `Array<BillingRule>` — see
|
|
2555
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
2556
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
2557
|
+
def reorder(body:, org_id: nil, request_options: nil)
|
|
2558
|
+
@transport.request(
|
|
2559
|
+
http_method: "POST",
|
|
2560
|
+
path: "/api/org/{orgId}/billing-rules/reorder",
|
|
2561
|
+
path_params: { "orgId" => org_id },
|
|
2562
|
+
body: body,
|
|
2563
|
+
request_options: request_options
|
|
2564
|
+
)
|
|
2565
|
+
end
|
|
2566
|
+
|
|
2505
2567
|
# Update a billing rule
|
|
2506
2568
|
#
|
|
2507
2569
|
# A full replace, `enabled` included — switching a markup off is an edit of
|
|
@@ -4328,62 +4390,500 @@ module Infrawrench
|
|
|
4328
4390
|
# A hard delete. A withdrawn explanation should stop being drawn, and
|
|
4329
4391
|
# nothing references a note by id.
|
|
4330
4392
|
#
|
|
4331
|
-
# _Requires permission: `costs:write`._
|
|
4393
|
+
# _Requires permission: `costs:write`._
|
|
4394
|
+
#
|
|
4395
|
+
# DELETE /api/org/{orgId}/cost-annotations/{id}
|
|
4396
|
+
#
|
|
4397
|
+
# Raises on 404: Not found
|
|
4398
|
+
#
|
|
4399
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4400
|
+
# constructed with.
|
|
4401
|
+
# @param id [String]
|
|
4402
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4403
|
+
# @return [Hash] Parsed JSON, shaped as `Ok` — see `sig/infrawrench/sdk.rbs`.
|
|
4404
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4405
|
+
def delete(id:, org_id: nil, request_options: nil)
|
|
4406
|
+
@transport.request(
|
|
4407
|
+
http_method: "DELETE",
|
|
4408
|
+
path: "/api/org/{orgId}/cost-annotations/{id}",
|
|
4409
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4410
|
+
request_options: request_options
|
|
4411
|
+
)
|
|
4412
|
+
end
|
|
4413
|
+
|
|
4414
|
+
# List cost annotations
|
|
4415
|
+
#
|
|
4416
|
+
# Dated notes drawn over cost charts. With `reportId`, the set a chart for
|
|
4417
|
+
# that report draws: the org-wide notes plus that report's own. Without it,
|
|
4418
|
+
# every annotation in the org. Annotations are an overlay — they never
|
|
4419
|
+
# appear in a series, a total, or an axis.
|
|
4420
|
+
#
|
|
4421
|
+
# _Requires permission: `costs:read`._
|
|
4422
|
+
#
|
|
4423
|
+
# GET /api/org/{orgId}/cost-annotations
|
|
4424
|
+
#
|
|
4425
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4426
|
+
# constructed with.
|
|
4427
|
+
# @param report_id [String, nil] Scope to the notes a chart for this report should draw.
|
|
4428
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4429
|
+
# @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
|
|
4430
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4431
|
+
def get(org_id: nil, report_id: nil, request_options: nil)
|
|
4432
|
+
@transport.request(
|
|
4433
|
+
http_method: "GET",
|
|
4434
|
+
path: "/api/org/{orgId}/cost-annotations",
|
|
4435
|
+
path_params: { "orgId" => org_id },
|
|
4436
|
+
query: { "reportId" => report_id },
|
|
4437
|
+
request_options: request_options
|
|
4438
|
+
)
|
|
4439
|
+
end
|
|
4440
|
+
|
|
4441
|
+
# Update a cost annotation
|
|
4442
|
+
#
|
|
4443
|
+
# Replaces the note's dates, text and scope. Moving a note between org-wide
|
|
4444
|
+
# and one report is this same PUT with a different `costReportId`.
|
|
4445
|
+
#
|
|
4446
|
+
# _Requires permission: `costs:write`._
|
|
4447
|
+
#
|
|
4448
|
+
# PUT /api/org/{orgId}/cost-annotations/{id}
|
|
4449
|
+
#
|
|
4450
|
+
# Raises on 400: Bad request
|
|
4451
|
+
#
|
|
4452
|
+
# Raises on 404: Not found
|
|
4453
|
+
#
|
|
4454
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4455
|
+
# constructed with.
|
|
4456
|
+
# @param id [String]
|
|
4457
|
+
# @param body [Hash] Request body, shaped as `CostAnnotationInput`.
|
|
4458
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4459
|
+
# @return [Hash] Parsed JSON, shaped as `CostAnnotation` — see `sig/infrawrench/sdk.rbs`.
|
|
4460
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4461
|
+
def update(id:, body:, org_id: nil, request_options: nil)
|
|
4462
|
+
@transport.request(
|
|
4463
|
+
http_method: "PUT",
|
|
4464
|
+
path: "/api/org/{orgId}/cost-annotations/{id}",
|
|
4465
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4466
|
+
body: body,
|
|
4467
|
+
request_options: request_options
|
|
4468
|
+
)
|
|
4469
|
+
end
|
|
4470
|
+
end
|
|
4471
|
+
|
|
4472
|
+
# `client.cost_canvases.notifications`
|
|
4473
|
+
class CostCanvasesNotificationsNamespace
|
|
4474
|
+
# @api private
|
|
4475
|
+
# @param transport [Transport]
|
|
4476
|
+
def initialize(transport)
|
|
4477
|
+
@transport = transport
|
|
4478
|
+
end
|
|
4479
|
+
|
|
4480
|
+
# Create a canvas delivery schedule
|
|
4481
|
+
#
|
|
4482
|
+
# _Requires permission: `org:settings:write`._
|
|
4483
|
+
#
|
|
4484
|
+
# POST /api/org/{orgId}/cost-canvases/{id}/notifications
|
|
4485
|
+
#
|
|
4486
|
+
# Raises on 400: Bad request
|
|
4487
|
+
#
|
|
4488
|
+
# Raises on 404: Not found
|
|
4489
|
+
#
|
|
4490
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4491
|
+
# constructed with.
|
|
4492
|
+
# @param id [String]
|
|
4493
|
+
# @param body [Hash] Request body, shaped as `DashboardNotificationInput`.
|
|
4494
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4495
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvasNotification` — see
|
|
4496
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4497
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4498
|
+
def create(id:, body:, org_id: nil, request_options: nil)
|
|
4499
|
+
@transport.request(
|
|
4500
|
+
http_method: "POST",
|
|
4501
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/notifications",
|
|
4502
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4503
|
+
body: body,
|
|
4504
|
+
request_options: request_options
|
|
4505
|
+
)
|
|
4506
|
+
end
|
|
4507
|
+
|
|
4508
|
+
# Delete a canvas delivery schedule
|
|
4509
|
+
#
|
|
4510
|
+
# _Requires permission: `org:settings:write`._
|
|
4511
|
+
#
|
|
4512
|
+
# DELETE /api/org/{orgId}/cost-canvases/{id}/notifications/{notificationId}
|
|
4513
|
+
#
|
|
4514
|
+
# Raises on 404: Not found
|
|
4515
|
+
#
|
|
4516
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4517
|
+
# constructed with.
|
|
4518
|
+
# @param id [String]
|
|
4519
|
+
# @param notification_id [String]
|
|
4520
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4521
|
+
# @return [Hash] Parsed JSON, shaped as `Ok` — see `sig/infrawrench/sdk.rbs`.
|
|
4522
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4523
|
+
def delete(id:, notification_id:, org_id: nil, request_options: nil)
|
|
4524
|
+
@transport.request(
|
|
4525
|
+
http_method: "DELETE",
|
|
4526
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/notifications/{notificationId}",
|
|
4527
|
+
path_params: { "orgId" => org_id, "id" => id, "notificationId" => notification_id },
|
|
4528
|
+
request_options: request_options
|
|
4529
|
+
)
|
|
4530
|
+
end
|
|
4531
|
+
|
|
4532
|
+
# List a canvas's delivery schedules
|
|
4533
|
+
#
|
|
4534
|
+
# _Requires permission: `costs:read`._
|
|
4535
|
+
#
|
|
4536
|
+
# GET /api/org/{orgId}/cost-canvases/{id}/notifications
|
|
4537
|
+
#
|
|
4538
|
+
# Raises on 404: Not found
|
|
4539
|
+
#
|
|
4540
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4541
|
+
# constructed with.
|
|
4542
|
+
# @param id [String]
|
|
4543
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4544
|
+
# @return [Array<Hash>] Parsed JSON, shaped as `Array<CostCanvasNotification>` — see
|
|
4545
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4546
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4547
|
+
def list(id:, org_id: nil, request_options: nil)
|
|
4548
|
+
@transport.request(
|
|
4549
|
+
http_method: "GET",
|
|
4550
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/notifications",
|
|
4551
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4552
|
+
request_options: request_options
|
|
4553
|
+
)
|
|
4554
|
+
end
|
|
4555
|
+
|
|
4556
|
+
# Send a canvas delivery now
|
|
4557
|
+
#
|
|
4558
|
+
# _Requires permission: `org:settings:write`._
|
|
4559
|
+
#
|
|
4560
|
+
# POST
|
|
4561
|
+
# /api/org/{orgId}/cost-canvases/{id}/notifications/{notificationId}/send
|
|
4562
|
+
#
|
|
4563
|
+
# Raises on 400: Bad request
|
|
4564
|
+
#
|
|
4565
|
+
# Raises on 404: Not found
|
|
4566
|
+
#
|
|
4567
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4568
|
+
# constructed with.
|
|
4569
|
+
# @param id [String]
|
|
4570
|
+
# @param notification_id [String]
|
|
4571
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4572
|
+
# @return [Hash] Parsed JSON, shaped as `DashboardNotificationSendResult` — see
|
|
4573
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4574
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4575
|
+
def post_org_org_id_cost_canvases_id_notifications_notification_id_send(
|
|
4576
|
+
id:,
|
|
4577
|
+
notification_id:,
|
|
4578
|
+
org_id: nil,
|
|
4579
|
+
request_options: nil
|
|
4580
|
+
)
|
|
4581
|
+
@transport.request(
|
|
4582
|
+
http_method: "POST",
|
|
4583
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/notifications/{notificationId}/send",
|
|
4584
|
+
path_params: { "orgId" => org_id, "id" => id, "notificationId" => notification_id },
|
|
4585
|
+
request_options: request_options
|
|
4586
|
+
)
|
|
4587
|
+
end
|
|
4588
|
+
|
|
4589
|
+
# List the destinations a canvas schedule can deliver to
|
|
4590
|
+
#
|
|
4591
|
+
# _Requires permission: `org:settings:write`._
|
|
4592
|
+
#
|
|
4593
|
+
# GET /api/org/{orgId}/cost-canvases/{id}/notifications/targets
|
|
4594
|
+
#
|
|
4595
|
+
# Raises on 404: Not found
|
|
4596
|
+
#
|
|
4597
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4598
|
+
# constructed with.
|
|
4599
|
+
# @param id [String]
|
|
4600
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4601
|
+
# @return [Hash] Parsed JSON, shaped as `ReportDeliveryTargets` — see
|
|
4602
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4603
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4604
|
+
def targets(id:, org_id: nil, request_options: nil)
|
|
4605
|
+
@transport.request(
|
|
4606
|
+
http_method: "GET",
|
|
4607
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/notifications/targets",
|
|
4608
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4609
|
+
request_options: request_options
|
|
4610
|
+
)
|
|
4611
|
+
end
|
|
4612
|
+
|
|
4613
|
+
# Replace a canvas delivery schedule
|
|
4614
|
+
#
|
|
4615
|
+
# _Requires permission: `org:settings:write`._
|
|
4616
|
+
#
|
|
4617
|
+
# PUT /api/org/{orgId}/cost-canvases/{id}/notifications/{notificationId}
|
|
4618
|
+
#
|
|
4619
|
+
# Raises on 400: Bad request
|
|
4620
|
+
#
|
|
4621
|
+
# Raises on 404: Not found
|
|
4622
|
+
#
|
|
4623
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4624
|
+
# constructed with.
|
|
4625
|
+
# @param id [String]
|
|
4626
|
+
# @param notification_id [String]
|
|
4627
|
+
# @param body [Hash] Request body, shaped as `DashboardNotificationInput`.
|
|
4628
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4629
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvasNotification` — see
|
|
4630
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4631
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4632
|
+
def update(id:, notification_id:, body:, org_id: nil, request_options: nil)
|
|
4633
|
+
@transport.request(
|
|
4634
|
+
http_method: "PUT",
|
|
4635
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/notifications/{notificationId}",
|
|
4636
|
+
path_params: { "orgId" => org_id, "id" => id, "notificationId" => notification_id },
|
|
4637
|
+
body: body,
|
|
4638
|
+
request_options: request_options
|
|
4639
|
+
)
|
|
4640
|
+
end
|
|
4641
|
+
end
|
|
4642
|
+
|
|
4643
|
+
# `client.cost_canvases`
|
|
4644
|
+
class CostCanvasesNamespace
|
|
4645
|
+
# @return [CostCanvasesNotificationsNamespace] `client.cost_canvases.notifications`
|
|
4646
|
+
attr_reader :notifications
|
|
4647
|
+
|
|
4648
|
+
# @api private
|
|
4649
|
+
# @param transport [Transport]
|
|
4650
|
+
def initialize(transport)
|
|
4651
|
+
@transport = transport
|
|
4652
|
+
@notifications = CostCanvasesNotificationsNamespace.new(@transport)
|
|
4653
|
+
end
|
|
4654
|
+
|
|
4655
|
+
# Open the caller's editing conversation for a canvas
|
|
4656
|
+
#
|
|
4657
|
+
# _Requires permission: `costs:write`._
|
|
4658
|
+
#
|
|
4659
|
+
# POST /api/org/{orgId}/cost-canvases/{id}/conversation
|
|
4660
|
+
#
|
|
4661
|
+
# Raises on 404: Not found
|
|
4662
|
+
#
|
|
4663
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4664
|
+
# constructed with.
|
|
4665
|
+
# @param id [String]
|
|
4666
|
+
# @param body [Hash, nil] Request body, shaped as `Hash`.
|
|
4667
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4668
|
+
# @return [Hash] Parsed JSON, shaped as `Hash` — see `sig/infrawrench/sdk.rbs`.
|
|
4669
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4670
|
+
def conversation(id:, org_id: nil, body: nil, request_options: nil)
|
|
4671
|
+
@transport.request(
|
|
4672
|
+
http_method: "POST",
|
|
4673
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/conversation",
|
|
4674
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4675
|
+
body: body,
|
|
4676
|
+
request_options: request_options
|
|
4677
|
+
)
|
|
4678
|
+
end
|
|
4679
|
+
|
|
4680
|
+
# Create a cost canvas from a spec
|
|
4681
|
+
#
|
|
4682
|
+
# _Requires permission: `costs:write`._
|
|
4683
|
+
#
|
|
4684
|
+
# POST /api/org/{orgId}/cost-canvases
|
|
4685
|
+
#
|
|
4686
|
+
# Raises on 400: Bad request
|
|
4687
|
+
#
|
|
4688
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4689
|
+
# constructed with.
|
|
4690
|
+
# @param body [Hash] Request body, shaped as `CostCanvasInput`.
|
|
4691
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4692
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvas` — see `sig/infrawrench/sdk.rbs`.
|
|
4693
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4694
|
+
def create(body:, org_id: nil, request_options: nil)
|
|
4695
|
+
@transport.request(
|
|
4696
|
+
http_method: "POST",
|
|
4697
|
+
path: "/api/org/{orgId}/cost-canvases",
|
|
4698
|
+
path_params: { "orgId" => org_id },
|
|
4699
|
+
body: body,
|
|
4700
|
+
request_options: request_options
|
|
4701
|
+
)
|
|
4702
|
+
end
|
|
4703
|
+
|
|
4704
|
+
# Delete a cost canvas
|
|
4705
|
+
#
|
|
4706
|
+
# Soft delete. Its dashboard cards and delivery schedules go with it.
|
|
4707
|
+
#
|
|
4708
|
+
# _Requires permission: `costs:write`._
|
|
4709
|
+
#
|
|
4710
|
+
# DELETE /api/org/{orgId}/cost-canvases/{id}
|
|
4711
|
+
#
|
|
4712
|
+
# Raises on 404: Not found
|
|
4713
|
+
#
|
|
4714
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4715
|
+
# constructed with.
|
|
4716
|
+
# @param id [String]
|
|
4717
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4718
|
+
# @return [Hash] Parsed JSON, shaped as `Ok` — see `sig/infrawrench/sdk.rbs`.
|
|
4719
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4720
|
+
def delete(id:, org_id: nil, request_options: nil)
|
|
4721
|
+
@transport.request(
|
|
4722
|
+
http_method: "DELETE",
|
|
4723
|
+
path: "/api/org/{orgId}/cost-canvases/{id}",
|
|
4724
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4725
|
+
request_options: request_options
|
|
4726
|
+
)
|
|
4727
|
+
end
|
|
4728
|
+
|
|
4729
|
+
# Start a canvas from a description
|
|
4730
|
+
#
|
|
4731
|
+
# Creates an empty canvas and a chat conversation linked to it. Send
|
|
4732
|
+
# `prompt` as the conversation's first message (`POST
|
|
4733
|
+
# /chat/conversations/{id}/messages`); the agent writes the spec. Needs
|
|
4734
|
+
# `chat:write` as well as `costs:write`.
|
|
4735
|
+
#
|
|
4736
|
+
# _Requires permission: `costs:write`._
|
|
4737
|
+
#
|
|
4738
|
+
# POST /api/org/{orgId}/cost-canvases/draft
|
|
4739
|
+
#
|
|
4740
|
+
# Raises on 400: Bad request
|
|
4741
|
+
#
|
|
4742
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4743
|
+
# constructed with.
|
|
4744
|
+
# @param body [Hash] Request body, shaped as `CostCanvasDraftInput`.
|
|
4745
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4746
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvas` — see `sig/infrawrench/sdk.rbs`.
|
|
4747
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4748
|
+
def draft(body:, org_id: nil, request_options: nil)
|
|
4749
|
+
@transport.request(
|
|
4750
|
+
http_method: "POST",
|
|
4751
|
+
path: "/api/org/{orgId}/cost-canvases/draft",
|
|
4752
|
+
path_params: { "orgId" => org_id },
|
|
4753
|
+
body: body,
|
|
4754
|
+
request_options: request_options
|
|
4755
|
+
)
|
|
4756
|
+
end
|
|
4757
|
+
|
|
4758
|
+
# Get a cost canvas
|
|
4759
|
+
#
|
|
4760
|
+
# _Requires permission: `costs:read`._
|
|
4761
|
+
#
|
|
4762
|
+
# GET /api/org/{orgId}/cost-canvases/{id}
|
|
4763
|
+
#
|
|
4764
|
+
# Raises on 404: Not found
|
|
4765
|
+
#
|
|
4766
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4767
|
+
# constructed with.
|
|
4768
|
+
# @param id [String]
|
|
4769
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4770
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvas` — see `sig/infrawrench/sdk.rbs`.
|
|
4771
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4772
|
+
def get(id:, org_id: nil, request_options: nil)
|
|
4773
|
+
@transport.request(
|
|
4774
|
+
http_method: "GET",
|
|
4775
|
+
path: "/api/org/{orgId}/cost-canvases/{id}",
|
|
4776
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4777
|
+
request_options: request_options
|
|
4778
|
+
)
|
|
4779
|
+
end
|
|
4780
|
+
|
|
4781
|
+
# List cost canvases
|
|
4782
|
+
#
|
|
4783
|
+
# _Requires permission: `costs:read`._
|
|
4784
|
+
#
|
|
4785
|
+
# GET /api/org/{orgId}/cost-canvases
|
|
4786
|
+
#
|
|
4787
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4788
|
+
# constructed with.
|
|
4789
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4790
|
+
# @return [Array<Hash>] Parsed JSON, shaped as `Array<CostCanvas>` — see
|
|
4791
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4792
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4793
|
+
def list(org_id: nil, request_options: nil)
|
|
4794
|
+
@transport.request(
|
|
4795
|
+
http_method: "GET",
|
|
4796
|
+
path: "/api/org/{orgId}/cost-canvases",
|
|
4797
|
+
path_params: { "orgId" => org_id },
|
|
4798
|
+
request_options: request_options
|
|
4799
|
+
)
|
|
4800
|
+
end
|
|
4801
|
+
|
|
4802
|
+
# Export a cost canvas as a PDF
|
|
4803
|
+
#
|
|
4804
|
+
# _Requires permission: `costs:read`._
|
|
4805
|
+
#
|
|
4806
|
+
# GET /api/org/{orgId}/cost-canvases/{id}/pdf
|
|
4807
|
+
#
|
|
4808
|
+
# Raises on 404: Not found
|
|
4809
|
+
#
|
|
4810
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4811
|
+
# constructed with.
|
|
4812
|
+
# @param id [String]
|
|
4813
|
+
# @param tz [String, nil] IANA zone the document's generated-at line is written in, e.g.
|
|
4814
|
+
# `Europe/Berlin`. UTC when absent or unknown.
|
|
4815
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4816
|
+
# @return [String] Raw response bytes.
|
|
4817
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4818
|
+
def pdf(id:, org_id: nil, tz: nil, request_options: nil)
|
|
4819
|
+
@transport.request(
|
|
4820
|
+
http_method: "GET",
|
|
4821
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/pdf",
|
|
4822
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4823
|
+
query: { "tz" => tz },
|
|
4824
|
+
accept: :binary,
|
|
4825
|
+
request_options: request_options
|
|
4826
|
+
)
|
|
4827
|
+
end
|
|
4828
|
+
|
|
4829
|
+
# Run an unsaved canvas spec
|
|
4830
|
+
#
|
|
4831
|
+
# _Requires permission: `costs:read`._
|
|
4332
4832
|
#
|
|
4333
|
-
#
|
|
4833
|
+
# POST /api/org/{orgId}/cost-canvases/preview
|
|
4334
4834
|
#
|
|
4335
|
-
# Raises on
|
|
4835
|
+
# Raises on 400: Bad request
|
|
4336
4836
|
#
|
|
4337
4837
|
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4338
4838
|
# constructed with.
|
|
4339
|
-
# @param
|
|
4839
|
+
# @param body [Hash] Request body, shaped as `Hash`.
|
|
4340
4840
|
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4341
|
-
# @return [Hash] Parsed JSON, shaped as `
|
|
4841
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvasRunResult` — see
|
|
4842
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4342
4843
|
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4343
|
-
def
|
|
4844
|
+
def preview(body:, org_id: nil, request_options: nil)
|
|
4344
4845
|
@transport.request(
|
|
4345
|
-
http_method: "
|
|
4346
|
-
path: "/api/org/{orgId}/cost-
|
|
4347
|
-
path_params: { "orgId" => org_id
|
|
4846
|
+
http_method: "POST",
|
|
4847
|
+
path: "/api/org/{orgId}/cost-canvases/preview",
|
|
4848
|
+
path_params: { "orgId" => org_id },
|
|
4849
|
+
body: body,
|
|
4348
4850
|
request_options: request_options
|
|
4349
4851
|
)
|
|
4350
4852
|
end
|
|
4351
4853
|
|
|
4352
|
-
#
|
|
4854
|
+
# Run (refresh) a cost canvas
|
|
4353
4855
|
#
|
|
4354
|
-
#
|
|
4355
|
-
# that report draws: the org-wide notes plus that report's own. Without it,
|
|
4356
|
-
# every annotation in the org. Annotations are an overlay — they never
|
|
4357
|
-
# appear in a series, a total, or an axis.
|
|
4856
|
+
# Re-executes every block's query. Deterministic; no model call.
|
|
4358
4857
|
#
|
|
4359
4858
|
# _Requires permission: `costs:read`._
|
|
4360
4859
|
#
|
|
4361
|
-
#
|
|
4860
|
+
# POST /api/org/{orgId}/cost-canvases/{id}/run
|
|
4861
|
+
#
|
|
4862
|
+
# Raises on 404: Not found
|
|
4362
4863
|
#
|
|
4363
4864
|
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4364
4865
|
# constructed with.
|
|
4365
|
-
# @param
|
|
4866
|
+
# @param id [String]
|
|
4867
|
+
# @param body [Hash, nil] Request body, shaped as `Hash`.
|
|
4366
4868
|
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4367
|
-
# @return [Hash] Parsed JSON, shaped as `
|
|
4869
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvasRunResult` — see
|
|
4870
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
4368
4871
|
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4369
|
-
def
|
|
4872
|
+
def run(id:, org_id: nil, body: nil, request_options: nil)
|
|
4370
4873
|
@transport.request(
|
|
4371
|
-
http_method: "
|
|
4372
|
-
path: "/api/org/{orgId}/cost-
|
|
4373
|
-
path_params: { "orgId" => org_id },
|
|
4374
|
-
|
|
4874
|
+
http_method: "POST",
|
|
4875
|
+
path: "/api/org/{orgId}/cost-canvases/{id}/run",
|
|
4876
|
+
path_params: { "orgId" => org_id, "id" => id },
|
|
4877
|
+
body: body,
|
|
4375
4878
|
request_options: request_options
|
|
4376
4879
|
)
|
|
4377
4880
|
end
|
|
4378
4881
|
|
|
4379
|
-
#
|
|
4380
|
-
#
|
|
4381
|
-
# Replaces the note's dates, text and scope. Moving a note between org-wide
|
|
4382
|
-
# and one report is this same PUT with a different `costReportId`.
|
|
4882
|
+
# Replace a cost canvas
|
|
4383
4883
|
#
|
|
4384
4884
|
# _Requires permission: `costs:write`._
|
|
4385
4885
|
#
|
|
4386
|
-
# PUT /api/org/{orgId}/cost-
|
|
4886
|
+
# PUT /api/org/{orgId}/cost-canvases/{id}
|
|
4387
4887
|
#
|
|
4388
4888
|
# Raises on 400: Bad request
|
|
4389
4889
|
#
|
|
@@ -4392,14 +4892,14 @@ module Infrawrench
|
|
|
4392
4892
|
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
4393
4893
|
# constructed with.
|
|
4394
4894
|
# @param id [String]
|
|
4395
|
-
# @param body [Hash] Request body, shaped as `
|
|
4895
|
+
# @param body [Hash] Request body, shaped as `CostCanvasInput`.
|
|
4396
4896
|
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
4397
|
-
# @return [Hash] Parsed JSON, shaped as `
|
|
4897
|
+
# @return [Hash] Parsed JSON, shaped as `CostCanvas` — see `sig/infrawrench/sdk.rbs`.
|
|
4398
4898
|
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
4399
4899
|
def update(id:, body:, org_id: nil, request_options: nil)
|
|
4400
4900
|
@transport.request(
|
|
4401
4901
|
http_method: "PUT",
|
|
4402
|
-
path: "/api/org/{orgId}/cost-
|
|
4902
|
+
path: "/api/org/{orgId}/cost-canvases/{id}",
|
|
4403
4903
|
path_params: { "orgId" => org_id, "id" => id },
|
|
4404
4904
|
body: body,
|
|
4405
4905
|
request_options: request_options
|
|
@@ -8758,6 +9258,326 @@ module Infrawrench
|
|
|
8758
9258
|
end
|
|
8759
9259
|
end
|
|
8760
9260
|
|
|
9261
|
+
# `client.github_issues.pull_requests`
|
|
9262
|
+
class GithubIssuesPullRequestsNamespace
|
|
9263
|
+
# @api private
|
|
9264
|
+
# @param transport [Transport]
|
|
9265
|
+
def initialize(transport)
|
|
9266
|
+
@transport = transport
|
|
9267
|
+
end
|
|
9268
|
+
|
|
9269
|
+
# Open an IaC pull request for a finding
|
|
9270
|
+
#
|
|
9271
|
+
# Creates a branch, commits the one-file change and opens a pull request
|
|
9272
|
+
# against the mapped base branch. Never merged automatically.
|
|
9273
|
+
#
|
|
9274
|
+
# _Requires permission: `github-issues:write`._
|
|
9275
|
+
#
|
|
9276
|
+
# POST /api/org/{orgId}/github-issues/pull-requests
|
|
9277
|
+
#
|
|
9278
|
+
# Raises on 400: Bad request
|
|
9279
|
+
#
|
|
9280
|
+
# Raises on 409: The GitHub App installation needs a permission an owner has
|
|
9281
|
+
# not approved yet
|
|
9282
|
+
#
|
|
9283
|
+
# Raises on 502: GitHub refused the request or was unreachable
|
|
9284
|
+
#
|
|
9285
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9286
|
+
# constructed with.
|
|
9287
|
+
# @param body [Hash] Request body, shaped as `GithubPullRequestInput`.
|
|
9288
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9289
|
+
# @return [Hash] Parsed JSON, shaped as `GithubPullRequestResult` — see
|
|
9290
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9291
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9292
|
+
def create(body:, org_id: nil, request_options: nil)
|
|
9293
|
+
@transport.request(
|
|
9294
|
+
http_method: "POST",
|
|
9295
|
+
path: "/api/org/{orgId}/github-issues/pull-requests",
|
|
9296
|
+
path_params: { "orgId" => org_id },
|
|
9297
|
+
body: body,
|
|
9298
|
+
request_options: request_options
|
|
9299
|
+
)
|
|
9300
|
+
end
|
|
9301
|
+
|
|
9302
|
+
# Preview an IaC pull request for a finding
|
|
9303
|
+
#
|
|
9304
|
+
# Reads only. Says what the pull request would change (one file, as a diff),
|
|
9305
|
+
# or why the change is not mechanical.
|
|
9306
|
+
#
|
|
9307
|
+
# _Requires permission: `github-issues:write`._
|
|
9308
|
+
#
|
|
9309
|
+
# POST /api/org/{orgId}/github-issues/pull-requests/preview
|
|
9310
|
+
#
|
|
9311
|
+
# Raises on 400: Bad request
|
|
9312
|
+
#
|
|
9313
|
+
# Raises on 409: The GitHub App installation needs a permission an owner has
|
|
9314
|
+
# not approved yet
|
|
9315
|
+
#
|
|
9316
|
+
# Raises on 502: GitHub refused the request or was unreachable
|
|
9317
|
+
#
|
|
9318
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9319
|
+
# constructed with.
|
|
9320
|
+
# @param body [Hash] Request body, shaped as `GithubPullRequestInput`.
|
|
9321
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9322
|
+
# @return [Hash] Parsed JSON, shaped as `GithubPullRequestPreview` — see
|
|
9323
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9324
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9325
|
+
def preview(body:, org_id: nil, request_options: nil)
|
|
9326
|
+
@transport.request(
|
|
9327
|
+
http_method: "POST",
|
|
9328
|
+
path: "/api/org/{orgId}/github-issues/pull-requests/preview",
|
|
9329
|
+
path_params: { "orgId" => org_id },
|
|
9330
|
+
body: body,
|
|
9331
|
+
request_options: request_options
|
|
9332
|
+
)
|
|
9333
|
+
end
|
|
9334
|
+
end
|
|
9335
|
+
|
|
9336
|
+
# `client.github_issues`
|
|
9337
|
+
class GithubIssuesNamespace
|
|
9338
|
+
# @return [GithubIssuesPullRequestsNamespace] `client.github_issues.pull_requests`
|
|
9339
|
+
attr_reader :pull_requests
|
|
9340
|
+
|
|
9341
|
+
# @api private
|
|
9342
|
+
# @param transport [Transport]
|
|
9343
|
+
def initialize(transport)
|
|
9344
|
+
@transport = transport
|
|
9345
|
+
@pull_requests = GithubIssuesPullRequestsNamespace.new(@transport)
|
|
9346
|
+
end
|
|
9347
|
+
|
|
9348
|
+
# List a repository's assignable users
|
|
9349
|
+
#
|
|
9350
|
+
# Backs the assignee picker.
|
|
9351
|
+
#
|
|
9352
|
+
# _Requires permission: `github-issues:read`._
|
|
9353
|
+
#
|
|
9354
|
+
# GET /api/org/{orgId}/github-issues/assignees
|
|
9355
|
+
#
|
|
9356
|
+
# Raises on 400: Bad request
|
|
9357
|
+
#
|
|
9358
|
+
# Raises on 409: The GitHub App installation needs a permission an owner has
|
|
9359
|
+
# not approved yet
|
|
9360
|
+
#
|
|
9361
|
+
# Raises on 502: GitHub refused the request or was unreachable
|
|
9362
|
+
#
|
|
9363
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9364
|
+
# constructed with.
|
|
9365
|
+
# @param installation_id [Integer]
|
|
9366
|
+
# @param repo [String]
|
|
9367
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9368
|
+
# @return [Array<Hash>] Parsed JSON, shaped as `Array<GithubAssignee>` — see
|
|
9369
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9370
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9371
|
+
def assignees(installation_id:, repo:, org_id: nil, request_options: nil)
|
|
9372
|
+
@transport.request(
|
|
9373
|
+
http_method: "GET",
|
|
9374
|
+
path: "/api/org/{orgId}/github-issues/assignees",
|
|
9375
|
+
path_params: { "orgId" => org_id },
|
|
9376
|
+
query: { "installationId" => installation_id, "repo" => repo },
|
|
9377
|
+
request_options: request_options
|
|
9378
|
+
)
|
|
9379
|
+
end
|
|
9380
|
+
|
|
9381
|
+
# List a repository's branches
|
|
9382
|
+
#
|
|
9383
|
+
# Backs the base-branch picker for Terraform sources.
|
|
9384
|
+
#
|
|
9385
|
+
# _Requires permission: `github-issues:read`._
|
|
9386
|
+
#
|
|
9387
|
+
# GET /api/org/{orgId}/github-issues/branches
|
|
9388
|
+
#
|
|
9389
|
+
# Raises on 400: Bad request
|
|
9390
|
+
#
|
|
9391
|
+
# Raises on 409: The GitHub App installation needs a permission an owner has
|
|
9392
|
+
# not approved yet
|
|
9393
|
+
#
|
|
9394
|
+
# Raises on 502: GitHub refused the request or was unreachable
|
|
9395
|
+
#
|
|
9396
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9397
|
+
# constructed with.
|
|
9398
|
+
# @param installation_id [Integer]
|
|
9399
|
+
# @param repo [String]
|
|
9400
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9401
|
+
# @return [Array<String>] Parsed JSON, shaped as `Array<String>` — see
|
|
9402
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9403
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9404
|
+
def branches(installation_id:, repo:, org_id: nil, request_options: nil)
|
|
9405
|
+
@transport.request(
|
|
9406
|
+
http_method: "GET",
|
|
9407
|
+
path: "/api/org/{orgId}/github-issues/branches",
|
|
9408
|
+
path_params: { "orgId" => org_id },
|
|
9409
|
+
query: { "installationId" => installation_id, "repo" => repo },
|
|
9410
|
+
request_options: request_options
|
|
9411
|
+
)
|
|
9412
|
+
end
|
|
9413
|
+
|
|
9414
|
+
# Get GitHub issue settings and installation access
|
|
9415
|
+
#
|
|
9416
|
+
# _Requires permission: `github-issues:read`._
|
|
9417
|
+
#
|
|
9418
|
+
# GET /api/org/{orgId}/github-issues
|
|
9419
|
+
#
|
|
9420
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9421
|
+
# constructed with.
|
|
9422
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9423
|
+
# @return [Hash] Parsed JSON, shaped as `GithubIssuesStatus` — see
|
|
9424
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9425
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9426
|
+
def get(org_id: nil, request_options: nil)
|
|
9427
|
+
@transport.request(
|
|
9428
|
+
http_method: "GET",
|
|
9429
|
+
path: "/api/org/{orgId}/github-issues",
|
|
9430
|
+
path_params: { "orgId" => org_id },
|
|
9431
|
+
request_options: request_options
|
|
9432
|
+
)
|
|
9433
|
+
end
|
|
9434
|
+
|
|
9435
|
+
# File a finding as a GitHub issue
|
|
9436
|
+
#
|
|
9437
|
+
# Opens an issue in the routed repository, or comments on the open issue
|
|
9438
|
+
# already filed for the same finding (matched by fingerprint, including a
|
|
9439
|
+
# hidden marker in issue bodies).
|
|
9440
|
+
#
|
|
9441
|
+
# _Requires permission: `github-issues:write`._
|
|
9442
|
+
#
|
|
9443
|
+
# POST /api/org/{orgId}/github-issues/issues
|
|
9444
|
+
#
|
|
9445
|
+
# Raises on 400: Bad request
|
|
9446
|
+
#
|
|
9447
|
+
# Raises on 409: The GitHub App installation needs a permission an owner has
|
|
9448
|
+
# not approved yet
|
|
9449
|
+
#
|
|
9450
|
+
# Raises on 502: GitHub refused the request or was unreachable
|
|
9451
|
+
#
|
|
9452
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9453
|
+
# constructed with.
|
|
9454
|
+
# @param body [Hash] Request body, shaped as `FileGithubIssueInput`.
|
|
9455
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9456
|
+
# @return [Hash] Parsed JSON, shaped as `FileGithubIssueResult` — see
|
|
9457
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9458
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9459
|
+
def issues(body:, org_id: nil, request_options: nil)
|
|
9460
|
+
@transport.request(
|
|
9461
|
+
http_method: "POST",
|
|
9462
|
+
path: "/api/org/{orgId}/github-issues/issues",
|
|
9463
|
+
path_params: { "orgId" => org_id },
|
|
9464
|
+
body: body,
|
|
9465
|
+
request_options: request_options
|
|
9466
|
+
)
|
|
9467
|
+
end
|
|
9468
|
+
|
|
9469
|
+
# List a repository's labels
|
|
9470
|
+
#
|
|
9471
|
+
# Backs the label picker.
|
|
9472
|
+
#
|
|
9473
|
+
# _Requires permission: `github-issues:read`._
|
|
9474
|
+
#
|
|
9475
|
+
# GET /api/org/{orgId}/github-issues/labels
|
|
9476
|
+
#
|
|
9477
|
+
# Raises on 400: Bad request
|
|
9478
|
+
#
|
|
9479
|
+
# Raises on 409: The GitHub App installation needs a permission an owner has
|
|
9480
|
+
# not approved yet
|
|
9481
|
+
#
|
|
9482
|
+
# Raises on 502: GitHub refused the request or was unreachable
|
|
9483
|
+
#
|
|
9484
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9485
|
+
# constructed with.
|
|
9486
|
+
# @param installation_id [Integer]
|
|
9487
|
+
# @param repo [String]
|
|
9488
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9489
|
+
# @return [Array<Hash>] Parsed JSON, shaped as `Array<GithubLabel>` — see
|
|
9490
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9491
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9492
|
+
def labels(installation_id:, repo:, org_id: nil, request_options: nil)
|
|
9493
|
+
@transport.request(
|
|
9494
|
+
http_method: "GET",
|
|
9495
|
+
path: "/api/org/{orgId}/github-issues/labels",
|
|
9496
|
+
path_params: { "orgId" => org_id },
|
|
9497
|
+
query: { "installationId" => installation_id, "repo" => repo },
|
|
9498
|
+
request_options: request_options
|
|
9499
|
+
)
|
|
9500
|
+
end
|
|
9501
|
+
|
|
9502
|
+
# Look up filed GitHub issues for a set of findings
|
|
9503
|
+
#
|
|
9504
|
+
# _Requires permission: `github-issues:read`._
|
|
9505
|
+
#
|
|
9506
|
+
# GET /api/org/{orgId}/github-issues/links
|
|
9507
|
+
#
|
|
9508
|
+
# Raises on 400: Bad request
|
|
9509
|
+
#
|
|
9510
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9511
|
+
# constructed with.
|
|
9512
|
+
# @param source_kind [String, nil]
|
|
9513
|
+
# @param state [String, nil]
|
|
9514
|
+
# @param source_id [Array<String>, nil]
|
|
9515
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9516
|
+
# @return [Array<Hash>] Parsed JSON, shaped as `Array<GithubIssueLink>` — see
|
|
9517
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9518
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9519
|
+
def links(org_id: nil, source_kind: nil, state: nil, source_id: nil, request_options: nil)
|
|
9520
|
+
@transport.request(
|
|
9521
|
+
http_method: "GET",
|
|
9522
|
+
path: "/api/org/{orgId}/github-issues/links",
|
|
9523
|
+
path_params: { "orgId" => org_id },
|
|
9524
|
+
query: { "sourceKind" => source_kind, "state" => state, "sourceId" => source_id },
|
|
9525
|
+
request_options: request_options
|
|
9526
|
+
)
|
|
9527
|
+
end
|
|
9528
|
+
|
|
9529
|
+
# Resolve where a finding would be filed
|
|
9530
|
+
#
|
|
9531
|
+
# _Requires permission: `github-issues:read`._
|
|
9532
|
+
#
|
|
9533
|
+
# GET /api/org/{orgId}/github-issues/route
|
|
9534
|
+
#
|
|
9535
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9536
|
+
# constructed with.
|
|
9537
|
+
# @param resource_id [String, nil]
|
|
9538
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9539
|
+
# @return [Hash] Parsed JSON, shaped as `GithubIssueRouteResolution` — see
|
|
9540
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9541
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9542
|
+
def route(org_id: nil, resource_id: nil, request_options: nil)
|
|
9543
|
+
@transport.request(
|
|
9544
|
+
http_method: "GET",
|
|
9545
|
+
path: "/api/org/{orgId}/github-issues/route",
|
|
9546
|
+
path_params: { "orgId" => org_id },
|
|
9547
|
+
query: { "resourceId" => resource_id },
|
|
9548
|
+
request_options: request_options
|
|
9549
|
+
)
|
|
9550
|
+
end
|
|
9551
|
+
|
|
9552
|
+
# Replace the GitHub issue settings
|
|
9553
|
+
#
|
|
9554
|
+
# Whole-document replace: route order is part of the meaning. Route and
|
|
9555
|
+
# source ids are kept when supplied.
|
|
9556
|
+
#
|
|
9557
|
+
# _Requires permission: `org:settings:write`._
|
|
9558
|
+
#
|
|
9559
|
+
# PUT /api/org/{orgId}/github-issues/settings
|
|
9560
|
+
#
|
|
9561
|
+
# Raises on 400: Bad request
|
|
9562
|
+
#
|
|
9563
|
+
# @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
|
|
9564
|
+
# constructed with.
|
|
9565
|
+
# @param body [Hash] Request body, shaped as `GithubIssueSettingsInput`.
|
|
9566
|
+
# @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
|
|
9567
|
+
# @return [Hash] Parsed JSON, shaped as `GithubIssueSettings` — see
|
|
9568
|
+
# `sig/infrawrench/sdk.rbs`.
|
|
9569
|
+
# @raise [Infrawrench::ApiError] On any non-2xx response.
|
|
9570
|
+
def settings(body:, org_id: nil, request_options: nil)
|
|
9571
|
+
@transport.request(
|
|
9572
|
+
http_method: "PUT",
|
|
9573
|
+
path: "/api/org/{orgId}/github-issues/settings",
|
|
9574
|
+
path_params: { "orgId" => org_id },
|
|
9575
|
+
body: body,
|
|
9576
|
+
request_options: request_options
|
|
9577
|
+
)
|
|
9578
|
+
end
|
|
9579
|
+
end
|
|
9580
|
+
|
|
8761
9581
|
# `client.iac.states`
|
|
8762
9582
|
class IacStatesNamespace
|
|
8763
9583
|
# @api private
|
|
@@ -17701,6 +18521,8 @@ module Infrawrench
|
|
|
17701
18521
|
attr_reader :cost_alerts
|
|
17702
18522
|
# @return [CostAnnotationsNamespace] `client.cost_annotations`
|
|
17703
18523
|
attr_reader :cost_annotations
|
|
18524
|
+
# @return [CostCanvasesNamespace] `client.cost_canvases`
|
|
18525
|
+
attr_reader :cost_canvases
|
|
17704
18526
|
# @return [CostCentresNamespace] `client.cost_centres`
|
|
17705
18527
|
attr_reader :cost_centres
|
|
17706
18528
|
# @return [CostExportsNamespace] `client.cost_exports`
|
|
@@ -17745,6 +18567,8 @@ module Infrawrench
|
|
|
17745
18567
|
attr_reader :environments
|
|
17746
18568
|
# @return [ExpiringNamespace] `client.expiring`
|
|
17747
18569
|
attr_reader :expiring
|
|
18570
|
+
# @return [GithubIssuesNamespace] `client.github_issues`
|
|
18571
|
+
attr_reader :github_issues
|
|
17748
18572
|
# @return [IacNamespace] `client.iac`
|
|
17749
18573
|
attr_reader :iac
|
|
17750
18574
|
# @return [IncidentsNamespace] `client.incidents`
|
|
@@ -17881,6 +18705,7 @@ module Infrawrench
|
|
|
17881
18705
|
@connect = ConnectNamespace.new(@transport)
|
|
17882
18706
|
@cost_alerts = CostAlertsNamespace.new(@transport)
|
|
17883
18707
|
@cost_annotations = CostAnnotationsNamespace.new(@transport)
|
|
18708
|
+
@cost_canvases = CostCanvasesNamespace.new(@transport)
|
|
17884
18709
|
@cost_centres = CostCentresNamespace.new(@transport)
|
|
17885
18710
|
@cost_exports = CostExportsNamespace.new(@transport)
|
|
17886
18711
|
@cost_report_folders = CostReportFoldersNamespace.new(@transport)
|
|
@@ -17903,6 +18728,7 @@ module Infrawrench
|
|
|
17903
18728
|
@environment_diff = EnvironmentDiffNamespace.new(@transport)
|
|
17904
18729
|
@environments = EnvironmentsNamespace.new(@transport)
|
|
17905
18730
|
@expiring = ExpiringNamespace.new(@transport)
|
|
18731
|
+
@github_issues = GithubIssuesNamespace.new(@transport)
|
|
17906
18732
|
@iac = IacNamespace.new(@transport)
|
|
17907
18733
|
@incidents = IncidentsNamespace.new(@transport)
|
|
17908
18734
|
@invitations = InvitationsNamespace.new(@transport)
|