@keystrokehq/sentry 0.0.15 → 0.0.16-integration-id-canonicalization.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -187
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +4 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +6 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/{schemas.d.mts → schemas/index.d.mts} +3 -3
- package/dist/schemas/index.mjs +3 -0
- package/dist/{schemas.mjs → sentry-api-DjJ24hwX.mjs} +2 -2
- package/dist/sentry-app.credential-set-4DLRUKF9.d.mts +59 -0
- package/dist/sentry-app.credential-set-Cdj6Qxiz.mjs +23 -0
- package/dist/sentry.credential-set-2b3TPFqv.mjs +696 -0
- package/dist/view-organization-notification-actions.operation-BI2aB_Mj.mjs +4548 -0
- package/dist/view-organization-notification-actions.operation-C7pc8cl_.d.mts +6840 -0
- package/package.json +14 -121
- package/dist/_official/index.d.mts +0 -41
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -2
- package/dist/_runtime/index.mjs +0 -3
- package/dist/alerts.d.mts +0 -462
- package/dist/alerts.mjs +0 -300
- package/dist/client.d.mts +0 -86
- package/dist/client.mjs +0 -233
- package/dist/connection.d.mts +0 -3
- package/dist/connection.mjs +0 -3
- package/dist/dashboards.d.mts +0 -162
- package/dist/dashboards.mjs +0 -122
- package/dist/debug-files.d.mts +0 -102
- package/dist/debug-files.mjs +0 -73
- package/dist/deploys.d.mts +0 -86
- package/dist/deploys.mjs +0 -67
- package/dist/discover.d.mts +0 -194
- package/dist/discover.mjs +0 -138
- package/dist/endpoint-factory-DcT49a8O.mjs +0 -96
- package/dist/environments.d.mts +0 -96
- package/dist/environments.mjs +0 -71
- package/dist/errors-DfEFwcTe.mjs +0 -142
- package/dist/events-api.d.mts +0 -254
- package/dist/events-api.mjs +0 -184
- package/dist/events.d.mts +0 -754
- package/dist/events.mjs +0 -142
- package/dist/feedback.d.mts +0 -82
- package/dist/feedback.mjs +0 -63
- package/dist/integration-D7KCM1-p.mjs +0 -75
- package/dist/integration-veqa_7yB.d.mts +0 -33
- package/dist/issues.d.mts +0 -458
- package/dist/issues.mjs +0 -324
- package/dist/members.d.mts +0 -308
- package/dist/members.mjs +0 -156
- package/dist/messaging.d.mts +0 -1
- package/dist/messaging.mjs +0 -1
- package/dist/monitors.d.mts +0 -458
- package/dist/monitors.mjs +0 -234
- package/dist/notifications.d.mts +0 -180
- package/dist/notifications.mjs +0 -133
- package/dist/organizations.d.mts +0 -442
- package/dist/organizations.mjs +0 -334
- package/dist/pagination-PlgAqbZt.mjs +0 -116
- package/dist/project-keys.d.mts +0 -246
- package/dist/project-keys.mjs +0 -122
- package/dist/projects.d.mts +0 -534
- package/dist/projects.mjs +0 -378
- package/dist/releases.d.mts +0 -780
- package/dist/releases.mjs +0 -479
- package/dist/replays.d.mts +0 -234
- package/dist/replays.mjs +0 -192
- package/dist/scim.d.mts +0 -324
- package/dist/scim.mjs +0 -249
- package/dist/scopes-RRU0vt-a.mjs +0 -36
- package/dist/teams.d.mts +0 -448
- package/dist/teams.mjs +0 -266
- package/dist/triggers.d.mts +0 -41
- package/dist/triggers.mjs +0 -56
- package/dist/user-emails.d.mts +0 -84
- package/dist/user-emails.mjs +0 -60
- package/dist/verification.d.mts +0 -30
- package/dist/verification.mjs +0 -83
- package/dist/webhooks.d.mts +0 -158
- package/dist/webhooks.mjs +0 -108
package/dist/events.mjs
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { sentryActorSchema, sentryJsonObjectSchema } from "./schemas.mjs";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/events.ts
|
|
5
|
-
/**
|
|
6
|
-
* Sentry integration-platform webhook payload schemas.
|
|
7
|
-
*
|
|
8
|
-
* Every payload follows the same envelope:
|
|
9
|
-
* { action, installation: { uuid }, data: {...}, actor: {...} }
|
|
10
|
-
*
|
|
11
|
-
* `action` names the specific event within a resource family; the resource
|
|
12
|
-
* family itself is conveyed via the `Sentry-Hook-Resource` header which the
|
|
13
|
-
* trigger dispatcher uses for routing. We parse with top-level strictness
|
|
14
|
-
* and allow `.passthrough()` on nested payload objects to tolerate field
|
|
15
|
-
* additions by Sentry without forcing a schema rev.
|
|
16
|
-
*/
|
|
17
|
-
const sentryInstallationRefSchema = z.object({ uuid: z.string().min(1) }).passthrough();
|
|
18
|
-
function envelope(action, dataSchema) {
|
|
19
|
-
return z.object({
|
|
20
|
-
action: z.literal(action),
|
|
21
|
-
installation: sentryInstallationRefSchema,
|
|
22
|
-
data: dataSchema,
|
|
23
|
-
actor: sentryActorSchema.optional()
|
|
24
|
-
}).passthrough();
|
|
25
|
-
}
|
|
26
|
-
const sentryIssueWebhookDataSchema = z.object({ issue: z.object({
|
|
27
|
-
id: z.string().min(1),
|
|
28
|
-
shortId: z.string().optional(),
|
|
29
|
-
title: z.string().optional(),
|
|
30
|
-
culprit: z.string().nullable().optional(),
|
|
31
|
-
project: sentryJsonObjectSchema.optional(),
|
|
32
|
-
status: z.string().optional(),
|
|
33
|
-
level: z.string().optional(),
|
|
34
|
-
platform: z.string().nullable().optional(),
|
|
35
|
-
url: z.string().url().optional(),
|
|
36
|
-
web_url: z.string().url().optional()
|
|
37
|
-
}).passthrough() }).passthrough();
|
|
38
|
-
const sentryIssueCreatedEventSchema = envelope("created", sentryIssueWebhookDataSchema);
|
|
39
|
-
const sentryIssueResolvedEventSchema = envelope("resolved", sentryIssueWebhookDataSchema);
|
|
40
|
-
const sentryIssueAssignedEventSchema = envelope("assigned", sentryIssueWebhookDataSchema);
|
|
41
|
-
const sentryIssueUnresolvedEventSchema = envelope("unresolved", sentryIssueWebhookDataSchema);
|
|
42
|
-
const sentryIssueIgnoredEventSchema = envelope("ignored", sentryIssueWebhookDataSchema);
|
|
43
|
-
const sentryIssueArchivedEventSchema = envelope("archived", sentryIssueWebhookDataSchema);
|
|
44
|
-
const sentryInstallationWebhookDataSchema = z.object({ installation: z.object({
|
|
45
|
-
uuid: z.string().min(1),
|
|
46
|
-
status: z.string().optional(),
|
|
47
|
-
organization: sentryJsonObjectSchema.optional(),
|
|
48
|
-
app: sentryJsonObjectSchema.optional()
|
|
49
|
-
}).passthrough() }).passthrough();
|
|
50
|
-
const sentryInstallationCreatedEventSchema = envelope("created", sentryInstallationWebhookDataSchema);
|
|
51
|
-
const sentryInstallationDeletedEventSchema = envelope("deleted", sentryInstallationWebhookDataSchema);
|
|
52
|
-
const sentryErrorWebhookDataSchema = z.object({ error: z.object({
|
|
53
|
-
event_id: z.string().optional(),
|
|
54
|
-
project: z.union([z.string(), z.number()]).optional(),
|
|
55
|
-
issue_id: z.string().optional(),
|
|
56
|
-
title: z.string().optional(),
|
|
57
|
-
message: z.string().optional(),
|
|
58
|
-
datetime: z.string().optional(),
|
|
59
|
-
web_url: z.string().url().optional()
|
|
60
|
-
}).passthrough() }).passthrough();
|
|
61
|
-
const sentryErrorCreatedEventSchema = envelope("created", sentryErrorWebhookDataSchema);
|
|
62
|
-
const sentryCommentWebhookDataSchema = z.object({
|
|
63
|
-
comment_id: z.union([z.string(), z.number()]).optional(),
|
|
64
|
-
comment: z.string().optional(),
|
|
65
|
-
issue_id: z.union([z.string(), z.number()]).optional(),
|
|
66
|
-
project_slug: z.string().optional(),
|
|
67
|
-
timestamp: z.string().optional()
|
|
68
|
-
}).passthrough();
|
|
69
|
-
const sentryCommentCreatedEventSchema = envelope("created", sentryCommentWebhookDataSchema);
|
|
70
|
-
const sentryCommentUpdatedEventSchema = envelope("updated", sentryCommentWebhookDataSchema);
|
|
71
|
-
const sentryCommentDeletedEventSchema = envelope("deleted", sentryCommentWebhookDataSchema);
|
|
72
|
-
const sentryEventAlertWebhookDataSchema = z.object({
|
|
73
|
-
event: sentryJsonObjectSchema.optional(),
|
|
74
|
-
triggered_rule: z.string().optional(),
|
|
75
|
-
issue_alert: sentryJsonObjectSchema.optional(),
|
|
76
|
-
issue_id: z.union([z.string(), z.number()]).optional()
|
|
77
|
-
}).passthrough();
|
|
78
|
-
const sentryEventAlertTriggeredEventSchema = envelope("triggered", sentryEventAlertWebhookDataSchema);
|
|
79
|
-
const sentryMetricAlertWebhookDataSchema = z.object({
|
|
80
|
-
metric_alert: z.object({
|
|
81
|
-
id: z.union([z.string(), z.number()]),
|
|
82
|
-
identifier: z.string().optional(),
|
|
83
|
-
status: z.string().optional(),
|
|
84
|
-
title: z.string().optional()
|
|
85
|
-
}).passthrough(),
|
|
86
|
-
description_text: z.string().optional(),
|
|
87
|
-
description_title: z.string().optional(),
|
|
88
|
-
web_url: z.string().url().optional()
|
|
89
|
-
}).passthrough();
|
|
90
|
-
const sentryMetricAlertCriticalEventSchema = envelope("critical", sentryMetricAlertWebhookDataSchema);
|
|
91
|
-
const sentryMetricAlertWarningEventSchema = envelope("warning", sentryMetricAlertWebhookDataSchema);
|
|
92
|
-
const sentryMetricAlertResolvedEventSchema = envelope("resolved", sentryMetricAlertWebhookDataSchema);
|
|
93
|
-
const sentrySeerCommonDataSchema = z.object({
|
|
94
|
-
run_id: z.number(),
|
|
95
|
-
group_id: z.number()
|
|
96
|
-
}).passthrough();
|
|
97
|
-
const sentrySeerRootCauseCompletedDataSchema = sentrySeerCommonDataSchema.extend({ root_cause: sentryJsonObjectSchema.optional() });
|
|
98
|
-
const sentrySeerSolutionCompletedDataSchema = sentrySeerCommonDataSchema.extend({ solution: sentryJsonObjectSchema.optional() });
|
|
99
|
-
const sentrySeerCodingCompletedDataSchema = sentrySeerCommonDataSchema.extend({ changes: z.array(sentryJsonObjectSchema).optional() });
|
|
100
|
-
const sentrySeerPrCreatedDataSchema = sentrySeerCommonDataSchema.extend({ pull_requests: z.array(sentryJsonObjectSchema).optional() });
|
|
101
|
-
const sentrySeerRootCauseStartedEventSchema = envelope("root_cause_started", sentrySeerCommonDataSchema);
|
|
102
|
-
const sentrySeerRootCauseCompletedEventSchema = envelope("root_cause_completed", sentrySeerRootCauseCompletedDataSchema);
|
|
103
|
-
const sentrySeerSolutionStartedEventSchema = envelope("solution_started", sentrySeerCommonDataSchema);
|
|
104
|
-
const sentrySeerSolutionCompletedEventSchema = envelope("solution_completed", sentrySeerSolutionCompletedDataSchema);
|
|
105
|
-
const sentrySeerCodingStartedEventSchema = envelope("coding_started", sentrySeerCommonDataSchema);
|
|
106
|
-
const sentrySeerCodingCompletedEventSchema = envelope("coding_completed", sentrySeerCodingCompletedDataSchema);
|
|
107
|
-
const sentrySeerPrCreatedEventSchema = envelope("pr_created", sentrySeerPrCreatedDataSchema);
|
|
108
|
-
const sentryPreprodArtifactCommonDataSchema = z.object({
|
|
109
|
-
buildId: z.string().min(1),
|
|
110
|
-
organizationSlug: z.string().optional(),
|
|
111
|
-
projectSlug: z.string().optional(),
|
|
112
|
-
platform: z.string().nullable().optional(),
|
|
113
|
-
state: z.enum(["COMPLETED", "FAILED"]),
|
|
114
|
-
appInfo: sentryJsonObjectSchema.optional(),
|
|
115
|
-
gitInfo: sentryJsonObjectSchema.nullable().optional(),
|
|
116
|
-
errorCode: z.string().nullable().optional(),
|
|
117
|
-
errorMessage: z.string().nullable().optional()
|
|
118
|
-
}).passthrough();
|
|
119
|
-
const sentryPreprodArtifactSizeAnalysisCompletedEventSchema = envelope("size_analysis_completed", sentryPreprodArtifactCommonDataSchema);
|
|
120
|
-
const sentryPreprodArtifactBuildDistributionCompletedEventSchema = envelope("build_distribution_completed", sentryPreprodArtifactCommonDataSchema);
|
|
121
|
-
/**
|
|
122
|
-
* Legacy per-project service hooks deliver a simpler envelope that omits the
|
|
123
|
-
* `installation` object because the hook is not installed as an
|
|
124
|
-
* integration. We accept both `data.event_id` (pre-2022 shape) and
|
|
125
|
-
* `event_id` at the top level (newer shape).
|
|
126
|
-
*/
|
|
127
|
-
const sentryServiceHookEventAlertSchema = z.object({
|
|
128
|
-
action: z.string(),
|
|
129
|
-
project: z.string().optional(),
|
|
130
|
-
project_name: z.string().optional(),
|
|
131
|
-
event: sentryJsonObjectSchema.optional(),
|
|
132
|
-
data: sentryJsonObjectSchema.optional(),
|
|
133
|
-
triggered_rule: z.string().optional(),
|
|
134
|
-
event_id: z.string().optional()
|
|
135
|
-
}).passthrough();
|
|
136
|
-
const sentryDiscoverEventsPollResponseSchema = z.object({
|
|
137
|
-
data: z.array(sentryJsonObjectSchema),
|
|
138
|
-
meta: sentryJsonObjectSchema.optional()
|
|
139
|
-
}).passthrough();
|
|
140
|
-
|
|
141
|
-
//#endregion
|
|
142
|
-
export { sentryCommentCreatedEventSchema, sentryCommentDeletedEventSchema, sentryCommentUpdatedEventSchema, sentryCommentWebhookDataSchema, sentryDiscoverEventsPollResponseSchema, sentryErrorCreatedEventSchema, sentryErrorWebhookDataSchema, sentryEventAlertTriggeredEventSchema, sentryEventAlertWebhookDataSchema, sentryInstallationCreatedEventSchema, sentryInstallationDeletedEventSchema, sentryInstallationRefSchema, sentryInstallationWebhookDataSchema, sentryIssueArchivedEventSchema, sentryIssueAssignedEventSchema, sentryIssueCreatedEventSchema, sentryIssueIgnoredEventSchema, sentryIssueResolvedEventSchema, sentryIssueUnresolvedEventSchema, sentryIssueWebhookDataSchema, sentryMetricAlertCriticalEventSchema, sentryMetricAlertResolvedEventSchema, sentryMetricAlertWarningEventSchema, sentryMetricAlertWebhookDataSchema, sentryPreprodArtifactBuildDistributionCompletedEventSchema, sentryPreprodArtifactCommonDataSchema, sentryPreprodArtifactSizeAnalysisCompletedEventSchema, sentrySeerCodingCompletedDataSchema, sentrySeerCodingCompletedEventSchema, sentrySeerCodingStartedEventSchema, sentrySeerCommonDataSchema, sentrySeerPrCreatedDataSchema, sentrySeerPrCreatedEventSchema, sentrySeerRootCauseCompletedDataSchema, sentrySeerRootCauseCompletedEventSchema, sentrySeerRootCauseStartedEventSchema, sentrySeerSolutionCompletedDataSchema, sentrySeerSolutionCompletedEventSchema, sentrySeerSolutionStartedEventSchema, sentryServiceHookEventAlertSchema };
|
package/dist/feedback.d.mts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/feedback.d.ts
|
|
5
|
-
declare const retrieveUserFeedbackForProject: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
6
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
7
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
query: z.ZodOptional<z.ZodString>;
|
|
9
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
10
|
-
project_slug: z.ZodString;
|
|
11
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
12
|
-
id: z.ZodOptional<z.ZodString>;
|
|
13
|
-
event_id: z.ZodOptional<z.ZodString>;
|
|
14
|
-
name: z.ZodOptional<z.ZodString>;
|
|
15
|
-
email: z.ZodOptional<z.ZodString>;
|
|
16
|
-
comments: z.ZodOptional<z.ZodString>;
|
|
17
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
18
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
19
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
20
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
21
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, z.core.$strip>>], undefined>;
|
|
23
|
-
declare const submitProjectUserFeedback: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
24
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
25
|
-
project_slug: z.ZodString;
|
|
26
|
-
event_id: z.ZodString;
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
email: z.ZodString;
|
|
29
|
-
comments: z.ZodString;
|
|
30
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
-
id: z.ZodOptional<z.ZodString>;
|
|
32
|
-
event_id: z.ZodOptional<z.ZodString>;
|
|
33
|
-
name: z.ZodOptional<z.ZodString>;
|
|
34
|
-
email: z.ZodOptional<z.ZodString>;
|
|
35
|
-
comments: z.ZodOptional<z.ZodString>;
|
|
36
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
37
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
38
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
39
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
40
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
41
|
-
}, z.core.$strip>>], undefined>;
|
|
42
|
-
declare const sentryFeedbackOperations: {
|
|
43
|
-
readonly retrieveUserFeedbackForProject: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
44
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
45
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
46
|
-
query: z.ZodOptional<z.ZodString>;
|
|
47
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
48
|
-
project_slug: z.ZodString;
|
|
49
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
50
|
-
id: z.ZodOptional<z.ZodString>;
|
|
51
|
-
event_id: z.ZodOptional<z.ZodString>;
|
|
52
|
-
name: z.ZodOptional<z.ZodString>;
|
|
53
|
-
email: z.ZodOptional<z.ZodString>;
|
|
54
|
-
comments: z.ZodOptional<z.ZodString>;
|
|
55
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
56
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
57
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
58
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
59
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
60
|
-
}, z.core.$strip>>], undefined>;
|
|
61
|
-
readonly submitProjectUserFeedback: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
62
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
63
|
-
project_slug: z.ZodString;
|
|
64
|
-
event_id: z.ZodString;
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
email: z.ZodString;
|
|
67
|
-
comments: z.ZodString;
|
|
68
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
-
id: z.ZodOptional<z.ZodString>;
|
|
70
|
-
event_id: z.ZodOptional<z.ZodString>;
|
|
71
|
-
name: z.ZodOptional<z.ZodString>;
|
|
72
|
-
email: z.ZodOptional<z.ZodString>;
|
|
73
|
-
comments: z.ZodOptional<z.ZodString>;
|
|
74
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
75
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
76
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
77
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
78
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
79
|
-
}, z.core.$strip>>], undefined>;
|
|
80
|
-
};
|
|
81
|
-
//#endregion
|
|
82
|
-
export { retrieveUserFeedbackForProject, sentryFeedbackOperations, submitProjectUserFeedback };
|
package/dist/feedback.mjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { orgProjectScopeInputSchema, sentryFeedbackSchema, sentryIdSchema, sentryListInputSchema } from "./schemas.mjs";
|
|
2
|
-
import { t as defineSentryEndpoint } from "./endpoint-factory-DcT49a8O.mjs";
|
|
3
|
-
import { t as SENTRY_SCOPE } from "./scopes-RRU0vt-a.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/feedback.ts
|
|
7
|
-
/**
|
|
8
|
-
* Sentry user-feedback operations. Maps to PLAN.md §6.18 (2 actions).
|
|
9
|
-
*/
|
|
10
|
-
const ORG_PROJECT = [{
|
|
11
|
-
name: "organization_slug",
|
|
12
|
-
placeholder: "{organization_slug}"
|
|
13
|
-
}, {
|
|
14
|
-
name: "project_slug",
|
|
15
|
-
placeholder: "{project_slug}"
|
|
16
|
-
}];
|
|
17
|
-
const retrieveUserFeedbackForProject = defineSentryEndpoint({
|
|
18
|
-
id: "sentry.retrieve-user-feedback-for-project",
|
|
19
|
-
name: "List User Feedback",
|
|
20
|
-
description: "List user feedback submissions for a project.",
|
|
21
|
-
method: "GET",
|
|
22
|
-
path: "/api/0/projects/{organization_slug}/{project_slug}/user-feedback/",
|
|
23
|
-
pathParams: ORG_PROJECT,
|
|
24
|
-
input: sentryListInputSchema.merge(orgProjectScopeInputSchema),
|
|
25
|
-
queryFields: [
|
|
26
|
-
"cursor",
|
|
27
|
-
"per_page",
|
|
28
|
-
"query"
|
|
29
|
-
],
|
|
30
|
-
output: z.array(sentryFeedbackSchema),
|
|
31
|
-
pagination: "cursor",
|
|
32
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
|
|
33
|
-
});
|
|
34
|
-
const submitProjectUserFeedback = defineSentryEndpoint({
|
|
35
|
-
id: "sentry.submit-project-user-feedback",
|
|
36
|
-
name: "Submit User Feedback",
|
|
37
|
-
description: "Submit a user-feedback record against an event.",
|
|
38
|
-
method: "POST",
|
|
39
|
-
path: "/api/0/projects/{organization_slug}/{project_slug}/user-feedback/",
|
|
40
|
-
pathParams: ORG_PROJECT,
|
|
41
|
-
input: orgProjectScopeInputSchema.extend({
|
|
42
|
-
event_id: sentryIdSchema,
|
|
43
|
-
name: z.string().min(1),
|
|
44
|
-
email: z.string().email(),
|
|
45
|
-
comments: z.string().min(1)
|
|
46
|
-
}),
|
|
47
|
-
bodyFields: [
|
|
48
|
-
"event_id",
|
|
49
|
-
"name",
|
|
50
|
-
"email",
|
|
51
|
-
"comments"
|
|
52
|
-
],
|
|
53
|
-
output: sentryFeedbackSchema,
|
|
54
|
-
needsApproval: true,
|
|
55
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
|
|
56
|
-
});
|
|
57
|
-
const sentryFeedbackOperations = {
|
|
58
|
-
retrieveUserFeedbackForProject,
|
|
59
|
-
submitProjectUserFeedback
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
export { retrieveUserFeedbackForProject, sentryFeedbackOperations, submitProjectUserFeedback };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { CredentialSet } from "@keystrokehq/core";
|
|
2
|
-
import { defineOfficialIntegration, officialCredentialSetId } from "@keystrokehq/integration-authoring/official";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
|
|
5
|
-
//#region src/_official/provider-app.ts
|
|
6
|
-
/**
|
|
7
|
-
* Internal Keystroke-owned Sentry app credentials.
|
|
8
|
-
*
|
|
9
|
-
* For Sentry, `clientSecret` doubles as the webhook signing secret per
|
|
10
|
-
* <https://docs.sentry.io/organization/integrations/integration-platform/webhooks/>,
|
|
11
|
-
* so `webhookSecret` is kept as a discrete field for symmetry with other
|
|
12
|
-
* integrations even though in practice platforms will populate both from the
|
|
13
|
-
* same Sentry-issued value.
|
|
14
|
-
*/
|
|
15
|
-
const sentryAppCredentialSet = new CredentialSet({
|
|
16
|
-
id: officialCredentialSetId("sentry-app"),
|
|
17
|
-
credentialType: "manual",
|
|
18
|
-
exposure: "platform-only",
|
|
19
|
-
name: "Sentry App",
|
|
20
|
-
auth: z.object({
|
|
21
|
-
clientId: z.string(),
|
|
22
|
-
clientSecret: z.string(),
|
|
23
|
-
webhookSecret: z.string()
|
|
24
|
-
})
|
|
25
|
-
});
|
|
26
|
-
const sentryOfficialProviderSeed = {
|
|
27
|
-
provider: "sentry",
|
|
28
|
-
appRef: "sentry-official",
|
|
29
|
-
displayName: "Sentry Platform",
|
|
30
|
-
credentialSetName: "Keystroke Sentry Platform App",
|
|
31
|
-
envShape: {
|
|
32
|
-
KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID: z.string().optional(),
|
|
33
|
-
KEYSTROKE_OFFICIAL_SENTRY_CLIENT_SECRET: z.string().optional(),
|
|
34
|
-
KEYSTROKE_OFFICIAL_SENTRY_WEBHOOK_SECRET: z.string().optional()
|
|
35
|
-
},
|
|
36
|
-
requiredEnvKeys: [
|
|
37
|
-
"KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID",
|
|
38
|
-
"KEYSTROKE_OFFICIAL_SENTRY_CLIENT_SECRET",
|
|
39
|
-
"KEYSTROKE_OFFICIAL_SENTRY_WEBHOOK_SECRET"
|
|
40
|
-
],
|
|
41
|
-
externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID",
|
|
42
|
-
buildCredentials: (env) => ({
|
|
43
|
-
clientId: env.KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID,
|
|
44
|
-
clientSecret: env.KEYSTROKE_OFFICIAL_SENTRY_CLIENT_SECRET,
|
|
45
|
-
webhookSecret: env.KEYSTROKE_OFFICIAL_SENTRY_WEBHOOK_SECRET
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/integration.ts
|
|
51
|
-
const sentryAuthSchema = z.object({
|
|
52
|
-
SENTRY_ACCESS_TOKEN: z.string().min(1),
|
|
53
|
-
SENTRY_REGION_URL: z.string().url().optional(),
|
|
54
|
-
SENTRY_ORG_SLUG: z.string().min(1).optional()
|
|
55
|
-
});
|
|
56
|
-
const sentryOfficialIntegration = {
|
|
57
|
-
id: "sentry",
|
|
58
|
-
name: "Sentry",
|
|
59
|
-
description: "Sentry — issue lifecycle, release tracking, alerts, monitors, replays, feedback, and integration-platform webhook triggers",
|
|
60
|
-
auth: sentryAuthSchema,
|
|
61
|
-
proxy: { hosts: [
|
|
62
|
-
"sentry.io",
|
|
63
|
-
"us.sentry.io",
|
|
64
|
-
"de.sentry.io"
|
|
65
|
-
] },
|
|
66
|
-
credentialType: "oauth"
|
|
67
|
-
};
|
|
68
|
-
const sentryBundle = defineOfficialIntegration({
|
|
69
|
-
...sentryOfficialIntegration,
|
|
70
|
-
internal: { providerApp: sentryAppCredentialSet }
|
|
71
|
-
});
|
|
72
|
-
const sentry = sentryBundle.credentialSet;
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
export { sentryOfficialProviderSeed as a, sentryAppCredentialSet as i, sentryBundle as n, sentryOfficialIntegration as r, sentry as t };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
5
|
-
|
|
6
|
-
//#region src/integration.d.ts
|
|
7
|
-
declare const sentryOfficialIntegration: {
|
|
8
|
-
id: "sentry";
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
auth: z.ZodObject<{
|
|
12
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
13
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
14
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, z.core.$strip>;
|
|
16
|
-
proxy: {
|
|
17
|
-
hosts: string[];
|
|
18
|
-
};
|
|
19
|
-
credentialType: "oauth";
|
|
20
|
-
};
|
|
21
|
-
declare const sentryBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"sentry", z.ZodObject<{
|
|
22
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
23
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
24
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
25
|
-
}, z.core.$strip>>;
|
|
26
|
-
declare const sentry: _keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
27
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
28
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
29
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
type SentryIntegrationCredentials = InferCredentialSetAuth<typeof sentry>;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { sentryOfficialIntegration as i, sentry as n, sentryBundle as r, SentryIntegrationCredentials as t };
|