jira

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnouncementBannerConnector added in v1.5.1

type AnnouncementBannerConnector interface {

	// Get returns the current announcement banner configuration.
	//
	// GET /rest/api/{2-3}/announcementBanner
	//
	// https://docs.go-atlassian.io/jira-software-cloud/announcement-banner#get-announcement-banner-configuration
	Get(ctx context.Context) (*models.AnnouncementBannerScheme, *models.ResponseScheme, error)

	// Update updates the announcement banner configuration.
	//
	// PUT /rest/api/{2-3}/announcementBanner
	//
	// https://docs.go-atlassian.io/jira-software-cloud/announcement-banner#get-announcement-banner-configuration
	Update(ctx context.Context, payload *models.AnnouncementBannerPayloadScheme) (*models.ResponseScheme, error)
}

AnnouncementBannerConnector resource represents the Jira announcement banner. Use it to retrieve and update banner configuration.

type AppRoleConnector

type AppRoleConnector interface {

	// Gets returns all application roles.
	//
	// In Jira, application roles are managed using the Application access configuration page.
	//
	// GET /rest/api/{2-3}/applicationrole
	//
	// https://docs.go-atlassian.io/jira-software-cloud/application-roles#get-all-application-roles
	Gets(ctx context.Context) ([]*model.ApplicationRoleScheme, *model.ResponseScheme, error)

	// Get returns an application role.
	//
	// GET /rest/api/{2-3}/applicationrole/{key}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/application-roles#get-application-role
	Get(ctx context.Context, key string) (*model.ApplicationRoleScheme, *model.ResponseScheme, error)
}

type AttachmentConnector

type AttachmentConnector interface {

	// Settings returns the attachment settings, that is, whether attachments are enabled and the maximum attachment size allowed.
	//
	// GET /rest/api/{2-3}/attachment/meta
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/attachments#get-jira-attachment-settings
	Settings(ctx context.Context) (*model.AttachmentSettingScheme, *model.ResponseScheme, error)

	// Metadata returns the metadata for an attachment. Note that the attachment itself is not returned.
	//
	// GET /rest/api/{2-3}/attachment/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/attachments#get-attachment-metadata
	Metadata(ctx context.Context, attachmentId string) (*model.IssueAttachmentMetadataScheme, *model.ResponseScheme, error)

	// Delete deletes an attachment from an issue.
	//
	// DELETE /rest/api/{2-3}/attachment/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/attachments#delete-attachment
	Delete(ctx context.Context, attachmentId string) (*model.ResponseScheme, error)

	// Human returns the metadata for the contents of an attachment, if it is an archive, and metadata for the attachment itself.
	//
	// For example, if the attachment is a ZIP archive, then information about the files in the archive is returned and metadata for the ZIP archive.
	//
	// GET /rest/api/{2-3}/attachment/{id}/expand/human
	//
	// Experimental Endpoint
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/attachments#get-all-metadata-for-an-expanded-attachment
	Human(ctx context.Context, attachmentId string) (*model.IssueAttachmentHumanMetadataScheme, *model.ResponseScheme, error)

	// Add adds one attachment to an issue. Attachments are posted as multipart/form-data (RFC 1867).
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/attachments
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/attachments#add-attachment
	Add(ctx context.Context, issueKeyOrId, fileName string, file io.Reader) ([]*model.IssueAttachmentScheme, *model.ResponseScheme, error)

	// Download returns the contents of an attachment. A Range header can be set to define a range of bytes within the attachment to download.
	//
	// See the HTTP Range header standard for details.
	//
	// GET /rest/api/{2-3}/attachment/content/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/attachments#download-attachment
	Download(ctx context.Context, attachmentID string, redirect bool) (*model.ResponseScheme, error)
}

type AuditRecordConnector added in v1.5.0

type AuditRecordConnector interface {

	// Get allows you to retrieve the audit records for specific activities that have occurred within Jira.
	//
	// GET /rest/api/{2-3}/auditing/record
	//
	// https://docs.go-atlassian.io/jira-software-cloud/audit-records#get-audit-records
	Get(ctx context.Context, options *model.AuditRecordGetOptions, offSet, limit int) (*model.AuditRecordPageScheme, *model.ResponseScheme, error)
}

AuditRecordConnector audits that record activities undertaken in Jira. Use it to get a list of audit records.

type CommentADFConnector

type CommentADFConnector interface {
	CommentSharedConnector

	// Gets returns all comments for an issue.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/comment
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/comments#get-comments
	Gets(ctx context.Context, issueKeyOrId, orderBy string, expand []string, startAt, maxResults int) (*model.IssueCommentPageScheme, *model.ResponseScheme, error)

	// Get returns a comment.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/comment/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/comments#get-comment
	Get(ctx context.Context, issueKeyOrId, commentId string) (*model.IssueCommentScheme, *model.ResponseScheme, error)

	// Add adds a comment to an issue.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/comment
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/comments#add-comment
	Add(ctx context.Context, issueKeyOrId string, payload *model.CommentPayloadScheme, expand []string) (*model.IssueCommentScheme, *model.ResponseScheme, error)
}

type CommentRichTextConnector

type CommentRichTextConnector interface {
	CommentSharedConnector

	// Gets returns all comments for an issue.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/comment
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/comments#get-comments
	Gets(ctx context.Context, issueKeyOrId, orderBy string, expand []string, startAt, maxResults int) (*model.IssueCommentPageSchemeV2, *model.ResponseScheme, error)

	// Get returns a comment.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/comment/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/comments#get-comment
	Get(ctx context.Context, issueKeyOrId, commentId string) (*model.IssueCommentSchemeV2, *model.ResponseScheme, error)

	// Add adds a comment to an issue.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/comment
	//
	//https://docs.go-atlassian.io/jira-software-cloud/issues/comments#add-comment
	Add(ctx context.Context, issueKeyOrId string, payload *model.CommentPayloadSchemeV2, expand []string) (*model.IssueCommentSchemeV2, *model.ResponseScheme, error)
}

type CommentSharedConnector

type CommentSharedConnector interface {

	// Delete deletes a comment.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}/comment/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/comments#delete-comment
	Delete(ctx context.Context, issueKeyOrId, commentId string) (*model.ResponseScheme, error)
}

type DashboardConnector

type DashboardConnector interface {

	// Gets returns a list of dashboards owned by or shared with the user.
	//
	// The list may be filtered to include only favorite or owned dashboards.
	//
	// GET /rest/api/{3-2}/dashboard
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#get-all-dashboards
	Gets(ctx context.Context, startAt, maxResults int, filter string) (*model.DashboardPageScheme, *model.ResponseScheme, error)

	// Create creates a dashboard.
	//
	// POST /rest/api/{3-2}/dashboard
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#create-dashboard
	Create(ctx context.Context, payload *model.DashboardPayloadScheme) (*model.DashboardScheme, *model.ResponseScheme, error)

	// Search returns a paginated list of dashboards.
	//
	// This operation is similar to Get dashboards except that the results can be refined to include dashboards that have specific attributes.
	//
	// GET /rest/api/{2-3}/dashboard/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#search-for-dashboards
	Search(ctx context.Context, options *model.DashboardSearchOptionsScheme, startAt, maxResults int) (*model.DashboardSearchPageScheme, *model.ResponseScheme, error)

	// Get returns a dashboard.
	//
	// GET /rest/api/{2-3}/dashboard/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#get-dashboard
	Get(ctx context.Context, dashboardId string) (*model.DashboardScheme, *model.ResponseScheme, error)

	// Delete deletes a dashboard.
	//
	// DELETE /rest/api/{2-3}/dashboard/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#delete-dashboard
	Delete(ctx context.Context, dashboardId string) (*model.ResponseScheme, error)

	// Copy copies a dashboard.
	//
	// Any values provided in the dashboard parameter replace those in the copied dashboard.
	//
	// POST /rest/api/{2-3}/dashboard/{id}/copy
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#copy-dashboard
	Copy(ctx context.Context, dashboardId string, payload *model.DashboardPayloadScheme) (*model.DashboardScheme, *model.ResponseScheme, error)

	// Update updates a dashboard
	//
	// PUT /rest/api/{2-3}/dashboard/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/dashboards#update-dashboard
	Update(ctx context.Context, dashboardId string, payload *model.DashboardPayloadScheme) (*model.DashboardScheme, *model.ResponseScheme, error)
}

type FieldConfigConnector

type FieldConfigConnector interface {

	// Gets Returns a paginated list of all field configurations.
	//
	// GET /rest/api/{2-3}/fieldconfiguration
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration#get-all-field-configurations
	Gets(ctx context.Context, ids []int, isDefault bool, startAt, maxResults int) (*model.FieldConfigurationPageScheme,
		*model.ResponseScheme, error)

	// Create creates a field configuration. The field configuration is created with the same field properties as the
	// default configuration, with all the fields being optional.
	//
	// This operation can only create configurations for use in company-managed (classic) projects.
	//
	// POST /rest/api/{2-3}/fieldconfiguration
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration#create-field-configuration
	Create(ctx context.Context, name, description string) (*model.FieldConfigurationScheme, *model.ResponseScheme, error)

	// Update updates a field configuration. The name and the description provided in the request override the existing values.
	//
	// This operation can only update configurations used in company-managed (classic) projects.
	//
	// PUT /rest/api/{2-3}/fieldconfiguration/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration#update-field-configuration
	Update(ctx context.Context, id int, name, description string) (*model.ResponseScheme, error)

	// Delete deletes a field configuration.
	//
	// This operation can only delete configurations used in company-managed (classic) projects.
	//
	// DELETE /rest/api/{2-3}/fieldconfiguration/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration#delete-field-configuration
	Delete(ctx context.Context, id int) (*model.ResponseScheme, error)
}

type FieldConfigItemConnector

type FieldConfigItemConnector interface {

	// Gets Returns a paginated list of all fields for a configuration.
	//
	// GET /rest/api/{2-3}/fieldconfiguration/{id}/fields
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/items#get-field-configuration-items
	Gets(ctx context.Context, id, startAt, maxResults int) (*model.FieldConfigurationItemPageScheme, *model.ResponseScheme, error)

	// Update updates fields in a field configuration. The properties of the field configuration fields provided
	// override the existing values.
	//
	// 1. This operation can only update field configurations used in company-managed (classic) projects.
	//
	// PUT /rest/api/{2-3}/fieldconfiguration/{id}/fields
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/items#update-field-configuration-items
	Update(ctx context.Context, id int, payload *model.UpdateFieldConfigurationItemPayloadScheme) (*model.ResponseScheme, error)
}

type FieldConfigSchemeConnector

type FieldConfigSchemeConnector interface {

	// Gets returns a paginated list of field configuration schemes.
	//
	// Only field configuration schemes used in classic projects are returned.
	//
	// GET /rest/api/{2-3}/fieldconfigurationscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#get-field-configuration-schemes
	Gets(ctx context.Context, ids []int, startAt, maxResults int) (*model.FieldConfigurationSchemePageScheme, *model.ResponseScheme, error)

	// Create creates a field configuration scheme.
	//
	// This operation can only create field configuration schemes used in company-managed (classic) projects.
	//
	// POST /rest/api/{2-3}/fieldconfigurationscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#create-field-configuration-scheme
	Create(ctx context.Context, name, description string) (*model.FieldConfigurationSchemeScheme, *model.ResponseScheme, error)

	// Mapping returns a paginated list of field configuration issue type items.
	//
	// Only items used in classic projects are returned.
	//
	// GET /rest/api/{2-3}/fieldconfigurationscheme/mapping
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#get-field-configuration-scheme-mapping
	Mapping(ctx context.Context, fieldConfigIds []int, startAt, maxResults int) (*model.FieldConfigurationIssueTypeItemPageScheme,
		*model.ResponseScheme, error)

	// Project returns a paginated list of field configuration schemes and, for each scheme, a list of the projects that use it.
	//
	// 1. The list is sorted by field configuration scheme ID. The first item contains the list of project IDs assigned to the default field configuration scheme.
	//
	// 2. Only field configuration schemes used in classic projects are returned.\
	//
	// GET /rest/api/{2-3}/fieldconfigurationscheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#get-field-configuration-schemes-by-project
	Project(ctx context.Context, projectIds []int, startAt, maxResults int) (*model.FieldConfigurationSchemeProjectPageScheme,
		*model.ResponseScheme, error)

	// Assign assigns a field configuration scheme to a project. If the field configuration scheme ID is null,
	//
	// the operation assigns the default field configuration scheme.
	//
	// Field configuration schemes can only be assigned to classic projects.
	//
	// PUT /rest/api/{2-3}/fieldconfigurationscheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#assign-field-configuration-scheme
	Assign(ctx context.Context, payload *model.FieldConfigurationSchemeAssignPayload) (*model.ResponseScheme, error)

	// Update updates a field configuration scheme.
	//
	// This operation can only update field configuration schemes used in company-managed (classic) projects.
	//
	// PUT /rest/api/{2-3}/fieldconfigurationscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#update-field-configuration-scheme
	Update(ctx context.Context, schemeId int, name, description string) (*model.ResponseScheme, error)

	// Delete deletes a field configuration scheme.
	//
	// This operation can only delete field configuration schemes used in company-managed (classic) projects.
	//
	// DELETE /rest/api/{2-3}/fieldconfigurationscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#delete-field-configuration-scheme
	Delete(ctx context.Context, schemeId int) (*model.ResponseScheme, error)

	// Link assigns issue types to field configurations on field configuration scheme.
	//
	// This operation can only modify field configuration schemes used in company-managed (classic) projects.
	//
	// PUT /rest/api/{2-3}/fieldconfigurationscheme/{id}/mapping
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#assign-issue-types-to-field-configuration
	Link(ctx context.Context, schemeId int, payload *model.FieldConfigurationToIssueTypeMappingPayloadScheme) (
		*model.ResponseScheme, error)

	// Unlink removes issue types from the field configuration scheme.
	//
	// This operation can only modify field configuration schemes used in company-managed (classic) projects.
	//
	// POST /rest/api/{2-3}/fieldconfigurationscheme/{id}/mapping/delete
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/configuration/schemes#remove-issue-types-to-field-configuration
	Unlink(ctx context.Context, schemeId int, issueTypeIDs []string) (*model.ResponseScheme, error)
}

