types.tsx 5.6 KB

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