hooks.tsx 20 KB

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