type FieldConnector

type FieldConnector interface {

	// Gets returns system and custom issue fields according to the following rules:
	//
	// 1. Fields that cannot be added to the issue navigator are always returned.
	//
	// 2. Fields that cannot be placed on an issue screen are always returned.
	//
	// 3. Fields that depend on global Jira settings are only returned if the setting is enabled.
	// That is, timetracking fields, subtasks, votes, and watches.
	//
	// 4. For all other fields, this operation only returns the fields that the user has permission to view
	//
	// GET /rest/api/{2-3}/field
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields#get-fields
	Gets(ctx context.Context) ([]*model.IssueFieldScheme, *model.ResponseScheme, error)

	// Create creates a custom field.
	//
	// POST /rest/api/{2-3}/field
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields#create-custom-field
	Create(ctx context.Context, payload *model.CustomFieldScheme) (*model.IssueFieldScheme, *model.ResponseScheme, error)

	// Search returns a paginated list of fields for Classic Jira projects.
	//
	// GET /rest/api/{2-3}/field/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields#get-fields-paginated
	Search(ctx context.Context, options *model.FieldSearchOptionsScheme, startAt, maxResults int) (*model.FieldSearchPageScheme, *model.ResponseScheme, error)

	// Delete deletes a custom field. The custom field is deleted whether it is in the trash or not.
	//
	// See Edit or delete a custom field for more information on trashing and deleting custom fields.
	//
	// DELETE /rest/api/{2-3}/field/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields#delete-field
	Delete(ctx context.Context, fieldId string) (*model.TaskScheme, *model.ResponseScheme, error)
}

type FieldContextConnector

type FieldContextConnector interface {

	// Gets returns a paginated list of contexts for a custom field. Contexts can be returned as follows:
	//
	// 1. By defining id only, all contexts from the list of IDs.
	//
	// 2. By defining isAnyIssueType
	//
	// 3. By defining isGlobalContext
	//
	// GET /rest/api/{2-3}/field/{fieldId}/context
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#get-custom-field-contexts
	Gets(ctx context.Context, fieldId string, options *model.FieldContextOptionsScheme, startAt, maxResults int) (
		*model.CustomFieldContextPageScheme, *model.ResponseScheme, error)

	// Create creates a custom field context.
	//
	// 1. If projectIds is empty, a global context is created. A global context is one that applies to all project.
	//
	// 2. If issueTypeIds is empty, the context applies to all issue types.
	//
	// POST /rest/api/{2-3}/field/{fieldId}/context
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#create-custom-field-context
	Create(ctx context.Context, fieldId string, payload *model.FieldContextPayloadScheme) (*model.FieldContextScheme,
		*model.ResponseScheme, error)

	// GetDefaultValues returns a paginated list of defaults for a custom field.
	//
	// The results can be filtered by contextId, otherwise all values are returned. If no defaults are set for a context, nothing is returned.
	//
	// GET /rest/api/{2-3}/field/{fieldId}/context/defaultValue
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#get-custom-field-contexts-default-values
	GetDefaultValues(ctx context.Context, fieldId string, contextIds []int, startAt, maxResults int) (*model.CustomFieldDefaultValuePageScheme,
		*model.ResponseScheme, error)

	// SetDefaultValue sets default for contexts of a custom field.
	//
	// PUT /rest/api/{2-3}/field/{fieldId}/context/defaultValue
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#set-custom-field-contexts-default-values
	SetDefaultValue(ctx context.Context, fieldId string, payload *model.FieldContextDefaultPayloadScheme) (*model.ResponseScheme, error)

	// IssueTypesContext returns a paginated list of context to issue type mappings for a custom field.
	//
	// 1. Mappings are returned for all contexts or a list of contexts.
	//
	// 2. Mappings are ordered first by context ID and then by issue type ID.
	//
	// GET /rest/api/{2-3}/field/{fieldId}/context/issuetypemapping
	//
	// Docs: TODO: The documentation needs to be created, raise a ticket here: https://github.com/ctreminiom/go-atlassian/issues
	IssueTypesContext(ctx context.Context, fieldId string, contextIds []int, startAt, maxResults int) (*model.IssueTypeToContextMappingPageScheme,
		*model.ResponseScheme, error)

	// ProjectsContext returns a paginated list of context to project mappings for a custom field.
	//
	// 1. The result can be filtered by contextId, or otherwise all mappings are returned.
	//
	// 2. Invalid IDs are ignored.
	//
	// GET /rest/api/{2-3}/field/{fieldId}/context/projectmapping
	//
	// Docs: TODO: The documentation needs to be created, raise a ticket here: https://github.com/ctreminiom/go-atlassian/issues
	ProjectsContext(ctx context.Context, fieldId string, contextIds []int, startAt, maxResults int) (*model.CustomFieldContextProjectMappingPageScheme,
		*model.ResponseScheme, error)

	// Update updates a custom field context
	//
	// PUT /rest/api/{2-3}/field/{fieldId}/context/{contextId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#update-custom-field-context
	Update(ctx context.Context, fieldId string, contextId int, name, description string) (*model.ResponseScheme, error)

	// Delete deletes a custom field context.
	//
	// DELETE /rest/api/{2-3}/field/{fieldId}/context/{contextId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#delete-custom-field-context
	Delete(ctx context.Context, fieldId string, contextId int) (*model.ResponseScheme, error)

	// AddIssueTypes adds issue types to a custom field context, appending the issue types to the issue types list.
	//
	// PUT /rest/api/{2-3}/field/{fieldId}/context/{contextId}/issuetype
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#add-issue-types-to-context
	AddIssueTypes(ctx context.Context, fieldId string, contextId int, issueTypesIds []string) (*model.ResponseScheme, error)

	// RemoveIssueTypes removes issue types from a custom field context. A custom field context without any issue types applies to all issue types.
	//
	// POST /rest/api/{2-3}/field/{fieldId}/context/{contextId}/issuetype/remove
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#remove-issue-types-from-context
	RemoveIssueTypes(ctx context.Context, fieldId string, contextId int, issueTypesIds []string) (*model.ResponseScheme, error)

	// Link assigns a custom field context to projects. If any project in the request is assigned to any context of the custom field, the operation fails.
	//
	// PUT /rest/api/{2-3}/field/{fieldId}/context/{contextId}/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#assign-custom-field-context-to-projects
	Link(ctx context.Context, fieldId string, contextId int, projectIds []string) (*model.ResponseScheme, error)

	// UnLink removes a custom field context from projects.
	//
	// 1. A custom field context without any projects applies to all projects.
	//
	// 2. Removing all projects from a custom field context would result in it applying to all projects.
	//
	// POST /rest/api/{2-3}/field/{fieldId}/context/{contextId}/project/remove
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context#remove-custom-field-context-from-projects
	UnLink(ctx context.Context, fieldId string, contextId int, projectIds []string) (*model.ResponseScheme, error)
}

FieldContextConnector is the interface that wraps the Jira field context

It contains the methods required to manipulate the field context associated with a Jira field, you can use to:

  1. get, create, update, and delete custom field contexts.
  2. get context to issue types and projects mappings.
  3. get custom field contexts for projects and issue types.
  4. assign custom field contexts to projects.
  5. remove custom field contexts from projects.
  6. add issue types to custom field contexts.

type FieldContextOptionConnector

type FieldContextOptionConnector interface {

	// Gets returns a paginated list of all custom field option for a context.
	//
	// Options are returned first then cascading options, in the order they display in Jira.
	//
	// GET /rest/api/{2-3}/field/{fieldId}/context/{contextId}/option
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context/option#get-custom-field-options
	Gets(ctx context.Context, fieldId string, contextId int, options *model.FieldOptionContextParams, startAt, maxResults int) (*model.CustomFieldContextOptionPageScheme, *model.ResponseScheme, error)

	// Create creates options and, where the custom select field is of the type Select List (cascading), cascading options for a custom select field.
	//
	// 1. The options are added to a context of the field.
	//
	// 2. The maximum number of options that can be created per request is 1000 and each field can have a maximum of 10000 options.
	//
	// POST /rest/api/{2-3}/field/{fieldId}/context/{contextId}/option
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context/option#create-custom-field-options
	Create(ctx context.Context, fieldId string, contextId int, payload *model.FieldContextOptionListScheme) (*model.FieldContextOptionListScheme, *model.ResponseScheme, error)

	// Update updates the options of a custom field.
	//
	// 1. If any of the options are not found, no options are updated.
	//
	// 2. Options where the values in the request match the current values aren't updated and aren't reported in the response.
	//
	// PUT /rest/api/{2-3}/field/{fieldId}/context/{contextId}/option
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context/option#update-custom-field-options
	Update(ctx context.Context, fieldId string, contextId int, payload *model.FieldContextOptionListScheme) (*model.FieldContextOptionListScheme, *model.ResponseScheme, error)

	// Delete deletes a custom field option.
	//
	// 1. Options with cascading options cannot be deleted without deleting the cascading options first.
	//
	// DELETE /rest/api/{2-3}/field/{fieldId}/context/{contextId}/option/{optionId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context/option#delete-custom-field-options
	Delete(ctx context.Context, fieldId string, contextId, optionId int) (*model.ResponseScheme, error)

	// Order changes the order of custom field options or cascading options in a context.
	//
	// PUT /rest/api/{2-3}/field/{fieldId}/context/{contextId}/option/move
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/context/option#reorder-custom-field-options
	Order(ctx context.Context, fieldId string, contextId int, payload *model.OrderFieldOptionPayloadScheme) (*model.ResponseScheme, error)
}

FieldContextOptionConnector is the interface that wraps the Jira field context options

It contains the methods required to manipulate the field options associated with a field context and represents custom issue field select list options created in Jira or using the REST API. Use it to retrieve, create, update, order, and delete custom field options.

type FieldTrashConnector

type FieldTrashConnector interface {

	// Search returns a paginated list of fields in the trash.
	//
	// The list may be restricted to field whose field name or description partially match a string.
	//
	// Only custom fields can be queried, type must be set to custom.
	//
	// GET /rest/api/{2-3}/field/search/trashed
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/trash#search-fields-in-trash
	Search(ctx context.Context, options *model.FieldSearchOptionsScheme, startAt, maxResults int) (*model.FieldSearchPageScheme, *model.ResponseScheme, error)

	// Move moves a custom field to trash.
	//
	// See Edit or delete a custom field for more information on trashing and deleting custom fields.
	//
	// POST /rest/api/{2-3}/field/{id}/trash
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/trash#move-field-to-trash
	Move(ctx context.Context, id string) (*model.ResponseScheme, error)

	// Restore restores a custom field from trash.
	//
	// See Edit or delete a custom field for more information on trashing and deleting custom fields.
	//
	// POST /rest/api/{2-3}/field/{id}/restore
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/fields/trash#move-field-to-trash
	Restore(ctx context.Context, id string) (*model.ResponseScheme, error)
}

type FilterConnector

type FilterConnector interface {

	// Create creates a filter. The filter is shared according to the default share scope.
	//
	// The filter is not selected as a favorite.
	//
	// POST /rest/api/{2-3}/filter
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#create-filter
	Create(ctx context.Context, payload *model.FilterPayloadScheme) (*model.FilterScheme, *model.ResponseScheme, error)

	// Favorite returns the visible favorite filters of the user.
	//
	// GET /rest/api/{2-3}/filter/favourite
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#get-favorites
	Favorite(ctx context.Context) ([]*model.FilterScheme, *model.ResponseScheme, error)

	// My returns the filters owned by the user. If includeFavourites is true,
	//
	// The user's visible favorite filters are also returned.
	// GET /rest/api/{2-3}/filter/my
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#get-my-filters
	My(ctx context.Context, favorites bool, expand []string) ([]*model.FilterScheme, *model.ResponseScheme, error)

	// Search returns a paginated list of filters
	//
	// GET /rest/api/{2-3}/filter/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#search-filters
	Search(ctx context.Context, options *model.FilterSearchOptionScheme, startAt, maxResults int) (*model.FilterSearchPageScheme,
		*model.ResponseScheme, error)

	// Get returns a filter.
	//
	// GET /rest/api/{2-3}/filter/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#get-filter
	Get(ctx context.Context, filterId int, expand []string) (*model.FilterScheme, *model.ResponseScheme, error)

	// Update updates a filter. Use this operation to update a filter's name, description, JQL, or sharing.
	//
	// PUT /rest/api/{2-3}/filter/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#update-filter
	Update(ctx context.Context, filterId int, payload *model.FilterPayloadScheme) (*model.FilterScheme, *model.ResponseScheme, error)

	// Delete a filter.
	//
	// DELETE /rest/api/{2-3}/filter/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#delete-filter
	Delete(ctx context.Context, filterId int) (*model.ResponseScheme, error)

	// Change changes the owner of the filter.
	//
	// PUT /rest/api/{2-3}/filter/{id}/owner
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters#change-filter-owner
	Change(ctx context.Context, filterId int, accountId string) (*model.ResponseScheme, error)
}

FilterConnector is an interface that defines the methods available from Jira Filter API.

type FilterSharingConnector

