|
1 | | -import { ConsoleLogger, Inject, Injectable } from '@nestjs/common'; |
2 | 1 | import { HttpService } from '@nestjs/axios'; |
| 2 | +import { ConsoleLogger, Inject, Injectable } from '@nestjs/common'; |
| 3 | +import { plainToInstance } from 'class-transformer'; |
3 | 4 | import { lastValueFrom, map } from 'rxjs'; |
4 | 5 | import { |
5 | 6 | TaxiiBadRequestException, |
6 | 7 | TaxiiNotFoundException, |
7 | 8 | TaxiiServiceUnavailableException, |
8 | 9 | } from 'src/common/exceptions'; |
| 10 | +import { StixIdentityPrefix, WORKBENCH_OPTIONS, WorkbenchRESTEndpoint } from 'src/stix/constants'; |
| 11 | +import { AttackObjectDto } from 'src/stix/dto/attack-object.dto'; |
| 12 | +import { StixBundleDto } from 'src/stix/dto/stix-bundle.dto'; |
| 13 | +import { WorkbenchCollectionBundleDto } from 'src/stix/dto/workbench-collection-bundle.dto'; |
9 | 14 | import { |
10 | 15 | WorkbenchCollectionDto, |
11 | 16 | WorkbenchCollectionStixProperties, |
12 | 17 | } from 'src/stix/dto/workbench-collection.dto'; |
13 | | -import { plainToInstance } from 'class-transformer'; |
14 | | -import { WorkbenchCollectionBundleDto } from 'src/stix/dto/workbench-collection-bundle.dto'; |
15 | | -import { AttackObjectDto } from 'src/stix/dto/attack-object.dto'; |
16 | | -import { StixIdentityPrefix, WorkbenchRESTEndpoint } from 'src/stix/constants'; |
17 | 18 | import { WorkbenchConnectOptionsInterface } from 'src/stix/interfaces/workbench-connect-options.interface'; |
18 | | -import { WORKBENCH_OPTIONS } from 'src/stix/constants'; |
19 | | -import { StixBundleDto } from 'src/stix/dto/stix-bundle.dto'; |
20 | 19 |
|
21 | 20 | interface WorkbenchCollectionResponseDto { |
22 | 21 | _id: string; |
@@ -45,8 +44,8 @@ export class WorkbenchRepository { |
45 | 44 | * @param url Base URL of the target Workbench REST API instance |
46 | 45 | * @private |
47 | 46 | */ |
48 | | - |
49 | | - private async fetchHttp(url: string): Promise<unknown> { |
| 47 | + // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 48 | + private async fetchHttp(url: string): Promise<any> { |
50 | 49 | this.logger.debug(`Sending HTTP GET request to ${url}`, this.constructor.name); |
51 | 50 |
|
52 | 51 | let data; |
|
0 commit comments