hooks.tsx 20 KB

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