Class: Infrawrench::TeamNamespace

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

Overview

client.team

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ TeamNamespace

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 TeamNamespace.

Parameters:



4333
4334
4335
4336
4337
4338
# File 'lib/infrawrench/client.rb', line 4333

def initialize(transport)
  @transport = transport
  @invitations = TeamInvitationsNamespace.new(@transport)
  @members = TeamMembersNamespace.new(@transport)
  @roles = TeamRolesNamespace.new(@transport)
end

Instance Attribute Details

#invitationsTeamInvitationsNamespace (readonly)

Returns client.team.invitations.

Returns:



4325
4326
4327
# File 'lib/infrawrench/client.rb', line 4325

def invitations
  @invitations
end

#membersTeamMembersNamespace (readonly)

Returns client.team.members.

Returns:



4327
4328
4329
# File 'lib/infrawrench/client.rb', line 4327

def members
  @members
end

#rolesTeamRolesNamespace (readonly)

Returns client.team.roles.

Returns:



4329
4330
4331
# File 'lib/infrawrench/client.rb', line 4329

def roles
  @roles
end

Instance Method Details

#me(org_id: nil, request_options: nil) ⇒ Hash

Current user's effective permissions and role

GET /api/org/orgId/team/me

Parameters:

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

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

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

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

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

Returns:

  • (Hash)

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

Raises:



4349
4350
4351
4352
4353
4354
4355
4356
# File 'lib/infrawrench/client.rb', line 4349

def me(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/team/me",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end

#permissions(org_id: nil, request_options: nil) ⇒ Hash

List all permission strings the server recognises

Requires permission: team:read.

GET /api/org/orgId/team/permissions

Parameters:

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

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

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

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

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

Returns:

  • (Hash)

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

Raises:



4369
4370
4371
4372
4373
4374
4375
4376
# File 'lib/infrawrench/client.rb', line 4369

def permissions(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/team/permissions",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end