hooks.tsx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. import type {Route, RouteComponentProps, RouteContextInterface} from 'react-router';
  2. import type {ChildrenRenderFn} from 'sentry/components/acl/feature';
  3. import type {Guide} from 'sentry/components/assistant/types';
  4. import type {ButtonProps} from 'sentry/components/button';
  5. import {ProductSelectionProps} from 'sentry/components/onboarding/productSelection';
  6. import type SidebarItem from 'sentry/components/sidebar/sidebarItem';
  7. import type DateRange from 'sentry/components/timeRangeSelector/dateRange';
  8. import type SelectorItems from 'sentry/components/timeRangeSelector/selectorItems';
  9. import {SVGIconProps} from 'sentry/icons/svgIcon';
  10. import type {Group} from 'sentry/types';
  11. import {UseExperiment} from 'sentry/utils/useExperiment';
  12. import {OrganizationStatsProps} from 'sentry/views/organizationStats/index';
  13. import {RouteAnalyticsContext} from 'sentry/views/routeAnalyticsContextProvider';
  14. import type {NavigationItem, NavigationSection} from 'sentry/views/settings/types';
  15. import type {ExperimentKey} from './experiments';
  16. import type {Integration, IntegrationProvider} from './integrations';
  17. import type {Member, Organization} from './organization';
  18. import type {Project} from './project';
  19. import type {User} from './user';
  20. // XXX(epurkhiser): A Note about `_`.
  21. //
  22. // We add the `_: any` type int our hooks list to stop
  23. // typescript from doing too much type tightening. We should absolutely revisit
  24. // this in the future because all callbacks _should_ be allowed to be
  25. // functions, but doing so causes some unexpected issues and makes typescript
  26. // not happy. We still get a huge advantage of typing just by having each hook
  27. // type here however.
  28. /**
  29. * The Hooks type mapping is the master interface for all external Hooks into
  30. * the sentry frontend application.
  31. */
  32. export interface Hooks
  33. extends RouteHooks,
  34. ComponentHooks,
  35. CustomizationHooks,
  36. AnalyticsHooks,
  37. FeatureDisabledHooks,
  38. InterfaceChromeHooks,
  39. OnboardingHooks,
  40. SettingsHooks,
  41. FeatureSpecificHooks,
  42. ReactHooks,
  43. CallbackHooks {
  44. _: any;
  45. }
  46. export type HookName = keyof Hooks;
  47. /**
  48. * Route hooks.
  49. */
  50. export type RouteHooks = {
  51. 'routes:api': RoutesHook;
  52. 'routes:organization': RoutesHook;
  53. 'routes:root': RoutesHook;
  54. };
  55. /**
  56. * Component specific hooks for DateRange and SelectorItems
  57. * These components have plan specific overrides in getsentry
  58. */
  59. type DateRangeProps = React.ComponentProps<typeof DateRange>;
  60. type SelectorItemsProps = React.ComponentProps<typeof SelectorItems>;
  61. type DisabledMemberViewProps = RouteComponentProps<{orgId: string}, {}>;
  62. type MemberListHeaderProps = {
  63. members: Member[];
  64. organization: Organization;
  65. };
  66. type DisabledAppStoreConnectMultiple = {
  67. children: React.ReactNode;
  68. organization: Organization;
  69. };
  70. type DisabledCustomSymbolSources = {
  71. children: React.ReactNode;
  72. organization: Organization;
  73. };
  74. type DisabledMemberTooltipProps = {children: React.ReactNode};
  75. type DashboardHeadersProps = {organization: Organization};
  76. type ReplayFeedbackButton = {children: React.ReactNode};
  77. type ReplayListPageHeaderProps = {children?: React.ReactNode};
  78. type ReplayOnboardingAlertProps = {children: React.ReactNode};
  79. type ReplayOnboardingCTAProps = {children: React.ReactNode; organization: Organization};
  80. type ProductUnavailableCTAProps = {organization: Organization};
  81. type ProfilingBetaAlertBannerProps = {
  82. organization: Organization;
  83. };
  84. type ProfilingUpgradePlanButtonProps = ButtonProps & {
  85. children: React.ReactNode;
  86. fallback: React.ReactNode;
  87. organization: Organization;
  88. };
  89. type ProfilingAM1OrMMXUpgradeProps = {
  90. fallback: React.ReactNode;
  91. organization: Organization;
  92. };
  93. type ProductSelectionAvailabilityProps = Pick<
  94. ProductSelectionProps,
  95. 'lazyLoader' | 'skipLazyLoader' | 'platform' | 'withBottomMargin'
  96. > & {
  97. organization: Organization;
  98. };
  99. type FirstPartyIntegrationAlertProps = {
  100. integrations: Integration[];
  101. hideCTA?: boolean;
  102. wrapWithContainer?: boolean;
  103. };
  104. type FirstPartyIntegrationAdditionalCTAProps = {
  105. integrations: Integration[];
  106. };
  107. type AttemptCloseAttemptProps = {
  108. handleRemoveAccount: () => void;
  109. organizationSlugs: string[];
  110. };
  111. type CodecovLinkProps = {
  112. organization: Organization;
  113. };
  114. type QualitativeIssueFeedbackProps = {
  115. group: Group;
  116. organization: Organization;
  117. };
  118. type GuideUpdateCallback = (nextGuide: Guide | null, opts: {dismissed?: boolean}) => void;
  119. type SentryLogoProps = SVGIconProps & {
  120. pride?: boolean;
  121. };
  122. /**
  123. * Component wrapping hooks
  124. */
  125. export type ComponentHooks = {
  126. 'component:codecov-integration-settings-link': () => React.ComponentType<CodecovLinkProps>;
  127. 'component:codecov-integration-stacktrace-link': () => React.ComponentType<CodecovLinkProps>;
  128. 'component:confirm-account-close': () => React.ComponentType<AttemptCloseAttemptProps>;
  129. 'component:dashboards-header': () => React.ComponentType<DashboardHeadersProps>;
  130. 'component:disabled-app-store-connect-multiple': () => React.ComponentType<DisabledAppStoreConnectMultiple>;
  131. 'component:disabled-custom-symbol-sources': () => React.ComponentType<DisabledCustomSymbolSources>;
  132. 'component:disabled-member': () => React.ComponentType<DisabledMemberViewProps>;
  133. 'component:disabled-member-tooltip': () => React.ComponentType<DisabledMemberTooltipProps>;
  134. 'component:enhanced-org-stats': () => React.ComponentType<OrganizationStatsProps>;
  135. 'component:escalating-issues-banner-feedback': () => React.ComponentType<QualitativeIssueFeedbackProps>;
  136. 'component:first-party-integration-additional-cta': () => React.ComponentType<FirstPartyIntegrationAdditionalCTAProps>;
  137. 'component:first-party-integration-alert': () => React.ComponentType<FirstPartyIntegrationAlertProps>;
  138. 'component:header-date-range': () => React.ComponentType<DateRangeProps>;
  139. 'component:header-selector-items': () => React.ComponentType<SelectorItemsProps>;
  140. 'component:issue-priority-feedback': () => React.ComponentType<QualitativeIssueFeedbackProps>;
  141. 'component:member-list-header': () => React.ComponentType<MemberListHeaderProps>;
  142. 'component:org-stats-banner': () => React.ComponentType<DashboardHeadersProps>;
  143. 'component:product-selection-availability': () => React.ComponentType<ProductSelectionAvailabilityProps>;
  144. 'component:product-unavailable-cta': () => React.ComponentType<ProductUnavailableCTAProps>;
  145. 'component:profiling-am1-or-mmx-upgrade': () => React.ComponentType<ProfilingAM1OrMMXUpgradeProps>;
  146. 'component:profiling-billing-banner': () => React.ComponentType<ProfilingBetaAlertBannerProps>;
  147. 'component:profiling-upgrade-plan-button': () => React.ComponentType<ProfilingUpgradePlanButtonProps>;
  148. 'component:replay-feedback-button': () => React.ComponentType<ReplayFeedbackButton>;
  149. 'component:replay-list-page-header': () => React.ComponentType<ReplayListPageHeaderProps> | null;
  150. 'component:replay-onboarding-alert': () => React.ComponentType<ReplayOnboardingAlertProps>;
  151. 'component:replay-onboarding-cta': () => React.ComponentType<ReplayOnboardingCTAProps>;
  152. 'component:replay-onboarding-cta-button': () => React.ComponentType<{}> | null;
  153. 'component:sentry-logo': () => React.ComponentType<SentryLogoProps>;
  154. 'component:superuser-access-category': React.ComponentType<any>;
  155. };
  156. /**
  157. * Customization hooks are advanced hooks that return render-prop style
  158. * components the allow for specific customizations of components.
  159. *
  160. * These are very similar to the component wrapping hooks
  161. */
  162. export type CustomizationHooks = {
  163. 'integrations:feature-gates': IntegrationsFeatureGatesHook;
  164. 'member-invite-button:customization': InviteButtonCustomizationHook;
  165. 'member-invite-modal:customization': InviteModalCustomizationHook;
  166. };
  167. /**
  168. * Analytics / tracking / and operational metrics backend hooks.
  169. */
  170. export type AnalyticsHooks = {
  171. 'analytics:init-user': AnalyticsInitUser;
  172. 'analytics:log-experiment': AnalyticsLogExperiment;
  173. 'analytics:raw-track-event': AnalyticsRawTrackEvent;
  174. 'metrics:event': MetricsEvent;
  175. };
  176. /**
  177. * feature-disabled:<feature-flag> hooks return components that will be
  178. * rendered in place for Feature components when the feature is not enabled.
  179. */
  180. export type FeatureDisabledHooks = {
  181. 'feature-disabled:alert-wizard-performance': FeatureDisabledHook;
  182. 'feature-disabled:alerts-page': FeatureDisabledHook;
  183. 'feature-disabled:codecov-integration-setting': FeatureDisabledHook;
  184. 'feature-disabled:custom-inbound-filters': FeatureDisabledHook;
  185. 'feature-disabled:dashboards-edit': FeatureDisabledHook;
  186. 'feature-disabled:dashboards-page': FeatureDisabledHook;
  187. 'feature-disabled:dashboards-sidebar-item': FeatureDisabledHook;
  188. 'feature-disabled:data-forwarding': FeatureDisabledHook;
  189. 'feature-disabled:discard-groups': FeatureDisabledHook;
  190. 'feature-disabled:discover-page': FeatureDisabledHook;
  191. 'feature-disabled:discover-saved-query-create': FeatureDisabledHook;
  192. 'feature-disabled:discover-sidebar-item': FeatureDisabledHook;
  193. 'feature-disabled:discover2-page': FeatureDisabledHook;
  194. 'feature-disabled:discover2-sidebar-item': FeatureDisabledHook;
  195. 'feature-disabled:events-page': FeatureDisabledHook;
  196. 'feature-disabled:events-sidebar-item': FeatureDisabledHook;
  197. 'feature-disabled:grid-editable-actions': FeatureDisabledHook;
  198. 'feature-disabled:incidents-sidebar-item': FeatureDisabledHook;
  199. 'feature-disabled:open-discover': FeatureDisabledHook;
  200. 'feature-disabled:open-in-discover': FeatureDisabledHook;
  201. 'feature-disabled:performance-new-project': FeatureDisabledHook;
  202. 'feature-disabled:performance-page': FeatureDisabledHook;
  203. 'feature-disabled:performance-quick-trace': FeatureDisabledHook;
  204. 'feature-disabled:performance-sidebar-item': FeatureDisabledHook;
  205. 'feature-disabled:profiling-page': FeatureDisabledHook;
  206. 'feature-disabled:profiling-sidebar-item': FeatureDisabledHook;
  207. 'feature-disabled:project-performance-score-card': FeatureDisabledHook;
  208. 'feature-disabled:project-selector-all-projects': FeatureDisabledHook;
  209. 'feature-disabled:project-selector-checkbox': FeatureDisabledHook;
  210. 'feature-disabled:rate-limits': FeatureDisabledHook;
  211. 'feature-disabled:relay': FeatureDisabledHook;
  212. 'feature-disabled:replay-sidebar-item': FeatureDisabledHook;
  213. 'feature-disabled:sso-basic': FeatureDisabledHook;
  214. 'feature-disabled:sso-saml2': FeatureDisabledHook;
  215. 'feature-disabled:starfish-view': FeatureDisabledHook;
  216. 'feature-disabled:trace-view-link': FeatureDisabledHook;
  217. };
  218. /**
  219. * Interface chrome hooks.
  220. */
  221. export type InterfaceChromeHooks = {
  222. footer: GenericComponentHook;
  223. 'help-modal:footer': HelpModalFooterHook;
  224. 'organization:header': OrganizationHeaderComponentHook;
  225. 'sidebar:bottom-items': SidebarBottomItemsHook;
  226. 'sidebar:help-menu': GenericOrganizationComponentHook;
  227. 'sidebar:item-label': SidebarItemLabelHook;
  228. 'sidebar:organization-dropdown-menu': GenericOrganizationComponentHook;
  229. 'sidebar:organization-dropdown-menu-bottom': GenericOrganizationComponentHook;
  230. };
  231. /**
  232. * Onboarding experience hooks
  233. */
  234. export type OnboardingHooks = {
  235. 'onboarding-wizard:skip-help': GenericOrganizationComponentHook;
  236. 'onboarding:block-hide-sidebar': () => boolean;
  237. 'onboarding:extra-chrome': GenericComponentHook;
  238. 'onboarding:targeted-onboarding-header': (opts: {source: string}) => React.ReactNode;
  239. };
  240. /**
  241. * Settings navigation hooks.
  242. */
  243. export type SettingsHooks = {
  244. 'settings:api-navigation-config': SettingsItemsHook;
  245. 'settings:organization-navigation': OrganizationSettingsHook;
  246. 'settings:organization-navigation-config': SettingsConfigHook;
  247. };
  248. /**
  249. * Feature Specific Hooks
  250. */
  251. export interface FeatureSpecificHooks extends SpendVisibilityHooks {}
  252. /**
  253. * Hooks related to Spend Visibitlity
  254. * (i.e. Per-Project Spike Protection + Spend Allocations)
  255. */
  256. export type SpendVisibilityHooks = {
  257. 'spend-visibility:spike-protection-project-settings': GenericProjectComponentHook;
  258. };
  259. /**
  260. * Hooks that are actually React Hooks as well
  261. */
  262. export type ReactHooks = {
  263. 'react-hook:route-activated': (
  264. props: RouteContextInterface
  265. ) => React.ContextType<typeof RouteAnalyticsContext>;
  266. 'react-hook:use-button-tracking': (props: ButtonProps) => () => void;
  267. 'react-hook:use-experiment': UseExperiment;
  268. };
  269. /**
  270. * Callback hooks.
  271. * These hooks just call a function that has no return value
  272. * and perform some sort of callback logic
  273. */
  274. type CallbackHooks = {
  275. 'callback:on-guide-update': GuideUpdateCallback;
  276. };
  277. /**
  278. * Renders a React node with no props
  279. */
  280. type GenericComponentHook = () => React.ReactNode;
  281. /**
  282. * A route hook provides an injection point for a list of routes.
  283. */
  284. type RoutesHook = () => Route[];
  285. /**
  286. * Receives an organization object and should return a React node.
  287. */
  288. type GenericOrganizationComponentHook = (opts: {
  289. organization: Organization;
  290. }) => React.ReactNode;
  291. /**
  292. * Receives a project object and should return a React node.
  293. */
  294. type GenericProjectComponentHook = (opts: {project: Project}) => React.ReactNode;
  295. // TODO(ts): We should correct the organization header hook to conform to the
  296. // GenericOrganizationComponentHook, passing org as a prop object, not direct
  297. // as the only argument.
  298. type OrganizationHeaderComponentHook = (org: Organization) => React.ReactNode;
  299. /**
  300. * A FeatureDisabledHook returns a react element when a feature is not enabled.
  301. */
  302. type FeatureDisabledHook = (opts: {
  303. /**
  304. * Children can either be a node, or a function that accepts a renderDisabled prop containing
  305. * a function/component to render when the feature is not enabled.
  306. */
  307. children: React.ReactNode | ChildrenRenderFn;
  308. /**
  309. * The list of features that are controlled by this hook.
  310. */
  311. features: string[];
  312. /**
  313. * Weather the feature is or is not enabled.
  314. */
  315. hasFeature: boolean;
  316. /**
  317. * The organization that is associated to this feature.
  318. */
  319. organization: Organization;
  320. /**
  321. * The project that is associated to this feature.
  322. */
  323. project?: Project;
  324. }) => React.ReactNode;
  325. /**
  326. * Called when the app is mounted.
  327. */
  328. type AnalyticsInitUser = (user: User) => void;
  329. /**
  330. * Trigger analytics tracking in the hook store.
  331. */
  332. type AnalyticsRawTrackEvent = (
  333. data: {
  334. /**
  335. * Arbitrary data to track
  336. */
  337. [key: string]: any;
  338. /**
  339. * The Reload event key.
  340. */
  341. eventKey: string;
  342. /**
  343. * The Amplitude event name. Set to null if event should not go to Amplitude.
  344. */
  345. eventName: string | null;
  346. /**
  347. * Organization to pass in. If full org object not available, pass in just the Id.
  348. * If no org, pass in null.
  349. */
  350. organization: Organization | string | null;
  351. },
  352. options?: {
  353. /**
  354. * An arbitrary function to map the parameters to new parameters
  355. */
  356. mapValuesFn?: (params: Record<string, any>) => Record<string, any>;
  357. /**
  358. * If true, starts an analytics session. This session can be used
  359. * to construct funnels. The start of the funnel should have
  360. * startSession set to true.
  361. */
  362. startSession?: boolean;
  363. /**
  364. * Optional unix timestamp
  365. */
  366. time?: number;
  367. }
  368. ) => void;
  369. /**
  370. * Trigger experiment observed logging.
  371. */
  372. type AnalyticsLogExperiment = (opts: {
  373. /**
  374. * The experiment key
  375. */
  376. key: ExperimentKey;
  377. /**
  378. * The organization. Must be provided for organization experiments.
  379. */
  380. organization?: Organization;
  381. }) => void;
  382. /**
  383. * Trigger recording a metric in the hook store.
  384. */
  385. type MetricsEvent = (
  386. /**
  387. * Metric name
  388. */
  389. name: string,
  390. /**
  391. * Value to record for this metric
  392. */
  393. value: number,
  394. /**
  395. * An additional tags object
  396. */
  397. tags?: object
  398. ) => void;
  399. /**
  400. * Provides additional navigation components
  401. */
  402. type OrganizationSettingsHook = (organization: Organization) => React.ReactElement;
  403. /**
  404. * Provides additional setting configurations
  405. */
  406. type SettingsConfigHook = (organization: Organization) => NavigationSection;
  407. /**
  408. * Provides additional setting navigation items
  409. */
  410. type SettingsItemsHook = (organization?: Organization) => NavigationItem[];
  411. /**
  412. * Each sidebar label is wrapped with this hook, to allow sidebar item
  413. * augmentation.
  414. */
  415. type SidebarItemLabelHook = () => React.ComponentType<{
  416. /**
  417. * The item label being wrapped
  418. */
  419. children: React.ReactNode;
  420. /**
  421. * The key of the item label currently being rendered. If no id is provided
  422. * the hook will have no effect.
  423. */
  424. id?: string;
  425. }>;
  426. type SidebarProps = Pick<
  427. React.ComponentProps<typeof SidebarItem>,
  428. 'orientation' | 'collapsed' | 'hasPanel'
  429. >;
  430. /**
  431. * Returns an additional list of sidebar items.
  432. */
  433. type SidebarBottomItemsHook = (
  434. opts: SidebarProps & {organization: Organization}
  435. ) => React.ReactNode;
  436. /**
  437. * Provides augmentation of the help modal footer
  438. */
  439. type HelpModalFooterHook = (opts: {
  440. closeModal: () => void;
  441. organization: Organization;
  442. }) => React.ReactNode;
  443. /**
  444. * The DecoratedIntegrationFeature differs from the IntegrationFeature as it is
  445. * expected to have been transformed into marked up content.
  446. */
  447. type DecoratedIntegrationFeature = {
  448. /**
  449. * Marked up description
  450. */
  451. description: React.ReactNode;
  452. featureGate: string;
  453. };
  454. type IntegrationFeatureGroup = {
  455. /**
  456. * The list of features within this group
  457. */
  458. features: DecoratedIntegrationFeature[];
  459. /**
  460. * Weather the group has all of the features enabled within this group
  461. * or not.
  462. */
  463. hasFeatures: boolean;
  464. };
  465. type FeatureGateSharedProps = {
  466. /**
  467. * The list of features, typically this is provided by the backend.
  468. */
  469. features: DecoratedIntegrationFeature[];
  470. /**
  471. * Organization of the integration we're querying feature gate details for.
  472. */
  473. organization: Organization;
  474. };
  475. type IntegrationFeaturesProps = FeatureGateSharedProps & {
  476. /**
  477. * The children function which will be provided with gating details.
  478. */
  479. children: (opts: {
  480. /**
  481. * Is the integration disabled for installation because of feature gating?
  482. */
  483. disabled: boolean;
  484. /**
  485. * The translated reason that the integration is disabled.
  486. */
  487. disabledReason: React.ReactNode;
  488. /**
  489. * Features grouped based on specific gating criteria (for example, in
  490. * sentry.io this is features grouped by plans).
  491. */
  492. gatedFeatureGroups: IntegrationFeatureGroup[];
  493. /**
  494. * This is the list of features which have *not* been gated in any way.
  495. */
  496. ungatedFeatures: DecoratedIntegrationFeature[];
  497. }) => React.ReactElement;
  498. };
  499. type IntegrationFeatureListProps = FeatureGateSharedProps & {
  500. provider: Pick<IntegrationProvider, 'key'>;
  501. };
  502. /**
  503. * The integration features gate hook provides components to customize
  504. * integration feature lists.
  505. */
  506. type IntegrationsFeatureGatesHook = () => {
  507. /**
  508. * This component renders the list of integration features.
  509. */
  510. FeatureList: React.ComponentType<IntegrationFeatureListProps>;
  511. /**
  512. * This is a render-prop style component that given a set of integration
  513. * features will call the children function with gating details about the
  514. * features.
  515. */
  516. IntegrationFeatures: React.ComponentType<IntegrationFeaturesProps>;
  517. };
  518. /**
  519. * Invite Button customization allows for a render-props component to replace
  520. * or intercept props of the button element.
  521. */
  522. type InviteButtonCustomizationHook = () => React.ComponentType<{
  523. children: (opts: {
  524. /**
  525. * Whether the Invite Members button is active or not
  526. */
  527. disabled: boolean;
  528. onTriggerModal: () => void;
  529. }) => React.ReactElement;
  530. onTriggerModal: () => void;
  531. organization: Organization;
  532. }>;
  533. /**
  534. * Invite Modal customization allows for a render-prop component to add
  535. * additional react elements into the modal, and add invite-send middleware.
  536. */
  537. type InviteModalCustomizationHook = () => React.ComponentType<{
  538. children: (opts: {
  539. /**
  540. * Indicates that the modal's send invites button should be enabled and
  541. * invites may currently be sent.
  542. */
  543. canSend: boolean;
  544. /**
  545. * Trigger sending invites
  546. */
  547. sendInvites: () => void;
  548. /**
  549. * Additional react elements to render in the header of the modal, just
  550. * under the description.
  551. */
  552. headerInfo?: React.ReactNode;
  553. }) => React.ReactElement;
  554. /**
  555. * When the children's sendInvites renderProp is called, this will also be
  556. * triggered.
  557. */
  558. onSendInvites: () => void;
  559. /**
  560. * The organization that members will be invited to.
  561. */
  562. organization: Organization;
  563. /**
  564. * Indicates if clicking 'send invites' will immediately send invites, or
  565. * would just create invite requests.
  566. */
  567. willInvite: boolean;
  568. }>;