diff --git a/static/app/types/core.tsx b/static/app/types/core.tsx index 28df06a7906e9d..44652eddf68aed 100644 --- a/static/app/types/core.tsx +++ b/static/app/types/core.tsx @@ -4,8 +4,6 @@ * Before a type is put here it should be required in multiple other types. * or used in multiple views. */ -import type {getInterval} from 'sentry/components/charts/utils'; - export type {Scope} from 'sentry/constants/scopes'; export {DataCategory, DataCategoryExact} from 'sentry/types/dataCategory'; export type {DataCategoryInfo} from 'sentry/types/dataCategory'; @@ -64,8 +62,6 @@ export enum Outcome { DROPPED = 'dropped', // this is not a real outcome coming from the server } -export type IntervalPeriod = ReturnType; - /** * Represents a pinned page filter sentinel value */ diff --git a/static/app/views/organizationStats/mapSeriesToChart.ts b/static/app/views/organizationStats/mapSeriesToChart.ts index 786fdd0da86aaf..6d64f6dd563381 100644 --- a/static/app/views/organizationStats/mapSeriesToChart.ts +++ b/static/app/views/organizationStats/mapSeriesToChart.ts @@ -3,12 +3,12 @@ import startCase from 'lodash/startCase'; import moment from 'moment-timezone'; import type {TooltipSubLabel} from 'sentry/components/charts/components/tooltip'; -import type {DataCategory, IntervalPeriod} from 'sentry/types/core'; +import type {DataCategory} from 'sentry/types/core'; import {Outcome} from 'sentry/types/core'; import {getDateFromMoment} from './usageChart/utils'; import {getReasonGroupName} from './getReasonGroupName'; -import type {UsageSeries, UsageStat} from './types'; +import type {IntervalPeriod, UsageSeries, UsageStat} from './types'; import type {ChartStats} from './usageChart'; import {SeriesTypes} from './usageChart'; import {formatUsageWithUnits, getFormatUsageOptions} from './utils'; diff --git a/static/app/views/organizationStats/types.tsx b/static/app/views/organizationStats/types.tsx index 621032e14a029d..30247f52fc48e5 100644 --- a/static/app/views/organizationStats/types.tsx +++ b/static/app/views/organizationStats/types.tsx @@ -1,5 +1,8 @@ +import type {getInterval} from 'sentry/components/charts/utils'; import type {SeriesApi} from 'sentry/types/organization'; +export type IntervalPeriod = ReturnType; + /** * Raw response from API endpoint */ diff --git a/static/app/views/organizationStats/usageChart/index.tsx b/static/app/views/organizationStats/usageChart/index.tsx index efd4ebc0683151..653d9d26531bb2 100644 --- a/static/app/views/organizationStats/usageChart/index.tsx +++ b/static/app/views/organizationStats/usageChart/index.tsx @@ -16,10 +16,11 @@ import {Placeholder} from 'sentry/components/placeholder'; import {DATA_CATEGORY_INFO} from 'sentry/constants'; import {IconWarning} from 'sentry/icons'; import {t} from 'sentry/locale'; -import type {DataCategory, IntervalPeriod} from 'sentry/types/core'; +import type {DataCategory} from 'sentry/types/core'; import {parsePeriodToHours} from 'sentry/utils/duration/parsePeriodToHours'; import {statsPeriodToDays} from 'sentry/utils/duration/statsPeriodToDays'; import type {Theme} from 'sentry/utils/theme'; +import type {IntervalPeriod} from 'sentry/views/organizationStats/types'; import {formatUsageWithUnits} from 'sentry/views/organizationStats/utils'; import {getTooltipFormatter, getXAxisDates, getXAxisLabelVisibility} from './utils'; diff --git a/static/app/views/organizationStats/usageChart/utils.tsx b/static/app/views/organizationStats/usageChart/utils.tsx index a06b2a474fb305..31f45ca85bd027 100644 --- a/static/app/views/organizationStats/usageChart/utils.tsx +++ b/static/app/views/organizationStats/usageChart/utils.tsx @@ -1,9 +1,10 @@ import moment from 'moment-timezone'; import {parseStatsPeriod} from 'sentry/components/pageFilters/parse'; -import type {DataCategory, IntervalPeriod} from 'sentry/types/core'; +import type {DataCategory} from 'sentry/types/core'; import {shouldUse24Hours} from 'sentry/utils/dates'; import {parsePeriodToHours} from 'sentry/utils/duration/parsePeriodToHours'; +import type {IntervalPeriod} from 'sentry/views/organizationStats/types'; import {formatUsageWithUnits} from 'sentry/views/organizationStats/utils'; /** diff --git a/static/app/views/organizationStats/usageStatsOrg.tsx b/static/app/views/organizationStats/usageStatsOrg.tsx index 5622963011883d..59e102d8df4ed4 100644 --- a/static/app/views/organizationStats/usageStatsOrg.tsx +++ b/static/app/views/organizationStats/usageStatsOrg.tsx @@ -20,12 +20,7 @@ import {ScoreCard} from 'sentry/components/scoreCard'; import {DEFAULT_STATS_PERIOD} from 'sentry/constants'; import {IconSettings} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; -import type { - DataCategory, - DataCategoryExact, - DataCategoryInfo, - IntervalPeriod, -} from 'sentry/types/core'; +import type {DataCategory, DataCategoryExact, DataCategoryInfo} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import {trackAnalytics} from 'sentry/utils/analytics'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; @@ -45,7 +40,7 @@ import { getTooltipFormatter, } from './usageChart/utils'; import {mapSeriesToChart} from './mapSeriesToChart'; -import type {UsageSeries} from './types'; +import type {IntervalPeriod, UsageSeries} from './types'; import type {ChartStats, UsageChartProps} from './usageChart'; import { CHART_OPTIONS_DATA_TRANSFORM,