Skip to content

Commit 37184e0

Browse files
authored
ref(endpoints): SentryApp endpoints module (#31749)
1 parent d64f477 commit 37184e0

File tree

25 files changed

+59
-29
lines changed

25 files changed

+59
-29
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ tests/js/spec/utils/profiling @getsentry/profi
190190
/src/sentry/api/endpoints/organization_plugins_configs.py @getsentry/ecosystem
191191
/src/sentry/api/endpoints/organization_plugins.py @getsentry/ecosystem
192192
/src/sentry/api/endpoints/organization_release_previous_commits.py @getsentry/ecosystem
193-
/src/sentry/api/endpoints/sentry_internal_app_token_details.py @getsentry/ecosystem
194-
/src/sentry/api/endpoints/sentry_internal_app_tokens.py @getsentry/ecosystem
193+
/src/sentry/api/endpoints/sentry_app/ @getsentry/ecosystem
195194

196195
/static/app/views/organizationIntegrations @getsentry/ecosystem
197196

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from .authorizations import SentryAppAuthorizationsEndpoint
2+
from .components import OrganizationSentryAppComponentsEndpoint, SentryAppComponentsEndpoint
3+
from .details import SentryAppDetailsEndpoint
4+
from .features import SentryAppFeaturesEndpoint
5+
from .index import SentryAppsEndpoint
6+
from .installation.details import SentryAppInstallationDetailsEndpoint
7+
from .installation.external_issue.actions import SentryAppInstallationExternalIssueActionsEndpoint
8+
from .installation.external_issue.details import SentryAppInstallationExternalIssueDetailsEndpoint
9+
from .installation.external_issue.index import SentryAppInstallationExternalIssuesEndpoint
10+
from .installation.external_requests import SentryAppInstallationExternalRequestsEndpoint
11+
from .installation.index import SentryAppInstallationsEndpoint
12+
from .interaction import SentryAppInteractionEndpoint
13+
from .internal_app_token.details import SentryInternalAppTokenDetailsEndpoint
14+
from .internal_app_token.index import SentryInternalAppTokensEndpoint
15+
from .publish_request import SentryAppPublishRequestEndpoint
16+
from .requests import SentryAppRequestsEndpoint
17+
from .stats.details import SentryAppStatsEndpoint
18+
from .stats.index import SentryAppsStatsEndpoint
19+
20+
__all__ = (
21+
"OrganizationSentryAppComponentsEndpoint",
22+
"SentryAppAuthorizationsEndpoint",
23+
"SentryAppComponentsEndpoint",
24+
"SentryAppDetailsEndpoint",
25+
"SentryAppFeaturesEndpoint",
26+
"SentryAppInstallationDetailsEndpoint",
27+
"SentryAppInstallationExternalIssueActionsEndpoint",
28+
"SentryAppInstallationExternalIssueDetailsEndpoint",
29+
"SentryAppInstallationExternalIssuesEndpoint",
30+
"SentryAppInstallationExternalRequestsEndpoint",
31+
"SentryAppInstallationsEndpoint",
32+
"SentryAppInteractionEndpoint",
33+
"SentryAppPublishRequestEndpoint",
34+
"SentryAppRequestsEndpoint",
35+
"SentryAppsEndpoint",
36+
"SentryAppsStatsEndpoint",
37+
"SentryAppStatsEndpoint",
38+
"SentryInternalAppTokenDetailsEndpoint",
39+
"SentryInternalAppTokensEndpoint",
40+
)

src/sentry/api/endpoints/sentry_app_components.py renamed to src/sentry/api/endpoints/sentry_app/components.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
from sentry.models import Project, SentryAppComponent, SentryAppInstallation
1515

1616

17+
# TODO(mgaeta): These endpoints are doing the same thing, but one takes a
18+
# project and the other takes a sentry app. It would be better to have a single
19+
# endpoint that can take project_id or sentry_app_id as a query parameter.
1720
class SentryAppComponentsEndpoint(SentryAppBaseEndpoint):
1821
def get(self, request: Request, sentry_app) -> Response:
1922
return self.paginate(
@@ -24,10 +27,6 @@ def get(self, request: Request, sentry_app) -> Response:
2427
)
2528

2629

27-
from rest_framework.request import Request
28-
from rest_framework.response import Response
29-
30-
3130
class OrganizationSentryAppComponentsEndpoint(OrganizationEndpoint):
3231
@add_integration_platform_metric_tag
3332
def get(self, request: Request, organization) -> Response:

src/sentry/api/endpoints/sentry_app/installation/__init__.py

Whitespace-only changes.

src/sentry/api/endpoints/sentry_app/installation/external_issue/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)