types.tsx 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. import type {ReplayListRecord, ReplayRecord} from 'sentry/views/replays/types';
  2. type SimpleStub<T = any> = () => T;
  3. type OverridableStub<T = any> = (params?: Partial<T>) => T;
  4. type OverridableStubList<T = any> = (params?: T[]) => T[];
  5. type TestStubFixtures = {
  6. AccessRequest: OverridableStub;
  7. AccountAppearance: OverridableStub;
  8. AccountEmails: OverridableStubList;
  9. ActivityFeed: OverridableStub;
  10. AllAuthenticators: SimpleStub;
  11. ApiApplication: OverridableStub;
  12. ApiKey: OverridableStub;
  13. ApiToken: OverridableStub;
  14. AsanaCreate: SimpleStub;
  15. AsanaPlugin: SimpleStub;
  16. AuditLogs: OverridableStubList;
  17. AuditLogsApiEventNames: SimpleStub;
  18. AuthProvider: OverridableStub;
  19. AuthProviders: OverridableStubList;
  20. Authenticators: SimpleStub;
  21. BitbucketIntegrationConfig: SimpleStub;
  22. Breadcrumb: OverridableStub;
  23. Broadcast: OverridableStub;
  24. BuiltInSymbolSources: OverridableStubList;
  25. CodeOwner: OverridableStub;
  26. Commit: OverridableStub;
  27. CommitAuthor: OverridableStub;
  28. Config: OverridableStub;
  29. DataScrubbingRelayPiiConfig: SimpleStub;
  30. DebugFile: OverridableStub;
  31. DebugSymbols: OverridableStub;
  32. DetailedEvents: SimpleStub;
  33. DiscoverSavedQuery: OverridableStub;
  34. DocIntegration: OverridableStub;
  35. Entries: SimpleStub;
  36. Environments: OverridableStub;
  37. Event: OverridableStub;
  38. EventAttachment: OverridableStub;
  39. EventEntry: OverridableStub;
  40. EventEntryDebugMeta: OverridableStub;
  41. EventEntryStacktrace: OverridableStub;
  42. EventIdQueryResult: OverridableStub;
  43. EventStacktraceException: OverridableStub;
  44. EventStacktraceMessage: OverridableStub;
  45. Events: OverridableStubList;
  46. EventsStats: OverridableStub;
  47. ExceptionWithMeta: OverridableStubList;
  48. ExceptionWithRawStackTrace: OverridableStub;
  49. GitHubIntegration: OverridableStub;
  50. GitHubIntegrationConfig: SimpleStub;
  51. GitHubIntegrationProvider: OverridableStub;
  52. GitHubRepositoryProvider: OverridableStub;
  53. GlobalSelection: OverridableStub;
  54. Group: OverridableStub;
  55. GroupStats: OverridableStub;
  56. GroupingConfigs: SimpleStub;
  57. GroupingEnhancements: SimpleStub;
  58. Groups: SimpleStub;
  59. Incident: OverridableStub;
  60. IncidentActivity: OverridableStub;
  61. IncidentStats: OverridableStub;
  62. IncidentTrigger: OverridableStub;
  63. InstallWizard: OverridableStub;
  64. JiraIntegration: OverridableStub;
  65. JiraIntegrationProvider: OverridableStub;
  66. Member: OverridableStub;
  67. Members: OverridableStubList;
  68. MetricRule: OverridableStub;
  69. MetricsField: OverridableStub;
  70. MetricsMeta: OverridableStub;
  71. MetricsSessionUserCountByStatusByRelease: SimpleStub;
  72. MetricsTotalCountByReleaseIn24h: SimpleStub;
  73. OrgOwnedApps: SimpleStub;
  74. Organization: OverridableStub;
  75. OrganizationEvent: OverridableStub;
  76. OrganizationIntegrations: OverridableStub;
  77. Organizations: OverridableStub;
  78. Outcomes: SimpleStub;
  79. OutcomesWithLowProcessedEvents: SimpleStub;
  80. OutcomesWithReason: SimpleStub;
  81. OutcomesWithoutClientDiscarded: SimpleStub;
  82. PhabricatorCreate: SimpleStub;
  83. PhabricatorPlugin: SimpleStub;
  84. PlatformExternalIssue: OverridableStub;
  85. Plugin: OverridableStub;
  86. PluginListConfig: SimpleStub;
  87. Plugins: OverridableStubList;
  88. Project: OverridableStub;
  89. ProjectAlertRule: OverridableStub;
  90. ProjectAlertRuleConfiguration: OverridableStub;
  91. ProjectDetails: OverridableStub;
  92. ProjectFilters: OverridableStubList;
  93. ProjectKeys: OverridableStubList;
  94. ProviderList: SimpleStub;
  95. PublishedApps: SimpleStub;
  96. PullRequest: OverridableStub;
  97. Release: (params?: any, healthParams?: any) => any;
  98. ReplayError: OverridableStub;
  99. ReplayList: OverridableStubList<ReplayListRecord>;
  100. ReplayRRWebDivHelloWorld: OverridableStub;
  101. ReplayRRWebNode: OverridableStub;
  102. ReplayRecord: OverridableStub<ReplayRecord>;
  103. ReplaySegmentBreadcrumb: OverridableStub;
  104. ReplaySegmentConsole: OverridableStub;
  105. ReplaySegmentFullsnapshot: OverridableStub;
  106. ReplaySegmentInit: OverridableStub;
  107. ReplaySegmentNavigation: OverridableStub;
  108. Repository: OverridableStub;
  109. RepositoryProjectPathConfig: OverridableStub;
  110. Search: OverridableStub;
  111. Searches: OverridableStubList;
  112. SentryApp: OverridableStub;
  113. SentryAppComponent: OverridableStub;
  114. SentryAppComponentAsync: OverridableStub;
  115. SentryAppComponentDependent: OverridableStub;
  116. SentryAppInstallation: OverridableStub;
  117. SentryAppInstalls: SimpleStub;
  118. SentryAppToken: OverridableStub;
  119. SentryAppWebhookRequest: OverridableStub;
  120. ServiceIncident: OverridableStub;
  121. SessionEmptyGroupedResponse: SimpleStub;
  122. SessionStatusCountByProjectInPeriod: SimpleStub;
  123. SessionStatusCountByReleaseInPeriod: SimpleStub;
  124. SessionTotalCountByProjectIn24h: SimpleStub;
  125. SessionUserCountByStatus: SimpleStub;
  126. SessionUserCountByStatus2: SimpleStub;
  127. SessionUserCountByStatusByRelease: SimpleStub;
  128. SessionUserStatusCountByProjectInPeriod: SimpleStub;
  129. SessionUserStatusCountByReleaseInPeriod: SimpleStub;
  130. SessionsField: OverridableStub;
  131. SesssionTotalCountByReleaseIn24h: SimpleStub;
  132. ShortIdQueryResult: OverridableStub;
  133. SourceMapArchive: OverridableStub;
  134. SourceMapArtifact: OverridableStub;
  135. SourceMapsDebugIDBundles: OverridableStub;
  136. SourceMapsDebugIDBundlesArtifacts: OverridableStub;
  137. Span: OverridableStub;
  138. Subscriptions: OverridableStubList;
  139. TagValues: OverridableStubList;
  140. Tags: OverridableStubList;
  141. Team: OverridableStub;
  142. TeamAlertsTriggered: SimpleStub;
  143. TeamIssuesBreakdown: SimpleStub;
  144. TeamIssuesReviewed: SimpleStub;
  145. TeamResolutionTime: SimpleStub;
  146. Tombstones: OverridableStubList;
  147. TraceError: OverridableStub;
  148. UpdateSdkAndEnableIntegrationSuggestion: SimpleStub;
  149. User: OverridableStub;
  150. UserDetails: OverridableStub;
  151. UserFeedback: OverridableStub;
  152. UserIdentity: SimpleStub;
  153. UserTotalCountByProjectIn24h: SimpleStub;
  154. UserTotalCountByReleaseIn24h: SimpleStub;
  155. VercelProvider: SimpleStub;
  156. VstsCreate: SimpleStub;
  157. VstsIntegrationProvider: OverridableStub;
  158. VstsPlugin: SimpleStub;
  159. // TODO: These need propertly typed still
  160. // Widget(queries = {...DEFAULT_QUERIES}, options)
  161. // Dashboard(widgets = DEFAULT_WIDGETS, props = {})
  162. // AsanaAutocomplete(type = 'project', values = [DEFAULT_AUTOCOMPLETE])
  163. // PhabricatorAutocomplete(type = 'project', values = null)
  164. // RoleList(params = [], fullAccess = false)
  165. // const MOCK_RESP_VERBOSE
  166. // const MOCK_RESP_ONLY_IGNORED_CONDITIONS_INVALID
  167. // const MOCK_RESP_INCONSISTENT_PLACEHOLDERS
  168. // const MOCK_RESP_INCONSISTENT_INTERVALS
  169. };
  170. export default TestStubFixtures;