aha

package module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 9 Imported by: 0

README

Go API Client for Aha! (aha.io)

Go CI Go Lint Go SAST Go Report Card Docs Docs Visualization License

Go client for the Aha.io product management API.

This SDK providers wrappers around an ogen generated client. For an API built using OpenAPI Generator see github.com/grokify/go-aha.

Features

  • 🔒 Type-safe API client generated from OpenAPI specification using ogen
  • 🎯 Ergonomic wrapper layer for common operations
  • 📦 Support for features, ideas, releases, products, and more
  • 🔍 GraphQL API with type-safe client generated by genqlient via gqlforge
  • 🎨 Strategic Models (Canvases): Opportunity, Lean UX, and Business Model Canvas support
  • 📤 Multiple export formats: SVG, JSON, D2, and Mermaid
  • ⌨️ CLI tool for command-line access to Aha.io
  • ⚙️ Environment-based configuration
  • 🛡️ Comprehensive error handling

Installation

go get github.com/grokify/aha-go

Quick Start

package main

import (
    "context"
    "fmt"
    "log"

    "github.com/grokify/aha-go"
)

func main() {
    // Create client (reads AHA_SUBDOMAIN and AHA_API_KEY from environment)
    client, err := aha.NewClient()
    if err != nil {
        log.Fatal(err)
    }

    // Or configure explicitly
    client, err = aha.NewClient(
        aha.WithSubdomain("mycompany"),
        aha.WithAPIKey("your-api-key"),
    )
    if err != nil {
        log.Fatal(err)
    }

    ctx := context.Background()

    // Get a feature
    feature, err := client.GetFeature(ctx, "PROD-123")
    if err != nil {
        if aha.IsNotFound(err) {
            fmt.Println("Feature not found")
            return
        }
        log.Fatal(err)
    }

    fmt.Printf("Feature: %s - %s\n", feature.ReferenceNum, feature.Name)
}

Configuration

The client can be configured via environment variables or options:

Environment Variable Option Description
AHA_SUBDOMAIN WithSubdomain() Your Aha account subdomain
AHA_API_KEY WithAPIKey() Your Aha API key

Options take precedence over environment variables.

Getting an API Key
  1. Log in to your Aha account
  2. Go to Settings > Account > API keys
  3. Generate a new API key

API Coverage

Features
// Get a feature by ID or reference number
feature, err := client.GetFeature(ctx, "PROD-123")

// List features with filtering
features, err := client.ListFeatures(ctx,
    aha.WithFeatureQuery("search term"),
    aha.WithFeatureAssignee("user@example.com"),
    aha.WithPage(1),
    aha.WithPerPage(50),
)

// Create a feature in a release
feature, err := client.CreateFeature(ctx, "REL-123",
    aha.WithFeatureName("New Feature"),
    aha.WithFeatureDescription("Feature description"),
    aha.WithFeatureAssignee("user@example.com"),
)

// Update a feature
feature, err := client.UpdateFeature(ctx, "PROD-123",
    aha.WithFeatureStatus("In Progress"),
    aha.WithFeatureRelease("REL-456"),
)
Ideas
// Get an idea
idea, err := client.GetIdea(ctx, "IDEA-123")

// List ideas
ideas, err := client.ListIdeas(ctx,
    aha.WithIdeaQuery("search term"),
    aha.WithIdeaStatus("Under consideration"),
)
Products (Workspaces)
// List all products
products, err := client.ListProducts(ctx)

// Get a specific product
product, err := client.GetProduct(ctx, "PROD")
Releases
// List releases for a product
releases, err := client.ListProductReleases(ctx, "PROD")

// Get a release
release, err := client.GetRelease(ctx, "PROD-R-1")
Strategic Models (Canvases)

Strategic models are visual canvases used for product planning:

// List canvases for a product
canvases, err := client.ListStrategicModels(ctx, "PROD")

// Get a canvas
canvas, err := client.GetStrategicModel(ctx, "PROD-SM-1")

// Create a canvas
canvas, err := client.CreateStrategicModel(ctx, "PROD", aha.StrategicModelCreate{
    Name: "Q4 Opportunity Assessment",
    Kind: "Opportunity",
})

Supported canvas types:

Type Description
Opportunity Jeff Patton's 10-block opportunity canvas
Lean Canvas Jeff Gothelf's 8-block Lean UX canvas
Business Model Osterwalder's 9-block Business Model Canvas

CLI Tool

Install the CLI:

go install github.com/grokify/aha-go/cmd/aha@latest

Configure credentials:

export AHA_SUBDOMAIN=mycompany
export AHA_API_KEY=your-api-key
Canvas Commands
# List canvases
aha canvas list --product PROD

# Get a canvas
aha canvas get PROD-SM-1

# Create canvases
aha canvas create opportunity --product PROD --name "New Feature Assessment"
aha canvas create leanux --product PROD --name "Onboarding Experiment"
aha canvas create bmc --product PROD --name "Business Model 2024"

# Update canvas blocks from JSON file
aha canvas update PROD-SM-1 --file content.json

# Update a single block
aha canvas update PROD-SM-1 --block "Problems" --content "<p>User problems...</p>"

# Export canvas
aha canvas export PROD-SM-1 -o canvas.svg
aha canvas export PROD-SM-1 --format json -o canvas.json
aha canvas export PROD-SM-1 --format d2 -o canvas.d2
aha canvas export PROD-SM-1 --format mermaid -o canvas.mmd
Export Formats
Format Description Extension
svg SVG image with dark theme grid layout (default) .svg
json Raw JSON data .json
d2 D2 diagram language .d2
mermaid Mermaid diagram syntax .mmd
Product Commands
# List all products (workspaces)
aha product list

# Get a product
aha product get PROD
Feature Commands
# List features
aha feature list
aha feature list --query "login"
aha feature list --assignee user@example.com
aha feature list --release REL-1

# Get a feature
aha feature get PROD-123

# Create a feature
aha feature create --release REL-1 --name "User Authentication"
aha feature create --release REL-1 --name "OAuth Support" --description "Add OAuth2"

# Update a feature
aha feature update PROD-123 --name "Updated Name"
aha feature update PROD-123 --status "In Progress"
aha feature update PROD-123 --assignee user@example.com --release REL-2
Release Commands
# List releases for a product
aha release list --product PROD

# Get a release
aha release get PROD-R-1
Idea Commands
# List ideas
aha idea list
aha idea list --query "dashboard"
aha idea list --status "Under consideration"
aha idea list --sort popular

# Get an idea
aha idea get IDEA-123
Goal Commands
# List goals
aha goal list
aha goal list --product PROD
aha goal list --query "revenue"

# Get a goal
aha goal get PROD-G-1
Initiative Commands
# List initiatives
aha initiative list
aha initiative list --product PROD
aha initiative list --query "mobile"

# Get an initiative
aha initiative get PROD-I-1
Epic Commands
# List epics
aha epic list
aha epic list --product PROD
aha epic list --query "authentication"

# Get an epic
aha epic get PROD-E-1
Requirement Commands
# List requirements for a feature
aha requirement list --feature PROD-123

# Get a requirement
aha requirement get PROD-123-1

# Create a requirement
aha requirement create --feature PROD-123 --name "Input validation"
aha requirement create -f PROD-123 -n "Add tests" --description "Unit tests" --estimate 5

# Update a requirement
aha requirement update PROD-123-1 --status "In progress"
aha requirement update PROD-123-1 --work-done 4

# Delete a requirement
aha requirement delete PROD-123-1
aha requirement delete PROD-123-1 --force
User Commands
# List all users
aha user list

# Get a user by ID or email
aha user get user@example.com
aha user get 12345678

# Get the current authenticated user
aha user me
Comment Commands
# List comments on a feature
aha comment list --feature PROD-123

# List comments on an idea
aha comment list --idea IDEA-1