type FilterSharingConnector interface {

	// Scope returns the default sharing settings for new filters and dashboards for a user.
	//
	// GET /rest/api/{2-3}/filter/defaultShareScope
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters/sharing#get-default-share-scope
	Scope(ctx context.Context) (*model.ShareFilterScopeScheme, *model.ResponseScheme, error)

	// SetScope sets the default sharing for new filters and dashboards for a user.
	//
	// PUT /rest/api/{2-3}/filter/defaultShareScope
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters/sharing#set-default-share-scope
	SetScope(ctx context.Context, scope string) (*model.ResponseScheme, error)

	// Gets returns the share permissions for a filter.
	//
	// 1.A filter can be shared with groups, projects, all logged-in users, or the public.
	//
	// 2.Sharing with all logged-in users or the public is known as a global share permission.
	//
	// GET /rest/api/{2-3}/filter/{id}/permission
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters/sharing#get-share-permissions
	Gets(ctx context.Context, filterId int) ([]*model.SharePermissionScheme, *model.ResponseScheme, error)

	// Add a share permissions to a filter.
	//
	// If you add a global share permission (one for all logged-in users or the public)
	//
	// it will overwrite all share permissions for the filter.
	//
	// POST /rest/api/{2-3}/filter/{id}/permission
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters/sharing#add-share-permission
	Add(ctx context.Context, filterId int, payload *model.PermissionFilterPayloadScheme) ([]*model.SharePermissionScheme, *model.ResponseScheme, error)

	// Get returns a share permission for a filter.
	//
	// A filter can be shared with groups, projects, all logged-in users, or the public.
	//
	// Sharing with all logged-in users or the public is known as a global share permission.
	//
	// GET /rest/api/{2-3}/filter/{id}/permission/{permissionId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters/sharing#get-share-permission
	Get(ctx context.Context, filterId, permissionId int) (*model.SharePermissionScheme, *model.ResponseScheme, error)

	// Delete deletes a share permission from a filter.
	//
	// DELETE /rest/api/{2-3}/filter/{id}/permission/{permissionId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/filters/sharing#delete-share-permission
	Delete(ctx context.Context, filterId, permissionId int) (*model.ResponseScheme, error)
}

type GroupConnector

type GroupConnector interface {

	// Create creates a group.
	//
	// POST /rest/api/{2-3}/group
	//
	// https://docs.go-atlassian.io/jira-software-cloud/groups#create-group
	Create(ctx context.Context, groupName string) (*model.GroupScheme, *model.ResponseScheme, error)

	// Delete deletes a group.
	//
	// DELETE /rest/api/{2-3}/group
	//
	// https://docs.go-atlassian.io/jira-software-cloud/groups#remove-group
	Delete(ctx context.Context, groupName string) (*model.ResponseScheme, error)

	// Bulk returns a paginated list of groups.
	//
	// GET /rest/api/{2-3}/group/bulk
	//
	// https://docs.go-atlassian.io/jira-software-cloud/groups#bulk-groups
	Bulk(ctx context.Context, options *model.GroupBulkOptionsScheme, startAt, maxResults int) (*model.BulkGroupScheme, *model.ResponseScheme, error)

	// Members returns a paginated list of all users in a group.
	//
	// GET /rest/api/{2-3}/group/member
	//
	// https://docs.go-atlassian.io/jira-software-cloud/groups#get-users-from-groups
	Members(ctx context.Context, groupName string, inactive bool, startAt, maxResults int) (*model.GroupMemberPageScheme, *model.ResponseScheme, error)

	// Add adds a user to a group.
	//
	// POST /rest/api/{2-3}/group/user
	//
	// https://docs.go-atlassian.io/jira-software-cloud/groups#add-user-to-group
	Add(ctx context.Context, groupName, accountId string) (*model.GroupScheme, *model.ResponseScheme, error)

	// Remove removes a user from a group.
	//
	// DELETE /rest/api/{2-3}/group/user
	//
	// https://docs.go-atlassian.io/jira-software-cloud/groups#remove-user-from-group
	Remove(ctx context.Context, groupName, accountId string) (*model.ResponseScheme, error)
}

GroupConnector is an interface that defines the methods available from GroupConnector API.

type IssueADFConnector

type IssueADFConnector interface {
	IssueSharedConnector

	// Create creates an issue or, where the option to create subtasks is enabled in Jira, a subtask.
	//
	// POST /rest/api/{2-3}/issue
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#create-issue
	Create(ctx context.Context, payload *model.IssueScheme, customFields *model.CustomFields) (*model.IssueResponseScheme, *model.ResponseScheme, error)

	// Creates issues and, where the option to create subtasks is enabled in Jira, subtasks.
	//
	// 1.Creates upto 50 issues and, where the option to create subtasks is enabled in Jira, subtasks.
	//
	// 2.Transitions may be applied, to move the issues or subtasks to a workflow step other than the default start step, and issue properties set.
	//
	// POST /rest/api/{2-3}/issue/bulk
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#bulk-create-issue
	Creates(ctx context.Context, payload []*model.IssueBulkSchemeV3) (*model.IssueBulkResponseScheme, *model.ResponseScheme, error)

	// Get returns the details for an issue.
	//
	// The issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive search
	//
	// and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or other redirect is not returned.
	//
	// The issue key returned to the response is the key of the issue found.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#get-issue
	Get(ctx context.Context, issueKeyOrId string, fields, expand []string) (*model.IssueScheme, *model.ResponseScheme, error)

	// Update edits an issue.
	//
	// Edits an issue. A transition may be applied and issue properties updated as part of the edit.
	//
	// The edits to the issue's fields are defined using update and fields
	//
	// PUT /rest/api/{2-3}/issue/{issueIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#edit-issue
	Update(ctx context.Context, issueKeyOrId string, notify bool, payload *model.IssueScheme, customFields *model.CustomFields,
		operations *model.UpdateOperations) (*model.ResponseScheme, error)

	// Move performs an issue transition and, if the transition has a screen, updates the fields from the transition screen.
	//
	// sortByCategory To update the fields on the transition screen, specify the fields in the fields or update parameters in the request body. Get details about the fields using Get transitions with the transitions.fields expand.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/transitions
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#transition-issue
	Move(ctx context.Context, issueKeyOrId, transitionId string, options *model.IssueMoveOptionsV3) (*model.ResponseScheme, error)
}

type IssuePropertyConnector added in v1.6.0

type IssuePropertyConnector interface {

	/*
		Gets returns the URLs and keys of an issue's properties.
			- This operation can be accessed anonymously.

		Permissions required:
			- Browse projects project permission for the project containing the issue.
			- If issue-level security is configured, issue-level security permission to view the issue.

		Endpoint: GET /rest/api/{apiVersion}/issue/{issueIdOrKey}/properties

		You can refer to the documentation: [Get issue property keys]

		[Get issue property keys]: https://docs.go-atlassian.io/jira-software-cloud/issues/properties#get-issue-property-keys
	*/
	Gets(ctx context.Context, issueIdOrKey string) (*model.PropertyPageScheme, *model.ResponseScheme, error)

	/*
		Get returns the key and value of an issue's property.
			- This operation can be accessed anonymously.

		Permissions required:
			- Browse projects project permission for the project containing the issue.
			- If issue-level security is configured, issue-level security permission to view the issue.

		Endpoint: GET /rest/api/{apiVersion}/issue/{issueIdOrKey}/properties/{propertyKey}

		You can refer to the documentation: [Get issue property]

		[Get issue property]: https://docs.go-atlassian.io/jira-software-cloud/issues/properties#get-issue-property
	*/
	Get(ctx context.Context, issueKey, propertyKey string) (*model.EntityPropertyScheme, *model.ResponseScheme, error)

	/*
		Set sets the value of an issue's property. Use this resource to store custom data against an issue.
			- The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.
			- This operation can be accessed anonymously.

		Permissions required:
			- Browse projects and Edit issues project permissions for the project containing the issue.
			- If issue-level security is configured, issue-level security permission to view the issue.

		Endpoint: PUT /rest/api/{apiVersion}/issue/{issueIdOrKey}/properties/{propertyKey}

		You can refer to the documentation: [Set issue property]

		[Set issue property]: https://docs.go-atlassian.io/jira-software-cloud/issues/properties#set-issue-property
	*/
	Set(ctx context.Context, issueKey, propertyKey string, payload interface{}) (*model.ResponseScheme, error)

	/*
		Delete deletes an issue's property.
			- This operation can be accessed anonymously.

		Permissions required:
			- Browse projects and Edit issues project permissions for the project containing the issue.
			- If issue-level security is configured, issue-level security permission to view the issue.

		Endpoint: DELETE /rest/api/{apiVersion}/issue/{issueIdOrKey}/properties/{propertyKey}

		You can refer to the documentation: [Delete issue property]

		[Delete issue property]: https://docs.go-atlassian.io/jira-software-cloud/issues/properties#delete-issue-property
	*/
	Delete(ctx context.Context, issueKey, propertyKey string) (*model.ResponseScheme, error)
}

IssuePropertyConnector represents issue properties, which provides for storing custom data against an issue.

Use it to get, set, and delete issue properties as well as obtain details of all properties on an issue.

Operations to bulk update and delete issue properties are also provided.

type IssueRichTextConnector

type IssueRichTextConnector interface {
	IssueSharedConnector

	// Create creates an issue or, where the option to create subtasks is enabled in Jira, a subtask.
	//
	// POST /rest/api/{2-3}/issue
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#create-issue
	Create(ctx context.Context, payload *model.IssueSchemeV2, customFields *model.CustomFields) (*model.IssueResponseScheme, *model.ResponseScheme, error)

	// Creates issues and, where the option to create subtasks is enabled in Jira, subtasks.
	//
	// 1.Creates upto 50 issues and, where the option to create subtasks is enabled in Jira, subtasks.
	//
	// 2.Transitions may be applied, to move the issues or subtasks to a workflow step other than the default start step, and issue properties set.
	//
	// POST /rest/api/{2-3}/issue/bulk
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#bulk-create-issue
	Creates(ctx context.Context, payload []*model.IssueBulkSchemeV2) (*model.IssueBulkResponseScheme, *model.ResponseScheme, error)

	// Get returns the details for an issue.
	//
	// The issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive search
	//
	// and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or other redirect is not returned.
	//
	// The issue key returned to the response is the key of the issue found.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#get-issue
	Get(ctx context.Context, issueKeyOrId string, fields, expand []string) (*model.IssueSchemeV2, *model.ResponseScheme, error)

	// Update edits an issue.
	//
	// Edits an issue. A transition may be applied and issue properties updated as part of the edit.
	//
	// The edits to the issue's fields are defined using update and fields
	//
	// PUT /rest/api/{2-3}/issue/{issueIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#edit-issue
	Update(ctx context.Context, issueKeyOrId string, notify bool, payload *model.IssueSchemeV2, customFields *model.CustomFields,
		operations *model.UpdateOperations) (*model.ResponseScheme, error)

	// Move performs an issue transition and, if the transition has a screen, updates the fields from the transition screen.
	//
	// sortByCategory To update the fields on the transition screen, specify the fields in the fields or update parameters in the request body. Get details about the fields using Get transitions with the transitions.fields expand.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/transitions
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#transition-issue
	Move(ctx context.Context, issueKeyOrId, transitionId string, options *model.IssueMoveOptionsV2) (*model.ResponseScheme, error)
}

type IssueSharedConnector

type IssueSharedConnector interface {

	// Delete deletes an issue.
	//
	// 1.An issue cannot be deleted if it has one or more subtasks.
	//
	// 2.To delete an issue with subtasks, set deleteSubtasks.
	//
	// 3.This causes the issue's subtasks to be deleted with the issue.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#delete-issue
	Delete(ctx context.Context, issueKeyOrId string, deleteSubTasks bool) (*model.ResponseScheme, error)

	// Assign assigns an issue to a user.
	//
	// Use this operation when the calling user does not have the Edit Issues permission but has the
	//
	// Assign issue permission for the project that the issue is in.
	//
	// If accountId is set to:
	//
	//  1. "-1", the issue is assigned to the default assignee for the project.
	//  2. null, the issue is set to unassigned.
	//
	// PUT /rest/api/{2-3}/issue/{issueIdOrKey}/assignee
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#assign-issue
	Assign(ctx context.Context, issueKeyOrId, accountId string) (*model.ResponseScheme, error)

	// Notify creates an email notification for an issue and adds it to the mail queue.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/notify
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#send-notification-for-issue
	Notify(ctx context.Context, issueKeyOrId string, options *model.IssueNotifyOptionsScheme) (*model.ResponseScheme, error)

	// Transitions returns either all transitions or a transition that can be performed by the user on an issue, based on the issue's status.
	//
	// Note, if a request is made for a transition that does not exist or cannot be performed on the issue,
	//
	// given its status, the response will return any empty transitions list.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/transitions
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues#get-transitions
	Transitions(ctx context.Context, issueKeyOrId string) (*model.IssueTransitionsScheme, *model.ResponseScheme, error)
}

type JQLConnector

type JQLConnector interface {

	// Parse parses and validates JQL queries.
	//
	// Validation is performed in context of the current user.
	//
	// POST /rest/api/{2-3}/jql/parse
	//
	// https://docs.go-atlassian.io/jira-software-cloud/jql#parse-jql-query
	Parse(ctx context.Context, validationType string, JqlQueries []string) (*models.ParsedQueryPageScheme, *models.ResponseScheme, error)
}

type LabelConnector

type LabelConnector interface {

	// Gets returns a paginated list of labels.
	//
	// GET /rest/api/{2-3}/label
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/labels#get-all-labels
	Gets(ctx context.Context, startAt, maxResults int) (*model.IssueLabelsScheme, *model.ResponseScheme, error)
}

type LinkAdfIssueConnector

type LinkAdfIssueConnector interface {
	LinkSharedConnector

	// Create creates a link between two issues. Use this operation to indicate a relationship between two issues
	//
	// and optionally add a comment to the from (outward) issue.
	//
	// To use this resource the site must have Issue Linking enabled.
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link#create-issue-link
	Create(ctx context.Context, payload *model.LinkPayloadSchemeV3) (*model.ResponseScheme, error)
}

type LinkRichTextConnector

type LinkRichTextConnector interface {
	LinkSharedConnector

	// Create creates a link between two issues. Use this operation to indicate a relationship between two issues
	//
	// and optionally add a comment to the from (outward) issue.
	//
	// To use this resource the site must have Issue Linking enabled.
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link#create-issue-link
	Create(ctx context.Context, payload *model.LinkPayloadSchemeV2) (*model.ResponseScheme, error)
}

