-
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
1 parent
c64ee05
commit 62820fb
Showing
12 changed files
with
421 additions
and
3 deletions.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
...src/modules/tool/external-tool/controller/dto/request/external-tool-bulk-create.params.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,11 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { Type } from 'class-transformer'; | ||
import { ValidateNested } from 'class-validator'; | ||
import { ExternalToolCreateParams } from './external-tool-create.params'; | ||
|
||
export class ExternalToolBulkCreateParams { | ||
@ValidateNested() | ||
@Type(() => ExternalToolCreateParams) | ||
@ApiProperty({ type: [ExternalToolCreateParams], description: 'List of external tools' }) | ||
data!: ExternalToolCreateParams[]; | ||
} |
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
38 changes: 38 additions & 0 deletions
38
...odules/tool/external-tool/controller/dto/response/external-tool-import-result-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,38 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class ExternalToolImportResultResponse { | ||
@ApiProperty({ description: 'Name of the external tool' }) | ||
toolName: string; | ||
|
||
@ApiProperty({ description: 'Medium id of the external tool' }) | ||
mediumId?: string; | ||
|
||
@ApiProperty({ description: 'Medium source of the external tool' }) | ||
mediumSourceId?: string; | ||
|
||
@ApiProperty({ description: 'ObjectId of the created external tool' }) | ||
toolId?: string; | ||
|
||
@ApiProperty({ description: 'Status message of the error that occurred' }) | ||
error?: string; | ||
|
||
constructor(props: ExternalToolImportResultResponse) { | ||
this.toolName = props.toolName; | ||
this.mediumId = props.mediumId; | ||
this.mediumSourceId = props.mediumSourceId; | ||
this.toolId = props.toolId; | ||
this.error = props.error; | ||
} | ||
} | ||
|
||
export class ExternalToolImportResultListResponse { | ||
@ApiProperty({ | ||
type: [ExternalToolImportResultResponse], | ||
description: 'List of operation results for the provided external tools', | ||
}) | ||
results: ExternalToolImportResultResponse[]; | ||
|
||
constructor(props: ExternalToolImportResultListResponse) { | ||
this.results = props.results; | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
apps/server/src/modules/tool/external-tool/uc/dto/external-tool-import-result.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,19 @@ | ||
export class ExternalToolImportResult { | ||
toolName: string; | ||
|
||
mediumId?: string; | ||
|
||
mediumSourceId?: string; | ||
|
||
toolId?: string; | ||
|
||
error?: string; | ||
|
||
constructor(props: ExternalToolImportResult) { | ||
this.toolName = props.toolName; | ||
this.mediumId = props.mediumId; | ||
this.mediumSourceId = props.mediumSourceId; | ||
this.toolId = props.toolId; | ||
this.error = props.error; | ||
} | ||
} |
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,2 +1,3 @@ | ||
export * from './external-tool.types'; | ||
export * from './external-tool-configuration.types'; | ||
export { ExternalToolImportResult } from './external-tool-import-result'; |
Oops, something went wrong.