# List comments on other resources
aha comment list --release PROD-R-1
aha comment list --epic PROD-E-1
aha comment list --initiative PROD-I-1
aha comment list --goal PROD-G-1

# Get a comment by ID
aha comment get 12345678

# Create a comment on a feature
aha comment create --feature PROD-123 --body "Great progress!"

# Create a comment on an idea
aha comment create --idea IDEA-1 --body "Internal note"

# Delete a comment
aha comment delete 12345678
Shell Completions

Generate shell completion scripts for better CLI experience:

# Bash
source <(aha completion bash)

# Zsh
aha completion zsh > "${fpath[1]}/_aha"

# Fish
aha completion fish | source

# PowerShell
aha completion powershell | Out-String | Invoke-Expression
Template Commands (Browser Automation)

Strategic model templates cannot be created via API, so these commands use browser automation (go-rod):

# List available predefined templates
aha template list-predefined

# Create a predefined template (requires browser credentials)
export AHA_EMAIL=user@example.com
export AHA_PASSWORD=your-password
aha template create-predefined capability-stack
aha template create-predefined feature-canvas --headless=false  # Watch the browser

Available predefined templates:

Template Description
capability-stack Layered capability model (4 layers)
maturity-model Capability maturity assessment grid (5x5)
opportunity-patton Jeff Patton's 10-block opportunity canvas
feature-canvas Nikita Efimov's feature planning canvas

After creating a template, you can use it via the API:

aha canvas create --product PROD --name "My Canvas" --kind "Capability Stack"

Error Handling

feature, err := client.GetFeature(ctx, "INVALID")
if err != nil {
    switch {
    case aha.IsNotFound(err):
        // Handle 404
    case aha.IsUnauthorized(err):
        // Handle 401 - check API key
    case aha.IsForbidden(err):
        // Handle 403 - check permissions
    case aha.IsRateLimited(err):
        // Handle 429 - back off and retry
    case aha.IsServerError(err):
        // Handle 5xx - Aha service issue
    default:
        // Other error
    }
}

GraphQL API

The SDK provides two approaches to the Aha.io GraphQL API:

Use the type-safe client generated by genqlient for strongly-typed queries:

import (
    "context"
    "fmt"

    "github.com/grokify/aha-go/graphql"
    "github.com/grokify/aha-go/graphql/generated"
)

func main() {
    // Create a genqlient-compatible client
    client := graphql.NewGenqlientClient("mycompany", "your-api-key")
    ctx := context.Background()

    // Get a feature with full type safety
    resp, err := generated.GetFeature(ctx, client, "FEAT-123")
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("Feature: %s - %s\n", resp.Feature.ReferenceNum, resp.Feature.Name)

    // Search documents
    searchResp, err := generated.SearchDocuments(ctx, client, "onboarding", []string{"Page", "Feature"})
    if err != nil {
        log.Fatal(err)
    }
    for _, node := range searchResp.SearchDocuments.Nodes {
        fmt.Printf("Found: %s (%s)\n", node.Name, node.SearchableType)
    }
}

Available operations include:

  • Queries: GetFeature, GetPage, GetIdea, GetRelease, GetGoal, GetEpic, GetInitiative, GetRequirement, GetProject, GetAccount, SearchDocuments, GetFeatureWithIntegrations, GetFeatureWithLinks, GetFeatureScreenDefinition, GetProjectCustomFields, GetFeatureWithCustomFields
  • Mutations: UpdateFeatureName, UpdateFeatureDescription, UpdateFeatureStatus, UpdateFeatureTags, AssignFeatureToInitiative, AssignFeatureToRelease, AssignFeatureToEpic, AssignFeatureToUser, PromoteIdeaToFeature, PromoteIdeaToEpic, CreateRecordLink, CreateFeatureWithRelease, CreateFeatureWithProject, CreateFeatureWithAssignments, CreateIdea, SetCustomFieldValues
Creating Features and Ideas
// Create a feature in a release
resp, err := generated.CreateFeatureWithRelease(ctx, client,
    "My New Feature",           // name
    "RELEASE-ID",               // releaseId
    "<p>Description here</p>",  // description
    "tag1, tag2",               // tagList
    nil,                        // skipRequiredFieldsValidation
)
fmt.Printf("Created: %s\n", resp.CreateFeature.Feature.ReferenceNum)

// Create an idea
ideaResp, err := generated.CreateIdea(ctx, client,
    "New Idea",     // name
    "PROJECT-ID",   // projectId
    nil,            // skipRequiredFieldsValidation
)
Custom Fields
// Set custom fields on a feature
resp, err := generated.SetCustomFieldValues(ctx, client,
    "FEATURE-ID",
    generated.CustomFieldableTypeEnumFeature,
    []generated.CustomFieldValueInput{
        {Key: "priority_score", Value: 85},
        {Key: "customer_segment", Value: "Enterprise"},
    },
)
Required Field Validation

Helper functions for discovering and validating required fields:

import "github.com/grokify/aha-go/graphql"

// Discover required fields for features in a project
reqs, err := graphql.GetFeatureRequirements(ctx, client, "EXISTING-FEATURE-ID")

// Get list of required field IDs
requiredIDs := reqs.RequiredFieldIDs()

// Validate that all required fields are provided
missing := graphql.ValidateRequiredFields(reqs, map[string]any{
    "name": "Feature Name",
    "description": "Description",
})
if len(missing) > 0 {
    fmt.Printf("Missing required fields: %v\n", missing)
}
Example Client (Learning Reference)

The graphql/example package provides a handwritten GraphQL client as reference code for users learning to write GraphQL clients without code generation. For production use, the generated client above is recommended.

import "github.com/grokify/aha-go/graphql/example"

client := example.NewClient("mycompany", "your-api-key")

var result struct {
    Feature struct {
        Name        string `json:"name"`
        Description struct {
            MarkdownBody string `json:"markdownBody"`
        } `json:"description"`
    } `json:"feature"`
}

err := client.Query(ctx, example.GetFeatureQuery, map[string]any{"id": "FEAT-123"}, &result)
Regenerating the GraphQL Client

If the Aha.io schema changes, regenerate the client:

# Install gqlforge
go install github.com/grokify/gqlforge/cmd/gqlforge@latest

# Validate operations against schema
gqlforge validate --schema graphql/schema.graphql --operations "graphql/operations/*.graphql"

# Regenerate typed client
gqlforge generate

Low-Level API Access

For operations not covered by the high-level wrapper, access the ogen-generated client directly:

apiClient := client.API()
// Use apiClient for advanced operations

Development

Prerequisites
Makefile Targets
make build          # Build all packages
make build-cli      # Build CLI to bin/
make test           # Run tests with race detector
make test-coverage  # Run tests with coverage report
make lint           # Run golangci-lint
make generate       # Generate API client from OpenAPI spec
make install        # Install CLI to GOPATH/bin
make clean          # Clean build artifacts
make check          # Run all checks (fmt, vet, lint, test)
make completions    # Generate shell completions
make help           # Show all available targets
Generate API Client
make generate
Run Tests
make test
Lint
make lint

License

MIT License - see LICENSE for details.

Documentation

Overview

Package aha provides a Go client for the Aha.io product management API.

This package provides an ergonomic wrapper around the Aha.io REST API, enabling Go applications to interact with Aha workspaces, features, ideas, releases, and other product management resources.

Quick Start

Create a client and retrieve a feature:

client, err := aha.NewClient(
    aha.WithSubdomain("mycompany"),
    aha.WithAPIKey("your-api-key"),
)
if err != nil {
    log.Fatal(err)
}

feature, err := client.GetFeature(ctx, "PROD-123")
if err != nil {
    log.Fatal(err)
}
fmt.Println(feature.Name)

Configuration

The client can be configured via options or environment variables:

  • AHA_SUBDOMAIN: Your Aha account subdomain
  • AHA_API_KEY: Your Aha API key

Options take precedence over environment variables.

Error Handling