type LinkSharedConnector

type LinkSharedConnector interface {

	// Get returns an issue link.
	//
	// GET /rest/api/{2-3}/issueLink/{linkId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link#get-issue-link
	Get(ctx context.Context, linkId string) (*model.IssueLinkScheme, *model.ResponseScheme, error)

	// Gets get the issue links ID's associated with a Jira Issue
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link#get-issue-links
	Gets(ctx context.Context, issueKeyOrId string) (*model.IssueLinkPageScheme, *model.ResponseScheme, error)

	// Delete deletes an issue link.
	//
	// DELETE /rest/api/{2-3}/issueLink/{linkId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link#delete-issue-link
	Delete(ctx context.Context, linkId string) (*model.ResponseScheme, error)
}

type LinkTypeConnector

type LinkTypeConnector interface {

	// Gets returns a list of all issue link types.
	//
	// GET /rest/api/{2-3}/issueLinkType
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/types#get-issue-link-types
	Gets(ctx context.Context) (*model.IssueLinkTypeSearchScheme, *model.ResponseScheme, error)

	// Get returns an issue link type.
	//
	//
	// GET /rest/api/{2-3}/issueLinkType/{issueLinkTypeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/types#get-issue-link-type
	Get(ctx context.Context, issueLinkTypeId string) (*model.LinkTypeScheme, *model.ResponseScheme, error)

	// Create creates an issue link type.
	//
	// Use this operation to create descriptions of the reasons why issues are linked.
	//
	// The issue link type consists of a name and descriptions for a link's inward and outward relationships.
	//
	// POST /rest/api/{2-3}/issueLinkType
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/types#create-issue-link-type
	Create(ctx context.Context, payload *model.LinkTypeScheme) (*model.LinkTypeScheme, *model.ResponseScheme, error)

	// Update updates an issue link type.
	//
	// PUT /rest/api/{2-3}/issueLinkType/{issueLinkTypeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/types#update-issue-link-type
	Update(ctx context.Context, issueLinkTypeId string, payload *model.LinkTypeScheme) (*model.LinkTypeScheme, *model.ResponseScheme, error)

	// Delete deletes an issue link type.
	//
	// DELETE /rest/api/{2-3}/issueLinkType/{issueLinkTypeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/types#delete-issue-link-type
	Delete(ctx context.Context, issueLinkTypeId string) (*model.ResponseScheme, error)
}

LinkTypeConnector is an interface that defines the methods available from Issue Link Type API. Use it to get, create, update, and delete link issue types as well as get lists of all link issue types.

type MetadataConnector

type MetadataConnector interface {

	// Get edit issue metadata returns the edit screen fields for an issue that are visible to and editable by the user.
	//
	// Use the information to populate the requests in Edit issue.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/editmeta
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/metadata#get-edit-issue-metadata
	Get(ctx context.Context, issueKeyOrId string, overrideScreenSecurity, overrideEditableFlag bool) (gjson.Result, *model.ResponseScheme, error)

	// Create returns details of projects, issue types within projects, and, when requested,
	//
	// the create screen fields for each issue type for the user.
	//
	// GET /rest/api/{2-3}/issue/createmeta
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/metadata#get-create-issue-metadata
	Create(ctx context.Context, opts *model.IssueMetadataCreateOptions) (gjson.Result, *model.ResponseScheme, error)
}

type MySelfConnector

type MySelfConnector interface {

	// Details returns details for the current user.
	//
	// GET /rest/api/{2-3}/myself
	//
	// https://docs.go-atlassian.io/jira-software-cloud/myself#get-current-user
	Details(ctx context.Context, expand []string) (*model.UserScheme, *model.ResponseScheme, error)
}

type NotificationSchemeConnector added in v1.5.0

type NotificationSchemeConnector interface {

	// Search returns a paginated list of notification schemes ordered by the display name.
	//
	// GET /rest/api/{2-3}/notificationscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#get-notification-schemes
	Search(ctx context.Context, options *models.NotificationSchemeSearchOptions, startAt, maxResults int) (*models.NotificationSchemePageScheme, *models.ResponseScheme, error)

	// Create creates a notification scheme with notifications. You can create up to 1000 notifications per request.
	//
	// POST /rest/api/{2-3}/notificationscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#create-notification-scheme
	Create(ctx context.Context, payload *models.NotificationSchemePayloadScheme) (*models.NotificationSchemeCreatedPayload, *models.ResponseScheme, error)

	// Projects returns a paginated mapping of project that have notification scheme assigned.
	//
	// You can provide either one or multiple notification scheme IDs or project IDs to filter by.
	//
	// If you don't provide any, this will return a list of all mappings.
	//
	// Note that only company-managed (classic) projects are supported.
	//
	// This is because team-managed projects don't have a concept of a default notification scheme.
	//
	// The mappings are ordered by projectId.
	//
	// GET /rest/api/{2-3}/notificationscheme/project
	Projects(ctx context.Context, schemeIDs, projectIDs []string, startAt, maxResults int) (*models.NotificationSchemeProjectPageScheme, *models.ResponseScheme, error)

	// Get returns a notification scheme, including the list of events and the recipients who will
	//
	// receive notifications for those events.
	//
	// GET /rest/api/{2-3}/notificationscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#get-notification-scheme
	Get(ctx context.Context, schemeID string, expand []string) (*models.NotificationSchemeScheme, *models.ResponseScheme, error)

	// Update updates a notification scheme.
	//
	// PUT /rest/api/{2-3}/notificationscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#update-notification-scheme
	Update(ctx context.Context, schemeID string, payload *models.NotificationSchemePayloadScheme) (*models.ResponseScheme, error)

	// Append adds notifications to a notification scheme.
	//
	// You can add up to 1000 notifications per request.
	//
	// PUT /rest/api/{2-3}/notificationscheme/{id}/notification
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#append-notifications-to-scheme
	Append(ctx context.Context, schemeID string, payload *models.NotificationSchemeEventsPayloadScheme) (*models.ResponseScheme, error)

	// Delete deletes a notification scheme.
	//
	// DELETE /rest/api/{2-3}/notificationscheme/{notificationSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#delete-notification-scheme
	Delete(ctx context.Context, schemeID string) (*models.ResponseScheme, error)

	// Remove removes a notification from a notification scheme.
	//
	// DELETE /rest/api/{2-3}/notificationscheme/{notificationSchemeId}/notification/{notificationId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/notification-schemes#remove-notifications-to-scheme
	Remove(ctx context.Context, schemeID, notificationID string) (*models.ResponseScheme, error)
}

NotificationSchemeConnector represents notification schemes, lists of events and the recipients who will receive notifications for those events. Use it to get details of a notification scheme and a list of notification schemes.

type PermissionConnector

type PermissionConnector interface {

	// Gets returns all permissions, including: global permissions, project permissions and global permissions added by plugins.
	//
	// GET /rest/api/{2-3}/permissions
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions#get-my-permissions
	Gets(ctx context.Context) ([]*model.PermissionScheme, *model.ResponseScheme, error)

	// Check search the permissions linked to an accountID, then check if the user permissions.
	//
	// POST /rest/api/{2-3}/permissions/check
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions#check-permissions
	Check(ctx context.Context, payload *model.PermissionCheckPayload) (*model.PermissionGrantsScheme, *model.ResponseScheme, error)

	// Projects returns all the projects where the user is granted a list of project permissions.
	//
	// POST /rest/api/{2-3}/permissions/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions#get-permitted-projects
	Projects(ctx context.Context, permissions []string) (*model.PermittedProjectsScheme, *model.ResponseScheme, error)
}

type PermissionSchemeConnector

type PermissionSchemeConnector interface {

	// Gets returns all permission schemes.
	//
	// GET /rest/api/{2-3}/permissionscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme#get-all-permission-schemes
	Gets(ctx context.Context) (*model.PermissionSchemePageScheme, *model.ResponseScheme, error)

	// Get returns a permission scheme.
	//
	// GET /rest/api/{2-3}/permissionscheme/{schemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme#get-permission-scheme
	Get(ctx context.Context, permissionSchemeId int, expand []string) (*model.PermissionSchemeScheme, *model.ResponseScheme, error)

	// Delete deletes a permission scheme.
	//
	// DELETE /rest/api/{2-3}/permissionscheme/{schemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme#delete-permission-scheme
	Delete(ctx context.Context, permissionSchemeId int) (*model.ResponseScheme, error)

	// Create creates a new permission scheme.
	//
	// You can create a permission scheme with or without defining a set of permission grants.
	//
	// POST /rest/api/{2-3}/permissionscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme#create-permission-scheme
	Create(ctx context.Context, payload *model.PermissionSchemeScheme) (*model.PermissionSchemeScheme, *model.ResponseScheme, error)

	// Update updates a permission scheme.
	// Below are some important things to note when using this resource:
	//
	// 1. If a permissions list is present in the request, then it is set in the permission scheme, overwriting all existing grants.
	//
	// 2. If you want to update only the name and description, then do not send a permissions list in the request.
	//
	// 3. Sending an empty list will remove all permission grants from the permission scheme.
	//
	// PUT /rest/api/{2-3}/permissionscheme/{schemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme#update-permission-scheme
	Update(ctx context.Context, permissionSchemeId int, payload *model.PermissionSchemeScheme) (*model.PermissionSchemeScheme, *model.ResponseScheme, error)
}

type PermissionSchemeGrantConnector

type PermissionSchemeGrantConnector interface {

	// Create creates a permission grant in a permission scheme.
	//
	// POST /rest/api/{2-3}/permissionscheme/{schemeId}/permission
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme/grant#create-permission-grant
	Create(ctx context.Context, permissionSchemeId int, payload *model.PermissionGrantPayloadScheme) (*model.PermissionGrantScheme, *model.ResponseScheme, error)

	// Gets returns all permission grants for a permission scheme.
	//
	// GET /rest/api/{2-3}/permissionscheme/{schemeId}/permission
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme/grant#get-permission-scheme-grants
	Gets(ctx context.Context, permissionSchemeId int, expand []string) (*model.PermissionSchemeGrantsScheme, *model.ResponseScheme, error)

	// Get returns a permission grant.
	//
	// GET /rest/api/{2-3}/permissionscheme/{schemeId}/permission/{permissionId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme/grant#get-permission-scheme-grant
	Get(ctx context.Context, permissionSchemeId, permissionGrantId int, expand []string) (*model.PermissionGrantScheme, *model.ResponseScheme, error)

	// Delete deletes a permission grant from a permission scheme. See About permission schemes and grants for more details.
	//
	// DELETE /rest/api/{2-3}/permissionscheme/{schemeId}/permission/{permissionId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/permissions/scheme/grant#delete-permission-scheme-grant
	Delete(ctx context.Context, permissionSchemeId, permissionGrantId int) (*model.ResponseScheme, error)
}

type PriorityConnector

type PriorityConnector interface {

	// Gets returns the list of all issue priorities.
	//
	// GET /rest/api/{2-3}/priority
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/priorities#get-priorities
	Gets(ctx context.Context) ([]*model.PriorityScheme, *model.ResponseScheme, error)

	// Get returns an issue priority.
	//
	// GET /rest/api/{2-3}/priority/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/priorities#get-priority
	Get(ctx context.Context, priorityId string) (*model.PriorityScheme, *model.ResponseScheme, error)
}

type ProjectCategoryConnector

type ProjectCategoryConnector interface {

	// Gets returns all project categories.
	//
	// GET /rest/api/{2-3}/projectCategory
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/categories#get-all-project-categories
	Gets(ctx context.Context) ([]*model.ProjectCategoryScheme, *model.ResponseScheme, error)

	// Get returns a project category.
	//
	// GET /rest/api/{2-3}/projectCategory/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/categories#get-project-category-by-id
	Get(ctx context.Context, categoryId int) (*model.ProjectCategoryScheme, *model.ResponseScheme, error)

	// Create creates a project category.
	//
	// POST /rest/api/{2-3}/projectCategory
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/categories#create-project-category
	Create(ctx context.Context, payload *model.ProjectCategoryPayloadScheme) (*model.ProjectCategoryScheme, *model.ResponseScheme, error)

	// Update updates a project category.
	//
	// PUT /rest/api/{2-3}/projectCategory/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/categories#update-project-category
	Update(ctx context.Context, categoryId int, payload *model.ProjectCategoryPayloadScheme) (*model.ProjectCategoryScheme, *model.ResponseScheme, error)

	// Delete deletes a project category.
	//
	// DELETE /rest/api/{2-3}/projectCategory/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/categories#delete-project-category
	Delete(ctx context.Context, categoryId int) (*model.ResponseScheme, error)
}

type ProjectComponentConnector

type ProjectComponentConnector interface {

	// Create creates a component. Use components to provide containers for issues within a project.
	//
	// POST /rest/api/{2-3}/component
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/components#create-component
	Create(ctx context.Context, payload *model.ComponentPayloadScheme) (*model.ComponentScheme, *model.ResponseScheme, error)

	// Gets returns all components in a project.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/components
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/components#get-project-components
	Gets(ctx context.Context, projectIdOrKey string) ([]*model.ComponentScheme, *model.ResponseScheme, error)

	// Count returns the counts of issues assigned to the component.
	//
	// GET /rest/api/{2-3}/component/{id}/relatedIssueCounts
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/components#get-component-issues-count
	Count(ctx context.Context, componentId string) (*model.ComponentCountScheme, *model.ResponseScheme, error)

	// Delete deletes a component.
	//
	// DELETE /rest/api/{2-3}/component/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/components#delete-component
	Delete(ctx context.Context, componentId string) (*model.ResponseScheme, error)

	// Update updates a component.
	//
	// Any fields included in the request are overwritten
	//
	// PUT /rest/api/{2-3}/component/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/components#update-component
	Update(ctx context.Context, componentId string, payload *model.ComponentPayloadScheme) (*model.ComponentScheme, *model.ResponseScheme, error)

	// Get returns a component.
	//
	// GET /rest/api/{2-3}/component/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/components#get-component
	Get(ctx context.Context, componentId string) (*model.ComponentScheme, *model.ResponseScheme, error)
}

