-
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.
- Loading branch information
Showing
27 changed files
with
238 additions
and
354 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
apps/server/src/modules/tool/common/enum/tool-context-type.enum.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,4 +1,4 @@ | ||
export enum ToolContextType { | ||
COURSE = 'course', | ||
BOARD_ELEMENT = 'boardElement', | ||
BOARD_ELEMENT = 'board-element', | ||
} |
9 changes: 9 additions & 0 deletions
9
apps/server/src/modules/tool/common/mapper/tool-context.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ToolContextType } from '../enum'; | ||
import { ContextExternalToolType } from '../../context-external-tool/entity'; | ||
|
||
export class ToolContextMapper { | ||
static contextMapping: Record<ToolContextType, ContextExternalToolType> = { | ||
[ToolContextType.COURSE]: ContextExternalToolType.COURSE, | ||
[ToolContextType.BOARD_ELEMENT]: ContextExternalToolType.BOARD_ELEMENT, | ||
}; | ||
} |
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
10 changes: 8 additions & 2 deletions
10
...src/modules/tool/external-tool/controller/dto/response/external-tool-metadata.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
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
4 changes: 1 addition & 3 deletions
4
apps/server/src/modules/tool/external-tool/domain/external-tool-metadata.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
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
apps/server/src/modules/tool/external-tool/loggable/external-tool-metadata-loggable.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,15 +1,10 @@ | ||
import { ErrorLogMessage, Loggable, LogMessage, ValidationErrorLogMessage } from '@src/core/logger'; | ||
|
||
export class ExternalToolMetadataLoggable implements Loggable { | ||
constructor(private readonly msg: string) {} | ||
|
||
getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { | ||
return { | ||
type: 'EXTERNAL_TOOL_METADATA', | ||
message: 'No related tools found, return empty external tool metadata', | ||
data: { | ||
msg: this.msg, | ||
}, | ||
}; | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
apps/server/src/modules/tool/external-tool/mapper/external-tool-metadata.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
Oops, something went wrong.