API errors are returned as *APIError, which includes the HTTP status code and error message. Helper functions are provided for common error checks:

feature, err := client.GetFeature(ctx, "INVALID")
if aha.IsNotFound(err) {
    // Handle not found
}

Low-Level API Access

For advanced use cases, the underlying ogen-generated client can be accessed:

apiClient := client.API()
// Use apiClient for operations not covered by the high-level API

Index

Constants

View Source
const (
	// SDKVersion is the version of this SDK.
	SDKVersion = "0.1.0"

	// SDKName is the name of this SDK.
	SDKName = "aha-go"
)

Variables

View Source
var (
	ErrMissingSubdomain = errors.New("aha: subdomain is required")
	ErrMissingAPIKey    = errors.New("aha: api key is required")
)

Sentinel errors for configuration and validation.

Functions

func IsForbidden

func IsForbidden(err error) bool

IsForbidden returns true if the error indicates a 403 Forbidden response.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the error indicates a 404 Not Found response.

func IsRateLimited

func IsRateLimited(err error) bool

IsRateLimited returns true if the error indicates a 429 Too Many Requests response.

func IsServerError

func IsServerError(err error) bool

IsServerError returns true if the error indicates a 5xx server error.

func IsUnauthorized

func IsUnauthorized(err error) bool

IsUnauthorized returns true if the error indicates a 401 Unauthorized response.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
	RequestID  string
}

APIError represents an error response from the Aha API.

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface.

type Attachment

type Attachment struct {
	ID          string
	DownloadURL string
	FileName    string
	FileSize    int64
	ContentType string
}

Attachment represents a file attachment on a comment.

type Category

type Category struct {
	ID        string
	Name      string
	ParentID  string
	ProjectID string
	CreatedAt time.Time
}

Category represents an idea category.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides access to the Aha.io API.

func NewClient

func NewClient(opts ...Option) (*Client, error)

NewClient creates a new Aha client with the given options.

Configuration is loaded in the following order (later values override earlier):

  1. Default values
  2. Environment variables (AHA_SUBDOMAIN, AHA_API_KEY)
  3. Options passed to NewClient

func (*Client) API

func (c *Client) API() *api.Client

API returns the low-level ogen-generated client for advanced use. This allows access to API operations not covered by the high-level wrapper.

func (*Client) APIKey

func (c *Client) APIKey() string

APIKey returns the configured API key.

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL returns the API base URL.

func (*Client) CreateEpic

func (c *Client) CreateEpic(ctx context.Context, releaseID string, opts ...CreateEpicOption) (*Epic, error)

CreateEpic creates a new epic in a release.

func (*Client) CreateFeature

func (c *Client) CreateFeature(ctx context.Context, releaseID string, opts ...CreateFeatureOption) (*Feature, error)

CreateFeature creates a new feature in a release.

func (*Client) CreateFeatureComment

func (c *Client) CreateFeatureComment(ctx context.Context, featureID string, opts ...CreateCommentOption) (*Comment, error)

CreateFeatureComment creates a comment on a feature.

func (*Client) CreateGoal

func (c *Client) CreateGoal(ctx context.Context, productID string, opts ...CreateGoalOption) (*Goal, error)

CreateGoal creates a new goal in a product.

func (*Client) CreateIdeaComment

func (c *Client) CreateIdeaComment(ctx context.Context, ideaID string, opts ...CreateCommentOption) (*Comment, error)

CreateIdeaComment creates an internal comment on an idea.

func (*Client) CreateInitiative

func (c *Client) CreateInitiative(ctx context.Context, productID string, opts ...CreateInitiativeOption) (*Initiative, error)

CreateInitiative creates a new initiative in a product.

func (*Client) CreateRequirement

func (c *Client) CreateRequirement(ctx context.Context, featureID string, opts ...CreateRequirementOption) (*Requirement, error)

CreateRequirement creates a new requirement for a feature.

func (*Client) CreateStrategicModel

func (c *Client) CreateStrategicModel(ctx context.Context, productID string, kind string, opts ...CreateStrategicModelOption) (*StrategicModel, error)

CreateStrategicModel creates a new strategic model in a product.

func (*Client) DeleteComment

func (c *Client) DeleteComment(ctx context.Context, id string) error

DeleteComment deletes a comment.

func (*Client) DeleteRequirement

func (c *Client) DeleteRequirement(ctx context.Context, id string) error

DeleteRequirement deletes a requirement.

func (*Client) DoRaw

func (c *Client) DoRaw(ctx context.Context, method, path string, body []byte) (*http.Response, error)

DoRaw performs a raw HTTP request to the Aha API. The path should be a relative path like "/api/v1/features/123". This is useful for API operations not yet covered by typed methods.

func (*Client) GetComment

func (c *Client) GetComment(ctx context.Context, id string) (*Comment, error)

GetComment retrieves a comment by ID.

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (*User, error)

GetCurrentUser retrieves the currently authenticated user.

func (*Client) GetEpic

func (c *Client) GetEpic(ctx context.Context, id string) (*Epic, error)

GetEpic retrieves an epic by ID or reference number.

func (*Client) GetFeature

func (c *Client) GetFeature(ctx context.Context, id string) (*Feature, error)

GetFeature retrieves a feature by ID or reference number.

func (*Client) GetGoal

func (c *Client) GetGoal(ctx context.Context, id string) (*Goal, error)

GetGoal retrieves a goal by ID or reference number.

func (*Client) GetIdea

func (c *Client) GetIdea(ctx context.Context, id string) (*Idea, error)

GetIdea retrieves an idea by ID or reference number.

func (*Client) GetInitiative

func (c *Client) GetInitiative(ctx context.Context, id string) (*Initiative, error)

GetInitiative retrieves an initiative by ID or reference number.

func (*Client) GetProduct

func (c *Client) GetProduct(ctx context.Context, id string) (*Product, error)

GetProduct retrieves a product by ID or reference prefix.

func (*Client) GetRelease

func (c *Client) GetRelease(ctx context.Context, id string) (*Release, error)

GetRelease retrieves a release by ID or reference number.

func (*Client) GetRequirement

func (c *Client) GetRequirement(ctx context.Context, id string) (*Requirement, error)

GetRequirement retrieves a requirement by ID or reference number.

func (*Client) GetStrategicModel

func (c *Client) GetStrategicModel(ctx context.Context, id string) (*StrategicModel, error)

GetStrategicModel retrieves a strategic model by ID or reference number.

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, id string) (*User, error)

GetUser retrieves a user by ID or email.

func (*Client) HTTPClient

func (c *Client) HTTPClient() *http.Client

HTTPClient returns the underlying HTTP client for raw requests.

func (*Client) ListEpicComments

func (c *Client) ListEpicComments(ctx context.Context, epicID string, opts ...ListOption) (*CommentList, error)

ListEpicComments lists comments on an epic.

func (*Client) ListEpics

func (c *Client) ListEpics(ctx context.Context, opts ...ListEpicsOption) (*EpicList, error)

ListEpics lists epics with optional filtering.

func (*Client) ListFeatureComments

func (c *Client) ListFeatureComments(ctx context.Context, featureID string, opts ...ListOption) (*CommentList, error)

ListFeatureComments lists comments on a feature.

func (*Client) ListFeatureRequirements

func (c *Client) ListFeatureRequirements(ctx context.Context, featureID string, opts ...ListOption) (*RequirementList, error)

ListFeatureRequirements lists requirements for a feature.

func (*Client) ListFeatures

func (c *Client) ListFeatures(ctx context.Context, opts ...ListFeaturesOption) (*FeatureList, error)

ListFeatures lists features with optional filtering.

func (*Client) ListGoalComments

func (c *Client) ListGoalComments(ctx context.Context, goalID string, opts ...ListOption) (*CommentList, error)

ListGoalComments lists comments on a goal.

func (*Client) ListGoals

func (c *Client) ListGoals(ctx context.Context, opts ...ListGoalsOption) (*GoalList, error)