type ProjectConnector

type ProjectConnector interface {

	// Create creates a project based on a project type template
	//
	// POST /rest/api/{2-3}/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#create-project
	Create(ctx context.Context, payload *model.ProjectPayloadScheme) (*model.NewProjectCreatedScheme, *model.ResponseScheme, error)

	// Search returns a paginated list of projects visible to the user.
	//
	// GET /rest/api/{2-3}/project/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#get-projects-paginated
	Search(ctx context.Context, options *model.ProjectSearchOptionsScheme, startAt, maxResults int) (*model.ProjectSearchScheme, *model.ResponseScheme, error)

	// Get returns the project details for a project.
	//
	// GET /rest/api/{2-3}project/{projectIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#get-project
	Get(ctx context.Context, projectKeyOrId string, expand []string) (*model.ProjectScheme, *model.ResponseScheme, error)

	// Update updates the project details of a project.
	//
	// PUT /rest/api/{2-3}/project/{projectIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#update-project
	Update(ctx context.Context, projectKeyOrId string, payload *model.ProjectUpdateScheme) (*model.ProjectScheme, *model.ResponseScheme, error)

	// Delete deletes a project.
	//
	// You can't delete a project if it's archived. To delete an archived project, restore the project and then delete it.
	//
	// To restore a project, use the Jira UI.
	//
	// DELETE /rest/api/{2-3}/project/{projectIdOrKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#delete-project
	Delete(ctx context.Context, projectKeyOrId string, enableUndo bool) (*model.ResponseScheme, error)

	// DeleteAsynchronously deletes a project asynchronously.
	//
	// 1. transactional, that is, if part of to delete fails the project is not deleted.
	//
	// 2. asynchronous. Follow the location link in the response to determine the status of the task and use Get task to obtain subsequent updates.
	//
	// POST /rest/api/{2-3}/project/{projectIdOrKey}/delete
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#delete-project-asynchronously
	DeleteAsynchronously(ctx context.Context, projectKeyOrId string) (*model.TaskScheme, *model.ResponseScheme, error)

	// Archive archives a project. Archived projects cannot be deleted.
	//
	// To delete an archived project, restore the project and then delete it.
	//
	// To restore a project, use the Jira UI.
	//
	// POST /rest/api/{2-3}/project/{projectIdOrKey}/archive
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#archive-project
	Archive(ctx context.Context, projectKeyOrId string) (*model.ResponseScheme, error)

	// Restore restores a project from the Jira recycle bin.
	//
	// POST /rest/api/3/project/{projectIdOrKey}/restore
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#restore-deleted-project
	Restore(ctx context.Context, projectKeyOrId string) (*model.ProjectScheme, *model.ResponseScheme, error)

	// Statuses returns the valid statuses for a project.
	//
	// The statuses are grouped by issue type, as each project has a set of valid issue types and each issue type has a set of valid statuses.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/statuses
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#get-all-statuses-for-project
	Statuses(ctx context.Context, projectKeyOrId string) ([]*model.ProjectStatusPageScheme, *model.ResponseScheme, error)

	// NotificationScheme gets the notification scheme associated with the project.
	//
	// GET /rest/api/{2-3}/project/{projectKeyOrId}/notificationscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects#get-project-notification-scheme
	NotificationScheme(ctx context.Context, projectKeyOrId string, expand []string) (*model.NotificationSchemeScheme, *model.ResponseScheme, error)
}

type ProjectFeatureConnector

type ProjectFeatureConnector interface {

	// Gets returns the list of features for a project.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/features
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/features#get-project-features
	Gets(ctx context.Context, projectKeyOrId string) (*model.ProjectFeaturesScheme, *model.ResponseScheme, error)

	// Set sets the state of a project feature.
	//
	// PUT /rest/api/{2-3}/project/{projectIdOrKey}/features/{featureKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/features#set-project-feature-state
	Set(ctx context.Context, projectKeyOrId, featureKey, state string) (*model.ProjectFeaturesScheme, *model.ResponseScheme, error)
}

type ProjectPermissionSchemeConnector

type ProjectPermissionSchemeConnector interface {

	// Get search the permission scheme associated with the project.
	//
	// GET /rest/api/{2-3}/project/{projectKeyOrId}/permissionscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/permission-schemes#get-assigned-permission-scheme
	Get(ctx context.Context, projectKeyOrId string, expand []string) (*model.PermissionSchemeScheme, *model.ResponseScheme, error)

	// Assign assigns a permission scheme with a project.
	//
	// See Managing project permissions for more information about permission schemes.
	//
	// PUT /rest/api/{2-3}/project/{projectKeyOrId}/permissionscheme
	Assign(ctx context.Context, projectKeyOrId string, permissionSchemeId int) (*model.PermissionSchemeScheme, *model.ResponseScheme, error)

	// SecurityLevels returns all issue security levels for the project that the user has access to.
	//
	// GET /rest/api/{2-3}/project/{projectKeyOrId}/securitylevel
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/permission-schemes#get-project-issue-security-levels
	SecurityLevels(ctx context.Context, projectKeyOrId string) (*model.IssueSecurityLevelsScheme, *model.ResponseScheme, error)
}

type ProjectPropertyConnector

type ProjectPropertyConnector interface {

	// Gets returns all project property keys for the project.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/properties
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/properties#get-project-properties-keys
	Gets(ctx context.Context, projectKeyOrId string) (*model.PropertyPageScheme, *model.ResponseScheme, error)

	// Get returns the value of a project property.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/properties/{propertyKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/properties#get-project-property
	Get(ctx context.Context, projectKeyOrId, propertyKey string) (*model.EntityPropertyScheme, *model.ResponseScheme, error)

	// Set sets the value of the project property.
	//
	// You can use project properties to store custom data against the project.
	//
	// The value of the request body must be a valid, non-empty JSON blob.
	//
	// The maximum length is 32768 characters.
	//
	// PUT /rest/api/{2-3}/project/{projectIdOrKey}/properties/{propertyKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/properties#set-project-property
	Set(ctx context.Context, projectKeyOrId, propertyKey string, payload interface{}) (*model.ResponseScheme, error)

	// Delete deletes the property from a project.
	//
	// DELETE /rest/api/{2-3}/project/{projectIdOrKey}/properties/{propertyKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/properties#delete-project-property
	Delete(ctx context.Context, projectKeyOrId, propertyKey string) (*model.ResponseScheme, error)
}

type ProjectRoleActorConnector

type ProjectRoleActorConnector interface {

	// Add adds actors to a project role for the project.
	//
	// POST /rest/api/{2-3}/project/{projectIdOrKey}/role/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles/actors#add-actors-to-project-role
	Add(ctx context.Context, projectKeyOrId string, roleId int, accountIds, groups []string) (*model.ProjectRoleScheme, *model.ResponseScheme, error)

	// Delete deletes actors from a project role for the project.
	//
	// DELETE /rest/api/{2-3}/project/{projectIdOrKey}/role/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles/actors#delete-actors-from-project-role
	Delete(ctx context.Context, projectKeyOrId string, roleId int, accountId, group string) (*model.ResponseScheme, error)
}

type ProjectRoleConnector

type ProjectRoleConnector interface {

	// Gets returns a list of project roles for the project returning the name and self URL for each role.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/role
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles#get-project-roles-for-project
	Gets(ctx context.Context, projectKeyOrId string) (*map[string]int, *model.ResponseScheme, error)

	// Get returns a project role's details and actors associated with the project.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/role/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles#get-project-role-for-project
	Get(ctx context.Context, projectKeyOrId string, roleId int) (*model.ProjectRoleScheme, *model.ResponseScheme, error)

	// Details returns all project roles and the details for each role.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/roledetails
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles#get-project-role-details
	Details(ctx context.Context, projectKeyOrId string) ([]*model.ProjectRoleDetailScheme, *model.ResponseScheme, error)

	// Global gets a list of all project roles, complete with project role details and default actors.
	//
	// GET /rest/api/{2-3}/role
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles#get-all-project-roles
	Global(ctx context.Context) ([]*model.ProjectRoleScheme, *model.ResponseScheme, error)

	// Create creates a new project role with no default actors.
	//
	// POST /rest/api/{2-3}/role
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/roles#create-project-role
	Create(ctx context.Context, payload *model.ProjectRolePayloadScheme) (*model.ProjectRoleScheme, *model.ResponseScheme, error)
}

type ProjectTypeConnector

type ProjectTypeConnector interface {

	// Gets returns all project types, whether the instance has a valid license for each type.
	//
	// GET /rest/api/{2-3}/project/type
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/types#get-all-project-types
	Gets(ctx context.Context) ([]*model.ProjectTypeScheme, *model.ResponseScheme, error)

	// Licensed returns all project types with a valid license.
	//
	// GET /rest/api/{2-3}/project/type/accessible
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/types#get-licensed-project-types
	Licensed(ctx context.Context) ([]*model.ProjectTypeScheme, *model.ResponseScheme, error)

	// Get returns a project type
	//
	// GET /rest/api/{2-3}/project/type/{projectTypeKey}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/types#get-project-type-by-key
	Get(ctx context.Context, projectTypeKey string) (*model.ProjectTypeScheme, *model.ResponseScheme, error)

	// Accessible returns a project type if it is accessible to the user.
	//
	// GET /rest/api/{2-3}/project/type/{projectTypeKey}/accessible
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/types#get-accessible-project-type-by-key
	Accessible(ctx context.Context, projectTypeKey string) (*model.ProjectTypeScheme, *model.ResponseScheme, error)
}

type ProjectValidatorConnector

type ProjectValidatorConnector interface {

	// Validate validates a project key by confirming the key is a valid string and not in use.
	//
	// GET /rest/api/{2-3}/projectvalidate/key
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/validation#validate-project-key
	Validate(ctx context.Context, key string) (*model.ProjectValidationMessageScheme, *model.ResponseScheme, error)

	// Key validates a project key and, if the key is invalid or in use,
	//
	// generates a valid random string for the project key.
	//
	// GET /rest/api/{2-3}/projectvalidate/validProjectKey
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/validation#get-valid-project-key
	Key(ctx context.Context, key string) (string, *model.ResponseScheme, error)

	// Name checks that a project name isn't in use.
	//
	// If the name isn't in use, the passed string is returned.
	//
	// If the name is in use, this operation attempts to generate a valid project name based on the one supplied,
	//
	// usually by adding a sequence number. If a valid project name cannot be generated, a 404 response is returned.
	//
	// GET /rest/api/{2-3}/projectvalidate/validProjectName
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/validation#get-valid-project-name
	Name(ctx context.Context, name string) (string, *model.ResponseScheme, error)
}

type ProjectVersionConnector

type ProjectVersionConnector interface {

	// Gets returns all versions in a project.
	//
	// The response is not paginated.
	//
	// Use Search() if you want to get the versions in a project with pagination.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/versions
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#get-project-versions
	Gets(ctx context.Context, projectKeyOrId string) ([]*model.VersionScheme, *model.ResponseScheme, error)

	// Search returns a paginated list of all versions in a project.
	//
	// GET /rest/api/{2-3}/project/{projectIdOrKey}/version
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#get-project-versions-paginated
	Search(ctx context.Context, projectKeyOrId string, options *model.VersionGetsOptions, startAt, maxResults int) (*model.VersionPageScheme, *model.ResponseScheme, error)

	// Create creates a project version.
	//
	// POST /rest/api/{2-3}/version
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#create-version
	Create(ctx context.Context, payload *model.VersionPayloadScheme) (*model.VersionScheme, *model.ResponseScheme, error)

	// Get returns a project version.
	//
	// GET /rest/api/{2-3}/version/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#get-version
	Get(ctx context.Context, versionId string, expand []string) (*model.VersionScheme, *model.ResponseScheme, error)

	// Update updates a project version.
	//
	// PUT /rest/api/{2-3}/version/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#update-version
	Update(ctx context.Context, versionId string, payload *model.VersionPayloadScheme) (*model.VersionScheme, *model.ResponseScheme, error)

	// Merge merges two project versions.
	//
	// The merge is completed by deleting the version specified in id and replacing any occurrences of
	//
	// its ID in fixVersion with the version ID specified in moveIssuesTo.
	//
	// PUT /rest/api/{2-3}/version/{id}/mergeto/{moveIssuesTo}
	Merge(ctx context.Context, versionId, versionMoveIssuesTo string) (*model.ResponseScheme, error)

	// RelatedIssueCounts returns the following counts for a version:
	//
	// 1. Number of issues where the fixVersion is set to the version.
	//
	// 2. Number of issues where the affectedVersion is set to the version.
	//
	// 3. Number of issues where a version custom field is set to the version.
	//
	// GET /rest/api/{2-3}/version/{id}/relatedIssueCounts
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#get-versions-related-issues-count
	RelatedIssueCounts(ctx context.Context, versionId string) (*model.VersionIssueCountsScheme, *model.ResponseScheme, error)

	// UnresolvedIssueCount returns counts of the issues and unresolved issues for the project version.
	//
	// GET /rest/api/{2-3}/version/{id}/unresolvedIssueCount
	//
	// https://docs.go-atlassian.io/jira-software-cloud/projects/versions#get-versions-unresolved-issues-count
	UnresolvedIssueCount(ctx context.Context, versionId string) (*model.VersionUnresolvedIssuesCountScheme, *model.ResponseScheme, error)
}

type RemoteLinkConnector added in v1.5.0

