Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion registry-public/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: registry-public
version: '4.33.4'
version: '4.34.0'
synopsis: Registry Public
description: Registry Public
category: Web
Expand Down
2 changes: 1 addition & 1 deletion registry-server/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: registry-server
version: '4.33.4'
version: '4.34.0'
synopsis: Engine Registry
description: Engine Registry
category: Web
Expand Down
2 changes: 1 addition & 1 deletion registry-server/src/Registry/Api/Handler/Swagger/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ swagger =
s._swaggerInfo
{ _infoTitle = "Registry API"
, _infoDescription = Just "API specification for Registry"
, _infoVersion = "4.33.4"
, _infoVersion = "4.34.0"
, _infoLicense =
Just $
License
Expand Down
2 changes: 1 addition & 1 deletion shared-common/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: shared-common
version: '4.33.4'
version: '4.34.0'
synopsis: Engine Shared
description: Engine Shared
category: Web
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ extractIntField fieldName _ = Left . GeneralServerError $ _ERROR_INTEGRATION_COM

convertToArray :: Value -> Either AppError [Value]
convertToArray (Array array) = Right . Vector.toList $ array
convertToArray Null = Right []
convertToArray _ = Left . GeneralServerError $ _ERROR_INTEGRATION_COMMON__FIELD_IS_NOT_ARRAY
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Shared.DocumentTemplate.Model.DocumentTemplate.DocumentTemplateFormatSimp
data DocumentTemplateDTO = DocumentTemplateDTO
{ uuid :: U.UUID
, name :: String
, organizationId :: String
, templateId :: String
, version :: String
, phase :: DocumentTemplatePhase
, description :: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ findLatestDocumentTemplateByOrganizationIdAndTemplateId orgId templateId = do
\ AND template_id = ? \
\ORDER BY split_part(version, '.', 1)::int DESC, \
\ split_part(version, '.', 2)::int DESC, \
\ split_part(version, '.', 3)::int DESC; \
\LIMIT 1:"
\ split_part(version, '.', 3)::int DESC \
\LIMIT 1"
let params = [U.toString tenantUuid, orgId, templateId]
logQuery sql params
let action conn = query conn sql params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ toDTO dt formats =
DocumentTemplateDTO
{ uuid = dt.uuid
, name = dt.name
, organizationId = dt.organizationId
, templateId = dt.templateId
, version = dt.version
, phase = dt.phase
, description = dt.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ requestTokensWithCode openIDClient mCode mNonce =
case mCode of
Just code -> do
context <- ask
eTokens <- liftIO . E.try $ O.requestTokens openIDClient (fmap BS.pack mNonce) (BS.pack code) context.httpClientManager' :: AppContextC s sc m => m (Either IOError (OT.Tokens A.Value))
eTokens <- liftIO . E.try $ O.requestTokens openIDClient (fmap BS.pack mNonce) (BS.pack code) context.httpClientManager' :: AppContextC s sc m => m (Either E.SomeException (OT.Tokens A.Value))
case eTokens of
Right tokens -> return tokens
Left error -> do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ commonResponseMapperSpec =
let result = convertToArray response
-- THEN:
result `shouldBe` expectation
it "null as empty array" $
-- GIVEN: Response
do
let response = Null
-- AND: Expectations
let expectation = Right []
-- WHEN:
let result = convertToArray response
-- THEN:
result `shouldBe` expectation
it "bad type" $
-- GIVEN: Response
do
Expand Down
2 changes: 1 addition & 1 deletion wizard-public/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wizard-public
version: '4.33.4'
version: '4.34.0'
synopsis: Wizard Public
description: Wizard Public
category: Web
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data UserWithMembershipDTO = UserWithMembershipDTO
, lastName :: String
, gravatarHash :: String
, imageUrl :: Maybe String
, affiliation :: Maybe String
, membershipType :: UserGroupMembershipType
}
deriving (Show, Eq, Generic)
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,8 @@ instance FromRow PersistentCommandList where
case parts !! 4 of
"" -> Nothing
imageUrl -> Just imageUrl
, affiliation =
case parts !! 5 of
"" -> Nothing
affiliation -> Just affiliation
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ instance FromRow UserSimple where
lastName <- field
email <- field
imageUrl <- field
affiliation <- field
return $ UserSimple {..}

fieldUserSimple :: RowParser UserSimple
Expand All @@ -21,6 +22,7 @@ fieldUserSimple = do
lastName <- field
email <- field
imageUrl <- field
affiliation <- field
return UserSimple {..}

fieldUserSimple' :: RowParser (Maybe UserSimple)
Expand All @@ -30,6 +32,7 @@ fieldUserSimple' = do
mCreatedByLastName <- field
mCreatedByEmail <- field
mCreatedByImageUrl <- field
case (mCreatedByUuid, mCreatedByFirstName, mCreatedByLastName, mCreatedByEmail, mCreatedByImageUrl) of
(Just uuid, Just firstName, Just lastName, Just email, imageUrl) -> return $ Just UserSimple {..}
mCreatedByAffiliation <- field
case (mCreatedByUuid, mCreatedByFirstName, mCreatedByLastName, mCreatedByEmail, mCreatedByImageUrl, mCreatedByAffiliation) of
(Just uuid, Just firstName, Just lastName, Just email, imageUrl, affiliation) -> return $ Just UserSimple {..}
_ -> return Nothing
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ instance FromRow UserSuggestion where
lastName <- field
gravatarHash <- field
imageUrl <- field
affiliation <- field
return $ UserSuggestion {..}

fieldUserSuggestion :: RowParser UserSuggestion
Expand All @@ -21,6 +22,7 @@ fieldUserSuggestion = do
lastName <- field
gravatarHash <- field
imageUrl <- field
affiliation <- field
return UserSuggestion {..}

fieldUserSuggestion' :: RowParser (Maybe UserSuggestion)
Expand All @@ -30,6 +32,7 @@ fieldUserSuggestion' = do
mCreatedByLastName <- field
mCreatedByGravatarHash <- field
mCreatedByImageUrl <- field
case (mCreatedByUuid, mCreatedByFirstName, mCreatedByLastName, mCreatedByGravatarHash, mCreatedByImageUrl) of
(Just uuid, Just firstName, Just lastName, Just gravatarHash, imageUrl) -> return $ Just UserSuggestion {..}
mCreatedByAffiliation <- field
case (mCreatedByUuid, mCreatedByFirstName, mCreatedByLastName, mCreatedByGravatarHash, mCreatedByImageUrl, mCreatedByAffiliation) of
(Just uuid, Just firstName, Just lastName, Just gravatarHash, imageUrl, affiliation) -> return $ Just UserSuggestion {..}
_ -> return Nothing
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ instance FromRow UserWithMembership where
lastName <- field
email <- field
imageUrl <- field
affiliation <- field
membershipType <- field
return $ UserWithMembership {..}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ userAlbertWithMembership =
, lastName = "Einstein"
, gravatarHash = ".."
, imageUrl = Nothing
, affiliation = Nothing
, membershipType = OwnerUserGroupMembershipType
}

Expand All @@ -27,6 +28,7 @@ userAlbertSuggestion =
, lastName = "Einstein"
, gravatarHash = ".."
, imageUrl = Nothing
, affiliation = Nothing
}