ListGoals lists goals with optional filtering.

func (*Client) ListIdeaComments

func (c *Client) ListIdeaComments(ctx context.Context, ideaID string, opts ...ListOption) (*CommentList, error)

ListIdeaComments lists comments on an idea.

func (*Client) ListIdeas

func (c *Client) ListIdeas(ctx context.Context, opts ...ListIdeasOption) (*IdeaList, error)

ListIdeas lists ideas with optional filtering.

func (*Client) ListInitiativeComments

func (c *Client) ListInitiativeComments(ctx context.Context, initiativeID string, opts ...ListOption) (*CommentList, error)

ListInitiativeComments lists comments on an initiative.

func (*Client) ListInitiatives

func (c *Client) ListInitiatives(ctx context.Context, opts ...ListInitiativesOption) (*InitiativeList, error)

ListInitiatives lists initiatives with optional filtering.

func (*Client) ListProductComments

func (c *Client) ListProductComments(ctx context.Context, productID string, opts ...ListOption) (*CommentList, error)

ListProductComments lists comments in a product.

func (*Client) ListProductEpics

func (c *Client) ListProductEpics(ctx context.Context, productID string, opts ...ListOption) (*EpicList, error)

ListProductEpics lists epics for a product.

func (*Client) ListProductGoals

func (c *Client) ListProductGoals(ctx context.Context, productID string, opts ...ListOption) (*GoalList, error)

ListProductGoals lists goals for a product.

func (*Client) ListProductInitiatives

func (c *Client) ListProductInitiatives(ctx context.Context, productID string, opts ...ListOption) (*InitiativeList, error)

ListProductInitiatives lists initiatives for a product.

func (*Client) ListProductReleases

func (c *Client) ListProductReleases(ctx context.Context, productID string, opts ...ListOption) (*ReleaseList, error)

ListProductReleases lists releases for a product.

func (*Client) ListProductStrategicModels

func (c *Client) ListProductStrategicModels(ctx context.Context, productID string, opts ...ListStrategicModelsOption) (*StrategicModelList, error)

ListProductStrategicModels lists strategic models for a product.

func (*Client) ListProductWorkflows

func (c *Client) ListProductWorkflows(ctx context.Context, productID string) (*WorkflowList, error)

ListProductWorkflows lists all workflows and their statuses for a product.

func (*Client) ListProducts

func (c *Client) ListProducts(ctx context.Context, opts ...ListOption) (*ProductList, error)

ListProducts lists all products (workspaces).

func (*Client) ListReleaseComments

func (c *Client) ListReleaseComments(ctx context.Context, releaseID string, opts ...ListOption) (*CommentList, error)

ListReleaseComments lists comments on a release.

func (*Client) ListReleaseFeatures

func (c *Client) ListReleaseFeatures(ctx context.Context, releaseID string, opts ...ListOption) (*FeatureList, error)

ListReleaseFeatures lists features in a release.

func (*Client) ListStrategicModels

func (c *Client) ListStrategicModels(ctx context.Context, opts ...ListStrategicModelsOption) (*StrategicModelList, error)

ListStrategicModels lists strategic models with optional filtering.

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context, opts ...ListOption) (*UserList, error)

ListUsers lists all users in the account.

func (*Client) Subdomain

func (c *Client) Subdomain() string

Subdomain returns the configured Aha subdomain.

func (*Client) UpdateComment

func (c *Client) UpdateComment(ctx context.Context, id string, opts ...UpdateCommentOption) (*Comment, error)

UpdateComment updates an existing comment.

func (*Client) UpdateEpic

func (c *Client) UpdateEpic(ctx context.Context, id string, opts ...UpdateEpicOption) (*Epic, error)

UpdateEpic updates an existing epic.

func (*Client) UpdateFeature

func (c *Client) UpdateFeature(ctx context.Context, id string, opts ...UpdateFeatureOption) (*Feature, error)

UpdateFeature updates an existing feature.

func (*Client) UpdateGoal

func (c *Client) UpdateGoal(ctx context.Context, id string, opts ...UpdateGoalOption) (*Goal, error)

UpdateGoal updates an existing goal.

func (*Client) UpdateInitiative

func (c *Client) UpdateInitiative(ctx context.Context, id string, opts ...UpdateInitiativeOption) (*Initiative, error)

UpdateInitiative updates an existing initiative.

func (*Client) UpdateRelease

func (c *Client) UpdateRelease(ctx context.Context, id string, opts ...UpdateReleaseOption) (*Release, error)

UpdateRelease updates an existing release.

func (*Client) UpdateRequirement

func (c *Client) UpdateRequirement(ctx context.Context, id string, opts ...UpdateRequirementOption) (*Requirement, error)

UpdateRequirement updates an existing requirement.

func (*Client) UpdateStrategicModel

func (c *Client) UpdateStrategicModel(ctx context.Context, id string, opts ...UpdateStrategicModelOption) (*StrategicModel, error)

UpdateStrategicModel updates an existing strategic model.

func (*Client) UpdateStrategicModelComponent

func (c *Client) UpdateStrategicModelComponent(ctx context.Context, modelID, componentID, description string) (*StrategicModelComponent, error)

UpdateStrategicModelComponent updates a component within a strategic model.

type Comment

type Comment struct {
	ID          string
	Body        string
	URL         string
	Resource    string
	CreatedAt   time.Time
	UpdatedAt   time.Time
	User        *User
	Attachments []Attachment
	Commentable *Commentable
}

Comment represents an Aha comment.

type CommentList

type CommentList struct {
	Comments   []CommentMeta
	Pagination Pagination
}

CommentList represents a paginated list of comments.

type CommentMeta

type CommentMeta struct {
	ID        string
	Body      string
	URL       string
	Resource  string
	CreatedAt time.Time
	User      *User
}

CommentMeta represents comment metadata in list responses.

type Commentable

type Commentable struct {
	Type      string
	ID        string
	ProductID string
	URL       string
	Resource  string
}

Commentable represents the object that was commented on.

type Config

type Config struct {
	// Subdomain is your Aha account subdomain (e.g., "mycompany" for mycompany.aha.io).
	Subdomain string

	// APIKey is your Aha API key for authentication.
	APIKey string

	// HTTPClient is the HTTP client to use for requests.
	// If nil, http.DefaultClient is used.
	HTTPClient *http.Client

	// Timeout is the request timeout.
	// Default is 60 seconds.
	Timeout time.Duration

	// BaseURL overrides the default API URL.
	// If empty, https://{subdomain}.aha.io/api/v1 is used.
	BaseURL string
}

Config holds the configuration for the Aha client.

type CreateCommentOption

type CreateCommentOption func(*CreateCommentOptions)

CreateCommentOption configures a CreateComment call.

func WithCommentBody

func WithCommentBody(body string) CreateCommentOption

WithCommentBody sets the comment body.

type CreateCommentOptions

type CreateCommentOptions struct {
	Body string
}

CreateCommentOptions configures CreateComment calls.

type CreateEpicOption

type CreateEpicOption func(*CreateEpicOptions)

CreateEpicOption configures a CreateEpic call.

func WithEpicColor

func WithEpicColor(color string) CreateEpicOption

WithEpicColor sets the color.

func WithEpicDescription

func WithEpicDescription(desc string) CreateEpicOption

WithEpicDescription sets the epic description.

func WithEpicDueDate

func WithEpicDueDate(t time.Time) CreateEpicOption

WithEpicDueDate sets the due date.

func WithEpicInitiative

func WithEpicInitiative(initiative string) CreateEpicOption

WithEpicInitiative sets the initiative.

func WithEpicName

func WithEpicName(name string) CreateEpicOption

WithEpicName sets the epic name.

func WithEpicStartDate

func WithEpicStartDate(t time.Time) CreateEpicOption

WithEpicStartDate sets the start date.

func WithEpicStatus

