Class: Infrawrench::SharedConsolesInvitesNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.shared_consoles.invites

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ SharedConsolesInvitesNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SharedConsolesInvitesNamespace.

Parameters:



12777
12778
12779
# File 'lib/infrawrench/client.rb', line 12777

def initialize(transport)
  @transport = transport
end

Instance Method Details

#create(console_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash

Mint a replacement invite

An invite is spent by the first person it admits, so inviting a second guest means minting a second link. Replaces any outstanding one. Sharer or org:settings:write.

POST /api/org/orgId/shared-consoles/consoleId/invites

Raises on 403: Forbidden

Raises on 404: Not found

Raises on 409: Conflict

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • console_id (String)
  • body (Hash, nil) (defaults to: nil)

    Request body, shaped as Hash.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • console_id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • body: ({ ?"inviteTtlMinutes" => Integer }, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as SharedConsoleCreated — see sig/infrawrench/sdk.rbs.

Raises:



12803
12804
12805
12806
12807
12808
12809
12810
12811
# File 'lib/infrawrench/client.rb', line 12803

def create(console_id:, org_id: nil, body: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/shared-consoles/{consoleId}/invites",
    path_params: { "orgId" => org_id, "consoleId" => console_id },
    body: body,
    request_options: request_options
  )
end

#delete(console_id:, org_id: nil, request_options: nil) ⇒ Hash

Withdraw the outstanding invite

Kills the link without touching the session or anyone already on it.

DELETE /api/org/orgId/shared-consoles/consoleId/invites

Raises on 403: Forbidden

Raises on 404: Not found

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • console_id (String)
  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • console_id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as SharedConsoleState — see sig/infrawrench/sdk.rbs.

Raises:



12830
12831
12832
12833
12834
12835
12836
12837
# File 'lib/infrawrench/client.rb', line 12830

def delete(console_id:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "DELETE",
    path: "/api/org/{orgId}/shared-consoles/{consoleId}/invites",
    path_params: { "orgId" => org_id, "consoleId" => console_id },
    request_options: request_options
  )
end

#get(token:, org_id: nil, request_options: nil) ⇒ Hash

Preview what an invite link points at

What the join screen shows before anyone commits: which host, whose session, and whether you may join it. Reachable with a valid token by a signed-in member who already holds resources:execute — the token says which session, never whether. Returns nothing from the session itself.

Requires permission: resources:execute.

GET /api/org/orgId/shared-consoles/invites/token

Raises on 404: Not found

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • token (String)
  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • token: (String)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as SharedConsoleInvitePreview — see sig/infrawrench/sdk.rbs.

Raises:



12859
12860
12861
12862
12863
12864
12865
12866
# File 'lib/infrawrench/client.rb', line 12859

def get(token:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/shared-consoles/invites/{token}",
    path_params: { "orgId" => org_id, "token" => token },
    request_options: request_options
  )
end