type RemoteLinkConnector interface {

	// Gets returns the remote issue links for an issue.
	//
	// When a remote issue link global ID is provided the record with that global ID is returned,
	//
	// otherwise all remote issue links are returned.
	//
	// Where a global ID includes reserved URL characters these must be escaped in the request
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/remotelink
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/remote#get-remote-issue-links
	Gets(ctx context.Context, issueKeyOrId, globalId string) ([]*models.RemoteLinkScheme, *models.ResponseScheme, error)

	// Get returns a remote issue link for an issue.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/remotelink/{linkId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/remote#get-remote-issue-link
	Get(ctx context.Context, issueKeyOrId, linkId string) (*models.RemoteLinkScheme, *models.ResponseScheme, error)

	// Create creates or updates a remote issue link for an issue.
	//
	// If a globalId is provided and a remote issue link with that global ID is found it is updated.
	//
	// Any fields without values in the request are set to null. Otherwise, the remote issue link is created.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/remotelink
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/remote#create-remote-issue-link
	Create(ctx context.Context, issueKeyOrId string, payload *models.RemoteLinkScheme) (*models.RemoteLinkIdentify, *models.ResponseScheme, error)

	// Update updates a remote issue link for an issue.
	//
	// Note: Fields without values in the request are set to null.
	//
	// PUT /rest/api/{2-3}/issue/{issueIdOrKey}/remotelink/{linkId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/remote#update-remote-issue-link
	Update(ctx context.Context, issueKeyOrId, linkId string, payload *models.RemoteLinkScheme) (*models.ResponseScheme, error)

	// DeleteById deletes a remote issue link from an issue.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}/remotelink/{linkId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/remote#delete-remote-issue-link-by-id
	DeleteById(ctx context.Context, issueKeyOrId, linkId string) (*models.ResponseScheme, error)

	// DeleteByGlobalId deletes the remote issue link from the issue using the link's global ID.
	//
	// Where the global ID includes reserved URL characters these must be escaped in the request.
	//
	// For example, pass system=http://www.mycompany.com/support&id=1 as system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}/remotelink
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/link/remote#delete-remote-issue-link-by-global-id
	DeleteByGlobalId(ctx context.Context, issueKeyOrId, globalId string) (*models.ResponseScheme, error)
}

type ResolutionConnector

type ResolutionConnector interface {

	// Gets returns a list of all issue resolution values.
	//
	// GET /rest/api/{2-3}/resolution
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/resolutions#get-resolutions
	Gets(ctx context.Context) ([]*model.ResolutionScheme, *model.ResponseScheme, error)

	// Get returns an issue resolution value.
	//
	//
	// GET /rest/api/{2-3}/resolution/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/resolutions#get-resolution
	Get(ctx context.Context, resolutionId string) (*model.ResolutionScheme, *model.ResponseScheme, error)
}

type ScreenConnector

type ScreenConnector interface {

	// Fields returns a paginated list of the screens a field is used in.
	//
	// GET /rest/api/{2-3}/field/{fieldId}/screens
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#get-screens-for-a-field
	Fields(ctx context.Context, fieldId string, startAt, maxResults int) (*model.ScreenFieldPageScheme, *model.ResponseScheme, error)

	// Gets returns a paginated list of all screens or those specified by one or more screen IDs.
	//
	// GET /rest/api/{2-3}/screens
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#get-screens
	Gets(ctx context.Context, options *model.ScreenParamsScheme, startAt, maxResults int) (*model.ScreenSearchPageScheme, *model.ResponseScheme, error)

	// Create creates a screen with a default field tab
	//
	// POST /rest/api/{2-3}/screens
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#create-screen
	Create(ctx context.Context, name, description string) (*model.ScreenScheme, *model.ResponseScheme, error)

	// AddToDefault adds a field to the default tab of the default screen.
	//
	// POST /rest/api/{2-3}/screens/addToDefault/{fieldId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#add-field-to-default-screen
	AddToDefault(ctx context.Context, fieldId string) (*model.ResponseScheme, error)

	// Update updates a screen. Only screens used in classic projects can be updated.
	//
	// PUT /rest/api/{2-3}/screens/{screenId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#update-screen
	Update(ctx context.Context, screenId int, name, description string) (*model.ScreenScheme, *model.ResponseScheme, error)

	// Delete deletes a screen.
	// A screen cannot be deleted if it is used in a screen scheme,
	//
	// workflow, or workflow draft. Only screens used in classic projects can be deleted.
	//
	// DELETE /rest/api/{2-3}/screens/{screenId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#delete-screen
	Delete(ctx context.Context, screenId int) (*model.ResponseScheme, error)

	// Available returns the fields that can be added to a tab on a screen.
	//
	// GET /rest/api/{2-3}/screens/{screenId}/availableFields
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens#get-available-screen-fields
	Available(ctx context.Context, screenId int) ([]*model.AvailableScreenFieldScheme, *model.ResponseScheme, error)
}

type ScreenSchemeConnector

type ScreenSchemeConnector interface {

	// Gets returns a paginated list of screen schemes.
	//
	// Only screen schemes used in classic projects are returned.
	//
	// GET /rest/api/{2-3}/screenscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/schemes#get-screen-schemes
	Gets(ctx context.Context, options *model.ScreenSchemeParamsScheme, startAt, maxResults int) (*model.ScreenSchemePageScheme, *model.ResponseScheme, error)

	// Create creates a screen scheme.
	//
	// POST /rest/api/{2-3}/screenscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/schemes#create-screen-scheme
	Create(ctx context.Context, payload *model.ScreenSchemePayloadScheme) (*model.ScreenSchemeScheme, *model.ResponseScheme, error)

	// Update updates a screen scheme. Only screen schemes used in classic projects can be updated.
	//
	// PUT /rest/api/{2-3}/screenscheme/{screenSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/schemes#update-screen-scheme
	Update(ctx context.Context, screenSchemeId string, payload *model.ScreenSchemePayloadScheme) (*model.ResponseScheme, error)

	// Delete deletes a screen scheme. A screen scheme cannot be deleted if it is used in an issue type screen scheme.
	//
	// Only screens schemes used in classic projects can be deleted.
	//
	// DELETE /rest/api/{2-3}/screenscheme/{screenSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/schemes#delete-screen-scheme
	Delete(ctx context.Context, screenSchemeId string) (*model.ResponseScheme, error)
}

type ScreenTabConnector

type ScreenTabConnector interface {

	// Gets returns the list of tabs for a screen.
	//
	// GET /rest/api/{2-3}/screens/{screenId}/tabs
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs#get-all-screen-tabs
	Gets(ctx context.Context, screenId int, projectKey string) ([]*model.ScreenTabScheme, *model.ResponseScheme, error)

	// Create creates a tab for a screen.
	//
	// POST /rest/api/{2-3}/screens/{screenId}/tabs
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs#create-screen-tab
	Create(ctx context.Context, screenId int, tabName string) (*model.ScreenTabScheme, *model.ResponseScheme, error)

	// Update updates the name of a screen tab.
	//
	// PUT /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs#update-screen-tab
	Update(ctx context.Context, screenId, tabId int, newTabName string) (*model.ScreenTabScheme, *model.ResponseScheme, error)

	// Delete deletes a screen tab.
	//
	// DELETE /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs#delete-screen-tab
	Delete(ctx context.Context, screenId, tabId int) (*model.ResponseScheme, error)

	// Move moves a screen tab.
	//
	// POST /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}/move/{pos}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs#move-screen-tab
	Move(ctx context.Context, screenId, tabId, position int) (*model.ResponseScheme, error)
}

type ScreenTabFieldConnector

type ScreenTabFieldConnector interface {

	// Gets returns all fields for a screen tab.
	//
	// GET /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}/fields
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs/fields#get-all-screen-tab-fields
	Gets(ctx context.Context, screenId, tabId int) ([]*model.ScreenTabFieldScheme, *model.ResponseScheme, error)

	// Add adds a field to a screen tab.
	//
	// POST /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}/fields
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs/fields#add-screen-tab-field
	Add(ctx context.Context, screenId, tabId int, fieldId string) (*model.ScreenTabFieldScheme, *model.ResponseScheme, error)

	// Remove removes a field from a screen tab.
	//
	// DELETE /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}/fields/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/screens/tabs/fields#remove-screen-tab-field
	Remove(ctx context.Context, screenId, tabId int, fieldId string) (*model.ResponseScheme, error)

	// Move moves a screen tab field.
	//
	// If after and position are provided in the request, position is ignored.
	//
	// POST /rest/api/{2-3}/screens/{screenId}/tabs/{tabId}/fields/{id}/move
	//
	// TODO: Add documentation
	Move(ctx context.Context, screenId, tabId int, fieldId, after, position string) (*model.ResponseScheme, error)
}

type SearchADFConnector

type SearchADFConnector interface {
	SearchSharedConnector

	// Get search issues using JQL query under the HTTP Method GET
	//
	// GET /rest/api/3/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/search#search-for-issues-using-jql-get
	Get(ctx context.Context, jql string, fields, expands []string, startAt, maxResults int, validate string) (*model.IssueSearchScheme, *model.ResponseScheme, error)

	// Post search issues using JQL query under the HTTP Method POST
	//
	// POST /rest/api/3/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/search#search-for-issues-using-jql-get
	Post(ctx context.Context, jql string, fields, expands []string, startAt, maxResults int, validate string) (*model.IssueSearchScheme, *model.ResponseScheme, error)
}

type SearchRichTextConnector

type SearchRichTextConnector interface {
	SearchSharedConnector

	// Get search issues using JQL query under the HTTP Method GET
	//
	// GET /rest/api/2/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/search#search-for-issues-using-jql-get
	Get(ctx context.Context, jql string, fields, expands []string, startAt, maxResults int, validate string) (*model.IssueSearchSchemeV2, *model.ResponseScheme, error)

	// Post search issues using JQL query under the HTTP Method POST
	//
	// POST /rest/api/2/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/search#search-for-issues-using-jql-get
	Post(ctx context.Context, jql string, fields, expands []string, startAt, maxResults int, validate string) (*model.IssueSearchSchemeV2, *model.ResponseScheme, error)
}

type SearchSharedConnector

type SearchSharedConnector interface {

	// Checks checks whether one or more issues would be returned by one or more JQL queries.
	//
	// POST /rest/api/{2-3}/jql/match
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/search#check-issues-against-jql
	Checks(ctx context.Context, payload *model.IssueSearchCheckPayloadScheme) (*model.IssueMatchesPageScheme, *model.ResponseScheme, error)
}

type ServerConnector

type ServerConnector interface {

	// Info returns information about the Jira instance
	//
	// GET /rest/api/{2-3}/serverInfo
	//
	// https://docs.go-atlassian.io/jira-software-cloud/server#get-jira-instance-info
	Info(ctx context.Context) (*model.ServerInformationScheme, *model.ResponseScheme, error)
}

type TaskConnector

type TaskConnector interface {

	// Get returns the status of a long-running asynchronous task.
	//
	// When a task has finished, this operation returns the JSON blob applicable to the task.
	//
	// See the documentation of the operation that created the task for details.
	//
	// Task details are not permanently retained.
	//
	// GET /rest/api/{2-3}/task/{taskId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/tasks#get-task
	Get(ctx context.Context, taskId string) (*model.TaskScheme, *model.ResponseScheme, error)

	// Cancel cancels a task.
	//
	// POST /rest/api/{2-3}/task/{taskId}/cancel
	//
	// https://docs.go-atlassian.io/jira-software-cloud/tasks#cancel-task
	Cancel(ctx context.Context, taskId string) (*model.ResponseScheme, error)
}

type TeamConnector added in v1.5.1

type TeamConnector interface {

	// Gets gets the Teams information from the Jira Advanced Roadmaps application.
	//
	// Teams in Advanced Roadmaps are different from the teams found in the rest of Jira Software Cloud.
	//
	// In Advanced Roadmaps, they act as a label applied to issues that designates which team will eventually.
	//
	// pick up the work on your timeline. By adding the Team field to your Jira issues.
	//
	// you can save this value back to your Jira issues, which makes sprint planning easier.
	//
	// POST /rest/teams/1.0/teams/find
	//
	// https://docs.go-atlassian.io/jira-software-cloud/teams#get-teams
	Gets(ctx context.Context, maxResults int) (*models.JiraTeamPageScheme, *models.ResponseScheme, error)

	// Create creates a team on the Advanced Roadmaps
	//
	// POST /rest/teams/1.0/teams/create
	//
	// https://docs.go-atlassian.io/jira-software-cloud/teams#create-team
	Create(ctx context.Context, payload *models.JiraTeamCreatePayloadScheme) (*models.JiraTeamCreateResponseScheme, *models.ResponseScheme, error)
}

TeamConnector is an interface that defines the methods available from Roadmap Teams API.

type TypeConnector

type TypeConnector interface {

	// Gets returns all issue types.
	//
	// GET /rest/api/{2-3}/issuetype
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/type#get-all-issue-types-for-user
	Gets(ctx context.Context) ([]*model.IssueTypeScheme, *model.ResponseScheme, error)

	// Create creates an issue type and adds it to the default issue type scheme.
	//
	// POST /rest/api/{2-3}/issuetype
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/type#create-issue-type
	Create(ctx context.Context, payload *model.IssueTypePayloadScheme) (*model.IssueTypeScheme, *model.ResponseScheme, error)

	// Get returns an issue type.
	//
	// GET /rest/api/{2-3}/issuetype/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/type#get-issue-type
	Get(ctx context.Context, issueTypeId string) (*model.IssueTypeScheme, *model.ResponseScheme, error)

	// Update updates the issue type.
	//
	// PUT /rest/api/{2-3}/issuetype/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/type#update-issue-type
	Update(ctx context.Context, issueTypeId string, payload *model.IssueTypePayloadScheme) (*model.IssueTypeScheme, *model.ResponseScheme, error)

	// Delete deletes the issue type.
	//
	// If the issue type is in use, all uses are updated with the alternative issue type (alternativeIssueTypeId).
	// A list of alternative issue types are obtained from the Get alternative issue types resource.
	//
	// DELETE /rest/api/{2-3}/issuetype/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/type#delete-issue-type
	Delete(ctx context.Context, issueTypeId string) (*model.ResponseScheme, error)

	// Alternatives returns a list of issue types that can be used to replace the issue type.
	//
	// The alternative issue types are those assigned to the same workflow scheme, field configuration scheme, and screen scheme.
	//
	// GET /rest/api/{2-3}/issuetype/{id}/alternatives
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/type#get-alternative-issue-types
	Alternatives(ctx context.Context, issueTypeId string) ([]*model.IssueTypeScheme, *model.ResponseScheme, error)
}