func WithEpicStatus(status string) CreateEpicOption

WithEpicStatus sets the workflow status.

type CreateEpicOptions

type CreateEpicOptions struct {
	Name           string
	Description    string
	WorkflowStatus string
	StartDate      *time.Time
	DueDate        *time.Time
	Color          string
	Initiative     string
}

CreateEpicOptions configures CreateEpic.

type CreateFeatureOption

type CreateFeatureOption func(*CreateFeatureOptions)

CreateFeatureOption configures a CreateFeature call.

func WithFeatureAssignedTo

func WithFeatureAssignedTo(email string) CreateFeatureOption

WithFeatureAssignedTo sets the assigned user.

func WithFeatureDescription

func WithFeatureDescription(desc string) CreateFeatureOption

WithFeatureDescription sets the feature description.

func WithFeatureDueDate

func WithFeatureDueDate(t time.Time) CreateFeatureOption

WithFeatureDueDate sets the due date.

func WithFeatureEstimate

func WithFeatureEstimate(estimate string) CreateFeatureOption

WithFeatureEstimate sets the original estimate (e.g., "2d", "4h").

func WithFeatureInitiative

func WithFeatureInitiative(initiative string) CreateFeatureOption

WithFeatureInitiative sets the initiative.

func WithFeatureName

func WithFeatureName(name string) CreateFeatureOption

WithFeatureName sets the feature name.

func WithFeatureStartDate

func WithFeatureStartDate(t time.Time) CreateFeatureOption

WithFeatureStartDate sets the start date.

func WithFeatureStatus

func WithFeatureStatus(status string) CreateFeatureOption

WithFeatureStatus sets the workflow status.

func WithFeatureTags

func WithFeatureTags(tags string) CreateFeatureOption

WithFeatureTags sets the tags (comma-separated).

type CreateFeatureOptions

type CreateFeatureOptions struct {
	Name             string
	Description      string
	WorkflowStatus   string
	AssignedToUser   string
	Tags             string
	StartDate        *time.Time
	DueDate          *time.Time
	OriginalEstimate string
	Initiative       string
}

CreateFeatureOptions configures CreateFeature.

type CreateGoalOption

type CreateGoalOption func(*CreateGoalOptions)

CreateGoalOption configures a CreateGoal call.

func WithGoalDescription

func WithGoalDescription(desc string) CreateGoalOption

WithGoalDescription sets the goal description.

func WithGoalEndDate

func WithGoalEndDate(t time.Time) CreateGoalOption

WithGoalEndDate sets the end date.

func WithGoalName

func WithGoalName(name string) CreateGoalOption

WithGoalName sets the goal name.

func WithGoalStartDate

func WithGoalStartDate(t time.Time) CreateGoalOption

WithGoalStartDate sets the start date.

func WithGoalStatus

func WithGoalStatus(status string) CreateGoalOption

WithGoalStatus sets the workflow status.

type CreateGoalOptions

type CreateGoalOptions struct {
	Name           string
	Description    string
	WorkflowStatus string
	StartDate      *time.Time
	EndDate        *time.Time
}

CreateGoalOptions configures CreateGoal.

type CreateInitiativeOption

type CreateInitiativeOption func(*CreateInitiativeOptions)

CreateInitiativeOption configures a CreateInitiative call.

func WithInitiativeColor

func WithInitiativeColor(color string) CreateInitiativeOption

WithInitiativeColor sets the color.

func WithInitiativeDescription

func WithInitiativeDescription(desc string) CreateInitiativeOption

WithInitiativeDescription sets the initiative description.

func WithInitiativeEffort

func WithInitiativeEffort(effort float64) CreateInitiativeOption

WithInitiativeEffort sets the effort score.

func WithInitiativeEndDate

func WithInitiativeEndDate(t time.Time) CreateInitiativeOption

WithInitiativeEndDate sets the end date.

func WithInitiativeName

func WithInitiativeName(name string) CreateInitiativeOption

WithInitiativeName sets the initiative name.

func WithInitiativeStartDate

func WithInitiativeStartDate(t time.Time) CreateInitiativeOption

WithInitiativeStartDate sets the start date.

func WithInitiativeStatus

func WithInitiativeStatus(status string) CreateInitiativeOption

WithInitiativeStatus sets the workflow status.

func WithInitiativeValue

func WithInitiativeValue(value float64) CreateInitiativeOption

WithInitiativeValue sets the value score.

type CreateInitiativeOptions

type CreateInitiativeOptions struct {
	Name           string
	Description    string
	WorkflowStatus string
	StartDate      *time.Time
	EndDate        *time.Time
	Value          *float64
	Effort         *float64
	Color          string
	Presented      *bool
}

CreateInitiativeOptions configures CreateInitiative.

type CreateRequirementOption

type CreateRequirementOption func(*CreateRequirementOptions)

CreateRequirementOption configures a CreateRequirement call.

func WithRequirementAssignedTo

func WithRequirementAssignedTo(user string) CreateRequirementOption

WithRequirementAssignedTo sets the assigned user.

func WithRequirementDescription

func WithRequirementDescription(desc string) CreateRequirementOption

WithRequirementDescription sets the requirement description.

func WithRequirementEstimate

func WithRequirementEstimate(estimate float64) CreateRequirementOption

WithRequirementEstimate sets the original estimate.

func WithRequirementName

func WithRequirementName(name string) CreateRequirementOption

WithRequirementName sets the requirement name.

func WithRequirementStatus

func WithRequirementStatus(status string) CreateRequirementOption

WithRequirementStatus sets the workflow status.

type CreateRequirementOptions

type CreateRequirementOptions struct {
	Name             string
	Description      string
	WorkflowStatus   string
	AssignedToUser   string
	OriginalEstimate *float64
}

CreateRequirementOptions configures CreateRequirement.

type CreateStrategicModelOption

type CreateStrategicModelOption func(*CreateStrategicModelOptions)

CreateStrategicModelOption configures a CreateStrategicModel call.

func WithStrategicModelDescription

func WithStrategicModelDescription(desc string) CreateStrategicModelOption

WithStrategicModelDescription sets the strategic model description.

func WithStrategicModelName

func WithStrategicModelName(name string) CreateStrategicModelOption

WithStrategicModelName sets the strategic model name.

type CreateStrategicModelOptions

type CreateStrategicModelOptions struct {
	Name        string
	Kind        string // Required: e.g., "Opportunity", "Lean Canvas"
	Description string
}

CreateStrategicModelOptions configures CreateStrategicModel.

type CustomField

type CustomField struct {
	Key   string
	Name  string
	Value any
	Type  string
}

CustomField represents a custom field value.

type Epic

type Epic struct {
	ID             string
	ReferenceNum   string
	Name           string
	Description    string
	Progress       float64
	ProgressSource string
	Position       int64
	Color          string
	StartDate      *time.Time
	DueDate        *time.Time
	URL            string
	Resource       string
	CommentsCount  int64
	CreatedAt      time.Time
	UpdatedAt      *time.Time
	Tags           []string
	WorkflowStatus *WorkflowStatus
	Release        *Release
	Initiative     *InitiativeMeta
}

Epic represents an Aha epic.

type EpicList

type EpicList struct {
	Epics      []EpicMeta
	Pagination Pagination
}

EpicList represents a paginated list of epics.

type EpicMeta

type EpicMeta struct {
	ID           string
	ReferenceNum string
	Name         string
	URL          string
	Resource     string
	CreatedAt    time.Time
}

EpicMeta represents epic metadata.

type Feature

type Feature struct {
	ID             string
	ReferenceNum   string
	Name           string
	Description    string
	ProductID      string
	URL            string
	Resource       string
	CommentsCount  int64
	ProgressSource string
	WorkUnits      int64
	StartDate      *time.Time
	DueDate        *time.Time
	CreatedAt      time.Time
	UpdatedAt      *time.Time
	Tags           []string
	WorkflowStatus *WorkflowStatus
	Release        *Release
	AssignedTo     *User
	CustomFields   []CustomField
}

