Browse Source

ref(js): Remove LightWeightOrganization type (#28838)

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Evan Purkhiser 3 years ago
parent
commit
6bc4308cbc

+ 3 - 3
static/app/actionCreators/organizations.tsx

@@ -8,7 +8,7 @@ import {Client} from 'app/api';
 import OrganizationsStore from 'app/stores/organizationsStore';
 import OrganizationsStore from 'app/stores/organizationsStore';
 import ProjectsStore from 'app/stores/projectsStore';
 import ProjectsStore from 'app/stores/projectsStore';
 import TeamStore from 'app/stores/teamStore';
 import TeamStore from 'app/stores/teamStore';
-import {LightWeightOrganization, Organization} from 'app/types';
+import {Organization} from 'app/types';
 
 
 type RedirectRemainingOrganizationParams = {
 type RedirectRemainingOrganizationParams = {
   /**
   /**
@@ -104,7 +104,7 @@ export function removeAndRedirectToRemainingOrganization(
 /**
 /**
  * Set active organization
  * Set active organization
  */
  */
-export function setActiveOrganization(org: LightWeightOrganization) {
+export function setActiveOrganization(org: Organization) {
   OrganizationsActions.setActive(org);
   OrganizationsActions.setActive(org);
 }
 }
 
 
@@ -120,7 +120,7 @@ export function changeOrganizationSlug(
  *
  *
  * Accepts a partial organization as it will merge will existing organization
  * Accepts a partial organization as it will merge will existing organization
  */
  */
-export function updateOrganization(org: Partial<LightWeightOrganization>) {
+export function updateOrganization(org: Partial<Organization>) {
   OrganizationsActions.update(org);
   OrganizationsActions.update(org);
   OrganizationActions.update(org);
   OrganizationActions.update(org);
 }
 }

+ 2 - 2
static/app/components/errorRobot.tsx

@@ -8,14 +8,14 @@ import Button from 'app/components/button';
 import Link from 'app/components/links/link';
 import Link from 'app/components/links/link';
 import {t, tct} from 'app/locale';
 import {t, tct} from 'app/locale';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
-import {LightWeightOrganization, Project} from 'app/types';
+import {Organization, Project} from 'app/types';
 import {defined} from 'app/utils';
 import {defined} from 'app/utils';
 import withApi from 'app/utils/withApi';
 import withApi from 'app/utils/withApi';
 import CreateSampleEventButton from 'app/views/onboarding/createSampleEventButton';
 import CreateSampleEventButton from 'app/views/onboarding/createSampleEventButton';
 
 
 type Props = {
 type Props = {
   api: Client;
   api: Client;
-  org: LightWeightOrganization;
+  org: Organization;
   project?: Project;
   project?: Project;
   gradient: boolean;
   gradient: boolean;
   /**
   /**

+ 3 - 3
static/app/components/issues/compactIssue.tsx

@@ -12,14 +12,14 @@ import {IconChat, IconMute, IconStar} from 'app/icons';
 import {t} from 'app/locale';
 import {t} from 'app/locale';
 import GroupStore from 'app/stores/groupStore';
 import GroupStore from 'app/stores/groupStore';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
-import {BaseGroup, LightWeightOrganization} from 'app/types';
+import {BaseGroup, Organization} from 'app/types';
 import {getMessage} from 'app/utils/events';
 import {getMessage} from 'app/utils/events';
 import {Aliases} from 'app/utils/theme';
 import {Aliases} from 'app/utils/theme';
 import withApi from 'app/utils/withApi';
 import withApi from 'app/utils/withApi';
 import withOrganization from 'app/utils/withOrganization';
 import withOrganization from 'app/utils/withOrganization';
 
 
 type HeaderProps = {
 type HeaderProps = {
-  organization: LightWeightOrganization;
+  organization: Organization;
   projectId: string;
   projectId: string;
   data: BaseGroup;
   data: BaseGroup;
   eventId?: string;
   eventId?: string;
@@ -85,7 +85,7 @@ function isGroup(maybe: GroupTypes): maybe is BaseGroup {
 type Props = {
 type Props = {
   api: Client;
   api: Client;
   id: string;
   id: string;
-  organization: LightWeightOrganization;
+  organization: Organization;
   eventId?: string;
   eventId?: string;
   data?: BaseGroup;
   data?: BaseGroup;
 };
 };

+ 2 - 2
static/app/components/lightWeightNoProjectMessage.tsx

@@ -1,9 +1,9 @@
 import NoProjectMessage from 'app/components/noProjectMessage';
 import NoProjectMessage from 'app/components/noProjectMessage';
-import {LightWeightOrganization, Organization, Project} from 'app/types';
+import {Organization, Project} from 'app/types';
 import withProjects from 'app/utils/withProjects';
 import withProjects from 'app/utils/withProjects';
 
 
 type Props = {
 type Props = {
-  organization: LightWeightOrganization | Organization;
+  organization: Organization;
   projects: Project[];
   projects: Project[];
   loadingProjects: boolean;
   loadingProjects: boolean;
 };
 };

+ 2 - 2
static/app/components/noProjectMessage.tsx

@@ -10,10 +10,10 @@ import PageHeading from 'app/components/pageHeading';
 import {t} from 'app/locale';
 import {t} from 'app/locale';
 import ConfigStore from 'app/stores/configStore';
 import ConfigStore from 'app/stores/configStore';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
-import {LightWeightOrganization, Organization, Project} from 'app/types';
+import {Organization, Project} from 'app/types';
 
 
 type Props = React.PropsWithChildren<{
 type Props = React.PropsWithChildren<{
-  organization: LightWeightOrganization | Organization;
+  organization: Organization;
   projects?: Project[];
   projects?: Project[];
   loadingProjects?: boolean;
   loadingProjects?: boolean;
   superuserNeedsToBeProjectMember?: boolean;
   superuserNeedsToBeProjectMember?: boolean;

+ 2 - 2
static/app/components/organizations/timeRangeSelector/dateRange/index.tsx

@@ -12,7 +12,7 @@ import Placeholder from 'app/components/placeholder';
 import {MAX_PICKABLE_DAYS} from 'app/constants';
 import {MAX_PICKABLE_DAYS} from 'app/constants';
 import {t} from 'app/locale';
 import {t} from 'app/locale';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
-import {LightWeightOrganization} from 'app/types';
+import {Organization} from 'app/types';
 import {analytics} from 'app/utils/analytics';
 import {analytics} from 'app/utils/analytics';
 import {
 import {
   getEndOfDay,
   getEndOfDay,
@@ -50,7 +50,7 @@ type Props = WithRouterProps & {
   /**
   /**
    * Just used for metrics
    * Just used for metrics
    */
    */
-  organization: LightWeightOrganization;
+  organization: Organization;
 
 
   /**
   /**
    * Start date value for absolute date selector
    * Start date value for absolute date selector

+ 2 - 2
static/app/components/organizations/timeRangeSelector/index.tsx

@@ -14,7 +14,7 @@ import {getRelativeSummary} from 'app/components/organizations/timeRangeSelector
 import {DEFAULT_STATS_PERIOD} from 'app/constants';
 import {DEFAULT_STATS_PERIOD} from 'app/constants';
 import {IconCalendar} from 'app/icons';
 import {IconCalendar} from 'app/icons';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
-import {DateString, LightWeightOrganization} from 'app/types';
+import {DateString, Organization} from 'app/types';
 import {defined} from 'app/utils';
 import {defined} from 'app/utils';
 import {analytics} from 'app/utils/analytics';
 import {analytics} from 'app/utils/analytics';
 import {
 import {
@@ -133,7 +133,7 @@ type Props = WithRouterProps & {
   /**
   /**
    * Just used for metrics
    * Just used for metrics
    */
    */
-  organization: LightWeightOrganization;
+  organization: Organization;
 
 
   /**
   /**
    * Small info icon with tooltip hint text
    * Small info icon with tooltip hint text

+ 3 - 3
static/app/components/smartSearchBar/index.tsx

@@ -35,7 +35,7 @@ import {IconClose, IconEllipsis, IconSearch} from 'app/icons';
 import {t} from 'app/locale';
 import {t} from 'app/locale';
 import MemberListStore from 'app/stores/memberListStore';
 import MemberListStore from 'app/stores/memberListStore';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
-import {LightWeightOrganization, SavedSearchType, Tag, User} from 'app/types';
+import {Organization, SavedSearchType, Tag, User} from 'app/types';
 import {defined} from 'app/utils';
 import {defined} from 'app/utils';
 import {trackAnalyticsEvent} from 'app/utils/analytics';
 import {trackAnalyticsEvent} from 'app/utils/analytics';
 import {callIfFunction} from 'app/utils/callIfFunction';
 import {callIfFunction} from 'app/utils/callIfFunction';
@@ -99,7 +99,7 @@ type ActionProps = {
   /**
   /**
    * The organization
    * The organization
    */
    */
-  organization: LightWeightOrganization;
+  organization: Organization;
   /**
   /**
    * The saved search type passed to the search bar
    * The saved search type passed to the search bar
    */
    */
@@ -126,7 +126,7 @@ type AutocompleteGroup = {
 
 
 type Props = WithRouterProps & {
 type Props = WithRouterProps & {
   api: Client;
   api: Client;
-  organization: LightWeightOrganization;
+  organization: Organization;
   dropdownClassName?: string;
   dropdownClassName?: string;
   className?: string;
   className?: string;
 
 

+ 2 - 2
static/app/stores/latestContextStore.tsx

@@ -4,9 +4,9 @@ import NavigationActions from 'app/actions/navigationActions';
 import OrganizationActions from 'app/actions/organizationActions';
 import OrganizationActions from 'app/actions/organizationActions';
 import OrganizationsActions from 'app/actions/organizationsActions';
 import OrganizationsActions from 'app/actions/organizationsActions';
 import ProjectActions from 'app/actions/projectActions';
 import ProjectActions from 'app/actions/projectActions';
-import {LightWeightOrganization, Organization, Project} from 'app/types';
+import {Organization, Project} from 'app/types';
 
 
-type OrgTypes = LightWeightOrganization | Organization | null;
+type OrgTypes = Organization | null;
 
 
 type State = {
 type State = {
   project: Project | null;
   project: Project | null;

+ 2 - 9
static/app/types/hooks.tsx

@@ -5,14 +5,7 @@ import {ChildrenRenderFn} from 'app/components/acl/feature';
 import DateRange from 'app/components/organizations/timeRangeSelector/dateRange';
 import DateRange from 'app/components/organizations/timeRangeSelector/dateRange';
 import SelectorItems from 'app/components/organizations/timeRangeSelector/dateRange/selectorItems';
 import SelectorItems from 'app/components/organizations/timeRangeSelector/dateRange/selectorItems';
 import SidebarItem from 'app/components/sidebar/sidebarItem';
 import SidebarItem from 'app/components/sidebar/sidebarItem';
-import {
-  IntegrationProvider,
-  LightWeightOrganization,
-  Member,
-  Organization,
-  Project,
-  User,
-} from 'app/types';
+import {IntegrationProvider, Member, Organization, Project, User} from 'app/types';
 import {ExperimentKey} from 'app/types/experiments';
 import {ExperimentKey} from 'app/types/experiments';
 import {NavigationItem, NavigationSection} from 'app/views/settings/types';
 import {NavigationItem, NavigationSection} from 'app/views/settings/types';
 
 
@@ -276,7 +269,7 @@ type AnalyticsTrackEventV2 = (
      */
      */
     eventName: string | null;
     eventName: string | null;
 
 
-    organization: LightWeightOrganization | null;
+    organization: Organization | null;
     /**
     /**
      * Arbitrary data to track
      * Arbitrary data to track
      */
      */

Some files were not shown because too many files changed in this diff