@keystrokehq/sentry 0.0.15 → 0.0.16-integration-id-canonicalization.1

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 (80) hide show
  1. package/README.md +40 -187
  2. package/dist/credential-sets/index.d.mts +2 -0
  3. package/dist/credential-sets/index.mjs +4 -0
  4. package/dist/index.d.mts +4 -1
  5. package/dist/index.mjs +6 -1
  6. package/dist/operations/index.d.mts +2 -0
  7. package/dist/operations/index.mjs +3 -0
  8. package/dist/{schemas.d.mts → schemas/index.d.mts} +3 -3
  9. package/dist/schemas/index.mjs +3 -0
  10. package/dist/{schemas.mjs → sentry-api-DjJ24hwX.mjs} +2 -2
  11. package/dist/sentry-app.credential-set-Cdj6Qxiz.mjs +23 -0
  12. package/dist/sentry-app.credential-set-DxK7J7JO.d.mts +50 -0
  13. package/dist/sentry.credential-set-CyS3KAfW.mjs +62 -0
  14. package/dist/view-organization-notification-actions.operation-BXT4VBys.mjs +5021 -0
  15. package/dist/view-organization-notification-actions.operation-DfkZimCZ.d.mts +5255 -0
  16. package/package.json +13 -121
  17. package/dist/_official/index.d.mts +0 -41
  18. package/dist/_official/index.mjs +0 -3
  19. package/dist/_runtime/index.d.mts +0 -2
  20. package/dist/_runtime/index.mjs +0 -3
  21. package/dist/alerts.d.mts +0 -462
  22. package/dist/alerts.mjs +0 -300
  23. package/dist/client.d.mts +0 -86
  24. package/dist/client.mjs +0 -233
  25. package/dist/connection.d.mts +0 -3
  26. package/dist/connection.mjs +0 -3
  27. package/dist/dashboards.d.mts +0 -162
  28. package/dist/dashboards.mjs +0 -122
  29. package/dist/debug-files.d.mts +0 -102
  30. package/dist/debug-files.mjs +0 -73
  31. package/dist/deploys.d.mts +0 -86
  32. package/dist/deploys.mjs +0 -67
  33. package/dist/discover.d.mts +0 -194
  34. package/dist/discover.mjs +0 -138
  35. package/dist/endpoint-factory-DcT49a8O.mjs +0 -96
  36. package/dist/environments.d.mts +0 -96
  37. package/dist/environments.mjs +0 -71
  38. package/dist/errors-DfEFwcTe.mjs +0 -142
  39. package/dist/events-api.d.mts +0 -254
  40. package/dist/events-api.mjs +0 -184
  41. package/dist/events.d.mts +0 -754
  42. package/dist/events.mjs +0 -142
  43. package/dist/feedback.d.mts +0 -82
  44. package/dist/feedback.mjs +0 -63
  45. package/dist/integration-D7KCM1-p.mjs +0 -75
  46. package/dist/integration-veqa_7yB.d.mts +0 -33
  47. package/dist/issues.d.mts +0 -458
  48. package/dist/issues.mjs +0 -324
  49. package/dist/members.d.mts +0 -308
  50. package/dist/members.mjs +0 -156
  51. package/dist/messaging.d.mts +0 -1
  52. package/dist/messaging.mjs +0 -1
  53. package/dist/monitors.d.mts +0 -458
  54. package/dist/monitors.mjs +0 -234
  55. package/dist/notifications.d.mts +0 -180
  56. package/dist/notifications.mjs +0 -133
  57. package/dist/organizations.d.mts +0 -442
  58. package/dist/organizations.mjs +0 -334
  59. package/dist/pagination-PlgAqbZt.mjs +0 -116
  60. package/dist/project-keys.d.mts +0 -246
  61. package/dist/project-keys.mjs +0 -122
  62. package/dist/projects.d.mts +0 -534
  63. package/dist/projects.mjs +0 -378
  64. package/dist/releases.d.mts +0 -780
  65. package/dist/releases.mjs +0 -479
  66. package/dist/replays.d.mts +0 -234
  67. package/dist/replays.mjs +0 -192
  68. package/dist/scim.d.mts +0 -324
  69. package/dist/scim.mjs +0 -249
  70. package/dist/scopes-RRU0vt-a.mjs +0 -36
  71. package/dist/teams.d.mts +0 -448
  72. package/dist/teams.mjs +0 -266
  73. package/dist/triggers.d.mts +0 -41
  74. package/dist/triggers.mjs +0 -56
  75. package/dist/user-emails.d.mts +0 -84
  76. package/dist/user-emails.mjs +0 -60
  77. package/dist/verification.d.mts +0 -30
  78. package/dist/verification.mjs +0 -83
  79. package/dist/webhooks.d.mts +0 -158
  80. package/dist/webhooks.mjs +0 -108
