Class: Infrawrench::WorkflowsNamespace

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

Overview

client.workflows

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ WorkflowsNamespace

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

Parameters:



15058
15059
15060
15061
15062
# File 'lib/infrawrench/client.rb', line 15058

def initialize(transport)
  @transport = transport
  @schedule = WorkflowsScheduleNamespace.new(@transport)
  @secrets = WorkflowsSecretsNamespace.new(@transport)
end

Instance Attribute Details

#scheduleWorkflowsScheduleNamespace (readonly)

Returns client.workflows.schedule.

Returns:



15052
15053
15054
# File 'lib/infrawrench/client.rb', line 15052

def schedule
  @schedule
end

#secretsWorkflowsSecretsNamespace (readonly)

Returns client.workflows.secrets.

Returns:



15054
15055
15056
# File 'lib/infrawrench/client.rb', line 15054

def secrets
  @secrets
end

Instance Method Details

#typings(id:, org_id: nil, enrich: nil, request_options: nil) ⇒ Hash

Generated infra.d.ts for a workflow

The ambient TypeScript declarations workflow source is written against, specialized with this organization's connected accounts, resource types, SSH key names, and the workflow's trigger + metrics. Default is the fast static surface (create fields are Record<string, string>). Pass enrich=1 for a second pass that hits provider APIs for precise create() field unions and live sidecar capability flags — the editor loads static first and upgrades when that finishes.

Requires permission: workflows:read.

GET /api/org/orgId/workflows/id/typings

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.

  • id (String)

    Workflow id

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

    When 1 or true, enrich create() field shapes and sidecar capabilities from live provider configs. Omit for the fast static surface.

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

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

  • id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • enrich: ("1", "true", nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



15089
15090
15091
15092
15093
15094
15095
15096
15097
# File 'lib/infrawrench/client.rb', line 15089

def typings(id:, org_id: nil, enrich: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/workflows/{id}/typings",
    path_params: { "orgId" => org_id, "id" => id },
    query: { "enrich" => enrich },
    request_options: request_options
  )
end