atlassian-connect-descriptor 0.4.7.0 → 0.4.8.0
raw patch · 3 files changed
+26/−11 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Data.Connect.Descriptor: ApiMigrations :: Bool -> ApiMigrations
+ Data.Connect.Descriptor: [apiMigrations] :: Plugin -> Maybe ApiMigrations
+ Data.Connect.Descriptor: [migrationGdpr] :: ApiMigrations -> Bool
+ Data.Connect.Descriptor: data ApiMigrations
+ Data.Connect.Descriptor: instance Data.Aeson.Types.ToJSON.ToJSON Data.Connect.Descriptor.ApiMigrations
+ Data.Connect.Descriptor: instance GHC.Generics.Generic Data.Connect.Descriptor.ApiMigrations
+ Data.Connect.Descriptor: instance GHC.Show.Show Data.Connect.Descriptor.ApiMigrations
- Data.Connect.Descriptor: Plugin :: PluginKey -> URI -> Authentication -> Maybe (Name Plugin) -> Maybe Text -> Maybe Vendor -> Maybe Lifecycle -> Maybe Modules -> Maybe Text -> Maybe Bool -> HashMap Text URI -> Maybe [ProductScope] -> Plugin
+ Data.Connect.Descriptor: Plugin :: PluginKey -> URI -> Authentication -> Maybe (Name Plugin) -> Maybe Text -> Maybe Vendor -> Maybe Lifecycle -> Maybe Modules -> Maybe Text -> Maybe Bool -> HashMap Text URI -> Maybe [ProductScope] -> Maybe ApiMigrations -> Plugin
- Data.Connect.Descriptor: TargetDialog :: (Maybe DialogOptions) -> Target
+ Data.Connect.Descriptor: TargetDialog :: Maybe DialogOptions -> Target
- Data.Connect.Descriptor: TargetInlineDialog :: (Maybe InlineDialogOptions) -> Target
+ Data.Connect.Descriptor: TargetInlineDialog :: Maybe InlineDialogOptions -> Target
Files
- atlassian-connect-descriptor.cabal +11/−11
- src/Data/Connect/Descriptor.hs +13/−0
- tests/DescriptorTest.hs +2/−0
atlassian-connect-descriptor.cabal view
@@ -4,13 +4,13 @@ -- The name of the package. name: atlassian-connect-descriptor --- The package version. See the Haskell package versioning policy (PVP) +-- The package version. See the Haskell package versioning policy (PVP) -- for standards guiding when and how versions should be incremented. -- http://www.haskell.org/haskellwiki/Package_versioning_policy -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.4.7.0+version: 0.4.8.0 -- A short (one-line) description of the package. synopsis: Code that helps you create a valid Atlassian Connect Descriptor.@@ -28,18 +28,18 @@ -- The package author(s). author: Robert Massaioli --- An email address to which users can send suggestions, bug reports, and +-- An email address to which users can send suggestions, bug reports, and -- patches. maintainer: rmassaioli@atlassian.com -- A copyright notice.--- copyright: +-- copyright: category: Data build-type: Simple --- Extra files to be distributed with the package, such as examples or a +-- Extra files to be distributed with the package, such as examples or a -- README. extra-source-files: README.markdown @@ -57,7 +57,7 @@ library -- Modules exported by the library. exposed-modules: Data.Connect.Descriptor- + -- Modules included in this library but not exported. other-modules: Data.Connect.AesonHelpers , Data.Connect.BaseTypes@@ -67,10 +67,10 @@ , Data.Connect.OrphanInstances , Data.Connect.Scopes , Data.Connect.Webhooks- + -- LANGUAGE extensions used by modules in this package.- -- other-extensions: - + -- other-extensions:+ -- Other library packages from which modules are imported. build-depends: base >=4.6 && <5 , aeson > 0.7.0.3@@ -83,10 +83,10 @@ build-depends: network-uri >= 2.6, network >= 2.6 else build-depends: network-uri < 2.6, network < 2.6- + -- Directories containing source files. hs-source-dirs: src- + -- Base language which the package is written in. default-language: Haskell2010 ghc-options: -Wall
src/Data/Connect/Descriptor.hs view
@@ -105,6 +105,8 @@ , Weight , ModuleParams , noParams+ -- * Migrations+ , ApiMigrations(..) -- * Lifecycle , Lifecycle(..) , emptyLifecycle@@ -207,6 +209,7 @@ , enableLicensing :: Maybe Bool -- ^ If you are giving away a free add-on then you can set this to false, otherwise set it to true. , links :: HM.HashMap Text URI -- ^ A collection of custom links that you wish to publish with your add-on. Like documentation or bug-tracking links. , scopes :: Maybe [ProductScope] -- ^ The scopes that your add-on requires. See 'ProductScope' for more information.+ , apiMigrations :: Maybe ApiMigrations -- ^ The Migrations that this app has opted into. } deriving (Show, Generic) instance ToJSON (Name Plugin)@@ -216,6 +219,15 @@ { fieldLabelModifier = stripFieldNamePrefix "plugin" } +data ApiMigrations = ApiMigrations+ { migrationGdpr :: Bool+ } deriving (Show, Generic)++instance ToJSON ApiMigrations where+ toJSON = genericToJSON baseOptions+ { fieldLabelModifier = stripFieldNamePrefix "migration"+ }+ -- | 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: --@@ -241,4 +253,5 @@ , lifecycle = Nothing , links = HM.empty , scopes = Nothing+ , apiMigrations = Nothing }
tests/DescriptorTest.hs view
@@ -32,6 +32,7 @@ , ("source", toURI "http://bitbucket.org/awesome-devs/connect-addon") ] , scopes = Just [Read, Admin]+ , apiMigrations = Just $ ApiMigrations True } exampleModules1 :: Modules@@ -99,3 +100,4 @@ (getString =<< get "source" =<< get "links" jv) `isEqualTo` "http://bitbucket.org/awesome-devs/connect-addon" (getArray =<< get "scopes" jv) `isEqualTo` ["read", "admin"] (not <$> (getBool =<< get "enableLicensing" jv)) @? "Expected licensing to be disabled."+ (getBool =<< get "gdpr" =<< get "apiMigrations" jv) `isEqualTo` True