type TypeSchemeConnector

type TypeSchemeConnector interface {

	// Gets returns a paginated list of issue type schemes.
	//
	// GET /rest/api/{2-3}/issuetypescheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#get-all-issue-type-schemes
	Gets(ctx context.Context, issueTypeSchemeIds []int, startAt, maxResults int) (*model.IssueTypeSchemePageScheme, *model.ResponseScheme, error)

	// Create creates an issue type scheme.
	//
	// POST /rest/api/{2-3}/issuetypescheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#create-issue-type-scheme
	Create(ctx context.Context, payload *model.IssueTypeSchemePayloadScheme) (*model.NewIssueTypeSchemeScheme, *model.ResponseScheme, error)

	// Items returns a paginated list of issue type scheme items.
	//
	// GET /rest/api/{2-3}/issuetypescheme/mapping
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#get-issue-type-scheme-items
	Items(ctx context.Context, issueTypeSchemeIds []int, startAt, maxResults int) (*model.IssueTypeSchemeItemPageScheme, *model.ResponseScheme, error)

	// Projects returns a paginated list of issue type schemes and, for each issue type scheme, a list of the projects that use it.
	//
	// GET /rest/api/{2-3}/issuetypescheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#get-issue-type-schemes-for-projects
	Projects(ctx context.Context, projectIds []int, startAt, maxResults int) (*model.ProjectIssueTypeSchemePageScheme, *model.ResponseScheme, error)

	// Assign assigns an issue type scheme to a project.
	//
	// PUT /rest/api/{2-3}/issuetypescheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#assign-issue-type-scheme-to-project
	Assign(ctx context.Context, issueTypeSchemeId, projectId string) (*model.ResponseScheme, error)

	// Update updates an issue type scheme.
	//
	// PUT /rest/api/{2-3}/issuetypescheme/{issueTypeSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#update-issue-type-scheme
	Update(ctx context.Context, issueTypeSchemeId int, payload *model.IssueTypeSchemePayloadScheme) (*model.ResponseScheme, error)

	// Delete deletes an issue type scheme.
	//
	// 1.Only issue type schemes used in classic projects can be deleted.
	//
	// 2.Any projects assigned to the scheme are reassigned to the default issue type scheme.
	//
	// DELETE /rest/api/{2-3}/issuetypescheme/{issueTypeSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#delete-issue-type-scheme
	Delete(ctx context.Context, issueTypeSchemeId int) (*model.ResponseScheme, error)

	// Append adds issue types to an issue type scheme.
	//
	// 1.The added issue types are appended to the issue types list.
	//
	// 2.If any of the issue types exist in the issue type scheme, the operation fails and no issue types are added.
	//
	// PUT /rest/api/{2-3}/issuetypescheme/{issueTypeSchemeId}/issuetype
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#add-issue-types-to-issue-type-scheme
	Append(ctx context.Context, issueTypeSchemeId int, issueTypeIds []int) (*model.ResponseScheme, error)

	// Remove removes an issue type from an issue type scheme, this operation cannot remove:
	//
	// 1.any issue type used by issues.
	//
	// 2.any issue types from the default issue type scheme.
	//
	// 3.the last standard issue type from an issue type scheme.
	//
	// DELETE /rest/api/{2-3}/issuetypescheme/{issueTypeSchemeId}/issuetype/{issueTypeId}
	//
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/scheme#remove-issue-type-from-issue-type-scheme
	Remove(ctx context.Context, issueTypeSchemeId, issueTypeId int) (*model.ResponseScheme, error)
}

type TypeScreenSchemeConnector

type TypeScreenSchemeConnector interface {

	// Gets returns a paginated list of issue type screen schemes.
	//
	// Only issue type screen schemes used in classic projects are returned.
	//
	// GET /rest/api/{2-3}/issuetypescreenscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#get-issue-type-screen-schemes
	Gets(ctx context.Context, options *model.ScreenSchemeParamsScheme, startAt, maxResults int) (*model.IssueTypeScreenSchemePageScheme, *model.ResponseScheme, error)

	// Create creates an issue type screen scheme.
	//
	// POST /rest/api/{2-3}/issuetypescreenscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#create-issue-type-screen-scheme
	Create(ctx context.Context, payload *model.IssueTypeScreenSchemePayloadScheme) (*model.IssueTypeScreenScreenCreatedScheme, *model.ResponseScheme, error)

	// Assign assigns an issue type screen scheme to a project.
	//
	// Issue type screen schemes can only be assigned to classic projects.
	//
	// PUT /rest/api/{2-3}/issuetypescreenscheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#assign-issue-type-screen-scheme-to-project
	Assign(ctx context.Context, issueTypeScreenSchemeId, projectId string) (*model.ResponseScheme, error)

	// Projects returns a paginated list of issue type screen schemes and,
	// for each issue type screen scheme, a list of the projects that use it.
	//
	// GET /rest/api/{2-3}/issuetypescreenscheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#assign-issue-type-screen-scheme-to-project
	Projects(ctx context.Context, projectIds []int, startAt, maxResults int) (*model.IssueTypeProjectScreenSchemePageScheme, *model.ResponseScheme, error)

	// Mapping returns a paginated list of issue type screen scheme items.
	//
	// Only issue type screen schemes used in classic projects are returned.
	//
	// GET /rest/api/{2-3}/issuetypescreenscheme/mapping
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#get-issue-type-screen-scheme-items
	Mapping(ctx context.Context, issueTypeScreenSchemeIds []int, startAt, maxResults int) (*model.IssueTypeScreenSchemeMappingScheme, *model.ResponseScheme, error)

	// Update updates an issue type screen scheme.
	//
	// PUT /rest/api/{2-3}/issuetypescreenscheme/{issueTypeScreenSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#update-issue-type-screen-scheme
	Update(ctx context.Context, issueTypeScreenSchemeId, name, description string) (*model.ResponseScheme, error)

	// Delete deletes an issue type screen scheme.
	//
	// DELETE /rest/api/{2-3}/issuetypescreenscheme/{issueTypeScreenSchemeId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#delete-issue-type-screen-scheme
	Delete(ctx context.Context, issueTypeScreenSchemeId string) (*model.ResponseScheme, error)

	// Append appends issue type to screen scheme mappings to an issue type screen scheme.
	//
	// PUT /rest/api/{2-3}/issuetypescreenscheme/{issueTypeScreenSchemeId}/mapping
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#append-mappings-to-issue-type-screen-scheme
	Append(ctx context.Context, issueTypeScreenSchemeId string, payload *model.IssueTypeScreenSchemePayloadScheme) (*model.ResponseScheme, error)

	// UpdateDefault updates the default screen scheme of an issue type screen scheme.
	// The default screen scheme is used for all unmapped issue types.
	//
	// PUT /rest/api/{2-3}/issuetypescreenscheme/{issueTypeScreenSchemeId}/mapping/default
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#update-issue-type-screen-scheme-default-screen-scheme
	UpdateDefault(ctx context.Context, issueTypeScreenSchemeId, screenSchemeId string) (*model.ResponseScheme, error)

	// Remove removes issue type to screen scheme mappings from an issue type screen scheme.
	//
	// POST /rest/api/{2-3}/issuetypescreenscheme/{issueTypeScreenSchemeId}/mapping/remove
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#remove-mappings-from-issue-type-screen-scheme
	Remove(ctx context.Context, issueTypeScreenSchemeId string, issueTypeIds []string) (*model.ResponseScheme, error)

	// SchemesByProject returns a paginated list of projects associated with an issue type screen scheme.
	//
	// GET /rest/api/{2-3}/issuetypescreenscheme/{issueTypeScreenSchemeId}/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/types/screen-scheme#get-issue-type-screen-scheme-projects
	SchemesByProject(ctx context.Context, issueTypeScreenSchemeId, startAt, maxResults int) (*model.IssueTypeScreenSchemeByProjectPageScheme, *model.ResponseScheme, error)
}

type UserConnector

type UserConnector interface {

	// Get returns a user
	//
	// GET /rest/api/{2-3}/user
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users#get-user
	Get(ctx context.Context, accountId string, expand []string) (*model.UserScheme, *model.ResponseScheme, error)

	// Create creates a user. This resource is retained for legacy compatibility.
	//
	// As soon as a more suitable alternative is available this resource will be deprecated.
	//
	// The option is provided to set or generate a password for the user.
	//
	// When using the option to generate a password, by omitting password from the request, include "notification": "true" to ensure the user is
	//
	// sent an email advising them that their account is created.
	//
	// This email includes a link for the user to set their password. If the notification isn't sent for a generated password,
	//
	// the user will need to be sent a reset password request from Jira.
	//
	// POST /rest/api/{2-3}user
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users#create-user
	Create(ctx context.Context, payload *model.UserPayloadScheme) (*model.UserScheme, *model.ResponseScheme, error)

	// Delete deletes a user.
	//
	// DELETE /rest/api/{2-3}/user
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users#delete-user
	Delete(ctx context.Context, accountId string) (*model.ResponseScheme, error)

	// Find returns a paginated list of the users specified by one or more account IDs.
	//
	// GET /rest/api/{2-3}/user/bulk
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users#bulk-get-users
	Find(ctx context.Context, accountIds []string, startAt, maxResults int) (*model.UserSearchPageScheme, *model.ResponseScheme,
		error)

	// Groups returns the groups to which a user belongs.
	//
	// GET /rest/api/{2-3}/user/groups
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users#get-user-groups
	Groups(ctx context.Context, accountIds string) ([]*model.UserGroupScheme, *model.ResponseScheme, error)

	// Gets returns a list of all (active and inactive) users.
	//
	// GET /rest/api/{2-3}/users/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users#get-all-users
	Gets(ctx context.Context, startAt, maxResults int) ([]*model.UserScheme, *model.ResponseScheme, error)
}

type UserSearchConnector

type UserSearchConnector interface {

	// Projects returns a list of users who can be assigned issues in one or more projects.
	//
	// The list may be restricted to users whose attributes match a string.
	//
	// GET /rest/api/{2-3}/user/assignable/multiProjectSearch
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users/search#find-users-assignable-to-projects
	Projects(ctx context.Context, accountId string, projectKeys []string, startAt, maxResults int) (
		[]*model.UserScheme, *model.ResponseScheme, error)

	// Do return a list of users that match the search string and property.
	//
	//
	// This operation takes the users in the range defined by startAt and maxResults, up to the thousandth user,
	//
	// and then returns only the users from that range that match the search string and property.
	//
	// This means the operation usually returns fewer users than specified in maxResults
	//
	// GET /rest/api/{2-3}/user/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users/search#find-users
	Do(ctx context.Context, accountId, query string, startAt, maxResults int) ([]*model.UserScheme, *model.ResponseScheme, error)

	// Check returns a list of users who fulfill these criteria:
	//
	// 1. their user attributes match a search string.
	// 2. they have a set of permissions for a project or issue.
	//
	//
	// If no search string is provided, a list of all users with the permissions is returned.
	//
	// GET /rest/api/{2-3}/user/permission/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/users/search#find-users-with-permissions
	Check(ctx context.Context, permission string, options *model.UserPermissionCheckParamsScheme, startAt, maxResults int) ([]*model.UserScheme, *model.ResponseScheme, error)
}

type VoteConnector

type VoteConnector interface {

	// Gets returns details about the votes on an issue.
	//
	// This operation requires allowing users to vote on issues option to be ON
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/votes
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/vote#get-votes
	Gets(ctx context.Context, issueKeyOrId string) (*model.IssueVoteScheme, *model.ResponseScheme, error)

	// Add adds the user's vote to an issue. This is the equivalent of the user clicking Vote on an issue in Jira.
	//
	// This operation requires the Allow users to vote on issues option to be ON.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/votes
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/vote#add-vote
	Add(ctx context.Context, issueKeyOrId string) (*model.ResponseScheme, error)

	// Delete deletes a user's vote from an issue. This is the equivalent of the user clicking Unvote on an issue in Jira.
	//
	// This operation requires the Allow users to vote on issues option to be ON.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}/votes
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/vote#delete-vote
	Delete(ctx context.Context, issueKeyOrId string) (*model.ResponseScheme, error)
}

VoteConnector is an interface that defines the methods available from VoteConnector API. Use it to get details of votes on an issue as well as cast and withdrawal votes.

type WatcherConnector

type WatcherConnector interface {

	// Gets returns the watchers for an issue.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/watchers
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/watcher#get-issue-watchers
	Gets(ctx context.Context, issueKeyOrId string) (*model.IssueWatcherScheme, *model.ResponseScheme, error)

	// Add adds a user as a watcher of an issue by passing the account ID of the user.
	//
	// For example, "5b10ac8d82e05b22cc7d4ef5". If no user is specified the calling user is added.
	//
	// POST /rest/api/{2-3}/issue/{issueIdOrKey}/watchers
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/watcher#add-watcher
	Add(ctx context.Context, issueKeyOrId string) (*model.ResponseScheme, error)

	// Delete deletes a user as a watcher of an issue.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}/watchers
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/watcher#delete-watcher
	Delete(ctx context.Context, issueKeyOrId, accountId string) (*model.ResponseScheme, error)
}

WatcherConnector is an interface that defines the methods available from WatcherConnector API. Use it to get details of users watching an issue as well as start and stop a user watching an issue.

type WorkflowConnector