Feature represents an Aha feature.

type FeatureList

type FeatureList struct {
	Features   []FeatureMeta
	Pagination Pagination
}

FeatureList represents a paginated list of features.

type FeatureMeta

type FeatureMeta struct {
	ID           string
	ReferenceNum string
	Name         string
	URL          string
	Resource     string
	CreatedAt    time.Time
}

FeatureMeta represents feature metadata in list responses.

type Goal

type Goal struct {
	ID             string
	ReferenceNum   string
	Name           string
	Description    string
	Progress       float64
	ProgressSource string
	Status         string
	StartDate      *time.Time
	EndDate        *time.Time
	URL            string
	Resource       string
	CreatedAt      time.Time
	UpdatedAt      *time.Time
	TimeFrame      *TimeFrame
	WorkflowStatus *WorkflowStatus
	CustomFields   []CustomField
}

Goal represents an Aha goal.

type GoalList

type GoalList struct {
	Goals      []GoalMeta
	Pagination Pagination
}

GoalList represents a paginated list of goals.

type GoalMeta

type GoalMeta struct {
	ID           string
	ReferenceNum string
	Name         string
	URL          string
	Resource     string
	CreatedAt    time.Time
}

GoalMeta represents goal metadata in list responses.

type Idea

type Idea struct {
	ID              string
	ReferenceNum    string
	Name            string
	Description     string
	Votes           int
	CreatedAt       time.Time
	UpdatedAt       time.Time
	StatusChangedAt *time.Time
	WorkflowStatus  *WorkflowStatus
	Categories      []Category
	Feature         *IdeaFeature
}

Idea represents an Aha idea.

type IdeaFeature

type IdeaFeature struct {
	ID           string
	ReferenceNum string
	Name         string
	URL          string
	Resource     string
	ProductID    string
	CreatedAt    time.Time
}

IdeaFeature represents a feature linked to an idea.

type IdeaList

type IdeaList struct {
	Ideas      []Idea
	Pagination Pagination
}

IdeaList represents a paginated list of ideas.

type Initiative

type Initiative struct {
	ID             string
	ReferenceNum   string
	Name           string
	Description    string
	Color          string
	Position       int64
	Value          float64
	Effort         float64
	Presented      bool
	StartDate      *time.Time
	EndDate        *time.Time
	Progress       float64
	ProgressSource string
	URL            string
	Resource       string
	CreatedAt      time.Time
	UpdatedAt      *time.Time
	WorkflowStatus *WorkflowStatus
	Epic           *EpicMeta
	Features       []FeatureMeta
}

Initiative represents an Aha initiative.

type InitiativeList

type InitiativeList struct {
	Initiatives []InitiativeMeta
	Pagination  Pagination
}

InitiativeList represents a paginated list of initiatives.

type InitiativeMeta

type InitiativeMeta struct {
	ID           string
	ReferenceNum string
	Name         string
	URL          string
	Resource     string
	CreatedAt    time.Time
}

InitiativeMeta represents initiative metadata in list responses.

type ListEpicsOption

type ListEpicsOption func(*ListEpicsOptions)

ListEpicsOption configures a ListEpics call.

func WithEpicPage

func WithEpicPage(page int) ListEpicsOption

WithEpicPage sets the page number for pagination.

func WithEpicPerPage

func WithEpicPerPage(perPage int) ListEpicsOption

WithEpicPerPage sets the number of results per page.

func WithEpicQuery

func WithEpicQuery(query string) ListEpicsOption

WithEpicQuery filters epics by search query.

func WithEpicUpdatedSince

func WithEpicUpdatedSince(t time.Time) ListEpicsOption

WithEpicUpdatedSince filters epics updated after the given time.

type ListEpicsOptions

type ListEpicsOptions struct {
	Query        string
	UpdatedSince *time.Time
	Page         int
	PerPage      int
}

ListEpicsOptions configures ListEpics.

type ListFeaturesOption

type ListFeaturesOption func(*ListFeaturesOptions)

ListFeaturesOption configures a ListFeatures call.

func WithFeatureAssignee

func WithFeatureAssignee(email string) ListFeaturesOption

WithFeatureAssignee filters features by assigned user.

func WithFeaturePage

func WithFeaturePage(page int) ListFeaturesOption

WithFeaturePage sets the page number for pagination.

func WithFeaturePerPage

func WithFeaturePerPage(perPage int) ListFeaturesOption

WithFeaturePerPage sets the number of results per page.

func WithFeatureQuery

func WithFeatureQuery(query string) ListFeaturesOption

WithFeatureQuery filters features by search query.

func WithFeatureTag

func WithFeatureTag(tag string) ListFeaturesOption

WithFeatureTag filters features by tag.

func WithFeatureUpdatedSince

func WithFeatureUpdatedSince(t time.Time) ListFeaturesOption

WithFeatureUpdatedSince filters features updated after the given time.

type ListFeaturesOptions

type ListFeaturesOptions struct {
	Query          string
	AssignedToUser string
	Tag            string
	UpdatedSince   *time.Time
	Page           int
	PerPage        int
}

ListFeaturesOptions configures ListFeatures.

type ListGoalsOption

type ListGoalsOption func(*ListGoalsOptions)

ListGoalsOption configures a ListGoals call.

func WithGoalPage

func WithGoalPage(page int) ListGoalsOption

WithGoalPage sets the page number for pagination.

func WithGoalPerPage

func WithGoalPerPage(perPage int) ListGoalsOption

WithGoalPerPage sets the number of results per page.

func WithGoalQuery

func WithGoalQuery(query string) ListGoalsOption

WithGoalQuery filters goals by search query.

func WithGoalUpdatedSince

func WithGoalUpdatedSince(t time.Time) ListGoalsOption

WithGoalUpdatedSince filters goals updated after the given time.

type ListGoalsOptions

type ListGoalsOptions struct {
	Query        string
	UpdatedSince *time.Time
	Page         int
	PerPage      int
}

ListGoalsOptions configures ListGoals.

type ListIdeasOption

type ListIdeasOption func(*ListIdeasOptions)

ListIdeasOption configures a ListIdeas call.

func WithIdeaCreatedBefore

func WithIdeaCreatedBefore(t time.Time) ListIdeasOption

WithIdeaCreatedBefore filters ideas created before the given time.

func WithIdeaCreatedSince

func WithIdeaCreatedSince(t time.Time) ListIdeasOption

WithIdeaCreatedSince filters ideas created after the given time.

func WithIdeaIdeaUserID

func WithIdeaIdeaUserID(ideaUserID string) ListIdeasOption

WithIdeaIdeaUserID filters ideas by idea user ID.

func WithIdeaPage

func WithIdeaPage(page int) ListIdeasOption

WithIdeaPage sets the page number for pagination.

func WithIdeaPerPage

func WithIdeaPerPage(perPage int) ListIdeasOption

WithIdeaPerPage sets the number of results per page.

func WithIdeaQuery

func WithIdeaQuery(query string) ListIdeasOption

WithIdeaQuery filters ideas by search query.

func WithIdeaSort

func WithIdeaSort(sort string) ListIdeasOption

WithIdeaSort sets the sort order (recent, trending, popular).

func WithIdeaSpam

func WithIdeaSpam(spam bool) ListIdeasOption

WithIdeaSpam filters ideas by spam status.

func WithIdeaStatus

func WithIdeaStatus(status string) ListIdeasOption

WithIdeaStatus filters ideas by workflow status.

func WithIdeaTag

func WithIdeaTag(tag string) ListIdeasOption

WithIdeaTag filters ideas by tag.

func WithIdeaUpdatedSince

func WithIdeaUpdatedSince(t time.Time) ListIdeasOption

WithIdeaUpdatedSince filters ideas updated after the given time.

func WithIdeaUserID

