Skip to content
Open
4 changes: 0 additions & 4 deletions static/app/types/core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -64,8 +62,6 @@ export enum Outcome {
DROPPED = 'dropped', // this is not a real outcome coming from the server
}

export type IntervalPeriod = ReturnType<typeof getInterval>;

/**
* Represents a pinned page filter sentinel value
*/
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/organizationStats/mapSeriesToChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 3 additions & 0 deletions static/app/views/organizationStats/types.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type {getInterval} from 'sentry/components/charts/utils';
import type {SeriesApi} from 'sentry/types/organization';

export type IntervalPeriod = ReturnType<typeof getInterval>;

/**
* Raw response from API endpoint
*/
Expand Down
3 changes: 2 additions & 1 deletion static/app/views/organizationStats/usageChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 2 additions & 1 deletion static/app/views/organizationStats/usageChart/utils.tsx
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down
9 changes: 2 additions & 7 deletions static/app/views/organizationStats/usageStatsOrg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand Down
Loading