hooks.tsx 20 KB

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