-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
47 changed files
with
760 additions
and
142 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...modules/tool/common/controller/dto/context-external-tool-configuration-status.response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class ContextExternalToolConfigurationStatusResponse { | ||
@ApiProperty({ | ||
type: Boolean, | ||
description: | ||
'Is the tool outdated on school scope, because of non matching versions or required parameter changes on ExternalTool?', | ||
}) | ||
isOutdatedOnScopeSchool: boolean; | ||
|
||
@ApiProperty({ | ||
type: Boolean, | ||
description: | ||
'Is the tool outdated on context scope, because of non matching versions or required parameter changes on SchoolExternalTool?', | ||
}) | ||
isOutdatedOnScopeContext: boolean; | ||
|
||
constructor(props: ContextExternalToolConfigurationStatusResponse) { | ||
this.isOutdatedOnScopeSchool = props.isOutdatedOnScopeSchool; | ||
this.isOutdatedOnScopeContext = props.isOutdatedOnScopeContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { ContextExternalToolCountPerContextResponse } from './context-external-tool-count-per-context.response'; | ||
export { ContextExternalToolConfigurationStatusResponse } from './context-external-tool-configuration-status.response'; |
10 changes: 10 additions & 0 deletions
10
apps/server/src/modules/tool/common/domain/context-external-tool-configuration-status.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export class ContextExternalToolConfigurationStatus { | ||
isOutdatedOnScopeSchool: boolean; | ||
|
||
isOutdatedOnScopeContext: boolean; | ||
|
||
constructor(props: ContextExternalToolConfigurationStatus) { | ||
this.isOutdatedOnScopeSchool = props.isOutdatedOnScopeSchool; | ||
this.isOutdatedOnScopeContext = props.isOutdatedOnScopeContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './custom-parameter.do'; | ||
export * from './custom-parameter-entry.do'; | ||
export * from '../enum/tool-configuration-status'; | ||
export * from './context-external-tool-configuration-status'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
apps/server/src/modules/tool/common/enum/tool-configuration-status.ts
This file was deleted.
Oops, something went wrong.
20 changes: 10 additions & 10 deletions
20
apps/server/src/modules/tool/common/mapper/tool-status-response.mapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { ToolConfigurationStatusResponse } from '../../context-external-tool/controller/dto'; | ||
import { ToolConfigurationStatus } from '../enum'; | ||
|
||
export const statusMapping: Record<ToolConfigurationStatus, ToolConfigurationStatusResponse> = { | ||
[ToolConfigurationStatus.LATEST]: ToolConfigurationStatusResponse.LATEST, | ||
[ToolConfigurationStatus.OUTDATED]: ToolConfigurationStatusResponse.OUTDATED, | ||
[ToolConfigurationStatus.UNKNOWN]: ToolConfigurationStatusResponse.UNKNOWN, | ||
}; | ||
import { ContextExternalToolConfigurationStatusResponse } from '../controller/dto'; | ||
import { ContextExternalToolConfigurationStatus } from '../domain'; | ||
|
||
export class ToolStatusResponseMapper { | ||
static mapToResponse(status: ToolConfigurationStatus): ToolConfigurationStatusResponse { | ||
return statusMapping[status]; | ||
static mapToResponse(status: ContextExternalToolConfigurationStatus): ContextExternalToolConfigurationStatusResponse { | ||
const configurationStatus: ContextExternalToolConfigurationStatusResponse = | ||
new ContextExternalToolConfigurationStatusResponse({ | ||
isOutdatedOnScopeSchool: status.isOutdatedOnScopeSchool, | ||
isOutdatedOnScopeContext: status.isOutdatedOnScopeContext, | ||
}); | ||
|
||
return configurationStatus; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...c/modules/tool/context-external-tool/controller/dto/tool-configuration-status.response.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.