-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utilities for generating JSON-API payloads -- -- Provides utilities for deriving JSON payloads conformant to the -- json-api specification @package json-api-lib @version 0.2.1.0 -- | Module representing a JSON-API link object. -- -- Specification: http://jsonapi.org/format/#document-links module Network.JSONApi.Link -- | Type representing a JSON-API link object. -- -- Links are an abstraction around an underlying Map consisting of -- relevance identifiers as keys and URIs as values. -- -- Example JSON: "links": { "self": -- "http://example.com/posts/1" } -- -- Specification: http://jsonapi.org/format/#document-links data Links type Rel = Text type Href = Text -- | Constructor function for building Links mkLinks :: [(Rel, Text)] -> Links instance GHC.Generics.Generic Network.JSONApi.Link.Links instance Data.Aeson.Types.FromJSON.FromJSON Network.JSONApi.Link.Links instance Data.Aeson.Types.ToJSON.ToJSON Network.JSONApi.Link.Links instance GHC.Classes.Ord Network.JSONApi.Link.Links instance GHC.Classes.Eq Network.JSONApi.Link.Links instance GHC.Show.Show Network.JSONApi.Link.Links instance Control.DeepSeq.NFData Network.JSONApi.Link.Links -- | Module representing a JSON-API meta object. -- -- Specification: http://jsonapi.org/format/#document-meta module Network.JSONApi.Meta -- | Type representing a JSON-API meta object. -- -- Meta is an abstraction around an underlying Map consisting of -- resource-specific metadata. -- -- Example JSON: "meta": { "copyright": "Copyright 2015 Example -- Corp.", "authors": [ "Andre Dawson", "Kirby Puckett", "Don Mattingly", -- "Ozzie Guillen" ] } -- -- Specification: http://jsonapi.org/format/#document-meta data Meta -- | Convienience class for constructing a Meta type -- -- Example usage: @ data Pagination = Pagination { currentPage :: Int , -- totalPages :: Int } deriving (Show, Generic) -- -- instance ToJSON Pagination instance MetaObject Pagination where -- typeName _ = "pagination" @ class (ToJSON a) => MetaObject a typeName :: MetaObject a => a -> Text -- | Convienience constructor function for the Meta type -- -- Useful on its own or in combination with Meta's monoid instance -- -- Example usage: See MetaSpec.hs for an example mkMeta :: MetaObject a => a -> Meta instance GHC.Generics.Generic Network.JSONApi.Meta.Meta instance GHC.Classes.Eq Network.JSONApi.Meta.Meta instance GHC.Show.Show Network.JSONApi.Meta.Meta instance Data.Aeson.Types.ToJSON.ToJSON Network.JSONApi.Meta.Meta instance Data.Aeson.Types.FromJSON.FromJSON Network.JSONApi.Meta.Meta instance Control.DeepSeq.NFData Network.JSONApi.Meta.Meta -- | Module representing a JSON-API resource object. -- -- Specification: -- http://jsonapi.org/format/#document-resource-objects module Network.JSONApi.Identifier -- | Typeclass indicating how to access an Identifier for a given -- datatype class HasIdentifier a identifier :: HasIdentifier a => a -> Identifier -- | Identifiers are used to encapsulate the minimum amount of information -- to uniquely identify a resource. -- -- This object will be found at multiple levels of the JSON-API structure -- -- Specification: -- http://jsonapi.org/format/#document-resource-identifier-objects data Identifier Identifier :: Text -> Text -> Maybe Meta -> Identifier [_ident] :: Identifier -> Text [_datatype] :: Identifier -> Text [_metadata] :: Identifier -> Maybe Meta datatype :: Lens' Identifier Text ident :: Lens' Identifier Text metadata :: Lens' Identifier (Maybe Meta) instance GHC.Generics.Generic Network.JSONApi.Identifier.Identifier instance GHC.Classes.Eq Network.JSONApi.Identifier.Identifier instance GHC.Show.Show Network.JSONApi.Identifier.Identifier instance Data.Aeson.Types.ToJSON.ToJSON Network.JSONApi.Identifier.Identifier instance Data.Aeson.Types.FromJSON.FromJSON Network.JSONApi.Identifier.Identifier instance Control.DeepSeq.NFData Network.JSONApi.Identifier.Identifier -- | Module representing a JSON-API error object. -- -- Error objects are used for providing application-specific detail to -- unsuccessful API responses. -- -- Specification: http://jsonapi.org/format/#error-objects module Network.JSONApi.Error -- | Type for providing application-specific detail to unsuccessful API -- responses. -- -- Specification: http://jsonapi.org/format/#error-objects data Error a Error :: Maybe Text -> Maybe Links -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Meta -> Error a [id] :: Error a -> Maybe Text [links] :: Error a -> Maybe Links [status] :: Error a -> Maybe Text [code] :: Error a -> Maybe Text [title] :: Error a -> Maybe Text [detail] :: Error a -> Maybe Text [meta] :: Error a -> Maybe Meta instance GHC.Generics.Generic (Network.JSONApi.Error.Error a) instance GHC.Classes.Eq (Network.JSONApi.Error.Error a) instance GHC.Show.Show (Network.JSONApi.Error.Error a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Network.JSONApi.Error.Error a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Network.JSONApi.Error.Error a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Network.JSONApi.Error.Error a) instance Data.Default.Class.Default (Network.JSONApi.Error.Error a) module Network.JSONApi.Pagination -- | Wrapper type for the various components of pagination being page size, -- page number and the number of resources in total. data Pagination Pagination :: PageSize -> PageNum -> ResourceCount -> Pagination [getPaginationPageSize] :: Pagination -> PageSize [getPaginationPageNum] :: Pagination -> PageNum [getPaginationResourceCount] :: Pagination -> ResourceCount newtype PageNum PageNum :: Int -> PageNum [getPageNum] :: PageNum -> Int -- | We can specify limits on the number of rows we would like back from -- the database newtype PageSize PageSize :: Int -> PageSize [getPageSize] :: PageSize -> Int newtype ResourceCount ResourceCount :: Int -> ResourceCount [getResourceCount] :: ResourceCount -> Int instance GHC.Generics.Generic Network.JSONApi.Pagination.Pagination instance GHC.Classes.Eq Network.JSONApi.Pagination.Pagination instance GHC.Show.Show Network.JSONApi.Pagination.ResourceCount instance GHC.Generics.Generic Network.JSONApi.Pagination.ResourceCount instance GHC.Classes.Eq Network.JSONApi.Pagination.ResourceCount instance GHC.Show.Show Network.JSONApi.Pagination.PageNum instance GHC.Generics.Generic Network.JSONApi.Pagination.PageNum instance GHC.Classes.Eq Network.JSONApi.Pagination.PageNum instance GHC.Show.Show Network.JSONApi.Pagination.PageSize instance GHC.Generics.Generic Network.JSONApi.Pagination.PageSize instance GHC.Classes.Eq Network.JSONApi.Pagination.PageSize instance Data.Aeson.Types.ToJSON.ToJSON Network.JSONApi.Pagination.Pagination instance Control.DeepSeq.NFData Network.JSONApi.Pagination.Pagination instance Network.JSONApi.Meta.MetaObject Network.JSONApi.Pagination.Pagination instance Control.DeepSeq.NFData Network.JSONApi.Pagination.ResourceCount instance Control.DeepSeq.NFData Network.JSONApi.Pagination.PageNum instance Control.DeepSeq.NFData Network.JSONApi.Pagination.PageSize -- | Module representing a JSON-API resource object. -- -- Specification: -- http://jsonapi.org/format/#document-resource-objects module Network.JSONApi.Resource -- | Type representing a JSON-API resource object. -- -- A Resource supplies standardized data and metadata about a resource. -- -- Specification: -- http://jsonapi.org/format/#document-resource-objects data Resource a Resource :: Identifier -> a -> Maybe Links -> Maybe Relationships -> Resource a [getIdentifier] :: Resource a -> Identifier [getResource] :: Resource a -> a [getLinks] :: Resource a -> Maybe Links [getRelationships] :: Resource a -> Maybe Relationships data Relationships -- | A typeclass for decorating an entity with JSON API properties class (ToJSON a, FromJSON a) => ResourcefulEntity a resourceIdentifier :: ResourcefulEntity a => a -> Text resourceType :: ResourcefulEntity a => a -> Text resourceLinks :: ResourcefulEntity a => a -> Maybe Links resourceMetaData :: ResourcefulEntity a => a -> Maybe Meta resourceRelationships :: ResourcefulEntity a => a -> Maybe Relationships fromResource :: ResourcefulEntity a => Resource a -> a toResource :: ResourcefulEntity a => a -> Resource a -- | A type representing the Relationship between 2 entities -- -- A Relationship provides basic information for fetching further -- information about a related resource. -- -- Specification: -- http://jsonapi.org/format/#document-resource-object-relationships data Relationship -- | Helper function to beuild relative links for a collection of resources -- of type ResourceEntity. -- -- This helper function assumes that the first page is always page 0. indexLinks :: Text -> Pagination -> Links -- | Constructor function for creating a Relationship record -- -- A relationship must contain either an Identifier or a Links record mkRelationship :: Maybe Identifier -> Maybe Links -> Maybe Relationship mkRelationships :: Relationship -> Relationships -- | Helper function to build relative links for a single resource of type -- ResourceEntity showLink :: ResourcefulEntity e => e -> Links instance GHC.Generics.Generic (Network.JSONApi.Resource.Resource a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Network.JSONApi.Resource.Resource a) instance GHC.Show.Show a => GHC.Show.Show (Network.JSONApi.Resource.Resource a) instance GHC.Generics.Generic Network.JSONApi.Resource.Relationships instance GHC.Classes.Eq Network.JSONApi.Resource.Relationships instance GHC.Show.Show Network.JSONApi.Resource.Relationships instance GHC.Generics.Generic Network.JSONApi.Resource.Relationship instance GHC.Classes.Eq Network.JSONApi.Resource.Relationship instance GHC.Show.Show Network.JSONApi.Resource.Relationship instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Network.JSONApi.Resource.Resource a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Network.JSONApi.Resource.Resource a) instance Network.JSONApi.Identifier.HasIdentifier (Network.JSONApi.Resource.Resource a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Network.JSONApi.Resource.Resource a) instance Data.Aeson.Types.ToJSON.ToJSON Network.JSONApi.Resource.Relationships instance Data.Aeson.Types.FromJSON.FromJSON Network.JSONApi.Resource.Relationships instance Control.DeepSeq.NFData Network.JSONApi.Resource.Relationships instance Data.Aeson.Types.ToJSON.ToJSON Network.JSONApi.Resource.Relationship instance Data.Aeson.Types.FromJSON.FromJSON Network.JSONApi.Resource.Relationship instance Control.DeepSeq.NFData Network.JSONApi.Resource.Relationship -- | Contains representations of the top-level JSON-API document structure. module Network.JSONApi.Document -- | The Document type represents the top-level JSON-API -- requirement. -- -- data attribute - the resulting JSON may be either a singleton -- resource or a list of resources. See Resource for the -- construction. -- -- For more information see: -- http://jsonapi.org/format/#document-top-level data Document a Document :: ResourceData a -> Maybe Links -> Maybe Meta -> [Value] -> Document a [_data] :: Document a -> ResourceData a [_links] :: Document a -> Maybe Links [_meta] :: Document a -> Maybe Meta [_included] :: Document a -> [Value] -- | The Resource type encapsulates the underlying Resource -- -- Included in the top-level Document, the Resource may be -- either a singleton resource or a list. -- -- For more information see: -- http://jsonapi.org/format/#document-top-level data ResourceData a Singleton :: Resource a -> ResourceData a List :: [Resource a] -> ResourceData a -- | The ErrorDocument type represents the alternative form of the -- top-level JSON-API requirement. -- -- error attribute - a descriptive object encapsulating -- application-specific error detail. -- -- For more information see: http://jsonapi.org/format/#errors data ErrorDocument a ErrorDocument :: Error a -> Maybe Links -> Maybe Meta -> ErrorDocument a [_error] :: ErrorDocument a -> Error a [_errorLinks] :: ErrorDocument a -> Maybe Links [_errorMeta] :: ErrorDocument a -> Maybe Meta -- | The Included type is an abstraction used to constrain the -- included section of the Document to JSON serializable -- Resource objects while enabling a heterogeneous list of Resource -- types. -- -- No data constructors for this type are exported as we need to -- constrain the Value to a heterogeneous list of Resource types. -- See mkIncludedResource for creating Included types. data Included -- | Constructor function for the Document data type which takes a single -- ResourcefulEntity. -- -- See mkCompoundDocument for constructing compound Document -- including 'side-loaded' resources mkDocument :: ResourcefulEntity a => a -> Maybe Links -> Maybe Meta -> Document a -- | Constructor function for the Document data type which takes a list of -- Resourceful entities. -- -- See mkCompoundDocument for constructing compound Document -- including 'side-loaded' resources mkDocuments :: ResourcefulEntity a => [a] -> Maybe Links -> Maybe Meta -> Document a mkDocument' :: ResourceData a -> Maybe Links -> Maybe Meta -> Document a -- | A function for a single resourceful entity and document which do not -- require links or Meta data. mkSimpleDocument :: ResourcefulEntity a => a -> Document a -- | A function for a multiple resourceful entities and document which do -- not require links or Meta data. mkSimpleDocuments :: ResourcefulEntity a => [a] -> Document a -- | A function for document which do not require links or Meta data. mkSimpleDocument' :: ResourceData a -> Document a singleton :: ResourcefulEntity a => a -> ResourceData a list :: ResourcefulEntity a => [a] -> ResourceData a -- | Constructor function for the Document data type. See -- mkIncludedResource for constructing the Included type. -- -- Supports building compound documents -- http://jsonapi.org/format/#document-compound-documents mkCompoundDocument :: ResourcefulEntity a => a -> Maybe Links -> Maybe Meta -> Included -> Document a -- | Constructor function for the Document data type. See -- mkIncludedResource for constructing the Included type. -- -- Supports building compound documents -- http://jsonapi.org/format/#document-compound-documents mkCompoundDocuments :: ResourcefulEntity a => [a] -> Maybe Links -> Maybe Meta -> Included -> Document a mkCompoundDocument' :: ResourceData a -> Maybe Links -> Maybe Meta -> Included -> Document a -- | Constructor function for the Document data type. -- -- Supports building compound documents -- http://jsonapi.org/format/#document-compound-documents mkIncludedResource :: ResourcefulEntity a => a -> Included instance GHC.Generics.Generic (Network.JSONApi.Document.ErrorDocument a) instance GHC.Classes.Eq (Network.JSONApi.Document.ErrorDocument a) instance GHC.Show.Show (Network.JSONApi.Document.ErrorDocument a) instance GHC.Generics.Generic (Network.JSONApi.Document.Document a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Network.JSONApi.Document.Document a) instance GHC.Show.Show a => GHC.Show.Show (Network.JSONApi.Document.Document a) instance GHC.Generics.Generic (Network.JSONApi.Document.ResourceData a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Network.JSONApi.Document.ResourceData a) instance GHC.Show.Show a => GHC.Show.Show (Network.JSONApi.Document.ResourceData a) instance GHC.Show.Show Network.JSONApi.Document.Included instance GHC.Generics.Generic Network.JSONApi.Document.Included instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Network.JSONApi.Document.ErrorDocument a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Network.JSONApi.Document.ErrorDocument a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Network.JSONApi.Document.ErrorDocument a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Network.JSONApi.Document.Document a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Network.JSONApi.Document.Document a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Network.JSONApi.Document.Document a) instance Data.Aeson.Types.ToJSON.ToJSON a => Data.Aeson.Types.ToJSON.ToJSON (Network.JSONApi.Document.ResourceData a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Network.JSONApi.Document.ResourceData a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Network.JSONApi.Document.ResourceData a) instance Control.DeepSeq.NFData Network.JSONApi.Document.Included -- | Entry-point module for this package. module Network.JSONApi -- | The Document type represents the top-level JSON-API -- requirement. -- -- data attribute - the resulting JSON may be either a singleton -- resource or a list of resources. See Resource for the -- construction. -- -- For more information see: -- http://jsonapi.org/format/#document-top-level data Document a -- | The Resource type encapsulates the underlying Resource -- -- Included in the top-level Document, the Resource may be -- either a singleton resource or a list. -- -- For more information see: -- http://jsonapi.org/format/#document-top-level data ResourceData a Singleton :: Resource a -> ResourceData a List :: [Resource a] -> ResourceData a -- | The ErrorDocument type represents the alternative form of the -- top-level JSON-API requirement. -- -- error attribute - a descriptive object encapsulating -- application-specific error detail. -- -- For more information see: http://jsonapi.org/format/#errors data ErrorDocument a ErrorDocument :: Error a -> Maybe Links -> Maybe Meta -> ErrorDocument a [_error] :: ErrorDocument a -> Error a [_errorLinks] :: ErrorDocument a -> Maybe Links [_errorMeta] :: ErrorDocument a -> Maybe Meta -- | The Included type is an abstraction used to constrain the -- included section of the Document to JSON serializable -- Resource objects while enabling a heterogeneous list of Resource -- types. -- -- No data constructors for this type are exported as we need to -- constrain the Value to a heterogeneous list of Resource types. -- See mkIncludedResource for creating Included types. data Included -- | Type for providing application-specific detail to unsuccessful API -- responses. -- -- Specification: http://jsonapi.org/format/#error-objects data Error a Error :: Maybe Text -> Maybe Links -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Meta -> Error a [id] :: Error a -> Maybe Text [links] :: Error a -> Maybe Links [status] :: Error a -> Maybe Text [code] :: Error a -> Maybe Text [title] :: Error a -> Maybe Text [detail] :: Error a -> Maybe Text [meta] :: Error a -> Maybe Meta -- | A type representing the Relationship between 2 entities -- -- A Relationship provides basic information for fetching further -- information about a related resource. -- -- Specification: -- http://jsonapi.org/format/#document-resource-object-relationships data Relationship -- | Type representing a JSON-API resource object. -- -- A Resource supplies standardized data and metadata about a resource. -- -- Specification: -- http://jsonapi.org/format/#document-resource-objects data Resource a Resource :: Identifier -> a -> Maybe Links -> Maybe Relationships -> Resource a [getIdentifier] :: Resource a -> Identifier [getResource] :: Resource a -> a [getLinks] :: Resource a -> Maybe Links [getRelationships] :: Resource a -> Maybe Relationships data Relationships -- | A typeclass for decorating an entity with JSON API properties class (ToJSON a, FromJSON a) => ResourcefulEntity a resourceIdentifier :: ResourcefulEntity a => a -> Text resourceType :: ResourcefulEntity a => a -> Text resourceLinks :: ResourcefulEntity a => a -> Maybe Links resourceMetaData :: ResourcefulEntity a => a -> Maybe Meta resourceRelationships :: ResourcefulEntity a => a -> Maybe Relationships fromResource :: ResourcefulEntity a => Resource a -> a toResource :: ResourcefulEntity a => a -> Resource a -- | Typeclass indicating how to access an Identifier for a given -- datatype class HasIdentifier a identifier :: HasIdentifier a => a -> Identifier -- | Identifiers are used to encapsulate the minimum amount of information -- to uniquely identify a resource. -- -- This object will be found at multiple levels of the JSON-API structure -- -- Specification: -- http://jsonapi.org/format/#document-resource-identifier-objects data Identifier Identifier :: Text -> Text -> Maybe Meta -> Identifier [_ident] :: Identifier -> Text [_datatype] :: Identifier -> Text [_metadata] :: Identifier -> Maybe Meta -- | Type representing a JSON-API link object. -- -- Links are an abstraction around an underlying Map consisting of -- relevance identifiers as keys and URIs as values. -- -- Example JSON: "links": { "self": -- "http://example.com/posts/1" } -- -- Specification: http://jsonapi.org/format/#document-links data Links -- | Type representing a JSON-API meta object. -- -- Meta is an abstraction around an underlying Map consisting of -- resource-specific metadata. -- -- Example JSON: "meta": { "copyright": "Copyright 2015 Example -- Corp.", "authors": [ "Andre Dawson", "Kirby Puckett", "Don Mattingly", -- "Ozzie Guillen" ] } -- -- Specification: http://jsonapi.org/format/#document-meta data Meta -- | Convienience class for constructing a Meta type -- -- Example usage: @ data Pagination = Pagination { currentPage :: Int , -- totalPages :: Int } deriving (Show, Generic) -- -- instance ToJSON Pagination instance MetaObject Pagination where -- typeName _ = "pagination" @ class (ToJSON a) => MetaObject a typeName :: MetaObject a => a -> Text -- | Constructor function for building Links mkLinks :: [(Rel, Text)] -> Links -- | Wrapper type for the various components of pagination being page size, -- page number and the number of resources in total. data Pagination Pagination :: PageSize -> PageNum -> ResourceCount -> Pagination [getPaginationPageSize] :: Pagination -> PageSize [getPaginationPageNum] :: Pagination -> PageNum [getPaginationResourceCount] :: Pagination -> ResourceCount newtype PageNum PageNum :: Int -> PageNum [getPageNum] :: PageNum -> Int -- | We can specify limits on the number of rows we would like back from -- the database newtype PageSize PageSize :: Int -> PageSize [getPageSize] :: PageSize -> Int newtype ResourceCount ResourceCount :: Int -> ResourceCount [getResourceCount] :: ResourceCount -> Int -- | Helper function to beuild relative links for a collection of resources -- of type ResourceEntity. -- -- This helper function assumes that the first page is always page 0. indexLinks :: Text -> Pagination -> Links -- | Constructor function for creating a Relationship record -- -- A relationship must contain either an Identifier or a Links record mkRelationship :: Maybe Identifier -> Maybe Links -> Maybe Relationship mkRelationships :: Relationship -> Relationships -- | Helper function to build relative links for a single resource of type -- ResourceEntity showLink :: ResourcefulEntity e => e -> Links -- | Constructor function for the Document data type which takes a single -- ResourcefulEntity. -- -- See mkCompoundDocument for constructing compound Document -- including 'side-loaded' resources mkDocument :: ResourcefulEntity a => a -> Maybe Links -> Maybe Meta -> Document a -- | Constructor function for the Document data type which takes a list of -- Resourceful entities. -- -- See mkCompoundDocument for constructing compound Document -- including 'side-loaded' resources mkDocuments :: ResourcefulEntity a => [a] -> Maybe Links -> Maybe Meta -> Document a mkDocument' :: ResourceData a -> Maybe Links -> Maybe Meta -> Document a singleton :: ResourcefulEntity a => a -> ResourceData a list :: ResourcefulEntity a => [a] -> ResourceData a -- | Constructor function for the Document data type. See -- mkIncludedResource for constructing the Included type. -- -- Supports building compound documents -- http://jsonapi.org/format/#document-compound-documents mkCompoundDocument :: ResourcefulEntity a => a -> Maybe Links -> Maybe Meta -> Included -> Document a -- | Constructor function for the Document data type. See -- mkIncludedResource for constructing the Included type. -- -- Supports building compound documents -- http://jsonapi.org/format/#document-compound-documents mkCompoundDocuments :: ResourcefulEntity a => [a] -> Maybe Links -> Maybe Meta -> Included -> Document a mkCompoundDocument' :: ResourceData a -> Maybe Links -> Maybe Meta -> Included -> Document a -- | Constructor function for the Document data type. -- -- Supports building compound documents -- http://jsonapi.org/format/#document-compound-documents mkIncludedResource :: ResourcefulEntity a => a -> Included -- | A function for a single resourceful entity and document which do not -- require links or Meta data. mkSimpleDocument :: ResourcefulEntity a => a -> Document a -- | A function for a multiple resourceful entities and document which do -- not require links or Meta data. mkSimpleDocuments :: ResourcefulEntity a => [a] -> Document a -- | A function for document which do not require links or Meta data. mkSimpleDocument' :: ResourceData a -> Document a -- | Convienience constructor function for the Meta type -- -- Useful on its own or in combination with Meta's monoid instance -- -- Example usage: See MetaSpec.hs for an example mkMeta :: MetaObject a => a -> Meta