userLocaleEmpty :: UserLocaleDTO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ data UserSimple = UserSimple
, lastName :: String
, email :: String
, imageUrl :: Maybe String
, affiliation :: Maybe String
}
deriving (Generic, Eq, Show)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ data UserSuggestion = UserSuggestion
, lastName :: String
, gravatarHash :: String
, imageUrl :: Maybe String
, affiliation :: Maybe String
}
deriving (Show, Eq, Generic)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data UserWithMembership = UserWithMembership
, lastName :: String
, email :: String
, imageUrl :: Maybe String
, affiliation :: Maybe String
, membershipType :: UserGroupMembershipType
}
deriving (Generic, Eq, Show)
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ toWithMembershipDTO user =
, lastName = user.lastName
, gravatarHash = createGravatarHash user.email
, imageUrl = user.imageUrl
, affiliation = user.affiliation
, membershipType = user.membershipType
}
2 changes: 1 addition & 1 deletion wizard-server/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wizard-server
version: '4.33.4'
version: '4.34.0'
synopsis: Engine Wizard
description: Engine Wizard
category: Web
Expand Down
16 changes: 10 additions & 6 deletions wizard-server/src/Wizard/Api/Handler/Project/List_GET.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module Wizard.Api.Handler.Project.List_GET where

import qualified Data.UUID as U
import Servant

