notion-client
Safe HaskellNone
LanguageGHC2024

Notion.V1.Common

Contents

Description

Common Notion API types

Synopsis

Common types

newtype UUID Source #

UUID type for Notion resource IDs

Constructors

UUID 

Fields

Instances

Instances details
IsString UUID Source # 
Instance details

Defined in Notion.V1.Common

Methods

fromString :: String -> UUID #

Show UUID Source # 
Instance details

Defined in Notion.V1.Common

Methods

showsPrec :: Int -> UUID -> ShowS #

show :: UUID -> String #

showList :: [UUID] -> ShowS #

Eq UUID Source # 
Instance details

Defined in Notion.V1.Common

Methods

(==) :: UUID -> UUID -> Bool #

(/=) :: UUID -> UUID -> Bool #

ToHttpApiData UUID Source # 
Instance details

Defined in Notion.V1.Common

FromJSON UUID Source # 
Instance details

Defined in Notion.V1.Common

ToJSON UUID Source # 
Instance details

Defined in Notion.V1.Common

type BlockID = UUID Source #

Block ID

data ObjectType Source #

Possible Notion object types

Instances

Instances details
Generic ObjectType Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep ObjectType 
Instance details

Defined in Notion.V1.Common

type Rep ObjectType = D1 ('MetaData "ObjectType" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) ((C1 ('MetaCons "Database" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DataSource" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Page" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Block" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Comment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "View" 'PrefixI 'False) (U1 :: Type -> Type))))
Show ObjectType Source # 
Instance details

Defined in Notion.V1.Common

Eq ObjectType Source # 
Instance details

Defined in Notion.V1.Common

FromJSON ObjectType Source # 
Instance details

Defined in Notion.V1.Common

ToJSON ObjectType Source # 
Instance details

Defined in Notion.V1.Common

type Rep ObjectType Source # 
Instance details

Defined in Notion.V1.Common

type Rep ObjectType = D1 ('MetaData "ObjectType" "Notion.V1.Common" "notion-client-0.7.0.2-inplace" 'False) ((C1 ('MetaCons "Database" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DataSource" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Page" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Block" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "User" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Comment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "View" 'PrefixI 'False) (U1 :: Type -> Type))))

data Parent Source #

Parent object that can be a database, data source, page, block, or workspace

Instances

Instances details
Generic Parent Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep Parent 
Instance details

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)))))

Methods

from :: Parent -> Rep Parent x #

to :: Rep Parent x -> Parent #

Show Parent Source # 
Instance details

Defined in Notion.V1.Common

FromJSON Parent Source # 
Instance details

Defined in Notion.V1.Common

ToJSON Parent Source # 
Instance details

Defined in Notion.V1.Common

type Rep Parent Source # 
Instance details

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)))))

type ParentID = UUID Source #

Unified parent ID type

data Color Source #

Notion color options

Instances

Instances details
Generic Color Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep Color 
Instance details

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))))))

Methods

from :: Color -> Rep Color x #

to :: Rep Color x -> Color #

Show Color Source # 
Instance details

Defined in Notion.V1.Common

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

Eq Color Source # 
Instance details

Defined in Notion.V1.Common

Methods

(==) :: Color -> Color -> Bool #

(/=) :: Color -> Color -> Bool #

FromJSON Color Source # 
Instance details

Defined in Notion.V1.Common

ToJSON Color Source # 
Instance details

Defined in Notion.V1.Common

type Rep Color Source # 
Instance details

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))))))

data Icon Source #

Icon object for pages/databases

Constructors

EmojiIcon 

Fields

FileIcon 

Fields

ExternalIcon 
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

Instances details
Generic Icon Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep Icon 
Instance details

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)))))

Methods

from :: Icon -> Rep Icon x #

to :: Rep Icon x -> Icon #

Show Icon Source # 
Instance details

Defined in Notion.V1.Common

Methods

showsPrec :: Int -> Icon -> ShowS #

show :: Icon -> String #

showList :: [Icon] -> ShowS #

Eq Icon Source # 
Instance details

Defined in Notion.V1.Common

Methods

(==) :: Icon -> Icon -> Bool #

(/=) :: Icon -> Icon -> Bool #

FromJSON Icon Source # 
Instance details

Defined in Notion.V1.Common

ToJSON Icon Source # 
Instance details

Defined in Notion.V1.Common

type Rep Icon Source # 
Instance details

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)))))

data Cover Source #

Cover object for pages/databases

Constructors

FileCover 

Fields

ExternalCover 
FileUploadCover 

Fields

Instances

Instances details
Generic Cover Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep Cover 
Instance details

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))))

Methods

from :: Cover -> Rep Cover x #

to :: Rep Cover x -> Cover #

Show Cover Source # 
Instance details

Defined in Notion.V1.Common

Methods

showsPrec :: Int -> Cover -> ShowS #

show :: Cover -> String #

showList :: [Cover] -> ShowS #

Eq Cover Source # 
Instance details

Defined in Notion.V1.Common

Methods

(==) :: Cover -> Cover -> Bool #

(/=) :: Cover -> Cover -> Bool #

FromJSON Cover Source # 
Instance details

Defined in Notion.V1.Common

ToJSON Cover Source # 
Instance details

Defined in Notion.V1.Common

type Rep Cover Source # 
Instance details

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))))

data File Source #

Internal file object

Constructors

File 

Instances

Instances details
Generic File Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep File 
Instance details

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))))

Methods

from :: File -> Rep File x #

to :: Rep File x -> File #

Show File Source # 
Instance details

Defined in Notion.V1.Common

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

Eq File Source # 
Instance details

Defined in Notion.V1.Common

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

FromJSON File Source # 
Instance details

Defined in Notion.V1.Common

ToJSON File Source # 
Instance details

Defined in Notion.V1.Common

type Rep File Source # 
Instance details

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 

Fields

Instances

Instances details
Generic ExternalFile Source # 
Instance details

Defined in Notion.V1.Common

Associated Types

type Rep ExternalFile 
Instance details

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)))
Show ExternalFile Source # 
Instance details

Defined in Notion.V1.Common

Eq ExternalFile Source # 
Instance details

Defined in Notion.V1.Common

FromJSON ExternalFile Source # 
Instance details

Defined in Notion.V1.Common

ToJSON ExternalFile Source # 
Instance details

Defined in Notion.V1.Common

type Rep ExternalFile Source # 
Instance details

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)))