@keystrokehq/sentry 0.0.10 → 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.
Files changed (56) hide show
  1. package/dist/_official/index.d.mts +2 -2
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/_runtime/index.d.mts +1 -1
  4. package/dist/_runtime/index.mjs +1 -1
  5. package/dist/alerts.d.mts +22 -22
  6. package/dist/alerts.mjs +12 -12
  7. package/dist/connection.d.mts +1 -1
  8. package/dist/connection.mjs +1 -1
  9. package/dist/dashboards.d.mts +10 -10
  10. package/dist/dashboards.mjs +6 -6
  11. package/dist/debug-files.d.mts +6 -6
  12. package/dist/debug-files.mjs +4 -4
  13. package/dist/deploys.d.mts +4 -4
  14. package/dist/deploys.mjs +3 -3
  15. package/dist/discover.d.mts +10 -10
  16. package/dist/discover.mjs +6 -6
  17. package/dist/{endpoint-factory-BKyte5gU.mjs → endpoint-factory-C0WIFmtK.mjs} +1 -2
  18. package/dist/environments.d.mts +8 -8
  19. package/dist/environments.mjs +4 -4
  20. package/dist/events-api.d.mts +14 -14
  21. package/dist/events-api.mjs +8 -8
  22. package/dist/feedback.d.mts +4 -4
  23. package/dist/feedback.mjs +3 -3
  24. package/dist/integration-DCNn_9vz.mjs +356 -0
  25. package/dist/{integration-BaLZqIqf.d.mts → integration-rmp485nJ.d.mts} +2 -3
  26. package/dist/issues.d.mts +36 -36
  27. package/dist/issues.mjs +14 -14
  28. package/dist/members.d.mts +14 -14
  29. package/dist/members.mjs +8 -8
  30. package/dist/monitors.d.mts +32 -32
  31. package/dist/monitors.mjs +11 -11
  32. package/dist/notifications.d.mts +10 -10
  33. package/dist/notifications.mjs +6 -6
  34. package/dist/organizations.d.mts +32 -32
  35. package/dist/organizations.mjs +16 -16
  36. package/dist/project-keys.d.mts +10 -10
  37. package/dist/project-keys.mjs +6 -6
  38. package/dist/projects.d.mts +38 -38
  39. package/dist/projects.mjs +20 -20
  40. package/dist/releases.d.mts +44 -44
  41. package/dist/releases.mjs +22 -22
  42. package/dist/replays.d.mts +18 -18
  43. package/dist/replays.mjs +10 -10
  44. package/dist/schemas.d.mts +4 -4
  45. package/dist/scim.d.mts +22 -22
  46. package/dist/scim.mjs +12 -12
  47. package/dist/teams.d.mts +28 -28
  48. package/dist/teams.mjs +15 -15
  49. package/dist/triggers.d.mts +59 -3
  50. package/dist/triggers.mjs +51 -1
  51. package/dist/user-emails.d.mts +8 -8
  52. package/dist/user-emails.mjs +5 -5
  53. package/dist/webhooks.d.mts +10 -10
  54. package/dist/webhooks.mjs +6 -6
  55. package/package.json +5 -5
  56. package/dist/integration-DQ-PSbHu.mjs +0 -156
@@ -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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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<"keystroke:sentry", z.ZodObject<{
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-BKyte5gU.mjs";
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
 
@@ -19,7 +19,7 @@ const ORG_PROJECT_HOOK = [...ORG_PROJECT, {
19
19
  placeholder: "{hook_id}"
20
20
  }];
21
21
  const createProjectWebhookSubscription = defineSentryEndpoint({
22
- id: "create_project_webhook_subscription",
22
+ id: "sentry.create-project-webhook-subscription",
23
23
  name: "Create Project Service Hook",
24
24
  description: "Create a legacy per-project service hook. Prefer an integration webhook for new installs.",
25
25
  method: "POST",
@@ -35,7 +35,7 @@ const createProjectWebhookSubscription = defineSentryEndpoint({
35
35
  requiredOAuthScopes: [...SENTRY_SCOPE.projectAdmin]
36
36
  });
37
37
  const retrieveProjectHooks = defineSentryEndpoint({
38
- id: "retrieve_project_hooks",
38
+ id: "sentry.retrieve-project-hooks",
39
39
  name: "List Project Service Hooks",
40
40
  description: "List the service hooks configured on a project.",
41
41
  method: "GET",
@@ -52,7 +52,7 @@ const retrieveProjectHooks = defineSentryEndpoint({
52
52
  requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
53
53
  });
54
54
  const getProjectHook = defineSentryEndpoint({
55
- id: "get_project_hook",
55
+ id: "sentry.get-project-hook",
56
56
  name: "Get Project Service Hook",
57
57
  description: "Fetch a project service hook by id.",
58
58
  method: "GET",
@@ -63,7 +63,7 @@ const getProjectHook = defineSentryEndpoint({
63
63
  requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
64
64
  });
65
65
  const updateWebhookConfiguration = defineSentryEndpoint({
66
- id: "update_webhook_configuration_xp",
66
+ id: "sentry.update-webhook-configuration-xp",
67
67
  name: "Update Project Service Hook",
68
68
  description: "Update a project service hook in place.",
69
69
  method: "PUT",
@@ -85,7 +85,7 @@ const updateWebhookConfiguration = defineSentryEndpoint({
85
85
  requiredOAuthScopes: [...SENTRY_SCOPE.projectAdmin]
86
86
  });
87
87
  const deleteProjectHook = defineSentryEndpoint({
88
- id: "delete_project_hook",
88
+ id: "sentry.delete-project-hook",
89
89
  name: "Delete Project Service Hook",
90
90
  description: "Delete a project service hook by id.",
91
91
  method: "DELETE",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/sentry",
3
- "version": "0.0.10",
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.7",
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.8",
149
+ "@keystrokehq/core": "^0.0.12",
150
+ "@keystrokehq/test-utils": "0.0.0",
151
+ "@keystrokehq/credential-connection": "1.0.0",
152
152
  "@keystrokehq/typescript-config": "0.0.0",
153
- "@keystrokehq/test-utils": "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-platform",
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 };