From ad4038142c7f0d41bf12af4a5f5e13273d6c2ab0 Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Thu, 3 Mar 2022 08:31:22 +0100 Subject: [PATCH 01/13] Cleanup of event record types (#2160) * Remove redundant field in Event type * Remove redundant field in team Event type * Remove redundant federation Event module Co-authored-by: Stefan Matting --- changelog.d/5-internal/event-cleanup | 1 + .../src/Wire/API/Federation/Event.hs | 100 ----- .../wire-api-federation.cabal | 1 - .../src/Wire/API/Conversation/Action.hs | 16 +- .../src/Wire/API/Event/Conversation.hs | 27 +- libs/wire-api/src/Wire/API/Event/Team.hs | 66 ++-- .../Golden/Generated/AddBotResponse_user.hs | 20 +- .../Wire/API/Golden/Generated/Event_team.hs | 371 +++++++----------- .../Wire/API/Golden/Generated/Event_user.hs | 14 - .../Generated/RemoveBotResponse_user.hs | 8 - .../brig/test/integration/API/Provider.hs | 1 + services/galley/src/Galley/API/Create.hs | 6 +- services/galley/src/Galley/API/Federation.hs | 1 - services/galley/src/Galley/API/Internal.hs | 1 - services/galley/src/Galley/API/Message.hs | 2 +- services/galley/src/Galley/API/Teams.hs | 16 +- services/galley/src/Galley/API/Update.hs | 13 +- services/galley/src/Galley/API/Util.hs | 2 +- services/galley/test/integration/API.hs | 1 + .../galley/test/integration/API/Federation.hs | 1 + .../test/integration/API/MessageTimer.hs | 1 + services/galley/test/integration/API/Roles.hs | 1 + services/galley/test/integration/API/Teams.hs | 12 +- services/galley/test/integration/API/Util.hs | 20 +- 24 files changed, 250 insertions(+), 452 deletions(-) create mode 100644 changelog.d/5-internal/event-cleanup delete mode 100644 libs/wire-api-federation/src/Wire/API/Federation/Event.hs diff --git a/changelog.d/5-internal/event-cleanup b/changelog.d/5-internal/event-cleanup new file mode 100644 index 0000000000..f9f726d043 --- /dev/null +++ b/changelog.d/5-internal/event-cleanup @@ -0,0 +1 @@ +The `Event` record type does not contain a `type` field anymore diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Event.hs b/libs/wire-api-federation/src/Wire/API/Federation/Event.hs deleted file mode 100644 index 2e62292524..0000000000 --- a/libs/wire-api-federation/src/Wire/API/Federation/Event.hs +++ /dev/null @@ -1,100 +0,0 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DerivingStrategies #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE StrictData #-} - --- This file is part of the Wire Server implementation. --- --- Copyright (C) 2022 Wire Swiss GmbH --- --- This program is free software: you can redistribute it and/or modify it under --- the terms of the GNU Affero General Public License as published by the Free --- Software Foundation, either version 3 of the License, or (at your option) any --- later version. --- --- This program is distributed in the hope that it will be useful, but WITHOUT --- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS --- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more --- details. --- --- You should have received a copy of the GNU Affero General Public License along --- with this program. If not, see . - -module Wire.API.Federation.Event - ( AnyEvent (..), - ConversationEvent (..), - - -- * MemberJoin - MemberJoin (..), - SimpleMember (..), - ConversationRole (..), - ) -where - -import Data.Aeson (FromJSON, ToJSON) -import Data.Id -import Data.Qualified (Qualified) -import Data.Time -import Imports -import Test.QuickCheck (Arbitrary (arbitrary)) -import qualified Test.QuickCheck as QC -import Wire.API.Util.Aeson (CustomEncoded (CustomEncoded)) - -data AnyEvent - = EventMemberJoin (ConversationEvent MemberJoin) - deriving stock (Eq, Show, Generic) - deriving (ToJSON, FromJSON) via (CustomEncoded AnyEvent) - --- | Similar to 'Wire.API.Event.ConversationEvent', but all IDs are qualified to allow --- this representation to be sent across backends. --- --- Also, instead of having a sum type in 'eventData', it allows specifying which type --- of event it is, e.g. @ConversationEvent MemberJoin@. --- To represent possiblity of multiple different event types, use a sum type around it. -data ConversationEvent a = ConversationEvent - { eventConversation :: Qualified ConvId, - eventFrom :: Qualified UserId, - eventTime :: UTCTime, - eventData :: a - } - deriving stock (Eq, Show, Generic, Foldable, Functor, Traversable) - deriving (ToJSON, FromJSON) via (CustomEncoded (ConversationEvent a)) - -newtype MemberJoin = MemberJoin - { smUsers :: [SimpleMember] - } - deriving stock (Eq, Show, Generic) - deriving (ToJSON, FromJSON) via (CustomEncoded MemberJoin) - -data SimpleMember = SimpleMember - { smId :: Qualified UserId, - smConversationRole :: ConversationRole - } - deriving stock (Eq, Show, Generic) - deriving (ToJSON, FromJSON) via (CustomEncoded SimpleMember) - -data ConversationRole - = ConversationRoleAdmin - | ConversationRoleMember - deriving stock (Eq, Show, Generic) - deriving (ToJSON, FromJSON) via (CustomEncoded ConversationRole) - --- Arbitrary - -instance Arbitrary AnyEvent where - arbitrary = - QC.oneof - [ EventMemberJoin <$> arbitrary - ] - -instance Arbitrary a => Arbitrary (ConversationEvent a) where - arbitrary = ConversationEvent <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary - -instance Arbitrary MemberJoin where - arbitrary = MemberJoin <$> arbitrary - -instance Arbitrary SimpleMember where - arbitrary = SimpleMember <$> arbitrary <*> arbitrary - -instance Arbitrary ConversationRole where - arbitrary = QC.elements [ConversationRoleAdmin, ConversationRoleMember] diff --git a/libs/wire-api-federation/wire-api-federation.cabal b/libs/wire-api-federation/wire-api-federation.cabal index 0c2cc1db7f..20d673c962 100644 --- a/libs/wire-api-federation/wire-api-federation.cabal +++ b/libs/wire-api-federation/wire-api-federation.cabal @@ -28,7 +28,6 @@ library Wire.API.Federation.Domain Wire.API.Federation.Endpoint Wire.API.Federation.Error - Wire.API.Federation.Event other-modules: Paths_wire_api_federation hs-source-dirs: diff --git a/libs/wire-api/src/Wire/API/Conversation/Action.hs b/libs/wire-api/src/Wire/API/Conversation/Action.hs index cb8b5890cd..c89fb2db27 100644 --- a/libs/wire-api/src/Wire/API/Conversation/Action.hs +++ b/libs/wire-api/src/Wire/API/Conversation/Action.hs @@ -55,24 +55,24 @@ conversationActionToEvent :: ConversationAction -> Event conversationActionToEvent now quid qcnv (ConversationActionAddMembers newMembers role) = - Event MemberJoin qcnv quid now $ + Event qcnv quid now $ EdMembersJoin $ SimpleMembers (map (`SimpleMember` role) (toList newMembers)) conversationActionToEvent now quid qcnv (ConversationActionRemoveMembers removedMembers) = - Event MemberLeave qcnv quid now $ + Event qcnv quid now $ EdMembersLeave (QualifiedUserIdList (toList removedMembers)) conversationActionToEvent now quid qcnv (ConversationActionRename rename) = - Event ConvRename qcnv quid now (EdConvRename rename) + Event qcnv quid now (EdConvRename rename) conversationActionToEvent now quid qcnv (ConversationActionMessageTimerUpdate update) = - Event ConvMessageTimerUpdate qcnv quid now (EdConvMessageTimerUpdate update) + Event qcnv quid now (EdConvMessageTimerUpdate update) conversationActionToEvent now quid qcnv (ConversationActionReceiptModeUpdate update) = - Event ConvReceiptModeUpdate qcnv quid now (EdConvReceiptModeUpdate update) + Event qcnv quid now (EdConvReceiptModeUpdate update) conversationActionToEvent now quid qcnv (ConversationActionMemberUpdate target (OtherMemberUpdate role)) = let update = MemberUpdateData target Nothing Nothing Nothing Nothing Nothing Nothing role - in Event MemberStateUpdate qcnv quid now (EdMemberUpdate update) + in Event qcnv quid now (EdMemberUpdate update) conversationActionToEvent now quid qcnv (ConversationActionAccessUpdate update) = - Event ConvAccessUpdate qcnv quid now (EdConvAccessUpdate update) + Event qcnv quid now (EdConvAccessUpdate update) conversationActionToEvent now quid qcnv ConversationActionDelete = - Event ConvDelete qcnv quid now EdConvDelete + Event qcnv quid now EdConvDelete conversationActionTag :: Qualified UserId -> ConversationAction -> Action conversationActionTag _ (ConversationActionAddMembers _ _) = AddConversationMember diff --git a/libs/wire-api/src/Wire/API/Event/Conversation.hs b/libs/wire-api/src/Wire/API/Event/Conversation.hs index 66a1b7e946..b39ea7ed9d 100644 --- a/libs/wire-api/src/Wire/API/Event/Conversation.hs +++ b/libs/wire-api/src/Wire/API/Event/Conversation.hs @@ -21,6 +21,7 @@ module Wire.API.Event.Conversation ( -- * Event Event (..), + evtType, EventType (..), EventData (..), AddCodeResult (..), @@ -107,14 +108,16 @@ import Wire.API.User (QualifiedUserIdList (..)) -- Event data Event = Event - { evtType :: EventType, - evtConv :: Qualified ConvId, + { evtConv :: Qualified ConvId, evtFrom :: Qualified UserId, evtTime :: UTCTime, evtData :: EventData } deriving stock (Eq, Show, Generic) +evtType :: Event -> EventType +evtType = eventDataType . evtData + modelEvent :: Doc.Model modelEvent = Doc.defineModel "Event" $ do Doc.description "Event data" @@ -146,7 +149,7 @@ modelEvent = Doc.defineModel "Event" $ do instance Arbitrary Event where arbitrary = do typ <- arbitrary - Event typ + Event <$> arbitrary <*> arbitrary <*> (milli <$> arbitrary) @@ -302,6 +305,22 @@ genEventData = \case OtrMessageAdd -> EdOtrMessage <$> arbitrary ConvDelete -> pure EdConvDelete +eventDataType :: EventData -> EventType +eventDataType (EdMembersJoin _) = MemberJoin +eventDataType (EdMembersLeave _) = MemberLeave +eventDataType (EdMemberUpdate _) = MemberStateUpdate +eventDataType (EdConvRename _) = ConvRename +eventDataType (EdConvAccessUpdate _) = ConvAccessUpdate +eventDataType (EdConvMessageTimerUpdate _) = ConvMessageTimerUpdate +eventDataType (EdConvCodeUpdate _) = ConvCodeUpdate +eventDataType EdConvCodeDelete = ConvCodeDelete +eventDataType (EdConnect _) = ConvConnect +eventDataType (EdConversation _) = ConvCreate +eventDataType (EdConvReceiptModeUpdate _) = ConvReceiptModeUpdate +eventDataType (EdTyping _) = Typing +eventDataType (EdOtrMessage _) = OtrMessageAdd +eventDataType EdConvDelete = ConvDelete + -------------------------------------------------------------------------------- -- Event data helpers @@ -547,7 +566,7 @@ eventObjectSchema = <*> evtFrom .= field "qualified_from" schema <*> (toUTCTimeMillis . evtTime) .= field "time" (fromUTCTimeMillis <$> schema) where - mk (ty, d) cid uid tm = Event ty cid uid tm d + mk (_, d) cid uid tm = Event cid uid tm d instance ToJSONObject Event where toJSONObject = diff --git a/libs/wire-api/src/Wire/API/Event/Team.hs b/libs/wire-api/src/Wire/API/Event/Team.hs index e18cde53a0..94c692703c 100644 --- a/libs/wire-api/src/Wire/API/Event/Team.hs +++ b/libs/wire-api/src/Wire/API/Event/Team.hs @@ -62,15 +62,17 @@ import Wire.API.Team.Permission (Permissions) -- Event data Event = Event - { _eventType :: EventType, - _eventTeam :: TeamId, + { _eventTeam :: TeamId, _eventTime :: UTCTime, - _eventData :: Maybe EventData + _eventData :: EventData } deriving stock (Eq, Show, Generic) -newEvent :: EventType -> TeamId -> UTCTime -> Event -newEvent typ tid tme = Event typ tid tme Nothing +eventType :: Event -> EventType +eventType = eventDataType . _eventData + +newEvent :: TeamId -> UTCTime -> EventData -> Event +newEvent = Event modelEvent :: Doc.Model modelEvent = Doc.defineModel "TeamEvent" $ do @@ -123,7 +125,7 @@ instance ToJSON Event where instance ToJSONObject Event where toJSONObject e = KeyMap.fromList - [ "type" .= _eventType e, + [ "type" .= eventType e, "team" .= _eventTeam e, "time" .= _eventTime e, "data" .= _eventData e @@ -133,7 +135,7 @@ instance FromJSON Event where parseJSON = withObject "event" $ \o -> do ty <- o .: "type" dt <- o .:? "data" - Event ty + Event <$> o .: "team" <*> o .: "time" <*> parseEventData ty dt @@ -141,7 +143,7 @@ instance FromJSON Event where instance Arbitrary Event where arbitrary = do typ <- arbitrary - Event typ + Event <$> arbitrary <*> arbitrary <*> genEventData typ @@ -200,6 +202,7 @@ instance FromJSON EventType where data EventData = EdTeamCreate Team + | EdTeamDelete | EdTeamUpdate TeamUpdateData | EdMemberJoin UserId | EdMemberLeave UserId @@ -210,6 +213,7 @@ data EventData instance ToJSON EventData where toJSON (EdTeamCreate tem) = toJSON tem + toJSON EdTeamDelete = Null toJSON (EdMemberJoin usr) = object ["user" .= usr] toJSON (EdMemberUpdate usr mPerm) = object $ @@ -221,43 +225,53 @@ instance ToJSON EventData where toJSON (EdConvDelete cnv) = object ["conv" .= cnv] toJSON (EdTeamUpdate upd) = toJSON upd -parseEventData :: EventType -> Maybe Value -> Parser (Maybe EventData) +eventDataType :: EventData -> EventType +eventDataType (EdTeamCreate _) = TeamCreate +eventDataType EdTeamDelete = TeamDelete +eventDataType (EdTeamUpdate _) = TeamUpdate +eventDataType (EdMemberJoin _) = MemberJoin +eventDataType (EdMemberLeave _) = MemberLeave +eventDataType (EdMemberUpdate _ _) = MemberUpdate +eventDataType (EdConvCreate _) = ConvCreate +eventDataType (EdConvDelete _) = ConvDelete + +parseEventData :: EventType -> Maybe Value -> Parser (EventData) parseEventData MemberJoin Nothing = fail "missing event data for type 'team.member-join'" parseEventData MemberJoin (Just j) = do - let f o = Just . EdMemberJoin <$> o .: "user" + let f o = EdMemberJoin <$> o .: "user" withObject "member join data" f j parseEventData MemberUpdate Nothing = fail "missing event data for type 'team.member-update" parseEventData MemberUpdate (Just j) = do - let f o = Just <$> (EdMemberUpdate <$> o .: "user" <*> o .:? "permissions") + let f o = EdMemberUpdate <$> o .: "user" <*> o .:? "permissions" withObject "member update data" f j parseEventData MemberLeave Nothing = fail "missing event data for type 'team.member-leave'" parseEventData MemberLeave (Just j) = do - let f o = Just . EdMemberLeave <$> o .: "user" + let f o = EdMemberLeave <$> o .: "user" withObject "member leave data" f j parseEventData ConvCreate Nothing = fail "missing event data for type 'team.conversation-create" parseEventData ConvCreate (Just j) = do - let f o = Just . EdConvCreate <$> o .: "conv" + let f o = EdConvCreate <$> o .: "conv" withObject "conversation create data" f j parseEventData ConvDelete Nothing = fail "missing event data for type 'team.conversation-delete" parseEventData ConvDelete (Just j) = do - let f o = Just . EdConvDelete <$> o .: "conv" + let f o = EdConvDelete <$> o .: "conv" withObject "conversation delete data" f j parseEventData TeamCreate Nothing = fail "missing event data for type 'team.create'" -parseEventData TeamCreate (Just j) = Just . EdTeamCreate <$> parseJSON j +parseEventData TeamCreate (Just j) = EdTeamCreate <$> parseJSON j parseEventData TeamUpdate Nothing = fail "missing event data for type 'team.update'" -parseEventData TeamUpdate (Just j) = Just . EdTeamUpdate <$> parseJSON j -parseEventData _ Nothing = pure Nothing +parseEventData TeamUpdate (Just j) = EdTeamUpdate <$> parseJSON j +parseEventData _ Nothing = pure EdTeamDelete parseEventData t (Just _) = fail $ "unexpected event data for type " <> show t -genEventData :: EventType -> QC.Gen (Maybe EventData) +genEventData :: EventType -> QC.Gen (EventData) genEventData = \case - TeamCreate -> Just . EdTeamCreate <$> arbitrary - TeamDelete -> pure Nothing - TeamUpdate -> Just . EdTeamUpdate <$> arbitrary - MemberJoin -> Just . EdMemberJoin <$> arbitrary - MemberLeave -> Just . EdMemberLeave <$> arbitrary - MemberUpdate -> Just <$> (EdMemberUpdate <$> arbitrary <*> arbitrary) - ConvCreate -> Just . EdConvCreate <$> arbitrary - ConvDelete -> Just . EdConvDelete <$> arbitrary + TeamCreate -> EdTeamCreate <$> arbitrary + TeamDelete -> pure EdTeamDelete + TeamUpdate -> EdTeamUpdate <$> arbitrary + MemberJoin -> EdMemberJoin <$> arbitrary + MemberLeave -> EdMemberLeave <$> arbitrary + MemberUpdate -> EdMemberUpdate <$> arbitrary <*> arbitrary + ConvCreate -> EdConvCreate <$> arbitrary + ConvDelete -> EdConvDelete <$> arbitrary makeLenses ''Event diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs index 380efedc0b..93f6f0ade0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs @@ -25,24 +25,10 @@ import Data.Qualified import qualified Data.UUID as UUID (fromString) import Imports (Maybe (Just, Nothing), fromJust, read, (.)) import Wire.API.Conversation - ( ConversationRename (ConversationRename, cupName), - ) -import Wire.API.Conversation.Bot (AddBotResponse (..)) -import Wire.API.Conversation.Typing (TypingData (TypingData, tdStatus), TypingStatus (StartedTyping)) +import Wire.API.Conversation.Bot +import Wire.API.Conversation.Typing import Wire.API.Event.Conversation - ( Event (Event), - EventData (..), - EventType - ( ConvRename, - Typing - ), - ) import Wire.API.User - ( Asset (ImageAsset), - AssetSize (AssetPreview), - ColourId (ColourId, fromColourId), - Name (Name, fromName), - ) testObject_AddBotResponse_user_1 :: AddBotResponse testObject_AddBotResponse_user_1 = @@ -58,7 +44,6 @@ testObject_AddBotResponse_user_1 = rsAddBotAssets = [ImageAsset "7" Nothing, ImageAsset "" (Just AssetPreview)], rsAddBotEvent = Event - ConvRename (Qualified (Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000200000003"))) (Domain "faraway.example.com")) (Qualified (Id (fromJust (UUID.fromString "00000004-0000-0004-0000-000400000004"))) (Domain "faraway.example.com")) (read "1864-05-12 19:20:22.286 UTC") @@ -79,7 +64,6 @@ testObject_AddBotResponse_user_2 = rsAddBotAssets = [], rsAddBotEvent = Event - Typing (Qualified (Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000300000001"))) (Domain "faraway.example.com")) (Qualified (Id (fromJust (UUID.fromString "00000004-0000-0000-0000-000300000001"))) (Domain "faraway.example.com")) (read "1864-05-08 19:02:58.6 UTC") diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs index e9a1ca0ec3..bf4a0e92ac 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_team.hs @@ -27,376 +27,285 @@ import qualified Data.UUID as UUID (fromString) import GHC.Exts (IsList (fromList)) import Imports (Maybe (Just, Nothing), fromJust, read, (&)) import Wire.API.Event.Team - ( Event, - EventData - ( EdConvCreate, - EdConvDelete, - EdMemberJoin, - EdMemberLeave, - EdMemberUpdate, - EdTeamCreate, - EdTeamUpdate - ), - EventType - ( ConvCreate, - ConvDelete, - MemberJoin, - MemberLeave, - MemberUpdate, - TeamCreate, - TeamDelete, - TeamUpdate - ), - eventData, - newEvent, - ) import Wire.API.Team - ( TeamBinding (Binding, NonBinding), - TeamUpdateData - ( TeamUpdateData, - _iconKeyUpdate, - _iconUpdate, - _nameUpdate - ), - newTeam, - teamIconKey, - ) import Wire.API.Team.Permission - ( Perm - ( AddTeamMember, - CreateConversation, - DeleteTeam, - DoNotUseDeprecatedAddRemoveConvMember, - DoNotUseDeprecatedDeleteConversation, - DoNotUseDeprecatedModifyConvName, - GetBilling, - GetMemberPermissions, - GetTeamConversations, - RemoveTeamMember, - SetBilling, - SetMemberPermissions, - SetTeamData - ), - Permissions (Permissions, _copy, _self), - ) testObject_Event_team_1 :: Event testObject_Event_team_1 = ( newEvent - (TeamCreate) ((Id (fromJust (UUID.fromString "0000103e-0000-62d6-0000-7840000079b9")))) (read ("1864-05-15 23:16:24.423381912958 UTC")) - & eventData - .~ ( Just - ( EdTeamCreate - ( newTeam - ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000000000001")))) - ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000300000002")))) - ("\EOTX\996492h") - ("#\93847\21278(\997485") - (Binding) - & teamIconKey .~ (Nothing) - ) - ) - ) + ( EdTeamCreate + ( newTeam + ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000000000001")))) + ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000300000002")))) + ("\EOTX\996492h") + ("#\93847\21278(\997485") + (Binding) + & teamIconKey .~ (Nothing) + ) + ) ) testObject_Event_team_2 :: Event testObject_Event_team_2 = ( newEvent - (TeamUpdate) ((Id (fromJust (UUID.fromString "000019fb-0000-03a5-0000-009c00006067")))) (read ("1864-05-06 06:03:20.68447167825 UTC")) - & eventData - .~ ( Just - ( EdTeamUpdate - ( TeamUpdateData - { _nameUpdate = - Just - ( unsafeRange - ("i5\EOT\1002575\1097973\1066101\&1u\1105430\&1\41840U*/*\999102\1001662\DC3\994167d\1096830\&4uG\173887\fUh09\\\1028574\vPy\t\171003\SI\GS0bV\CAN]\17049\96404\15202\RS\SYNX\ESC3[\CANf\NAK") - ), - _iconUpdate = fromByteString' "3-1-f595b8ed-6dcf-41f2-8a2f-f662a9c0fce4", - _iconKeyUpdate = - Just (unsafeRange ("\131355Pp\1067299\987603\ENQS\22773S\ACK\NAKmM\19084\&0\19257\31361$rL,XvJ")) - } - ) - ) - ) + ( EdTeamUpdate + ( TeamUpdateData + { _nameUpdate = + Just + ( unsafeRange + ("i5\EOT\1002575\1097973\1066101\&1u\1105430\&1\41840U*/*\999102\1001662\DC3\994167d\1096830\&4uG\173887\fUh09\\\1028574\vPy\t\171003\SI\GS0bV\CAN]\17049\96404\15202\RS\SYNX\ESC3[\CANf\NAK") + ), + _iconUpdate = fromByteString' "3-1-f595b8ed-6dcf-41f2-8a2f-f662a9c0fce4", + _iconKeyUpdate = + Just (unsafeRange ("\131355Pp\1067299\987603\ENQS\22773S\ACK\NAKmM\19084\&0\19257\31361$rL,XvJ")) + } + ) + ) ) testObject_Event_team_3 :: Event testObject_Event_team_3 = ( newEvent - (MemberJoin) ((Id (fromJust (UUID.fromString "00000bfa-0000-53cd-0000-2f8e00004e38")))) (read ("1864-04-20 19:30:43.065358805164 UTC")) - & eventData .~ (Just (EdMemberJoin (Id (fromJust (UUID.fromString "000030c1-0000-1c28-0000-71af000036f3"))))) + (EdMemberJoin (Id (fromJust (UUID.fromString "000030c1-0000-1c28-0000-71af000036f3")))) ) testObject_Event_team_4 :: Event testObject_Event_team_4 = ( newEvent - (TeamUpdate) ((Id (fromJust (UUID.fromString "000060cd-0000-2fae-0000-3620000011d4")))) (read ("1864-06-07 17:44:20.841616476784 UTC")) - & eventData - .~ ( Just - ( EdTeamUpdate - ( TeamUpdateData - { _nameUpdate = - Just - ( unsafeRange - ("d\SI\172132@o\988798s&na\136232\1090952\149487|\83503\1016948/\989099v\NAKu\DC2f\1093640\1011936KC\47338\1066997\1059386\&9_\v_^\1045398K\155463\SO Y*T\CAN\1086598<\1056774>\171907\4929\rt\1038163\1072126w2E\127366hS>\ACK_PQN,Vk\SYN\1083970=90\EM2e\984550\USVA!\EM\FS\EOTe;\189780\&1\171907\4929\rt\1038163\1072126w2E\127366hS>\ACK_PQN,Vk\SYN\1083970=90\EM2e\984550\USVA!\EM\FS\EOTe;\189780\&1 Config -> Manager -> DB.ClientState -> Brig -> Cannon -> Galley -> IO TestTree tests dom conf p db b c g = do diff --git a/services/galley/src/Galley/API/Create.hs b/services/galley/src/Galley/API/Create.hs index 68562d43fe..75a2c5f2a7 100644 --- a/services/galley/src/Galley/API/Create.hs +++ b/services/galley/src/Galley/API/Create.hs @@ -377,7 +377,7 @@ createConnectConversation lusr conn j = do c <- E.createConnectConversation x y n now <- input let lcid = qualifyAs lusr (Data.convId c) - e = Event ConvConnect (qUntagged lcid) (qUntagged lusr) now (EdConnect j) + e = Event (qUntagged lcid) (qUntagged lusr) now (EdConnect j) notifyCreatedConversation Nothing lusr conn c for_ (newPushLocal ListComplete (tUnqualified lusr) (ConvEvent e) (recipient <$> Data.convLocalMembers c)) $ \p -> E.push1 $ @@ -418,7 +418,7 @@ createConnectConversation lusr conn j = do return . Just $ fromRange x Nothing -> return $ Data.convName conv t <- input - let e = Event ConvConnect (qUntagged lcnv) (qUntagged lusr) t (EdConnect j) + let e = Event (qUntagged lcnv) (qUntagged lusr) t (EdConnect j) for_ (newPushLocal ListComplete (tUnqualified lusr) (ConvEvent e) (recipient <$> Data.convLocalMembers conv)) $ \p -> E.push1 $ p @@ -468,7 +468,7 @@ notifyCreatedConversation dtime lusr conn c = do toPush t m = do let lconv = qualifyAs lusr (Data.convId c) c' <- conversationView (qualifyAs lusr (lmId m)) c - let e = Event ConvCreate (qUntagged lconv) (qUntagged lusr) t (EdConversation c') + let e = Event (qUntagged lconv) (qUntagged lusr) t (EdConversation c') return $ newPushLocal1 ListComplete (tUnqualified lusr) (ConvEvent e) (list1 (recipient m) []) & pushConn .~ conn diff --git a/services/galley/src/Galley/API/Federation.hs b/services/galley/src/Galley/API/Federation.hs index 2c86e342fe..66dcc5f776 100644 --- a/services/galley/src/Galley/API/Federation.hs +++ b/services/galley/src/Galley/API/Federation.hs @@ -111,7 +111,6 @@ onConversationCreated domain rc = do forM_ (fromNewRemoteConversation loc qrcConnected) $ \(mem, c) -> do let event = Event - ConvCreate (qUntagged (F.rcCnvId qrcConnected)) (qUntagged (F.rcRemoteOrigUserId qrcConnected)) (F.rcTime qrcConnected) diff --git a/services/galley/src/Galley/API/Internal.hs b/services/galley/src/Galley/API/Internal.hs index 16909bcc4b..a40c161c43 100644 --- a/services/galley/src/Galley/API/Internal.hs +++ b/services/galley/src/Galley/API/Internal.hs @@ -528,7 +528,6 @@ rmUser lusr conn = do deleteMembers (Data.convId c) (UserList [tUnqualified lusr] []) let e = Event - MemberLeave (qUntagged (qualifyAs lusr (Data.convId c))) (qUntagged lusr) now diff --git a/services/galley/src/Galley/API/Message.hs b/services/galley/src/Galley/API/Message.hs index f8fb535398..9d99a37a73 100644 --- a/services/galley/src/Galley/API/Message.hs +++ b/services/galley/src/Galley/API/Message.hs @@ -639,7 +639,7 @@ newMessageEvent :: Event newMessageEvent mconvId sender senderClient dat time (receiver, receiverClient) cipherText = let convId = fromMaybe (qUntagged (fmap selfConv receiver)) mconvId - in Event OtrMessageAdd convId sender time . EdOtrMessage $ + in Event convId sender time . EdOtrMessage $ OtrMessage { otrSender = senderClient, otrRecipient = receiverClient, diff --git a/services/galley/src/Galley/API/Teams.hs b/services/galley/src/Galley/API/Teams.hs index bac8563893..fb50dca8ac 100644 --- a/services/galley/src/Galley/API/Teams.hs +++ b/services/galley/src/Galley/API/Teams.hs @@ -356,7 +356,7 @@ updateTeamH zusr zcon tid updateData = do E.setTeamData tid updateData now <- input memList <- getTeamMembersForFanout tid - let e = newEvent TeamUpdate tid now & eventData .~ Just (EdTeamUpdate updateData) + let e = newEvent tid now (EdTeamUpdate updateData) let r = list1 (userRecipient zusr) (membersToRecipients (Just zusr) (memList ^. teamMembers)) E.push1 $ newPushLocal1 (memList ^. teamMemberListType) zusr (TeamEvent e) r & pushConn .~ Just zcon @@ -444,7 +444,7 @@ uncheckedDeleteTeam lusr zcon tid = do -- done asynchronously membs <- E.getTeamMembers tid (ue, be) <- foldrM (createConvDeleteEvents now membs) ([], []) convs - let e = newEvent TeamDelete tid now + let e = newEvent tid now EdTeamDelete pushDeleteEvents membs e ue E.deliverAsync be -- TODO: we don't delete bots here, but we should do that, since @@ -483,7 +483,7 @@ uncheckedDeleteTeam lusr zcon tid = do -- all team users are deleted immediately after these events are sent -- and will thus never be able to see these events in practice. let mm = nonTeamMembers convMembs teamMembs - let e = Conv.Event Conv.ConvDelete qconvId (qUntagged lusr) now Conv.EdConvDelete + let e = Conv.Event qconvId (qUntagged lusr) now Conv.EdConvDelete -- This event always contains all the required recipients let p = newPushLocal ListComplete (tUnqualified lusr) (ConvEvent e) (map recipient mm) let ee' = bots `zip` repeat e @@ -948,7 +948,7 @@ updateTeamMember zusr zcon tid targetMember = do privilegedUpdate = mkUpdate $ Just targetPermissions privilegedRecipients = membersToRecipients Nothing privileged now <- input - let ePriv = newEvent MemberUpdate tid now & eventData ?~ privilegedUpdate + let ePriv = newEvent tid now privilegedUpdate -- push to all members (user is privileged) let pushPriv = newPushLocal (updatedMembers ^. teamMemberListType) zusr (TeamEvent ePriv) $ privilegedRecipients for_ pushPriv $ \p -> E.push1 $ p & pushConn .~ Just zcon @@ -1071,7 +1071,7 @@ uncheckedDeleteTeamMember lusr zcon tid remove mems = do -- notify all team members. pushMemberLeaveEvent :: UTCTime -> Sem r () pushMemberLeaveEvent now = do - let e = newEvent MemberLeave tid now & eventData ?~ EdMemberLeave remove + let e = newEvent tid now (EdMemberLeave remove) let r = list1 (userRecipient (tUnqualified lusr)) @@ -1099,7 +1099,7 @@ uncheckedDeleteTeamMember lusr zcon tid remove mems = do let qconvId = qUntagged $ qualifyAs lusr (Data.convId dc) let (bots, users) = localBotsAndUsers (Data.convLocalMembers dc) let x = filter (\m -> not (Conv.lmId m `Set.member` exceptTo)) users - let y = Conv.Event Conv.MemberLeave qconvId (qUntagged lusr) now edata + let y = Conv.Event qconvId (qUntagged lusr) now edata for_ (newPushLocal (mems ^. teamMemberListType) (tUnqualified lusr) (ConvEvent y) (recipient <$> x)) $ \p -> E.push1 $ p & pushConn .~ zcon E.deliverAsync (bots `zip` repeat y) @@ -1339,7 +1339,7 @@ addTeamMemberInternal tid origin originConn (ntmNewTeamMember -> new) memList = sizeBeforeAdd <- ensureNotTooLarge tid E.createTeamMember tid new now <- input - let e = newEvent MemberJoin tid now & eventData ?~ EdMemberJoin (new ^. userId) + let e = newEvent tid now (EdMemberJoin (new ^. userId)) E.push1 $ newPushLocal1 (memList ^. teamMemberListType) (new ^. userId) (TeamEvent e) (recipients origin new) & pushConn .~ originConn APITeamQueue.pushTeamEvent tid e @@ -1400,7 +1400,7 @@ finishCreateTeam team owner others zcon = do for_ (owner : others) $ E.createTeamMember (team ^. teamId) now <- input - let e = newEvent TeamCreate (team ^. teamId) now & eventData ?~ EdTeamCreate team + let e = newEvent (team ^. teamId) now (EdTeamCreate team) let r = membersToRecipients Nothing others E.push1 $ newPushLocal1 ListComplete zusr (TeamEvent e) (list1 (userRecipient zusr) r) & pushConn .~ zcon diff --git a/services/galley/src/Galley/API/Update.hs b/services/galley/src/Galley/API/Update.hs index 54b6f91063..555cddb127 100644 --- a/services/galley/src/Galley/API/Update.hs +++ b/services/galley/src/Galley/API/Update.hs @@ -565,7 +565,7 @@ addCode lusr zcon lcnv = do E.createCode code now <- input conversationCode <- createCode code - let event = Event ConvCodeUpdate (qUntagged lcnv) (qUntagged lusr) now (EdConvCodeUpdate conversationCode) + let event = Event (qUntagged lcnv) (qUntagged lusr) now (EdConvCodeUpdate conversationCode) pushConversationEvent (Just zcon) event (qualifyAs lusr (map lmId users)) bots pure $ CodeAdded event Just code -> do @@ -621,7 +621,7 @@ rmCode lusr zcon lcnv = do key <- E.makeKey (tUnqualified lcnv) E.deleteCode key ReusableCode now <- input - let event = Event ConvCodeDelete (qUntagged lcnv) (qUntagged lusr) now EdConvCodeDelete + let event = Event (qUntagged lcnv) (qUntagged lusr) now EdConvCodeDelete pushConversationEvent (Just zcon) event (qualifyAs lusr (map lmId users)) bots pure event @@ -844,7 +844,7 @@ updateSelfMember lusr zcon qcnv update = do unless exists . throw $ ConvNotFound E.setSelfMember qcnv lusr update now <- input - let e = Event MemberStateUpdate qcnv (qUntagged lusr) now (EdMemberUpdate (updateData lusr)) + let e = Event qcnv (qUntagged lusr) now (EdMemberUpdate (updateData lusr)) pushConversationEvent (Just zcon) e (fmap pure lusr) [] where checkLocalMembership :: @@ -1055,7 +1055,7 @@ removeMemberFromRemoteConv cnv lusr victim handleSuccess _ = do t <- input pure . Just $ - Event MemberLeave (qUntagged cnv) (qUntagged lusr) t $ + Event (qUntagged cnv) (qUntagged lusr) t $ EdMembersLeave (QualifiedUserIdList [victim]) -- | Remove a member from a local conversation. @@ -1351,7 +1351,7 @@ isTyping lusr zcon lcnv typingData = do mm <- E.getLocalMembers (tUnqualified lcnv) unless (tUnqualified lusr `isMember` mm) . throw $ ConvNotFound now <- input - let e = Event Typing (qUntagged lcnv) (qUntagged lusr) now (EdTyping typingData) + let e = Event (qUntagged lcnv) (qUntagged lusr) now (EdTyping typingData) for_ (newPushLocal ListComplete (tUnqualified lusr) (ConvEvent e) (recipient <$> mm)) $ \p -> E.push1 $ p @@ -1433,7 +1433,6 @@ addBot lusr zcon b = do bm <- E.createBotMember (b ^. addBotService) (b ^. addBotId) (b ^. addBotConv) let e = Event - MemberJoin (qUntagged (qualifyAs lusr (b ^. addBotConv))) (qUntagged lusr) t @@ -1509,7 +1508,7 @@ rmBot lusr zcon b = do t <- input do let evd = EdMembersLeave (QualifiedUserIdList [qUntagged (qualifyAs lusr (botUserId (b ^. rmBotId)))]) - let e = Event MemberLeave (qUntagged lcnv) (qUntagged lusr) t evd + let e = Event (qUntagged lcnv) (qUntagged lusr) t evd for_ (newPushLocal ListComplete (tUnqualified lusr) (ConvEvent e) (recipient <$> users)) $ \p -> E.push1 $ p & pushConn .~ zcon E.deleteMembers (Data.convId c) (UserList [botUserId (b ^. rmBotId)] []) diff --git a/services/galley/src/Galley/API/Util.hs b/services/galley/src/Galley/API/Util.hs index b3e35326c5..e2871d3be7 100644 --- a/services/galley/src/Galley/API/Util.hs +++ b/services/galley/src/Galley/API/Util.hs @@ -302,7 +302,7 @@ memberJoinEvent :: [RemoteMember] -> Event memberJoinEvent lorig qconv t lmems rmems = - Event MemberJoin qconv (qUntagged lorig) t $ + Event qconv (qUntagged lorig) t $ EdMembersJoin (SimpleMembers (map localToSimple lmems <> map remoteToSimple rmems)) where localToSimple u = SimpleMember (qUntagged (qualifyAs lorig (lmId u))) (lmConvRoleName u) diff --git a/services/galley/test/integration/API.hs b/services/galley/test/integration/API.hs index a6405832a3..6074a97361 100644 --- a/services/galley/test/integration/API.hs +++ b/services/galley/test/integration/API.hs @@ -86,6 +86,7 @@ import TestSetup import Util.Options (Endpoint (Endpoint)) import Wire.API.Conversation import Wire.API.Conversation.Action +import Wire.API.Event.Conversation import Wire.API.Federation.API import qualified Wire.API.Federation.API.Brig as F import Wire.API.Federation.API.Galley diff --git a/services/galley/test/integration/API/Federation.hs b/services/galley/test/integration/API/Federation.hs index 21086153d5..3c1623ece2 100644 --- a/services/galley/test/integration/API/Federation.hs +++ b/services/galley/test/integration/API/Federation.hs @@ -72,6 +72,7 @@ import TestSetup import Wire.API.Conversation.Action (ConversationAction (..)) import Wire.API.Conversation.Member (Member (..)) import Wire.API.Conversation.Role +import Wire.API.Event.Conversation import Wire.API.Federation.API.Common import Wire.API.Federation.API.Galley (GetConversationsRequest (..), GetConversationsResponse (..), RemoteConvMembers (..), RemoteConversation (..)) import qualified Wire.API.Federation.API.Galley as FedGalley diff --git a/services/galley/test/integration/API/MessageTimer.hs b/services/galley/test/integration/API/MessageTimer.hs index 2339a993ab..f40e23dd53 100644 --- a/services/galley/test/integration/API/MessageTimer.hs +++ b/services/galley/test/integration/API/MessageTimer.hs @@ -46,6 +46,7 @@ import Test.Tasty.HUnit import TestHelpers import TestSetup import Wire.API.Conversation.Action +import Wire.API.Event.Conversation import qualified Wire.API.Federation.API.Galley as F import Wire.API.Federation.Component import qualified Wire.API.Team.Member as Member diff --git a/services/galley/test/integration/API/Roles.hs b/services/galley/test/integration/API/Roles.hs index 9da167a2c0..fda229a8e2 100644 --- a/services/galley/test/integration/API/Roles.hs +++ b/services/galley/test/integration/API/Roles.hs @@ -42,6 +42,7 @@ import Test.Tasty.HUnit import TestHelpers import TestSetup import Wire.API.Conversation.Action +import Wire.API.Event.Conversation import qualified Wire.API.Federation.API.Galley as F import Wire.API.Federation.Component diff --git a/services/galley/test/integration/API/Teams.hs b/services/galley/test/integration/API/Teams.hs index 0cd2a8d929..de2e59bd46 100644 --- a/services/galley/test/integration/API/Teams.hs +++ b/services/galley/test/integration/API/Teams.hs @@ -160,9 +160,8 @@ testCreateTeam = do eventChecks <- WS.awaitMatch timeout wsOwner $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= TeamCreate e ^. eventTeam @?= tid - e ^. eventData @?= Just (EdTeamCreate team) + e ^. eventData @?= EdTeamCreate team void $ WS.assertSuccess eventChecks testGetTeams :: TestM () @@ -237,9 +236,8 @@ testCreateTeamWithMembers = do checkCreateEvent team w = WS.assertMatch_ timeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= TeamCreate e ^. eventTeam @?= (team ^. teamId) - e ^. eventData @?= Just (EdTeamCreate team) + e ^. eventData @?= EdTeamCreate team testListTeamMembersDefaultLimit :: TestM () testListTeamMembersDefaultLimit = do @@ -1584,9 +1582,8 @@ testUpdateTeamMember = do checkTeamMemberUpdateEvent tid uid w mPerm = WS.assertMatch_ timeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= MemberUpdate e ^. eventTeam @?= tid - e ^. eventData @?= Just (EdMemberUpdate uid mPerm) + e ^. eventData @?= EdMemberUpdate uid mPerm testUpdateTeamStatus :: TestM () testUpdateTeamStatus = do @@ -1925,6 +1922,5 @@ checkJoinEvent :: (MonadIO m, MonadCatch m) => TeamId -> UserId -> WS.WebSocket checkJoinEvent tid usr w = WS.assertMatch_ timeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= MemberJoin e ^. eventTeam @?= tid - e ^. eventData @?= Just (EdMemberJoin usr) + e ^. eventData @?= EdMemberJoin usr diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index 1c644e37cc..e0d0af359a 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -109,7 +109,7 @@ import Web.Cookie import Wire.API.Conversation import qualified Wire.API.Conversation as Public import Wire.API.Conversation.Action -import Wire.API.Event.Conversation (_EdConversation, _EdMembersJoin, _EdMembersLeave) +import Wire.API.Event.Conversation import qualified Wire.API.Event.Team as TE import Wire.API.Federation.API import Wire.API.Federation.API.Galley @@ -1219,8 +1219,8 @@ getTeamQueue zusr msince msize onlyLast = (Error msg) -> error msg (Success (e :: TE.Event)) -> case e ^. TE.eventData of - Just (EdMemberJoin uid) -> uid - _ -> error ("bad even type: " <> show (e ^. TE.eventType)) + EdMemberJoin uid -> uid + _ -> error ("bad event type: " <> show (TE.eventType e)) getTeamQueue' :: HasCallStack => UserId -> Maybe NotificationId -> Maybe Int -> Bool -> TestM ResponseLBS getTeamQueue' zusr msince msize onlyLast = do @@ -1545,7 +1545,7 @@ decodeConvCode = responseJsonUnsafe decodeConvCodeEvent :: Response (Maybe Lazy.ByteString) -> ConversationCode decodeConvCodeEvent r = case responseJsonUnsafe r of - (Event ConvCodeUpdate _ _ _ (EdConvCodeUpdate c)) -> c + (Event _ _ _ (EdConvCodeUpdate c)) -> c _ -> error "Failed to parse ConversationCode from Event" decodeConvId :: HasCallStack => Response (Maybe Lazy.ByteString) -> ConvId @@ -2359,25 +2359,22 @@ checkTeamMemberJoin :: HasCallStack => TeamId -> UserId -> WS.WebSocket -> TestM checkTeamMemberJoin tid uid w = WS.awaitMatch_ checkTimeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= TE.MemberJoin e ^. eventTeam @?= tid - e ^. eventData @?= Just (EdMemberJoin uid) + e ^. eventData @?= EdMemberJoin uid checkTeamMemberLeave :: HasCallStack => TeamId -> UserId -> WS.WebSocket -> TestM () checkTeamMemberLeave tid usr w = WS.assertMatch_ checkTimeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= TE.MemberLeave e ^. eventTeam @?= tid - e ^. eventData @?= Just (EdMemberLeave usr) + e ^. eventData @?= EdMemberLeave usr checkTeamUpdateEvent :: (HasCallStack, MonadIO m, MonadCatch m) => TeamId -> TeamUpdateData -> WS.WebSocket -> m () checkTeamUpdateEvent tid upd w = WS.assertMatch_ checkTimeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= TE.TeamUpdate e ^. eventTeam @?= tid - e ^. eventData @?= Just (EdTeamUpdate upd) + e ^. eventData @?= EdTeamUpdate upd checkConvCreateEvent :: HasCallStack => ConvId -> WS.WebSocket -> TestM () checkConvCreateEvent cid w = WS.assertMatch_ checkTimeout w $ \notif -> do @@ -2411,9 +2408,8 @@ checkTeamDeleteEvent :: HasCallStack => TeamId -> WS.WebSocket -> TestM () checkTeamDeleteEvent tid w = WS.assertMatch_ checkTimeout w $ \notif -> do ntfTransient notif @?= False let e = List1.head (WS.unpackPayload notif) - e ^. eventType @?= TE.TeamDelete e ^. eventTeam @?= tid - e ^. eventData @?= Nothing + e ^. eventData @?= EdTeamDelete checkConvDeleteEvent :: HasCallStack => Qualified ConvId -> WS.WebSocket -> TestM () checkConvDeleteEvent cid w = WS.assertMatch_ checkTimeout w $ \notif -> do From dffa163c0422b068930f14c14f4fbcbf910be74e Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Thu, 3 Mar 2022 11:44:24 +0100 Subject: [PATCH 02/13] Brig: Servantify `POST /register` and `POST /i/users` endpoint (#2121) Noteworthy things: - I servantified `POST /i/users` because it had pretty much the same API and was using the same types. - While registering a user into a team, if the team has legal hold, the user can only be added if the fanoutLimit has not been reached. This check happens in galley, which generates a `Wai.Error`, brig just throws this error and so isn't aware of internals. This kind of error cannot be transformed into and `ErrorDescription`. So, for now (until galley's internal API is servantiified), brig throws this error using `throwM`, this error gets caught and handled by the `Handler` monad when it executes requests. This is of course not ideal. But hopefully we get to servantify Galley's internal endpoints and we can get rid of this hack. - The parser for `NewUser` is fairly complex some fields depend on other fields. To help with this, I created `NewUserRaw` which just parses individual fields. The schema for `NewUser` type uses `withParser` to do the validation and make composite fields. - Remove ToJSON/FromJSON for UserIdentity, use Schema for User. The ToJSON for UserIdentity encoded nulls, but every other object which used it didn't encode nulls. So, it was better to remove it. Co-authored-by: Matthias Fischmann --- changelog.d/5-internal/servantify-register | 1 + libs/wire-api/package.yaml | 1 + .../wire-api/src/Wire/API/ErrorDescription.hs | 26 + .../src/Wire/API/Routes/Internal/Brig.hs | 33 +- libs/wire-api/src/Wire/API/Routes/Named.hs | 6 + .../src/Wire/API/Routes/Public/Brig.hs | 19 + libs/wire-api/src/Wire/API/Swagger.hs | 2 - libs/wire-api/src/Wire/API/Team.hs | 44 +- libs/wire-api/src/Wire/API/User.hs | 500 ++++++++++-------- libs/wire-api/src/Wire/API/User/Activation.hs | 7 +- libs/wire-api/src/Wire/API/User/Identity.hs | 71 +-- libs/wire-api/src/Wire/API/User/Orphans.hs | 4 + libs/wire-api/src/Wire/API/User/Profile.hs | 21 +- .../golden/Test/Wire/API/Golden/Generated.hs | 3 - .../Golden/Generated/AccessRoleLegacy_user.hs | 1 + .../API/Golden/Generated/UserIdentity_user.hs | 137 ----- .../testObject_UserIdentity_user_1.json | 5 - .../testObject_UserIdentity_user_10.json | 5 - .../testObject_UserIdentity_user_11.json | 5 - .../testObject_UserIdentity_user_12.json | 5 - .../testObject_UserIdentity_user_13.json | 5 - .../testObject_UserIdentity_user_14.json | 5 - .../testObject_UserIdentity_user_15.json | 5 - .../testObject_UserIdentity_user_17.json | 7 - .../testObject_UserIdentity_user_18.json | 5 - .../testObject_UserIdentity_user_19.json | 5 - .../testObject_UserIdentity_user_2.json | 5 - .../testObject_UserIdentity_user_20.json | 5 - .../testObject_UserIdentity_user_3.json | 5 - .../testObject_UserIdentity_user_4.json | 5 - .../testObject_UserIdentity_user_6.json | 5 - .../testObject_UserIdentity_user_7.json | 5 - .../testObject_UserIdentity_user_9.json | 5 - .../test/unit/Test/Wire/API/Conversation.hs | 2 +- .../unit/Test/Wire/API/Roundtrip/Aeson.hs | 1 - libs/wire-api/test/unit/Test/Wire/API/User.hs | 25 +- libs/wire-api/wire-api.cabal | 2 +- services/brig/src/Brig/API/Error.hs | 40 +- services/brig/src/Brig/API/Handler.hs | 34 +- services/brig/src/Brig/API/Internal.hs | 36 +- services/brig/src/Brig/API/Public.hs | 73 +-- services/brig/src/Brig/API/User.hs | 91 ++-- services/brig/src/Brig/Data/Activation.hs | 17 +- services/brig/src/Brig/Provider/API.hs | 6 +- services/brig/src/Brig/Team/API.hs | 10 +- services/brig/src/Brig/User/API/Auth.hs | 2 +- services/brig/src/Brig/User/Auth/Cookie.hs | 33 +- .../brig/test/integration/API/User/Account.hs | 64 ++- .../src/V58_ConversationAccessRoleV2.hs | 2 +- .../schema/src/V59_FileSharingLockStatus.hs | 2 +- services/galley/src/Galley/API/Teams.hs | 12 + services/galley/src/Galley/Intra/User.hs | 7 +- 52 files changed, 660 insertions(+), 762 deletions(-) create mode 100644 changelog.d/5-internal/servantify-register delete mode 100644 libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_1.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_10.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_11.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_12.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_13.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_14.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_15.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_17.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_18.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_19.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_2.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_20.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_3.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_4.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_6.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_7.json delete mode 100644 libs/wire-api/test/golden/testObject_UserIdentity_user_9.json diff --git a/changelog.d/5-internal/servantify-register b/changelog.d/5-internal/servantify-register new file mode 100644 index 0000000000..f2c8d856df --- /dev/null +++ b/changelog.d/5-internal/servantify-register @@ -0,0 +1 @@ +Servantify `POST /register` and `POST /i/users` endpoints \ No newline at end of file diff --git a/libs/wire-api/package.yaml b/libs/wire-api/package.yaml index 02215683ab..2620d9b381 100644 --- a/libs/wire-api/package.yaml +++ b/libs/wire-api/package.yaml @@ -123,6 +123,7 @@ tests: - pretty - proto-lens - QuickCheck + - schema-profunctor - string-conversions - swagger2 - tasty diff --git a/libs/wire-api/src/Wire/API/ErrorDescription.hs b/libs/wire-api/src/Wire/API/ErrorDescription.hs index 49870a480f..73301bda8e 100644 --- a/libs/wire-api/src/Wire/API/ErrorDescription.hs +++ b/libs/wire-api/src/Wire/API/ErrorDescription.hs @@ -387,3 +387,29 @@ type MLSIdentityMismatch = 403 "mls-identity-mismatch" "Prekey credential does not match qualified client ID" + +type WhitelistError = ErrorDescription 403 "unauthorized" "Unauthorized e-mail address or phone number." + +type InvalidInvitationCode = ErrorDescription 400 "invalid-invitation-code" "Invalid invitation code." + +type MissingIdentity = ErrorDescription 403 "missing-identity" "Using an invitation code requires registering the given email and/or phone." + +type BlacklistedEmail = + ErrorDescription + 403 + "blacklisted-email" + "The given e-mail address has been blacklisted due to a permanent bounce \ + \or a complaint." + +type InvalidEmail = ErrorDescription 400 "invalid-email" "Invalid e-mail address." + +type InvalidActivationCode msg = ErrorDescription 404 "invalid-code" msg + +type InvalidActivationCodeWrongUser = InvalidActivationCode "User does not exist." + +type InvalidActivationCodeWrongCode = InvalidActivationCode "Invalid activation code" + +type TooManyTeamMembers = ErrorDescription 403 "too-many-team-members" "Too many members in this team." + +-- | docs/reference/user/registration.md {#RefRestrictRegistration}. +type UserCreationRestricted = ErrorDescription 403 "user-creation-restricted" "This instance does not allow creation of personal users or teams." diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs index 8665d12ca7..e8747fb173 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs @@ -17,6 +17,8 @@ module Wire.API.Routes.Internal.Brig ( API, + EJPD_API, + AccountAPI, EJPDRequest, GetAccountFeatureConfig, PutAccountFeatureConfig, @@ -39,7 +41,10 @@ import Servant.Swagger.UI import Wire.API.Connection import Wire.API.Routes.Internal.Brig.Connection import Wire.API.Routes.Internal.Brig.EJPD +import Wire.API.Routes.MultiVerb +import Wire.API.Routes.Named import qualified Wire.API.Team.Feature as ApiFt +import Wire.API.User type EJPDRequest = Summary @@ -109,15 +114,29 @@ type GetAllConnections = :> ReqBody '[Servant.JSON] ConnectionsStatusRequestV2 :> Post '[Servant.JSON] [ConnectionStatusV2] +type EJPD_API = + ( EJPDRequest + :<|> GetAccountFeatureConfig + :<|> PutAccountFeatureConfig + :<|> DeleteAccountFeatureConfig + :<|> GetAllConnectionsUnqualified + :<|> GetAllConnections + ) + +type AccountAPI = + -- This endpoint can lead to the following events being sent: + -- - UserActivated event to created user, if it is a team invitation or user has an SSO ID + -- - UserIdentityUpdated event to created user, if email or phone get activated + Named + "createUserNoVerify" + ( "users" + :> ReqBody '[Servant.JSON] NewUser + :> MultiVerb 'POST '[Servant.JSON] RegisterInternalResponses (Either RegisterError SelfProfile) + ) + type API = "i" - :> ( EJPDRequest - :<|> GetAccountFeatureConfig - :<|> PutAccountFeatureConfig - :<|> DeleteAccountFeatureConfig - :<|> GetAllConnectionsUnqualified - :<|> GetAllConnections - ) + :> (EJPD_API :<|> AccountAPI) type SwaggerDocsAPI = "api" :> "internal" :> SwaggerSchemaUI "swagger-ui" "swagger.json" diff --git a/libs/wire-api/src/Wire/API/Routes/Named.hs b/libs/wire-api/src/Wire/API/Routes/Named.hs index 9688ef75f1..4e132b7f76 100644 --- a/libs/wire-api/src/Wire/API/Routes/Named.hs +++ b/libs/wire-api/src/Wire/API/Routes/Named.hs @@ -22,6 +22,7 @@ import Data.Proxy import GHC.TypeLits import Imports import Servant +import Servant.Client import Servant.Swagger newtype Named named x = Named {unnamed :: x} @@ -40,6 +41,11 @@ instance HasServer api ctx => HasServer (Named name api) ctx where instance RoutesToPaths api => RoutesToPaths (Named name api) where getRoutes = getRoutes @api +instance HasClient m api => HasClient m (Named n api) where + type Client m (Named n api) = Client m api + clientWithRoute pm _ req = clientWithRoute pm (Proxy @api) req + hoistClientMonad pm _ f = hoistClientMonad pm (Proxy @api) f + type family FindName n (api :: *) :: (n, *) where FindName n (Named name api) = '(name, api) FindName n (x :> api) = AddPrefix x (FindName n api) diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs index 9181305a43..83463b2133 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs @@ -312,6 +312,24 @@ type SelfAPI = :> MultiVerb 'PUT '[JSON] ChangeHandleResponses (Maybe ChangeHandleError) ) +type AccountAPI = + -- docs/reference/user/registration.md {#RefRegistration} + -- + -- This endpoint can lead to the following events being sent: + -- - UserActivated event to created user, if it is a team invitation or user has an SSO ID + -- - UserIdentityUpdated event to created user, if email code or phone code is provided + Named + "register" + ( Summary "Register a new user." + :> Description + "If the environment where the registration takes \ + \place is private and a registered email address or phone \ + \number is not whitelisted, a 403 error is returned." + :> "register" + :> ReqBody '[JSON] NewUserPublic + :> MultiVerb 'POST '[JSON] RegisterResponses (Either RegisterError RegisterSuccess) + ) + type PrekeyAPI = Named "get-users-prekeys-client-unqualified" @@ -714,6 +732,7 @@ type MLSAPI = LiftNamed (ZLocalUser :> "mls" :> MLSKeyPackageAPI) type BrigAPI = UserAPI :<|> SelfAPI + :<|> AccountAPI :<|> ClientAPI :<|> PrekeyAPI :<|> UserClientAPI diff --git a/libs/wire-api/src/Wire/API/Swagger.hs b/libs/wire-api/src/Wire/API/Swagger.hs index 4fbc4ed77c..89cfe1f3f4 100644 --- a/libs/wire-api/src/Wire/API/Swagger.hs +++ b/libs/wire-api/src/Wire/API/Swagger.hs @@ -113,7 +113,6 @@ models = Push.Token.modelPushTokenList, Team.modelTeam, Team.modelTeamList, - Team.modelNewBindingTeam, Team.modelNewNonBindingTeam, Team.modelUpdateData, Team.modelTeamDelete, @@ -141,7 +140,6 @@ models = Team.SearchVisibility.modelTeamSearchVisibility, User.modelUserIdList, User.modelUser, - User.modelNewUser, User.modelEmailUpdate, User.modelDelete, User.modelVerifyDelete, diff --git a/libs/wire-api/src/Wire/API/Team.hs b/libs/wire-api/src/Wire/API/Team.hs index 5b3563e181..8fb331559c 100644 --- a/libs/wire-api/src/Wire/API/Team.hs +++ b/libs/wire-api/src/Wire/API/Team.hs @@ -39,6 +39,7 @@ module Wire.API.Team -- * NewTeam BindingNewTeam (..), + bindingNewTeamObjectSchema, NonBindingNewTeam (..), NewTeam (..), newNewTeam, @@ -62,7 +63,6 @@ module Wire.API.Team -- * Swagger modelTeam, modelTeamList, - modelNewBindingTeam, modelNewNonBindingTeam, modelUpdateData, modelTeamDelete, @@ -181,24 +181,14 @@ newtype BindingNewTeam = BindingNewTeam (NewTeam ()) deriving stock (Eq, Show, Generic) deriving (ToJSON, FromJSON, S.ToSchema) via (Schema BindingNewTeam) -modelNewBindingTeam :: Doc.Model -modelNewBindingTeam = Doc.defineModel "NewBindingTeam" $ do - Doc.description "Required data when creating new teams" - Doc.property "name" Doc.string' $ - Doc.description "team name" - Doc.property "icon" Doc.string' $ - Doc.description "team icon (asset ID)" - Doc.property "icon_key" Doc.string' $ do - Doc.description "team icon asset key" - Doc.optional - instance ToSchema BindingNewTeam where - schema = BindingNewTeam <$> unwrap .= newTeamSchema "BindingNewTeam" sch - where - unwrap (BindingNewTeam nt) = nt + schema = object "BindingNewTeam" bindingNewTeamObjectSchema - sch :: ValueSchema SwaggerDoc () - sch = null_ +bindingNewTeamObjectSchema :: ObjectSchema SwaggerDoc BindingNewTeam +bindingNewTeamObjectSchema = + BindingNewTeam <$> unwrap .= newTeamObjectSchema null_ + where + unwrap (BindingNewTeam nt) = nt -- FUTUREWORK: since new team members do not get serialized, we zero them here. -- it may be worth looking into how this can be solved in the types. @@ -214,7 +204,10 @@ newtype NonBindingNewTeam = NonBindingNewTeam (NewTeam (Range 1 127 [TeamMember] deriving (FromJSON, ToJSON, S.ToSchema) via (Schema NonBindingNewTeam) instance ToSchema NonBindingNewTeam where - schema = NonBindingNewTeam <$> unwrap .= newTeamSchema "NonBindingNewTeam" sch + schema = + object "NonBindingNewTeam" $ + NonBindingNewTeam + <$> unwrap .= newTeamObjectSchema sch where unwrap (NonBindingNewTeam nt) = nt @@ -247,14 +240,13 @@ data NewTeam a = NewTeam newNewTeam :: Range 1 256 Text -> Range 1 256 Text -> NewTeam a newNewTeam nme ico = NewTeam nme ico Nothing Nothing -newTeamSchema :: HasSchemaRef d => Text -> ValueSchema d a -> ValueSchema NamedSwaggerDoc (NewTeam a) -newTeamSchema name sch = - object name $ - NewTeam - <$> _newTeamName .= field "name" schema - <*> _newTeamIcon .= field "icon" schema - <*> _newTeamIconKey .= maybe_ (optField "icon_key" schema) - <*> _newTeamMembers .= maybe_ (optField "members" sch) +newTeamObjectSchema :: ValueSchema SwaggerDoc a -> ObjectSchema SwaggerDoc (NewTeam a) +newTeamObjectSchema sch = + NewTeam + <$> _newTeamName .= field "name" schema + <*> _newTeamIcon .= field "icon" schema + <*> _newTeamIconKey .= maybe_ (optField "icon_key" schema) + <*> _newTeamMembers .= maybe_ (optField "members" sch) -------------------------------------------------------------------------------- -- TeamUpdateData diff --git a/libs/wire-api/src/Wire/API/User.hs b/libs/wire-api/src/Wire/API/User.hs index f097607fd7..148fd4a702 100644 --- a/libs/wire-api/src/Wire/API/User.hs +++ b/libs/wire-api/src/Wire/API/User.hs @@ -37,6 +37,10 @@ module Wire.API.User -- * NewUser NewUserPublic (..), + RegisterError (..), + RegisterSuccess (..), + RegisterResponses, + RegisterInternalResponses, NewUser (..), emptyNewUser, ExpiresIn, @@ -83,9 +87,6 @@ module Wire.API.User -- * List Users ListUsersQuery (..), - -- * helpers - parseIdentity, - -- * re-exports module Wire.API.User.Identity, module Wire.API.User.Profile, @@ -93,7 +94,6 @@ module Wire.API.User -- * Swagger modelDelete, modelEmailUpdate, - modelNewUser, modelUser, modelUserIdList, modelVerifyDelete, @@ -107,9 +107,8 @@ where import Control.Applicative import Control.Error.Safe (rightMay) -import Control.Lens (over, view, (.~), (?~)) +import Control.Lens (over, (.~), (?~)) import Data.Aeson (FromJSON (..), ToJSON (..)) -import qualified Data.Aeson.KeyMap as KeyMap import qualified Data.Aeson.Types as A import Data.ByteString.Conversion import qualified Data.CaseInsensitive as CI @@ -121,7 +120,6 @@ import qualified Data.HashMap.Strict.InsOrd as InsOrdHashMap import Data.Id import Data.Json.Util (UTCTimeMillis, (#)) import Data.LegalHold (UserLegalHoldStatus) -import qualified Data.List as List import Data.Misc (PlainTextPassword (..)) import Data.Qualified import Data.Range @@ -139,11 +137,12 @@ import Imports import qualified SAML2.WebSSO as SAML import Servant (type (.++)) import qualified Test.QuickCheck as QC +import qualified Web.Cookie as Web import Wire.API.Arbitrary (Arbitrary (arbitrary), GenericUniform (..)) import Wire.API.ErrorDescription import Wire.API.Provider.Service (ServiceRef, modelServiceRef) import Wire.API.Routes.MultiVerb -import Wire.API.Team (BindingNewTeam (BindingNewTeam), NewTeam (..), modelNewBindingTeam) +import Wire.API.Team (BindingNewTeam, bindingNewTeamObjectSchema) import Wire.API.User.Activation (ActivationCode) import Wire.API.User.Auth (CookieLabel) import Wire.API.User.Identity @@ -338,77 +337,28 @@ data User = User } deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform User) + deriving (ToJSON, FromJSON, S.ToSchema) via (Schema User) --- Cannot use deriving (ToSchema) via (CustomSwagger ...) because we need to --- mark 'deleted' as optional, but it is not a 'Maybe' --- and we need to manually add the identity schema fields at the top level --- instead of nesting them under the 'identity' field. -instance S.ToSchema User where - declareNamedSchema _ = do - identityProperties <- view (S.schema . S.properties) <$> S.declareNamedSchema (Proxy @UserIdentity) - genericSchema <- - S.genericDeclareNamedSchema - ( swaggerOptions - @'[ FieldLabelModifier - ( StripPrefix "user", - CamelToSnake, - LabelMappings - '[ "pict" ':-> "picture", - "expire" ':-> "expires_at", - "display_name" ':-> "name" - ] - ) - ] - ) - (Proxy @User) - pure $ - genericSchema - & over (S.schema . S.required) (List.delete "deleted") - -- The UserIdentity fields need to be flat-included, not be in a sub-object - & over (S.schema . S.properties) (InsOrdHashMap.delete "identity") - & over (S.schema . S.properties) (InsOrdHashMap.union identityProperties) - --- FUTUREWORK: --- disentangle json serializations for 'User', 'NewUser', 'UserIdentity', 'NewUserOrigin'. -instance ToJSON User where - toJSON u = - A.object $ - "id" A..= userId u - # "qualified_id" A..= userQualifiedId u - # "name" A..= userDisplayName u - # "picture" A..= userPict u - # "assets" A..= userAssets u - # "email" A..= userEmail u - # "phone" A..= userPhone u - # "accent_id" A..= userAccentId u - # "deleted" A..= (if userDeleted u then Just True else Nothing) - # "locale" A..= userLocale u - # "service" A..= userService u - # "handle" A..= userHandle u - # "expires_at" A..= userExpire u - # "team" A..= userTeam u - # "sso_id" A..= userSSOId u - # "managed_by" A..= userManagedBy u - # [] - -instance FromJSON User where - parseJSON = A.withObject "user" $ \o -> do - ssoid <- o A..:? "sso_id" - User - <$> o A..: "id" - <*> o A..: "qualified_id" - <*> parseIdentity ssoid o - <*> o A..: "name" - <*> o A..:? "picture" A..!= noPict - <*> o A..:? "assets" A..!= [] - <*> o A..: "accent_id" - <*> o A..:? "deleted" A..!= False - <*> o A..: "locale" - <*> o A..:? "service" - <*> o A..:? "handle" - <*> o A..:? "expires_at" - <*> o A..:? "team" - <*> o A..:? "managed_by" A..!= ManagedByWire +-- -- FUTUREWORK: +-- -- disentangle json serializations for 'User', 'NewUser', 'UserIdentity', 'NewUserOrigin'. +instance ToSchema User where + schema = + object "User" $ + User + <$> userId .= field "id" schema + <*> userQualifiedId .= field "qualified_id" schema + <*> userIdentity .= maybeUserIdentityObjectSchema + <*> userDisplayName .= field "name" schema + <*> userPict .= (fromMaybe noPict <$> optField "picture" schema) + <*> userAssets .= (fromMaybe [] <$> optField "assets" (array schema)) + <*> userAccentId .= field "accent_id" schema + <*> (fromMaybe False <$> (\u -> if userDeleted u then Just True else Nothing) .= maybe_ (optField "deleted" schema)) + <*> userLocale .= field "locale" schema + <*> userService .= maybe_ (optField "service" schema) + <*> userHandle .= maybe_ (optField "handle" schema) + <*> userExpire .= maybe_ (optField "expires_at" schema) + <*> userTeam .= maybe_ (optField "team" schema) + <*> userManagedBy .= (fromMaybe ManagedByWire <$> optField "managed_by" schema) userEmail :: User -> Maybe Email userEmail = emailIdentity <=< userIdentity @@ -502,56 +452,13 @@ publicProfile u legalHoldStatus = -- SCIM-managed user) newtype NewUserPublic = NewUserPublic NewUser deriving stock (Eq, Show, Generic) - deriving newtype (ToJSON) + deriving (ToJSON, FromJSON, S.ToSchema) via (Schema NewUserPublic) -modelNewUser :: Doc.Model -modelNewUser = Doc.defineModel "NewUser" $ do - Doc.description "New User Data" - Doc.property "name" Doc.string' $ - Doc.description "Name (1 - 128 characters)" - Doc.property "email" Doc.string' $ do - Doc.description "Email address" - Doc.optional - Doc.property "password" Doc.string' $ do - Doc.description "Password (6 - 1024 characters)" - Doc.optional - Doc.property "assets" (Doc.array (Doc.ref modelAsset)) $ do - Doc.description "Profile assets" - Doc.optional - Doc.property "phone" Doc.string' $ do - Doc.description "E.164 phone number" - Doc.optional - Doc.property "accent_id" Doc.int32' $ do - Doc.description "Accent colour ID" - Doc.optional - Doc.property "email_code" Doc.bytes' $ do - Doc.description "Email activation code" - Doc.optional - Doc.property "phone_code" Doc.bytes' $ do - Doc.description "Phone activation code" - Doc.optional - Doc.property "invitation_code" Doc.bytes' $ do - Doc.description "Invitation code. Mutually exclusive with team|team_code" - Doc.optional - Doc.property "locale" Doc.string' $ do - Doc.description "Locale in format." - Doc.optional - Doc.property "label" Doc.string' $ do - Doc.description - "An optional label to associate with the access cookie, \ - \if one is granted during account creation." - Doc.optional - Doc.property "team_code" Doc.string' $ do - Doc.description "Team invitation code. Mutually exclusive with team|invitation_code" - Doc.optional - Doc.property "team" (Doc.ref modelNewBindingTeam) $ do - Doc.description "New team information. Mutually exclusive with team_code|invitation_code" - Doc.optional - -instance FromJSON NewUserPublic where - parseJSON val = do - nu <- parseJSON val - either fail pure $ validateNewUserPublic nu +instance ToSchema NewUserPublic where + schema = + unwrap .= withParser schema (either fail pure . validateNewUserPublic) + where + unwrap (NewUserPublic nu) = nu validateNewUserPublic :: NewUser -> Either String NewUserPublic validateNewUserPublic nu @@ -586,6 +493,75 @@ isNewUserTeamMember u = case newUserTeam u of instance Arbitrary NewUserPublic where arbitrary = arbitrary `QC.suchThatMap` (rightMay . validateNewUserPublic) +data RegisterError + = RegisterErrorWhitelistError + | RegisterErrorInvalidInvitationCode + | RegisterErrorMissingIdentity + | RegisterErrorUserKeyExists + | RegisterErrorInvalidActivationCodeWrongUser + | RegisterErrorInvalidActivationCodeWrongCode + | RegisterErrorInvalidEmail + | RegisterErrorInvalidPhone + | RegisterErrorBlacklistedPhone + | RegisterErrorBlacklistedEmail + | RegisterErrorTooManyTeamMembers + | RegisterErrorUserCreationRestricted + deriving (Generic) + deriving (AsUnion RegisterErrorResponses) via GenericAsUnion RegisterErrorResponses RegisterError + +instance GSOP.Generic RegisterError + +type RegisterErrorResponses = + '[ WhitelistError, + InvalidInvitationCode, + MissingIdentity, + UserKeyExists, + InvalidActivationCodeWrongUser, + InvalidActivationCodeWrongCode, + InvalidEmail, + InvalidPhone, + BlacklistedPhone, + BlacklistedEmail, + TooManyTeamMembers, + UserCreationRestricted + ] + +type RegisterResponses = + RegisterErrorResponses + .++ '[ WithHeaders + '[ DescHeader "Set-Cookie" "Cookie" Web.SetCookie, + DescHeader "Location" "UserId" UserId + ] + RegisterSuccess + (Respond 201 "User created and pending activation" SelfProfile) + ] + +instance AsHeaders '[Web.SetCookie, UserId] SelfProfile RegisterSuccess where + fromHeaders (I cookie :* (_ :* Nil), sp) = RegisterSuccess cookie sp + toHeaders (RegisterSuccess cookie sp) = (I cookie :* (I (userId (selfUser sp)) :* Nil), sp) + +data RegisterSuccess = RegisterSuccess Web.SetCookie SelfProfile + +instance (res ~ RegisterResponses) => AsUnion res (Either RegisterError RegisterSuccess) where + toUnion = eitherToUnion (toUnion @RegisterErrorResponses) (Z . I) + fromUnion = eitherFromUnion (fromUnion @RegisterErrorResponses) (unI . unZ) + +type RegisterInternalResponses = + RegisterErrorResponses + .++ '[ WithHeaders + '[DescHeader "Location" "UserId" UserId] + SelfProfile + (Respond 201 "User created and pending activation" SelfProfile) + ] + +instance AsHeaders '[UserId] SelfProfile SelfProfile where + fromHeaders (_ :* Nil, sp) = sp + toHeaders sp = (I (userId (selfUser sp)) :* Nil, sp) + +instance (res ~ RegisterInternalResponses) => AsUnion res (Either RegisterError SelfProfile) where + toUnion = eitherToUnion (toUnion @RegisterErrorResponses) (Z . I) + fromUnion = eitherFromUnion (fromUnion @RegisterErrorResponses) (unI . unZ) + data NewUser = NewUser { newUserDisplayName :: Name, -- | use this as 'UserId' (if 'Nothing', call 'Data.UUID.nextRandom'). @@ -605,6 +581,7 @@ data NewUser = NewUser newUserManagedBy :: Maybe ManagedBy } deriving stock (Eq, Show, Generic) + deriving (ToJSON, FromJSON, S.ToSchema) via (Schema NewUser) emptyNewUser :: Name -> NewUser emptyNewUser name = @@ -628,47 +605,112 @@ emptyNewUser name = -- | 1 second - 1 week type ExpiresIn = Range 1 604800 Integer -instance ToJSON NewUser where - toJSON u = - A.object $ - "name" A..= newUserDisplayName u - # "uuid" A..= newUserUUID u - # "email" A..= newUserEmail u - # "email_code" A..= newUserEmailCode u - # "picture" A..= newUserPict u - # "assets" A..= newUserAssets u - # "phone" A..= newUserPhone u - # "phone_code" A..= newUserPhoneCode u - # "accent_id" A..= newUserAccentId u - # "label" A..= newUserLabel u - # "locale" A..= newUserLocale u - # "password" A..= newUserPassword u - # "expires_in" A..= newUserExpiresIn u - # "sso_id" A..= newUserSSOId u - # "managed_by" A..= newUserManagedBy u - # maybe [] jsonNewUserOrigin (newUserOrigin u) - -instance FromJSON NewUser where - parseJSON = A.withObject "new-user" $ \o -> do - ssoid <- o A..:? "sso_id" - newUserDisplayName <- o A..: "name" - newUserUUID <- o A..:? "uuid" - newUserIdentity <- parseIdentity ssoid o - newUserPict <- o A..:? "picture" - newUserAssets <- o A..:? "assets" A..!= [] - newUserAccentId <- o A..:? "accent_id" - newUserEmailCode <- o A..:? "email_code" - newUserPhoneCode <- o A..:? "phone_code" - newUserLabel <- o A..:? "label" - newUserLocale <- o A..:? "locale" - newUserPassword <- o A..:? "password" - newUserOrigin <- parseNewUserOrigin newUserPassword newUserIdentity ssoid o - newUserExpires <- o A..:? "expires_in" - newUserExpiresIn <- case (newUserExpires, newUserIdentity) of +-- | Raw representation of 'NewUser' to help with writing Schema instances. +data NewUserRaw = NewUserRaw + { newUserRawDisplayName :: Name, + newUserRawUUID :: Maybe UUID, + newUserRawEmail :: Maybe Email, + newUserRawPhone :: Maybe Phone, + newUserRawSSOId :: Maybe UserSSOId, + -- | DEPRECATED + newUserRawPict :: Maybe Pict, + newUserRawAssets :: [Asset], + newUserRawAccentId :: Maybe ColourId, + newUserRawEmailCode :: Maybe ActivationCode, + newUserRawPhoneCode :: Maybe ActivationCode, + newUserRawInvitationCode :: Maybe InvitationCode, + newUserRawTeamCode :: Maybe InvitationCode, + newUserRawTeam :: Maybe BindingNewTeamUser, + newUserRawTeamId :: Maybe TeamId, + newUserRawLabel :: Maybe CookieLabel, + newUserRawLocale :: Maybe Locale, + newUserRawPassword :: Maybe PlainTextPassword, + newUserRawExpiresIn :: Maybe ExpiresIn, + newUserRawManagedBy :: Maybe ManagedBy + } + +newUserRawObjectSchema :: ObjectSchema SwaggerDoc NewUserRaw +newUserRawObjectSchema = + NewUserRaw + <$> newUserRawDisplayName .= field "name" schema + <*> newUserRawUUID .= maybe_ (optField "uuid" genericToSchema) + <*> newUserRawEmail .= maybe_ (optField "email" schema) + <*> newUserRawPhone .= maybe_ (optField "phone" schema) + <*> newUserRawSSOId .= maybe_ (optField "sso_id" genericToSchema) + <*> newUserRawPict .= maybe_ (optField "picture" schema) + <*> newUserRawAssets .= (fromMaybe [] <$> optField "assets" (array schema)) + <*> newUserRawAccentId .= maybe_ (optField "accent_id" schema) + <*> newUserRawEmailCode .= maybe_ (optField "email_code" schema) + <*> newUserRawPhoneCode .= maybe_ (optField "phone_code" schema) + <*> newUserRawInvitationCode .= maybe_ (optField "invitation_code" schema) + <*> newUserRawTeamCode .= maybe_ (optField "team_code" schema) + <*> newUserRawTeam .= maybe_ (optField "team" schema) + <*> newUserRawTeamId .= maybe_ (optField "team_id" schema) + <*> newUserRawLabel .= maybe_ (optField "label" schema) + <*> newUserRawLocale .= maybe_ (optField "locale" schema) + <*> newUserRawPassword .= maybe_ (optField "password" schema) + <*> newUserRawExpiresIn .= maybe_ (optField "expires_in" schema) + <*> newUserRawManagedBy .= maybe_ (optField "managed_by" schema) + +instance ToSchema NewUser where + schema = + object "NewUser" $ newUserToRaw .= withParser newUserRawObjectSchema newUserFromRaw + +newUserToRaw :: NewUser -> NewUserRaw +newUserToRaw NewUser {..} = + let maybeOriginNTU = newUserOriginNewTeamUser =<< newUserOrigin + in NewUserRaw + { newUserRawDisplayName = newUserDisplayName, + newUserRawUUID = newUserUUID, + newUserRawEmail = emailIdentity =<< newUserIdentity, + newUserRawPhone = phoneIdentity =<< newUserIdentity, + newUserRawSSOId = ssoIdentity =<< newUserIdentity, + newUserRawPict = newUserPict, + newUserRawAssets = newUserAssets, + newUserRawAccentId = newUserAccentId, + newUserRawEmailCode = newUserEmailCode, + newUserRawPhoneCode = newUserPhoneCode, + newUserRawInvitationCode = newUserOriginInvitationCode =<< newUserOrigin, + newUserRawTeamCode = newTeamUserCode =<< maybeOriginNTU, + newUserRawTeam = newTeamUserCreator =<< maybeOriginNTU, + newUserRawTeamId = newTeamUserTeamId =<< maybeOriginNTU, + newUserRawLabel = newUserLabel, + newUserRawLocale = newUserLocale, + newUserRawPassword = newUserPassword, + newUserRawExpiresIn = newUserExpiresIn, + newUserRawManagedBy = newUserManagedBy + } + +newUserFromRaw :: NewUserRaw -> A.Parser NewUser +newUserFromRaw NewUserRaw {..} = do + origin <- + either fail pure $ + maybeNewUserOriginFromComponents + (isJust newUserRawPassword) + (isJust newUserRawSSOId) + (newUserRawInvitationCode, newUserRawTeamCode, newUserRawTeam, newUserRawTeamId) + let identity = maybeUserIdentityFromComponents (newUserRawEmail, newUserRawPhone, newUserRawSSOId) + expiresIn <- + case (newUserRawExpiresIn, identity) of (Just _, Just _) -> fail "Only users without an identity can expire" - _ -> return newUserExpires - newUserManagedBy <- o A..:? "managed_by" - return NewUser {..} + _ -> pure newUserRawExpiresIn + pure $ + NewUser + { newUserDisplayName = newUserRawDisplayName, + newUserUUID = newUserRawUUID, + newUserIdentity = identity, + newUserPict = newUserRawPict, + newUserAssets = newUserRawAssets, + newUserAccentId = newUserRawAccentId, + newUserEmailCode = newUserRawEmailCode, + newUserPhoneCode = newUserRawPhoneCode, + newUserOrigin = origin, + newUserLabel = newUserRawLabel, + newUserLocale = newUserRawLocale, + newUserPassword = newUserRawPassword, + newUserExpiresIn = expiresIn, + newUserManagedBy = newUserRawManagedBy + } -- FUTUREWORK: align more with FromJSON instance? instance Arbitrary NewUser where @@ -739,56 +781,46 @@ data NewUserOrigin deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform NewUserOrigin) -jsonNewUserOrigin :: NewUserOrigin -> [A.Pair] -jsonNewUserOrigin = \case - NewUserOriginInvitationCode inv -> ["invitation_code" A..= inv] - NewUserOriginTeamUser (NewTeamMember tc) -> ["team_code" A..= tc] - NewUserOriginTeamUser (NewTeamCreator team) -> ["team" A..= team] - NewUserOriginTeamUser (NewTeamMemberSSO ti) -> ["team_id" A..= ti] - -parseNewUserOrigin :: - Maybe PlainTextPassword -> - Maybe UserIdentity -> - Maybe UserSSOId -> - A.Object -> - A.Parser (Maybe NewUserOrigin) -parseNewUserOrigin pass uid ssoid o = do - invcode <- o A..:? "invitation_code" - teamcode <- o A..:? "team_code" - team <- o A..:? "team" - teamid <- o A..:? "team_id" - result <- case (invcode, teamcode, team, ssoid, teamid) of - (Just a, Nothing, Nothing, Nothing, Nothing) -> return . Just . NewUserOriginInvitationCode $ a - (Nothing, Just a, Nothing, Nothing, Nothing) -> return . Just . NewUserOriginTeamUser $ NewTeamMember a - (Nothing, Nothing, Just a, Nothing, Nothing) -> return . Just . NewUserOriginTeamUser $ NewTeamCreator a - (Nothing, Nothing, Nothing, Just _, Just t) -> return . Just . NewUserOriginTeamUser $ NewTeamMemberSSO t - (Nothing, Nothing, Nothing, Nothing, Nothing) -> return Nothing - (_, _, _, Just _, Nothing) -> fail "sso_id, team_id must be either both present or both absent." - (_, _, _, Nothing, Just _) -> fail "sso_id, team_id must be either both present or both absent." - _ -> fail "team_code, team, invitation_code, sso_id, and the pair (sso_id, team_id) are mutually exclusive" - case (result, pass, uid) of - (_, _, Just SSOIdentity {}) -> pure result - (Just (NewUserOriginTeamUser _), Nothing, _) -> fail "all team users must set a password on creation" +type NewUserOriginComponents = (Maybe InvitationCode, Maybe InvitationCode, Maybe BindingNewTeamUser, Maybe TeamId) + +newUserOriginInvitationCode :: NewUserOrigin -> Maybe InvitationCode +newUserOriginInvitationCode = \case + NewUserOriginInvitationCode ic -> Just ic + NewUserOriginTeamUser _ -> Nothing + +newUserOriginNewTeamUser :: NewUserOrigin -> Maybe NewTeamUser +newUserOriginNewTeamUser = \case + NewUserOriginInvitationCode _ -> Nothing + NewUserOriginTeamUser ntu -> Just ntu + +maybeNewUserOriginFromComponents :: + -- | Does the user have a password + Bool -> + -- | Does the user have an SSO Identity + Bool -> + NewUserOriginComponents -> + Either String (Maybe NewUserOrigin) +maybeNewUserOriginFromComponents hasPassword hasSSO (invcode, teamcode, team, teamid) = do + result <- case (invcode, teamcode, team, hasSSO, teamid) of + (Just a, Nothing, Nothing, False, Nothing) -> Right . Just . NewUserOriginInvitationCode $ a + (Nothing, Just a, Nothing, False, Nothing) -> Right . Just . NewUserOriginTeamUser $ NewTeamMember a + (Nothing, Nothing, Just a, False, Nothing) -> Right . Just . NewUserOriginTeamUser $ NewTeamCreator a + (Nothing, Nothing, Nothing, True, Just t) -> Right . Just . NewUserOriginTeamUser $ NewTeamMemberSSO t + (Nothing, Nothing, Nothing, False, Nothing) -> Right Nothing + (_, _, _, True, Nothing) -> Left "sso_id, team_id must be either both present or both absent." + (_, _, _, False, Just _) -> Left "sso_id, team_id must be either both present or both absent." + _ -> Left "team_code, team, invitation_code, sso_id, and the pair (sso_id, team_id) are mutually exclusive" + case (result, hasPassword, hasSSO) of + (_, _, True) -> Right result + (Just (NewUserOriginTeamUser _), False, _) -> Left "all team users must set a password on creation" _ -> pure result -- | A random invitation code for use during registration newtype InvitationCode = InvitationCode {fromInvitationCode :: AsciiBase64Url} deriving stock (Eq, Show, Generic) - deriving newtype (FromJSON, ToJSON, ToByteString, FromByteString, Arbitrary) - --------------------------------------------------------------------------------- --- helpers - --- | Fails if email or phone or ssoid are present but invalid. --- If neither are present, it will not fail, but return Nothing. --- --- FUTUREWORK: Why is the SSO ID passed separately? -parseIdentity :: Maybe UserSSOId -> A.Object -> A.Parser (Maybe UserIdentity) -parseIdentity ssoid o = - if isJust (KeyMap.lookup "email" o <|> KeyMap.lookup "phone" o) || isJust ssoid - then Just <$> parseJSON (A.Object o) - else pure Nothing + deriving newtype (ToSchema, ToByteString, FromByteString, Arbitrary) + deriving (FromJSON, ToJSON, S.ToSchema) via Schema InvitationCode -------------------------------------------------------------------------------- -- NewTeamUser @@ -802,6 +834,24 @@ data NewTeamUser deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform NewTeamUser) +newTeamUserCode :: NewTeamUser -> Maybe InvitationCode +newTeamUserCode = \case + NewTeamMember ic -> Just ic + NewTeamCreator _ -> Nothing + NewTeamMemberSSO _ -> Nothing + +newTeamUserCreator :: NewTeamUser -> Maybe BindingNewTeamUser +newTeamUserCreator = \case + NewTeamMember _ -> Nothing + NewTeamCreator bntu -> Just bntu + NewTeamMemberSSO _ -> Nothing + +newTeamUserTeamId :: NewTeamUser -> Maybe TeamId +newTeamUserTeamId = \case + NewTeamMember _ -> Nothing + NewTeamCreator _ -> Nothing + NewTeamMemberSSO tid -> Just tid + data BindingNewTeamUser = BindingNewTeamUser { bnuTeam :: BindingNewTeam, bnuCurrency :: Maybe Currency.Alpha @@ -810,28 +860,14 @@ data BindingNewTeamUser = BindingNewTeamUser } deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform BindingNewTeamUser) + deriving (ToJSON, FromJSON, S.ToSchema) via (Schema BindingNewTeamUser) -instance ToJSON BindingNewTeamUser where - toJSON (BindingNewTeamUser (BindingNewTeam t) c) = - A.object $ - "currency" A..= c - # newTeamJson t - where - -- FUTUREWORK(leif): this was originally defined in libs/wire-api/src/Wire/API/Team.hs and I moved it here - -- during the process of servantifying, it should go away when servantification is complete - newTeamJson :: NewTeam a -> [A.Pair] - newTeamJson (NewTeam n i ik _) = - "name" A..= fromRange n - # "icon" A..= fromRange i - # "icon_key" A..= (fromRange <$> ik) - # [] - -instance FromJSON BindingNewTeamUser where - parseJSON j@(A.Object o) = do - c <- o A..:? "currency" - t <- parseJSON j - return $ BindingNewTeamUser t c - parseJSON _ = fail "parseJSON BindingNewTeamUser: must be an object" +instance ToSchema BindingNewTeamUser where + schema = + object "BindingNewTeamUser" $ + BindingNewTeamUser + <$> bnuTeam .= bindingNewTeamObjectSchema + <*> bnuCurrency .= maybe_ (optField "currency" genericToSchema) -------------------------------------------------------------------------------- -- Profile Updates diff --git a/libs/wire-api/src/Wire/API/User/Activation.hs b/libs/wire-api/src/Wire/API/User/Activation.hs index a4a2f2a056..d97b12eb70 100644 --- a/libs/wire-api/src/Wire/API/User/Activation.hs +++ b/libs/wire-api/src/Wire/API/User/Activation.hs @@ -43,6 +43,8 @@ where import Data.Aeson import Data.ByteString.Conversion import Data.Json.Util ((#)) +import Data.Schema (Schema (..), ToSchema, schemaIn) +import qualified Data.Swagger as S import qualified Data.Swagger.Build.Api as Doc import Data.Text.Ascii import Imports @@ -84,7 +86,8 @@ newtype ActivationKey = ActivationKey newtype ActivationCode = ActivationCode {fromActivationCode :: AsciiBase64Url} deriving stock (Eq, Show, Generic) - deriving newtype (ToByteString, FromByteString, ToJSON, FromJSON, Arbitrary) + deriving newtype (ToByteString, FromByteString, ToSchema, Arbitrary) + deriving (ToJSON, FromJSON, S.ToSchema) via Schema ActivationCode -------------------------------------------------------------------------------- -- Activate @@ -181,7 +184,7 @@ instance ToJSON ActivationResponse where instance FromJSON ActivationResponse where parseJSON = withObject "ActivationResponse" $ \o -> ActivationResponse - <$> parseJSON (Object o) + <$> schemaIn userIdentityObjectSchema o <*> o .:? "first" .!= False -------------------------------------------------------------------------------- diff --git a/libs/wire-api/src/Wire/API/User/Identity.hs b/libs/wire-api/src/Wire/API/User/Identity.hs index 07ca0f4bc9..4b1e2fcc27 100644 --- a/libs/wire-api/src/Wire/API/User/Identity.hs +++ b/libs/wire-api/src/Wire/API/User/Identity.hs @@ -26,6 +26,9 @@ module Wire.API.User.Identity emailIdentity, phoneIdentity, ssoIdentity, + userIdentityObjectSchema, + maybeUserIdentityObjectSchema, + maybeUserIdentityFromComponents, -- * Email Email (..), @@ -50,7 +53,7 @@ module Wire.API.User.Identity where import Control.Applicative (optional) -import Control.Lens (over, (.~), (?~), (^.)) +import Control.Lens (dimap, over, (.~), (?~), (^.)) import Data.Aeson (FromJSON (..), ToJSON (..)) import qualified Data.Aeson as A import qualified Data.Aeson.Types as A @@ -65,6 +68,7 @@ import qualified Data.Swagger as S import qualified Data.Text as Text import Data.Text.Encoding (decodeUtf8', encodeUtf8) import Data.Time.Clock +import Data.Tuple.Extra (fst3, snd3, thd3) import Imports import SAML2.WebSSO.Test.Arbitrary () import qualified SAML2.WebSSO.Types as SAML @@ -91,40 +95,37 @@ data UserIdentity deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform UserIdentity) -instance S.ToSchema UserIdentity where - declareNamedSchema _ = do - emailSchema <- S.declareSchemaRef (Proxy @Email) - phoneSchema <- S.declareSchemaRef (Proxy @Phone) - ssoSchema <- S.declareSchemaRef (Proxy @UserSSOId) - return $ - S.NamedSchema (Just "userIdentity") $ - mempty - & S.type_ ?~ S.SwaggerObject - & S.properties - .~ [ ("email", emailSchema), - ("phone", phoneSchema), - ("sso_id", ssoSchema) - ] - -instance ToJSON UserIdentity where - toJSON = \case - FullIdentity em ph -> go (Just em) (Just ph) Nothing - EmailIdentity em -> go (Just em) Nothing Nothing - PhoneIdentity ph -> go Nothing (Just ph) Nothing - SSOIdentity si em ph -> go em ph (Just si) - where - go :: Maybe Email -> Maybe Phone -> Maybe UserSSOId -> A.Value - go em ph si = A.object ["email" A..= em, "phone" A..= ph, "sso_id" A..= si] - -instance FromJSON UserIdentity where - parseJSON = A.withObject "UserIdentity" $ \o -> do - email <- o A..:? "email" - phone <- o A..:? "phone" - ssoid <- o A..:? "sso_id" - maybe - (fail "Missing 'email' or 'phone' or 'sso_id'.") - return - (newIdentity email phone ssoid) +userIdentityObjectSchema :: ObjectSchema SwaggerDoc UserIdentity +userIdentityObjectSchema = + Just .= withParser maybeUserIdentityObjectSchema (maybe (fail "Missing 'email' or 'phone' or 'sso_id'.") pure) + +maybeUserIdentityObjectSchema :: ObjectSchema SwaggerDoc (Maybe UserIdentity) +maybeUserIdentityObjectSchema = + dimap maybeUserIdentityToComponents maybeUserIdentityFromComponents userIdentityComponentsObjectSchema + +type UserIdentityComponents = (Maybe Email, Maybe Phone, Maybe UserSSOId) + +userIdentityComponentsObjectSchema :: ObjectSchema SwaggerDoc UserIdentityComponents +userIdentityComponentsObjectSchema = + (,,) + <$> fst3 .= maybe_ (optField "email" schema) + <*> snd3 .= maybe_ (optField "phone" schema) + <*> thd3 .= maybe_ (optField "sso_id" genericToSchema) + +maybeUserIdentityFromComponents :: UserIdentityComponents -> Maybe UserIdentity +maybeUserIdentityFromComponents = \case + (maybeEmail, maybePhone, Just ssoid) -> Just $ SSOIdentity ssoid maybeEmail maybePhone + (Just email, Just phone, Nothing) -> Just $ FullIdentity email phone + (Just email, Nothing, Nothing) -> Just $ EmailIdentity email + (Nothing, Just phone, Nothing) -> Just $ PhoneIdentity phone + (Nothing, Nothing, Nothing) -> Nothing + +maybeUserIdentityToComponents :: Maybe UserIdentity -> UserIdentityComponents +maybeUserIdentityToComponents Nothing = (Nothing, Nothing, Nothing) +maybeUserIdentityToComponents (Just (FullIdentity email phone)) = (Just email, Just phone, Nothing) +maybeUserIdentityToComponents (Just (EmailIdentity email)) = (Just email, Nothing, Nothing) +maybeUserIdentityToComponents (Just (PhoneIdentity phone)) = (Nothing, Just phone, Nothing) +maybeUserIdentityToComponents (Just (SSOIdentity ssoid m_email m_phone)) = (m_email, m_phone, Just ssoid) newIdentity :: Maybe Email -> Maybe Phone -> Maybe UserSSOId -> Maybe UserIdentity newIdentity email phone (Just sso) = Just $! SSOIdentity sso email phone diff --git a/libs/wire-api/src/Wire/API/User/Orphans.hs b/libs/wire-api/src/Wire/API/User/Orphans.hs index 232d4f1f85..7dd5e5dfd2 100644 --- a/libs/wire-api/src/Wire/API/User/Orphans.hs +++ b/libs/wire-api/src/Wire/API/User/Orphans.hs @@ -21,6 +21,7 @@ module Wire.API.User.Orphans where import Control.Lens +import qualified Data.Currency as Currency import Data.ISO3166_CountryCodes import Data.LanguageCodes import Data.Proxy @@ -121,3 +122,6 @@ instance ToParamSchema URI where instance ToSchema X509.SignedCertificate where declareNamedSchema _ = declareNamedSchema (Proxy @String) + +instance ToSchema Currency.Alpha where + declareNamedSchema = genericDeclareNamedSchema defaultSchemaOptions diff --git a/libs/wire-api/src/Wire/API/User/Profile.hs b/libs/wire-api/src/Wire/API/User/Profile.hs index b5950500fe..5327fce297 100644 --- a/libs/wire-api/src/Wire/API/User/Profile.hs +++ b/libs/wire-api/src/Wire/API/User/Profile.hs @@ -67,7 +67,6 @@ import Data.Schema import qualified Data.Swagger as S import qualified Data.Swagger.Build.Api as Doc import qualified Data.Text as Text -import Deriving.Swagger (CamelToSnake, ConstructorTagModifier, CustomSwagger, StripPrefix) import Imports import Wire.API.Arbitrary (Arbitrary (arbitrary), GenericUniform (..)) import Wire.API.User.Orphans () @@ -252,7 +251,7 @@ data ManagedBy ManagedByScim deriving stock (Eq, Bounded, Enum, Show, Generic) deriving (Arbitrary) via (GenericUniform ManagedBy) - deriving (S.ToSchema) via (CustomSwagger '[ConstructorTagModifier (StripPrefix "ManagedBy", CamelToSnake)] ManagedBy) + deriving (ToJSON, FromJSON, S.ToSchema) via (Schema ManagedBy) typeManagedBy :: Doc.DataType typeManagedBy = @@ -262,17 +261,13 @@ typeManagedBy = "scim" ] -instance ToJSON ManagedBy where - toJSON = - A.String . \case - ManagedByWire -> "wire" - ManagedByScim -> "scim" - -instance FromJSON ManagedBy where - parseJSON = A.withText "ManagedBy" $ \case - "wire" -> pure ManagedByWire - "scim" -> pure ManagedByScim - other -> fail $ "Invalid ManagedBy: " ++ show other +instance ToSchema ManagedBy where + schema = + enum @Text "ManagedBy" $ + mconcat + [ element "wire" ManagedByWire, + element "scim" ManagedByScim + ] instance ToByteString ManagedBy where builder ManagedByWire = "wire" diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs index f0f20bc7e3..798a88c877 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs @@ -225,7 +225,6 @@ import qualified Test.Wire.API.Golden.Generated.UserClients_user import qualified Test.Wire.API.Golden.Generated.UserConnectionList_user import qualified Test.Wire.API.Golden.Generated.UserConnection_user import qualified Test.Wire.API.Golden.Generated.UserHandleInfo_user -import qualified Test.Wire.API.Golden.Generated.UserIdentity_user import qualified Test.Wire.API.Golden.Generated.UserLegalHoldStatusResponse_team import qualified Test.Wire.API.Golden.Generated.UserProfile_user import qualified Test.Wire.API.Golden.Generated.UserSSOId_user @@ -1028,8 +1027,6 @@ tests = testObjects [(Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_1, "testObject_Phone_user_1.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_2, "testObject_Phone_user_2.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_3, "testObject_Phone_user_3.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_4, "testObject_Phone_user_4.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_5, "testObject_Phone_user_5.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_6, "testObject_Phone_user_6.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_7, "testObject_Phone_user_7.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_8, "testObject_Phone_user_8.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_9, "testObject_Phone_user_9.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_10, "testObject_Phone_user_10.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_11, "testObject_Phone_user_11.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_12, "testObject_Phone_user_12.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_13, "testObject_Phone_user_13.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_14, "testObject_Phone_user_14.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_15, "testObject_Phone_user_15.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_16, "testObject_Phone_user_16.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_17, "testObject_Phone_user_17.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_18, "testObject_Phone_user_18.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_19, "testObject_Phone_user_19.json"), (Test.Wire.API.Golden.Generated.Phone_user.testObject_Phone_user_20, "testObject_Phone_user_20.json")], testGroup "Golden: UserSSOId_user" $ testObjects [(Test.Wire.API.Golden.Generated.UserSSOId_user.testObject_UserSSOId_user_2, "testObject_UserSSOId_user_2.json"), (Test.Wire.API.Golden.Generated.UserSSOId_user.testObject_UserSSOId_user_9, "testObject_UserSSOId_user_9.json"), (Test.Wire.API.Golden.Generated.UserSSOId_user.testObject_UserSSOId_user_13, "testObject_UserSSOId_user_13.json")], - testGroup "Golden: UserIdentity_user" $ - testObjects [(Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_1, "testObject_UserIdentity_user_1.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_2, "testObject_UserIdentity_user_2.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_3, "testObject_UserIdentity_user_3.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_4, "testObject_UserIdentity_user_4.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_6, "testObject_UserIdentity_user_6.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_7, "testObject_UserIdentity_user_7.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_9, "testObject_UserIdentity_user_9.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_10, "testObject_UserIdentity_user_10.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_11, "testObject_UserIdentity_user_11.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_12, "testObject_UserIdentity_user_12.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_13, "testObject_UserIdentity_user_13.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_14, "testObject_UserIdentity_user_14.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_15, "testObject_UserIdentity_user_15.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_17, "testObject_UserIdentity_user_17.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_18, "testObject_UserIdentity_user_18.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_19, "testObject_UserIdentity_user_19.json"), (Test.Wire.API.Golden.Generated.UserIdentity_user.testObject_UserIdentity_user_20, "testObject_UserIdentity_user_20.json")], testGroup "Golden: NewPasswordReset_user" $ testObjects [(Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_1, "testObject_NewPasswordReset_user_1.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_2, "testObject_NewPasswordReset_user_2.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_3, "testObject_NewPasswordReset_user_3.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_4, "testObject_NewPasswordReset_user_4.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_5, "testObject_NewPasswordReset_user_5.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_6, "testObject_NewPasswordReset_user_6.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_7, "testObject_NewPasswordReset_user_7.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_8, "testObject_NewPasswordReset_user_8.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_9, "testObject_NewPasswordReset_user_9.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_10, "testObject_NewPasswordReset_user_10.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_11, "testObject_NewPasswordReset_user_11.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_12, "testObject_NewPasswordReset_user_12.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_13, "testObject_NewPasswordReset_user_13.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_14, "testObject_NewPasswordReset_user_14.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_15, "testObject_NewPasswordReset_user_15.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_16, "testObject_NewPasswordReset_user_16.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_17, "testObject_NewPasswordReset_user_17.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_18, "testObject_NewPasswordReset_user_18.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_19, "testObject_NewPasswordReset_user_19.json"), (Test.Wire.API.Golden.Generated.NewPasswordReset_user.testObject_NewPasswordReset_user_20, "testObject_NewPasswordReset_user_20.json")], testGroup "Golden: PasswordResetKey_user" $ diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs index ad1587d065..8331b06be8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AccessRoleLegacy_user.hs @@ -14,6 +14,7 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . + module Test.Wire.API.Golden.Generated.AccessRoleLegacy_user where import Wire.API.Conversation (AccessRoleLegacy (..)) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs deleted file mode 100644 index 27eb136725..0000000000 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UserIdentity_user.hs +++ /dev/null @@ -1,137 +0,0 @@ -{-# LANGUAGE OverloadedLists #-} - --- This file is part of the Wire Server implementation. --- --- Copyright (C) 2022 Wire Swiss GmbH --- --- This program is free software: you can redistribute it and/or modify it under --- the terms of the GNU Affero General Public License as published by the Free --- Software Foundation, either version 3 of the License, or (at your option) any --- later version. --- --- This program is distributed in the hope that it will be useful, but WITHOUT --- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS --- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more --- details. --- --- You should have received a copy of the GNU Affero General Public License along --- with this program. If not, see . - -module Test.Wire.API.Golden.Generated.UserIdentity_user where - -import Imports (Maybe (Just, Nothing)) -import Wire.API.User - ( Email (Email, emailDomain, emailLocal), - Phone (Phone, fromPhone), - UserIdentity (..), - UserSSOId (UserSSOId, UserScimExternalId), - ) -import Wire.API.User.Identity (mkSimpleSampleUref) - -testObject_UserIdentity_user_1 :: UserIdentity -testObject_UserIdentity_user_1 = - EmailIdentity (Email {emailLocal = "S\ENQX\1076723$\STX\"\1110507e\1015716\24831\1031964L\ETB", emailDomain = "P.b"}) - -testObject_UserIdentity_user_2 :: UserIdentity -testObject_UserIdentity_user_2 = - EmailIdentity - ( Email - { emailLocal = "\1061008\1068189\1013266\EOT\vE\ENQW\SYNO\DC3X_F\9141\STX $}\179559\USJ3\128480S?", - emailDomain = "4WL;'\DLEl1]x\119077" - } - ) - -testObject_UserIdentity_user_3 :: UserIdentity -testObject_UserIdentity_user_3 = - EmailIdentity - ( Email - { emailLocal = "\10821:\DC4E\60072i\1074224P\1054022\1037567\&6phe\DC3\ETXH,\CAN\v\145604\v>", - emailDomain = "bwtC\1110390z2RT28\STX\1049837<3Y" - } - ) - -testObject_UserIdentity_user_4 :: UserIdentity -testObject_UserIdentity_user_4 = - FullIdentity - (Email {emailLocal = "\rH)\65718", emailDomain = ")\1107842\US\27126\t\ACK\1111725_{\154804\&7#"}) - (Phone {fromPhone = "+2559583362"}) - -testObject_UserIdentity_user_5 :: UserIdentity -testObject_UserIdentity_user_5 = - SSOIdentity (UserSSOId mkSimpleSampleUref) Nothing (Just (Phone {fromPhone = "+49198172826"})) - -testObject_UserIdentity_user_6 :: UserIdentity -testObject_UserIdentity_user_6 = PhoneIdentity (Phone {fromPhone = "+03038459796465"}) - -testObject_UserIdentity_user_7 :: UserIdentity -testObject_UserIdentity_user_7 = PhoneIdentity (Phone {fromPhone = "+805676294"}) - -testObject_UserIdentity_user_8 :: UserIdentity -testObject_UserIdentity_user_8 = SSOIdentity (UserSSOId mkSimpleSampleUref) Nothing (Just (Phone {fromPhone = "+149548802116267"})) - -testObject_UserIdentity_user_9 :: UserIdentity -testObject_UserIdentity_user_9 = - EmailIdentity - ( Email - { emailLocal = "'\ACKB\1000542\&90\NAKKK\EOTin\1096701r\EOT", - emailDomain = "Jj\\\172302>nY\9522\987654VO\DC2Q\r_:$\7618\EOTc~H8e}{g" - } - ) - -testObject_UserIdentity_user_10 :: UserIdentity -testObject_UserIdentity_user_10 = - EmailIdentity - ( Email - { emailLocal = "No\b\1006784b=`yl\133702p.w\1048001\142089\DC4\149735lm\183993&j9\a", - emailDomain = "\1054243.1\1031882\ETB_\1053320Q\1087931z.Ywe\1016096\39626>" - } - ) - -testObject_UserIdentity_user_11 :: UserIdentity -testObject_UserIdentity_user_11 = PhoneIdentity (Phone {fromPhone = "+755837448"}) - -testObject_UserIdentity_user_12 :: UserIdentity -testObject_UserIdentity_user_12 = - EmailIdentity (Email {emailLocal = "K\1012027\DC2", emailDomain = "\DC4N0Q\4986rva\NAK5\1080896+S\1070062;\FS%\NAK"}) - -testObject_UserIdentity_user_13 :: UserIdentity -testObject_UserIdentity_user_13 = - FullIdentity - (Email {emailLocal = "e\ACK\1036331\1062258vN:%\1058229\SUBSi\1035816Qq", emailDomain = ""}) - (Phone {fromPhone = "+387350906"}) - -testObject_UserIdentity_user_14 :: UserIdentity -testObject_UserIdentity_user_14 = - FullIdentity - ( Email - { emailLocal = "\1004575\184062\CAN\92545\&3\US<=gg", - emailDomain = "\1035369\1022539Nbo\tQ:\1085902f\136614L\1009643" - } - ) - (Phone {fromPhone = "+79378139213406"}) - -testObject_UserIdentity_user_15 :: UserIdentity -testObject_UserIdentity_user_15 = PhoneIdentity (Phone {fromPhone = "+092380942233194"}) - -testObject_UserIdentity_user_16 :: UserIdentity -testObject_UserIdentity_user_16 = - SSOIdentity - (UserSSOId mkSimpleSampleUref) - (Just (Email {emailLocal = "%x\DC3\1049873\EOT.", emailDomain = "G\48751t.6"})) - (Just (Phone {fromPhone = "+298116118047"})) - -testObject_UserIdentity_user_17 :: UserIdentity -testObject_UserIdentity_user_17 = - SSOIdentity (UserScimExternalId "") (Just (Email {emailLocal = "\GS\FS1k", emailDomain = "CV7\147439K"})) Nothing - -testObject_UserIdentity_user_18 :: UserIdentity -testObject_UserIdentity_user_18 = PhoneIdentity (Phone {fromPhone = "+7322674905"}) - -testObject_UserIdentity_user_19 :: UserIdentity -testObject_UserIdentity_user_19 = PhoneIdentity (Phone {fromPhone = "+133514352685272"}) - -testObject_UserIdentity_user_20 :: UserIdentity -testObject_UserIdentity_user_20 = - FullIdentity - (Email {emailLocal = "\133292A", emailDomain = "|\1083873\1005880N<\DC3z9\NAKV;^\1015230"}) - (Phone {fromPhone = "+926403020"}) diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_1.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_1.json deleted file mode 100644 index 029c472a9d..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "S\u0005X􆷳$\u0002\"􏇫e󷾤惿󻼜L\u0017@P.b", - "phone": null, - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_10.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_10.json deleted file mode 100644 index 0142780ab7..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_10.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "No\u0008󵳀b=`yl𠩆p.w󿷁𢬉\u0014𤣧lm𬺹&j9\u0007@􁘣.1󻻊\u0017_􁊈Q􉦻z.Ywe󸄠髊>", - "phone": null, - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_11.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_11.json deleted file mode 100644 index bff6512261..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_11.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": null, - "phone": "+755837448", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_12.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_12.json deleted file mode 100644 index 6d4144937f..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_12.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "K󷄻\u0012@\u0014N0Q፺rva\u00155􇹀+S􅏮;\u001c%\u0015", - "phone": null, - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_13.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_13.json deleted file mode 100644 index c4632b61e5..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_13.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "e\u0006󽀫􃕲vN:%􂖵\u001aSi󼸨Qq@", - "phone": "+387350906", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_14.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_14.json deleted file mode 100644 index 5d2a9ce392..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_14.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "󵐟𬻾\u0018𖦁3\u001f<=gg@󼱩󹩋Nbo\tQ:􉇎f𡖦L󶟫", - "phone": "+79378139213406", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_15.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_15.json deleted file mode 100644 index 35fa355d0f..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_15.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": null, - "phone": "+092380942233194", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_17.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_17.json deleted file mode 100644 index de51e10642..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_17.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "email": "\u001d\u001c1k@CV7𣿯K", - "phone": null, - "sso_id": { - "scim_external_id": "" - } -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_18.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_18.json deleted file mode 100644 index 4c7aa3559a..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_18.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": null, - "phone": "+7322674905", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_19.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_19.json deleted file mode 100644 index 2d276e9f0a..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_19.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": null, - "phone": "+133514352685272", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_2.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_2.json deleted file mode 100644 index ed26790334..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "􃂐􄲝󷘒\u0004\u000bE\u0005W\u0016O\u0013X_F⎵\u0002 $}𫵧\u001fJ3🗠S?@4WL;'\u0010l1]x𝄥", - "phone": null, - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_20.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_20.json deleted file mode 100644 index c2b067e0ec..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_20.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "𠢬A@|􈧡󵤸N<\u0013z9\u0015V;^󷶾", - "phone": "+926403020", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_3.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_3.json deleted file mode 100644 index 12387a4c4e..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "⩅:\u0014Ei􆐰P􁕆󽓿6phe\u0013\u0003H,\u0018\u000b𣣄\u000b>@bwtC􏅶z2RT28\u0002􀓭<3Y", - "phone": null, - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_4.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_4.json deleted file mode 100644 index 19e7f13385..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_4.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "\rH)𐂶@)􎞂\u001f槶\t\u0006􏚭_{𥲴7#", - "phone": "+2559583362", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_6.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_6.json deleted file mode 100644 index c841bfca76..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_6.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": null, - "phone": "+03038459796465", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_7.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_7.json deleted file mode 100644 index 5edc20024a..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_7.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": null, - "phone": "+805676294", - "sso_id": null -} diff --git a/libs/wire-api/test/golden/testObject_UserIdentity_user_9.json b/libs/wire-api/test/golden/testObject_UserIdentity_user_9.json deleted file mode 100644 index 2500b91fd2..0000000000 --- a/libs/wire-api/test/golden/testObject_UserIdentity_user_9.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "email": "'\u0006B󴑞90\u0015KK\u0004in􋯽r\u0004@Jj\\𪄎>nY┲󱈆VO\u0012Q\r_:$᷂\u0004c~H8e}{g", - "phone": null, - "sso_id": null -} diff --git a/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs b/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs index 27d198a22f..f9df9a9af2 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Conversation.hs @@ -3,7 +3,7 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs index 5ff334d8a1..b63079c202 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs @@ -297,7 +297,6 @@ tests = testRoundTrip @User.Identity.Email, testRoundTrip @User.Identity.Phone, testRoundTrip @User.Identity.UserSSOId, - testRoundTrip @User.Identity.UserIdentity, testRoundTrip @User.Password.NewPasswordReset, testRoundTrip @User.Password.PasswordResetKey, -- FUTUREWORK: this should probably be tested individually, diff --git a/libs/wire-api/test/unit/Test/Wire/API/User.hs b/libs/wire-api/test/unit/Test/Wire/API/User.hs index 2b23905559..5c05e6a619 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/User.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/User.hs @@ -26,6 +26,7 @@ import Data.Domain import Data.Id import Data.LegalHold (UserLegalHoldStatus (UserLegalHoldNoConsent)) import Data.Qualified +import Data.Schema (schemaIn) import qualified Data.UUID.V4 as UUID import Imports import Test.Tasty @@ -53,28 +54,28 @@ testUserProfile = do parseIdentityTests :: [TestTree] parseIdentityTests = - [ let (=#=) :: Either String (Maybe UserIdentity) -> (Maybe UserSSOId, [Pair]) -> Assertion - (=#=) uid (mssoid, object -> Object obj) = assertEqual "=#=" uid (parseEither (parseIdentity mssoid) obj) + [ let (=#=) :: Either String (Maybe UserIdentity) -> [Pair] -> Assertion + (=#=) uid (object -> Object obj) = assertEqual "=#=" uid (parseEither (schemaIn maybeUserIdentityObjectSchema) obj) (=#=) _ bad = error $ "=#=: impossible: " <> show bad in testGroup "parseIdentity" [ testCase "FullIdentity" $ - Right (Just (FullIdentity hemail hphone)) =#= (Nothing, [email, phone]), + Right (Just (FullIdentity hemail hphone)) =#= [email, phone], testCase "EmailIdentity" $ - Right (Just (EmailIdentity hemail)) =#= (Nothing, [email]), + Right (Just (EmailIdentity hemail)) =#= [email], testCase "PhoneIdentity" $ - Right (Just (PhoneIdentity hphone)) =#= (Nothing, [phone]), + Right (Just (PhoneIdentity hphone)) =#= [phone], testCase "SSOIdentity" $ do - Right (Just (SSOIdentity hssoid Nothing Nothing)) =#= (Just hssoid, [ssoid]) - Right (Just (SSOIdentity hssoid Nothing (Just hphone))) =#= (Just hssoid, [ssoid, phone]) - Right (Just (SSOIdentity hssoid (Just hemail) Nothing)) =#= (Just hssoid, [ssoid, email]) - Right (Just (SSOIdentity hssoid (Just hemail) (Just hphone))) =#= (Just hssoid, [ssoid, email, phone]), + Right (Just (SSOIdentity hssoid Nothing Nothing)) =#= [ssoid] + Right (Just (SSOIdentity hssoid Nothing (Just hphone))) =#= [ssoid, phone] + Right (Just (SSOIdentity hssoid (Just hemail) Nothing)) =#= [ssoid, email] + Right (Just (SSOIdentity hssoid (Just hemail) (Just hphone))) =#= [ssoid, email, phone], testCase "Bad phone" $ - Left "Error in $.phone: Invalid phone number. Expected E.164 format." =#= (Nothing, [badphone]), + Left "Error in $.phone: Invalid phone number. Expected E.164 format." =#= [badphone], testCase "Bad email" $ - Left "Error in $.email: Invalid email. Expected '@'." =#= (Nothing, [bademail]), + Left "Error in $.email: Invalid email. Expected '@'." =#= [bademail], testCase "Nothing" $ - Right Nothing =#= (Nothing, [("something_unrelated", "#")]) + Right Nothing =#= [("something_unrelated", "#")] ] ] where diff --git a/libs/wire-api/wire-api.cabal b/libs/wire-api/wire-api.cabal index 8fd943c89c..caabffd61a 100644 --- a/libs/wire-api/wire-api.cabal +++ b/libs/wire-api/wire-api.cabal @@ -452,7 +452,6 @@ test-suite wire-api-golden-tests Test.Wire.API.Golden.Generated.UserConnection_user Test.Wire.API.Golden.Generated.UserConnectionList_user Test.Wire.API.Golden.Generated.UserHandleInfo_user - Test.Wire.API.Golden.Generated.UserIdentity_user Test.Wire.API.Golden.Generated.UserLegalHoldStatusResponse_team Test.Wire.API.Golden.Generated.UserProfile_user Test.Wire.API.Golden.Generated.UserSSOId_user @@ -656,6 +655,7 @@ test-suite wire-api-tests , pretty , proto-lens , saml2-web-sso + , schema-profunctor , servant , servant-swagger-ui , string-conversions diff --git a/services/brig/src/Brig/API/Error.hs b/services/brig/src/Brig/API/Error.hs index bb97ae837a..f1f4ef9773 100644 --- a/services/brig/src/Brig/API/Error.hs +++ b/services/brig/src/Brig/API/Error.hs @@ -112,7 +112,7 @@ connError NotConnected {} = StdError (errorDescriptionTypeToWai @NotConnected) connError InvalidUser {} = StdError (errorDescriptionTypeToWai @InvalidUser) connError ConnectNoIdentity {} = StdError (errorDescriptionToWai (noIdentity 0)) connError (ConnectBlacklistedUserKey k) = StdError $ foldKey (const blacklistedEmail) (const (errorDescriptionTypeToWai @BlacklistedPhone)) k -connError (ConnectInvalidEmail _ _) = StdError invalidEmail +connError (ConnectInvalidEmail _ _) = StdError (errorDescriptionTypeToWai @InvalidEmail) connError ConnectInvalidPhone {} = StdError (errorDescriptionTypeToWai @InvalidPhone) connError ConnectSameBindingTeamUsers = StdError sameBindingTeamUsers connError ConnectMissingLegalholdConsent = StdError (errorDescriptionTypeToWai @MissingLegalholdConsent) @@ -120,8 +120,9 @@ connError (ConnectFederationError e) = fedError e actError :: ActivationError -> Error actError (UserKeyExists _) = StdError (errorDescriptionTypeToWai @UserKeyExists) -actError (InvalidActivationCode e) = StdError (invalidActivationCode e) -actError (InvalidActivationEmail _ _) = StdError invalidEmail +actError InvalidActivationCodeWrongUser = StdError (errorDescriptionTypeToWai @InvalidActivationCodeWrongUser) +actError InvalidActivationCodeWrongCode = StdError (errorDescriptionTypeToWai @InvalidActivationCodeWrongCode) +actError (InvalidActivationEmail _ _) = StdError (errorDescriptionTypeToWai @InvalidEmail) actError (InvalidActivationPhone _) = StdError (errorDescriptionTypeToWai @InvalidPhone) pwResetError :: PasswordResetError -> Error @@ -135,30 +136,17 @@ pwResetError (PasswordResetInProgress (Just t)) = [("Retry-After", toByteString' t)] pwResetError ResetPasswordMustDiffer = StdError resetPasswordMustDiffer -newUserError :: CreateUserError -> Error -newUserError InvalidInvitationCode = StdError invalidInvitationCode -newUserError MissingIdentity = StdError missingIdentity -newUserError (InvalidEmail _ _) = StdError invalidEmail -newUserError (InvalidPhone _) = StdError (errorDescriptionTypeToWai @InvalidPhone) -newUserError (DuplicateUserKey _) = StdError (errorDescriptionTypeToWai @UserKeyExists) -newUserError (EmailActivationError e) = actError e -newUserError (PhoneActivationError e) = actError e -newUserError (BlacklistedUserKey k) = StdError $ foldKey (const blacklistedEmail) (const (errorDescriptionTypeToWai @BlacklistedPhone)) k -newUserError TooManyTeamMembers = StdError tooManyTeamMembers -newUserError UserCreationRestricted = StdError userCreationRestricted -newUserError (ExternalPreconditionFailed e) = StdError e - sendLoginCodeError :: SendLoginCodeError -> Error sendLoginCodeError (SendLoginInvalidPhone _) = StdError (errorDescriptionTypeToWai @InvalidPhone) sendLoginCodeError SendLoginPasswordExists = StdError passwordExists sendActCodeError :: SendActivationCodeError -> Error -sendActCodeError (InvalidRecipient k) = StdError $ foldKey (const invalidEmail) (const (errorDescriptionTypeToWai @InvalidPhone)) k +sendActCodeError (InvalidRecipient k) = StdError $ foldKey (const (errorDescriptionTypeToWai @InvalidEmail)) (const (errorDescriptionTypeToWai @InvalidPhone)) k sendActCodeError (UserKeyInUse _) = StdError (errorDescriptionTypeToWai @UserKeyExists) sendActCodeError (ActivationBlacklistedUserKey k) = StdError $ foldKey (const blacklistedEmail) (const (errorDescriptionTypeToWai @BlacklistedPhone)) k changeEmailError :: ChangeEmailError -> Error -changeEmailError (InvalidNewEmail _ _) = StdError invalidEmail +changeEmailError (InvalidNewEmail _ _) = StdError (errorDescriptionTypeToWai @InvalidEmail) changeEmailError (EmailExists _) = StdError (errorDescriptionTypeToWai @UserKeyExists) changeEmailError (ChangeBlacklistedEmail _) = StdError blacklistedEmail changeEmailError EmailManagedByScim = StdError $ propertyManagedByScim "email" @@ -267,21 +255,12 @@ clientCapabilitiesCannotBeRemoved = Wai.mkError status409 "client-capabilities-c noEmail :: Wai.Error noEmail = Wai.mkError status403 "no-email" "This operation requires the user to have a verified email address." -invalidEmail :: Wai.Error -invalidEmail = Wai.mkError status400 "invalid-email" "Invalid e-mail address." - invalidPwResetKey :: Wai.Error invalidPwResetKey = Wai.mkError status400 "invalid-key" "Invalid email or mobile number for password reset." resetPasswordMustDiffer :: Wai.Error resetPasswordMustDiffer = Wai.mkError status409 "password-must-differ" "For password reset, new and old password must be different." -invalidInvitationCode :: Wai.Error -invalidInvitationCode = Wai.mkError status400 "invalid-invitation-code" "Invalid invitation code." - -missingIdentity :: Wai.Error -missingIdentity = Wai.mkError status403 "missing-identity" "Using an invitation code requires registering the given email and/or phone." - invalidPwResetCode :: Wai.Error invalidPwResetCode = Wai.mkError status400 "invalid-code" "Invalid password reset code." @@ -414,13 +393,6 @@ sameBindingTeamUsers = Wai.mkError status403 "same-binding-team-users" "Operatio tooManyTeamInvitations :: Wai.Error tooManyTeamInvitations = Wai.mkError status403 "too-many-team-invitations" "Too many team invitations for this team." -tooManyTeamMembers :: Wai.Error -tooManyTeamMembers = Wai.mkError status403 "too-many-team-members" "Too many members in this team." - --- | docs/reference/user/registration.md {#RefRestrictRegistration}. -userCreationRestricted :: Wai.Error -userCreationRestricted = Wai.mkError status403 "user-creation-restricted" "This instance does not allow creation of personal users or teams." - -- | In contrast to 'tooManyFailedLogins', this is about too many *successful* logins. loginsTooFrequent :: Wai.Error loginsTooFrequent = Wai.mkError status429 "client-error" "Logins too frequent" diff --git a/services/brig/src/Brig/API/Handler.hs b/services/brig/src/Brig/API/Handler.hs index 967e2afefb..9cbfec7a6a 100644 --- a/services/brig/src/Brig/API/Handler.hs +++ b/services/brig/src/Brig/API/Handler.hs @@ -25,10 +25,13 @@ module Brig.API.Handler JSON, parseJsonBody, checkWhitelist, + checkWhitelistWithError, + isWhiteListed, + UserNotAllowedToJoinTeam (..), ) where -import Bilge (RequestId (..)) +import Bilge (MonadHttp, RequestId (..)) import Brig.API.Error import qualified Brig.AWS as AWS import Brig.App (AppIO, Env, applog, requestId, runAppT, settings) @@ -40,6 +43,7 @@ import Control.Error import Control.Lens (set, view) import Control.Monad.Catch (catches, throwM) import qualified Control.Monad.Catch as Catch +import Control.Monad.Except (MonadError, throwError) import Data.Aeson (FromJSON) import qualified Data.Aeson as Aeson import Data.Default (def) @@ -60,6 +64,7 @@ import Network.Wai.Utilities.Response (addHeader, json, setStatus) import qualified Network.Wai.Utilities.Server as Server import qualified Servant import System.Logger.Class (Logger) +import Wire.API.ErrorDescription (InvalidEmail) ------------------------------------------------------------------------------- -- HTTP Handler Monad @@ -96,6 +101,11 @@ toServantHandler env action = do Servant.throwError $ Servant.ServerError (mkCode werr) (mkPhrase (WaiError.code werr)) (Aeson.encode body) headers +newtype UserNotAllowedToJoinTeam = UserNotAllowedToJoinTeam WaiError.Error + deriving (Show) + +instance Exception UserNotAllowedToJoinTeam + brigErrorHandlers :: [Catch.Handler IO (Either Error a)] brigErrorHandlers = [ Catch.Handler $ \(ex :: PhoneException) -> @@ -104,8 +114,10 @@ brigErrorHandlers = pure (Left (zauthError ex)), Catch.Handler $ \(ex :: AWS.Error) -> case ex of - AWS.SESInvalidDomain -> pure (Left (StdError invalidEmail)) - _ -> throwM ex + AWS.SESInvalidDomain -> pure (Left (StdError (errorDescriptionTypeToWai @InvalidEmail))) + _ -> throwM ex, + Catch.Handler $ \(UserNotAllowedToJoinTeam e) -> + pure (Left $ StdError e) ] onError :: Logger -> Request -> Continue IO -> Error -> IO ResponseReceived @@ -140,10 +152,16 @@ parseJsonBody req = parseBody req !>> StdError . badRequest -- | If a whitelist is configured, consult it, otherwise a no-op. {#RefActivationWhitelist} checkWhitelist :: Either Email Phone -> (Handler r) () -checkWhitelist key = do +checkWhitelist = checkWhitelistWithError (StdError whitelistError) + +checkWhitelistWithError :: (Monad m, MonadReader Env m, MonadIO m, Catch.MonadMask m, MonadHttp m, MonadError e m) => e -> Either Email Phone -> m () +checkWhitelistWithError e key = do + ok <- isWhiteListed key + unless ok (throwError e) + +isWhiteListed :: (Monad m, MonadReader Env m, MonadIO m, Catch.MonadMask m, MonadHttp m) => Either Email Phone -> m Bool +isWhiteListed key = do eb <- setWhitelist <$> view settings case eb of - Nothing -> return () - Just b -> do - ok <- lift $ Whitelist.verify b key - unless ok (throwStd whitelistError) + Nothing -> pure True + Just b -> Whitelist.verify b key diff --git a/services/brig/src/Brig/API/Internal.hs b/services/brig/src/Brig/API/Internal.hs index 7e21804bf7..a2fc26916f 100644 --- a/services/brig/src/Brig/API/Internal.hs +++ b/services/brig/src/Brig/API/Internal.hs @@ -32,6 +32,7 @@ import Brig.API.Types import qualified Brig.API.User as API import Brig.API.Util (validateHandle) import Brig.App +import Brig.Data.Activation import qualified Brig.Data.Client as Data import qualified Brig.Data.Connection as Data import qualified Brig.Data.User as Data @@ -73,6 +74,7 @@ import qualified System.Logger.Class as Log import Wire.API.ErrorDescription import qualified Wire.API.Routes.Internal.Brig as BrigIRoutes import Wire.API.Routes.Internal.Brig.Connection +import Wire.API.Routes.Named import qualified Wire.API.Team.Feature as ApiFt import Wire.API.User import Wire.API.User.Client (UserClientsFull (..)) @@ -82,7 +84,10 @@ import Wire.API.User.RichInfo -- Sitemap (servant) servantSitemap :: ServerT BrigIRoutes.API (Handler r) -servantSitemap = +servantSitemap = ejpdAPI :<|> accountAPI + +ejpdAPI :: ServerT BrigIRoutes.EJPD_API (Handler r) +ejpdAPI = Brig.User.EJPD.ejpdRequest :<|> getAccountFeatureConfig :<|> putAccountFeatureConfig @@ -90,6 +95,9 @@ servantSitemap = :<|> getConnectionsStatusUnqualified :<|> getConnectionsStatus +accountAPI :: ServerT BrigIRoutes.AccountAPI (Handler r) +accountAPI = Named @"createUserNoVerify" createUserNoVerify + -- | Responds with 'Nothing' if field is NULL in existing user or user does not exist. getAccountFeatureConfig :: UserId -> (Handler r) ApiFt.TeamFeatureStatusNoConfig getAccountFeatureConfig uid = @@ -115,13 +123,6 @@ sitemap = do get "/i/status" (continue $ const $ return empty) true head "/i/status" (continue $ const $ return empty) true - -- This endpoint can lead to the following events being sent: - -- - UserActivated event to created user, if it is a team invitation or user has an SSO ID - -- - UserIdentityUpdated event to created user, if email or phone get activated - post "/i/users" (continue createUserNoVerifyH) $ - accept "application" "json" - .&. jsonRequest @NewUser - -- internal email activation (used in tests and in spar for validating emails obtained as -- SAML user identifiers). if the validate query parameter is false or missing, only set -- the activation timeout, but do not send an email, and do not do anything about activating @@ -316,18 +317,9 @@ internalListFullClients :: UserSet -> (AppIO r) UserClientsFull internalListFullClients (UserSet usrs) = UserClientsFull <$> Data.lookupClientsBulk (Set.toList usrs) -createUserNoVerifyH :: JSON ::: JsonRequest NewUser -> (Handler r) Response -createUserNoVerifyH (_ ::: req) = do - CreateUserNoVerifyResponse uid prof <- createUserNoVerify =<< parseJsonBody req - return . setStatus status201 - . addHeader "Location" (toByteString' uid) - $ json prof - -data CreateUserNoVerifyResponse = CreateUserNoVerifyResponse UserId SelfProfile - -createUserNoVerify :: NewUser -> (Handler r) CreateUserNoVerifyResponse -createUserNoVerify uData = do - result <- API.createUser uData !>> newUserError +createUserNoVerify :: NewUser -> (Handler r) (Either RegisterError SelfProfile) +createUserNoVerify uData = lift . runExceptT $ do + result <- API.createUser uData let acc = createdAccount result let usr = accountUser acc let uid = userId usr @@ -336,8 +328,8 @@ createUserNoVerify uData = do for_ (catMaybes [eac, pac]) $ \adata -> let key = ActivateKey $ activationKey adata code = activationCode adata - in API.activate key code (Just uid) !>> actError - return $ CreateUserNoVerifyResponse uid (SelfProfile usr) + in API.activate key code (Just uid) !>> activationErrorToRegisterError + pure (SelfProfile usr) deleteUserNoVerifyH :: UserId -> (Handler r) Response deleteUserNoVerifyH uid = do diff --git a/services/brig/src/Brig/API/Public.hs b/services/brig/src/Brig/API/Public.hs index 30d3d4b1df..453adbb751 100644 --- a/services/brig/src/Brig/API/Public.hs +++ b/services/brig/src/Brig/API/Public.hs @@ -61,7 +61,6 @@ import Control.Error hiding (bool) import Control.Lens (view, (%~), (.~), (?~), (^.), _Just) import Control.Monad.Catch (throwM) import Data.Aeson hiding (json) -import Data.ByteString.Conversion import qualified Data.ByteString.Lazy as Lazy import qualified Data.ByteString.Lazy.Char8 as LBS import qualified Data.Code as Code @@ -113,6 +112,7 @@ import Wire.API.Routes.Version import qualified Wire.API.Swagger as Public.Swagger (models) import qualified Wire.API.Team as Public import Wire.API.Team.LegalHold (LegalholdProtectee (..)) +import Wire.API.User (RegisterError (RegisterErrorWhitelistError)) import qualified Wire.API.User as Public import qualified Wire.API.User.Activation as Public import qualified Wire.API.User.Auth as Public @@ -162,7 +162,7 @@ swaggerDocsAPI = . (S.enum_ . _Just %~ nub) servantSitemap :: ServerT BrigAPI (Handler r) -servantSitemap = userAPI :<|> selfAPI :<|> clientAPI :<|> prekeyAPI :<|> userClientAPI :<|> connectionAPI :<|> mlsAPI +servantSitemap = userAPI :<|> selfAPI :<|> accountAPI :<|> clientAPI :<|> prekeyAPI :<|> userClientAPI :<|> connectionAPI :<|> mlsAPI where userAPI :: ServerT UserAPI (Handler r) userAPI = @@ -188,6 +188,9 @@ servantSitemap = userAPI :<|> selfAPI :<|> clientAPI :<|> prekeyAPI :<|> userCli :<|> Named @"change-locale" changeLocale :<|> Named @"change-handle" changeHandle + accountAPI :: ServerT AccountAPI (Handler r) + accountAPI = Named @"register" createUser + clientAPI :: ServerT ClientAPI (Handler r) clientAPI = Named @"get-user-clients-unqualified" getUserClientsUnqualified @@ -365,34 +368,7 @@ sitemap = do Doc.response 200 "Object with properties as attributes." Doc.end -- TODO: put delete here, too? - -- /register, /activate, /password-reset ---------------------------------- - - -- docs/reference/user/registration.md {#RefRegistration} - -- - -- This endpoint can lead to the following events being sent: - -- - UserActivated event to created user, if it is a team invitation or user has an SSO ID - -- - UserIdentityUpdated event to created user, if email code or phone code is provided - post "/register" (continue createUserH) $ - accept "application" "json" - .&. jsonRequest @Public.NewUserPublic - document "POST" "register" $ do - Doc.summary "Register a new user." - Doc.notes - "If the environment where the registration takes \ - \place is private and a registered email address or phone \ - \number is not whitelisted, a 403 error is returned." - Doc.body (Doc.ref Public.modelNewUser) $ - Doc.description "JSON body" - -- FUTUREWORK: I think this should be 'Doc.self' instead of 'user' - Doc.returns (Doc.ref Public.modelUser) - Doc.response 201 "User created and pending activation." Doc.end - Doc.errorResponse whitelistError - Doc.errorResponse invalidInvitationCode - Doc.errorResponse missingIdentity - Doc.errorResponse (errorDescriptionTypeToWai @UserKeyExists) - Doc.errorResponse activationCodeNotFound - Doc.errorResponse blacklistedEmail - Doc.errorResponse (errorDescriptionTypeToWai @BlacklistedPhone) + -- /activate, /password-reset ---------------------------------- -- This endpoint can lead to the following events being sent: -- - UserActivated event to the user, if account gets activated @@ -440,7 +416,7 @@ sitemap = do Doc.body (Doc.ref Public.modelSendActivationCode) $ Doc.description "JSON body" Doc.response 200 "Activation code sent." Doc.end - Doc.errorResponse invalidEmail + Doc.errorResponse (errorDescriptionTypeToWai @InvalidEmail) Doc.errorResponse (errorDescriptionTypeToWai @InvalidPhone) Doc.errorResponse (errorDescriptionTypeToWai @UserKeyExists) Doc.errorResponse blacklistedEmail @@ -675,24 +651,13 @@ getRichInfo self user = do getClientPrekeys :: UserId -> ClientId -> (Handler r) [Public.PrekeyId] getClientPrekeys usr clt = lift (API.lookupPrekeyIds usr clt) --- docs/reference/user/registration.md {#RefRegistration} -createUserH :: JSON ::: JsonRequest Public.NewUserPublic -> (Handler r) Response -createUserH (_ ::: req) = do - CreateUserResponse cok loc prof <- createUser =<< parseJsonBody req - lift . Auth.setResponseCookie cok - . setStatus status201 - . addHeader "Location" (toByteString' loc) - $ json prof - -data CreateUserResponse - = CreateUserResponse (Public.Cookie (ZAuth.Token ZAuth.User)) UserId Public.SelfProfile - -createUser :: Public.NewUserPublic -> (Handler r) CreateUserResponse -createUser (Public.NewUserPublic new) = do - API.checkRestrictedUserCreation new !>> newUserError - for_ (Public.newUserEmail new) $ checkWhitelist . Left - for_ (Public.newUserPhone new) $ checkWhitelist . Right - result <- API.createUser new !>> newUserError +-- | docs/reference/user/registration.md {#RefRegistration} +createUser :: Public.NewUserPublic -> (Handler r) (Either Public.RegisterError Public.RegisterSuccess) +createUser (Public.NewUserPublic new) = lift . runExceptT $ do + API.checkRestrictedUserCreation new + for_ (Public.newUserEmail new) $ checkWhitelistWithError RegisterErrorWhitelistError . Left + for_ (Public.newUserPhone new) $ checkWhitelistWithError RegisterErrorWhitelistError . Right + result <- API.createUser new let acc = createdAccount result let eac = createdEmailActivation result @@ -726,10 +691,12 @@ createUser (Public.NewUserPublic new) = do sendActivationSms p c (Just userLocale) for_ (liftM3 (,,) userEmail (createdUserTeam result) newUserTeam) $ \(e, ct, ut) -> sendWelcomeEmail e ct ut (Just userLocale) - cok <- case acc of - UserAccount _ Ephemeral -> lift $ Auth.newCookie @ZAuth.User userId Public.SessionCookie newUserLabel - UserAccount _ _ -> lift $ Auth.newCookie @ZAuth.User userId Public.PersistentCookie newUserLabel - pure $ CreateUserResponse cok userId (Public.SelfProfile usr) + cok <- + Auth.toWebCookie =<< case acc of + UserAccount _ Ephemeral -> lift $ Auth.newCookie @ZAuth.User userId Public.SessionCookie newUserLabel + UserAccount _ _ -> lift $ Auth.newCookie @ZAuth.User userId Public.PersistentCookie newUserLabel + -- pure $ CreateUserResponse cok userId (Public.SelfProfile usr) + pure $ Public.RegisterSuccess cok (Public.SelfProfile usr) where sendActivationEmail :: Public.Email -> Public.Name -> ActivationPair -> Maybe Public.Locale -> Maybe Public.NewTeamUser -> (AppIO r) () sendActivationEmail e u p l mTeamUser diff --git a/services/brig/src/Brig/API/User.hs b/services/brig/src/Brig/API/User.hs index 447cc3b3ef..1598be9006 100644 --- a/services/brig/src/Brig/API/User.hs +++ b/services/brig/src/Brig/API/User.hs @@ -88,13 +88,14 @@ module Brig.API.User ) where +import Brig.API.Error (errorDescriptionTypeToWai) import qualified Brig.API.Error as Error -import qualified Brig.API.Handler as API (Handler) +import qualified Brig.API.Handler as API (Handler, UserNotAllowedToJoinTeam (..)) import Brig.API.Types import Brig.API.Util import Brig.App import qualified Brig.Code as Code -import Brig.Data.Activation (ActivationEvent (..)) +import Brig.Data.Activation (ActivationEvent (..), activationErrorToRegisterError) import qualified Brig.Data.Activation as Data import qualified Brig.Data.Blacklist as Blacklist import qualified Brig.Data.Client as Data @@ -150,6 +151,7 @@ import Network.Wai.Utilities import qualified System.Logger.Class as Log import System.Logger.Message import UnliftIO.Async +import Wire.API.ErrorDescription import Wire.API.Federation.Error import Wire.API.Routes.Internal.Brig.Connection import Wire.API.Team.Member (legalHoldStatus) @@ -163,21 +165,37 @@ data AllowSCIMUpdates ------------------------------------------------------------------------------- -- Create User -verifyUniquenessAndCheckBlacklist :: UserKey -> ExceptT CreateUserError (AppIO r) () +data IdentityError + = IdentityErrorBlacklistedEmail + | IdentityErrorBlacklistedPhone + | IdentityErrorUserKeyExists + +identityErrorToRegisterError :: IdentityError -> RegisterError +identityErrorToRegisterError = \case + IdentityErrorBlacklistedEmail -> RegisterErrorBlacklistedEmail + IdentityErrorBlacklistedPhone -> RegisterErrorBlacklistedPhone + IdentityErrorUserKeyExists -> RegisterErrorUserKeyExists + +identityErrorToBrigError :: IdentityError -> Error.Error +identityErrorToBrigError = \case + IdentityErrorBlacklistedEmail -> Error.StdError $ errorDescriptionTypeToWai @BlacklistedEmail + IdentityErrorBlacklistedPhone -> Error.StdError $ errorDescriptionTypeToWai @BlacklistedPhone + IdentityErrorUserKeyExists -> Error.StdError $ errorDescriptionTypeToWai @UserKeyExists + +verifyUniquenessAndCheckBlacklist :: UserKey -> ExceptT IdentityError (AppIO r) () verifyUniquenessAndCheckBlacklist uk = do checkKey Nothing uk blacklisted <- lift $ Blacklist.exists uk when blacklisted $ - throwE (BlacklistedUserKey uk) + throwE (foldKey (const IdentityErrorBlacklistedEmail) (const IdentityErrorBlacklistedPhone) uk) where checkKey u k = do av <- lift $ Data.keyAvailable k u unless av $ - throwE $ - DuplicateUserKey k + throwE IdentityErrorUserKeyExists -- docs/reference/user/registration.md {#RefRegistration} -createUser :: NewUser -> ExceptT CreateUserError (AppIO r) CreateUserResult +createUser :: NewUser -> ExceptT RegisterError (AppIO r) CreateUserResult createUser new = do (email, phone) <- validateEmailAndPhone new @@ -276,29 +294,29 @@ createUser new = do where -- NOTE: all functions in the where block don't use any arguments of createUser - validateEmailAndPhone :: NewUser -> ExceptT CreateUserError (AppT r IO) (Maybe Email, Maybe Phone) + validateEmailAndPhone :: NewUser -> ExceptT RegisterError (AppT r IO) (Maybe Email, Maybe Phone) validateEmailAndPhone newUser = do -- Validate e-mail email <- for (newUserEmail newUser) $ \e -> either - (throwE . InvalidEmail e) + (const $ throwE RegisterErrorInvalidEmail) return (validateEmail e) -- Validate phone phone <- for (newUserPhone newUser) $ \p -> maybe - (throwE (InvalidPhone p)) + (throwE RegisterErrorInvalidPhone) return =<< lift (validatePhone p) - for_ (catMaybes [userEmailKey <$> email, userPhoneKey <$> phone]) $ do - verifyUniquenessAndCheckBlacklist + for_ (catMaybes [userEmailKey <$> email, userPhoneKey <$> phone]) $ \k -> + verifyUniquenessAndCheckBlacklist k !>> identityErrorToRegisterError pure (email, phone) - findTeamInvitation :: Maybe UserKey -> InvitationCode -> ExceptT CreateUserError (AppIO r) (Maybe (Team.Invitation, Team.InvitationInfo, TeamId)) - findTeamInvitation Nothing _ = throwE MissingIdentity + findTeamInvitation :: Maybe UserKey -> InvitationCode -> ExceptT RegisterError (AppIO r) (Maybe (Team.Invitation, Team.InvitationInfo, TeamId)) + findTeamInvitation Nothing _ = throwE RegisterErrorMissingIdentity findTeamInvitation (Just e) c = lift (Team.lookupInvitationInfo c) >>= \case Just ii -> do @@ -308,20 +326,20 @@ createUser new = do | e == userEmailKey em -> do _ <- ensureMemberCanJoin (Team.iiTeam ii) return $ Just (invite, ii, Team.iiTeam ii) - _ -> throwE InvalidInvitationCode - Nothing -> throwE InvalidInvitationCode + _ -> throwE RegisterErrorInvalidInvitationCode + Nothing -> throwE RegisterErrorInvalidInvitationCode - ensureMemberCanJoin :: TeamId -> ExceptT CreateUserError (AppIO r) () + ensureMemberCanJoin :: TeamId -> ExceptT RegisterError (AppIO r) () ensureMemberCanJoin tid = do maxSize <- fromIntegral . setMaxTeamSize <$> view settings (TeamSize teamSize) <- TeamSize.teamSize tid when (teamSize >= maxSize) $ - throwE TooManyTeamMembers + throwE RegisterErrorTooManyTeamMembers -- FUTUREWORK: The above can easily be done/tested in the intra call. -- Remove after the next release. canAdd <- lift $ Intra.checkUserCanJoinTeam tid case canAdd of - Just e -> throwE (ExternalPreconditionFailed e) + Just e -> throwM $ API.UserNotAllowedToJoinTeam e Nothing -> pure () acceptTeamInvitation :: @@ -330,18 +348,17 @@ createUser new = do Team.InvitationInfo -> UserKey -> UserIdentity -> - ExceptT CreateUserError (AppT r IO) () + ExceptT RegisterError (AppT r IO) () acceptTeamInvitation account inv ii uk ident = do let uid = userId (accountUser account) ok <- lift $ Data.claimKey uk uid unless ok $ - throwE $ - DuplicateUserKey uk + throwE RegisterErrorUserKeyExists let minvmeta :: (Maybe (UserId, UTCTimeMillis), Team.Role) minvmeta = ((,inCreatedAt inv) <$> inCreatedBy inv, Team.inRole inv) added <- lift $ Intra.addTeamMember uid (Team.iiTeam ii) minvmeta unless added $ - throwE TooManyTeamMembers + throwE RegisterErrorTooManyTeamMembers lift $ do activateUser uid ident -- ('insertAccount' sets column activated to False; here it is set to True.) void $ onActivated (AccountActivated account) @@ -352,12 +369,12 @@ createUser new = do Data.usersPendingActivationRemove uid Team.deleteInvitation (Team.inTeam inv) (Team.inInvitation inv) - addUserToTeamSSO :: UserAccount -> TeamId -> UserIdentity -> ExceptT CreateUserError (AppIO r) CreateUserTeam + addUserToTeamSSO :: UserAccount -> TeamId -> UserIdentity -> ExceptT RegisterError (AppIO r) CreateUserTeam addUserToTeamSSO account tid ident = do let uid = userId (accountUser account) added <- lift $ Intra.addTeamMember uid tid (Nothing, Team.defaultRole) unless added $ - throwE TooManyTeamMembers + throwE RegisterErrorTooManyTeamMembers lift $ do activateUser uid ident void $ onActivated (AccountActivated account) @@ -369,7 +386,7 @@ createUser new = do pure $ CreateUserTeam tid nm -- Handle e-mail activation (deprecated, see #RefRegistrationNoPreverification in /docs/reference/user/registration.md) - handleEmailActivation :: Maybe Email -> UserId -> Maybe BindingNewTeamUser -> ExceptT CreateUserError (AppT r IO) (Maybe Activation) + handleEmailActivation :: Maybe Email -> UserId -> Maybe BindingNewTeamUser -> ExceptT RegisterError (AppT r IO) (Maybe Activation) handleEmailActivation email uid newTeam = do fmap join . for (userEmailKey <$> email) $ \ek -> case newUserEmailCode new of Nothing -> do @@ -382,13 +399,15 @@ createUser new = do return $ Just edata Just c -> do ak <- liftIO $ Data.mkActivationKey ek - void $ activateWithCurrency (ActivateKey ak) c (Just uid) (bnuCurrency =<< newTeam) !>> EmailActivationError + void $ + activateWithCurrency (ActivateKey ak) c (Just uid) (bnuCurrency =<< newTeam) + !>> activationErrorToRegisterError return Nothing -- Handle phone activation (deprecated, see #RefRegistrationNoPreverification in /docs/reference/user/registration.md) - handlePhoneActivation :: Maybe Phone -> UserId -> ExceptT CreateUserError (AppT r IO) (Maybe Activation) + handlePhoneActivation :: Maybe Phone -> UserId -> ExceptT RegisterError (AppT r IO) (Maybe Activation) handlePhoneActivation phone uid = do - pdata <- fmap join . for (userPhoneKey <$> phone) $ \pk -> case newUserPhoneCode new of + fmap join . for (userPhoneKey <$> phone) $ \pk -> case newUserPhoneCode new of Nothing -> do timeout <- setActivationTimeout <$> view settings pdata <- lift $ Data.newActivation pk timeout (Just uid) @@ -399,9 +418,8 @@ createUser new = do return $ Just pdata Just c -> do ak <- liftIO $ Data.mkActivationKey pk - void $ activate (ActivateKey ak) c (Just uid) !>> PhoneActivationError + void $ activate (ActivateKey ak) c (Just uid) !>> activationErrorToRegisterError return Nothing - pure pdata initAccountFeatureConfig :: UserId -> (AppIO r) () initAccountFeatureConfig uid = do @@ -412,10 +430,10 @@ initAccountFeatureConfig uid = do -- all over the place there, we add a new function that handles just the one new flow where -- users are invited to the team via scim. createUserInviteViaScim :: UserId -> NewUserScimInvitation -> ExceptT Error.Error (AppIO r) UserAccount -createUserInviteViaScim uid (NewUserScimInvitation tid loc name rawEmail) = (`catchE` (throwE . Error.newUserError)) $ do - email <- either (throwE . InvalidEmail rawEmail) pure (validateEmail rawEmail) +createUserInviteViaScim uid (NewUserScimInvitation tid loc name rawEmail) = do + email <- either (const . throwE . Error.StdError $ errorDescriptionTypeToWai @InvalidEmail) pure (validateEmail rawEmail) let emKey = userEmailKey email - verifyUniquenessAndCheckBlacklist emKey + verifyUniquenessAndCheckBlacklist emKey !>> identityErrorToBrigError account <- lift $ newAccountInviteViaScim uid tid loc name email Log.debug $ field "user" (toByteString . userId . accountUser $ account) . field "action" (Log.val "User.createUserInviteViaScim") @@ -428,7 +446,6 @@ createUserInviteViaScim uid (NewUserScimInvitation tid loc name rawEmail) = (`ca lift $ Data.usersPendingActivationAdd (UserPendingActivation uid expiresAt) let activated = - -- It would be nice to set this to 'False' to make sure we're not accidentally -- treating 'PendingActivation' as 'Active', but then 'Brig.Data.User.toIdentity' -- would not produce an identity, and so we won't have the email address to construct -- the SCIM user. @@ -438,7 +455,7 @@ createUserInviteViaScim uid (NewUserScimInvitation tid loc name rawEmail) = (`ca return account -- | docs/reference/user/registration.md {#RefRestrictRegistration}. -checkRestrictedUserCreation :: NewUser -> ExceptT CreateUserError (AppIO r) () +checkRestrictedUserCreation :: NewUser -> ExceptT RegisterError (AppIO r) () checkRestrictedUserCreation new = do restrictPlease <- lift . asks $ fromMaybe False . setRestrictUserCreation . view settings when @@ -446,7 +463,7 @@ checkRestrictedUserCreation new = do && not (isNewUserTeamMember new) && not (isNewUserEphemeral new) ) - $ throwE UserCreationRestricted + $ throwE RegisterErrorUserCreationRestricted ------------------------------------------------------------------------------- -- Update Profile diff --git a/services/brig/src/Brig/Data/Activation.hs b/services/brig/src/Brig/Data/Activation.hs index 919f93df76..41c99b08b0 100644 --- a/services/brig/src/Brig/Data/Activation.hs +++ b/services/brig/src/Brig/Data/Activation.hs @@ -22,6 +22,7 @@ module Brig.Data.Activation ActivationCode (..), ActivationEvent (..), ActivationError (..), + activationErrorToRegisterError, newActivation, mkActivationKey, lookupActivationCode, @@ -48,6 +49,7 @@ import Imports import OpenSSL.BN (randIntegerZeroToNMinusOne) import OpenSSL.EVP.Digest (digestBS, getDigestByName) import Text.Printf (printf) +import Wire.API.User -- | The information associated with the pending activation of a 'UserKey'. data Activation = Activation @@ -60,10 +62,19 @@ data Activation = Activation data ActivationError = UserKeyExists !LT.Text - | InvalidActivationCode !LT.Text + | InvalidActivationCodeWrongUser + | InvalidActivationCodeWrongCode | InvalidActivationEmail !Email !String | InvalidActivationPhone !Phone +activationErrorToRegisterError :: ActivationError -> RegisterError +activationErrorToRegisterError = \case + UserKeyExists _ -> RegisterErrorUserKeyExists + InvalidActivationCodeWrongUser -> RegisterErrorInvalidActivationCodeWrongUser + InvalidActivationCodeWrongCode -> RegisterErrorInvalidActivationCodeWrongCode + InvalidActivationEmail _ _ -> RegisterErrorInvalidEmail + InvalidActivationPhone _ -> RegisterErrorInvalidPhone + data ActivationEvent = AccountActivated !UserAccount | EmailActivated !UserId !Email @@ -189,10 +200,10 @@ deleteActivationPair :: ActivationKey -> (AppIO r) () deleteActivationPair = write keyDelete . params LocalQuorum . Identity invalidUser :: ActivationError -invalidUser = InvalidActivationCode "User does not exist." +invalidUser = InvalidActivationCodeWrongUser -- "User does not exist." invalidCode :: ActivationError -invalidCode = InvalidActivationCode "Invalid activation code" +invalidCode = InvalidActivationCodeWrongCode -- "Invalid activation code" keyInsert :: PrepQuery W (ActivationKey, Text, Text, ActivationCode, Maybe UserId, Int32, Int32) () keyInsert = diff --git a/services/brig/src/Brig/Provider/API.hs b/services/brig/src/Brig/Provider/API.hs index 8c50699662..f6028eafba 100644 --- a/services/brig/src/Brig/Provider/API.hs +++ b/services/brig/src/Brig/Provider/API.hs @@ -324,7 +324,7 @@ newAccount :: Public.NewProvider -> (Handler r) Public.NewProviderResponse newAccount new = do email <- case validateEmail (Public.newProviderEmail new) of Right em -> return em - Left _ -> throwStd invalidEmail + Left _ -> throwStd (errorDescriptionTypeToWai @InvalidEmail) let name = Public.newProviderName new let pass = Public.newProviderPassword new let descr = fromRange (Public.newProviderDescr new) @@ -386,7 +386,7 @@ getActivationCode :: Public.Email -> (Handler r) FoundActivationCode getActivationCode e = do email <- case validateEmail e of Right em -> return em - Left _ -> throwStd invalidEmail + Left _ -> throwStd (errorDescriptionTypeToWai @InvalidEmail) gen <- Code.mkGen (Code.ForEmail email) code <- Code.lookup (Code.genKey gen) Code.IdentityVerification maybe (throwStd activationKeyNotFound) (return . FoundActivationCode) code @@ -496,7 +496,7 @@ updateAccountEmail :: ProviderId -> Public.EmailUpdate -> (Handler r) () updateAccountEmail pid (Public.EmailUpdate new) = do email <- case validateEmail new of Right em -> return em - Left _ -> throwStd invalidEmail + Left _ -> throwStd (errorDescriptionTypeToWai @InvalidEmail) let emailKey = mkEmailKey email DB.lookupKey emailKey >>= mapM_ (const $ throwStd emailExists) gen <- Code.mkGen (Code.ForEmail email) diff --git a/services/brig/src/Brig/Team/API.hs b/services/brig/src/Brig/Team/API.hs index 4ebdb9c2f9..5b18709bf0 100644 --- a/services/brig/src/Brig/Team/API.hs +++ b/services/brig/src/Brig/Team/API.hs @@ -90,7 +90,7 @@ routesPublic = do Doc.response 201 "Invitation was created and sent." Doc.end Doc.errorResponse noEmail Doc.errorResponse (errorDescriptionToWai (noIdentity 6)) - Doc.errorResponse invalidEmail + Doc.errorResponse (errorDescriptionTypeToWai @InvalidEmail) Doc.errorResponse blacklistedEmail Doc.errorResponse tooManyTeamInvitations @@ -149,7 +149,7 @@ routesPublic = do Doc.description "Invitation code" Doc.returns (Doc.ref Public.modelTeamInvitation) Doc.response 200 "Invitation successful." Doc.end - Doc.errorResponse invalidInvitationCode + Doc.errorResponse (errorDescriptionTypeToWai @InvalidInvitationCode) -- FUTUREWORK: Add another endpoint to allow resending of invitation codes head "/teams/invitations/by-email" (continue headInvitationByEmailH) $ @@ -228,7 +228,7 @@ getInvitationCodeH (_ ::: t ::: r) = do getInvitationCode :: TeamId -> InvitationId -> (Handler r) FoundInvitationCode getInvitationCode t r = do code <- lift $ DB.lookupInvitationCode t r - maybe (throwStd invalidInvitationCode) (return . FoundInvitationCode) code + maybe (throwStd $ errorDescriptionTypeToWai @InvalidInvitationCode) (return . FoundInvitationCode) code data FoundInvitationCode = FoundInvitationCode InvitationCode deriving (Eq, Show, Generic) @@ -321,7 +321,7 @@ createInvitation' tid inviteeRole mbInviterUid fromEmail body = do -- sendActivationCode. Refactor this to a single place -- Validate e-mail - inviteeEmail <- either (const $ throwStd invalidEmail) return (Email.validateEmail (irInviteeEmail body)) + inviteeEmail <- either (const $ throwStd (errorDescriptionTypeToWai @InvalidEmail)) return (Email.validateEmail (irInviteeEmail body)) let uke = userEmailKey inviteeEmail blacklistedEm <- lift $ Blacklist.exists uke when blacklistedEm $ @@ -404,7 +404,7 @@ getInvitationByCodeH (_ ::: c) = do getInvitationByCode :: Public.InvitationCode -> (Handler r) Public.Invitation getInvitationByCode c = do inv <- lift $ DB.lookupInvitationByCode c - maybe (throwStd invalidInvitationCode) return inv + maybe (throwStd $ errorDescriptionTypeToWai @InvalidInvitationCode) return inv headInvitationByEmailH :: JSON ::: Email -> (Handler r) Response headInvitationByEmailH (_ ::: e) = do diff --git a/services/brig/src/Brig/User/API/Auth.hs b/services/brig/src/Brig/User/API/Auth.hs index fdd67fd5fd..101c0e46e9 100644 --- a/services/brig/src/Brig/User/API/Auth.hs +++ b/services/brig/src/Brig/User/API/Auth.hs @@ -155,7 +155,7 @@ routesPublic = do Doc.description "JSON body" Doc.response 202 "Update accepted and pending activation of the new email." Doc.end Doc.response 204 "No update, current and new email address are the same." Doc.end - Doc.errorResponse invalidEmail + Doc.errorResponse (errorDescriptionTypeToWai @InvalidEmail) Doc.errorResponse (errorDescriptionTypeToWai @UserKeyExists) Doc.errorResponse blacklistedEmail Doc.errorResponse (errorDescriptionTypeToWai @BlacklistedPhone) diff --git a/services/brig/src/Brig/User/Auth/Cookie.hs b/services/brig/src/Brig/User/Auth/Cookie.hs index 28023f5863..2cd821f9af 100644 --- a/services/brig/src/Brig/User/Auth/Cookie.hs +++ b/services/brig/src/Brig/User/Auth/Cookie.hs @@ -32,6 +32,7 @@ module Brig.User.Auth.Cookie -- * HTTP setResponseCookie, + toWebCookie, -- * Re-exports Cookie (..), @@ -226,22 +227,24 @@ setResponseCookie :: Response -> m Response setResponseCookie c r = do - s <- view settings - let hdr = toByteString' (WebCookie.renderSetCookie (cookie s)) + hdr <- toByteString' . WebCookie.renderSetCookie <$> toWebCookie c return (addHeader "Set-Cookie" hdr r) - where - cookie s = - WebCookie.def - { WebCookie.setCookieName = "zuid", - WebCookie.setCookieValue = toByteString' (cookieValue c), - WebCookie.setCookiePath = Just "/access", - WebCookie.setCookieExpires = - if cookieType c == PersistentCookie - then Just (cookieExpires c) - else Nothing, - WebCookie.setCookieSecure = not (setCookieInsecure s), - WebCookie.setCookieHttpOnly = True - } + +toWebCookie :: (Monad m, MonadReader Env m, ZAuth.UserTokenLike u) => Cookie (ZAuth.Token u) -> m WebCookie.SetCookie +toWebCookie c = do + s <- view settings + pure $ + WebCookie.def + { WebCookie.setCookieName = "zuid", + WebCookie.setCookieValue = toByteString' (cookieValue c), + WebCookie.setCookiePath = Just "/access", + WebCookie.setCookieExpires = + if cookieType c == PersistentCookie + then Just (cookieExpires c) + else Nothing, + WebCookie.setCookieSecure = not (setCookieInsecure s), + WebCookie.setCookieHttpOnly = True + } -------------------------------------------------------------------------------- -- Tracking diff --git a/services/brig/test/integration/API/User/Account.hs b/services/brig/test/integration/API/User/Account.hs index 808f075999..5483a76403 100644 --- a/services/brig/test/integration/API/User/Account.hs +++ b/services/brig/test/integration/API/User/Account.hs @@ -1,20 +1,4 @@ {-# LANGUAGE NumericUnderscores #-} --- This file is part of the Wire Server implementation. --- --- Copyright (C) 2020 Wire Swiss GmbH --- --- This program is free software: you can redistribute it and/or modify it under --- the terms of the GNU Affero General Public License as published by the Free --- Software Foundation, either version 3 of the License, or (at your option) any --- later version. --- --- This program is distributed in the hope that it will be useful, but WITHOUT --- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS --- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more --- details. --- --- You should have received a copy of the GNU Affero General Public License along --- with this program. If not, see . {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- This file is part of the Wire Server implementation. @@ -73,6 +57,7 @@ import Data.Range (Range (fromRange)) import qualified Data.Set as Set import Data.String.Conversions (cs) import qualified Data.Text as T +import qualified Data.Text as Text import qualified Data.Text.Encoding as T import Data.Time (UTCTime, getCurrentTime) import Data.Time.Clock (diffUTCTime) @@ -84,21 +69,24 @@ import Federator.MockServer (FederatedRequest (..), MockException (..)) import Galley.Types.Teams (noPermissions) import Gundeck.Types.Notification import Imports hiding (head) +import qualified Network.HTTP.Types as HTTP import qualified Network.HTTP.Types as Http import qualified Network.Wai as Wai import qualified Network.Wai.Utilities.Error as Error +import qualified Network.Wai.Utilities.Error as Wai import Test.Tasty hiding (Timeout) import Test.Tasty.Cannon hiding (Cannon) import qualified Test.Tasty.Cannon as WS import Test.Tasty.HUnit import UnliftIO (mapConcurrently_) -import Util as Util +import Util import Util.AWS as Util import Web.Cookie (parseSetCookie) import qualified Wire.API.Asset as Asset import Wire.API.Federation.API.Brig (UserDeletedConnectionsNotification (..)) import qualified Wire.API.Federation.API.Brig as FedBrig import Wire.API.Federation.API.Common (EmptyResponse (EmptyResponse)) +import Wire.API.Team.Invitation (Invitation (inInvitation)) import Wire.API.User (ListUsersQuery (..)) import Wire.API.User.Identity (mkSampleUref, mkSimpleSampleUref) @@ -121,6 +109,7 @@ tests _ at opts p b c ch g aws = test' aws p "post /register - 403 blacklist" $ testCreateUserBlacklist opts b aws, test' aws p "post /register - 400 external-SSO" $ testCreateUserExternalSSO b, test' aws p "post /register - 403 restricted user creation" $ testRestrictedUserCreation opts b, + test' aws p "post /register - 403 too many members for legalhold" $ testTooManyMembersForLegalhold opts b, test' aws p "post /activate - 200/204 + expiry" $ testActivateWithExpiry opts b at, test' aws p "get /users/:uid - 404" $ testNonExistingUserUnqualified b, test' aws p "get /users//:uid - 404" $ testNonExistingUser b, @@ -1586,6 +1575,47 @@ testRestrictedUserCreation opts brig = do ] postUserRegister' ssoUser brig !!! const 400 === statusCode +-- | FUTUREWORK: @setRestrictUserCreation@ perhaps needs to be tested in one place only, since it's the +-- first thing that we check on the /register endpoint. Other tests that make use of @setRestrictUserCreation@ +-- can probably be removed and simplified. It's probably a good candidate for Quickcheck. +testTooManyMembersForLegalhold :: Opt.Opts -> Brig -> Http () +testTooManyMembersForLegalhold opts brig = do + (owner, tid) <- createUserWithTeam brig + + -- Invite a user with mocked galley which tells us that the user cannot be + -- added. We cannot use real galley here as the real galley has legalhold set + -- to "whitelist-teams-and-implicit-consent". In this mode this error is not + -- thrown, so in order to emulate other modes, we just emulate what galley + -- would return in that case. + inviteeEmail <- randomEmail + let invite = stdInvitationRequest inviteeEmail + inv <- + responseJsonError =<< postInvitation brig tid owner invite + Cannon -> User -> [UserId] -> AWS.Env -> (UserId -> HttpT IO ()) -> Http () diff --git a/services/galley/schema/src/V58_ConversationAccessRoleV2.hs b/services/galley/schema/src/V58_ConversationAccessRoleV2.hs index 0d1248f070..a477e9b152 100644 --- a/services/galley/schema/src/V58_ConversationAccessRoleV2.hs +++ b/services/galley/schema/src/V58_ConversationAccessRoleV2.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/schema/src/V59_FileSharingLockStatus.hs b/services/galley/schema/src/V59_FileSharingLockStatus.hs index 8195f186b3..d1b8392482 100644 --- a/services/galley/schema/src/V59_FileSharingLockStatus.hs +++ b/services/galley/schema/src/V59_FileSharingLockStatus.hs @@ -1,6 +1,6 @@ -- This file is part of the Wire Server implementation. -- --- Copyright (C) 2020 Wire Swiss GmbH +-- Copyright (C) 2022 Wire Swiss GmbH -- -- This program is free software: you can redistribute it and/or modify it under -- the terms of the GNU Affero General Public License as published by the Free diff --git a/services/galley/src/Galley/API/Teams.hs b/services/galley/src/Galley/API/Teams.hs index fb50dca8ac..f8714c47a9 100644 --- a/services/galley/src/Galley/API/Teams.hs +++ b/services/galley/src/Galley/API/Teams.hs @@ -1429,6 +1429,18 @@ canUserJoinTeamH :: canUserJoinTeamH tid = canUserJoinTeam tid >> pure empty -- This could be extended for more checks, for now we test only legalhold +-- +-- Brig's `POST /register` endpoint throws the errors returned by this endpoint +-- verbatim. +-- +-- FUTUREWORK: When this enpoint gets Servantified, it should have a more +-- precise list of errors, LegalHoldError is too wide, currently this can +-- actaully only error with TooManyTeamMembersOnTeamWithLegalhold. Once we have +-- a more precise list of errors and the endpoint is servantified, we can use +-- those to enrich 'Wire.API.User.RegisterError' and ensure that these errors +-- also show up in swagger. Currently, the error returned by this endpoint is +-- thrown in IO, we could then refactor that to be thrown in `ExceptT +-- RegisterError`. canUserJoinTeam :: Members '[ BrigAccess, diff --git a/services/galley/src/Galley/Intra/User.hs b/services/galley/src/Galley/Intra/User.hs index ad4482370f..efc2597b3d 100644 --- a/services/galley/src/Galley/Intra/User.hs +++ b/services/galley/src/Galley/Intra/User.hs @@ -234,9 +234,10 @@ getAccountFeatureConfigClient uid = getAccountFeatureConfigClientM :: UserId -> Client.ClientM TeamFeatureStatusNoConfig -( _ - :<|> getAccountFeatureConfigClientM - :<|> _ +( ( _ + :<|> getAccountFeatureConfigClientM + :<|> _ + ) :<|> _ ) = Client.client (Proxy @IAPI.API) From ee8a9923c94b363abfbd9543526e45f2f582958e Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Thu, 3 Mar 2022 16:02:56 +0100 Subject: [PATCH 03/13] Base64 cleanup (#2170) * Clean up `Base64ByteString` - Add a strict version and make it the default - Clean up instances - Export an unnamed schema for the raw underlying 'ByteString' - Add '*HttpApi' instances using `base64url` * Add ToParamSchema instances to base64 newtypes --- changelog.d/5-internal/base64-cleanup | 1 + libs/types-common/src/Data/Json/Util.hs | 102 ++++++++++++------ libs/types-common/test/Test/Properties.hs | 6 +- libs/wire-api/src/Wire/API/MLS/KeyPackage.hs | 2 +- libs/wire-api/src/Wire/API/Message.hs | 8 +- libs/wire-api/src/Wire/API/ServantProto.hs | 9 +- .../golden/Test/Wire/API/Golden/Runner.hs | 4 +- services/galley/src/Galley/API/Message.hs | 2 +- .../galley/test/integration/API/Federation.hs | 5 +- 9 files changed, 87 insertions(+), 52 deletions(-) create mode 100644 changelog.d/5-internal/base64-cleanup diff --git a/changelog.d/5-internal/base64-cleanup b/changelog.d/5-internal/base64-cleanup new file mode 100644 index 0000000000..4d11475462 --- /dev/null +++ b/changelog.d/5-internal/base64-cleanup @@ -0,0 +1 @@ +Clean up `Base64ByteString` implementation diff --git a/libs/types-common/src/Data/Json/Util.hs b/libs/types-common/src/Data/Json/Util.hs index c62f90bff4..38b76486f0 100644 --- a/libs/types-common/src/Data/Json/Util.hs +++ b/libs/types-common/src/Data/Json/Util.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NumDecimals #-} {-# LANGUAGE TypeApplications #-} @@ -38,10 +39,12 @@ module Data.Json.Util -- * Base64 Base64ByteString (..), + base64Schema, + Base64ByteStringL (..), + base64SchemaL, fromBase64TextLenient, fromBase64Text, toBase64Text, - base64Schema, ) where @@ -52,12 +55,12 @@ import qualified Data.Aeson as A import qualified Data.Aeson.Types as A import qualified Data.Attoparsec.Text as Atto import qualified Data.Attoparsec.Time as Atto +import Data.Bifunctor import qualified Data.ByteString.Base64 as B64 -import qualified Data.ByteString.Base64.Lazy as B64L +import qualified Data.ByteString.Base64.URL as B64U import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Conversion as BS import qualified Data.ByteString.Lazy as L -import qualified Data.ByteString.Lazy.Char8 as L8 import Data.Fixed import Data.Schema import Data.String.Conversions (cs) @@ -70,6 +73,7 @@ import Data.Time.Format (formatTime, parseTimeM) import qualified Data.Time.Lens as TL import Data.Time.Locale.Compat (defaultTimeLocale) import Imports +import Servant import Test.QuickCheck (Arbitrary (arbitrary)) -- for UTCTime import Test.QuickCheck.Instances () @@ -174,39 +178,71 @@ toJSONFieldName = A.defaultOptions {A.fieldLabelModifier = A.camelTo2 '_' . drop dropPrefix = dropWhile (not . isUpper) -------------------------------------------------------------------------------- --- base64-encoded lazy bytestrings --- | Lazy 'ByteString' with base64 json encoding. Relevant discussion: --- . See test suite for more details. -newtype Base64ByteString = Base64ByteString {fromBase64ByteString :: L.ByteString} +-- | Base64-encoded strict 'ByteString'. +-- +-- For proper Swagger generation, avoid using this type directly in APIs. Instead, +-- use a plain 'ByteString' (or a more specific newtype wrapper), and construct +-- instances using @deriving via@. +-- +-- For URLs or HTTP headers, the base64url encoding is used. +-- +-- Some related discussion: . +newtype Base64ByteString = Base64ByteString {fromBase64ByteString :: ByteString} + deriving stock (Eq, Ord, Show) + deriving (FromJSON, ToJSON) via Schema Base64ByteString + deriving newtype (Arbitrary, IsString) + +instance ToSchema Base64ByteString where + schema = fromBase64ByteString .= fmap Base64ByteString base64SchemaN + +instance FromHttpApiData Base64ByteString where + parseUrlPiece = bimap Text.pack Base64ByteString . B64U.decode . Text.encodeUtf8 + +instance ToHttpApiData Base64ByteString where + toUrlPiece = Text.decodeUtf8With Text.lenientDecode . B64U.encode . fromBase64ByteString + +instance S.ToParamSchema Base64ByteString where + toParamSchema _ = mempty & S.type_ ?~ S.SwaggerString + +base64SchemaN :: ValueSchema NamedSwaggerDoc ByteString +base64SchemaN = toBase64Text .= parsedText "Base64ByteString" fromBase64Text + +base64Schema :: ValueSchema SwaggerDoc ByteString +base64Schema = unnamed base64SchemaN + +-------------------------------------------------------------------------------- + +-- | Base64-encoded lazy 'ByteString'. +-- Similar to 'Base64ByteString', but based on 'LByteString'. +newtype Base64ByteStringL = Base64ByteStringL {fromBase64ByteStringL :: LByteString} deriving (Eq, Show, Generic) + deriving (FromJSON, ToJSON) via Schema Base64ByteStringL + deriving newtype (Arbitrary, IsString) + +base64FromStrict :: Base64ByteString -> Base64ByteStringL +base64FromStrict = Base64ByteStringL . L.fromStrict . fromBase64ByteString + +base64ToStrict :: Base64ByteStringL -> Base64ByteString +base64ToStrict = Base64ByteString . L.toStrict . fromBase64ByteStringL + +instance ToSchema Base64ByteStringL where + schema = fromBase64ByteStringL .= fmap Base64ByteStringL base64SchemaLN + +instance FromHttpApiData Base64ByteStringL where + parseUrlPiece = fmap base64FromStrict . parseUrlPiece + +instance ToHttpApiData Base64ByteStringL where + toUrlPiece = toUrlPiece . base64ToStrict + +instance S.ToParamSchema Base64ByteStringL where + toParamSchema _ = mempty & S.type_ ?~ S.SwaggerString + +base64SchemaLN :: ValueSchema NamedSwaggerDoc LByteString +base64SchemaLN = L.toStrict .= fmap L.fromStrict base64SchemaN -instance FromJSON Base64ByteString where - parseJSON (A.String st) = handleError . B64L.decode . stToLbs $ st - where - stToLbs = L.fromChunks . pure . Text.encodeUtf8 - handleError = - either - (const $ fail "parse Base64ByteString: invalid base64 encoding") - (pure . Base64ByteString) - parseJSON _ = fail "parse Base64ByteString: not a string" - -instance ToJSON Base64ByteString where - toJSON (Base64ByteString lbs) = A.String . lbsToSt . B64L.encode $ lbs - where - lbsToSt = - Text.decodeUtf8With Text.lenientDecode - . mconcat - . L.toChunks - -instance IsString Base64ByteString where - fromString = Base64ByteString . L8.pack - -instance Arbitrary Base64ByteString where - arbitrary = Base64ByteString <$> arbitrary - -base64Schema :: ValueSchema SwaggerDoc Base64ByteString -base64Schema = mkSchema mempty A.parseJSON (pure . A.toJSON) +base64SchemaL :: ValueSchema SwaggerDoc LByteString +base64SchemaL = unnamed base64SchemaLN -------------------------------------------------------------------------------- -- Utilities diff --git a/libs/types-common/test/Test/Properties.hs b/libs/types-common/test/Test/Properties.hs index cecb0794dd..9b5ba7880e 100644 --- a/libs/types-common/test/Test/Properties.hs +++ b/libs/types-common/test/Test/Properties.hs @@ -107,15 +107,15 @@ tests = \(c :: Char) -> Ascii.contains Ascii.Base64Url c ==> Ascii.contains Ascii.Standard c ], testGroup - "Base64ByteString" + "Base64ByteStringL" [ testProperty "validate (Aeson.decode . Aeson.encode) == pure . id" $ - \(Util.Base64ByteString . L.pack -> s) -> + \(Util.Base64ByteStringL . L.pack -> s) -> (Aeson.eitherDecode . Aeson.encode) s == Right s, -- the property only considers valid 'String's, and it does not document the encoding very -- well, so here are some unit tests (see -- http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt for more). testCase "examples" $ do - let go :: Util.Base64ByteString -> L.ByteString -> Assertion + let go :: Util.Base64ByteStringL -> L.ByteString -> Assertion go b uu = do Aeson.encode b @=? uu (Aeson.eitherDecode . Aeson.encode) b @=? Right b diff --git a/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs b/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs index 6c1958f281..bc4a8fa5ec 100644 --- a/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs +++ b/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs @@ -93,7 +93,7 @@ instance ToSchema KeyPackageData where schema = (S.schema . S.example ?~ "a2V5IHBhY2thZ2UgZGF0YQo=") ( KeyPackageData <$> kpData - .= named "KeyPackage" (Base64ByteString .= fmap fromBase64ByteString base64Schema) + .= named "KeyPackage" base64SchemaL ) data KeyPackageBundleEntry = KeyPackageBundleEntry diff --git a/libs/wire-api/src/Wire/API/Message.hs b/libs/wire-api/src/Wire/API/Message.hs index f734a162de..7c09431c75 100644 --- a/libs/wire-api/src/Wire/API/Message.hs +++ b/libs/wire-api/src/Wire/API/Message.hs @@ -80,7 +80,7 @@ import qualified Data.ProtocolBuffers as Protobuf import Data.Qualified (Qualified (..)) import Data.SOP (I (..), NS (..), unI, unZ) import Data.Schema -import Data.Serialize (runGetLazy) +import Data.Serialize (runGet) import qualified Data.Set as Set import qualified Data.Swagger as S import qualified Data.Swagger.Build.Api as Doc @@ -157,7 +157,7 @@ instance ToSchema NewOtrMessage where <*> newOtrReportMissing .= maybe_ (optField "report_missing" (array schema)) instance FromProto NewOtrMessage where - fromProto bs = protoToNewOtrMessage <$> runGetLazy Protobuf.decodeMessage bs + fromProto bs = protoToNewOtrMessage <$> runGet Protobuf.decodeMessage bs protoToNewOtrMessage :: Proto.NewOtrMessage -> NewOtrMessage protoToNewOtrMessage msg = @@ -198,10 +198,10 @@ instance S.ToSchema QualifiedNewOtrMessage where \https://github.com/wireapp/generic-message-proto/blob/master/proto/otr.proto." instance FromProto QualifiedNewOtrMessage where - fromProto bs = protolensToQualifiedNewOtrMessage =<< ProtoLens.decodeMessage (LBS.toStrict bs) + fromProto bs = protolensToQualifiedNewOtrMessage =<< ProtoLens.decodeMessage bs instance ToProto QualifiedNewOtrMessage where - toProto = LBS.fromStrict . ProtoLens.encodeMessage . qualifiedNewOtrMessageToProto + toProto = ProtoLens.encodeMessage . qualifiedNewOtrMessageToProto protolensToQualifiedNewOtrMessage :: Proto.Otr.QualifiedNewOtrMessage -> Either String QualifiedNewOtrMessage protolensToQualifiedNewOtrMessage protoMsg = do diff --git a/libs/wire-api/src/Wire/API/ServantProto.hs b/libs/wire-api/src/Wire/API/ServantProto.hs index aac4230d70..226c94f891 100644 --- a/libs/wire-api/src/Wire/API/ServantProto.hs +++ b/libs/wire-api/src/Wire/API/ServantProto.hs @@ -17,6 +17,7 @@ module Wire.API.ServantProto where +import qualified Data.ByteString.Lazy as LBS import Data.List.NonEmpty (NonEmpty (..)) import Data.Swagger import Imports @@ -34,22 +35,22 @@ data Proto -- it is fairly difficult to keep our custom data type, e.g. in -- Wire.API.Message.Proto in sync with the proto files. class FromProto a where - fromProto :: LByteString -> Either String a + fromProto :: ByteString -> Either String a class ToProto a where - toProto :: a -> LByteString + toProto :: a -> ByteString instance Accept Proto where contentTypes _ = ("application" // "x-protobuf") :| [] instance FromProto a => MimeUnrender Proto a where - mimeUnrender _ bs = fromProto bs + mimeUnrender _ bs = fromProto (LBS.toStrict bs) -- | This wrapper can be used to get the raw protobuf representation of a type. -- It is used when the protobuf is supposed to be forwarded somewhere like a -- federated remote, this saves us from having to re-encode it. data RawProto a = RawProto - { rpRaw :: LByteString, + { rpRaw :: ByteString, rpValue :: a } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs index 0e3ea5512b..143b58f520 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs @@ -83,7 +83,7 @@ protoTestObject :: IO Bool protoTestObject obj path = do let actual = toProto obj - msg <- assertRight (decodeMessage @m (LBS.toStrict actual)) + msg <- assertRight (decodeMessage @m actual) let pretty = render (pprintMessage msg) dir = "test/golden" fullPath = dir <> "/" <> path @@ -100,7 +100,7 @@ protoTestObject obj path = do assertEqual (show (typeRep @a) <> ": FromProto of " <> path <> " should match object") (Right obj) - (fromProto (LBS.fromStrict (encodeMessage expected))) + (fromProto (encodeMessage expected)) pure exists diff --git a/services/galley/src/Galley/API/Message.hs b/services/galley/src/Galley/API/Message.hs index 9d99a37a73..96809d0d60 100644 --- a/services/galley/src/Galley/API/Message.hs +++ b/services/galley/src/Galley/API/Message.hs @@ -234,7 +234,7 @@ postRemoteOtrMessage :: Members '[FederatorAccess] r => Qualified UserId -> Remote ConvId -> - LByteString -> + ByteString -> Sem r (PostOtrResponse MessageSendingStatus) postRemoteOtrMessage sender conv rawMsg = do let msr = diff --git a/services/galley/test/integration/API/Federation.hs b/services/galley/test/integration/API/Federation.hs index 3c1623ece2..b43e9030bc 100644 --- a/services/galley/test/integration/API/Federation.hs +++ b/services/galley/test/integration/API/Federation.hs @@ -42,7 +42,6 @@ import Control.Lens hiding ((#)) import Data.Aeson (ToJSON (..)) import qualified Data.Aeson as A import Data.ByteString.Conversion (toByteString') -import qualified Data.ByteString.Lazy as LBS import Data.Domain import Data.Id (ConvId, Id (..), UserId, newClientId, randomId) import Data.Json.Util (Base64ByteString (..), toBase64Text) @@ -885,9 +884,7 @@ sendMessage = do FedGalley.MessageSendRequest { FedGalley.msrConvId = convId, FedGalley.msrSender = bobId, - FedGalley.msrRawMessage = - Base64ByteString - (LBS.fromStrict (Protolens.encodeMessage msg)) + FedGalley.msrRawMessage = Base64ByteString (Protolens.encodeMessage msg) } let responses2 req | frComponent req == Brig = From a55abd78ef5200cad402bdcf7f318b35865295ca Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Thu, 3 Mar 2022 17:49:03 +0100 Subject: [PATCH 04/13] Add qualified broadcast endpoint (#2166) * Add qualified broadcast endpoint * Refactor broadcast tests This uses a record to organise arguments for the helper function. * Add qualified broadcast tests * Fix mismatch assertions in broadcast tests * Generalise broadcast route in nginz configuration * Add release note entry * Restore authentication for broadcast in demo nginz * Remove redundant use of `runLocalInput` * Rename broadcast tests --- changelog.d/0-release-notes/nginz-upgrade | 1 + changelog.d/1-api-changes/broadcast-qualified | 1 + charts/nginz/values.yaml | 2 +- deploy/services-demo/conf/nginz/nginx.conf | 2 +- .../src/Wire/API/Routes/Public/Galley.hs | 21 ++- services/galley/galley.cabal | 1 + services/galley/package.yaml | 1 + .../galley/src/Galley/API/Public/Servant.hs | 1 + services/galley/src/Galley/API/Update.hs | 25 +++ services/galley/test/integration/API.hs | 6 +- services/galley/test/integration/API/Teams.hs | 135 +++++++--------- services/galley/test/integration/API/Util.hs | 144 ++++++++++++------ 12 files changed, 210 insertions(+), 130 deletions(-) create mode 100644 changelog.d/0-release-notes/nginz-upgrade create mode 100644 changelog.d/1-api-changes/broadcast-qualified diff --git a/changelog.d/0-release-notes/nginz-upgrade b/changelog.d/0-release-notes/nginz-upgrade new file mode 100644 index 0000000000..c5de937551 --- /dev/null +++ b/changelog.d/0-release-notes/nginz-upgrade @@ -0,0 +1 @@ +For wire.com operators: make sure that nginz is deployed diff --git a/changelog.d/1-api-changes/broadcast-qualified b/changelog.d/1-api-changes/broadcast-qualified new file mode 100644 index 0000000000..ae2d4d65a9 --- /dev/null +++ b/changelog.d/1-api-changes/broadcast-qualified @@ -0,0 +1 @@ +Add qualified broadcast endpoint diff --git a/charts/nginz/values.yaml b/charts/nginz/values.yaml index 68306c486a..e24b6989d3 100644 --- a/charts/nginz/values.yaml +++ b/charts/nginz/values.yaml @@ -316,7 +316,7 @@ nginx_conf: - all max_body_size: 40m body_buffer_size: 256k - - path: /broadcast/otr/messages + - path: /broadcast envs: - all max_body_size: 40m diff --git a/deploy/services-demo/conf/nginz/nginx.conf b/deploy/services-demo/conf/nginz/nginx.conf index d7a3a6f413..3900df1863 100644 --- a/deploy/services-demo/conf/nginz/nginx.conf +++ b/deploy/services-demo/conf/nginz/nginx.conf @@ -336,7 +336,7 @@ http { proxy_pass http://galley; } - location /broadcast/otr/messages { + location /broadcast { include common_response_with_zauth.conf; proxy_pass http://galley; } diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs b/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs index bd4c46d60f..b1c5b1f97f 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs @@ -880,6 +880,25 @@ type MessagingAPI = (PostOtrResponses MessageSendingStatus) (Either (MessageNotSent MessageSendingStatus) MessageSendingStatus) ) + :<|> Named + "post-proteus-broadcast" + ( Summary "Post an encrypted message to all team members and all contacts (accepts only Protobuf)" + :> Description PostOtrDescription + :> ZLocalUser + :> ZConn + :> CanThrow TeamNotFound + :> CanThrow BroadcastLimitExceeded + :> CanThrow NonBindingTeam + :> "broadcast" + :> "proteus" + :> "messages" + :> ReqBody '[Proto] QualifiedNewOtrMessage + :> MultiVerb + 'POST + '[JSON] + (PostOtrResponses MessageSendingStatus) + (Either (MessageNotSent MessageSendingStatus) MessageSendingStatus) + ) type BotAPI = Named @@ -1048,7 +1067,7 @@ type PostOtrDescription = \- `report_only`: Takes a list of qualified UserIDs. If any clients of the listed users are missing, the message is not sent. The missing clients are reported in the response.\n\ \- `ignore_only`: Takes a list of qualified UserIDs. If any clients of the non-listed users are missing, the message is not sent. The missing clients are reported in the response.\n\ \\n\ - \The sending of messages in a federated conversation could theorectically fail partially. \ + \The sending of messages in a federated conversation could theoretically fail partially. \ \To make this case unlikely, the backend first gets a list of clients from all the involved backends and then tries to send a message. \ \So, if any backend is down, the message is not propagated to anyone. \ \But the actual message fan out to multiple backends could still fail partially. This type of failure is reported as a 201, \ diff --git a/services/galley/galley.cabal b/services/galley/galley.cabal index 4ce7d9094b..f2d8c75888 100644 --- a/services/galley/galley.cabal +++ b/services/galley/galley.cabal @@ -408,6 +408,7 @@ executable galley-integration , containers , cookie , currency-codes + , data-default , data-timeout , errors , exceptions diff --git a/services/galley/package.yaml b/services/galley/package.yaml index 8b17a10f8c..211826d64d 100644 --- a/services/galley/package.yaml +++ b/services/galley/package.yaml @@ -169,6 +169,7 @@ executables: - cookie - currency-codes - metrics-wai + - data-default - data-timeout - errors - exceptions diff --git a/services/galley/src/Galley/API/Public/Servant.hs b/services/galley/src/Galley/API/Public/Servant.hs index 7837481498..3c656cd0b2 100644 --- a/services/galley/src/Galley/API/Public/Servant.hs +++ b/services/galley/src/Galley/API/Public/Servant.hs @@ -83,6 +83,7 @@ servantSitemap = conversations :<|> teamConversations :<|> messaging :<|> bot :< Named @"post-otr-message-unqualified" postOtrMessageUnqualified :<|> Named @"post-otr-broadcast-unqualified" postOtrBroadcastUnqualified :<|> Named @"post-proteus-message" postProteusMessage + :<|> Named @"post-proteus-broadcast" postProteusBroadcast bot = Named @"post-bot-message-unqualified" postBotMessageUnqualified diff --git a/services/galley/src/Galley/API/Update.hs b/services/galley/src/Galley/API/Update.hs index 555cddb127..85e358b34b 100644 --- a/services/galley/src/Galley/API/Update.hs +++ b/services/galley/src/Galley/API/Update.hs @@ -52,6 +52,7 @@ module Galley.API.Update -- * Talking postProteusMessage, postOtrMessageUnqualified, + postProteusBroadcast, postOtrBroadcastUnqualified, isTypingUnqualified, @@ -1114,6 +1115,30 @@ postProteusMessage sender zcon conv msg = runLocalInput sender $ do (\c -> postRemoteOtrMessage (qUntagged sender) c (rpRaw msg)) conv +postProteusBroadcast :: + Members + '[ BotAccess, + BrigAccess, + ClientStore, + ConversationStore, + Error ActionError, + Error TeamError, + FederatorAccess, + GundeckAccess, + ExternalAccess, + Input Opts, + Input UTCTime, + MemberStore, + TeamStore, + TinyLog + ] + r => + Local UserId -> + ConnId -> + QualifiedNewOtrMessage -> + Sem r (PostOtrResponse MessageSendingStatus) +postProteusBroadcast sender zcon msg = postBroadcast sender (Just zcon) msg + unqualifyEndpoint :: Functor f => Local x -> diff --git a/services/galley/test/integration/API.hs b/services/galley/test/integration/API.hs index 6074a97361..fa070f2565 100644 --- a/services/galley/test/integration/API.hs +++ b/services/galley/test/integration/API.hs @@ -472,7 +472,7 @@ postCryptoMessageVerifyRejectMissingClientAndRepondMissingPrekeysProto = do conv <- decodeConvId <$> postConv alice [bob, eve] (Just "gossip") [] Nothing Nothing -- Missing eve let ciphertext = toBase64Text "hello bob" - let m = otrRecipients [(bob, [(bc, ciphertext)])] + let m = otrRecipients [(bob, bc, ciphertext)] r1 <- postProtoOtrMessage alice ac conv m postConv alice [bob] (Just "gossip") [] Nothing Nothing -- Unknown client ID => 403 let ciphertext = toBase64Text "hello bob" - let m = otrRecipients [(bob, [(bc, ciphertext)])] + let m = otrRecipients [(bob, bc, ciphertext)] postProtoOtrMessage alice (ClientId "172618352518396") conv m !!! const 403 === statusCode @@ -576,7 +576,7 @@ postCryptoMessageVerifyCorrectResponseIfIgnoreAndReportMissingQueryParam = do conv <- decodeConvId <$> postConv alice [bob, chad, eve] (Just "gossip") [] Nothing Nothing -- Missing eve let msgMissingChadAndEve = [(bob, bc, toBase64Text "hello bob")] - let m' = otrRecipients [(bob, [(bc, toBase64Text "hello bob")])] + let m' = otrRecipients [(bob, bc, toBase64Text "hello bob")] -- These three are equivalent (i.e. report all missing clients) postOtrMessage id alice ac conv msgMissingChadAndEve !!! const 412 === statusCode diff --git a/services/galley/test/integration/API/Teams.hs b/services/galley/test/integration/API/Teams.hs index de2e59bd46..f16d2178e7 100644 --- a/services/galley/test/integration/API/Teams.hs +++ b/services/galley/test/integration/API/Teams.hs @@ -38,6 +38,7 @@ import Data.ByteString.Conversion import Data.ByteString.Lazy (fromStrict) import Data.Csv (FromNamedRecord (..), decodeByName) import qualified Data.Currency as Currency +import Data.Default import Data.Id import Data.Json.Util hiding ((#)) import qualified Data.LegalHold as LH @@ -135,13 +136,23 @@ tests s = test s "team tests around truncation limits - no events, too large team" (testTeamAddRemoveMemberAboveThresholdNoEvents >> ensureQueueEmpty), test s "send billing events to owners even in large teams" testBillingInLargeTeam, test s "send billing events to some owners in large teams (indexedBillingTeamMembers disabled)" testBillingInLargeTeamWithoutIndexedBillingTeamMembers, - test s "post crypto broadcast message json" postCryptoBroadcastMessageJson, - test s "post crypto broadcast message json - filtered only, too large team" postCryptoBroadcastMessageJsonFilteredTooLargeTeam, - test s "post crypto broadcast message json (report missing in body)" postCryptoBroadcastMessageJsonReportMissingBody, - test s "post crypto broadcast message protobuf" postCryptoBroadcastMessageProto, - test s "post crypto broadcast message redundant/missing" postCryptoBroadcastMessageJson2, - test s "post crypto broadcast message no-team" postCryptoBroadcastMessageNoTeam, - test s "post crypto broadcast message 100 (or max conns)" postCryptoBroadcastMessage100OrMaxConns + testGroup "broadcast" $ + [ (BroadcastLegacyBody, BroadcastJSON), + (BroadcastLegacyQueryParams, BroadcastJSON), + (BroadcastLegacyBody, BroadcastProto), + (BroadcastQualified, BroadcastProto) + ] + <&> \(api, ty) -> + let bcast = def {bAPI = api, bType = ty} + in testGroup + (broadcastAPIName api <> " - " <> broadcastTypeName ty) + [ test s "message" (postCryptoBroadcastMessage bcast), + test s "filtered only, too large team" (postCryptoBroadcastMessageFilteredTooLargeTeam bcast), + test s "report missing in body" (postCryptoBroadcastMessageReportMissingBody bcast), + test s "redundant/missing" (postCryptoBroadcastMessage2 bcast), + test s "no-team" (postCryptoBroadcastMessageNoTeam bcast), + test s "100 (or max conns)" (postCryptoBroadcastMessage100OrMaxConns bcast) + ] ] timeout :: WS.Timeout @@ -1610,8 +1621,8 @@ testUpdateTeamStatus = do const 403 === statusCode const "invalid-team-status-update" === (Error.label . responseJsonUnsafeWithMsg "error label") -postCryptoBroadcastMessageJson :: TestM () -postCryptoBroadcastMessageJson = do +postCryptoBroadcastMessage :: Broadcast -> TestM () +postCryptoBroadcastMessage bcast = do localDomain <- viewFederationDomain let q :: Id a -> Qualified (Id a) q = (`Qualified` localDomain) @@ -1642,9 +1653,9 @@ postCryptoBroadcastMessageJson = do -- Alice's clients 1 and 2 listen to their own messages only WS.bracketR (c . queryItem "client" (toByteString' ac2)) alice $ \wsA2 -> WS.bracketR (c . queryItem "client" (toByteString' ac)) alice $ \wsA1 -> do - Util.postOtrBroadcastMessage id alice ac msg !!! do + Util.postBroadcast (q alice) ac bcast {bMessage = msg} !!! do const 201 === statusCode - assertMismatch [] [] [] + assertBroadcastMismatch localDomain (bAPI bcast) [] [] [] -- Bob should get the broadcast (team member of alice) void . liftIO $ WS.assertMatch t wsB (wsAssertOtr (q (selfConv bob)) (q alice) ac bc (toBase64Text "ciphertext1")) @@ -1660,13 +1671,12 @@ postCryptoBroadcastMessageJson = do void . liftIO $ WS.assertMatch t wsA2 (wsAssertOtr (q (selfConv alice)) (q alice) ac ac2 (toBase64Text "ciphertext0")) -postCryptoBroadcastMessageJsonFilteredTooLargeTeam :: TestM () -postCryptoBroadcastMessageJsonFilteredTooLargeTeam = do +postCryptoBroadcastMessageFilteredTooLargeTeam :: Broadcast -> TestM () +postCryptoBroadcastMessageFilteredTooLargeTeam bcast = do localDomain <- viewFederationDomain let q :: Id a -> Qualified (Id a) q = (`Qualified` localDomain) opts <- view tsGConf - g <- view tsCannon c <- view tsCannon -- Team1: alice, bob and 3 unnamed (alice, tid) <- Util.createBindingTeam @@ -1705,14 +1715,14 @@ postCryptoBroadcastMessageJsonFilteredTooLargeTeam = do & optSettings . setMaxConvSize .~ 4 withSettingsOverrides newOpts $ do -- Untargeted, Alice's team is too large - Util.postOtrBroadcastMessage' g Nothing id alice ac msg !!! do + Util.postBroadcast (q alice) ac bcast {bMessage = msg} !!! do const 400 === statusCode const "too-many-users-to-broadcast" === Error.label . responseJsonUnsafeWithMsg "error label" -- We target the message to the 4 users, that should be fine let inbody = Just [alice, bob, charlie, dan] - Util.postOtrBroadcastMessage' g inbody id alice ac msg !!! do + Util.postBroadcast (q alice) ac bcast {bReport = inbody, bMessage = msg} !!! do const 201 === statusCode - assertMismatch [] [] [] + assertBroadcastMismatch localDomain (bAPI bcast) [] [] [] -- Bob should get the broadcast (team member of alice) void . liftIO $ WS.assertMatch t wsB (wsAssertOtr (q (selfConv bob)) (q alice) ac bc (toBase64Text "ciphertext1")) @@ -1728,23 +1738,26 @@ postCryptoBroadcastMessageJsonFilteredTooLargeTeam = do void . liftIO $ WS.assertMatch t wsA2 (wsAssertOtr (q (selfConv alice)) (q alice) ac ac2 (toBase64Text "ciphertext0")) -postCryptoBroadcastMessageJsonReportMissingBody :: TestM () -postCryptoBroadcastMessageJsonReportMissingBody = do - g <- view tsGalley +postCryptoBroadcastMessageReportMissingBody :: Broadcast -> TestM () +postCryptoBroadcastMessageReportMissingBody bcast = do + localDomain <- viewFederationDomain (alice, tid) <- Util.createBindingTeam + let qalice = Qualified alice localDomain bob <- view userId <$> Util.addUserToTeam alice tid _bc <- Util.randomClient bob (someLastPrekeys !! 1) -- this is important! assertQueue "add bob" $ tUpdate 2 [alice] refreshIndex ac <- Util.randomClient alice (someLastPrekeys !! 0) - let inbody = Just [bob] -- body triggers report - inquery = (queryItem "report_missing" (toByteString' alice)) -- query doesn't + let -- add extraneous query parameter (unless using query parameter API) + inquery = case bAPI bcast of + BroadcastLegacyQueryParams -> id + _ -> queryItem "report_missing" (toByteString' alice) msg = [(alice, ac, "ciphertext0")] - Util.postOtrBroadcastMessage' g inbody inquery alice ac msg + Util.postBroadcast qalice ac bcast {bReport = Just [bob], bMessage = msg, bReq = inquery} !!! const 412 === statusCode -postCryptoBroadcastMessageJson2 :: TestM () -postCryptoBroadcastMessageJson2 = do +postCryptoBroadcastMessage2 :: Broadcast -> TestM () +postCryptoBroadcastMessage2 bcast = do localDomain <- viewFederationDomain let q :: Id a -> Qualified (Id a) q = (`Qualified` localDomain) @@ -1763,15 +1776,15 @@ postCryptoBroadcastMessageJson2 = do let t = 3 # Second -- WS receive timeout -- Missing charlie let m1 = [(bob, bc, toBase64Text "ciphertext1")] - Util.postOtrBroadcastMessage id alice ac m1 !!! do + Util.postBroadcast (q alice) ac bcast {bMessage = m1} !!! do const 412 === statusCode - assertMismatchWithMessage (Just "1: Only Charlie and his device") [(charlie, Set.singleton cc)] [] [] + assertBroadcastMismatch localDomain (bAPI bcast) [(charlie, Set.singleton cc)] [] [] -- Complete WS.bracketR2 c bob charlie $ \(wsB, wsE) -> do let m2 = [(bob, bc, toBase64Text "ciphertext2"), (charlie, cc, toBase64Text "ciphertext2")] - Util.postOtrBroadcastMessage id alice ac m2 !!! do + Util.postBroadcast (q alice) ac bcast {bMessage = m2} !!! do const 201 === statusCode - assertMismatchWithMessage (Just "No devices expected") [] [] [] + assertBroadcastMismatch localDomain (bAPI bcast) [] [] [] void . liftIO $ WS.assertMatch t wsB (wsAssertOtr (q (selfConv bob)) (q alice) ac bc (toBase64Text "ciphertext2")) void . liftIO $ @@ -1783,9 +1796,9 @@ postCryptoBroadcastMessageJson2 = do (bob, bc, toBase64Text "ciphertext3"), (charlie, cc, toBase64Text "ciphertext3") ] - Util.postOtrBroadcastMessage id alice ac m3 !!! do + Util.postBroadcast (q alice) ac bcast {bMessage = m3} !!! do const 201 === statusCode - assertMismatchWithMessage (Just "2: Only Alice and her device") [] [(alice, Set.singleton ac)] [] + assertBroadcastMismatch localDomain (bAPI bcast) [] [(alice, Set.singleton ac)] [] void . liftIO $ WS.assertMatch t wsB (wsAssertOtr (q (selfConv bob)) (q alice) ac bc (toBase64Text "ciphertext3")) void . liftIO $ @@ -1796,66 +1809,26 @@ postCryptoBroadcastMessageJson2 = do WS.bracketR2 c bob charlie $ \(wsB, wsE) -> do deleteClient charlie cc (Just defPassword) !!! const 200 === statusCode let m4 = [(bob, bc, toBase64Text "ciphertext4"), (charlie, cc, toBase64Text "ciphertext4")] - Util.postOtrBroadcastMessage id alice ac m4 !!! do + Util.postBroadcast (q alice) ac bcast {bMessage = m4} !!! do const 201 === statusCode - assertMismatchWithMessage (Just "3: Only Charlie and his device") [] [] [(charlie, Set.singleton cc)] + assertBroadcastMismatch localDomain (bAPI bcast) [] [] [(charlie, Set.singleton cc)] void . liftIO $ WS.assertMatch t wsB (wsAssertOtr (q (selfConv bob)) (q alice) ac bc (toBase64Text "ciphertext4")) -- charlie should not get it assertNoMsg wsE (wsAssertOtr (q (selfConv charlie)) (q alice) ac cc (toBase64Text "ciphertext4")) -postCryptoBroadcastMessageProto :: TestM () -postCryptoBroadcastMessageProto = do +postCryptoBroadcastMessageNoTeam :: Broadcast -> TestM () +postCryptoBroadcastMessageNoTeam bcast = do localDomain <- viewFederationDomain - let q :: Id a -> Qualified (Id a) - q = (`Qualified` localDomain) - -- similar to postCryptoBroadcastMessageJson, postCryptoBroadcastMessageJsonReportMissingBody except uses protobuf - - c <- view tsCannon - -- Team1: Alice, Bob. Team2: Charlie. Regular user: Dan. Connect Alice,Charlie,Dan - (alice, tid) <- Util.createBindingTeam - bob <- view userId <$> Util.addUserToTeam alice tid - assertQueue "add bob" $ tUpdate 2 [alice] - refreshIndex - (charlie, _) <- Util.createBindingTeam - refreshIndex - ac <- Util.randomClient alice (someLastPrekeys !! 0) - bc <- Util.randomClient bob (someLastPrekeys !! 1) - cc <- Util.randomClient charlie (someLastPrekeys !! 2) - (dan, dc) <- randomUserWithClient (someLastPrekeys !! 3) - connectUsers alice (list1 charlie [dan]) - -- Complete: Alice broadcasts a message to Bob,Charlie,Dan - let t = 1 # Second -- WS receive timeout - let ciphertext = toBase64Text "hello bob" - WS.bracketRN c [alice, bob, charlie, dan] $ \ws@[_, wsB, wsC, wsD] -> do - let msg = otrRecipients [(bob, [(bc, ciphertext)]), (charlie, [(cc, ciphertext)]), (dan, [(dc, ciphertext)])] - Util.postProtoOtrBroadcast alice ac msg !!! do - const 201 === statusCode - assertMismatch [] [] [] - -- Bob should get the broadcast (team member of alice) - void . liftIO $ WS.assertMatch t wsB (wsAssertOtr' (toBase64Text "data") (q (selfConv bob)) (q alice) ac bc ciphertext) - -- Charlie should get the broadcast (contact of alice and user of teams feature) - void . liftIO $ WS.assertMatch t wsC (wsAssertOtr' (toBase64Text "data") (q (selfConv charlie)) (q alice) ac cc ciphertext) - -- Dan should get the broadcast (contact of alice and not user of teams feature) - void . liftIO $ WS.assertMatch t wsD (wsAssertOtr' (toBase64Text "data") (q (selfConv dan)) (q alice) ac dc ciphertext) - -- Alice should not get her own broadcast - WS.assertNoEvent timeout ws - let inbody = Just [bob] -- body triggers report - inquery = (queryItem "report_missing" (toByteString' alice)) -- query doesn't - msg = otrRecipients [(alice, [(ac, ciphertext)])] - Util.postProtoOtrBroadcast' inbody inquery alice ac msg - !!! const 412 === statusCode - -postCryptoBroadcastMessageNoTeam :: TestM () -postCryptoBroadcastMessageNoTeam = do (alice, ac) <- randomUserWithClient (someLastPrekeys !! 0) + let qalice = Qualified alice localDomain (bob, bc) <- randomUserWithClient (someLastPrekeys !! 1) connectUsers alice (list1 bob []) let msg = [(bob, bc, toBase64Text "ciphertext1")] - Util.postOtrBroadcastMessage id alice ac msg !!! const 404 === statusCode + Util.postBroadcast qalice ac bcast {bMessage = msg} !!! const 404 === statusCode -postCryptoBroadcastMessage100OrMaxConns :: TestM () -postCryptoBroadcastMessage100OrMaxConns = do +postCryptoBroadcastMessage100OrMaxConns :: Broadcast -> TestM () +postCryptoBroadcastMessage100OrMaxConns bcast = do localDomain <- viewFederationDomain c <- view tsCannon (alice, ac) <- randomUserWithClient (someLastPrekeys !! 0) @@ -1868,9 +1841,9 @@ postCryptoBroadcastMessage100OrMaxConns = do WS.bracketRN c (bob : (fst <$> others)) $ \ws -> do let f (u, clt) = (u, clt, toBase64Text "ciphertext") let msg = (bob, bc, toBase64Text "ciphertext") : (f <$> others) - Util.postOtrBroadcastMessage id alice ac msg !!! do + Util.postBroadcast qalice ac bcast {bMessage = msg} !!! do const 201 === statusCode - assertMismatch [] [] [] + assertBroadcastMismatch localDomain (bAPI bcast) [] [] [] let qbobself = Qualified (selfConv bob) localDomain void . liftIO $ WS.assertMatch t (Imports.head ws) (wsAssertOtr qbobself qalice ac bc (toBase64Text "ciphertext")) diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index e0d0af359a..73fd845971 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -42,11 +42,12 @@ import qualified Data.CaseInsensitive as CI import qualified Data.Code as Code import qualified Data.Currency as Currency import Data.Data (Proxy (Proxy)) +import Data.Default import Data.Domain import qualified Data.Handle as Handle import qualified Data.HashMap.Strict as HashMap import Data.Id -import Data.Json.Util (UTCTimeMillis) +import Data.Json.Util hiding ((#)) import Data.LegalHold (defUserLegalHoldStatus) import Data.List.NonEmpty (NonEmpty) import Data.List1 as List1 @@ -673,7 +674,7 @@ postOtrMessage' reportMissing f u d c rec = do . zUser u . zConn "conn" . zType "access" - . json (mkOtrPayload d rec reportMissing) + . json (mkOtrPayload d rec reportMissing "ZXhhbXBsZQ==") postProteusMessageQualifiedWithMockFederator :: UserId -> @@ -711,30 +712,86 @@ postProteusMessageQualified senderUser senderClient (Qualified conv domain) reci . contentProtobuf . bytes (Protolens.encodeMessage protoMsg) --- | FUTUREWORK: remove first argument, it's 'id' in all calls to this function! -postOtrBroadcastMessage :: (Request -> Request) -> UserId -> ClientId -> [(UserId, ClientId, Text)] -> TestM ResponseLBS -postOtrBroadcastMessage req usrs clt rcps = do - g <- view tsGalley - postOtrBroadcastMessage' g Nothing req usrs clt rcps +data BroadcastAPI + = BroadcastLegacyQueryParams + | BroadcastLegacyBody + | BroadcastQualified + +broadcastAPIName :: BroadcastAPI -> String +broadcastAPIName BroadcastLegacyQueryParams = "legacy API with query parameters only" +broadcastAPIName BroadcastLegacyBody = "legacy API with report_missing in the body" +broadcastAPIName BroadcastQualified = "qualified API" + +data BroadcastType = BroadcastJSON | BroadcastProto + +broadcastTypeName :: BroadcastType -> String +broadcastTypeName BroadcastJSON = "json" +broadcastTypeName BroadcastProto = "protobuf" --- | 'postOtrBroadcastMessage' with @"report_missing"@ in body. -postOtrBroadcastMessage' :: (Monad m, MonadCatch m, MonadIO m, MonadHttp m, MonadFail m, HasCallStack) => (Request -> Request) -> Maybe [UserId] -> (Request -> Request) -> UserId -> ClientId -> [(UserId, ClientId, Text)] -> m ResponseLBS -postOtrBroadcastMessage' g reportMissingBody f u d rec = +data Broadcast = Broadcast + { bAPI :: BroadcastAPI, + bType :: BroadcastType, + bMessage :: [(UserId, ClientId, Text)], + bData :: Text, + bReport :: Maybe [UserId], + bReq :: Request -> Request + } + +instance Default Broadcast where + def = Broadcast BroadcastLegacyQueryParams BroadcastJSON mempty "ZXhhbXBsZQ==" mempty id + +postBroadcast :: + (MonadIO m, MonadHttp m, HasGalley m) => + Qualified UserId -> + ClientId -> + Broadcast -> + m ResponseLBS +postBroadcast lu c b = do + let u = qUnqualified lu + g <- viewGalley + let (bodyReport, queryReport) = case bAPI b of + BroadcastLegacyQueryParams -> (Nothing, maybe id mkOtrReportMissing (bReport b)) + _ -> (bReport b, id) + let bdy = case (bAPI b, bType b) of + (BroadcastQualified, BroadcastJSON) -> error "JSON not supported for the qualified broadcast API" + (BroadcastQualified, BroadcastProto) -> + let m = + Protolens.encodeMessage $ + mkQualifiedOtrPayload + c + (map ((_1 %~ (lu $>)) . (_3 %~ fromBase64TextLenient)) (bMessage b)) + (fromBase64TextLenient (bData b)) + ( maybe + MismatchReportAll + (MismatchReportOnly . Set.fromList . map (lu $>)) + (bReport b) + ) + in contentProtobuf . bytes m + (_, BroadcastJSON) -> json (mkOtrPayload c (bMessage b) bodyReport (bData b)) + (_, BroadcastProto) -> + let m = + runPut . encodeMessage $ + mkOtrProtoMessage c (otrRecipients (bMessage b)) bodyReport (bData b) + in contentProtobuf . bytes m + let name = case bAPI b of BroadcastQualified -> "proteus"; _ -> "otr" post $ - g - . f - . paths ["broadcast", "otr", "messages"] + g . bReq b + . paths ["broadcast", name, "messages"] . zUser u . zConn "conn" . zType "access" - . json (mkOtrPayload d rec reportMissingBody) + . queryReport + . bdy -mkOtrPayload :: ClientId -> [(UserId, ClientId, Text)] -> Maybe [UserId] -> Value -mkOtrPayload sender rec reportMissingBody = +mkOtrReportMissing :: [UserId] -> Request -> Request +mkOtrReportMissing = queryItem "report_missing" . BS.intercalate "," . map toByteString' + +mkOtrPayload :: ClientId -> [(UserId, ClientId, Text)] -> Maybe [UserId] -> Text -> Value +mkOtrPayload sender rec reportMissingBody ad = object [ "sender" .= sender, "recipients" .= (HashMap.map toJSON . HashMap.fromListWith HashMap.union $ map mkOtrMessage rec), - "data" .= Just ("data" :: Text), + "data" .= Just ad, "report_missing" .= reportMissingBody ] @@ -750,7 +807,7 @@ postProtoOtrMessage = postProtoOtrMessage' Nothing id postProtoOtrMessage' :: Maybe [UserId] -> (Request -> Request) -> UserId -> ClientId -> ConvId -> OtrRecipients -> TestM ResponseLBS postProtoOtrMessage' reportMissing modif u d c rec = do g <- view tsGalley - let m = runPut (encodeMessage $ mkOtrProtoMessage d rec reportMissing) + let m = runPut (encodeMessage $ mkOtrProtoMessage d rec reportMissing "ZXhhbXBsZQ==") in post $ g . modif @@ -761,30 +818,13 @@ postProtoOtrMessage' reportMissing modif u d c rec = do . contentProtobuf . bytes m -postProtoOtrBroadcast :: UserId -> ClientId -> OtrRecipients -> TestM ResponseLBS -postProtoOtrBroadcast = postProtoOtrBroadcast' Nothing id - -postProtoOtrBroadcast' :: Maybe [UserId] -> (Request -> Request) -> UserId -> ClientId -> OtrRecipients -> TestM ResponseLBS -postProtoOtrBroadcast' reportMissing modif u d rec = do - g <- view tsGalley - let m = runPut (encodeMessage $ mkOtrProtoMessage d rec reportMissing) - in post $ - g - . modif - . paths ["broadcast", "otr", "messages"] - . zUser u - . zConn "conn" - . zType "access" - . contentProtobuf - . bytes m - -mkOtrProtoMessage :: ClientId -> OtrRecipients -> Maybe [UserId] -> Proto.NewOtrMessage -mkOtrProtoMessage sender rec reportMissing = +mkOtrProtoMessage :: ClientId -> OtrRecipients -> Maybe [UserId] -> Text -> Proto.NewOtrMessage +mkOtrProtoMessage sender rec reportMissing ad = let rcps = protoFromOtrRecipients rec sndr = Proto.fromClientId sender rmis = Proto.fromUserId <$> fromMaybe [] reportMissing in Proto.newOtrMessage sndr rcps - & Proto.newOtrMessageData ?~ "data" + & Proto.newOtrMessageData ?~ fromBase64TextLenient ad & Proto.newOtrMessageReportMissing .~ rmis getConvs :: UserId -> Maybe (Either [ConvId] ConvId) -> Maybe Int32 -> TestM ResponseLBS @@ -1399,7 +1439,7 @@ wsAssertOtr :: Text -> Notification -> IO () -wsAssertOtr = wsAssertOtr' "data" +wsAssertOtr = wsAssertOtr' "ZXhhbXBsZQ==" wsAssertOtr' :: HasCallStack => @@ -1924,6 +1964,21 @@ assertExpected msg expected tparser = where addTitle s = unlines [msg, s] +assertBroadcastMismatch :: + Domain -> + BroadcastAPI -> + [(UserId, Set ClientId)] -> + [(UserId, Set ClientId)] -> + [(UserId, Set ClientId)] -> + Assertions () +assertBroadcastMismatch localDomain BroadcastQualified = + \m r d -> assertMismatchQualified mempty (mk m) (mk r) (mk d) + where + mk :: [(UserId, Set ClientId)] -> Client.QualifiedUserClients + mk [] = mempty + mk uc = Client.QualifiedUserClients . Map.singleton localDomain . Map.fromList $ uc +assertBroadcastMismatch _ _ = assertMismatch + assertMismatchWithMessage :: HasCallStack => Maybe String -> @@ -1964,10 +2019,13 @@ assertMismatchQualified failedToSend missing redundant deleted = do assertExpected "deleted" deleted (fmap mssDeletedClients . responseJsonMaybe) -otrRecipients :: [(UserId, [(ClientId, Text)])] -> OtrRecipients -otrRecipients = OtrRecipients . UserClientMap . buildMap - where - buildMap = fmap Map.fromList . Map.fromList +otrRecipients :: [(UserId, ClientId, Text)] -> OtrRecipients +otrRecipients = + OtrRecipients + . UserClientMap + . fmap Map.fromList + . foldr (uncurry Map.insert . fmap pure) mempty + . map (\(a, b, c) -> (a, (b, c))) genRandom :: (Q.Arbitrary a, MonadIO m) => m a genRandom = liftIO . Q.generate $ Q.arbitrary From f02329b52754424240163a0a15ce1c7d44a055aa Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Fri, 4 Mar 2022 07:40:30 +0100 Subject: [PATCH 05/13] MLS Message types (#2145) * MLS message deserialisation * Add simple message unit test * Add application message unit test * Implement welcome message deserialisation --- changelog.d/5-internal/mls-messages | 1 + libs/wire-api/package.yaml | 1 + libs/wire-api/src/Wire/API/MLS/Commit.hs | 55 +++++++ libs/wire-api/src/Wire/API/MLS/Credential.hs | 15 +- libs/wire-api/src/Wire/API/MLS/Group.hs | 30 ++++ libs/wire-api/src/Wire/API/MLS/KeyPackage.hs | 28 ++-- libs/wire-api/src/Wire/API/MLS/Message.hs | 154 ++++++++++++++++++ libs/wire-api/src/Wire/API/MLS/Proposal.hs | 134 +++++++++++++-- .../src/Wire/API/MLS/Serialisation.hs | 57 +++++-- libs/wire-api/src/Wire/API/MLS/Welcome.hs | 47 ++++++ libs/wire-api/test/resources/app_message1.mls | Bin 0 -> 170 bytes libs/wire-api/test/resources/commit1.mls | Bin 0 -> 883 bytes libs/wire-api/test/resources/welcome1.mls | Bin 0 -> 1092 bytes libs/wire-api/test/unit/Test/Wire/API/MLS.hs | 60 ++++++- libs/wire-api/wire-api.cabal | 5 + .../Brig/API/MLS/KeyPackages/Validation.hs | 3 +- services/brig/test/unit/Test/Brig/MLS.hs | 23 ++- 17 files changed, 550 insertions(+), 63 deletions(-) create mode 100644 changelog.d/5-internal/mls-messages create mode 100644 libs/wire-api/src/Wire/API/MLS/Commit.hs create mode 100644 libs/wire-api/src/Wire/API/MLS/Group.hs create mode 100644 libs/wire-api/src/Wire/API/MLS/Message.hs create mode 100644 libs/wire-api/src/Wire/API/MLS/Welcome.hs create mode 100644 libs/wire-api/test/resources/app_message1.mls create mode 100644 libs/wire-api/test/resources/commit1.mls create mode 100644 libs/wire-api/test/resources/welcome1.mls diff --git a/changelog.d/5-internal/mls-messages b/changelog.d/5-internal/mls-messages new file mode 100644 index 0000000000..45f0812ab0 --- /dev/null +++ b/changelog.d/5-internal/mls-messages @@ -0,0 +1 @@ +Add MLS message types and corresponding deserialisers diff --git a/libs/wire-api/package.yaml b/libs/wire-api/package.yaml index 2620d9b381..f3d687cb89 100644 --- a/libs/wire-api/package.yaml +++ b/libs/wire-api/package.yaml @@ -114,6 +114,7 @@ tests: - cassava - currency-codes - directory + - either - hex - iso3166-country-codes - iso639 diff --git a/libs/wire-api/src/Wire/API/MLS/Commit.hs b/libs/wire-api/src/Wire/API/MLS/Commit.hs new file mode 100644 index 0000000000..22c14dda9d --- /dev/null +++ b/libs/wire-api/src/Wire/API/MLS/Commit.hs @@ -0,0 +1,55 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + +module Wire.API.MLS.Commit where + +import Imports +import Wire.API.MLS.KeyPackage +import Wire.API.MLS.Proposal +import Wire.API.MLS.Serialisation + +data Commit = Commit + { cProposals :: [ProposalOrRef], + cPath :: Maybe UpdatePath + } + +instance ParseMLS Commit where + parseMLS = Commit <$> parseMLSVector @Word32 parseMLS <*> parseMLSOptional parseMLS + +data UpdatePath = UpdatePath + { upLeaf :: KeyPackage, + upNodes :: [UpdatePathNode] + } + +instance ParseMLS UpdatePath where + parseMLS = UpdatePath <$> parseMLS <*> parseMLSVector @Word32 parseMLS + +data UpdatePathNode = UpdatePathNode + { upnPublicKey :: ByteString, + upnSecret :: [HPKECiphertext] + } + +instance ParseMLS UpdatePathNode where + parseMLS = UpdatePathNode <$> parseMLSBytes @Word16 <*> parseMLSVector @Word32 parseMLS + +data HPKECiphertext = HPKECiphertext + { hcOutput :: ByteString, + hcCiphertext :: ByteString + } + +instance ParseMLS HPKECiphertext where + parseMLS = HPKECiphertext <$> parseMLSBytes @Word16 <*> parseMLSBytes @Word16 diff --git a/libs/wire-api/src/Wire/API/MLS/Credential.hs b/libs/wire-api/src/Wire/API/MLS/Credential.hs index 2922ca76e4..2db0616336 100644 --- a/libs/wire-api/src/Wire/API/MLS/Credential.hs +++ b/libs/wire-api/src/Wire/API/MLS/Credential.hs @@ -43,21 +43,20 @@ data Credential = BasicCredential deriving stock (Eq, Show, Generic) deriving (Arbitrary) via GenericUniform Credential -data CredentialTag = ReservedCredentialTag | BasicCredentialTag - deriving stock (Enum, Bounded, Show) - deriving (ParseMLS) via (EnumMLS Word16 CredentialTag) +data CredentialTag = BasicCredentialTag + deriving stock (Enum, Bounded, Eq, Show) + +instance ParseMLS CredentialTag where + parseMLS = parseMLSEnum @Word16 "credential type" instance ParseMLS Credential where - parseMLS = do - tag <- parseMLS - case tag of + parseMLS = + parseMLS >>= \case BasicCredentialTag -> BasicCredential <$> parseMLSBytes @Word16 <*> parseMLS <*> parseMLSBytes @Word16 - ReservedCredentialTag -> - fail "Unexpected credential type" credentialTag :: Credential -> CredentialTag credentialTag (BasicCredential _ _ _) = BasicCredentialTag diff --git a/libs/wire-api/src/Wire/API/MLS/Group.hs b/libs/wire-api/src/Wire/API/MLS/Group.hs new file mode 100644 index 0000000000..f7a5d9d824 --- /dev/null +++ b/libs/wire-api/src/Wire/API/MLS/Group.hs @@ -0,0 +1,30 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + +module Wire.API.MLS.Group where + +import Imports +import Wire.API.MLS.Serialisation + +newtype GroupId = GroupId {unGroupId :: ByteString} + deriving (Eq, Show) + +instance IsString GroupId where + fromString = GroupId . fromString + +instance ParseMLS GroupId where + parseMLS = GroupId <$> parseMLSBytes @Word8 diff --git a/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs b/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs index bc4a8fa5ec..c8e7a88347 100644 --- a/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs +++ b/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs @@ -40,7 +40,6 @@ module Wire.API.MLS.KeyPackage decodeExtension, parseExtension, ExtensionTag (..), - ReservedExtensionTagSym0, CapabilitiesExtensionTagSym0, LifetimeExtensionTagSym0, SExtensionTag (..), @@ -56,7 +55,6 @@ module Wire.API.MLS.KeyPackage where import Control.Applicative -import Control.Error.Util import Control.Lens hiding (set, (.=)) import Data.Aeson (FromJSON, ToJSON) import Data.Binary @@ -156,20 +154,17 @@ instance ParseMLS Extension where parseMLS = Extension <$> parseMLS <*> parseMLSBytes @Word32 data ExtensionTag - = ReservedExtensionTag - | CapabilitiesExtensionTag + = CapabilitiesExtensionTag | LifetimeExtensionTag deriving (Bounded, Enum) $(genSingletons [''ExtensionTag]) type family ExtensionType (t :: ExtensionTag) :: * where - ExtensionType 'ReservedExtensionTag = () ExtensionType 'CapabilitiesExtensionTag = Capabilities ExtensionType 'LifetimeExtensionTag = Lifetime parseExtension :: Sing t -> Get (ExtensionType t) -parseExtension SReservedExtensionTag = pure () parseExtension SCapabilitiesExtensionTag = parseMLS parseExtension SLifetimeExtensionTag = parseMLS @@ -182,16 +177,16 @@ instance Eq SomeExtension where _ == _ = False instance Show SomeExtension where - show (SomeExtension SReservedExtensionTag _) = show () show (SomeExtension SCapabilitiesExtensionTag caps) = show caps show (SomeExtension SLifetimeExtensionTag lt) = show lt -decodeExtension :: Extension -> Maybe SomeExtension +decodeExtension :: Extension -> Either Text (Maybe SomeExtension) decodeExtension e = do - t <- safeToEnum (fromIntegral (extType e)) - hush $ - withSomeSing t $ \st -> - decodeMLSWith' (SomeExtension st <$> parseExtension st) (extData e) + case toMLSEnum' (extType e) of + Left MLSEnumUnkonwn -> pure Nothing + Left MLSEnumInvalid -> Left "Invalid extension type" + Right t -> withSomeSing t $ \st -> + Just <$> decodeMLSWith' (SomeExtension st <$> parseExtension st) (extData e) data Capabilities = Capabilities { capVersions :: [ProtocolVersion], @@ -234,7 +229,7 @@ data KeyPackageTBS = KeyPackageTBS kpCredential :: Credential, kpExtensions :: [Extension] } - deriving stock (Show, Generic) + deriving stock (Eq, Show, Generic) deriving (Arbitrary) via GenericUniform KeyPackageTBS instance ParseMLS KeyPackageTBS where @@ -250,10 +245,13 @@ data KeyPackage = KeyPackage { kpTBS :: KeyPackageTBS, kpSignature :: ByteString } - deriving (Show) + deriving stock (Eq, Show) newtype KeyPackageRef = KeyPackageRef {unKeyPackageRef :: ByteString} - deriving stock (Show) + deriving stock (Eq, Show) + +instance ParseMLS KeyPackageRef where + parseMLS = KeyPackageRef <$> getByteString 16 kpRef :: CipherSuiteTag -> KeyPackageData -> KeyPackageRef kpRef cs = diff --git a/libs/wire-api/src/Wire/API/MLS/Message.hs b/libs/wire-api/src/Wire/API/MLS/Message.hs new file mode 100644 index 0000000000..03d37e407f --- /dev/null +++ b/libs/wire-api/src/Wire/API/MLS/Message.hs @@ -0,0 +1,154 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} + +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + +module Wire.API.MLS.Message + ( Message (..), + WireFormatTag (..), + SWireFormatTag (..), + SomeMessage (..), + ContentType (..), + MessagePayload (..), + MessagePayloadTBS (..), + Sender (..), + MLSPlainTextSym0, + MLSCipherTextSym0, + ) +where + +import Data.Binary +import Data.Singletons.TH +import Imports +import Wire.API.MLS.Commit +import Wire.API.MLS.Group +import Wire.API.MLS.KeyPackage +import Wire.API.MLS.Proposal +import Wire.API.MLS.Serialisation + +data WireFormatTag = MLSPlainText | MLSCipherText + deriving (Bounded, Enum, Eq, Show) + +$(genSingletons [''WireFormatTag]) + +instance ParseMLS WireFormatTag where + parseMLS = parseMLSEnum @Word8 "wire format" + +data Message (tag :: WireFormatTag) = Message + { msgGroupId :: GroupId, + msgEpoch :: Word64, + msgAuthData :: ByteString, + msgSender :: Sender tag, + msgPayload :: MessagePayload tag + } + +instance ParseMLS (Message 'MLSPlainText) where + parseMLS = do + g <- parseMLS + e <- parseMLS + s <- parseMLS + d <- parseMLSBytes @Word32 + p <- parseMLS + pure (Message g e d s p) + +instance ParseMLS (Message 'MLSCipherText) where + parseMLS = do + g <- parseMLS + e <- parseMLS + ct <- parseMLS + d <- parseMLSBytes @Word32 + s <- parseMLS + p <- parseMLSBytes @Word32 + pure $ Message g e d s (CipherText ct p) + +data SomeMessage where + SomeMessage :: Sing tag -> Message tag -> SomeMessage + +instance ParseMLS SomeMessage where + parseMLS = + parseMLS >>= \case + MLSPlainText -> SomeMessage SMLSPlainText <$> parseMLS + MLSCipherText -> SomeMessage SMLSCipherText <$> parseMLS + +data family Sender (tag :: WireFormatTag) :: * + +data instance Sender 'MLSCipherText = EncryptedSender {esData :: ByteString} + +instance ParseMLS (Sender 'MLSCipherText) where + parseMLS = EncryptedSender <$> parseMLSBytes @Word8 + +data SenderTag = MemberSenderTag | PreconfiguredSenderTag | NewMemberSenderTag + deriving (Bounded, Enum, Show, Eq) + +instance ParseMLS SenderTag where + parseMLS = parseMLSEnum @Word8 "sender type" + +data instance Sender 'MLSPlainText + = MemberSender KeyPackageRef + | PreconfiguredSender ByteString + | NewMemberSender + +instance ParseMLS (Sender 'MLSPlainText) where + parseMLS = + parseMLS >>= \case + MemberSenderTag -> MemberSender <$> parseMLS + PreconfiguredSenderTag -> PreconfiguredSender <$> parseMLSBytes @Word8 + NewMemberSenderTag -> pure NewMemberSender + +data family MessagePayload (tag :: WireFormatTag) :: * + +data instance MessagePayload 'MLSCipherText = CipherText + { msgContentType :: Word8, + msgCipherText :: ByteString + } + +data instance MessagePayload 'MLSPlainText = MessagePayload + { msgTBS :: MessagePayloadTBS, + msgSignature :: ByteString, + msgConfirmation :: Maybe ByteString, + msgMembership :: Maybe ByteString + } + +instance ParseMLS (MessagePayload 'MLSPlainText) where + parseMLS = + MessagePayload + <$> parseMLS + <*> parseMLSBytes @Word16 + <*> parseMLSOptional (parseMLSBytes @Word8) + <*> parseMLSOptional (parseMLSBytes @Word8) + +data MessagePayloadTBS + = ApplicationMessage ByteString + | ProposalMessage Proposal + | CommitMessage Commit + +data ContentType + = ApplicationMessageTag + | ProposalMessageTag + | CommitMessageTag + deriving (Bounded, Enum, Eq, Show) + +instance ParseMLS ContentType where + parseMLS = parseMLSEnum @Word8 "content type" + +instance ParseMLS MessagePayloadTBS where + parseMLS = + parseMLS >>= \case + ApplicationMessageTag -> ApplicationMessage <$> parseMLSBytes @Word32 + ProposalMessageTag -> ProposalMessage <$> parseMLS + CommitMessageTag -> CommitMessage <$> parseMLS diff --git a/libs/wire-api/src/Wire/API/MLS/Proposal.hs b/libs/wire-api/src/Wire/API/MLS/Proposal.hs index abfc1553eb..801ff69bbf 100644 --- a/libs/wire-api/src/Wire/API/MLS/Proposal.hs +++ b/libs/wire-api/src/Wire/API/MLS/Proposal.hs @@ -18,20 +18,130 @@ module Wire.API.MLS.Proposal where import Data.Binary +import Data.Binary.Get import Imports import Wire.API.Arbitrary +import Wire.API.MLS.CipherSuite +import Wire.API.MLS.Group +import Wire.API.MLS.KeyPackage import Wire.API.MLS.Serialisation -data ProposalType - = AddProposal - | UpdateProposal - | RemoveProposal - | PreSharedKeyProposal - | ReInitProposal - | ExternalInitProposal - | AppAckProposal - | GroupContextExtensionsProposal - | ExternalProposal +data ProposalTag + = AddProposalTag + | UpdateProposalTag + | RemoveProposalTag + | PreSharedKeyProposalTag + | ReInitProposalTag + | ExternalInitProposalTag + | AppAckProposalTag + | GroupContextExtensionsProposalTag deriving stock (Bounded, Enum, Eq, Generic, Show) - deriving (ParseMLS) via (EnumMLS Word16 ProposalType) - deriving (Arbitrary) via GenericUniform ProposalType + deriving (Arbitrary) via GenericUniform ProposalTag + +instance ParseMLS ProposalTag where + parseMLS = parseMLSEnum @Word16 "proposal type" + +data Proposal + = AddProposal KeyPackage + | UpdateProposal KeyPackage + | RemoveProposal KeyPackageRef + | PreSharedKeyProposal PreSharedKeyID + | ReInitProposal ReInit + | ExternalInitProposal ByteString + | AppAckProposal [MessageRange] + | GroupContextExtensionsProposal [Extension] + deriving stock (Eq, Show) + +instance ParseMLS Proposal where + parseMLS = + parseMLS >>= \case + AddProposalTag -> AddProposal <$> parseMLS + UpdateProposalTag -> UpdateProposal <$> parseMLS + RemoveProposalTag -> RemoveProposal <$> parseMLS + PreSharedKeyProposalTag -> PreSharedKeyProposal <$> parseMLS + ReInitProposalTag -> ReInitProposal <$> parseMLS + ExternalInitProposalTag -> ExternalInitProposal <$> parseMLSBytes @Word16 + AppAckProposalTag -> AppAckProposal <$> parseMLSVector @Word32 parseMLS + GroupContextExtensionsProposalTag -> + GroupContextExtensionsProposal <$> parseMLSVector @Word32 parseMLS + +data PreSharedKeyTag = ExternalKeyTag | ResumptionKeyTag + deriving (Bounded, Enum, Eq, Show) + +instance ParseMLS PreSharedKeyTag where + parseMLS = parseMLSEnum @Word16 "PreSharedKeyID type" + +data PreSharedKeyID = ExternalKeyID ByteString | ResumptionKeyID Resumption + deriving stock (Eq, Show) + +instance ParseMLS PreSharedKeyID where + parseMLS = do + t <- parseMLS + case t of + ExternalKeyTag -> ExternalKeyID <$> parseMLSBytes @Word8 + ResumptionKeyTag -> ResumptionKeyID <$> parseMLS + +data Resumption = Resumption + { resUsage :: Word8, + resGroupId :: GroupId, + resEpoch :: Word64 + } + deriving stock (Eq, Show) + +instance ParseMLS Resumption where + parseMLS = + Resumption + <$> parseMLS + <*> parseMLS + <*> parseMLS + +data ReInit = ReInit + { riGroupId :: GroupId, + riProtocolVersion :: ProtocolVersion, + riCipherSuite :: CipherSuite, + riExtensions :: [Extension] + } + deriving stock (Eq, Show) + +instance ParseMLS ReInit where + parseMLS = + ReInit + <$> parseMLS + <*> parseMLS + <*> parseMLS + <*> parseMLSVector @Word32 parseMLS + +data MessageRange = MessageRange + { mrSender :: KeyPackageRef, + mrFirstGeneration :: Word32, + mrLastGenereation :: Word32 + } + deriving stock (Eq, Show) + +instance ParseMLS MessageRange where + parseMLS = + MessageRange + <$> parseMLS + <*> parseMLS + <*> parseMLS + +data ProposalOrRefTag = InlineTag | RefTag + deriving stock (Bounded, Enum, Eq, Show) + +instance ParseMLS ProposalOrRefTag where + parseMLS = parseMLSEnum @Word8 "ProposalOrRef type" + +data ProposalOrRef = Inline Proposal | Ref ProposalRef + deriving stock (Eq, Show) + +instance ParseMLS ProposalOrRef where + parseMLS = + parseMLS >>= \case + InlineTag -> Inline <$> parseMLS + RefTag -> Ref <$> parseMLS + +newtype ProposalRef = ProposalRef {unProposalRef :: ByteString} + deriving stock (Eq, Show) + +instance ParseMLS ProposalRef where + parseMLS = ProposalRef <$> getByteString 16 diff --git a/libs/wire-api/src/Wire/API/MLS/Serialisation.hs b/libs/wire-api/src/Wire/API/MLS/Serialisation.hs index f773e8fa2e..cc6db424ef 100644 --- a/libs/wire-api/src/Wire/API/MLS/Serialisation.hs +++ b/libs/wire-api/src/Wire/API/MLS/Serialisation.hs @@ -19,9 +19,13 @@ module Wire.API.MLS.Serialisation ( ParseMLS (..), parseMLSVector, parseMLSBytes, + parseMLSOptional, + parseMLSEnum, BinaryMLS (..), - EnumMLS (..), - safeToEnum, + MLSEnumError (..), + fromMLSEnum, + toMLSEnum', + toMLSEnum, decodeMLS, decodeMLS', decodeMLSWith, @@ -58,6 +62,40 @@ parseMLSBytes = do len <- fromIntegral <$> get @w getByteString len +parseMLSOptional :: Get a -> Get (Maybe a) +parseMLSOptional g = do + b <- getWord8 + sequenceA $ guard (b /= 0) $> g + +-- | Parse a positive tag for an enumeration. The value 0 is considered +-- "reserved", and all other values are shifted down by 1 to get the +-- corresponding enumeration index. This makes it possible to parse enumeration +-- types that don't contain an explicit constructor for a "reserved" value. +parseMLSEnum :: + forall (w :: *) a. + (Bounded a, Enum a, Integral w, Binary w) => + String -> + Get a +parseMLSEnum name = toMLSEnum name =<< get @w + +data MLSEnumError = MLSEnumUnkonwn | MLSEnumInvalid + +toMLSEnum' :: forall a w. (Bounded a, Enum a, Integral w) => w -> Either MLSEnumError a +toMLSEnum' w = case fromIntegral w - 1 of + n + | n < 0 -> Left MLSEnumInvalid + | n < fromEnum @a minBound || n > fromEnum @a maxBound -> Left MLSEnumUnkonwn + | otherwise -> pure (toEnum n) + +toMLSEnum :: forall a w f. (Bounded a, Enum a, MonadFail f, Integral w) => String -> w -> f a +toMLSEnum name = either err pure . toMLSEnum' + where + err MLSEnumUnkonwn = fail $ "Unknown " <> name + err MLSEnumInvalid = fail $ "Invalid " <> name + +fromMLSEnum :: (Integral w, Enum a) => a -> w +fromMLSEnum = fromIntegral . succ . fromEnum + instance ParseMLS Word8 where parseMLS = get instance ParseMLS Word16 where parseMLS = get @@ -72,21 +110,6 @@ newtype BinaryMLS a = BinaryMLS a instance Binary a => ParseMLS (BinaryMLS a) where parseMLS = BinaryMLS <$> get --- | A wrapper to generate a 'Binary' instance for an enumerated type. -newtype EnumMLS w a = EnumMLS {unEnumMLS :: a} - -safeToEnum :: forall a f. (Bounded a, Enum a, MonadFail f) => Int -> f a -safeToEnum n - | n >= fromEnum @a minBound && n <= fromEnum @a maxBound = - pure (toEnum n) - | otherwise = - fail "Out of bound enumeration" - -instance (Binary w, Integral w, Bounded a, Enum a) => ParseMLS (EnumMLS w a) where - parseMLS = do - n <- fromIntegral <$> get @w - EnumMLS <$> safeToEnum n - -- | Decode an MLS value from a lazy bytestring. Return an error message in case of failure. decodeMLS :: ParseMLS a => LByteString -> Either Text a decodeMLS = decodeMLSWith parseMLS diff --git a/libs/wire-api/src/Wire/API/MLS/Welcome.hs b/libs/wire-api/src/Wire/API/MLS/Welcome.hs new file mode 100644 index 0000000000..76166969f4 --- /dev/null +++ b/libs/wire-api/src/Wire/API/MLS/Welcome.hs @@ -0,0 +1,47 @@ +-- This file is part of the Wire Server implementation. +-- +-- Copyright (C) 2022 Wire Swiss GmbH +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Affero General Public License as published by the Free +-- Software Foundation, either version 3 of the License, or (at your option) any +-- later version. +-- +-- This program is distributed in the hope that it will be useful, but WITHOUT +-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +-- details. +-- +-- You should have received a copy of the GNU Affero General Public License along +-- with this program. If not, see . + +module Wire.API.MLS.Welcome where + +import Imports +import Wire.API.MLS.CipherSuite +import Wire.API.MLS.Commit +import Wire.API.MLS.KeyPackage +import Wire.API.MLS.Serialisation + +data Welcome = Welcome + { welCipherSuite :: CipherSuite, + welSecrets :: [GroupSecrets], + welGroupInfo :: ByteString + } + +instance ParseMLS Welcome where + parseMLS = + Welcome + -- Note: the extra protocol version at the beginning of the welcome + -- message is present in openmls-0.4.0-pre, but is not part of the spec + <$> (parseMLS @ProtocolVersion *> parseMLS) + <*> parseMLSVector @Word32 parseMLS + <*> parseMLSBytes @Word32 + +data GroupSecrets = GroupSecrets + { gsNewMember :: KeyPackageRef, + gsSecrets :: HPKECiphertext + } + +instance ParseMLS GroupSecrets where + parseMLS = GroupSecrets <$> parseMLS <*> parseMLS diff --git a/libs/wire-api/test/resources/app_message1.mls b/libs/wire-api/test/resources/app_message1.mls new file mode 100644 index 0000000000000000000000000000000000000000..0426a5a98f1ee68545f4bb95182eae4f0c6970e5 GIT binary patch literal 170 zcmZSLDoHIaiBB)eFD+nz0!9$6p?UR3F>C#r{B1Aegl>Jm0@8Ue7*ab4$#;?C)>* zvZt5KIa_dK*Q&EXwJ91sjB`CS4xe3{->|sy%F5Y~Yxch{C~4ypQ<=43x!cr^wMm_~ z7w(++v-Hk literal 0 HcmV?d00001 diff --git a/libs/wire-api/test/resources/commit1.mls b/libs/wire-api/test/resources/commit1.mls new file mode 100644 index 0000000000000000000000000000000000000000..c8f40b1bf1310080c6a5066978df1505bc5ead12 GIT binary patch literal 883 zcmZSNDoHIaiBB)eFD+nz0!Ec58&)ta+9A)da((UBm$EBB;>-*Tj24Uxj6lSo5WiWn zRqNCF#eai*gMQ2J^7@o}q$6H^-o`nTW(vGnbVmWG#>m_v&CtNiAW7HK%py(K#N0Aj z*V5cPNjE9Q#LU9f+#too*x1UzA+;hgw;(4~FF8M#gPlR)sgP&hkLPb2oodS@Hz%Fb zTe;-?u8wn(!VG+t?6buU8-Xq<0J(+1gd7`y?qXn&Vq!eO#K6b~fY$jZmv3N9Ib_4K~QskglBU7L=oe>oo{)C4Vr&Mnor`MN&Zt$%vT zwdq;MBy+d* zn>I41+hq7OYPC$Bb!6W8^AlJZ6;khLND2N(eo)_cL%X=}w%n7)3BQ(@i_|VTo$uFo q??5P{!gjT!9}P0H^Ut-+H&Yy1J5MKbCD literal 0 HcmV?d00001 diff --git a/libs/wire-api/test/resources/welcome1.mls b/libs/wire-api/test/resources/welcome1.mls new file mode 100644 index 0000000000000000000000000000000000000000..0a628b1097e1c00bcc57de27f71884d24e51a76c GIT binary patch literal 1092 zcmV-K1iSkI009610Ew$cl5jkx)ersZt}vGPg~9+Jqafw2(uM1$7*asOSTB1^305ZyHE(wD%P`ugf*eKy{6z zGZ`R)a1}P9T5$>zBjBM$I0Ivu`pe~wkM0VBRcv;Zp;HZ4TLCX!;+U^h=1G+{v_V173)e14fmd2@( z7WZyX^rB8D{{zx?j%fGWfX7d<=dLD)0glW1ox9EW$w>zfp*soaigg9(=`JjnAJ5T?w5=sjCAg;w6V13*4qe?5`Fe zrJEyq{xXxcO^n`qE`~_xMA|J*)RZ3WkKk7Y8m^@R50s;ouYHDqR{L=a&Ny1VCpq6k zzWg^A?gx|pF6*M=+hy|xNw z3uRf1y@y3Txc+;?Ch|QSxT%M2`&6|MGhR2A8L9Qo#xQ?>t5^pEQqT>*PaEgQ|eU}kk2cb`(VZyZ_iJQ`Wp*Nh8u>} zdzy{;HDm!{5-$(-v<|3Wm#%0xSoFTfD1SDqBS@w6G*n4|$DiYXNmirf5KxFag8`6De?0@%z(C)kXcpg1u~}Bo Kt6o-+%^##L-VKic literal 0 HcmV?d00001 diff --git a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs index 662b94662a..9302b91079 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs @@ -20,6 +20,8 @@ module Test.Wire.API.MLS where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import Data.Domain +import Data.Either.Combinators +import Data.Hex import Data.Id import qualified Data.Text as T import qualified Data.UUID as UUID @@ -27,14 +29,21 @@ import Imports import Test.Tasty import Test.Tasty.HUnit import Wire.API.MLS.CipherSuite +import Wire.API.MLS.Commit import Wire.API.MLS.Credential import Wire.API.MLS.KeyPackage +import Wire.API.MLS.Message +import Wire.API.MLS.Proposal import Wire.API.MLS.Serialisation +import Wire.API.MLS.Welcome tests :: TestTree tests = testGroup "MLS" $ - [ testCase "parse key packages" testParseKeyPackage + [ testCase "parse key package" testParseKeyPackage, + testCase "parse commit message" testParseCommit, + testCase "parse application message" testParseApplication, + testCase "parse welcome message" testParseWelcome ] testParseKeyPackage :: IO () @@ -55,3 +64,52 @@ testParseKeyPackage = do ciUser = Id (fromJust (UUID.fromString "b455a431-9db6-4404-86e7-6a3ebe73fcaf")), ciClient = newClientId 0x3ae58155 } + +testParseCommit :: IO () +testParseCommit = do + msgData <- LBS.readFile "test/resources/commit1.mls" + msg :: Message 'MLSPlainText <- case decodeMLS @SomeMessage msgData of + Left err -> assertFailure (T.unpack err) + Right (SomeMessage SMLSCipherText _) -> + assertFailure "Expected plain text message, found encrypted" + Right (SomeMessage SMLSPlainText msg) -> + pure msg + + msgGroupId msg @?= "test_group" + msgEpoch msg @?= 0 + + case msgSender msg of + MemberSender kp -> kp @?= KeyPackageRef (fromRight' (unhex "24e4b0a802a2b81f00a9af7df5e91da8")) + _ -> assertFailure "Unexpected sender type" + + let payload = msgPayload msg + commit <- case msgTBS payload of + CommitMessage c -> pure c + _ -> assertFailure "Unexpected message type" + + case cProposals commit of + [Inline (AddProposal _)] -> pure () + _ -> assertFailure "Unexpected proposals" + +testParseApplication :: IO () +testParseApplication = do + msgData <- LBS.readFile "test/resources/app_message1.mls" + msg :: Message 'MLSCipherText <- case decodeMLS @SomeMessage msgData of + Left err -> assertFailure (T.unpack err) + Right (SomeMessage SMLSCipherText msg) -> pure msg + Right (SomeMessage SMLSPlainText _) -> + assertFailure "Expected encrypted message, found plain text" + + msgGroupId msg @?= "test_group" + msgEpoch msg @?= 0 + msgContentType (msgPayload msg) @?= fromMLSEnum ApplicationMessageTag + +testParseWelcome :: IO () +testParseWelcome = do + welData <- LBS.readFile "test/resources/welcome1.mls" + wel <- case decodeMLS welData of + Left err -> assertFailure (T.unpack err) + Right x -> pure x + + welCipherSuite wel @?= CipherSuite 1 + map gsNewMember (welSecrets wel) @?= [KeyPackageRef (fromRight' (unhex "ab4692703ca6d50ffdeaae3096f885c2"))] diff --git a/libs/wire-api/wire-api.cabal b/libs/wire-api/wire-api.cabal index caabffd61a..9de414542f 100644 --- a/libs/wire-api/wire-api.cabal +++ b/libs/wire-api/wire-api.cabal @@ -37,11 +37,15 @@ library Wire.API.Message Wire.API.Message.Proto Wire.API.MLS.CipherSuite + Wire.API.MLS.Commit Wire.API.MLS.Credential + Wire.API.MLS.Group Wire.API.MLS.KeyPackage + Wire.API.MLS.Message Wire.API.MLS.Proposal Wire.API.MLS.Serialisation Wire.API.MLS.Servant + Wire.API.MLS.Welcome Wire.API.Notification Wire.API.Properties Wire.API.Provider @@ -642,6 +646,7 @@ test-suite wire-api-tests , containers >=0.5 , currency-codes , directory + , either , filepath , hex , hscim diff --git a/services/brig/src/Brig/API/MLS/KeyPackages/Validation.hs b/services/brig/src/Brig/API/MLS/KeyPackages/Validation.hs index cb9b600ee9..83a9f1e94e 100644 --- a/services/brig/src/Brig/API/MLS/KeyPackages/Validation.hs +++ b/services/brig/src/Brig/API/MLS/KeyPackages/Validation.hs @@ -107,10 +107,9 @@ findExtensions :: [Extension] -> Either Text (RequiredExtensions Identity) findExtensions = (checkRequiredExtensions =<<) . getAp . foldMap findExtension findExtension :: Extension -> Ap (Either Text) (RequiredExtensions Maybe) -findExtension ext = flip foldMap (decodeExtension ext) $ \case +findExtension ext = (Ap (decodeExtension ext) >>=) . foldMap $ \case (SomeExtension SLifetimeExtensionTag lt) -> pure $ RequiredExtensions (Just lt) Nothing (SomeExtension SCapabilitiesExtensionTag _) -> pure $ RequiredExtensions Nothing (Just ()) - _ -> Ap (Left "Invalid extension") validateExtensions :: [Extension] -> Handler r () validateExtensions exts = do diff --git a/services/brig/test/unit/Test/Brig/MLS.hs b/services/brig/test/unit/Test/Brig/MLS.hs index f38e8e4852..de7dc37bd8 100644 --- a/services/brig/test/unit/Test/Brig/MLS.hs +++ b/services/brig/test/unit/Test/Brig/MLS.hs @@ -28,6 +28,7 @@ import Test.Tasty import Test.Tasty.QuickCheck import Wire.API.MLS.CipherSuite import Wire.API.MLS.KeyPackage +import Wire.API.MLS.Serialisation -- | A lifetime with a length of at least 1 day. newtype ValidLifetime = ValidLifetime Lifetime @@ -61,14 +62,20 @@ newtype ValidExtensions = ValidExtensions [Extension] instance Show ValidExtensions where show (ValidExtensions exts) = "ValidExtensions (length " <> show (length exts) <> ")" +unknownExt :: Gen Extension +unknownExt = do + Positive t0 <- arbitrary + let t = t0 + fromEnum (maxBound :: ExtensionTag) + 1 + Extension (fromIntegral t) <$> arbitrary + -- | Generate a list of extensions containing all the required ones. instance Arbitrary ValidExtensions where arbitrary = do - exts0 <- listOf (arbitrary `suchThat` ((/= 0) . extType)) + exts0 <- listOf unknownExt LifetimeAndExtension ext1 _ <- arbitrary - exts2 <- listOf (arbitrary `suchThat` ((/= 0) . extType)) + exts2 <- listOf unknownExt CapabilitiesAndExtension ext3 _ <- arbitrary - exts4 <- listOf (arbitrary `suchThat` ((/= 0) . extType)) + exts4 <- listOf unknownExt pure . ValidExtensions $ exts0 <> [ext1] <> exts2 <> [ext3] <> exts4 newtype InvalidExtensions = InvalidExtensions [Extension] @@ -79,7 +86,7 @@ instance Show InvalidExtensions where instance Arbitrary InvalidExtensions where arbitrary = do - req <- fromIntegral . fromEnum <$> elements [LifetimeExtensionTag, CapabilitiesExtensionTag] + req <- fromMLSEnum <$> elements [LifetimeExtensionTag, CapabilitiesExtensionTag] InvalidExtensions <$> listOf (arbitrary `suchThat` ((/= req) . extType)) data LifetimeAndExtension = LifetimeAndExtension Extension Lifetime @@ -88,7 +95,7 @@ data LifetimeAndExtension = LifetimeAndExtension Extension Lifetime instance Arbitrary LifetimeAndExtension where arbitrary = do lt <- arbitrary - let ext = Extension (fromIntegral (fromEnum LifetimeExtensionTag)) . LBS.toStrict . runPut $ do + let ext = Extension (fromIntegral (fromEnum LifetimeExtensionTag + 1)) . LBS.toStrict . runPut $ do put (timestampSeconds (ltNotBefore lt)) put (timestampSeconds (ltNotAfter lt)) pure $ LifetimeAndExtension ext lt @@ -99,7 +106,7 @@ data CapabilitiesAndExtension = CapabilitiesAndExtension Extension Capabilities instance Arbitrary CapabilitiesAndExtension where arbitrary = do caps <- arbitrary - let ext = Extension (fromIntegral (fromEnum CapabilitiesExtensionTag)) . LBS.toStrict . runPut $ do + let ext = Extension (fromIntegral (fromEnum CapabilitiesExtensionTag + 1)) . LBS.toStrict . runPut $ do putWord8 (fromIntegral (length (capVersions caps))) traverse_ (putWord8 . pvNumber) (capVersions caps) @@ -143,8 +150,8 @@ tests = testProperty "missing required extensions" $ \(InvalidExtensions exts) -> isLeft (findExtensions exts), testProperty "lifetime extension" $ \(LifetimeAndExtension ext lt) -> - decodeExtension ext == Just (SomeExtension SLifetimeExtensionTag lt), + decodeExtension ext == Right (Just (SomeExtension SLifetimeExtensionTag lt)), testProperty "capabilities extension" $ \(CapabilitiesAndExtension ext caps) -> - decodeExtension ext == Just (SomeExtension SCapabilitiesExtensionTag caps) + decodeExtension ext == Right (Just (SomeExtension SCapabilitiesExtensionTag caps)) ] ] From ae730d245bbef81d566f90c7ec7479d67f8bc77a Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Fri, 4 Mar 2022 08:29:55 +0100 Subject: [PATCH 06/13] Strongly typed asset keys (#2162) * use assetkey type in imageasset * fix build integration tests * moved cql instance for assetkey * changelog * tweak changelog. * asset key cql instance handle invalid keys in db * comment * use Icon/AssetKey in team and user profile (wire-api changes only) * Cassandra Icon instance * fix integration test * fix galley integration tests * fix spar integration tests * format Co-authored-by: Matthias Fischmann --- changelog.d/5-internal/pr-2162 | 1 + libs/wire-api/src/Wire/API/Asset.hs | 6 +- libs/wire-api/src/Wire/API/Team.hs | 29 ++--- libs/wire-api/src/Wire/API/User/Profile.hs | 3 +- .../Golden/Generated/AddBotResponse_user.hs | 10 +- .../Generated/BindingNewTeamUser_user.hs | 12 +- .../Golden/Generated/BindingNewTeam_team.hs | 103 +++++------------- .../Wire/API/Golden/Generated/Event_team.hs | 16 ++- .../Generated/NewBotResponse_provider.hs | 65 +++++------ .../Golden/Generated/NewService_provider.hs | 51 +++++---- .../Golden/Generated/NewUserPublic_user.hs | 11 +- .../Wire/API/Golden/Generated/NewUser_user.hs | 13 +-- .../Generated/ServiceProfilePage_provider.hs | 3 +- .../Generated/ServiceProfile_provider.hs | 37 ++++--- .../API/Golden/Generated/Service_provider.hs | 45 ++++---- .../API/Golden/Generated/TeamList_team.hs | 89 +++++++-------- .../Wire/API/Golden/Generated/Team_team.hs | 43 ++++---- .../Generated/UpdateService_provider.hs | 81 +++++++------- .../API/Golden/Generated/UserUpdate_user.hs | 7 +- .../Generated/User_2eProfile_2eAsset_user.hs | 45 ++++---- .../Wire/API/Golden/Generated/User_user.hs | 7 +- .../testObject_NewUserPublic_user_1-2.json | 6 +- .../testObject_NewUserPublic_user_1-3.json | 6 +- .../testObject_AddBotResponse_user_1.json | 4 +- .../testObject_BindingNewTeamUser_user_1.json | 2 +- .../testObject_BindingNewTeamUser_user_2.json | 2 +- .../testObject_BindingNewTeam_team_1.json | 2 +- .../testObject_BindingNewTeam_team_10.json | 2 +- .../testObject_BindingNewTeam_team_11.json | 2 +- .../testObject_BindingNewTeam_team_12.json | 2 +- .../testObject_BindingNewTeam_team_13.json | 2 +- .../testObject_BindingNewTeam_team_14.json | 2 +- .../testObject_BindingNewTeam_team_15.json | 2 +- .../testObject_BindingNewTeam_team_16.json | 2 +- .../testObject_BindingNewTeam_team_17.json | 2 +- .../testObject_BindingNewTeam_team_18.json | 2 +- .../testObject_BindingNewTeam_team_19.json | 2 +- .../testObject_BindingNewTeam_team_2.json | 2 +- .../testObject_BindingNewTeam_team_20.json | 2 +- .../testObject_BindingNewTeam_team_3.json | 2 +- .../testObject_BindingNewTeam_team_4.json | 2 +- .../testObject_BindingNewTeam_team_5.json | 2 +- .../testObject_BindingNewTeam_team_6.json | 2 +- .../testObject_BindingNewTeam_team_7.json | 2 +- .../testObject_BindingNewTeam_team_8.json | 2 +- .../testObject_BindingNewTeam_team_9.json | 2 +- .../test/golden/testObject_Event_team_1.json | 2 +- .../test/golden/testObject_Event_team_13.json | 2 +- ...testObject_NewBotResponse_provider_10.json | 2 +- ...testObject_NewBotResponse_provider_13.json | 12 +- ...testObject_NewBotResponse_provider_16.json | 7 +- ...testObject_NewBotResponse_provider_18.json | 6 +- ...testObject_NewBotResponse_provider_19.json | 10 +- .../testObject_NewBotResponse_provider_2.json | 8 +- ...testObject_NewBotResponse_provider_20.json | 6 +- .../testObject_NewBotResponse_provider_3.json | 6 +- .../testObject_NewBotResponse_provider_8.json | 8 +- .../testObject_NewService_provider_10.json | 11 +- .../testObject_NewService_provider_11.json | 11 +- .../testObject_NewService_provider_12.json | 2 +- .../testObject_NewService_provider_13.json | 2 +- .../testObject_NewService_provider_14.json | 2 +- .../testObject_NewService_provider_15.json | 7 +- .../testObject_NewService_provider_16.json | 8 +- .../testObject_NewService_provider_18.json | 10 +- .../testObject_NewService_provider_19.json | 2 +- .../testObject_NewService_provider_20.json | 2 +- .../testObject_NewService_provider_4.json | 12 +- .../testObject_NewService_provider_5.json | 12 +- .../testObject_NewService_provider_6.json | 2 +- .../testObject_NewService_provider_7.json | 2 +- .../testObject_NewService_provider_8.json | 7 +- .../testObject_NewUserPublic_user_1.json | 6 +- .../golden/testObject_NewUser_user_1.json | 6 +- .../golden/testObject_NewUser_user_7.json | 2 +- ...Object_ServiceProfilePage_provider_11.json | 2 +- .../testObject_ServiceProfile_provider_1.json | 2 +- ...testObject_ServiceProfile_provider_10.json | 7 +- ...testObject_ServiceProfile_provider_13.json | 2 +- ...testObject_ServiceProfile_provider_15.json | 2 +- ...testObject_ServiceProfile_provider_16.json | 7 +- ...testObject_ServiceProfile_provider_17.json | 7 +- .../testObject_ServiceProfile_provider_2.json | 8 +- .../testObject_ServiceProfile_provider_3.json | 6 +- .../testObject_ServiceProfile_provider_4.json | 2 +- .../testObject_ServiceProfile_provider_6.json | 10 +- .../testObject_ServiceProfile_provider_9.json | 2 +- .../testObject_Service_provider_11.json | 7 +- .../testObject_Service_provider_12.json | 6 +- .../testObject_Service_provider_13.json | 2 +- .../testObject_Service_provider_14.json | 2 +- .../testObject_Service_provider_15.json | 14 +-- .../testObject_Service_provider_16.json | 6 +- .../golden/testObject_Service_provider_2.json | 7 +- .../golden/testObject_Service_provider_4.json | 2 +- .../golden/testObject_Service_provider_6.json | 10 +- .../golden/testObject_Service_provider_7.json | 2 +- .../golden/testObject_TeamList_team_1.json | 6 +- .../golden/testObject_TeamList_team_12.json | 2 +- .../golden/testObject_TeamList_team_14.json | 12 +- .../golden/testObject_TeamList_team_15.json | 10 +- .../golden/testObject_TeamList_team_16.json | 2 +- .../golden/testObject_TeamList_team_18.json | 2 +- .../golden/testObject_TeamList_team_19.json | 2 +- .../golden/testObject_TeamList_team_2.json | 4 +- .../golden/testObject_TeamList_team_20.json | 8 +- .../golden/testObject_TeamList_team_3.json | 2 +- .../golden/testObject_TeamList_team_4.json | 4 +- .../golden/testObject_TeamList_team_5.json | 14 +-- .../golden/testObject_TeamList_team_6.json | 2 +- .../golden/testObject_TeamList_team_7.json | 4 +- .../golden/testObject_TeamList_team_9.json | 12 +- .../test/golden/testObject_Team_team_1.json | 2 +- .../test/golden/testObject_Team_team_10.json | 2 +- .../test/golden/testObject_Team_team_11.json | 2 +- .../test/golden/testObject_Team_team_12.json | 2 +- .../test/golden/testObject_Team_team_13.json | 2 +- .../test/golden/testObject_Team_team_14.json | 2 +- .../test/golden/testObject_Team_team_15.json | 2 +- .../test/golden/testObject_Team_team_16.json | 2 +- .../test/golden/testObject_Team_team_17.json | 2 +- .../test/golden/testObject_Team_team_18.json | 2 +- .../test/golden/testObject_Team_team_19.json | 2 +- .../test/golden/testObject_Team_team_2.json | 2 +- .../test/golden/testObject_Team_team_20.json | 2 +- .../test/golden/testObject_Team_team_3.json | 2 +- .../test/golden/testObject_Team_team_4.json | 2 +- .../test/golden/testObject_Team_team_5.json | 2 +- .../test/golden/testObject_Team_team_6.json | 2 +- .../test/golden/testObject_Team_team_7.json | 2 +- .../test/golden/testObject_Team_team_8.json | 2 +- .../test/golden/testObject_Team_team_9.json | 2 +- .../testObject_UpdateService_provider_1.json | 2 +- .../testObject_UpdateService_provider_11.json | 6 +- .../testObject_UpdateService_provider_12.json | 2 +- .../testObject_UpdateService_provider_15.json | 2 +- .../testObject_UpdateService_provider_17.json | 2 +- .../testObject_UpdateService_provider_18.json | 7 +- .../testObject_UpdateService_provider_19.json | 12 +- .../testObject_UpdateService_provider_2.json | 8 +- .../testObject_UpdateService_provider_20.json | 6 +- .../testObject_UpdateService_provider_3.json | 6 +- .../testObject_UpdateService_provider_4.json | 7 +- .../testObject_UpdateService_provider_5.json | 12 +- .../testObject_UpdateService_provider_6.json | 2 +- .../testObject_UpdateService_provider_9.json | 12 +- .../golden/testObject_UserUpdate_user_2.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_1.json | 2 +- ...Object_User_2eProfile_2eAsset_user_10.json | 2 +- ...Object_User_2eProfile_2eAsset_user_11.json | 2 +- ...Object_User_2eProfile_2eAsset_user_12.json | 2 +- ...Object_User_2eProfile_2eAsset_user_13.json | 2 +- ...Object_User_2eProfile_2eAsset_user_14.json | 2 +- ...Object_User_2eProfile_2eAsset_user_15.json | 2 +- ...Object_User_2eProfile_2eAsset_user_16.json | 2 +- ...Object_User_2eProfile_2eAsset_user_17.json | 2 +- ...Object_User_2eProfile_2eAsset_user_18.json | 2 +- ...Object_User_2eProfile_2eAsset_user_19.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_2.json | 2 +- ...Object_User_2eProfile_2eAsset_user_20.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_3.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_4.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_5.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_6.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_7.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_8.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_9.json | 2 +- .../test/golden/testObject_User_user_2.json | 6 +- services/brig/src/Brig/Data/Instances.hs | 13 ++- .../brig/test/integration/API/Provider.hs | 7 +- services/brig/test/integration/API/Team.hs | 4 +- .../brig/test/integration/API/Team/Util.hs | 3 +- .../brig/test/integration/API/User/Account.hs | 10 +- .../integration/API/UserPendingActivation.hs | 3 +- .../galley/src/Galley/Cassandra/Instances.hs | 9 ++ .../galley/src/Galley/Cassandra/Queries.hs | 5 +- services/galley/src/Galley/Cassandra/Team.hs | 5 +- .../galley/src/Galley/Effects/TeamStore.hs | 3 +- services/galley/test/integration/API/Teams.hs | 3 +- services/galley/test/integration/API/Util.hs | 7 +- services/spar/test-integration/Util/Core.hs | 3 +- 181 files changed, 654 insertions(+), 708 deletions(-) create mode 100644 changelog.d/5-internal/pr-2162 diff --git a/changelog.d/5-internal/pr-2162 b/changelog.d/5-internal/pr-2162 new file mode 100644 index 0000000000..6663254a9c --- /dev/null +++ b/changelog.d/5-internal/pr-2162 @@ -0,0 +1 @@ +Asset keys are now internally validated. diff --git a/libs/wire-api/src/Wire/API/Asset.hs b/libs/wire-api/src/Wire/API/Asset.hs index a1c37b9c5c..834a201dcd 100644 --- a/libs/wire-api/src/Wire/API/Asset.hs +++ b/libs/wire-api/src/Wire/API/Asset.hs @@ -31,6 +31,7 @@ module Wire.API.Asset -- * AssetKey AssetKey (..), assetKeyToText, + nilAssetKey, -- * AssetToken AssetToken (..), @@ -176,7 +177,7 @@ assetKeyToText = T.decodeUtf8 . toByteString' instance ToSchema AssetKey where schema = - (T.decodeUtf8 . toByteString') + assetKeyToText .= parsedText "AssetKey" (runParser parser . T.encodeUtf8) & doc' . S.schema . S.example ?~ toJSON ("3-1-47de4580-ae51-4650-acbb-d10c028cb0ac" :: Text) @@ -186,6 +187,9 @@ instance S.ToParamSchema AssetKey where instance FromHttpApiData AssetKey where parseUrlPiece = first T.pack . runParser parser . T.encodeUtf8 +nilAssetKey :: AssetKey +nilAssetKey = AssetKeyV3 (Id UUID.nil) AssetVolatile + -------------------------------------------------------------------------------- -- AssetToken diff --git a/libs/wire-api/src/Wire/API/Team.hs b/libs/wire-api/src/Wire/API/Team.hs index 8fb331559c..c1e192c366 100644 --- a/libs/wire-api/src/Wire/API/Team.hs +++ b/libs/wire-api/src/Wire/API/Team.hs @@ -30,6 +30,7 @@ module Wire.API.Team teamIconKey, teamBinding, TeamBinding (..), + Icon (..), -- * TeamList TeamList (..), @@ -95,7 +96,7 @@ data Team = Team { _teamId :: TeamId, _teamCreator :: UserId, _teamName :: Text, - _teamIcon :: Text, + _teamIcon :: Icon, _teamIconKey :: Maybe Text, _teamBinding :: TeamBinding } @@ -103,7 +104,7 @@ data Team = Team deriving (Arbitrary) via (GenericUniform Team) deriving (ToJSON, FromJSON, S.ToSchema) via (Schema Team) -newTeam :: TeamId -> UserId -> Text -> Text -> TeamBinding -> Team +newTeam :: TeamId -> UserId -> Text -> Icon -> TeamBinding -> Team newTeam tid uid nme ico = Team tid uid nme ico Nothing modelTeam :: Doc.Model @@ -230,14 +231,14 @@ modelNewNonBindingTeam = Doc.defineModel "newNonBindingTeam" $ do data NewTeam a = NewTeam { _newTeamName :: Range 1 256 Text, - _newTeamIcon :: Range 1 256 Text, + _newTeamIcon :: Icon, _newTeamIconKey :: Maybe (Range 1 256 Text), _newTeamMembers :: Maybe a } deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform (NewTeam a)) -newNewTeam :: Range 1 256 Text -> Range 1 256 Text -> NewTeam a +newNewTeam :: Range 1 256 Text -> Icon -> NewTeam a newNewTeam nme ico = NewTeam nme ico Nothing Nothing newTeamObjectSchema :: ValueSchema SwaggerDoc a -> ObjectSchema SwaggerDoc (NewTeam a) @@ -251,30 +252,30 @@ newTeamObjectSchema sch = -------------------------------------------------------------------------------- -- TeamUpdateData -data IconUpdate = IconUpdate AssetKey | DefaultIcon +data Icon = Icon AssetKey | DefaultIcon deriving stock (Eq, Show, Generic) - deriving (Arbitrary) via (GenericUniform IconUpdate) - deriving (ToJSON, FromJSON, S.ToSchema) via Schema IconUpdate + deriving (Arbitrary) via (GenericUniform Icon) + deriving (ToJSON, FromJSON, S.ToSchema) via Schema Icon -instance FromByteString IconUpdate where +instance FromByteString Icon where parser = choice - [ IconUpdate <$> (parser :: Atto.Parser AssetKey), + [ Icon <$> (parser :: Atto.Parser AssetKey), DefaultIcon <$ Atto.string "default" ] -instance ToByteString IconUpdate where - builder (IconUpdate key) = builder key +instance ToByteString Icon where + builder (Icon key) = builder key builder DefaultIcon = "default" -instance ToSchema IconUpdate where +instance ToSchema Icon where schema = (T.decodeUtf8 . toByteString') - .= parsedText "IconUpdate" (runParser parser . T.encodeUtf8) + .= parsedText "Icon" (runParser parser . T.encodeUtf8) data TeamUpdateData = TeamUpdateData { _nameUpdate :: Maybe (Range 1 256 Text), - _iconUpdate :: Maybe IconUpdate, + _iconUpdate :: Maybe Icon, _iconKeyUpdate :: Maybe (Range 1 256 Text) } deriving stock (Eq, Show, Generic) diff --git a/libs/wire-api/src/Wire/API/User/Profile.hs b/libs/wire-api/src/Wire/API/User/Profile.hs index 5327fce297..692220636a 100644 --- a/libs/wire-api/src/Wire/API/User/Profile.hs +++ b/libs/wire-api/src/Wire/API/User/Profile.hs @@ -69,6 +69,7 @@ import qualified Data.Swagger.Build.Api as Doc import qualified Data.Text as Text import Imports import Wire.API.Arbitrary (Arbitrary (arbitrary), GenericUniform (..)) +import Wire.API.Asset (AssetKey (..)) import Wire.API.User.Orphans () -------------------------------------------------------------------------------- @@ -106,7 +107,7 @@ defaultAccentId = ColourId 0 -- Note: Intended to be turned into a sum type to add further asset types. data Asset = ImageAsset - { assetKey :: Text, + { assetKey :: AssetKey, assetSize :: Maybe AssetSize } deriving stock (Eq, Show, Generic) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs index 93f6f0ade0..25ab06033c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs @@ -24,6 +24,7 @@ import Data.Id (BotId (BotId), ClientId (ClientId, client), Id (Id)) import Data.Qualified import qualified Data.UUID as UUID (fromString) import Imports (Maybe (Just, Nothing), fromJust, read, (.)) +import Wire.API.Asset import Wire.API.Conversation import Wire.API.Conversation.Bot import Wire.API.Conversation.Typing @@ -41,7 +42,14 @@ testObject_AddBotResponse_user_1 = "\77844\129468A\1061088\30365\142096\40918\USc\DC3~0g\ENQr\v\29872\f\154305\1077132u\175940.\1018427v\v-/\bi\bJ\ETXE3\ESC8\53613\1073036\&0@\14466\51733;\27113\SYN\153289\b&\ae]\1042471H\1024555k7\EMJ\1083646[;\140668;J^`0,B\STX\95353N.@Z\v\ENQ\r\19858|'w-\b\157432V\STX \GSW|N\1072850\&3=\22550K245\DC1\142803\168718\7168\147365\ETX" }, rsAddBotColour = ColourId {fromColourId = -3}, - rsAddBotAssets = [ImageAsset "7" Nothing, ImageAsset "" (Just AssetPreview)], + rsAddBotAssets = + [ ImageAsset + (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) + Nothing, + ImageAsset + (AssetKeyV3 (Id (fromJust (UUID.fromString "034efa97-f628-450e-b212-009801b1470b"))) AssetExpiring) + (Just AssetPreview) + ], rsAddBotEvent = Event (Qualified (Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000200000003"))) (Domain "faraway.example.com")) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs index 1eb13e0c5c..37dc8807bf 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs @@ -18,10 +18,14 @@ module Test.Wire.API.Golden.Generated.BindingNewTeamUser_user where import Data.Currency (Alpha (XUA)) +import Data.Id (Id (..)) import Data.Range (unsafeRange) -import Imports (Maybe (Just, Nothing)) +import Data.UUID as UUID +import Imports (Maybe (Just, Nothing), fromJust) +import Wire.API.Asset import Wire.API.Team ( BindingNewTeam (BindingNewTeam), + Icon (..), NewTeam ( NewTeam, _newTeamIcon, @@ -41,9 +45,7 @@ testObject_BindingNewTeamUser_user_1 = { _newTeamName = unsafeRange "\fe\ENQ\1011760zm\166331\&6+)g;5\989956Z\8196\&41\DC1\n\STX\ETX%|\NULM\996272S=`I\59956UK1\1003466]X\r\SUBa\EM!\74407+\ETXepRw\ACK\ENQ#\127835\1061771\1036174\1018930UX\66821]>i&r\137805\1055913Z\1070413\&6\DC4\DC4\1024114\1058863\1044802\ESC\SYNa4\NUL\1059602\1015948\123628\tLZ\ACKw$=\SYNu\ETXE1\63200C'\ENQ\151764\47003\134542$\100516\1112326\&9;#\1044763\1015439&\ESC\1026916k/\tu\\pk\NUL\STX\1083510)\FS/Lni]Q\NUL\SIZ|=\DC1V]]\FS5\156475U6>(\17233'\CAN\179678%'I1-D\"\1098303\n\78699\npkHY#\NUL\1014868u]\1078674\147414\STX\USj'\993967'\CAN\1042144&\35396E\37802=\135058Da\STX\v\1100351=\1083565V#\993183\RS\FSN#`uny\1003178\1094898\&53#\DEL/|,+\243pW\44721i4j", - _newTeamIcon = - unsafeRange - "Coq\52427\v\182208\&7\SYN\\N\134130\8419h3 \30278;X\STX\a\a$|D\NUL\SOHh'\62853\&3-m7\1078900\SOp\22214`\1093812\&6QF\CAN\SOH9\1062958\ETB\15747FP;lm\1075533\173111\134845\22570n:\rf\1044997\\:\35041\GS\GS\26754\EM\22764i\991235\ETXjj}\1010340~\989348{; \119085\1006542\SUBL&%2\170880;@\\2`gA\984195\&0\162341\&2\163058h\FSuF\DC4\17376\ESC\GS\SO\vYnKy?v\129546H\fcLdBy\170730\&4I\1108995i\1017125\ETBc6f\v\SOH\DC3\1018708ce\1083597\SOs3L&", + _newTeamIcon = DefaultIcon, _newTeamIconKey = Just ( unsafeRange @@ -64,7 +66,7 @@ testObject_BindingNewTeamUser_user_2 = { _newTeamName = unsafeRange "G\EOT\DC47\1030077bCy\83226&5\"\96437B$\STX\DC2QJb_\15727\1104659Y \156055\1044397Y\1004994g\v\991186xkJUi\1028168.=-\1054839\&2\1113630U\ESC]\SUB\1091929\DLE}R\157290\DC1\1111740\1096562+R/\1083774\170894p(M\ENQ5Fw<\144133E\1005699R\DLE44\1060383\SO%@FPG\986135JJ\vE\GSz\RS_\tb]0t_Ax}\rt\1057458h\DC3O\ACK\991050`\1038022vm-?$!)~\152722bh\RS\1011653\1007510\&0x \1092001\1078327+)A&mRfL\1109449\ENQ\1049319>K@\US\1006511\ab\vPDWG,\1062888/J~)%7?aRr\989765\&4*^\1035118K*\996771\EM\"\SO\987994\186383l\n\tE\136474\1037228\NAK\a\n\78251c?\\\ENQj\"\ESCpe\98450\NUL=\EM>J", - _newTeamIcon = unsafeRange "\SUB4\NAKF", + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs index 95ec210ac8..5b2eae3c44 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs @@ -19,10 +19,14 @@ module Test.Wire.API.Golden.Generated.BindingNewTeam_team where +import Data.Id (Id (Id)) import Data.Range (unsafeRange) -import Imports (Maybe (Just, Nothing)) +import qualified Data.UUID as UUID (fromString) +import Imports (Maybe (Just, Nothing), fromJust) +import Wire.API.Asset (AssetKey (..), AssetRetention (..)) import Wire.API.Team ( BindingNewTeam (..), + Icon (..), NewTeam ( NewTeam, _newTeamIcon, @@ -40,10 +44,7 @@ testObject_BindingNewTeam_team_1 = ( unsafeRange ("UivH&\54922\98185p\USz\11724\r$\DC4j9P\r\"\1070851\3254\986624aF>E\1078807\139041B\EM&\1088459\DC4\174923+'\1103890R;!\GS\1017122\SIvv|\rmbGHz\1005234\95057\&3h\120904\\U|'\ETX;^&G\CAN\f\41076\&42\teq\1049559\SOV1}\RSaT\1014212aO7<;o\179606\f\1111896m)$PC\ESC7;f{\STXt\9533>\EOTX@4|/\tH\ENQ/D\144082\EM\121436C\99696Q\ENQT\1096609?d\ACK\1073806#H\127523\139127*\166004jo\1079041\74636t\n)1/% hL\DC2Ad\SOHXq6\DC1)\NUL\f6\fV\DC4r\1097128\DC1n\1107359,@\171217\118996\n\SUB%N\176824\ACK\33856Xv)\SYNz?\DC4\EMY\162050\&2\95792um8}\51420\DC2yW\NULHQ\ENQD[Fe\nk\999106\EM\25079Yk@##u}j\169850\153342\STXq\ESCir7) \27756%\1016104~\993971\&8\1085984je\1099724\&0*Gi3\120829je\CANQr>\1033571k1\63774c\1031586L\1015084\93833t\EOTW\999363\SUBo\fgh\ACK\172057C2\38697c\SUB)uW\r\fB\1042942Sf\SUB\SOH*5l\38586\SI\25991\EMB(\ENQ\133758/)!{\1006380\&9\STXA\DEL\16077fx&\180089T&\187029\DC4\52222[\r\v\n\1071241j2\166180/\1086576\ENQQo\fj\134496\129296\nb6\CAN3\RS9\EM\1000086ub\ETB3CY\GSsIz") ), - _newTeamIcon = - ( unsafeRange - (":b6\99159L\1054777K<\1108399\94965C^\SOY8LuXS\156657F\SOH\ETB\49985\1023127\US\1042782J]\ETBA2R$P6\\\ENQ\168330-J\NULt\SI\1047279*\1030368r\1078088M\NAKPL)\94751\SUBJ\72794S\1103633~'kRYj\71198{P{V\SOH!\986239Y~\vV\t\150530{5%i[$7X:ZV\NULy\a\49289\SYN\ENQ\f;!k?O\1029799\1082505K:}\1097011\174391#>\\|(n\STX\165884\ETXD\150060\52125{|\151751\987438+\7022J") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "3d4b563b-016c-49da-bad2-876ad0a5ecd2"))) AssetExpiring), _newTeamIconKey = Just ( unsafeRange @@ -97,10 +92,7 @@ testObject_BindingNewTeam_team_4 = BindingNewTeam ( NewTeam { _newTeamName = (unsafeRange ("\ETX\1006830k;")), - _newTeamIcon = - ( unsafeRange - ("tmIV\999157\&3\1101401\1048401HKE{\1076066\58364R9\EOT\ETBE2\68432L\1009801|a\b|C\41601\1054883}\GS\1031260\CANO9$)\NUL\STX\153170\32951\NUL\50288K\1045065\1057248d\25051\GS\vq\1025447B\ETX\aT\SOPt\DELY\NAK\1047285\28492z#k`P\1056790\STX_7LXC]`#-`\ACK\2234\DC2pw59\n\SUB\DLEj\41795\184841F\ETB\1071805\t;\DC2r*\22318\EMS\182587E8e\FSx\1091470A\SUB|j\ad\DLE0RDI\rQ\NAK`\1072156\EM)j{\1062530\142892\1100137f@\t\DC1\f\"\f\1043821\1099467\1105685\6302J`.\110675*\bF%4\1009644\EM-3g\100340\1103476\1101833\STX\n\DLE\DC3]s\178911_\a\1041598\162772\DC2\v\515\DLE\15612v|\b\1052391%\165476g~0\EOTWp\t \173242C\FS\149826x\ENQ\ACK\DC2-DIYa\1004333:\189759'{\1083009\143586\1041756\&6\7690\1000132=xfo\ACKU'\DC4\1102469t\n\DC2\1095515\&6\119535/\1103539tR\SYN#\1109833") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "18fef3b3-323c-4c27-bb62-6026d62f77c3"))) AssetExpiring), _newTeamIconKey = Nothing, _newTeamMembers = Nothing } @@ -114,10 +106,7 @@ testObject_BindingNewTeam_team_5 = ( unsafeRange ("\SIB\63473\70352\&3\158300\\#\1061243I\USK\1023384h\DLE\DC3\RS\134858*\998726L\STXw1p\"4\EOT\188995#u\144798\SYN\FS\37122\41625$\376wu\174004\45347\1008628\SUB\a)\DC2?T \49542\&8\39359.\t\NAK1\f\EOTY\128585%\1929\64376\15282 &Z4\1085196\NUL@\SOH\EM\154601\1078303\1098851xtj\182717`\SOH\59489r\r\94098\EOT0\EM\NULLyc D\FS\1085075\1054974)\SUB-\SO\1085196\vl\984336\59601\1114081\CAN\61540\186940f\SIrb/[F\NUL\1099974<1\1027888P\GSxl\"!11E\ESC0\ESC\f$u\1093437N\GSV^\1017313q\170667\n`\1047440\163252:iLXn\CAN\988958\26427O}8!Y\NAK,^X\63902*\\`\38784\DC3\a]\144700\1021165{FKA\b\1102136\178719\DC3\US=UC\179701KQb\1054842\1015593\FSX7@\996116C~-[Db $cx\ETXCzvq ,g\rD\1032170") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -135,10 +124,7 @@ testObject_BindingNewTeam_team_6 = ( unsafeRange ("v\188076hEWefuu\1006804jPx\158137k#\SOH\986725\STX\ETX^\ESC\n\CAN\8325p1D|S1\1064991\1102106\29079\SYN`\t0g\1034469,t\FSw\fDT\RS#H\SOH\145176\US{\1091499\1025650\984364lW\a,uil\SIN`5e:\SYN Y!\SYN\1025115tb\1085213") ), - _newTeamIcon = - ( unsafeRange - ("l\145301\30725\US@/D\t\145930\1019910^f\NAK\DC4[\127098\1002727)\1097841W\1035417\&2\58863\111330\n#\138666|/I\rI\NUL\US;\n\v\b\ESC\SO\b}\1060666Q\168368\&45^mI\10814\138738\1110238k\SO\1071853d0iA7\DC3\rW\985090\1041247Z\166371T\46392u\EOT\SOX\"\996646") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "d7a467c6-8cd4-40cb-9e30-99b64bb11307"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -156,7 +142,7 @@ testObject_BindingNewTeam_team_7 = ( unsafeRange ("\145552\1042892iz\1057971FT\14964;\1108369}\188917\1113471\&9\SO\991633\&7>hAC\NULH2O\177259m\187711\&2R(?W,=,\990725M\992456\aM\194790\SUB\47600q\SOlj\EOTj^.s~\rY%5lM,\26492=\ACK\1016899\188843>{\CAN\DLE\15878f=X9\SYN9\51145\159419TI4\17599\v\NAK6\1014936/\DLE\NAK\ACK\23564H<\ENQ\1029703e\ENQz\1017528:\6137\"rS\a\167660\FS\ETX\1059289\1031786\49012\DC4\DC4Q\"\1065200\&1:\1097556\UST.;\1042663\18380}") ), - _newTeamIcon = (unsafeRange ("_5\63791\aQ\1109163W\8411\&9\43942*\1003379")), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "b199431c-e2ee-48c6-8f1b-56726626b493"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -174,10 +160,7 @@ testObject_BindingNewTeam_team_8 = ( unsafeRange ("YwD\1023517r\NAK}\1083947\ACK\1047823\29742\EOT\1071030iI5g\1012255\t\"r\150087O\DC4?\53005\1100290\1108960\NUL\1060304qgg\DC1X)\NULL\1054528\CAN{\v4\NUL\93999\bvD#\1035811$aYFk\b\1102040\1089491\1042733\47133:1\179810S7\66745V)\1072087\v\96989\&3#\b\1104899c\27119Q/jPy\1015620P@Df\997914\51756H\1113361Xr\SO\ETB3%\1108760aF@3A\SI\ETB\STX mj9T=\DC3'XI\DC2?0\1093231\156858VHp?\1066163YU\42092\33083\72810,)\1113424\ETX96\153338z\42445/4T\136162\ESC\60427\1086321&\ETBS\1098748\14578z[\54638Z\DC2\"e\SUB\173931&rQ\fJG\100066\180037\155435s$\SUB$\50544S\162554E\ETX*\t+\63443WU*\144654\1042128\&8\NAK\999184a\t\EM\1097907_\DELOD\1006385/\23998\1100140SmfX") ), - _newTeamIcon = - ( unsafeRange - ("\9989IT\RS\DEL\1102950\49046%mE\985354\1051208M\a:[fgw\ESC?ye\70096\1096815K\ETBl\1054491\1013010\1037243Qg?\151299{\f!uXA}H)v$\160467\1093098mGkC9\1084965\GS\1092746\1034992\&1DH\166476s\42306\&7[.\187974v+\1091910O^SGjv\1069550Y\1003173n\154396Z\78347\SO{\1060523Q\ETX\RS1I\FS5\ACK\1035980\1083718\1031418_\1105769?gD\4285\fg\15008:g\FS.J<\DC2\ETB\1016548}/\97909\DELOBLa\1051864\a{\1011185-\1064859\v\SI\DLE\145744V \\Ns0t\1081561frR!Qe!$\140066\1007621\SYN$\1077998!SZ\1052672\184571a\DLEB3") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -195,10 +178,7 @@ testObject_BindingNewTeam_team_9 = ( unsafeRange ("\SOLN\GSr\144312\1070871k\181829#\153181lTD[Jh\SOH\1029451\34144\&6\1034706\1062880\NAK}\adb\171356-\\-1\DC42\1046344\DC2\78894\&1/\33084b:\ENQ\1038950;Mw\FS\183866\1113547ITuy\1050264`SP\SOH\SO\GS\NAK\a\r7M\1069326\1064150\18615\n\SYN3V\ETXR\n1$e.\1096261B~yd_z\1047817\rV\1091351\RS\SYN\165050l\DC3\47200u\1058674u\"\aTc|sEw\1011190wTC|F\4735B\t\DC4&\bUEN(+M\SOF;\1099746\134573\EM20\nrPW\1017058$\1064809") ), - _newTeamIcon = - ( unsafeRange - ("i\DLEi|\7196\ETB\1025523\NUL\7866\NULD'\94469Zby\1039174\8663Y\r\1019969\\n\21729\168347>\999971\&6\140502\1039443\37325\1016989|`dN \25830\987680i_\1055665p\1033233J\26000ngp@#\1105667A\988593\&7l{;\180315g4EX\45324\ESC\1068230\151220#z\176275\SYNy\EOT\t\60992G\\\35606\22388#s\1005062Ad\1094868Obh\1008737\DC2\1086579\57353)3R\SUB\FS\97513aw]\1075127\1039396\4324\118950kC\26815\SOH\1002881\1005712d8\46181\DC1\SYN\64570f9") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -213,10 +193,7 @@ testObject_BindingNewTeam_team_10 = BindingNewTeam ( NewTeam { _newTeamName = (unsafeRange ("\b \SOH+\1056054;\t095\42390\n\STX2J\1002251\DC1UzD_\1110746\FS")), - _newTeamIcon = - ( unsafeRange - ("L\1093530j^Xe\DC1\1012858z1{\ENQ\1040620,\1021288\DELB;&\b54f>8+\168322\n\NUL5L[r7_.\DLEl1\176221\US6[EhD\USh\a\1095183\NAKC\139765,\177058,@?y+;\US`/^d\137830\991658HeCd\39028\DC3\1050220\143767\ENQ2O-Hijo\1007768\1045537\1013046X}x\1112190\ETB7\146170\53218C\30013\DLE`k*Gl\1046094\t\77870\1003758\rb}\b\NUL\33414h\SYNynr6d(") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -234,10 +211,7 @@ testObject_BindingNewTeam_team_11 = ( unsafeRange ("\48005H\1082536\132304\157763\&5\RS\986337-\NAK\ESCR\nL\63954&bD\139428\SUBH\US\1040918\f\t;e\1064224\47101\tc\1087740e\1099415\DLE\ETX\DELI\65746\ETB\133884\SUB \SI\43795~FE\CAN6\162836\DEL\46062u\"\135684\1041611\FSFYI\t/{\ENQ\RS]j\1076782\US22\15884l\42366$\ETB\US\180023kL{\STX*\131382RMj\ESC\1091332W3H\1020399\FS\NAK^\"5\29653\32539*\1099111") ), - _newTeamIcon = - ( unsafeRange - ("r\53037\22164\72341u*33{8G\1084742aO\GS%\NUL[\1003678U\ENQ\985387iKL\GSNF\163860\1098258`\EOTT$`i5\92401\ESC\356\&98>") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -255,10 +229,7 @@ testObject_BindingNewTeam_team_12 = ( unsafeRange (";\110872M\EOT\164161P]'\1041089\1094514\4118\1054714iFnRQV\43238@\992926\59902l\1099067\aKZ{\51124S\190890\fg*\n,`!V\STX\991695e'\1039967\SO0\37019p4d\STXs\1020471uK(c'\52929hjB\144953\SOt'h^\SYN\SYN0\1009487_\12064\166805thH\SI\1073479:\1019934l; n4c\1101781D[\1014388\&8Y+\1092407\EOTE\1058506\\0\168273KKTc)P1K\1042475\990753W\ETX<|\24888\&0|5{Y\986771M\DC4\vK\DLE\1089150\SOH\DC4\1013653.\ETBg\991717\DLE\"W\NUL9&0yYZ\1094524\v\11606\58174") ), - _newTeamIcon = - ( unsafeRange - ("\1060773b\EOTch1a iuB\1011795\ESC\DC1\187488\STXV\1046981@1\145144 iY\"m\1036630\SO\\O*(\DC3\178375w7w\1105638\US2ECk\99276\&4\ETX\2892%\EOT@\"k\1013020\993468*\1031577\DC1\ESCYC?\177240\&2>\52504\SYNo8[\aV@9E\1085704\9349\1018050!k0b\t\n+6\\Ki{\DC1\984398\SOH\SYN\1037253{0H\1017165\DC4\ENQ\992581|\CAN\1023332F\37419\1012389d\1045535\n\119327\1054972X\1056743\1052679*\bC\DC2\99475Wz\1070783\37601QWt\ETBAj>eO}Ae\DEL\DC4\94565 \STX\39311\SIF\tAH\160873:\167531\&8\16727Q\1045659\DLE-A\EOT\156588\ESCHOc\v\1007234\DC39\SYN\917845{ \NUL]\1008784I\1054187,\162782f\DC2\1088424q\SOH\129571GA\GST\EOTS\DLEMmnLy\1113365=\131110\&2k\1010420\r~\1059431\&1! \ESCJy\9820J|zgf1}ILN5\1024553Xi\6845Be.\1085513\RS\SYN\95106\1090727\RS+Y;Z$\SO5") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Just ( unsafeRange @@ -297,10 +265,7 @@ testObject_BindingNewTeam_team_14 = ( unsafeRange ("2#\DC2N\b9&A\1030886ZL{f\1011542M\1101172\23517\a\DELv\164961\32470\ACKT7\DC3\DC4\1009557O\1103393C\152202\t\DC4l\RS\SOH]\ESC\ACK\95718X;\149660* &\97401}\1111236T\ESCCLkx,\DLE\63803\nbT\1049269fWJ\992800\136973a\US`\DC3\139728\28948\&8r2']\NAK\DC2\133094\nl\DC2NXB\ENQia\1068046]B\989632\DLE\ENQdf#\64677\t6g\FS\SOH\1029760Fp(\GSQTZ\1015396\8630\153801dUJt\SI\EM\194705`\\#g0Qed@a${=Q.\1048388Ld`\35027 \173216sV\SUB\SO5\150360\41997\1107813i\EM\DC3\988956\1049486\SOH\1030355>\1044179\DC3w\1001979Y}\21603\&1q\NAKY:\25626q \ETB=*#\74975\EM\61277\\\21887y9Tfc\DC1\49327k\1096646\\Oxxn&6NtaZ?k:5G@\46350\DC3H\1097149hu4\178807\995883\USR\161801\1024517v\26381\23905\72161\12881\ACKD\985152[bb<\1111873") ), - _newTeamIcon = - ( unsafeRange - ("(r'`\1072313Gd\ETX)u\fq*4\1076827\1031167i\EMM.Ru\1079085\t\148161\1088689m\58073;\f\1001367\1114096\135422m\a\t\1066705wRhv\ar6\64764\";&4\SYNX\GS\SYNw5{%P&\26997\&98\ETX\STXyL\t\1022691XMu(\187856\&6)\SUB\42223Wc\38363#\STX\22842l\1064183Vy\59354\&1_\SUB\\\CAN\1103008\44889Ek>\1005303\ACK]$\EOT\181821\1076265w\r\164187@&V8\a\DLE\DC1\DEL\\\1010644\1053996\NAK)X\nE)\1071775y*%1\NAK\DC2^4hKf\995698|EY`^\DC3\173547\58719\39061\"pX\bg\49396>YR(W\\eS\GS\27701(bn\SYNu\1001078\156831h\41346\FSG\1090155\DLE\34585a\70001n2)\984812\"<\1032188YUq\1049152\1035363\186759\r7\61891\4004\v\1049233\24817\r\1027960|]\ETB\SOh9f\ACK1\bZQ7fmQOQ\986711l!\DC3\44018\27476*\43689*1\f\1097293\&8nk|\NAK\1005998~\fO\162989\100863!:3\ETXn{%\6663\182700if/!\29917] <\1056176Y\1078680\b\DC4~\t\EM\SOH<*\NAK\143397bx4 {\96203\CANVs;g\98929\144388\STXqkI!QJ\1072302J\189512\DC4\64545?_\STX\t\1082190iB3YdKA7@>Q\995699\987049]\1094644\133325>D\1026819wD\ESC|\SI'^\136789\120874Q#q,\"") ), - _newTeamIcon = - ( unsafeRange - ("UZ0\990600t+\167739\12589k|\DEL\DC1\SYN\EM_ch\t\1089768\13109\n\ETB\DC2,x\1106295,RE(,G\GS\"gA\NAKncdJ\162831+\t\1100097FP{v=\45227'e\STX9B#1\1075471\t.\1085742\140286\11416\FSUK\SOH\a;\STX\1078860\143696\&7B\ESC\NULD+\1036884\1094020`\SO\DEL>\ESC\DC1,\171231d\SOH(5\EOTP9iR]\RSNws\1029644\1003476{[H\128669,\DEL5J!\136454\1036165j\1053405eA\1046358\tbj\EMk\DC1l\n\988481H~]u\42907\1029099!kjVS{42\NULE?\EMh\61474\35112B!:\DLEX\DC1T\DEL3W\avimhK\1078443\DC1to*P*\DC1}\986362\1081249H\r\1034017B") ), - _newTeamIcon = - ( unsafeRange - ("_'C\1004343\EOT9\nC\92250f\a\118853Pe\58352\127931\185310\134048\98557\&5\1051407m<\r}\139827@\1053024#.\1058183\STX6%\1111877H%\1030001\60185n\EOTUk\US/\FS\DELpS\156872\DEL\1098001[1np\ACKmD\1011808U\GSI\1083494]I\49341\171558AT\ETX\USOl{\DC1\tYt7U +Q\1073293\CAN\US[\STXJV\EOT`\CANrF\tN\67855\95873\169991\SYN\166546*A\DLEA]4ku\1003232W\1111354\54858I\DC4\58521\SO\94687") - ), + _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), _newTeamIconKey = Nothing, _newTeamMembers = Nothing } @@ -352,10 +311,7 @@ testObject_BindingNewTeam_team_17 = ( unsafeRange ("|\36324P\US\1040589\159812Y\SOHj\RSYrr\49743\&0m\ENQ\1027954*'\72098\1105368P6\SYN\15236\f\DC2\125109e\1031690\RS\1026891\1003083\69946\rA'\GSA\NAK\53778\1067566J\1016490'T\1037603R2? \FS\US\1032454$\NAKGr(\1008673{\ENQ\62451\&0mJ\SID\STX-\CAN_I\132366\f\147665\FSR\1080205hp\143954B6W2\b\f6\1104867\DC2\180998\b1'7-T-#\3953D\1076345\1082129T]v$Gl\1042148\1032818\&5yg\1025280\nQc.`i\14819\24538}\FS&k4\99627\ACK>#\32013\1036954\EM\131987[vBOPu\1108963@\ACK\NUL\1087882\147841\SO\NAK\98755\31702\EOT\ETX&\1032348?z\989374i\fz\n\1029119\ETB3\a\1108955W\1113557E^\1043345\986117S3'4\ACK\74144*m-\ESC4\USj\ETX__6\1046371\6580M\48069\ESC]\EOTDq\DLEuo\28030$\vUWp1=/o\ETBY\173686\&9\DC2\nQ\177317\1051037)\1102455\"br\SOH\NUL\158808+\47718c^\1003405<`\1111751\149060\STX\986585\ETX\162139D\ENQ\30356nqp\1095539\988368c\RSt\1081319G") ), - _newTeamIcon = - ( unsafeRange - ("Zz]|\b>\NUL\163291\1063651\95675\SOH,q\SOH`\1050846P\987757\1069132\n\EOTIm\1067057\DC4\1013555\1075331HB\GS`\1022663\142641U\162403G\DC3m+Lw\DLE\1023911\"0\119625?-T\ESC\ETXj\DC3|Lq\ETX.\99032hgq\ESCy\99463\&5\ay\ACK\1111685w^(\ETB+\175870\&3\f\113727x\1007957i*E\DC3\179834rTM\CAN\1093029$\160784\190686\EOT\\p\1053146\&1\a\131095\1050682zv\1034137\EMrj\a\1043282u\NAKn\SO\164246\&6\ESCs\GSm9Y\FS%\DLE?6\1039335\STX\f\1063550)RST\r\DLE\1107040\DC1\1078521h\nTS\DC2\US\1097415\STXn\ESC\149926r2\73911\984427hrr-$*j\1110522\35321]@\1003869\15025J\b\"8N\68412e,#", serviceProfileDescr = "D\DEL", serviceProfileAssets = - [ (ImageAsset "" (Nothing)), - (ImageAsset "" (Just AssetComplete)), - (ImageAsset "" (Just AssetComplete)), - (ImageAsset "" (Nothing)), - (ImageAsset "" (Just AssetComplete)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) ], serviceProfileTags = fromList [], serviceProfileEnabled = False @@ -196,7 +197,7 @@ testObject_ServiceProfile_provider_9 = serviceProfileName = Name {fromName = "\EM\73877+\DC2\NUL!\USV\f\1025396\1106635_\1106841H#4\STX\1104704\DEL"}, serviceProfileSummary = "a\1088958", serviceProfileDescr = "AU", - serviceProfileAssets = [(ImageAsset "\DC1" (Nothing))], + serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], serviceProfileTags = fromList [BusinessTag, FinanceTag, PollTag], serviceProfileEnabled = False } @@ -209,7 +210,7 @@ testObject_ServiceProfile_provider_10 = serviceProfileName = Name {fromName = ":h[\1059282\1033090\913Y$\ENQ\NAKE\1086801\186280\STX\US\28752"}, serviceProfileSummary = ",AD", serviceProfileDescr = "s&\118974", - serviceProfileAssets = [(ImageAsset "" (Just AssetPreview)), (ImageAsset "" (Nothing))], + serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], serviceProfileTags = fromList [], serviceProfileEnabled = False } @@ -256,7 +257,7 @@ testObject_ServiceProfile_provider_13 = serviceProfileName = Name {fromName = ":[\".\152322\USvU\1055877"}, serviceProfileSummary = "", serviceProfileDescr = "A", - serviceProfileAssets = [(ImageAsset "B" (Nothing))], + serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], serviceProfileTags = fromList [ProductivityTag], serviceProfileEnabled = False } @@ -286,7 +287,7 @@ testObject_ServiceProfile_provider_15 = }, serviceProfileSummary = "*P`", serviceProfileDescr = "u`\ENQ", - serviceProfileAssets = [(ImageAsset "*" (Nothing))], + serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], serviceProfileTags = fromList [MusicTag, RatingTag], serviceProfileEnabled = False } @@ -303,7 +304,7 @@ testObject_ServiceProfile_provider_16 = }, serviceProfileSummary = "U,", serviceProfileDescr = "S\n", - serviceProfileAssets = [(ImageAsset "" (Just AssetPreview)), (ImageAsset "" (Just AssetPreview))], + serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], serviceProfileTags = fromList [], serviceProfileEnabled = False } @@ -320,7 +321,7 @@ testObject_ServiceProfile_provider_17 = }, serviceProfileSummary = "\SO4c", serviceProfileDescr = "\SI", - serviceProfileAssets = [(ImageAsset "" (Just AssetComplete)), (ImageAsset "" (Just AssetComplete))], + serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], serviceProfileTags = fromList [], serviceProfileEnabled = False } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs index 0ab9afa0e7..80a068190c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs @@ -48,6 +48,7 @@ import URI.ByteString uriScheme ), ) +import Wire.API.Asset import Wire.API.Provider ( ServiceTag ( AudioTag, @@ -238,7 +239,7 @@ testObject_Service_provider_2 = ] ) ), - serviceAssets = [(ImageAsset "" (Just AssetComplete)), (ImageAsset "" (Just AssetComplete))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], serviceTags = fromList [], serviceEnabled = True } @@ -431,7 +432,7 @@ testObject_Service_provider_4 = ] ) ), - serviceAssets = [(ImageAsset "" (Just AssetComplete))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], serviceTags = fromList [MediaTag], serviceEnabled = False } @@ -570,11 +571,11 @@ testObject_Service_provider_6 = ) ), serviceAssets = - [ (ImageAsset "" (Just AssetComplete)), - (ImageAsset "" (Just AssetPreview)), - (ImageAsset "" (Nothing)), - (ImageAsset "" (Just AssetPreview)), - (ImageAsset "" (Just AssetPreview)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) ], serviceTags = fromList [FinanceTag, FitnessTag, MoviesTag], serviceEnabled = True @@ -677,7 +678,7 @@ testObject_Service_provider_7 = ] ) ), - serviceAssets = [(ImageAsset "" (Just AssetPreview))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], serviceTags = fromList [MoviesTag], serviceEnabled = True } @@ -1017,7 +1018,7 @@ testObject_Service_provider_11 = ] ) ), - serviceAssets = [(ImageAsset "" (Just AssetComplete)), (ImageAsset "" (Just AssetComplete))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], serviceTags = fromList [], serviceEnabled = False } @@ -1109,9 +1110,9 @@ testObject_Service_provider_12 = ) ), serviceAssets = - [ (ImageAsset "" (Just AssetPreview)), - (ImageAsset "" (Just AssetComplete)), - (ImageAsset "" (Just AssetComplete)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) ], serviceTags = fromList [MedicalTag, TravelTag, WeatherTag], serviceEnabled = False @@ -1184,7 +1185,7 @@ testObject_Service_provider_13 = ] ) ), - serviceAssets = [(ImageAsset "" (Just AssetComplete))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], serviceTags = fromList [EducationTag, MoviesTag, ShoppingTag], serviceEnabled = False } @@ -1286,7 +1287,7 @@ testObject_Service_provider_14 = ] ) ), - serviceAssets = [(ImageAsset "A" (Just AssetPreview))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], serviceTags = fromList [], serviceEnabled = True } @@ -1354,13 +1355,13 @@ testObject_Service_provider_15 = ) ), serviceAssets = - [ (ImageAsset "" (Just AssetPreview)), - (ImageAsset "" (Just AssetComplete)), - (ImageAsset "" (Just AssetPreview)), - (ImageAsset "" (Just AssetPreview)), - (ImageAsset "" (Nothing)), - (ImageAsset "" (Nothing)), - (ImageAsset "" (Just AssetComplete)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) ], serviceTags = fromList [DesignTag, LifestyleTag, QuizTag], serviceEnabled = True @@ -1428,7 +1429,7 @@ testObject_Service_provider_16 = ] ) ), - serviceAssets = [(ImageAsset "" (Nothing)), (ImageAsset "" (Just AssetComplete))], + serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], serviceTags = fromList [PollTag], serviceEnabled = False } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs index 9bf6832fbb..2a448754c2 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs @@ -23,7 +23,8 @@ import Control.Lens ((.~)) import Data.Id (Id (Id)) import qualified Data.UUID as UUID (fromString) import Imports (Bool (False, True), Maybe (Just, Nothing), fromJust, (&)) -import Wire.API.Team (TeamBinding (Binding, NonBinding), TeamList (..), newTeam, teamIconKey) +import Wire.API.Asset +import Wire.API.Team (Icon (..), TeamBinding (Binding, NonBinding), TeamList (..), newTeam, teamIconKey) testObject_TeamList_team_1 :: TeamList testObject_TeamList_team_1 = @@ -33,7 +34,7 @@ testObject_TeamList_team_1 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -41,7 +42,7 @@ testObject_TeamList_team_1 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000001")))) ("") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "") ), @@ -49,7 +50,7 @@ testObject_TeamList_team_1 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -65,7 +66,7 @@ testObject_TeamList_team_2 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("7") - ("\174380") + DefaultIcon (Binding) & teamIconKey .~ (Just "@") ), @@ -73,7 +74,7 @@ testObject_TeamList_team_2 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ) @@ -89,7 +90,7 @@ testObject_TeamList_team_3 = ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000002")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -105,7 +106,7 @@ testObject_TeamList_team_4 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ("\1065164") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -113,7 +114,7 @@ testObject_TeamList_team_4 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ) @@ -129,7 +130,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -137,7 +138,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ), @@ -145,7 +146,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -153,7 +154,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -161,7 +162,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ), @@ -169,7 +170,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ), @@ -177,7 +178,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ) @@ -193,7 +194,7 @@ testObject_TeamList_team_6 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) (" ") - ("\1027039") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -209,7 +210,7 @@ testObject_TeamList_team_7 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000001")))) ("") - ("\DC1") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ), @@ -217,7 +218,7 @@ testObject_TeamList_team_7 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ) @@ -236,7 +237,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -244,7 +245,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -252,7 +253,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ), @@ -260,7 +261,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ), @@ -268,7 +269,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -276,7 +277,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ) @@ -298,7 +299,7 @@ testObject_TeamList_team_12 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000200000001")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000100000000")))) ("/\38175") - ("bi") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ) @@ -317,7 +318,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -325,7 +326,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "") ), @@ -333,7 +334,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ("") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "") ), @@ -341,7 +342,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ("") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "") ), @@ -349,7 +350,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ("") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "") ), @@ -357,7 +358,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -373,7 +374,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ), @@ -381,7 +382,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -389,7 +390,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Nothing) ), @@ -397,7 +398,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "") ), @@ -405,7 +406,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Nothing) ) @@ -421,7 +422,7 @@ testObject_TeamList_team_16 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000002")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000200000000")))) ("\170783") - ("e\20069") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "\1113463(") ) @@ -440,7 +441,7 @@ testObject_TeamList_team_18 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000002")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000000000000")))) ("W1") - ("!") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -456,7 +457,7 @@ testObject_TeamList_team_19 = ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000200000002")))) ("") - ("7") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "\189413(") ) @@ -472,7 +473,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Nothing) ), @@ -480,7 +481,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ), @@ -488,7 +489,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000001")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "") ), @@ -496,7 +497,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ("") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs index bb67fc2c4b..8298467e0c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs @@ -23,7 +23,8 @@ import Control.Lens ((.~)) import Data.Id (Id (Id)) import qualified Data.UUID as UUID (fromString) import Imports (Maybe (Just, Nothing), fromJust, (&)) -import Wire.API.Team (Team, TeamBinding (Binding, NonBinding), newTeam, teamIconKey) +import Wire.API.Asset +import Wire.API.Team (Icon (..), Team, TeamBinding (Binding, NonBinding), newTeam, teamIconKey) testObject_Team_team_1 :: Team testObject_Team_team_1 = @@ -31,7 +32,7 @@ testObject_Team_team_1 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000100000002")))) ("TJ\EOT") - ("Jw\USTB") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "\1040673V") ) @@ -42,7 +43,7 @@ testObject_Team_team_2 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000000000004")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000000000001")))) ("Yc\5828") - ("\1104693\t5") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "\34417R3q") ) @@ -53,7 +54,7 @@ testObject_Team_team_3 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000000000003")))) ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000100000000")))) ("2E\1092885") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "s\1056436") ) @@ -64,7 +65,7 @@ testObject_Team_team_4 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000100000004")))) ((Id (fromJust (UUID.fromString "00000004-0000-0000-0000-000100000003")))) ("\177218\bk") - ("\1078494u\FSC\SOH") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "X") ) @@ -75,7 +76,7 @@ testObject_Team_team_5 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000000000004")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000200000002")))) ("\ACK\99388\20164") - ("\1073797") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "?&\ESC") ) @@ -86,7 +87,7 @@ testObject_Team_team_6 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0003-0000-000000000003")))) ("\1018732x\1035024]\15985") - ("_'\DC1\STX") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -97,7 +98,7 @@ testObject_Team_team_7 = ((Id (fromJust (UUID.fromString "00000002-0000-0003-0000-000000000002")))) ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000400000000")))) ("\9929\1053910\1017456\&7\1059453") - ("X\n|\1041562") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "\96549") ) @@ -108,7 +109,7 @@ testObject_Team_team_8 = ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000002-0000-0003-0000-000400000001")))) ("\r\37334{\DC3\\") - ("\57585\1029014") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -119,7 +120,7 @@ testObject_Team_team_9 = ((Id (fromJust (UUID.fromString "00000004-0000-0002-0000-000200000003")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000000000004")))) ("G[Hu{") - ("d\ETXU") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -130,7 +131,7 @@ testObject_Team_team_10 = ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000300000004")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000300000000")))) ("\1043846") - (" ") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "\1107305") ) @@ -141,7 +142,7 @@ testObject_Team_team_11 = ((Id (fromJust (UUID.fromString "00000002-0000-0004-0000-000300000003")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000200000003")))) ("") - ("b@\STX\47358") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -152,7 +153,7 @@ testObject_Team_team_12 = ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000200000001")))) ("yR\EOTU}") - ("P\185409") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "J\SI`\1074001\DEL") ) @@ -163,7 +164,7 @@ testObject_Team_team_13 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000200000002")))) ((Id (fromJust (UUID.fromString "00000003-0000-0002-0000-000200000004")))) ("E\ESC") - ("") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Nothing) ) @@ -174,7 +175,7 @@ testObject_Team_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000100000004")))) ((Id (fromJust (UUID.fromString "00000002-0000-0002-0000-000100000003")))) (".\27232,") - ("") + DefaultIcon (NonBinding) & teamIconKey .~ (Just "N\EM\ETX") ) @@ -185,7 +186,7 @@ testObject_Team_team_15 = ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000000000003")))) ((Id (fromJust (UUID.fromString "00000004-0000-0000-0000-000400000002")))) ("#k\NUL,;") - ("yM\RS\ENQ") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "T\f)\tR") ) @@ -196,7 +197,7 @@ testObject_Team_team_16 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000400000004")))) ("") - ("Se") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "\SOHC") ) @@ -207,7 +208,7 @@ testObject_Team_team_17 = ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000400000004")))) ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000000000004")))) ("\t\b ") - ("A\1029674'W") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Nothing) ) @@ -218,7 +219,7 @@ testObject_Team_team_18 = ((Id (fromJust (UUID.fromString "00000002-0000-0002-0000-000200000002")))) ((Id (fromJust (UUID.fromString "00000002-0000-0001-0000-000100000002")))) ("\23385\1046442") - ("_\1029329\170131") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "x:\40938L") ) @@ -229,7 +230,7 @@ testObject_Team_team_19 = ((Id (fromJust (UUID.fromString "00000003-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000200000004")))) ("P\187859;gi") - (")\ETB\ENQ") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (Binding) & teamIconKey .~ (Just "V>A") ) @@ -240,7 +241,7 @@ testObject_Team_team_20 = ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000400000003")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000000000004")))) ("\191094c") - ("\1019354I\STX\ETX") + (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) (NonBinding) & teamIconKey .~ (Just "v0\1099892\&3") ) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs index cc37255a82..7d735155de 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs @@ -19,9 +19,12 @@ module Test.Wire.API.Golden.Generated.UpdateService_provider where +import Data.Id (Id (Id)) import Data.Range (unsafeRange) +import qualified Data.UUID as UUID (fromString) import GHC.Exts (IsList (fromList)) -import Imports (Maybe (Just, Nothing)) +import Imports (Maybe (Just, Nothing), fromJust) +import Wire.API.Asset import Wire.API.Provider ( ServiceTag ( AudioTag, @@ -67,7 +70,7 @@ testObject_UpdateService_provider_1 = ( unsafeRange ("\a+/z\986763hI}/\DLEkB\1059760\1062810\25608\SYNYC}\135783\EM\SIa\r\43515\ETXh\ESC\17873\4008\SOHCUoR[\160369c\78378fbtV4\DC4\60971<\156071\ACKd}\DC3\164303\541\186277@\DC38|\174852\ENQg\SOH#\1058252KO|\174852\1008939\166018\FSm\a\1053371\1036429\1056854\20649;~k\GSP\NAK\ACK\175008s\1051918A\150295\ESC\NULpY\1054181\26848\EM\1078098T\1011719\992748!W\EOT\SO\152351\v]\v\ETB\98006N\1097932\143101\9071\f8]J\14943\SI\EMY\29869p\NAKvk\99744\1017040\176615\998969\STX\151238q\1035677\RS\v\1030236\&6\f\SUB\DC4\\\SOHw\DC1w[\DC3\1103346r+\983054/s\10708\995966\CAN\DC3~/\SO\1039052\1022548%F\DC4h\1000751\78726z\EOT\1015388\ETXdt-b\157874,DzM\1008898G\1039612\16538\1074902\DC2\18234\16087\&0-pE42\t:<\66329}[\ETX~lac\42511/\a\151380Z,(\\\1077666\127957GM\190643#\191090\SOH+%\1084834\STX\175168|\1007726\\\28896\EM\51660\1094971\a[\57676\1023212\1053746\f2@cczh3?`\n$\STX\1094726\EM\fN\180929z/D\179845.(]g9\3442o\STX%{w\1075429\&4m\STXF\ENQ\49942\16059\CANm\DC1\ENQ/\ESC\42264\1028339QM\991027\176346'43\36345~\t\1036026!\v\14557`qY\1088128zm\DC4fRZGvL\ETB(t\1007154\SYNswr\145599\58315%\1043578\NAK%\1082059G\1691l'\ACK\1029069\137530\170139\149719 \8297\NAK\f>@\40665\1029420\CANu\STX\143750Y\GSVj\DC2\t@O\184863\44709\&4\rf\b\1002476\r_F\DC3\NUL\47001\ETXX$#\t\1093906\ESC7\EOT\b\983099\143369\SO\ETB\EOTA\185268\159378\1015274/:N\DC3\1068202\&1D\96979\1042904 V\DLE\SUB\1087165#\20680\1005166\&8\ETB\a\DLE\RS\995866\USP\ETB\SOH7\r|L\145137R j\ESC\SOH2F>dV=\EMr?\1046227\119883\"&\DC1O\11375\SODuQL$\1032099d\US\157568` <1\\O\445\993915/H\f\r\143532Ah\1032005\ETX\162288uu.lf\1057288/1\1106120\1028078/\7411\138984`9\bq\SUB[Z`\118961eLNyTq\1048960k?{\nWg\72112\1100487\120674q\151928u-\DLE\1008080(\DLE\DC1f\127138\ETB,\rP\7088\&4V\40697\159724(7)..\70295$\n\SOH\78896\989166\92348\134295\FS\5319\47941/0\166710:\94593\SI{]$&\1074979m\1114097\&0\144077\&7)\183400b5f\SYNGyYxU):\1015140L\USQd\121515p\ESC?<\DEL7\DC4W\ESCN\45294;\a\987395\NULm\143966K\ETX\146218\51248\ETB\17306\"\987854*S{G\349r\1010831g\DC4>\NUL\SOH\97274i\NUL\NAKk\ENQK\20758r\1027971!rE\t^\78529@|h'0F'\1037224\157621\1023969\&9)\SYN^\ACKm^\STX\1078787M]\181147R\12517+\1015063^p\43086\&2AzeS\DEL`\141901\DC4\985596\182797e\ENQ\CAN\ETB\36060h=0&kp4\ETB\1023228c\999060\ENQ8$\STX\EOTk\t\CAN\173228y]M\bA\64661x(\STXV\fT\vOO=\1086015`D\1031911i*c\1010700g3\RS\998099\FS\fr\7033g\181534MX\15333\136960\43015x\1089585Rz\154544(P${\98672\DC1*~e\n\t0]z\DC3\EMY\173001\1112133g\152066!\182207@\ACKp\162647\1015149=\62520X\1013875r\65890\1025377\&3u\t\STX\SO\139037n\DC1`\42999;,\DC4\161373D.:\SOH") ), - updateServiceAssets = Just [(ImageAsset "\35113s\1105959" (Just AssetComplete))], + updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], updateServiceTags = Just (unsafeRange (fromList [WeatherTag])) } @@ -89,10 +92,10 @@ testObject_UpdateService_provider_2 = ), updateServiceAssets = Just - [ (ImageAsset "" (Nothing)), - (ImageAsset "\182860" (Just AssetPreview)), - (ImageAsset "#" (Just AssetPreview)), - (ImageAsset "" (Just AssetComplete)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) ], updateServiceTags = Just (unsafeRange (fromList [AudioTag, EducationTag, WeatherTag])) } @@ -109,9 +112,9 @@ testObject_UpdateService_provider_3 = updateServiceDescr = Nothing, updateServiceAssets = Just - [ (ImageAsset "t\100362" (Just AssetPreview)), - (ImageAsset "" (Just AssetComplete)), - (ImageAsset "\fu\US" (Just AssetPreview)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) ], updateServiceTags = Just (unsafeRange (fromList [GraphicsTag])) } @@ -136,7 +139,7 @@ testObject_UpdateService_provider_4 = ( unsafeRange ("<\1090124#FE\1086106s*!\62593\DC4;\31772^WMr\1060834\&8RB\NAK\128903\1007550$\t,C\ETX0\11070\1023381\58817\27286j\\nF\175225W\1113162\&7\SO@\94549w\ENQ*g>=-m+\128253\997485JpQGB\1044309\&4\1060466\SOH!'w*M;c\ENQ\98836\1003286\&3)R\29851sZVy\DLEV\ETX\144137\US\EMJ08\DC2\\\ENQ\1081494\1001187a\1018101$\SUBt\181563\DC3f=\141465%:!\\6\172907\aES\1016438;|\67631\1046123*\32113@1p*Y;uGE\1069430e\1102664\f5\SOHWA\ENQ|\SOH\ESC\1009746\&4:*}$7]Z{/*\DC3`\STX&\155842P\t\1053171N\SYNRL&\SI\169000\USs\162298c2t\NUL\SOH)\26500\&2/rm\1051265wkD>}\1070334\NUL\DLE\128068\178727\&1%\1005755\ra\35525J\13316\19695,\1056622\nU\NAKY\1011081\1058839-#!\SYN3\190953\83058z\ESCl!`\DC3e\1102400\t}GW[P\ESC\1004676\189533[\1061401\ESCJF\21715\&9RA\1068756\"\t7[\1111740\n5\NAK~mEU<\nL|)&.Cu5T\121142 y>\9286$^\45932") ), - updateServiceAssets = Just [(ImageAsset "h" (Just AssetComplete)), (ImageAsset "\180491)p" (Nothing))], + updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], updateServiceTags = Just (unsafeRange (fromList [BooksTag, BusinessTag, SocialTag])) } @@ -152,12 +155,12 @@ testObject_UpdateService_provider_5 = updateServiceDescr = Just (unsafeRange ("\ETBI\\.z\96610\CANQaIC\1065269\32625\36609k\1091140J\SUB8/\110715")), updateServiceAssets = Just - [ (ImageAsset "7_" (Just AssetComplete)), - (ImageAsset "p" (Nothing)), - (ImageAsset "\19289u9" (Just AssetComplete)), - (ImageAsset "\172627\182076*" (Nothing)), - (ImageAsset "\1014021\DLE" (Just AssetComplete)), - (ImageAsset "\1004268\52075\985717" (Just AssetPreview)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) ], updateServiceTags = Just (unsafeRange (fromList [MediaTag, ShoppingTag, SportsTag])) } @@ -176,7 +179,7 @@ testObject_UpdateService_provider_6 = ( unsafeRange ("f\SI4 \1063170|\995839;T\139513E\NAK(Qp!X<#\ETBA\NULuW\44248cis\f=~C\1732\1027485N\161808S\SOH\988099;\EOT2\fA&\187694@RHN\1011941\137440\NAK42!#qAM1I\tu\120271\b\t\19488Q\ACKDi\127780tX\990666\1103592EI\SI\ESC\bK\GS\NULo\1044109k\DLE\187241\1005849Z\CANI\10594l\1044875\137688jg]\SUB\1100178\1078023 +e'u1\ao\175647e\US1\t\9732\9316\&0-d-UJTP\1092036W~\184365\&7\1098050tly\1087376\46624Ozw\tH\nW\1062958d:E\NAK@\DLE\1086957f#=\97609\&1\61954g!]\1051221\1055847pz\78590OA\1056922,\\xDL\CAN\1073075\SYNeF*s_/\f25 \1088055\EM\1053116\986882Aj5\74938\DLE\12992eDbG\SUB`\66727uW@\6764\DC32q-pq\DC2%j\ESC\EMq\993522\153753v\ESC/\1050068|\DC1,\DELw\ETX-\25497K\1048380\US\n:\98876\1102356\RS\142008\1050738 4\93016MxyOMq9~c\1082301\1028090!\RSQ\30115ql ?>\ETB\149698>(\EOT\t>\20400A\1079649/c O\59065]\ETX>}\NAK\1071442\75027\ETX\1048970%g\ESCWc\153028B\171118\ESCc!Aq\1045328a\7285\180743\155835\96854\167241\175754\46512\DLEas;\13803\1026445Z[Fs\180513*m\SI\n\DC1\t\155458ML\nX\tTD+\SO\1107343]a3\1082869&i\1000299:X\CAN\1001282s|\az-\1098006\NUL\187905\CAN\CAN/\ACK@v\150658\1010455^o\191090$+k\EOT)>\FS") ), - updateServiceAssets = Just [(ImageAsset "" (Just AssetPreview))], + updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], updateServiceTags = Just (unsafeRange (fromList [MoviesTag, NewsTag, VideoTag])) } @@ -233,12 +236,12 @@ testObject_UpdateService_provider_9 = updateServiceDescr = Nothing, updateServiceAssets = Just - [ (ImageAsset "\74850\1096630" (Just AssetPreview)), - (ImageAsset "\SO" (Just AssetPreview)), - (ImageAsset "`" (Just AssetPreview)), - (ImageAsset "N\32418$" (Just AssetComplete)), - (ImageAsset "" (Just AssetComplete)), - (ImageAsset "" (Nothing)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)) ], updateServiceTags = Just (unsafeRange (fromList [AudioTag, ShoppingTag])) } @@ -285,9 +288,9 @@ testObject_UpdateService_provider_11 = ), updateServiceAssets = Just - [ (ImageAsset "\ETX\95687" (Just AssetComplete)), - (ImageAsset "\1111812" (Nothing)), - (ImageAsset "" (Just AssetPreview)) + [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), + (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) ], updateServiceTags = Just (unsafeRange (fromList [QuizTag, TutorialTag])) } @@ -306,7 +309,7 @@ testObject_UpdateService_provider_12 = ( unsafeRange ("\US\FSX;,\DC3\149563=VNF\NAK%;i\EOT\996832$k\ETBc7\SOH\143354|:d\SO\GS\RSN\10748/\"V\1021294o\DC14\1047613\54437\ESCj\SUB,\1095459}i0m\CAN\31240x_ \1049571\175311Q\1022107JiC1p/[1\\A[o\51780\FS\CAN\NUL\STX+\127172\120462w\EM=\121430dH\1004989Il(#\GSvd+\69876d\anEh\1002617\nQD\\:@{\"\ETXZ\1014379i\1053082J`&;t}zQ\DC3.\1020713Co6\NUL^vvsh\51873\\a\1051720R<\SI{\NAK;%f\144785{\"\22777\&2\140005kp\ENQ\t\ETB\1112840o\97260|@.\RSX\1052971\a>\ETXek\DLE\FS>") ), - updateServiceAssets = Just [(ImageAsset "e\987785\&4" (Just AssetPreview))], + updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], updateServiceTags = Just (unsafeRange (fromList [IntegrationTag, ProductivityTag])) } @@ -364,7 +367,7 @@ testObject_UpdateService_provider_15 = ( unsafeRange ("x\a\136203\SUB^\ESC<4\n\17873\SO>v\157431|\1020922(\185983{\US\30184A\SYN/\1034793\FS&\24692w5945i\n4\DC1+nk\118834ZSV\1011086R\996947\GS\a\CAN\ESC;D_g7T\61134NN.\1080365,\1035561\SOdPu\SUBF\"e\1071157V\1072899o\1019597\SOH\ETX\RS\1090025J\brXcs<\41273eYl)'\DC3F{wjCio\10430\EOT\DEL\66434=F\EOT\1011500\FSAe\99614\29782j\987688\RS\93035_^7\FSzLW\DEL\v9Oy&\1019281\158269=j:\161191\EOTxXF\v!\SI\DEL{\182824\CAN(q#A\f#Y\GSm\1029668\SYN\33488\1091890Q\21517\DC4N\13674bj\21932H;\55134\26121fz\183843\135947.p\147443X\SI+\22973\29225\14419\b\n\35820\1092258\ACK8\1003849\99533dUVae|'3g\STX\SOH\177742xA\190959T\1088684M\167371\&7\60761:\NUL\100886\DC3\GSs\SIyw\1063851Q_u}\SOH>\1069485\134333?\US\SUB\1106685\6158]5Z\1034719%\57389\183657_\DC4\41432^\28540qa\329\1097112/-\ACK\EOT\45370\1089284~H$\FS\9526\b\SOEVy2obJ\138789FK(\995061H[^\1088420\25954n\160665/\FS\US#\1066635db\1006679\&5?\nM\SO\44147Xs\150820\1112961\f]XR,\GS8{A0.T\ESC4\SIL\SYN\EOT\1028786\GSkX\ESCa=6\"qA7\RS\ETBG\ETXD\DEL\1100961d;\185997\EM\NAK5\DEL\1076613Qj\f'D#\v\1087346gY\110778\CAN\8773\&4P2\ETX_\1048072P+V.F9\SOH\156486-oK&\EOTo*\SYN@\174461&w\1082933\n{\b/\39070<'>\148084GFoF\25642\SOH\t]vwT{+\987769\b(mO\35465\47334xR\1099279\SOHk\120988#\DLEJ\n\1111066/R|^\SYNXj\177224(Dc\RS\64631$jM\1058526\n|_\1023319s\181256\1081025U\1077048'\144694\f\NUL\GS\179974puJ\14349 1PH\986811\147997\DC3p0%!\1096149\&8Q3Hc\DLEb3\1063888\DEL^o~\1054122&u\a1,mgg\1046750\141023'J4\r[6\45643o\FS9\SYN\1020964<\RS\31175\fa\DC2\v\1046951b^2\DC3*\DC2Y\8803&p\ETB\27260#*\DEL\41812\SO~mcH#qFe\1015266\DEL\DC4Aq\DC4(\GS[\CAN%%h3U\1013273U\1099555\131387\1019990\&4\166361Tt\43506d7Z\1059964~\984571") ), - updateServiceAssets = Just [(ImageAsset "\SONG" (Nothing))], + updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], updateServiceTags = Just (unsafeRange (fromList [FitnessTag, TutorialTag])) } @@ -402,7 +405,7 @@ testObject_UpdateService_provider_17 = ("Y\37457\171247\NUL\1102605\19452;\40109l\1091643\1038961\164211\&3\1060552/\NUL[\STX\ETB\r\1050187\&9\SO9\SUB\NAK?yC&\1087572K\19408X\1008435Z\1043931A\FS\ETB\a\FS\1068870\&2(\FS\1081735Wh\1105128;\30117\SYN\177561\121419F'\ACK,\1008576t\b\148040\178770]Ea.Sr\STX\1021147/\1091479 O&\167108P\1051535\12083 P\fvL\1072069xTw\171454R\CAN") ), updateServiceDescr = Nothing, - updateServiceAssets = Just [(ImageAsset "\1032928j\92521" (Just AssetPreview))], + updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], updateServiceTags = Nothing } @@ -420,7 +423,7 @@ testObject_UpdateService_provider_18 = ( unsafeRange ("\ETX62P\SOH\DC4\1109991=\NUL8}\1103539R\1014278Y\187048\CANz-\50831t\NAK\30991:\1108518\\q5!\CANsz\986662.]\1091331}\EOT\SOHk<\1076580jo\ACK*\1006270<\1068043\v\162015'\\Ky\\d\67224Ea\186085\42476\&7\145875@3.`[\83186%\1013254\1103673\2547^o'\NAK3\DEL\f\32802\&7\155976\US\178005\182126\11804\13566\ETX<2\37455\\\EM7u\1101747\996895\1030597`\aF\DC2\1002903\1065461G\SIUMj??\1082038\163609[q\53362\STX|\STX\f\39680?\60538\US\ETB8\STX\EM\1113089\1024191\DLEZ\n#[ \1010523\RSh(\1031090\&3\142124\&1\bC?2rx7\NULjE\nU\1056190\n)4\EOT*\18936r\NAK\EM\vA\DC42TSw,\SI0\1061258\176021\&6RX\1104923KEU\99028as\DC3/\SYN5`,d\"\60033\DC3\180441y\ACKe&|\SO\USE\991388\NUL\34162\3233\SO;\DLEh,|z0\GSZPK#WSNOu𑍠jꨶE\u00026e󰊟\u000e\u001b𡂟34􃤪ꀨ󸤧8􂒦𧹈uxWꏟ􇹽Y\u0006𢥁(\u0018\u001c$D􁪲𤋤跃\u000f3􈒰#\u0016?\u0003\u00060*W3\u0006􉄿i覟h\u0015-꘡󼪝\u0006H?\\Tv􌐘퐺Q띕\u0010-@k%{=4\u001a!w&󾠃D\u0012cuT^\u0014\u001dH\u0008𡫡^]󰭄jXA󶦥𠧁@fV,OA𭋵霕F𥦖Az^g7𫘰),C󹏯}.𑰠󳏡~V􆽕󺂺(9^z󷯅𐜚3}Gj􇑫\u000cd>􉪙Y𫑵p#^􁜧L`S~􌺀\u00123\u0004𣞧怏𖩋㑪as:F\u0003", "name": "\u000ce\u0005󷀰zm𨦻6+)g;5󱬄Z 41\u0011\n\u0002\u0003%|\u0000M󳎰S=`IUK1󴿊]X\r\u001aa\u0019!𒊧+\u0003epRw\u0006\u0005#🍛􃎋󼾎󸰲UX𐔅]>i&r𡩍􁲩Z􅕍6\u0014\u0014󺁲􂠯󿅂\u001b\u0016a4\u0000􂬒󸂌𞋬\tLZ\u0006w$=\u0016u\u0003E1C'\u0005𥃔랛𠶎$𘢤􏤆9;#󿄛󷺏&\u001b󺭤k/\tu\\pk\u0000\u0002􈡶)\u001c/Lni]Q\u0000\u000fZ|=\u0011V]]\u001c5𦌻U6>(䍑'\u0018𫷞%'I1-D\"􌈿\n𓍫\npkHY#\u0000󷱔u]􇖒𣿖\u0002\u001fj'󲪯'\u0018󾛠&詄E鎪=𠾒Da\u0002\u000b􌨿=􈢭V#󲞟\u001e\u001cN#`uny󴺪􋓲53#/|,+ópW꺱i4j" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json b/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json index b744f820ae..d2731f2252 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json @@ -1,5 +1,5 @@ { - "icon": "\u001a4\u0015F", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "-\u0006v^\u0001_>p㙳\u0003\u0016\u0004\u0005୪􇯆]덀󠁰\u000f;v}q릎𮧸\u0007\u000f􏴖&~쬌<\u001d󺉸`,󼕲snਜ਼H𧆂􌯊𫉶:qNi]􀴜'󴊤#\u0007#T𩳫}󱸗\u0012󶊣M_\u001c\u0014󱘬􊤎\u0019,\u000e\u0018^]𓀫9􏧾-\u0007\u0001ID. FAp\u0004󼓃󵔴(S􀵪𐭀🡠\u0010sI\u0003e|Mv-\"q뿏zM㠌$H\u0001𡽺󵍯D]\u001a􁻕\u001b𤺴qW2\u0005􍦐\u001ey󸧓gg󸯗 /􇣧𘊟䧰~&y\u0008\u0006􈮮󿯅赦\u000e\u001c\u0016\u001et\\a.V\u000eHy8k\u001f$OʻXu/=", "name": "G\u0004\u00147󻞽bCy𔔚&5\"𗢵B$\u0002\u0012QJb_㵯􍬓Y 𦆗󾾭Y󵗂g\u000b󱿒xkJUi󻁈.=-􁡷2􏸞U\u001b]\u001a􊥙\u0010}R𦙪\u0011􏚼􋭲+R/􈥾𩮎p(M\u00055Fw<𣌅E󵢃R\u001044􂸟\u000e%@FPG󰰗JJ\u000bE\u001dz\u001e_\tb]0t_Ax}\rt􂊲h\u0013O\u0006󱽊`󽛆vm-?$!)~𥒒bh\u001e󶿅󵾖0x 􊦡􇐷+)A&mRfL􎷉\u0005􀋧>K@\u001f󵮯\u0007b\u000bPDWG,􃟨/J~)%7?aRr󱩅4*^󼭮K*󳖣\u0019\"\u000e󱍚𭠏l\n\tE𡔚󽎬\u0015\u0007\n𓆫c?\\\u0005j\"\u001bpe𘂒\u0000=\u0019>J" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json index 612828bf06..8171d31691 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json @@ -1,5 +1,5 @@ { - "icon": "~c\u0004~汸Y🁉\rO奿KH􌷲:𢁄𡹌\u0000WfA\u001aj<5_𠶦mx3^Em潜\u001af􍟲\u0014Wx $゛􃡶I-􃮄NhzWDC\"􄖩\u0001􈌑I&i\u000c!;-?X舒\ro󴯋G6\u001d􆼅i􍨏#yH%f@6qb?;􅦁󴃱&wQ\u0016\u0019z𗠣c𬎿\u000cJ𬦦$U\u0016\u0004𑐹0]\u000c\u000f7󻛤𪜚\ru)\u0016\u0014\u001byL𡙤n𣋪mm`\u0011/\u0013􄨵,𤙲𘉂DX纇\u0004}\u0004\u0002􈗐𘝘vE", + "icon": "default", "icon_key": "󻚍W.\u001e틕E\u000bS_6ZzJ{'\u000c&M󻉧󳲿𤴄唂󸯡t;C󺱊'a𩟏[(X\u000f:󷫰\u000f\u001f`􆤢zK[䈙􆔗a\u000b", "name": "UivH&횊𗾉p\u001fzⷌ\r$\u0014j9P\r\"􅜃ಶ󰸀aF>E􇘗𡼡B\u0019&􉯋\u0014𪭋+'􍠒R;!\u001d󸔢\u000fvv|\rmbGHz󵚲𗍑3h𝡈\\U|'\u0003;^&G\u0018\u000cꁴ42\teq􀏗\u000eV1}\u001eaT󷧄aO7<;o𫶖\u000c􏝘m)$PC\u001b7;f{\u0002t┽>\u0004X@4|/\tH\u0005/D𣋒\u0019𝩜C𘕰Q\u0005T􋮡?d\u0006􆊎#H🈣𡽷*𨡴jo8+𩆂\n\u00005L[r7_.\u0010l1𫁝\u001f6[EhD\u001fh\u0007􋘏\u0015C𢇵,𫎢,@?y+;\u001f`/^d𡩦󲆪HeCd顴\u0013􀙬𣆗\u00052O-Hijo󶂘󿐡󷔶X}x􏡾\u00177𣫺쿢C甽\u0010`k*Gl󿙎\t𓀮󵃮\rb}\u0008\u0000芆h\u0016ynr6d(", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "\u0004𠇱\u0017:󰚡HL\u0001^bs\u000bG𦜤{I􋥵]-J\u001c􎟗\u000bs9\u0010󴔽vI`N밟MZz", "name": "\u0008 \u0001+􁴶;\t095ꖖ\n\u00022J󴬋\u0011UzD_􏋚\u001c" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json index b9317a5f4b..a52117b520 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json @@ -1,5 +1,5 @@ { - "icon": "r켭嚔𑪕u*33{8G􈵆aO\u001d%\u0000[󵂞U\u0005󰤫iKL\u001dNF𨀔􌈒`\u0004T$`i5𖣱\u001bŤ98>", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "􎸃I\u0006.𦱂@y0\u0010􈛝n\\#skj󸸍Y_󽔌&x󵹳\u001d\u000fy􍩉B\u00160\u0013VP1􉓪q󺌶􈆙渳R􌨓*+\u001e,MP槄*;\n\u0015롫\t𧋏\nGj.ꅊ􍪛lㅎ\u001c~􆭊\u0000.􈧂&\u0001}\u000f􇺚\u0011+f^ZC\u0007'T\u0001\n󹏻􋹧U􎠓`W\r\\fX\n􋛆TF􎬔`h𗲐[듫ERdP5<<󺁭;\r􋣛\u0000Dy漆5N/^𡏆(\u0013󿉋􃋤6e\u000c:\u000fB\u0010F-􏂸䏱􃿵Rfb긦\u0007DrB󱌬㖬桲\u0000+2.\u0007\u0007}\u0015psFw\u0017\u0013 𭚗𥂍k~", "name": "뮅H􈒨𠓐𦡃5\u001e󰳡-\u0015\u001bR\nL戮&bD𢂤\u001aH\u001f󾈖\u000c\t;e􃴠럽\tc􉣼e􌚗\u0010\u0003I𐃒\u0017𠫼\u001a \u000fꬓ~FE\u00186𧰔돮u\"𡈄󾓋\u001cFYI\t/{\u0005\u001e]j􆸮\u001f22㸌lꕾ$\u0017\u001f𫼷kL{\u0002*𠄶RMj\u001b􊜄W3H󹇯\u001c\u0015^\"5珕缛*􌕧" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json index 2764ebff6c..175e5cdad6 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json @@ -1,5 +1,5 @@ { - "icon": "􂾥b\u0004ch1a iuB󷁓\u001b\u0011𭱠\u0002V󿧅@1𣛸 iY\"m󽅖\u000e\\O*(\u0013𫣇w7w􍻦\u001f2ECk𘏌4\u0003ୌ%\u0004@\"k󷔜󲢼*󻶙\u0011\u001bYC?𫑘2>촘\u0016o8[\u0007V@9E􉄈⒅󸣂!k0b\t\n+6\\Ki{\u0011󰕎\u0001\u0016󽏅{0H󸕍\u0014\u0005󲕅|\u0018󹵤F鈫󷊥d󿐟\n𝈟􁣼X􁿧􁀇*\u0008C\u0012𘒓Wz􅚿鋡QWt\u0017Aj>eO}Ae\u0014\u0017\nl􃄦g\"󳗩,6K滠􁙀[󸱽󸆑N庝eB!𮇶C\u0004\u0002X#El\u0017`e 􋯾\u0006\u0003PBC􏑎fa𫬟", "name": ";𛄘M\u0004𨅁P]'󾋁􋍲ဖ􁟺iFnRQV꣦@󲚞l􌔻\u0007KZ{잴S𮦪\u000cg*\n,`!V\u0002󲇏e'󽹟\u000e0邛p4d\u0002s󹈷uK(c'컁hjB𣘹\u000et'h^\u0016\u00160󶝏_⼠𨮕thH\u000f􆅇:󹀞l; n4c􌿕D[󷩴8Y+􊬷\u0004E􂛊\\0𩅑KKTc)P1K󾠫󱸡W\u0003<|愸0|5{Y󰺓M\u0014\u000bK\u0010􉹾\u0001\u0014󷞕.\u0017g󲇥\u0010\"W\u00009&0yYZ􋍼\u000bⵖ" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json index ec9417ccfb..7c084d93b7 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json @@ -1,5 +1,5 @@ { - "icon": "0^􋚞7>𗅥 \u0002馏\u000fF\tAH𧑩:𨹫8䅗Q󿒛\u0010-A\u0004𦎬\u001bHOc\u000b󵺂\u00139\u0016󠅕{ \u0000]󶒐I􁗫,𧯞f\u0012􉮨q\u0001🨣GA\u001dT\u0004S\u0010MmnLy􏴕=𠀦2k󶫴\r~􂩧1! \u001bJy♜J|zgf1}ILN5󺈩Xi᪽Be.􉁉\u001e\u0016𗎂􊒧\u001e+Y;Z$\u000e5", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "oﲕ􁂈\u000f[aoM\u001d􏉓}q躷4^\u0017-*%𤎉8􄨋`􅝘#pH}\u0013?w`A/𖼹􎩙󲼀 􍦹\nXꀛ󳡲\u0013u\u001e\u0001(󾒲󵮑6\u0002]t{\u0014\";*\rヌq􄐓⾵+w&笭(3#𬈙PY]\u001ef\\?F4\u001a\u001fT􎩣Rnfq%𐔹p𥨈𬠶j🏭0P\u0008n\u000e\u001c\t䯈\nN.aGx", "name": "G쩷𑐙rLb<􁴯!\u001e|RD𧠁\u0006𔐎𨏿눢Ag墘 \u000by`\u000b󿌣K㗃e䠣,𣘥DQEO\u001e|\u000f􆭓􃨋gr􏲼\u0000\n*1럩R\u000e𐔍-Y󽙱n􉃤]])􉉻C\u0013𣰗\"M@(K㮂\u001e1諷\u001c\u001a󺜆T?}\u000e=*𭇂\n𑄉\u000b_\"7􃹱?Lk𤪸x\u0014bu:𣸰㣱󼻩<󷼔6\u000e`􅣒U죑yp𬰚7%" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json index 690eaabb6f..add730db13 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json @@ -1,4 +1,4 @@ { - "icon": "(r'`􅲹Gd\u0003)u\u000cq*4􆹛󻯿i\u0019M.Ru􇜭\t𤋁􉲱m;\u000c󴞗􏿰𡃾m\u0007\t􄛑wRhv\u0007r6ﳼ\";&4\u0016X\u001d\u0016w5{%P&極98\u0003\u0002yL\t󹫣XMu(𭷐6)\u001aꓯWc闛#\u0002夺l􃳷Vy1_\u001a\\\u0018􍒠꽙Ek>󵛷\u0006]$\u0004𬘽􆰩w\r𨅛@&V8\u0007\u0010\u0011\\󶯔􁔬\u0015)X\nE)􅪟y*%1\u0015\u0012^4hKf󳅲|EY`^\u0013𪗫颕\"pX\u0008g샴>YR(W\\eS\u001d氵(bn\u0016u󴙶𦒟hꆂ\u001cG􊉫\u0010蜙a𑅱n2)󰛬\"<󻿼YUq􀉀󼱣𭦇\r7ྤ\u000b􀊑惱\r󺽸|]\u0017\u000eh9f󾻓\u0013w󴧻Y}呣1q\u0015Y:搚q \u0017=*#𒓟\u0019\\啿y9Tfc\u0011삯k􋯆\\Oxxn&6NtaZ?k:5G@딎\u0013H􋶽hu4𫩷󳈫\u001fR𧠉󺈅v服嵡𑧡㉑\u0006D󰡀[bb<􏝁" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json index f5bbb69dba..ea408149f9 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json @@ -1,5 +1,5 @@ { - "icon": "UZ0󱶈t+𨼻ㄭk|\u0011\u0016\u0019_ch\t􊃨㌵\n\u0017\u0012,x􎅷,RE(,G\u001d\"gA\u0015ncdJ𧰏+\t􌥁FP{v=낫'e\u00029B#1􆤏\t.􉄮𢏾Ⲙ\u001cUK\u0001\u0007;\u0002􇙌𣅐7B\u001b\u0000D+󽉔􋆄`\u000e>\u001b\u0011,𩳟d\u0001(5\u0004P9iR]\u001eNws󻘌󴿔{[H🚝,5J!𡔆󼾅\u00061\u0008ZQ7fmQOQ󰹗l!\u0013꯲歔*ꪩ*1\u000c􋹍8nk|\u0015󵦮~\u000cO𧲭𘧿!:3\u0003n{%ᨇ𬦬if/!瓝] <􁶰Y􇖘\u0008\u0014~\t\u0019\u0001<*\u0015𣀥bx4 {𗟋\u0018Vs;g𘉱𣐄\u0002qkI!QJ􅲮J𮑈\u0014ﰡ?_\u0002\t􈍎iB3YdKA7@>Q󳅳󰾩]􋏴𠣍>D󺬃wD\u001b|\u000f'^𡙕𝠪Q#q,\"" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json index f248cde64c..c0de11ca75 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json @@ -1,4 +1,4 @@ { - "icon": "_'C󵌷\u00049\nC𖡚f\u0007𝁅Pe🎻𭏞𠮠𘃽5􀬏m<\r}𢈳@􁅠#.􂖇\u00026%􏝅H%󻝱n\u0004Uk\u001f/\u001cpS𦓈􌄑[1np\u0006mD󷁠U\u001dI􈡦]I삽𩸦AT\u0003\u001fOl{\u0011\tYt7U +Q􆂍\u0018\u001f[\u0002JV\u0004`\u0018rF\tN𐤏𗚁𩠇\u0016𨪒*A\u0010A]4ku󴻠W􏔺홊I\u0014\u000e𗇟", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "name": "r\u001e\u0017뚌𢯠7X \u0019𤸰J\u0018尹􇥏/`󳬿mg𠵮2\u000b/7cI)&\u0000\r\u0019=m$\u0013rv\u0012W:उ\u0000!:\u0005x󿅤𘆆iy𒌊\u000f\u0005>j􁋝eA󿝖\tbj\u0019k\u0011l\n󱕁H~]uꞛ󻏫!kjVS{42\u0000E?\u0019h褨B!:\u0010X\u0011T3W\u0007vimhK􇒫\u0011to*P*\u0011}󰳺􇾡H\r󼜡B" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json index 3c5f696fac..6ed4e3b484 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json @@ -1,5 +1,5 @@ { - "icon": "~󻂃C]\u0018S7a𐙣'󶎸u\u001ee\u00148쨞圈9=𠸕\u001b\u0007'󲅋jqUiA𬏟i!\u0002Pl\u0012􃵣\\\u000b;Pq|\rUA߀D4􊤫;arv\u0007h8/\u001e\u0010𩮉PZ􍽒𮈨|O󹖾\u000c􍩄E/6\t᾿f?,x\":{q::Z橳\u0000\u0018DBd\u0001𢓾a\u0003Z􉄣0~r@F", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "1\r4]N!\"􅦩R&\u000f1i\u000ee𪙓ygO\u00064\u000bO\u0006~𘝚\u0000𓅀b1a𗭜Q\u000c\"󿣣􀳈)􃛢*x猤C_\u0001a[*9۵𡹿N[Y􎗮r\u0019\n3􆩙.(|as 6H\u001b󿭵󹡖􏎇\u00016\u0015Bmh/\t􎧕䬴~󻴋󷼗qbRp𢳼<􋅻讷N/󽭥;\u0014l𠜂\u001d𥗂ac\u0015C\u0016\u0004U\u0000\u0013pW[#u𝨩\u001e􌑫𨁋\u0012\u001d\u001ar\u0012D#􀱀󴸥𒔭(@i󾻹𩿙𝕗DY\u0019L1\u0013|q{&􎤪󺒬1{'􄅑y𬛅E)\u0012󴔸!0kdCOX:E󱄥\\󺜙C\u001eISa65N\u0016[i\u000e\u001e\u0000#:q", "name": "|跤P\u001f󾃍𧁄Y\u0001j\u001eYrr쉏0m\u0005󺽲*'𑦢􍷘P6\u0016㮄\u000c\u0012𞢵e󻸊\u001e󺭋󴹋𑄺\rA'\u001dA\u0015툒􄨮J󸊪'T󽔣R2? \u001c\u001f󼄆$\u0015Gr(󶐡{\u00050mJ\u000fD\u0002-\u0018_I𠔎\u000c𤃑\u001cR􇮍hp𣉒B6W2\u0008\u000c6􍯣\u0012𬌆\u00081'7-T-#ཱD􆱹􈌑T]v$Gl󾛤󼉲5yg󺔀\nQc.`i㧣忚}\u001c&k4𘔫\u0006>#納󽊚\u0019𠎓[vBOPu􎯣@\u0006\u0000􉦊𤆁\u000e\u0015𘇃篖\u0004\u0003&󼂜?z󱢾i\u000cz\n󻏿\u00173\u0007􎯛W􏷕E^󾮑󶱉\u0015aR𣛯;쮷\u0001\u0019\na\nvt𠠗\u0003a𢕖 J𠸂uX􆽹?Wz&<\u0014C\u000cx`󽝑#\u000f懶邵ꩤ\u001e\u0002#\u0016\u0014-Oj\u0004d󽗌'FoHqexoh\u001ax􎋻𭉐\u0008i󳰵yr\u000f􃼯w􍥢\n8T󶋓2'󺁼􏋦􍒽\u001enxW[棁󲜚𗧓𥝏i㔕4󶌓YHZ뺃VZ\u0010^0\u0002C􂌻󽍘", "name": "𪐝|Z凅?l\u00084D乛K0#OV>󰰅S3'4\u0006𒆠*m-\u001b4\u001fj\u0003__6󿝣ᦴM믅\u001b]\u0004Dq\u0010uo浾$\u000bUWp1=/o\u0017Y𪙶9\u0012\nQ𫒥􀦝)􍉷4wa𗐋leQ*󴑞󼡨>@,󿖻𮦮RF4QcNY96𩉓􀮈G􅆔&J\\TzHUiG.C\u001a&\u001cx춈𨿱3􍳊A􁔸B)燖穲r󵌈\u0005&VCPa{\u0001\u0019Wꧬ𗰙\u0010/􇔳\u000fc:b\u0001𠒪)襈􌫒鉲@5󰊈I02g%%1bJl} :󹙳\u0016署𦲖𢻉", "name": ";𭏚@m\u0008Z󹔛1}\r9\u001e)\u0000𧷛􃫣𗖻\u0001,q\u0001`􀣞P󱉭􅁌\n\u0004Im􄠱\u0014󷜳􆢃HB\u001d`󹫇𢴱U𧩣G\u0013m+Lw\u0010󹾧\"0𝍉?-T\u001b\u0003j\u0013|Lq\u0003.𘋘hgq\u001by𘒇5\u0007y\u0006􏚅w^(\u0017+𪻾3\u000c𛰿x󶅕i*E\u0013𫹺rTM\u0018􊶥$𧐐𮣞\u0004\\p􁇚1\u0007𠀗􀠺zv󼞙\u0019rj\u0007󾭒u\u0015n\u000e𨆖6\u001bs\u001dm9Y\u001c%\u0010?6󽯧\u0002\u000c􃩾)RST\r\u0010􎑠\u0011􇓹h\nTS\u0012\u001f􋻇\u0002n\u001b𤦦r2𒂷󰕫hrr-$*j􏇺觹]@󵅝㪱J\u0008\"8N𐬼e,\"br\u0001\u0000𦱘+멦c^󴾍<`􏛇𤙄\u0002󰷙\u0003𧥛D\u0005皔nqp􋝳󱓐c\u001et􇿧G" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json index 8fa459aa87..8e455519f4 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json @@ -1,5 +1,5 @@ { - "icon": ":b6𘍗L􁠹K<􎦯𗋵C^\u000eY8LuXS𦏱F\u0001\u0017썁󹲗\u001f󾥞J]\u0017A2R$P6\\\u0005𩆊-J\u0000t\u000f󿫯*󻣠r􇍈M\u0015PL)𗈟\u001aJ𑱚S􍜑~'kRYj𑘞{P{V\u0001!󰱿Y~\u000bV\t𤰂{5%i[$7X:ZV\u0000y\u0007삉\u0016\u0005\u000c;!k?O󻚧􈒉K:}􋴳𪤷#>\\|(n\u0002𨟼\u0003D𤨬쮝{|𥃇󱄮+᭮J", + "icon": "3-5-3d4b563b-016c-49da-bad2-876ad0a5ecd2", "icon_key": "\u001c\u001eP󱖗Gt\u0016-렬nJ󶲘g^\n\r𫙿\u001dR󶦍􇜁𒎌t\n)1/% hL\u0012Ad\u0001Xq6\u0011)\u0000\u000c6\u000cV\u0014r􋶨\u0011n􎖟,@𩳑𝃔\n\u001a%N𫊸\u0006葀Xv)\u0016z?\u0014\u0019Y𧤂2𗘰um8}죜\u0012yW\u0000HQ\u0005D[Fe\nk󳻂\u0019懷Yk@##u}j𩝺𥛾\u0002q\u001bir7) 汬%󸄨~󲪳8􉈠je􌟌0*Gi3𝟽je\u0018Qr>󼕣k1爛c󻶢L󷴬𖺉t\u0004W󳿃\u001ao\u000cgh\u0006𪀙C2霩c\u001a)uW\r\u000cB󾧾Sf\u001a\u0001*5l隺\u000f文\u0019B(\u0005𠩾/)!{󵬬9\u0002A㻍fx&𫽹T&𭪕\u0014쯾[\r\u000b\n􅢉j2𨤤/􉑰\u0005Qo\u000cj𠵠🤐\nb6\u00183\u001e9\u0019󴊖ub\u00173CY\u001dsIz" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json index 4ed974f0ca..8cfe6417c0 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json @@ -1,4 +1,4 @@ { - "icon": "tmIV󳻵3􌹙󿽑HKE{􆭢R9\u0004\u0017E2𐭐L󶢉|a\u0008|Cꊁ􁢣}\u001d󻱜\u0018O9$)\u0000\u0002𥙒肷\u0000쑰K󿉉􂇠d懛\u001d\u000bq󺖧B\u0003\u0007T\u000ePtY\u0015󿫵潌z#k`P􂀖\u0002_7LXC]`#-`\u0006ࢺ\u0012pw59\n\u001a\u0010jꍃ𭈉F\u0017􅪽\t;\u0012r*圮\u0019S𬤻E8e\u001cx􊞎A\u001a|j\u0007d\u00100RDI\rQ\u0015`􅰜\u0019)j{􃚂𢸬􌥩f@\t\u0011\u000c\"\u000c󾵭􌛋􍼕ᢞJ`.𛁓*\u0008F%4󶟬\u0019-3g𘟴􍙴􍀉\u0002\n\u0010\u0013]s𫫟_\u0007󾒾𧯔\u0012\u000bȃ\u0010㳼v|\u0008􀻧%𨙤g~0\u0004Wp\t 𪒺C\u001c𤥂x\u0005\u0006\u0012-DIYa󵌭:𮔿'{􈚁𣃢󾕜6Ḋ󴋄=xfo\u0006U'\u0014􍊅t\n\u0012􋝛6𝋯/􍚳tR\u0016#􎽉", + "icon": "3-5-18fef3b3-323c-4c27-bb62-6026d62f77c3", "name": "\u0003󵳮k;" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json index ed2cc6465c..d7f0bc88c3 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json @@ -1,5 +1,5 @@ { - "icon": "![\u000181潅󰋙䘎𤗈𧗎\u001b􀷘\u0007\u0018\u0004}r􍅵\u001bt𫞣𪐝􎟩繤𥞓M󲷤1\u0018$;\r\u0002\u000e\u0003P\u00193)R=E?9\u0010$>*\\`鞀\u0013\u0007]𣔼󹓭{FKA\u0008􍄸𫨟\u0013\u001f=UC𫷵KQb􁡺󷼩\u001cX7@󳌔C~-[Db $cx\u0003Czvq ,g\rD󻿪", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "s𡜶:\u001fdm㒛\u0015I⸈Y􅌌𬜈􋪠>q󱙒\nQ\u001e􁔾\u001d#w𤇠𩻗􃿿𡖭B\u0014\u001aLv\"S>𝤅!]sB+6\u0011oc\u00177蛑lR𗙺\u0019r%E􇋯B𘆔A􄡥N\u0017?{􄈤/|cU𢟋]𖫠􍇌\u0010𣾄􆣶+󲃎\t$F𗧊he4𨰴|k/!5Z~𔔮\u0017󸛵\u0001\u0005􂃝3E!{^茖4fh󻗈N􏚙v\u000c\u001d󳪍mde!5󺻟y&􃔋xo,\u0002rk􅨸\u0005\u0001JoS󰹇X䧱󲸿a󱽇\u001e󿘄\u0019\u00013j༽Z4\u0014􄸣l컬n\u001b@ve#\u0016\u001d𬴣P4􇀲\u001b𩣣:𦠊z1*\u001fs\u000bd`􂬥/餄𨜲", "name": "\u000fB𑋐3𦩜\\#􃅻I\u001fK󹶘h\u0010\u0013\u001e𠻊*󳵆L\u0002w1p\"4\u0004𮉃#u𣖞\u0016\u001c鄂ꊙ$Ÿwu𪞴넣󶏴\u001a\u0007)\u0012?T 솆8馿.\t\u00151\u000c\u0004Y🙉%މﭸ㮲 &Z4􈼌\u0000@\u0001\u0019𥯩􇐟􌑣xtj𬦽`\u0001r\r𖾒\u00040\u0019\u0000Lyc D\u001c􈺓􁣾)\u001a-\u000e􈼌\u000bl󰔐􏿡\u0018𭨼f\u000frb/[F\u0000􌣆<1󺼰P\u001dxl\"!11E\u001b0\u001b\u000c$u􊼽N\u001dV^󸗡q𩪫\n`󿮐𧶴:iLXn\u0018󱜞朻O}8!Y\u0015,^X咽hEa\u0010^\u0005\u0008]`􏭴<\u001dZG󵉂\u0001𮞘廑*8p\u001cF@OLpnXTmW𗤩f𐨎􆮍敢Ze1 \u0016Em汵f\u0006󱀇", "name": "v𭺬hEWefuu󵳔jPx𦦹k#\u0001󰹥\u0002\u0003^\u001b\n\u0018₅p1D|S1􄀟􍄚熗\u0016`\t0g󼣥,t\u001cw\u000cDT\u001e#H\u0001𣜘\u001f{􊞫󺙲󰔬lW\u0007,uil\u000fN`5e:\u0016 Y!\u0016󺑛tb􈼝" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json index a03c29a624..65f8d616ff 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json @@ -1,5 +1,5 @@ { - "icon": "_5勞\u0007Q􎲫W⃛9ꮦ*󴽳", + "icon": "3-1-b199431c-e2ee-48c6-8f1b-56726626b493", "icon_key": "D\u001e𩉨\u0001󼓤🚱Ll\u001d\tW􂂹o\u0018멤b\u0003|\u001f*=󶶐􄖘󱓧6󴆄", "name": "𣢐󾧌iz􂒳FT㩴;􎦑}𮇵􏵿9\u000e󲆑7>hAC\u0000H2O𫑫m𭴿2R(?W,=,󱸅M󲓈\u0007M椔\u001a맰q\u000elj\u0004j^.s~\rY%5lM,杼=\u0006󸑃𮆫>{\u0018\u0010㸆f=X9\u00169쟉𦺻TI4䒿\u000b\u00156󷲘/\u0010\u0015\u0006尌H<\u0005󻙇e\u0005z󸚸:៹\"rS\u0007𨻬\u001c\u0003􂧙󻹪뽴\u0014\u0014Q\"􄃰1:􋽔\u001fT.;󾣧䟌}" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json index 79c17c026b..3a3f84deee 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json @@ -1,5 +1,5 @@ { - "icon": "✅IT\u001e􍑦뾖%mE󰤊􀩈M\u0007:[fgw\u001b?ye𑇐􋱯K\u0017l􁜛󷔒󽎻Qg?𤼃{\u000c!uXA}H)v$𧋓􊷪mGkC9􈸥\u001d􊲊󼫰1DH𨩌sꕂ7[.𭹆v+􊥆O^SGjv􅇮Y󴺥n𥬜Z𓈋\u000e{􂺫Q\u0003\u001e1I\u001c5\u0006󼻌􈥆󻳺_􍽩?gDႽ\u000cg㪠:g\u001c.J<\u0012\u0017󸋤}/𗹵OBLa􀳘\u0007{󶷱-􃾛\u000b\u000f\u0010𣥐V \\Ns0t􈃙frR!Qe!$𢌢󶀅\u0016$􇋮!SZ􁀀𭃻a\u0010B3", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "v𑈬땻h\u0001_󲋫\u0013\u0006i󴋤\u0011\u0003W𑱑譟\u0012嫢󺥖\u0004\u000c%_􃹩\u001d\u0016\u0017 N\u0000F󵞛\u0005LUua3􉻐M↝\"𗊟\u0001\u001e\n-='\u0011B#\u001c𡚱>\u0013𠓴\u000f\u001d􉩪G7v6w Zቆ􀦮𬥤𩬵\u001bP>𠀧􀫷􆷹\u000b}?ᓄJg\u0001\u001a^pl􌽧2.\u000eV\u0013坣ﯽ\u0005B󿏻􆷽𢃤<\u000c2䬴Tz@6\u0013𑢫x?𤪑週\u0008\u0010\u0018p􈃰\u0016\u0003N􌠀C\u000f\u001a\u0011l]R\u0000vL󺵶Nz\u000c-bf}f>\u0002H\u0019𡔤+Zo󴈣6𢓖󽱓重󸒝|`dN 擦󱈠i_􁮱p󼐑J斐ngp@#􍼃A󱖱7l{;𬁛g4EX넌\u001b􄳆𤺴#z𫂓\u0016y\u0004\tG\\謖坴#s󵘆Ad􋓔Obh󶑡\u0012􉑳)3R\u001a\u001c𗳩aw]􆞷󽰤ფ𝂦kC梿\u0001󴶁󵢐d8둥\u0011\u0016ﰺf9", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "X󸸽;\u0005W\u0006Lk󳌎𣔖\u0017\n][~⠨&U亝v`I\u0017\u001fl󰉫\t􊋾?䍋KM3c􄨽󻧳= \u0017t5vKOg\u0015/NC2~i'􃝴Ojb\u0008\u0003􊇳\u0011\u0001\u0000FWc󷭕sU>P\u0001~\u0019wUHU\u000e#훞􈅯!Nwn󵠡e\u0001\u001a\u000c\u0003\u0017Tl𛀥BYU;a󷋠K7?,m𥪤Xpa뺹𡰽\u0019 ,M!~^g6}(踑\u001eᾋgX}𧓻)c\n\u00012E", "name": "\u000eLN\u001dr𣎸􅜗k𬙅#𥙝lTD[Jh\u0001󻕋蕠6󼧒􃟠\u0015}\u0007db𩵜-\\-1\u00142󿝈\u0012𓐮1/脼b:\u0005󽩦;Mw\u001c𬸺􏷋ITuy􀚘`SP\u0001\u000e\u001d\u0015\u0007\r7M􅄎􃳖䢷\n\u00163V\u0003R\n1$e.􋩅B~yd_z󿴉\rV􊜗\u001e\u0016𨒺l\u0013론u􂝲u\"\u0007Tc|sEw󶷶wTC|FቿB\t\u0014&\u0008UEN(+M\u000eF;􌟢𠶭\u001920\nrPW󸓢$􃽩" } diff --git a/libs/wire-api/test/golden/testObject_Event_team_1.json b/libs/wire-api/test/golden/testObject_Event_team_1.json index 8cbbc5ac0e..05172b99c6 100644 --- a/libs/wire-api/test/golden/testObject_Event_team_1.json +++ b/libs/wire-api/test/golden/testObject_Event_team_1.json @@ -2,7 +2,7 @@ "data": { "binding": true, "creator": "00000003-0000-0001-0000-000300000002", - "icon": "#𖺗匞(󳡭", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000003-0000-0004-0000-000000000001", "name": "\u0004X󳒌h" }, diff --git a/libs/wire-api/test/golden/testObject_Event_team_13.json b/libs/wire-api/test/golden/testObject_Event_team_13.json index 587d5713db..5c1522c9c1 100644 --- a/libs/wire-api/test/golden/testObject_Event_team_13.json +++ b/libs/wire-api/test/golden/testObject_Event_team_13.json @@ -2,7 +2,7 @@ "data": { "binding": false, "creator": "00000000-0000-0002-0000-000400000000", - "icon": "\u0008􆿱", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": ",7\u0007S", "id": "00000002-0000-0003-0000-000200000001", "name": "\u0008h0󺴴" diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json index 8c206d3e0e..97834f65c1 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json @@ -2,7 +2,7 @@ "accent_id": -5, "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json index 10c2c3e593..3f8a4222ac 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json @@ -2,30 +2,30 @@ "accent_id": -6, "assets": [ { - "key": "\u0010k", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "/", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "呬𮀉", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "\u000c􇀊E", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json index 490d590585..06779bb383 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json @@ -2,12 +2,7 @@ "accent_id": -5, "assets": [ { - "key": "\"吝󿳖", - "size": "complete", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json index e2c845c07f..bd39b09311 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json @@ -2,17 +2,17 @@ "accent_id": 8, "assets": [ { - "key": "\u001c", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "𖫳󰑑", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json index 779f6e45c7..d69befdcbc 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json @@ -1,27 +1,27 @@ { "assets": [ { - "key": "𦳝\u0011", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "\t", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "V#", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "(\u0003", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json index 8da98068cc..eb75d9b63d 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json @@ -1,22 +1,22 @@ { "assets": [ { - "key": "C#􁹦", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "\u0014\n", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "V", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "Y+_", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json index aa68bf9709..0a7b710fff 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json @@ -1,17 +1,17 @@ { "assets": [ { - "key": "\"", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "􆵛d", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "8", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json index e7dc04b548..7d833c7537 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json @@ -2,16 +2,16 @@ "accent_id": 0, "assets": [ { - "key": "'\u0012", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "`", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "?􈯅\u001b", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json index 161483bf34..fc11374d34 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json @@ -1,21 +1,21 @@ { "assets": [ { - "key": "ᘻ~", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "i𗳫", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "\\", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "%o", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_10.json b/libs/wire-api/test/golden/testObject_NewService_provider_10.json index 7164b7e67e..88656b0eb3 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_10.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_10.json @@ -1,16 +1,7 @@ { "assets": [ { - "key": "", - "size": "complete", - "type": "image" - }, - { - "key": "", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_11.json b/libs/wire-api/test/golden/testObject_NewService_provider_11.json index b819e5500a..2a6646e785 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_11.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_11.json @@ -1,16 +1,7 @@ { "assets": [ { - "key": "", - "type": "image" - }, - { - "key": "", - "size": "preview", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_12.json b/libs/wire-api/test/golden/testObject_NewService_provider_12.json index 9b31888d42..77d144457f 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_12.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_12.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_13.json b/libs/wire-api/test/golden/testObject_NewService_provider_13.json index 0c81a7abb8..1ecdd4e474 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_13.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_13.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "g", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_14.json b/libs/wire-api/test/golden/testObject_NewService_provider_14.json index 842bfede2f..54a58187f3 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_14.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_14.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_15.json b/libs/wire-api/test/golden/testObject_NewService_provider_15.json index 8f4761c8d7..fc9655b8ca 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_15.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_15.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "complete", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_16.json b/libs/wire-api/test/golden/testObject_NewService_provider_16.json index 1edf7e274d..b1ae02f07c 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_16.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_16.json @@ -1,21 +1,21 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_18.json b/libs/wire-api/test/golden/testObject_NewService_provider_18.json index 03ec6a44e2..3b3d9dbc07 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_18.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_18.json @@ -1,15 +1,7 @@ { "assets": [ { - "key": "", - "type": "image" - }, - { - "key": "", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_19.json b/libs/wire-api/test/golden/testObject_NewService_provider_19.json index 05a1aab261..710d35140c 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_19.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_19.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_20.json b/libs/wire-api/test/golden/testObject_NewService_provider_20.json index b01417adb1..7305469136 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_20.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_20.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_4.json b/libs/wire-api/test/golden/testObject_NewService_provider_4.json index 5ab941b4e1..a992cbef58 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_4.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_4.json @@ -1,17 +1,7 @@ { "assets": [ { - "key": "", - "size": "complete", - "type": "image" - }, - { - "key": "", - "size": "preview", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_5.json b/libs/wire-api/test/golden/testObject_NewService_provider_5.json index 38ea4547e3..c3f5c2c30b 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_5.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_5.json @@ -1,31 +1,31 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_6.json b/libs/wire-api/test/golden/testObject_NewService_provider_6.json index 3371cc4502..7ed1a9376b 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_6.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_6.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_7.json b/libs/wire-api/test/golden/testObject_NewService_provider_7.json index 7b607c7813..784130b735 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_7.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_7.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "\u0006", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_8.json b/libs/wire-api/test/golden/testObject_NewService_provider_8.json index ad7c718ad3..dc5ccf6a38 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_8.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_8.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "preview", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json b/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json index 536556b965..f4c138be25 100644 --- a/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json +++ b/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json @@ -2,16 +2,16 @@ "accent_id": 39125, "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "(󼊊\u001bp󳢼u]'􅄻", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "􁿐f", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewUser_user_1.json b/libs/wire-api/test/golden/testObject_NewUser_user_1.json index 6fb028d395..975b72224b 100644 --- a/libs/wire-api/test/golden/testObject_NewUser_user_1.json +++ b/libs/wire-api/test/golden/testObject_NewUser_user_1.json @@ -2,17 +2,17 @@ "accent_id": -7404, "assets": [ { - "key": "ᏸ5\u0014󸾲𗓰`\u0007\u001aG{?", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "something", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "KE", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewUser_user_7.json b/libs/wire-api/test/golden/testObject_NewUser_user_7.json index a778929fa9..291e71c640 100644 --- a/libs/wire-api/test/golden/testObject_NewUser_user_7.json +++ b/libs/wire-api/test/golden/testObject_NewUser_user_7.json @@ -5,7 +5,7 @@ "phone": "+12345678", "team": { "currency": "XUA", - "icon": "Coq쳋\u000b𬟀", + "icon": "default", "icon_key": "\u0006c𥁱L ,", "name": "\u000ce\u0005󷀰zm" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json b/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json index 5de6225d15..7ab7a1a898 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json @@ -4,7 +4,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json index f489283e9e..163fe34538 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "\u001b", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json index d7a7914049..80a10f4937 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "preview", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json index 7d4a6540b9..7947806036 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "B", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json index 40320f66c4..0c42a0a0b7 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "*", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json index 0939bdefb0..3c3c435f0f 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "preview", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json index add0873515..62ecef784b 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "complete", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json index c4f71c210a..eccf6c18d4 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json @@ -1,22 +1,22 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json index 5aea13d240..bf3d110ee5 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json @@ -1,11 +1,7 @@ { "assets": [ { - "key": "", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json index 20897d0722..62ec6cb9e7 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "1", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json index 06d9b7c11d..2a9ce8c82b 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json @@ -1,25 +1,25 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json index ccbb904285..282f807626 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "\u0011", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_Service_provider_11.json b/libs/wire-api/test/golden/testObject_Service_provider_11.json index a6f0e648e7..24237ec49e 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_11.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_11.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "complete", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_12.json b/libs/wire-api/test/golden/testObject_Service_provider_12.json index 4de5b9715e..275a1c0f8c 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_12.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_12.json @@ -1,17 +1,17 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_13.json b/libs/wire-api/test/golden/testObject_Service_provider_13.json index 7259671be2..1662fda812 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_13.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_13.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_14.json b/libs/wire-api/test/golden/testObject_Service_provider_14.json index d3e8f5e933..533ab46312 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_14.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_14.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "A", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_15.json b/libs/wire-api/test/golden/testObject_Service_provider_15.json index 113b41b921..11b50f74dd 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_15.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_15.json @@ -1,35 +1,35 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_16.json b/libs/wire-api/test/golden/testObject_Service_provider_16.json index 8013b05027..2968134faa 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_16.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_16.json @@ -1,11 +1,7 @@ { "assets": [ { - "key": "", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_2.json b/libs/wire-api/test/golden/testObject_Service_provider_2.json index a129126c8e..8463539f0e 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_2.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_2.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "", - "size": "complete", - "type": "image" - }, - { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_4.json b/libs/wire-api/test/golden/testObject_Service_provider_4.json index b227bc0a2a..8e3c74622d 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_4.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_4.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_6.json b/libs/wire-api/test/golden/testObject_Service_provider_6.json index ef2d363e95..ea1d4c176e 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_6.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_6.json @@ -1,26 +1,26 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_7.json b/libs/wire-api/test/golden/testObject_Service_provider_7.json index 5c3fdd8cd0..3a434d7610 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_7.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_7.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_1.json b/libs/wire-api/test/golden/testObject_TeamList_team_1.json index 9253c096fd..bff30e166e 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_1.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_1.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0001-0000-000000000000", "name": "" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000000000001", - "icon": "", + "icon": "default", "icon_key": "", "id": "00000001-0000-0001-0000-000100000000", "name": "" @@ -20,7 +20,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0000-0000-000000000000", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_12.json b/libs/wire-api/test/golden/testObject_TeamList_team_12.json index ed1c32bbfd..c7d736fbd4 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_12.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_12.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000002-0000-0000-0000-000100000000", - "icon": "bi", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0002-0000-000200000001", "name": "/锟" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_14.json b/libs/wire-api/test/golden/testObject_TeamList_team_14.json index 88c4fec277..7a2e8a767d 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_14.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_14.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "", + "icon": "default", "icon_key": "", "id": "00000001-0000-0000-0000-000100000001", "name": "" @@ -20,7 +20,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000001", - "icon": "", + "icon": "default", "icon_key": "", "id": "00000001-0000-0000-0000-000000000001", "name": "" @@ -28,7 +28,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000001", - "icon": "", + "icon": "default", "icon_key": "", "id": "00000000-0000-0001-0000-000100000000", "name": "" @@ -36,7 +36,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000000", - "icon": "", + "icon": "default", "icon_key": "", "id": "00000001-0000-0000-0000-000100000001", "name": "" @@ -44,7 +44,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0001-0000-000100000001", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_15.json b/libs/wire-api/test/golden/testObject_TeamList_team_15.json index 6596778c10..28c5a4b1e0 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_15.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_15.json @@ -4,14 +4,14 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0001-0000-000000000000", "name": "" }, { "binding": false, "creator": "00000000-0000-0000-0000-000100000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" @@ -19,14 +19,14 @@ { "binding": true, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0001-0000-000100000000", "name": "" }, { "binding": false, "creator": "00000000-0000-0000-0000-000100000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" @@ -34,7 +34,7 @@ { "binding": true, "creator": "00000001-0000-0000-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0001-0000-000000000001", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_16.json b/libs/wire-api/test/golden/testObject_TeamList_team_16.json index 0cf64604e2..3fdaa492cc 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_16.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_16.json @@ -4,7 +4,7 @@ { "binding": true, "creator": "00000002-0000-0000-0000-000200000000", - "icon": "e乥", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "􏵷(", "id": "00000001-0000-0001-0000-000100000002", "name": "𩬟" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_18.json b/libs/wire-api/test/golden/testObject_TeamList_team_18.json index c6c3509963..eb3fcc2253 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_18.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_18.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000002-0000-0000-0000-000000000000", - "icon": "!", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0000-0000-000000000002", "name": "W1" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_19.json b/libs/wire-api/test/golden/testObject_TeamList_team_19.json index 0a14a86311..84fbbb6ecf 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_19.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_19.json @@ -4,7 +4,7 @@ { "binding": true, "creator": "00000001-0000-0001-0000-000200000002", - "icon": "7", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "𮏥(", "id": "00000001-0000-0002-0000-000200000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_2.json b/libs/wire-api/test/golden/testObject_TeamList_team_2.json index d9bbcfc9d9..2c6a45a51a 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_2.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_2.json @@ -4,7 +4,7 @@ { "binding": true, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "𪤬", + "icon": "default", "icon_key": "@", "id": "00000000-0000-0001-0000-000100000000", "name": "7" @@ -12,7 +12,7 @@ { "binding": true, "creator": "00000000-0000-0000-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_20.json b/libs/wire-api/test/golden/testObject_TeamList_team_20.json index d2d074718a..50abbb7358 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_20.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_20.json @@ -4,14 +4,14 @@ { "binding": true, "creator": "00000000-0000-0000-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0001-0000-000000000000", "name": "" }, { "binding": true, "creator": "00000000-0000-0001-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" @@ -19,7 +19,7 @@ { "binding": true, "creator": "00000000-0000-0001-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" @@ -27,7 +27,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0001-0000-000000000001", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_3.json b/libs/wire-api/test/golden/testObject_TeamList_team_3.json index 93425d1739..0596d30a2b 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_3.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_3.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000002", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0002-0000-000200000000", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_4.json b/libs/wire-api/test/golden/testObject_TeamList_team_4.json index ee8f255d4c..bfd1d2ba4d 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_4.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_4.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0001-0000-000100000001", "name": "􄃌" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0000-0000-000100000001", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_5.json b/libs/wire-api/test/golden/testObject_TeamList_team_5.json index 5c31ced6d5..d3d0eb0e8d 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_5.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_5.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0000-0000-000000000001", "name": "" @@ -12,7 +12,7 @@ { "binding": true, "creator": "00000001-0000-0001-0000-000100000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" @@ -20,7 +20,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -28,7 +28,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -36,7 +36,7 @@ { "binding": true, "creator": "00000000-0000-0000-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0000-0000-000100000001", "name": "" @@ -44,14 +44,14 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0000-0000-000100000000", "name": "" }, { "binding": false, "creator": "00000001-0000-0000-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0001-0000-000100000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_6.json b/libs/wire-api/test/golden/testObject_TeamList_team_6.json index de67b8024a..7509a92e1d 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_6.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_6.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000000", - "icon": "󺯟", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0001-0000-000000000000", "name": " " } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_7.json b/libs/wire-api/test/golden/testObject_TeamList_team_7.json index 7a6e537de3..ec65a7d303 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_7.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_7.json @@ -4,14 +4,14 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000001", - "icon": "\u0011", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0000-0000-000000000001", "name": "" }, { "binding": true, "creator": "00000000-0000-0001-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_9.json b/libs/wire-api/test/golden/testObject_TeamList_team_9.json index da14cb80b1..8ed2ea75d4 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_9.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_9.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000100000000", "name": "" @@ -20,14 +20,14 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0000-0000-000100000000", "name": "" }, { "binding": true, "creator": "00000000-0000-0000-0000-000100000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" @@ -35,7 +35,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000000000000", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" @@ -43,7 +43,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000100000001", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" diff --git a/libs/wire-api/test/golden/testObject_Team_team_1.json b/libs/wire-api/test/golden/testObject_Team_team_1.json index 1e19543ce8..886e64a3a0 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_1.json +++ b/libs/wire-api/test/golden/testObject_Team_team_1.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000003-0000-0001-0000-000100000002", - "icon": "Jw\u001fTB", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "󾄡V", "id": "00000004-0000-0003-0000-000200000000", "name": "TJ\u0004" diff --git a/libs/wire-api/test/golden/testObject_Team_team_10.json b/libs/wire-api/test/golden/testObject_Team_team_10.json index 140e0689a6..d92c6611cb 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_10.json +++ b/libs/wire-api/test/golden/testObject_Team_team_10.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000000-0000-0004-0000-000300000000", - "icon": " ", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "􎕩", "id": "00000002-0000-0000-0000-000300000004", "name": "󾶆" diff --git a/libs/wire-api/test/golden/testObject_Team_team_11.json b/libs/wire-api/test/golden/testObject_Team_team_11.json index a1d1d1b497..7ef218c4dd 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_11.json +++ b/libs/wire-api/test/golden/testObject_Team_team_11.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000200000003", - "icon": "b@\u0002룾", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000002-0000-0004-0000-000300000003", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_12.json b/libs/wire-api/test/golden/testObject_Team_team_12.json index 442197f003..6e5c098936 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_12.json +++ b/libs/wire-api/test/golden/testObject_Team_team_12.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000003-0000-0001-0000-000200000001", - "icon": "P𭑁", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "J\u000f`􆍑", "id": "00000001-0000-0002-0000-000000000001", "name": "yR\u0004U}" diff --git a/libs/wire-api/test/golden/testObject_Team_team_13.json b/libs/wire-api/test/golden/testObject_Team_team_13.json index 61098e5eb8..399fdb7610 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_13.json +++ b/libs/wire-api/test/golden/testObject_Team_team_13.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000003-0000-0002-0000-000200000004", - "icon": "", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000001-0000-0000-0000-000200000002", "name": "E\u001b" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_14.json b/libs/wire-api/test/golden/testObject_Team_team_14.json index 94c180ac81..9129fb0aca 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_14.json +++ b/libs/wire-api/test/golden/testObject_Team_team_14.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0002-0000-000100000003", - "icon": "", + "icon": "default", "icon_key": "N\u0019\u0003", "id": "00000000-0000-0004-0000-000100000004", "name": ".橠," diff --git a/libs/wire-api/test/golden/testObject_Team_team_15.json b/libs/wire-api/test/golden/testObject_Team_team_15.json index a2f8c40498..8aa916bd06 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_15.json +++ b/libs/wire-api/test/golden/testObject_Team_team_15.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000004-0000-0000-0000-000400000002", - "icon": "yM\u001e\u0005", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "T\u000c)\tR", "id": "00000003-0000-0004-0000-000000000003", "name": "#k\u0000,;" diff --git a/libs/wire-api/test/golden/testObject_Team_team_16.json b/libs/wire-api/test/golden/testObject_Team_team_16.json index d67c357b64..d9aa2cc530 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_16.json +++ b/libs/wire-api/test/golden/testObject_Team_team_16.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000001-0000-0000-0000-000400000004", - "icon": "Se", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "\u0001C", "id": "00000000-0000-0002-0000-000200000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_Team_team_17.json b/libs/wire-api/test/golden/testObject_Team_team_17.json index 7cbd2e7cb3..42db147e83 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_17.json +++ b/libs/wire-api/test/golden/testObject_Team_team_17.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000003-0000-0001-0000-000000000004", - "icon": "A󻘪'W", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000003-0000-0004-0000-000400000004", "name": "\t\u0008 " } diff --git a/libs/wire-api/test/golden/testObject_Team_team_18.json b/libs/wire-api/test/golden/testObject_Team_team_18.json index bd9e0f25a8..e79f9d8fac 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_18.json +++ b/libs/wire-api/test/golden/testObject_Team_team_18.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0001-0000-000100000002", - "icon": "_󻓑𩢓", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "x:鿪L", "id": "00000002-0000-0002-0000-000200000002", "name": "孙󿞪" diff --git a/libs/wire-api/test/golden/testObject_Team_team_19.json b/libs/wire-api/test/golden/testObject_Team_team_19.json index 5faec888a3..39c23c6290 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_19.json +++ b/libs/wire-api/test/golden/testObject_Team_team_19.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000004-0000-0003-0000-000200000004", - "icon": ")\u0017\u0005", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "V>A", "id": "00000003-0000-0000-0000-000100000001", "name": "P𭷓;gi" diff --git a/libs/wire-api/test/golden/testObject_Team_team_2.json b/libs/wire-api/test/golden/testObject_Team_team_2.json index 895a61e70d..826ec582ba 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_2.json +++ b/libs/wire-api/test/golden/testObject_Team_team_2.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000000-0000-0004-0000-000000000001", - "icon": "􍬵\t5", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "虱R3q", "id": "00000004-0000-0003-0000-000000000004", "name": "Ycᛄ" diff --git a/libs/wire-api/test/golden/testObject_Team_team_20.json b/libs/wire-api/test/golden/testObject_Team_team_20.json index a2e88fc5df..5899393e6f 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_20.json +++ b/libs/wire-api/test/golden/testObject_Team_team_20.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000000-0000-0004-0000-000000000004", - "icon": "󸷚I\u0002\u0003", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "v0􌡴3", "id": "00000000-0000-0004-0000-000400000003", "name": "𮩶c" diff --git a/libs/wire-api/test/golden/testObject_Team_team_3.json b/libs/wire-api/test/golden/testObject_Team_team_3.json index d06ee96c92..bacd42f414 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_3.json +++ b/libs/wire-api/test/golden/testObject_Team_team_3.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000003-0000-0004-0000-000100000000", - "icon": "", + "icon": "default", "icon_key": "s􁺴", "id": "00000004-0000-0003-0000-000000000003", "name": "2E􊴕" diff --git a/libs/wire-api/test/golden/testObject_Team_team_4.json b/libs/wire-api/test/golden/testObject_Team_team_4.json index e2c72e1c83..939cc911f0 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_4.json +++ b/libs/wire-api/test/golden/testObject_Team_team_4.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000004-0000-0000-0000-000100000003", - "icon": "􇓞u\u001cC\u0001", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "X", "id": "00000000-0000-0002-0000-000100000004", "name": "𫑂\u0008k" diff --git a/libs/wire-api/test/golden/testObject_Team_team_5.json b/libs/wire-api/test/golden/testObject_Team_team_5.json index 5b259bd37a..00e49fe750 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_5.json +++ b/libs/wire-api/test/golden/testObject_Team_team_5.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000000-0000-0004-0000-000200000002", - "icon": "􆊅", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "?&\u001b", "id": "00000004-0000-0003-0000-000000000004", "name": "\u0006𘐼仄" diff --git a/libs/wire-api/test/golden/testObject_Team_team_6.json b/libs/wire-api/test/golden/testObject_Team_team_6.json index b9ce15d026..debe629932 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_6.json +++ b/libs/wire-api/test/golden/testObject_Team_team_6.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000000-0000-0003-0000-000000000003", - "icon": "_'\u0011\u0002", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000000-0000-0002-0000-000000000001", "name": "󸭬x󼬐]㹱" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_7.json b/libs/wire-api/test/golden/testObject_Team_team_7.json index 6ed09fa61b..28718021fd 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_7.json +++ b/libs/wire-api/test/golden/testObject_Team_team_7.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000001-0000-0002-0000-000400000000", - "icon": "X\n|󾒚", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "icon_key": "𗤥", "id": "00000002-0000-0003-0000-000000000002", "name": "⛉􁓖󸙰7􂩽" diff --git a/libs/wire-api/test/golden/testObject_Team_team_8.json b/libs/wire-api/test/golden/testObject_Team_team_8.json index 3b01001838..940b270dd3 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_8.json +++ b/libs/wire-api/test/golden/testObject_Team_team_8.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0003-0000-000400000001", - "icon": "󻎖", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000003-0000-0004-0000-000000000001", "name": "\r釖{\u0013\\" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_9.json b/libs/wire-api/test/golden/testObject_Team_team_9.json index 2765bd238b..bf120473c4 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_9.json +++ b/libs/wire-api/test/golden/testObject_Team_team_9.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0000-0000-000000000004", - "icon": "d\u0003U", + "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", "id": "00000004-0000-0002-0000-000200000003", "name": "G[Hu{" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json index 65e1ab329e..e532e3870c 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "褩s􎀧", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json index a88563d44e..bc5f15c3f1 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json @@ -1,16 +1,16 @@ { "assets": [ { - "key": "\u0003𗗇", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "􏜄", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json index 5a6989defa..33b1b1ecc1 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "e󱊉4", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json index 35c19a29f6..67b5480462 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "\u000eNG", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json index 5fa9959c91..5c75fbbb1b 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "󼋠j𖥩", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json index 79134b0c60..d78c2d45b7 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "󿔉w\u0015", - "size": "complete", - "type": "image" - }, - { - "key": "K", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json index 1241cd1a8d..4bf04aebe9 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json @@ -1,31 +1,31 @@ { "assets": [ { - "key": "q", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "]䊇", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "\u001b笜F", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": ";K", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json index 078f95b752..a761085ef8 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json @@ -1,21 +1,21 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "𬩌", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "#", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json index ccd58adb6f..7f5496c3fd 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json @@ -1,16 +1,16 @@ { "assets": [ { - "key": "𬃈", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "𫸍", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "\u0019", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json index 551074fd62..6283ed2835 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json @@ -1,17 +1,17 @@ { "assets": [ { - "key": "t𘠊", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "\u000cu\u001f", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json index b95439f7d3..0d212c6e7f 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json @@ -1,12 +1,7 @@ { "assets": [ { - "key": "h", - "size": "complete", - "type": "image" - }, - { - "key": "𬄋)p", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json index 84e3f829c6..a6a10f2f20 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json @@ -1,30 +1,30 @@ { "assets": [ { - "key": "7_", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "p", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "䭙u9", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "𪉓𬜼*", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" }, { - "key": "󷤅\u0010", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "󵋬쭫󰩵", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json index e453bc425b..a1e4e13736 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json index 3f5156f32d..e1a72f991a 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json @@ -1,32 +1,32 @@ { "assets": [ { - "key": "𒑢􋮶", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "\u000e", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "`", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" }, { - "key": "N红$", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" }, { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json b/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json index 1db9d874fe..50ab64fbde 100644 --- a/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json +++ b/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json @@ -2,7 +2,7 @@ "accent_id": 3, "assets": [ { - "key": "", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json index 125af7b782..fbc67ff273 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json @@ -1,4 +1,4 @@ { - "key": "\u001d", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json index bb06cdf13d..51fa25cac0 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json @@ -1,5 +1,5 @@ { - "key": "'\u001c􊘾RoR\u001e4&e@`5", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json index 3e280ceaf9..51fa25cac0 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json @@ -1,5 +1,5 @@ { - "key": "eUb􎃾", + "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json index 21efd8ce27..6417044533 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json @@ -1,5 +1,5 @@ { - "key": " Config -> Manager -> DB.ClientState -> Brig -> Cannon -> Galley -> IO TestTree @@ -1561,7 +1562,11 @@ defServiceTags :: Range 1 3 (Set ServiceTag) defServiceTags = unsafeRange (Set.singleton SocialTag) defServiceAssets :: [Asset] -defServiceAssets = [ImageAsset "key" (Just AssetComplete)] +defServiceAssets = + [ ImageAsset + (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) + (Just AssetComplete) + ] -- TODO: defServiceToken :: ServiceToken diff --git a/services/brig/test/integration/API/Team.hs b/services/brig/test/integration/API/Team.hs index 654f274fc8..5f59e08115 100644 --- a/services/brig/test/integration/API/Team.hs +++ b/services/brig/test/integration/API/Team.hs @@ -42,6 +42,7 @@ import Data.Id hiding (client) import Data.Json.Util (UTCTimeMillis, toUTCTimeMillis) import qualified Data.Text.Ascii as Ascii import Data.Time (addUTCTime, getCurrentTime) +import qualified Data.UUID as UUID (fromString) import qualified Data.UUID.V4 as UUID import qualified Galley.Types.Teams as Team import qualified Galley.Types.Teams.Intra as Team @@ -56,6 +57,7 @@ import UnliftIO.Async (mapConcurrently_, pooledForConcurrentlyN_, replicateConcu import Util import Util.AWS as Util import Web.Cookie (parseSetCookie, setCookieName) +import Wire.API.Asset import Wire.API.User.Identity (mkSimpleSampleUref) newtype TeamSizeLimit = TeamSizeLimit Word32 @@ -149,7 +151,7 @@ testUpdateEvents brig cannon = do void $ getConnection brig alice bob TeamId -> TeamFeatureStatusValue -> Galley -> Http () putLegalHoldEnabled tid enabled g = do diff --git a/services/brig/test/integration/API/User/Account.hs b/services/brig/test/integration/API/User/Account.hs index 5483a76403..04aebbd3b6 100644 --- a/services/brig/test/integration/API/User/Account.hs +++ b/services/brig/test/integration/API/User/Account.hs @@ -82,6 +82,7 @@ import UnliftIO (mapConcurrently_) import Util import Util.AWS as Util import Web.Cookie (parseSetCookie) +import Wire.API.Asset hiding (Asset) import qualified Wire.API.Asset as Asset import Wire.API.Federation.API.Brig (UserDeletedConnectionsNotification (..)) import qualified Wire.API.Federation.API.Brig as FedBrig @@ -816,7 +817,12 @@ testUserUpdate brig cannon aws = do aliceNewName <- randomName connectUsers brig alice (singleton bob) let newColId = Just 5 - newAssets = Just [ImageAsset "abc" (Just AssetComplete)] + newAssets = + Just + [ ImageAsset + (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) + (Just AssetComplete) + ] mNewName = Just $ aliceNewName newPic = Nothing -- Legacy userUpdate = UserUpdate mNewName newPic newAssets newColId @@ -1336,7 +1342,7 @@ testDeleteWithProfilePic brig cargohold = do let newAssets = Just [ ImageAsset - (T.decodeLatin1 $ toByteString' (qUnqualified (ast ^. Asset.assetKey))) + (qUnqualified $ ast ^. Asset.assetKey) (Just AssetComplete) ] userUpdate = UserUpdate Nothing Nothing newAssets Nothing diff --git a/services/brig/test/integration/API/UserPendingActivation.hs b/services/brig/test/integration/API/UserPendingActivation.hs index 3c7565d8b1..4e3e02b60b 100644 --- a/services/brig/test/integration/API/UserPendingActivation.hs +++ b/services/brig/test/integration/API/UserPendingActivation.hs @@ -64,6 +64,7 @@ import qualified Web.Scim.Schema.Meta as Scim import qualified Web.Scim.Schema.User as Scim.User import qualified Web.Scim.Schema.User.Email as Email import qualified Web.Scim.Schema.User.Phone as Phone +import Wire.API.Team (Icon (..)) import Wire.API.User.RichInfo (RichInfo) import Wire.API.User.Scim (CreateScimToken (..), ScimToken, ScimUserExtra (ScimUserExtra)) @@ -151,7 +152,7 @@ getInvitationByEmail brig email = ) newTeam :: Galley.BindingNewTeam -newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") (unsafeRange "defaultIcon") +newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") DefaultIcon createUserWithTeamDisableSSO :: (HasCallStack, MonadCatch m, MonadHttp m, MonadIO m, MonadFail m) => Brig -> Galley -> m (UserId, TeamId) createUserWithTeamDisableSSO brg gly = do diff --git a/services/galley/src/Galley/Cassandra/Instances.hs b/services/galley/src/Galley/Cassandra/Instances.hs index 0e3ebaf5ec..937b54ad43 100644 --- a/services/galley/src/Galley/Cassandra/Instances.hs +++ b/services/galley/src/Galley/Cassandra/Instances.hs @@ -25,13 +25,16 @@ where import Cassandra.CQL import Control.Error (note) +import Data.ByteString.Conversion import Data.Domain (Domain, domainText, mkDomain) +import qualified Data.Text.Encoding as T import Galley.Types import Galley.Types.Bot () import Galley.Types.Teams import Galley.Types.Teams.Intra import Galley.Types.Teams.SearchVisibility import Imports +import Wire.API.Team import qualified Wire.API.Team.Feature as Public deriving instance Cql MutedStatus @@ -168,3 +171,9 @@ instance Cql Public.EnforceAppLock where 1 -> pure (Public.EnforceAppLock True) _ -> Left "fromCql EnforceAppLock: int out of range" fromCql _ = Left "fromCql EnforceAppLock: int expected" + +instance Cql Icon where + ctype = Tagged TextColumn + toCql = CqlText . T.decodeUtf8 . toByteString' + fromCql (CqlText txt) = pure . fromRight DefaultIcon . runParser parser . T.encodeUtf8 $ txt + fromCql _ = Left "Icon: Text expected" diff --git a/services/galley/src/Galley/Cassandra/Queries.hs b/services/galley/src/Galley/Cassandra/Queries.hs index 4d199920a5..69df6ae050 100644 --- a/services/galley/src/Galley/Cassandra/Queries.hs +++ b/services/galley/src/Galley/Cassandra/Queries.hs @@ -36,10 +36,11 @@ import Galley.Types.Teams.Intra import Galley.Types.Teams.SearchVisibility import Imports import Text.RawString.QQ +import Wire.API.Team -- Teams -------------------------------------------------------------------- -selectTeam :: PrepQuery R (Identity TeamId) (UserId, Text, Text, Maybe Text, Bool, Maybe TeamStatus, Maybe (Writetime TeamStatus), Maybe TeamBinding) +selectTeam :: PrepQuery R (Identity TeamId) (UserId, Text, Icon, Maybe Text, Bool, Maybe TeamStatus, Maybe (Writetime TeamStatus), Maybe TeamBinding) selectTeam = "select creator, name, icon, icon_key, deleted, status, writetime(status), binding from team where team = ?" selectTeamName :: PrepQuery R (Identity TeamId) (Identity Text) @@ -135,7 +136,7 @@ selectUserTeamsIn = "select team from user_team where user = ? and team in ? ord selectUserTeamsFrom :: PrepQuery R (UserId, TeamId) (Identity TeamId) selectUserTeamsFrom = "select team from user_team where user = ? and team > ? order by team" -insertTeam :: PrepQuery W (TeamId, UserId, Text, Text, Maybe Text, TeamStatus, TeamBinding) () +insertTeam :: PrepQuery W (TeamId, UserId, Text, Icon, Maybe Text, TeamStatus, TeamBinding) () insertTeam = "insert into team (team, creator, name, icon, icon_key, deleted, status, binding) values (?, ?, ?, ?, ?, false, ?, ?)" insertTeamConv :: PrepQuery W (TeamId, ConvId) () diff --git a/services/galley/src/Galley/Cassandra/Team.hs b/services/galley/src/Galley/Cassandra/Team.hs index c0ae2938f1..629dc16576 100644 --- a/services/galley/src/Galley/Cassandra/Team.hs +++ b/services/galley/src/Galley/Cassandra/Team.hs @@ -62,6 +62,7 @@ import Imports hiding (Set, max) import Polysemy import Polysemy.Input import qualified UnliftIO +import Wire.API.Team (Icon (..)) import Wire.API.Team.Member interpretTeamStoreToCassandra :: @@ -137,11 +138,11 @@ createTeam :: Maybe TeamId -> UserId -> Range 1 256 Text -> - Range 1 256 Text -> + Icon -> Maybe (Range 1 256 Text) -> TeamBinding -> Client Team -createTeam t uid (fromRange -> n) (fromRange -> i) k b = do +createTeam t uid (fromRange -> n) i k b = do tid <- maybe (Id <$> liftIO nextRandom) return t retry x5 $ write Cql.insertTeam (params LocalQuorum (tid, uid, n, i, fromRange <$> k, initialStatus b, b)) pure (newTeam tid uid n i b & teamIconKey .~ (fromRange <$> k)) diff --git a/services/galley/src/Galley/Effects/TeamStore.hs b/services/galley/src/Galley/Effects/TeamStore.hs index 9fa4dd42d6..cc2495e7cc 100644 --- a/services/galley/src/Galley/Effects/TeamStore.hs +++ b/services/galley/src/Galley/Effects/TeamStore.hs @@ -85,6 +85,7 @@ import Imports import Polysemy import Polysemy.Error import qualified Proto.TeamEvents as E +import Wire.API.Team (Icon) data TeamStore m a where CreateTeamMember :: TeamId -> TeamMember -> TeamStore m () @@ -93,7 +94,7 @@ data TeamStore m a where Maybe TeamId -> UserId -> Range 1 256 Text -> - Range 1 256 Text -> + Icon -> Maybe (Range 1 256 Text) -> TeamBinding -> TeamStore m Team diff --git a/services/galley/test/integration/API/Teams.hs b/services/galley/test/integration/API/Teams.hs index f16d2178e7..9eddbddca3 100644 --- a/services/galley/test/integration/API/Teams.hs +++ b/services/galley/test/integration/API/Teams.hs @@ -75,6 +75,7 @@ import Test.Tasty.HUnit import TestHelpers (test, viewFederationDomain) import TestSetup (TestM, TestSetup, tsBrig, tsCannon, tsGConf, tsGalley) import UnliftIO (mapConcurrently, mapConcurrently_) +import Wire.API.Team (Icon (..)) import Wire.API.Team.Export (TeamExportUser (..)) import qualified Wire.API.Team.Feature as Public import qualified Wire.API.Team.Member as Member @@ -204,7 +205,7 @@ testCreateMultipleBindingTeams = do _ <- Util.createBindingTeamInternal "foo" owner assertQueue "create team" tActivate -- Cannot create more teams if bound (used internal API) - let nt = NonBindingNewTeam $ newNewTeam (unsafeRange "owner") (unsafeRange "icon") + let nt = NonBindingNewTeam $ newNewTeam (unsafeRange "owner") DefaultIcon post (g . path "/teams" . zUser owner . zConn "conn" . json nt) !!! const 403 === statusCode -- If never used the internal API, can create multiple teams diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index 73fd845971..1918884601 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -119,6 +119,7 @@ import Wire.API.Message import qualified Wire.API.Message.Proto as Proto import Wire.API.Routes.Internal.Brig.Connection import Wire.API.Routes.MultiTablePaging +import Wire.API.Team (Icon (..)) import Wire.API.Team.Member (mkNewTeamMember) import Wire.API.User.Client (ClientCapability (..), UserClientsFull (UserClientsFull)) import qualified Wire.API.User.Client as Client @@ -225,7 +226,7 @@ createNonBindingTeam :: HasCallStack => Text -> UserId -> [TeamMember] -> TestM createNonBindingTeam name owner mems = do g <- view tsGalley let mm = if null mems then Nothing else Just $ unsafeRange (take 127 mems) - let nt = NonBindingNewTeam $ newNewTeam (unsafeRange name) (unsafeRange "icon") & newTeamMembers .~ mm + let nt = NonBindingNewTeam $ newNewTeam (unsafeRange name) DefaultIcon & newTeamMembers .~ mm resp <- post (g . path "/teams" . zUser owner . zConn "conn" . zType "access" . json nt) Text -> UserId -> TestM T createBindingTeamInternalNoActivate name owner = do g <- view tsGalley tid <- randomId - let nt = BindingNewTeam $ newNewTeam (unsafeRange name) (unsafeRange "icon") + let nt = BindingNewTeam $ newNewTeam (unsafeRange name) DefaultIcon _ <- put (g . paths ["/i/teams", toByteString' tid] . zUser owner . zConn "conn" . zType "access" . json nt) ["password" .= defPassword | hasPassword] <> ["email" .= fromEmail e | hasEmail] - <> ["team" .= Team.BindingNewTeam (Team.newNewTeam (unsafeRange "teamName") (unsafeRange "defaultIcon")) | isCreator] + <> ["team" .= Team.BindingNewTeam (Team.newNewTeam (unsafeRange "teamName") DefaultIcon) | isCreator] responseJsonUnsafe <$> (post (b . path "/i/users" . json p) TestM UserId diff --git a/services/spar/test-integration/Util/Core.hs b/services/spar/test-integration/Util/Core.hs index 1ef07088d7..87f97d4c9a 100644 --- a/services/spar/test-integration/Util/Core.hs +++ b/services/spar/test-integration/Util/Core.hs @@ -200,6 +200,7 @@ import Util.Types import qualified Web.Cookie as Web import Wire.API.Cookie import Wire.API.Routes.Public.Spar +import Wire.API.Team (Icon (..)) import Wire.API.Team.Feature (TeamFeatureStatusValue (..)) import qualified Wire.API.Team.Feature as Public import qualified Wire.API.Team.Invitation as TeamInvitation @@ -622,7 +623,7 @@ zAuthAccess :: UserId -> SBS -> Request -> Request zAuthAccess u c = header "Z-Type" "access" . zUser u . zConn c newTeam :: Galley.BindingNewTeam -newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") (unsafeRange "defaultIcon") +newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") DefaultIcon randomEmail :: MonadIO m => m Brig.Email randomEmail = do From d6353af2d21d62b278bbf7d299ad6a60dc721b44 Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Mon, 7 Mar 2022 11:32:15 +0100 Subject: [PATCH 07/13] Follow-up to `/api-version` changes (#2159) * Add test for additional api-version info * Comment about /access having to be unversioned --- changelog.d/5-internal/api-version-endpoint | 1 + services/brig/src/Brig/User/API/Auth.hs | 2 ++ services/brig/test/integration/API/Version.hs | 18 +++++++++++++++--- services/brig/test/integration/Main.hs | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 changelog.d/5-internal/api-version-endpoint diff --git a/changelog.d/5-internal/api-version-endpoint b/changelog.d/5-internal/api-version-endpoint new file mode 100644 index 0000000000..600d93bd70 --- /dev/null +++ b/changelog.d/5-internal/api-version-endpoint @@ -0,0 +1 @@ +Add tests for additional information returned by `GET /api-version` diff --git a/services/brig/src/Brig/User/API/Auth.hs b/services/brig/src/Brig/User/API/Auth.hs index 101c0e46e9..15f227e010 100644 --- a/services/brig/src/Brig/User/API/Auth.hs +++ b/services/brig/src/Brig/User/API/Auth.hs @@ -61,6 +61,8 @@ import Wire.Swagger as Doc (pendingLoginError) routesPublic :: Routes Doc.ApiBuilder (Handler r) () routesPublic = do + -- Note: this endpoint should always remain available at its unversioned + -- path, since the login cookie hardcodes @/access@ as a path. post "/access" (continue renewH) $ accept "application" "json" .&. tokenRequest diff --git a/services/brig/test/integration/API/Version.hs b/services/brig/test/integration/API/Version.hs index eefdf7879c..f6914e2410 100644 --- a/services/brig/test/integration/API/Version.hs +++ b/services/brig/test/integration/API/Version.hs @@ -19,6 +19,7 @@ module API.Version (tests) where import Bilge import Bilge.Assert +import Brig.Options import Imports import qualified Network.Wai.Utilities.Error as Wai import Test.Tasty @@ -26,13 +27,14 @@ import Test.Tasty.HUnit import Util import Wire.API.Routes.Version -tests :: Manager -> Brig -> TestTree -tests p brig = +tests :: Manager -> Opts -> Brig -> TestTree +tests p opts brig = testGroup "version" [ test p "GET /api-version" $ testVersion brig, test p "GET /v1/api-version" $ testVersionV1 brig, - test p "GET /v500/api-version" $ testUnsupportedVersion brig + test p "GET /v500/api-version" $ testUnsupportedVersion brig, + test p "GET /api-version (federation info)" $ testFederationDomain opts brig ] testVersion :: Brig -> Http () @@ -57,3 +59,13 @@ testUnsupportedVersion brig = do responseJsonError =<< get (brig . path "/v500/api-version") Brig -> Http () +testFederationDomain opts brig = do + let domain = setFederationDomain (optSettings opts) + vinfo <- + responseJsonError =<< get (brig . path "/api-version") + Blank.getEnv "INTEGRATION_FEDERATION_TESTS" internalApi <- API.Internal.tests brigOpts mg db b (brig iConf) gd g - let versionApi = API.Version.tests mg b + let versionApi = API.Version.tests mg brigOpts b let mlsApi = MLS.tests mg b brigOpts From 23673c0afab157a0cbb92509ef47b6e811ab38a0 Mon Sep 17 00:00:00 2001 From: fisx Date: Mon, 7 Mar 2022 13:08:18 +0100 Subject: [PATCH 08/13] Fix spar user provisioning corner case (#2174) * More spar tests. * Fix: scim user import (`getUser`). * Fix: scim user import (`getUsers`). --- changelog.d/3-bug-fixes/more-spar-tests | 1 + libs/wire-api/src/Wire/API/Team/Feature.hs | 2 +- services/spar/src/Spar/Scim/User.hs | 115 +++++--- .../Test/Spar/Scim/UserSpec.hs | 274 +++++++++++++++--- 4 files changed, 316 insertions(+), 76 deletions(-) create mode 100644 changelog.d/3-bug-fixes/more-spar-tests diff --git a/changelog.d/3-bug-fixes/more-spar-tests b/changelog.d/3-bug-fixes/more-spar-tests new file mode 100644 index 0000000000..be3a1593b0 --- /dev/null +++ b/changelog.d/3-bug-fixes/more-spar-tests @@ -0,0 +1 @@ +Always create spar credentials during SCIM provisioning when applicable diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index 92aa3b062c..2c7b97a880 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -263,7 +263,7 @@ typeTeamFeatureName = Doc.string . Doc.enum $ cs . toByteString' <$> [(minBound data TeamFeatureStatusValue = TeamFeatureEnabled | TeamFeatureDisabled - deriving stock (Eq, Show, Generic) + deriving stock (Eq, Ord, Enum, Bounded, Show, Generic) deriving (Arbitrary) via (GenericUniform TeamFeatureStatusValue) deriving (ToJSON, FromJSON, S.ToSchema) via (Schema TeamFeatureStatusValue) diff --git a/services/spar/src/Spar/Scim/User.hs b/services/spar/src/Spar/Scim/User.hs index cf57fdd0e3..8ce22b5035 100644 --- a/services/spar/src/Spar/Scim/User.hs +++ b/services/spar/src/Spar/Scim/User.hs @@ -167,11 +167,7 @@ instance $ do mIdpConfig <- maybe (pure Nothing) (lift . IdPConfigStore.getConfig) stiIdP let notfound = Scim.notFound "User" (idToText uid) - brigUser <- lift (BrigAccess.getAccount Brig.WithPendingInvitations uid) >>= maybe (throwError notfound) pure - unless (userTeam (accountUser brigUser) == Just stiTeam) (throwError notfound) - case Brig.veidFromBrigUser (accountUser brigUser) ((^. SAML.idpMetadata . SAML.edIssuer) <$> mIdpConfig) of - Right veid -> synthesizeStoredUser brigUser veid - Left _ -> throwError notfound + runMaybeT (getUserById mIdpConfig stiTeam uid) >>= maybe (throwError notfound) pure postUser :: ScimTokenInfo -> @@ -439,6 +435,9 @@ createValidScimUser tokeninfo@ScimTokenInfo {stiTeam} vsu@(ST.ValidScimUser veid ST.runValidExternalId ( \uref -> do + -- FUTUREWORK: outsource this and some other fragments from + -- `createValidScimUser` into a function `createValidScimUserBrig` similar + -- to `createValidScimUserSpar`? uid <- Id <$> Random.uuid BrigAccess.createSAML uref uid stiTeam name ManagedByScim ) @@ -474,18 +473,13 @@ createValidScimUser tokeninfo@ScimTokenInfo {stiTeam} vsu@(ST.ValidScimUser veid lift $ Logger.debug ("createValidScimUser: spar says " <> show storedUser) -- {(arianvp): these two actions we probably want to make transactional.} - lift $ do - -- Store scim timestamps, saml credentials, scim externalId locally in spar. - ScimUserTimesStore.write storedUser - ST.runValidExternalId - (`SAMLUserStore.insert` buid) - (\email -> ScimExternalIdStore.insert stiTeam email buid) - veid + createValidScimUserSpar stiTeam buid storedUser veid -- If applicable, trigger email validation procedure on brig. lift $ ST.runValidExternalId (validateEmailIfExists buid) (\_ -> pure ()) veid - -- {suspension via scim: if we don't reach the following line, the user will be active.} + -- TODO: suspension via scim is brittle, and may leave active users behind: if we don't + -- reach the following line due to a crash, the user will be active. lift $ do old <- BrigAccess.getStatus buid let new = ST.scimActiveFlagToAccountStatus old (Scim.unScimBool <$> active) @@ -493,6 +487,28 @@ createValidScimUser tokeninfo@ScimTokenInfo {stiTeam} vsu@(ST.ValidScimUser veid when (new /= old) $ BrigAccess.setStatus buid new pure storedUser +-- | Store scim timestamps, saml credentials, scim externalId locally in spar. Table +-- `spar.scim_external` gets an entry iff there is no `UserRef`: if there is, we don't do a +-- lookup in that table either, but compute the `externalId` from the `UserRef`. +createValidScimUserSpar :: + forall m r. + ( (m ~ Scim.ScimHandler (Sem r)), + Member ScimExternalIdStore r, + Member ScimUserTimesStore r, + Member SAMLUserStore r + ) => + TeamId -> + UserId -> + Scim.StoredUser ST.SparTag -> + ST.ValidExternalId -> + m () +createValidScimUserSpar stiTeam uid storedUser veid = lift $ do + ScimUserTimesStore.write storedUser + ST.runValidExternalId + ((`SAMLUserStore.insert` uid)) + (\email -> ScimExternalIdStore.insert stiTeam email uid) + veid + -- TODO(arianvp): how do we get this safe w.r.t. race conditions / crashes? updateValidScimUser :: forall m r. @@ -872,15 +888,46 @@ synthesizeScimUser info = Scim.active = Just . Scim.ScimBool $ info ^. ST.vsuActive } +getUserById :: + forall r. + ( Member BrigAccess r, + Member (Input Opts) r, + Member (Logger (Msg -> Msg)) r, + Member Now r, + Member SAMLUserStore r, + Member ScimExternalIdStore r, + Member ScimUserTimesStore r + ) => + Maybe IdP -> + TeamId -> + UserId -> + MaybeT (Scim.ScimHandler (Sem r)) (Scim.StoredUser ST.SparTag) +getUserById midp stiTeam uid = do + brigUser <- MaybeT . lift $ BrigAccess.getAccount Brig.WithPendingInvitations uid + let mbveid = + Brig.veidFromBrigUser + (accountUser brigUser) + ((^. SAML.idpMetadata . SAML.edIssuer) <$> midp) + case mbveid of + Right veid | userTeam (accountUser brigUser) == Just stiTeam -> lift $ do + storedUser :: Scim.StoredUser ST.SparTag <- synthesizeStoredUser brigUser veid + -- if we get a user from brig that hasn't been touched by scim yet, we call this + -- function to move it under scim control. + assertExternalIdNotUsedElsewhere stiTeam veid uid + createValidScimUserSpar stiTeam uid storedUser veid + pure storedUser + _ -> Applicative.empty + scimFindUserByHandle :: - Members - '[ Input Opts, - Now, - Logger (Msg -> Msg), - BrigAccess, - ScimUserTimesStore - ] - r => + forall r. + ( Member BrigAccess r, + Member (Input Opts) r, + Member (Logger (Msg -> Msg)) r, + Member Now r, + Member SAMLUserStore r, + Member ScimExternalIdStore r, + Member ScimUserTimesStore r + ) => Maybe IdP -> TeamId -> Text -> @@ -888,10 +935,7 @@ scimFindUserByHandle :: scimFindUserByHandle mIdpConfig stiTeam hndl = do handle <- MaybeT . pure . parseHandle . Text.toLower $ hndl brigUser <- MaybeT . lift . BrigAccess.getByHandle $ handle - guard $ userTeam (accountUser brigUser) == Just stiTeam - case Brig.veidFromBrigUser (accountUser brigUser) ((^. SAML.idpMetadata . SAML.edIssuer) <$> mIdpConfig) of - Right veid -> lift $ synthesizeStoredUser brigUser veid - Left _ -> Applicative.empty + getUserById mIdpConfig stiTeam . userId . accountUser $ brigUser -- | Construct a 'ValidExternalid'. If it an 'Email', find the non-SAML SCIM user in spar; if -- that fails, find the user by email in brig. If it is a 'UserRef', find the SAML user. @@ -901,16 +945,14 @@ scimFindUserByHandle mIdpConfig stiTeam hndl = do -- successful authentication with their SAML credentials. scimFindUserByEmail :: forall r. - Members - '[ Input Opts, - Now, - Logger (Msg -> Msg), - BrigAccess, - ScimExternalIdStore, - ScimUserTimesStore, - SAMLUserStore - ] - r => + ( Member BrigAccess r, + Member (Input Opts) r, + Member (Logger (Msg -> Msg)) r, + Member Now r, + Member SAMLUserStore r, + Member ScimExternalIdStore r, + Member ScimUserTimesStore r + ) => Maybe IdP -> TeamId -> Text -> @@ -925,8 +967,7 @@ scimFindUserByEmail mIdpConfig stiTeam email = do veid <- MaybeT (either (const Nothing) Just <$> runExceptT (mkValidExternalId mIdpConfig (pure email))) uid <- MaybeT . lift $ ST.runValidExternalId withUref withEmailOnly veid brigUser <- MaybeT . lift . BrigAccess.getAccount Brig.WithPendingInvitations $ uid - guard $ userTeam (accountUser brigUser) == Just stiTeam - lift $ synthesizeStoredUser brigUser veid + getUserById mIdpConfig stiTeam . userId . accountUser $ brigUser where withUref :: SAML.UserRef -> Sem r (Maybe UserId) withUref uref = do diff --git a/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs b/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs index a2efd0acfd..3d323d9e5c 100644 --- a/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs +++ b/services/spar/test-integration/Test/Spar/Scim/UserSpec.hs @@ -30,7 +30,7 @@ where import Bilge import Bilge.Assert -import Brig.Types.Intra (AccountStatus (Active, PendingInvitation, Suspended), accountStatus, accountUser) +import Brig.Types.Intra (AccountStatus (Active, PendingInvitation, Suspended), UserAccount (..), accountStatus, accountUser) import Brig.Types.User as Brig import qualified Control.Exception import Control.Lens @@ -46,7 +46,7 @@ import Data.Aeson.Types (fromJSON, toJSON) import Data.ByteString.Conversion import qualified Data.CaseInsensitive as CI import qualified Data.Csv as Csv -import Data.Handle (Handle (Handle), fromHandle) +import Data.Handle (Handle (Handle), fromHandle, parseHandleEither) import Data.Id (TeamId, UserId, randomId) import Data.Ix (inRange) import Data.Misc (HttpsUrl, mkHttpsUrl) @@ -58,6 +58,8 @@ import Imports import qualified Network.Wai.Utilities.Error as Wai import qualified SAML2.WebSSO as SAML import qualified SAML2.WebSSO.Test.MockResponse as SAML +import SAML2.WebSSO.Test.Util.TestSP (makeSampleIdPMetadata) +import qualified SAML2.WebSSO.Test.Util.Types as SAML import qualified Spar.Intra.BrigApp as Intra import Spar.Scim import Spar.Scim.Types (normalizeLikeStored) @@ -78,6 +80,7 @@ import qualified Web.Scim.Schema.User as Scim.User import qualified Wire.API.Team.Export as CsvExport import qualified Wire.API.Team.Feature as Feature import Wire.API.Team.Invitation (Invitation (..)) +import Wire.API.User.Identity (emailToSAMLNameID) import Wire.API.User.IdentityProvider (IdP) import qualified Wire.API.User.IdentityProvider as User import Wire.API.User.RichInfo @@ -98,6 +101,8 @@ spec = do specAzureQuirks specEmailValidation specSuspend + specImportToScimFromSAML + specImportToScimFromInvitation specSCIMManaged describe "CRUD operations maintain invariants in mapScimToBrig, mapBrigToScim." $ do it "..." $ do @@ -106,6 +111,199 @@ spec = do it "works" $ do pendingWith "write a list of unit tests here that make the mapping explicit, exhaustive, and easy to read." +specImportToScimFromSAML :: SpecWith TestEnv +specImportToScimFromSAML = + describe "Create with SAML autoprovisioning; then re-provision with SCIM" $ do + forM_ ((,,) <$> [minBound ..] <*> [minBound ..] <*> [minBound ..]) $ \(x, y, z) -> check x y z + where + check :: Bool -> Bool -> Feature.TeamFeatureStatusValue -> SpecWith TestEnv + check sameHandle sameDisplayName valemail = it (show (sameHandle, sameDisplayName, valemail)) $ do + (_ownerid, teamid, idp, (_, privCreds)) <- registerTestIdPWithMeta + setSamlEmailValidation teamid valemail + + -- saml-auto-provision a new user + (usr :: Scim.User.User SparTag, email :: Email) <- do + (usr, email) <- randomScimUserWithEmail + pure + ( -- when auto-provisioning via saml, user display name is set to saml name id. + usr {Scim.User.displayName = Just $ fromEmail email}, + email + ) + + (uref :: SAML.UserRef, uid :: UserId) <- do + let uref = SAML.UserRef tenant subj + subj = emailToSAMLNameID email + tenant = idp ^. SAML.idpMetadata . SAML.edIssuer + !(Just !uid) <- createViaSaml idp privCreds uref + samlUserShouldSatisfy uref isJust + pure (uref, uid) + + let handle = fromRight undefined . parseHandleEither $ Scim.User.userName usr + runSpar (BrigAccess.setHandle uid handle) + + assertSparCassandraUref (uref, Just uid) + assertSparCassandraScim ((teamid, email), Nothing) + assertBrigCassandra uid uref usr (valemail, False) ManagedByWire + + -- activate email + case valemail of + Feature.TeamFeatureEnabled -> do + asks (view teBrig) >>= \brig -> call (activateEmail brig email) + assertBrigCassandra uid uref usr (valemail, True) ManagedByWire + Feature.TeamFeatureDisabled -> do + pure () + + -- now import to scim + tok :: ScimToken <- do + -- this can only happen now, since it turns off saml-autoprovisioning. + registerScimToken teamid (Just (idp ^. SAML.idpId)) + + storedUserGot :: Scim.UserC.StoredUser SparTag <- do + resp <- + aFewTimes (getUser_ (Just tok) uid =<< view teSpar) ((== 200) . statusCode) + u {Scim.User.userName = Scim.User.userName usr_}) + & (if sameDisplayName then id else \u -> u {Scim.User.displayName = Scim.User.displayName usr_}) + & pure + + storedUserUpdated :: Scim.UserC.StoredUser SparTag <- do + resp <- + aFewTimes (updateUser_ (Just tok) (Just uid) usr' =<< view teSpar) ((== 200) . statusCode) + TestSpar (UserId, TeamId) + createTeam = do + env <- ask + call $ createUserWithTeam (env ^. teBrig) (env ^. teGalley) + + invite :: HasCallStack => UserId -> TeamId -> TestSpar (UserId, Email) + invite owner teamid = do + env <- ask + memberInvited <- call (inviteAndRegisterUser (env ^. teBrig) owner teamid) + let memberIdInvited = userId memberInvited + emailInvited = maybe (error "must have email") id (userEmail memberInvited) + pure (memberIdInvited, emailInvited) + + addSamlIdP :: HasCallStack => UserId -> TestSpar (SAML.IdPConfig User.WireIdP, SAML.SignPrivCreds) + addSamlIdP userid = do + env <- ask + apiVersion <- view teWireIdPAPIVersion + SAML.SampleIdP idpmeta privkey _ _ <- makeSampleIdPMetadata + idp <- call $ callIdpCreate apiVersion (env ^. teSpar) (Just userid) idpmeta + pure (idp, privkey) + + reProvisionWithScim :: HasCallStack => Bool -> Maybe (SAML.IdPConfig User.WireIdP) -> TeamId -> UserId -> ReaderT TestEnv IO () + reProvisionWithScim changeHandle mbidp teamid userid = do + tok :: ScimToken <- do + registerScimToken teamid ((^. SAML.idpId) <$> mbidp) + + storedUserGot :: Scim.UserC.StoredUser SparTag <- do + resp <- + aFewTimes (getUser_ (Just tok) userid =<< view teSpar) ((== 200) . statusCode) + (SAML.IdPConfig User.WireIdP, SAML.SignPrivCreds) -> Email -> TestSpar () + signInWithSaml (idp, privCreds) email = do + let uref = SAML.UserRef tenant subj + subj = emailToSAMLNameID email + tenant = idp ^. SAML.idpMetadata . SAML.edIssuer + void $ createViaSaml idp privCreds uref + + check :: Bool -> SpecWith TestEnv + check changeHandle = it (show changeHandle) $ do + (ownerid, teamid) <- createTeam + (userid, email) <- invite ownerid teamid + idp <- addSamlIdP ownerid + reProvisionWithScim changeHandle (Just $ fst idp) teamid userid + signInWithSaml idp email + +assertSparCassandraUref :: HasCallStack => (SAML.UserRef, Maybe UserId) -> TestSpar () +assertSparCassandraUref (uref, urefAnswer) = do + liftIO . (`shouldBe` urefAnswer) + =<< runSpar (SAMLUserStore.get uref) + +assertSparCassandraScim :: HasCallStack => ((TeamId, Email), Maybe UserId) -> TestSpar () +assertSparCassandraScim ((teamid, email), scimAnswer) = do + liftIO . (`shouldBe` scimAnswer) + =<< runSpar (ScimExternalIdStore.lookup teamid email) + +assertBrigCassandra :: + HasCallStack => + UserId -> + SAML.UserRef -> + Scim.User.User SparTag -> + (Feature.TeamFeatureStatusValue, Bool) -> + ManagedBy -> + TestSpar () +assertBrigCassandra uid uref usr (valemail, emailValidated) managedBy = do + runSpar (BrigAccess.getAccount NoPendingInvitations uid) >>= \(Just acc) -> liftIO $ do + let handle = fromRight errmsg . parseHandleEither $ Scim.User.userName usr + where + errmsg = error . show . Scim.User.userName $ usr + + name = Name . fromMaybe (error "name") $ Scim.User.displayName usr + + email = case (valemail, emailValidated) of + (Feature.TeamFeatureEnabled, True) -> + Just . fromJust . parseEmail . fromJust . Scim.User.externalId $ usr + _ -> + Nothing + + accountStatus acc `shouldBe` Active + userId (accountUser acc) `shouldBe` uid + userHandle (accountUser acc) `shouldBe` Just handle + userDisplayName (accountUser acc) `shouldBe` name + userManagedBy (accountUser acc) `shouldBe` managedBy + + userIdentity (accountUser acc) + `shouldBe` Just (SSOIdentity (UserSSOId uref) email Nothing) + specSuspend :: SpecWith TestEnv specSuspend = do describe "suspend" $ do @@ -686,42 +884,42 @@ testScimCreateVsUserRef = do subj' = either (error . show) id $ SAML.mkNameID uname' Nothing Nothing Nothing tenant' = idp ^. SAML.idpMetadata . SAML.edIssuer createViaSamlFails idp privCreds uref' - where - samlUserShouldSatisfy :: HasCallStack => SAML.UserRef -> (Maybe UserId -> Bool) -> TestSpar () - samlUserShouldSatisfy uref property = do - muid <- getUserIdViaRef' uref - liftIO $ muid `shouldSatisfy` property - - createViaSamlResp :: HasCallStack => IdP -> SAML.SignPrivCreds -> SAML.UserRef -> TestSpar ResponseLBS - createViaSamlResp idp privCreds (SAML.UserRef _ subj) = do - authnReq <- negotiateAuthnRequest idp - let tid = idp ^. SAML.idpExtraInfo . User.wiTeam - spmeta <- getTestSPMetadata tid - authnResp <- - runSimpleSP $ - SAML.mkAuthnResponseWithSubj subj privCreds idp spmeta authnReq True - submitAuthnResponse tid authnResp IdP -> SAML.SignPrivCreds -> SAML.UserRef -> TestSpar () - createViaSamlFails idp privCreds uref = do - resp <- createViaSamlResp idp privCreds uref - liftIO $ do - maybe (error "no body") cs (responseBody resp) - `shouldNotContain` "wire:sso:error:success" - - createViaSaml :: HasCallStack => IdP -> SAML.SignPrivCreds -> SAML.UserRef -> TestSpar (Maybe UserId) - createViaSaml idp privCreds uref = do - resp <- createViaSamlResp idp privCreds uref - liftIO $ do - maybe (error "no body") cs (responseBody resp) - `shouldContain` "wire:sso:success" - getUserIdViaRef' uref - - deleteViaBrig :: UserId -> TestSpar () - deleteViaBrig uid = do - brig <- view teBrig - (call . delete $ brig . paths ["i", "users", toByteString' uid]) - !!! const 202 === statusCode + +samlUserShouldSatisfy :: HasCallStack => SAML.UserRef -> (Maybe UserId -> Bool) -> TestSpar () +samlUserShouldSatisfy uref property = do + muid <- getUserIdViaRef' uref + liftIO $ muid `shouldSatisfy` property + +createViaSamlResp :: HasCallStack => IdP -> SAML.SignPrivCreds -> SAML.UserRef -> TestSpar ResponseLBS +createViaSamlResp idp privCreds (SAML.UserRef _ subj) = do + authnReq <- negotiateAuthnRequest idp + let tid = idp ^. SAML.idpExtraInfo . User.wiTeam + spmeta <- getTestSPMetadata tid + authnResp <- + runSimpleSP $ + SAML.mkAuthnResponseWithSubj subj privCreds idp spmeta authnReq True + submitAuthnResponse tid authnResp IdP -> SAML.SignPrivCreds -> SAML.UserRef -> TestSpar () +createViaSamlFails idp privCreds uref = do + resp <- createViaSamlResp idp privCreds uref + liftIO $ do + maybe (error "no body") cs (responseBody resp) + `shouldNotContain` "wire:sso:error:success" + +createViaSaml :: HasCallStack => IdP -> SAML.SignPrivCreds -> SAML.UserRef -> TestSpar (Maybe UserId) +createViaSaml idp privCreds uref = do + resp <- createViaSamlResp idp privCreds uref + liftIO $ do + maybe (error "no body") cs (responseBody resp) + `shouldContain` "wire:sso:success" + getUserIdViaRef' uref + +deleteViaBrig :: UserId -> TestSpar () +deleteViaBrig uid = do + brig <- view teBrig + (call . delete $ brig . paths ["i", "users", toByteString' uid]) + !!! const 202 === statusCode testCreateUserTimeout :: TestSpar () testCreateUserTimeout = do From 9725e0d166d1e874d08cbc42cd90abe5da071922 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Mon, 7 Mar 2022 13:09:26 +0100 Subject: [PATCH 09/13] Fix setDefaultUserLocale mapping (#2179) --- charts/brig/templates/configmap.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/brig/templates/configmap.yaml b/charts/brig/templates/configmap.yaml index bbaa7171af..3885ccdf8c 100644 --- a/charts/brig/templates/configmap.yaml +++ b/charts/brig/templates/configmap.yaml @@ -204,7 +204,9 @@ data: suspendTimeout: {{ .setSuspendInactiveUsers.suspendTimeout }} {{- end }} setRichInfoLimit: {{ .setRichInfoLimit }} + {{- if .setDefaultUserLocale }} setDefaultUserLocale: {{ .setDefaultUserLocale }} + {{- end }} setMaxTeamSize: {{ .setMaxTeamSize }} setMaxConvSize: {{ .setMaxConvSize }} setEmailVisibility: {{ .setEmailVisibility }} From 075470f383fadd9438df5ea3299052732e5da27a Mon Sep 17 00:00:00 2001 From: fisx Date: Mon, 7 Mar 2022 13:09:48 +0100 Subject: [PATCH 10/13] Tweak wording in reference docs (#2178) * Remove trailing whitespace. * Tweak wording. * Update docs/reference/config-options.md --- docs/reference/config-options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/config-options.md b/docs/reference/config-options.md index 649c9c90d1..3594f5ae3d 100644 --- a/docs/reference/config-options.md +++ b/docs/reference/config-options.md @@ -396,7 +396,7 @@ Additionally if `setSftListAllServers` is set to `enabled` (disabled by default) #### setDefaultLocale (deprecated / ignored) -The brig server config option `setDefaultLocale` has been replaced by `setDefaultUserLocale` and `setDefaultTemplateLocale`. Both settings are optional and `setDefaultTemplateLocale` defaults to `EN` and `setDefaultLocale` defaults to `setDefaultTemplateLocale`. If `setDefaultLocale` was not set or set to `EN` before this change, nothing needs to be done. If `setDefaultLocale` was set to any other language other than `EN` the name of the setting should be changed to `setDefaultTemplateLocale`. +The brig server config option `setDefaultLocale` has been replaced by `setDefaultUserLocale` and `setDefaultTemplateLocale`. Both settings are optional and `setDefaultTemplateLocale` defaults to `EN` and `setDefaultLocale` defaults to `setDefaultTemplateLocale`. If `setDefaultLocale` was not set or set to `EN` before this change, nothing needs to be done. If `setDefaultLocale` was set to any other language other than `EN` the name of the setting should be changed to `setDefaultTemplateLocale`. #### `setDefaultTemplateLocale` @@ -410,7 +410,7 @@ optSettings: #### `setDefaultUserLocale` -This option is the default user locale to be used if it is not set in the user profile. This can be the case if the users are provisioned by SCIM e.g. This option determines which language to use for email communication. If not set the default is the value that is configured for `setDefaultTemplateLocale`. +This option determines which language to use for email communication. It is the default value if none is given in the user profile, or if no user profile exists (eg., if user is being provisioned via SCIM or manual team invitation via the team management app). If not set, `setDefaultTemplateLocale` is used instead. ``` # [brig.yaml] @@ -433,7 +433,7 @@ optSettings: any key package whose expiry date is set further than 15 days after upload time will be rejected. -### Federated domain specific configuration settings +### Federated domain specific configuration settings #### Restrict user search The lookup and search of users on a wire instance can be configured. This can be done per federated domain. From c29705bcd55e3416afe64a3e631aee7d028e0f24 Mon Sep 17 00:00:00 2001 From: Zebot Date: Mon, 7 Mar 2022 12:13:35 +0000 Subject: [PATCH 11/13] Add changelog for Release 2022-03-07 --- CHANGELOG.md | 36 +++++++++++++++++++ changelog.d/0-release-notes/nginz-upgrade | 1 - changelog.d/1-api-changes/broadcast-qualified | 1 - changelog.d/3-bug-fixes/more-spar-tests | 1 - changelog.d/5-internal/api-version-endpoint | 1 - changelog.d/5-internal/base64-cleanup | 1 - changelog.d/5-internal/event-cleanup | 1 - changelog.d/5-internal/mls-messages | 1 - changelog.d/5-internal/servantify-register | 1 - 9 files changed, 36 insertions(+), 8 deletions(-) delete mode 100644 changelog.d/0-release-notes/nginz-upgrade delete mode 100644 changelog.d/1-api-changes/broadcast-qualified delete mode 100644 changelog.d/3-bug-fixes/more-spar-tests delete mode 100644 changelog.d/5-internal/api-version-endpoint delete mode 100644 changelog.d/5-internal/base64-cleanup delete mode 100644 changelog.d/5-internal/event-cleanup delete mode 100644 changelog.d/5-internal/mls-messages delete mode 100644 changelog.d/5-internal/servantify-register diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be2efc067..a40ec45230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +# [2022-03-07] + +## Release notes + + +* For wire.com operators: make sure that nginz is deployed (#2166) + + +## API changes + + +* Add qualified broadcast endpoint (#2166) + + +## Bug fixes and other updates + + +* Always create spar credentials during SCIM provisioning when applicable (#2174) + + +## Internal changes + + +* Add tests for additional information returned by `GET /api-version` (#2159) + +* Clean up `Base64ByteString` implementation (#2170) + +* The `Event` record type does not contain a `type` field anymore (#2160) + +* Add MLS message types and corresponding deserialisers (#2145) + +* Asset keys are now internally validated. (#2162) + +* Servantify `POST /register` and `POST /i/users` endpoints (#2121) + + # [2022-03-01] ## Release notes diff --git a/changelog.d/0-release-notes/nginz-upgrade b/changelog.d/0-release-notes/nginz-upgrade deleted file mode 100644 index c5de937551..0000000000 --- a/changelog.d/0-release-notes/nginz-upgrade +++ /dev/null @@ -1 +0,0 @@ -For wire.com operators: make sure that nginz is deployed diff --git a/changelog.d/1-api-changes/broadcast-qualified b/changelog.d/1-api-changes/broadcast-qualified deleted file mode 100644 index ae2d4d65a9..0000000000 --- a/changelog.d/1-api-changes/broadcast-qualified +++ /dev/null @@ -1 +0,0 @@ -Add qualified broadcast endpoint diff --git a/changelog.d/3-bug-fixes/more-spar-tests b/changelog.d/3-bug-fixes/more-spar-tests deleted file mode 100644 index be3a1593b0..0000000000 --- a/changelog.d/3-bug-fixes/more-spar-tests +++ /dev/null @@ -1 +0,0 @@ -Always create spar credentials during SCIM provisioning when applicable diff --git a/changelog.d/5-internal/api-version-endpoint b/changelog.d/5-internal/api-version-endpoint deleted file mode 100644 index 600d93bd70..0000000000 --- a/changelog.d/5-internal/api-version-endpoint +++ /dev/null @@ -1 +0,0 @@ -Add tests for additional information returned by `GET /api-version` diff --git a/changelog.d/5-internal/base64-cleanup b/changelog.d/5-internal/base64-cleanup deleted file mode 100644 index 4d11475462..0000000000 --- a/changelog.d/5-internal/base64-cleanup +++ /dev/null @@ -1 +0,0 @@ -Clean up `Base64ByteString` implementation diff --git a/changelog.d/5-internal/event-cleanup b/changelog.d/5-internal/event-cleanup deleted file mode 100644 index f9f726d043..0000000000 --- a/changelog.d/5-internal/event-cleanup +++ /dev/null @@ -1 +0,0 @@ -The `Event` record type does not contain a `type` field anymore diff --git a/changelog.d/5-internal/mls-messages b/changelog.d/5-internal/mls-messages deleted file mode 100644 index 45f0812ab0..0000000000 --- a/changelog.d/5-internal/mls-messages +++ /dev/null @@ -1 +0,0 @@ -Add MLS message types and corresponding deserialisers diff --git a/changelog.d/5-internal/servantify-register b/changelog.d/5-internal/servantify-register deleted file mode 100644 index f2c8d856df..0000000000 --- a/changelog.d/5-internal/servantify-register +++ /dev/null @@ -1 +0,0 @@ -Servantify `POST /register` and `POST /i/users` endpoints \ No newline at end of file From 1712e85361e27a9a4ca28f169385512bcbdd9941 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Mon, 7 Mar 2022 13:20:46 +0100 Subject: [PATCH 12/13] Drop controversial change on asset key types from changelog. --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a40ec45230..a103065f93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,6 @@ * Add MLS message types and corresponding deserialisers (#2145) -* Asset keys are now internally validated. (#2162) - * Servantify `POST /register` and `POST /i/users` endpoints (#2121) From 25597520779b392fec4106d90e53d620a4947074 Mon Sep 17 00:00:00 2001 From: Matthias Fischmann Date: Mon, 7 Mar 2022 14:30:47 +0100 Subject: [PATCH 13/13] Revert "Strongly typed asset keys (#2162)" This reverts commit ae730d245bbef81d566f90c7ec7479d67f8bc77a. --- changelog.d/5-internal/pr-2162 | 1 - libs/wire-api/src/Wire/API/Asset.hs | 6 +- libs/wire-api/src/Wire/API/Team.hs | 29 +++-- libs/wire-api/src/Wire/API/User/Profile.hs | 3 +- .../Golden/Generated/AddBotResponse_user.hs | 10 +- .../Generated/BindingNewTeamUser_user.hs | 12 +- .../Golden/Generated/BindingNewTeam_team.hs | 103 +++++++++++++----- .../Wire/API/Golden/Generated/Event_team.hs | 16 +-- .../Generated/NewBotResponse_provider.hs | 65 ++++++----- .../Golden/Generated/NewService_provider.hs | 51 ++++----- .../Golden/Generated/NewUserPublic_user.hs | 11 +- .../Wire/API/Golden/Generated/NewUser_user.hs | 13 ++- .../Generated/ServiceProfilePage_provider.hs | 3 +- .../Generated/ServiceProfile_provider.hs | 37 +++---- .../API/Golden/Generated/Service_provider.hs | 45 ++++---- .../API/Golden/Generated/TeamList_team.hs | 89 ++++++++------- .../Wire/API/Golden/Generated/Team_team.hs | 43 ++++---- .../Generated/UpdateService_provider.hs | 81 +++++++------- .../API/Golden/Generated/UserUpdate_user.hs | 7 +- .../Generated/User_2eProfile_2eAsset_user.hs | 45 ++++---- .../Wire/API/Golden/Generated/User_user.hs | 7 +- .../testObject_NewUserPublic_user_1-2.json | 6 +- .../testObject_NewUserPublic_user_1-3.json | 6 +- .../testObject_AddBotResponse_user_1.json | 4 +- .../testObject_BindingNewTeamUser_user_1.json | 2 +- .../testObject_BindingNewTeamUser_user_2.json | 2 +- .../testObject_BindingNewTeam_team_1.json | 2 +- .../testObject_BindingNewTeam_team_10.json | 2 +- .../testObject_BindingNewTeam_team_11.json | 2 +- .../testObject_BindingNewTeam_team_12.json | 2 +- .../testObject_BindingNewTeam_team_13.json | 2 +- .../testObject_BindingNewTeam_team_14.json | 2 +- .../testObject_BindingNewTeam_team_15.json | 2 +- .../testObject_BindingNewTeam_team_16.json | 2 +- .../testObject_BindingNewTeam_team_17.json | 2 +- .../testObject_BindingNewTeam_team_18.json | 2 +- .../testObject_BindingNewTeam_team_19.json | 2 +- .../testObject_BindingNewTeam_team_2.json | 2 +- .../testObject_BindingNewTeam_team_20.json | 2 +- .../testObject_BindingNewTeam_team_3.json | 2 +- .../testObject_BindingNewTeam_team_4.json | 2 +- .../testObject_BindingNewTeam_team_5.json | 2 +- .../testObject_BindingNewTeam_team_6.json | 2 +- .../testObject_BindingNewTeam_team_7.json | 2 +- .../testObject_BindingNewTeam_team_8.json | 2 +- .../testObject_BindingNewTeam_team_9.json | 2 +- .../test/golden/testObject_Event_team_1.json | 2 +- .../test/golden/testObject_Event_team_13.json | 2 +- ...testObject_NewBotResponse_provider_10.json | 2 +- ...testObject_NewBotResponse_provider_13.json | 12 +- ...testObject_NewBotResponse_provider_16.json | 7 +- ...testObject_NewBotResponse_provider_18.json | 6 +- ...testObject_NewBotResponse_provider_19.json | 10 +- .../testObject_NewBotResponse_provider_2.json | 8 +- ...testObject_NewBotResponse_provider_20.json | 6 +- .../testObject_NewBotResponse_provider_3.json | 6 +- .../testObject_NewBotResponse_provider_8.json | 8 +- .../testObject_NewService_provider_10.json | 11 +- .../testObject_NewService_provider_11.json | 11 +- .../testObject_NewService_provider_12.json | 2 +- .../testObject_NewService_provider_13.json | 2 +- .../testObject_NewService_provider_14.json | 2 +- .../testObject_NewService_provider_15.json | 7 +- .../testObject_NewService_provider_16.json | 8 +- .../testObject_NewService_provider_18.json | 10 +- .../testObject_NewService_provider_19.json | 2 +- .../testObject_NewService_provider_20.json | 2 +- .../testObject_NewService_provider_4.json | 12 +- .../testObject_NewService_provider_5.json | 12 +- .../testObject_NewService_provider_6.json | 2 +- .../testObject_NewService_provider_7.json | 2 +- .../testObject_NewService_provider_8.json | 7 +- .../testObject_NewUserPublic_user_1.json | 6 +- .../golden/testObject_NewUser_user_1.json | 6 +- .../golden/testObject_NewUser_user_7.json | 2 +- ...Object_ServiceProfilePage_provider_11.json | 2 +- .../testObject_ServiceProfile_provider_1.json | 2 +- ...testObject_ServiceProfile_provider_10.json | 7 +- ...testObject_ServiceProfile_provider_13.json | 2 +- ...testObject_ServiceProfile_provider_15.json | 2 +- ...testObject_ServiceProfile_provider_16.json | 7 +- ...testObject_ServiceProfile_provider_17.json | 7 +- .../testObject_ServiceProfile_provider_2.json | 8 +- .../testObject_ServiceProfile_provider_3.json | 6 +- .../testObject_ServiceProfile_provider_4.json | 2 +- .../testObject_ServiceProfile_provider_6.json | 10 +- .../testObject_ServiceProfile_provider_9.json | 2 +- .../testObject_Service_provider_11.json | 7 +- .../testObject_Service_provider_12.json | 6 +- .../testObject_Service_provider_13.json | 2 +- .../testObject_Service_provider_14.json | 2 +- .../testObject_Service_provider_15.json | 14 +-- .../testObject_Service_provider_16.json | 6 +- .../golden/testObject_Service_provider_2.json | 7 +- .../golden/testObject_Service_provider_4.json | 2 +- .../golden/testObject_Service_provider_6.json | 10 +- .../golden/testObject_Service_provider_7.json | 2 +- .../golden/testObject_TeamList_team_1.json | 6 +- .../golden/testObject_TeamList_team_12.json | 2 +- .../golden/testObject_TeamList_team_14.json | 12 +- .../golden/testObject_TeamList_team_15.json | 10 +- .../golden/testObject_TeamList_team_16.json | 2 +- .../golden/testObject_TeamList_team_18.json | 2 +- .../golden/testObject_TeamList_team_19.json | 2 +- .../golden/testObject_TeamList_team_2.json | 4 +- .../golden/testObject_TeamList_team_20.json | 8 +- .../golden/testObject_TeamList_team_3.json | 2 +- .../golden/testObject_TeamList_team_4.json | 4 +- .../golden/testObject_TeamList_team_5.json | 14 +-- .../golden/testObject_TeamList_team_6.json | 2 +- .../golden/testObject_TeamList_team_7.json | 4 +- .../golden/testObject_TeamList_team_9.json | 12 +- .../test/golden/testObject_Team_team_1.json | 2 +- .../test/golden/testObject_Team_team_10.json | 2 +- .../test/golden/testObject_Team_team_11.json | 2 +- .../test/golden/testObject_Team_team_12.json | 2 +- .../test/golden/testObject_Team_team_13.json | 2 +- .../test/golden/testObject_Team_team_14.json | 2 +- .../test/golden/testObject_Team_team_15.json | 2 +- .../test/golden/testObject_Team_team_16.json | 2 +- .../test/golden/testObject_Team_team_17.json | 2 +- .../test/golden/testObject_Team_team_18.json | 2 +- .../test/golden/testObject_Team_team_19.json | 2 +- .../test/golden/testObject_Team_team_2.json | 2 +- .../test/golden/testObject_Team_team_20.json | 2 +- .../test/golden/testObject_Team_team_3.json | 2 +- .../test/golden/testObject_Team_team_4.json | 2 +- .../test/golden/testObject_Team_team_5.json | 2 +- .../test/golden/testObject_Team_team_6.json | 2 +- .../test/golden/testObject_Team_team_7.json | 2 +- .../test/golden/testObject_Team_team_8.json | 2 +- .../test/golden/testObject_Team_team_9.json | 2 +- .../testObject_UpdateService_provider_1.json | 2 +- .../testObject_UpdateService_provider_11.json | 6 +- .../testObject_UpdateService_provider_12.json | 2 +- .../testObject_UpdateService_provider_15.json | 2 +- .../testObject_UpdateService_provider_17.json | 2 +- .../testObject_UpdateService_provider_18.json | 7 +- .../testObject_UpdateService_provider_19.json | 12 +- .../testObject_UpdateService_provider_2.json | 8 +- .../testObject_UpdateService_provider_20.json | 6 +- .../testObject_UpdateService_provider_3.json | 6 +- .../testObject_UpdateService_provider_4.json | 7 +- .../testObject_UpdateService_provider_5.json | 12 +- .../testObject_UpdateService_provider_6.json | 2 +- .../testObject_UpdateService_provider_9.json | 12 +- .../golden/testObject_UserUpdate_user_2.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_1.json | 2 +- ...Object_User_2eProfile_2eAsset_user_10.json | 2 +- ...Object_User_2eProfile_2eAsset_user_11.json | 2 +- ...Object_User_2eProfile_2eAsset_user_12.json | 2 +- ...Object_User_2eProfile_2eAsset_user_13.json | 2 +- ...Object_User_2eProfile_2eAsset_user_14.json | 2 +- ...Object_User_2eProfile_2eAsset_user_15.json | 2 +- ...Object_User_2eProfile_2eAsset_user_16.json | 2 +- ...Object_User_2eProfile_2eAsset_user_17.json | 2 +- ...Object_User_2eProfile_2eAsset_user_18.json | 2 +- ...Object_User_2eProfile_2eAsset_user_19.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_2.json | 2 +- ...Object_User_2eProfile_2eAsset_user_20.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_3.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_4.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_5.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_6.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_7.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_8.json | 2 +- ...tObject_User_2eProfile_2eAsset_user_9.json | 2 +- .../test/golden/testObject_User_user_2.json | 6 +- services/brig/src/Brig/Data/Instances.hs | 13 +-- .../brig/test/integration/API/Provider.hs | 7 +- services/brig/test/integration/API/Team.hs | 4 +- .../brig/test/integration/API/Team/Util.hs | 3 +- .../brig/test/integration/API/User/Account.hs | 10 +- .../integration/API/UserPendingActivation.hs | 3 +- .../galley/src/Galley/Cassandra/Instances.hs | 9 -- .../galley/src/Galley/Cassandra/Queries.hs | 5 +- services/galley/src/Galley/Cassandra/Team.hs | 5 +- .../galley/src/Galley/Effects/TeamStore.hs | 3 +- services/galley/test/integration/API/Teams.hs | 3 +- services/galley/test/integration/API/Util.hs | 7 +- services/spar/test-integration/Util/Core.hs | 3 +- 181 files changed, 708 insertions(+), 654 deletions(-) delete mode 100644 changelog.d/5-internal/pr-2162 diff --git a/changelog.d/5-internal/pr-2162 b/changelog.d/5-internal/pr-2162 deleted file mode 100644 index 6663254a9c..0000000000 --- a/changelog.d/5-internal/pr-2162 +++ /dev/null @@ -1 +0,0 @@ -Asset keys are now internally validated. diff --git a/libs/wire-api/src/Wire/API/Asset.hs b/libs/wire-api/src/Wire/API/Asset.hs index 834a201dcd..a1c37b9c5c 100644 --- a/libs/wire-api/src/Wire/API/Asset.hs +++ b/libs/wire-api/src/Wire/API/Asset.hs @@ -31,7 +31,6 @@ module Wire.API.Asset -- * AssetKey AssetKey (..), assetKeyToText, - nilAssetKey, -- * AssetToken AssetToken (..), @@ -177,7 +176,7 @@ assetKeyToText = T.decodeUtf8 . toByteString' instance ToSchema AssetKey where schema = - assetKeyToText + (T.decodeUtf8 . toByteString') .= parsedText "AssetKey" (runParser parser . T.encodeUtf8) & doc' . S.schema . S.example ?~ toJSON ("3-1-47de4580-ae51-4650-acbb-d10c028cb0ac" :: Text) @@ -187,9 +186,6 @@ instance S.ToParamSchema AssetKey where instance FromHttpApiData AssetKey where parseUrlPiece = first T.pack . runParser parser . T.encodeUtf8 -nilAssetKey :: AssetKey -nilAssetKey = AssetKeyV3 (Id UUID.nil) AssetVolatile - -------------------------------------------------------------------------------- -- AssetToken diff --git a/libs/wire-api/src/Wire/API/Team.hs b/libs/wire-api/src/Wire/API/Team.hs index c1e192c366..8fb331559c 100644 --- a/libs/wire-api/src/Wire/API/Team.hs +++ b/libs/wire-api/src/Wire/API/Team.hs @@ -30,7 +30,6 @@ module Wire.API.Team teamIconKey, teamBinding, TeamBinding (..), - Icon (..), -- * TeamList TeamList (..), @@ -96,7 +95,7 @@ data Team = Team { _teamId :: TeamId, _teamCreator :: UserId, _teamName :: Text, - _teamIcon :: Icon, + _teamIcon :: Text, _teamIconKey :: Maybe Text, _teamBinding :: TeamBinding } @@ -104,7 +103,7 @@ data Team = Team deriving (Arbitrary) via (GenericUniform Team) deriving (ToJSON, FromJSON, S.ToSchema) via (Schema Team) -newTeam :: TeamId -> UserId -> Text -> Icon -> TeamBinding -> Team +newTeam :: TeamId -> UserId -> Text -> Text -> TeamBinding -> Team newTeam tid uid nme ico = Team tid uid nme ico Nothing modelTeam :: Doc.Model @@ -231,14 +230,14 @@ modelNewNonBindingTeam = Doc.defineModel "newNonBindingTeam" $ do data NewTeam a = NewTeam { _newTeamName :: Range 1 256 Text, - _newTeamIcon :: Icon, + _newTeamIcon :: Range 1 256 Text, _newTeamIconKey :: Maybe (Range 1 256 Text), _newTeamMembers :: Maybe a } deriving stock (Eq, Show, Generic) deriving (Arbitrary) via (GenericUniform (NewTeam a)) -newNewTeam :: Range 1 256 Text -> Icon -> NewTeam a +newNewTeam :: Range 1 256 Text -> Range 1 256 Text -> NewTeam a newNewTeam nme ico = NewTeam nme ico Nothing Nothing newTeamObjectSchema :: ValueSchema SwaggerDoc a -> ObjectSchema SwaggerDoc (NewTeam a) @@ -252,30 +251,30 @@ newTeamObjectSchema sch = -------------------------------------------------------------------------------- -- TeamUpdateData -data Icon = Icon AssetKey | DefaultIcon +data IconUpdate = IconUpdate AssetKey | DefaultIcon deriving stock (Eq, Show, Generic) - deriving (Arbitrary) via (GenericUniform Icon) - deriving (ToJSON, FromJSON, S.ToSchema) via Schema Icon + deriving (Arbitrary) via (GenericUniform IconUpdate) + deriving (ToJSON, FromJSON, S.ToSchema) via Schema IconUpdate -instance FromByteString Icon where +instance FromByteString IconUpdate where parser = choice - [ Icon <$> (parser :: Atto.Parser AssetKey), + [ IconUpdate <$> (parser :: Atto.Parser AssetKey), DefaultIcon <$ Atto.string "default" ] -instance ToByteString Icon where - builder (Icon key) = builder key +instance ToByteString IconUpdate where + builder (IconUpdate key) = builder key builder DefaultIcon = "default" -instance ToSchema Icon where +instance ToSchema IconUpdate where schema = (T.decodeUtf8 . toByteString') - .= parsedText "Icon" (runParser parser . T.encodeUtf8) + .= parsedText "IconUpdate" (runParser parser . T.encodeUtf8) data TeamUpdateData = TeamUpdateData { _nameUpdate :: Maybe (Range 1 256 Text), - _iconUpdate :: Maybe Icon, + _iconUpdate :: Maybe IconUpdate, _iconKeyUpdate :: Maybe (Range 1 256 Text) } deriving stock (Eq, Show, Generic) diff --git a/libs/wire-api/src/Wire/API/User/Profile.hs b/libs/wire-api/src/Wire/API/User/Profile.hs index 692220636a..5327fce297 100644 --- a/libs/wire-api/src/Wire/API/User/Profile.hs +++ b/libs/wire-api/src/Wire/API/User/Profile.hs @@ -69,7 +69,6 @@ import qualified Data.Swagger.Build.Api as Doc import qualified Data.Text as Text import Imports import Wire.API.Arbitrary (Arbitrary (arbitrary), GenericUniform (..)) -import Wire.API.Asset (AssetKey (..)) import Wire.API.User.Orphans () -------------------------------------------------------------------------------- @@ -107,7 +106,7 @@ defaultAccentId = ColourId 0 -- Note: Intended to be turned into a sum type to add further asset types. data Asset = ImageAsset - { assetKey :: AssetKey, + { assetKey :: Text, assetSize :: Maybe AssetSize } deriving stock (Eq, Show, Generic) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs index 25ab06033c..93f6f0ade0 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AddBotResponse_user.hs @@ -24,7 +24,6 @@ import Data.Id (BotId (BotId), ClientId (ClientId, client), Id (Id)) import Data.Qualified import qualified Data.UUID as UUID (fromString) import Imports (Maybe (Just, Nothing), fromJust, read, (.)) -import Wire.API.Asset import Wire.API.Conversation import Wire.API.Conversation.Bot import Wire.API.Conversation.Typing @@ -42,14 +41,7 @@ testObject_AddBotResponse_user_1 = "\77844\129468A\1061088\30365\142096\40918\USc\DC3~0g\ENQr\v\29872\f\154305\1077132u\175940.\1018427v\v-/\bi\bJ\ETXE3\ESC8\53613\1073036\&0@\14466\51733;\27113\SYN\153289\b&\ae]\1042471H\1024555k7\EMJ\1083646[;\140668;J^`0,B\STX\95353N.@Z\v\ENQ\r\19858|'w-\b\157432V\STX \GSW|N\1072850\&3=\22550K245\DC1\142803\168718\7168\147365\ETX" }, rsAddBotColour = ColourId {fromColourId = -3}, - rsAddBotAssets = - [ ImageAsset - (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) - Nothing, - ImageAsset - (AssetKeyV3 (Id (fromJust (UUID.fromString "034efa97-f628-450e-b212-009801b1470b"))) AssetExpiring) - (Just AssetPreview) - ], + rsAddBotAssets = [ImageAsset "7" Nothing, ImageAsset "" (Just AssetPreview)], rsAddBotEvent = Event (Qualified (Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000200000003"))) (Domain "faraway.example.com")) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs index 37dc8807bf..1eb13e0c5c 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeamUser_user.hs @@ -18,14 +18,10 @@ module Test.Wire.API.Golden.Generated.BindingNewTeamUser_user where import Data.Currency (Alpha (XUA)) -import Data.Id (Id (..)) import Data.Range (unsafeRange) -import Data.UUID as UUID -import Imports (Maybe (Just, Nothing), fromJust) -import Wire.API.Asset +import Imports (Maybe (Just, Nothing)) import Wire.API.Team ( BindingNewTeam (BindingNewTeam), - Icon (..), NewTeam ( NewTeam, _newTeamIcon, @@ -45,7 +41,9 @@ testObject_BindingNewTeamUser_user_1 = { _newTeamName = unsafeRange "\fe\ENQ\1011760zm\166331\&6+)g;5\989956Z\8196\&41\DC1\n\STX\ETX%|\NULM\996272S=`I\59956UK1\1003466]X\r\SUBa\EM!\74407+\ETXepRw\ACK\ENQ#\127835\1061771\1036174\1018930UX\66821]>i&r\137805\1055913Z\1070413\&6\DC4\DC4\1024114\1058863\1044802\ESC\SYNa4\NUL\1059602\1015948\123628\tLZ\ACKw$=\SYNu\ETXE1\63200C'\ENQ\151764\47003\134542$\100516\1112326\&9;#\1044763\1015439&\ESC\1026916k/\tu\\pk\NUL\STX\1083510)\FS/Lni]Q\NUL\SIZ|=\DC1V]]\FS5\156475U6>(\17233'\CAN\179678%'I1-D\"\1098303\n\78699\npkHY#\NUL\1014868u]\1078674\147414\STX\USj'\993967'\CAN\1042144&\35396E\37802=\135058Da\STX\v\1100351=\1083565V#\993183\RS\FSN#`uny\1003178\1094898\&53#\DEL/|,+\243pW\44721i4j", - _newTeamIcon = DefaultIcon, + _newTeamIcon = + unsafeRange + "Coq\52427\v\182208\&7\SYN\\N\134130\8419h3 \30278;X\STX\a\a$|D\NUL\SOHh'\62853\&3-m7\1078900\SOp\22214`\1093812\&6QF\CAN\SOH9\1062958\ETB\15747FP;lm\1075533\173111\134845\22570n:\rf\1044997\\:\35041\GS\GS\26754\EM\22764i\991235\ETXjj}\1010340~\989348{; \119085\1006542\SUBL&%2\170880;@\\2`gA\984195\&0\162341\&2\163058h\FSuF\DC4\17376\ESC\GS\SO\vYnKy?v\129546H\fcLdBy\170730\&4I\1108995i\1017125\ETBc6f\v\SOH\DC3\1018708ce\1083597\SOs3L&", _newTeamIconKey = Just ( unsafeRange @@ -66,7 +64,7 @@ testObject_BindingNewTeamUser_user_2 = { _newTeamName = unsafeRange "G\EOT\DC47\1030077bCy\83226&5\"\96437B$\STX\DC2QJb_\15727\1104659Y \156055\1044397Y\1004994g\v\991186xkJUi\1028168.=-\1054839\&2\1113630U\ESC]\SUB\1091929\DLE}R\157290\DC1\1111740\1096562+R/\1083774\170894p(M\ENQ5Fw<\144133E\1005699R\DLE44\1060383\SO%@FPG\986135JJ\vE\GSz\RS_\tb]0t_Ax}\rt\1057458h\DC3O\ACK\991050`\1038022vm-?$!)~\152722bh\RS\1011653\1007510\&0x \1092001\1078327+)A&mRfL\1109449\ENQ\1049319>K@\US\1006511\ab\vPDWG,\1062888/J~)%7?aRr\989765\&4*^\1035118K*\996771\EM\"\SO\987994\186383l\n\tE\136474\1037228\NAK\a\n\78251c?\\\ENQj\"\ESCpe\98450\NUL=\EM>J", - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = unsafeRange "\SUB4\NAKF", _newTeamIconKey = Just ( unsafeRange diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs index 5b2eae3c44..95ec210ac8 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/BindingNewTeam_team.hs @@ -19,14 +19,10 @@ module Test.Wire.API.Golden.Generated.BindingNewTeam_team where -import Data.Id (Id (Id)) import Data.Range (unsafeRange) -import qualified Data.UUID as UUID (fromString) -import Imports (Maybe (Just, Nothing), fromJust) -import Wire.API.Asset (AssetKey (..), AssetRetention (..)) +import Imports (Maybe (Just, Nothing)) import Wire.API.Team ( BindingNewTeam (..), - Icon (..), NewTeam ( NewTeam, _newTeamIcon, @@ -44,7 +40,10 @@ testObject_BindingNewTeam_team_1 = ( unsafeRange ("UivH&\54922\98185p\USz\11724\r$\DC4j9P\r\"\1070851\3254\986624aF>E\1078807\139041B\EM&\1088459\DC4\174923+'\1103890R;!\GS\1017122\SIvv|\rmbGHz\1005234\95057\&3h\120904\\U|'\ETX;^&G\CAN\f\41076\&42\teq\1049559\SOV1}\RSaT\1014212aO7<;o\179606\f\1111896m)$PC\ESC7;f{\STXt\9533>\EOTX@4|/\tH\ENQ/D\144082\EM\121436C\99696Q\ENQT\1096609?d\ACK\1073806#H\127523\139127*\166004jo\1079041\74636t\n)1/% hL\DC2Ad\SOHXq6\DC1)\NUL\f6\fV\DC4r\1097128\DC1n\1107359,@\171217\118996\n\SUB%N\176824\ACK\33856Xv)\SYNz?\DC4\EMY\162050\&2\95792um8}\51420\DC2yW\NULHQ\ENQD[Fe\nk\999106\EM\25079Yk@##u}j\169850\153342\STXq\ESCir7) \27756%\1016104~\993971\&8\1085984je\1099724\&0*Gi3\120829je\CANQr>\1033571k1\63774c\1031586L\1015084\93833t\EOTW\999363\SUBo\fgh\ACK\172057C2\38697c\SUB)uW\r\fB\1042942Sf\SUB\SOH*5l\38586\SI\25991\EMB(\ENQ\133758/)!{\1006380\&9\STXA\DEL\16077fx&\180089T&\187029\DC4\52222[\r\v\n\1071241j2\166180/\1086576\ENQQo\fj\134496\129296\nb6\CAN3\RS9\EM\1000086ub\ETB3CY\GSsIz") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "3d4b563b-016c-49da-bad2-876ad0a5ecd2"))) AssetExpiring), + _newTeamIcon = + ( unsafeRange + (":b6\99159L\1054777K<\1108399\94965C^\SOY8LuXS\156657F\SOH\ETB\49985\1023127\US\1042782J]\ETBA2R$P6\\\ENQ\168330-J\NULt\SI\1047279*\1030368r\1078088M\NAKPL)\94751\SUBJ\72794S\1103633~'kRYj\71198{P{V\SOH!\986239Y~\vV\t\150530{5%i[$7X:ZV\NULy\a\49289\SYN\ENQ\f;!k?O\1029799\1082505K:}\1097011\174391#>\\|(n\STX\165884\ETXD\150060\52125{|\151751\987438+\7022J") + ), _newTeamIconKey = Just ( unsafeRange @@ -92,7 +97,10 @@ testObject_BindingNewTeam_team_4 = BindingNewTeam ( NewTeam { _newTeamName = (unsafeRange ("\ETX\1006830k;")), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "18fef3b3-323c-4c27-bb62-6026d62f77c3"))) AssetExpiring), + _newTeamIcon = + ( unsafeRange + ("tmIV\999157\&3\1101401\1048401HKE{\1076066\58364R9\EOT\ETBE2\68432L\1009801|a\b|C\41601\1054883}\GS\1031260\CANO9$)\NUL\STX\153170\32951\NUL\50288K\1045065\1057248d\25051\GS\vq\1025447B\ETX\aT\SOPt\DELY\NAK\1047285\28492z#k`P\1056790\STX_7LXC]`#-`\ACK\2234\DC2pw59\n\SUB\DLEj\41795\184841F\ETB\1071805\t;\DC2r*\22318\EMS\182587E8e\FSx\1091470A\SUB|j\ad\DLE0RDI\rQ\NAK`\1072156\EM)j{\1062530\142892\1100137f@\t\DC1\f\"\f\1043821\1099467\1105685\6302J`.\110675*\bF%4\1009644\EM-3g\100340\1103476\1101833\STX\n\DLE\DC3]s\178911_\a\1041598\162772\DC2\v\515\DLE\15612v|\b\1052391%\165476g~0\EOTWp\t \173242C\FS\149826x\ENQ\ACK\DC2-DIYa\1004333:\189759'{\1083009\143586\1041756\&6\7690\1000132=xfo\ACKU'\DC4\1102469t\n\DC2\1095515\&6\119535/\1103539tR\SYN#\1109833") + ), _newTeamIconKey = Nothing, _newTeamMembers = Nothing } @@ -106,7 +114,10 @@ testObject_BindingNewTeam_team_5 = ( unsafeRange ("\SIB\63473\70352\&3\158300\\#\1061243I\USK\1023384h\DLE\DC3\RS\134858*\998726L\STXw1p\"4\EOT\188995#u\144798\SYN\FS\37122\41625$\376wu\174004\45347\1008628\SUB\a)\DC2?T \49542\&8\39359.\t\NAK1\f\EOTY\128585%\1929\64376\15282 &Z4\1085196\NUL@\SOH\EM\154601\1078303\1098851xtj\182717`\SOH\59489r\r\94098\EOT0\EM\NULLyc D\FS\1085075\1054974)\SUB-\SO\1085196\vl\984336\59601\1114081\CAN\61540\186940f\SIrb/[F\NUL\1099974<1\1027888P\GSxl\"!11E\ESC0\ESC\f$u\1093437N\GSV^\1017313q\170667\n`\1047440\163252:iLXn\CAN\988958\26427O}8!Y\NAK,^X\63902*\\`\38784\DC3\a]\144700\1021165{FKA\b\1102136\178719\DC3\US=UC\179701KQb\1054842\1015593\FSX7@\996116C~-[Db $cx\ETXCzvq ,g\rD\1032170") + ), _newTeamIconKey = Just ( unsafeRange @@ -124,7 +135,10 @@ testObject_BindingNewTeam_team_6 = ( unsafeRange ("v\188076hEWefuu\1006804jPx\158137k#\SOH\986725\STX\ETX^\ESC\n\CAN\8325p1D|S1\1064991\1102106\29079\SYN`\t0g\1034469,t\FSw\fDT\RS#H\SOH\145176\US{\1091499\1025650\984364lW\a,uil\SIN`5e:\SYN Y!\SYN\1025115tb\1085213") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "d7a467c6-8cd4-40cb-9e30-99b64bb11307"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("l\145301\30725\US@/D\t\145930\1019910^f\NAK\DC4[\127098\1002727)\1097841W\1035417\&2\58863\111330\n#\138666|/I\rI\NUL\US;\n\v\b\ESC\SO\b}\1060666Q\168368\&45^mI\10814\138738\1110238k\SO\1071853d0iA7\DC3\rW\985090\1041247Z\166371T\46392u\EOT\SOX\"\996646") + ), _newTeamIconKey = Just ( unsafeRange @@ -142,7 +156,7 @@ testObject_BindingNewTeam_team_7 = ( unsafeRange ("\145552\1042892iz\1057971FT\14964;\1108369}\188917\1113471\&9\SO\991633\&7>hAC\NULH2O\177259m\187711\&2R(?W,=,\990725M\992456\aM\194790\SUB\47600q\SOlj\EOTj^.s~\rY%5lM,\26492=\ACK\1016899\188843>{\CAN\DLE\15878f=X9\SYN9\51145\159419TI4\17599\v\NAK6\1014936/\DLE\NAK\ACK\23564H<\ENQ\1029703e\ENQz\1017528:\6137\"rS\a\167660\FS\ETX\1059289\1031786\49012\DC4\DC4Q\"\1065200\&1:\1097556\UST.;\1042663\18380}") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "b199431c-e2ee-48c6-8f1b-56726626b493"))) AssetEternal), + _newTeamIcon = (unsafeRange ("_5\63791\aQ\1109163W\8411\&9\43942*\1003379")), _newTeamIconKey = Just ( unsafeRange @@ -160,7 +174,10 @@ testObject_BindingNewTeam_team_8 = ( unsafeRange ("YwD\1023517r\NAK}\1083947\ACK\1047823\29742\EOT\1071030iI5g\1012255\t\"r\150087O\DC4?\53005\1100290\1108960\NUL\1060304qgg\DC1X)\NULL\1054528\CAN{\v4\NUL\93999\bvD#\1035811$aYFk\b\1102040\1089491\1042733\47133:1\179810S7\66745V)\1072087\v\96989\&3#\b\1104899c\27119Q/jPy\1015620P@Df\997914\51756H\1113361Xr\SO\ETB3%\1108760aF@3A\SI\ETB\STX mj9T=\DC3'XI\DC2?0\1093231\156858VHp?\1066163YU\42092\33083\72810,)\1113424\ETX96\153338z\42445/4T\136162\ESC\60427\1086321&\ETBS\1098748\14578z[\54638Z\DC2\"e\SUB\173931&rQ\fJG\100066\180037\155435s$\SUB$\50544S\162554E\ETX*\t+\63443WU*\144654\1042128\&8\NAK\999184a\t\EM\1097907_\DELOD\1006385/\23998\1100140SmfX") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("\9989IT\RS\DEL\1102950\49046%mE\985354\1051208M\a:[fgw\ESC?ye\70096\1096815K\ETBl\1054491\1013010\1037243Qg?\151299{\f!uXA}H)v$\160467\1093098mGkC9\1084965\GS\1092746\1034992\&1DH\166476s\42306\&7[.\187974v+\1091910O^SGjv\1069550Y\1003173n\154396Z\78347\SO{\1060523Q\ETX\RS1I\FS5\ACK\1035980\1083718\1031418_\1105769?gD\4285\fg\15008:g\FS.J<\DC2\ETB\1016548}/\97909\DELOBLa\1051864\a{\1011185-\1064859\v\SI\DLE\145744V \\Ns0t\1081561frR!Qe!$\140066\1007621\SYN$\1077998!SZ\1052672\184571a\DLEB3") + ), _newTeamIconKey = Just ( unsafeRange @@ -178,7 +195,10 @@ testObject_BindingNewTeam_team_9 = ( unsafeRange ("\SOLN\GSr\144312\1070871k\181829#\153181lTD[Jh\SOH\1029451\34144\&6\1034706\1062880\NAK}\adb\171356-\\-1\DC42\1046344\DC2\78894\&1/\33084b:\ENQ\1038950;Mw\FS\183866\1113547ITuy\1050264`SP\SOH\SO\GS\NAK\a\r7M\1069326\1064150\18615\n\SYN3V\ETXR\n1$e.\1096261B~yd_z\1047817\rV\1091351\RS\SYN\165050l\DC3\47200u\1058674u\"\aTc|sEw\1011190wTC|F\4735B\t\DC4&\bUEN(+M\SOF;\1099746\134573\EM20\nrPW\1017058$\1064809") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("i\DLEi|\7196\ETB\1025523\NUL\7866\NULD'\94469Zby\1039174\8663Y\r\1019969\\n\21729\168347>\999971\&6\140502\1039443\37325\1016989|`dN \25830\987680i_\1055665p\1033233J\26000ngp@#\1105667A\988593\&7l{;\180315g4EX\45324\ESC\1068230\151220#z\176275\SYNy\EOT\t\60992G\\\35606\22388#s\1005062Ad\1094868Obh\1008737\DC2\1086579\57353)3R\SUB\FS\97513aw]\1075127\1039396\4324\118950kC\26815\SOH\1002881\1005712d8\46181\DC1\SYN\64570f9") + ), _newTeamIconKey = Just ( unsafeRange @@ -193,7 +213,10 @@ testObject_BindingNewTeam_team_10 = BindingNewTeam ( NewTeam { _newTeamName = (unsafeRange ("\b \SOH+\1056054;\t095\42390\n\STX2J\1002251\DC1UzD_\1110746\FS")), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("L\1093530j^Xe\DC1\1012858z1{\ENQ\1040620,\1021288\DELB;&\b54f>8+\168322\n\NUL5L[r7_.\DLEl1\176221\US6[EhD\USh\a\1095183\NAKC\139765,\177058,@?y+;\US`/^d\137830\991658HeCd\39028\DC3\1050220\143767\ENQ2O-Hijo\1007768\1045537\1013046X}x\1112190\ETB7\146170\53218C\30013\DLE`k*Gl\1046094\t\77870\1003758\rb}\b\NUL\33414h\SYNynr6d(") + ), _newTeamIconKey = Just ( unsafeRange @@ -211,7 +234,10 @@ testObject_BindingNewTeam_team_11 = ( unsafeRange ("\48005H\1082536\132304\157763\&5\RS\986337-\NAK\ESCR\nL\63954&bD\139428\SUBH\US\1040918\f\t;e\1064224\47101\tc\1087740e\1099415\DLE\ETX\DELI\65746\ETB\133884\SUB \SI\43795~FE\CAN6\162836\DEL\46062u\"\135684\1041611\FSFYI\t/{\ENQ\RS]j\1076782\US22\15884l\42366$\ETB\US\180023kL{\STX*\131382RMj\ESC\1091332W3H\1020399\FS\NAK^\"5\29653\32539*\1099111") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("r\53037\22164\72341u*33{8G\1084742aO\GS%\NUL[\1003678U\ENQ\985387iKL\GSNF\163860\1098258`\EOTT$`i5\92401\ESC\356\&98>") + ), _newTeamIconKey = Just ( unsafeRange @@ -229,7 +255,10 @@ testObject_BindingNewTeam_team_12 = ( unsafeRange (";\110872M\EOT\164161P]'\1041089\1094514\4118\1054714iFnRQV\43238@\992926\59902l\1099067\aKZ{\51124S\190890\fg*\n,`!V\STX\991695e'\1039967\SO0\37019p4d\STXs\1020471uK(c'\52929hjB\144953\SOt'h^\SYN\SYN0\1009487_\12064\166805thH\SI\1073479:\1019934l; n4c\1101781D[\1014388\&8Y+\1092407\EOTE\1058506\\0\168273KKTc)P1K\1042475\990753W\ETX<|\24888\&0|5{Y\986771M\DC4\vK\DLE\1089150\SOH\DC4\1013653.\ETBg\991717\DLE\"W\NUL9&0yYZ\1094524\v\11606\58174") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("\1060773b\EOTch1a iuB\1011795\ESC\DC1\187488\STXV\1046981@1\145144 iY\"m\1036630\SO\\O*(\DC3\178375w7w\1105638\US2ECk\99276\&4\ETX\2892%\EOT@\"k\1013020\993468*\1031577\DC1\ESCYC?\177240\&2>\52504\SYNo8[\aV@9E\1085704\9349\1018050!k0b\t\n+6\\Ki{\DC1\984398\SOH\SYN\1037253{0H\1017165\DC4\ENQ\992581|\CAN\1023332F\37419\1012389d\1045535\n\119327\1054972X\1056743\1052679*\bC\DC2\99475Wz\1070783\37601QWt\ETBAj>eO}Ae\DEL\DC4\94565 \STX\39311\SIF\tAH\160873:\167531\&8\16727Q\1045659\DLE-A\EOT\156588\ESCHOc\v\1007234\DC39\SYN\917845{ \NUL]\1008784I\1054187,\162782f\DC2\1088424q\SOH\129571GA\GST\EOTS\DLEMmnLy\1113365=\131110\&2k\1010420\r~\1059431\&1! \ESCJy\9820J|zgf1}ILN5\1024553Xi\6845Be.\1085513\RS\SYN\95106\1090727\RS+Y;Z$\SO5") + ), _newTeamIconKey = Just ( unsafeRange @@ -265,7 +297,10 @@ testObject_BindingNewTeam_team_14 = ( unsafeRange ("2#\DC2N\b9&A\1030886ZL{f\1011542M\1101172\23517\a\DELv\164961\32470\ACKT7\DC3\DC4\1009557O\1103393C\152202\t\DC4l\RS\SOH]\ESC\ACK\95718X;\149660* &\97401}\1111236T\ESCCLkx,\DLE\63803\nbT\1049269fWJ\992800\136973a\US`\DC3\139728\28948\&8r2']\NAK\DC2\133094\nl\DC2NXB\ENQia\1068046]B\989632\DLE\ENQdf#\64677\t6g\FS\SOH\1029760Fp(\GSQTZ\1015396\8630\153801dUJt\SI\EM\194705`\\#g0Qed@a${=Q.\1048388Ld`\35027 \173216sV\SUB\SO5\150360\41997\1107813i\EM\DC3\988956\1049486\SOH\1030355>\1044179\DC3w\1001979Y}\21603\&1q\NAKY:\25626q \ETB=*#\74975\EM\61277\\\21887y9Tfc\DC1\49327k\1096646\\Oxxn&6NtaZ?k:5G@\46350\DC3H\1097149hu4\178807\995883\USR\161801\1024517v\26381\23905\72161\12881\ACKD\985152[bb<\1111873") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("(r'`\1072313Gd\ETX)u\fq*4\1076827\1031167i\EMM.Ru\1079085\t\148161\1088689m\58073;\f\1001367\1114096\135422m\a\t\1066705wRhv\ar6\64764\";&4\SYNX\GS\SYNw5{%P&\26997\&98\ETX\STXyL\t\1022691XMu(\187856\&6)\SUB\42223Wc\38363#\STX\22842l\1064183Vy\59354\&1_\SUB\\\CAN\1103008\44889Ek>\1005303\ACK]$\EOT\181821\1076265w\r\164187@&V8\a\DLE\DC1\DEL\\\1010644\1053996\NAK)X\nE)\1071775y*%1\NAK\DC2^4hKf\995698|EY`^\DC3\173547\58719\39061\"pX\bg\49396>YR(W\\eS\GS\27701(bn\SYNu\1001078\156831h\41346\FSG\1090155\DLE\34585a\70001n2)\984812\"<\1032188YUq\1049152\1035363\186759\r7\61891\4004\v\1049233\24817\r\1027960|]\ETB\SOh9f\ACK1\bZQ7fmQOQ\986711l!\DC3\44018\27476*\43689*1\f\1097293\&8nk|\NAK\1005998~\fO\162989\100863!:3\ETXn{%\6663\182700if/!\29917] <\1056176Y\1078680\b\DC4~\t\EM\SOH<*\NAK\143397bx4 {\96203\CANVs;g\98929\144388\STXqkI!QJ\1072302J\189512\DC4\64545?_\STX\t\1082190iB3YdKA7@>Q\995699\987049]\1094644\133325>D\1026819wD\ESC|\SI'^\136789\120874Q#q,\"") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("UZ0\990600t+\167739\12589k|\DEL\DC1\SYN\EM_ch\t\1089768\13109\n\ETB\DC2,x\1106295,RE(,G\GS\"gA\NAKncdJ\162831+\t\1100097FP{v=\45227'e\STX9B#1\1075471\t.\1085742\140286\11416\FSUK\SOH\a;\STX\1078860\143696\&7B\ESC\NULD+\1036884\1094020`\SO\DEL>\ESC\DC1,\171231d\SOH(5\EOTP9iR]\RSNws\1029644\1003476{[H\128669,\DEL5J!\136454\1036165j\1053405eA\1046358\tbj\EMk\DC1l\n\988481H~]u\42907\1029099!kjVS{42\NULE?\EMh\61474\35112B!:\DLEX\DC1T\DEL3W\avimhK\1078443\DC1to*P*\DC1}\986362\1081249H\r\1034017B") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("_'C\1004343\EOT9\nC\92250f\a\118853Pe\58352\127931\185310\134048\98557\&5\1051407m<\r}\139827@\1053024#.\1058183\STX6%\1111877H%\1030001\60185n\EOTUk\US/\FS\DELpS\156872\DEL\1098001[1np\ACKmD\1011808U\GSI\1083494]I\49341\171558AT\ETX\USOl{\DC1\tYt7U +Q\1073293\CAN\US[\STXJV\EOT`\CANrF\tN\67855\95873\169991\SYN\166546*A\DLEA]4ku\1003232W\1111354\54858I\DC4\58521\SO\94687") + ), _newTeamIconKey = Nothing, _newTeamMembers = Nothing } @@ -311,7 +352,10 @@ testObject_BindingNewTeam_team_17 = ( unsafeRange ("|\36324P\US\1040589\159812Y\SOHj\RSYrr\49743\&0m\ENQ\1027954*'\72098\1105368P6\SYN\15236\f\DC2\125109e\1031690\RS\1026891\1003083\69946\rA'\GSA\NAK\53778\1067566J\1016490'T\1037603R2? \FS\US\1032454$\NAKGr(\1008673{\ENQ\62451\&0mJ\SID\STX-\CAN_I\132366\f\147665\FSR\1080205hp\143954B6W2\b\f6\1104867\DC2\180998\b1'7-T-#\3953D\1076345\1082129T]v$Gl\1042148\1032818\&5yg\1025280\nQc.`i\14819\24538}\FS&k4\99627\ACK>#\32013\1036954\EM\131987[vBOPu\1108963@\ACK\NUL\1087882\147841\SO\NAK\98755\31702\EOT\ETX&\1032348?z\989374i\fz\n\1029119\ETB3\a\1108955W\1113557E^\1043345\986117S3'4\ACK\74144*m-\ESC4\USj\ETX__6\1046371\6580M\48069\ESC]\EOTDq\DLEuo\28030$\vUWp1=/o\ETBY\173686\&9\DC2\nQ\177317\1051037)\1102455\"br\SOH\NUL\158808+\47718c^\1003405<`\1111751\149060\STX\986585\ETX\162139D\ENQ\30356nqp\1095539\988368c\RSt\1081319G") ), - _newTeamIcon = Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal), + _newTeamIcon = + ( unsafeRange + ("Zz]|\b>\NUL\163291\1063651\95675\SOH,q\SOH`\1050846P\987757\1069132\n\EOTIm\1067057\DC4\1013555\1075331HB\GS`\1022663\142641U\162403G\DC3m+Lw\DLE\1023911\"0\119625?-T\ESC\ETXj\DC3|Lq\ETX.\99032hgq\ESCy\99463\&5\ay\ACK\1111685w^(\ETB+\175870\&3\f\113727x\1007957i*E\DC3\179834rTM\CAN\1093029$\160784\190686\EOT\\p\1053146\&1\a\131095\1050682zv\1034137\EMrj\a\1043282u\NAKn\SO\164246\&6\ESCs\GSm9Y\FS%\DLE?6\1039335\STX\f\1063550)RST\r\DLE\1107040\DC1\1078521h\nTS\DC2\US\1097415\STXn\ESC\149926r2\73911\984427hrr-$*j\1110522\35321]@\1003869\15025J\b\"8N\68412e,#", serviceProfileDescr = "D\DEL", serviceProfileAssets = - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) + [ (ImageAsset "" (Nothing)), + (ImageAsset "" (Just AssetComplete)), + (ImageAsset "" (Just AssetComplete)), + (ImageAsset "" (Nothing)), + (ImageAsset "" (Just AssetComplete)) ], serviceProfileTags = fromList [], serviceProfileEnabled = False @@ -197,7 +196,7 @@ testObject_ServiceProfile_provider_9 = serviceProfileName = Name {fromName = "\EM\73877+\DC2\NUL!\USV\f\1025396\1106635_\1106841H#4\STX\1104704\DEL"}, serviceProfileSummary = "a\1088958", serviceProfileDescr = "AU", - serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], + serviceProfileAssets = [(ImageAsset "\DC1" (Nothing))], serviceProfileTags = fromList [BusinessTag, FinanceTag, PollTag], serviceProfileEnabled = False } @@ -210,7 +209,7 @@ testObject_ServiceProfile_provider_10 = serviceProfileName = Name {fromName = ":h[\1059282\1033090\913Y$\ENQ\NAKE\1086801\186280\STX\US\28752"}, serviceProfileSummary = ",AD", serviceProfileDescr = "s&\118974", - serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], + serviceProfileAssets = [(ImageAsset "" (Just AssetPreview)), (ImageAsset "" (Nothing))], serviceProfileTags = fromList [], serviceProfileEnabled = False } @@ -257,7 +256,7 @@ testObject_ServiceProfile_provider_13 = serviceProfileName = Name {fromName = ":[\".\152322\USvU\1055877"}, serviceProfileSummary = "", serviceProfileDescr = "A", - serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], + serviceProfileAssets = [(ImageAsset "B" (Nothing))], serviceProfileTags = fromList [ProductivityTag], serviceProfileEnabled = False } @@ -287,7 +286,7 @@ testObject_ServiceProfile_provider_15 = }, serviceProfileSummary = "*P`", serviceProfileDescr = "u`\ENQ", - serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], + serviceProfileAssets = [(ImageAsset "*" (Nothing))], serviceProfileTags = fromList [MusicTag, RatingTag], serviceProfileEnabled = False } @@ -304,7 +303,7 @@ testObject_ServiceProfile_provider_16 = }, serviceProfileSummary = "U,", serviceProfileDescr = "S\n", - serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], + serviceProfileAssets = [(ImageAsset "" (Just AssetPreview)), (ImageAsset "" (Just AssetPreview))], serviceProfileTags = fromList [], serviceProfileEnabled = False } @@ -321,7 +320,7 @@ testObject_ServiceProfile_provider_17 = }, serviceProfileSummary = "\SO4c", serviceProfileDescr = "\SI", - serviceProfileAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + serviceProfileAssets = [(ImageAsset "" (Just AssetComplete)), (ImageAsset "" (Just AssetComplete))], serviceProfileTags = fromList [], serviceProfileEnabled = False } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs index 80a068190c..0ab9afa0e7 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Service_provider.hs @@ -48,7 +48,6 @@ import URI.ByteString uriScheme ), ) -import Wire.API.Asset import Wire.API.Provider ( ServiceTag ( AudioTag, @@ -239,7 +238,7 @@ testObject_Service_provider_2 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + serviceAssets = [(ImageAsset "" (Just AssetComplete)), (ImageAsset "" (Just AssetComplete))], serviceTags = fromList [], serviceEnabled = True } @@ -432,7 +431,7 @@ testObject_Service_provider_4 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + serviceAssets = [(ImageAsset "" (Just AssetComplete))], serviceTags = fromList [MediaTag], serviceEnabled = False } @@ -571,11 +570,11 @@ testObject_Service_provider_6 = ) ), serviceAssets = - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) + [ (ImageAsset "" (Just AssetComplete)), + (ImageAsset "" (Just AssetPreview)), + (ImageAsset "" (Nothing)), + (ImageAsset "" (Just AssetPreview)), + (ImageAsset "" (Just AssetPreview)) ], serviceTags = fromList [FinanceTag, FitnessTag, MoviesTag], serviceEnabled = True @@ -678,7 +677,7 @@ testObject_Service_provider_7 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], + serviceAssets = [(ImageAsset "" (Just AssetPreview))], serviceTags = fromList [MoviesTag], serviceEnabled = True } @@ -1018,7 +1017,7 @@ testObject_Service_provider_11 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + serviceAssets = [(ImageAsset "" (Just AssetComplete)), (ImageAsset "" (Just AssetComplete))], serviceTags = fromList [], serviceEnabled = False } @@ -1110,9 +1109,9 @@ testObject_Service_provider_12 = ) ), serviceAssets = - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) + [ (ImageAsset "" (Just AssetPreview)), + (ImageAsset "" (Just AssetComplete)), + (ImageAsset "" (Just AssetComplete)) ], serviceTags = fromList [MedicalTag, TravelTag, WeatherTag], serviceEnabled = False @@ -1185,7 +1184,7 @@ testObject_Service_provider_13 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + serviceAssets = [(ImageAsset "" (Just AssetComplete))], serviceTags = fromList [EducationTag, MoviesTag, ShoppingTag], serviceEnabled = False } @@ -1287,7 +1286,7 @@ testObject_Service_provider_14 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], + serviceAssets = [(ImageAsset "A" (Just AssetPreview))], serviceTags = fromList [], serviceEnabled = True } @@ -1355,13 +1354,13 @@ testObject_Service_provider_15 = ) ), serviceAssets = - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) + [ (ImageAsset "" (Just AssetPreview)), + (ImageAsset "" (Just AssetComplete)), + (ImageAsset "" (Just AssetPreview)), + (ImageAsset "" (Just AssetPreview)), + (ImageAsset "" (Nothing)), + (ImageAsset "" (Nothing)), + (ImageAsset "" (Just AssetComplete)) ], serviceTags = fromList [DesignTag, LifestyleTag, QuizTag], serviceEnabled = True @@ -1429,7 +1428,7 @@ testObject_Service_provider_16 = ] ) ), - serviceAssets = [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + serviceAssets = [(ImageAsset "" (Nothing)), (ImageAsset "" (Just AssetComplete))], serviceTags = fromList [PollTag], serviceEnabled = False } diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs index 2a448754c2..9bf6832fbb 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/TeamList_team.hs @@ -23,8 +23,7 @@ import Control.Lens ((.~)) import Data.Id (Id (Id)) import qualified Data.UUID as UUID (fromString) import Imports (Bool (False, True), Maybe (Just, Nothing), fromJust, (&)) -import Wire.API.Asset -import Wire.API.Team (Icon (..), TeamBinding (Binding, NonBinding), TeamList (..), newTeam, teamIconKey) +import Wire.API.Team (TeamBinding (Binding, NonBinding), TeamList (..), newTeam, teamIconKey) testObject_TeamList_team_1 :: TeamList testObject_TeamList_team_1 = @@ -34,7 +33,7 @@ testObject_TeamList_team_1 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -42,7 +41,7 @@ testObject_TeamList_team_1 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000001")))) ("") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -50,7 +49,7 @@ testObject_TeamList_team_1 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -66,7 +65,7 @@ testObject_TeamList_team_2 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("7") - DefaultIcon + ("\174380") (Binding) & teamIconKey .~ (Just "@") ), @@ -74,7 +73,7 @@ testObject_TeamList_team_2 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ) @@ -90,7 +89,7 @@ testObject_TeamList_team_3 = ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000002")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -106,7 +105,7 @@ testObject_TeamList_team_4 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ("\1065164") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -114,7 +113,7 @@ testObject_TeamList_team_4 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ) @@ -130,7 +129,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -138,7 +137,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ), @@ -146,7 +145,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -154,7 +153,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -162,7 +161,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ), @@ -170,7 +169,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ), @@ -178,7 +177,7 @@ testObject_TeamList_team_5 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ) @@ -194,7 +193,7 @@ testObject_TeamList_team_6 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) (" ") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\1027039") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -210,7 +209,7 @@ testObject_TeamList_team_7 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\DC1") (NonBinding) & teamIconKey .~ (Nothing) ), @@ -218,7 +217,7 @@ testObject_TeamList_team_7 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ) @@ -237,7 +236,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -245,7 +244,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -253,7 +252,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ), @@ -261,7 +260,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ), @@ -269,7 +268,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -277,7 +276,7 @@ testObject_TeamList_team_9 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ) @@ -299,7 +298,7 @@ testObject_TeamList_team_12 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000200000001")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000100000000")))) ("/\38175") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("bi") (NonBinding) & teamIconKey .~ (Just "") ) @@ -318,7 +317,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -326,7 +325,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -334,7 +333,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ("") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -342,7 +341,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ("") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -350,7 +349,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000000")))) ("") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -358,7 +357,7 @@ testObject_TeamList_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -374,7 +373,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ), @@ -382,7 +381,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -390,7 +389,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Nothing) ), @@ -398,7 +397,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000100000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Just "") ), @@ -406,7 +405,7 @@ testObject_TeamList_team_15 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Nothing) ) @@ -422,7 +421,7 @@ testObject_TeamList_team_16 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000100000002")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000200000000")))) ("\170783") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("e\20069") (Binding) & teamIconKey .~ (Just "\1113463(") ) @@ -441,7 +440,7 @@ testObject_TeamList_team_18 = ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000002")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000000000000")))) ("W1") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("!") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -457,7 +456,7 @@ testObject_TeamList_team_19 = ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000200000002")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("7") (Binding) & teamIconKey .~ (Just "\189413(") ) @@ -473,7 +472,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0000-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Nothing) ), @@ -481,7 +480,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000000000000")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ), @@ -489,7 +488,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0001-0000-000000000001")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (Binding) & teamIconKey .~ (Just "") ), @@ -497,7 +496,7 @@ testObject_TeamList_team_20 = ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000000000000")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs index 8298467e0c..bb67fc2c4b 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Team_team.hs @@ -23,8 +23,7 @@ import Control.Lens ((.~)) import Data.Id (Id (Id)) import qualified Data.UUID as UUID (fromString) import Imports (Maybe (Just, Nothing), fromJust, (&)) -import Wire.API.Asset -import Wire.API.Team (Icon (..), Team, TeamBinding (Binding, NonBinding), newTeam, teamIconKey) +import Wire.API.Team (Team, TeamBinding (Binding, NonBinding), newTeam, teamIconKey) testObject_Team_team_1 :: Team testObject_Team_team_1 = @@ -32,7 +31,7 @@ testObject_Team_team_1 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000100000002")))) ("TJ\EOT") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("Jw\USTB") (Binding) & teamIconKey .~ (Just "\1040673V") ) @@ -43,7 +42,7 @@ testObject_Team_team_2 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000000000004")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000000000001")))) ("Yc\5828") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\1104693\t5") (NonBinding) & teamIconKey .~ (Just "\34417R3q") ) @@ -54,7 +53,7 @@ testObject_Team_team_3 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000000000003")))) ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000100000000")))) ("2E\1092885") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "s\1056436") ) @@ -65,7 +64,7 @@ testObject_Team_team_4 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000100000004")))) ((Id (fromJust (UUID.fromString "00000004-0000-0000-0000-000100000003")))) ("\177218\bk") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\1078494u\FSC\SOH") (NonBinding) & teamIconKey .~ (Just "X") ) @@ -76,7 +75,7 @@ testObject_Team_team_5 = ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000000000004")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000200000002")))) ("\ACK\99388\20164") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\1073797") (Binding) & teamIconKey .~ (Just "?&\ESC") ) @@ -87,7 +86,7 @@ testObject_Team_team_6 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000000-0000-0003-0000-000000000003")))) ("\1018732x\1035024]\15985") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("_'\DC1\STX") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -98,7 +97,7 @@ testObject_Team_team_7 = ((Id (fromJust (UUID.fromString "00000002-0000-0003-0000-000000000002")))) ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000400000000")))) ("\9929\1053910\1017456\&7\1059453") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("X\n|\1041562") (Binding) & teamIconKey .~ (Just "\96549") ) @@ -109,7 +108,7 @@ testObject_Team_team_8 = ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000002-0000-0003-0000-000400000001")))) ("\r\37334{\DC3\\") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\57585\1029014") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -120,7 +119,7 @@ testObject_Team_team_9 = ((Id (fromJust (UUID.fromString "00000004-0000-0002-0000-000200000003")))) ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000000000004")))) ("G[Hu{") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("d\ETXU") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -131,7 +130,7 @@ testObject_Team_team_10 = ((Id (fromJust (UUID.fromString "00000002-0000-0000-0000-000300000004")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000300000000")))) ("\1043846") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + (" ") (Binding) & teamIconKey .~ (Just "\1107305") ) @@ -142,7 +141,7 @@ testObject_Team_team_11 = ((Id (fromJust (UUID.fromString "00000002-0000-0004-0000-000300000003")))) ((Id (fromJust (UUID.fromString "00000001-0000-0001-0000-000200000003")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("b@\STX\47358") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -153,7 +152,7 @@ testObject_Team_team_12 = ((Id (fromJust (UUID.fromString "00000001-0000-0002-0000-000000000001")))) ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000200000001")))) ("yR\EOTU}") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("P\185409") (Binding) & teamIconKey .~ (Just "J\SI`\1074001\DEL") ) @@ -164,7 +163,7 @@ testObject_Team_team_13 = ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000200000002")))) ((Id (fromJust (UUID.fromString "00000003-0000-0002-0000-000200000004")))) ("E\ESC") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("") (NonBinding) & teamIconKey .~ (Nothing) ) @@ -175,7 +174,7 @@ testObject_Team_team_14 = ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000100000004")))) ((Id (fromJust (UUID.fromString "00000002-0000-0002-0000-000100000003")))) (".\27232,") - DefaultIcon + ("") (NonBinding) & teamIconKey .~ (Just "N\EM\ETX") ) @@ -186,7 +185,7 @@ testObject_Team_team_15 = ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000000000003")))) ((Id (fromJust (UUID.fromString "00000004-0000-0000-0000-000400000002")))) ("#k\NUL,;") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("yM\RS\ENQ") (Binding) & teamIconKey .~ (Just "T\f)\tR") ) @@ -197,7 +196,7 @@ testObject_Team_team_16 = ((Id (fromJust (UUID.fromString "00000000-0000-0002-0000-000200000000")))) ((Id (fromJust (UUID.fromString "00000001-0000-0000-0000-000400000004")))) ("") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("Se") (Binding) & teamIconKey .~ (Just "\SOHC") ) @@ -208,7 +207,7 @@ testObject_Team_team_17 = ((Id (fromJust (UUID.fromString "00000003-0000-0004-0000-000400000004")))) ((Id (fromJust (UUID.fromString "00000003-0000-0001-0000-000000000004")))) ("\t\b ") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("A\1029674'W") (Binding) & teamIconKey .~ (Nothing) ) @@ -219,7 +218,7 @@ testObject_Team_team_18 = ((Id (fromJust (UUID.fromString "00000002-0000-0002-0000-000200000002")))) ((Id (fromJust (UUID.fromString "00000002-0000-0001-0000-000100000002")))) ("\23385\1046442") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("_\1029329\170131") (NonBinding) & teamIconKey .~ (Just "x:\40938L") ) @@ -230,7 +229,7 @@ testObject_Team_team_19 = ((Id (fromJust (UUID.fromString "00000003-0000-0000-0000-000100000001")))) ((Id (fromJust (UUID.fromString "00000004-0000-0003-0000-000200000004")))) ("P\187859;gi") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + (")\ETB\ENQ") (Binding) & teamIconKey .~ (Just "V>A") ) @@ -241,7 +240,7 @@ testObject_Team_team_20 = ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000400000003")))) ((Id (fromJust (UUID.fromString "00000000-0000-0004-0000-000000000004")))) ("\191094c") - (Icon (AssetKeyV3 (Id (fromJust (UUID.fromString "55b9ad19-315c-4bda-8c0f-5d7b0e143008"))) AssetEternal)) + ("\1019354I\STX\ETX") (NonBinding) & teamIconKey .~ (Just "v0\1099892\&3") ) diff --git a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs index 7d735155de..cc37255a82 100644 --- a/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs +++ b/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateService_provider.hs @@ -19,12 +19,9 @@ module Test.Wire.API.Golden.Generated.UpdateService_provider where -import Data.Id (Id (Id)) import Data.Range (unsafeRange) -import qualified Data.UUID as UUID (fromString) import GHC.Exts (IsList (fromList)) -import Imports (Maybe (Just, Nothing), fromJust) -import Wire.API.Asset +import Imports (Maybe (Just, Nothing)) import Wire.API.Provider ( ServiceTag ( AudioTag, @@ -70,7 +67,7 @@ testObject_UpdateService_provider_1 = ( unsafeRange ("\a+/z\986763hI}/\DLEkB\1059760\1062810\25608\SYNYC}\135783\EM\SIa\r\43515\ETXh\ESC\17873\4008\SOHCUoR[\160369c\78378fbtV4\DC4\60971<\156071\ACKd}\DC3\164303\541\186277@\DC38|\174852\ENQg\SOH#\1058252KO|\174852\1008939\166018\FSm\a\1053371\1036429\1056854\20649;~k\GSP\NAK\ACK\175008s\1051918A\150295\ESC\NULpY\1054181\26848\EM\1078098T\1011719\992748!W\EOT\SO\152351\v]\v\ETB\98006N\1097932\143101\9071\f8]J\14943\SI\EMY\29869p\NAKvk\99744\1017040\176615\998969\STX\151238q\1035677\RS\v\1030236\&6\f\SUB\DC4\\\SOHw\DC1w[\DC3\1103346r+\983054/s\10708\995966\CAN\DC3~/\SO\1039052\1022548%F\DC4h\1000751\78726z\EOT\1015388\ETXdt-b\157874,DzM\1008898G\1039612\16538\1074902\DC2\18234\16087\&0-pE42\t:<\66329}[\ETX~lac\42511/\a\151380Z,(\\\1077666\127957GM\190643#\191090\SOH+%\1084834\STX\175168|\1007726\\\28896\EM\51660\1094971\a[\57676\1023212\1053746\f2@cczh3?`\n$\STX\1094726\EM\fN\180929z/D\179845.(]g9\3442o\STX%{w\1075429\&4m\STXF\ENQ\49942\16059\CANm\DC1\ENQ/\ESC\42264\1028339QM\991027\176346'43\36345~\t\1036026!\v\14557`qY\1088128zm\DC4fRZGvL\ETB(t\1007154\SYNswr\145599\58315%\1043578\NAK%\1082059G\1691l'\ACK\1029069\137530\170139\149719 \8297\NAK\f>@\40665\1029420\CANu\STX\143750Y\GSVj\DC2\t@O\184863\44709\&4\rf\b\1002476\r_F\DC3\NUL\47001\ETXX$#\t\1093906\ESC7\EOT\b\983099\143369\SO\ETB\EOTA\185268\159378\1015274/:N\DC3\1068202\&1D\96979\1042904 V\DLE\SUB\1087165#\20680\1005166\&8\ETB\a\DLE\RS\995866\USP\ETB\SOH7\r|L\145137R j\ESC\SOH2F>dV=\EMr?\1046227\119883\"&\DC1O\11375\SODuQL$\1032099d\US\157568` <1\\O\445\993915/H\f\r\143532Ah\1032005\ETX\162288uu.lf\1057288/1\1106120\1028078/\7411\138984`9\bq\SUB[Z`\118961eLNyTq\1048960k?{\nWg\72112\1100487\120674q\151928u-\DLE\1008080(\DLE\DC1f\127138\ETB,\rP\7088\&4V\40697\159724(7)..\70295$\n\SOH\78896\989166\92348\134295\FS\5319\47941/0\166710:\94593\SI{]$&\1074979m\1114097\&0\144077\&7)\183400b5f\SYNGyYxU):\1015140L\USQd\121515p\ESC?<\DEL7\DC4W\ESCN\45294;\a\987395\NULm\143966K\ETX\146218\51248\ETB\17306\"\987854*S{G\349r\1010831g\DC4>\NUL\SOH\97274i\NUL\NAKk\ENQK\20758r\1027971!rE\t^\78529@|h'0F'\1037224\157621\1023969\&9)\SYN^\ACKm^\STX\1078787M]\181147R\12517+\1015063^p\43086\&2AzeS\DEL`\141901\DC4\985596\182797e\ENQ\CAN\ETB\36060h=0&kp4\ETB\1023228c\999060\ENQ8$\STX\EOTk\t\CAN\173228y]M\bA\64661x(\STXV\fT\vOO=\1086015`D\1031911i*c\1010700g3\RS\998099\FS\fr\7033g\181534MX\15333\136960\43015x\1089585Rz\154544(P${\98672\DC1*~e\n\t0]z\DC3\EMY\173001\1112133g\152066!\182207@\ACKp\162647\1015149=\62520X\1013875r\65890\1025377\&3u\t\STX\SO\139037n\DC1`\42999;,\DC4\161373D.:\SOH") ), - updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete))], + updateServiceAssets = Just [(ImageAsset "\35113s\1105959" (Just AssetComplete))], updateServiceTags = Just (unsafeRange (fromList [WeatherTag])) } @@ -92,10 +89,10 @@ testObject_UpdateService_provider_2 = ), updateServiceAssets = Just - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)) + [ (ImageAsset "" (Nothing)), + (ImageAsset "\182860" (Just AssetPreview)), + (ImageAsset "#" (Just AssetPreview)), + (ImageAsset "" (Just AssetComplete)) ], updateServiceTags = Just (unsafeRange (fromList [AudioTag, EducationTag, WeatherTag])) } @@ -112,9 +109,9 @@ testObject_UpdateService_provider_3 = updateServiceDescr = Nothing, updateServiceAssets = Just - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) + [ (ImageAsset "t\100362" (Just AssetPreview)), + (ImageAsset "" (Just AssetComplete)), + (ImageAsset "\fu\US" (Just AssetPreview)) ], updateServiceTags = Just (unsafeRange (fromList [GraphicsTag])) } @@ -139,7 +136,7 @@ testObject_UpdateService_provider_4 = ( unsafeRange ("<\1090124#FE\1086106s*!\62593\DC4;\31772^WMr\1060834\&8RB\NAK\128903\1007550$\t,C\ETX0\11070\1023381\58817\27286j\\nF\175225W\1113162\&7\SO@\94549w\ENQ*g>=-m+\128253\997485JpQGB\1044309\&4\1060466\SOH!'w*M;c\ENQ\98836\1003286\&3)R\29851sZVy\DLEV\ETX\144137\US\EMJ08\DC2\\\ENQ\1081494\1001187a\1018101$\SUBt\181563\DC3f=\141465%:!\\6\172907\aES\1016438;|\67631\1046123*\32113@1p*Y;uGE\1069430e\1102664\f5\SOHWA\ENQ|\SOH\ESC\1009746\&4:*}$7]Z{/*\DC3`\STX&\155842P\t\1053171N\SYNRL&\SI\169000\USs\162298c2t\NUL\SOH)\26500\&2/rm\1051265wkD>}\1070334\NUL\DLE\128068\178727\&1%\1005755\ra\35525J\13316\19695,\1056622\nU\NAKY\1011081\1058839-#!\SYN3\190953\83058z\ESCl!`\DC3e\1102400\t}GW[P\ESC\1004676\189533[\1061401\ESCJF\21715\&9RA\1068756\"\t7[\1111740\n5\NAK~mEU<\nL|)&.Cu5T\121142 y>\9286$^\45932") ), - updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], + updateServiceAssets = Just [(ImageAsset "h" (Just AssetComplete)), (ImageAsset "\180491)p" (Nothing))], updateServiceTags = Just (unsafeRange (fromList [BooksTag, BusinessTag, SocialTag])) } @@ -155,12 +152,12 @@ testObject_UpdateService_provider_5 = updateServiceDescr = Just (unsafeRange ("\ETBI\\.z\96610\CANQaIC\1065269\32625\36609k\1091140J\SUB8/\110715")), updateServiceAssets = Just - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) + [ (ImageAsset "7_" (Just AssetComplete)), + (ImageAsset "p" (Nothing)), + (ImageAsset "\19289u9" (Just AssetComplete)), + (ImageAsset "\172627\182076*" (Nothing)), + (ImageAsset "\1014021\DLE" (Just AssetComplete)), + (ImageAsset "\1004268\52075\985717" (Just AssetPreview)) ], updateServiceTags = Just (unsafeRange (fromList [MediaTag, ShoppingTag, SportsTag])) } @@ -179,7 +176,7 @@ testObject_UpdateService_provider_6 = ( unsafeRange ("f\SI4 \1063170|\995839;T\139513E\NAK(Qp!X<#\ETBA\NULuW\44248cis\f=~C\1732\1027485N\161808S\SOH\988099;\EOT2\fA&\187694@RHN\1011941\137440\NAK42!#qAM1I\tu\120271\b\t\19488Q\ACKDi\127780tX\990666\1103592EI\SI\ESC\bK\GS\NULo\1044109k\DLE\187241\1005849Z\CANI\10594l\1044875\137688jg]\SUB\1100178\1078023 +e'u1\ao\175647e\US1\t\9732\9316\&0-d-UJTP\1092036W~\184365\&7\1098050tly\1087376\46624Ozw\tH\nW\1062958d:E\NAK@\DLE\1086957f#=\97609\&1\61954g!]\1051221\1055847pz\78590OA\1056922,\\xDL\CAN\1073075\SYNeF*s_/\f25 \1088055\EM\1053116\986882Aj5\74938\DLE\12992eDbG\SUB`\66727uW@\6764\DC32q-pq\DC2%j\ESC\EMq\993522\153753v\ESC/\1050068|\DC1,\DELw\ETX-\25497K\1048380\US\n:\98876\1102356\RS\142008\1050738 4\93016MxyOMq9~c\1082301\1028090!\RSQ\30115ql ?>\ETB\149698>(\EOT\t>\20400A\1079649/c O\59065]\ETX>}\NAK\1071442\75027\ETX\1048970%g\ESCWc\153028B\171118\ESCc!Aq\1045328a\7285\180743\155835\96854\167241\175754\46512\DLEas;\13803\1026445Z[Fs\180513*m\SI\n\DC1\t\155458ML\nX\tTD+\SO\1107343]a3\1082869&i\1000299:X\CAN\1001282s|\az-\1098006\NUL\187905\CAN\CAN/\ACK@v\150658\1010455^o\191090$+k\EOT)>\FS") ), - updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], + updateServiceAssets = Just [(ImageAsset "" (Just AssetPreview))], updateServiceTags = Just (unsafeRange (fromList [MoviesTag, NewsTag, VideoTag])) } @@ -236,12 +233,12 @@ testObject_UpdateService_provider_9 = updateServiceDescr = Nothing, updateServiceAssets = Just - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)) + [ (ImageAsset "\74850\1096630" (Just AssetPreview)), + (ImageAsset "\SO" (Just AssetPreview)), + (ImageAsset "`" (Just AssetPreview)), + (ImageAsset "N\32418$" (Just AssetComplete)), + (ImageAsset "" (Just AssetComplete)), + (ImageAsset "" (Nothing)) ], updateServiceTags = Just (unsafeRange (fromList [AudioTag, ShoppingTag])) } @@ -288,9 +285,9 @@ testObject_UpdateService_provider_11 = ), updateServiceAssets = Just - [ (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetComplete)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing)), - (ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview)) + [ (ImageAsset "\ETX\95687" (Just AssetComplete)), + (ImageAsset "\1111812" (Nothing)), + (ImageAsset "" (Just AssetPreview)) ], updateServiceTags = Just (unsafeRange (fromList [QuizTag, TutorialTag])) } @@ -309,7 +306,7 @@ testObject_UpdateService_provider_12 = ( unsafeRange ("\US\FSX;,\DC3\149563=VNF\NAK%;i\EOT\996832$k\ETBc7\SOH\143354|:d\SO\GS\RSN\10748/\"V\1021294o\DC14\1047613\54437\ESCj\SUB,\1095459}i0m\CAN\31240x_ \1049571\175311Q\1022107JiC1p/[1\\A[o\51780\FS\CAN\NUL\STX+\127172\120462w\EM=\121430dH\1004989Il(#\GSvd+\69876d\anEh\1002617\nQD\\:@{\"\ETXZ\1014379i\1053082J`&;t}zQ\DC3.\1020713Co6\NUL^vvsh\51873\\a\1051720R<\SI{\NAK;%f\144785{\"\22777\&2\140005kp\ENQ\t\ETB\1112840o\97260|@.\RSX\1052971\a>\ETXek\DLE\FS>") ), - updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], + updateServiceAssets = Just [(ImageAsset "e\987785\&4" (Just AssetPreview))], updateServiceTags = Just (unsafeRange (fromList [IntegrationTag, ProductivityTag])) } @@ -367,7 +364,7 @@ testObject_UpdateService_provider_15 = ( unsafeRange ("x\a\136203\SUB^\ESC<4\n\17873\SO>v\157431|\1020922(\185983{\US\30184A\SYN/\1034793\FS&\24692w5945i\n4\DC1+nk\118834ZSV\1011086R\996947\GS\a\CAN\ESC;D_g7T\61134NN.\1080365,\1035561\SOdPu\SUBF\"e\1071157V\1072899o\1019597\SOH\ETX\RS\1090025J\brXcs<\41273eYl)'\DC3F{wjCio\10430\EOT\DEL\66434=F\EOT\1011500\FSAe\99614\29782j\987688\RS\93035_^7\FSzLW\DEL\v9Oy&\1019281\158269=j:\161191\EOTxXF\v!\SI\DEL{\182824\CAN(q#A\f#Y\GSm\1029668\SYN\33488\1091890Q\21517\DC4N\13674bj\21932H;\55134\26121fz\183843\135947.p\147443X\SI+\22973\29225\14419\b\n\35820\1092258\ACK8\1003849\99533dUVae|'3g\STX\SOH\177742xA\190959T\1088684M\167371\&7\60761:\NUL\100886\DC3\GSs\SIyw\1063851Q_u}\SOH>\1069485\134333?\US\SUB\1106685\6158]5Z\1034719%\57389\183657_\DC4\41432^\28540qa\329\1097112/-\ACK\EOT\45370\1089284~H$\FS\9526\b\SOEVy2obJ\138789FK(\995061H[^\1088420\25954n\160665/\FS\US#\1066635db\1006679\&5?\nM\SO\44147Xs\150820\1112961\f]XR,\GS8{A0.T\ESC4\SIL\SYN\EOT\1028786\GSkX\ESCa=6\"qA7\RS\ETBG\ETXD\DEL\1100961d;\185997\EM\NAK5\DEL\1076613Qj\f'D#\v\1087346gY\110778\CAN\8773\&4P2\ETX_\1048072P+V.F9\SOH\156486-oK&\EOTo*\SYN@\174461&w\1082933\n{\b/\39070<'>\148084GFoF\25642\SOH\t]vwT{+\987769\b(mO\35465\47334xR\1099279\SOHk\120988#\DLEJ\n\1111066/R|^\SYNXj\177224(Dc\RS\64631$jM\1058526\n|_\1023319s\181256\1081025U\1077048'\144694\f\NUL\GS\179974puJ\14349 1PH\986811\147997\DC3p0%!\1096149\&8Q3Hc\DLEb3\1063888\DEL^o~\1054122&u\a1,mgg\1046750\141023'J4\r[6\45643o\FS9\SYN\1020964<\RS\31175\fa\DC2\v\1046951b^2\DC3*\DC2Y\8803&p\ETB\27260#*\DEL\41812\SO~mcH#qFe\1015266\DEL\DC4Aq\DC4(\GS[\CAN%%h3U\1013273U\1099555\131387\1019990\&4\166361Tt\43506d7Z\1059964~\984571") ), - updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Nothing))], + updateServiceAssets = Just [(ImageAsset "\SONG" (Nothing))], updateServiceTags = Just (unsafeRange (fromList [FitnessTag, TutorialTag])) } @@ -405,7 +402,7 @@ testObject_UpdateService_provider_17 = ("Y\37457\171247\NUL\1102605\19452;\40109l\1091643\1038961\164211\&3\1060552/\NUL[\STX\ETB\r\1050187\&9\SO9\SUB\NAK?yC&\1087572K\19408X\1008435Z\1043931A\FS\ETB\a\FS\1068870\&2(\FS\1081735Wh\1105128;\30117\SYN\177561\121419F'\ACK,\1008576t\b\148040\178770]Ea.Sr\STX\1021147/\1091479 O&\167108P\1051535\12083 P\fvL\1072069xTw\171454R\CAN") ), updateServiceDescr = Nothing, - updateServiceAssets = Just [(ImageAsset (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) (Just AssetPreview))], + updateServiceAssets = Just [(ImageAsset "\1032928j\92521" (Just AssetPreview))], updateServiceTags = Nothing } @@ -423,7 +420,7 @@ testObject_UpdateService_provider_18 = ( unsafeRange ("\ETX62P\SOH\DC4\1109991=\NUL8}\1103539R\1014278Y\187048\CANz-\50831t\NAK\30991:\1108518\\q5!\CANsz\986662.]\1091331}\EOT\SOHk<\1076580jo\ACK*\1006270<\1068043\v\162015'\\Ky\\d\67224Ea\186085\42476\&7\145875@3.`[\83186%\1013254\1103673\2547^o'\NAK3\DEL\f\32802\&7\155976\US\178005\182126\11804\13566\ETX<2\37455\\\EM7u\1101747\996895\1030597`\aF\DC2\1002903\1065461G\SIUMj??\1082038\163609[q\53362\STX|\STX\f\39680?\60538\US\ETB8\STX\EM\1113089\1024191\DLEZ\n#[ \1010523\RSh(\1031090\&3\142124\&1\bC?2rx7\NULjE\nU\1056190\n)4\EOT*\18936r\NAK\EM\vA\DC42TSw,\SI0\1061258\176021\&6RX\1104923KEU\99028as\DC3/\SYN5`,d\"\60033\DC3\180441y\ACKe&|\SO\USE\991388\NUL\34162\3233\SO;\DLEh,|z0\GSZPK#WSNOu𑍠jꨶE\u00026e󰊟\u000e\u001b𡂟34􃤪ꀨ󸤧8􂒦𧹈uxWꏟ􇹽Y\u0006𢥁(\u0018\u001c$D􁪲𤋤跃\u000f3􈒰#\u0016?\u0003\u00060*W3\u0006􉄿i覟h\u0015-꘡󼪝\u0006H?\\Tv􌐘퐺Q띕\u0010-@k%{=4\u001a!w&󾠃D\u0012cuT^\u0014\u001dH\u0008𡫡^]󰭄jXA󶦥𠧁@fV,OA𭋵霕F𥦖Az^g7𫘰),C󹏯}.𑰠󳏡~V􆽕󺂺(9^z󷯅𐜚3}Gj􇑫\u000cd>􉪙Y𫑵p#^􁜧L`S~􌺀\u00123\u0004𣞧怏𖩋㑪as:F\u0003", "name": "\u000ce\u0005󷀰zm𨦻6+)g;5󱬄Z 41\u0011\n\u0002\u0003%|\u0000M󳎰S=`IUK1󴿊]X\r\u001aa\u0019!𒊧+\u0003epRw\u0006\u0005#🍛􃎋󼾎󸰲UX𐔅]>i&r𡩍􁲩Z􅕍6\u0014\u0014󺁲􂠯󿅂\u001b\u0016a4\u0000􂬒󸂌𞋬\tLZ\u0006w$=\u0016u\u0003E1C'\u0005𥃔랛𠶎$𘢤􏤆9;#󿄛󷺏&\u001b󺭤k/\tu\\pk\u0000\u0002􈡶)\u001c/Lni]Q\u0000\u000fZ|=\u0011V]]\u001c5𦌻U6>(䍑'\u0018𫷞%'I1-D\"􌈿\n𓍫\npkHY#\u0000󷱔u]􇖒𣿖\u0002\u001fj'󲪯'\u0018󾛠&詄E鎪=𠾒Da\u0002\u000b􌨿=􈢭V#󲞟\u001e\u001cN#`uny󴺪􋓲53#/|,+ópW꺱i4j" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json b/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json index d2731f2252..b744f820ae 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeamUser_user_2.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "\u001a4\u0015F", "icon_key": "-\u0006v^\u0001_>p㙳\u0003\u0016\u0004\u0005୪􇯆]덀󠁰\u000f;v}q릎𮧸\u0007\u000f􏴖&~쬌<\u001d󺉸`,󼕲snਜ਼H𧆂􌯊𫉶:qNi]􀴜'󴊤#\u0007#T𩳫}󱸗\u0012󶊣M_\u001c\u0014󱘬􊤎\u0019,\u000e\u0018^]𓀫9􏧾-\u0007\u0001ID. FAp\u0004󼓃󵔴(S􀵪𐭀🡠\u0010sI\u0003e|Mv-\"q뿏zM㠌$H\u0001𡽺󵍯D]\u001a􁻕\u001b𤺴qW2\u0005􍦐\u001ey󸧓gg󸯗 /􇣧𘊟䧰~&y\u0008\u0006􈮮󿯅赦\u000e\u001c\u0016\u001et\\a.V\u000eHy8k\u001f$OʻXu/=", "name": "G\u0004\u00147󻞽bCy𔔚&5\"𗢵B$\u0002\u0012QJb_㵯􍬓Y 𦆗󾾭Y󵗂g\u000b󱿒xkJUi󻁈.=-􁡷2􏸞U\u001b]\u001a􊥙\u0010}R𦙪\u0011􏚼􋭲+R/􈥾𩮎p(M\u00055Fw<𣌅E󵢃R\u001044􂸟\u000e%@FPG󰰗JJ\u000bE\u001dz\u001e_\tb]0t_Ax}\rt􂊲h\u0013O\u0006󱽊`󽛆vm-?$!)~𥒒bh\u001e󶿅󵾖0x 􊦡􇐷+)A&mRfL􎷉\u0005􀋧>K@\u001f󵮯\u0007b\u000bPDWG,􃟨/J~)%7?aRr󱩅4*^󼭮K*󳖣\u0019\"\u000e󱍚𭠏l\n\tE𡔚󽎬\u0015\u0007\n𓆫c?\\\u0005j\"\u001bpe𘂒\u0000=\u0019>J" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json index 8171d31691..612828bf06 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_1.json @@ -1,5 +1,5 @@ { - "icon": "default", + "icon": "~c\u0004~汸Y🁉\rO奿KH􌷲:𢁄𡹌\u0000WfA\u001aj<5_𠶦mx3^Em潜\u001af􍟲\u0014Wx $゛􃡶I-􃮄NhzWDC\"􄖩\u0001􈌑I&i\u000c!;-?X舒\ro󴯋G6\u001d􆼅i􍨏#yH%f@6qb?;􅦁󴃱&wQ\u0016\u0019z𗠣c𬎿\u000cJ𬦦$U\u0016\u0004𑐹0]\u000c\u000f7󻛤𪜚\ru)\u0016\u0014\u001byL𡙤n𣋪mm`\u0011/\u0013􄨵,𤙲𘉂DX纇\u0004}\u0004\u0002􈗐𘝘vE", "icon_key": "󻚍W.\u001e틕E\u000bS_6ZzJ{'\u000c&M󻉧󳲿𤴄唂󸯡t;C󺱊'a𩟏[(X\u000f:󷫰\u000f\u001f`􆤢zK[䈙􆔗a\u000b", "name": "UivH&횊𗾉p\u001fzⷌ\r$\u0014j9P\r\"􅜃ಶ󰸀aF>E􇘗𡼡B\u0019&􉯋\u0014𪭋+'􍠒R;!\u001d󸔢\u000fvv|\rmbGHz󵚲𗍑3h𝡈\\U|'\u0003;^&G\u0018\u000cꁴ42\teq􀏗\u000eV1}\u001eaT󷧄aO7<;o𫶖\u000c􏝘m)$PC\u001b7;f{\u0002t┽>\u0004X@4|/\tH\u0005/D𣋒\u0019𝩜C𘕰Q\u0005T􋮡?d\u0006􆊎#H🈣𡽷*𨡴jo8+𩆂\n\u00005L[r7_.\u0010l1𫁝\u001f6[EhD\u001fh\u0007􋘏\u0015C𢇵,𫎢,@?y+;\u001f`/^d𡩦󲆪HeCd顴\u0013􀙬𣆗\u00052O-Hijo󶂘󿐡󷔶X}x􏡾\u00177𣫺쿢C甽\u0010`k*Gl󿙎\t𓀮󵃮\rb}\u0008\u0000芆h\u0016ynr6d(", "icon_key": "\u0004𠇱\u0017:󰚡HL\u0001^bs\u000bG𦜤{I􋥵]-J\u001c􎟗\u000bs9\u0010󴔽vI`N밟MZz", "name": "\u0008 \u0001+􁴶;\t095ꖖ\n\u00022J󴬋\u0011UzD_􏋚\u001c" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json index a52117b520..b9317a5f4b 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_11.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "r켭嚔𑪕u*33{8G􈵆aO\u001d%\u0000[󵂞U\u0005󰤫iKL\u001dNF𨀔􌈒`\u0004T$`i5𖣱\u001bŤ98>", "icon_key": "􎸃I\u0006.𦱂@y0\u0010􈛝n\\#skj󸸍Y_󽔌&x󵹳\u001d\u000fy􍩉B\u00160\u0013VP1􉓪q󺌶􈆙渳R􌨓*+\u001e,MP槄*;\n\u0015롫\t𧋏\nGj.ꅊ􍪛lㅎ\u001c~􆭊\u0000.􈧂&\u0001}\u000f􇺚\u0011+f^ZC\u0007'T\u0001\n󹏻􋹧U􎠓`W\r\\fX\n􋛆TF􎬔`h𗲐[듫ERdP5<<󺁭;\r􋣛\u0000Dy漆5N/^𡏆(\u0013󿉋􃋤6e\u000c:\u000fB\u0010F-􏂸䏱􃿵Rfb긦\u0007DrB󱌬㖬桲\u0000+2.\u0007\u0007}\u0015psFw\u0017\u0013 𭚗𥂍k~", "name": "뮅H􈒨𠓐𦡃5\u001e󰳡-\u0015\u001bR\nL戮&bD𢂤\u001aH\u001f󾈖\u000c\t;e􃴠럽\tc􉣼e􌚗\u0010\u0003I𐃒\u0017𠫼\u001a \u000fꬓ~FE\u00186𧰔돮u\"𡈄󾓋\u001cFYI\t/{\u0005\u001e]j􆸮\u001f22㸌lꕾ$\u0017\u001f𫼷kL{\u0002*𠄶RMj\u001b􊜄W3H󹇯\u001c\u0015^\"5珕缛*􌕧" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json index 175e5cdad6..2764ebff6c 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_12.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "􂾥b\u0004ch1a iuB󷁓\u001b\u0011𭱠\u0002V󿧅@1𣛸 iY\"m󽅖\u000e\\O*(\u0013𫣇w7w􍻦\u001f2ECk𘏌4\u0003ୌ%\u0004@\"k󷔜󲢼*󻶙\u0011\u001bYC?𫑘2>촘\u0016o8[\u0007V@9E􉄈⒅󸣂!k0b\t\n+6\\Ki{\u0011󰕎\u0001\u0016󽏅{0H󸕍\u0014\u0005󲕅|\u0018󹵤F鈫󷊥d󿐟\n𝈟􁣼X􁿧􁀇*\u0008C\u0012𘒓Wz􅚿鋡QWt\u0017Aj>eO}Ae\u0014\u0017\nl􃄦g\"󳗩,6K滠􁙀[󸱽󸆑N庝eB!𮇶C\u0004\u0002X#El\u0017`e 􋯾\u0006\u0003PBC􏑎fa𫬟", "name": ";𛄘M\u0004𨅁P]'󾋁􋍲ဖ􁟺iFnRQV꣦@󲚞l􌔻\u0007KZ{잴S𮦪\u000cg*\n,`!V\u0002󲇏e'󽹟\u000e0邛p4d\u0002s󹈷uK(c'컁hjB𣘹\u000et'h^\u0016\u00160󶝏_⼠𨮕thH\u000f􆅇:󹀞l; n4c􌿕D[󷩴8Y+􊬷\u0004E􂛊\\0𩅑KKTc)P1K󾠫󱸡W\u0003<|愸0|5{Y󰺓M\u0014\u000bK\u0010􉹾\u0001\u0014󷞕.\u0017g󲇥\u0010\"W\u00009&0yYZ􋍼\u000bⵖ" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json index 7c084d93b7..ec9417ccfb 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_13.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "0^􋚞7>𗅥 \u0002馏\u000fF\tAH𧑩:𨹫8䅗Q󿒛\u0010-A\u0004𦎬\u001bHOc\u000b󵺂\u00139\u0016󠅕{ \u0000]󶒐I􁗫,𧯞f\u0012􉮨q\u0001🨣GA\u001dT\u0004S\u0010MmnLy􏴕=𠀦2k󶫴\r~􂩧1! \u001bJy♜J|zgf1}ILN5󺈩Xi᪽Be.􉁉\u001e\u0016𗎂􊒧\u001e+Y;Z$\u000e5", "icon_key": "oﲕ􁂈\u000f[aoM\u001d􏉓}q躷4^\u0017-*%𤎉8􄨋`􅝘#pH}\u0013?w`A/𖼹􎩙󲼀 􍦹\nXꀛ󳡲\u0013u\u001e\u0001(󾒲󵮑6\u0002]t{\u0014\";*\rヌq􄐓⾵+w&笭(3#𬈙PY]\u001ef\\?F4\u001a\u001fT􎩣Rnfq%𐔹p𥨈𬠶j🏭0P\u0008n\u000e\u001c\t䯈\nN.aGx", "name": "G쩷𑐙rLb<􁴯!\u001e|RD𧠁\u0006𔐎𨏿눢Ag墘 \u000by`\u000b󿌣K㗃e䠣,𣘥DQEO\u001e|\u000f􆭓􃨋gr􏲼\u0000\n*1럩R\u000e𐔍-Y󽙱n􉃤]])􉉻C\u0013𣰗\"M@(K㮂\u001e1諷\u001c\u001a󺜆T?}\u000e=*𭇂\n𑄉\u000b_\"7􃹱?Lk𤪸x\u0014bu:𣸰㣱󼻩<󷼔6\u000e`􅣒U죑yp𬰚7%" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json index add730db13..690eaabb6f 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_14.json @@ -1,4 +1,4 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "(r'`􅲹Gd\u0003)u\u000cq*4􆹛󻯿i\u0019M.Ru􇜭\t𤋁􉲱m;\u000c󴞗􏿰𡃾m\u0007\t􄛑wRhv\u0007r6ﳼ\";&4\u0016X\u001d\u0016w5{%P&極98\u0003\u0002yL\t󹫣XMu(𭷐6)\u001aꓯWc闛#\u0002夺l􃳷Vy1_\u001a\\\u0018􍒠꽙Ek>󵛷\u0006]$\u0004𬘽􆰩w\r𨅛@&V8\u0007\u0010\u0011\\󶯔􁔬\u0015)X\nE)􅪟y*%1\u0015\u0012^4hKf󳅲|EY`^\u0013𪗫颕\"pX\u0008g샴>YR(W\\eS\u001d氵(bn\u0016u󴙶𦒟hꆂ\u001cG􊉫\u0010蜙a𑅱n2)󰛬\"<󻿼YUq􀉀󼱣𭦇\r7ྤ\u000b􀊑惱\r󺽸|]\u0017\u000eh9f󾻓\u0013w󴧻Y}呣1q\u0015Y:搚q \u0017=*#𒓟\u0019\\啿y9Tfc\u0011삯k􋯆\\Oxxn&6NtaZ?k:5G@딎\u0013H􋶽hu4𫩷󳈫\u001fR𧠉󺈅v服嵡𑧡㉑\u0006D󰡀[bb<􏝁" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json index ea408149f9..f5bbb69dba 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_15.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "UZ0󱶈t+𨼻ㄭk|\u0011\u0016\u0019_ch\t􊃨㌵\n\u0017\u0012,x􎅷,RE(,G\u001d\"gA\u0015ncdJ𧰏+\t􌥁FP{v=낫'e\u00029B#1􆤏\t.􉄮𢏾Ⲙ\u001cUK\u0001\u0007;\u0002􇙌𣅐7B\u001b\u0000D+󽉔􋆄`\u000e>\u001b\u0011,𩳟d\u0001(5\u0004P9iR]\u001eNws󻘌󴿔{[H🚝,5J!𡔆󼾅\u00061\u0008ZQ7fmQOQ󰹗l!\u0013꯲歔*ꪩ*1\u000c􋹍8nk|\u0015󵦮~\u000cO𧲭𘧿!:3\u0003n{%ᨇ𬦬if/!瓝] <􁶰Y􇖘\u0008\u0014~\t\u0019\u0001<*\u0015𣀥bx4 {𗟋\u0018Vs;g𘉱𣐄\u0002qkI!QJ􅲮J𮑈\u0014ﰡ?_\u0002\t􈍎iB3YdKA7@>Q󳅳󰾩]􋏴𠣍>D󺬃wD\u001b|\u000f'^𡙕𝠪Q#q,\"" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json index c0de11ca75..f248cde64c 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_16.json @@ -1,4 +1,4 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "_'C󵌷\u00049\nC𖡚f\u0007𝁅Pe🎻𭏞𠮠𘃽5􀬏m<\r}𢈳@􁅠#.􂖇\u00026%􏝅H%󻝱n\u0004Uk\u001f/\u001cpS𦓈􌄑[1np\u0006mD󷁠U\u001dI􈡦]I삽𩸦AT\u0003\u001fOl{\u0011\tYt7U +Q􆂍\u0018\u001f[\u0002JV\u0004`\u0018rF\tN𐤏𗚁𩠇\u0016𨪒*A\u0010A]4ku󴻠W􏔺홊I\u0014\u000e𗇟", "name": "r\u001e\u0017뚌𢯠7X \u0019𤸰J\u0018尹􇥏/`󳬿mg𠵮2\u000b/7cI)&\u0000\r\u0019=m$\u0013rv\u0012W:उ\u0000!:\u0005x󿅤𘆆iy𒌊\u000f\u0005>j􁋝eA󿝖\tbj\u0019k\u0011l\n󱕁H~]uꞛ󻏫!kjVS{42\u0000E?\u0019h褨B!:\u0010X\u0011T3W\u0007vimhK􇒫\u0011to*P*\u0011}󰳺􇾡H\r󼜡B" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json index 6ed4e3b484..3c5f696fac 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_17.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "~󻂃C]\u0018S7a𐙣'󶎸u\u001ee\u00148쨞圈9=𠸕\u001b\u0007'󲅋jqUiA𬏟i!\u0002Pl\u0012􃵣\\\u000b;Pq|\rUA߀D4􊤫;arv\u0007h8/\u001e\u0010𩮉PZ􍽒𮈨|O󹖾\u000c􍩄E/6\t᾿f?,x\":{q::Z橳\u0000\u0018DBd\u0001𢓾a\u0003Z􉄣0~r@F", "icon_key": "1\r4]N!\"􅦩R&\u000f1i\u000ee𪙓ygO\u00064\u000bO\u0006~𘝚\u0000𓅀b1a𗭜Q\u000c\"󿣣􀳈)􃛢*x猤C_\u0001a[*9۵𡹿N[Y􎗮r\u0019\n3􆩙.(|as 6H\u001b󿭵󹡖􏎇\u00016\u0015Bmh/\t􎧕䬴~󻴋󷼗qbRp𢳼<􋅻讷N/󽭥;\u0014l𠜂\u001d𥗂ac\u0015C\u0016\u0004U\u0000\u0013pW[#u𝨩\u001e􌑫𨁋\u0012\u001d\u001ar\u0012D#􀱀󴸥𒔭(@i󾻹𩿙𝕗DY\u0019L1\u0013|q{&􎤪󺒬1{'􄅑y𬛅E)\u0012󴔸!0kdCOX:E󱄥\\󺜙C\u001eISa65N\u0016[i\u000e\u001e\u0000#:q", "name": "|跤P\u001f󾃍𧁄Y\u0001j\u001eYrr쉏0m\u0005󺽲*'𑦢􍷘P6\u0016㮄\u000c\u0012𞢵e󻸊\u001e󺭋󴹋𑄺\rA'\u001dA\u0015툒􄨮J󸊪'T󽔣R2? \u001c\u001f󼄆$\u0015Gr(󶐡{\u00050mJ\u000fD\u0002-\u0018_I𠔎\u000c𤃑\u001cR􇮍hp𣉒B6W2\u0008\u000c6􍯣\u0012𬌆\u00081'7-T-#ཱD􆱹􈌑T]v$Gl󾛤󼉲5yg󺔀\nQc.`i㧣忚}\u001c&k4𘔫\u0006>#納󽊚\u0019𠎓[vBOPu􎯣@\u0006\u0000􉦊𤆁\u000e\u0015𘇃篖\u0004\u0003&󼂜?z󱢾i\u000cz\n󻏿\u00173\u0007􎯛W􏷕E^󾮑󶱉\u0015aR𣛯;쮷\u0001\u0019\na\nvt𠠗\u0003a𢕖 J𠸂uX􆽹?Wz&<\u0014C\u000cx`󽝑#\u000f懶邵ꩤ\u001e\u0002#\u0016\u0014-Oj\u0004d󽗌'FoHqexoh\u001ax􎋻𭉐\u0008i󳰵yr\u000f􃼯w􍥢\n8T󶋓2'󺁼􏋦􍒽\u001enxW[棁󲜚𗧓𥝏i㔕4󶌓YHZ뺃VZ\u0010^0\u0002C􂌻󽍘", "name": "𪐝|Z凅?l\u00084D乛K0#OV>󰰅S3'4\u0006𒆠*m-\u001b4\u001fj\u0003__6󿝣ᦴM믅\u001b]\u0004Dq\u0010uo浾$\u000bUWp1=/o\u0017Y𪙶9\u0012\nQ𫒥􀦝)􍉷4wa𗐋leQ*󴑞󼡨>@,󿖻𮦮RF4QcNY96𩉓􀮈G􅆔&J\\TzHUiG.C\u001a&\u001cx춈𨿱3􍳊A􁔸B)燖穲r󵌈\u0005&VCPa{\u0001\u0019Wꧬ𗰙\u0010/􇔳\u000fc:b\u0001𠒪)襈􌫒鉲@5󰊈I02g%%1bJl} :󹙳\u0016署𦲖𢻉", "name": ";𭏚@m\u0008Z󹔛1}\r9\u001e)\u0000𧷛􃫣𗖻\u0001,q\u0001`􀣞P󱉭􅁌\n\u0004Im􄠱\u0014󷜳􆢃HB\u001d`󹫇𢴱U𧩣G\u0013m+Lw\u0010󹾧\"0𝍉?-T\u001b\u0003j\u0013|Lq\u0003.𘋘hgq\u001by𘒇5\u0007y\u0006􏚅w^(\u0017+𪻾3\u000c𛰿x󶅕i*E\u0013𫹺rTM\u0018􊶥$𧐐𮣞\u0004\\p􁇚1\u0007𠀗􀠺zv󼞙\u0019rj\u0007󾭒u\u0015n\u000e𨆖6\u001bs\u001dm9Y\u001c%\u0010?6󽯧\u0002\u000c􃩾)RST\r\u0010􎑠\u0011􇓹h\nTS\u0012\u001f􋻇\u0002n\u001b𤦦r2𒂷󰕫hrr-$*j􏇺觹]@󵅝㪱J\u0008\"8N𐬼e,\"br\u0001\u0000𦱘+멦c^󴾍<`􏛇𤙄\u0002󰷙\u0003𧥛D\u0005皔nqp􋝳󱓐c\u001et􇿧G" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json index 8e455519f4..8fa459aa87 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_3.json @@ -1,5 +1,5 @@ { - "icon": "3-5-3d4b563b-016c-49da-bad2-876ad0a5ecd2", + "icon": ":b6𘍗L􁠹K<􎦯𗋵C^\u000eY8LuXS𦏱F\u0001\u0017썁󹲗\u001f󾥞J]\u0017A2R$P6\\\u0005𩆊-J\u0000t\u000f󿫯*󻣠r􇍈M\u0015PL)𗈟\u001aJ𑱚S􍜑~'kRYj𑘞{P{V\u0001!󰱿Y~\u000bV\t𤰂{5%i[$7X:ZV\u0000y\u0007삉\u0016\u0005\u000c;!k?O󻚧􈒉K:}􋴳𪤷#>\\|(n\u0002𨟼\u0003D𤨬쮝{|𥃇󱄮+᭮J", "icon_key": "\u001c\u001eP󱖗Gt\u0016-렬nJ󶲘g^\n\r𫙿\u001dR󶦍􇜁𒎌t\n)1/% hL\u0012Ad\u0001Xq6\u0011)\u0000\u000c6\u000cV\u0014r􋶨\u0011n􎖟,@𩳑𝃔\n\u001a%N𫊸\u0006葀Xv)\u0016z?\u0014\u0019Y𧤂2𗘰um8}죜\u0012yW\u0000HQ\u0005D[Fe\nk󳻂\u0019懷Yk@##u}j𩝺𥛾\u0002q\u001bir7) 汬%󸄨~󲪳8􉈠je􌟌0*Gi3𝟽je\u0018Qr>󼕣k1爛c󻶢L󷴬𖺉t\u0004W󳿃\u001ao\u000cgh\u0006𪀙C2霩c\u001a)uW\r\u000cB󾧾Sf\u001a\u0001*5l隺\u000f文\u0019B(\u0005𠩾/)!{󵬬9\u0002A㻍fx&𫽹T&𭪕\u0014쯾[\r\u000b\n􅢉j2𨤤/􉑰\u0005Qo\u000cj𠵠🤐\nb6\u00183\u001e9\u0019󴊖ub\u00173CY\u001dsIz" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json index 8cfe6417c0..4ed974f0ca 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_4.json @@ -1,4 +1,4 @@ { - "icon": "3-5-18fef3b3-323c-4c27-bb62-6026d62f77c3", + "icon": "tmIV󳻵3􌹙󿽑HKE{􆭢R9\u0004\u0017E2𐭐L󶢉|a\u0008|Cꊁ􁢣}\u001d󻱜\u0018O9$)\u0000\u0002𥙒肷\u0000쑰K󿉉􂇠d懛\u001d\u000bq󺖧B\u0003\u0007T\u000ePtY\u0015󿫵潌z#k`P􂀖\u0002_7LXC]`#-`\u0006ࢺ\u0012pw59\n\u001a\u0010jꍃ𭈉F\u0017􅪽\t;\u0012r*圮\u0019S𬤻E8e\u001cx􊞎A\u001a|j\u0007d\u00100RDI\rQ\u0015`􅰜\u0019)j{􃚂𢸬􌥩f@\t\u0011\u000c\"\u000c󾵭􌛋􍼕ᢞJ`.𛁓*\u0008F%4󶟬\u0019-3g𘟴􍙴􍀉\u0002\n\u0010\u0013]s𫫟_\u0007󾒾𧯔\u0012\u000bȃ\u0010㳼v|\u0008􀻧%𨙤g~0\u0004Wp\t 𪒺C\u001c𤥂x\u0005\u0006\u0012-DIYa󵌭:𮔿'{􈚁𣃢󾕜6Ḋ󴋄=xfo\u0006U'\u0014􍊅t\n\u0012􋝛6𝋯/􍚳tR\u0016#􎽉", "name": "\u0003󵳮k;" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json index d7f0bc88c3..ed2cc6465c 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_5.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "![\u000181潅󰋙䘎𤗈𧗎\u001b􀷘\u0007\u0018\u0004}r􍅵\u001bt𫞣𪐝􎟩繤𥞓M󲷤1\u0018$;\r\u0002\u000e\u0003P\u00193)R=E?9\u0010$>*\\`鞀\u0013\u0007]𣔼󹓭{FKA\u0008􍄸𫨟\u0013\u001f=UC𫷵KQb􁡺󷼩\u001cX7@󳌔C~-[Db $cx\u0003Czvq ,g\rD󻿪", "icon_key": "s𡜶:\u001fdm㒛\u0015I⸈Y􅌌𬜈􋪠>q󱙒\nQ\u001e􁔾\u001d#w𤇠𩻗􃿿𡖭B\u0014\u001aLv\"S>𝤅!]sB+6\u0011oc\u00177蛑lR𗙺\u0019r%E􇋯B𘆔A􄡥N\u0017?{􄈤/|cU𢟋]𖫠􍇌\u0010𣾄􆣶+󲃎\t$F𗧊he4𨰴|k/!5Z~𔔮\u0017󸛵\u0001\u0005􂃝3E!{^茖4fh󻗈N􏚙v\u000c\u001d󳪍mde!5󺻟y&􃔋xo,\u0002rk􅨸\u0005\u0001JoS󰹇X䧱󲸿a󱽇\u001e󿘄\u0019\u00013j༽Z4\u0014􄸣l컬n\u001b@ve#\u0016\u001d𬴣P4􇀲\u001b𩣣:𦠊z1*\u001fs\u000bd`􂬥/餄𨜲", "name": "\u000fB𑋐3𦩜\\#􃅻I\u001fK󹶘h\u0010\u0013\u001e𠻊*󳵆L\u0002w1p\"4\u0004𮉃#u𣖞\u0016\u001c鄂ꊙ$Ÿwu𪞴넣󶏴\u001a\u0007)\u0012?T 솆8馿.\t\u00151\u000c\u0004Y🙉%މﭸ㮲 &Z4􈼌\u0000@\u0001\u0019𥯩􇐟􌑣xtj𬦽`\u0001r\r𖾒\u00040\u0019\u0000Lyc D\u001c􈺓􁣾)\u001a-\u000e􈼌\u000bl󰔐􏿡\u0018𭨼f\u000frb/[F\u0000􌣆<1󺼰P\u001dxl\"!11E\u001b0\u001b\u000c$u􊼽N\u001dV^󸗡q𩪫\n`󿮐𧶴:iLXn\u0018󱜞朻O}8!Y\u0015,^X咽hEa\u0010^\u0005\u0008]`􏭴<\u001dZG󵉂\u0001𮞘廑*8p\u001cF@OLpnXTmW𗤩f𐨎􆮍敢Ze1 \u0016Em汵f\u0006󱀇", "name": "v𭺬hEWefuu󵳔jPx𦦹k#\u0001󰹥\u0002\u0003^\u001b\n\u0018₅p1D|S1􄀟􍄚熗\u0016`\t0g󼣥,t\u001cw\u000cDT\u001e#H\u0001𣜘\u001f{􊞫󺙲󰔬lW\u0007,uil\u000fN`5e:\u0016 Y!\u0016󺑛tb􈼝" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json index 65f8d616ff..a03c29a624 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_7.json @@ -1,5 +1,5 @@ { - "icon": "3-1-b199431c-e2ee-48c6-8f1b-56726626b493", + "icon": "_5勞\u0007Q􎲫W⃛9ꮦ*󴽳", "icon_key": "D\u001e𩉨\u0001󼓤🚱Ll\u001d\tW􂂹o\u0018멤b\u0003|\u001f*=󶶐􄖘󱓧6󴆄", "name": "𣢐󾧌iz􂒳FT㩴;􎦑}𮇵􏵿9\u000e󲆑7>hAC\u0000H2O𫑫m𭴿2R(?W,=,󱸅M󲓈\u0007M椔\u001a맰q\u000elj\u0004j^.s~\rY%5lM,杼=\u0006󸑃𮆫>{\u0018\u0010㸆f=X9\u00169쟉𦺻TI4䒿\u000b\u00156󷲘/\u0010\u0015\u0006尌H<\u0005󻙇e\u0005z󸚸:៹\"rS\u0007𨻬\u001c\u0003􂧙󻹪뽴\u0014\u0014Q\"􄃰1:􋽔\u001fT.;󾣧䟌}" } diff --git a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json index 3a3f84deee..79c17c026b 100644 --- a/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json +++ b/libs/wire-api/test/golden/testObject_BindingNewTeam_team_8.json @@ -1,5 +1,5 @@ { - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "✅IT\u001e􍑦뾖%mE󰤊􀩈M\u0007:[fgw\u001b?ye𑇐􋱯K\u0017l􁜛󷔒󽎻Qg?𤼃{\u000c!uXA}H)v$𧋓􊷪mGkC9􈸥\u001d􊲊󼫰1DH𨩌sꕂ7[.𭹆v+􊥆O^SGjv􅇮Y󴺥n𥬜Z𓈋\u000e{􂺫Q\u0003\u001e1I\u001c5\u0006󼻌􈥆󻳺_􍽩?gDႽ\u000cg㪠:g\u001c.J<\u0012\u0017󸋤}/𗹵OBLa􀳘\u0007{󶷱-􃾛\u000b\u000f\u0010𣥐V \\Ns0t􈃙frR!Qe!$𢌢󶀅\u0016$􇋮!SZ􁀀𭃻a\u0010B3", "icon_key": "v𑈬땻h\u0001_󲋫\u0013\u0006i󴋤\u0011\u0003W𑱑譟\u0012嫢󺥖\u0004\u000c%_􃹩\u001d\u0016\u0017 N\u0000F󵞛\u0005LUua3􉻐M↝\"𗊟\u0001\u001e\n-='\u0011B#\u001c𡚱>\u0013𠓴\u000f\u001d􉩪G7v6w Zቆ􀦮𬥤𩬵\u001bP>𠀧􀫷􆷹\u000b}?ᓄJg\u0001\u001a^pl􌽧2.\u000eV\u0013坣ﯽ\u0005B󿏻􆷽𢃤<\u000c2䬴Tz@6\u0013𑢫x?𤪑週\u0008\u0010\u0018p􈃰\u0016\u0003N􌠀C\u000f\u001a\u0011l]R\u0000vL󺵶Nz\u000c-bf}f>\u0002H\u0019𡔤+Zo󴈣6𢓖󽱓重󸒝|`dN 擦󱈠i_􁮱p󼐑J斐ngp@#􍼃A󱖱7l{;𬁛g4EX넌\u001b􄳆𤺴#z𫂓\u0016y\u0004\tG\\謖坴#s󵘆Ad􋓔Obh󶑡\u0012􉑳)3R\u001a\u001c𗳩aw]􆞷󽰤ფ𝂦kC梿\u0001󴶁󵢐d8둥\u0011\u0016ﰺf9", "icon_key": "X󸸽;\u0005W\u0006Lk󳌎𣔖\u0017\n][~⠨&U亝v`I\u0017\u001fl󰉫\t􊋾?䍋KM3c􄨽󻧳= \u0017t5vKOg\u0015/NC2~i'􃝴Ojb\u0008\u0003􊇳\u0011\u0001\u0000FWc󷭕sU>P\u0001~\u0019wUHU\u000e#훞􈅯!Nwn󵠡e\u0001\u001a\u000c\u0003\u0017Tl𛀥BYU;a󷋠K7?,m𥪤Xpa뺹𡰽\u0019 ,M!~^g6}(踑\u001eᾋgX}𧓻)c\n\u00012E", "name": "\u000eLN\u001dr𣎸􅜗k𬙅#𥙝lTD[Jh\u0001󻕋蕠6󼧒􃟠\u0015}\u0007db𩵜-\\-1\u00142󿝈\u0012𓐮1/脼b:\u0005󽩦;Mw\u001c𬸺􏷋ITuy􀚘`SP\u0001\u000e\u001d\u0015\u0007\r7M􅄎􃳖䢷\n\u00163V\u0003R\n1$e.􋩅B~yd_z󿴉\rV􊜗\u001e\u0016𨒺l\u0013론u􂝲u\"\u0007Tc|sEw󶷶wTC|FቿB\t\u0014&\u0008UEN(+M\u000eF;􌟢𠶭\u001920\nrPW󸓢$􃽩" } diff --git a/libs/wire-api/test/golden/testObject_Event_team_1.json b/libs/wire-api/test/golden/testObject_Event_team_1.json index 05172b99c6..8cbbc5ac0e 100644 --- a/libs/wire-api/test/golden/testObject_Event_team_1.json +++ b/libs/wire-api/test/golden/testObject_Event_team_1.json @@ -2,7 +2,7 @@ "data": { "binding": true, "creator": "00000003-0000-0001-0000-000300000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "#𖺗匞(󳡭", "id": "00000003-0000-0004-0000-000000000001", "name": "\u0004X󳒌h" }, diff --git a/libs/wire-api/test/golden/testObject_Event_team_13.json b/libs/wire-api/test/golden/testObject_Event_team_13.json index 5c1522c9c1..587d5713db 100644 --- a/libs/wire-api/test/golden/testObject_Event_team_13.json +++ b/libs/wire-api/test/golden/testObject_Event_team_13.json @@ -2,7 +2,7 @@ "data": { "binding": false, "creator": "00000000-0000-0002-0000-000400000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "\u0008􆿱", "icon_key": ",7\u0007S", "id": "00000002-0000-0003-0000-000200000001", "name": "\u0008h0󺴴" diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json index 97834f65c1..8c206d3e0e 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_10.json @@ -2,7 +2,7 @@ "accent_id": -5, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json index 3f8a4222ac..10c2c3e593 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_13.json @@ -2,30 +2,30 @@ "accent_id": -6, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u0010k", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "/", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "呬𮀉", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u000c􇀊E", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json index 06779bb383..490d590585 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_16.json @@ -2,7 +2,12 @@ "accent_id": -5, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\"吝󿳖", + "size": "complete", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json index bd39b09311..e2c845c07f 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_18.json @@ -2,17 +2,17 @@ "accent_id": 8, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u001c", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𖫳󰑑", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json index d69befdcbc..779f6e45c7 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_19.json @@ -1,27 +1,27 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𦳝\u0011", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\t", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "V#", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "(\u0003", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json index eb75d9b63d..8da98068cc 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_2.json @@ -1,22 +1,22 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "C#􁹦", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u0014\n", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "V", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "Y+_", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json index 0a7b710fff..aa68bf9709 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_20.json @@ -1,17 +1,17 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\"", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "􆵛d", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "8", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json index 7d833c7537..e7dc04b548 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_3.json @@ -2,16 +2,16 @@ "accent_id": 0, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "'\u0012", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "`", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "?􈯅\u001b", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json index fc11374d34..161483bf34 100644 --- a/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json +++ b/libs/wire-api/test/golden/testObject_NewBotResponse_provider_8.json @@ -1,21 +1,21 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "ᘻ~", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "i𗳫", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\\", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "%o", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_10.json b/libs/wire-api/test/golden/testObject_NewService_provider_10.json index 88656b0eb3..7164b7e67e 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_10.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_10.json @@ -1,7 +1,16 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "complete", + "type": "image" + }, + { + "key": "", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_11.json b/libs/wire-api/test/golden/testObject_NewService_provider_11.json index 2a6646e785..b819e5500a 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_11.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_11.json @@ -1,7 +1,16 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "type": "image" + }, + { + "key": "", + "size": "preview", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_12.json b/libs/wire-api/test/golden/testObject_NewService_provider_12.json index 77d144457f..9b31888d42 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_12.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_12.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_13.json b/libs/wire-api/test/golden/testObject_NewService_provider_13.json index 1ecdd4e474..0c81a7abb8 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_13.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_13.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "g", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_14.json b/libs/wire-api/test/golden/testObject_NewService_provider_14.json index 54a58187f3..842bfede2f 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_14.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_14.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_15.json b/libs/wire-api/test/golden/testObject_NewService_provider_15.json index fc9655b8ca..8f4761c8d7 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_15.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_15.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "complete", + "type": "image" + }, + { + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_16.json b/libs/wire-api/test/golden/testObject_NewService_provider_16.json index b1ae02f07c..1edf7e274d 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_16.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_16.json @@ -1,21 +1,21 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_18.json b/libs/wire-api/test/golden/testObject_NewService_provider_18.json index 3b3d9dbc07..03ec6a44e2 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_18.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_18.json @@ -1,7 +1,15 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "type": "image" + }, + { + "key": "", + "type": "image" + }, + { + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_19.json b/libs/wire-api/test/golden/testObject_NewService_provider_19.json index 710d35140c..05a1aab261 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_19.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_19.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_20.json b/libs/wire-api/test/golden/testObject_NewService_provider_20.json index 7305469136..b01417adb1 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_20.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_20.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_4.json b/libs/wire-api/test/golden/testObject_NewService_provider_4.json index a992cbef58..5ab941b4e1 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_4.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_4.json @@ -1,7 +1,17 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "complete", + "type": "image" + }, + { + "key": "", + "size": "preview", + "type": "image" + }, + { + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_5.json b/libs/wire-api/test/golden/testObject_NewService_provider_5.json index c3f5c2c30b..38ea4547e3 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_5.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_5.json @@ -1,31 +1,31 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_6.json b/libs/wire-api/test/golden/testObject_NewService_provider_6.json index 7ed1a9376b..3371cc4502 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_6.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_6.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_7.json b/libs/wire-api/test/golden/testObject_NewService_provider_7.json index 784130b735..7b607c7813 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_7.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_7.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u0006", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewService_provider_8.json b/libs/wire-api/test/golden/testObject_NewService_provider_8.json index dc5ccf6a38..ad7c718ad3 100644 --- a/libs/wire-api/test/golden/testObject_NewService_provider_8.json +++ b/libs/wire-api/test/golden/testObject_NewService_provider_8.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "preview", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json b/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json index f4c138be25..536556b965 100644 --- a/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json +++ b/libs/wire-api/test/golden/testObject_NewUserPublic_user_1.json @@ -2,16 +2,16 @@ "accent_id": 39125, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "(󼊊\u001bp󳢼u]'􅄻", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "􁿐f", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_NewUser_user_1.json b/libs/wire-api/test/golden/testObject_NewUser_user_1.json index 975b72224b..6fb028d395 100644 --- a/libs/wire-api/test/golden/testObject_NewUser_user_1.json +++ b/libs/wire-api/test/golden/testObject_NewUser_user_1.json @@ -2,17 +2,17 @@ "accent_id": -7404, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "ᏸ5\u0014󸾲𗓰`\u0007\u001aG{?", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "something", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "KE", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_NewUser_user_7.json b/libs/wire-api/test/golden/testObject_NewUser_user_7.json index 291e71c640..a778929fa9 100644 --- a/libs/wire-api/test/golden/testObject_NewUser_user_7.json +++ b/libs/wire-api/test/golden/testObject_NewUser_user_7.json @@ -5,7 +5,7 @@ "phone": "+12345678", "team": { "currency": "XUA", - "icon": "default", + "icon": "Coq쳋\u000b𬟀", "icon_key": "\u0006c𥁱L ,", "name": "\u000ce\u0005󷀰zm" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json b/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json index 7ab7a1a898..5de6225d15 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfilePage_provider_11.json @@ -4,7 +4,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json index 163fe34538..f489283e9e 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_1.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u001b", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json index 80a10f4937..d7a7914049 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_10.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "preview", + "type": "image" + }, + { + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json index 7947806036..7d4a6540b9 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_13.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "B", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json index 0c42a0a0b7..40320f66c4 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_15.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "*", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json index 3c3c435f0f..0939bdefb0 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_16.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "preview", + "type": "image" + }, + { + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json index 62ecef784b..add0873515 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_17.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "complete", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json index eccf6c18d4..c4f71c210a 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_2.json @@ -1,22 +1,22 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json index bf3d110ee5..5aea13d240 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_3.json @@ -1,7 +1,11 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "type": "image" + }, + { + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json index 62ec6cb9e7..20897d0722 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_4.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "1", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json index 2a9ce8c82b..06d9b7c11d 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_6.json @@ -1,25 +1,25 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json index 282f807626..ccbb904285 100644 --- a/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json +++ b/libs/wire-api/test/golden/testObject_ServiceProfile_provider_9.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u0011", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_Service_provider_11.json b/libs/wire-api/test/golden/testObject_Service_provider_11.json index 24237ec49e..a6f0e648e7 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_11.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_11.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "complete", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_12.json b/libs/wire-api/test/golden/testObject_Service_provider_12.json index 275a1c0f8c..4de5b9715e 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_12.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_12.json @@ -1,17 +1,17 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_13.json b/libs/wire-api/test/golden/testObject_Service_provider_13.json index 1662fda812..7259671be2 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_13.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_13.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_14.json b/libs/wire-api/test/golden/testObject_Service_provider_14.json index 533ab46312..d3e8f5e933 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_14.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_14.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "A", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_15.json b/libs/wire-api/test/golden/testObject_Service_provider_15.json index 11b50f74dd..113b41b921 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_15.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_15.json @@ -1,35 +1,35 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_16.json b/libs/wire-api/test/golden/testObject_Service_provider_16.json index 2968134faa..8013b05027 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_16.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_16.json @@ -1,7 +1,11 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_2.json b/libs/wire-api/test/golden/testObject_Service_provider_2.json index 8463539f0e..a129126c8e 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_2.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_2.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", + "size": "complete", + "type": "image" + }, + { + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_4.json b/libs/wire-api/test/golden/testObject_Service_provider_4.json index 8e3c74622d..b227bc0a2a 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_4.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_4.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_6.json b/libs/wire-api/test/golden/testObject_Service_provider_6.json index ea1d4c176e..ef2d363e95 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_6.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_6.json @@ -1,26 +1,26 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_Service_provider_7.json b/libs/wire-api/test/golden/testObject_Service_provider_7.json index 3a434d7610..5c3fdd8cd0 100644 --- a/libs/wire-api/test/golden/testObject_Service_provider_7.json +++ b/libs/wire-api/test/golden/testObject_Service_provider_7.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_1.json b/libs/wire-api/test/golden/testObject_TeamList_team_1.json index bff30e166e..9253c096fd 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_1.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_1.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0001-0000-000000000000", "name": "" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000000000001", - "icon": "default", + "icon": "", "icon_key": "", "id": "00000001-0000-0001-0000-000100000000", "name": "" @@ -20,7 +20,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_12.json b/libs/wire-api/test/golden/testObject_TeamList_team_12.json index c7d736fbd4..ed1c32bbfd 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_12.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_12.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000002-0000-0000-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "bi", "icon_key": "", "id": "00000000-0000-0002-0000-000200000001", "name": "/锟" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_14.json b/libs/wire-api/test/golden/testObject_TeamList_team_14.json index 7a2e8a767d..88c4fec277 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_14.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_14.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "default", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000100000001", "name": "" @@ -20,7 +20,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000001", - "icon": "default", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000000000001", "name": "" @@ -28,7 +28,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000001", - "icon": "default", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000100000000", "name": "" @@ -36,7 +36,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000000", - "icon": "default", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000100000001", "name": "" @@ -44,7 +44,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_15.json b/libs/wire-api/test/golden/testObject_TeamList_team_15.json index 28c5a4b1e0..6596778c10 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_15.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_15.json @@ -4,14 +4,14 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0001-0000-000000000000", "name": "" }, { "binding": false, "creator": "00000000-0000-0000-0000-000100000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" @@ -19,14 +19,14 @@ { "binding": true, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000000-0000-0001-0000-000100000000", "name": "" }, { "binding": false, "creator": "00000000-0000-0000-0000-000100000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" @@ -34,7 +34,7 @@ { "binding": true, "creator": "00000001-0000-0000-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0001-0000-000000000001", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_16.json b/libs/wire-api/test/golden/testObject_TeamList_team_16.json index 3fdaa492cc..0cf64604e2 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_16.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_16.json @@ -4,7 +4,7 @@ { "binding": true, "creator": "00000002-0000-0000-0000-000200000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "e乥", "icon_key": "􏵷(", "id": "00000001-0000-0001-0000-000100000002", "name": "𩬟" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_18.json b/libs/wire-api/test/golden/testObject_TeamList_team_18.json index eb3fcc2253..c6c3509963 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_18.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_18.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000002-0000-0000-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "!", "id": "00000000-0000-0000-0000-000000000002", "name": "W1" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_19.json b/libs/wire-api/test/golden/testObject_TeamList_team_19.json index 84fbbb6ecf..0a14a86311 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_19.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_19.json @@ -4,7 +4,7 @@ { "binding": true, "creator": "00000001-0000-0001-0000-000200000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "7", "icon_key": "𮏥(", "id": "00000001-0000-0002-0000-000200000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_2.json b/libs/wire-api/test/golden/testObject_TeamList_team_2.json index 2c6a45a51a..d9bbcfc9d9 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_2.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_2.json @@ -4,7 +4,7 @@ { "binding": true, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "default", + "icon": "𪤬", "icon_key": "@", "id": "00000000-0000-0001-0000-000100000000", "name": "7" @@ -12,7 +12,7 @@ { "binding": true, "creator": "00000000-0000-0000-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_20.json b/libs/wire-api/test/golden/testObject_TeamList_team_20.json index 50abbb7358..d2d074718a 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_20.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_20.json @@ -4,14 +4,14 @@ { "binding": true, "creator": "00000000-0000-0000-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0001-0000-000000000000", "name": "" }, { "binding": true, "creator": "00000000-0000-0001-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" @@ -19,7 +19,7 @@ { "binding": true, "creator": "00000000-0000-0001-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" @@ -27,7 +27,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0001-0000-000000000001", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_3.json b/libs/wire-api/test/golden/testObject_TeamList_team_3.json index 0596d30a2b..93425d1739 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_3.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_3.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0002-0000-000200000000", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_4.json b/libs/wire-api/test/golden/testObject_TeamList_team_4.json index bfd1d2ba4d..ee8f255d4c 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_4.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_4.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0001-0000-000100000001", "name": "􄃌" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000100000001", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_5.json b/libs/wire-api/test/golden/testObject_TeamList_team_5.json index d3d0eb0e8d..5c31ced6d5 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_5.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_5.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000000-0000-0001-0000-000100000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000000000001", "name": "" @@ -12,7 +12,7 @@ { "binding": true, "creator": "00000001-0000-0001-0000-000100000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" @@ -20,7 +20,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -28,7 +28,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -36,7 +36,7 @@ { "binding": true, "creator": "00000000-0000-0000-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0000-0000-000100000001", "name": "" @@ -44,14 +44,14 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" }, { "binding": false, "creator": "00000001-0000-0000-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0001-0000-000100000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_6.json b/libs/wire-api/test/golden/testObject_TeamList_team_6.json index 7509a92e1d..de67b8024a 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_6.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_6.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "󺯟", "id": "00000000-0000-0001-0000-000000000000", "name": " " } diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_7.json b/libs/wire-api/test/golden/testObject_TeamList_team_7.json index ec65a7d303..7a6e537de3 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_7.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_7.json @@ -4,14 +4,14 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000100000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "\u0011", "id": "00000001-0000-0000-0000-000000000001", "name": "" }, { "binding": true, "creator": "00000000-0000-0001-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" diff --git a/libs/wire-api/test/golden/testObject_TeamList_team_9.json b/libs/wire-api/test/golden/testObject_TeamList_team_9.json index 8ed2ea75d4..da14cb80b1 100644 --- a/libs/wire-api/test/golden/testObject_TeamList_team_9.json +++ b/libs/wire-api/test/golden/testObject_TeamList_team_9.json @@ -4,7 +4,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000000000000", "name": "" @@ -12,7 +12,7 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000100000000", "name": "" @@ -20,14 +20,14 @@ { "binding": false, "creator": "00000001-0000-0000-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" }, { "binding": true, "creator": "00000000-0000-0000-0000-000100000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0000-0000-000100000000", "name": "" @@ -35,7 +35,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000000000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000001-0000-0000-0000-000000000000", "name": "" @@ -43,7 +43,7 @@ { "binding": false, "creator": "00000000-0000-0000-0000-000100000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "icon_key": "", "id": "00000000-0000-0001-0000-000100000001", "name": "" diff --git a/libs/wire-api/test/golden/testObject_Team_team_1.json b/libs/wire-api/test/golden/testObject_Team_team_1.json index 886e64a3a0..1e19543ce8 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_1.json +++ b/libs/wire-api/test/golden/testObject_Team_team_1.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000003-0000-0001-0000-000100000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "Jw\u001fTB", "icon_key": "󾄡V", "id": "00000004-0000-0003-0000-000200000000", "name": "TJ\u0004" diff --git a/libs/wire-api/test/golden/testObject_Team_team_10.json b/libs/wire-api/test/golden/testObject_Team_team_10.json index d92c6611cb..140e0689a6 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_10.json +++ b/libs/wire-api/test/golden/testObject_Team_team_10.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000000-0000-0004-0000-000300000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": " ", "icon_key": "􎕩", "id": "00000002-0000-0000-0000-000300000004", "name": "󾶆" diff --git a/libs/wire-api/test/golden/testObject_Team_team_11.json b/libs/wire-api/test/golden/testObject_Team_team_11.json index 7ef218c4dd..a1d1d1b497 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_11.json +++ b/libs/wire-api/test/golden/testObject_Team_team_11.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000001-0000-0001-0000-000200000003", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "b@\u0002룾", "id": "00000002-0000-0004-0000-000300000003", "name": "" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_12.json b/libs/wire-api/test/golden/testObject_Team_team_12.json index 6e5c098936..442197f003 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_12.json +++ b/libs/wire-api/test/golden/testObject_Team_team_12.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000003-0000-0001-0000-000200000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "P𭑁", "icon_key": "J\u000f`􆍑", "id": "00000001-0000-0002-0000-000000000001", "name": "yR\u0004U}" diff --git a/libs/wire-api/test/golden/testObject_Team_team_13.json b/libs/wire-api/test/golden/testObject_Team_team_13.json index 399fdb7610..61098e5eb8 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_13.json +++ b/libs/wire-api/test/golden/testObject_Team_team_13.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000003-0000-0002-0000-000200000004", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "", "id": "00000001-0000-0000-0000-000200000002", "name": "E\u001b" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_14.json b/libs/wire-api/test/golden/testObject_Team_team_14.json index 9129fb0aca..94c180ac81 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_14.json +++ b/libs/wire-api/test/golden/testObject_Team_team_14.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0002-0000-000100000003", - "icon": "default", + "icon": "", "icon_key": "N\u0019\u0003", "id": "00000000-0000-0004-0000-000100000004", "name": ".橠," diff --git a/libs/wire-api/test/golden/testObject_Team_team_15.json b/libs/wire-api/test/golden/testObject_Team_team_15.json index 8aa916bd06..a2f8c40498 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_15.json +++ b/libs/wire-api/test/golden/testObject_Team_team_15.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000004-0000-0000-0000-000400000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "yM\u001e\u0005", "icon_key": "T\u000c)\tR", "id": "00000003-0000-0004-0000-000000000003", "name": "#k\u0000,;" diff --git a/libs/wire-api/test/golden/testObject_Team_team_16.json b/libs/wire-api/test/golden/testObject_Team_team_16.json index d9aa2cc530..d67c357b64 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_16.json +++ b/libs/wire-api/test/golden/testObject_Team_team_16.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000001-0000-0000-0000-000400000004", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "Se", "icon_key": "\u0001C", "id": "00000000-0000-0002-0000-000200000000", "name": "" diff --git a/libs/wire-api/test/golden/testObject_Team_team_17.json b/libs/wire-api/test/golden/testObject_Team_team_17.json index 42db147e83..7cbd2e7cb3 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_17.json +++ b/libs/wire-api/test/golden/testObject_Team_team_17.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000003-0000-0001-0000-000000000004", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "A󻘪'W", "id": "00000003-0000-0004-0000-000400000004", "name": "\t\u0008 " } diff --git a/libs/wire-api/test/golden/testObject_Team_team_18.json b/libs/wire-api/test/golden/testObject_Team_team_18.json index e79f9d8fac..bd9e0f25a8 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_18.json +++ b/libs/wire-api/test/golden/testObject_Team_team_18.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0001-0000-000100000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "_󻓑𩢓", "icon_key": "x:鿪L", "id": "00000002-0000-0002-0000-000200000002", "name": "孙󿞪" diff --git a/libs/wire-api/test/golden/testObject_Team_team_19.json b/libs/wire-api/test/golden/testObject_Team_team_19.json index 39c23c6290..5faec888a3 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_19.json +++ b/libs/wire-api/test/golden/testObject_Team_team_19.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000004-0000-0003-0000-000200000004", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": ")\u0017\u0005", "icon_key": "V>A", "id": "00000003-0000-0000-0000-000100000001", "name": "P𭷓;gi" diff --git a/libs/wire-api/test/golden/testObject_Team_team_2.json b/libs/wire-api/test/golden/testObject_Team_team_2.json index 826ec582ba..895a61e70d 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_2.json +++ b/libs/wire-api/test/golden/testObject_Team_team_2.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000000-0000-0004-0000-000000000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "􍬵\t5", "icon_key": "虱R3q", "id": "00000004-0000-0003-0000-000000000004", "name": "Ycᛄ" diff --git a/libs/wire-api/test/golden/testObject_Team_team_20.json b/libs/wire-api/test/golden/testObject_Team_team_20.json index 5899393e6f..a2e88fc5df 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_20.json +++ b/libs/wire-api/test/golden/testObject_Team_team_20.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000000-0000-0004-0000-000000000004", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "󸷚I\u0002\u0003", "icon_key": "v0􌡴3", "id": "00000000-0000-0004-0000-000400000003", "name": "𮩶c" diff --git a/libs/wire-api/test/golden/testObject_Team_team_3.json b/libs/wire-api/test/golden/testObject_Team_team_3.json index bacd42f414..d06ee96c92 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_3.json +++ b/libs/wire-api/test/golden/testObject_Team_team_3.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000003-0000-0004-0000-000100000000", - "icon": "default", + "icon": "", "icon_key": "s􁺴", "id": "00000004-0000-0003-0000-000000000003", "name": "2E􊴕" diff --git a/libs/wire-api/test/golden/testObject_Team_team_4.json b/libs/wire-api/test/golden/testObject_Team_team_4.json index 939cc911f0..e2c72e1c83 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_4.json +++ b/libs/wire-api/test/golden/testObject_Team_team_4.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000004-0000-0000-0000-000100000003", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "􇓞u\u001cC\u0001", "icon_key": "X", "id": "00000000-0000-0002-0000-000100000004", "name": "𫑂\u0008k" diff --git a/libs/wire-api/test/golden/testObject_Team_team_5.json b/libs/wire-api/test/golden/testObject_Team_team_5.json index 00e49fe750..5b259bd37a 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_5.json +++ b/libs/wire-api/test/golden/testObject_Team_team_5.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000000-0000-0004-0000-000200000002", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "􆊅", "icon_key": "?&\u001b", "id": "00000004-0000-0003-0000-000000000004", "name": "\u0006𘐼仄" diff --git a/libs/wire-api/test/golden/testObject_Team_team_6.json b/libs/wire-api/test/golden/testObject_Team_team_6.json index debe629932..b9ce15d026 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_6.json +++ b/libs/wire-api/test/golden/testObject_Team_team_6.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000000-0000-0003-0000-000000000003", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "_'\u0011\u0002", "id": "00000000-0000-0002-0000-000000000001", "name": "󸭬x󼬐]㹱" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_7.json b/libs/wire-api/test/golden/testObject_Team_team_7.json index 28718021fd..6ed09fa61b 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_7.json +++ b/libs/wire-api/test/golden/testObject_Team_team_7.json @@ -1,7 +1,7 @@ { "binding": true, "creator": "00000001-0000-0002-0000-000400000000", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "X\n|󾒚", "icon_key": "𗤥", "id": "00000002-0000-0003-0000-000000000002", "name": "⛉􁓖󸙰7􂩽" diff --git a/libs/wire-api/test/golden/testObject_Team_team_8.json b/libs/wire-api/test/golden/testObject_Team_team_8.json index 940b270dd3..3b01001838 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_8.json +++ b/libs/wire-api/test/golden/testObject_Team_team_8.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0003-0000-000400000001", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "󻎖", "id": "00000003-0000-0004-0000-000000000001", "name": "\r釖{\u0013\\" } diff --git a/libs/wire-api/test/golden/testObject_Team_team_9.json b/libs/wire-api/test/golden/testObject_Team_team_9.json index bf120473c4..2765bd238b 100644 --- a/libs/wire-api/test/golden/testObject_Team_team_9.json +++ b/libs/wire-api/test/golden/testObject_Team_team_9.json @@ -1,7 +1,7 @@ { "binding": false, "creator": "00000002-0000-0000-0000-000000000004", - "icon": "3-1-55b9ad19-315c-4bda-8c0f-5d7b0e143008", + "icon": "d\u0003U", "id": "00000004-0000-0002-0000-000200000003", "name": "G[Hu{" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json index e532e3870c..65e1ab329e 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_1.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "褩s􎀧", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json index bc5f15c3f1..a88563d44e 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_11.json @@ -1,16 +1,16 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u0003𗗇", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "􏜄", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json index 33b1b1ecc1..5a6989defa 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_12.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "e󱊉4", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json index 67b5480462..35c19a29f6 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_15.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u000eNG", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json index 5c75fbbb1b..5fa9959c91 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_17.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "󼋠j𖥩", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json index d78c2d45b7..79134b0c60 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_18.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "󿔉w\u0015", + "size": "complete", + "type": "image" + }, + { + "key": "K", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json index 4bf04aebe9..1241cd1a8d 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_19.json @@ -1,31 +1,31 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "q", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "]䊇", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u001b笜F", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": ";K", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json index a761085ef8..078f95b752 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_2.json @@ -1,21 +1,21 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𬩌", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "#", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json index 7f5496c3fd..ccd58adb6f 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_20.json @@ -1,16 +1,16 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𬃈", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𫸍", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u0019", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json index 6283ed2835..551074fd62 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_3.json @@ -1,17 +1,17 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "t𘠊", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u000cu\u001f", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json index 0d212c6e7f..b95439f7d3 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_4.json @@ -1,7 +1,12 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "h", + "size": "complete", + "type": "image" + }, + { + "key": "𬄋)p", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json index a6a10f2f20..84e3f829c6 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_5.json @@ -1,30 +1,30 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "7_", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "p", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "䭙u9", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𪉓𬜼*", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "󷤅\u0010", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "󵋬쭫󰩵", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json index a1e4e13736..e453bc425b 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_6.json @@ -1,7 +1,7 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json b/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json index e1a72f991a..3f5156f32d 100644 --- a/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json +++ b/libs/wire-api/test/golden/testObject_UpdateService_provider_9.json @@ -1,32 +1,32 @@ { "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "𒑢􋮶", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u000e", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "`", "size": "preview", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "N红$", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" }, { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "type": "image" } ], diff --git a/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json b/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json index 50ab64fbde..1db9d874fe 100644 --- a/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json +++ b/libs/wire-api/test/golden/testObject_UserUpdate_user_2.json @@ -2,7 +2,7 @@ "accent_id": 3, "assets": [ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "", "size": "complete", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json index fbc67ff273..125af7b782 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_1.json @@ -1,4 +1,4 @@ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "\u001d", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json index 51fa25cac0..bb06cdf13d 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_10.json @@ -1,5 +1,5 @@ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "'\u001c􊘾RoR\u001e4&e@`5", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json index 51fa25cac0..3e280ceaf9 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_11.json @@ -1,5 +1,5 @@ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": "eUb􎃾", "size": "preview", "type": "image" } diff --git a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json index 6417044533..21efd8ce27 100644 --- a/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json +++ b/libs/wire-api/test/golden/testObject_User_2eProfile_2eAsset_user_12.json @@ -1,5 +1,5 @@ { - "key": "3-5-5cd81cc4-c643-4e9c-849c-c596a88c27fd", + "key": " Config -> Manager -> DB.ClientState -> Brig -> Cannon -> Galley -> IO TestTree @@ -1562,11 +1561,7 @@ defServiceTags :: Range 1 3 (Set ServiceTag) defServiceTags = unsafeRange (Set.singleton SocialTag) defServiceAssets :: [Asset] -defServiceAssets = - [ ImageAsset - (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) - (Just AssetComplete) - ] +defServiceAssets = [ImageAsset "key" (Just AssetComplete)] -- TODO: defServiceToken :: ServiceToken diff --git a/services/brig/test/integration/API/Team.hs b/services/brig/test/integration/API/Team.hs index 5f59e08115..654f274fc8 100644 --- a/services/brig/test/integration/API/Team.hs +++ b/services/brig/test/integration/API/Team.hs @@ -42,7 +42,6 @@ import Data.Id hiding (client) import Data.Json.Util (UTCTimeMillis, toUTCTimeMillis) import qualified Data.Text.Ascii as Ascii import Data.Time (addUTCTime, getCurrentTime) -import qualified Data.UUID as UUID (fromString) import qualified Data.UUID.V4 as UUID import qualified Galley.Types.Teams as Team import qualified Galley.Types.Teams.Intra as Team @@ -57,7 +56,6 @@ import UnliftIO.Async (mapConcurrently_, pooledForConcurrentlyN_, replicateConcu import Util import Util.AWS as Util import Web.Cookie (parseSetCookie, setCookieName) -import Wire.API.Asset import Wire.API.User.Identity (mkSimpleSampleUref) newtype TeamSizeLimit = TeamSizeLimit Word32 @@ -151,7 +149,7 @@ testUpdateEvents brig cannon = do void $ getConnection brig alice bob TeamId -> TeamFeatureStatusValue -> Galley -> Http () putLegalHoldEnabled tid enabled g = do diff --git a/services/brig/test/integration/API/User/Account.hs b/services/brig/test/integration/API/User/Account.hs index 04aebbd3b6..5483a76403 100644 --- a/services/brig/test/integration/API/User/Account.hs +++ b/services/brig/test/integration/API/User/Account.hs @@ -82,7 +82,6 @@ import UnliftIO (mapConcurrently_) import Util import Util.AWS as Util import Web.Cookie (parseSetCookie) -import Wire.API.Asset hiding (Asset) import qualified Wire.API.Asset as Asset import Wire.API.Federation.API.Brig (UserDeletedConnectionsNotification (..)) import qualified Wire.API.Federation.API.Brig as FedBrig @@ -817,12 +816,7 @@ testUserUpdate brig cannon aws = do aliceNewName <- randomName connectUsers brig alice (singleton bob) let newColId = Just 5 - newAssets = - Just - [ ImageAsset - (AssetKeyV3 (Id (fromJust (UUID.fromString "5cd81cc4-c643-4e9c-849c-c596a88c27fd"))) AssetExpiring) - (Just AssetComplete) - ] + newAssets = Just [ImageAsset "abc" (Just AssetComplete)] mNewName = Just $ aliceNewName newPic = Nothing -- Legacy userUpdate = UserUpdate mNewName newPic newAssets newColId @@ -1342,7 +1336,7 @@ testDeleteWithProfilePic brig cargohold = do let newAssets = Just [ ImageAsset - (qUnqualified $ ast ^. Asset.assetKey) + (T.decodeLatin1 $ toByteString' (qUnqualified (ast ^. Asset.assetKey))) (Just AssetComplete) ] userUpdate = UserUpdate Nothing Nothing newAssets Nothing diff --git a/services/brig/test/integration/API/UserPendingActivation.hs b/services/brig/test/integration/API/UserPendingActivation.hs index 4e3e02b60b..3c7565d8b1 100644 --- a/services/brig/test/integration/API/UserPendingActivation.hs +++ b/services/brig/test/integration/API/UserPendingActivation.hs @@ -64,7 +64,6 @@ import qualified Web.Scim.Schema.Meta as Scim import qualified Web.Scim.Schema.User as Scim.User import qualified Web.Scim.Schema.User.Email as Email import qualified Web.Scim.Schema.User.Phone as Phone -import Wire.API.Team (Icon (..)) import Wire.API.User.RichInfo (RichInfo) import Wire.API.User.Scim (CreateScimToken (..), ScimToken, ScimUserExtra (ScimUserExtra)) @@ -152,7 +151,7 @@ getInvitationByEmail brig email = ) newTeam :: Galley.BindingNewTeam -newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") DefaultIcon +newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") (unsafeRange "defaultIcon") createUserWithTeamDisableSSO :: (HasCallStack, MonadCatch m, MonadHttp m, MonadIO m, MonadFail m) => Brig -> Galley -> m (UserId, TeamId) createUserWithTeamDisableSSO brg gly = do diff --git a/services/galley/src/Galley/Cassandra/Instances.hs b/services/galley/src/Galley/Cassandra/Instances.hs index 937b54ad43..0e3ebaf5ec 100644 --- a/services/galley/src/Galley/Cassandra/Instances.hs +++ b/services/galley/src/Galley/Cassandra/Instances.hs @@ -25,16 +25,13 @@ where import Cassandra.CQL import Control.Error (note) -import Data.ByteString.Conversion import Data.Domain (Domain, domainText, mkDomain) -import qualified Data.Text.Encoding as T import Galley.Types import Galley.Types.Bot () import Galley.Types.Teams import Galley.Types.Teams.Intra import Galley.Types.Teams.SearchVisibility import Imports -import Wire.API.Team import qualified Wire.API.Team.Feature as Public deriving instance Cql MutedStatus @@ -171,9 +168,3 @@ instance Cql Public.EnforceAppLock where 1 -> pure (Public.EnforceAppLock True) _ -> Left "fromCql EnforceAppLock: int out of range" fromCql _ = Left "fromCql EnforceAppLock: int expected" - -instance Cql Icon where - ctype = Tagged TextColumn - toCql = CqlText . T.decodeUtf8 . toByteString' - fromCql (CqlText txt) = pure . fromRight DefaultIcon . runParser parser . T.encodeUtf8 $ txt - fromCql _ = Left "Icon: Text expected" diff --git a/services/galley/src/Galley/Cassandra/Queries.hs b/services/galley/src/Galley/Cassandra/Queries.hs index 69df6ae050..4d199920a5 100644 --- a/services/galley/src/Galley/Cassandra/Queries.hs +++ b/services/galley/src/Galley/Cassandra/Queries.hs @@ -36,11 +36,10 @@ import Galley.Types.Teams.Intra import Galley.Types.Teams.SearchVisibility import Imports import Text.RawString.QQ -import Wire.API.Team -- Teams -------------------------------------------------------------------- -selectTeam :: PrepQuery R (Identity TeamId) (UserId, Text, Icon, Maybe Text, Bool, Maybe TeamStatus, Maybe (Writetime TeamStatus), Maybe TeamBinding) +selectTeam :: PrepQuery R (Identity TeamId) (UserId, Text, Text, Maybe Text, Bool, Maybe TeamStatus, Maybe (Writetime TeamStatus), Maybe TeamBinding) selectTeam = "select creator, name, icon, icon_key, deleted, status, writetime(status), binding from team where team = ?" selectTeamName :: PrepQuery R (Identity TeamId) (Identity Text) @@ -136,7 +135,7 @@ selectUserTeamsIn = "select team from user_team where user = ? and team in ? ord selectUserTeamsFrom :: PrepQuery R (UserId, TeamId) (Identity TeamId) selectUserTeamsFrom = "select team from user_team where user = ? and team > ? order by team" -insertTeam :: PrepQuery W (TeamId, UserId, Text, Icon, Maybe Text, TeamStatus, TeamBinding) () +insertTeam :: PrepQuery W (TeamId, UserId, Text, Text, Maybe Text, TeamStatus, TeamBinding) () insertTeam = "insert into team (team, creator, name, icon, icon_key, deleted, status, binding) values (?, ?, ?, ?, ?, false, ?, ?)" insertTeamConv :: PrepQuery W (TeamId, ConvId) () diff --git a/services/galley/src/Galley/Cassandra/Team.hs b/services/galley/src/Galley/Cassandra/Team.hs index 629dc16576..c0ae2938f1 100644 --- a/services/galley/src/Galley/Cassandra/Team.hs +++ b/services/galley/src/Galley/Cassandra/Team.hs @@ -62,7 +62,6 @@ import Imports hiding (Set, max) import Polysemy import Polysemy.Input import qualified UnliftIO -import Wire.API.Team (Icon (..)) import Wire.API.Team.Member interpretTeamStoreToCassandra :: @@ -138,11 +137,11 @@ createTeam :: Maybe TeamId -> UserId -> Range 1 256 Text -> - Icon -> + Range 1 256 Text -> Maybe (Range 1 256 Text) -> TeamBinding -> Client Team -createTeam t uid (fromRange -> n) i k b = do +createTeam t uid (fromRange -> n) (fromRange -> i) k b = do tid <- maybe (Id <$> liftIO nextRandom) return t retry x5 $ write Cql.insertTeam (params LocalQuorum (tid, uid, n, i, fromRange <$> k, initialStatus b, b)) pure (newTeam tid uid n i b & teamIconKey .~ (fromRange <$> k)) diff --git a/services/galley/src/Galley/Effects/TeamStore.hs b/services/galley/src/Galley/Effects/TeamStore.hs index cc2495e7cc..9fa4dd42d6 100644 --- a/services/galley/src/Galley/Effects/TeamStore.hs +++ b/services/galley/src/Galley/Effects/TeamStore.hs @@ -85,7 +85,6 @@ import Imports import Polysemy import Polysemy.Error import qualified Proto.TeamEvents as E -import Wire.API.Team (Icon) data TeamStore m a where CreateTeamMember :: TeamId -> TeamMember -> TeamStore m () @@ -94,7 +93,7 @@ data TeamStore m a where Maybe TeamId -> UserId -> Range 1 256 Text -> - Icon -> + Range 1 256 Text -> Maybe (Range 1 256 Text) -> TeamBinding -> TeamStore m Team diff --git a/services/galley/test/integration/API/Teams.hs b/services/galley/test/integration/API/Teams.hs index 9eddbddca3..f16d2178e7 100644 --- a/services/galley/test/integration/API/Teams.hs +++ b/services/galley/test/integration/API/Teams.hs @@ -75,7 +75,6 @@ import Test.Tasty.HUnit import TestHelpers (test, viewFederationDomain) import TestSetup (TestM, TestSetup, tsBrig, tsCannon, tsGConf, tsGalley) import UnliftIO (mapConcurrently, mapConcurrently_) -import Wire.API.Team (Icon (..)) import Wire.API.Team.Export (TeamExportUser (..)) import qualified Wire.API.Team.Feature as Public import qualified Wire.API.Team.Member as Member @@ -205,7 +204,7 @@ testCreateMultipleBindingTeams = do _ <- Util.createBindingTeamInternal "foo" owner assertQueue "create team" tActivate -- Cannot create more teams if bound (used internal API) - let nt = NonBindingNewTeam $ newNewTeam (unsafeRange "owner") DefaultIcon + let nt = NonBindingNewTeam $ newNewTeam (unsafeRange "owner") (unsafeRange "icon") post (g . path "/teams" . zUser owner . zConn "conn" . json nt) !!! const 403 === statusCode -- If never used the internal API, can create multiple teams diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index 1918884601..73fd845971 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -119,7 +119,6 @@ import Wire.API.Message import qualified Wire.API.Message.Proto as Proto import Wire.API.Routes.Internal.Brig.Connection import Wire.API.Routes.MultiTablePaging -import Wire.API.Team (Icon (..)) import Wire.API.Team.Member (mkNewTeamMember) import Wire.API.User.Client (ClientCapability (..), UserClientsFull (UserClientsFull)) import qualified Wire.API.User.Client as Client @@ -226,7 +225,7 @@ createNonBindingTeam :: HasCallStack => Text -> UserId -> [TeamMember] -> TestM createNonBindingTeam name owner mems = do g <- view tsGalley let mm = if null mems then Nothing else Just $ unsafeRange (take 127 mems) - let nt = NonBindingNewTeam $ newNewTeam (unsafeRange name) DefaultIcon & newTeamMembers .~ mm + let nt = NonBindingNewTeam $ newNewTeam (unsafeRange name) (unsafeRange "icon") & newTeamMembers .~ mm resp <- post (g . path "/teams" . zUser owner . zConn "conn" . zType "access" . json nt) Text -> UserId -> TestM T createBindingTeamInternalNoActivate name owner = do g <- view tsGalley tid <- randomId - let nt = BindingNewTeam $ newNewTeam (unsafeRange name) DefaultIcon + let nt = BindingNewTeam $ newNewTeam (unsafeRange name) (unsafeRange "icon") _ <- put (g . paths ["/i/teams", toByteString' tid] . zUser owner . zConn "conn" . zType "access" . json nt) ["password" .= defPassword | hasPassword] <> ["email" .= fromEmail e | hasEmail] - <> ["team" .= Team.BindingNewTeam (Team.newNewTeam (unsafeRange "teamName") DefaultIcon) | isCreator] + <> ["team" .= Team.BindingNewTeam (Team.newNewTeam (unsafeRange "teamName") (unsafeRange "defaultIcon")) | isCreator] responseJsonUnsafe <$> (post (b . path "/i/users" . json p) TestM UserId diff --git a/services/spar/test-integration/Util/Core.hs b/services/spar/test-integration/Util/Core.hs index 87f97d4c9a..1ef07088d7 100644 --- a/services/spar/test-integration/Util/Core.hs +++ b/services/spar/test-integration/Util/Core.hs @@ -200,7 +200,6 @@ import Util.Types import qualified Web.Cookie as Web import Wire.API.Cookie import Wire.API.Routes.Public.Spar -import Wire.API.Team (Icon (..)) import Wire.API.Team.Feature (TeamFeatureStatusValue (..)) import qualified Wire.API.Team.Feature as Public import qualified Wire.API.Team.Invitation as TeamInvitation @@ -623,7 +622,7 @@ zAuthAccess :: UserId -> SBS -> Request -> Request zAuthAccess u c = header "Z-Type" "access" . zUser u . zConn c newTeam :: Galley.BindingNewTeam -newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") DefaultIcon +newTeam = Galley.BindingNewTeam $ Galley.newNewTeam (unsafeRange "teamName") (unsafeRange "defaultIcon") randomEmail :: MonadIO m => m Brig.Email randomEmail = do