func WithIdeaUserID(userID string) ListIdeasOption

WithIdeaUserID filters ideas by creator user ID.

type ListIdeasOptions

type ListIdeasOptions struct {
	Query          string
	WorkflowStatus string
	Sort           string
	Spam           *bool
	Tag            string
	UserID         string
	IdeaUserID     string
	CreatedBefore  *time.Time
	CreatedSince   *time.Time
	UpdatedSince   *time.Time
	Page           int
	PerPage        int
}

ListIdeasOptions configures ListIdeas.

type ListInitiativesOption

type ListInitiativesOption func(*ListInitiativesOptions)

ListInitiativesOption configures a ListInitiatives call.

func WithInitiativePage

func WithInitiativePage(page int) ListInitiativesOption

WithInitiativePage sets the page number for pagination.

func WithInitiativePerPage

func WithInitiativePerPage(perPage int) ListInitiativesOption

WithInitiativePerPage sets the number of results per page.

func WithInitiativeQuery

func WithInitiativeQuery(query string) ListInitiativesOption

WithInitiativeQuery filters initiatives by search query.

func WithInitiativeUpdatedSince

func WithInitiativeUpdatedSince(t time.Time) ListInitiativesOption

WithInitiativeUpdatedSince filters initiatives updated after the given time.

type ListInitiativesOptions

type ListInitiativesOptions struct {
	Query        string
	UpdatedSince *time.Time
	Page         int
	PerPage      int
}

ListInitiativesOptions configures ListInitiatives.

type ListOption

type ListOption func(*ListOptions)

ListOption configures a list operation.

func WithPage

func WithPage(page int) ListOption

WithPage sets the page number for pagination.

func WithPerPage

func WithPerPage(perPage int) ListOption

WithPerPage sets the number of results per page.

type ListOptions

type ListOptions struct {
	Page    int
	PerPage int
}

ListOptions configures list operations.

type ListStrategicModelsOption

type ListStrategicModelsOption func(*ListStrategicModelsOptions)

ListStrategicModelsOption configures a ListStrategicModels call.

func WithStrategicModelKind

func WithStrategicModelKind(kind string) ListStrategicModelsOption

WithStrategicModelKind filters strategic models by kind.

type ListStrategicModelsOptions

type ListStrategicModelsOptions struct {
	Kind    string // Filter by model kind
	Page    int
	PerPage int
}

ListStrategicModelsOptions configures ListStrategicModels.

type Option

type Option func(*Config)

Option configures the Aha client.

func WithAPIKey

func WithAPIKey(apiKey string) Option

WithAPIKey sets the Aha API key.

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL overrides the default API URL.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets a custom HTTP client.

func WithSubdomain

func WithSubdomain(subdomain string) Option

WithSubdomain sets the Aha account subdomain.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout sets the request timeout.

type Pagination

type Pagination struct {
	TotalRecords int64
	TotalPages   int64
	CurrentPage  int64
}

Pagination represents pagination info.

type Product

type Product struct {
	ID                string
	ReferencePrefix   string
	Name              string
	ProductLine       bool
	CreatedAt         time.Time
	UpdatedAt         *time.Time
	URL               string
	Resource          string
	HasIdeas          bool
	HasMasterFeatures bool
}

Product represents an Aha product (workspace).

type ProductList

type ProductList struct {
	Products   []ProductMeta
	Pagination Pagination
}

ProductList represents a paginated list of products.

type ProductMeta

type ProductMeta struct {
	ID              string
	ReferencePrefix string
	Name            string
	ProductLine     bool
	CreatedAt       time.Time
}

ProductMeta represents product metadata in list responses.

type Release

type Release struct {
	ID                  string
	ReferenceNum        string
	Name                string
	StartDate           *time.Time
	ReleaseDate         *time.Time
	ExternalReleaseDate *time.Time
	Released            bool
	ParkingLot          bool
	URL                 string
	Resource            string
}

Release represents an Aha release.

type ReleaseList

type ReleaseList struct {
	Releases   []Release
	Pagination Pagination
}

ReleaseList represents a paginated list of releases.

type Requirement

type Requirement struct {
	ID                string
	ReferenceNum      string
	Name              string
	Description       string
	Position          int64
	OriginalEstimate  float64
	RemainingEstimate float64
	WorkDone          float64
	URL               string
	Resource          string
	CreatedAt         time.Time
	UpdatedAt         *time.Time
	WorkflowStatus    *WorkflowStatus
	AssignedToUser    *User
	Feature           *FeatureMeta
}

Requirement represents an Aha requirement.

type RequirementList

type RequirementList struct {
	Requirements []RequirementMeta
	Pagination   Pagination
}

RequirementList represents a paginated list of requirements.

type RequirementMeta

type RequirementMeta struct {
	ID           string
	ReferenceNum string
	Name         string
	URL          string
	Resource     string
	CreatedAt    time.Time
}

RequirementMeta represents requirement metadata in list responses.

type StrategicModel

type StrategicModel struct {
	ID           string
	ReferenceNum string
	Name         string
	Kind         string // e.g., "Opportunity", "Lean Canvas", "Business Model"
	Description  string
	URL          string
	Resource     string
	CreatedAt    time.Time
	UpdatedAt    *time.Time
	Project      *ProductMeta
	Components   []StrategicModelComponent
}

StrategicModel represents an Aha strategic model (canvas).

type StrategicModelComponent

type StrategicModelComponent struct {
	ID          string
	Name        string // e.g., "Users & Customers", "Problems", "Solutions"
	Description string // Content of the block (HTML)
	Position    int64
}

StrategicModelComponent represents a block within a strategic model.

type StrategicModelList

type StrategicModelList struct {
	StrategicModels []StrategicModelMeta
	Pagination      Pagination
}

StrategicModelList represents a paginated list of strategic models.

type StrategicModelMeta

type StrategicModelMeta struct {
	ID           string
	ReferenceNum string
	Name         string
	Kind         string
	URL          string
	Resource     string
	CreatedAt    time.Time
}

StrategicModelMeta represents strategic model metadata in list responses.

type TimeFrame

type TimeFrame struct {
	ID   string
	Name string
}

TimeFrame represents a goal time frame.

type UpdateCommentOption

type UpdateCommentOption func(*UpdateCommentOptions)

UpdateCommentOption configures an UpdateComment call.

func WithUpdateCommentBody

func WithUpdateCommentBody(body string) UpdateCommentOption

WithUpdateCommentBody sets the comment body.

type UpdateCommentOptions

type UpdateCommentOptions struct {
	Body string
}

UpdateCommentOptions configures UpdateComment calls.

type UpdateEpicOption

type UpdateEpicOption func(*UpdateEpicOptions)

UpdateEpicOption configures an UpdateEpic call.

func WithUpdateEpicDescription

func WithUpdateEpicDescription(desc string) UpdateEpicOption

WithUpdateEpicDescription sets the epic description.

func WithUpdateEpicName

func WithUpdateEpicName(name string) UpdateEpicOption

WithUpdateEpicName sets the epic name.

func WithUpdateEpicProgress

func WithUpdateEpicProgress(progress float64) UpdateEpicOption

WithUpdateEpicProgress sets the progress (when progress_source is manual).

func WithUpdateEpicStatus

func WithUpdateEpicStatus(status string) UpdateEpicOption

WithUpdateEpicStatus sets the workflow status.

type UpdateEpicOptions

type UpdateEpicOptions struct {
	Name           string
	Description    string
	WorkflowStatus string
	StartDate      *time.Time
	DueDate        *time.Time
	Progress       *float64
	Color          string
	Initiative     string
}

UpdateEpicOptions configures UpdateEpic.

type UpdateFeatureOption

type UpdateFeatureOption func(*UpdateFeatureOptions)

UpdateFeatureOption configures an UpdateFeature call.

func WithUpdateFeatureAssignedToUser

func WithUpdateFeatureAssignedToUser(email string) UpdateFeatureOption