@@ -1,142 +0,0 @@
1
- //#region src/errors.ts
2
- /**
3
- * Thrown from `createSentryClient(...)` methods on every non-2xx response
4
- * (after the retry-with-backoff loop gives up) and on any DSN-in-bearer-token
5
- * misuse. Operation files rely on the `kind` field to choose retry vs
6
- * bail-out behavior.
7
- */
8
- var SentryApiError = class extends Error {
9
- kind;
10
- status;
11
- providerCode;
12
- requestId;
13
- retryable;
14
- retryAfterSec;
15
- responseBody;
16
- constructor(init) {
17
- super(init.message, init.cause !== void 0 ? { cause: init.cause } : void 0);
18
- this.name = "SentryApiError";
19
- this.kind = init.kind;
20
- this.status = init.status;
21
- this.providerCode = init.providerCode;
22
- this.requestId = init.requestId;
23
- this.retryable = init.retryable;
24
- this.retryAfterSec = init.retryAfterSec;
25
- this.responseBody = init.responseBody;
26
- }
27
- };
28
- /**
29
- * Thrown by `verifySentryWebhookRequest` and `verifySentryServiceHookRequest`.
30
- * Never thrown by management-API clients.
31
- */
32
- var SentryWebhookVerificationError = class extends Error {
33
- reason;
34
- constructor(init) {
35
- super(init.message);
36
- this.name = "SentryWebhookVerificationError";
37
- this.reason = init.reason;
38
- }
39
- };
40
- /**
41
- * Classifies an HTTP response into a typed `SentryApiError`. The raw body may
42
- * already have been parsed as JSON or left as text; callers pass whichever
43
- * they produced.
44
- */
45
- function classifyHttpResponse(response, body) {
46
- const requestId = response.headers.get("x-request-id");
47
- const retryAfterSec = parseRetryAfter(response.headers.get("retry-after"));
48
- const providerCode = extractProviderCode(body);
49
- const detail = extractDetail(body, response.status);
50
- if (response.status === 401 || response.status === 403) return new SentryApiError({
51
- kind: "auth",
52
- message: `Sentry API authentication failed (${response.status}): ${detail}`,
53
- status: response.status,
54
- providerCode,
55
- requestId,
56
- retryable: false,
57
- retryAfterSec,
58
- responseBody: body
59
- });
60
- if (response.status === 404) return new SentryApiError({
61
- kind: "not_found",
62
- message: `Sentry API resource not found (404): ${detail}`,
63
- status: 404,
64
- providerCode,
65
- requestId,
66
- retryable: false,
67
- retryAfterSec,
68
- responseBody: body
69
- });
70
- if (response.status === 429) return new SentryApiError({
71
- kind: "rate_limit",
72
- message: `Sentry API rate limited (429): ${detail}`,
73
- status: 429,
74
- providerCode,
75
- requestId,
76
- retryable: true,
77
- retryAfterSec,
78
- responseBody: body
79
- });
80
- if (response.status === 400 || response.status === 422) return new SentryApiError({
81
- kind: "validation",
82
- message: `Sentry API validation failed (${response.status}): ${detail}`,
83
- status: response.status,
84
- providerCode,
85
- requestId,
86
- retryable: false,
87
- retryAfterSec,
88
- responseBody: body
89
- });
90
- if (response.status >= 500) return new SentryApiError({
91
- kind: "http",
92
- message: `Sentry API server error (${response.status}): ${detail}`,
93
- status: response.status,
94
- providerCode,
95
- requestId,
96
- retryable: true,
97
- retryAfterSec,
98
- responseBody: body
99
- });
100
- return new SentryApiError({
101
- kind: "http",
102
- message: `Sentry API request failed (${response.status}): ${detail}`,
103
- status: response.status,
104
- providerCode,
105
- requestId,
106
- retryable: false,
107
- retryAfterSec,
108
- responseBody: body
109
- });
110
- }
111
- function parseRetryAfter(header) {
112
- if (header == null) return null;
113
- const asNumber = Number(header);
114
- if (Number.isFinite(asNumber) && asNumber >= 0) return asNumber;
115
- const asDate = Date.parse(header);
116
- if (Number.isFinite(asDate)) {
117
- const diff = Math.ceil((asDate - Date.now()) / 1e3);
118
- return diff >= 0 ? diff : 0;
119
- }
120
- return null;
121
- }
122
- function extractDetail(body, status) {
123
- if (body == null) return `HTTP ${status}`;
124
- if (typeof body === "string") return body || `HTTP ${status}`;
125
- if (typeof body === "object") {
126
- const obj = body;
127
- if (typeof obj.detail === "string") return obj.detail;
128
- if (typeof obj.error === "string") return obj.error;
129
- if (typeof obj.message === "string") return obj.message;
130
- }
131
- return `HTTP ${status}`;
132
- }
133
- function extractProviderCode(body) {
134
- if (body == null || typeof body !== "object") return null;
135
- const obj = body;
136
- if (typeof obj.code === "string") return obj.code;
137
- if (typeof obj.error_code === "string") return obj.error_code;
138
- return null;
139
- }
140
-
141
- //#endregion
142
- export { SentryWebhookVerificationError as n, classifyHttpResponse as r, SentryApiError as t };
@@ -1,254 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
-
4
- //#region src/events-api.d.ts
5
- declare const fetchIssueEventById: _keystrokehq_core0.Operation<z.ZodObject<{
6
- organization_slug: z.ZodOptional<z.ZodString>;
7
- issue_id: z.ZodString;
8
- event_id: z.ZodString;
9
- }, z.core.$strip>, z.ZodObject<{
10
- id: z.ZodString;
11
- eventID: z.ZodOptional<z.ZodString>;
12
- groupID: z.ZodOptional<z.ZodString>;
13
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
14
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
- type: z.ZodOptional<z.ZodString>;
17
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
18
- SENTRY_ACCESS_TOKEN: z.ZodString;
19
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
20
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
21
- }, z.core.$strip>>], undefined>;
22
- declare const retrieveProjectEventById: _keystrokehq_core0.Operation<z.ZodObject<{
23
- organization_slug: z.ZodOptional<z.ZodString>;
24
- project_slug: z.ZodString;
25
- event_id: z.ZodString;
26
- }, z.core.$strip>, z.ZodObject<{
27
- id: z.ZodString;
28
- eventID: z.ZodOptional<z.ZodString>;
29
- groupID: z.ZodOptional<z.ZodString>;
30
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
31
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
- type: z.ZodOptional<z.ZodString>;
34
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
35
- SENTRY_ACCESS_TOKEN: z.ZodString;
36
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
37
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
38
- }, z.core.$strip>>], undefined>;
39
- declare const getProjectEvents: _keystrokehq_core0.Operation<z.ZodObject<{
40
- cursor: z.ZodOptional<z.ZodString>;
41
- per_page: z.ZodOptional<z.ZodNumber>;
42
- query: z.ZodOptional<z.ZodString>;
43
- organization_slug: z.ZodOptional<z.ZodString>;
44
- project_slug: z.ZodString;
45
- full: z.ZodOptional<z.ZodBoolean>;
46
- sample: z.ZodOptional<z.ZodBoolean>;
47
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
48
- id: z.ZodString;
49
- eventID: z.ZodOptional<z.ZodString>;
50
- groupID: z.ZodOptional<z.ZodString>;
51
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
52
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
- type: z.ZodOptional<z.ZodString>;
55
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
56
- SENTRY_ACCESS_TOKEN: z.ZodString;
57
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
58
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
59
- }, z.core.$strip>>], undefined>;
60
- declare const getProjectEventStats: _keystrokehq_core0.Operation<z.ZodObject<{
61
- organization_slug: z.ZodOptional<z.ZodString>;
62
- project_slug: z.ZodString;
63
- stat: z.ZodOptional<z.ZodEnum<{
64
- received: "received";
65
- rejected: "rejected";
66
- blacklisted: "blacklisted";
67
- generated: "generated";
68
- }>>;
69
- since: z.ZodOptional<z.ZodString>;
70
- until: z.ZodOptional<z.ZodString>;
71
- resolution: z.ZodOptional<z.ZodString>;
72
- }, z.core.$strip>, z.ZodArray<z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
73
- SENTRY_ACCESS_TOKEN: z.ZodString;
74
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
75
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
76
- }, z.core.$strip>>], undefined>;
77
- declare const retrieveOrganizationEvents: _keystrokehq_core0.Operation<z.ZodObject<{
78
- cursor: z.ZodOptional<z.ZodString>;
79
- per_page: z.ZodOptional<z.ZodNumber>;
80
- organization_slug: z.ZodOptional<z.ZodString>;
81
- field: z.ZodArray<z.ZodString>;
82
- query: z.ZodOptional<z.ZodString>;
83
- project: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
84
- environment: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
- statsPeriod: z.ZodOptional<z.ZodString>;
86
- start: z.ZodOptional<z.ZodString>;
87
- end: z.ZodOptional<z.ZodString>;
88
- sort: z.ZodOptional<z.ZodString>;
89
- dataset: z.ZodOptional<z.ZodEnum<{
90
- errors: "errors";
91
- discover: "discover";
92
- transactions: "transactions";
93
- issuePlatform: "issuePlatform";
94
- }>>;
95
- orderby: z.ZodOptional<z.ZodString>;
96
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
97
- SENTRY_ACCESS_TOKEN: z.ZodString;
98
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
99
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
100
- }, z.core.$strip>>], undefined>;
101
- declare const retrieveEventIdForOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
102
- organization_slug: z.ZodOptional<z.ZodString>;
103
- event_id: z.ZodString;
104
- }, z.core.$strip>, z.ZodObject<{
105
- id: z.ZodString;
106
- eventID: z.ZodOptional<z.ZodString>;
107
- groupID: z.ZodOptional<z.ZodString>;
108
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
109
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
- type: z.ZodOptional<z.ZodString>;
112
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
113
- SENTRY_ACCESS_TOKEN: z.ZodString;
114
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
115
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
116
- }, z.core.$strip>>], undefined>;
117
- declare const retrieveSourceMapDebugEvent: _keystrokehq_core0.Operation<z.ZodObject<{
118
- organization_slug: z.ZodOptional<z.ZodString>;
119
- project_slug: z.ZodString;
120
- event_id: z.ZodString;
121
- frame_idx: z.ZodOptional<z.ZodNumber>;
122
- exception_idx: z.ZodOptional<z.ZodNumber>;
123
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
124
- SENTRY_ACCESS_TOKEN: z.ZodString;
125
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
126
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
127
- }, z.core.$strip>>], undefined>;
128
- declare const sentryEventOperations: {
129
- readonly fetchIssueEventById: _keystrokehq_core0.Operation<z.ZodObject<{
130
- organization_slug: z.ZodOptional<z.ZodString>;
131
- issue_id: z.ZodString;
132
- event_id: z.ZodString;
133
- }, z.core.$strip>, z.ZodObject<{
134
- id: z.ZodString;
135
- eventID: z.ZodOptional<z.ZodString>;
136
- groupID: z.ZodOptional<z.ZodString>;
137
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
138
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
- type: z.ZodOptional<z.ZodString>;
141
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
142
- SENTRY_ACCESS_TOKEN: z.ZodString;
143
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
144
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
145
- }, z.core.$strip>>], undefined>;
146
- readonly retrieveProjectEventById: _keystrokehq_core0.Operation<z.ZodObject<{
147
- organization_slug: z.ZodOptional<z.ZodString>;
148
- project_slug: z.ZodString;
149
- event_id: z.ZodString;
150
- }, z.core.$strip>, z.ZodObject<{
151
- id: z.ZodString;
152
- eventID: z.ZodOptional<z.ZodString>;
153
- groupID: z.ZodOptional<z.ZodString>;
154
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
155
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
- type: z.ZodOptional<z.ZodString>;
158
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
159
- SENTRY_ACCESS_TOKEN: z.ZodString;
160
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
161
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
162
- }, z.core.$strip>>], undefined>;
163
- readonly getProjectEvents: _keystrokehq_core0.Operation<z.ZodObject<{
164
- cursor: z.ZodOptional<z.ZodString>;
165
- per_page: z.ZodOptional<z.ZodNumber>;
166
- query: z.ZodOptional<z.ZodString>;
167
- organization_slug: z.ZodOptional<z.ZodString>;
168
- project_slug: z.ZodString;
169
- full: z.ZodOptional<z.ZodBoolean>;
170
- sample: z.ZodOptional<z.ZodBoolean>;
171
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
172
- id: z.ZodString;
173
- eventID: z.ZodOptional<z.ZodString>;
174
- groupID: z.ZodOptional<z.ZodString>;
175
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
176
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
- type: z.ZodOptional<z.ZodString>;
179
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
180
- SENTRY_ACCESS_TOKEN: z.ZodString;
181
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
182
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
183
- }, z.core.$strip>>], undefined>;
184
- readonly getProjectEventStats: _keystrokehq_core0.Operation<z.ZodObject<{
185
- organization_slug: z.ZodOptional<z.ZodString>;
186
- project_slug: z.ZodString;
187
- stat: z.ZodOptional<z.ZodEnum<{
188
- received: "received";
189
- rejected: "rejected";
190
- blacklisted: "blacklisted";
191
- generated: "generated";
192
- }>>;
193
- since: z.ZodOptional<z.ZodString>;
194
- until: z.ZodOptional<z.ZodString>;
195
- resolution: z.ZodOptional<z.ZodString>;
196
- }, z.core.$strip>, z.ZodArray<z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
197
- SENTRY_ACCESS_TOKEN: z.ZodString;
198
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
199
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
200
- }, z.core.$strip>>], undefined>;
201
- readonly retrieveOrganizationEvents: _keystrokehq_core0.Operation<z.ZodObject<{
202
- cursor: z.ZodOptional<z.ZodString>;
203
- per_page: z.ZodOptional<z.ZodNumber>;
204
- organization_slug: z.ZodOptional<z.ZodString>;
205
- field: z.ZodArray<z.ZodString>;
206
- query: z.ZodOptional<z.ZodString>;
207
- project: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
208
- environment: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
- statsPeriod: z.ZodOptional<z.ZodString>;
210
- start: z.ZodOptional<z.ZodString>;
211
- end: z.ZodOptional<z.ZodString>;
212
- sort: z.ZodOptional<z.ZodString>;
213
- dataset: z.ZodOptional<z.ZodEnum<{
214
- errors: "errors";
215
- discover: "discover";
216
- transactions: "transactions";
217
- issuePlatform: "issuePlatform";
218
- }>>;
219
- orderby: z.ZodOptional<z.ZodString>;
220
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
221
- SENTRY_ACCESS_TOKEN: z.ZodString;
222
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
223
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
224
- }, z.core.$strip>>], undefined>;
225
- readonly retrieveEventIdForOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
226
- organization_slug: z.ZodOptional<z.ZodString>;
227
- event_id: z.ZodString;
228
- }, z.core.$strip>, z.ZodObject<{
229
- id: z.ZodString;
230
- eventID: z.ZodOptional<z.ZodString>;
231
- groupID: z.ZodOptional<z.ZodString>;
232
- dateCreated: z.ZodOptional<z.ZodISODateTime>;
233
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
- platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
- type: z.ZodOptional<z.ZodString>;
236
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
237
- SENTRY_ACCESS_TOKEN: z.ZodString;
238
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
239
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
240
- }, z.core.$strip>>], undefined>;
241
- readonly retrieveSourceMapDebugEvent: _keystrokehq_core0.Operation<z.ZodObject<{
242
- organization_slug: z.ZodOptional<z.ZodString>;
243
- project_slug: z.ZodString;
244
- event_id: z.ZodString;
245
- frame_idx: z.ZodOptional<z.ZodNumber>;
246
- exception_idx: z.ZodOptional<z.ZodNumber>;
247
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
248
- SENTRY_ACCESS_TOKEN: z.ZodString;
249
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
250
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
251
- }, z.core.$strip>>], undefined>;
252
- };
253
- //#endregion
254
- export { fetchIssueEventById, getProjectEventStats, getProjectEvents, retrieveEventIdForOrganization, retrieveOrganizationEvents, retrieveProjectEventById, retrieveSourceMapDebugEvent, sentryEventOperations };
@@ -1,184 +0,0 @@
1
- import { orgIssueScopeInputSchema, orgProjectScopeInputSchema, orgScopeInputSchema, sentryEventSchema, sentryIdSchema, sentryJsonArraySchema, sentryJsonObjectSchema, 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/events-api.ts
7
- /**
8
- * Sentry events + event-query operations. Maps to PLAN.md §6.7 (7 actions).
9
- */
10
- const ORG = [{
11
- name: "organization_slug",
12
- placeholder: "{organization_slug}"
13
- }];
14
- const ORG_PROJECT = [...ORG, {
15
- name: "project_slug",
16
- placeholder: "{project_slug}"
17
- }];
18
- const ORG_ISSUE = [...ORG, {
19
- name: "issue_id",
20
- placeholder: "{issue_id}"
21
- }];
22
- const fetchIssueEventById = defineSentryEndpoint({
23
- id: "sentry.fetch-issue-event-by-id",
24
- name: "Fetch Issue Event",
25
- description: "Fetch a single event that belongs to an issue by event id.",
26
- method: "GET",
27
- path: "/api/0/organizations/{organization_slug}/issues/{issue_id}/events/{event_id}/",
28
- pathParams: [...ORG_ISSUE, {
29
- name: "event_id",
30
- placeholder: "{event_id}"
31
- }],
32
- input: orgIssueScopeInputSchema.extend({ event_id: sentryIdSchema }),
33
- output: sentryEventSchema,
34
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
35
- });
36
- const retrieveProjectEventById = defineSentryEndpoint({
37
- id: "sentry.retrieve-project-event-by-id",
38
- name: "Retrieve Project Event",
39
- description: "Fetch a single event scoped to a project by event id.",
40
- method: "GET",
41
- path: "/api/0/projects/{organization_slug}/{project_slug}/events/{event_id}/",
42
- pathParams: [...ORG_PROJECT, {
43
- name: "event_id",
44
- placeholder: "{event_id}"
45
- }],
46
- input: orgProjectScopeInputSchema.extend({ event_id: sentryIdSchema }),
47
- output: sentryEventSchema,
48
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
49
- });
50
- const getProjectEvents = defineSentryEndpoint({
51
- id: "sentry.get-project-events",
52
- name: "List Project Events",
53
- description: "List recent events in a project.",
54
- method: "GET",
55
- path: "/api/0/projects/{organization_slug}/{project_slug}/events/",
56
- pathParams: ORG_PROJECT,
57
- input: sentryListInputSchema.merge(orgProjectScopeInputSchema).extend({
58
- full: z.boolean().optional(),
59
- sample: z.boolean().optional()
60
- }),
61
- queryFields: [
62
- "cursor",
63
- "per_page",
64
- "query",
65
- "full",
66
- "sample"
67
- ],
68
- output: z.array(sentryEventSchema),
69
- pagination: "cursor",
70
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
71
- });
72
- const getProjectEventStats = defineSentryEndpoint({
73
- id: "sentry.get-project-event-stats",
74
- name: "Get Project Event Stats",
75
- description: "Return time-series event counts for a project.",
76
- method: "GET",
77
- path: "/api/0/projects/{organization_slug}/{project_slug}/stats/",
78
- pathParams: ORG_PROJECT,
79
- input: orgProjectScopeInputSchema.extend({
80
- stat: z.enum([
81
- "received",
82
- "rejected",
83
- "blacklisted",
84
- "generated"
85
- ]).optional(),
86
- since: z.string().optional(),
87
- until: z.string().optional(),
88
- resolution: z.string().optional()
89
- }),
90
- queryFields: [
91
- "stat",
92
- "since",
93
- "until",
94
- "resolution"
95
- ],
96
- output: sentryJsonArraySchema,
97
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
98
- });
99
- const retrieveOrganizationEvents = defineSentryEndpoint({
100
- id: "sentry.retrieve-organization-events",
101
- name: "Retrieve Organization Events (Discover)",
102
- description: "Query the Discover event dataset across an organization with field, query, and aggregation support.",
103
- method: "GET",
104
- path: "/api/0/organizations/{organization_slug}/events/",
105
- pathParams: ORG,
106
- input: sentryListInputSchema.merge(orgScopeInputSchema).extend({
107
- field: z.array(z.string()).min(1),
108
- query: z.string().optional(),
109
- project: z.array(z.number().int()).optional(),
110
- environment: z.array(z.string()).optional(),
111
- statsPeriod: z.string().optional(),
112
- start: z.string().optional(),
113
- end: z.string().optional(),
114
- sort: z.string().optional(),
115
- dataset: z.enum([
116
- "discover",
117
- "errors",
118
- "transactions",
119
- "issuePlatform"
120
- ]).optional(),
121
- orderby: z.string().optional()
122
- }),
123
- queryFields: [
124
- "cursor",
125
- "per_page",
126
- "field",
127
- "query",
128
- "project",
129
- "environment",
130
- "statsPeriod",
131
- "start",
132
- "end",
133
- "sort",
134
- "dataset",
135
- "orderby"
136
- ],
137
- output: sentryJsonObjectSchema,
138
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
139
- });
140
- const retrieveEventIdForOrganization = defineSentryEndpoint({
141
- id: "sentry.retrieve-event-id-for-organization",
142
- name: "Retrieve Event By ID (Org)",
143
- description: "Look up a single event across an organization by its event id.",
144
- method: "GET",
145
- path: "/api/0/organizations/{organization_slug}/eventids/{event_id}/",
146
- pathParams: [...ORG, {
147
- name: "event_id",
148
- placeholder: "{event_id}"
149
- }],
150
- input: orgScopeInputSchema.extend({ event_id: sentryIdSchema }),
151
- output: sentryEventSchema,
152
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
153
- });
154
- const retrieveSourceMapDebugEvent = defineSentryEndpoint({
155
- id: "sentry.retrieve-source-map-debug-event",
156
- name: "Retrieve Source Map Debug Event",
157
- description: "Return source-map debug diagnostics for a single event.",
158
- method: "GET",
159
- path: "/api/0/projects/{organization_slug}/{project_slug}/events/{event_id}/source-map-debug/",
160
- pathParams: [...ORG_PROJECT, {
161
- name: "event_id",
162
- placeholder: "{event_id}"
163
- }],
164
- input: orgProjectScopeInputSchema.extend({
165
- event_id: sentryIdSchema,
166
- frame_idx: z.number().int().optional(),
167
- exception_idx: z.number().int().optional()
168
- }),
169
- queryFields: ["frame_idx", "exception_idx"],
170
- output: sentryJsonObjectSchema,
171
- requiredOAuthScopes: [...SENTRY_SCOPE.eventRead]
172
- });
173
- const sentryEventOperations = {
174
- fetchIssueEventById,
175
- retrieveProjectEventById,
176
- getProjectEvents,
177
- getProjectEventStats,
178
- retrieveOrganizationEvents,
179
- retrieveEventIdForOrganization,
180
- retrieveSourceMapDebugEvent
181
- };
182
-
183
- //#endregion
184
- export { fetchIssueEventById, getProjectEventStats, getProjectEvents, retrieveEventIdForOrganization, retrieveOrganizationEvents, retrieveProjectEventById, retrieveSourceMapDebugEvent, sentryEventOperations };