{-|
Module      : Gargantext.API.Node
Description : Server API
Copyright   : (c) CNRS, 2017-Present
License     : AGPL + CECILL v3
Maintainer  : team@gargantext.org
Stability   : experimental
Portability : POSIX

-- TODO-SECURITY: Critical

-- TODO-ACCESS: CanGetNode
-- TODO-EVENTS: No events as this is a read only query.
Node API
-------------------------------------------------------------------
-- TODO-ACCESS: access by admin only.
--              At first let's just have an isAdmin check.
--              Later: check userId CanDeleteNodes Nothing
-- TODO-EVENTS: DeletedNodes [NodeId]
--              {"tag": "DeletedNodes", "nodes": [Int*]}

-}

{-# OPTIONS_GHC -fno-warn-orphans #-}

{-# LANGUAGE ScopedTypeVariables  #-}
{-# LANGUAGE TemplateHaskell      #-}
{-# LANGUAGE TypeOperators        #-}

module Gargantext.API.Node
  where

import Data.Aeson (FromJSON, ToJSON)
import Data.Aeson.TH (deriveJSON)
import Data.Maybe
import Data.Swagger
import Data.Text (Text())
import GHC.Generics (Generic)
import Servant
import Test.QuickCheck (elements)
import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary)

import Gargantext.API.Admin.Auth.Types (PathId(..))
import Gargantext.API.Admin.Auth (withAccess)
import Gargantext.API.Metrics
import Gargantext.API.Ngrams (TableNgramsApi, apiNgramsTableCorpus)
import Gargantext.API.Ngrams.Types (TabType(..))
import Gargantext.API.Node.File
import Gargantext.API.Node.New
import Gargantext.API.Prelude
import Gargantext.API.Table
import Gargantext.Core.Types (NodeTableResult)
import Gargantext.Core.Types.Individu (User(..))
import Gargantext.Core.Types.Main (Tree, NodeTree)
import Gargantext.Core.Utils.Prefix (unPrefix)
import Gargantext.Database.Action.Flow.Pairing (pairing)
import Gargantext.Database.Admin.Types.Hyperdata
import Gargantext.Database.Admin.Types.Node
import Gargantext.Database.Prelude -- (Cmd, CmdM)
import Gargantext.Database.Query.Facet (FacetDoc, OrderBy(..))
import Gargantext.Database.Query.Table.Node
import Gargantext.Database.Query.Table.Node.Children (getChildren)
import Gargantext.Database.Query.Table.Node.Error (HasNodeError(..))
import Gargantext.Database.Query.Table.Node.Update (Update(..), update)
import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata)
import Gargantext.Database.Query.Table.NodeNode
import Gargantext.Database.Query.Tree (tree, TreeMode(..))
import Gargantext.Prelude
import Gargantext.Core.Viz.Phylo.Legacy.LegacyAPI (PhyloAPI, phyloAPI)
import qualified Gargantext.API.Node.DocumentsFromWriteNodes as DocumentsFromWriteNodes
import qualified Gargantext.API.Node.DocumentUpload as DocumentUpload
import qualified Gargantext.API.Node.FrameCalcUpload as FrameCalcUpload
import qualified Gargantext.API.Node.Share  as Share
import qualified Gargantext.API.Node.Update as Update
import qualified Gargantext.API.Search as Search
import qualified Gargantext.Database.Action.Delete as Action (deleteNode)
import qualified Gargantext.Database.Query.Table.Node.Update as U (update, Update(..))

{-
import qualified Gargantext.Core.Text.List.Learn as Learn
import qualified Data.Vector as Vec
--}

-- | Admin NodesAPI
-- TODO
type NodesAPI  = Delete '[JSON] Int

-- | Delete Nodes
-- Be careful: really delete nodes
-- Access by admin only
nodesAPI :: [NodeId] -> GargServer NodesAPI
nodesAPI :: [NodeId] -> GargServer NodesAPI
nodesAPI = [NodeId] -> ServerT NodesAPI m
forall err. [NodeId] -> Cmd err Int
deleteNodes

------------------------------------------------------------------------
-- | TODO-ACCESS: access by admin only.
-- At first let's just have an isAdmin check.
-- Later: CanAccessAnyNode or (CanGetAnyNode, CanPutAnyNode)
-- To manage the Users roots
-- TODO-EVENTS:
--   PutNode ?
-- TODO needs design discussion.
type Roots =  Get    '[JSON] [Node HyperdataUser]
         :<|> Put    '[JSON] Int -- TODO

-- | TODO: access by admin only
roots :: GargServer Roots
roots :: ServerT Roots m
roots = Maybe NodeId -> Cmd err [Node HyperdataUser]
forall a err.
(Hyperdata a, JSONB a) =>
Maybe NodeId -> Cmd err [Node a]
getNodesWithParentId Maybe NodeId
forall a. Maybe a
Nothing
    m [Node HyperdataUser]
-> m Int -> m [Node HyperdataUser] :<|> m Int
forall a b. a -> b -> a :<|> b
:<|> Int -> m Int
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> Int
forall a. HasCallStack => Text -> a
panic Text
"not implemented yet") -- TODO use patch map to update what we need

-------------------------------------------------------------------
-- | Node API Types management
-- TODO-ACCESS : access by users
-- No ownership check is needed if we strictly follow the capability model.
--
-- CanGetNode (Node, Children, TableApi, TableNgramsApiGet, PairingApi, ChartApi,
--             SearchAPI)
-- CanRenameNode (or part of CanEditNode?)
-- CanCreateChildren (PostNodeApi)
-- CanEditNode / CanPutNode TODO not implemented yet
-- CanDeleteNode
-- CanPatch (TableNgramsApi)
-- CanFavorite
-- CanMoveToTrash

type NodeAPI a = Get '[JSON] (Node a)
             :<|> "rename" :> RenameApi
             :<|> PostNodeApi -- TODO move to children POST
             :<|> PostNodeAsync
             :<|> FrameCalcUpload.API
             :<|> ReqBody '[JSON] a :> Put    '[JSON] Int
             :<|> "update"     :> Update.API
             :<|> Delete '[JSON] Int
             :<|> "children"  :> ChildrenApi a

             -- TODO gather it
             :<|> "table"      :> TableApi
             :<|> "ngrams"     :> TableNgramsApi

             :<|> "category"   :> CatApi
             :<|> "score"      :> ScoreApi
             :<|> "search"     :> (Search.API Search.SearchResult)
             :<|> "share"      :> Share.API

             -- Pairing utilities
             :<|> "pairwith"   :> PairWith
             :<|> "pairs"      :> Pairs
             :<|> "pairing"    :> PairingApi

             -- VIZ
             :<|> "metrics"   :> ScatterAPI
             :<|> "chart"     :> ChartApi
             :<|> "pie"       :> PieApi
             :<|> "tree"      :> TreeApi
             :<|> "phylo"     :> PhyloAPI
             -- :<|> "add"       :> NodeAddAPI
             :<|> "move"      :> MoveAPI
             :<|> "unpublish" :> Share.Unpublish

             :<|> "file"      :> FileApi
             :<|> "async"     :> FileAsyncApi

             :<|> "documents-from-write-nodes" :> DocumentsFromWriteNodes.API
             :<|> DocumentUpload.API

-- TODO-ACCESS: check userId CanRenameNode nodeId
-- TODO-EVENTS: NodeRenamed RenameNode or re-use some more general NodeEdited...
type RenameApi = Summary " Rename Node"
               :> ReqBody '[JSON] RenameNode
               :> Put     '[JSON] [Int]

type PostNodeApi = Summary " PostNode Node with ParentId as {id}"
                 :> ReqBody '[JSON] PostNode
                 :> Post    '[JSON] [NodeId]

type ChildrenApi a = Summary " Summary children"
                 :> QueryParam "type"   NodeType
                 :> QueryParam "offset" Int
                 :> QueryParam "limit"  Int
                 -- :> Get '[JSON] [Node a]
                 :> Get '[JSON] (NodeTableResult a)

------------------------------------------------------------------------
type NodeNodeAPI a = Get '[JSON] (Node a)

nodeNodeAPI :: forall proxy a. (JSONB a, ToJSON a)
            => proxy a
            -> UserId
            -> CorpusId
            -> NodeId
            -> GargServer (NodeNodeAPI a)
nodeNodeAPI :: proxy a -> Int -> NodeId -> NodeId -> GargServer (NodeNodeAPI a)
nodeNodeAPI proxy a
p Int
uId NodeId
cId NodeId
nId = Proxy (NodeNodeAPI a)
-> Proxy m
-> Int
-> PathId
-> ServerT (NodeNodeAPI a) m
-> ServerT (NodeNodeAPI a) m
forall env err (m :: * -> *) api.
(GargServerC env err m, HasServer api '[]) =>
Proxy api
-> Proxy m -> Int -> PathId -> ServerT api m -> ServerT api m
withAccess (Proxy (NodeNodeAPI a)
forall k (t :: k). Proxy t
Proxy :: Proxy (NodeNodeAPI a)) Proxy m
forall k (t :: k). Proxy t
Proxy Int
uId (NodeId -> NodeId -> PathId
PathNodeNode NodeId
cId NodeId
nId) ServerT (NodeNodeAPI a) m
GargServer (NodeNodeAPI a)
nodeNodeAPI'
  where
    nodeNodeAPI' :: GargServer (NodeNodeAPI a)
    nodeNodeAPI' :: ServerT (NodeNodeAPI a) m
nodeNodeAPI' = NodeId -> proxy a -> Cmd err (Node a)
forall err a (proxy :: * -> *).
(HasNodeError err, JSONB a) =>
NodeId -> proxy a -> Cmd err (Node a)
getNodeWith NodeId
nId proxy a
p

------------------------------------------------------------------------
-- TODO: make the NodeId type indexed by `a`, then we no longer need the proxy.
nodeAPI :: forall proxy a.
       ( JSONB a
       , FromJSON a
       , ToJSON a
       , MimeRender JSON a
       , MimeUnrender JSON a
       ) => proxy a
         -> UserId
         -> NodeId
         -> GargServer (NodeAPI a)
nodeAPI :: proxy a -> Int -> NodeId -> GargServer (NodeAPI a)
nodeAPI proxy a
p Int
uId NodeId
id' = Proxy (NodeAPI a)
-> Proxy m
-> Int
-> PathId
-> ServerT (NodeAPI a) m
-> ServerT (NodeAPI a) m
forall env err (m :: * -> *) api.
(GargServerC env err m, HasServer api '[]) =>
Proxy api
-> Proxy m -> Int -> PathId -> ServerT api m -> ServerT api m
withAccess (Proxy (NodeAPI a)
forall k (t :: k). Proxy t
Proxy :: Proxy (NodeAPI a)) Proxy m
forall k (t :: k). Proxy t
Proxy Int
uId (NodeId -> PathId
PathNode NodeId
id') ServerT (NodeAPI a) m
GargServer (NodeAPI a)
nodeAPI'
  where
    nodeAPI' :: GargServer (NodeAPI a)
    nodeAPI' :: ServerT (NodeAPI a) m
nodeAPI' =  NodeId -> proxy a -> Cmd err (Node a)
forall err a (proxy :: * -> *).
(HasNodeError err, JSONB a) =>
NodeId -> proxy a -> Cmd err (Node a)
getNodeWith   NodeId
id' proxy a
p
           m (Node a)
-> ((RenameNode -> m [Int])
    :<|> ((PostNode -> m [NodeId])
          :<|> ((m (JobStatus 'Safe JobLog)
                 :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
                       :<|> (ID 'Unsafe "job"
                             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> m (JobOutput JobLog)))))
                :<|> ((m (JobStatus 'Safe JobLog)
                       :<|> ((JobInput Maybe FrameCalcUpload
                              -> m (JobStatus 'Safe JobLog))
                             :<|> (ID 'Unsafe "job"
                                   -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> ((Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> m (JobOutput JobLog)))))
                      :<|> ((a -> m Int)
                            :<|> ((m (JobStatus 'Safe JobLog)
                                   :<|> ((JobInput Maybe UpdateNodeParams
                                          -> m (JobStatus 'Safe JobLog))
                                         :<|> (ID 'Unsafe "job"
                                               -> (Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> ((Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> m (JobOutput JobLog)))))
                                  :<|> (m Int
                                        :<|> ((Maybe NodeType
                                               -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                                              :<|> (((Maybe TabType
                                                      -> Maybe NodeId
                                                      -> Maybe Int
                                                      -> Maybe Int
                                                      -> Maybe OrderBy
                                                      -> Maybe Text
                                                      -> m (HashedResponse FacetTableResult))
                                                     :<|> ((TableQuery -> m FacetTableResult)
                                                           :<|> (Maybe TabType -> m Text)))
                                                    :<|> (((TabType
                                                            -> NodeId
                                                            -> Int
                                                            -> Maybe Int
                                                            -> Maybe ListType
                                                            -> Maybe Int
                                                            -> Maybe Int
                                                            -> Maybe OrderBy
                                                            -> Maybe Text
                                                            -> m (VersionedWithCount NgramsTable))
                                                           :<|> ((TabType
                                                                  -> NodeId
                                                                  -> Versioned NgramsTablePatch
                                                                  -> m (Versioned NgramsTablePatch))
                                                                 :<|> ((TabType -> NodeId -> m Int)
                                                                       :<|> ((TabType
                                                                              -> NodeId -> m Int)
                                                                             :<|> (m (JobStatus
                                                                                        'Safe
                                                                                        JobLog)
                                                                                   :<|> ((JobInput
                                                                                            Maybe
                                                                                            UpdateTableNgramsCharts
                                                                                          -> m (JobStatus
                                                                                                  'Safe
                                                                                                  JobLog))
                                                                                         :<|> (ID
                                                                                                 'Unsafe
                                                                                                 "job"
                                                                                               -> (Maybe
                                                                                                     Limit
                                                                                                   -> Maybe
                                                                                                        Offset
                                                                                                   -> m (JobStatus
                                                                                                           'Safe
                                                                                                           JobLog))
                                                                                                  :<|> ((Maybe
                                                                                                           Limit
                                                                                                         -> Maybe
                                                                                                              Offset
                                                                                                         -> m (JobStatus
                                                                                                                 'Safe
                                                                                                                 JobLog))
                                                                                                        :<|> m (JobOutput
                                                                                                                  JobLog)))))))))
                                                          :<|> ((NodesToCategory -> m [Int])
                                                                :<|> ((NodesToScore -> m [Int])
                                                                      :<|> ((SearchQuery
                                                                             -> Maybe Int
                                                                             -> Maybe Int
                                                                             -> Maybe OrderBy
                                                                             -> m SearchResult)
                                                                            :<|> ((ShareNodeParams
                                                                                   -> m Int)
                                                                                  :<|> ((NodeId
                                                                                         -> Maybe
                                                                                              NodeId
                                                                                         -> m Int)
                                                                                        :<|> (m [NodeId]
                                                                                              :<|> ((Maybe
                                                                                                       TabType
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> Maybe
                                                                                                          OrderBy
                                                                                                     -> m [FacetDoc])
                                                                                                    :<|> (((Maybe
                                                                                                              NodeId
                                                                                                            -> TabType
                                                                                                            -> Maybe
                                                                                                                 Int
                                                                                                            -> m (HashedResponse
                                                                                                                    Metrics))
                                                                                                           :<|> ((Maybe
                                                                                                                    NodeId
                                                                                                                  -> TabType
                                                                                                                  -> Maybe
                                                                                                                       Int
                                                                                                                  -> m ())
                                                                                                                 :<|> (Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> m Text)))
                                                                                                          :<|> (((Maybe
                                                                                                                    UTCTime
                                                                                                                  -> Maybe
                                                                                                                       UTCTime
                                                                                                                  -> Maybe
                                                                                                                       NodeId
                                                                                                                  -> TabType
                                                                                                                  -> m (HashedResponse
                                                                                                                          (ChartMetrics
                                                                                                                             Histo)))
                                                                                                                 :<|> ((Maybe
                                                                                                                          NodeId
                                                                                                                        -> TabType
                                                                                                                        -> Maybe
                                                                                                                             Int
                                                                                                                        -> m ())
                                                                                                                       :<|> (Maybe
                                                                                                                               NodeId
                                                                                                                             -> TabType
                                                                                                                             -> m Text)))
                                                                                                                :<|> (((Maybe
                                                                                                                          UTCTime
                                                                                                                        -> Maybe
                                                                                                                             UTCTime
                                                                                                                        -> Maybe
                                                                                                                             NodeId
                                                                                                                        -> TabType
                                                                                                                        -> m (HashedResponse
                                                                                                                                (ChartMetrics
                                                                                                                                   Histo)))
                                                                                                                       :<|> ((Maybe
                                                                                                                                NodeId
                                                                                                                              -> TabType
                                                                                                                              -> Maybe
                                                                                                                                   Int
                                                                                                                              -> m ())
                                                                                                                             :<|> (Maybe
                                                                                                                                     NodeId
                                                                                                                                   -> TabType
                                                                                                                                   -> m Text)))
                                                                                                                      :<|> (((Maybe
                                                                                                                                UTCTime
                                                                                                                              -> Maybe
                                                                                                                                   UTCTime
                                                                                                                              -> Maybe
                                                                                                                                   NodeId
                                                                                                                              -> TabType
                                                                                                                              -> ListType
                                                                                                                              -> m (HashedResponse
                                                                                                                                      (ChartMetrics
                                                                                                                                         (Vector
                                                                                                                                            NgramsTree))))
                                                                                                                             :<|> ((Maybe
                                                                                                                                      NodeId
                                                                                                                                    -> TabType
                                                                                                                                    -> ListType
                                                                                                                                    -> m ())
                                                                                                                                   :<|> (Maybe
                                                                                                                                           NodeId
                                                                                                                                         -> TabType
                                                                                                                                         -> ListType
                                                                                                                                         -> m Text)))
                                                                                                                            :<|> (((Maybe
                                                                                                                                      NodeId
                                                                                                                                    -> Maybe
                                                                                                                                         Int
                                                                                                                                    -> Maybe
                                                                                                                                         Int
                                                                                                                                    -> m SVG)
                                                                                                                                   :<|> (Maybe
                                                                                                                                           NodeId
                                                                                                                                         -> m NodeId))
                                                                                                                                  :<|> ((NodeId
                                                                                                                                         -> m [Int])
                                                                                                                                        :<|> ((NodeId
                                                                                                                                               -> m Int)
                                                                                                                                              :<|> (m (Headers
                                                                                                                                                         '[Header
                                                                                                                                                             "Content-Type"
                                                                                                                                                             Text]
                                                                                                                                                         BSResponse)
                                                                                                                                                    :<|> ((m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog)
                                                                                                                                                           :<|> ((JobInput
                                                                                                                                                                    Maybe
                                                                                                                                                                    NewWithFile
                                                                                                                                                                  -> m (JobStatus
                                                                                                                                                                          'Safe
                                                                                                                                                                          JobLog))
                                                                                                                                                                 :<|> (ID
                                                                                                                                                                         'Unsafe
                                                                                                                                                                         "job"
                                                                                                                                                                       -> (Maybe
                                                                                                                                                                             Limit
                                                                                                                                                                           -> Maybe
                                                                                                                                                                                Offset
                                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                                   'Safe
                                                                                                                                                                                   JobLog))
                                                                                                                                                                          :<|> ((Maybe
                                                                                                                                                                                   Limit
                                                                                                                                                                                 -> Maybe
                                                                                                                                                                                      Offset
                                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                                         'Safe
                                                                                                                                                                                         JobLog))
                                                                                                                                                                                :<|> m (JobOutput
                                                                                                                                                                                          JobLog)))))
                                                                                                                                                          :<|> ((m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog)
                                                                                                                                                                 :<|> ((JobInput
                                                                                                                                                                          Maybe
                                                                                                                                                                          Params
                                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                                'Safe
                                                                                                                                                                                JobLog))
                                                                                                                                                                       :<|> (ID
                                                                                                                                                                               'Unsafe
                                                                                                                                                                               "job"
                                                                                                                                                                             -> (Maybe
                                                                                                                                                                                   Limit
                                                                                                                                                                                 -> Maybe
                                                                                                                                                                                      Offset
                                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                                         'Safe
                                                                                                                                                                                         JobLog))
                                                                                                                                                                                :<|> ((Maybe
                                                                                                                                                                                         Limit
                                                                                                                                                                                       -> Maybe
                                                                                                                                                                                            Offset
                                                                                                                                                                                       -> m (JobStatus
                                                                                                                                                                                               'Safe
                                                                                                                                                                                               JobLog))
                                                                                                                                                                                      :<|> m (JobOutput
                                                                                                                                                                                                JobLog)))))
                                                                                                                                                                :<|> (m (JobStatus
                                                                                                                                                                           'Safe
                                                                                                                                                                           JobLog)
                                                                                                                                                                      :<|> ((JobInput
                                                                                                                                                                               Maybe
                                                                                                                                                                               DocumentUpload
                                                                                                                                                                             -> m (JobStatus
                                                                                                                                                                                     'Safe
                                                                                                                                                                                     JobLog))
                                                                                                                                                                            :<|> (ID
                                                                                                                                                                                    'Unsafe
                                                                                                                                                                                    "job"
                                                                                                                                                                                  -> (Maybe
                                                                                                                                                                                        Limit
                                                                                                                                                                                      -> Maybe
                                                                                                                                                                                           Offset
                                                                                                                                                                                      -> m (JobStatus
                                                                                                                                                                                              'Safe
                                                                                                                                                                                              JobLog))
                                                                                                                                                                                     :<|> ((Maybe
                                                                                                                                                                                              Limit
                                                                                                                                                                                            -> Maybe
                                                                                                                                                                                                 Offset
                                                                                                                                                                                            -> m (JobStatus
                                                                                                                                                                                                    'Safe
                                                                                                                                                                                                    JobLog))
                                                                                                                                                                                           :<|> m (JobOutput
                                                                                                                                                                                                     JobLog))))))))))))))))))))))))))))))))
-> m (Node a)
   :<|> ((RenameNode -> m [Int])
         :<|> ((PostNode -> m [NodeId])
               :<|> ((m (JobStatus 'Safe JobLog)
                      :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
                            :<|> (ID 'Unsafe "job"
                                  -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> ((Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> m (JobOutput JobLog)))))
                     :<|> ((m (JobStatus 'Safe JobLog)
                            :<|> ((JobInput Maybe FrameCalcUpload
                                   -> m (JobStatus 'Safe JobLog))
                                  :<|> (ID 'Unsafe "job"
                                        -> (Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> ((Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> m (JobOutput JobLog)))))
                           :<|> ((a -> m Int)
                                 :<|> ((m (JobStatus 'Safe JobLog)
                                        :<|> ((JobInput Maybe UpdateNodeParams
                                               -> m (JobStatus 'Safe JobLog))
                                              :<|> (ID 'Unsafe "job"
                                                    -> (Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> ((Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> m (JobOutput JobLog)))))
                                       :<|> (m Int
                                             :<|> ((Maybe NodeType
                                                    -> Maybe Int
                                                    -> Maybe Int
                                                    -> m (NodeTableResult a))
                                                   :<|> (((Maybe TabType
                                                           -> Maybe NodeId
                                                           -> Maybe Int
                                                           -> Maybe Int
                                                           -> Maybe OrderBy
                                                           -> Maybe Text
                                                           -> m (HashedResponse FacetTableResult))
                                                          :<|> ((TableQuery -> m FacetTableResult)
                                                                :<|> (Maybe TabType -> m Text)))
                                                         :<|> (((TabType
                                                                 -> NodeId
                                                                 -> Int
                                                                 -> Maybe Int
                                                                 -> Maybe ListType
                                                                 -> Maybe Int
                                                                 -> Maybe Int
                                                                 -> Maybe OrderBy
                                                                 -> Maybe Text
                                                                 -> m (VersionedWithCount
                                                                         NgramsTable))
                                                                :<|> ((TabType
                                                                       -> NodeId
                                                                       -> Versioned NgramsTablePatch
                                                                       -> m (Versioned
                                                                               NgramsTablePatch))
                                                                      :<|> ((TabType
                                                                             -> NodeId -> m Int)
                                                                            :<|> ((TabType
                                                                                   -> NodeId
                                                                                   -> m Int)
                                                                                  :<|> (m (JobStatus
                                                                                             'Safe
                                                                                             JobLog)
                                                                                        :<|> ((JobInput
                                                                                                 Maybe
                                                                                                 UpdateTableNgramsCharts
                                                                                               -> m (JobStatus
                                                                                                       'Safe
                                                                                                       JobLog))
                                                                                              :<|> (ID
                                                                                                      'Unsafe
                                                                                                      "job"
                                                                                                    -> (Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> ((Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> m (JobOutput
                                                                                                                       JobLog)))))))))
                                                               :<|> ((NodesToCategory -> m [Int])
                                                                     :<|> ((NodesToScore -> m [Int])
                                                                           :<|> ((SearchQuery
                                                                                  -> Maybe Int
                                                                                  -> Maybe Int
                                                                                  -> Maybe OrderBy
                                                                                  -> m SearchResult)
                                                                                 :<|> ((ShareNodeParams
                                                                                        -> m Int)
                                                                                       :<|> ((NodeId
                                                                                              -> Maybe
                                                                                                   NodeId
                                                                                              -> m Int)
                                                                                             :<|> (m [NodeId]
                                                                                                   :<|> ((Maybe
                                                                                                            TabType
                                                                                                          -> Maybe
                                                                                                               Int
                                                                                                          -> Maybe
                                                                                                               Int
                                                                                                          -> Maybe
                                                                                                               OrderBy
                                                                                                          -> m [FacetDoc])
                                                                                                         :<|> (((Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> Maybe
                                                                                                                      Int
                                                                                                                 -> m (HashedResponse
                                                                                                                         Metrics))
                                                                                                                :<|> ((Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> Maybe
                                                                                                                            Int
                                                                                                                       -> m ())
                                                                                                                      :<|> (Maybe
                                                                                                                              NodeId
                                                                                                                            -> TabType
                                                                                                                            -> m Text)))
                                                                                                               :<|> (((Maybe
                                                                                                                         UTCTime
                                                                                                                       -> Maybe
                                                                                                                            UTCTime
                                                                                                                       -> Maybe
                                                                                                                            NodeId
                                                                                                                       -> TabType
                                                                                                                       -> m (HashedResponse
                                                                                                                               (ChartMetrics
                                                                                                                                  Histo)))
                                                                                                                      :<|> ((Maybe
                                                                                                                               NodeId
                                                                                                                             -> TabType
                                                                                                                             -> Maybe
                                                                                                                                  Int
                                                                                                                             -> m ())
                                                                                                                            :<|> (Maybe
                                                                                                                                    NodeId
                                                                                                                                  -> TabType
                                                                                                                                  -> m Text)))
                                                                                                                     :<|> (((Maybe
                                                                                                                               UTCTime
                                                                                                                             -> Maybe
                                                                                                                                  UTCTime
                                                                                                                             -> Maybe
                                                                                                                                  NodeId
                                                                                                                             -> TabType
                                                                                                                             -> m (HashedResponse
                                                                                                                                     (ChartMetrics
                                                                                                                                        Histo)))
                                                                                                                            :<|> ((Maybe
                                                                                                                                     NodeId
                                                                                                                                   -> TabType
                                                                                                                                   -> Maybe
                                                                                                                                        Int
                                                                                                                                   -> m ())
                                                                                                                                  :<|> (Maybe
                                                                                                                                          NodeId
                                                                                                                                        -> TabType
                                                                                                                                        -> m Text)))
                                                                                                                           :<|> (((Maybe
                                                                                                                                     UTCTime
                                                                                                                                   -> Maybe
                                                                                                                                        UTCTime
                                                                                                                                   -> Maybe
                                                                                                                                        NodeId
                                                                                                                                   -> TabType
                                                                                                                                   -> ListType
                                                                                                                                   -> m (HashedResponse
                                                                                                                                           (ChartMetrics
                                                                                                                                              (Vector
                                                                                                                                                 NgramsTree))))
                                                                                                                                  :<|> ((Maybe
                                                                                                                                           NodeId
                                                                                                                                         -> TabType
                                                                                                                                         -> ListType
                                                                                                                                         -> m ())
                                                                                                                                        :<|> (Maybe
                                                                                                                                                NodeId
                                                                                                                                              -> TabType
                                                                                                                                              -> ListType
                                                                                                                                              -> m Text)))
                                                                                                                                 :<|> (((Maybe
                                                                                                                                           NodeId
                                                                                                                                         -> Maybe
                                                                                                                                              Int
                                                                                                                                         -> Maybe
                                                                                                                                              Int
                                                                                                                                         -> m SVG)
                                                                                                                                        :<|> (Maybe
                                                                                                                                                NodeId
                                                                                                                                              -> m NodeId))
                                                                                                                                       :<|> ((NodeId
                                                                                                                                              -> m [Int])
                                                                                                                                             :<|> ((NodeId
                                                                                                                                                    -> m Int)
                                                                                                                                                   :<|> (m (Headers
                                                                                                                                                              '[Header
                                                                                                                                                                  "Content-Type"
                                                                                                                                                                  Text]
                                                                                                                                                              BSResponse)
                                                                                                                                                         :<|> ((m (JobStatus
                                                                                                                                                                     'Safe
                                                                                                                                                                     JobLog)
                                                                                                                                                                :<|> ((JobInput
                                                                                                                                                                         Maybe
                                                                                                                                                                         NewWithFile
                                                                                                                                                                       -> m (JobStatus
                                                                                                                                                                               'Safe
                                                                                                                                                                               JobLog))
                                                                                                                                                                      :<|> (ID
                                                                                                                                                                              'Unsafe
                                                                                                                                                                              "job"
                                                                                                                                                                            -> (Maybe
                                                                                                                                                                                  Limit
                                                                                                                                                                                -> Maybe
                                                                                                                                                                                     Offset
                                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                                        'Safe
                                                                                                                                                                                        JobLog))
                                                                                                                                                                               :<|> ((Maybe
                                                                                                                                                                                        Limit
                                                                                                                                                                                      -> Maybe
                                                                                                                                                                                           Offset
                                                                                                                                                                                      -> m (JobStatus
                                                                                                                                                                                              'Safe
                                                                                                                                                                                              JobLog))
                                                                                                                                                                                     :<|> m (JobOutput
                                                                                                                                                                                               JobLog)))))
                                                                                                                                                               :<|> ((m (JobStatus
                                                                                                                                                                           'Safe
                                                                                                                                                                           JobLog)
                                                                                                                                                                      :<|> ((JobInput
                                                                                                                                                                               Maybe
                                                                                                                                                                               Params
                                                                                                                                                                             -> m (JobStatus
                                                                                                                                                                                     'Safe
                                                                                                                                                                                     JobLog))
                                                                                                                                                                            :<|> (ID
                                                                                                                                                                                    'Unsafe
                                                                                                                                                                                    "job"
                                                                                                                                                                                  -> (Maybe
                                                                                                                                                                                        Limit
                                                                                                                                                                                      -> Maybe
                                                                                                                                                                                           Offset
                                                                                                                                                                                      -> m (JobStatus
                                                                                                                                                                                              'Safe
                                                                                                                                                                                              JobLog))
                                                                                                                                                                                     :<|> ((Maybe
                                                                                                                                                                                              Limit
                                                                                                                                                                                            -> Maybe
                                                                                                                                                                                                 Offset
                                                                                                                                                                                            -> m (JobStatus
                                                                                                                                                                                                    'Safe
                                                                                                                                                                                                    JobLog))
                                                                                                                                                                                           :<|> m (JobOutput
                                                                                                                                                                                                     JobLog)))))
                                                                                                                                                                     :<|> (m (JobStatus
                                                                                                                                                                                'Safe
                                                                                                                                                                                JobLog)
                                                                                                                                                                           :<|> ((JobInput
                                                                                                                                                                                    Maybe
                                                                                                                                                                                    DocumentUpload
                                                                                                                                                                                  -> m (JobStatus
                                                                                                                                                                                          'Safe
                                                                                                                                                                                          JobLog))
                                                                                                                                                                                 :<|> (ID
                                                                                                                                                                                         'Unsafe
                                                                                                                                                                                         "job"
                                                                                                                                                                                       -> (Maybe
                                                                                                                                                                                             Limit
                                                                                                                                                                                           -> Maybe
                                                                                                                                                                                                Offset
                                                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                                                   'Safe
                                                                                                                                                                                                   JobLog))
                                                                                                                                                                                          :<|> ((Maybe
                                                                                                                                                                                                   Limit
                                                                                                                                                                                                 -> Maybe
                                                                                                                                                                                                      Offset
                                                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                                                         'Safe
                                                                                                                                                                                                         JobLog))
                                                                                                                                                                                                :<|> m (JobOutput
                                                                                                                                                                                                          JobLog))))))))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> RenameNode -> Cmd err [Int]
forall err. NodeId -> RenameNode -> Cmd err [Int]
rename        NodeId
id'
           (RenameNode -> m [Int])
-> ((PostNode -> m [NodeId])
    :<|> ((m (JobStatus 'Safe JobLog)
           :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
                 :<|> (ID 'Unsafe "job"
                       -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> m (JobOutput JobLog)))))
          :<|> ((m (JobStatus 'Safe JobLog)
                 :<|> ((JobInput Maybe FrameCalcUpload
                        -> m (JobStatus 'Safe JobLog))
                       :<|> (ID 'Unsafe "job"
                             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> m (JobOutput JobLog)))))
                :<|> ((a -> m Int)
                      :<|> ((m (JobStatus 'Safe JobLog)
                             :<|> ((JobInput Maybe UpdateNodeParams
                                    -> m (JobStatus 'Safe JobLog))
                                   :<|> (ID 'Unsafe "job"
                                         -> (Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> ((Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> m (JobOutput JobLog)))))
                            :<|> (m Int
                                  :<|> ((Maybe NodeType
                                         -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                                        :<|> (((Maybe TabType
                                                -> Maybe NodeId
                                                -> Maybe Int
                                                -> Maybe Int
                                                -> Maybe OrderBy
                                                -> Maybe Text
                                                -> m (HashedResponse FacetTableResult))
                                               :<|> ((TableQuery -> m FacetTableResult)
                                                     :<|> (Maybe TabType -> m Text)))
                                              :<|> (((TabType
                                                      -> NodeId
                                                      -> Int
                                                      -> Maybe Int
                                                      -> Maybe ListType
                                                      -> Maybe Int
                                                      -> Maybe Int
                                                      -> Maybe OrderBy
                                                      -> Maybe Text
                                                      -> m (VersionedWithCount NgramsTable))
                                                     :<|> ((TabType
                                                            -> NodeId
                                                            -> Versioned NgramsTablePatch
                                                            -> m (Versioned NgramsTablePatch))
                                                           :<|> ((TabType -> NodeId -> m Int)
                                                                 :<|> ((TabType -> NodeId -> m Int)
                                                                       :<|> (m (JobStatus
                                                                                  'Safe JobLog)
                                                                             :<|> ((JobInput
                                                                                      Maybe
                                                                                      UpdateTableNgramsCharts
                                                                                    -> m (JobStatus
                                                                                            'Safe
                                                                                            JobLog))
                                                                                   :<|> (ID
                                                                                           'Unsafe
                                                                                           "job"
                                                                                         -> (Maybe
                                                                                               Limit
                                                                                             -> Maybe
                                                                                                  Offset
                                                                                             -> m (JobStatus
                                                                                                     'Safe
                                                                                                     JobLog))
                                                                                            :<|> ((Maybe
                                                                                                     Limit
                                                                                                   -> Maybe
                                                                                                        Offset
                                                                                                   -> m (JobStatus
                                                                                                           'Safe
                                                                                                           JobLog))
                                                                                                  :<|> m (JobOutput
                                                                                                            JobLog)))))))))
                                                    :<|> ((NodesToCategory -> m [Int])
                                                          :<|> ((NodesToScore -> m [Int])
                                                                :<|> ((SearchQuery
                                                                       -> Maybe Int
                                                                       -> Maybe Int
                                                                       -> Maybe OrderBy
                                                                       -> m SearchResult)
                                                                      :<|> ((ShareNodeParams
                                                                             -> m Int)
                                                                            :<|> ((NodeId
                                                                                   -> Maybe NodeId
                                                                                   -> m Int)
                                                                                  :<|> (m [NodeId]
                                                                                        :<|> ((Maybe
                                                                                                 TabType
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> Maybe
                                                                                                    OrderBy
                                                                                               -> m [FacetDoc])
                                                                                              :<|> (((Maybe
                                                                                                        NodeId
                                                                                                      -> TabType
                                                                                                      -> Maybe
                                                                                                           Int
                                                                                                      -> m (HashedResponse
                                                                                                              Metrics))
                                                                                                     :<|> ((Maybe
                                                                                                              NodeId
                                                                                                            -> TabType
                                                                                                            -> Maybe
                                                                                                                 Int
                                                                                                            -> m ())
                                                                                                           :<|> (Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> m Text)))
                                                                                                    :<|> (((Maybe
                                                                                                              UTCTime
                                                                                                            -> Maybe
                                                                                                                 UTCTime
                                                                                                            -> Maybe
                                                                                                                 NodeId
                                                                                                            -> TabType
                                                                                                            -> m (HashedResponse
                                                                                                                    (ChartMetrics
                                                                                                                       Histo)))
                                                                                                           :<|> ((Maybe
                                                                                                                    NodeId
                                                                                                                  -> TabType
                                                                                                                  -> Maybe
                                                                                                                       Int
                                                                                                                  -> m ())
                                                                                                                 :<|> (Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> m Text)))
                                                                                                          :<|> (((Maybe
                                                                                                                    UTCTime
                                                                                                                  -> Maybe
                                                                                                                       UTCTime
                                                                                                                  -> Maybe
                                                                                                                       NodeId
                                                                                                                  -> TabType
                                                                                                                  -> m (HashedResponse
                                                                                                                          (ChartMetrics
                                                                                                                             Histo)))
                                                                                                                 :<|> ((Maybe
                                                                                                                          NodeId
                                                                                                                        -> TabType
                                                                                                                        -> Maybe
                                                                                                                             Int
                                                                                                                        -> m ())
                                                                                                                       :<|> (Maybe
                                                                                                                               NodeId
                                                                                                                             -> TabType
                                                                                                                             -> m Text)))
                                                                                                                :<|> (((Maybe
                                                                                                                          UTCTime
                                                                                                                        -> Maybe
                                                                                                                             UTCTime
                                                                                                                        -> Maybe
                                                                                                                             NodeId
                                                                                                                        -> TabType
                                                                                                                        -> ListType
                                                                                                                        -> m (HashedResponse
                                                                                                                                (ChartMetrics
                                                                                                                                   (Vector
                                                                                                                                      NgramsTree))))
                                                                                                                       :<|> ((Maybe
                                                                                                                                NodeId
                                                                                                                              -> TabType
                                                                                                                              -> ListType
                                                                                                                              -> m ())
                                                                                                                             :<|> (Maybe
                                                                                                                                     NodeId
                                                                                                                                   -> TabType
                                                                                                                                   -> ListType
                                                                                                                                   -> m Text)))
                                                                                                                      :<|> (((Maybe
                                                                                                                                NodeId
                                                                                                                              -> Maybe
                                                                                                                                   Int
                                                                                                                              -> Maybe
                                                                                                                                   Int
                                                                                                                              -> m SVG)
                                                                                                                             :<|> (Maybe
                                                                                                                                     NodeId
                                                                                                                                   -> m NodeId))
                                                                                                                            :<|> ((NodeId
                                                                                                                                   -> m [Int])
                                                                                                                                  :<|> ((NodeId
                                                                                                                                         -> m Int)
                                                                                                                                        :<|> (m (Headers
                                                                                                                                                   '[Header
                                                                                                                                                       "Content-Type"
                                                                                                                                                       Text]
                                                                                                                                                   BSResponse)
                                                                                                                                              :<|> ((m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog)
                                                                                                                                                     :<|> ((JobInput
                                                                                                                                                              Maybe
                                                                                                                                                              NewWithFile
                                                                                                                                                            -> m (JobStatus
                                                                                                                                                                    'Safe
                                                                                                                                                                    JobLog))
                                                                                                                                                           :<|> (ID
                                                                                                                                                                   'Unsafe
                                                                                                                                                                   "job"
                                                                                                                                                                 -> (Maybe
                                                                                                                                                                       Limit
                                                                                                                                                                     -> Maybe
                                                                                                                                                                          Offset
                                                                                                                                                                     -> m (JobStatus
                                                                                                                                                                             'Safe
                                                                                                                                                                             JobLog))
                                                                                                                                                                    :<|> ((Maybe
                                                                                                                                                                             Limit
                                                                                                                                                                           -> Maybe
                                                                                                                                                                                Offset
                                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                                   'Safe
                                                                                                                                                                                   JobLog))
                                                                                                                                                                          :<|> m (JobOutput
                                                                                                                                                                                    JobLog)))))
                                                                                                                                                    :<|> ((m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog)
                                                                                                                                                           :<|> ((JobInput
                                                                                                                                                                    Maybe
                                                                                                                                                                    Params
                                                                                                                                                                  -> m (JobStatus
                                                                                                                                                                          'Safe
                                                                                                                                                                          JobLog))
                                                                                                                                                                 :<|> (ID
                                                                                                                                                                         'Unsafe
                                                                                                                                                                         "job"
                                                                                                                                                                       -> (Maybe
                                                                                                                                                                             Limit
                                                                                                                                                                           -> Maybe
                                                                                                                                                                                Offset
                                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                                   'Safe
                                                                                                                                                                                   JobLog))
                                                                                                                                                                          :<|> ((Maybe
                                                                                                                                                                                   Limit
                                                                                                                                                                                 -> Maybe
                                                                                                                                                                                      Offset
                                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                                         'Safe
                                                                                                                                                                                         JobLog))
                                                                                                                                                                                :<|> m (JobOutput
                                                                                                                                                                                          JobLog)))))
                                                                                                                                                          :<|> (m (JobStatus
                                                                                                                                                                     'Safe
                                                                                                                                                                     JobLog)
                                                                                                                                                                :<|> ((JobInput
                                                                                                                                                                         Maybe
                                                                                                                                                                         DocumentUpload
                                                                                                                                                                       -> m (JobStatus
                                                                                                                                                                               'Safe
                                                                                                                                                                               JobLog))
                                                                                                                                                                      :<|> (ID
                                                                                                                                                                              'Unsafe
                                                                                                                                                                              "job"
                                                                                                                                                                            -> (Maybe
                                                                                                                                                                                  Limit
                                                                                                                                                                                -> Maybe
                                                                                                                                                                                     Offset
                                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                                        'Safe
                                                                                                                                                                                        JobLog))
                                                                                                                                                                               :<|> ((Maybe
                                                                                                                                                                                        Limit
                                                                                                                                                                                      -> Maybe
                                                                                                                                                                                           Offset
                                                                                                                                                                                      -> m (JobStatus
                                                                                                                                                                                              'Safe
                                                                                                                                                                                              JobLog))
                                                                                                                                                                                     :<|> m (JobOutput
                                                                                                                                                                                               JobLog)))))))))))))))))))))))))))))))
-> (RenameNode -> m [Int])
   :<|> ((PostNode -> m [NodeId])
         :<|> ((m (JobStatus 'Safe JobLog)
                :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
                      :<|> (ID 'Unsafe "job"
                            -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> m (JobOutput JobLog)))))
               :<|> ((m (JobStatus 'Safe JobLog)
                      :<|> ((JobInput Maybe FrameCalcUpload
                             -> m (JobStatus 'Safe JobLog))
                            :<|> (ID 'Unsafe "job"
                                  -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> ((Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> m (JobOutput JobLog)))))
                     :<|> ((a -> m Int)
                           :<|> ((m (JobStatus 'Safe JobLog)
                                  :<|> ((JobInput Maybe UpdateNodeParams
                                         -> m (JobStatus 'Safe JobLog))
                                        :<|> (ID 'Unsafe "job"
                                              -> (Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> ((Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> m (JobOutput JobLog)))))
                                 :<|> (m Int
                                       :<|> ((Maybe NodeType
                                              -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                                             :<|> (((Maybe TabType
                                                     -> Maybe NodeId
                                                     -> Maybe Int
                                                     -> Maybe Int
                                                     -> Maybe OrderBy
                                                     -> Maybe Text
                                                     -> m (HashedResponse FacetTableResult))
                                                    :<|> ((TableQuery -> m FacetTableResult)
                                                          :<|> (Maybe TabType -> m Text)))
                                                   :<|> (((TabType
                                                           -> NodeId
                                                           -> Int
                                                           -> Maybe Int
                                                           -> Maybe ListType
                                                           -> Maybe Int
                                                           -> Maybe Int
                                                           -> Maybe OrderBy
                                                           -> Maybe Text
                                                           -> m (VersionedWithCount NgramsTable))
                                                          :<|> ((TabType
                                                                 -> NodeId
                                                                 -> Versioned NgramsTablePatch
                                                                 -> m (Versioned NgramsTablePatch))
                                                                :<|> ((TabType -> NodeId -> m Int)
                                                                      :<|> ((TabType
                                                                             -> NodeId -> m Int)
                                                                            :<|> (m (JobStatus
                                                                                       'Safe JobLog)
                                                                                  :<|> ((JobInput
                                                                                           Maybe
                                                                                           UpdateTableNgramsCharts
                                                                                         -> m (JobStatus
                                                                                                 'Safe
                                                                                                 JobLog))
                                                                                        :<|> (ID
                                                                                                'Unsafe
                                                                                                "job"
                                                                                              -> (Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> ((Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> m (JobOutput
                                                                                                                 JobLog)))))))))
                                                         :<|> ((NodesToCategory -> m [Int])
                                                               :<|> ((NodesToScore -> m [Int])
                                                                     :<|> ((SearchQuery
                                                                            -> Maybe Int
                                                                            -> Maybe Int
                                                                            -> Maybe OrderBy
                                                                            -> m SearchResult)
                                                                           :<|> ((ShareNodeParams
                                                                                  -> m Int)
                                                                                 :<|> ((NodeId
                                                                                        -> Maybe
                                                                                             NodeId
                                                                                        -> m Int)
                                                                                       :<|> (m [NodeId]
                                                                                             :<|> ((Maybe
                                                                                                      TabType
                                                                                                    -> Maybe
                                                                                                         Int
                                                                                                    -> Maybe
                                                                                                         Int
                                                                                                    -> Maybe
                                                                                                         OrderBy
                                                                                                    -> m [FacetDoc])
                                                                                                   :<|> (((Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> Maybe
                                                                                                                Int
                                                                                                           -> m (HashedResponse
                                                                                                                   Metrics))
                                                                                                          :<|> ((Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> Maybe
                                                                                                                      Int
                                                                                                                 -> m ())
                                                                                                                :<|> (Maybe
                                                                                                                        NodeId
                                                                                                                      -> TabType
                                                                                                                      -> m Text)))
                                                                                                         :<|> (((Maybe
                                                                                                                   UTCTime
                                                                                                                 -> Maybe
                                                                                                                      UTCTime
                                                                                                                 -> Maybe
                                                                                                                      NodeId
                                                                                                                 -> TabType
                                                                                                                 -> m (HashedResponse
                                                                                                                         (ChartMetrics
                                                                                                                            Histo)))
                                                                                                                :<|> ((Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> Maybe
                                                                                                                            Int
                                                                                                                       -> m ())
                                                                                                                      :<|> (Maybe
                                                                                                                              NodeId
                                                                                                                            -> TabType
                                                                                                                            -> m Text)))
                                                                                                               :<|> (((Maybe
                                                                                                                         UTCTime
                                                                                                                       -> Maybe
                                                                                                                            UTCTime
                                                                                                                       -> Maybe
                                                                                                                            NodeId
                                                                                                                       -> TabType
                                                                                                                       -> m (HashedResponse
                                                                                                                               (ChartMetrics
                                                                                                                                  Histo)))
                                                                                                                      :<|> ((Maybe
                                                                                                                               NodeId
                                                                                                                             -> TabType
                                                                                                                             -> Maybe
                                                                                                                                  Int
                                                                                                                             -> m ())
                                                                                                                            :<|> (Maybe
                                                                                                                                    NodeId
                                                                                                                                  -> TabType
                                                                                                                                  -> m Text)))
                                                                                                                     :<|> (((Maybe
                                                                                                                               UTCTime
                                                                                                                             -> Maybe
                                                                                                                                  UTCTime
                                                                                                                             -> Maybe
                                                                                                                                  NodeId
                                                                                                                             -> TabType
                                                                                                                             -> ListType
                                                                                                                             -> m (HashedResponse
                                                                                                                                     (ChartMetrics
                                                                                                                                        (Vector
                                                                                                                                           NgramsTree))))
                                                                                                                            :<|> ((Maybe
                                                                                                                                     NodeId
                                                                                                                                   -> TabType
                                                                                                                                   -> ListType
                                                                                                                                   -> m ())
                                                                                                                                  :<|> (Maybe
                                                                                                                                          NodeId
                                                                                                                                        -> TabType
                                                                                                                                        -> ListType
                                                                                                                                        -> m Text)))
                                                                                                                           :<|> (((Maybe
                                                                                                                                     NodeId
                                                                                                                                   -> Maybe
                                                                                                                                        Int
                                                                                                                                   -> Maybe
                                                                                                                                        Int
                                                                                                                                   -> m SVG)
                                                                                                                                  :<|> (Maybe
                                                                                                                                          NodeId
                                                                                                                                        -> m NodeId))
                                                                                                                                 :<|> ((NodeId
                                                                                                                                        -> m [Int])
                                                                                                                                       :<|> ((NodeId
                                                                                                                                              -> m Int)
                                                                                                                                             :<|> (m (Headers
                                                                                                                                                        '[Header
                                                                                                                                                            "Content-Type"
                                                                                                                                                            Text]
                                                                                                                                                        BSResponse)
                                                                                                                                                   :<|> ((m (JobStatus
                                                                                                                                                               'Safe
                                                                                                                                                               JobLog)
                                                                                                                                                          :<|> ((JobInput
                                                                                                                                                                   Maybe
                                                                                                                                                                   NewWithFile
                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                         'Safe
                                                                                                                                                                         JobLog))
                                                                                                                                                                :<|> (ID
                                                                                                                                                                        'Unsafe
                                                                                                                                                                        "job"
                                                                                                                                                                      -> (Maybe
                                                                                                                                                                            Limit
                                                                                                                                                                          -> Maybe
                                                                                                                                                                               Offset
                                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                                  'Safe
                                                                                                                                                                                  JobLog))
                                                                                                                                                                         :<|> ((Maybe
                                                                                                                                                                                  Limit
                                                                                                                                                                                -> Maybe
                                                                                                                                                                                     Offset
                                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                                        'Safe
                                                                                                                                                                                        JobLog))
                                                                                                                                                                               :<|> m (JobOutput
                                                                                                                                                                                         JobLog)))))
                                                                                                                                                         :<|> ((m (JobStatus
                                                                                                                                                                     'Safe
                                                                                                                                                                     JobLog)
                                                                                                                                                                :<|> ((JobInput
                                                                                                                                                                         Maybe
                                                                                                                                                                         Params
                                                                                                                                                                       -> m (JobStatus
                                                                                                                                                                               'Safe
                                                                                                                                                                               JobLog))
                                                                                                                                                                      :<|> (ID
                                                                                                                                                                              'Unsafe
                                                                                                                                                                              "job"
                                                                                                                                                                            -> (Maybe
                                                                                                                                                                                  Limit
                                                                                                                                                                                -> Maybe
                                                                                                                                                                                     Offset
                                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                                        'Safe
                                                                                                                                                                                        JobLog))
                                                                                                                                                                               :<|> ((Maybe
                                                                                                                                                                                        Limit
                                                                                                                                                                                      -> Maybe
                                                                                                                                                                                           Offset
                                                                                                                                                                                      -> m (JobStatus
                                                                                                                                                                                              'Safe
                                                                                                                                                                                              JobLog))
                                                                                                                                                                                     :<|> m (JobOutput
                                                                                                                                                                                               JobLog)))))
                                                                                                                                                               :<|> (m (JobStatus
                                                                                                                                                                          'Safe
                                                                                                                                                                          JobLog)
                                                                                                                                                                     :<|> ((JobInput
                                                                                                                                                                              Maybe
                                                                                                                                                                              DocumentUpload
                                                                                                                                                                            -> m (JobStatus
                                                                                                                                                                                    'Safe
                                                                                                                                                                                    JobLog))
                                                                                                                                                                           :<|> (ID
                                                                                                                                                                                   'Unsafe
                                                                                                                                                                                   "job"
                                                                                                                                                                                 -> (Maybe
                                                                                                                                                                                       Limit
                                                                                                                                                                                     -> Maybe
                                                                                                                                                                                          Offset
                                                                                                                                                                                     -> m (JobStatus
                                                                                                                                                                                             'Safe
                                                                                                                                                                                             JobLog))
                                                                                                                                                                                    :<|> ((Maybe
                                                                                                                                                                                             Limit
                                                                                                                                                                                           -> Maybe
                                                                                                                                                                                                Offset
                                                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                                                   'Safe
                                                                                                                                                                                                   JobLog))
                                                                                                                                                                                          :<|> m (JobOutput
                                                                                                                                                                                                    JobLog)))))))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> PostNode -> Cmd err [NodeId]
forall err.
HasNodeError err =>
Int -> NodeId -> PostNode -> Cmd err [NodeId]
postNode  Int
uId NodeId
id'
           (PostNode -> m [NodeId])
-> ((m (JobStatus 'Safe JobLog)
     :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
           :<|> (ID 'Unsafe "job"
                 -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                    :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> m (JobOutput JobLog)))))
    :<|> ((m (JobStatus 'Safe JobLog)
           :<|> ((JobInput Maybe FrameCalcUpload
                  -> m (JobStatus 'Safe JobLog))
                 :<|> (ID 'Unsafe "job"
                       -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> m (JobOutput JobLog)))))
          :<|> ((a -> m Int)
                :<|> ((m (JobStatus 'Safe JobLog)
                       :<|> ((JobInput Maybe UpdateNodeParams
                              -> m (JobStatus 'Safe JobLog))
                             :<|> (ID 'Unsafe "job"
                                   -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> ((Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> m (JobOutput JobLog)))))
                      :<|> (m Int
                            :<|> ((Maybe NodeType
                                   -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                                  :<|> (((Maybe TabType
                                          -> Maybe NodeId
                                          -> Maybe Int
                                          -> Maybe Int
                                          -> Maybe OrderBy
                                          -> Maybe Text
                                          -> m (HashedResponse FacetTableResult))
                                         :<|> ((TableQuery -> m FacetTableResult)
                                               :<|> (Maybe TabType -> m Text)))
                                        :<|> (((TabType
                                                -> NodeId
                                                -> Int
                                                -> Maybe Int
                                                -> Maybe ListType
                                                -> Maybe Int
                                                -> Maybe Int
                                                -> Maybe OrderBy
                                                -> Maybe Text
                                                -> m (VersionedWithCount NgramsTable))
                                               :<|> ((TabType
                                                      -> NodeId
                                                      -> Versioned NgramsTablePatch
                                                      -> m (Versioned NgramsTablePatch))
                                                     :<|> ((TabType -> NodeId -> m Int)
                                                           :<|> ((TabType -> NodeId -> m Int)
                                                                 :<|> (m (JobStatus 'Safe JobLog)
                                                                       :<|> ((JobInput
                                                                                Maybe
                                                                                UpdateTableNgramsCharts
                                                                              -> m (JobStatus
                                                                                      'Safe JobLog))
                                                                             :<|> (ID 'Unsafe "job"
                                                                                   -> (Maybe Limit
                                                                                       -> Maybe
                                                                                            Offset
                                                                                       -> m (JobStatus
                                                                                               'Safe
                                                                                               JobLog))
                                                                                      :<|> ((Maybe
                                                                                               Limit
                                                                                             -> Maybe
                                                                                                  Offset
                                                                                             -> m (JobStatus
                                                                                                     'Safe
                                                                                                     JobLog))
                                                                                            :<|> m (JobOutput
                                                                                                      JobLog)))))))))
                                              :<|> ((NodesToCategory -> m [Int])
                                                    :<|> ((NodesToScore -> m [Int])
                                                          :<|> ((SearchQuery
                                                                 -> Maybe Int
                                                                 -> Maybe Int
                                                                 -> Maybe OrderBy
                                                                 -> m SearchResult)
                                                                :<|> ((ShareNodeParams -> m Int)
                                                                      :<|> ((NodeId
                                                                             -> Maybe NodeId
                                                                             -> m Int)
                                                                            :<|> (m [NodeId]
                                                                                  :<|> ((Maybe
                                                                                           TabType
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> Maybe
                                                                                              OrderBy
                                                                                         -> m [FacetDoc])
                                                                                        :<|> (((Maybe
                                                                                                  NodeId
                                                                                                -> TabType
                                                                                                -> Maybe
                                                                                                     Int
                                                                                                -> m (HashedResponse
                                                                                                        Metrics))
                                                                                               :<|> ((Maybe
                                                                                                        NodeId
                                                                                                      -> TabType
                                                                                                      -> Maybe
                                                                                                           Int
                                                                                                      -> m ())
                                                                                                     :<|> (Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> m Text)))
                                                                                              :<|> (((Maybe
                                                                                                        UTCTime
                                                                                                      -> Maybe
                                                                                                           UTCTime
                                                                                                      -> Maybe
                                                                                                           NodeId
                                                                                                      -> TabType
                                                                                                      -> m (HashedResponse
                                                                                                              (ChartMetrics
                                                                                                                 Histo)))
                                                                                                     :<|> ((Maybe
                                                                                                              NodeId
                                                                                                            -> TabType
                                                                                                            -> Maybe
                                                                                                                 Int
                                                                                                            -> m ())
                                                                                                           :<|> (Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> m Text)))
                                                                                                    :<|> (((Maybe
                                                                                                              UTCTime
                                                                                                            -> Maybe
                                                                                                                 UTCTime
                                                                                                            -> Maybe
                                                                                                                 NodeId
                                                                                                            -> TabType
                                                                                                            -> m (HashedResponse
                                                                                                                    (ChartMetrics
                                                                                                                       Histo)))
                                                                                                           :<|> ((Maybe
                                                                                                                    NodeId
                                                                                                                  -> TabType
                                                                                                                  -> Maybe
                                                                                                                       Int
                                                                                                                  -> m ())
                                                                                                                 :<|> (Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> m Text)))
                                                                                                          :<|> (((Maybe
                                                                                                                    UTCTime
                                                                                                                  -> Maybe
                                                                                                                       UTCTime
                                                                                                                  -> Maybe
                                                                                                                       NodeId
                                                                                                                  -> TabType
                                                                                                                  -> ListType
                                                                                                                  -> m (HashedResponse
                                                                                                                          (ChartMetrics
                                                                                                                             (Vector
                                                                                                                                NgramsTree))))
                                                                                                                 :<|> ((Maybe
                                                                                                                          NodeId
                                                                                                                        -> TabType
                                                                                                                        -> ListType
                                                                                                                        -> m ())
                                                                                                                       :<|> (Maybe
                                                                                                                               NodeId
                                                                                                                             -> TabType
                                                                                                                             -> ListType
                                                                                                                             -> m Text)))
                                                                                                                :<|> (((Maybe
                                                                                                                          NodeId
                                                                                                                        -> Maybe
                                                                                                                             Int
                                                                                                                        -> Maybe
                                                                                                                             Int
                                                                                                                        -> m SVG)
                                                                                                                       :<|> (Maybe
                                                                                                                               NodeId
                                                                                                                             -> m NodeId))
                                                                                                                      :<|> ((NodeId
                                                                                                                             -> m [Int])
                                                                                                                            :<|> ((NodeId
                                                                                                                                   -> m Int)
                                                                                                                                  :<|> (m (Headers
                                                                                                                                             '[Header
                                                                                                                                                 "Content-Type"
                                                                                                                                                 Text]
                                                                                                                                             BSResponse)
                                                                                                                                        :<|> ((m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog)
                                                                                                                                               :<|> ((JobInput
                                                                                                                                                        Maybe
                                                                                                                                                        NewWithFile
                                                                                                                                                      -> m (JobStatus
                                                                                                                                                              'Safe
                                                                                                                                                              JobLog))
                                                                                                                                                     :<|> (ID
                                                                                                                                                             'Unsafe
                                                                                                                                                             "job"
                                                                                                                                                           -> (Maybe
                                                                                                                                                                 Limit
                                                                                                                                                               -> Maybe
                                                                                                                                                                    Offset
                                                                                                                                                               -> m (JobStatus
                                                                                                                                                                       'Safe
                                                                                                                                                                       JobLog))
                                                                                                                                                              :<|> ((Maybe
                                                                                                                                                                       Limit
                                                                                                                                                                     -> Maybe
                                                                                                                                                                          Offset
                                                                                                                                                                     -> m (JobStatus
                                                                                                                                                                             'Safe
                                                                                                                                                                             JobLog))
                                                                                                                                                                    :<|> m (JobOutput
                                                                                                                                                                              JobLog)))))
                                                                                                                                              :<|> ((m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog)
                                                                                                                                                     :<|> ((JobInput
                                                                                                                                                              Maybe
                                                                                                                                                              Params
                                                                                                                                                            -> m (JobStatus
                                                                                                                                                                    'Safe
                                                                                                                                                                    JobLog))
                                                                                                                                                           :<|> (ID
                                                                                                                                                                   'Unsafe
                                                                                                                                                                   "job"
                                                                                                                                                                 -> (Maybe
                                                                                                                                                                       Limit
                                                                                                                                                                     -> Maybe
                                                                                                                                                                          Offset
                                                                                                                                                                     -> m (JobStatus
                                                                                                                                                                             'Safe
                                                                                                                                                                             JobLog))
                                                                                                                                                                    :<|> ((Maybe
                                                                                                                                                                             Limit
                                                                                                                                                                           -> Maybe
                                                                                                                                                                                Offset
                                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                                   'Safe
                                                                                                                                                                                   JobLog))
                                                                                                                                                                          :<|> m (JobOutput
                                                                                                                                                                                    JobLog)))))
                                                                                                                                                    :<|> (m (JobStatus
                                                                                                                                                               'Safe
                                                                                                                                                               JobLog)
                                                                                                                                                          :<|> ((JobInput
                                                                                                                                                                   Maybe
                                                                                                                                                                   DocumentUpload
                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                         'Safe
                                                                                                                                                                         JobLog))
                                                                                                                                                                :<|> (ID
                                                                                                                                                                        'Unsafe
                                                                                                                                                                        "job"
                                                                                                                                                                      -> (Maybe
                                                                                                                                                                            Limit
                                                                                                                                                                          -> Maybe
                                                                                                                                                                               Offset
                                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                                  'Safe
                                                                                                                                                                                  JobLog))
                                                                                                                                                                         :<|> ((Maybe
                                                                                                                                                                                  Limit
                                                                                                                                                                                -> Maybe
                                                                                                                                                                                     Offset
                                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                                        'Safe
                                                                                                                                                                                        JobLog))
                                                                                                                                                                               :<|> m (JobOutput
                                                                                                                                                                                         JobLog))))))))))))))))))))))))))))))
-> (PostNode -> m [NodeId])
   :<|> ((m (JobStatus 'Safe JobLog)
          :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
                :<|> (ID 'Unsafe "job"
                      -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> m (JobOutput JobLog)))))
         :<|> ((m (JobStatus 'Safe JobLog)
                :<|> ((JobInput Maybe FrameCalcUpload
                       -> m (JobStatus 'Safe JobLog))
                      :<|> (ID 'Unsafe "job"
                            -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> m (JobOutput JobLog)))))
               :<|> ((a -> m Int)
                     :<|> ((m (JobStatus 'Safe JobLog)
                            :<|> ((JobInput Maybe UpdateNodeParams
                                   -> m (JobStatus 'Safe JobLog))
                                  :<|> (ID 'Unsafe "job"
                                        -> (Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> ((Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> m (JobOutput JobLog)))))
                           :<|> (m Int
                                 :<|> ((Maybe NodeType
                                        -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                                       :<|> (((Maybe TabType
                                               -> Maybe NodeId
                                               -> Maybe Int
                                               -> Maybe Int
                                               -> Maybe OrderBy
                                               -> Maybe Text
                                               -> m (HashedResponse FacetTableResult))
                                              :<|> ((TableQuery -> m FacetTableResult)
                                                    :<|> (Maybe TabType -> m Text)))
                                             :<|> (((TabType
                                                     -> NodeId
                                                     -> Int
                                                     -> Maybe Int
                                                     -> Maybe ListType
                                                     -> Maybe Int
                                                     -> Maybe Int
                                                     -> Maybe OrderBy
                                                     -> Maybe Text
                                                     -> m (VersionedWithCount NgramsTable))
                                                    :<|> ((TabType
                                                           -> NodeId
                                                           -> Versioned NgramsTablePatch
                                                           -> m (Versioned NgramsTablePatch))
                                                          :<|> ((TabType -> NodeId -> m Int)
                                                                :<|> ((TabType -> NodeId -> m Int)
                                                                      :<|> (m (JobStatus
                                                                                 'Safe JobLog)
                                                                            :<|> ((JobInput
                                                                                     Maybe
                                                                                     UpdateTableNgramsCharts
                                                                                   -> m (JobStatus
                                                                                           'Safe
                                                                                           JobLog))
                                                                                  :<|> (ID
                                                                                          'Unsafe
                                                                                          "job"
                                                                                        -> (Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> ((Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> m (JobOutput
                                                                                                           JobLog)))))))))
                                                   :<|> ((NodesToCategory -> m [Int])
                                                         :<|> ((NodesToScore -> m [Int])
                                                               :<|> ((SearchQuery
                                                                      -> Maybe Int
                                                                      -> Maybe Int
                                                                      -> Maybe OrderBy
                                                                      -> m SearchResult)
                                                                     :<|> ((ShareNodeParams
                                                                            -> m Int)
                                                                           :<|> ((NodeId
                                                                                  -> Maybe NodeId
                                                                                  -> m Int)
                                                                                 :<|> (m [NodeId]
                                                                                       :<|> ((Maybe
                                                                                                TabType
                                                                                              -> Maybe
                                                                                                   Int
                                                                                              -> Maybe
                                                                                                   Int
                                                                                              -> Maybe
                                                                                                   OrderBy
                                                                                              -> m [FacetDoc])
                                                                                             :<|> (((Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> m (HashedResponse
                                                                                                             Metrics))
                                                                                                    :<|> ((Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> Maybe
                                                                                                                Int
                                                                                                           -> m ())
                                                                                                          :<|> (Maybe
                                                                                                                  NodeId
                                                                                                                -> TabType
                                                                                                                -> m Text)))
                                                                                                   :<|> (((Maybe
                                                                                                             UTCTime
                                                                                                           -> Maybe
                                                                                                                UTCTime
                                                                                                           -> Maybe
                                                                                                                NodeId
                                                                                                           -> TabType
                                                                                                           -> m (HashedResponse
                                                                                                                   (ChartMetrics
                                                                                                                      Histo)))
                                                                                                          :<|> ((Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> Maybe
                                                                                                                      Int
                                                                                                                 -> m ())
                                                                                                                :<|> (Maybe
                                                                                                                        NodeId
                                                                                                                      -> TabType
                                                                                                                      -> m Text)))
                                                                                                         :<|> (((Maybe
                                                                                                                   UTCTime
                                                                                                                 -> Maybe
                                                                                                                      UTCTime
                                                                                                                 -> Maybe
                                                                                                                      NodeId
                                                                                                                 -> TabType
                                                                                                                 -> m (HashedResponse
                                                                                                                         (ChartMetrics
                                                                                                                            Histo)))
                                                                                                                :<|> ((Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> Maybe
                                                                                                                            Int
                                                                                                                       -> m ())
                                                                                                                      :<|> (Maybe
                                                                                                                              NodeId
                                                                                                                            -> TabType
                                                                                                                            -> m Text)))
                                                                                                               :<|> (((Maybe
                                                                                                                         UTCTime
                                                                                                                       -> Maybe
                                                                                                                            UTCTime
                                                                                                                       -> Maybe
                                                                                                                            NodeId
                                                                                                                       -> TabType
                                                                                                                       -> ListType
                                                                                                                       -> m (HashedResponse
                                                                                                                               (ChartMetrics
                                                                                                                                  (Vector
                                                                                                                                     NgramsTree))))
                                                                                                                      :<|> ((Maybe
                                                                                                                               NodeId
                                                                                                                             -> TabType
                                                                                                                             -> ListType
                                                                                                                             -> m ())
                                                                                                                            :<|> (Maybe
                                                                                                                                    NodeId
                                                                                                                                  -> TabType
                                                                                                                                  -> ListType
                                                                                                                                  -> m Text)))
                                                                                                                     :<|> (((Maybe
                                                                                                                               NodeId
                                                                                                                             -> Maybe
                                                                                                                                  Int
                                                                                                                             -> Maybe
                                                                                                                                  Int
                                                                                                                             -> m SVG)
                                                                                                                            :<|> (Maybe
                                                                                                                                    NodeId
                                                                                                                                  -> m NodeId))
                                                                                                                           :<|> ((NodeId
                                                                                                                                  -> m [Int])
                                                                                                                                 :<|> ((NodeId
                                                                                                                                        -> m Int)
                                                                                                                                       :<|> (m (Headers
                                                                                                                                                  '[Header
                                                                                                                                                      "Content-Type"
                                                                                                                                                      Text]
                                                                                                                                                  BSResponse)
                                                                                                                                             :<|> ((m (JobStatus
                                                                                                                                                         'Safe
                                                                                                                                                         JobLog)
                                                                                                                                                    :<|> ((JobInput
                                                                                                                                                             Maybe
                                                                                                                                                             NewWithFile
                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                   'Safe
                                                                                                                                                                   JobLog))
                                                                                                                                                          :<|> (ID
                                                                                                                                                                  'Unsafe
                                                                                                                                                                  "job"
                                                                                                                                                                -> (Maybe
                                                                                                                                                                      Limit
                                                                                                                                                                    -> Maybe
                                                                                                                                                                         Offset
                                                                                                                                                                    -> m (JobStatus
                                                                                                                                                                            'Safe
                                                                                                                                                                            JobLog))
                                                                                                                                                                   :<|> ((Maybe
                                                                                                                                                                            Limit
                                                                                                                                                                          -> Maybe
                                                                                                                                                                               Offset
                                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                                  'Safe
                                                                                                                                                                                  JobLog))
                                                                                                                                                                         :<|> m (JobOutput
                                                                                                                                                                                   JobLog)))))
                                                                                                                                                   :<|> ((m (JobStatus
                                                                                                                                                               'Safe
                                                                                                                                                               JobLog)
                                                                                                                                                          :<|> ((JobInput
                                                                                                                                                                   Maybe
                                                                                                                                                                   Params
                                                                                                                                                                 -> m (JobStatus
                                                                                                                                                                         'Safe
                                                                                                                                                                         JobLog))
                                                                                                                                                                :<|> (ID
                                                                                                                                                                        'Unsafe
                                                                                                                                                                        "job"
                                                                                                                                                                      -> (Maybe
                                                                                                                                                                            Limit
                                                                                                                                                                          -> Maybe
                                                                                                                                                                               Offset
                                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                                  'Safe
                                                                                                                                                                                  JobLog))
                                                                                                                                                                         :<|> ((Maybe
                                                                                                                                                                                  Limit
                                                                                                                                                                                -> Maybe
                                                                                                                                                                                     Offset
                                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                                        'Safe
                                                                                                                                                                                        JobLog))
                                                                                                                                                                               :<|> m (JobOutput
                                                                                                                                                                                         JobLog)))))
                                                                                                                                                         :<|> (m (JobStatus
                                                                                                                                                                    'Safe
                                                                                                                                                                    JobLog)
                                                                                                                                                               :<|> ((JobInput
                                                                                                                                                                        Maybe
                                                                                                                                                                        DocumentUpload
                                                                                                                                                                      -> m (JobStatus
                                                                                                                                                                              'Safe
                                                                                                                                                                              JobLog))
                                                                                                                                                                     :<|> (ID
                                                                                                                                                                             'Unsafe
                                                                                                                                                                             "job"
                                                                                                                                                                           -> (Maybe
                                                                                                                                                                                 Limit
                                                                                                                                                                               -> Maybe
                                                                                                                                                                                    Offset
                                                                                                                                                                               -> m (JobStatus
                                                                                                                                                                                       'Safe
                                                                                                                                                                                       JobLog))
                                                                                                                                                                              :<|> ((Maybe
                                                                                                                                                                                       Limit
                                                                                                                                                                                     -> Maybe
                                                                                                                                                                                          Offset
                                                                                                                                                                                     -> m (JobStatus
                                                                                                                                                                                             'Safe
                                                                                                                                                                                             JobLog))
                                                                                                                                                                                    :<|> m (JobOutput
                                                                                                                                                                                              JobLog))))))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer PostNodeAsync
postNodeAsyncAPI  Int
uId NodeId
id'
           (m (JobStatus 'Safe JobLog)
 :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
       :<|> (ID 'Unsafe "job"
             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                      :<|> m (JobOutput JobLog)))))
-> ((m (JobStatus 'Safe JobLog)
     :<|> ((JobInput Maybe FrameCalcUpload
            -> m (JobStatus 'Safe JobLog))
           :<|> (ID 'Unsafe "job"
                 -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                    :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> m (JobOutput JobLog)))))
    :<|> ((a -> m Int)
          :<|> ((m (JobStatus 'Safe JobLog)
                 :<|> ((JobInput Maybe UpdateNodeParams
                        -> m (JobStatus 'Safe JobLog))
                       :<|> (ID 'Unsafe "job"
                             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> m (JobOutput JobLog)))))
                :<|> (m Int
                      :<|> ((Maybe NodeType
                             -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                            :<|> (((Maybe TabType
                                    -> Maybe NodeId
                                    -> Maybe Int
                                    -> Maybe Int
                                    -> Maybe OrderBy
                                    -> Maybe Text
                                    -> m (HashedResponse FacetTableResult))
                                   :<|> ((TableQuery -> m FacetTableResult)
                                         :<|> (Maybe TabType -> m Text)))
                                  :<|> (((TabType
                                          -> NodeId
                                          -> Int
                                          -> Maybe Int
                                          -> Maybe ListType
                                          -> Maybe Int
                                          -> Maybe Int
                                          -> Maybe OrderBy
                                          -> Maybe Text
                                          -> m (VersionedWithCount NgramsTable))
                                         :<|> ((TabType
                                                -> NodeId
                                                -> Versioned NgramsTablePatch
                                                -> m (Versioned NgramsTablePatch))
                                               :<|> ((TabType -> NodeId -> m Int)
                                                     :<|> ((TabType -> NodeId -> m Int)
                                                           :<|> (m (JobStatus 'Safe JobLog)
                                                                 :<|> ((JobInput
                                                                          Maybe
                                                                          UpdateTableNgramsCharts
                                                                        -> m (JobStatus
                                                                                'Safe JobLog))
                                                                       :<|> (ID 'Unsafe "job"
                                                                             -> (Maybe Limit
                                                                                 -> Maybe Offset
                                                                                 -> m (JobStatus
                                                                                         'Safe
                                                                                         JobLog))
                                                                                :<|> ((Maybe Limit
                                                                                       -> Maybe
                                                                                            Offset
                                                                                       -> m (JobStatus
                                                                                               'Safe
                                                                                               JobLog))
                                                                                      :<|> m (JobOutput
                                                                                                JobLog)))))))))
                                        :<|> ((NodesToCategory -> m [Int])
                                              :<|> ((NodesToScore -> m [Int])
                                                    :<|> ((SearchQuery
                                                           -> Maybe Int
                                                           -> Maybe Int
                                                           -> Maybe OrderBy
                                                           -> m SearchResult)
                                                          :<|> ((ShareNodeParams -> m Int)
                                                                :<|> ((NodeId
                                                                       -> Maybe NodeId -> m Int)
                                                                      :<|> (m [NodeId]
                                                                            :<|> ((Maybe TabType
                                                                                   -> Maybe Int
                                                                                   -> Maybe Int
                                                                                   -> Maybe OrderBy
                                                                                   -> m [FacetDoc])
                                                                                  :<|> (((Maybe
                                                                                            NodeId
                                                                                          -> TabType
                                                                                          -> Maybe
                                                                                               Int
                                                                                          -> m (HashedResponse
                                                                                                  Metrics))
                                                                                         :<|> ((Maybe
                                                                                                  NodeId
                                                                                                -> TabType
                                                                                                -> Maybe
                                                                                                     Int
                                                                                                -> m ())
                                                                                               :<|> (Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> m Text)))
                                                                                        :<|> (((Maybe
                                                                                                  UTCTime
                                                                                                -> Maybe
                                                                                                     UTCTime
                                                                                                -> Maybe
                                                                                                     NodeId
                                                                                                -> TabType
                                                                                                -> m (HashedResponse
                                                                                                        (ChartMetrics
                                                                                                           Histo)))
                                                                                               :<|> ((Maybe
                                                                                                        NodeId
                                                                                                      -> TabType
                                                                                                      -> Maybe
                                                                                                           Int
                                                                                                      -> m ())
                                                                                                     :<|> (Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> m Text)))
                                                                                              :<|> (((Maybe
                                                                                                        UTCTime
                                                                                                      -> Maybe
                                                                                                           UTCTime
                                                                                                      -> Maybe
                                                                                                           NodeId
                                                                                                      -> TabType
                                                                                                      -> m (HashedResponse
                                                                                                              (ChartMetrics
                                                                                                                 Histo)))
                                                                                                     :<|> ((Maybe
                                                                                                              NodeId
                                                                                                            -> TabType
                                                                                                            -> Maybe
                                                                                                                 Int
                                                                                                            -> m ())
                                                                                                           :<|> (Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> m Text)))
                                                                                                    :<|> (((Maybe
                                                                                                              UTCTime
                                                                                                            -> Maybe
                                                                                                                 UTCTime
                                                                                                            -> Maybe
                                                                                                                 NodeId
                                                                                                            -> TabType
                                                                                                            -> ListType
                                                                                                            -> m (HashedResponse
                                                                                                                    (ChartMetrics
                                                                                                                       (Vector
                                                                                                                          NgramsTree))))
                                                                                                           :<|> ((Maybe
                                                                                                                    NodeId
                                                                                                                  -> TabType
                                                                                                                  -> ListType
                                                                                                                  -> m ())
                                                                                                                 :<|> (Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> ListType
                                                                                                                       -> m Text)))
                                                                                                          :<|> (((Maybe
                                                                                                                    NodeId
                                                                                                                  -> Maybe
                                                                                                                       Int
                                                                                                                  -> Maybe
                                                                                                                       Int
                                                                                                                  -> m SVG)
                                                                                                                 :<|> (Maybe
                                                                                                                         NodeId
                                                                                                                       -> m NodeId))
                                                                                                                :<|> ((NodeId
                                                                                                                       -> m [Int])
                                                                                                                      :<|> ((NodeId
                                                                                                                             -> m Int)
                                                                                                                            :<|> (m (Headers
                                                                                                                                       '[Header
                                                                                                                                           "Content-Type"
                                                                                                                                           Text]
                                                                                                                                       BSResponse)
                                                                                                                                  :<|> ((m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog)
                                                                                                                                         :<|> ((JobInput
                                                                                                                                                  Maybe
                                                                                                                                                  NewWithFile
                                                                                                                                                -> m (JobStatus
                                                                                                                                                        'Safe
                                                                                                                                                        JobLog))
                                                                                                                                               :<|> (ID
                                                                                                                                                       'Unsafe
                                                                                                                                                       "job"
                                                                                                                                                     -> (Maybe
                                                                                                                                                           Limit
                                                                                                                                                         -> Maybe
                                                                                                                                                              Offset
                                                                                                                                                         -> m (JobStatus
                                                                                                                                                                 'Safe
                                                                                                                                                                 JobLog))
                                                                                                                                                        :<|> ((Maybe
                                                                                                                                                                 Limit
                                                                                                                                                               -> Maybe
                                                                                                                                                                    Offset
                                                                                                                                                               -> m (JobStatus
                                                                                                                                                                       'Safe
                                                                                                                                                                       JobLog))
                                                                                                                                                              :<|> m (JobOutput
                                                                                                                                                                        JobLog)))))
                                                                                                                                        :<|> ((m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog)
                                                                                                                                               :<|> ((JobInput
                                                                                                                                                        Maybe
                                                                                                                                                        Params
                                                                                                                                                      -> m (JobStatus
                                                                                                                                                              'Safe
                                                                                                                                                              JobLog))
                                                                                                                                                     :<|> (ID
                                                                                                                                                             'Unsafe
                                                                                                                                                             "job"
                                                                                                                                                           -> (Maybe
                                                                                                                                                                 Limit
                                                                                                                                                               -> Maybe
                                                                                                                                                                    Offset
                                                                                                                                                               -> m (JobStatus
                                                                                                                                                                       'Safe
                                                                                                                                                                       JobLog))
                                                                                                                                                              :<|> ((Maybe
                                                                                                                                                                       Limit
                                                                                                                                                                     -> Maybe
                                                                                                                                                                          Offset
                                                                                                                                                                     -> m (JobStatus
                                                                                                                                                                             'Safe
                                                                                                                                                                             JobLog))
                                                                                                                                                                    :<|> m (JobOutput
                                                                                                                                                                              JobLog)))))
                                                                                                                                              :<|> (m (JobStatus
                                                                                                                                                         'Safe
                                                                                                                                                         JobLog)
                                                                                                                                                    :<|> ((JobInput
                                                                                                                                                             Maybe
                                                                                                                                                             DocumentUpload
                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                   'Safe
                                                                                                                                                                   JobLog))
                                                                                                                                                          :<|> (ID
                                                                                                                                                                  'Unsafe
                                                                                                                                                                  "job"
                                                                                                                                                                -> (Maybe
                                                                                                                                                                      Limit
                                                                                                                                                                    -> Maybe
                                                                                                                                                                         Offset
                                                                                                                                                                    -> m (JobStatus
                                                                                                                                                                            'Safe
                                                                                                                                                                            JobLog))
                                                                                                                                                                   :<|> ((Maybe
                                                                                                                                                                            Limit
                                                                                                                                                                          -> Maybe
                                                                                                                                                                               Offset
                                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                                  'Safe
                                                                                                                                                                                  JobLog))
                                                                                                                                                                         :<|> m (JobOutput
                                                                                                                                                                                   JobLog)))))))))))))))))))))))))))))
-> (m (JobStatus 'Safe JobLog)
    :<|> ((JobInput Maybe PostNode -> m (JobStatus 'Safe JobLog))
          :<|> (ID 'Unsafe "job"
                -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                   :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> m (JobOutput JobLog)))))
   :<|> ((m (JobStatus 'Safe JobLog)
          :<|> ((JobInput Maybe FrameCalcUpload
                 -> m (JobStatus 'Safe JobLog))
                :<|> (ID 'Unsafe "job"
                      -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> m (JobOutput JobLog)))))
         :<|> ((a -> m Int)
               :<|> ((m (JobStatus 'Safe JobLog)
                      :<|> ((JobInput Maybe UpdateNodeParams
                             -> m (JobStatus 'Safe JobLog))
                            :<|> (ID 'Unsafe "job"
                                  -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> ((Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> m (JobOutput JobLog)))))
                     :<|> (m Int
                           :<|> ((Maybe NodeType
                                  -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                                 :<|> (((Maybe TabType
                                         -> Maybe NodeId
                                         -> Maybe Int
                                         -> Maybe Int
                                         -> Maybe OrderBy
                                         -> Maybe Text
                                         -> m (HashedResponse FacetTableResult))
                                        :<|> ((TableQuery -> m FacetTableResult)
                                              :<|> (Maybe TabType -> m Text)))
                                       :<|> (((TabType
                                               -> NodeId
                                               -> Int
                                               -> Maybe Int
                                               -> Maybe ListType
                                               -> Maybe Int
                                               -> Maybe Int
                                               -> Maybe OrderBy
                                               -> Maybe Text
                                               -> m (VersionedWithCount NgramsTable))
                                              :<|> ((TabType
                                                     -> NodeId
                                                     -> Versioned NgramsTablePatch
                                                     -> m (Versioned NgramsTablePatch))
                                                    :<|> ((TabType -> NodeId -> m Int)
                                                          :<|> ((TabType -> NodeId -> m Int)
                                                                :<|> (m (JobStatus 'Safe JobLog)
                                                                      :<|> ((JobInput
                                                                               Maybe
                                                                               UpdateTableNgramsCharts
                                                                             -> m (JobStatus
                                                                                     'Safe JobLog))
                                                                            :<|> (ID 'Unsafe "job"
                                                                                  -> (Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> ((Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> m (JobOutput
                                                                                                     JobLog)))))))))
                                             :<|> ((NodesToCategory -> m [Int])
                                                   :<|> ((NodesToScore -> m [Int])
                                                         :<|> ((SearchQuery
                                                                -> Maybe Int
                                                                -> Maybe Int
                                                                -> Maybe OrderBy
                                                                -> m SearchResult)
                                                               :<|> ((ShareNodeParams -> m Int)
                                                                     :<|> ((NodeId
                                                                            -> Maybe NodeId
                                                                            -> m Int)
                                                                           :<|> (m [NodeId]
                                                                                 :<|> ((Maybe
                                                                                          TabType
                                                                                        -> Maybe Int
                                                                                        -> Maybe Int
                                                                                        -> Maybe
                                                                                             OrderBy
                                                                                        -> m [FacetDoc])
                                                                                       :<|> (((Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> m (HashedResponse
                                                                                                       Metrics))
                                                                                              :<|> ((Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> m ())
                                                                                                    :<|> (Maybe
                                                                                                            NodeId
                                                                                                          -> TabType
                                                                                                          -> m Text)))
                                                                                             :<|> (((Maybe
                                                                                                       UTCTime
                                                                                                     -> Maybe
                                                                                                          UTCTime
                                                                                                     -> Maybe
                                                                                                          NodeId
                                                                                                     -> TabType
                                                                                                     -> m (HashedResponse
                                                                                                             (ChartMetrics
                                                                                                                Histo)))
                                                                                                    :<|> ((Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> Maybe
                                                                                                                Int
                                                                                                           -> m ())
                                                                                                          :<|> (Maybe
                                                                                                                  NodeId
                                                                                                                -> TabType
                                                                                                                -> m Text)))
                                                                                                   :<|> (((Maybe
                                                                                                             UTCTime
                                                                                                           -> Maybe
                                                                                                                UTCTime
                                                                                                           -> Maybe
                                                                                                                NodeId
                                                                                                           -> TabType
                                                                                                           -> m (HashedResponse
                                                                                                                   (ChartMetrics
                                                                                                                      Histo)))
                                                                                                          :<|> ((Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> Maybe
                                                                                                                      Int
                                                                                                                 -> m ())
                                                                                                                :<|> (Maybe
                                                                                                                        NodeId
                                                                                                                      -> TabType
                                                                                                                      -> m Text)))
                                                                                                         :<|> (((Maybe
                                                                                                                   UTCTime
                                                                                                                 -> Maybe
                                                                                                                      UTCTime
                                                                                                                 -> Maybe
                                                                                                                      NodeId
                                                                                                                 -> TabType
                                                                                                                 -> ListType
                                                                                                                 -> m (HashedResponse
                                                                                                                         (ChartMetrics
                                                                                                                            (Vector
                                                                                                                               NgramsTree))))
                                                                                                                :<|> ((Maybe
                                                                                                                         NodeId
                                                                                                                       -> TabType
                                                                                                                       -> ListType
                                                                                                                       -> m ())
                                                                                                                      :<|> (Maybe
                                                                                                                              NodeId
                                                                                                                            -> TabType
                                                                                                                            -> ListType
                                                                                                                            -> m Text)))
                                                                                                               :<|> (((Maybe
                                                                                                                         NodeId
                                                                                                                       -> Maybe
                                                                                                                            Int
                                                                                                                       -> Maybe
                                                                                                                            Int
                                                                                                                       -> m SVG)
                                                                                                                      :<|> (Maybe
                                                                                                                              NodeId
                                                                                                                            -> m NodeId))
                                                                                                                     :<|> ((NodeId
                                                                                                                            -> m [Int])
                                                                                                                           :<|> ((NodeId
                                                                                                                                  -> m Int)
                                                                                                                                 :<|> (m (Headers
                                                                                                                                            '[Header
                                                                                                                                                "Content-Type"
                                                                                                                                                Text]
                                                                                                                                            BSResponse)
                                                                                                                                       :<|> ((m (JobStatus
                                                                                                                                                   'Safe
                                                                                                                                                   JobLog)
                                                                                                                                              :<|> ((JobInput
                                                                                                                                                       Maybe
                                                                                                                                                       NewWithFile
                                                                                                                                                     -> m (JobStatus
                                                                                                                                                             'Safe
                                                                                                                                                             JobLog))
                                                                                                                                                    :<|> (ID
                                                                                                                                                            'Unsafe
                                                                                                                                                            "job"
                                                                                                                                                          -> (Maybe
                                                                                                                                                                Limit
                                                                                                                                                              -> Maybe
                                                                                                                                                                   Offset
                                                                                                                                                              -> m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog))
                                                                                                                                                             :<|> ((Maybe
                                                                                                                                                                      Limit
                                                                                                                                                                    -> Maybe
                                                                                                                                                                         Offset
                                                                                                                                                                    -> m (JobStatus
                                                                                                                                                                            'Safe
                                                                                                                                                                            JobLog))
                                                                                                                                                                   :<|> m (JobOutput
                                                                                                                                                                             JobLog)))))
                                                                                                                                             :<|> ((m (JobStatus
                                                                                                                                                         'Safe
                                                                                                                                                         JobLog)
                                                                                                                                                    :<|> ((JobInput
                                                                                                                                                             Maybe
                                                                                                                                                             Params
                                                                                                                                                           -> m (JobStatus
                                                                                                                                                                   'Safe
                                                                                                                                                                   JobLog))
                                                                                                                                                          :<|> (ID
                                                                                                                                                                  'Unsafe
                                                                                                                                                                  "job"
                                                                                                                                                                -> (Maybe
                                                                                                                                                                      Limit
                                                                                                                                                                    -> Maybe
                                                                                                                                                                         Offset
                                                                                                                                                                    -> m (JobStatus
                                                                                                                                                                            'Safe
                                                                                                                                                                            JobLog))
                                                                                                                                                                   :<|> ((Maybe
                                                                                                                                                                            Limit
                                                                                                                                                                          -> Maybe
                                                                                                                                                                               Offset
                                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                                  'Safe
                                                                                                                                                                                  JobLog))
                                                                                                                                                                         :<|> m (JobOutput
                                                                                                                                                                                   JobLog)))))
                                                                                                                                                   :<|> (m (JobStatus
                                                                                                                                                              'Safe
                                                                                                                                                              JobLog)
                                                                                                                                                         :<|> ((JobInput
                                                                                                                                                                  Maybe
                                                                                                                                                                  DocumentUpload
                                                                                                                                                                -> m (JobStatus
                                                                                                                                                                        'Safe
                                                                                                                                                                        JobLog))
                                                                                                                                                               :<|> (ID
                                                                                                                                                                       'Unsafe
                                                                                                                                                                       "job"
                                                                                                                                                                     -> (Maybe
                                                                                                                                                                           Limit
                                                                                                                                                                         -> Maybe
                                                                                                                                                                              Offset
                                                                                                                                                                         -> m (JobStatus
                                                                                                                                                                                 'Safe
                                                                                                                                                                                 JobLog))
                                                                                                                                                                        :<|> ((Maybe
                                                                                                                                                                                 Limit
                                                                                                                                                                               -> Maybe
                                                                                                                                                                                    Offset
                                                                                                                                                                               -> m (JobStatus
                                                                                                                                                                                       'Safe
                                                                                                                                                                                       JobLog))
                                                                                                                                                                              :<|> m (JobOutput
                                                                                                                                                                                        JobLog)))))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer API
FrameCalcUpload.api Int
uId NodeId
id'
           (m (JobStatus 'Safe JobLog)
 :<|> ((JobInput Maybe FrameCalcUpload
        -> m (JobStatus 'Safe JobLog))
       :<|> (ID 'Unsafe "job"
             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                      :<|> m (JobOutput JobLog)))))
-> ((a -> m Int)
    :<|> ((m (JobStatus 'Safe JobLog)
           :<|> ((JobInput Maybe UpdateNodeParams
                  -> m (JobStatus 'Safe JobLog))
                 :<|> (ID 'Unsafe "job"
                       -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> m (JobOutput JobLog)))))
          :<|> (m Int
                :<|> ((Maybe NodeType
                       -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                      :<|> (((Maybe TabType
                              -> Maybe NodeId
                              -> Maybe Int
                              -> Maybe Int
                              -> Maybe OrderBy
                              -> Maybe Text
                              -> m (HashedResponse FacetTableResult))
                             :<|> ((TableQuery -> m FacetTableResult)
                                   :<|> (Maybe TabType -> m Text)))
                            :<|> (((TabType
                                    -> NodeId
                                    -> Int
                                    -> Maybe Int
                                    -> Maybe ListType
                                    -> Maybe Int
                                    -> Maybe Int
                                    -> Maybe OrderBy
                                    -> Maybe Text
                                    -> m (VersionedWithCount NgramsTable))
                                   :<|> ((TabType
                                          -> NodeId
                                          -> Versioned NgramsTablePatch
                                          -> m (Versioned NgramsTablePatch))
                                         :<|> ((TabType -> NodeId -> m Int)
                                               :<|> ((TabType -> NodeId -> m Int)
                                                     :<|> (m (JobStatus 'Safe JobLog)
                                                           :<|> ((JobInput
                                                                    Maybe UpdateTableNgramsCharts
                                                                  -> m (JobStatus 'Safe JobLog))
                                                                 :<|> (ID 'Unsafe "job"
                                                                       -> (Maybe Limit
                                                                           -> Maybe Offset
                                                                           -> m (JobStatus
                                                                                   'Safe JobLog))
                                                                          :<|> ((Maybe Limit
                                                                                 -> Maybe Offset
                                                                                 -> m (JobStatus
                                                                                         'Safe
                                                                                         JobLog))
                                                                                :<|> m (JobOutput
                                                                                          JobLog)))))))))
                                  :<|> ((NodesToCategory -> m [Int])
                                        :<|> ((NodesToScore -> m [Int])
                                              :<|> ((SearchQuery
                                                     -> Maybe Int
                                                     -> Maybe Int
                                                     -> Maybe OrderBy
                                                     -> m SearchResult)
                                                    :<|> ((ShareNodeParams -> m Int)
                                                          :<|> ((NodeId -> Maybe NodeId -> m Int)
                                                                :<|> (m [NodeId]
                                                                      :<|> ((Maybe TabType
                                                                             -> Maybe Int
                                                                             -> Maybe Int
                                                                             -> Maybe OrderBy
                                                                             -> m [FacetDoc])
                                                                            :<|> (((Maybe NodeId
                                                                                    -> TabType
                                                                                    -> Maybe Int
                                                                                    -> m (HashedResponse
                                                                                            Metrics))
                                                                                   :<|> ((Maybe
                                                                                            NodeId
                                                                                          -> TabType
                                                                                          -> Maybe
                                                                                               Int
                                                                                          -> m ())
                                                                                         :<|> (Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> m Text)))
                                                                                  :<|> (((Maybe
                                                                                            UTCTime
                                                                                          -> Maybe
                                                                                               UTCTime
                                                                                          -> Maybe
                                                                                               NodeId
                                                                                          -> TabType
                                                                                          -> m (HashedResponse
                                                                                                  (ChartMetrics
                                                                                                     Histo)))
                                                                                         :<|> ((Maybe
                                                                                                  NodeId
                                                                                                -> TabType
                                                                                                -> Maybe
                                                                                                     Int
                                                                                                -> m ())
                                                                                               :<|> (Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> m Text)))
                                                                                        :<|> (((Maybe
                                                                                                  UTCTime
                                                                                                -> Maybe
                                                                                                     UTCTime
                                                                                                -> Maybe
                                                                                                     NodeId
                                                                                                -> TabType
                                                                                                -> m (HashedResponse
                                                                                                        (ChartMetrics
                                                                                                           Histo)))
                                                                                               :<|> ((Maybe
                                                                                                        NodeId
                                                                                                      -> TabType
                                                                                                      -> Maybe
                                                                                                           Int
                                                                                                      -> m ())
                                                                                                     :<|> (Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> m Text)))
                                                                                              :<|> (((Maybe
                                                                                                        UTCTime
                                                                                                      -> Maybe
                                                                                                           UTCTime
                                                                                                      -> Maybe
                                                                                                           NodeId
                                                                                                      -> TabType
                                                                                                      -> ListType
                                                                                                      -> m (HashedResponse
                                                                                                              (ChartMetrics
                                                                                                                 (Vector
                                                                                                                    NgramsTree))))
                                                                                                     :<|> ((Maybe
                                                                                                              NodeId
                                                                                                            -> TabType
                                                                                                            -> ListType
                                                                                                            -> m ())
                                                                                                           :<|> (Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> ListType
                                                                                                                 -> m Text)))
                                                                                                    :<|> (((Maybe
                                                                                                              NodeId
                                                                                                            -> Maybe
                                                                                                                 Int
                                                                                                            -> Maybe
                                                                                                                 Int
                                                                                                            -> m SVG)
                                                                                                           :<|> (Maybe
                                                                                                                   NodeId
                                                                                                                 -> m NodeId))
                                                                                                          :<|> ((NodeId
                                                                                                                 -> m [Int])
                                                                                                                :<|> ((NodeId
                                                                                                                       -> m Int)
                                                                                                                      :<|> (m (Headers
                                                                                                                                 '[Header
                                                                                                                                     "Content-Type"
                                                                                                                                     Text]
                                                                                                                                 BSResponse)
                                                                                                                            :<|> ((m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog)
                                                                                                                                   :<|> ((JobInput
                                                                                                                                            Maybe
                                                                                                                                            NewWithFile
                                                                                                                                          -> m (JobStatus
                                                                                                                                                  'Safe
                                                                                                                                                  JobLog))
                                                                                                                                         :<|> (ID
                                                                                                                                                 'Unsafe
                                                                                                                                                 "job"
                                                                                                                                               -> (Maybe
                                                                                                                                                     Limit
                                                                                                                                                   -> Maybe
                                                                                                                                                        Offset
                                                                                                                                                   -> m (JobStatus
                                                                                                                                                           'Safe
                                                                                                                                                           JobLog))
                                                                                                                                                  :<|> ((Maybe
                                                                                                                                                           Limit
                                                                                                                                                         -> Maybe
                                                                                                                                                              Offset
                                                                                                                                                         -> m (JobStatus
                                                                                                                                                                 'Safe
                                                                                                                                                                 JobLog))
                                                                                                                                                        :<|> m (JobOutput
                                                                                                                                                                  JobLog)))))
                                                                                                                                  :<|> ((m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog)
                                                                                                                                         :<|> ((JobInput
                                                                                                                                                  Maybe
                                                                                                                                                  Params
                                                                                                                                                -> m (JobStatus
                                                                                                                                                        'Safe
                                                                                                                                                        JobLog))
                                                                                                                                               :<|> (ID
                                                                                                                                                       'Unsafe
                                                                                                                                                       "job"
                                                                                                                                                     -> (Maybe
                                                                                                                                                           Limit
                                                                                                                                                         -> Maybe
                                                                                                                                                              Offset
                                                                                                                                                         -> m (JobStatus
                                                                                                                                                                 'Safe
                                                                                                                                                                 JobLog))
                                                                                                                                                        :<|> ((Maybe
                                                                                                                                                                 Limit
                                                                                                                                                               -> Maybe
                                                                                                                                                                    Offset
                                                                                                                                                               -> m (JobStatus
                                                                                                                                                                       'Safe
                                                                                                                                                                       JobLog))
                                                                                                                                                              :<|> m (JobOutput
                                                                                                                                                                        JobLog)))))
                                                                                                                                        :<|> (m (JobStatus
                                                                                                                                                   'Safe
                                                                                                                                                   JobLog)
                                                                                                                                              :<|> ((JobInput
                                                                                                                                                       Maybe
                                                                                                                                                       DocumentUpload
                                                                                                                                                     -> m (JobStatus
                                                                                                                                                             'Safe
                                                                                                                                                             JobLog))
                                                                                                                                                    :<|> (ID
                                                                                                                                                            'Unsafe
                                                                                                                                                            "job"
                                                                                                                                                          -> (Maybe
                                                                                                                                                                Limit
                                                                                                                                                              -> Maybe
                                                                                                                                                                   Offset
                                                                                                                                                              -> m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog))
                                                                                                                                                             :<|> ((Maybe
                                                                                                                                                                      Limit
                                                                                                                                                                    -> Maybe
                                                                                                                                                                         Offset
                                                                                                                                                                    -> m (JobStatus
                                                                                                                                                                            'Safe
                                                                                                                                                                            JobLog))
                                                                                                                                                                   :<|> m (JobOutput
                                                                                                                                                                             JobLog))))))))))))))))))))))))))))
-> (m (JobStatus 'Safe JobLog)
    :<|> ((JobInput Maybe FrameCalcUpload
           -> m (JobStatus 'Safe JobLog))
          :<|> (ID 'Unsafe "job"
                -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                   :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> m (JobOutput JobLog)))))
   :<|> ((a -> m Int)
         :<|> ((m (JobStatus 'Safe JobLog)
                :<|> ((JobInput Maybe UpdateNodeParams
                       -> m (JobStatus 'Safe JobLog))
                      :<|> (ID 'Unsafe "job"
                            -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> m (JobOutput JobLog)))))
               :<|> (m Int
                     :<|> ((Maybe NodeType
                            -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                           :<|> (((Maybe TabType
                                   -> Maybe NodeId
                                   -> Maybe Int
                                   -> Maybe Int
                                   -> Maybe OrderBy
                                   -> Maybe Text
                                   -> m (HashedResponse FacetTableResult))
                                  :<|> ((TableQuery -> m FacetTableResult)
                                        :<|> (Maybe TabType -> m Text)))
                                 :<|> (((TabType
                                         -> NodeId
                                         -> Int
                                         -> Maybe Int
                                         -> Maybe ListType
                                         -> Maybe Int
                                         -> Maybe Int
                                         -> Maybe OrderBy
                                         -> Maybe Text
                                         -> m (VersionedWithCount NgramsTable))
                                        :<|> ((TabType
                                               -> NodeId
                                               -> Versioned NgramsTablePatch
                                               -> m (Versioned NgramsTablePatch))
                                              :<|> ((TabType -> NodeId -> m Int)
                                                    :<|> ((TabType -> NodeId -> m Int)
                                                          :<|> (m (JobStatus 'Safe JobLog)
                                                                :<|> ((JobInput
                                                                         Maybe
                                                                         UpdateTableNgramsCharts
                                                                       -> m (JobStatus
                                                                               'Safe JobLog))
                                                                      :<|> (ID 'Unsafe "job"
                                                                            -> (Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> ((Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> m (JobOutput
                                                                                               JobLog)))))))))
                                       :<|> ((NodesToCategory -> m [Int])
                                             :<|> ((NodesToScore -> m [Int])
                                                   :<|> ((SearchQuery
                                                          -> Maybe Int
                                                          -> Maybe Int
                                                          -> Maybe OrderBy
                                                          -> m SearchResult)
                                                         :<|> ((ShareNodeParams -> m Int)
                                                               :<|> ((NodeId
                                                                      -> Maybe NodeId -> m Int)
                                                                     :<|> (m [NodeId]
                                                                           :<|> ((Maybe TabType
                                                                                  -> Maybe Int
                                                                                  -> Maybe Int
                                                                                  -> Maybe OrderBy
                                                                                  -> m [FacetDoc])
                                                                                 :<|> (((Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> m (HashedResponse
                                                                                                 Metrics))
                                                                                        :<|> ((Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> m ())
                                                                                              :<|> (Maybe
                                                                                                      NodeId
                                                                                                    -> TabType
                                                                                                    -> m Text)))
                                                                                       :<|> (((Maybe
                                                                                                 UTCTime
                                                                                               -> Maybe
                                                                                                    UTCTime
                                                                                               -> Maybe
                                                                                                    NodeId
                                                                                               -> TabType
                                                                                               -> m (HashedResponse
                                                                                                       (ChartMetrics
                                                                                                          Histo)))
                                                                                              :<|> ((Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> m ())
                                                                                                    :<|> (Maybe
                                                                                                            NodeId
                                                                                                          -> TabType
                                                                                                          -> m Text)))
                                                                                             :<|> (((Maybe
                                                                                                       UTCTime
                                                                                                     -> Maybe
                                                                                                          UTCTime
                                                                                                     -> Maybe
                                                                                                          NodeId
                                                                                                     -> TabType
                                                                                                     -> m (HashedResponse
                                                                                                             (ChartMetrics
                                                                                                                Histo)))
                                                                                                    :<|> ((Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> Maybe
                                                                                                                Int
                                                                                                           -> m ())
                                                                                                          :<|> (Maybe
                                                                                                                  NodeId
                                                                                                                -> TabType
                                                                                                                -> m Text)))
                                                                                                   :<|> (((Maybe
                                                                                                             UTCTime
                                                                                                           -> Maybe
                                                                                                                UTCTime
                                                                                                           -> Maybe
                                                                                                                NodeId
                                                                                                           -> TabType
                                                                                                           -> ListType
                                                                                                           -> m (HashedResponse
                                                                                                                   (ChartMetrics
                                                                                                                      (Vector
                                                                                                                         NgramsTree))))
                                                                                                          :<|> ((Maybe
                                                                                                                   NodeId
                                                                                                                 -> TabType
                                                                                                                 -> ListType
                                                                                                                 -> m ())
                                                                                                                :<|> (Maybe
                                                                                                                        NodeId
                                                                                                                      -> TabType
                                                                                                                      -> ListType
                                                                                                                      -> m Text)))
                                                                                                         :<|> (((Maybe
                                                                                                                   NodeId
                                                                                                                 -> Maybe
                                                                                                                      Int
                                                                                                                 -> Maybe
                                                                                                                      Int
                                                                                                                 -> m SVG)
                                                                                                                :<|> (Maybe
                                                                                                                        NodeId
                                                                                                                      -> m NodeId))
                                                                                                               :<|> ((NodeId
                                                                                                                      -> m [Int])
                                                                                                                     :<|> ((NodeId
                                                                                                                            -> m Int)
                                                                                                                           :<|> (m (Headers
                                                                                                                                      '[Header
                                                                                                                                          "Content-Type"
                                                                                                                                          Text]
                                                                                                                                      BSResponse)
                                                                                                                                 :<|> ((m (JobStatus
                                                                                                                                             'Safe
                                                                                                                                             JobLog)
                                                                                                                                        :<|> ((JobInput
                                                                                                                                                 Maybe
                                                                                                                                                 NewWithFile
                                                                                                                                               -> m (JobStatus
                                                                                                                                                       'Safe
                                                                                                                                                       JobLog))
                                                                                                                                              :<|> (ID
                                                                                                                                                      'Unsafe
                                                                                                                                                      "job"
                                                                                                                                                    -> (Maybe
                                                                                                                                                          Limit
                                                                                                                                                        -> Maybe
                                                                                                                                                             Offset
                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog))
                                                                                                                                                       :<|> ((Maybe
                                                                                                                                                                Limit
                                                                                                                                                              -> Maybe
                                                                                                                                                                   Offset
                                                                                                                                                              -> m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog))
                                                                                                                                                             :<|> m (JobOutput
                                                                                                                                                                       JobLog)))))
                                                                                                                                       :<|> ((m (JobStatus
                                                                                                                                                   'Safe
                                                                                                                                                   JobLog)
                                                                                                                                              :<|> ((JobInput
                                                                                                                                                       Maybe
                                                                                                                                                       Params
                                                                                                                                                     -> m (JobStatus
                                                                                                                                                             'Safe
                                                                                                                                                             JobLog))
                                                                                                                                                    :<|> (ID
                                                                                                                                                            'Unsafe
                                                                                                                                                            "job"
                                                                                                                                                          -> (Maybe
                                                                                                                                                                Limit
                                                                                                                                                              -> Maybe
                                                                                                                                                                   Offset
                                                                                                                                                              -> m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog))
                                                                                                                                                             :<|> ((Maybe
                                                                                                                                                                      Limit
                                                                                                                                                                    -> Maybe
                                                                                                                                                                         Offset
                                                                                                                                                                    -> m (JobStatus
                                                                                                                                                                            'Safe
                                                                                                                                                                            JobLog))
                                                                                                                                                                   :<|> m (JobOutput
                                                                                                                                                                             JobLog)))))
                                                                                                                                             :<|> (m (JobStatus
                                                                                                                                                        'Safe
                                                                                                                                                        JobLog)
                                                                                                                                                   :<|> ((JobInput
                                                                                                                                                            Maybe
                                                                                                                                                            DocumentUpload
                                                                                                                                                          -> m (JobStatus
                                                                                                                                                                  'Safe
                                                                                                                                                                  JobLog))
                                                                                                                                                         :<|> (ID
                                                                                                                                                                 'Unsafe
                                                                                                                                                                 "job"
                                                                                                                                                               -> (Maybe
                                                                                                                                                                     Limit
                                                                                                                                                                   -> Maybe
                                                                                                                                                                        Offset
                                                                                                                                                                   -> m (JobStatus
                                                                                                                                                                           'Safe
                                                                                                                                                                           JobLog))
                                                                                                                                                                  :<|> ((Maybe
                                                                                                                                                                           Limit
                                                                                                                                                                         -> Maybe
                                                                                                                                                                              Offset
                                                                                                                                                                         -> m (JobStatus
                                                                                                                                                                                 'Safe
                                                                                                                                                                                 JobLog))
                                                                                                                                                                        :<|> m (JobOutput
                                                                                                                                                                                  JobLog))))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> a -> Cmd err Int
forall err a.
(HasNodeError err, JSONB a, ToJSON a) =>
NodeId -> a -> Cmd err Int
putNode       NodeId
id'
           (a -> m Int)
-> ((m (JobStatus 'Safe JobLog)
     :<|> ((JobInput Maybe UpdateNodeParams
            -> m (JobStatus 'Safe JobLog))
           :<|> (ID 'Unsafe "job"
                 -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                    :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> m (JobOutput JobLog)))))
    :<|> (m Int
          :<|> ((Maybe NodeType
                 -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                :<|> (((Maybe TabType
                        -> Maybe NodeId
                        -> Maybe Int
                        -> Maybe Int
                        -> Maybe OrderBy
                        -> Maybe Text
                        -> m (HashedResponse FacetTableResult))
                       :<|> ((TableQuery -> m FacetTableResult)
                             :<|> (Maybe TabType -> m Text)))
                      :<|> (((TabType
                              -> NodeId
                              -> Int
                              -> Maybe Int
                              -> Maybe ListType
                              -> Maybe Int
                              -> Maybe Int
                              -> Maybe OrderBy
                              -> Maybe Text
                              -> m (VersionedWithCount NgramsTable))
                             :<|> ((TabType
                                    -> NodeId
                                    -> Versioned NgramsTablePatch
                                    -> m (Versioned NgramsTablePatch))
                                   :<|> ((TabType -> NodeId -> m Int)
                                         :<|> ((TabType -> NodeId -> m Int)
                                               :<|> (m (JobStatus 'Safe JobLog)
                                                     :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                                            -> m (JobStatus 'Safe JobLog))
                                                           :<|> (ID 'Unsafe "job"
                                                                 -> (Maybe Limit
                                                                     -> Maybe Offset
                                                                     -> m (JobStatus 'Safe JobLog))
                                                                    :<|> ((Maybe Limit
                                                                           -> Maybe Offset
                                                                           -> m (JobStatus
                                                                                   'Safe JobLog))
                                                                          :<|> m (JobOutput
                                                                                    JobLog)))))))))
                            :<|> ((NodesToCategory -> m [Int])
                                  :<|> ((NodesToScore -> m [Int])
                                        :<|> ((SearchQuery
                                               -> Maybe Int
                                               -> Maybe Int
                                               -> Maybe OrderBy
                                               -> m SearchResult)
                                              :<|> ((ShareNodeParams -> m Int)
                                                    :<|> ((NodeId -> Maybe NodeId -> m Int)
                                                          :<|> (m [NodeId]
                                                                :<|> ((Maybe TabType
                                                                       -> Maybe Int
                                                                       -> Maybe Int
                                                                       -> Maybe OrderBy
                                                                       -> m [FacetDoc])
                                                                      :<|> (((Maybe NodeId
                                                                              -> TabType
                                                                              -> Maybe Int
                                                                              -> m (HashedResponse
                                                                                      Metrics))
                                                                             :<|> ((Maybe NodeId
                                                                                    -> TabType
                                                                                    -> Maybe Int
                                                                                    -> m ())
                                                                                   :<|> (Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> m Text)))
                                                                            :<|> (((Maybe UTCTime
                                                                                    -> Maybe UTCTime
                                                                                    -> Maybe NodeId
                                                                                    -> TabType
                                                                                    -> m (HashedResponse
                                                                                            (ChartMetrics
                                                                                               Histo)))
                                                                                   :<|> ((Maybe
                                                                                            NodeId
                                                                                          -> TabType
                                                                                          -> Maybe
                                                                                               Int
                                                                                          -> m ())
                                                                                         :<|> (Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> m Text)))
                                                                                  :<|> (((Maybe
                                                                                            UTCTime
                                                                                          -> Maybe
                                                                                               UTCTime
                                                                                          -> Maybe
                                                                                               NodeId
                                                                                          -> TabType
                                                                                          -> m (HashedResponse
                                                                                                  (ChartMetrics
                                                                                                     Histo)))
                                                                                         :<|> ((Maybe
                                                                                                  NodeId
                                                                                                -> TabType
                                                                                                -> Maybe
                                                                                                     Int
                                                                                                -> m ())
                                                                                               :<|> (Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> m Text)))
                                                                                        :<|> (((Maybe
                                                                                                  UTCTime
                                                                                                -> Maybe
                                                                                                     UTCTime
                                                                                                -> Maybe
                                                                                                     NodeId
                                                                                                -> TabType
                                                                                                -> ListType
                                                                                                -> m (HashedResponse
                                                                                                        (ChartMetrics
                                                                                                           (Vector
                                                                                                              NgramsTree))))
                                                                                               :<|> ((Maybe
                                                                                                        NodeId
                                                                                                      -> TabType
                                                                                                      -> ListType
                                                                                                      -> m ())
                                                                                                     :<|> (Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> ListType
                                                                                                           -> m Text)))
                                                                                              :<|> (((Maybe
                                                                                                        NodeId
                                                                                                      -> Maybe
                                                                                                           Int
                                                                                                      -> Maybe
                                                                                                           Int
                                                                                                      -> m SVG)
                                                                                                     :<|> (Maybe
                                                                                                             NodeId
                                                                                                           -> m NodeId))
                                                                                                    :<|> ((NodeId
                                                                                                           -> m [Int])
                                                                                                          :<|> ((NodeId
                                                                                                                 -> m Int)
                                                                                                                :<|> (m (Headers
                                                                                                                           '[Header
                                                                                                                               "Content-Type"
                                                                                                                               Text]
                                                                                                                           BSResponse)
                                                                                                                      :<|> ((m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog)
                                                                                                                             :<|> ((JobInput
                                                                                                                                      Maybe
                                                                                                                                      NewWithFile
                                                                                                                                    -> m (JobStatus
                                                                                                                                            'Safe
                                                                                                                                            JobLog))
                                                                                                                                   :<|> (ID
                                                                                                                                           'Unsafe
                                                                                                                                           "job"
                                                                                                                                         -> (Maybe
                                                                                                                                               Limit
                                                                                                                                             -> Maybe
                                                                                                                                                  Offset
                                                                                                                                             -> m (JobStatus
                                                                                                                                                     'Safe
                                                                                                                                                     JobLog))
                                                                                                                                            :<|> ((Maybe
                                                                                                                                                     Limit
                                                                                                                                                   -> Maybe
                                                                                                                                                        Offset
                                                                                                                                                   -> m (JobStatus
                                                                                                                                                           'Safe
                                                                                                                                                           JobLog))
                                                                                                                                                  :<|> m (JobOutput
                                                                                                                                                            JobLog)))))
                                                                                                                            :<|> ((m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog)
                                                                                                                                   :<|> ((JobInput
                                                                                                                                            Maybe
                                                                                                                                            Params
                                                                                                                                          -> m (JobStatus
                                                                                                                                                  'Safe
                                                                                                                                                  JobLog))
                                                                                                                                         :<|> (ID
                                                                                                                                                 'Unsafe
                                                                                                                                                 "job"
                                                                                                                                               -> (Maybe
                                                                                                                                                     Limit
                                                                                                                                                   -> Maybe
                                                                                                                                                        Offset
                                                                                                                                                   -> m (JobStatus
                                                                                                                                                           'Safe
                                                                                                                                                           JobLog))
                                                                                                                                                  :<|> ((Maybe
                                                                                                                                                           Limit
                                                                                                                                                         -> Maybe
                                                                                                                                                              Offset
                                                                                                                                                         -> m (JobStatus
                                                                                                                                                                 'Safe
                                                                                                                                                                 JobLog))
                                                                                                                                                        :<|> m (JobOutput
                                                                                                                                                                  JobLog)))))
                                                                                                                                  :<|> (m (JobStatus
                                                                                                                                             'Safe
                                                                                                                                             JobLog)
                                                                                                                                        :<|> ((JobInput
                                                                                                                                                 Maybe
                                                                                                                                                 DocumentUpload
                                                                                                                                               -> m (JobStatus
                                                                                                                                                       'Safe
                                                                                                                                                       JobLog))
                                                                                                                                              :<|> (ID
                                                                                                                                                      'Unsafe
                                                                                                                                                      "job"
                                                                                                                                                    -> (Maybe
                                                                                                                                                          Limit
                                                                                                                                                        -> Maybe
                                                                                                                                                             Offset
                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog))
                                                                                                                                                       :<|> ((Maybe
                                                                                                                                                                Limit
                                                                                                                                                              -> Maybe
                                                                                                                                                                   Offset
                                                                                                                                                              -> m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog))
                                                                                                                                                             :<|> m (JobOutput
                                                                                                                                                                       JobLog)))))))))))))))))))))))))))
-> (a -> m Int)
   :<|> ((m (JobStatus 'Safe JobLog)
          :<|> ((JobInput Maybe UpdateNodeParams
                 -> m (JobStatus 'Safe JobLog))
                :<|> (ID 'Unsafe "job"
                      -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> m (JobOutput JobLog)))))
         :<|> (m Int
               :<|> ((Maybe NodeType
                      -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
                     :<|> (((Maybe TabType
                             -> Maybe NodeId
                             -> Maybe Int
                             -> Maybe Int
                             -> Maybe OrderBy
                             -> Maybe Text
                             -> m (HashedResponse FacetTableResult))
                            :<|> ((TableQuery -> m FacetTableResult)
                                  :<|> (Maybe TabType -> m Text)))
                           :<|> (((TabType
                                   -> NodeId
                                   -> Int
                                   -> Maybe Int
                                   -> Maybe ListType
                                   -> Maybe Int
                                   -> Maybe Int
                                   -> Maybe OrderBy
                                   -> Maybe Text
                                   -> m (VersionedWithCount NgramsTable))
                                  :<|> ((TabType
                                         -> NodeId
                                         -> Versioned NgramsTablePatch
                                         -> m (Versioned NgramsTablePatch))
                                        :<|> ((TabType -> NodeId -> m Int)
                                              :<|> ((TabType -> NodeId -> m Int)
                                                    :<|> (m (JobStatus 'Safe JobLog)
                                                          :<|> ((JobInput
                                                                   Maybe UpdateTableNgramsCharts
                                                                 -> m (JobStatus 'Safe JobLog))
                                                                :<|> (ID 'Unsafe "job"
                                                                      -> (Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> ((Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> m (JobOutput
                                                                                         JobLog)))))))))
                                 :<|> ((NodesToCategory -> m [Int])
                                       :<|> ((NodesToScore -> m [Int])
                                             :<|> ((SearchQuery
                                                    -> Maybe Int
                                                    -> Maybe Int
                                                    -> Maybe OrderBy
                                                    -> m SearchResult)
                                                   :<|> ((ShareNodeParams -> m Int)
                                                         :<|> ((NodeId -> Maybe NodeId -> m Int)
                                                               :<|> (m [NodeId]
                                                                     :<|> ((Maybe TabType
                                                                            -> Maybe Int
                                                                            -> Maybe Int
                                                                            -> Maybe OrderBy
                                                                            -> m [FacetDoc])
                                                                           :<|> (((Maybe NodeId
                                                                                   -> TabType
                                                                                   -> Maybe Int
                                                                                   -> m (HashedResponse
                                                                                           Metrics))
                                                                                  :<|> ((Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> m ())
                                                                                        :<|> (Maybe
                                                                                                NodeId
                                                                                              -> TabType
                                                                                              -> m Text)))
                                                                                 :<|> (((Maybe
                                                                                           UTCTime
                                                                                         -> Maybe
                                                                                              UTCTime
                                                                                         -> Maybe
                                                                                              NodeId
                                                                                         -> TabType
                                                                                         -> m (HashedResponse
                                                                                                 (ChartMetrics
                                                                                                    Histo)))
                                                                                        :<|> ((Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> m ())
                                                                                              :<|> (Maybe
                                                                                                      NodeId
                                                                                                    -> TabType
                                                                                                    -> m Text)))
                                                                                       :<|> (((Maybe
                                                                                                 UTCTime
                                                                                               -> Maybe
                                                                                                    UTCTime
                                                                                               -> Maybe
                                                                                                    NodeId
                                                                                               -> TabType
                                                                                               -> m (HashedResponse
                                                                                                       (ChartMetrics
                                                                                                          Histo)))
                                                                                              :<|> ((Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> m ())
                                                                                                    :<|> (Maybe
                                                                                                            NodeId
                                                                                                          -> TabType
                                                                                                          -> m Text)))
                                                                                             :<|> (((Maybe
                                                                                                       UTCTime
                                                                                                     -> Maybe
                                                                                                          UTCTime
                                                                                                     -> Maybe
                                                                                                          NodeId
                                                                                                     -> TabType
                                                                                                     -> ListType
                                                                                                     -> m (HashedResponse
                                                                                                             (ChartMetrics
                                                                                                                (Vector
                                                                                                                   NgramsTree))))
                                                                                                    :<|> ((Maybe
                                                                                                             NodeId
                                                                                                           -> TabType
                                                                                                           -> ListType
                                                                                                           -> m ())
                                                                                                          :<|> (Maybe
                                                                                                                  NodeId
                                                                                                                -> TabType
                                                                                                                -> ListType
                                                                                                                -> m Text)))
                                                                                                   :<|> (((Maybe
                                                                                                             NodeId
                                                                                                           -> Maybe
                                                                                                                Int
                                                                                                           -> Maybe
                                                                                                                Int
                                                                                                           -> m SVG)
                                                                                                          :<|> (Maybe
                                                                                                                  NodeId
                                                                                                                -> m NodeId))
                                                                                                         :<|> ((NodeId
                                                                                                                -> m [Int])
                                                                                                               :<|> ((NodeId
                                                                                                                      -> m Int)
                                                                                                                     :<|> (m (Headers
                                                                                                                                '[Header
                                                                                                                                    "Content-Type"
                                                                                                                                    Text]
                                                                                                                                BSResponse)
                                                                                                                           :<|> ((m (JobStatus
                                                                                                                                       'Safe
                                                                                                                                       JobLog)
                                                                                                                                  :<|> ((JobInput
                                                                                                                                           Maybe
                                                                                                                                           NewWithFile
                                                                                                                                         -> m (JobStatus
                                                                                                                                                 'Safe
                                                                                                                                                 JobLog))
                                                                                                                                        :<|> (ID
                                                                                                                                                'Unsafe
                                                                                                                                                "job"
                                                                                                                                              -> (Maybe
                                                                                                                                                    Limit
                                                                                                                                                  -> Maybe
                                                                                                                                                       Offset
                                                                                                                                                  -> m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog))
                                                                                                                                                 :<|> ((Maybe
                                                                                                                                                          Limit
                                                                                                                                                        -> Maybe
                                                                                                                                                             Offset
                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog))
                                                                                                                                                       :<|> m (JobOutput
                                                                                                                                                                 JobLog)))))
                                                                                                                                 :<|> ((m (JobStatus
                                                                                                                                             'Safe
                                                                                                                                             JobLog)
                                                                                                                                        :<|> ((JobInput
                                                                                                                                                 Maybe
                                                                                                                                                 Params
                                                                                                                                               -> m (JobStatus
                                                                                                                                                       'Safe
                                                                                                                                                       JobLog))
                                                                                                                                              :<|> (ID
                                                                                                                                                      'Unsafe
                                                                                                                                                      "job"
                                                                                                                                                    -> (Maybe
                                                                                                                                                          Limit
                                                                                                                                                        -> Maybe
                                                                                                                                                             Offset
                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog))
                                                                                                                                                       :<|> ((Maybe
                                                                                                                                                                Limit
                                                                                                                                                              -> Maybe
                                                                                                                                                                   Offset
                                                                                                                                                              -> m (JobStatus
                                                                                                                                                                      'Safe
                                                                                                                                                                      JobLog))
                                                                                                                                                             :<|> m (JobOutput
                                                                                                                                                                       JobLog)))))
                                                                                                                                       :<|> (m (JobStatus
                                                                                                                                                  'Safe
                                                                                                                                                  JobLog)
                                                                                                                                             :<|> ((JobInput
                                                                                                                                                      Maybe
                                                                                                                                                      DocumentUpload
                                                                                                                                                    -> m (JobStatus
                                                                                                                                                            'Safe
                                                                                                                                                            JobLog))
                                                                                                                                                   :<|> (ID
                                                                                                                                                           'Unsafe
                                                                                                                                                           "job"
                                                                                                                                                         -> (Maybe
                                                                                                                                                               Limit
                                                                                                                                                             -> Maybe
                                                                                                                                                                  Offset
                                                                                                                                                             -> m (JobStatus
                                                                                                                                                                     'Safe
                                                                                                                                                                     JobLog))
                                                                                                                                                            :<|> ((Maybe
                                                                                                                                                                     Limit
                                                                                                                                                                   -> Maybe
                                                                                                                                                                        Offset
                                                                                                                                                                   -> m (JobStatus
                                                                                                                                                                           'Safe
                                                                                                                                                                           JobLog))
                                                                                                                                                                  :<|> m (JobOutput
                                                                                                                                                                            JobLog)))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer API
Update.api  Int
uId NodeId
id'
           (m (JobStatus 'Safe JobLog)
 :<|> ((JobInput Maybe UpdateNodeParams
        -> m (JobStatus 'Safe JobLog))
       :<|> (ID 'Unsafe "job"
             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                      :<|> m (JobOutput JobLog)))))
-> (m Int
    :<|> ((Maybe NodeType
           -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
          :<|> (((Maybe TabType
                  -> Maybe NodeId
                  -> Maybe Int
                  -> Maybe Int
                  -> Maybe OrderBy
                  -> Maybe Text
                  -> m (HashedResponse FacetTableResult))
                 :<|> ((TableQuery -> m FacetTableResult)
                       :<|> (Maybe TabType -> m Text)))
                :<|> (((TabType
                        -> NodeId
                        -> Int
                        -> Maybe Int
                        -> Maybe ListType
                        -> Maybe Int
                        -> Maybe Int
                        -> Maybe OrderBy
                        -> Maybe Text
                        -> m (VersionedWithCount NgramsTable))
                       :<|> ((TabType
                              -> NodeId
                              -> Versioned NgramsTablePatch
                              -> m (Versioned NgramsTablePatch))
                             :<|> ((TabType -> NodeId -> m Int)
                                   :<|> ((TabType -> NodeId -> m Int)
                                         :<|> (m (JobStatus 'Safe JobLog)
                                               :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                                      -> m (JobStatus 'Safe JobLog))
                                                     :<|> (ID 'Unsafe "job"
                                                           -> (Maybe Limit
                                                               -> Maybe Offset
                                                               -> m (JobStatus 'Safe JobLog))
                                                              :<|> ((Maybe Limit
                                                                     -> Maybe Offset
                                                                     -> m (JobStatus 'Safe JobLog))
                                                                    :<|> m (JobOutput
                                                                              JobLog)))))))))
                      :<|> ((NodesToCategory -> m [Int])
                            :<|> ((NodesToScore -> m [Int])
                                  :<|> ((SearchQuery
                                         -> Maybe Int
                                         -> Maybe Int
                                         -> Maybe OrderBy
                                         -> m SearchResult)
                                        :<|> ((ShareNodeParams -> m Int)
                                              :<|> ((NodeId -> Maybe NodeId -> m Int)
                                                    :<|> (m [NodeId]
                                                          :<|> ((Maybe TabType
                                                                 -> Maybe Int
                                                                 -> Maybe Int
                                                                 -> Maybe OrderBy
                                                                 -> m [FacetDoc])
                                                                :<|> (((Maybe NodeId
                                                                        -> TabType
                                                                        -> Maybe Int
                                                                        -> m (HashedResponse
                                                                                Metrics))
                                                                       :<|> ((Maybe NodeId
                                                                              -> TabType
                                                                              -> Maybe Int
                                                                              -> m ())
                                                                             :<|> (Maybe NodeId
                                                                                   -> TabType
                                                                                   -> m Text)))
                                                                      :<|> (((Maybe UTCTime
                                                                              -> Maybe UTCTime
                                                                              -> Maybe NodeId
                                                                              -> TabType
                                                                              -> m (HashedResponse
                                                                                      (ChartMetrics
                                                                                         Histo)))
                                                                             :<|> ((Maybe NodeId
                                                                                    -> TabType
                                                                                    -> Maybe Int
                                                                                    -> m ())
                                                                                   :<|> (Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> m Text)))
                                                                            :<|> (((Maybe UTCTime
                                                                                    -> Maybe UTCTime
                                                                                    -> Maybe NodeId
                                                                                    -> TabType
                                                                                    -> m (HashedResponse
                                                                                            (ChartMetrics
                                                                                               Histo)))
                                                                                   :<|> ((Maybe
                                                                                            NodeId
                                                                                          -> TabType
                                                                                          -> Maybe
                                                                                               Int
                                                                                          -> m ())
                                                                                         :<|> (Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> m Text)))
                                                                                  :<|> (((Maybe
                                                                                            UTCTime
                                                                                          -> Maybe
                                                                                               UTCTime
                                                                                          -> Maybe
                                                                                               NodeId
                                                                                          -> TabType
                                                                                          -> ListType
                                                                                          -> m (HashedResponse
                                                                                                  (ChartMetrics
                                                                                                     (Vector
                                                                                                        NgramsTree))))
                                                                                         :<|> ((Maybe
                                                                                                  NodeId
                                                                                                -> TabType
                                                                                                -> ListType
                                                                                                -> m ())
                                                                                               :<|> (Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> ListType
                                                                                                     -> m Text)))
                                                                                        :<|> (((Maybe
                                                                                                  NodeId
                                                                                                -> Maybe
                                                                                                     Int
                                                                                                -> Maybe
                                                                                                     Int
                                                                                                -> m SVG)
                                                                                               :<|> (Maybe
                                                                                                       NodeId
                                                                                                     -> m NodeId))
                                                                                              :<|> ((NodeId
                                                                                                     -> m [Int])
                                                                                                    :<|> ((NodeId
                                                                                                           -> m Int)
                                                                                                          :<|> (m (Headers
                                                                                                                     '[Header
                                                                                                                         "Content-Type"
                                                                                                                         Text]
                                                                                                                     BSResponse)
                                                                                                                :<|> ((m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog)
                                                                                                                       :<|> ((JobInput
                                                                                                                                Maybe
                                                                                                                                NewWithFile
                                                                                                                              -> m (JobStatus
                                                                                                                                      'Safe
                                                                                                                                      JobLog))
                                                                                                                             :<|> (ID
                                                                                                                                     'Unsafe
                                                                                                                                     "job"
                                                                                                                                   -> (Maybe
                                                                                                                                         Limit
                                                                                                                                       -> Maybe
                                                                                                                                            Offset
                                                                                                                                       -> m (JobStatus
                                                                                                                                               'Safe
                                                                                                                                               JobLog))
                                                                                                                                      :<|> ((Maybe
                                                                                                                                               Limit
                                                                                                                                             -> Maybe
                                                                                                                                                  Offset
                                                                                                                                             -> m (JobStatus
                                                                                                                                                     'Safe
                                                                                                                                                     JobLog))
                                                                                                                                            :<|> m (JobOutput
                                                                                                                                                      JobLog)))))
                                                                                                                      :<|> ((m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog)
                                                                                                                             :<|> ((JobInput
                                                                                                                                      Maybe
                                                                                                                                      Params
                                                                                                                                    -> m (JobStatus
                                                                                                                                            'Safe
                                                                                                                                            JobLog))
                                                                                                                                   :<|> (ID
                                                                                                                                           'Unsafe
                                                                                                                                           "job"
                                                                                                                                         -> (Maybe
                                                                                                                                               Limit
                                                                                                                                             -> Maybe
                                                                                                                                                  Offset
                                                                                                                                             -> m (JobStatus
                                                                                                                                                     'Safe
                                                                                                                                                     JobLog))
                                                                                                                                            :<|> ((Maybe
                                                                                                                                                     Limit
                                                                                                                                                   -> Maybe
                                                                                                                                                        Offset
                                                                                                                                                   -> m (JobStatus
                                                                                                                                                           'Safe
                                                                                                                                                           JobLog))
                                                                                                                                                  :<|> m (JobOutput
                                                                                                                                                            JobLog)))))
                                                                                                                            :<|> (m (JobStatus
                                                                                                                                       'Safe
                                                                                                                                       JobLog)
                                                                                                                                  :<|> ((JobInput
                                                                                                                                           Maybe
                                                                                                                                           DocumentUpload
                                                                                                                                         -> m (JobStatus
                                                                                                                                                 'Safe
                                                                                                                                                 JobLog))
                                                                                                                                        :<|> (ID
                                                                                                                                                'Unsafe
                                                                                                                                                "job"
                                                                                                                                              -> (Maybe
                                                                                                                                                    Limit
                                                                                                                                                  -> Maybe
                                                                                                                                                       Offset
                                                                                                                                                  -> m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog))
                                                                                                                                                 :<|> ((Maybe
                                                                                                                                                          Limit
                                                                                                                                                        -> Maybe
                                                                                                                                                             Offset
                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog))
                                                                                                                                                       :<|> m (JobOutput
                                                                                                                                                                 JobLog))))))))))))))))))))))))))
-> (m (JobStatus 'Safe JobLog)
    :<|> ((JobInput Maybe UpdateNodeParams
           -> m (JobStatus 'Safe JobLog))
          :<|> (ID 'Unsafe "job"
                -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                   :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> m (JobOutput JobLog)))))
   :<|> (m Int
         :<|> ((Maybe NodeType
                -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
               :<|> (((Maybe TabType
                       -> Maybe NodeId
                       -> Maybe Int
                       -> Maybe Int
                       -> Maybe OrderBy
                       -> Maybe Text
                       -> m (HashedResponse FacetTableResult))
                      :<|> ((TableQuery -> m FacetTableResult)
                            :<|> (Maybe TabType -> m Text)))
                     :<|> (((TabType
                             -> NodeId
                             -> Int
                             -> Maybe Int
                             -> Maybe ListType
                             -> Maybe Int
                             -> Maybe Int
                             -> Maybe OrderBy
                             -> Maybe Text
                             -> m (VersionedWithCount NgramsTable))
                            :<|> ((TabType
                                   -> NodeId
                                   -> Versioned NgramsTablePatch
                                   -> m (Versioned NgramsTablePatch))
                                  :<|> ((TabType -> NodeId -> m Int)
                                        :<|> ((TabType -> NodeId -> m Int)
                                              :<|> (m (JobStatus 'Safe JobLog)
                                                    :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                                           -> m (JobStatus 'Safe JobLog))
                                                          :<|> (ID 'Unsafe "job"
                                                                -> (Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> ((Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> m (JobOutput
                                                                                   JobLog)))))))))
                           :<|> ((NodesToCategory -> m [Int])
                                 :<|> ((NodesToScore -> m [Int])
                                       :<|> ((SearchQuery
                                              -> Maybe Int
                                              -> Maybe Int
                                              -> Maybe OrderBy
                                              -> m SearchResult)
                                             :<|> ((ShareNodeParams -> m Int)
                                                   :<|> ((NodeId -> Maybe NodeId -> m Int)
                                                         :<|> (m [NodeId]
                                                               :<|> ((Maybe TabType
                                                                      -> Maybe Int
                                                                      -> Maybe Int
                                                                      -> Maybe OrderBy
                                                                      -> m [FacetDoc])
                                                                     :<|> (((Maybe NodeId
                                                                             -> TabType
                                                                             -> Maybe Int
                                                                             -> m (HashedResponse
                                                                                     Metrics))
                                                                            :<|> ((Maybe NodeId
                                                                                   -> TabType
                                                                                   -> Maybe Int
                                                                                   -> m ())
                                                                                  :<|> (Maybe NodeId
                                                                                        -> TabType
                                                                                        -> m Text)))
                                                                           :<|> (((Maybe UTCTime
                                                                                   -> Maybe UTCTime
                                                                                   -> Maybe NodeId
                                                                                   -> TabType
                                                                                   -> m (HashedResponse
                                                                                           (ChartMetrics
                                                                                              Histo)))
                                                                                  :<|> ((Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> m ())
                                                                                        :<|> (Maybe
                                                                                                NodeId
                                                                                              -> TabType
                                                                                              -> m Text)))
                                                                                 :<|> (((Maybe
                                                                                           UTCTime
                                                                                         -> Maybe
                                                                                              UTCTime
                                                                                         -> Maybe
                                                                                              NodeId
                                                                                         -> TabType
                                                                                         -> m (HashedResponse
                                                                                                 (ChartMetrics
                                                                                                    Histo)))
                                                                                        :<|> ((Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> m ())
                                                                                              :<|> (Maybe
                                                                                                      NodeId
                                                                                                    -> TabType
                                                                                                    -> m Text)))
                                                                                       :<|> (((Maybe
                                                                                                 UTCTime
                                                                                               -> Maybe
                                                                                                    UTCTime
                                                                                               -> Maybe
                                                                                                    NodeId
                                                                                               -> TabType
                                                                                               -> ListType
                                                                                               -> m (HashedResponse
                                                                                                       (ChartMetrics
                                                                                                          (Vector
                                                                                                             NgramsTree))))
                                                                                              :<|> ((Maybe
                                                                                                       NodeId
                                                                                                     -> TabType
                                                                                                     -> ListType
                                                                                                     -> m ())
                                                                                                    :<|> (Maybe
                                                                                                            NodeId
                                                                                                          -> TabType
                                                                                                          -> ListType
                                                                                                          -> m Text)))
                                                                                             :<|> (((Maybe
                                                                                                       NodeId
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> Maybe
                                                                                                          Int
                                                                                                     -> m SVG)
                                                                                                    :<|> (Maybe
                                                                                                            NodeId
                                                                                                          -> m NodeId))
                                                                                                   :<|> ((NodeId
                                                                                                          -> m [Int])
                                                                                                         :<|> ((NodeId
                                                                                                                -> m Int)
                                                                                                               :<|> (m (Headers
                                                                                                                          '[Header
                                                                                                                              "Content-Type"
                                                                                                                              Text]
                                                                                                                          BSResponse)
                                                                                                                     :<|> ((m (JobStatus
                                                                                                                                 'Safe
                                                                                                                                 JobLog)
                                                                                                                            :<|> ((JobInput
                                                                                                                                     Maybe
                                                                                                                                     NewWithFile
                                                                                                                                   -> m (JobStatus
                                                                                                                                           'Safe
                                                                                                                                           JobLog))
                                                                                                                                  :<|> (ID
                                                                                                                                          'Unsafe
                                                                                                                                          "job"
                                                                                                                                        -> (Maybe
                                                                                                                                              Limit
                                                                                                                                            -> Maybe
                                                                                                                                                 Offset
                                                                                                                                            -> m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog))
                                                                                                                                           :<|> ((Maybe
                                                                                                                                                    Limit
                                                                                                                                                  -> Maybe
                                                                                                                                                       Offset
                                                                                                                                                  -> m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog))
                                                                                                                                                 :<|> m (JobOutput
                                                                                                                                                           JobLog)))))
                                                                                                                           :<|> ((m (JobStatus
                                                                                                                                       'Safe
                                                                                                                                       JobLog)
                                                                                                                                  :<|> ((JobInput
                                                                                                                                           Maybe
                                                                                                                                           Params
                                                                                                                                         -> m (JobStatus
                                                                                                                                                 'Safe
                                                                                                                                                 JobLog))
                                                                                                                                        :<|> (ID
                                                                                                                                                'Unsafe
                                                                                                                                                "job"
                                                                                                                                              -> (Maybe
                                                                                                                                                    Limit
                                                                                                                                                  -> Maybe
                                                                                                                                                       Offset
                                                                                                                                                  -> m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog))
                                                                                                                                                 :<|> ((Maybe
                                                                                                                                                          Limit
                                                                                                                                                        -> Maybe
                                                                                                                                                             Offset
                                                                                                                                                        -> m (JobStatus
                                                                                                                                                                'Safe
                                                                                                                                                                JobLog))
                                                                                                                                                       :<|> m (JobOutput
                                                                                                                                                                 JobLog)))))
                                                                                                                                 :<|> (m (JobStatus
                                                                                                                                            'Safe
                                                                                                                                            JobLog)
                                                                                                                                       :<|> ((JobInput
                                                                                                                                                Maybe
                                                                                                                                                DocumentUpload
                                                                                                                                              -> m (JobStatus
                                                                                                                                                      'Safe
                                                                                                                                                      JobLog))
                                                                                                                                             :<|> (ID
                                                                                                                                                     'Unsafe
                                                                                                                                                     "job"
                                                                                                                                                   -> (Maybe
                                                                                                                                                         Limit
                                                                                                                                                       -> Maybe
                                                                                                                                                            Offset
                                                                                                                                                       -> m (JobStatus
                                                                                                                                                               'Safe
                                                                                                                                                               JobLog))
                                                                                                                                                      :<|> ((Maybe
                                                                                                                                                               Limit
                                                                                                                                                             -> Maybe
                                                                                                                                                                  Offset
                                                                                                                                                             -> m (JobStatus
                                                                                                                                                                     'Safe
                                                                                                                                                                     JobLog))
                                                                                                                                                            :<|> m (JobOutput
                                                                                                                                                                      JobLog))))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> User -> NodeId -> Cmd' env err Int
forall env err.
(HasMail env, HasConfig env, HasConnectionPool env,
 HasNodeError err) =>
User -> NodeId -> Cmd' env err Int
Action.deleteNode (NodeId -> User
RootId (NodeId -> User) -> NodeId -> User
forall a b. (a -> b) -> a -> b
$ Int -> NodeId
NodeId Int
uId) NodeId
id'
           m Int
-> ((Maybe NodeType
     -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
    :<|> (((Maybe TabType
            -> Maybe NodeId
            -> Maybe Int
            -> Maybe Int
            -> Maybe OrderBy
            -> Maybe Text
            -> m (HashedResponse FacetTableResult))
           :<|> ((TableQuery -> m FacetTableResult)
                 :<|> (Maybe TabType -> m Text)))
          :<|> (((TabType
                  -> NodeId
                  -> Int
                  -> Maybe Int
                  -> Maybe ListType
                  -> Maybe Int
                  -> Maybe Int
                  -> Maybe OrderBy
                  -> Maybe Text
                  -> m (VersionedWithCount NgramsTable))
                 :<|> ((TabType
                        -> NodeId
                        -> Versioned NgramsTablePatch
                        -> m (Versioned NgramsTablePatch))
                       :<|> ((TabType -> NodeId -> m Int)
                             :<|> ((TabType -> NodeId -> m Int)
                                   :<|> (m (JobStatus 'Safe JobLog)
                                         :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                                -> m (JobStatus 'Safe JobLog))
                                               :<|> (ID 'Unsafe "job"
                                                     -> (Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> ((Maybe Limit
                                                               -> Maybe Offset
                                                               -> m (JobStatus 'Safe JobLog))
                                                              :<|> m (JobOutput JobLog)))))))))
                :<|> ((NodesToCategory -> m [Int])
                      :<|> ((NodesToScore -> m [Int])
                            :<|> ((SearchQuery
                                   -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                                  :<|> ((ShareNodeParams -> m Int)
                                        :<|> ((NodeId -> Maybe NodeId -> m Int)
                                              :<|> (m [NodeId]
                                                    :<|> ((Maybe TabType
                                                           -> Maybe Int
                                                           -> Maybe Int
                                                           -> Maybe OrderBy
                                                           -> m [FacetDoc])
                                                          :<|> (((Maybe NodeId
                                                                  -> TabType
                                                                  -> Maybe Int
                                                                  -> m (HashedResponse Metrics))
                                                                 :<|> ((Maybe NodeId
                                                                        -> TabType
                                                                        -> Maybe Int
                                                                        -> m ())
                                                                       :<|> (Maybe NodeId
                                                                             -> TabType -> m Text)))
                                                                :<|> (((Maybe UTCTime
                                                                        -> Maybe UTCTime
                                                                        -> Maybe NodeId
                                                                        -> TabType
                                                                        -> m (HashedResponse
                                                                                (ChartMetrics
                                                                                   Histo)))
                                                                       :<|> ((Maybe NodeId
                                                                              -> TabType
                                                                              -> Maybe Int
                                                                              -> m ())
                                                                             :<|> (Maybe NodeId
                                                                                   -> TabType
                                                                                   -> m Text)))
                                                                      :<|> (((Maybe UTCTime
                                                                              -> Maybe UTCTime
                                                                              -> Maybe NodeId
                                                                              -> TabType
                                                                              -> m (HashedResponse
                                                                                      (ChartMetrics
                                                                                         Histo)))
                                                                             :<|> ((Maybe NodeId
                                                                                    -> TabType
                                                                                    -> Maybe Int
                                                                                    -> m ())
                                                                                   :<|> (Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> m Text)))
                                                                            :<|> (((Maybe UTCTime
                                                                                    -> Maybe UTCTime
                                                                                    -> Maybe NodeId
                                                                                    -> TabType
                                                                                    -> ListType
                                                                                    -> m (HashedResponse
                                                                                            (ChartMetrics
                                                                                               (Vector
                                                                                                  NgramsTree))))
                                                                                   :<|> ((Maybe
                                                                                            NodeId
                                                                                          -> TabType
                                                                                          -> ListType
                                                                                          -> m ())
                                                                                         :<|> (Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> ListType
                                                                                               -> m Text)))
                                                                                  :<|> (((Maybe
                                                                                            NodeId
                                                                                          -> Maybe
                                                                                               Int
                                                                                          -> Maybe
                                                                                               Int
                                                                                          -> m SVG)
                                                                                         :<|> (Maybe
                                                                                                 NodeId
                                                                                               -> m NodeId))
                                                                                        :<|> ((NodeId
                                                                                               -> m [Int])
                                                                                              :<|> ((NodeId
                                                                                                     -> m Int)
                                                                                                    :<|> (m (Headers
                                                                                                               '[Header
                                                                                                                   "Content-Type"
                                                                                                                   Text]
                                                                                                               BSResponse)
                                                                                                          :<|> ((m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog)
                                                                                                                 :<|> ((JobInput
                                                                                                                          Maybe
                                                                                                                          NewWithFile
                                                                                                                        -> m (JobStatus
                                                                                                                                'Safe
                                                                                                                                JobLog))
                                                                                                                       :<|> (ID
                                                                                                                               'Unsafe
                                                                                                                               "job"
                                                                                                                             -> (Maybe
                                                                                                                                   Limit
                                                                                                                                 -> Maybe
                                                                                                                                      Offset
                                                                                                                                 -> m (JobStatus
                                                                                                                                         'Safe
                                                                                                                                         JobLog))
                                                                                                                                :<|> ((Maybe
                                                                                                                                         Limit
                                                                                                                                       -> Maybe
                                                                                                                                            Offset
                                                                                                                                       -> m (JobStatus
                                                                                                                                               'Safe
                                                                                                                                               JobLog))
                                                                                                                                      :<|> m (JobOutput
                                                                                                                                                JobLog)))))
                                                                                                                :<|> ((m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog)
                                                                                                                       :<|> ((JobInput
                                                                                                                                Maybe
                                                                                                                                Params
                                                                                                                              -> m (JobStatus
                                                                                                                                      'Safe
                                                                                                                                      JobLog))
                                                                                                                             :<|> (ID
                                                                                                                                     'Unsafe
                                                                                                                                     "job"
                                                                                                                                   -> (Maybe
                                                                                                                                         Limit
                                                                                                                                       -> Maybe
                                                                                                                                            Offset
                                                                                                                                       -> m (JobStatus
                                                                                                                                               'Safe
                                                                                                                                               JobLog))
                                                                                                                                      :<|> ((Maybe
                                                                                                                                               Limit
                                                                                                                                             -> Maybe
                                                                                                                                                  Offset
                                                                                                                                             -> m (JobStatus
                                                                                                                                                     'Safe
                                                                                                                                                     JobLog))
                                                                                                                                            :<|> m (JobOutput
                                                                                                                                                      JobLog)))))
                                                                                                                      :<|> (m (JobStatus
                                                                                                                                 'Safe
                                                                                                                                 JobLog)
                                                                                                                            :<|> ((JobInput
                                                                                                                                     Maybe
                                                                                                                                     DocumentUpload
                                                                                                                                   -> m (JobStatus
                                                                                                                                           'Safe
                                                                                                                                           JobLog))
                                                                                                                                  :<|> (ID
                                                                                                                                          'Unsafe
                                                                                                                                          "job"
                                                                                                                                        -> (Maybe
                                                                                                                                              Limit
                                                                                                                                            -> Maybe
                                                                                                                                                 Offset
                                                                                                                                            -> m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog))
                                                                                                                                           :<|> ((Maybe
                                                                                                                                                    Limit
                                                                                                                                                  -> Maybe
                                                                                                                                                       Offset
                                                                                                                                                  -> m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog))
                                                                                                                                                 :<|> m (JobOutput
                                                                                                                                                           JobLog)))))))))))))))))))))))))
-> m Int
   :<|> ((Maybe NodeType
          -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
         :<|> (((Maybe TabType
                 -> Maybe NodeId
                 -> Maybe Int
                 -> Maybe Int
                 -> Maybe OrderBy
                 -> Maybe Text
                 -> m (HashedResponse FacetTableResult))
                :<|> ((TableQuery -> m FacetTableResult)
                      :<|> (Maybe TabType -> m Text)))
               :<|> (((TabType
                       -> NodeId
                       -> Int
                       -> Maybe Int
                       -> Maybe ListType
                       -> Maybe Int
                       -> Maybe Int
                       -> Maybe OrderBy
                       -> Maybe Text
                       -> m (VersionedWithCount NgramsTable))
                      :<|> ((TabType
                             -> NodeId
                             -> Versioned NgramsTablePatch
                             -> m (Versioned NgramsTablePatch))
                            :<|> ((TabType -> NodeId -> m Int)
                                  :<|> ((TabType -> NodeId -> m Int)
                                        :<|> (m (JobStatus 'Safe JobLog)
                                              :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                                     -> m (JobStatus 'Safe JobLog))
                                                    :<|> (ID 'Unsafe "job"
                                                          -> (Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> ((Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> m (JobOutput JobLog)))))))))
                     :<|> ((NodesToCategory -> m [Int])
                           :<|> ((NodesToScore -> m [Int])
                                 :<|> ((SearchQuery
                                        -> Maybe Int
                                        -> Maybe Int
                                        -> Maybe OrderBy
                                        -> m SearchResult)
                                       :<|> ((ShareNodeParams -> m Int)
                                             :<|> ((NodeId -> Maybe NodeId -> m Int)
                                                   :<|> (m [NodeId]
                                                         :<|> ((Maybe TabType
                                                                -> Maybe Int
                                                                -> Maybe Int
                                                                -> Maybe OrderBy
                                                                -> m [FacetDoc])
                                                               :<|> (((Maybe NodeId
                                                                       -> TabType
                                                                       -> Maybe Int
                                                                       -> m (HashedResponse
                                                                               Metrics))
                                                                      :<|> ((Maybe NodeId
                                                                             -> TabType
                                                                             -> Maybe Int
                                                                             -> m ())
                                                                            :<|> (Maybe NodeId
                                                                                  -> TabType
                                                                                  -> m Text)))
                                                                     :<|> (((Maybe UTCTime
                                                                             -> Maybe UTCTime
                                                                             -> Maybe NodeId
                                                                             -> TabType
                                                                             -> m (HashedResponse
                                                                                     (ChartMetrics
                                                                                        Histo)))
                                                                            :<|> ((Maybe NodeId
                                                                                   -> TabType
                                                                                   -> Maybe Int
                                                                                   -> m ())
                                                                                  :<|> (Maybe NodeId
                                                                                        -> TabType
                                                                                        -> m Text)))
                                                                           :<|> (((Maybe UTCTime
                                                                                   -> Maybe UTCTime
                                                                                   -> Maybe NodeId
                                                                                   -> TabType
                                                                                   -> m (HashedResponse
                                                                                           (ChartMetrics
                                                                                              Histo)))
                                                                                  :<|> ((Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> m ())
                                                                                        :<|> (Maybe
                                                                                                NodeId
                                                                                              -> TabType
                                                                                              -> m Text)))
                                                                                 :<|> (((Maybe
                                                                                           UTCTime
                                                                                         -> Maybe
                                                                                              UTCTime
                                                                                         -> Maybe
                                                                                              NodeId
                                                                                         -> TabType
                                                                                         -> ListType
                                                                                         -> m (HashedResponse
                                                                                                 (ChartMetrics
                                                                                                    (Vector
                                                                                                       NgramsTree))))
                                                                                        :<|> ((Maybe
                                                                                                 NodeId
                                                                                               -> TabType
                                                                                               -> ListType
                                                                                               -> m ())
                                                                                              :<|> (Maybe
                                                                                                      NodeId
                                                                                                    -> TabType
                                                                                                    -> ListType
                                                                                                    -> m Text)))
                                                                                       :<|> (((Maybe
                                                                                                 NodeId
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> Maybe
                                                                                                    Int
                                                                                               -> m SVG)
                                                                                              :<|> (Maybe
                                                                                                      NodeId
                                                                                                    -> m NodeId))
                                                                                             :<|> ((NodeId
                                                                                                    -> m [Int])
                                                                                                   :<|> ((NodeId
                                                                                                          -> m Int)
                                                                                                         :<|> (m (Headers
                                                                                                                    '[Header
                                                                                                                        "Content-Type"
                                                                                                                        Text]
                                                                                                                    BSResponse)
                                                                                                               :<|> ((m (JobStatus
                                                                                                                           'Safe
                                                                                                                           JobLog)
                                                                                                                      :<|> ((JobInput
                                                                                                                               Maybe
                                                                                                                               NewWithFile
                                                                                                                             -> m (JobStatus
                                                                                                                                     'Safe
                                                                                                                                     JobLog))
                                                                                                                            :<|> (ID
                                                                                                                                    'Unsafe
                                                                                                                                    "job"
                                                                                                                                  -> (Maybe
                                                                                                                                        Limit
                                                                                                                                      -> Maybe
                                                                                                                                           Offset
                                                                                                                                      -> m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog))
                                                                                                                                     :<|> ((Maybe
                                                                                                                                              Limit
                                                                                                                                            -> Maybe
                                                                                                                                                 Offset
                                                                                                                                            -> m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog))
                                                                                                                                           :<|> m (JobOutput
                                                                                                                                                     JobLog)))))
                                                                                                                     :<|> ((m (JobStatus
                                                                                                                                 'Safe
                                                                                                                                 JobLog)
                                                                                                                            :<|> ((JobInput
                                                                                                                                     Maybe
                                                                                                                                     Params
                                                                                                                                   -> m (JobStatus
                                                                                                                                           'Safe
                                                                                                                                           JobLog))
                                                                                                                                  :<|> (ID
                                                                                                                                          'Unsafe
                                                                                                                                          "job"
                                                                                                                                        -> (Maybe
                                                                                                                                              Limit
                                                                                                                                            -> Maybe
                                                                                                                                                 Offset
                                                                                                                                            -> m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog))
                                                                                                                                           :<|> ((Maybe
                                                                                                                                                    Limit
                                                                                                                                                  -> Maybe
                                                                                                                                                       Offset
                                                                                                                                                  -> m (JobStatus
                                                                                                                                                          'Safe
                                                                                                                                                          JobLog))
                                                                                                                                                 :<|> m (JobOutput
                                                                                                                                                           JobLog)))))
                                                                                                                           :<|> (m (JobStatus
                                                                                                                                      'Safe
                                                                                                                                      JobLog)
                                                                                                                                 :<|> ((JobInput
                                                                                                                                          Maybe
                                                                                                                                          DocumentUpload
                                                                                                                                        -> m (JobStatus
                                                                                                                                                'Safe
                                                                                                                                                JobLog))
                                                                                                                                       :<|> (ID
                                                                                                                                               'Unsafe
                                                                                                                                               "job"
                                                                                                                                             -> (Maybe
                                                                                                                                                   Limit
                                                                                                                                                 -> Maybe
                                                                                                                                                      Offset
                                                                                                                                                 -> m (JobStatus
                                                                                                                                                         'Safe
                                                                                                                                                         JobLog))
                                                                                                                                                :<|> ((Maybe
                                                                                                                                                         Limit
                                                                                                                                                       -> Maybe
                                                                                                                                                            Offset
                                                                                                                                                       -> m (JobStatus
                                                                                                                                                               'Safe
                                                                                                                                                               JobLog))
                                                                                                                                                      :<|> m (JobOutput
                                                                                                                                                                JobLog)))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId
-> proxy a
-> Maybe NodeType
-> Maybe Int
-> Maybe Int
-> Cmd err (NodeTableResult a)
forall a (proxy :: * -> *) err.
(JSONB a, HasDBid NodeType) =>
NodeId
-> proxy a
-> Maybe NodeType
-> Maybe Int
-> Maybe Int
-> Cmd err (NodeTableResult a)
getChildren   NodeId
id' proxy a
p

           -- TODO gather it
           (Maybe NodeType -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
-> (((Maybe TabType
      -> Maybe NodeId
      -> Maybe Int
      -> Maybe Int
      -> Maybe OrderBy
      -> Maybe Text
      -> m (HashedResponse FacetTableResult))
     :<|> ((TableQuery -> m FacetTableResult)
           :<|> (Maybe TabType -> m Text)))
    :<|> (((TabType
            -> NodeId
            -> Int
            -> Maybe Int
            -> Maybe ListType
            -> Maybe Int
            -> Maybe Int
            -> Maybe OrderBy
            -> Maybe Text
            -> m (VersionedWithCount NgramsTable))
           :<|> ((TabType
                  -> NodeId
                  -> Versioned NgramsTablePatch
                  -> m (Versioned NgramsTablePatch))
                 :<|> ((TabType -> NodeId -> m Int)
                       :<|> ((TabType -> NodeId -> m Int)
                             :<|> (m (JobStatus 'Safe JobLog)
                                   :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                          -> m (JobStatus 'Safe JobLog))
                                         :<|> (ID 'Unsafe "job"
                                               -> (Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> ((Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> m (JobOutput JobLog)))))))))
          :<|> ((NodesToCategory -> m [Int])
                :<|> ((NodesToScore -> m [Int])
                      :<|> ((SearchQuery
                             -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                            :<|> ((ShareNodeParams -> m Int)
                                  :<|> ((NodeId -> Maybe NodeId -> m Int)
                                        :<|> (m [NodeId]
                                              :<|> ((Maybe TabType
                                                     -> Maybe Int
                                                     -> Maybe Int
                                                     -> Maybe OrderBy
                                                     -> m [FacetDoc])
                                                    :<|> (((Maybe NodeId
                                                            -> TabType
                                                            -> Maybe Int
                                                            -> m (HashedResponse Metrics))
                                                           :<|> ((Maybe NodeId
                                                                  -> TabType -> Maybe Int -> m ())
                                                                 :<|> (Maybe NodeId
                                                                       -> TabType -> m Text)))
                                                          :<|> (((Maybe UTCTime
                                                                  -> Maybe UTCTime
                                                                  -> Maybe NodeId
                                                                  -> TabType
                                                                  -> m (HashedResponse
                                                                          (ChartMetrics Histo)))
                                                                 :<|> ((Maybe NodeId
                                                                        -> TabType
                                                                        -> Maybe Int
                                                                        -> m ())
                                                                       :<|> (Maybe NodeId
                                                                             -> TabType -> m Text)))
                                                                :<|> (((Maybe UTCTime
                                                                        -> Maybe UTCTime
                                                                        -> Maybe NodeId
                                                                        -> TabType
                                                                        -> m (HashedResponse
                                                                                (ChartMetrics
                                                                                   Histo)))
                                                                       :<|> ((Maybe NodeId
                                                                              -> TabType
                                                                              -> Maybe Int
                                                                              -> m ())
                                                                             :<|> (Maybe NodeId
                                                                                   -> TabType
                                                                                   -> m Text)))
                                                                      :<|> (((Maybe UTCTime
                                                                              -> Maybe UTCTime
                                                                              -> Maybe NodeId
                                                                              -> TabType
                                                                              -> ListType
                                                                              -> m (HashedResponse
                                                                                      (ChartMetrics
                                                                                         (Vector
                                                                                            NgramsTree))))
                                                                             :<|> ((Maybe NodeId
                                                                                    -> TabType
                                                                                    -> ListType
                                                                                    -> m ())
                                                                                   :<|> (Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> ListType
                                                                                         -> m Text)))
                                                                            :<|> (((Maybe NodeId
                                                                                    -> Maybe Int
                                                                                    -> Maybe Int
                                                                                    -> m SVG)
                                                                                   :<|> (Maybe
                                                                                           NodeId
                                                                                         -> m NodeId))
                                                                                  :<|> ((NodeId
                                                                                         -> m [Int])
                                                                                        :<|> ((NodeId
                                                                                               -> m Int)
                                                                                              :<|> (m (Headers
                                                                                                         '[Header
                                                                                                             "Content-Type"
                                                                                                             Text]
                                                                                                         BSResponse)
                                                                                                    :<|> ((m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog)
                                                                                                           :<|> ((JobInput
                                                                                                                    Maybe
                                                                                                                    NewWithFile
                                                                                                                  -> m (JobStatus
                                                                                                                          'Safe
                                                                                                                          JobLog))
                                                                                                                 :<|> (ID
                                                                                                                         'Unsafe
                                                                                                                         "job"
                                                                                                                       -> (Maybe
                                                                                                                             Limit
                                                                                                                           -> Maybe
                                                                                                                                Offset
                                                                                                                           -> m (JobStatus
                                                                                                                                   'Safe
                                                                                                                                   JobLog))
                                                                                                                          :<|> ((Maybe
                                                                                                                                   Limit
                                                                                                                                 -> Maybe
                                                                                                                                      Offset
                                                                                                                                 -> m (JobStatus
                                                                                                                                         'Safe
                                                                                                                                         JobLog))
                                                                                                                                :<|> m (JobOutput
                                                                                                                                          JobLog)))))
                                                                                                          :<|> ((m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog)
                                                                                                                 :<|> ((JobInput
                                                                                                                          Maybe
                                                                                                                          Params
                                                                                                                        -> m (JobStatus
                                                                                                                                'Safe
                                                                                                                                JobLog))
                                                                                                                       :<|> (ID
                                                                                                                               'Unsafe
                                                                                                                               "job"
                                                                                                                             -> (Maybe
                                                                                                                                   Limit
                                                                                                                                 -> Maybe
                                                                                                                                      Offset
                                                                                                                                 -> m (JobStatus
                                                                                                                                         'Safe
                                                                                                                                         JobLog))
                                                                                                                                :<|> ((Maybe
                                                                                                                                         Limit
                                                                                                                                       -> Maybe
                                                                                                                                            Offset
                                                                                                                                       -> m (JobStatus
                                                                                                                                               'Safe
                                                                                                                                               JobLog))
                                                                                                                                      :<|> m (JobOutput
                                                                                                                                                JobLog)))))
                                                                                                                :<|> (m (JobStatus
                                                                                                                           'Safe
                                                                                                                           JobLog)
                                                                                                                      :<|> ((JobInput
                                                                                                                               Maybe
                                                                                                                               DocumentUpload
                                                                                                                             -> m (JobStatus
                                                                                                                                     'Safe
                                                                                                                                     JobLog))
                                                                                                                            :<|> (ID
                                                                                                                                    'Unsafe
                                                                                                                                    "job"
                                                                                                                                  -> (Maybe
                                                                                                                                        Limit
                                                                                                                                      -> Maybe
                                                                                                                                           Offset
                                                                                                                                      -> m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog))
                                                                                                                                     :<|> ((Maybe
                                                                                                                                              Limit
                                                                                                                                            -> Maybe
                                                                                                                                                 Offset
                                                                                                                                            -> m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog))
                                                                                                                                           :<|> m (JobOutput
                                                                                                                                                     JobLog))))))))))))))))))))))))
-> (Maybe NodeType
    -> Maybe Int -> Maybe Int -> m (NodeTableResult a))
   :<|> (((Maybe TabType
           -> Maybe NodeId
           -> Maybe Int
           -> Maybe Int
           -> Maybe OrderBy
           -> Maybe Text
           -> m (HashedResponse FacetTableResult))
          :<|> ((TableQuery -> m FacetTableResult)
                :<|> (Maybe TabType -> m Text)))
         :<|> (((TabType
                 -> NodeId
                 -> Int
                 -> Maybe Int
                 -> Maybe ListType
                 -> Maybe Int
                 -> Maybe Int
                 -> Maybe OrderBy
                 -> Maybe Text
                 -> m (VersionedWithCount NgramsTable))
                :<|> ((TabType
                       -> NodeId
                       -> Versioned NgramsTablePatch
                       -> m (Versioned NgramsTablePatch))
                      :<|> ((TabType -> NodeId -> m Int)
                            :<|> ((TabType -> NodeId -> m Int)
                                  :<|> (m (JobStatus 'Safe JobLog)
                                        :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                               -> m (JobStatus 'Safe JobLog))
                                              :<|> (ID 'Unsafe "job"
                                                    -> (Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> ((Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> m (JobOutput JobLog)))))))))
               :<|> ((NodesToCategory -> m [Int])
                     :<|> ((NodesToScore -> m [Int])
                           :<|> ((SearchQuery
                                  -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                                 :<|> ((ShareNodeParams -> m Int)
                                       :<|> ((NodeId -> Maybe NodeId -> m Int)
                                             :<|> (m [NodeId]
                                                   :<|> ((Maybe TabType
                                                          -> Maybe Int
                                                          -> Maybe Int
                                                          -> Maybe OrderBy
                                                          -> m [FacetDoc])
                                                         :<|> (((Maybe NodeId
                                                                 -> TabType
                                                                 -> Maybe Int
                                                                 -> m (HashedResponse Metrics))
                                                                :<|> ((Maybe NodeId
                                                                       -> TabType
                                                                       -> Maybe Int
                                                                       -> m ())
                                                                      :<|> (Maybe NodeId
                                                                            -> TabType -> m Text)))
                                                               :<|> (((Maybe UTCTime
                                                                       -> Maybe UTCTime
                                                                       -> Maybe NodeId
                                                                       -> TabType
                                                                       -> m (HashedResponse
                                                                               (ChartMetrics
                                                                                  Histo)))
                                                                      :<|> ((Maybe NodeId
                                                                             -> TabType
                                                                             -> Maybe Int
                                                                             -> m ())
                                                                            :<|> (Maybe NodeId
                                                                                  -> TabType
                                                                                  -> m Text)))
                                                                     :<|> (((Maybe UTCTime
                                                                             -> Maybe UTCTime
                                                                             -> Maybe NodeId
                                                                             -> TabType
                                                                             -> m (HashedResponse
                                                                                     (ChartMetrics
                                                                                        Histo)))
                                                                            :<|> ((Maybe NodeId
                                                                                   -> TabType
                                                                                   -> Maybe Int
                                                                                   -> m ())
                                                                                  :<|> (Maybe NodeId
                                                                                        -> TabType
                                                                                        -> m Text)))
                                                                           :<|> (((Maybe UTCTime
                                                                                   -> Maybe UTCTime
                                                                                   -> Maybe NodeId
                                                                                   -> TabType
                                                                                   -> ListType
                                                                                   -> m (HashedResponse
                                                                                           (ChartMetrics
                                                                                              (Vector
                                                                                                 NgramsTree))))
                                                                                  :<|> ((Maybe
                                                                                           NodeId
                                                                                         -> TabType
                                                                                         -> ListType
                                                                                         -> m ())
                                                                                        :<|> (Maybe
                                                                                                NodeId
                                                                                              -> TabType
                                                                                              -> ListType
                                                                                              -> m Text)))
                                                                                 :<|> (((Maybe
                                                                                           NodeId
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> Maybe
                                                                                              Int
                                                                                         -> m SVG)
                                                                                        :<|> (Maybe
                                                                                                NodeId
                                                                                              -> m NodeId))
                                                                                       :<|> ((NodeId
                                                                                              -> m [Int])
                                                                                             :<|> ((NodeId
                                                                                                    -> m Int)
                                                                                                   :<|> (m (Headers
                                                                                                              '[Header
                                                                                                                  "Content-Type"
                                                                                                                  Text]
                                                                                                              BSResponse)
                                                                                                         :<|> ((m (JobStatus
                                                                                                                     'Safe
                                                                                                                     JobLog)
                                                                                                                :<|> ((JobInput
                                                                                                                         Maybe
                                                                                                                         NewWithFile
                                                                                                                       -> m (JobStatus
                                                                                                                               'Safe
                                                                                                                               JobLog))
                                                                                                                      :<|> (ID
                                                                                                                              'Unsafe
                                                                                                                              "job"
                                                                                                                            -> (Maybe
                                                                                                                                  Limit
                                                                                                                                -> Maybe
                                                                                                                                     Offset
                                                                                                                                -> m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog))
                                                                                                                               :<|> ((Maybe
                                                                                                                                        Limit
                                                                                                                                      -> Maybe
                                                                                                                                           Offset
                                                                                                                                      -> m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog))
                                                                                                                                     :<|> m (JobOutput
                                                                                                                                               JobLog)))))
                                                                                                               :<|> ((m (JobStatus
                                                                                                                           'Safe
                                                                                                                           JobLog)
                                                                                                                      :<|> ((JobInput
                                                                                                                               Maybe
                                                                                                                               Params
                                                                                                                             -> m (JobStatus
                                                                                                                                     'Safe
                                                                                                                                     JobLog))
                                                                                                                            :<|> (ID
                                                                                                                                    'Unsafe
                                                                                                                                    "job"
                                                                                                                                  -> (Maybe
                                                                                                                                        Limit
                                                                                                                                      -> Maybe
                                                                                                                                           Offset
                                                                                                                                      -> m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog))
                                                                                                                                     :<|> ((Maybe
                                                                                                                                              Limit
                                                                                                                                            -> Maybe
                                                                                                                                                 Offset
                                                                                                                                            -> m (JobStatus
                                                                                                                                                    'Safe
                                                                                                                                                    JobLog))
                                                                                                                                           :<|> m (JobOutput
                                                                                                                                                     JobLog)))))
                                                                                                                     :<|> (m (JobStatus
                                                                                                                                'Safe
                                                                                                                                JobLog)
                                                                                                                           :<|> ((JobInput
                                                                                                                                    Maybe
                                                                                                                                    DocumentUpload
                                                                                                                                  -> m (JobStatus
                                                                                                                                          'Safe
                                                                                                                                          JobLog))
                                                                                                                                 :<|> (ID
                                                                                                                                         'Unsafe
                                                                                                                                         "job"
                                                                                                                                       -> (Maybe
                                                                                                                                             Limit
                                                                                                                                           -> Maybe
                                                                                                                                                Offset
                                                                                                                                           -> m (JobStatus
                                                                                                                                                   'Safe
                                                                                                                                                   JobLog))
                                                                                                                                          :<|> ((Maybe
                                                                                                                                                   Limit
                                                                                                                                                 -> Maybe
                                                                                                                                                      Offset
                                                                                                                                                 -> m (JobStatus
                                                                                                                                                         'Safe
                                                                                                                                                         JobLog))
                                                                                                                                                :<|> m (JobOutput
                                                                                                                                                          JobLog))))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer TableApi
tableApi             NodeId
id'
           ((Maybe TabType
  -> Maybe NodeId
  -> Maybe Int
  -> Maybe Int
  -> Maybe OrderBy
  -> Maybe Text
  -> m (HashedResponse FacetTableResult))
 :<|> ((TableQuery -> m FacetTableResult)
       :<|> (Maybe TabType -> m Text)))
-> (((TabType
      -> NodeId
      -> Int
      -> Maybe Int
      -> Maybe ListType
      -> Maybe Int
      -> Maybe Int
      -> Maybe OrderBy
      -> Maybe Text
      -> m (VersionedWithCount NgramsTable))
     :<|> ((TabType
            -> NodeId
            -> Versioned NgramsTablePatch
            -> m (Versioned NgramsTablePatch))
           :<|> ((TabType -> NodeId -> m Int)
                 :<|> ((TabType -> NodeId -> m Int)
                       :<|> (m (JobStatus 'Safe JobLog)
                             :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                    -> m (JobStatus 'Safe JobLog))
                                   :<|> (ID 'Unsafe "job"
                                         -> (Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> ((Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> m (JobOutput JobLog)))))))))
    :<|> ((NodesToCategory -> m [Int])
          :<|> ((NodesToScore -> m [Int])
                :<|> ((SearchQuery
                       -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                      :<|> ((ShareNodeParams -> m Int)
                            :<|> ((NodeId -> Maybe NodeId -> m Int)
                                  :<|> (m [NodeId]
                                        :<|> ((Maybe TabType
                                               -> Maybe Int
                                               -> Maybe Int
                                               -> Maybe OrderBy
                                               -> m [FacetDoc])
                                              :<|> (((Maybe NodeId
                                                      -> TabType
                                                      -> Maybe Int
                                                      -> m (HashedResponse Metrics))
                                                     :<|> ((Maybe NodeId
                                                            -> TabType -> Maybe Int -> m ())
                                                           :<|> (Maybe NodeId
                                                                 -> TabType -> m Text)))
                                                    :<|> (((Maybe UTCTime
                                                            -> Maybe UTCTime
                                                            -> Maybe NodeId
                                                            -> TabType
                                                            -> m (HashedResponse
                                                                    (ChartMetrics Histo)))
                                                           :<|> ((Maybe NodeId
                                                                  -> TabType -> Maybe Int -> m ())
                                                                 :<|> (Maybe NodeId
                                                                       -> TabType -> m Text)))
                                                          :<|> (((Maybe UTCTime
                                                                  -> Maybe UTCTime
                                                                  -> Maybe NodeId
                                                                  -> TabType
                                                                  -> m (HashedResponse
                                                                          (ChartMetrics Histo)))
                                                                 :<|> ((Maybe NodeId
                                                                        -> TabType
                                                                        -> Maybe Int
                                                                        -> m ())
                                                                       :<|> (Maybe NodeId
                                                                             -> TabType -> m Text)))
                                                                :<|> (((Maybe UTCTime
                                                                        -> Maybe UTCTime
                                                                        -> Maybe NodeId
                                                                        -> TabType
                                                                        -> ListType
                                                                        -> m (HashedResponse
                                                                                (ChartMetrics
                                                                                   (Vector
                                                                                      NgramsTree))))
                                                                       :<|> ((Maybe NodeId
                                                                              -> TabType
                                                                              -> ListType
                                                                              -> m ())
                                                                             :<|> (Maybe NodeId
                                                                                   -> TabType
                                                                                   -> ListType
                                                                                   -> m Text)))
                                                                      :<|> (((Maybe NodeId
                                                                              -> Maybe Int
                                                                              -> Maybe Int
                                                                              -> m SVG)
                                                                             :<|> (Maybe NodeId
                                                                                   -> m NodeId))
                                                                            :<|> ((NodeId
                                                                                   -> m [Int])
                                                                                  :<|> ((NodeId
                                                                                         -> m Int)
                                                                                        :<|> (m (Headers
                                                                                                   '[Header
                                                                                                       "Content-Type"
                                                                                                       Text]
                                                                                                   BSResponse)
                                                                                              :<|> ((m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog)
                                                                                                     :<|> ((JobInput
                                                                                                              Maybe
                                                                                                              NewWithFile
                                                                                                            -> m (JobStatus
                                                                                                                    'Safe
                                                                                                                    JobLog))
                                                                                                           :<|> (ID
                                                                                                                   'Unsafe
                                                                                                                   "job"
                                                                                                                 -> (Maybe
                                                                                                                       Limit
                                                                                                                     -> Maybe
                                                                                                                          Offset
                                                                                                                     -> m (JobStatus
                                                                                                                             'Safe
                                                                                                                             JobLog))
                                                                                                                    :<|> ((Maybe
                                                                                                                             Limit
                                                                                                                           -> Maybe
                                                                                                                                Offset
                                                                                                                           -> m (JobStatus
                                                                                                                                   'Safe
                                                                                                                                   JobLog))
                                                                                                                          :<|> m (JobOutput
                                                                                                                                    JobLog)))))
                                                                                                    :<|> ((m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog)
                                                                                                           :<|> ((JobInput
                                                                                                                    Maybe
                                                                                                                    Params
                                                                                                                  -> m (JobStatus
                                                                                                                          'Safe
                                                                                                                          JobLog))
                                                                                                                 :<|> (ID
                                                                                                                         'Unsafe
                                                                                                                         "job"
                                                                                                                       -> (Maybe
                                                                                                                             Limit
                                                                                                                           -> Maybe
                                                                                                                                Offset
                                                                                                                           -> m (JobStatus
                                                                                                                                   'Safe
                                                                                                                                   JobLog))
                                                                                                                          :<|> ((Maybe
                                                                                                                                   Limit
                                                                                                                                 -> Maybe
                                                                                                                                      Offset
                                                                                                                                 -> m (JobStatus
                                                                                                                                         'Safe
                                                                                                                                         JobLog))
                                                                                                                                :<|> m (JobOutput
                                                                                                                                          JobLog)))))
                                                                                                          :<|> (m (JobStatus
                                                                                                                     'Safe
                                                                                                                     JobLog)
                                                                                                                :<|> ((JobInput
                                                                                                                         Maybe
                                                                                                                         DocumentUpload
                                                                                                                       -> m (JobStatus
                                                                                                                               'Safe
                                                                                                                               JobLog))
                                                                                                                      :<|> (ID
                                                                                                                              'Unsafe
                                                                                                                              "job"
                                                                                                                            -> (Maybe
                                                                                                                                  Limit
                                                                                                                                -> Maybe
                                                                                                                                     Offset
                                                                                                                                -> m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog))
                                                                                                                               :<|> ((Maybe
                                                                                                                                        Limit
                                                                                                                                      -> Maybe
                                                                                                                                           Offset
                                                                                                                                      -> m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog))
                                                                                                                                     :<|> m (JobOutput
                                                                                                                                               JobLog)))))))))))))))))))))))
-> ((Maybe TabType
     -> Maybe NodeId
     -> Maybe Int
     -> Maybe Int
     -> Maybe OrderBy
     -> Maybe Text
     -> m (HashedResponse FacetTableResult))
    :<|> ((TableQuery -> m FacetTableResult)
          :<|> (Maybe TabType -> m Text)))
   :<|> (((TabType
           -> NodeId
           -> Int
           -> Maybe Int
           -> Maybe ListType
           -> Maybe Int
           -> Maybe Int
           -> Maybe OrderBy
           -> Maybe Text
           -> m (VersionedWithCount NgramsTable))
          :<|> ((TabType
                 -> NodeId
                 -> Versioned NgramsTablePatch
                 -> m (Versioned NgramsTablePatch))
                :<|> ((TabType -> NodeId -> m Int)
                      :<|> ((TabType -> NodeId -> m Int)
                            :<|> (m (JobStatus 'Safe JobLog)
                                  :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                         -> m (JobStatus 'Safe JobLog))
                                        :<|> (ID 'Unsafe "job"
                                              -> (Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> ((Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> m (JobOutput JobLog)))))))))
         :<|> ((NodesToCategory -> m [Int])
               :<|> ((NodesToScore -> m [Int])
                     :<|> ((SearchQuery
                            -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                           :<|> ((ShareNodeParams -> m Int)
                                 :<|> ((NodeId -> Maybe NodeId -> m Int)
                                       :<|> (m [NodeId]
                                             :<|> ((Maybe TabType
                                                    -> Maybe Int
                                                    -> Maybe Int
                                                    -> Maybe OrderBy
                                                    -> m [FacetDoc])
                                                   :<|> (((Maybe NodeId
                                                           -> TabType
                                                           -> Maybe Int
                                                           -> m (HashedResponse Metrics))
                                                          :<|> ((Maybe NodeId
                                                                 -> TabType -> Maybe Int -> m ())
                                                                :<|> (Maybe NodeId
                                                                      -> TabType -> m Text)))
                                                         :<|> (((Maybe UTCTime
                                                                 -> Maybe UTCTime
                                                                 -> Maybe NodeId
                                                                 -> TabType
                                                                 -> m (HashedResponse
                                                                         (ChartMetrics Histo)))
                                                                :<|> ((Maybe NodeId
                                                                       -> TabType
                                                                       -> Maybe Int
                                                                       -> m ())
                                                                      :<|> (Maybe NodeId
                                                                            -> TabType -> m Text)))
                                                               :<|> (((Maybe UTCTime
                                                                       -> Maybe UTCTime
                                                                       -> Maybe NodeId
                                                                       -> TabType
                                                                       -> m (HashedResponse
                                                                               (ChartMetrics
                                                                                  Histo)))
                                                                      :<|> ((Maybe NodeId
                                                                             -> TabType
                                                                             -> Maybe Int
                                                                             -> m ())
                                                                            :<|> (Maybe NodeId
                                                                                  -> TabType
                                                                                  -> m Text)))
                                                                     :<|> (((Maybe UTCTime
                                                                             -> Maybe UTCTime
                                                                             -> Maybe NodeId
                                                                             -> TabType
                                                                             -> ListType
                                                                             -> m (HashedResponse
                                                                                     (ChartMetrics
                                                                                        (Vector
                                                                                           NgramsTree))))
                                                                            :<|> ((Maybe NodeId
                                                                                   -> TabType
                                                                                   -> ListType
                                                                                   -> m ())
                                                                                  :<|> (Maybe NodeId
                                                                                        -> TabType
                                                                                        -> ListType
                                                                                        -> m Text)))
                                                                           :<|> (((Maybe NodeId
                                                                                   -> Maybe Int
                                                                                   -> Maybe Int
                                                                                   -> m SVG)
                                                                                  :<|> (Maybe NodeId
                                                                                        -> m NodeId))
                                                                                 :<|> ((NodeId
                                                                                        -> m [Int])
                                                                                       :<|> ((NodeId
                                                                                              -> m Int)
                                                                                             :<|> (m (Headers
                                                                                                        '[Header
                                                                                                            "Content-Type"
                                                                                                            Text]
                                                                                                        BSResponse)
                                                                                                   :<|> ((m (JobStatus
                                                                                                               'Safe
                                                                                                               JobLog)
                                                                                                          :<|> ((JobInput
                                                                                                                   Maybe
                                                                                                                   NewWithFile
                                                                                                                 -> m (JobStatus
                                                                                                                         'Safe
                                                                                                                         JobLog))
                                                                                                                :<|> (ID
                                                                                                                        'Unsafe
                                                                                                                        "job"
                                                                                                                      -> (Maybe
                                                                                                                            Limit
                                                                                                                          -> Maybe
                                                                                                                               Offset
                                                                                                                          -> m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog))
                                                                                                                         :<|> ((Maybe
                                                                                                                                  Limit
                                                                                                                                -> Maybe
                                                                                                                                     Offset
                                                                                                                                -> m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog))
                                                                                                                               :<|> m (JobOutput
                                                                                                                                         JobLog)))))
                                                                                                         :<|> ((m (JobStatus
                                                                                                                     'Safe
                                                                                                                     JobLog)
                                                                                                                :<|> ((JobInput
                                                                                                                         Maybe
                                                                                                                         Params
                                                                                                                       -> m (JobStatus
                                                                                                                               'Safe
                                                                                                                               JobLog))
                                                                                                                      :<|> (ID
                                                                                                                              'Unsafe
                                                                                                                              "job"
                                                                                                                            -> (Maybe
                                                                                                                                  Limit
                                                                                                                                -> Maybe
                                                                                                                                     Offset
                                                                                                                                -> m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog))
                                                                                                                               :<|> ((Maybe
                                                                                                                                        Limit
                                                                                                                                      -> Maybe
                                                                                                                                           Offset
                                                                                                                                      -> m (JobStatus
                                                                                                                                              'Safe
                                                                                                                                              JobLog))
                                                                                                                                     :<|> m (JobOutput
                                                                                                                                               JobLog)))))
                                                                                                               :<|> (m (JobStatus
                                                                                                                          'Safe
                                                                                                                          JobLog)
                                                                                                                     :<|> ((JobInput
                                                                                                                              Maybe
                                                                                                                              DocumentUpload
                                                                                                                            -> m (JobStatus
                                                                                                                                    'Safe
                                                                                                                                    JobLog))
                                                                                                                           :<|> (ID
                                                                                                                                   'Unsafe
                                                                                                                                   "job"
                                                                                                                                 -> (Maybe
                                                                                                                                       Limit
                                                                                                                                     -> Maybe
                                                                                                                                          Offset
                                                                                                                                     -> m (JobStatus
                                                                                                                                             'Safe
                                                                                                                                             JobLog))
                                                                                                                                    :<|> ((Maybe
                                                                                                                                             Limit
                                                                                                                                           -> Maybe
                                                                                                                                                Offset
                                                                                                                                           -> m (JobStatus
                                                                                                                                                   'Safe
                                                                                                                                                   JobLog))
                                                                                                                                          :<|> m (JobOutput
                                                                                                                                                    JobLog)))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> ServerT TableNgramsApi m
forall env err (m :: * -> *).
GargServerC env err m =>
NodeId -> ServerT TableNgramsApi m
apiNgramsTableCorpus NodeId
id'

           ((TabType
  -> NodeId
  -> Int
  -> Maybe Int
  -> Maybe ListType
  -> Maybe Int
  -> Maybe Int
  -> Maybe OrderBy
  -> Maybe Text
  -> m (VersionedWithCount NgramsTable))
 :<|> ((TabType
        -> NodeId
        -> Versioned NgramsTablePatch
        -> m (Versioned NgramsTablePatch))
       :<|> ((TabType -> NodeId -> m Int)
             :<|> ((TabType -> NodeId -> m Int)
                   :<|> (m (JobStatus 'Safe JobLog)
                         :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                -> m (JobStatus 'Safe JobLog))
                               :<|> (ID 'Unsafe "job"
                                     -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                        :<|> ((Maybe Limit
                                               -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                              :<|> m (JobOutput JobLog)))))))))
-> ((NodesToCategory -> m [Int])
    :<|> ((NodesToScore -> m [Int])
          :<|> ((SearchQuery
                 -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                :<|> ((ShareNodeParams -> m Int)
                      :<|> ((NodeId -> Maybe NodeId -> m Int)
                            :<|> (m [NodeId]
                                  :<|> ((Maybe TabType
                                         -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                                        :<|> (((Maybe NodeId
                                                -> TabType
                                                -> Maybe Int
                                                -> m (HashedResponse Metrics))
                                               :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                                     :<|> (Maybe NodeId -> TabType -> m Text)))
                                              :<|> (((Maybe UTCTime
                                                      -> Maybe UTCTime
                                                      -> Maybe NodeId
                                                      -> TabType
                                                      -> m (HashedResponse (ChartMetrics Histo)))
                                                     :<|> ((Maybe NodeId
                                                            -> TabType -> Maybe Int -> m ())
                                                           :<|> (Maybe NodeId
                                                                 -> TabType -> m Text)))
                                                    :<|> (((Maybe UTCTime
                                                            -> Maybe UTCTime
                                                            -> Maybe NodeId
                                                            -> TabType
                                                            -> m (HashedResponse
                                                                    (ChartMetrics Histo)))
                                                           :<|> ((Maybe NodeId
                                                                  -> TabType -> Maybe Int -> m ())
                                                                 :<|> (Maybe NodeId
                                                                       -> TabType -> m Text)))
                                                          :<|> (((Maybe UTCTime
                                                                  -> Maybe UTCTime
                                                                  -> Maybe NodeId
                                                                  -> TabType
                                                                  -> ListType
                                                                  -> m (HashedResponse
                                                                          (ChartMetrics
                                                                             (Vector NgramsTree))))
                                                                 :<|> ((Maybe NodeId
                                                                        -> TabType
                                                                        -> ListType
                                                                        -> m ())
                                                                       :<|> (Maybe NodeId
                                                                             -> TabType
                                                                             -> ListType
                                                                             -> m Text)))
                                                                :<|> (((Maybe NodeId
                                                                        -> Maybe Int
                                                                        -> Maybe Int
                                                                        -> m SVG)
                                                                       :<|> (Maybe NodeId
                                                                             -> m NodeId))
                                                                      :<|> ((NodeId -> m [Int])
                                                                            :<|> ((NodeId -> m Int)
                                                                                  :<|> (m (Headers
                                                                                             '[Header
                                                                                                 "Content-Type"
                                                                                                 Text]
                                                                                             BSResponse)
                                                                                        :<|> ((m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog)
                                                                                               :<|> ((JobInput
                                                                                                        Maybe
                                                                                                        NewWithFile
                                                                                                      -> m (JobStatus
                                                                                                              'Safe
                                                                                                              JobLog))
                                                                                                     :<|> (ID
                                                                                                             'Unsafe
                                                                                                             "job"
                                                                                                           -> (Maybe
                                                                                                                 Limit
                                                                                                               -> Maybe
                                                                                                                    Offset
                                                                                                               -> m (JobStatus
                                                                                                                       'Safe
                                                                                                                       JobLog))
                                                                                                              :<|> ((Maybe
                                                                                                                       Limit
                                                                                                                     -> Maybe
                                                                                                                          Offset
                                                                                                                     -> m (JobStatus
                                                                                                                             'Safe
                                                                                                                             JobLog))
                                                                                                                    :<|> m (JobOutput
                                                                                                                              JobLog)))))
                                                                                              :<|> ((m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog)
                                                                                                     :<|> ((JobInput
                                                                                                              Maybe
                                                                                                              Params
                                                                                                            -> m (JobStatus
                                                                                                                    'Safe
                                                                                                                    JobLog))
                                                                                                           :<|> (ID
                                                                                                                   'Unsafe
                                                                                                                   "job"
                                                                                                                 -> (Maybe
                                                                                                                       Limit
                                                                                                                     -> Maybe
                                                                                                                          Offset
                                                                                                                     -> m (JobStatus
                                                                                                                             'Safe
                                                                                                                             JobLog))
                                                                                                                    :<|> ((Maybe
                                                                                                                             Limit
                                                                                                                           -> Maybe
                                                                                                                                Offset
                                                                                                                           -> m (JobStatus
                                                                                                                                   'Safe
                                                                                                                                   JobLog))
                                                                                                                          :<|> m (JobOutput
                                                                                                                                    JobLog)))))
                                                                                                    :<|> (m (JobStatus
                                                                                                               'Safe
                                                                                                               JobLog)
                                                                                                          :<|> ((JobInput
                                                                                                                   Maybe
                                                                                                                   DocumentUpload
                                                                                                                 -> m (JobStatus
                                                                                                                         'Safe
                                                                                                                         JobLog))
                                                                                                                :<|> (ID
                                                                                                                        'Unsafe
                                                                                                                        "job"
                                                                                                                      -> (Maybe
                                                                                                                            Limit
                                                                                                                          -> Maybe
                                                                                                                               Offset
                                                                                                                          -> m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog))
                                                                                                                         :<|> ((Maybe
                                                                                                                                  Limit
                                                                                                                                -> Maybe
                                                                                                                                     Offset
                                                                                                                                -> m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog))
                                                                                                                               :<|> m (JobOutput
                                                                                                                                         JobLog))))))))))))))))))))))
-> ((TabType
     -> NodeId
     -> Int
     -> Maybe Int
     -> Maybe ListType
     -> Maybe Int
     -> Maybe Int
     -> Maybe OrderBy
     -> Maybe Text
     -> m (VersionedWithCount NgramsTable))
    :<|> ((TabType
           -> NodeId
           -> Versioned NgramsTablePatch
           -> m (Versioned NgramsTablePatch))
          :<|> ((TabType -> NodeId -> m Int)
                :<|> ((TabType -> NodeId -> m Int)
                      :<|> (m (JobStatus 'Safe JobLog)
                            :<|> ((JobInput Maybe UpdateTableNgramsCharts
                                   -> m (JobStatus 'Safe JobLog))
                                  :<|> (ID 'Unsafe "job"
                                        -> (Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> ((Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> m (JobOutput JobLog)))))))))
   :<|> ((NodesToCategory -> m [Int])
         :<|> ((NodesToScore -> m [Int])
               :<|> ((SearchQuery
                      -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
                     :<|> ((ShareNodeParams -> m Int)
                           :<|> ((NodeId -> Maybe NodeId -> m Int)
                                 :<|> (m [NodeId]
                                       :<|> ((Maybe TabType
                                              -> Maybe Int
                                              -> Maybe Int
                                              -> Maybe OrderBy
                                              -> m [FacetDoc])
                                             :<|> (((Maybe NodeId
                                                     -> TabType
                                                     -> Maybe Int
                                                     -> m (HashedResponse Metrics))
                                                    :<|> ((Maybe NodeId
                                                           -> TabType -> Maybe Int -> m ())
                                                          :<|> (Maybe NodeId -> TabType -> m Text)))
                                                   :<|> (((Maybe UTCTime
                                                           -> Maybe UTCTime
                                                           -> Maybe NodeId
                                                           -> TabType
                                                           -> m (HashedResponse
                                                                   (ChartMetrics Histo)))
                                                          :<|> ((Maybe NodeId
                                                                 -> TabType -> Maybe Int -> m ())
                                                                :<|> (Maybe NodeId
                                                                      -> TabType -> m Text)))
                                                         :<|> (((Maybe UTCTime
                                                                 -> Maybe UTCTime
                                                                 -> Maybe NodeId
                                                                 -> TabType
                                                                 -> m (HashedResponse
                                                                         (ChartMetrics Histo)))
                                                                :<|> ((Maybe NodeId
                                                                       -> TabType
                                                                       -> Maybe Int
                                                                       -> m ())
                                                                      :<|> (Maybe NodeId
                                                                            -> TabType -> m Text)))
                                                               :<|> (((Maybe UTCTime
                                                                       -> Maybe UTCTime
                                                                       -> Maybe NodeId
                                                                       -> TabType
                                                                       -> ListType
                                                                       -> m (HashedResponse
                                                                               (ChartMetrics
                                                                                  (Vector
                                                                                     NgramsTree))))
                                                                      :<|> ((Maybe NodeId
                                                                             -> TabType
                                                                             -> ListType
                                                                             -> m ())
                                                                            :<|> (Maybe NodeId
                                                                                  -> TabType
                                                                                  -> ListType
                                                                                  -> m Text)))
                                                                     :<|> (((Maybe NodeId
                                                                             -> Maybe Int
                                                                             -> Maybe Int
                                                                             -> m SVG)
                                                                            :<|> (Maybe NodeId
                                                                                  -> m NodeId))
                                                                           :<|> ((NodeId -> m [Int])
                                                                                 :<|> ((NodeId
                                                                                        -> m Int)
                                                                                       :<|> (m (Headers
                                                                                                  '[Header
                                                                                                      "Content-Type"
                                                                                                      Text]
                                                                                                  BSResponse)
                                                                                             :<|> ((m (JobStatus
                                                                                                         'Safe
                                                                                                         JobLog)
                                                                                                    :<|> ((JobInput
                                                                                                             Maybe
                                                                                                             NewWithFile
                                                                                                           -> m (JobStatus
                                                                                                                   'Safe
                                                                                                                   JobLog))
                                                                                                          :<|> (ID
                                                                                                                  'Unsafe
                                                                                                                  "job"
                                                                                                                -> (Maybe
                                                                                                                      Limit
                                                                                                                    -> Maybe
                                                                                                                         Offset
                                                                                                                    -> m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog))
                                                                                                                   :<|> ((Maybe
                                                                                                                            Limit
                                                                                                                          -> Maybe
                                                                                                                               Offset
                                                                                                                          -> m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog))
                                                                                                                         :<|> m (JobOutput
                                                                                                                                   JobLog)))))
                                                                                                   :<|> ((m (JobStatus
                                                                                                               'Safe
                                                                                                               JobLog)
                                                                                                          :<|> ((JobInput
                                                                                                                   Maybe
                                                                                                                   Params
                                                                                                                 -> m (JobStatus
                                                                                                                         'Safe
                                                                                                                         JobLog))
                                                                                                                :<|> (ID
                                                                                                                        'Unsafe
                                                                                                                        "job"
                                                                                                                      -> (Maybe
                                                                                                                            Limit
                                                                                                                          -> Maybe
                                                                                                                               Offset
                                                                                                                          -> m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog))
                                                                                                                         :<|> ((Maybe
                                                                                                                                  Limit
                                                                                                                                -> Maybe
                                                                                                                                     Offset
                                                                                                                                -> m (JobStatus
                                                                                                                                        'Safe
                                                                                                                                        JobLog))
                                                                                                                               :<|> m (JobOutput
                                                                                                                                         JobLog)))))
                                                                                                         :<|> (m (JobStatus
                                                                                                                    'Safe
                                                                                                                    JobLog)
                                                                                                               :<|> ((JobInput
                                                                                                                        Maybe
                                                                                                                        DocumentUpload
                                                                                                                      -> m (JobStatus
                                                                                                                              'Safe
                                                                                                                              JobLog))
                                                                                                                     :<|> (ID
                                                                                                                             'Unsafe
                                                                                                                             "job"
                                                                                                                           -> (Maybe
                                                                                                                                 Limit
                                                                                                                               -> Maybe
                                                                                                                                    Offset
                                                                                                                               -> m (JobStatus
                                                                                                                                       'Safe
                                                                                                                                       JobLog))
                                                                                                                              :<|> ((Maybe
                                                                                                                                       Limit
                                                                                                                                     -> Maybe
                                                                                                                                          Offset
                                                                                                                                     -> m (JobStatus
                                                                                                                                             'Safe
                                                                                                                                             JobLog))
                                                                                                                                    :<|> m (JobOutput
                                                                                                                                              JobLog))))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer CatApi
catApi      NodeId
id'
           (NodesToCategory -> m [Int])
-> ((NodesToScore -> m [Int])
    :<|> ((SearchQuery
           -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
          :<|> ((ShareNodeParams -> m Int)
                :<|> ((NodeId -> Maybe NodeId -> m Int)
                      :<|> (m [NodeId]
                            :<|> ((Maybe TabType
                                   -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                                  :<|> (((Maybe NodeId
                                          -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                                         :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                               :<|> (Maybe NodeId -> TabType -> m Text)))
                                        :<|> (((Maybe UTCTime
                                                -> Maybe UTCTime
                                                -> Maybe NodeId
                                                -> TabType
                                                -> m (HashedResponse (ChartMetrics Histo)))
                                               :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                                     :<|> (Maybe NodeId -> TabType -> m Text)))
                                              :<|> (((Maybe UTCTime
                                                      -> Maybe UTCTime
                                                      -> Maybe NodeId
                                                      -> TabType
                                                      -> m (HashedResponse (ChartMetrics Histo)))
                                                     :<|> ((Maybe NodeId
                                                            -> TabType -> Maybe Int -> m ())
                                                           :<|> (Maybe NodeId
                                                                 -> TabType -> m Text)))
                                                    :<|> (((Maybe UTCTime
                                                            -> Maybe UTCTime
                                                            -> Maybe NodeId
                                                            -> TabType
                                                            -> ListType
                                                            -> m (HashedResponse
                                                                    (ChartMetrics
                                                                       (Vector NgramsTree))))
                                                           :<|> ((Maybe NodeId
                                                                  -> TabType -> ListType -> m ())
                                                                 :<|> (Maybe NodeId
                                                                       -> TabType
                                                                       -> ListType
                                                                       -> m Text)))
                                                          :<|> (((Maybe NodeId
                                                                  -> Maybe Int
                                                                  -> Maybe Int
                                                                  -> m SVG)
                                                                 :<|> (Maybe NodeId -> m NodeId))
                                                                :<|> ((NodeId -> m [Int])
                                                                      :<|> ((NodeId -> m Int)
                                                                            :<|> (m (Headers
                                                                                       '[Header
                                                                                           "Content-Type"
                                                                                           Text]
                                                                                       BSResponse)
                                                                                  :<|> ((m (JobStatus
                                                                                              'Safe
                                                                                              JobLog)
                                                                                         :<|> ((JobInput
                                                                                                  Maybe
                                                                                                  NewWithFile
                                                                                                -> m (JobStatus
                                                                                                        'Safe
                                                                                                        JobLog))
                                                                                               :<|> (ID
                                                                                                       'Unsafe
                                                                                                       "job"
                                                                                                     -> (Maybe
                                                                                                           Limit
                                                                                                         -> Maybe
                                                                                                              Offset
                                                                                                         -> m (JobStatus
                                                                                                                 'Safe
                                                                                                                 JobLog))
                                                                                                        :<|> ((Maybe
                                                                                                                 Limit
                                                                                                               -> Maybe
                                                                                                                    Offset
                                                                                                               -> m (JobStatus
                                                                                                                       'Safe
                                                                                                                       JobLog))
                                                                                                              :<|> m (JobOutput
                                                                                                                        JobLog)))))
                                                                                        :<|> ((m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog)
                                                                                               :<|> ((JobInput
                                                                                                        Maybe
                                                                                                        Params
                                                                                                      -> m (JobStatus
                                                                                                              'Safe
                                                                                                              JobLog))
                                                                                                     :<|> (ID
                                                                                                             'Unsafe
                                                                                                             "job"
                                                                                                           -> (Maybe
                                                                                                                 Limit
                                                                                                               -> Maybe
                                                                                                                    Offset
                                                                                                               -> m (JobStatus
                                                                                                                       'Safe
                                                                                                                       JobLog))
                                                                                                              :<|> ((Maybe
                                                                                                                       Limit
                                                                                                                     -> Maybe
                                                                                                                          Offset
                                                                                                                     -> m (JobStatus
                                                                                                                             'Safe
                                                                                                                             JobLog))
                                                                                                                    :<|> m (JobOutput
                                                                                                                              JobLog)))))
                                                                                              :<|> (m (JobStatus
                                                                                                         'Safe
                                                                                                         JobLog)
                                                                                                    :<|> ((JobInput
                                                                                                             Maybe
                                                                                                             DocumentUpload
                                                                                                           -> m (JobStatus
                                                                                                                   'Safe
                                                                                                                   JobLog))
                                                                                                          :<|> (ID
                                                                                                                  'Unsafe
                                                                                                                  "job"
                                                                                                                -> (Maybe
                                                                                                                      Limit
                                                                                                                    -> Maybe
                                                                                                                         Offset
                                                                                                                    -> m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog))
                                                                                                                   :<|> ((Maybe
                                                                                                                            Limit
                                                                                                                          -> Maybe
                                                                                                                               Offset
                                                                                                                          -> m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog))
                                                                                                                         :<|> m (JobOutput
                                                                                                                                   JobLog)))))))))))))))))))))
-> (NodesToCategory -> m [Int])
   :<|> ((NodesToScore -> m [Int])
         :<|> ((SearchQuery
                -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
               :<|> ((ShareNodeParams -> m Int)
                     :<|> ((NodeId -> Maybe NodeId -> m Int)
                           :<|> (m [NodeId]
                                 :<|> ((Maybe TabType
                                        -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                                       :<|> (((Maybe NodeId
                                               -> TabType
                                               -> Maybe Int
                                               -> m (HashedResponse Metrics))
                                              :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                                    :<|> (Maybe NodeId -> TabType -> m Text)))
                                             :<|> (((Maybe UTCTime
                                                     -> Maybe UTCTime
                                                     -> Maybe NodeId
                                                     -> TabType
                                                     -> m (HashedResponse (ChartMetrics Histo)))
                                                    :<|> ((Maybe NodeId
                                                           -> TabType -> Maybe Int -> m ())
                                                          :<|> (Maybe NodeId -> TabType -> m Text)))
                                                   :<|> (((Maybe UTCTime
                                                           -> Maybe UTCTime
                                                           -> Maybe NodeId
                                                           -> TabType
                                                           -> m (HashedResponse
                                                                   (ChartMetrics Histo)))
                                                          :<|> ((Maybe NodeId
                                                                 -> TabType -> Maybe Int -> m ())
                                                                :<|> (Maybe NodeId
                                                                      -> TabType -> m Text)))
                                                         :<|> (((Maybe UTCTime
                                                                 -> Maybe UTCTime
                                                                 -> Maybe NodeId
                                                                 -> TabType
                                                                 -> ListType
                                                                 -> m (HashedResponse
                                                                         (ChartMetrics
                                                                            (Vector NgramsTree))))
                                                                :<|> ((Maybe NodeId
                                                                       -> TabType
                                                                       -> ListType
                                                                       -> m ())
                                                                      :<|> (Maybe NodeId
                                                                            -> TabType
                                                                            -> ListType
                                                                            -> m Text)))
                                                               :<|> (((Maybe NodeId
                                                                       -> Maybe Int
                                                                       -> Maybe Int
                                                                       -> m SVG)
                                                                      :<|> (Maybe NodeId
                                                                            -> m NodeId))
                                                                     :<|> ((NodeId -> m [Int])
                                                                           :<|> ((NodeId -> m Int)
                                                                                 :<|> (m (Headers
                                                                                            '[Header
                                                                                                "Content-Type"
                                                                                                Text]
                                                                                            BSResponse)
                                                                                       :<|> ((m (JobStatus
                                                                                                   'Safe
                                                                                                   JobLog)
                                                                                              :<|> ((JobInput
                                                                                                       Maybe
                                                                                                       NewWithFile
                                                                                                     -> m (JobStatus
                                                                                                             'Safe
                                                                                                             JobLog))
                                                                                                    :<|> (ID
                                                                                                            'Unsafe
                                                                                                            "job"
                                                                                                          -> (Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> ((Maybe
                                                                                                                      Limit
                                                                                                                    -> Maybe
                                                                                                                         Offset
                                                                                                                    -> m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog))
                                                                                                                   :<|> m (JobOutput
                                                                                                                             JobLog)))))
                                                                                             :<|> ((m (JobStatus
                                                                                                         'Safe
                                                                                                         JobLog)
                                                                                                    :<|> ((JobInput
                                                                                                             Maybe
                                                                                                             Params
                                                                                                           -> m (JobStatus
                                                                                                                   'Safe
                                                                                                                   JobLog))
                                                                                                          :<|> (ID
                                                                                                                  'Unsafe
                                                                                                                  "job"
                                                                                                                -> (Maybe
                                                                                                                      Limit
                                                                                                                    -> Maybe
                                                                                                                         Offset
                                                                                                                    -> m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog))
                                                                                                                   :<|> ((Maybe
                                                                                                                            Limit
                                                                                                                          -> Maybe
                                                                                                                               Offset
                                                                                                                          -> m (JobStatus
                                                                                                                                  'Safe
                                                                                                                                  JobLog))
                                                                                                                         :<|> m (JobOutput
                                                                                                                                   JobLog)))))
                                                                                                   :<|> (m (JobStatus
                                                                                                              'Safe
                                                                                                              JobLog)
                                                                                                         :<|> ((JobInput
                                                                                                                  Maybe
                                                                                                                  DocumentUpload
                                                                                                                -> m (JobStatus
                                                                                                                        'Safe
                                                                                                                        JobLog))
                                                                                                               :<|> (ID
                                                                                                                       'Unsafe
                                                                                                                       "job"
                                                                                                                     -> (Maybe
                                                                                                                           Limit
                                                                                                                         -> Maybe
                                                                                                                              Offset
                                                                                                                         -> m (JobStatus
                                                                                                                                 'Safe
                                                                                                                                 JobLog))
                                                                                                                        :<|> ((Maybe
                                                                                                                                 Limit
                                                                                                                               -> Maybe
                                                                                                                                    Offset
                                                                                                                               -> m (JobStatus
                                                                                                                                       'Safe
                                                                                                                                       JobLog))
                                                                                                                              :<|> m (JobOutput
                                                                                                                                        JobLog)))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer ScoreApi
scoreApi    NodeId
id'
           (NodesToScore -> m [Int])
-> ((SearchQuery
     -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
    :<|> ((ShareNodeParams -> m Int)
          :<|> ((NodeId -> Maybe NodeId -> m Int)
                :<|> (m [NodeId]
                      :<|> ((Maybe TabType
                             -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                            :<|> (((Maybe NodeId
                                    -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                                   :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                         :<|> (Maybe NodeId -> TabType -> m Text)))
                                  :<|> (((Maybe UTCTime
                                          -> Maybe UTCTime
                                          -> Maybe NodeId
                                          -> TabType
                                          -> m (HashedResponse (ChartMetrics Histo)))
                                         :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                               :<|> (Maybe NodeId -> TabType -> m Text)))
                                        :<|> (((Maybe UTCTime
                                                -> Maybe UTCTime
                                                -> Maybe NodeId
                                                -> TabType
                                                -> m (HashedResponse (ChartMetrics Histo)))
                                               :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                                     :<|> (Maybe NodeId -> TabType -> m Text)))
                                              :<|> (((Maybe UTCTime
                                                      -> Maybe UTCTime
                                                      -> Maybe NodeId
                                                      -> TabType
                                                      -> ListType
                                                      -> m (HashedResponse
                                                              (ChartMetrics (Vector NgramsTree))))
                                                     :<|> ((Maybe NodeId
                                                            -> TabType -> ListType -> m ())
                                                           :<|> (Maybe NodeId
                                                                 -> TabType -> ListType -> m Text)))
                                                    :<|> (((Maybe NodeId
                                                            -> Maybe Int -> Maybe Int -> m SVG)
                                                           :<|> (Maybe NodeId -> m NodeId))
                                                          :<|> ((NodeId -> m [Int])
                                                                :<|> ((NodeId -> m Int)
                                                                      :<|> (m (Headers
                                                                                 '[Header
                                                                                     "Content-Type"
                                                                                     Text]
                                                                                 BSResponse)
                                                                            :<|> ((m (JobStatus
                                                                                        'Safe
                                                                                        JobLog)
                                                                                   :<|> ((JobInput
                                                                                            Maybe
                                                                                            NewWithFile
                                                                                          -> m (JobStatus
                                                                                                  'Safe
                                                                                                  JobLog))
                                                                                         :<|> (ID
                                                                                                 'Unsafe
                                                                                                 "job"
                                                                                               -> (Maybe
                                                                                                     Limit
                                                                                                   -> Maybe
                                                                                                        Offset
                                                                                                   -> m (JobStatus
                                                                                                           'Safe
                                                                                                           JobLog))
                                                                                                  :<|> ((Maybe
                                                                                                           Limit
                                                                                                         -> Maybe
                                                                                                              Offset
                                                                                                         -> m (JobStatus
                                                                                                                 'Safe
                                                                                                                 JobLog))
                                                                                                        :<|> m (JobOutput
                                                                                                                  JobLog)))))
                                                                                  :<|> ((m (JobStatus
                                                                                              'Safe
                                                                                              JobLog)
                                                                                         :<|> ((JobInput
                                                                                                  Maybe
                                                                                                  Params
                                                                                                -> m (JobStatus
                                                                                                        'Safe
                                                                                                        JobLog))
                                                                                               :<|> (ID
                                                                                                       'Unsafe
                                                                                                       "job"
                                                                                                     -> (Maybe
                                                                                                           Limit
                                                                                                         -> Maybe
                                                                                                              Offset
                                                                                                         -> m (JobStatus
                                                                                                                 'Safe
                                                                                                                 JobLog))
                                                                                                        :<|> ((Maybe
                                                                                                                 Limit
                                                                                                               -> Maybe
                                                                                                                    Offset
                                                                                                               -> m (JobStatus
                                                                                                                       'Safe
                                                                                                                       JobLog))
                                                                                                              :<|> m (JobOutput
                                                                                                                        JobLog)))))
                                                                                        :<|> (m (JobStatus
                                                                                                   'Safe
                                                                                                   JobLog)
                                                                                              :<|> ((JobInput
                                                                                                       Maybe
                                                                                                       DocumentUpload
                                                                                                     -> m (JobStatus
                                                                                                             'Safe
                                                                                                             JobLog))
                                                                                                    :<|> (ID
                                                                                                            'Unsafe
                                                                                                            "job"
                                                                                                          -> (Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> ((Maybe
                                                                                                                      Limit
                                                                                                                    -> Maybe
                                                                                                                         Offset
                                                                                                                    -> m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog))
                                                                                                                   :<|> m (JobOutput
                                                                                                                             JobLog))))))))))))))))))))
-> (NodesToScore -> m [Int])
   :<|> ((SearchQuery
          -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
         :<|> ((ShareNodeParams -> m Int)
               :<|> ((NodeId -> Maybe NodeId -> m Int)
                     :<|> (m [NodeId]
                           :<|> ((Maybe TabType
                                  -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                                 :<|> (((Maybe NodeId
                                         -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                                        :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                              :<|> (Maybe NodeId -> TabType -> m Text)))
                                       :<|> (((Maybe UTCTime
                                               -> Maybe UTCTime
                                               -> Maybe NodeId
                                               -> TabType
                                               -> m (HashedResponse (ChartMetrics Histo)))
                                              :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                                    :<|> (Maybe NodeId -> TabType -> m Text)))
                                             :<|> (((Maybe UTCTime
                                                     -> Maybe UTCTime
                                                     -> Maybe NodeId
                                                     -> TabType
                                                     -> m (HashedResponse (ChartMetrics Histo)))
                                                    :<|> ((Maybe NodeId
                                                           -> TabType -> Maybe Int -> m ())
                                                          :<|> (Maybe NodeId -> TabType -> m Text)))
                                                   :<|> (((Maybe UTCTime
                                                           -> Maybe UTCTime
                                                           -> Maybe NodeId
                                                           -> TabType
                                                           -> ListType
                                                           -> m (HashedResponse
                                                                   (ChartMetrics
                                                                      (Vector NgramsTree))))
                                                          :<|> ((Maybe NodeId
                                                                 -> TabType -> ListType -> m ())
                                                                :<|> (Maybe NodeId
                                                                      -> TabType
                                                                      -> ListType
                                                                      -> m Text)))
                                                         :<|> (((Maybe NodeId
                                                                 -> Maybe Int -> Maybe Int -> m SVG)
                                                                :<|> (Maybe NodeId -> m NodeId))
                                                               :<|> ((NodeId -> m [Int])
                                                                     :<|> ((NodeId -> m Int)
                                                                           :<|> (m (Headers
                                                                                      '[Header
                                                                                          "Content-Type"
                                                                                          Text]
                                                                                      BSResponse)
                                                                                 :<|> ((m (JobStatus
                                                                                             'Safe
                                                                                             JobLog)
                                                                                        :<|> ((JobInput
                                                                                                 Maybe
                                                                                                 NewWithFile
                                                                                               -> m (JobStatus
                                                                                                       'Safe
                                                                                                       JobLog))
                                                                                              :<|> (ID
                                                                                                      'Unsafe
                                                                                                      "job"
                                                                                                    -> (Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> ((Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> m (JobOutput
                                                                                                                       JobLog)))))
                                                                                       :<|> ((m (JobStatus
                                                                                                   'Safe
                                                                                                   JobLog)
                                                                                              :<|> ((JobInput
                                                                                                       Maybe
                                                                                                       Params
                                                                                                     -> m (JobStatus
                                                                                                             'Safe
                                                                                                             JobLog))
                                                                                                    :<|> (ID
                                                                                                            'Unsafe
                                                                                                            "job"
                                                                                                          -> (Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> ((Maybe
                                                                                                                      Limit
                                                                                                                    -> Maybe
                                                                                                                         Offset
                                                                                                                    -> m (JobStatus
                                                                                                                            'Safe
                                                                                                                            JobLog))
                                                                                                                   :<|> m (JobOutput
                                                                                                                             JobLog)))))
                                                                                             :<|> (m (JobStatus
                                                                                                        'Safe
                                                                                                        JobLog)
                                                                                                   :<|> ((JobInput
                                                                                                            Maybe
                                                                                                            DocumentUpload
                                                                                                          -> m (JobStatus
                                                                                                                  'Safe
                                                                                                                  JobLog))
                                                                                                         :<|> (ID
                                                                                                                 'Unsafe
                                                                                                                 "job"
                                                                                                               -> (Maybe
                                                                                                                     Limit
                                                                                                                   -> Maybe
                                                                                                                        Offset
                                                                                                                   -> m (JobStatus
                                                                                                                           'Safe
                                                                                                                           JobLog))
                                                                                                                  :<|> ((Maybe
                                                                                                                           Limit
                                                                                                                         -> Maybe
                                                                                                                              Offset
                                                                                                                         -> m (JobStatus
                                                                                                                                 'Safe
                                                                                                                                 JobLog))
                                                                                                                        :<|> m (JobOutput
                                                                                                                                  JobLog))))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer (API SearchResult)
Search.api  NodeId
id'
           (SearchQuery
 -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
-> ((ShareNodeParams -> m Int)
    :<|> ((NodeId -> Maybe NodeId -> m Int)
          :<|> (m [NodeId]
                :<|> ((Maybe TabType
                       -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                      :<|> (((Maybe NodeId
                              -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                             :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                   :<|> (Maybe NodeId -> TabType -> m Text)))
                            :<|> (((Maybe UTCTime
                                    -> Maybe UTCTime
                                    -> Maybe NodeId
                                    -> TabType
                                    -> m (HashedResponse (ChartMetrics Histo)))
                                   :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                         :<|> (Maybe NodeId -> TabType -> m Text)))
                                  :<|> (((Maybe UTCTime
                                          -> Maybe UTCTime
                                          -> Maybe NodeId
                                          -> TabType
                                          -> m (HashedResponse (ChartMetrics Histo)))
                                         :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                               :<|> (Maybe NodeId -> TabType -> m Text)))
                                        :<|> (((Maybe UTCTime
                                                -> Maybe UTCTime
                                                -> Maybe NodeId
                                                -> TabType
                                                -> ListType
                                                -> m (HashedResponse
                                                        (ChartMetrics (Vector NgramsTree))))
                                               :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                                     :<|> (Maybe NodeId
                                                           -> TabType -> ListType -> m Text)))
                                              :<|> (((Maybe NodeId
                                                      -> Maybe Int -> Maybe Int -> m SVG)
                                                     :<|> (Maybe NodeId -> m NodeId))
                                                    :<|> ((NodeId -> m [Int])
                                                          :<|> ((NodeId -> m Int)
                                                                :<|> (m (Headers
                                                                           '[Header
                                                                               "Content-Type" Text]
                                                                           BSResponse)
                                                                      :<|> ((m (JobStatus
                                                                                  'Safe JobLog)
                                                                             :<|> ((JobInput
                                                                                      Maybe
                                                                                      NewWithFile
                                                                                    -> m (JobStatus
                                                                                            'Safe
                                                                                            JobLog))
                                                                                   :<|> (ID
                                                                                           'Unsafe
                                                                                           "job"
                                                                                         -> (Maybe
                                                                                               Limit
                                                                                             -> Maybe
                                                                                                  Offset
                                                                                             -> m (JobStatus
                                                                                                     'Safe
                                                                                                     JobLog))
                                                                                            :<|> ((Maybe
                                                                                                     Limit
                                                                                                   -> Maybe
                                                                                                        Offset
                                                                                                   -> m (JobStatus
                                                                                                           'Safe
                                                                                                           JobLog))
                                                                                                  :<|> m (JobOutput
                                                                                                            JobLog)))))
                                                                            :<|> ((m (JobStatus
                                                                                        'Safe
                                                                                        JobLog)
                                                                                   :<|> ((JobInput
                                                                                            Maybe
                                                                                            Params
                                                                                          -> m (JobStatus
                                                                                                  'Safe
                                                                                                  JobLog))
                                                                                         :<|> (ID
                                                                                                 'Unsafe
                                                                                                 "job"
                                                                                               -> (Maybe
                                                                                                     Limit
                                                                                                   -> Maybe
                                                                                                        Offset
                                                                                                   -> m (JobStatus
                                                                                                           'Safe
                                                                                                           JobLog))
                                                                                                  :<|> ((Maybe
                                                                                                           Limit
                                                                                                         -> Maybe
                                                                                                              Offset
                                                                                                         -> m (JobStatus
                                                                                                                 'Safe
                                                                                                                 JobLog))
                                                                                                        :<|> m (JobOutput
                                                                                                                  JobLog)))))
                                                                                  :<|> (m (JobStatus
                                                                                             'Safe
                                                                                             JobLog)
                                                                                        :<|> ((JobInput
                                                                                                 Maybe
                                                                                                 DocumentUpload
                                                                                               -> m (JobStatus
                                                                                                       'Safe
                                                                                                       JobLog))
                                                                                              :<|> (ID
                                                                                                      'Unsafe
                                                                                                      "job"
                                                                                                    -> (Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> ((Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> m (JobOutput
                                                                                                                       JobLog)))))))))))))))))))
-> (SearchQuery
    -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m SearchResult)
   :<|> ((ShareNodeParams -> m Int)
         :<|> ((NodeId -> Maybe NodeId -> m Int)
               :<|> (m [NodeId]
                     :<|> ((Maybe TabType
                            -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                           :<|> (((Maybe NodeId
                                   -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                                  :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                        :<|> (Maybe NodeId -> TabType -> m Text)))
                                 :<|> (((Maybe UTCTime
                                         -> Maybe UTCTime
                                         -> Maybe NodeId
                                         -> TabType
                                         -> m (HashedResponse (ChartMetrics Histo)))
                                        :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                              :<|> (Maybe NodeId -> TabType -> m Text)))
                                       :<|> (((Maybe UTCTime
                                               -> Maybe UTCTime
                                               -> Maybe NodeId
                                               -> TabType
                                               -> m (HashedResponse (ChartMetrics Histo)))
                                              :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                                    :<|> (Maybe NodeId -> TabType -> m Text)))
                                             :<|> (((Maybe UTCTime
                                                     -> Maybe UTCTime
                                                     -> Maybe NodeId
                                                     -> TabType
                                                     -> ListType
                                                     -> m (HashedResponse
                                                             (ChartMetrics (Vector NgramsTree))))
                                                    :<|> ((Maybe NodeId
                                                           -> TabType -> ListType -> m ())
                                                          :<|> (Maybe NodeId
                                                                -> TabType -> ListType -> m Text)))
                                                   :<|> (((Maybe NodeId
                                                           -> Maybe Int -> Maybe Int -> m SVG)
                                                          :<|> (Maybe NodeId -> m NodeId))
                                                         :<|> ((NodeId -> m [Int])
                                                               :<|> ((NodeId -> m Int)
                                                                     :<|> (m (Headers
                                                                                '[Header
                                                                                    "Content-Type"
                                                                                    Text]
                                                                                BSResponse)
                                                                           :<|> ((m (JobStatus
                                                                                       'Safe JobLog)
                                                                                  :<|> ((JobInput
                                                                                           Maybe
                                                                                           NewWithFile
                                                                                         -> m (JobStatus
                                                                                                 'Safe
                                                                                                 JobLog))
                                                                                        :<|> (ID
                                                                                                'Unsafe
                                                                                                "job"
                                                                                              -> (Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> ((Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> m (JobOutput
                                                                                                                 JobLog)))))
                                                                                 :<|> ((m (JobStatus
                                                                                             'Safe
                                                                                             JobLog)
                                                                                        :<|> ((JobInput
                                                                                                 Maybe
                                                                                                 Params
                                                                                               -> m (JobStatus
                                                                                                       'Safe
                                                                                                       JobLog))
                                                                                              :<|> (ID
                                                                                                      'Unsafe
                                                                                                      "job"
                                                                                                    -> (Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> ((Maybe
                                                                                                                Limit
                                                                                                              -> Maybe
                                                                                                                   Offset
                                                                                                              -> m (JobStatus
                                                                                                                      'Safe
                                                                                                                      JobLog))
                                                                                                             :<|> m (JobOutput
                                                                                                                       JobLog)))))
                                                                                       :<|> (m (JobStatus
                                                                                                  'Safe
                                                                                                  JobLog)
                                                                                             :<|> ((JobInput
                                                                                                      Maybe
                                                                                                      DocumentUpload
                                                                                                    -> m (JobStatus
                                                                                                            'Safe
                                                                                                            JobLog))
                                                                                                   :<|> (ID
                                                                                                           'Unsafe
                                                                                                           "job"
                                                                                                         -> (Maybe
                                                                                                               Limit
                                                                                                             -> Maybe
                                                                                                                  Offset
                                                                                                             -> m (JobStatus
                                                                                                                     'Safe
                                                                                                                     JobLog))
                                                                                                            :<|> ((Maybe
                                                                                                                     Limit
                                                                                                                   -> Maybe
                                                                                                                        Offset
                                                                                                                   -> m (JobStatus
                                                                                                                           'Safe
                                                                                                                           JobLog))
                                                                                                                  :<|> m (JobOutput
                                                                                                                            JobLog)))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> User -> NodeId -> ShareNodeParams -> CmdR err Int
forall err.
HasNodeError err =>
User -> NodeId -> ShareNodeParams -> CmdR err Int
Share.api   (NodeId -> User
RootId (NodeId -> User) -> NodeId -> User
forall a b. (a -> b) -> a -> b
$ Int -> NodeId
NodeId Int
uId) NodeId
id'
           -- Pairing Tools
           (ShareNodeParams -> m Int)
-> ((NodeId -> Maybe NodeId -> m Int)
    :<|> (m [NodeId]
          :<|> ((Maybe TabType
                 -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                :<|> (((Maybe NodeId
                        -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                       :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                             :<|> (Maybe NodeId -> TabType -> m Text)))
                      :<|> (((Maybe UTCTime
                              -> Maybe UTCTime
                              -> Maybe NodeId
                              -> TabType
                              -> m (HashedResponse (ChartMetrics Histo)))
                             :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                   :<|> (Maybe NodeId -> TabType -> m Text)))
                            :<|> (((Maybe UTCTime
                                    -> Maybe UTCTime
                                    -> Maybe NodeId
                                    -> TabType
                                    -> m (HashedResponse (ChartMetrics Histo)))
                                   :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                         :<|> (Maybe NodeId -> TabType -> m Text)))
                                  :<|> (((Maybe UTCTime
                                          -> Maybe UTCTime
                                          -> Maybe NodeId
                                          -> TabType
                                          -> ListType
                                          -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                                         :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                               :<|> (Maybe NodeId
                                                     -> TabType -> ListType -> m Text)))
                                        :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                                               :<|> (Maybe NodeId -> m NodeId))
                                              :<|> ((NodeId -> m [Int])
                                                    :<|> ((NodeId -> m Int)
                                                          :<|> (m (Headers
                                                                     '[Header "Content-Type" Text]
                                                                     BSResponse)
                                                                :<|> ((m (JobStatus 'Safe JobLog)
                                                                       :<|> ((JobInput
                                                                                Maybe NewWithFile
                                                                              -> m (JobStatus
                                                                                      'Safe JobLog))
                                                                             :<|> (ID 'Unsafe "job"
                                                                                   -> (Maybe Limit
                                                                                       -> Maybe
                                                                                            Offset
                                                                                       -> m (JobStatus
                                                                                               'Safe
                                                                                               JobLog))
                                                                                      :<|> ((Maybe
                                                                                               Limit
                                                                                             -> Maybe
                                                                                                  Offset
                                                                                             -> m (JobStatus
                                                                                                     'Safe
                                                                                                     JobLog))
                                                                                            :<|> m (JobOutput
                                                                                                      JobLog)))))
                                                                      :<|> ((m (JobStatus
                                                                                  'Safe JobLog)
                                                                             :<|> ((JobInput
                                                                                      Maybe Params
                                                                                    -> m (JobStatus
                                                                                            'Safe
                                                                                            JobLog))
                                                                                   :<|> (ID
                                                                                           'Unsafe
                                                                                           "job"
                                                                                         -> (Maybe
                                                                                               Limit
                                                                                             -> Maybe
                                                                                                  Offset
                                                                                             -> m (JobStatus
                                                                                                     'Safe
                                                                                                     JobLog))
                                                                                            :<|> ((Maybe
                                                                                                     Limit
                                                                                                   -> Maybe
                                                                                                        Offset
                                                                                                   -> m (JobStatus
                                                                                                           'Safe
                                                                                                           JobLog))
                                                                                                  :<|> m (JobOutput
                                                                                                            JobLog)))))
                                                                            :<|> (m (JobStatus
                                                                                       'Safe JobLog)
                                                                                  :<|> ((JobInput
                                                                                           Maybe
                                                                                           DocumentUpload
                                                                                         -> m (JobStatus
                                                                                                 'Safe
                                                                                                 JobLog))
                                                                                        :<|> (ID
                                                                                                'Unsafe
                                                                                                "job"
                                                                                              -> (Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> ((Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> m (JobOutput
                                                                                                                 JobLog))))))))))))))))))
-> (ShareNodeParams -> m Int)
   :<|> ((NodeId -> Maybe NodeId -> m Int)
         :<|> (m [NodeId]
               :<|> ((Maybe TabType
                      -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
                     :<|> (((Maybe NodeId
                             -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                            :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                  :<|> (Maybe NodeId -> TabType -> m Text)))
                           :<|> (((Maybe UTCTime
                                   -> Maybe UTCTime
                                   -> Maybe NodeId
                                   -> TabType
                                   -> m (HashedResponse (ChartMetrics Histo)))
                                  :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                        :<|> (Maybe NodeId -> TabType -> m Text)))
                                 :<|> (((Maybe UTCTime
                                         -> Maybe UTCTime
                                         -> Maybe NodeId
                                         -> TabType
                                         -> m (HashedResponse (ChartMetrics Histo)))
                                        :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                              :<|> (Maybe NodeId -> TabType -> m Text)))
                                       :<|> (((Maybe UTCTime
                                               -> Maybe UTCTime
                                               -> Maybe NodeId
                                               -> TabType
                                               -> ListType
                                               -> m (HashedResponse
                                                       (ChartMetrics (Vector NgramsTree))))
                                              :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                                    :<|> (Maybe NodeId
                                                          -> TabType -> ListType -> m Text)))
                                             :<|> (((Maybe NodeId
                                                     -> Maybe Int -> Maybe Int -> m SVG)
                                                    :<|> (Maybe NodeId -> m NodeId))
                                                   :<|> ((NodeId -> m [Int])
                                                         :<|> ((NodeId -> m Int)
                                                               :<|> (m (Headers
                                                                          '[Header
                                                                              "Content-Type" Text]
                                                                          BSResponse)
                                                                     :<|> ((m (JobStatus
                                                                                 'Safe JobLog)
                                                                            :<|> ((JobInput
                                                                                     Maybe
                                                                                     NewWithFile
                                                                                   -> m (JobStatus
                                                                                           'Safe
                                                                                           JobLog))
                                                                                  :<|> (ID
                                                                                          'Unsafe
                                                                                          "job"
                                                                                        -> (Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> ((Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> m (JobOutput
                                                                                                           JobLog)))))
                                                                           :<|> ((m (JobStatus
                                                                                       'Safe JobLog)
                                                                                  :<|> ((JobInput
                                                                                           Maybe
                                                                                           Params
                                                                                         -> m (JobStatus
                                                                                                 'Safe
                                                                                                 JobLog))
                                                                                        :<|> (ID
                                                                                                'Unsafe
                                                                                                "job"
                                                                                              -> (Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> ((Maybe
                                                                                                          Limit
                                                                                                        -> Maybe
                                                                                                             Offset
                                                                                                        -> m (JobStatus
                                                                                                                'Safe
                                                                                                                JobLog))
                                                                                                       :<|> m (JobOutput
                                                                                                                 JobLog)))))
                                                                                 :<|> (m (JobStatus
                                                                                            'Safe
                                                                                            JobLog)
                                                                                       :<|> ((JobInput
                                                                                                Maybe
                                                                                                DocumentUpload
                                                                                              -> m (JobStatus
                                                                                                      'Safe
                                                                                                      JobLog))
                                                                                             :<|> (ID
                                                                                                     'Unsafe
                                                                                                     "job"
                                                                                                   -> (Maybe
                                                                                                         Limit
                                                                                                       -> Maybe
                                                                                                            Offset
                                                                                                       -> m (JobStatus
                                                                                                               'Safe
                                                                                                               JobLog))
                                                                                                      :<|> ((Maybe
                                                                                                               Limit
                                                                                                             -> Maybe
                                                                                                                  Offset
                                                                                                             -> m (JobStatus
                                                                                                                     'Safe
                                                                                                                     JobLog))
                                                                                                            :<|> m (JobOutput
                                                                                                                      JobLog))))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer PairWith
pairWith    NodeId
id'
           (NodeId -> Maybe NodeId -> m Int)
-> (m [NodeId]
    :<|> ((Maybe TabType
           -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
          :<|> (((Maybe NodeId
                  -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                 :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                       :<|> (Maybe NodeId -> TabType -> m Text)))
                :<|> (((Maybe UTCTime
                        -> Maybe UTCTime
                        -> Maybe NodeId
                        -> TabType
                        -> m (HashedResponse (ChartMetrics Histo)))
                       :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                             :<|> (Maybe NodeId -> TabType -> m Text)))
                      :<|> (((Maybe UTCTime
                              -> Maybe UTCTime
                              -> Maybe NodeId
                              -> TabType
                              -> m (HashedResponse (ChartMetrics Histo)))
                             :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                   :<|> (Maybe NodeId -> TabType -> m Text)))
                            :<|> (((Maybe UTCTime
                                    -> Maybe UTCTime
                                    -> Maybe NodeId
                                    -> TabType
                                    -> ListType
                                    -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                                   :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                         :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                                  :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                                         :<|> (Maybe NodeId -> m NodeId))
                                        :<|> ((NodeId -> m [Int])
                                              :<|> ((NodeId -> m Int)
                                                    :<|> (m (Headers
                                                               '[Header "Content-Type" Text]
                                                               BSResponse)
                                                          :<|> ((m (JobStatus 'Safe JobLog)
                                                                 :<|> ((JobInput Maybe NewWithFile
                                                                        -> m (JobStatus
                                                                                'Safe JobLog))
                                                                       :<|> (ID 'Unsafe "job"
                                                                             -> (Maybe Limit
                                                                                 -> Maybe Offset
                                                                                 -> m (JobStatus
                                                                                         'Safe
                                                                                         JobLog))
                                                                                :<|> ((Maybe Limit
                                                                                       -> Maybe
                                                                                            Offset
                                                                                       -> m (JobStatus
                                                                                               'Safe
                                                                                               JobLog))
                                                                                      :<|> m (JobOutput
                                                                                                JobLog)))))
                                                                :<|> ((m (JobStatus 'Safe JobLog)
                                                                       :<|> ((JobInput Maybe Params
                                                                              -> m (JobStatus
                                                                                      'Safe JobLog))
                                                                             :<|> (ID 'Unsafe "job"
                                                                                   -> (Maybe Limit
                                                                                       -> Maybe
                                                                                            Offset
                                                                                       -> m (JobStatus
                                                                                               'Safe
                                                                                               JobLog))
                                                                                      :<|> ((Maybe
                                                                                               Limit
                                                                                             -> Maybe
                                                                                                  Offset
                                                                                             -> m (JobStatus
                                                                                                     'Safe
                                                                                                     JobLog))
                                                                                            :<|> m (JobOutput
                                                                                                      JobLog)))))
                                                                      :<|> (m (JobStatus
                                                                                 'Safe JobLog)
                                                                            :<|> ((JobInput
                                                                                     Maybe
                                                                                     DocumentUpload
                                                                                   -> m (JobStatus
                                                                                           'Safe
                                                                                           JobLog))
                                                                                  :<|> (ID
                                                                                          'Unsafe
                                                                                          "job"
                                                                                        -> (Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> ((Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> m (JobOutput
                                                                                                           JobLog)))))))))))))))))
-> (NodeId -> Maybe NodeId -> m Int)
   :<|> (m [NodeId]
         :<|> ((Maybe TabType
                -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
               :<|> (((Maybe NodeId
                       -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                      :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                            :<|> (Maybe NodeId -> TabType -> m Text)))
                     :<|> (((Maybe UTCTime
                             -> Maybe UTCTime
                             -> Maybe NodeId
                             -> TabType
                             -> m (HashedResponse (ChartMetrics Histo)))
                            :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                  :<|> (Maybe NodeId -> TabType -> m Text)))
                           :<|> (((Maybe UTCTime
                                   -> Maybe UTCTime
                                   -> Maybe NodeId
                                   -> TabType
                                   -> m (HashedResponse (ChartMetrics Histo)))
                                  :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                        :<|> (Maybe NodeId -> TabType -> m Text)))
                                 :<|> (((Maybe UTCTime
                                         -> Maybe UTCTime
                                         -> Maybe NodeId
                                         -> TabType
                                         -> ListType
                                         -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                                        :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                              :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                                       :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                                              :<|> (Maybe NodeId -> m NodeId))
                                             :<|> ((NodeId -> m [Int])
                                                   :<|> ((NodeId -> m Int)
                                                         :<|> (m (Headers
                                                                    '[Header "Content-Type" Text]
                                                                    BSResponse)
                                                               :<|> ((m (JobStatus 'Safe JobLog)
                                                                      :<|> ((JobInput
                                                                               Maybe NewWithFile
                                                                             -> m (JobStatus
                                                                                     'Safe JobLog))
                                                                            :<|> (ID 'Unsafe "job"
                                                                                  -> (Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> ((Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> m (JobOutput
                                                                                                     JobLog)))))
                                                                     :<|> ((m (JobStatus
                                                                                 'Safe JobLog)
                                                                            :<|> ((JobInput
                                                                                     Maybe Params
                                                                                   -> m (JobStatus
                                                                                           'Safe
                                                                                           JobLog))
                                                                                  :<|> (ID
                                                                                          'Unsafe
                                                                                          "job"
                                                                                        -> (Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> ((Maybe
                                                                                                    Limit
                                                                                                  -> Maybe
                                                                                                       Offset
                                                                                                  -> m (JobStatus
                                                                                                          'Safe
                                                                                                          JobLog))
                                                                                                 :<|> m (JobOutput
                                                                                                           JobLog)))))
                                                                           :<|> (m (JobStatus
                                                                                      'Safe JobLog)
                                                                                 :<|> ((JobInput
                                                                                          Maybe
                                                                                          DocumentUpload
                                                                                        -> m (JobStatus
                                                                                                'Safe
                                                                                                JobLog))
                                                                                       :<|> (ID
                                                                                               'Unsafe
                                                                                               "job"
                                                                                             -> (Maybe
                                                                                                   Limit
                                                                                                 -> Maybe
                                                                                                      Offset
                                                                                                 -> m (JobStatus
                                                                                                         'Safe
                                                                                                         JobLog))
                                                                                                :<|> ((Maybe
                                                                                                         Limit
                                                                                                       -> Maybe
                                                                                                            Offset
                                                                                                       -> m (JobStatus
                                                                                                               'Safe
                                                                                                               JobLog))
                                                                                                      :<|> m (JobOutput
                                                                                                                JobLog)))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer Pairs
pairs       NodeId
id'
           m [NodeId]
-> ((Maybe TabType
     -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
    :<|> (((Maybe NodeId
            -> TabType -> Maybe Int -> m (HashedResponse Metrics))
           :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                 :<|> (Maybe NodeId -> TabType -> m Text)))
          :<|> (((Maybe UTCTime
                  -> Maybe UTCTime
                  -> Maybe NodeId
                  -> TabType
                  -> m (HashedResponse (ChartMetrics Histo)))
                 :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                       :<|> (Maybe NodeId -> TabType -> m Text)))
                :<|> (((Maybe UTCTime
                        -> Maybe UTCTime
                        -> Maybe NodeId
                        -> TabType
                        -> m (HashedResponse (ChartMetrics Histo)))
                       :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                             :<|> (Maybe NodeId -> TabType -> m Text)))
                      :<|> (((Maybe UTCTime
                              -> Maybe UTCTime
                              -> Maybe NodeId
                              -> TabType
                              -> ListType
                              -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                             :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                   :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                            :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                                   :<|> (Maybe NodeId -> m NodeId))
                                  :<|> ((NodeId -> m [Int])
                                        :<|> ((NodeId -> m Int)
                                              :<|> (m (Headers
                                                         '[Header "Content-Type" Text] BSResponse)
                                                    :<|> ((m (JobStatus 'Safe JobLog)
                                                           :<|> ((JobInput Maybe NewWithFile
                                                                  -> m (JobStatus 'Safe JobLog))
                                                                 :<|> (ID 'Unsafe "job"
                                                                       -> (Maybe Limit
                                                                           -> Maybe Offset
                                                                           -> m (JobStatus
                                                                                   'Safe JobLog))
                                                                          :<|> ((Maybe Limit
                                                                                 -> Maybe Offset
                                                                                 -> m (JobStatus
                                                                                         'Safe
                                                                                         JobLog))
                                                                                :<|> m (JobOutput
                                                                                          JobLog)))))
                                                          :<|> ((m (JobStatus 'Safe JobLog)
                                                                 :<|> ((JobInput Maybe Params
                                                                        -> m (JobStatus
                                                                                'Safe JobLog))
                                                                       :<|> (ID 'Unsafe "job"
                                                                             -> (Maybe Limit
                                                                                 -> Maybe Offset
                                                                                 -> m (JobStatus
                                                                                         'Safe
                                                                                         JobLog))
                                                                                :<|> ((Maybe Limit
                                                                                       -> Maybe
                                                                                            Offset
                                                                                       -> m (JobStatus
                                                                                               'Safe
                                                                                               JobLog))
                                                                                      :<|> m (JobOutput
                                                                                                JobLog)))))
                                                                :<|> (m (JobStatus 'Safe JobLog)
                                                                      :<|> ((JobInput
                                                                               Maybe DocumentUpload
                                                                             -> m (JobStatus
                                                                                     'Safe JobLog))
                                                                            :<|> (ID 'Unsafe "job"
                                                                                  -> (Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> ((Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> m (JobOutput
                                                                                                     JobLog))))))))))))))))
-> m [NodeId]
   :<|> ((Maybe TabType
          -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
         :<|> (((Maybe NodeId
                 -> TabType -> Maybe Int -> m (HashedResponse Metrics))
                :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                      :<|> (Maybe NodeId -> TabType -> m Text)))
               :<|> (((Maybe UTCTime
                       -> Maybe UTCTime
                       -> Maybe NodeId
                       -> TabType
                       -> m (HashedResponse (ChartMetrics Histo)))
                      :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                            :<|> (Maybe NodeId -> TabType -> m Text)))
                     :<|> (((Maybe UTCTime
                             -> Maybe UTCTime
                             -> Maybe NodeId
                             -> TabType
                             -> m (HashedResponse (ChartMetrics Histo)))
                            :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                                  :<|> (Maybe NodeId -> TabType -> m Text)))
                           :<|> (((Maybe UTCTime
                                   -> Maybe UTCTime
                                   -> Maybe NodeId
                                   -> TabType
                                   -> ListType
                                   -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                                  :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                        :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                                 :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                                        :<|> (Maybe NodeId -> m NodeId))
                                       :<|> ((NodeId -> m [Int])
                                             :<|> ((NodeId -> m Int)
                                                   :<|> (m (Headers
                                                              '[Header "Content-Type" Text]
                                                              BSResponse)
                                                         :<|> ((m (JobStatus 'Safe JobLog)
                                                                :<|> ((JobInput Maybe NewWithFile
                                                                       -> m (JobStatus
                                                                               'Safe JobLog))
                                                                      :<|> (ID 'Unsafe "job"
                                                                            -> (Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> ((Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> m (JobOutput
                                                                                               JobLog)))))
                                                               :<|> ((m (JobStatus 'Safe JobLog)
                                                                      :<|> ((JobInput Maybe Params
                                                                             -> m (JobStatus
                                                                                     'Safe JobLog))
                                                                            :<|> (ID 'Unsafe "job"
                                                                                  -> (Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> ((Maybe
                                                                                              Limit
                                                                                            -> Maybe
                                                                                                 Offset
                                                                                            -> m (JobStatus
                                                                                                    'Safe
                                                                                                    JobLog))
                                                                                           :<|> m (JobOutput
                                                                                                     JobLog)))))
                                                                     :<|> (m (JobStatus
                                                                                'Safe JobLog)
                                                                           :<|> ((JobInput
                                                                                    Maybe
                                                                                    DocumentUpload
                                                                                  -> m (JobStatus
                                                                                          'Safe
                                                                                          JobLog))
                                                                                 :<|> (ID
                                                                                         'Unsafe
                                                                                         "job"
                                                                                       -> (Maybe
                                                                                             Limit
                                                                                           -> Maybe
                                                                                                Offset
                                                                                           -> m (JobStatus
                                                                                                   'Safe
                                                                                                   JobLog))
                                                                                          :<|> ((Maybe
                                                                                                   Limit
                                                                                                 -> Maybe
                                                                                                      Offset
                                                                                                 -> m (JobStatus
                                                                                                         'Safe
                                                                                                         JobLog))
                                                                                                :<|> m (JobOutput
                                                                                                          JobLog))))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId
-> Maybe TabType
-> Maybe Int
-> Maybe Int
-> Maybe OrderBy
-> Cmd err [FacetDoc]
forall err.
NodeId
-> Maybe TabType
-> Maybe Int
-> Maybe Int
-> Maybe OrderBy
-> Cmd err [FacetDoc]
getPair     NodeId
id'

           -- VIZ
           (Maybe TabType
 -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
-> (((Maybe NodeId
      -> TabType -> Maybe Int -> m (HashedResponse Metrics))
     :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
           :<|> (Maybe NodeId -> TabType -> m Text)))
    :<|> (((Maybe UTCTime
            -> Maybe UTCTime
            -> Maybe NodeId
            -> TabType
            -> m (HashedResponse (ChartMetrics Histo)))
           :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                 :<|> (Maybe NodeId -> TabType -> m Text)))
          :<|> (((Maybe UTCTime
                  -> Maybe UTCTime
                  -> Maybe NodeId
                  -> TabType
                  -> m (HashedResponse (ChartMetrics Histo)))
                 :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                       :<|> (Maybe NodeId -> TabType -> m Text)))
                :<|> (((Maybe UTCTime
                        -> Maybe UTCTime
                        -> Maybe NodeId
                        -> TabType
                        -> ListType
                        -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                       :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                             :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                      :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                             :<|> (Maybe NodeId -> m NodeId))
                            :<|> ((NodeId -> m [Int])
                                  :<|> ((NodeId -> m Int)
                                        :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                                              :<|> ((m (JobStatus 'Safe JobLog)
                                                     :<|> ((JobInput Maybe NewWithFile
                                                            -> m (JobStatus 'Safe JobLog))
                                                           :<|> (ID 'Unsafe "job"
                                                                 -> (Maybe Limit
                                                                     -> Maybe Offset
                                                                     -> m (JobStatus 'Safe JobLog))
                                                                    :<|> ((Maybe Limit
                                                                           -> Maybe Offset
                                                                           -> m (JobStatus
                                                                                   'Safe JobLog))
                                                                          :<|> m (JobOutput
                                                                                    JobLog)))))
                                                    :<|> ((m (JobStatus 'Safe JobLog)
                                                           :<|> ((JobInput Maybe Params
                                                                  -> m (JobStatus 'Safe JobLog))
                                                                 :<|> (ID 'Unsafe "job"
                                                                       -> (Maybe Limit
                                                                           -> Maybe Offset
                                                                           -> m (JobStatus
                                                                                   'Safe JobLog))
                                                                          :<|> ((Maybe Limit
                                                                                 -> Maybe Offset
                                                                                 -> m (JobStatus
                                                                                         'Safe
                                                                                         JobLog))
                                                                                :<|> m (JobOutput
                                                                                          JobLog)))))
                                                          :<|> (m (JobStatus 'Safe JobLog)
                                                                :<|> ((JobInput Maybe DocumentUpload
                                                                       -> m (JobStatus
                                                                               'Safe JobLog))
                                                                      :<|> (ID 'Unsafe "job"
                                                                            -> (Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> ((Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> m (JobOutput
                                                                                               JobLog)))))))))))))))
-> (Maybe TabType
    -> Maybe Int -> Maybe Int -> Maybe OrderBy -> m [FacetDoc])
   :<|> (((Maybe NodeId
           -> TabType -> Maybe Int -> m (HashedResponse Metrics))
          :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                :<|> (Maybe NodeId -> TabType -> m Text)))
         :<|> (((Maybe UTCTime
                 -> Maybe UTCTime
                 -> Maybe NodeId
                 -> TabType
                 -> m (HashedResponse (ChartMetrics Histo)))
                :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                      :<|> (Maybe NodeId -> TabType -> m Text)))
               :<|> (((Maybe UTCTime
                       -> Maybe UTCTime
                       -> Maybe NodeId
                       -> TabType
                       -> m (HashedResponse (ChartMetrics Histo)))
                      :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                            :<|> (Maybe NodeId -> TabType -> m Text)))
                     :<|> (((Maybe UTCTime
                             -> Maybe UTCTime
                             -> Maybe NodeId
                             -> TabType
                             -> ListType
                             -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                            :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                                  :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                           :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                                  :<|> (Maybe NodeId -> m NodeId))
                                 :<|> ((NodeId -> m [Int])
                                       :<|> ((NodeId -> m Int)
                                             :<|> (m (Headers
                                                        '[Header "Content-Type" Text] BSResponse)
                                                   :<|> ((m (JobStatus 'Safe JobLog)
                                                          :<|> ((JobInput Maybe NewWithFile
                                                                 -> m (JobStatus 'Safe JobLog))
                                                                :<|> (ID 'Unsafe "job"
                                                                      -> (Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> ((Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> m (JobOutput
                                                                                         JobLog)))))
                                                         :<|> ((m (JobStatus 'Safe JobLog)
                                                                :<|> ((JobInput Maybe Params
                                                                       -> m (JobStatus
                                                                               'Safe JobLog))
                                                                      :<|> (ID 'Unsafe "job"
                                                                            -> (Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> ((Maybe Limit
                                                                                      -> Maybe
                                                                                           Offset
                                                                                      -> m (JobStatus
                                                                                              'Safe
                                                                                              JobLog))
                                                                                     :<|> m (JobOutput
                                                                                               JobLog)))))
                                                               :<|> (m (JobStatus 'Safe JobLog)
                                                                     :<|> ((JobInput
                                                                              Maybe DocumentUpload
                                                                            -> m (JobStatus
                                                                                    'Safe JobLog))
                                                                           :<|> (ID 'Unsafe "job"
                                                                                 -> (Maybe Limit
                                                                                     -> Maybe Offset
                                                                                     -> m (JobStatus
                                                                                             'Safe
                                                                                             JobLog))
                                                                                    :<|> ((Maybe
                                                                                             Limit
                                                                                           -> Maybe
                                                                                                Offset
                                                                                           -> m (JobStatus
                                                                                                   'Safe
                                                                                                   JobLog))
                                                                                          :<|> m (JobOutput
                                                                                                    JobLog)))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer ScatterAPI
scatterApi NodeId
id'
           ((Maybe NodeId
  -> TabType -> Maybe Int -> m (HashedResponse Metrics))
 :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
       :<|> (Maybe NodeId -> TabType -> m Text)))
-> (((Maybe UTCTime
      -> Maybe UTCTime
      -> Maybe NodeId
      -> TabType
      -> m (HashedResponse (ChartMetrics Histo)))
     :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
           :<|> (Maybe NodeId -> TabType -> m Text)))
    :<|> (((Maybe UTCTime
            -> Maybe UTCTime
            -> Maybe NodeId
            -> TabType
            -> m (HashedResponse (ChartMetrics Histo)))
           :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                 :<|> (Maybe NodeId -> TabType -> m Text)))
          :<|> (((Maybe UTCTime
                  -> Maybe UTCTime
                  -> Maybe NodeId
                  -> TabType
                  -> ListType
                  -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                 :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                       :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                       :<|> (Maybe NodeId -> m NodeId))
                      :<|> ((NodeId -> m [Int])
                            :<|> ((NodeId -> m Int)
                                  :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                                        :<|> ((m (JobStatus 'Safe JobLog)
                                               :<|> ((JobInput Maybe NewWithFile
                                                      -> m (JobStatus 'Safe JobLog))
                                                     :<|> (ID 'Unsafe "job"
                                                           -> (Maybe Limit
                                                               -> Maybe Offset
                                                               -> m (JobStatus 'Safe JobLog))
                                                              :<|> ((Maybe Limit
                                                                     -> Maybe Offset
                                                                     -> m (JobStatus 'Safe JobLog))
                                                                    :<|> m (JobOutput JobLog)))))
                                              :<|> ((m (JobStatus 'Safe JobLog)
                                                     :<|> ((JobInput Maybe Params
                                                            -> m (JobStatus 'Safe JobLog))
                                                           :<|> (ID 'Unsafe "job"
                                                                 -> (Maybe Limit
                                                                     -> Maybe Offset
                                                                     -> m (JobStatus 'Safe JobLog))
                                                                    :<|> ((Maybe Limit
                                                                           -> Maybe Offset
                                                                           -> m (JobStatus
                                                                                   'Safe JobLog))
                                                                          :<|> m (JobOutput
                                                                                    JobLog)))))
                                                    :<|> (m (JobStatus 'Safe JobLog)
                                                          :<|> ((JobInput Maybe DocumentUpload
                                                                 -> m (JobStatus 'Safe JobLog))
                                                                :<|> (ID 'Unsafe "job"
                                                                      -> (Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> ((Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> m (JobOutput
                                                                                         JobLog))))))))))))))
-> ((Maybe NodeId
     -> TabType -> Maybe Int -> m (HashedResponse Metrics))
    :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
          :<|> (Maybe NodeId -> TabType -> m Text)))
   :<|> (((Maybe UTCTime
           -> Maybe UTCTime
           -> Maybe NodeId
           -> TabType
           -> m (HashedResponse (ChartMetrics Histo)))
          :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                :<|> (Maybe NodeId -> TabType -> m Text)))
         :<|> (((Maybe UTCTime
                 -> Maybe UTCTime
                 -> Maybe NodeId
                 -> TabType
                 -> m (HashedResponse (ChartMetrics Histo)))
                :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                      :<|> (Maybe NodeId -> TabType -> m Text)))
               :<|> (((Maybe UTCTime
                       -> Maybe UTCTime
                       -> Maybe NodeId
                       -> TabType
                       -> ListType
                       -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                      :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                            :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
                     :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                            :<|> (Maybe NodeId -> m NodeId))
                           :<|> ((NodeId -> m [Int])
                                 :<|> ((NodeId -> m Int)
                                       :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                                             :<|> ((m (JobStatus 'Safe JobLog)
                                                    :<|> ((JobInput Maybe NewWithFile
                                                           -> m (JobStatus 'Safe JobLog))
                                                          :<|> (ID 'Unsafe "job"
                                                                -> (Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> ((Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> m (JobOutput
                                                                                   JobLog)))))
                                                   :<|> ((m (JobStatus 'Safe JobLog)
                                                          :<|> ((JobInput Maybe Params
                                                                 -> m (JobStatus 'Safe JobLog))
                                                                :<|> (ID 'Unsafe "job"
                                                                      -> (Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> ((Maybe Limit
                                                                                -> Maybe Offset
                                                                                -> m (JobStatus
                                                                                        'Safe
                                                                                        JobLog))
                                                                               :<|> m (JobOutput
                                                                                         JobLog)))))
                                                         :<|> (m (JobStatus 'Safe JobLog)
                                                               :<|> ((JobInput Maybe DocumentUpload
                                                                      -> m (JobStatus 'Safe JobLog))
                                                                     :<|> (ID 'Unsafe "job"
                                                                           -> (Maybe Limit
                                                                               -> Maybe Offset
                                                                               -> m (JobStatus
                                                                                       'Safe
                                                                                       JobLog))
                                                                              :<|> ((Maybe Limit
                                                                                     -> Maybe Offset
                                                                                     -> m (JobStatus
                                                                                             'Safe
                                                                                             JobLog))
                                                                                    :<|> m (JobOutput
                                                                                              JobLog))))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer ChartApi
chartApi   NodeId
id'
           ((Maybe UTCTime
  -> Maybe UTCTime
  -> Maybe NodeId
  -> TabType
  -> m (HashedResponse (ChartMetrics Histo)))
 :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
       :<|> (Maybe NodeId -> TabType -> m Text)))
-> (((Maybe UTCTime
      -> Maybe UTCTime
      -> Maybe NodeId
      -> TabType
      -> m (HashedResponse (ChartMetrics Histo)))
     :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
           :<|> (Maybe NodeId -> TabType -> m Text)))
    :<|> (((Maybe UTCTime
            -> Maybe UTCTime
            -> Maybe NodeId
            -> TabType
            -> ListType
            -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
           :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                 :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
          :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                 :<|> (Maybe NodeId -> m NodeId))
                :<|> ((NodeId -> m [Int])
                      :<|> ((NodeId -> m Int)
                            :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                                  :<|> ((m (JobStatus 'Safe JobLog)
                                         :<|> ((JobInput Maybe NewWithFile
                                                -> m (JobStatus 'Safe JobLog))
                                               :<|> (ID 'Unsafe "job"
                                                     -> (Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> ((Maybe Limit
                                                               -> Maybe Offset
                                                               -> m (JobStatus 'Safe JobLog))
                                                              :<|> m (JobOutput JobLog)))))
                                        :<|> ((m (JobStatus 'Safe JobLog)
                                               :<|> ((JobInput Maybe Params
                                                      -> m (JobStatus 'Safe JobLog))
                                                     :<|> (ID 'Unsafe "job"
                                                           -> (Maybe Limit
                                                               -> Maybe Offset
                                                               -> m (JobStatus 'Safe JobLog))
                                                              :<|> ((Maybe Limit
                                                                     -> Maybe Offset
                                                                     -> m (JobStatus 'Safe JobLog))
                                                                    :<|> m (JobOutput JobLog)))))
                                              :<|> (m (JobStatus 'Safe JobLog)
                                                    :<|> ((JobInput Maybe DocumentUpload
                                                           -> m (JobStatus 'Safe JobLog))
                                                          :<|> (ID 'Unsafe "job"
                                                                -> (Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> ((Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> m (JobOutput
                                                                                   JobLog)))))))))))))
-> ((Maybe UTCTime
     -> Maybe UTCTime
     -> Maybe NodeId
     -> TabType
     -> m (HashedResponse (ChartMetrics Histo)))
    :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
          :<|> (Maybe NodeId -> TabType -> m Text)))
   :<|> (((Maybe UTCTime
           -> Maybe UTCTime
           -> Maybe NodeId
           -> TabType
           -> m (HashedResponse (ChartMetrics Histo)))
          :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
                :<|> (Maybe NodeId -> TabType -> m Text)))
         :<|> (((Maybe UTCTime
                 -> Maybe UTCTime
                 -> Maybe NodeId
                 -> TabType
                 -> ListType
                 -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
                :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                      :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
               :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                      :<|> (Maybe NodeId -> m NodeId))
                     :<|> ((NodeId -> m [Int])
                           :<|> ((NodeId -> m Int)
                                 :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                                       :<|> ((m (JobStatus 'Safe JobLog)
                                              :<|> ((JobInput Maybe NewWithFile
                                                     -> m (JobStatus 'Safe JobLog))
                                                    :<|> (ID 'Unsafe "job"
                                                          -> (Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> ((Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> m (JobOutput JobLog)))))
                                             :<|> ((m (JobStatus 'Safe JobLog)
                                                    :<|> ((JobInput Maybe Params
                                                           -> m (JobStatus 'Safe JobLog))
                                                          :<|> (ID 'Unsafe "job"
                                                                -> (Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> ((Maybe Limit
                                                                          -> Maybe Offset
                                                                          -> m (JobStatus
                                                                                  'Safe JobLog))
                                                                         :<|> m (JobOutput
                                                                                   JobLog)))))
                                                   :<|> (m (JobStatus 'Safe JobLog)
                                                         :<|> ((JobInput Maybe DocumentUpload
                                                                -> m (JobStatus 'Safe JobLog))
                                                               :<|> (ID 'Unsafe "job"
                                                                     -> (Maybe Limit
                                                                         -> Maybe Offset
                                                                         -> m (JobStatus
                                                                                 'Safe JobLog))
                                                                        :<|> ((Maybe Limit
                                                                               -> Maybe Offset
                                                                               -> m (JobStatus
                                                                                       'Safe
                                                                                       JobLog))
                                                                              :<|> m (JobOutput
                                                                                        JobLog)))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer PieApi
pieApi     NodeId
id'
           ((Maybe UTCTime
  -> Maybe UTCTime
  -> Maybe NodeId
  -> TabType
  -> m (HashedResponse (ChartMetrics Histo)))
 :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
       :<|> (Maybe NodeId -> TabType -> m Text)))
-> (((Maybe UTCTime
      -> Maybe UTCTime
      -> Maybe NodeId
      -> TabType
      -> ListType
      -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
     :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
           :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
    :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
           :<|> (Maybe NodeId -> m NodeId))
          :<|> ((NodeId -> m [Int])
                :<|> ((NodeId -> m Int)
                      :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                            :<|> ((m (JobStatus 'Safe JobLog)
                                   :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                                         :<|> (ID 'Unsafe "job"
                                               -> (Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> ((Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> m (JobOutput JobLog)))))
                                  :<|> ((m (JobStatus 'Safe JobLog)
                                         :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                                               :<|> (ID 'Unsafe "job"
                                                     -> (Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> ((Maybe Limit
                                                               -> Maybe Offset
                                                               -> m (JobStatus 'Safe JobLog))
                                                              :<|> m (JobOutput JobLog)))))
                                        :<|> (m (JobStatus 'Safe JobLog)
                                              :<|> ((JobInput Maybe DocumentUpload
                                                     -> m (JobStatus 'Safe JobLog))
                                                    :<|> (ID 'Unsafe "job"
                                                          -> (Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> ((Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> m (JobOutput
                                                                             JobLog))))))))))))
-> ((Maybe UTCTime
     -> Maybe UTCTime
     -> Maybe NodeId
     -> TabType
     -> m (HashedResponse (ChartMetrics Histo)))
    :<|> ((Maybe NodeId -> TabType -> Maybe Int -> m ())
          :<|> (Maybe NodeId -> TabType -> m Text)))
   :<|> (((Maybe UTCTime
           -> Maybe UTCTime
           -> Maybe NodeId
           -> TabType
           -> ListType
           -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
          :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
                :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
         :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
                :<|> (Maybe NodeId -> m NodeId))
               :<|> ((NodeId -> m [Int])
                     :<|> ((NodeId -> m Int)
                           :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                                 :<|> ((m (JobStatus 'Safe JobLog)
                                        :<|> ((JobInput Maybe NewWithFile
                                               -> m (JobStatus 'Safe JobLog))
                                              :<|> (ID 'Unsafe "job"
                                                    -> (Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> ((Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> m (JobOutput JobLog)))))
                                       :<|> ((m (JobStatus 'Safe JobLog)
                                              :<|> ((JobInput Maybe Params
                                                     -> m (JobStatus 'Safe JobLog))
                                                    :<|> (ID 'Unsafe "job"
                                                          -> (Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> ((Maybe Limit
                                                                    -> Maybe Offset
                                                                    -> m (JobStatus 'Safe JobLog))
                                                                   :<|> m (JobOutput JobLog)))))
                                             :<|> (m (JobStatus 'Safe JobLog)
                                                   :<|> ((JobInput Maybe DocumentUpload
                                                          -> m (JobStatus 'Safe JobLog))
                                                         :<|> (ID 'Unsafe "job"
                                                               -> (Maybe Limit
                                                                   -> Maybe Offset
                                                                   -> m (JobStatus 'Safe JobLog))
                                                                  :<|> ((Maybe Limit
                                                                         -> Maybe Offset
                                                                         -> m (JobStatus
                                                                                 'Safe JobLog))
                                                                        :<|> m (JobOutput
                                                                                  JobLog))))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer TreeApi
treeApi    NodeId
id'
           ((Maybe UTCTime
  -> Maybe UTCTime
  -> Maybe NodeId
  -> TabType
  -> ListType
  -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
 :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
       :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
-> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
     :<|> (Maybe NodeId -> m NodeId))
    :<|> ((NodeId -> m [Int])
          :<|> ((NodeId -> m Int)
                :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                      :<|> ((m (JobStatus 'Safe JobLog)
                             :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                                   :<|> (ID 'Unsafe "job"
                                         -> (Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> ((Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> m (JobOutput JobLog)))))
                            :<|> ((m (JobStatus 'Safe JobLog)
                                   :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                                         :<|> (ID 'Unsafe "job"
                                               -> (Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> ((Maybe Limit
                                                         -> Maybe Offset
                                                         -> m (JobStatus 'Safe JobLog))
                                                        :<|> m (JobOutput JobLog)))))
                                  :<|> (m (JobStatus 'Safe JobLog)
                                        :<|> ((JobInput Maybe DocumentUpload
                                               -> m (JobStatus 'Safe JobLog))
                                              :<|> (ID 'Unsafe "job"
                                                    -> (Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> ((Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> m (JobOutput JobLog)))))))))))
-> ((Maybe UTCTime
     -> Maybe UTCTime
     -> Maybe NodeId
     -> TabType
     -> ListType
     -> m (HashedResponse (ChartMetrics (Vector NgramsTree))))
    :<|> ((Maybe NodeId -> TabType -> ListType -> m ())
          :<|> (Maybe NodeId -> TabType -> ListType -> m Text)))
   :<|> (((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
          :<|> (Maybe NodeId -> m NodeId))
         :<|> ((NodeId -> m [Int])
               :<|> ((NodeId -> m Int)
                     :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                           :<|> ((m (JobStatus 'Safe JobLog)
                                  :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                                        :<|> (ID 'Unsafe "job"
                                              -> (Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> ((Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> m (JobOutput JobLog)))))
                                 :<|> ((m (JobStatus 'Safe JobLog)
                                        :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                                              :<|> (ID 'Unsafe "job"
                                                    -> (Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> ((Maybe Limit
                                                              -> Maybe Offset
                                                              -> m (JobStatus 'Safe JobLog))
                                                             :<|> m (JobOutput JobLog)))))
                                       :<|> (m (JobStatus 'Safe JobLog)
                                             :<|> ((JobInput Maybe DocumentUpload
                                                    -> m (JobStatus 'Safe JobLog))
                                                   :<|> (ID 'Unsafe "job"
                                                         -> (Maybe Limit
                                                             -> Maybe Offset
                                                             -> m (JobStatus 'Safe JobLog))
                                                            :<|> ((Maybe Limit
                                                                   -> Maybe Offset
                                                                   -> m (JobStatus 'Safe JobLog))
                                                                  :<|> m (JobOutput
                                                                            JobLog)))))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> Int -> GargServer PhyloAPI
phyloAPI   NodeId
id' Int
uId
           ((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
 :<|> (Maybe NodeId -> m NodeId))
-> ((NodeId -> m [Int])
    :<|> ((NodeId -> m Int)
          :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                :<|> ((m (JobStatus 'Safe JobLog)
                       :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                             :<|> (ID 'Unsafe "job"
                                   -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> ((Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> m (JobOutput JobLog)))))
                      :<|> ((m (JobStatus 'Safe JobLog)
                             :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                                   :<|> (ID 'Unsafe "job"
                                         -> (Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> ((Maybe Limit
                                                   -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                  :<|> m (JobOutput JobLog)))))
                            :<|> (m (JobStatus 'Safe JobLog)
                                  :<|> ((JobInput Maybe DocumentUpload
                                         -> m (JobStatus 'Safe JobLog))
                                        :<|> (ID 'Unsafe "job"
                                              -> (Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> ((Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> m (JobOutput JobLog))))))))))
-> ((Maybe NodeId -> Maybe Int -> Maybe Int -> m SVG)
    :<|> (Maybe NodeId -> m NodeId))
   :<|> ((NodeId -> m [Int])
         :<|> ((NodeId -> m Int)
               :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
                     :<|> ((m (JobStatus 'Safe JobLog)
                            :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                                  :<|> (ID 'Unsafe "job"
                                        -> (Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> ((Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> m (JobOutput JobLog)))))
                           :<|> ((m (JobStatus 'Safe JobLog)
                                  :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                                        :<|> (ID 'Unsafe "job"
                                              -> (Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> ((Maybe Limit
                                                        -> Maybe Offset
                                                        -> m (JobStatus 'Safe JobLog))
                                                       :<|> m (JobOutput JobLog)))))
                                 :<|> (m (JobStatus 'Safe JobLog)
                                       :<|> ((JobInput Maybe DocumentUpload
                                              -> m (JobStatus 'Safe JobLog))
                                             :<|> (ID 'Unsafe "job"
                                                   -> (Maybe Limit
                                                       -> Maybe Offset
                                                       -> m (JobStatus 'Safe JobLog))
                                                      :<|> ((Maybe Limit
                                                             -> Maybe Offset
                                                             -> m (JobStatus 'Safe JobLog))
                                                            :<|> m (JobOutput JobLog))))))))))
forall a b. a -> b -> a :<|> b
:<|> User -> NodeId -> NodeId -> Cmd err [Int]
forall err. User -> NodeId -> NodeId -> Cmd err [Int]
moveNode   (NodeId -> User
RootId (NodeId -> User) -> NodeId -> User
forall a b. (a -> b) -> a -> b
$ Int -> NodeId
NodeId Int
uId) NodeId
id'
           -- :<|> nodeAddAPI id'
           -- :<|> postUpload id'
           (NodeId -> m [Int])
-> ((NodeId -> m Int)
    :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
          :<|> ((m (JobStatus 'Safe JobLog)
                 :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                       :<|> (ID 'Unsafe "job"
                             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> m (JobOutput JobLog)))))
                :<|> ((m (JobStatus 'Safe JobLog)
                       :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                             :<|> (ID 'Unsafe "job"
                                   -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> ((Maybe Limit
                                             -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                            :<|> m (JobOutput JobLog)))))
                      :<|> (m (JobStatus 'Safe JobLog)
                            :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                                  :<|> (ID 'Unsafe "job"
                                        -> (Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> ((Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> m (JobOutput JobLog)))))))))
-> (NodeId -> m [Int])
   :<|> ((NodeId -> m Int)
         :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
               :<|> ((m (JobStatus 'Safe JobLog)
                      :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                            :<|> (ID 'Unsafe "job"
                                  -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> ((Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> m (JobOutput JobLog)))))
                     :<|> ((m (JobStatus 'Safe JobLog)
                            :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                                  :<|> (ID 'Unsafe "job"
                                        -> (Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> ((Maybe Limit
                                                  -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                 :<|> m (JobOutput JobLog)))))
                           :<|> (m (JobStatus 'Safe JobLog)
                                 :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                                       :<|> (ID 'Unsafe "job"
                                             -> (Maybe Limit
                                                 -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                :<|> ((Maybe Limit
                                                       -> Maybe Offset
                                                       -> m (JobStatus 'Safe JobLog))
                                                      :<|> m (JobOutput JobLog)))))))))
forall a b. a -> b -> a :<|> b
:<|> NodeId -> GargServer Unpublish
Share.unPublish NodeId
id'

           (NodeId -> m Int)
-> (m (Headers '[Header "Content-Type" Text] BSResponse)
    :<|> ((m (JobStatus 'Safe JobLog)
           :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                 :<|> (ID 'Unsafe "job"
                       -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> m (JobOutput JobLog)))))
          :<|> ((m (JobStatus 'Safe JobLog)
                 :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                       :<|> (ID 'Unsafe "job"
                             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                      :<|> m (JobOutput JobLog)))))
                :<|> (m (JobStatus 'Safe JobLog)
                      :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                            :<|> (ID 'Unsafe "job"
                                  -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> ((Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> m (JobOutput JobLog))))))))
-> (NodeId -> m Int)
   :<|> (m (Headers '[Header "Content-Type" Text] BSResponse)
         :<|> ((m (JobStatus 'Safe JobLog)
                :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                      :<|> (ID 'Unsafe "job"
                            -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> m (JobOutput JobLog)))))
               :<|> ((m (JobStatus 'Safe JobLog)
                      :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                            :<|> (ID 'Unsafe "job"
                                  -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> ((Maybe Limit
                                            -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                           :<|> m (JobOutput JobLog)))))
                     :<|> (m (JobStatus 'Safe JobLog)
                           :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                                 :<|> (ID 'Unsafe "job"
                                       -> (Maybe Limit
                                           -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                          :<|> ((Maybe Limit
                                                 -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                                :<|> m (JobOutput JobLog))))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer FileApi
fileApi Int
uId NodeId
id'
           m (Headers '[Header "Content-Type" Text] BSResponse)
-> ((m (JobStatus 'Safe JobLog)
     :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
           :<|> (ID 'Unsafe "job"
                 -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                    :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> m (JobOutput JobLog)))))
    :<|> ((m (JobStatus 'Safe JobLog)
           :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                 :<|> (ID 'Unsafe "job"
                       -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                :<|> m (JobOutput JobLog)))))
          :<|> (m (JobStatus 'Safe JobLog)
                :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                      :<|> (ID 'Unsafe "job"
                            -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> m (JobOutput JobLog)))))))
-> m (Headers '[Header "Content-Type" Text] BSResponse)
   :<|> ((m (JobStatus 'Safe JobLog)
          :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
                :<|> (ID 'Unsafe "job"
                      -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> m (JobOutput JobLog)))))
         :<|> ((m (JobStatus 'Safe JobLog)
                :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                      :<|> (ID 'Unsafe "job"
                            -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                     :<|> m (JobOutput JobLog)))))
               :<|> (m (JobStatus 'Safe JobLog)
                     :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                           :<|> (ID 'Unsafe "job"
                                 -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                    :<|> ((Maybe Limit
                                           -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                          :<|> m (JobOutput JobLog)))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer FileAsyncApi
fileAsyncApi Int
uId NodeId
id'

           (m (JobStatus 'Safe JobLog)
 :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
       :<|> (ID 'Unsafe "job"
             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                      :<|> m (JobOutput JobLog)))))
-> ((m (JobStatus 'Safe JobLog)
     :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
           :<|> (ID 'Unsafe "job"
                 -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                    :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                          :<|> m (JobOutput JobLog)))))
    :<|> (m (JobStatus 'Safe JobLog)
          :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                :<|> (ID 'Unsafe "job"
                      -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> m (JobOutput JobLog))))))
-> (m (JobStatus 'Safe JobLog)
    :<|> ((JobInput Maybe NewWithFile -> m (JobStatus 'Safe JobLog))
          :<|> (ID 'Unsafe "job"
                -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                   :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> m (JobOutput JobLog)))))
   :<|> ((m (JobStatus 'Safe JobLog)
          :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
                :<|> (ID 'Unsafe "job"
                      -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                               :<|> m (JobOutput JobLog)))))
         :<|> (m (JobStatus 'Safe JobLog)
               :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
                     :<|> (ID 'Unsafe "job"
                           -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                              :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                                    :<|> m (JobOutput JobLog))))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer API
DocumentsFromWriteNodes.api Int
uId NodeId
id'
           (m (JobStatus 'Safe JobLog)
 :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
       :<|> (ID 'Unsafe "job"
             -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                      :<|> m (JobOutput JobLog)))))
-> (m (JobStatus 'Safe JobLog)
    :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
          :<|> (ID 'Unsafe "job"
                -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                   :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> m (JobOutput JobLog)))))
-> (m (JobStatus 'Safe JobLog)
    :<|> ((JobInput Maybe Params -> m (JobStatus 'Safe JobLog))
          :<|> (ID 'Unsafe "job"
                -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                   :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                         :<|> m (JobOutput JobLog)))))
   :<|> (m (JobStatus 'Safe JobLog)
         :<|> ((JobInput Maybe DocumentUpload -> m (JobStatus 'Safe JobLog))
               :<|> (ID 'Unsafe "job"
                     -> (Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                        :<|> ((Maybe Limit -> Maybe Offset -> m (JobStatus 'Safe JobLog))
                              :<|> m (JobOutput JobLog)))))
forall a b. a -> b -> a :<|> b
:<|> Int -> NodeId -> GargServer API
DocumentUpload.api Int
uId NodeId
id'


------------------------------------------------------------------------
data RenameNode = RenameNode { RenameNode -> Text
r_name :: Text }
  deriving ((forall x. RenameNode -> Rep RenameNode x)
-> (forall x. Rep RenameNode x -> RenameNode) -> Generic RenameNode
forall x. Rep RenameNode x -> RenameNode
forall x. RenameNode -> Rep RenameNode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RenameNode x -> RenameNode
$cfrom :: forall x. RenameNode -> Rep RenameNode x
Generic)

------------------------------------------------------------------------
------------------------------------------------------------------------
type CatApi =  Summary " To Categorize NodeNodes: 0 for delete, 1/null neutral, 2 favorite"
            :> ReqBody '[JSON] NodesToCategory
            :> Put     '[JSON] [Int]

data NodesToCategory = NodesToCategory { NodesToCategory -> [NodeId]
ntc_nodesId :: [NodeId]
                                       , NodesToCategory -> Int
ntc_category :: Int
                                       }
  deriving ((forall x. NodesToCategory -> Rep NodesToCategory x)
-> (forall x. Rep NodesToCategory x -> NodesToCategory)
-> Generic NodesToCategory
forall x. Rep NodesToCategory x -> NodesToCategory
forall x. NodesToCategory -> Rep NodesToCategory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodesToCategory x -> NodesToCategory
$cfrom :: forall x. NodesToCategory -> Rep NodesToCategory x
Generic)

-- TODO unPrefix "ntc_" FromJSON, ToJSON, ToSchema, adapt frontend.
instance FromJSON  NodesToCategory
instance ToJSON    NodesToCategory
instance ToSchema  NodesToCategory

catApi :: CorpusId -> GargServer CatApi
catApi :: NodeId -> GargServer CatApi
catApi = NodeId -> ServerT CatApi m
forall err. NodeId -> NodesToCategory -> Cmd err [Int]
putCat
  where
    putCat :: CorpusId -> NodesToCategory -> Cmd err [Int]
    putCat :: NodeId -> NodesToCategory -> Cmd err [Int]
putCat NodeId
cId NodesToCategory
cs' = [(NodeId, NodeId, Int)] -> Cmd err [Int]
forall err. [(NodeId, NodeId, Int)] -> Cmd err [Int]
nodeNodesCategory ([(NodeId, NodeId, Int)] -> Cmd err [Int])
-> [(NodeId, NodeId, Int)] -> Cmd err [Int]
forall a b. (a -> b) -> a -> b
$ (NodeId -> (NodeId, NodeId, Int))
-> [NodeId] -> [(NodeId, NodeId, Int)]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
map (\NodeId
n -> (NodeId
cId, NodeId
n, NodesToCategory -> Int
ntc_category NodesToCategory
cs')) (NodesToCategory -> [NodeId]
ntc_nodesId NodesToCategory
cs')

------------------------------------------------------------------------
type ScoreApi =  Summary " To Score NodeNodes"
            :> ReqBody '[JSON] NodesToScore
            :> Put     '[JSON] [Int]

data NodesToScore = NodesToScore { NodesToScore -> [NodeId]
nts_nodesId :: [NodeId]
                                 , NodesToScore -> Int
nts_score :: Int
                                 }
  deriving ((forall x. NodesToScore -> Rep NodesToScore x)
-> (forall x. Rep NodesToScore x -> NodesToScore)
-> Generic NodesToScore
forall x. Rep NodesToScore x -> NodesToScore
forall x. NodesToScore -> Rep NodesToScore x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodesToScore x -> NodesToScore
$cfrom :: forall x. NodesToScore -> Rep NodesToScore x
Generic)

-- TODO unPrefix "ntc_" FromJSON, ToJSON, ToSchema, adapt frontend.
instance FromJSON  NodesToScore
instance ToJSON    NodesToScore
instance ToSchema  NodesToScore

scoreApi :: CorpusId -> GargServer ScoreApi
scoreApi :: NodeId -> GargServer ScoreApi
scoreApi = NodeId -> ServerT ScoreApi m
forall err. NodeId -> NodesToScore -> Cmd err [Int]
putScore
  where
    putScore :: CorpusId -> NodesToScore -> Cmd err [Int]
    putScore :: NodeId -> NodesToScore -> Cmd err [Int]
putScore NodeId
cId NodesToScore
cs' = [(NodeId, NodeId, Int)] -> Cmd err [Int]
forall err. [(NodeId, NodeId, Int)] -> Cmd err [Int]
nodeNodesScore ([(NodeId, NodeId, Int)] -> Cmd err [Int])
-> [(NodeId, NodeId, Int)] -> Cmd err [Int]
forall a b. (a -> b) -> a -> b
$ (NodeId -> (NodeId, NodeId, Int))
-> [NodeId] -> [(NodeId, NodeId, Int)]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
map (\NodeId
n -> (NodeId
cId, NodeId
n, NodesToScore -> Int
nts_score NodesToScore
cs')) (NodesToScore -> [NodeId]
nts_nodesId NodesToScore
cs')

------------------------------------------------------------------------
-- TODO adapt FacetDoc -> ListDoc (and add type of document as column)
-- Pairing utilities to move elsewhere
type PairingApi = Summary " Pairing API"
                :> QueryParam "view"   TabType
                -- TODO change TabType -> DocType (CorpusId for pairing)
                :> QueryParam "offset" Int
                :> QueryParam "limit"  Int
                :> QueryParam "order"  OrderBy
                :> Get '[JSON] [FacetDoc]

----------
type Pairs    = Summary "List of Pairs"
              :> Get '[JSON] [AnnuaireId]
pairs :: CorpusId -> GargServer Pairs
pairs :: NodeId -> GargServer Pairs
pairs NodeId
cId = do
  [NodeNode]
ns <- NodeId -> Cmd err [NodeNode]
forall err. NodeId -> Cmd err [NodeNode]
getNodeNode NodeId
cId
  [NodeId] -> m [NodeId]
forall (f :: * -> *) a. Applicative f => a -> f a
pure ([NodeId] -> m [NodeId]) -> [NodeId] -> m [NodeId]
forall a b. (a -> b) -> a -> b
$ (NodeNode -> NodeId) -> [NodeNode] -> [NodeId]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
map NodeNode -> NodeId
forall node1_id node2_id score cat.
NodeNodePoly node1_id node2_id score cat -> node2_id
_nn_node2_id [NodeNode]
ns

type PairWith = Summary "Pair a Corpus with an Annuaire"
              :> "annuaire" :> Capture "annuaire_id" AnnuaireId
              :> QueryParam "list_id"     ListId
              :> Post '[JSON] Int

pairWith :: CorpusId -> GargServer PairWith
pairWith :: NodeId -> GargServer PairWith
pairWith NodeId
cId NodeId
aId Maybe NodeId
lId = do
  Int
r <- NodeId -> NodeId -> Maybe NodeId -> GargNoServer Int
pairing NodeId
cId NodeId
aId Maybe NodeId
lId
  Int
_ <- [NodeNode] -> Cmd err Int
forall err. [NodeNode] -> Cmd err Int
insertNodeNode [ NodeNode :: forall node1_id node2_id score cat.
node1_id
-> node2_id
-> score
-> cat
-> NodeNodePoly node1_id node2_id score cat
NodeNode { _nn_node1_id :: NodeId
_nn_node1_id = NodeId
cId
                                 , _nn_node2_id :: NodeId
_nn_node2_id = NodeId
aId
                                 , _nn_score :: Maybe Double
_nn_score = Maybe Double
forall a. Maybe a
Nothing
                                 , _nn_category :: Maybe Int
_nn_category = Maybe Int
forall a. Maybe a
Nothing }]
  Int -> m Int
forall (f :: * -> *) a. Applicative f => a -> f a
pure Int
r


------------------------------------------------------------------------
type TreeAPI   = QueryParams "type" NodeType
                  :> Get '[JSON] (Tree NodeTree)
                  :<|> "first-level"
                      :> QueryParams "type" NodeType
                      :> Get '[JSON] (Tree NodeTree)

treeAPI :: NodeId -> GargServer TreeAPI
treeAPI :: NodeId -> GargServer TreeAPI
treeAPI NodeId
id = TreeMode -> NodeId -> [NodeType] -> Cmd err (Tree NodeTree)
forall err.
(HasTreeError err, HasNodeError err) =>
TreeMode -> NodeId -> [NodeType] -> Cmd err (Tree NodeTree)
tree TreeMode
TreeAdvanced NodeId
id
        ([NodeType] -> m (Tree NodeTree))
-> ([NodeType] -> m (Tree NodeTree))
-> ([NodeType] -> m (Tree NodeTree))
   :<|> ([NodeType] -> m (Tree NodeTree))
forall a b. a -> b -> a :<|> b
:<|> TreeMode -> NodeId -> [NodeType] -> Cmd err (Tree NodeTree)
forall err.
(HasTreeError err, HasNodeError err) =>
TreeMode -> NodeId -> [NodeType] -> Cmd err (Tree NodeTree)
tree TreeMode
TreeFirstLevel NodeId
id

------------------------------------------------------------------------
-- | TODO Check if the name is less than 255 char
rename :: NodeId -> RenameNode -> Cmd err [Int]
rename :: NodeId -> RenameNode -> Cmd err [Int]
rename NodeId
nId (RenameNode Text
name') = Update -> Cmd err [Int]
forall err. Update -> Cmd err [Int]
U.update (NodeId -> Text -> Update
U.Rename NodeId
nId Text
name')

putNode :: forall err a. (HasNodeError err, JSONB a, ToJSON a)
        => NodeId
        -> a
        -> Cmd err Int
putNode :: NodeId -> a -> Cmd err Int
putNode NodeId
n a
h = Int64 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int64 -> Int) -> m Int64 -> m Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> NodeId -> a -> Cmd err Int64
forall a err. ToJSON a => NodeId -> a -> Cmd err Int64
updateHyperdata NodeId
n a
h

-------------------------------------------------------------
type MoveAPI  = Summary "Move Node endpoint"
              :> Capture "parent_id" ParentId
              :> Put '[JSON] [Int]

moveNode :: User
         -> NodeId
         -> ParentId
         -> Cmd err [Int]
moveNode :: User -> NodeId -> NodeId -> Cmd err [Int]
moveNode User
_u NodeId
n NodeId
p = Update -> Cmd err [Int]
forall err. Update -> Cmd err [Int]
update (NodeId -> NodeId -> Update
Move NodeId
n NodeId
p)
-------------------------------------------------------------


$(deriveJSON (unPrefix "r_"       ) ''RenameNode )
instance ToSchema  RenameNode
instance Arbitrary RenameNode where
  arbitrary :: Gen RenameNode
arbitrary = [RenameNode] -> Gen RenameNode
forall a. [a] -> Gen a
elements [Text -> RenameNode
RenameNode Text
"test"]


-------------------------------------------------------------