WithUpdateFeatureAssignedToUser sets the assigned user.

func WithUpdateFeatureDescription

func WithUpdateFeatureDescription(desc string) UpdateFeatureOption

WithUpdateFeatureDescription sets the feature description.

func WithUpdateFeatureDueDate

func WithUpdateFeatureDueDate(t time.Time) UpdateFeatureOption

WithUpdateFeatureDueDate sets the due date.

func WithUpdateFeatureInitiative

func WithUpdateFeatureInitiative(initiative string) UpdateFeatureOption

WithUpdateFeatureInitiative sets the initiative.

func WithUpdateFeatureName

func WithUpdateFeatureName(name string) UpdateFeatureOption

WithUpdateFeatureName sets the feature name.

func WithUpdateFeatureRelease

func WithUpdateFeatureRelease(release string) UpdateFeatureOption

WithUpdateFeatureRelease sets the release.

func WithUpdateFeatureStartDate

func WithUpdateFeatureStartDate(t time.Time) UpdateFeatureOption

WithUpdateFeatureStartDate sets the start date.

func WithUpdateFeatureStatus

func WithUpdateFeatureStatus(status string) UpdateFeatureOption

WithUpdateFeatureStatus sets the workflow status.

func WithUpdateFeatureTags

func WithUpdateFeatureTags(tags string) UpdateFeatureOption

WithUpdateFeatureTags sets the tags.

type UpdateFeatureOptions

type UpdateFeatureOptions struct {
	Name              string
	Description       string
	WorkflowStatus    string
	AssignedToUser    string
	Tags              string
	StartDate         *time.Time
	DueDate           *time.Time
	Release           string
	OriginalEstimate  string
	RemainingEstimate string
	Initiative        string
	ReleasePhase      string
}

UpdateFeatureOptions configures UpdateFeature.

type UpdateGoalOption

type UpdateGoalOption func(*UpdateGoalOptions)

UpdateGoalOption configures an UpdateGoal call.

func WithUpdateGoalDescription

func WithUpdateGoalDescription(desc string) UpdateGoalOption

WithUpdateGoalDescription sets the goal description.

func WithUpdateGoalName

func WithUpdateGoalName(name string) UpdateGoalOption

WithUpdateGoalName sets the goal name.

func WithUpdateGoalProgress

func WithUpdateGoalProgress(progress float64) UpdateGoalOption

WithUpdateGoalProgress sets the progress (when progress_source is manual).

func WithUpdateGoalStatus

func WithUpdateGoalStatus(status string) UpdateGoalOption

WithUpdateGoalStatus sets the workflow status.

type UpdateGoalOptions

type UpdateGoalOptions struct {
	Name           string
	Description    string
	WorkflowStatus string
	StartDate      *time.Time
	EndDate        *time.Time
	Progress       *float64
}

UpdateGoalOptions configures UpdateGoal.

type UpdateInitiativeOption

type UpdateInitiativeOption func(*UpdateInitiativeOptions)

UpdateInitiativeOption configures an UpdateInitiative call.

type UpdateInitiativeOptions

type UpdateInitiativeOptions struct {
	Name           string
	Description    string
	WorkflowStatus string
	StartDate      *time.Time
	EndDate        *time.Time
	Value          *float64
	Effort         *float64
	Color          string
	Presented      *bool
}

UpdateInitiativeOptions configures UpdateInitiative.

type UpdateReleaseOption

type UpdateReleaseOption func(*UpdateReleaseOptions)

UpdateReleaseOption configures an UpdateRelease call.

func WithReleaseDate

func WithReleaseDate(t time.Time) UpdateReleaseOption

WithReleaseDate sets the release date.

func WithReleaseName

func WithReleaseName(name string) UpdateReleaseOption

WithReleaseName sets the release name.

func WithReleaseParkingLot

func WithReleaseParkingLot(parkingLot bool) UpdateReleaseOption

WithReleaseParkingLot sets whether this is a parking lot release.

func WithReleaseStartDate

func WithReleaseStartDate(t time.Time) UpdateReleaseOption

WithReleaseStartDate sets the start date.

type UpdateReleaseOptions

type UpdateReleaseOptions struct {
	Name                 string
	StartDate            *time.Time
	ReleaseDate          *time.Time
	ExternalReleaseDate  *time.Time
	DevelopmentStartedOn *time.Time
	ParkingLot           *bool
}

UpdateReleaseOptions configures UpdateRelease.

type UpdateRequirementOption

type UpdateRequirementOption func(*UpdateRequirementOptions)

UpdateRequirementOption configures an UpdateRequirement call.

func WithUpdateRequirementDescription

func WithUpdateRequirementDescription(desc string) UpdateRequirementOption

WithUpdateRequirementDescription sets the requirement description.

func WithUpdateRequirementName

func WithUpdateRequirementName(name string) UpdateRequirementOption

WithUpdateRequirementName sets the requirement name.

func WithUpdateRequirementStatus

func WithUpdateRequirementStatus(status string) UpdateRequirementOption

WithUpdateRequirementStatus sets the workflow status.

func WithUpdateRequirementWorkDone

func WithUpdateRequirementWorkDone(done float64) UpdateRequirementOption

WithUpdateRequirementWorkDone sets the work done.

type UpdateRequirementOptions

type UpdateRequirementOptions struct {
	Name              string
	Description       string
	WorkflowStatus    string
	AssignedToUser    string
	OriginalEstimate  *float64
	RemainingEstimate *float64
	WorkDone          *float64
}

UpdateRequirementOptions configures UpdateRequirement.

type UpdateStrategicModelOption

type UpdateStrategicModelOption func(*UpdateStrategicModelOptions)

UpdateStrategicModelOption configures an UpdateStrategicModel call.

type UpdateStrategicModelOptions

type UpdateStrategicModelOptions struct {
	Name        string
	Description string
}

UpdateStrategicModelOptions configures UpdateStrategicModel.

type User

type User struct {
	ID        string
	FirstName string
	LastName  string
	Email     string
	Role      string
	CreatedAt *time.Time
}

User represents an Aha user.

func (*User) Name

func (u *User) Name() string

Name returns the user's full name.

type UserList

type UserList struct {
	Users      []User
	Pagination Pagination
}

UserList represents a paginated list of users.

type Workflow

type Workflow struct {
	ID       string
	Name     string
	Statuses []WorkflowStatus
}

Workflow represents a workflow with its statuses in Aha. WorkflowStatus is defined in feature.go.

type WorkflowList

type WorkflowList struct {
	Workflows []Workflow
}

WorkflowList represents a list of workflows.

type WorkflowStatus

type WorkflowStatus struct {
	ID       string
	Name     string
	Position int64
	Complete bool
	Color    string
}

WorkflowStatus represents a workflow status.

Directories

Path Synopsis
Package browser provides browser automation for Aha operations not available via API.
Package browser provides browser automation for Aha operations not available via API.
Package canvas provides high-level operations for Aha.io strategic canvases.
Package canvas provides high-level operations for Aha.io strategic canvases.
cmd
aha command
Command aha provides a CLI for interacting with Aha.io.
Command aha provides a CLI for interacting with Aha.io.
examples
basic command
Package main demonstrates basic usage of the aha-go client.
Package main demonstrates basic usage of the aha-go client.
Package graphql provides a type-safe GraphQL client for the Aha.io API.
Package graphql provides a type-safe GraphQL client for the Aha.io API.
example
Package example provides a handwritten GraphQL client for the Aha.io API.
Package example provides a handwritten GraphQL client for the Aha.io API.
internal
api
Code generated by ogen, DO NOT EDIT.
Code generated by ogen, DO NOT EDIT.
Package prism provides integration between aha-go and the PRISM ecosystem.
Package prism provides integration between aha-go and the PRISM ecosystem.
Package render provides rendering utilities for Aha canvases.
Package render provides rendering utilities for Aha canvases.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL