@keystrokehq/sentry 0.0.11 → 0.0.12
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/dist/_official/index.d.mts +1 -1
- package/dist/_official/index.mjs +1 -1
- package/dist/_runtime/index.d.mts +1 -1
- package/dist/_runtime/index.mjs +1 -1
- package/dist/alerts.d.mts +22 -22
- package/dist/alerts.mjs +1 -1
- package/dist/connection.d.mts +1 -1
- package/dist/connection.mjs +1 -1
- package/dist/dashboards.d.mts +10 -10
- package/dist/dashboards.mjs +1 -1
- package/dist/debug-files.d.mts +6 -6
- package/dist/debug-files.mjs +1 -1
- package/dist/deploys.d.mts +4 -4
- package/dist/deploys.mjs +1 -1
- package/dist/discover.d.mts +10 -10
- package/dist/discover.mjs +1 -1
- package/dist/{endpoint-factory-Cizk4imV.mjs → endpoint-factory-C0WIFmtK.mjs} +1 -2
- package/dist/environments.d.mts +6 -6
- package/dist/environments.mjs +1 -1
- package/dist/events-api.d.mts +14 -14
- package/dist/events-api.mjs +1 -1
- package/dist/feedback.d.mts +4 -4
- package/dist/feedback.mjs +1 -1
- package/dist/integration-DCNn_9vz.mjs +356 -0
- package/dist/{integration-BaLZqIqf.d.mts → integration-rmp485nJ.d.mts} +2 -3
- package/dist/issues.d.mts +36 -36
- package/dist/issues.mjs +1 -1
- package/dist/members.d.mts +14 -14
- package/dist/members.mjs +1 -1
- package/dist/monitors.d.mts +44 -44
- package/dist/monitors.mjs +1 -1
- package/dist/notifications.d.mts +10 -10
- package/dist/notifications.mjs +1 -1
- package/dist/organizations.d.mts +30 -30
- package/dist/organizations.mjs +1 -1
- package/dist/project-keys.d.mts +10 -10
- package/dist/project-keys.mjs +1 -1
- package/dist/projects.d.mts +38 -38
- package/dist/projects.mjs +1 -1
- package/dist/releases.d.mts +44 -44
- package/dist/releases.mjs +1 -1
- package/dist/replays.d.mts +18 -18
- package/dist/replays.mjs +1 -1
- package/dist/schemas.d.mts +6 -6
- package/dist/scim.d.mts +22 -22
- package/dist/scim.mjs +1 -1
- package/dist/teams.d.mts +28 -28
- package/dist/teams.mjs +1 -1
- package/dist/triggers.d.mts +59 -3
- package/dist/triggers.mjs +51 -1
- package/dist/user-emails.d.mts +8 -8
- package/dist/user-emails.mjs +1 -1
- package/dist/webhooks.d.mts +10 -10
- package/dist/webhooks.mjs +1 -1
- package/package.json +5 -5
- package/dist/integration-Q9y2TMhZ.mjs +0 -156
package/dist/user-emails.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ declare const retrieveUserEmailInformation: _keystrokehq_core0.Operation<z.ZodOb
|
|
|
7
7
|
email: z.ZodString;
|
|
8
8
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
10
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
11
11
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
12
12
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
13
13
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -22,7 +22,7 @@ declare const addRemoveUserEmailById: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
22
22
|
email: z.ZodString;
|
|
23
23
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
24
24
|
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
25
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
26
26
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
27
27
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
28
28
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -37,7 +37,7 @@ declare const updateUserEmail: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
37
37
|
email: z.ZodString;
|
|
38
38
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
39
39
|
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
40
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
41
41
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
42
42
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
43
43
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -48,7 +48,7 @@ declare const updateUserEmail: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
48
48
|
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
49
49
|
declare const deleteUserEmailsById: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
50
50
|
email: z.ZodString;
|
|
51
|
-
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
51
|
+
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
52
52
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
53
53
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
54
54
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -62,7 +62,7 @@ declare const sentryUserEmailOperations: {
|
|
|
62
62
|
email: z.ZodString;
|
|
63
63
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
64
64
|
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
65
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
66
66
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
67
67
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
68
68
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -77,7 +77,7 @@ declare const sentryUserEmailOperations: {
|
|
|
77
77
|
email: z.ZodString;
|
|
78
78
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
79
79
|
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
80
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
81
81
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
82
82
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
83
83
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -92,7 +92,7 @@ declare const sentryUserEmailOperations: {
|
|
|
92
92
|
email: z.ZodString;
|
|
93
93
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
94
94
|
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
95
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
96
96
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
97
97
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
98
98
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -103,7 +103,7 @@ declare const sentryUserEmailOperations: {
|
|
|
103
103
|
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
104
104
|
readonly deleteUserEmailsById: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
105
105
|
email: z.ZodString;
|
|
106
|
-
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
106
|
+
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
107
107
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
108
108
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
109
109
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
package/dist/user-emails.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sentryUserEmailSchema } from "./schemas.mjs";
|
|
2
|
-
import { t as defineSentryEndpoint } from "./endpoint-factory-
|
|
2
|
+
import { t as defineSentryEndpoint } from "./endpoint-factory-C0WIFmtK.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/user-emails.ts
|
package/dist/webhooks.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ declare const createProjectWebhookSubscription: _keystrokehq_core0.Operation<z.Z
|
|
|
14
14
|
events: z.ZodArray<z.ZodString>;
|
|
15
15
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
16
16
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
17
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
18
18
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
19
19
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
20
20
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -35,7 +35,7 @@ declare const retrieveProjectHooks: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
35
35
|
events: z.ZodArray<z.ZodString>;
|
|
36
36
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
37
37
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
38
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
39
39
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
40
40
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
41
41
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -54,7 +54,7 @@ declare const getProjectHook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
54
54
|
events: z.ZodArray<z.ZodString>;
|
|
55
55
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
56
56
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
57
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
58
58
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
59
59
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
60
60
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -76,7 +76,7 @@ declare const updateWebhookConfiguration: _keystrokehq_core0.Operation<z.ZodObje
|
|
|
76
76
|
events: z.ZodArray<z.ZodString>;
|
|
77
77
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
78
78
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
79
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
80
80
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
81
81
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
82
82
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -89,7 +89,7 @@ declare const deleteProjectHook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
89
89
|
organization_slug: z.ZodOptional<z.ZodString>;
|
|
90
90
|
project_slug: z.ZodString;
|
|
91
91
|
hook_id: z.ZodString;
|
|
92
|
-
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
92
|
+
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
93
93
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
94
94
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
95
95
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -110,7 +110,7 @@ declare const sentryWebhookOperations: {
|
|
|
110
110
|
events: z.ZodArray<z.ZodString>;
|
|
111
111
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
112
112
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
113
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
114
114
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
115
115
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
116
116
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -131,7 +131,7 @@ declare const sentryWebhookOperations: {
|
|
|
131
131
|
events: z.ZodArray<z.ZodString>;
|
|
132
132
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
133
133
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
134
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
135
135
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
136
136
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
137
137
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -150,7 +150,7 @@ declare const sentryWebhookOperations: {
|
|
|
150
150
|
events: z.ZodArray<z.ZodString>;
|
|
151
151
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
152
152
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
153
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
154
154
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
155
155
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
156
156
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -172,7 +172,7 @@ declare const sentryWebhookOperations: {
|
|
|
172
172
|
events: z.ZodArray<z.ZodString>;
|
|
173
173
|
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
174
174
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
175
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
176
176
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
177
177
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
178
178
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
@@ -185,7 +185,7 @@ declare const sentryWebhookOperations: {
|
|
|
185
185
|
organization_slug: z.ZodOptional<z.ZodString>;
|
|
186
186
|
project_slug: z.ZodString;
|
|
187
187
|
hook_id: z.ZodString;
|
|
188
|
-
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
188
|
+
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
189
189
|
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
190
190
|
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
191
191
|
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
package/dist/webhooks.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { orgProjectScopeInputSchema, sentryIdSchema, sentryListInputSchema, sentryProjectHookSchema } from "./schemas.mjs";
|
|
2
|
-
import { t as defineSentryEndpoint } from "./endpoint-factory-
|
|
2
|
+
import { t as defineSentryEndpoint } from "./endpoint-factory-C0WIFmtK.mjs";
|
|
3
3
|
import { t as SENTRY_SCOPE } from "./scopes-RRU0vt-a.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/sentry",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -136,8 +136,6 @@
|
|
|
136
136
|
"LICENSE"
|
|
137
137
|
],
|
|
138
138
|
"dependencies": {
|
|
139
|
-
"@keystrokehq/credential-connection": "^1.0.0",
|
|
140
|
-
"@keystrokehq/integration-authoring": "^0.0.8",
|
|
141
139
|
"zod": "^4.3.6"
|
|
142
140
|
},
|
|
143
141
|
"peerDependencies": {
|
|
@@ -148,9 +146,11 @@
|
|
|
148
146
|
"tsdown": "^0.20.3",
|
|
149
147
|
"typescript": "^5.9.3",
|
|
150
148
|
"vitest": "^4.0.18",
|
|
151
|
-
"@keystrokehq/core": "^0.0.
|
|
149
|
+
"@keystrokehq/core": "^0.0.12",
|
|
152
150
|
"@keystrokehq/test-utils": "0.0.0",
|
|
153
|
-
"@keystrokehq/
|
|
151
|
+
"@keystrokehq/credential-connection": "1.0.0",
|
|
152
|
+
"@keystrokehq/typescript-config": "0.0.0",
|
|
153
|
+
"@keystrokehq/integration-authoring": "0.0.9"
|
|
154
154
|
},
|
|
155
155
|
"keywords": [
|
|
156
156
|
"sentry",
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { SENTRY_DEFAULT_BASE_URL } from "./client.mjs";
|
|
2
|
-
import { CredentialSet } from "@keystrokehq/core";
|
|
3
|
-
import { defineOfficialIntegration, officialCredentialSetId } from "@keystrokehq/integration-authoring/official";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { oauthDefaults } from "@keystrokehq/credential-connection";
|
|
6
|
-
|
|
7
|
-
//#region src/_official/provider-app.ts
|
|
8
|
-
/**
|
|
9
|
-
* Internal Keystroke-owned Sentry app credentials.
|
|
10
|
-
*
|
|
11
|
-
* For Sentry, `clientSecret` doubles as the webhook signing secret per
|
|
12
|
-
* <https://docs.sentry.io/organization/integrations/integration-platform/webhooks/>,
|
|
13
|
-
* so `webhookSecret` is kept as a discrete field for symmetry with other
|
|
14
|
-
* integrations even though in practice platforms will populate both from the
|
|
15
|
-
* same Sentry-issued value.
|
|
16
|
-
*/
|
|
17
|
-
const sentryAppCredentialSet = new CredentialSet({
|
|
18
|
-
id: officialCredentialSetId("sentry-app"),
|
|
19
|
-
exposure: "platform-only",
|
|
20
|
-
name: "Sentry App",
|
|
21
|
-
auth: z.object({
|
|
22
|
-
clientId: z.string(),
|
|
23
|
-
clientSecret: z.string(),
|
|
24
|
-
webhookSecret: z.string()
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
const sentryOfficialProviderSeed = {
|
|
28
|
-
provider: "sentry",
|
|
29
|
-
appRef: "sentry-official",
|
|
30
|
-
displayName: "Sentry Platform",
|
|
31
|
-
credentialSetName: "Keystroke Sentry Platform App",
|
|
32
|
-
envShape: {
|
|
33
|
-
KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID: z.string().optional(),
|
|
34
|
-
KEYSTROKE_OFFICIAL_SENTRY_CLIENT_SECRET: z.string().optional(),
|
|
35
|
-
KEYSTROKE_OFFICIAL_SENTRY_WEBHOOK_SECRET: z.string().optional()
|
|
36
|
-
},
|
|
37
|
-
requiredEnvKeys: [
|
|
38
|
-
"KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID",
|
|
39
|
-
"KEYSTROKE_OFFICIAL_SENTRY_CLIENT_SECRET",
|
|
40
|
-
"KEYSTROKE_OFFICIAL_SENTRY_WEBHOOK_SECRET"
|
|
41
|
-
],
|
|
42
|
-
externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID",
|
|
43
|
-
buildCredentials: (env) => ({
|
|
44
|
-
clientId: env.KEYSTROKE_OFFICIAL_SENTRY_CLIENT_ID,
|
|
45
|
-
clientSecret: env.KEYSTROKE_OFFICIAL_SENTRY_CLIENT_SECRET,
|
|
46
|
-
webhookSecret: env.KEYSTROKE_OFFICIAL_SENTRY_WEBHOOK_SECRET
|
|
47
|
-
})
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/oauth-connection.ts
|
|
52
|
-
const SENTRY_OAUTH_SCOPES = [
|
|
53
|
-
"org:read",
|
|
54
|
-
"project:read",
|
|
55
|
-
"project:write",
|
|
56
|
-
"project:admin",
|
|
57
|
-
"team:read",
|
|
58
|
-
"team:write",
|
|
59
|
-
"team:admin",
|
|
60
|
-
"member:read",
|
|
61
|
-
"member:write",
|
|
62
|
-
"event:read",
|
|
63
|
-
"event:admin",
|
|
64
|
-
"alerts:read",
|
|
65
|
-
"alerts:write",
|
|
66
|
-
"release:admin"
|
|
67
|
-
];
|
|
68
|
-
const sentryOAuthConnection = {
|
|
69
|
-
kind: "oauth",
|
|
70
|
-
tokenType: "refreshable",
|
|
71
|
-
authUrl: "https://sentry.io/oauth/authorize/",
|
|
72
|
-
tokenUrl: "https://sentry.io/oauth/token/",
|
|
73
|
-
revokeUrl: null,
|
|
74
|
-
scopes: [...SENTRY_OAUTH_SCOPES],
|
|
75
|
-
vault: { accessToken: "SENTRY_ACCESS_TOKEN" },
|
|
76
|
-
async exchangeCode(ctx) {
|
|
77
|
-
const result = await oauthDefaults.exchangeCode(ctx);
|
|
78
|
-
const orgResponse = await fetch(`${SENTRY_DEFAULT_BASE_URL}/api/0/organizations/`, {
|
|
79
|
-
method: "GET",
|
|
80
|
-
headers: {
|
|
81
|
-
Authorization: `Bearer ${result.accessToken}`,
|
|
82
|
-
Accept: "application/json"
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
let firstOrg = null;
|
|
86
|
-
if (orgResponse.ok) {
|
|
87
|
-
const orgs = await orgResponse.json();
|
|
88
|
-
if (Array.isArray(orgs) && orgs.length > 0 && isOrganizationProbe(orgs[0])) firstOrg = orgs[0];
|
|
89
|
-
}
|
|
90
|
-
result.raw._sentryOrganization = firstOrg;
|
|
91
|
-
result.raw._sentryUser = pickUser(result.raw);
|
|
92
|
-
result.raw._sentryScopes = typeof result.raw.scope === "string" ? result.raw.scope : void 0;
|
|
93
|
-
return result;
|
|
94
|
-
},
|
|
95
|
-
extractInstallationInfo({ tokenResult }) {
|
|
96
|
-
const org = tokenResult.raw._sentryOrganization;
|
|
97
|
-
const user = tokenResult.raw._sentryUser;
|
|
98
|
-
const metadata = {};
|
|
99
|
-
if (org?.name) metadata.organizationName = org.name;
|
|
100
|
-
if (org?.slug) metadata.organizationSlug = org.slug;
|
|
101
|
-
const regionUrl = org?.links?.regionUrl;
|
|
102
|
-
if (regionUrl) metadata.regionUrl = regionUrl;
|
|
103
|
-
if (user?.name) metadata.userName = user.name;
|
|
104
|
-
if (user?.email) metadata.userEmail = user.email;
|
|
105
|
-
return {
|
|
106
|
-
externalInstallationId: org?.slug,
|
|
107
|
-
externalWorkspaceId: org?.id,
|
|
108
|
-
externalBotUserId: user?.id,
|
|
109
|
-
metadata
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
function isOrganizationProbe(value) {
|
|
114
|
-
return typeof value === "object" && value !== null;
|
|
115
|
-
}
|
|
116
|
-
function pickUser(raw) {
|
|
117
|
-
const user = raw.user;
|
|
118
|
-
if (user == null || typeof user !== "object") return null;
|
|
119
|
-
const u = user;
|
|
120
|
-
return {
|
|
121
|
-
id: typeof u.id === "string" ? u.id : void 0,
|
|
122
|
-
name: typeof u.name === "string" ? u.name : void 0,
|
|
123
|
-
email: typeof u.email === "string" ? u.email : void 0
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/integration.ts
|
|
129
|
-
const sentryAuthSchema = z.object({
|
|
130
|
-
SENTRY_ACCESS_TOKEN: z.string().min(1),
|
|
131
|
-
SENTRY_REGION_URL: z.string().url().optional(),
|
|
132
|
-
SENTRY_ORG_SLUG: z.string().min(1).optional()
|
|
133
|
-
});
|
|
134
|
-
const sentryOfficialIntegration = {
|
|
135
|
-
id: "sentry",
|
|
136
|
-
name: "Sentry",
|
|
137
|
-
description: "Sentry — issue lifecycle, release tracking, alerts, monitors, replays, feedback, and integration-platform webhook triggers",
|
|
138
|
-
auth: sentryAuthSchema,
|
|
139
|
-
proxy: { hosts: [
|
|
140
|
-
"sentry.io",
|
|
141
|
-
"us.sentry.io",
|
|
142
|
-
"de.sentry.io"
|
|
143
|
-
] },
|
|
144
|
-
connections: [{
|
|
145
|
-
id: "oauth",
|
|
146
|
-
...sentryOAuthConnection
|
|
147
|
-
}]
|
|
148
|
-
};
|
|
149
|
-
const sentryBundle = defineOfficialIntegration({
|
|
150
|
-
...sentryOfficialIntegration,
|
|
151
|
-
internal: { providerApp: sentryAppCredentialSet }
|
|
152
|
-
});
|
|
153
|
-
const sentry = sentryBundle.credentialSet;
|
|
154
|
-
|
|
155
|
-
//#endregion
|
|
156
|
-
export { sentryOfficialProviderSeed as a, sentryAppCredentialSet as i, sentryBundle as n, sentryOfficialIntegration as r, sentry as t };
|