ticket

package
v0.0.0-...-ae6e62c Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpsertTicketSignal       = "upsert-ticket-signal"
	QueryTicketSummary       = "query-ticket-summary"
	TicketWorkflowIDTemplate = "ticket-workflow-%s" // e.g. ticket-workflow-1234 where 1234 is the ticket ID
)
View Source
const (
	MaxCommentsBytes = 400 * 1024
)

Variables

This section is empty.

Functions

func TicketWorkflow

func TicketWorkflow(ctx workflow.Context, ticket Ticket) error

Define the workflow

Types

type Activity

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

func NewActivity

func NewActivity(tClient client.Client, zClient zendesk.Client, genAPI genai.API) *Activity

func (*Activity) FetchComments

func (a *Activity) FetchComments(ctx context.Context, input FetchCommentsInput) (*FetchCommentsOutput, error)

func (*Activity) FetchTicket

func (a *Activity) FetchTicket(ctx context.Context, input FetchTicketInput) (*FetchTicketOutput, error)

func (*Activity) GenTicketSummary

func (a *Activity) GenTicketSummary(ctx context.Context, input GenSummaryInput) (*GenSummaryOutput, error)

func (*Activity) SignalOrganization

func (a *Activity) SignalOrganization(ctx context.Context, input SignalOrganizationInput) error

type FetchCommentsInput

type FetchCommentsInput struct {
	ID     string
	Cursor string
}

type FetchCommentsOutput

type FetchCommentsOutput struct {
	Comments   []string
	NextCursor string
}

type FetchTicketInput

type FetchTicketInput struct {
	ID string
}

type FetchTicketOutput

type FetchTicketOutput struct {
	Ticket Ticket
}

type GenSummaryInput

type GenSummaryInput struct {
	Ticket Ticket
}

type GenSummaryOutput

type GenSummaryOutput struct {
	Summary string
}

type QueryTicketOutput

type QueryTicketOutput struct {
	Summary string `json:"summary"`
}

type SignalOrganizationInput

type SignalOrganizationInput struct {
	OrganizationID int64
	TicketID       int64
	TicketSummary  string
}

type Ticket

type Ticket struct {
	ID               int64
	Subject          string
	Description      string
	Priority         string
	Status           string
	Requester        string
	Assignee         string
	OrganizationID   int64
	OrganizationName string
	CreatedAt        *time.Time
	UpdatedAt        *time.Time

	// Comments and cursor
	Comments   []string
	NextCursor string

	// LLM generated summary
	Summary string
}

type UpdateOrganizationSignal

type UpdateOrganizationSignal struct {
	OrganizationID int64
	TicketID       int64
	TicketSummary  string
}

type UpsertTicketInput

type UpsertTicketInput struct {
	TicketID string
}

Jump to

Keyboard shortcuts

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