Copyright | (c) Robert Massioli, 2014 |
---|---|
License | APACHE-2 |
Maintainer | rmassaioli@atlassian.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module provides the data types to let you write your own typesafe Atlassian Connect descriptor and it comes with Aeson bindings so that you can easily convert into json: the format that the Atlassian Connect framework expects.
Atlassian Connect is a framework for writing Add-on's that can run inside the Atlassian Cloud products. You can find more information from the Atlassian Connect documentation https://developer.atlassian.com/static/connect/docs/guides/introduction.html.
The plugin descriptor is defined by the Plugin
class. The end result of using this Haskell Module should be for you to
end up with a valid Plugin
. To turn your plugin into JSON that the Atlassian marketplace can accept just use the encode
function from the Aeson library. For example, here in an example Atlassian Connect Descriptor:
pluginToJsonString :: Plugin -> ByteString pluginToJsonString = encode exampleDescriptor :: Plugin exampleDescriptor = (pluginDescriptor (PluginKey "my-example-connect") baseURL (Authentication Jwt)) { pluginName = Just . Name $ "My Example Connect Addon" , pluginDescription = Just "This is an example connect descriptor." , vendor = Just $ Vendor (Name "Awesome Devs") (toURI "http://awesome-devs.com") , lifecycle = Just defaultLifecycle , modules = Just exampleModules , enableLicensing = Just False , links = HM.fromList [ ("documentation", toURI "http://awesome-devs.com/docs") , ("source", toURI "http://bitbucket.org/awesome-devs/connect-addon") ] , scopes = Just [Read, Admin] } exampleModules :: Modules exampleModules = Modules exampleJIRAModules emptyConfluenceModules exampleJIRAModules :: JIRAModules exampleJIRAModules = emptyJIRAModules { jmWebPanels = Just [ WebPanel { wpKey = "test-web-panel" , wpName = simpleText "Test Web Panel" , wpTooltip = Just $ simpleText "This is a test web panel..." , wpLocation = "some-location-in-jira" , wpUrl = "/panel/location/for" , wpConditions = [staticJiraCondition UserIsAdminJiraCondition] , wpWeight = Nothing , wpLayout = Nothing , wpParams = noParams } ] , jmGeneralPages = Just [ JIRAPage { jiraPageKey = "test-general-page" , jiraPageName = simpleText "Test General Page" , jiraPageLocation = Just "some-other-location-in-jira" , jiraPageWeight = Just 1234 , jiraPageUrl = "/panel/general-page" , jiraPageIcon = Just IconDetails { iconUrl = "/static/path/to/icon.png" , iconWidth = Just 20 , iconHeight = Just 40 } , jiraPageConditions = [staticJiraCondition UserHasIssueHistoryJiraCondition] , jiraPageParams = noParams } ] , jmWebhooks = Just [ Webhook { webhookEvent = JiraIssueDeleted , webhookUrl = "/webhook/handle-deletion" } ] }
You can use this library to make your own. This library will experience change whenever the Atlassian Connect descriptor changes. There are likely to be many breaking changes but we will keep track of them using the standard Haskell version structure.
- data Plugin = Plugin {
- pluginKey :: PluginKey
- pluginBaseUrl :: URI
- authentication :: Authentication
- pluginName :: Maybe (Name Plugin)
- pluginDescription :: Maybe Text
- vendor :: Maybe Vendor
- lifecycle :: Maybe Lifecycle
- modules :: Maybe Modules
- apiVersion :: Maybe Text
- enableLicensing :: Maybe Bool
- links :: HashMap Text URI
- scopes :: Maybe [ProductScope]
- pluginDescriptor :: PluginKey -> URI -> Authentication -> Plugin
- data Key t a = Key t
- data PluginKey = PluginKey Text
- newtype Timeout = Timeout Second
- data Vendor = Vendor {
- vendorName :: Name Vendor
- vendorUrl :: URI
- data Authentication = Authentication {}
- data AuthType
- data IconDetails = IconDetails {}
- data Name a = Name Text
- data I18nText = I18nText {}
- simpleText :: Text -> I18nText
- data URLBean = URLBean {}
- toUrl :: Text -> URLBean
- data Length
- type Weight = Integer
- type ModuleParams = HashMap Text Text
- noParams :: ModuleParams
- data Lifecycle = Lifecycle {}
- emptyLifecycle :: Lifecycle
- defaultLifecycle :: Lifecycle
- data Modules = Modules {}
- data JIRAModules = JIRAModules {
- jmWebSections :: Maybe [JIRAWebSection]
- jmWebItems :: Maybe [WebItem]
- jmWebPanels :: Maybe [WebPanel]
- jmGeneralPages :: Maybe [JIRAPage]
- jmAdminPages :: Maybe [JIRAPage]
- jmConfigurePage :: Maybe JIRAPage
- jmJiraSearchRequestViews :: Maybe [JIRASearchRequestView]
- jmJiraProfileTabPanels :: Maybe [JIRAGenericTabPanel]
- jmJiraVersionTabPanels :: Maybe [JIRAGenericTabPanel]
- jmJiraProjectTabPanels :: Maybe [JIRAGenericTabPanel]
- jmJiraProjectAdminTabPanels :: Maybe [JIRAProjectAdminTabPanel]
- jmJiraIssueTabPanels :: Maybe [JIRAGenericTabPanel]
- jmJiraComponentTabPanels :: Maybe [JIRAGenericTabPanel]
- jmJiraReports :: Maybe [JIRAReport]
- jmWebhooks :: Maybe [Webhook]
- jmJiraWorkflowPostFunctions :: Maybe [JIRAWorkflowPostFunction]
- jmJiraEntityProperties :: Maybe [JIRAEntityProperties]
- emptyJIRAModules :: JIRAModules
- data ConfluenceModules = ConfluenceModules {}
- emptyConfluenceModules :: ConfluenceModules
- data JIRAWebSection = JIRAWebSection {
- jwsKey :: Text
- jwsName :: I18nText
- jwsLocation :: Text
- jwsTooltip :: Maybe I18nText
- jwsConditions :: [Condition]
- jwsWeight :: Maybe Weight
- jwsParams :: ModuleParams
- data WebItem = WebItem {
- wiKey :: Text
- wiName :: I18nText
- wiLocation :: Text
- wiUrl :: Text
- wiTooltip :: Maybe I18nText
- wiIcon :: Maybe IconDetails
- wiWeight :: Maybe Weight
- wiTarget :: Maybe Target
- wiStyleClasses :: [Text]
- wiContext :: Maybe WebItemContext
- wiConditions :: [Condition]
- wiParams :: ModuleParams
- data WebItemContext
- data WebPanel = WebPanel {}
- data WebPanelLayout = WebPanelLayout {}
- data JIRAPage = JIRAPage {}
- data JIRAGenericTabPanel = JIRAGenericTabPanel {}
- data JIRAProjectAdminTabPanel = JIRAProjectAdminTabPanel {}
- data JIRASearchRequestView = JIRASearchRequestView {}
- data JIRAReport = JIRAReport {}
- data JIRAReportCategory
- data Target
- data JIRAWorkflowPostFunction = JIRAWorkflowPostFunction {}
- data DialogOptions = DialogOptions {}
- data InlineDialogOptions = InlineDialogOptions {}
- data JIRAEntityProperties = JIRAEntityProperties {}
- data EntityType = IssueEntityType
- data KeyConfiguration = KeyConfiguration {
- kcPropertyKey :: Text
- kcExtractions :: [Extraction]
- data Extraction = Extraction {}
- data ExtractionType
- data Webhook = Webhook {}
- data WebhookEvent
- = ConnectAddonDisabled
- | ConnectAddonEnabled
- | JiraWebhookPostFunction
- | JiraIssueCreated
- | JiraIssueDeleted
- | JiraIssueUpdated
- | JiraWorklogUpdated
- | JiraPluginEnabled
- | JiraPluginsUpgraded
- | JiraRemoteIssueLinkAggregateClearedEvent
- | JiraRemoteWorkflowPostFunction
- | ConfluenceAttachmentCreated
- | ConfluenceAttachmentRemoved
- | ConfluenceAttachmentUpdated
- | ConfluenceAttachmentViewed
- | ConfluenceBlogCreated
- | ConfluenceBlogRemoved
- | ConfluenceBlogRestored
- | ConfluenceBlogTrashed
- | ConfluenceBlogUpdated
- | ConfluenceBlogViewed
- | ConfluenceCacheStatisticsChanged
- | ConfluenceCommentCreated
- | ConfluenceCommentRemoved
- | ConfluenceCommentUpdated
- | ConfluenceContentPermissionsUpdated
- | ConfluenceLabelAdded
- | ConfluenceLabelCreated
- | ConfluenceLabelDeleted
- | ConfluenceLabelRemoved
- | ConfluenceLogin
- | ConfluenceLoginFailed
- | ConfluenceLogout
- | ConfluencePageChildrenReordered
- | ConfluencePageCreated
- | ConfluencePageMoved
- | ConfluencePageRemoved
- | ConfluencePageRestored
- | ConfluencePageTrashed
- | ConfluencePageUpdated
- | ConfluencePageViewed
- | ConfluenceSearchPerformed
- | ConfluenceSpaceCreated
- | ConfluenceSpaceLogoUpdated
- | ConfluenceSpacePermissionsUpdated
- | ConfluenceSpaceRemoved
- | ConfluenceSpaceUpdated
- | ConfluenceStatusCleared
- | ConfluenceStatusCreated
- | ConfluenceStatusRemoved
- | ConfluenceUserCreated
- | ConfluenceUserDeactivated
- | ConfluenceUserFollowed
- | ConfluenceUserReactivated
- | ConfluenceUserRemoved
- | ConfluenceGroupCreated
- | ConfluenceGroupRemoved
- | ServerUpgraded
- data Condition
- data ConditionType
- data ConditionSource
- remoteCondition :: String -> Condition
- data JIRACondition
- = CanAttachFileToIssueJiraCondition
- | CanManageAttachmentsJiraCondition
- | FeatureFlagJiraCondition
- | HasIssuePermissionJiraCondition
- | HasProjectPermissionJiraCondition
- | HasSelectedProjectPermissionJiraCondition
- | HasSubTasksAvaliableJiraCondition
- | HasVotedForIssueJiraCondition
- | IsAdminModeJiraCondition
- | IsIssueAssignedToCurrentUserJiraCondition
- | IsIssueEditableJiraCondition
- | IsIssueReportedByCurrentUserJiraCondition
- | IsIssueUnresolvedJiraCondition
- | IsSubTaskJiraCondition
- | IsWatchingIssueJiraCondition
- | LinkingEnabledJiraCondition
- | SubTasksEnabledJiraCondition
- | TimeTrackingEnabledJiraCondition
- | UserHasIssueHistoryJiraCondition
- | UserIsAdminJiraCondition
- | UserIsLoggedInJiraCondition
- | UserIsProjectAdminJiraCondition
- | UserIsSysadminJiraCondition
- | UserIsTheLoggedInUserJiraCondition
- | VotingEnabledJiraCondition
- | WatchingEnabledJiraCondition
- staticJiraCondition :: JIRACondition -> Condition
- data ConfluenceCondition
- = ActiveThemeConfluenceCondition
- | CanEditSpaceStylesConfluenceCondition
- | CanSignupConfluenceCondition
- | ContentHasAnyPermissionsSetConfluenceCondition
- | CreateContentConfluenceCondition
- | EmailAddressPublicConfluenceCondition
- | FavouritePageConfluenceCondition
- | FavouriteSpaceConfluenceCondition
- | FeatureFlagConfluenceCondition
- | FollowingTargetUserConfluenceCondition
- | HasAttachmentConfluenceCondition
- | HasBlogPostConfluenceCondition
- | HasPageConfluenceCondition
- | HasSpaceConfluenceCondition
- | HasTemplateConfluenceCondition
- | LatestVersionConfluenceCondition
- | NotPersonalSpaceConfluenceCondition
- | PrintableVersionConfluenceCondition
- | ShowingPageAttachmentsConfluenceCondition
- | SpaceFunctionPermissionConfluenceCondition
- | SpaceSidebarConfluenceCondition
- | TargetUserCanSetStatusConfluenceCondition
- | TargetUserHasPersonalBlogConfluenceCondition
- | TargetUserHasPersonalSpaceConfluenceCondition
- | ThreadedCommentsConfluenceCondition
- | TinyUrlSupportedConfluenceCondition
- | UserCanCreatePersonalSpaceConfluenceCondition
- | UserCanUpdateUserStatusConfluenceCondition
- | UserCanUseConfluenceConfluenceCondition
- | UserFavouritingTargetUserPersonalSpaceConfluenceCondition
- | UserHasPersonalBlogConfluenceCondition
- | UserHasPersonalSpaceConfluenceCondition
- | UserIsAdminConfluenceCondition
- | UserIsConfluenceAdministratorConfluenceCondition
- | UserIsLoggedInConfluenceCondition
- | UserIsSysadminConfluenceCondition
- | UserLoggedInEditableConfluenceCondition
- | UserWatchingPageConfluenceCondition
- | UserWatchingSpaceConfluenceCondition
- | UserWatchingSpaceForContentTypeConfluenceCondition
- | ViewingContentConfluenceCondition
- | ViewingOwnProfileConfluenceCondition
- staticConfluenceCondition :: ConfluenceCondition -> Condition
- invertCondition :: Condition -> Condition
- data ProductScope
- = Read
- | Write
- | Delete
- | ProjectAdmin
- | SpaceAdmin
- | Admin
Atlassian Connect Add-on Descriptor
A Plugin
is the end result of an Atlassian Connect descriptor. It is what you should provide to the Atlassian
Marketplace in order to register your plugin and it is what your Atlassian Cloud customers will download to install
your Add-on via the Atlassian UPM (Universal Plugin Manager). Only a very small number of fields are strictly required
to generate a valid Atlassian Connect plugin descriptor. Everything that is optional is marked by a maybe type.
Even though we provide documentation here you shoucd check the Atlassian Connect Descriptor documentation if you want to get accurate information on the contents of a plugin: https://developer.atlassian.com/static/connect/docs/modules/
Plugin | |
|
:: PluginKey | The key for your add-on. |
-> URI | The base url for your add-on. |
-> Authentication | The authentication that your add-on requires. |
-> Plugin | A bare-bones Atlassian Connect descriptor. |
A helper method to generate a bare-bones Atlassian Connect add-on by providing only the absolutely required fields. You can then use Haskell record syntax to update the plugin with more details. For example:
(pluginDescriptor (PluginKey . pack $ "com.company.mycoolplugin") (fromJust . parseURI $ "http://mycoolplugin.company.com") (Authentication Jwt)) { pluginName = Just . Name . pack $ "My Cool Plugin" , pluginDescription = Just . pack $ "Chil and be cool, you have a plugin descriptor." }
Basic Types
This data type represents a Key for a particular data type.
Key t |
This data type represents an Atlassian Connect Add-on key.
Represents a timeout in seconds.
Represents the Vendor of the add-on; which will be you. Put your details in this structure.
data Authentication Source
If your Atlassian Connect addon wants to perform any server side communication with the host product then you will need to use authentication. Otherwise you should specify that you don't need authentication.
The authentication type that you wish to use in your Add-on.
data IconDetails Source
Represents an arbitrary icon. Potentially for an Atlassian Connect module or for the entire add-on itself.
Atlassian Connect descriptors contain many names: module names, add-on names, vendor names etc. We want to make sure that these names don't get put in places that they do not belong. Or, if they do get moved around, they get moved around specifically. We are just adding type saefty to names.
Represents a standard text type in the descriptor than may be Internationalised in the future. However, currently there is no I18n support: http://goo.gl/9vJEsW
simpleText :: Text -> I18nText Source
Since there is currently no I18n support (http://goo.gl/9vJEsW) we have this helper method to quickly create an I18nText
from a standard
Text
object.
This represents a URL wrapped as an object instead of as a plain text element.
A basic length type for HTML elements. Useful for WebPanel
s and other modules that may require length specifications.
Pixels Integer | Specify a length in pixels |
Percentage Integer | Specify a length as a percentage in the range [0-100]. |
type ModuleParams = HashMap Text Text Source
The standard representation for module parameters.
noParams :: ModuleParams Source
No parameters. A useful helper when you don't want to pass any parameters to a module.
Lifecycle
Every Atlassian Connect add-on can be installed, uninstalled, enabled and disabled. These are known as Lifecycle
events. These events will fire on each and every Cloud instance that your add-on is installed on. You can request in
your Atlassian Connect add-on descriptor to be alerted of lifecycle events. When the event fires, if you have
requested it, you will be given the details of the event in a JSON blob by the host application.
The lifecycle events are documented fully in the Atlassian Connect documentation: https://developer.atlassian.com/static/connect/docs/modules/lifecycle.html
It is important to note that the installed event is particularily important to any Atlassian Connect add-on that
needs to use Jwt
auth tokens because the installed handler will come with the shared secret for your add-on on
that particular instance.
Lifecycle | |
|
emptyLifecycle :: Lifecycle Source
The empty Lifecycle
allowing you to specify exactly which events you wish to handle with Haskell record syntax.
Add-on Modules
Modules
are perhaps the most important part of your Atlassian Connect descriptor. They specify which parts of the
host application you wish to inject content into. They provide your entry point into the host application.
Atlassian Connect provides a large set of pre-defined entry points into the host application. Some of which are common to every application and some of which are unique to the particular application that you are targeting:
- To see the JIRA modules: https://developer.atlassian.com/static/connect/docs/modules/jira/index.html
- To see the Confluence modules: https://developer.atlassian.com/static/connect/docs/modules/confluence/index.html
Note: One important point about modules: they must all have a key and that key must be unique inside the same Atlassian Connect addon.
Modules | |
|
data JIRAModules Source
A collection of all of the JIRA Modules that you can define. For more documentation on which Modules are supported
the Atlassian Connect framework please see Modules
. You can also find more documentation on each of the modules.
emptyJIRAModules :: JIRAModules Source
Empty JIRA Modules; useful when you only want to define a few modules via Haskell record syntax.
data ConfluenceModules Source
A collection of all of the Confluence Modules that you can define. For more documentation on which Modules are supported
the Atlassian Connect framework please see Modules
. You can also find more documentation on each of the modules.
emptyConfluenceModules :: ConfluenceModules Source
Empty Confluence Modules; useful when you only want to define a few modules via Haskell record syntax.
Web Sections, Items and Panels
data JIRAWebSection Source
A JIRAWebSection
represents a location in the host application that you can add WebItem
s to. In this way you
can give your add-on sections to inject content into.
For more information read the Atlassian Connect documentation: https://developer.atlassian.com/static/connect/docs/modules/jira/web-section.html
JIRAWebSection | |
|
A WebItem
is a like that can be placed in one of an Atlassian Products many menus. Currently the WebItem has the
same structure for both JIRA and Confluence. You can read their documentation here:
- JIRA Web Items: https://developer.atlassian.com/static/connect/docs/modules/jira/web-item.html
- Confluence Web Items: https://developer.atlassian.com/static/connect/docs/modules/confluence/web-item.html
Web items are very useful for providing links to your Atlassian Connect pages. See GeneralPage
or AdminPage
for
more information.
WebItem | |
|
data WebItemContext Source
Wether to open the url relative to the current page, the current addon or the current product. This lets you control where Atlassian Connect web items point to.
A WebPanel
is an injectable segment of the host application that you can place content inside. Currently the
WebPanel has the same structure for both JIRA and Confluence but, potentially, that could change in the future.
You can read their Atlassian Connect documentation here:
- JIRA Web panels: https://developer.atlassian.com/static/connect/docs/modules/jira/web-panel.html
- Confluence Web panels: https://developer.atlassian.com/static/connect/docs/modules/confluence/web-panel.html
Here is what an example Hello World web panel might look like:
helloWorldWebPanel = WebPanel { wpKey = "hello-world" , wpName = Name "Hello world!" , wpUrl = "/panel/show-hello-world" , wpLocation = "atl.jira.view.issue.right.context" , wpConditions = [staticJiraCondition UserIsLoggedInJiraCondition] } where toURI = fromJust . parseRelativeReference
WebPanels are a great way to inject your add-on's content into the host application.
WebPanel | |
|
data WebPanelLayout Source
A WebPanelLayout
allows you to specify the dimensions of your Web Panel if that is required.
JIRA Pages
A JIRAPage
is gives you a location in the host product that you addon can present content and behave just like any
other host product page. The main types of pages in JIRA are:
- General pages: for just getting a geniric chunk of realestate to display your content.
- Admin pages: for getting a page in the admin seciton of JIRA to display your content.
- Configuration page: Every Atlassian Connect plugin can have a configuration page to configure the plugin when installed.
This is very useful for pages like Configuration screens or Statistics pages where you really want the user to be immersed in working with your add-on inside the host product.
General pages, like Web Panels, are common to JIRA and Confluence and share the same json format. However they have separate documentation:
- JIRA General Page: https://developer.atlassian.com/static/connect/docs/modules/jira/general-page.html
- Confluence General Page: https://developer.atlassian.com/static/connect/docs/modules/confluence/general-page.html
Even though, at this point in time, the documentation looks identical. You can find the Admin page and Configure page documentation in the official Atlassian Connect documentation too.
JIRAPage | |
|
JIRA Tab Panels
data JIRAGenericTabPanel Source
JIRA has the concept of a TabPanel which is a panel where you can inject content along with a WebItem
that is
automatically created for you so that you can navigate to the tab panel in question. Tab panels often have a common format
and this JIRAGenericTabPanel
encapsulates that common format and allows you to apply it to many different scenarios.
JIRAGenericTabPanel | |
|
data JIRAProjectAdminTabPanel Source
A JIRAProjectAdminTabPanel
is useful for when you want to add a page to the administration screens of a project.
This module will create a web item in the sidebar of every project for you and provide a web panel in the JIRA Project
Admin section.
JIRAProjectAdminTabPanel | |
|
JIRA Specific Modules
data JIRASearchRequestView Source
A Search Request View allows you to render a custom representation of a search result. Rendering a custom XML format is a common example.
For more information read the Atlassian Connect documentation: https://developer.atlassian.com/static/connect/docs/modules/jira/search-request-view.html
JIRASearchRequestView | |
|
data JIRAReport Source
A JIRAReport
will provide a report on the JIRA issues in the project. It allows you to write custom reporting
for JIRA.
For more information read the Atlassian Connect documentation: https://developer.atlassian.com/static/connect/docs/modules/jira/report.html
JIRAReport | |
|
data JIRAReportCategory Source
The report category for a JIRAReport
. Useful in organising the different types of reports.
AgileRC | This report is visible to agile customers. |
IssueAnalysisRC | This report does issue analysis. |
ForecastManagementRC | This report considers future of the project state. |
OtherRC | Any report that does not fit into the other categories goes here. |
A Target
represents the location that a link will be opened into.
TargetPage | Open the link into the current page. |
TargetDialog (Maybe DialogOptions) | Open the link into a dialog on the page with the given options. |
TargetInlineDialog (Maybe InlineDialogOptions) | Open the link into an inline dialog with the given options. |
data JIRAWorkflowPostFunction Source
A JIRAWorkflowPostFunction
carries out any additional processing required after a JIRA workflow transition is executed.
For more information read the Atlassian Connect documentation: https://developer.atlassian.com/static/connect/docs/modules/jira/workflow-post-function.html
Or you could read the JIRA documentation on Workflow Post Functions to learn more: https://confluence.atlassian.com/display/Cloud/Advanced+Workflow+Configuration#AdvancedWorkflowConfiguration-postfunctions
JIRAWorkflowPostFunction | |
|
data InlineDialogOptions Source
Options for an inline dialog that a link may be opened into.
InlineDialogOptions | |
|
data JIRAEntityProperties Source
JIRAEntityProperties
are used to set Key / Value pair information on JIRA Issues that can be searched via JQL and
are indexed by JIRA. The can also be accessed directly via rest api so they allow you to store data in client-only
Atlassian Connect plugins. Very handy!
The data stored as entity properties is in the JSON data format so multiple values can be stored against the one property.
For more information read the JIRA Documentation on the topic: https://developer.atlassian.com/display/JIRADEV/JIRA+Entity+Properties+Overview
Or read the Atlassian Connect documentation on the topic: https://developer.atlassian.com/static/connect/docs/modules/jira/entity-property.html
JIRAEntityProperties | |
|
data EntityType Source
An EntityType
represents the type of entity that the JIRA Entity Property should be attatched to. By default
entity types are attatched to issues.
data KeyConfiguration Source
A KeyConfiguration
is the key for this particular property and the JSON flattened paths to the elements that
should be extracted from this property. For more information see the Atlassian Connect documentation:
https://developer.atlassian.com/static/connect/docs/modules/fragment/index-key-configuration.html
KeyConfiguration | |
|
data Extraction Source
An Extraction
represents a snippet of data that should be extracted from a KeyConfiguration
such that it is
Indexed by JIRA and capable of being searched in JQL.
data ExtractionType Source
The style in which the data should be extracted and indexed. For example, you may want the data to be treated as a Date or as a Number.
ExtractionTypeNumber | Index the data as a numeric type. |
ExtractionTypeText | Index the data as a text based type, with words. |
ExtractionTypeString | Index the data as an exact string. |
ExtractionTypeDate | Index the data as a Date. |
Webhooks
When users of the host application perform updates your Atlassian Connect add-on will not be alerted unless
it listens to the WebhookEvent
s coming from that application. Webhooks are the way to close the issue recency loop
in the Atlassian products. It is important to note that Webhooks are 'best effort' and that there is no guarantee
that the webhook will make it to your Atlassian Connect application.
The Atlassian connect webhook documentation explains this in more detail: https://developer.atlassian.com/static/connect/docs/modules/jira/webhook.html
Webhook | |
|
data WebhookEvent Source
The webhook event that you wish to watch from your Atlassian Connect add-on.
Module Conditions
A Condition
can be placed on an Atlassian Connect Module to cause it to display or not based on the result it
returns. For example, you can choose not to show a WebPanel if the user viewing the page is not logged in. Conditions
are very useful in curating when your modules will appear to your users.
The Atlassian Connect documentation describes conditions fully: https://developer.atlassian.com/static/connect/docs/concepts/conditions.html
SingleCondition | A single condition based on a source. |
| |
CompositeCondition | A condition that is the composition of one or more conditions. The |
|
data ConditionType Source
Composite Conditions can be joined together to behave as a single condition. The way that you can join them together is decided by the condition type.
AndCondition | The boolean intersection of the conditions. |
OrCondition | The boolean union of the conditions. |
data ConditionSource Source
Conditions can be specified by the Host application or by the Atlassian Connect add-on itself. This means that the source of the condition needs to be specified and that is what you can use this data type to do.
StaticJIRACondition JIRACondition | A static JIRA condition. |
StaticConfluenceCondition ConfluenceCondition | A static Confluence condition. |
RemoteCondition | A remote condition defined by your Atlassian Connect application. |
|
remoteCondition :: String -> Condition Source
Given a URI that defines a remote condition convert it into a regular Condition
.
data JIRACondition Source
The conditions that have been provided by JIRA. Please see the single condition documentation for more details: https://developer.atlassian.com/static/connect/docs/modules/fragment/single-condition.html
staticJiraCondition :: JIRACondition -> Condition Source
Turn a standard JIRA Condition into a regular Condition
.
data ConfluenceCondition Source
The conditions that have been provided by Confluence. Please see the single condition documentation for more details: https://developer.atlassian.com/static/connect/docs/modules/fragment/single-condition.html
staticConfluenceCondition :: ConfluenceCondition -> Condition Source
Turn a standard Confluence Condition into a regular Condition
.
invertCondition :: Condition -> Condition Source
Invert the given condition.
Scopes (Permissions)
data ProductScope Source
Scopes are an Atlassian Connect concept that declare how much access your addon requires to any give Cloud instance. These scopes can be thought of as permissions are are well documented: https://developer.atlassian.com/static/connect/docs/scopes/scopes.html
It is important to note that these scopes only give you restricted access to certain REST resources. You can not query any REST url as you would with an Atlassian Server plugin. The restricted set of REST resources per application can be found in the Atlassian Connect documentation.
Read | The read scope means that you can pull data from the Cloud application. |
Write | The write scope gives you the same access as a regular user of the Atlassian connect application. |
Delete | The delete scope is required if you want to perform potentially destructive operations on data. |
ProjectAdmin | A JIRA specific scope. Lets your add-on administer a project in JIRA. |
SpaceAdmin | A Confluence specific scope. Lets your add-on administer a space in Confluence. |
Admin | Gives your Atlassian Connect add-on administrative rights to the Cloud instance. (But NOT system administrator permission. Happily you cannot request that level of access.) |