packages feed

cicero-api 0.1.1.3 → 0.1.2.0

raw patch · 3 files changed

+15/−1 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ IOHK.Cicero.API.Run: [abort] :: RunRoutes mode -> mode :- (Capture "id" RunID :> DeleteNoContent)
- IOHK.Cicero.API.Run: RunRoutes :: (mode :- (QueryFlag "recursive" :> (QueryParams "input" FactID :> (QueryParam "offset" Natural :> (QueryParam "limit" Natural :> Get '[JSON] [RunV2]))))) -> (mode :- (Capture "id" RunID :> ("fact" :> (ReqBody '[OctetStream] CreateFactV1 :> Post '[JSON] FactV1)))) -> (mode :- (Capture "id" RunID :> ("logs" :> Get '[JSON] RunLogsV1))) -> RunRoutes mode
+ IOHK.Cicero.API.Run: RunRoutes :: (mode :- (QueryFlag "recursive" :> (QueryParams "input" FactID :> (QueryParam "offset" Natural :> (QueryParam "limit" Natural :> Get '[JSON] [RunV2]))))) -> (mode :- (Capture "id" RunID :> ("fact" :> (ReqBody '[OctetStream] CreateFactV1 :> Post '[JSON] FactV1)))) -> (mode :- (Capture "id" RunID :> ("logs" :> Get '[JSON] RunLogsV1))) -> (mode :- (Capture "id" RunID :> DeleteNoContent)) -> RunRoutes mode

Files

cicero-api.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name:          cicero-api-version:       0.1.1.3+version:       0.1.2.0 license:       Apache-2.0 license-files:   LICENSE
cli/Run.hs view
@@ -79,16 +79,24 @@  <> header "cicero-cli run get-logs — Get logs for a run"   ) +abortRunInfo :: ParserInfo RunID+abortRunInfo = info runIdArgsParser+  ( fullDesc+ <> header "cicero-cli run abort — Abort a run"+  )+ data RunCommand   = CmdGetRuns !GetRunsArgs   | CmdCreateFact !CreateFactArgs   | CmdGetLogs !RunID+  | CmdAbortRun !RunID  runCommandParser :: Parser RunCommand runCommandParser = hsubparser   ( command "get-all" (CmdGetRuns <$> getRunsInfo)  <> command "create-fact" (CmdCreateFact <$> createFactInfo)  <> command "get-logs" (CmdGetLogs <$> getLogsInfo)+ <> command "abort" (CmdAbortRun <$> abortRunInfo)   )  runCommandInfo :: ParserInfo RunCommand@@ -106,3 +114,6 @@ handler (CmdGetLogs rid) runClient cEnv = runClientM (runClient.getLogs rid) cEnv >>= \case   Left e -> throw e   Right res -> hPutStrLn stdout $ encode res+handler (CmdAbortRun rid) runClient cEnv = runClientM (runClient.abort rid) cEnv >>= \case+  Left e -> throw e+  Right _ -> pure ()
src/IOHK/Cicero/API/Run.hs view
@@ -46,6 +46,9 @@             :- Capture "id" RunID             :> "logs"             :> Get '[JSON] RunLogsV1+  , abort :: mode+          :- Capture "id" RunID+          :> DeleteNoContent   } deriving stock Generic  data RunV2 = Run