Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
341b1ee
WIP: move gundeck internal API to wire-api
pcapriotti Sep 18, 2024
e6914de
do CannonId
fisx Sep 27, 2024
21b1e7e
do Presence
fisx Sep 27, 2024
99318a5
do Push.V2
fisx Sep 27, 2024
abf771c
rm internal routing table, ReqBodyHack in services/gundeck.
fisx Sep 27, 2024
0be6bce
do Routes.Internal.Gundeck. this makes wire-api compile.
fisx Sep 27, 2024
ad5e05e
Resolve confusion between 3 different data types all called `URI`.
fisx Sep 27, 2024
84404d1
rm unused imports.
fisx Sep 27, 2024
ee4554e
fix trivial compiler errors.
fisx Sep 27, 2024
63c1fd5
rm /libs/gundeck-types
fisx Sep 27, 2024
26e58bf
fix trivial compiler errors.
fisx Sep 27, 2024
4bdcd0f
Add gundeck internal routes to swagger docs.
fisx Sep 27, 2024
03a05f4
Add gundeck internal swagger to docs.
fisx Sep 30, 2024
1101bfd
Add FUTUREWORKs.
fisx Sep 30, 2024
a43a739
Add golden tests.
fisx Sep 30, 2024
d59106e
Fix toJSON helper for Presence.
fisx Sep 30, 2024
59ffbc5
Fix brig swagger handler.
fisx Sep 30, 2024
9d3649e
Changelog.
fisx Sep 30, 2024
5c76642
Make wire-api/test/golden run on develop.
fisx Sep 30, 2024
1cb043f
Revert "Make wire-api/test/golden run on develop."
fisx Sep 30, 2024
3c435c0
make sanitize-pr
fisx Sep 30, 2024
3faa8c8
Oops, forgot to git-add a new haskell module.
fisx Sep 30, 2024
eebaa05
hi ci
fisx Sep 30, 2024
ff8b622
rm superflous golden json files.
fisx Oct 1, 2024
87a630e
Align golden test json files with what was the case before this PR.
fisx Oct 1, 2024
050c887
Remove redundant golden tests for ApsData.
fisx Oct 1, 2024
2b63078
Keep null fields for backwards compat.
fisx Oct 1, 2024
e875f5c
hi ci
fisx Oct 1, 2024
dec4873
hi ci
fisx Oct 1, 2024
e54922c
Merge remote-tracking branch 'origin/develop' into gundeck-internal-s…
fisx Oct 1, 2024
1b2f386
Fix ToSchema Presence instance.
fisx Oct 1, 2024
3f63924
hi ci
fisx Oct 1, 2024
56a8d1e
Post used to return 201.
fisx Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ packages:
, libs/dns-util/
, libs/deriving-swagger2/
, libs/galley-types/
, libs/gundeck-types/
, libs/hscim/
, libs/http2-manager/
, libs/imports/
Expand Down
1 change: 1 addition & 0 deletions changelog.d/5-internal/gundeck-internal-swagger
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Expose gundeck internal API on swagger. Mv some types and routes to wire-api.
2 changes: 2 additions & 0 deletions docs/src/understand/api-client-perspective/swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Internal APIs are not under version control.
endpoints](https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/cargohold)
- [`galley` - **internal** (private)
endpoints](https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/galley)
- [`gundeck` - **internal** (private)
endpoints](https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/gundeck)
- [`spar` - **internal** (private)
endpoints](https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/spar)

Expand Down
1 change: 0 additions & 1 deletion libs/gundeck-types/.ormolu

This file was deleted.

661 changes: 0 additions & 661 deletions libs/gundeck-types/LICENSE

This file was deleted.

42 changes: 0 additions & 42 deletions libs/gundeck-types/default.nix

This file was deleted.

86 changes: 0 additions & 86 deletions libs/gundeck-types/gundeck-types.cabal

This file was deleted.

69 changes: 0 additions & 69 deletions libs/gundeck-types/src/Gundeck/Types/Common.hs

This file was deleted.

43 changes: 0 additions & 43 deletions libs/gundeck-types/src/Gundeck/Types/Event.hs

This file was deleted.

69 changes: 0 additions & 69 deletions libs/gundeck-types/src/Gundeck/Types/Presence.hs

This file was deleted.

2 changes: 2 additions & 0 deletions libs/wire-api/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
, metrics-wai
, mime
, mtl
, network-uri
, openapi3
, pem
, polysemy
Expand Down Expand Up @@ -169,6 +170,7 @@ mkDerivation {
metrics-wai
mime
mtl
network-uri
openapi3
pem
polysemy
Expand Down
18 changes: 18 additions & 0 deletions libs/wire-api/src/Wire/API/CannonId.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module Wire.API.CannonId where

import Data.Aeson
import Data.OpenApi
import Data.Proxy
import Imports
import Web.HttpApiData

newtype CannonId = CannonId
{ cannonId :: Text
}
deriving (Eq, Ord, Show, FromJSON, ToJSON)

instance ToParamSchema CannonId where
toParamSchema _ = toParamSchema (Proxy @Text)

instance FromHttpApiData CannonId where
parseUrlPiece = pure . CannonId
24 changes: 24 additions & 0 deletions libs/wire-api/src/Wire/API/Event/Gundeck.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module Wire.API.Event.Gundeck where

import Data.Aeson
import Data.Aeson.KeyMap qualified as KeyMap
import Data.Json.Util
import Imports
import Wire.API.Push.V2.Token

newtype PushRemove = PushRemove PushToken
deriving (Eq, Show)

instance FromJSON PushRemove where
parseJSON = withObject "push-removed object" $ \o ->
PushRemove <$> o .: "token"

instance ToJSON PushRemove where
toJSON = Object . toJSONObject

instance ToJSONObject PushRemove where
toJSONObject (PushRemove t) =
KeyMap.fromList
[ "type" .= ("user.push-remove" :: Text),
"token" .= t
]
Loading