Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jul 19, 2023
1 parent 60cce2b commit 6ffb85f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@
*/
import { v4 as uuidV4 } from 'uuid';
import { schema } from '@kbn/config-schema';
import { getPrivateLocations } from '../../synthetics_service/get_private_locations';
import { PrivateLocationAttributes } from '../../runtime_types/private_locations';
import { SyntheticsRestApiRouteFactory } from '../types';
import { unzipFile } from '../../common/unzipt_project_code';
import {
ConfigKey,
MonitorFields,
SyntheticsMonitor,
PrivateLocation,
} from '../../../common/runtime_types';
import { ConfigKey, MonitorFields, SyntheticsMonitor } from '../../../common/runtime_types';
import { SYNTHETICS_API_URLS } from '../../../common/constants';
import { DEFAULT_FIELDS } from '../../../common/constants/monitor_defaults';
import { validateMonitor } from './monitor_validation';
import { hydrateMonitorFields } from './add_monitor';
import { getPrivateLocationsForMonitor, hydrateMonitorFields } from './add_monitor';

export const inspectSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () => ({
method: 'POST',
Expand Down Expand Up @@ -53,7 +48,7 @@ export const inspectSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () =

const normalizedMonitor = validationResult.decodedMonitor;

const privateLocations: PrivateLocation[] = await getPrivateLocations(
const privateLocations: PrivateLocationAttributes[] = await getPrivateLocationsForMonitor(
savedObjectsClient,
normalizedMonitor
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '@kbn/core/server';
import { i18n } from '@kbn/i18n';
import { EncryptedSavedObjectsClient } from '@kbn/encrypted-saved-objects-plugin/server';
import { PrivateLocationAttributes } from '../../runtime_types/private_locations';
import { SyntheticsServerSetup } from '../../types';
import { RouteContext } from '../../routes/types';
import { syntheticsMonitorType } from '../../../common/types/saved_objects';
Expand Down Expand Up @@ -58,7 +59,7 @@ export class ProjectMonitorFormatter {
private projectId: string;
private spaceId: string;
private publicLocations: Locations;
private privateLocations: PrivateLocation[];
private privateLocations: PrivateLocationAttributes[];
private savedObjectsClient: SavedObjectsClientContract;
private encryptedSavedObjectsClient: EncryptedSavedObjectsClient;
private monitors: ProjectMonitor[] = [];
Expand Down

0 comments on commit 6ffb85f

Please sign in to comment.