types.tsx 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. PhabricatorCreate: SimpleStub;
  77. PhabricatorPlugin: SimpleStub;
  78. PlatformExternalIssue: OverridableStub;
  79. Plugin: OverridableStub;
  80. PluginListConfig: SimpleStub;
  81. Plugins: OverridableStubList;
  82. Project: OverridableStub;
  83. ProjectAlertRule: OverridableStub;
  84. ProjectAlertRuleConfiguration: OverridableStub;
  85. ProjectDetails: OverridableStub;
  86. ProjectFilters: OverridableStubList;
  87. ProjectKeys: OverridableStubList;
  88. ProviderList: SimpleStub;
  89. PublishedApps: SimpleStub;
  90. PullRequest: OverridableStub;
  91. Release: (params?: any, healthParams?: any) => any;
  92. Repository: OverridableStub;
  93. Search: OverridableStub;
  94. Searches: OverridableStubList;
  95. SentryApp: OverridableStub;
  96. SentryAppComponent: OverridableStub;
  97. SentryAppComponentAsync: OverridableStub;
  98. SentryAppComponentDependent: OverridableStub;
  99. SentryAppInstallation: OverridableStub;
  100. SentryAppInstalls: SimpleStub;
  101. SentryAppToken: OverridableStub;
  102. SentryAppWebhookRequest: OverridableStub;
  103. ServiceIncident: OverridableStub;
  104. SessionEmptyGroupedResponse: SimpleStub;
  105. SessionStatusCountByProjectInPeriod: SimpleStub;
  106. SessionStatusCountByReleaseInPeriod: SimpleStub;
  107. SessionTotalCountByProjectIn24h: SimpleStub;
  108. SessionUserCountByStatus: SimpleStub;
  109. SessionUserCountByStatus2: SimpleStub;
  110. SessionUserCountByStatusByRelease: SimpleStub;
  111. SessionUserStatusCountByProjectInPeriod: SimpleStub;
  112. SessionUserStatusCountByReleaseInPeriod: SimpleStub;
  113. SessionsField: OverridableStub;
  114. SesssionTotalCountByReleaseIn24h: SimpleStub;
  115. ShortIdQueryResult: OverridableStub;
  116. SourceMapArchive: OverridableStub;
  117. SourceMapArtifact: OverridableStub;
  118. Span: OverridableStub;
  119. Subscriptions: OverridableStubList;
  120. TagValues: OverridableStubList;
  121. Tags: OverridableStubList;
  122. Team: OverridableStub;
  123. TeamAlertsTriggered: SimpleStub;
  124. TeamIssuesBreakdown: SimpleStub;
  125. TeamIssuesReviewed: SimpleStub;
  126. TeamResolutionTime: SimpleStub;
  127. Tombstones: OverridableStubList;
  128. TraceError: OverridableStub;
  129. UpdateSdkAndEnableIntegrationSuggestion: SimpleStub;
  130. User: OverridableStub;
  131. UserDetails: OverridableStub;
  132. UserFeedback: OverridableStub;
  133. UserIdentity: SimpleStub;
  134. UserTotalCountByProjectIn24h: SimpleStub;
  135. UserTotalCountByReleaseIn24h: SimpleStub;
  136. VercelProvider: SimpleStub;
  137. VstsCreate: SimpleStub;
  138. VstsIntegrationProvider: OverridableStub;
  139. VstsPlugin: SimpleStub;
  140. // TODO: These need propertly typed still
  141. // Widget(queries = {...DEFAULT_QUERIES}, options)
  142. // Dashboard(widgets = DEFAULT_WIDGETS, props = {})
  143. // AsanaAutocomplete(type = 'project', values = [DEFAULT_AUTOCOMPLETE])
  144. // PhabricatorAutocomplete(type = 'project', values = null)
  145. // RepositoryProjectPathConfig(project, repo, integration, params)
  146. // RoleList(params = [], fullAccess = false)
  147. // const MOCK_RESP_VERBOSE
  148. // const MOCK_RESP_ONLY_IGNORED_CONDITIONS_INVALID
  149. // const MOCK_RESP_INCONSISTENT_PLACEHOLDERS
  150. // const MOCK_RESP_INCONSISTENT_INTERVALS
  151. };
  152. export default TestStubFixtures;