type WorkflowConnector interface {

	// Create creates a workflow.
	//
	// You can define transition rules using the shapes detailed in the following sections.
	//
	// If no transitional rules are specified the default system transition rules are used.
	//
	// POST /rest/api/{2-3}/workflow
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow#create-workflow
	Create(ctx context.Context, payload *model.WorkflowPayloadScheme) (*model.WorkflowCreatedResponseScheme, *model.ResponseScheme, error)

	// Gets returns a paginated list of published classic workflows.
	//
	// When workflow names are specified, details of those workflows are returned.
	//
	// Otherwise, all published classic workflows are returned.
	//
	// GET /rest/api/{2-3}/workflow/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow#search-workflows
	Gets(ctx context.Context, options *model.WorkflowSearchOptions, startAt, maxResults int) (*model.WorkflowPageScheme, *model.ResponseScheme, error)

	// Delete deletes a workflow.
	//
	// The workflow cannot be deleted if it is:
	//
	// 1. an active workflow.
	// 2. a system workflow.
	// 3. associated with any workflow scheme.
	// 4. associated with any draft workflow scheme.
	//
	// DELETE /rest/api/{2-3}/workflow/{entityId}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow#search-workflows
	Delete(ctx context.Context, workflowId string) (*model.ResponseScheme, error)
}

type WorkflowSchemeConnector

type WorkflowSchemeConnector interface {

	// Gets returns a paginated list of all workflow schemes, not including draft workflow schemes.
	//
	// GET /rest/api/{2-3}/workflowscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#gets-workflows-schemes
	Gets(ctx context.Context, startAt, maxResults int) (*model.WorkflowSchemePageScheme, *model.ResponseScheme, error)

	// Create creates a workflow scheme.
	//
	// POST /rest/api/{2-3}/workflowscheme
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#create-workflows-scheme
	Create(ctx context.Context, payload *model.WorkflowSchemePayloadScheme) (*model.WorkflowSchemeScheme, *model.ResponseScheme, error)

	// Get returns a workflow scheme
	//
	// GET /rest/api/{2-3}/workflowscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#get-workflow-scheme
	Get(ctx context.Context, schemeId int, returnDraftIfExists bool) (*model.WorkflowSchemeScheme, *model.ResponseScheme, error)

	// Update updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more.
	//
	// If the workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or updated instead,
	//
	// provided that updateDraftIfNeeded is set to true.
	//
	// PUT /rest/api/{2-3}/workflowscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#update-workflow-scheme
	Update(ctx context.Context, schemeId int, payload *model.WorkflowSchemePayloadScheme) (*model.WorkflowSchemeScheme, *model.ResponseScheme, error)

	// Delete deletes a workflow scheme.
	//
	// Note that a workflow scheme cannot be deleted if it is active (that is, being used by at least one project).
	//
	// DELETE /rest/api/{2-3}/workflowscheme/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#delete-workflow-scheme
	Delete(ctx context.Context, schemeId int) (*model.ResponseScheme, error)

	// Associations returns a list of the workflow schemes associated with a list of projects.
	//
	// Each returned workflow scheme includes a list of the requested projects associated with it.
	//
	// Any team-managed or non-existent projects in the request are ignored and no errors are returned.
	//
	// If the project is associated with the Default Workflow Scheme no ID is returned.
	//
	// This is because the way the Default Workflow Scheme is stored means it has no ID.
	//
	// GET /rest/api/{2-3}/workflowscheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#get-workflow-schemes-associations
	Associations(ctx context.Context, projectIds []int) (*model.WorkflowSchemeAssociationPageScheme, *model.ResponseScheme, error)

	// Assign assigns a workflow scheme to a project.
	//
	// This operation is performed only when there are no issues in the project.
	//
	// Workflow schemes can only be assigned to classic projects.
	//
	// PUT /rest/api/{2-3}/workflowscheme/project
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme#get-workflow-schemes-associations
	Assign(ctx context.Context, schemeId, projectId string) (*model.ResponseScheme, error)
}

type WorkflowSchemeIssueTypeConnector added in v1.5.1

type WorkflowSchemeIssueTypeConnector interface {

	// Get returns the issue type-workflow mapping for an issue type in a workflow scheme.
	//
	// GET /rest/api/{2-3}/workflowscheme/{id}/issuetype/{issueType}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme/issue-type#get-workflow-for-issue-type-in-workflow-scheme
	Get(ctx context.Context, schemeID int, issueTypeID string, returnDraft bool) (*model.IssueTypeWorkflowMappingScheme, *model.ResponseScheme, error)

	// Set sets the workflow for an issue type in a workflow scheme.
	//
	// Note that active workflow schemes cannot be edited.
	//
	// If the workflow scheme is active, set updateDraftIfNeeded to true in the request body and a draft workflow scheme
	//
	// is created or updated with the new issue type-workflow mapping.
	//
	// The draft workflow scheme can be published in Jira.
	//
	// PUT /rest/api/{2-3}/workflowscheme/{id}/issuetype/{issueType}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme/issue-type#set-workflow-for-issue-type-in-workflow-scheme
	Set(ctx context.Context, schemeID int, issueTypeID string, payload *model.IssueTypeWorkflowPayloadScheme) (*model.WorkflowSchemeScheme, *model.ResponseScheme, error)

	// Delete deletes the issue type-workflow mapping for an issue type in a workflow scheme.
	//
	// Note that active workflow schemes cannot be edited.
	//
	// If the workflow scheme is active, set updateDraftIfNeeded to true and a draft workflow scheme is created or
	//
	// updated with the issue type-workflow mapping deleted.
	//
	// The draft workflow scheme can be published in Jira.
	//
	// DELETE /rest/api/{2-3}/workflowscheme/{id}/issuetype/{issueType}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme/issue-type#delete-workflow-for-issue-type-in-workflow-scheme
	Delete(ctx context.Context, schemeID int, issueTypeID string, updateDraft bool) (*model.WorkflowSchemeScheme, *model.ResponseScheme, error)

	// Mapping returns the workflow-issue type mappings for a workflow scheme.
	//
	// GET /rest/api/{2-3}/workflowscheme/{id}/workflow
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/scheme/issue-type#get-issue-types-for-workflows-in-workflow-scheme
	Mapping(ctx context.Context, schemeID int, workflowName string, returnDraft bool) ([]*model.IssueTypesWorkflowMappingScheme, *model.ResponseScheme, error)
}

WorkflowSchemeIssueTypeConnector represents the workflows scheme issue type endpoints.

Use it to search, get, create, delete, and change workflow issue types.

type WorkflowStatusConnector

type WorkflowStatusConnector interface {

	// Gets returns a list of the statuses specified by one or more status IDs.
	//
	// GET /rest/api/{2-3}/statuses
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#gets-workflow-statuses
	Gets(ctx context.Context, ids, expand []string) ([]*model.WorkflowStatusDetailScheme, *model.ResponseScheme, error)

	// Update updates statuses by ID.
	//
	// PUT /rest/api/{2-3}/statuses
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#update-workflow-statuses
	Update(ctx context.Context, payload *model.WorkflowStatusPayloadScheme) (*model.ResponseScheme, error)

	// Create creates statuses for a global or project scope.
	//
	// POST /rest/api/{2-3}/statuses
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#create-workflow-statuses
	Create(ctx context.Context, payload *model.WorkflowStatusPayloadScheme) ([]*model.WorkflowStatusDetailScheme, *model.ResponseScheme, error)

	// Delete deletes statuses by ID.
	//
	// DELETE /rest/api/{2-3}/statuses
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#delete-workflow-statuses
	Delete(ctx context.Context, ids []string) (*model.ResponseScheme, error)

	// Search returns a paginated list of statuses that match a search on name or project.
	//
	// GET /rest/api/{2-3}/statuses/search
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#search-workflow-statuses
	Search(ctx context.Context, options *model.WorkflowStatusSearchParams, startAt, maxResults int) (*model.WorkflowStatusDetailPageScheme,
		*model.ResponseScheme, error)

	// Bulk returns a list of all statuses associated with active workflows.
	//
	// GET /rest/api/{2-3}/status
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#bulk-workflow-statuses
	Bulk(ctx context.Context) ([]*model.StatusDetailScheme, *model.ResponseScheme, error)

	// Get returns a status.
	//
	// The status must be associated with an active workflow to be returned.
	//
	// If a name is used on more than one status, only the status found first is returned.
	//
	// Therefore, identifying the status by its ID may be preferable.
	//
	// This operation can be accessed anonymously.
	//
	// GET /rest/api/{2-3}/status/{idOrName}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/workflow/status#get-workflow-status
	Get(ctx context.Context, idOrName string) (*model.StatusDetailScheme, *model.ResponseScheme, error)
}

WorkflowStatusConnector represents the workflows statuses.

Use it to search, get, create, delete, and change statuses.

type WorklogADFConnector

type WorklogADFConnector interface {
	WorklogSharedConnector

	// Gets returns worklog details for a list of worklog IDs.
	//
	// The returned list of worklogs is limited to 1000 items.
	//
	// POST /rest/api/{2-3}/worklog/list
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-worklogs
	Gets(ctx context.Context, worklogIds []int, expand []string) ([]*model.IssueWorklogADFScheme, *model.ResponseScheme, error)

	// Get returns a worklog.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/worklog/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-worklog
	Get(ctx context.Context, issueKeyOrId, worklogId string, expand []string) (*model.IssueWorklogADFScheme, *model.ResponseScheme, error)

	// Issue returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and time.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/worklog
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-issue-worklogs
	Issue(ctx context.Context, issueKeyOrId string, startAt, maxResults, after int, expand []string) (*model.IssueWorklogADFPageScheme, *model.ResponseScheme, error)

	// Add adds a worklog to an issue.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// POST /rest/api/3/issue/{issueIdOrKey}/worklog
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#add-worklog
	Add(ctx context.Context, issueKeyOrID string, payload *model.WorklogADFPayloadScheme, options *model.WorklogOptionsScheme) (*model.IssueWorklogADFScheme,
		*model.ResponseScheme, error)

	// Update updates a worklog.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// PUT /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#update-worklog
	Update(ctx context.Context, issueKeyOrId, worklogId string, payload *model.WorklogADFPayloadScheme, options *model.WorklogOptionsScheme) (
		*model.IssueWorklogADFScheme, *model.ResponseScheme, error)
}

type WorklogRichTextConnector

type WorklogRichTextConnector interface {
	WorklogSharedConnector

	// Gets returns worklog details for a list of worklog IDs.
	//
	// The returned list of worklogs is limited to 1000 items.
	//
	// POST /rest/api/{2-3}/worklog/list
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-worklogs
	Gets(ctx context.Context, worklogIds []int, expand []string) ([]*model.IssueWorklogRichTextScheme, *model.ResponseScheme, error)

	// Get returns a worklog.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/worklog/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-worklog
	Get(ctx context.Context, issueKeyOrId, worklogId string, expand []string) (*model.IssueWorklogRichTextScheme, *model.ResponseScheme, error)

	// Issue returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and time.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// GET /rest/api/{2-3}/issue/{issueIdOrKey}/worklog
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-issue-worklogs
	Issue(ctx context.Context, issueKeyOrId string, startAt, maxResults, after int, expand []string) (*model.IssueWorklogRichTextPageScheme, *model.ResponseScheme, error)

	// Add adds a worklog to an issue.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// POST /rest/api/2/issue/{issueIdOrKey}/worklog
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#add-worklog
	Add(ctx context.Context, issueKeyOrID string, payload *model.WorklogRichTextPayloadScheme, options *model.WorklogOptionsScheme) (*model.IssueWorklogRichTextScheme,
		*model.ResponseScheme, error)

	// Update updates a worklog.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// PUT /rest/api/2/issue/{issueIdOrKey}/worklog/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#update-worklog
	Update(ctx context.Context, issueKeyOrId, worklogId string, payload *model.WorklogRichTextPayloadScheme, options *model.WorklogOptionsScheme) (
		*model.IssueWorklogRichTextScheme, *model.ResponseScheme, error)
}

type WorklogSharedConnector

type WorklogSharedConnector interface {

	// Delete deletes a worklog from an issue.
	//
	// Time tracking must be enabled in Jira, otherwise this operation returns an error.
	//
	// DELETE /rest/api/{2-3}/issue/{issueIdOrKey}/worklog/{id}
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#delete-worklog
	Delete(ctx context.Context, issueKeyOrId, worklogId string, options *model.WorklogOptionsScheme) (*model.ResponseScheme, error)

	// Deleted returns a list of IDs and delete timestamps for worklogs deleted after a date and time.
	//
	// This resource is paginated, with a limit of 1000 worklogs per page. Each page lists worklogs from oldest to youngest.
	// If the number of items in the date range exceeds 1000, until indicates the timestamp of the youngest item on the page.
	// Also, nextPage provides the URL for the next page of worklogs.
	// The lastPage parameter is set to true on the last page of worklogs.
	//
	// This resource does not return worklogs deleted during the minute preceding the request.
	//
	// GET /rest/api/{2-3}/worklog/deleted
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-ids-of-deleted-worklogs
	Deleted(ctx context.Context, since int) (result *model.ChangedWorklogPageScheme, response *model.ResponseScheme, err error)

	// Updated returns a list of IDs and update timestamps for worklogs updated after a date and time.
	//
	// This resource is paginated, with a limit of 1000 worklogs per page. Each page lists worklogs from oldest to youngest.
	// If the number of items in the date range exceeds 1000, until indicates the timestamp of the youngest item on the page.
	// Also, nextPage provides the URL for the next page of worklogs.
	// The lastPage parameter is set to true on the last page of worklogs.
	//
	// This resource does not return worklogs updated during the minute preceding the request.
	//
	// GET /rest/api/{2-3}/worklog/updated
	//
	// https://docs.go-atlassian.io/jira-software-cloud/issues/worklogs#get-ids-of-updated-worklogs
	Updated(ctx context.Context, since int, expand []string) (*model.ChangedWorklogPageScheme, *model.ResponseScheme, error)
}

Jump to

Keyboard shortcuts

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