Documentation
¶
Index ¶
- Constants
- func IsIncidentManagementRequestPractice(practice string) bool
- type ADFDoc
- type ADFNode
- type ADFText
- type Client
- func (c *Client) CreateIncident(cloudID string, req *CreateIncidentAPIRequest) (*CreateIncidentAPIResponse, error)
- func (c *Client) CreateIssue(req *CreateIssueRequest) (*CreateIssueResponse, error)
- func (c *Client) DeleteIncident(cloudID, issueID string) error
- func (c *Client) DeleteIssue(issueKey string, opts DeleteIssueOptions) error
- func (c *Client) DoTransition(issueKey, id string) error
- func (c *Client) FetchCloudID() (string, error)
- func (c *Client) GetCurrentUser() (*User, error)
- func (c *Client) GetIncident(cloudID, issueID string) (map[string]any, error)
- func (c *Client) GetIssue(issueKey string) (*Issue, error)
- func (c *Client) GetIssueTransitions(issueKey string) ([]Transition, error)
- func (c *Client) GetIssueWithOptions(issueKey string, opts GetIssueOptions) (*Issue, error)
- func (c *Client) GetProjectIssueTypes(projectKey string) ([]IssueTypeMeta, error)
- func (c *Client) GetProjectStatuses(projectKey string) ([]Status, error)
- func (c *Client) GetRequestType(serviceDeskID, requestTypeID string) (*RequestType, error)
- func (c *Client) ListAssignableUsers(projectKey string) ([]User, error)
- func (c *Client) ListCustomFieldOptions(fieldID, projectKey, fieldLabel string) []RequestTypeFieldValue
- func (c *Client) ListCustomerRequestsByServiceDesk(serviceDeskID string, maxTotal int) ([]CustomerRequestListed, error)
- func (c *Client) ListFields() ([]JiraFieldInfo, error)
- func (c *Client) ListPriorities() ([]Priority, error)
- func (c *Client) ListProjects() ([]Project, error)
- func (c *Client) ListRequestTypeFields(serviceDeskID, requestTypeID string) ([]RequestTypeField, error)
- func (c *Client) ListRequestTypes(serviceDeskID string) ([]RequestType, error)
- func (c *Client) ListServiceDesks() ([]ServiceDesk, error)
- func (c *Client) ResolveNumericIssueID(ref string) (string, error)
- func (c *Client) SearchIssues(jql string, maxResults int) ([]IssueSearchHit, error)
- func (c *Client) SearchIssuesUpTo(jql string, maxIssues int) ([]IssueSearchHit, error)
- func (c *Client) UpdateIssue(issueKey string, req *UpdateIssueRequest, opts UpdateIssueOptions) error
- type CreateIncident
- func (c *CreateIncident) Cancel(ctx core.ExecutionContext) error
- func (c *CreateIncident) Cleanup(ctx core.SetupContext) error
- func (c *CreateIncident) Color() string
- func (c *CreateIncident) Configuration() []configuration.Field
- func (c *CreateIncident) Description() string
- func (c *CreateIncident) Documentation() string
- func (c *CreateIncident) ExampleOutput() map[string]any
- func (c *CreateIncident) Execute(ctx core.ExecutionContext) error
- func (c *CreateIncident) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateIncident) Hooks() []core.Hook
- func (c *CreateIncident) Icon() string
- func (c *CreateIncident) Label() string
- func (c *CreateIncident) Name() string
- func (c *CreateIncident) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateIncident) Setup(ctx core.SetupContext) error
- type CreateIncidentAPIRequest
- type CreateIncidentAPIResponse
- type CreateIncidentNodeMetadata
- type CreateIncidentSpec
- type CreateIssue
- func (c *CreateIssue) Cancel(ctx core.ExecutionContext) error
- func (c *CreateIssue) Cleanup(ctx core.SetupContext) error
- func (c *CreateIssue) Color() string
- func (c *CreateIssue) Configuration() []configuration.Field
- func (c *CreateIssue) Description() string
- func (c *CreateIssue) Documentation() string
- func (c *CreateIssue) ExampleOutput() map[string]any
- func (c *CreateIssue) Execute(ctx core.ExecutionContext) error
- func (c *CreateIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateIssue) Hooks() []core.Hook
- func (c *CreateIssue) Icon() string
- func (c *CreateIssue) Label() string
- func (c *CreateIssue) Name() string
- func (c *CreateIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateIssue) Setup(ctx core.SetupContext) error
- type CreateIssueFields
- type CreateIssueRequest
- type CreateIssueResponse
- type CreateIssueSpec
- type CustomerRequestListed
- type DeleteIncident
- func (c *DeleteIncident) Cancel(ctx core.ExecutionContext) error
- func (c *DeleteIncident) Cleanup(ctx core.SetupContext) error
- func (c *DeleteIncident) Color() string
- func (c *DeleteIncident) Configuration() []configuration.Field
- func (c *DeleteIncident) Description() string
- func (c *DeleteIncident) Documentation() string
- func (c *DeleteIncident) ExampleOutput() map[string]any
- func (c *DeleteIncident) Execute(ctx core.ExecutionContext) error
- func (c *DeleteIncident) HandleHook(ctx core.ActionHookContext) error
- func (c *DeleteIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *DeleteIncident) Hooks() []core.Hook
- func (c *DeleteIncident) Icon() string
- func (c *DeleteIncident) Label() string
- func (c *DeleteIncident) Name() string
- func (c *DeleteIncident) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeleteIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *DeleteIncident) Setup(ctx core.SetupContext) error
- type DeleteIncidentSpec
- type DeleteIssue
- func (c *DeleteIssue) Cancel(ctx core.ExecutionContext) error
- func (c *DeleteIssue) Cleanup(ctx core.SetupContext) error
- func (c *DeleteIssue) Color() string
- func (c *DeleteIssue) Configuration() []configuration.Field
- func (c *DeleteIssue) Description() string
- func (c *DeleteIssue) Documentation() string
- func (c *DeleteIssue) ExampleOutput() map[string]any
- func (c *DeleteIssue) Execute(ctx core.ExecutionContext) error
- func (c *DeleteIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *DeleteIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *DeleteIssue) Hooks() []core.Hook
- func (c *DeleteIssue) Icon() string
- func (c *DeleteIssue) Label() string
- func (c *DeleteIssue) Name() string
- func (c *DeleteIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeleteIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *DeleteIssue) Setup(ctx core.SetupContext) error
- type DeleteIssueOptions
- type DeleteIssueOutput
- type DeleteIssueSpec
- type GetIncident
- func (c *GetIncident) Cancel(ctx core.ExecutionContext) error
- func (c *GetIncident) Cleanup(ctx core.SetupContext) error
- func (c *GetIncident) Color() string
- func (c *GetIncident) Configuration() []configuration.Field
- func (c *GetIncident) Description() string
- func (c *GetIncident) Documentation() string
- func (c *GetIncident) ExampleOutput() map[string]any
- func (c *GetIncident) Execute(ctx core.ExecutionContext) error
- func (c *GetIncident) HandleHook(ctx core.ActionHookContext) error
- func (c *GetIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *GetIncident) Hooks() []core.Hook
- func (c *GetIncident) Icon() string
- func (c *GetIncident) Label() string
- func (c *GetIncident) Name() string
- func (c *GetIncident) OutputChannels(configuration any) []core.OutputChannel
- func (c *GetIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *GetIncident) Setup(ctx core.SetupContext) error
- type GetIncidentSpec
- type GetIssue
- func (c *GetIssue) Cancel(ctx core.ExecutionContext) error
- func (c *GetIssue) Cleanup(ctx core.SetupContext) error
- func (c *GetIssue) Color() string
- func (c *GetIssue) Configuration() []configuration.Field
- func (c *GetIssue) Description() string
- func (c *GetIssue) Documentation() string
- func (c *GetIssue) ExampleOutput() map[string]any
- func (c *GetIssue) Execute(ctx core.ExecutionContext) error
- func (c *GetIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *GetIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *GetIssue) Hooks() []core.Hook
- func (c *GetIssue) Icon() string
- func (c *GetIssue) Label() string
- func (c *GetIssue) Name() string
- func (c *GetIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *GetIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *GetIssue) Setup(ctx core.SetupContext) error
- type GetIssueOptions
- type GetIssueSpec
- type IncidentCustomFieldRow
- type Issue
- type IssueSearchHit
- type IssueType
- type IssueTypeMeta
- type Jira
- func (j *Jira) Actions() []core.Action
- func (j *Jira) Cleanup(ctx core.IntegrationCleanupContext) error
- func (j *Jira) Configuration() []configuration.Field
- func (j *Jira) Description() string
- func (j *Jira) HandleHook(ctx core.IntegrationHookContext) error
- func (j *Jira) HandleRequest(ctx core.HTTPRequestContext)
- func (j *Jira) Hooks() []core.Hook
- func (j *Jira) Icon() string
- func (j *Jira) Instructions() string
- func (j *Jira) Label() string
- func (j *Jira) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (j *Jira) Name() string
- func (j *Jira) Sync(ctx core.SyncContext) error
- func (j *Jira) Triggers() []core.Trigger
- type JiraFieldInfo
- type Metadata
- type NodeMetadata
- type Priority
- type Project
- type ProjectRef
- type RequestType
- type RequestTypeField
- type RequestTypeFieldValue
- type ServiceDesk
- type Status
- type Transition
- type UpdateIssue
- func (c *UpdateIssue) Cancel(ctx core.ExecutionContext) error
- func (c *UpdateIssue) Cleanup(ctx core.SetupContext) error
- func (c *UpdateIssue) Color() string
- func (c *UpdateIssue) Configuration() []configuration.Field
- func (c *UpdateIssue) Description() string
- func (c *UpdateIssue) Documentation() string
- func (c *UpdateIssue) ExampleOutput() map[string]any
- func (c *UpdateIssue) Execute(ctx core.ExecutionContext) error
- func (c *UpdateIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *UpdateIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *UpdateIssue) Hooks() []core.Hook
- func (c *UpdateIssue) Icon() string
- func (c *UpdateIssue) Label() string
- func (c *UpdateIssue) Name() string
- func (c *UpdateIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *UpdateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *UpdateIssue) Setup(ctx core.SetupContext) error
- type UpdateIssueOptions
- type UpdateIssueRequest
- type UpdateIssueSpec
- type User
- type UserRef
Constants ¶
const CreateIssuePayloadType = "jira.issue"
const CreateJiraIncidentPayloadType = "jira.incident.created"
const DeleteIssuePayloadType = "jira.issueDeleted"
const DeleteJiraIncidentPayloadType = "jira.incident.deleted"
const GetIssuePayloadType = "jira.issue"
const GetJiraIncidentPayloadType = "jira.incident.fetched"
const UpdateIssuePayloadType = "jira.issue"
Variables ¶
This section is empty.
Functions ¶
func IsIncidentManagementRequestPractice ¶ added in v0.22.0
IsIncidentManagementRequestPractice reports whether a JSM request type's `practice` field corresponds to the Incident management work category. The JSM Incidents REST API rejects create calls when the request type is not in that category.
Types ¶
type ADFDoc ¶
type Client ¶
type Client struct {
SiteURL string
Email string
Token string
// contains filtered or unexported fields
}
Client speaks to Jira Cloud directly using the user's site URL and Basic Auth (email + API token). Endpoints resolve to `{siteUrl}/rest/api/3/...`.
func NewClient ¶
func NewClient(httpCtx core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func (*Client) CreateIncident ¶ added in v0.22.0
func (c *Client) CreateIncident(cloudID string, req *CreateIncidentAPIRequest) (*CreateIncidentAPIResponse, error)
CreateIncident creates an incident via the JSM Incidents API.
func (*Client) CreateIssue ¶
func (c *Client) CreateIssue(req *CreateIssueRequest) (*CreateIssueResponse, error)
func (*Client) DeleteIncident ¶ added in v0.22.0
DeleteIncident deletes an incident via the JSM Incidents API.
func (*Client) DeleteIssue ¶ added in v0.22.0
func (c *Client) DeleteIssue(issueKey string, opts DeleteIssueOptions) error
func (*Client) DoTransition ¶ added in v0.22.0
DoTransition advances an issue along the given workflow transition.
func (*Client) FetchCloudID ¶ added in v0.22.0
FetchCloudID returns the Atlassian cloud id for the configured Jira site (required for the JSM Incidents API).
func (*Client) GetCurrentUser ¶
func (*Client) GetIncident ¶ added in v0.22.0
GetIncident returns the incident from the JSM Incidents API (issueID must be the numeric Jira issue id).
func (*Client) GetIssueTransitions ¶ added in v0.22.0
func (c *Client) GetIssueTransitions(issueKey string) ([]Transition, error)
GetIssueTransitions returns the transitions available from an issue's current workflow state.
func (*Client) GetIssueWithOptions ¶ added in v0.22.0
func (c *Client) GetIssueWithOptions(issueKey string, opts GetIssueOptions) (*Issue, error)
func (*Client) GetProjectIssueTypes ¶ added in v0.22.0
func (c *Client) GetProjectIssueTypes(projectKey string) ([]IssueTypeMeta, error)
GetProjectIssueTypes returns the issue types available for creating issues in the given project. Uses the create-metadata endpoint which scopes the list to types the user is permitted to create.
func (*Client) GetProjectStatuses ¶ added in v0.22.0
GetProjectStatuses returns the unique set of statuses across all issue types in a project. /rest/api/3/project/{key}/statuses returns an entry per issue type, each with its own status list — we flatten and dedupe by status name.
func (*Client) GetRequestType ¶ added in v0.22.0
func (c *Client) GetRequestType(serviceDeskID, requestTypeID string) (*RequestType, error)
GetRequestType returns one request type, optionally expanded (always requests expand=practice).
func (*Client) ListAssignableUsers ¶ added in v0.22.0
ListAssignableUsers returns the users assignable to issues in a given project. /rest/api/3/user/assignable/search is paginated; we cap at 50 entries, which matches the picker's practical UX.
func (*Client) ListCustomFieldOptions ¶ added in v0.22.0
func (c *Client) ListCustomFieldOptions(fieldID, projectKey, fieldLabel string) []RequestTypeFieldValue
ListCustomFieldOptions returns select options for a Jira field on Cloud using best-effort fallbacks.
func (*Client) ListCustomerRequestsByServiceDesk ¶ added in v0.22.0
func (c *Client) ListCustomerRequestsByServiceDesk(serviceDeskID string, maxTotal int) ([]CustomerRequestListed, error)
ListCustomerRequestsByServiceDesk pages through customer requests for a service desk. Agents often see JSM work here even when Jira platform issue search returns no rows for the same project.
func (*Client) ListFields ¶ added in v0.22.0
func (c *Client) ListFields() ([]JiraFieldInfo, error)
ListFields returns all fields visible to the integration (Jira REST API v3).
func (*Client) ListPriorities ¶ added in v0.22.0
ListPriorities returns all priorities configured on the Jira site. Priorities are instance-level, not project-scoped.
func (*Client) ListProjects ¶
func (*Client) ListRequestTypeFields ¶ added in v0.22.0
func (c *Client) ListRequestTypeFields(serviceDeskID, requestTypeID string) ([]RequestTypeField, error)
ListRequestTypeFields returns fields for a service desk request type (including hidden fields).
func (*Client) ListRequestTypes ¶ added in v0.22.0
func (c *Client) ListRequestTypes(serviceDeskID string) ([]RequestType, error)
ListRequestTypes returns customer request types for a service desk.
func (*Client) ListServiceDesks ¶ added in v0.22.0
func (c *Client) ListServiceDesks() ([]ServiceDesk, error)
ListServiceDesks returns service desks the authenticated user can access.
func (*Client) ResolveNumericIssueID ¶ added in v0.22.0
ResolveNumericIssueID returns the numeric issue id for the Incidents API path. If ref is all digits it is returned unchanged; otherwise ref is treated as an issue key and resolved with the Jira platform REST API.
func (*Client) SearchIssues ¶ added in v0.22.0
func (c *Client) SearchIssues(jql string, maxResults int) ([]IssueSearchHit, error)
SearchIssues runs a JQL search and returns the first page of issues (maxResults is capped at 100).
func (*Client) SearchIssuesUpTo ¶ added in v0.22.0
func (c *Client) SearchIssuesUpTo(jql string, maxIssues int) ([]IssueSearchHit, error)
SearchIssuesUpTo pages through POST /rest/api/3/search until maxIssues are collected, a page is short, or Jira reports no further results. Jira caps each request at 100 issues; busy service projects often need more than one page so incident pickers are not dominated by recently updated non-incident work.
func (*Client) UpdateIssue ¶ added in v0.22.0
func (c *Client) UpdateIssue(issueKey string, req *UpdateIssueRequest, opts UpdateIssueOptions) error
type CreateIncident ¶ added in v0.22.0
type CreateIncident struct{}
func (*CreateIncident) Cancel ¶ added in v0.22.0
func (c *CreateIncident) Cancel(ctx core.ExecutionContext) error
func (*CreateIncident) Cleanup ¶ added in v0.22.0
func (c *CreateIncident) Cleanup(ctx core.SetupContext) error
func (*CreateIncident) Color ¶ added in v0.22.0
func (c *CreateIncident) Color() string
func (*CreateIncident) Configuration ¶ added in v0.22.0
func (c *CreateIncident) Configuration() []configuration.Field
func (*CreateIncident) Description ¶ added in v0.22.0
func (c *CreateIncident) Description() string
func (*CreateIncident) Documentation ¶ added in v0.22.0
func (c *CreateIncident) Documentation() string
func (*CreateIncident) ExampleOutput ¶ added in v0.22.0
func (c *CreateIncident) ExampleOutput() map[string]any
func (*CreateIncident) Execute ¶ added in v0.22.0
func (c *CreateIncident) Execute(ctx core.ExecutionContext) error
func (*CreateIncident) HandleHook ¶ added in v0.22.0
func (c *CreateIncident) HandleHook(ctx core.ActionHookContext) error
func (*CreateIncident) HandleWebhook ¶ added in v0.22.0
func (c *CreateIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*CreateIncident) Hooks ¶ added in v0.22.0
func (c *CreateIncident) Hooks() []core.Hook
func (*CreateIncident) Icon ¶ added in v0.22.0
func (c *CreateIncident) Icon() string
func (*CreateIncident) Label ¶ added in v0.22.0
func (c *CreateIncident) Label() string
func (*CreateIncident) Name ¶ added in v0.22.0
func (c *CreateIncident) Name() string
func (*CreateIncident) OutputChannels ¶ added in v0.22.0
func (c *CreateIncident) OutputChannels(configuration any) []core.OutputChannel
func (*CreateIncident) ProcessQueueItem ¶ added in v0.22.0
func (c *CreateIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateIncident) Setup ¶ added in v0.22.0
func (c *CreateIncident) Setup(ctx core.SetupContext) error
type CreateIncidentAPIRequest ¶ added in v0.22.0
type CreateIncidentAPIRequest struct {
ServiceDeskID string `json:"serviceDeskId"`
RequestTypeID string `json:"requestTypeId"`
Fields map[string]any `json:"fields"`
Update map[string]any `json:"update,omitempty"`
AlertIDs []string `json:"alertIds,omitempty"`
}
CreateIncidentAPIRequest is the JSON body for JSM Incidents POST /v1/incident.
type CreateIncidentAPIResponse ¶ added in v0.22.0
type CreateIncidentAPIResponse struct {
ID string `json:"id"`
Key string `json:"key"`
Self string `json:"self"`
}
CreateIncidentAPIResponse is returned when an incident is created successfully.
type CreateIncidentNodeMetadata ¶ added in v0.22.0
type CreateIncidentNodeMetadata struct {
ServiceDeskName string `json:"serviceDeskName,omitempty"`
RequestTypeName string `json:"requestTypeName,omitempty"`
ImpactFieldID string `json:"impactFieldId,omitempty"`
UrgencyFieldID string `json:"urgencyFieldId,omitempty"`
}
CreateIncidentNodeMetadata is stored on create-incident nodes at setup for canvas labels and field mapping.
type CreateIncidentSpec ¶ added in v0.22.0
type CreateIncidentSpec struct {
ServiceDesk string `json:"serviceDesk" mapstructure:"serviceDesk"`
ServiceDeskRequestType string `json:"serviceDeskRequestType" mapstructure:"serviceDeskRequestType"`
Summary string `json:"summary" mapstructure:"summary"`
Description string `json:"description,omitempty" mapstructure:"description"`
DueDate string `json:"dueDate,omitempty" mapstructure:"dueDate"`
Priority string `json:"priority,omitempty" mapstructure:"priority"`
Impact string `json:"impact,omitempty" mapstructure:"impact"`
Urgency string `json:"urgency,omitempty" mapstructure:"urgency"`
OriginalEstimate string `json:"originalEstimate,omitempty" mapstructure:"originalEstimate"`
AdditionalFields map[string]any `json:"additionalFields,omitempty" mapstructure:"additionalFields"`
Update map[string]any `json:"update,omitempty" mapstructure:"update"`
AlertIDs []any `json:"alertIds,omitempty" mapstructure:"alertIds"`
CustomFieldValues []IncidentCustomFieldRow `json:"customFieldValues,omitempty" mapstructure:"customFieldValues"`
}
CreateIncidentSpec configures JSM Incidents API create (see Atlassian JSM Incidents REST reference).
type CreateIssue ¶
type CreateIssue struct{}
func (*CreateIssue) Cancel ¶
func (c *CreateIssue) Cancel(ctx core.ExecutionContext) error
func (*CreateIssue) Cleanup ¶
func (c *CreateIssue) Cleanup(ctx core.SetupContext) error
func (*CreateIssue) Color ¶
func (c *CreateIssue) Color() string
func (*CreateIssue) Configuration ¶
func (c *CreateIssue) Configuration() []configuration.Field
func (*CreateIssue) Description ¶
func (c *CreateIssue) Description() string
func (*CreateIssue) Documentation ¶
func (c *CreateIssue) Documentation() string
func (*CreateIssue) ExampleOutput ¶
func (c *CreateIssue) ExampleOutput() map[string]any
func (*CreateIssue) Execute ¶
func (c *CreateIssue) Execute(ctx core.ExecutionContext) error
func (*CreateIssue) HandleHook ¶ added in v0.18.0
func (c *CreateIssue) HandleHook(ctx core.ActionHookContext) error
func (*CreateIssue) HandleWebhook ¶
func (c *CreateIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*CreateIssue) Hooks ¶ added in v0.18.0
func (c *CreateIssue) Hooks() []core.Hook
func (*CreateIssue) Icon ¶
func (c *CreateIssue) Icon() string
func (*CreateIssue) Label ¶
func (c *CreateIssue) Label() string
func (*CreateIssue) Name ¶
func (c *CreateIssue) Name() string
func (*CreateIssue) OutputChannels ¶
func (c *CreateIssue) OutputChannels(configuration any) []core.OutputChannel
func (*CreateIssue) ProcessQueueItem ¶
func (c *CreateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateIssue) Setup ¶
func (c *CreateIssue) Setup(ctx core.SetupContext) error
type CreateIssueFields ¶
type CreateIssueFields struct {
Project ProjectRef `json:"project"`
IssueType IssueType `json:"issuetype"`
Summary string `json:"summary"`
Description *ADFDoc `json:"description,omitempty"`
Assignee *UserRef `json:"assignee,omitempty"`
}
type CreateIssueRequest ¶
type CreateIssueRequest struct {
Fields CreateIssueFields `json:"fields"`
}
type CreateIssueResponse ¶
type CreateIssueSpec ¶
type CreateIssueSpec struct {
Project string `json:"project" mapstructure:"project"`
IssueType string `json:"issueType" mapstructure:"issueType"`
Summary string `json:"summary" mapstructure:"summary"`
Description string `json:"description" mapstructure:"description"`
Assignee string `json:"assignee" mapstructure:"assignee"`
Status string `json:"status" mapstructure:"status"`
}
type CustomerRequestListed ¶ added in v0.22.0
type CustomerRequestListed struct {
IssueKey string `json:"issueKey"`
Summary string `json:"summary"`
}
CustomerRequestListed is one row from GET /rest/servicedeskapi/request (Jira Service Management).
type DeleteIncident ¶ added in v0.22.0
type DeleteIncident struct{}
func (*DeleteIncident) Cancel ¶ added in v0.22.0
func (c *DeleteIncident) Cancel(ctx core.ExecutionContext) error
func (*DeleteIncident) Cleanup ¶ added in v0.22.0
func (c *DeleteIncident) Cleanup(ctx core.SetupContext) error
func (*DeleteIncident) Color ¶ added in v0.22.0
func (c *DeleteIncident) Color() string
func (*DeleteIncident) Configuration ¶ added in v0.22.0
func (c *DeleteIncident) Configuration() []configuration.Field
func (*DeleteIncident) Description ¶ added in v0.22.0
func (c *DeleteIncident) Description() string
func (*DeleteIncident) Documentation ¶ added in v0.22.0
func (c *DeleteIncident) Documentation() string
func (*DeleteIncident) ExampleOutput ¶ added in v0.22.0
func (c *DeleteIncident) ExampleOutput() map[string]any
func (*DeleteIncident) Execute ¶ added in v0.22.0
func (c *DeleteIncident) Execute(ctx core.ExecutionContext) error
func (*DeleteIncident) HandleHook ¶ added in v0.22.0
func (c *DeleteIncident) HandleHook(ctx core.ActionHookContext) error
func (*DeleteIncident) HandleWebhook ¶ added in v0.22.0
func (c *DeleteIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeleteIncident) Hooks ¶ added in v0.22.0
func (c *DeleteIncident) Hooks() []core.Hook
func (*DeleteIncident) Icon ¶ added in v0.22.0
func (c *DeleteIncident) Icon() string
func (*DeleteIncident) Label ¶ added in v0.22.0
func (c *DeleteIncident) Label() string
func (*DeleteIncident) Name ¶ added in v0.22.0
func (c *DeleteIncident) Name() string
func (*DeleteIncident) OutputChannels ¶ added in v0.22.0
func (c *DeleteIncident) OutputChannels(configuration any) []core.OutputChannel
func (*DeleteIncident) ProcessQueueItem ¶ added in v0.22.0
func (c *DeleteIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeleteIncident) Setup ¶ added in v0.22.0
func (c *DeleteIncident) Setup(ctx core.SetupContext) error
type DeleteIncidentSpec ¶ added in v0.22.0
type DeleteIssue ¶ added in v0.22.0
type DeleteIssue struct{}
func (*DeleteIssue) Cancel ¶ added in v0.22.0
func (c *DeleteIssue) Cancel(ctx core.ExecutionContext) error
func (*DeleteIssue) Cleanup ¶ added in v0.22.0
func (c *DeleteIssue) Cleanup(ctx core.SetupContext) error
func (*DeleteIssue) Color ¶ added in v0.22.0
func (c *DeleteIssue) Color() string
func (*DeleteIssue) Configuration ¶ added in v0.22.0
func (c *DeleteIssue) Configuration() []configuration.Field
func (*DeleteIssue) Description ¶ added in v0.22.0
func (c *DeleteIssue) Description() string
func (*DeleteIssue) Documentation ¶ added in v0.22.0
func (c *DeleteIssue) Documentation() string
func (*DeleteIssue) ExampleOutput ¶ added in v0.22.0
func (c *DeleteIssue) ExampleOutput() map[string]any
func (*DeleteIssue) Execute ¶ added in v0.22.0
func (c *DeleteIssue) Execute(ctx core.ExecutionContext) error
func (*DeleteIssue) HandleHook ¶ added in v0.22.0
func (c *DeleteIssue) HandleHook(ctx core.ActionHookContext) error
func (*DeleteIssue) HandleWebhook ¶ added in v0.22.0
func (c *DeleteIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeleteIssue) Hooks ¶ added in v0.22.0
func (c *DeleteIssue) Hooks() []core.Hook
func (*DeleteIssue) Icon ¶ added in v0.22.0
func (c *DeleteIssue) Icon() string
func (*DeleteIssue) Label ¶ added in v0.22.0
func (c *DeleteIssue) Label() string
func (*DeleteIssue) Name ¶ added in v0.22.0
func (c *DeleteIssue) Name() string
func (*DeleteIssue) OutputChannels ¶ added in v0.22.0
func (c *DeleteIssue) OutputChannels(configuration any) []core.OutputChannel
func (*DeleteIssue) ProcessQueueItem ¶ added in v0.22.0
func (c *DeleteIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeleteIssue) Setup ¶ added in v0.22.0
func (c *DeleteIssue) Setup(ctx core.SetupContext) error
type DeleteIssueOptions ¶ added in v0.22.0
type DeleteIssueOptions struct {
DeleteSubtasks bool
}
type DeleteIssueOutput ¶ added in v0.22.0
type DeleteIssueSpec ¶ added in v0.22.0
type GetIncident ¶ added in v0.22.0
type GetIncident struct{}
func (*GetIncident) Cancel ¶ added in v0.22.0
func (c *GetIncident) Cancel(ctx core.ExecutionContext) error
func (*GetIncident) Cleanup ¶ added in v0.22.0
func (c *GetIncident) Cleanup(ctx core.SetupContext) error
func (*GetIncident) Color ¶ added in v0.22.0
func (c *GetIncident) Color() string
func (*GetIncident) Configuration ¶ added in v0.22.0
func (c *GetIncident) Configuration() []configuration.Field
func (*GetIncident) Description ¶ added in v0.22.0
func (c *GetIncident) Description() string
func (*GetIncident) Documentation ¶ added in v0.22.0
func (c *GetIncident) Documentation() string
func (*GetIncident) ExampleOutput ¶ added in v0.22.0
func (c *GetIncident) ExampleOutput() map[string]any
func (*GetIncident) Execute ¶ added in v0.22.0
func (c *GetIncident) Execute(ctx core.ExecutionContext) error
func (*GetIncident) HandleHook ¶ added in v0.22.0
func (c *GetIncident) HandleHook(ctx core.ActionHookContext) error
func (*GetIncident) HandleWebhook ¶ added in v0.22.0
func (c *GetIncident) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetIncident) Hooks ¶ added in v0.22.0
func (c *GetIncident) Hooks() []core.Hook
func (*GetIncident) Icon ¶ added in v0.22.0
func (c *GetIncident) Icon() string
func (*GetIncident) Label ¶ added in v0.22.0
func (c *GetIncident) Label() string
func (*GetIncident) Name ¶ added in v0.22.0
func (c *GetIncident) Name() string
func (*GetIncident) OutputChannels ¶ added in v0.22.0
func (c *GetIncident) OutputChannels(configuration any) []core.OutputChannel
func (*GetIncident) ProcessQueueItem ¶ added in v0.22.0
func (c *GetIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*GetIncident) Setup ¶ added in v0.22.0
func (c *GetIncident) Setup(ctx core.SetupContext) error
type GetIncidentSpec ¶ added in v0.22.0
type GetIssue ¶ added in v0.22.0
type GetIssue struct{}
func (*GetIssue) Cancel ¶ added in v0.22.0
func (c *GetIssue) Cancel(ctx core.ExecutionContext) error
func (*GetIssue) Configuration ¶ added in v0.22.0
func (c *GetIssue) Configuration() []configuration.Field
func (*GetIssue) Description ¶ added in v0.22.0
func (*GetIssue) Documentation ¶ added in v0.22.0
func (*GetIssue) ExampleOutput ¶ added in v0.22.0
func (*GetIssue) Execute ¶ added in v0.22.0
func (c *GetIssue) Execute(ctx core.ExecutionContext) error
func (*GetIssue) HandleHook ¶ added in v0.22.0
func (c *GetIssue) HandleHook(ctx core.ActionHookContext) error
func (*GetIssue) HandleWebhook ¶ added in v0.22.0
func (c *GetIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetIssue) OutputChannels ¶ added in v0.22.0
func (c *GetIssue) OutputChannels(configuration any) []core.OutputChannel
func (*GetIssue) ProcessQueueItem ¶ added in v0.22.0
type GetIssueOptions ¶ added in v0.22.0
type GetIssueSpec ¶ added in v0.22.0
type IncidentCustomFieldRow ¶ added in v0.22.0
type IncidentCustomFieldRow struct {
FieldID string `json:"fieldId" mapstructure:"fieldId"`
ValueJSON string `json:"valueJson" mapstructure:"valueJson"`
}
IncidentCustomFieldRow maps one Jira field id to a JSON value (object or string) as expected by the Jira API.
type IssueSearchHit ¶ added in v0.22.0
type IssueSearchHit struct {
ID string `json:"id"`
Key string `json:"key"`
Fields map[string]any `json:"fields"`
}
IssueSearchHit is one element from GET /rest/api/3/search.
type IssueTypeMeta ¶ added in v0.22.0
type Jira ¶
type Jira struct{}
func (*Jira) Configuration ¶
func (j *Jira) Configuration() []configuration.Field
func (*Jira) Description ¶
func (*Jira) HandleHook ¶ added in v0.18.0
func (j *Jira) HandleHook(ctx core.IntegrationHookContext) error
func (*Jira) HandleRequest ¶
func (j *Jira) HandleRequest(ctx core.HTTPRequestContext)
func (*Jira) Instructions ¶
func (*Jira) ListResources ¶
func (j *Jira) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type JiraFieldInfo ¶ added in v0.22.0
type JiraFieldInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Custom bool `json:"custom"`
Schema map[string]any `json:"schema,omitempty"`
}
func FindGlobalFieldByLabel ¶ added in v0.22.0
func FindGlobalFieldByLabel(fields []JiraFieldInfo, fieldLabel string) *JiraFieldInfo
FindGlobalFieldByLabel finds a field id by display name (e.g. "Urgency").
type NodeMetadata ¶
type NodeMetadata struct {
Project *Project `json:"project,omitempty"`
IssueType string `json:"issueType,omitempty"`
Status string `json:"status,omitempty"`
}
NodeMetadata stores metadata on action component nodes.
type ProjectRef ¶
type ProjectRef struct {
Key string `json:"key"`
}
type RequestType ¶ added in v0.22.0
type RequestType struct {
ID string `json:"id"`
Name string `json:"name"`
Practice string `json:"practice,omitempty"`
}
RequestType is returned by GET /rest/servicedeskapi/servicedesk/{id}/requesttype (use expand=practice for the practice field).
type RequestTypeField ¶ added in v0.22.0
type RequestTypeField struct {
FieldID string `json:"fieldId"`
Name string `json:"name"`
Required bool `json:"required"`
ValidValues []RequestTypeFieldValue `json:"validValues"`
}
RequestTypeField is returned by GET .../requesttype/{id}/field.
type RequestTypeFieldValue ¶ added in v0.22.0
RequestTypeFieldValue is an allowed option on a request type field.
type ServiceDesk ¶ added in v0.22.0
type ServiceDesk struct {
ID string `json:"id"`
ProjectName string `json:"projectName"`
ProjectKey string `json:"projectKey"`
}
ServiceDesk is returned by GET /rest/servicedeskapi/servicedesk (Jira Service Management).
type Transition ¶ added in v0.22.0
type UpdateIssue ¶ added in v0.22.0
type UpdateIssue struct{}
func (*UpdateIssue) Cancel ¶ added in v0.22.0
func (c *UpdateIssue) Cancel(ctx core.ExecutionContext) error
func (*UpdateIssue) Cleanup ¶ added in v0.22.0
func (c *UpdateIssue) Cleanup(ctx core.SetupContext) error
func (*UpdateIssue) Color ¶ added in v0.22.0
func (c *UpdateIssue) Color() string
func (*UpdateIssue) Configuration ¶ added in v0.22.0
func (c *UpdateIssue) Configuration() []configuration.Field
func (*UpdateIssue) Description ¶ added in v0.22.0
func (c *UpdateIssue) Description() string
func (*UpdateIssue) Documentation ¶ added in v0.22.0
func (c *UpdateIssue) Documentation() string
func (*UpdateIssue) ExampleOutput ¶ added in v0.22.0
func (c *UpdateIssue) ExampleOutput() map[string]any
func (*UpdateIssue) Execute ¶ added in v0.22.0
func (c *UpdateIssue) Execute(ctx core.ExecutionContext) error
func (*UpdateIssue) HandleHook ¶ added in v0.22.0
func (c *UpdateIssue) HandleHook(ctx core.ActionHookContext) error
func (*UpdateIssue) HandleWebhook ¶ added in v0.22.0
func (c *UpdateIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*UpdateIssue) Hooks ¶ added in v0.22.0
func (c *UpdateIssue) Hooks() []core.Hook
func (*UpdateIssue) Icon ¶ added in v0.22.0
func (c *UpdateIssue) Icon() string
func (*UpdateIssue) Label ¶ added in v0.22.0
func (c *UpdateIssue) Label() string
func (*UpdateIssue) Name ¶ added in v0.22.0
func (c *UpdateIssue) Name() string
func (*UpdateIssue) OutputChannels ¶ added in v0.22.0
func (c *UpdateIssue) OutputChannels(configuration any) []core.OutputChannel
func (*UpdateIssue) ProcessQueueItem ¶ added in v0.22.0
func (c *UpdateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*UpdateIssue) Setup ¶ added in v0.22.0
func (c *UpdateIssue) Setup(ctx core.SetupContext) error
type UpdateIssueOptions ¶ added in v0.22.0
type UpdateIssueOptions struct {
NotifyUsers *bool
}
type UpdateIssueRequest ¶ added in v0.22.0
type UpdateIssueSpec ¶ added in v0.22.0
type UpdateIssueSpec struct {
Project string `json:"project" mapstructure:"project"`
IssueKey string `json:"issueKey" mapstructure:"issueKey"`
Summary *string `json:"summary,omitempty" mapstructure:"summary"`
Description *string `json:"description,omitempty" mapstructure:"description"`
IssueType *string `json:"issueType,omitempty" mapstructure:"issueType"`
Assignee *string `json:"assignee,omitempty" mapstructure:"assignee"`
Priority *string `json:"priority,omitempty" mapstructure:"priority"`
Labels *[]string `json:"labels,omitempty" mapstructure:"labels"`
NotifyUsers *bool `json:"notifyUsers,omitempty" mapstructure:"notifyUsers"`
}