| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Notion.V1.Common
Contents
Description
Common Notion API types
Synopsis
- newtype UUID = UUID {}
- type BlockID = UUID
- data ObjectType
- data Parent
- = DatabaseParent {
- databaseId :: UUID
- | DataSourceParent { }
- | PageParent { }
- | BlockParent { }
- | WorkspaceParent { }
- = DatabaseParent {
- type ParentID = UUID
- data Color
- data Icon
- = EmojiIcon { }
- | FileIcon { }
- | ExternalIcon { }
- | NativeIcon { }
- | CustomEmojiIcon { }
- | FileUploadIcon {
- fileUploadId :: UUID
- data Cover
- = FileCover { }
- | ExternalCover { }
- | FileUploadCover {
- fileUploadId :: UUID
- data File = File {
- url :: Text
- expiryTime :: Maybe POSIXTime
- newtype ExternalFile = ExternalFile {}
Common types
UUID type for Notion resource IDs
Instances
| IsString UUID Source # | |
Defined in Notion.V1.Common Methods fromString :: String -> UUID # | |
| Show UUID Source # | |
| Eq UUID Source # | |
| ToHttpApiData UUID Source # | |
Defined in Notion.V1.Common Methods toUrlPiece :: UUID -> Text # toEncodedUrlPiece :: UUID -> Builder # toHeader :: UUID -> ByteString # toQueryParam :: UUID -> Text # toEncodedQueryParam :: UUID -> Builder # | |
| FromJSON UUID Source # | |
Defined in Notion.V1.Common | |
| ToJSON UUID Source # | |
data ObjectType Source #
Possible Notion object types
Instances
Parent object that can be a database, data source, page, block, or workspace
Constructors
| DatabaseParent | |
Fields
| |
| DataSourceParent | |
Fields | |
| PageParent | |
| BlockParent | |
| WorkspaceParent | |
Instances
| Generic Parent Source # | |||||
Defined in Notion.V1.Common Associated Types
| |||||
| Show Parent Source # | |||||
| FromJSON Parent Source # | |||||
Defined in Notion.V1.Common | |||||
| ToJSON Parent Source # | |||||
| type Rep Parent Source # | |||||
Defined in Notion.V1.Common type Rep Parent = D1 ('MetaData "Parent" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) ((C1 ('MetaCons "DatabaseParent" 'PrefixI 'True) (S1 ('MetaSel ('Just "databaseId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)) :+: C1 ('MetaCons "DataSourceParent" 'PrefixI 'True) (S1 ('MetaSel ('Just "dataSourceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID) :*: S1 ('MetaSel ('Just "parentDatabaseId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UUID)))) :+: (C1 ('MetaCons "PageParent" 'PrefixI 'True) (S1 ('MetaSel ('Just "pageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)) :+: (C1 ('MetaCons "BlockParent" 'PrefixI 'True) (S1 ('MetaSel ('Just "blockId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)) :+: C1 ('MetaCons "WorkspaceParent" 'PrefixI 'True) (S1 ('MetaSel ('Just "workspace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))) | |||||
Notion color options
Constructors
| Default | |
| Gray | |
| Brown | |
| Orange | |
| Yellow | |
| Green | |
| Blue | |
| Purple | |
| Pink | |
| Red | |
| GrayBackground | |
| BrownBackground | |
| OrangeBackground | |
| YellowBackground | |
| GreenBackground | |
| BlueBackground | |
| PurpleBackground | |
| PinkBackground | |
| RedBackground |
Instances
| Generic Color Source # | |||||
Defined in Notion.V1.Common Associated Types
| |||||
| Show Color Source # | |||||
| Eq Color Source # | |||||
| FromJSON Color Source # | |||||
Defined in Notion.V1.Common | |||||
| ToJSON Color Source # | |||||
| type Rep Color Source # | |||||
Defined in Notion.V1.Common type Rep Color = D1 ('MetaData "Color" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) ((((C1 ('MetaCons "Default" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Gray" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Brown" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Orange" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Yellow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Green" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Blue" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Purple" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Pink" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Red" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GrayBackground" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BrownBackground" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OrangeBackground" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "YellowBackground" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GreenBackground" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlueBackground" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PurpleBackground" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PinkBackground" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RedBackground" 'PrefixI 'False) (U1 :: Type -> Type)))))) | |||||
Icon object for pages/databases
Constructors
| EmojiIcon | |
| FileIcon | |
| ExternalIcon | |
Fields | |
| NativeIcon | Native icon specified by name and optional color |
| CustomEmojiIcon | Custom emoji icon specified by ID |
Fields | |
| FileUploadIcon | File upload icon referenced by upload ID |
Fields
| |
Instances
| Generic Icon Source # | |||||
Defined in Notion.V1.Common Associated Types
| |||||
| Show Icon Source # | |||||
| Eq Icon Source # | |||||
| FromJSON Icon Source # | |||||
Defined in Notion.V1.Common | |||||
| ToJSON Icon Source # | |||||
| type Rep Icon Source # | |||||
Defined in Notion.V1.Common type Rep Icon = D1 ('MetaData "Icon" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) ((C1 ('MetaCons "EmojiIcon" 'PrefixI 'True) (S1 ('MetaSel ('Just "emoji") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "FileIcon" 'PrefixI 'True) (S1 ('MetaSel ('Just "file") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 File)) :+: C1 ('MetaCons "ExternalIcon" 'PrefixI 'True) (S1 ('MetaSel ('Just "external") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExternalFile)))) :+: (C1 ('MetaCons "NativeIcon" 'PrefixI 'True) (S1 ('MetaSel ('Just "iconName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "iconColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :+: (C1 ('MetaCons "CustomEmojiIcon" 'PrefixI 'True) (S1 ('MetaSel ('Just "customEmojiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)) :+: C1 ('MetaCons "FileUploadIcon" 'PrefixI 'True) (S1 ('MetaSel ('Just "fileUploadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID))))) | |||||
Cover object for pages/databases
Constructors
| FileCover | |
| ExternalCover | |
Fields | |
| FileUploadCover | |
Fields
| |
Instances
| Generic Cover Source # | |||||
Defined in Notion.V1.Common Associated Types
| |||||
| Show Cover Source # | |||||
| Eq Cover Source # | |||||
| FromJSON Cover Source # | |||||
Defined in Notion.V1.Common | |||||
| ToJSON Cover Source # | |||||
| type Rep Cover Source # | |||||
Defined in Notion.V1.Common type Rep Cover = D1 ('MetaData "Cover" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) (C1 ('MetaCons "FileCover" 'PrefixI 'True) (S1 ('MetaSel ('Just "file") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 File)) :+: (C1 ('MetaCons "ExternalCover" 'PrefixI 'True) (S1 ('MetaSel ('Just "external") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExternalFile)) :+: C1 ('MetaCons "FileUploadCover" 'PrefixI 'True) (S1 ('MetaSel ('Just "fileUploadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)))) | |||||
Internal file object
Instances
| Generic File Source # | |||||
Defined in Notion.V1.Common Associated Types
| |||||
| Show File Source # | |||||
| Eq File Source # | |||||
| FromJSON File Source # | |||||
Defined in Notion.V1.Common | |||||
| ToJSON File Source # | |||||
| type Rep File Source # | |||||
Defined in Notion.V1.Common type Rep File = D1 ('MetaData "File" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) (C1 ('MetaCons "File" 'PrefixI 'True) (S1 ('MetaSel ('Just "url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "expiryTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)))) | |||||
newtype ExternalFile Source #
External file object
Constructors
| ExternalFile | |
Instances
| Generic ExternalFile Source # | |||||
Defined in Notion.V1.Common Associated Types
| |||||
| Show ExternalFile Source # | |||||
Defined in Notion.V1.Common Methods showsPrec :: Int -> ExternalFile -> ShowS # show :: ExternalFile -> String # showList :: [ExternalFile] -> ShowS # | |||||
| Eq ExternalFile Source # | |||||
Defined in Notion.V1.Common | |||||
| FromJSON ExternalFile Source # | |||||
Defined in Notion.V1.Common | |||||
| ToJSON ExternalFile Source # | |||||
Defined in Notion.V1.Common Methods toJSON :: ExternalFile -> Value # toEncoding :: ExternalFile -> Encoding # toJSONList :: [ExternalFile] -> Value # toEncodingList :: [ExternalFile] -> Encoding # omitField :: ExternalFile -> Bool # | |||||
| type Rep ExternalFile Source # | |||||
Defined in Notion.V1.Common type Rep ExternalFile = D1 ('MetaData "ExternalFile" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'True) (C1 ('MetaCons "ExternalFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||