hooks.tsx 20 KB

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