1 {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} 2 module Routes.JS 3 ( jsRoutes 4 , fakeBackendDepend1 5 , fakeBackendDepend2 6 , fakeBackendDepend3 7 , fakeBackendDepend4 8 ) where 9 10 import qualified Data.ByteString.Builder as B 11 import qualified Data.ByteString as BS 12 import Data.Monoid ((<>)) 13 14 import Model.Record (Record) 15 import Model.Asset (Asset) 16 import Model.Volume (Volume) 17 import Model.Party (Party) 18 import Model.Id.Types 19 import Model.Token (LoginToken) 20 import Model.Segment 21 import Model.Slot.Types 22 import Action 23 import Controller.Paths 24 import Controller.Root 25 import Controller.Login 26 import Controller.Register 27 import Controller.Token 28 import Controller.Party 29 import Controller.Volume 30 -- import Controller.Container 31 import Controller.Slot 32 import Controller.Record 33 import Controller.Format 34 import Controller.Asset 35 import Controller.AssetSegment 36 import Controller.Zip 37 import Controller.CSV 38 import Controller.Search 39 import Controller.Activity 40 41 rt :: BS.ByteString -> B.Builder 42 rt routeKeyVal = B.byteString ("\n" <> routeKeyVal) 43 44 jsRoutes :: [B.Builder] -- should be mconcat, but BSB bug causes hangs 45 jsRoutes = 46 [ rt "\"viewRoot\":{method:\"GET\",route:function(){return \"/\";}}," 47 -- jsRoute "viewRoot" viewRoot (HTML) 48 , rt "\"viewLogin\":{method:\"GET\",route:function(){return \"/user/login\";}}," 49 -- , jsRoute "viewLogin" viewLogin () 50 , rt "\"viewRegister\":{method:\"GET\",route:function(){return \"/user/register\";}}," 51 -- , jsRoute "viewRegister" viewRegister () 52 , rt "\"viewPasswordReset\":{method:\"GET\",route:function(){return \"/user/password\";}}," 53 -- , jsRoute "viewPasswordReset" viewPasswordReset () 54 , rt "\"viewLoginToken\":{method:\"GET\",route:function(byteString0){return \"/token/\"+byteString0+\"\";}}," 55 -- , jsRoute "viewLoginToken" viewLoginToken (HTML, token) 56 57 , rt "\"viewProfile\":{method:\"GET\",route:function(){return \"/profile\";}}," 58 -- , jsRoute "viewProfile" viewParty (HTML, TargetProfile) 59 , rt "\"viewProfileEdit\":{method:\"GET\",route:function(){return \"/profile/edit\";}}," 60 -- , jsRoute "viewProfileEdit" viewPartyEdit (TargetProfile) 61 , rt "\"viewParty\":{method:\"GET\",route:function(int320){return \"/party/\"+int320+\"\";}}," 62 -- , jsRoute "viewParty" viewParty (HTML, TargetParty party) 63 , rt "\"viewPartyEdit\":{method:\"GET\",route:function(int320){return \"/party/\"+int320+\"/edit\";}}," 64 -- , jsRoute "viewPartyEdit" viewPartyEdit (TargetParty party) 65 , rt "\"viewPartySearch\":{method:\"GET\",route:function(){return \"/party\";}}," 66 -- , jsRoute "viewPartySearch" queryParties (HTML) 67 , rt "\"partyAvatar\":{method:\"GET\",route:function(int320){return \"/party/\"+int320+\"/avatar\";}}," 68 -- , jsRoute "partyAvatar" viewAvatar (party) 69 , rt "\"viewPartyActivity\":{method:\"GET\",route:function(int320){return \"/party/\"+int320+\"/activity\";}}," 70 -- , jsRoute "viewPartyActivity" viewPartyActivity (HTML, TargetParty party) 71 72 , rt "\"viewVolume\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"\";}}," 73 -- , jsRoute "viewVolume" viewVolume (HTML, volume) 74 , rt "\"viewVolumeCreate\":{method:\"GET\",route:function(){return \"/volume/create\";}}," 75 -- , jsRoute "viewVolumeCreate" viewVolumeCreate () 76 , rt "\"viewVolumeEdit\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/edit\";}}," 77 -- , jsRoute "viewVolumeEdit" viewVolumeEdit (volume) 78 , rt "\"viewVolumeSearch\":{method:\"GET\",route:function(){return \"/volume\";}}," 79 -- , jsRoute "viewVolumeSearch" queryVolumes (HTML) 80 , rt "\"thumbVolume\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/thumb\";}}," 81 -- , jsRoute "thumbVolume" thumbVolume (volume) 82 , rt "\"csvVolume\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/csv\";}}," 83 -- , jsRoute "csvVolume" csvVolume (volume) 84 , rt "\"viewVolumeActivity\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/activity\";}}," 85 -- , jsRoute "viewVolumeActivity" viewVolumeActivity (HTML, volume) 86 87 , rt "\"viewSlot\":{method:\"GET\",route:function(int320,int321,segment2){return \"/volume/\"+int320+\"/slot/\"+int321+\"/\"+segment2+\"\";}}," 88 -- , jsRoute "viewSlot" (viewSlot False) (HTML, (Just volume, slot)) 89 , rt "\"viewSlotEdit\":{method:\"GET\",route:function(int320,int321){return \"/volume/\"+int320+\"/slot/\"+int321+\"/edit\";}}," 90 -- , jsRoute "viewSlotEdit" viewContainerEdit (Just volume, container) 91 , rt "\"viewSlotActivity\":{method:\"GET\",route:function(int320,int321){return \"/volume/\"+int320+\"/slot/\"+int321+\"/activity\";}}," 92 -- , jsRoute "viewSlotActivity" viewContainerActivity (HTML, (Just volume, container)) 93 , rt "\"thumbSlot\":{method:\"GET\",route:function(int320,int321,segment2){return \"/volume/\"+int320+\"/slot/\"+int321+\"/\"+segment2+\"/thumb\";}}," 94 -- , jsRoute "thumbSlot" thumbSlot (Just volume, slot) 95 96 , rt "\"viewRecord\":{method:\"GET\",route:function(int320){return \"/record/\"+int320+\"\";}}," 97 -- , jsRoute "viewRecord" viewRecord (record) 98 99 , rt "\"viewFormats\":{method:\"GET\",route:function(){return \"/asset/formats\";}}," 100 -- , jsRoute "viewFormats" viewFormats () 101 , rt "\"viewAssetSegment\":{method:\"GET\",route:function(int320,int321,segment2,int323){return \"/volume/\"+int320+\"/slot/\"+int321+\"/\"+segment2+\"/asset/\"+int323+\"\";}}," 102 -- , jsRoute "viewAssetSegment" (viewAssetSegment False) (HTML, Just volume, slot, asset) 103 , rt "\"viewOrigAssetSegment\":{method:\"GET\",route:function(int320,int321,segment2,int323){return \"/volume/\"+int320+\"/slot/\"+int321+\"/\"+segment2+\"/asset/\"+int323+\"\";}}," 104 -- , jsRoute "viewOrigAssetSegment" (viewAssetSegment True) (HTML, Just volume, slot, asset) 105 , rt "\"downloadAssetSegment\":{method:\"GET\",route:function(int320,segment1,int322){return \"/slot/\"+int320+\"/\"+segment1+\"/asset/\"+int322+\"/download\";}}," 106 -- , jsRoute "downloadAssetSegment" downloadAssetSegment (slot, asset) --download transcoded asset segment 107 , rt "\"downloadOrigAssetSegment\":{method:\"GET\",route:function(int320,segment1,int322){return \"/slot/\"+int320+\"/\"+segment1+\"/asset/\"+int322+\"/downloadOrig\";}}," 108 -- , jsRoute "downloadOrigAssetSegment" downloadOrigAssetSegment (slot, asset) --download original asset segment 109 , rt "\"thumbAssetSegment\":{method:\"GET\",route:function(int320,segment1,int322){return \"/slot/\"+int320+\"/\"+segment1+\"/asset/\"+int322+\"/thumb\";}}," 110 -- , jsRoute "thumbAssetSegment" (thumbAssetSegment False) (slot, asset) 111 , rt "\"thumbOrigAssetSegment\":{method:\"GET\",route:function(int320,segment1,int322){return \"/slot/\"+int320+\"/\"+segment1+\"/asset/\"+int322+\"/thumb\";}}," 112 -- , jsRoute "thumbOrigAssetSegment" (thumbAssetSegment True) (slot, asset) 113 , rt "\"downloadAsset\":{method:\"GET\",route:function(int320){return \"/asset/\"+int320+\"/download\";}}," 114 -- , jsRoute "downloadAsset" downloadAsset (asset, fullSegment) 115 , rt "\"downloadOrigAsset\":{method:\"GET\",route:function(int320){return \"/asset/\"+int320+\"/downloadOrig\";}}," 116 -- , jsRoute "downloadOrigAsset" downloadOrigAsset (asset, fullSegment) --download original asset 117 , rt "\"thumbAsset\":{method:\"GET\",route:function(int320){return \"/asset/\"+int320+\"/thumb\";}}," 118 -- , jsRoute "thumbAsset" thumbAsset (asset, fullSegment) 119 120 , rt "\"viewSearch\":{method:\"GET\",route:function(){return \"/search\";}}," 121 -- , jsRoute "viewSearch" postSearch (HTML) 122 123 , rt "\"zipSlot\":{method:\"GET\",route:function(int320,int321){return \"/volume/\"+int320+\"/slot/\"+int321+\"/zip/false\";}}," 124 -- , jsRoute "zipSlot" (zipContainer False) (Just volume, container) --zip transcoded slot 125 , rt "\"zipOrigSlot\":{method:\"GET\",route:function(int320,int321){return \"/volume/\"+int320+\"/slot/\"+int321+\"/zip/true\";}}," 126 -- , jsRoute "zipOrigSlot" (zipContainer True) (Just volume, container) --zip orignal slot 127 , rt "\"zipVolume\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/zip/false\";}}," 128 -- , jsRoute "zipVolume" (zipVolume False) (volume) -- zip volume full of transcoded assets 129 , rt "\"zipOrigVolume\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/zip/true\";}}," 130 -- , jsRoute "zipOrigVolume" (zipVolume True) (volume) -- zip volume full of original assets 131 , rt "\"viewVolumeDescription\":{method:\"GET\",route:function(int320){return \"/volume/\"+int320+\"/description\";}}," 132 -- , jsRoute "viewVolumeDescription" viewVolumeDescription (volume) 133 134 , rt "\"get\":{method:\"GET\",route:function(){return \"/api\";}}," 135 -- , jsRoute "get" viewRoot (JSON) 136 , rt "\"getUser\":{method:\"GET\",route:function(){return \"/api/user\";}}," 137 -- , jsRoute "getUser" viewUser () 138 , rt "\"postUser\":{method:\"POST\",route:function(){return \"/api/user\";}}," 139 -- , jsRoute "postUser" postUser (JSON) 140 , rt "\"postLogin\":{method:\"POST\",route:function(){return \"/api/user/login\";}}," 141 -- , jsRoute "postLogin" postLogin (JSON) 142 , rt "\"postLogout\":{method:\"POST\",route:function(){return \"/api/user/logout\";}}," 143 -- , jsRoute "postLogout" postLogout (JSON) 144 , rt "\"postRegister\":{method:\"POST\",route:function(){return \"/api/user/register\";}}," 145 -- , jsRoute "postRegister" postRegister (JSON) 146 , rt "\"postPasswordReset\":{method:\"POST\",route:function(){return \"/api/user/password\";}}," 147 -- , jsRoute "postPasswordReset" postPasswordReset (JSON) 148 , rt "\"getLoginToken\":{method:\"GET\",route:function(byteString0){return \"/api/token/\"+byteString0+\"\";}}," 149 -- , jsRoute "getLoginToken" viewLoginToken (JSON, token) 150 , rt "\"postPasswordToken\":{method:\"POST\",route:function(byteString0){return \"/api/token/\"+byteString0+\"\";}}," 151 -- , jsRoute "postPasswordToken" postPasswordToken (JSON, token) 152 153 , rt "\"getParty\":{method:\"GET\",route:function(int320){return \"/api/party/\"+int320+\"\";}}," 154 -- , jsRoute "getParty" viewParty (JSON, TargetParty party) 155 , rt "\"getProfile\":{method:\"GET\",route:function(){return \"/api/profile\";}}," 156 -- , jsRoute "getProfile" viewParty (JSON, TargetProfile) 157 , rt "\"postParty\":{method:\"POST\",route:function(int320){return \"/api/party/\"+int320+\"\";}}," 158 -- , jsRoute "postParty" postParty (JSON, TargetParty party) 159 , rt "\"getParties\":{method:\"GET\",route:function(){return \"/api/party\";}}," 160 -- , jsRoute "getParties" queryParties (JSON) 161 , rt "\"getPartyActivity\":{method:\"GET\",route:function(int320){return \"/api/party/\"+int320+\"/activity\";}}," 162 -- , jsRoute "getPartyActivity" viewPartyActivity (JSON, TargetParty party) 163 164 , rt "\"postAuthorizeApply\":{method:\"POST\",route:function(int320,int321){return \"/api/party/\"+int320+\"/apply/\"+int321+\"\";}}," 165 -- , jsRoute "postAuthorizeApply" postAuthorize (JSON, TargetParty party, AuthorizeTarget True party) 166 , rt "\"postAuthorize\":{method:\"POST\",route:function(int320,int321){return \"/api/party/\"+int320+\"/authorize/\"+int321+\"\";}}," 167 -- , jsRoute "postAuthorize" postAuthorize (JSON, TargetParty party, AuthorizeTarget False party) 168 , rt "\"deleteAuthorize\":{method:\"DELETE\",route:function(int320,int321){return \"/api/party/\"+int320+\"/authorize/\"+int321+\"\";}}," 169 -- , jsRoute "deleteAuthorize" deleteAuthorize (JSON, TargetParty party, AuthorizeTarget False party) 170 , rt "\"deleteAuthorizeParent\":{method:\"DELETE\",route:function(int320,int321){return \"/api/party/\"+int320+\"/apply/\"+int321+\"\";}}," 171 -- , jsRoute "deleteAuthorizeParent" deleteAuthorize (JSON, TargetParty party, AuthorizeTarget True party) 172 , rt "\"postAuthorizeNotFound\":{method:\"POST\",route:function(int320){return \"/api/party/\"+int320+\"/notfound\";}}," 173 -- , jsRoute "postAuthorizeNotFound" postAuthorizeNotFound (TargetParty party) 174 175 , rt "\"getVolume\":{method:\"GET\",route:function(int320){return \"/api/volume/\"+int320+\"\";}}," 176 -- , jsRoute "getVolume" viewVolume (JSON, volume) 177 , rt "\"postVolume\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"\";}}," 178 -- , jsRoute "postVolume" postVolume (JSON, volume) 179 , rt "\"createVolume\":{method:\"POST\",route:function(){return \"/api/volume\";}}," 180 -- , jsRoute "createVolume" createVolume (JSON) 181 , rt "\"getVolumes\":{method:\"GET\",route:function(){return \"/api/volume\";}}," 182 -- , jsRoute "getVolumes" queryVolumes (JSON) 183 , rt "\"postVolumeAccess\":{method:\"POST\",route:function(int320,int321){return \"/api/volume/\"+int320+\"/access/\"+int321+\"\";}}," 184 -- , jsRoute "postVolumeAccess" postVolumeAccess (JSON, (volume, VolumeAccessTarget party)) 185 , rt "\"postVolumeFunding\":{method:\"POST\",route:function(int320,int641){return \"/api/volume/\"+int320+\"/funder/\"+int641+\"\";}}," 186 -- , jsRoute "postVolumeFunding" postVolumeFunding (volume, funder) 187 , rt "\"postVolumeLinks\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/link\";}}," 188 -- , jsRoute "postVolumeLinks" postVolumeLinks (JSON, volume) 189 , rt "\"deleteVolumeFunder\":{method:\"DELETE\",route:function(int320,int641){return \"/api/volume/\"+int320+\"/funder/\"+int641+\"\";}}," 190 -- , jsRoute "deleteVolumeFunder" deleteVolumeFunder (volume, funder) 191 , rt "\"postVolumeAssist\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/assist\";}}," 192 -- , jsRoute "postVolumeAssist" postVolumeAssist (volume) 193 , rt "\"getVolumeActivity\":{method:\"GET\",route:function(int320){return \"/api/volume/\"+int320+\"/activity\";}}," 194 -- , jsRoute "getVolumeActivity" viewVolumeActivity (JSON, volume) 195 196 , rt "\"postSearch\":{method:\"GET\",route:function(){return \"/api/search\";}}," 197 -- , jsRoute "postSearch" postSearch (JSON) 198 , rt "\"getFunders\":{method:\"GET\",route:function(){return \"/api/funder\";}}," 199 -- , jsRoute "getFunders" queryFunder () 200 , rt "\"getCitation\":{method:\"GET\",route:function(){return \"/api/cite\";}}," 201 -- , jsRoute "getCitation" getCitation () 202 203 , rt "\"getSlot\":{method:\"GET\",route:function(int320,segment1){return \"/api/slot/\"+int320+\"/\"+segment1+\"\";}}," 204 -- , jsRoute "getSlot" (viewSlot False) (JSON, (Nothing, slot)) 205 , rt "\"postContainer\":{method:\"POST\",route:function(int320){return \"/api/slot/\"+int320+\"\";}}," 206 -- , jsRoute "postContainer" postContainer (container) 207 , rt "\"deleteContainer\":{method:\"DELETE\",route:function(int320){return \"/api/slot/\"+int320+\"\";}}," 208 -- , jsRoute "deleteContainer" deleteContainer (container) 209 , rt "\"createContainer\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/slot\";}}," 210 -- , jsRoute "createContainer" createContainer (volume) 211 , rt "\"getContainerActivity\":{method:\"GET\",route:function(int320){return \"/api/slot/\"+int320+\"/activity\";}}," 212 -- , jsRoute "getContainerActivity" viewContainerActivity (JSON, (Nothing, container)) 213 214 , rt "\"getRecord\":{method:\"GET\",route:function(int320){return \"/api/record/\"+int320+\"\";}}," 215 -- , jsRoute "getRecord" viewRecord (record) 216 , rt "\"createRecord\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/record\";}}," 217 -- , jsRoute "createRecord" createRecord (JSON, volume) 218 , rt "\"deleteRecord\":{method:\"DELETE\",route:function(int320){return \"/api/record/\"+int320+\"\";}}," 219 -- , jsRoute "deleteRecord" deleteRecord (JSON, record) 220 , rt "\"postRecordMeasure\":{method:\"POST\",route:function(int320,int321){return \"/api/record/\"+int320+\"/metric/\"+int321+\"\";}}," 221 -- , jsRoute "postRecordMeasure" postRecordMeasure (JSON, record, metric) 222 , rt "\"postRecordSlot\":{method:\"POST\",route:function(int320,segment1,int322){return \"/api/slot/\"+int320+\"/\"+segment1+\"/record/\"+int322+\"\";}}," 223 -- , jsRoute "postRecordSlot" postRecordSlot (JSON, slot, record) 224 , rt "\"deleteRecordAllSlot\":{method:\"DELETE\",route:function(int320){return \"/api/slot/all/record/\"+int320+\"\";}}," 225 -- , jsRoute "deleteRecordAllSlot" deleteRecordAllSlot (JSON, record) 226 227 , rt "\"addVolumeMetric\":{method:\"PUT\",route:function(int320,int321){return \"/api/volume/\"+int320+\"/metric/\"+int321+\"\";}}," 228 -- , jsRoute "addVolumeMetric" postVolumeMetric (volume, Right metric) 229 , rt "\"addVolumeCategory\":{method:\"PUT\",route:function(int320,int161){return \"/api/volume/\"+int320+\"/category/\"+int161+\"\";}}," 230 -- , jsRoute "addVolumeCategory" postVolumeMetric (volume, Left category) 231 , rt "\"deleteVolumeMetric\":{method:\"DELETE\",route:function(int320,int321){return \"/api/volume/\"+int320+\"/metric/\"+int321+\"\";}}," 232 -- , jsRoute "deleteVolumeMetric" deleteVolumeMetric (volume, Right metric) 233 , rt "\"deleteVolumeCategory\":{method:\"DELETE\",route:function(int320,int161){return \"/api/volume/\"+int320+\"/category/\"+int161+\"\";}}," 234 -- , jsRoute "deleteVolumeCategory" deleteVolumeMetric (volume, Left category) 235 , rt "\"postVolumeState\":{method:\"PUT\",route:function(int320,text1){return \"/api/volume/\"+int320+\"/state/\"+text1+\"\";}}," 236 -- , jsRoute "postVolumeState" postVolumeState (volume, "") 237 , rt "\"deleteVolumeState\":{method:\"DELETE\",route:function(int320,text1){return \"/api/volume/\"+int320+\"/state/\"+text1+\"\";}}," 238 -- , jsRoute "deleteVolumeState" deleteVolumeState (volume, "") 239 240 , rt "\"getAsset\":{method:\"GET\",route:function(int320){return \"/api/asset/\"+int320+\"\";}}," 241 -- , jsRoute "getAsset" viewAsset (JSON, asset) 242 , rt "\"getAssetSegment\":{method:\"GET\",route:function(int320,int321,segment2,int323){return \"/api/volume/\"+int320+\"/slot/\"+int321+\"/\"+segment2+\"/asset/\"+int323+\"\";}}," 243 -- , jsRoute "getAssetSegment" (viewAssetSegment False) (JSON, Just volume, slot, asset) 244 , rt "\"postAsset\":{method:\"POST\",route:function(int320){return \"/api/asset/\"+int320+\"\";}}," 245 -- , jsRoute "postAsset" postAsset (asset) 246 , rt "\"createAsset\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/asset\";}}," 247 -- , jsRoute "createAsset" createAsset (volume) 248 , rt "\"deleteAsset\":{method:\"DELETE\",route:function(int320){return \"/api/asset/\"+int320+\"\";}}," 249 -- , jsRoute "deleteAsset" deleteAsset (asset) 250 , rt "\"postExcerpt\":{method:\"POST\",route:function(int320,segment1,int322){return \"/api/slot/\"+int320+\"/\"+segment1+\"/asset/\"+int322+\"/excerpt\";}}," 251 -- , jsRoute "postExcerpt" postExcerpt (slot, asset) 252 , rt "\"deleteExcerpt\":{method:\"DELETE\",route:function(int320,segment1,int322){return \"/api/slot/\"+int320+\"/\"+segment1+\"/asset/\"+int322+\"/excerpt\";}}," 253 -- , jsRoute "deleteExcerpt" deleteExcerpt (slot, asset) 254 , rt "\"uploadStart\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/upload\";}}," 255 -- , jsRoute "uploadStart" uploadStart (volume) 256 , rt "\"uploadChunk\":{method:\"POST\",route:function(){return \"/api/upload\";}}," 257 -- , jsRoute "uploadChunk" uploadChunk () 258 259 , rt "\"postComment\":{method:\"POST\",route:function(int320,segment1){return \"/api/slot/\"+int320+\"/\"+segment1+\"/comment\";}}," 260 -- , jsRoute "postComment" postComment (slot) 261 , rt "\"getTags\":{method:\"GET\",route:function(tagName0){return \"/api/tags/\"+tagName0+\"\";}}," 262 -- , jsRoute "getTags" queryTags (Just tag) 263 , rt "\"postTag\":{method:\"POST\",route:function(int320,segment1,tagName2){return \"/api/slot/\"+int320+\"/\"+segment1+\"/tag/\"+tagName2+\"\";}}," 264 -- , jsRoute "postTag" postTag (JSON, slot, TagId False tag) 265 , rt "\"postKeyword\":{method:\"POST\",route:function(int320,segment1,tagName2){return \"/api/slot/\"+int320+\"/\"+segment1+\"/keyword/\"+tagName2+\"\";}}," 266 -- , jsRoute "postKeyword" postTag (JSON, slot, TagId True tag) 267 , rt "\"deleteTag\":{method:\"DELETE\",route:function(int320,segment1,tagName2){return \"/api/slot/\"+int320+\"/\"+segment1+\"/tag/\"+tagName2+\"\";}}," 268 -- , jsRoute "deleteTag" deleteTag (JSON, slot, TagId False tag) 269 , rt "\"deleteKeyword\":{method:\"DELETE\",route:function(int320,segment1,tagName2){return \"/api/slot/\"+int320+\"/\"+segment1+\"/keyword/\"+tagName2+\"\";}}," 270 -- , jsRoute "deleteKeyword" deleteTag (JSON, slot, TagId True tag) 271 , rt "\"getTopTags\":{method:\"GET\",route:function(){return \"/api/tags\";}}," 272 -- , jsRoute "getTopTags" queryTags Nothing 273 , rt "\"getSiteActivity\":{method:\"GET\",route:function(){return \"/api/activity\";}}," 274 -- , jsRoute "getSiteActivity" viewSiteActivity () 275 276 , rt "\"getNotifications\":{method:\"GET\",route:function(){return \"/api/notification\";}}," 277 -- , jsRoute "getNotifications" viewNotifications () 278 , rt "\"deleteNotification\":{method:\"DELETE\",route:function(int320){return \"/api/notification/\"+int320+\"\";}}," 279 -- , jsRoute "deleteNotification" deleteNotification (Id 0) 280 , rt "\"deleteNotifications\":{method:\"DELETE\",route:function(){return \"/api/notification\";}}," 281 -- , jsRoute "deleteNotifications" deleteNotifications () 282 , rt "\"getNotify\":{method:\"GET\",route:function(){return \"/api/notify\";}}," 283 -- , jsRoute "getNotify" viewNotify () 284 , rt "\"postNotify\":{method:\"POST\",route:function(){return \"/api/notify\";}}," 285 -- , jsRoute "postNotify" postNotify () 286 287 , rt "\"detectParticipantCSV\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/detectParticipantCSV\";}}," 288 -- , jsRoute "detectParticipantCSV" detectParticipantCSV (JSON, volume) 289 , rt "\"runParticipantUpload\":{method:\"POST\",route:function(int320){return \"/api/volume/\"+int320+\"/runParticipantUpload\";}}," 290 -- , jsRoute "runParticipantUpload" runParticipantUpload (JSON, volume) 291 ] 292 293 -- This type decl generated by copying out the text from GHC's warning message, 294 -- then formatting with brittany. 295 fakeBackendDepend1 296 :: ( ActionRoute API 297 , ActionRoute () 298 , ActionRoute () 299 , ActionRoute () 300 , ActionRoute (API, Id LoginToken) 301 , ActionRoute (API, PartyTarget) 302 , ActionRoute PartyTarget 303 , ActionRoute API 304 , ActionRoute (Id Party) 305 , ActionRoute (API, PartyTarget) 306 , ActionRoute (API, Id Volume) 307 , Action 308 , ActionRoute (Id Volume) 309 , ActionRoute API 310 , ActionRoute (Id Volume) 311 , ActionRoute (Id Volume) 312 , ActionRoute (API, Id Volume) 313 , Bool -> ActionRoute (API, (Maybe (Id Volume), Id Slot)) 314 , ActionRoute (API, (Maybe (Id Volume), Id Slot)) 315 , ActionRoute (Maybe (Id Volume), Id Slot) 316 , ActionRoute (Id Record) 317 ) 318 fakeBackendDepend1 = 319 ( viewRoot :: ActionRoute API 320 , viewLogin :: ActionRoute () 321 , viewRegister :: ActionRoute () 322 , viewPasswordReset :: ActionRoute () 323 , viewLoginToken :: ActionRoute (API, Id LoginToken) 324 , viewParty :: ActionRoute (API, PartyTarget) 325 , viewPartyEdit :: ActionRoute PartyTarget 326 , queryParties :: ActionRoute API 327 , viewAvatar :: ActionRoute (Id Party) 328 , viewPartyActivity :: ActionRoute (API, PartyTarget) 329 , viewVolume :: ActionRoute (API, Id Volume) 330 , viewVolumeCreateHandler :: Action 331 , viewVolumeEdit :: ActionRoute (Id Volume) 332 , queryVolumes :: ActionRoute API 333 , thumbVolume :: ActionRoute (Id Volume) 334 , csvVolume :: ActionRoute (Id Volume) 335 , viewVolumeActivity :: ActionRoute (API, Id Volume) 336 , viewSlot :: Bool -> ActionRoute (API, (Maybe (Id Volume), Id Slot)) 337 , viewContainerActivity :: ActionRoute (API, (Maybe (Id Volume), Id Slot)) 338 , thumbSlot :: ActionRoute (Maybe (Id Volume), Id Slot) 339 , viewRecord :: ActionRoute (Id Record) 340 ) 341 342 -- This type decl generated by copying out the text from GHC's warning message, 343 -- then formatting with brittany. 344 fakeBackendDepend2 345 :: ( Action 346 , Bool -> ActionRoute (API, Maybe (Id Volume), Id Slot, Id Asset) 347 , ActionRoute (Id Slot, Id Asset) 348 , ActionRoute (Id Slot, Id Asset) 349 , Bool -> ActionRoute (Id Slot, Id Asset) 350 , ActionRoute (Id Asset, Segment) 351 , ActionRoute (Id Asset, Segment) 352 , ActionRoute (Id Asset, Segment) 353 , API -> Action 354 , Bool -> ActionRoute (Maybe (Id Volume), Id Slot) 355 , Bool -> ActionRoute (Id Volume) 356 , ActionRoute (Id Volume) 357 , ActionRoute API 358 , API -> [(BS.ByteString, BS.ByteString)] -> Action 359 , ActionRoute API 360 , ActionRoute API 361 , ActionRoute API 362 , ActionRoute API 363 , ActionRoute (API, Id LoginToken) 364 , ActionRoute (API, Id LoginToken) 365 ) 366 fakeBackendDepend2 = 367 ( viewFormatsHandler :: Action 368 , viewAssetSegment :: Bool -> ActionRoute (API, Maybe (Id Volume), Id Slot, Id Asset) 369 , downloadAssetSegment :: ActionRoute (Id Slot, Id Asset) 370 , downloadOrigAssetSegment :: ActionRoute (Id Slot, Id Asset) 371 , thumbAssetSegment :: Bool -> ActionRoute (Id Slot, Id Asset) 372 , downloadAsset :: ActionRoute (Id Asset, Segment) 373 , downloadOrigAsset :: ActionRoute (Id Asset, Segment) 374 , thumbAsset :: ActionRoute (Id Asset, Segment) 375 , postSearchHandler :: API -> Action 376 , zipContainer :: Bool -> ActionRoute (Maybe (Id Volume), Id Slot) 377 , zipVolume :: Bool -> ActionRoute (Id Volume) 378 , viewVolumeDescription :: ActionRoute (Id Volume) 379 , viewRoot :: ActionRoute API 380 , userHandler :: API -> [(BS.ByteString, BS.ByteString)] -> Action 381 -- , postUser :: ActionRoute API 382 , postLogin :: ActionRoute API 383 , postLogout :: ActionRoute API 384 , postRegister :: ActionRoute API 385 , postPasswordReset :: ActionRoute API 386 , viewLoginToken :: ActionRoute (API, Id LoginToken) 387 , postPasswordToken :: ActionRoute (API, Id LoginToken) 388 -- TODO: finish enumerating 389 ) 390 391 fakeBackendDepend3, fakeBackendDepend4 :: () 392 fakeBackendDepend3 = () 393 fakeBackendDepend4 = ()