import Shared.Common.Api.Handler.Common
import Shared.Common.Api.Resource.Common.FromHttpApiData ()
import Shared.Common.Model.Common.Page
import Shared.Common.Model.Common.Pageable
import Shared.Common.Model.Context.TransactionState
Expand All @@ -21,11 +23,12 @@ type List_GET =
:> "projects"
:> QueryParam "q" String
:> QueryParam "isTemplate" Bool
:> QueryParam "isMigrating" Bool
:> QueryParam "projectTags" String
:> QueryParam "projectTagsOp" String
:> QueryParam "userUuids" String
:> QueryParam "userUuids" [U.UUID]
:> QueryParam "userUuidsOp" String
:> QueryParam "userGroupUuids" [U.UUID]
:> QueryParam "userGroupUuidsOp" String
:> QueryParam "knowledgeModelPackageIds" [Coordinate]
:> QueryParam "knowledgeModelPackageIdsOp" String
:> QueryParam "page" Int
Expand All @@ -38,31 +41,32 @@ list_GET
-> Maybe String
-> Maybe String
-> Maybe Bool
-> Maybe Bool
-> Maybe String
-> Maybe String
-> Maybe [U.UUID]
-> Maybe String
-> Maybe [U.UUID]
-> Maybe String
-> Maybe [Coordinate]
-> Maybe String
-> Maybe Int
-> Maybe Int
-> Maybe String
-> BaseContextM (Headers '[Header "x-trace-uuid" String] (Page ProjectDTO))
list_GET mTokenHeader mServerUrl mQuery mIsTemplate mIsMigrating mProjectTagsL mProjectTagsOp mUserUuidsL mUserUuidsOp mKnowledgeModelPackageCoordinates mKnowledgeModelPackageCoordinatesOp mPage mSize mSort =
list_GET mTokenHeader mServerUrl mQuery mIsTemplate mProjectTagsL mProjectTagsOp mUserUuids mUserUuidsOp mUserGroupUuids mUserGroupUuidsOp mKnowledgeModelPackageCoordinates mKnowledgeModelPackageCoordinatesOp mPage mSize mSort =
getAuthServiceExecutor mTokenHeader mServerUrl $ \runInAuthService ->
runInAuthService NoTransaction $
addTraceUuidHeader =<< do
let mUserUuids = fmap (splitOn ",") mUserUuidsL
let mProjectTags = fmap (splitOn ",") mProjectTagsL
getProjectsForCurrentUserPageDto
mQuery
mIsTemplate
mIsMigrating
mProjectTags
mProjectTagsOp
mUserUuids
mUserUuidsOp
mUserGroupUuids
mUserGroupUuidsOp
mKnowledgeModelPackageCoordinates
mKnowledgeModelPackageCoordinatesOp
(Pageable mPage mSize)
Expand Down
18 changes: 2 additions & 16 deletions wizard-server/src/Wizard/Api/Handler/Project/Migration/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,15 @@ module Wizard.Api.Handler.Project.Migration.Api where
import Servant
import Servant.Swagger.Tags

import Wizard.Api.Handler.Project.Migration.List_Current_Completion_POST
import Wizard.Api.Handler.Project.Migration.List_Current_DELETE
import Wizard.Api.Handler.Project.Migration.List_Current_GET
import Wizard.Api.Handler.Project.Migration.List_Current_PUT
import Wizard.Api.Handler.Project.Migration.List_POST
import Wizard.Model.Context.BaseContext

type MigrationAPI =
Tags "Project Migration"
:> ( List_POST
:<|> List_Current_GET
:<|> List_Current_PUT
:<|> List_Current_DELETE
:<|> List_Current_Completion_POST
)
:> List_POST

migrationApi :: Proxy MigrationAPI
migrationApi = Proxy

migrationServer :: ServerT MigrationAPI BaseContextM
migrationServer =
list_POST
:<|> list_current_GET
:<|> list_current_PUT
:<|> list_current_DELETE
:<|> list_current_completion_POST
migrationServer = list_POST

This file was deleted.

This file was deleted.

Loading
Loading