@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.
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-4DLRUKF9.d.mts +59 -0
  12. package/dist/sentry-app.credential-set-Cdj6Qxiz.mjs +23 -0
  13. package/dist/sentry.credential-set-2b3TPFqv.mjs +696 -0
  14. package/dist/view-organization-notification-actions.operation-BI2aB_Mj.mjs +4548 -0
  15. package/dist/view-organization-notification-actions.operation-C7pc8cl_.d.mts +6840 -0
  16. package/package.json +14 -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
package/dist/monitors.mjs DELETED
@@ -1,234 +0,0 @@
1
- import { orgProjectScopeInputSchema, orgScopeInputSchema, sentryJsonArraySchema, sentryJsonObjectSchema, sentryListInputSchema, sentryMonitorSchema, sentrySlugSchema } 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/monitors.ts
7
- /**
8
- * Sentry cron-monitor operations. Maps to PLAN.md §6.13 (10 actions).
9
- */
10
- const ORG = [{
11
- name: "organization_slug",
12
- placeholder: "{organization_slug}"
13
- }];
14
- const ORG_MONITOR = [...ORG, {
15
- name: "monitor_id_or_slug",
16
- placeholder: "{monitor_id_or_slug}"
17
- }];
18
- const ORG_PROJECT_MONITOR = [
19
- ...ORG,
20
- {
21
- name: "project_slug",
22
- placeholder: "{project_slug}"
23
- },
24
- {
25
- name: "monitor_id_or_slug",
26
- placeholder: "{monitor_id_or_slug}"
27
- }
28
- ];
29
- const createOrganizationMonitor = defineSentryEndpoint({
30
- id: "sentry.create-organization-monitor",
31
- name: "Create Monitor",
32
- description: "Create a new cron-monitor scoped to the organization.",
33
- method: "POST",
34
- path: "/api/0/organizations/{organization_slug}/monitors/",
35
- pathParams: ORG,
36
- input: orgScopeInputSchema.extend({
37
- name: z.string().min(1),
38
- slug: sentrySlugSchema.optional(),
39
- project: z.string().min(1),
40
- type: z.enum(["cron_job"]).default("cron_job"),
41
- config: sentryJsonObjectSchema,
42
- status: z.enum(["active", "disabled"]).optional(),
43
- alert_rule: sentryJsonObjectSchema.optional()
44
- }),
45
- bodyFields: [
46
- "name",
47
- "slug",
48
- "project",
49
- "type",
50
- "config",
51
- "status",
52
- "alert_rule"
53
- ],
54
- output: sentryMonitorSchema,
55
- needsApproval: true,
56
- requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
57
- });
58
- const retrieveOrganizationMonitors = defineSentryEndpoint({
59
- id: "sentry.retrieve-organization-monitors",
60
- name: "List Monitors",
61
- description: "List cron-monitors in an organization.",
62
- method: "GET",
63
- path: "/api/0/organizations/{organization_slug}/monitors/",
64
- pathParams: ORG,
65
- input: sentryListInputSchema.merge(orgScopeInputSchema).extend({
66
- project: z.array(z.number().int()).optional(),
67
- environment: z.array(z.string()).optional()
68
- }),
69
- queryFields: [
70
- "cursor",
71
- "per_page",
72
- "query",
73
- "project",
74
- "environment"
75
- ],
76
- output: z.array(sentryMonitorSchema),
77
- pagination: "cursor",
78
- requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
79
- });
80
- const getOrganizationMonitorByIdOrSlug = defineSentryEndpoint({
81
- id: "sentry.get-organization-monitor-by-id-or-slug",
82
- name: "Get Monitor",
83
- description: "Fetch a single monitor by id or slug.",
84
- method: "GET",
85
- path: "/api/0/organizations/{organization_slug}/monitors/{monitor_id_or_slug}/",
86
- pathParams: ORG_MONITOR,
87
- input: orgScopeInputSchema.extend({ monitor_id_or_slug: z.string().min(1) }),
88
- output: sentryMonitorSchema,
89
- requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
90
- });
91
- const modifyOrganizationMonitorData = defineSentryEndpoint({
92
- id: "sentry.modify-organization-monitor-data",
93
- name: "Update Monitor",
94
- description: "Update an existing monitor by id or slug.",
95
- method: "PUT",
96
- path: "/api/0/organizations/{organization_slug}/monitors/{monitor_id_or_slug}/",
97
- pathParams: ORG_MONITOR,
98
- input: orgScopeInputSchema.extend({
99
- monitor_id_or_slug: z.string().min(1),
100
- name: z.string().optional(),
101
- slug: sentrySlugSchema.optional(),
102
- project: z.string().optional(),
103
- config: sentryJsonObjectSchema.optional(),
104
- status: z.enum(["active", "disabled"]).optional(),
105
- alert_rule: sentryJsonObjectSchema.optional()
106
- }),
107
- bodyFields: [
108
- "name",
109
- "slug",
110
- "project",
111
- "config",
112
- "status",
113
- "alert_rule"
114
- ],
115
- output: sentryMonitorSchema,
116
- needsApproval: true,
117
- requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
118
- });
119
- const deleteOrganizationMonitor = defineSentryEndpoint({
120
- id: "sentry.delete-organization-monitor",
121
- name: "Delete Monitor",
122
- description: "Delete a monitor by id or slug.",
123
- method: "DELETE",
124
- path: "/api/0/organizations/{organization_slug}/monitors/{monitor_id_or_slug}/",
125
- pathParams: ORG_MONITOR,
126
- input: orgScopeInputSchema.extend({ monitor_id_or_slug: z.string().min(1) }),
127
- output: z.unknown(),
128
- needsApproval: true,
129
- requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
130
- });
131
- const getProjectMonitorById = defineSentryEndpoint({
132
- id: "sentry.get-project-monitor-by-id",
133
- name: "Get Project Monitor",
134
- description: "Fetch a monitor scoped to a project.",
135
- method: "GET",
136
- path: "/api/0/projects/{organization_slug}/{project_slug}/monitors/{monitor_id_or_slug}/",
137
- pathParams: ORG_PROJECT_MONITOR,
138
- input: orgProjectScopeInputSchema.extend({ monitor_id_or_slug: z.string().min(1) }),
139
- output: sentryMonitorSchema,
140
- requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
141
- });
142
- const updateProjectMonitor = defineSentryEndpoint({
143
- id: "sentry.update-project-monitor",
144
- name: "Update Project Monitor",
145
- description: "Update a project-scoped monitor.",
146
- method: "PUT",
147
- path: "/api/0/projects/{organization_slug}/{project_slug}/monitors/{monitor_id_or_slug}/",
148
- pathParams: ORG_PROJECT_MONITOR,
149
- input: orgProjectScopeInputSchema.extend({
150
- monitor_id_or_slug: z.string().min(1),
151
- name: z.string().optional(),
152
- slug: sentrySlugSchema.optional(),
153
- config: sentryJsonObjectSchema.optional(),
154
- status: z.enum(["active", "disabled"]).optional()
155
- }),
156
- bodyFields: [
157
- "name",
158
- "slug",
159
- "config",
160
- "status"
161
- ],
162
- output: sentryMonitorSchema,
163
- needsApproval: true,
164
- requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
165
- });
166
- const deleteProjectMonitor = defineSentryEndpoint({
167
- id: "sentry.delete-project-monitor",
168
- name: "Delete Project Monitor",
169
- description: "Delete a project-scoped monitor.",
170
- method: "DELETE",
171
- path: "/api/0/projects/{organization_slug}/{project_slug}/monitors/{monitor_id_or_slug}/",
172
- pathParams: ORG_PROJECT_MONITOR,
173
- input: orgProjectScopeInputSchema.extend({ monitor_id_or_slug: z.string().min(1) }),
174
- output: z.unknown(),
175
- needsApproval: true,
176
- requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
177
- });
178
- const retrieveMonitorCheckins = defineSentryEndpoint({
179
- id: "sentry.retrieve-monitor-checkins",
180
- name: "Retrieve Monitor Check-Ins",
181
- description: "List check-ins for a project monitor.",
182
- method: "GET",
183
- path: "/api/0/projects/{organization_slug}/{project_slug}/monitors/{monitor_id_or_slug}/checkins/",
184
- pathParams: ORG_PROJECT_MONITOR,
185
- input: sentryListInputSchema.merge(orgProjectScopeInputSchema).extend({
186
- monitor_id_or_slug: z.string().min(1),
187
- environment: z.string().optional()
188
- }),
189
- queryFields: [
190
- "cursor",
191
- "per_page",
192
- "query",
193
- "environment"
194
- ],
195
- output: sentryJsonArraySchema,
196
- pagination: "cursor",
197
- requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
198
- });
199
- const retrieveMonitorCheckinsByOrg = defineSentryEndpoint({
200
- id: "sentry.retrieve-monitor-checkins-by-org",
201
- name: "Retrieve Monitor Check-Ins (Org)",
202
- description: "List check-ins for an organization-level monitor.",
203
- method: "GET",
204
- path: "/api/0/organizations/{organization_slug}/monitors/{monitor_id_or_slug}/checkins/",
205
- pathParams: ORG_MONITOR,
206
- input: sentryListInputSchema.merge(orgScopeInputSchema).extend({
207
- monitor_id_or_slug: z.string().min(1),
208
- environment: z.string().optional()
209
- }),
210
- queryFields: [
211
- "cursor",
212
- "per_page",
213
- "query",
214
- "environment"
215
- ],
216
- output: sentryJsonArraySchema,
217
- pagination: "cursor",
218
- requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
219
- });
220
- const sentryMonitorOperations = {
221
- createOrganizationMonitor,
222
- retrieveOrganizationMonitors,
223
- getOrganizationMonitorByIdOrSlug,
224
- modifyOrganizationMonitorData,
225
- deleteOrganizationMonitor,
226
- getProjectMonitorById,
227
- updateProjectMonitor,
228
- deleteProjectMonitor,
229
- retrieveMonitorCheckins,
230
- retrieveMonitorCheckinsByOrg
231
- };
232
-
233
- //#endregion
234
- export { createOrganizationMonitor, deleteOrganizationMonitor, deleteProjectMonitor, getOrganizationMonitorByIdOrSlug, getProjectMonitorById, modifyOrganizationMonitorData, retrieveMonitorCheckins, retrieveMonitorCheckinsByOrg, retrieveOrganizationMonitors, sentryMonitorOperations, updateProjectMonitor };
@@ -1,180 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
-
4
- //#region src/notifications.d.ts
5
- declare const viewOrganizationNotificationActions: _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: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
11
- triggerType: z.ZodOptional<z.ZodString>;
12
- serviceType: z.ZodOptional<z.ZodString>;
13
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
14
- id: z.ZodString;
15
- organizationId: z.ZodOptional<z.ZodString>;
16
- serviceType: z.ZodOptional<z.ZodString>;
17
- targetType: z.ZodOptional<z.ZodString>;
18
- targetDisplay: z.ZodOptional<z.ZodString>;
19
- targetIdentifier: z.ZodOptional<z.ZodString>;
20
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
21
- SENTRY_ACCESS_TOKEN: z.ZodString;
22
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
23
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>>], undefined>;
25
- declare const retrieveNotificationActionByOrgId: _keystrokehq_core0.Operation<z.ZodObject<{
26
- organization_slug: z.ZodOptional<z.ZodString>;
27
- action_id: z.ZodString;
28
- }, z.core.$strip>, z.ZodObject<{
29
- id: z.ZodString;
30
- organizationId: z.ZodOptional<z.ZodString>;
31
- serviceType: z.ZodOptional<z.ZodString>;
32
- targetType: z.ZodOptional<z.ZodString>;
33
- targetDisplay: z.ZodOptional<z.ZodString>;
34
- targetIdentifier: z.ZodOptional<z.ZodString>;
35
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
36
- SENTRY_ACCESS_TOKEN: z.ZodString;
37
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
38
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
39
- }, z.core.$strip>>], undefined>;
40
- declare const submitNotificationActionApiData: _keystrokehq_core0.Operation<z.ZodObject<{
41
- organization_slug: z.ZodOptional<z.ZodString>;
42
- serviceType: z.ZodString;
43
- targetType: z.ZodString;
44
- targetDisplay: z.ZodOptional<z.ZodString>;
45
- targetIdentifier: z.ZodOptional<z.ZodString>;
46
- triggerType: z.ZodString;
47
- projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
- integrationId: z.ZodOptional<z.ZodString>;
49
- }, z.core.$strip>, z.ZodObject<{
50
- id: z.ZodString;
51
- organizationId: z.ZodOptional<z.ZodString>;
52
- serviceType: z.ZodOptional<z.ZodString>;
53
- targetType: z.ZodOptional<z.ZodString>;
54
- targetDisplay: z.ZodOptional<z.ZodString>;
55
- targetIdentifier: z.ZodOptional<z.ZodString>;
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
- declare const modifyOrganizationNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
62
- organization_slug: z.ZodOptional<z.ZodString>;
63
- action_id: z.ZodString;
64
- serviceType: z.ZodOptional<z.ZodString>;
65
- targetType: z.ZodOptional<z.ZodString>;
66
- targetDisplay: z.ZodOptional<z.ZodString>;
67
- targetIdentifier: z.ZodOptional<z.ZodString>;
68
- triggerType: z.ZodOptional<z.ZodString>;
69
- projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
- integrationId: z.ZodOptional<z.ZodString>;
71
- }, z.core.$strip>, z.ZodObject<{
72
- id: z.ZodString;
73
- organizationId: z.ZodOptional<z.ZodString>;
74
- serviceType: z.ZodOptional<z.ZodString>;
75
- targetType: z.ZodOptional<z.ZodString>;
76
- targetDisplay: z.ZodOptional<z.ZodString>;
77
- targetIdentifier: z.ZodOptional<z.ZodString>;
78
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
79
- SENTRY_ACCESS_TOKEN: z.ZodString;
80
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
81
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
82
- }, z.core.$strip>>], undefined>;
83
- declare const deleteOrgNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
84
- organization_slug: z.ZodOptional<z.ZodString>;
85
- action_id: z.ZodString;
86
- }, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
87
- SENTRY_ACCESS_TOKEN: z.ZodString;
88
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
89
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
90
- }, z.core.$strip>>], undefined>;
91
- declare const sentryNotificationOperations: {
92
- readonly viewOrganizationNotificationActions: _keystrokehq_core0.Operation<z.ZodObject<{
93
- cursor: z.ZodOptional<z.ZodString>;
94
- per_page: z.ZodOptional<z.ZodNumber>;
95
- query: z.ZodOptional<z.ZodString>;
96
- organization_slug: z.ZodOptional<z.ZodString>;
97
- project: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
98
- triggerType: z.ZodOptional<z.ZodString>;
99
- serviceType: z.ZodOptional<z.ZodString>;
100
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
101
- id: z.ZodString;
102
- organizationId: z.ZodOptional<z.ZodString>;
103
- serviceType: z.ZodOptional<z.ZodString>;
104
- targetType: z.ZodOptional<z.ZodString>;
105
- targetDisplay: z.ZodOptional<z.ZodString>;
106
- targetIdentifier: z.ZodOptional<z.ZodString>;
107
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
108
- SENTRY_ACCESS_TOKEN: z.ZodString;
109
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
110
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
111
- }, z.core.$strip>>], undefined>;
112
- readonly retrieveNotificationActionByOrgId: _keystrokehq_core0.Operation<z.ZodObject<{
113
- organization_slug: z.ZodOptional<z.ZodString>;
114
- action_id: z.ZodString;
115
- }, z.core.$strip>, z.ZodObject<{
116
- id: z.ZodString;
117
- organizationId: z.ZodOptional<z.ZodString>;
118
- serviceType: z.ZodOptional<z.ZodString>;
119
- targetType: z.ZodOptional<z.ZodString>;
120
- targetDisplay: z.ZodOptional<z.ZodString>;
121
- targetIdentifier: z.ZodOptional<z.ZodString>;
122
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
123
- SENTRY_ACCESS_TOKEN: z.ZodString;
124
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
125
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
126
- }, z.core.$strip>>], undefined>;
127
- readonly submitNotificationActionApiData: _keystrokehq_core0.Operation<z.ZodObject<{
128
- organization_slug: z.ZodOptional<z.ZodString>;
129
- serviceType: z.ZodString;
130
- targetType: z.ZodString;
131
- targetDisplay: z.ZodOptional<z.ZodString>;
132
- targetIdentifier: z.ZodOptional<z.ZodString>;
133
- triggerType: z.ZodString;
134
- projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
135
- integrationId: z.ZodOptional<z.ZodString>;
136
- }, z.core.$strip>, z.ZodObject<{
137
- id: z.ZodString;
138
- organizationId: z.ZodOptional<z.ZodString>;
139
- serviceType: z.ZodOptional<z.ZodString>;
140
- targetType: z.ZodOptional<z.ZodString>;
141
- targetDisplay: z.ZodOptional<z.ZodString>;
142
- targetIdentifier: z.ZodOptional<z.ZodString>;
143
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
144
- SENTRY_ACCESS_TOKEN: z.ZodString;
145
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
146
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
147
- }, z.core.$strip>>], undefined>;
148
- readonly modifyOrganizationNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
149
- organization_slug: z.ZodOptional<z.ZodString>;
150
- action_id: z.ZodString;
151
- serviceType: z.ZodOptional<z.ZodString>;
152
- targetType: z.ZodOptional<z.ZodString>;
153
- targetDisplay: z.ZodOptional<z.ZodString>;
154
- targetIdentifier: z.ZodOptional<z.ZodString>;
155
- triggerType: z.ZodOptional<z.ZodString>;
156
- projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
157
- integrationId: z.ZodOptional<z.ZodString>;
158
- }, z.core.$strip>, z.ZodObject<{
159
- id: z.ZodString;
160
- organizationId: z.ZodOptional<z.ZodString>;
161
- serviceType: z.ZodOptional<z.ZodString>;
162
- targetType: z.ZodOptional<z.ZodString>;
163
- targetDisplay: z.ZodOptional<z.ZodString>;
164
- targetIdentifier: z.ZodOptional<z.ZodString>;
165
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
166
- SENTRY_ACCESS_TOKEN: z.ZodString;
167
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
168
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
169
- }, z.core.$strip>>], undefined>;
170
- readonly deleteOrgNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
171
- organization_slug: z.ZodOptional<z.ZodString>;
172
- action_id: z.ZodString;
173
- }, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
174
- SENTRY_ACCESS_TOKEN: z.ZodString;
175
- SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
176
- SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
177
- }, z.core.$strip>>], undefined>;
178
- };
179
- //#endregion
180
- export { deleteOrgNotificationAction, modifyOrganizationNotificationAction, retrieveNotificationActionByOrgId, sentryNotificationOperations, submitNotificationActionApiData, viewOrganizationNotificationActions };
@@ -1,133 +0,0 @@
1
- import { orgScopeInputSchema, sentryIdSchema, sentryListInputSchema, sentryNotificationActionSchema } 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/notifications.ts
7
- /**
8
- * Sentry notification-action operations. Maps to PLAN.md §6.12 (5 actions).
9
- */
10
- const ORG = [{
11
- name: "organization_slug",
12
- placeholder: "{organization_slug}"
13
- }];
14
- const ORG_ACTION = [...ORG, {
15
- name: "action_id",
16
- placeholder: "{action_id}"
17
- }];
18
- const viewOrganizationNotificationActions = defineSentryEndpoint({
19
- id: "sentry.view-organization-notification-actions",
20
- name: "List Notification Actions",
21
- description: "List organization notification actions.",
22
- method: "GET",
23
- path: "/api/0/organizations/{organization_slug}/notifications/actions/",
24
- pathParams: ORG,
25
- input: sentryListInputSchema.merge(orgScopeInputSchema).extend({
26
- project: z.array(z.number().int()).optional(),
27
- triggerType: z.string().optional(),
28
- serviceType: z.string().optional()
29
- }),
30
- queryFields: [
31
- "cursor",
32
- "per_page",
33
- "query",
34
- "project",
35
- "triggerType",
36
- "serviceType"
37
- ],
38
- output: z.array(sentryNotificationActionSchema),
39
- pagination: "cursor",
40
- requiredOAuthScopes: [...SENTRY_SCOPE.alertsRead]
41
- });
42
- const retrieveNotificationActionByOrgId = defineSentryEndpoint({
43
- id: "sentry.retrieve-notification-action-by-org-id",
44
- name: "Retrieve Notification Action",
45
- description: "Fetch a single notification action by id.",
46
- method: "GET",
47
- path: "/api/0/organizations/{organization_slug}/notifications/actions/{action_id}/",
48
- pathParams: ORG_ACTION,
49
- input: orgScopeInputSchema.extend({ action_id: sentryIdSchema }),
50
- output: sentryNotificationActionSchema,
51
- requiredOAuthScopes: [...SENTRY_SCOPE.alertsRead]
52
- });
53
- const submitNotificationActionApiData = defineSentryEndpoint({
54
- id: "sentry.submit-notification-action-api-data",
55
- name: "Create Notification Action",
56
- description: "Create a new organization notification action.",
57
- method: "POST",
58
- path: "/api/0/organizations/{organization_slug}/notifications/actions/",
59
- pathParams: ORG,
60
- input: orgScopeInputSchema.extend({
61
- serviceType: z.string().min(1),
62
- targetType: z.string().min(1),
63
- targetDisplay: z.string().optional(),
64
- targetIdentifier: z.string().optional(),
65
- triggerType: z.string().min(1),
66
- projects: z.array(z.string()).optional(),
67
- integrationId: z.string().optional()
68
- }),
69
- bodyFields: [
70
- "serviceType",
71
- "targetType",
72
- "targetDisplay",
73
- "targetIdentifier",
74
- "triggerType",
75
- "projects",
76
- "integrationId"
77
- ],
78
- output: sentryNotificationActionSchema,
79
- needsApproval: true,
80
- requiredOAuthScopes: [...SENTRY_SCOPE.alertsWrite]
81
- });
82
- const modifyOrganizationNotificationAction = defineSentryEndpoint({
83
- id: "sentry.modify-organization-notification-action",
84
- name: "Update Notification Action",
85
- description: "Update a notification action in place.",
86
- method: "PUT",
87
- path: "/api/0/organizations/{organization_slug}/notifications/actions/{action_id}/",
88
- pathParams: ORG_ACTION,
89
- input: orgScopeInputSchema.extend({
90
- action_id: sentryIdSchema,
91
- serviceType: z.string().optional(),
92
- targetType: z.string().optional(),
93
- targetDisplay: z.string().optional(),
94
- targetIdentifier: z.string().optional(),
95
- triggerType: z.string().optional(),
96
- projects: z.array(z.string()).optional(),
97
- integrationId: z.string().optional()
98
- }),
99
- bodyFields: [
100
- "serviceType",
101
- "targetType",
102
- "targetDisplay",
103
- "targetIdentifier",
104
- "triggerType",
105
- "projects",
106
- "integrationId"
107
- ],
108
- output: sentryNotificationActionSchema,
109
- needsApproval: true,
110
- requiredOAuthScopes: [...SENTRY_SCOPE.alertsWrite]
111
- });
112
- const deleteOrgNotificationAction = defineSentryEndpoint({
113
- id: "sentry.delete-org-notification-action",
114
- name: "Delete Notification Action",
115
- description: "Delete a notification action by id.",
116
- method: "DELETE",
117
- path: "/api/0/organizations/{organization_slug}/notifications/actions/{action_id}/",
118
- pathParams: ORG_ACTION,
119
- input: orgScopeInputSchema.extend({ action_id: sentryIdSchema }),
120
- output: z.unknown(),
121
- needsApproval: true,
122
- requiredOAuthScopes: [...SENTRY_SCOPE.alertsWrite]
123
- });
124
- const sentryNotificationOperations = {
125
- viewOrganizationNotificationActions,
126
- retrieveNotificationActionByOrgId,
127
- submitNotificationActionApiData,
128
- modifyOrganizationNotificationAction,
129
- deleteOrgNotificationAction
130
- };
131
-
132
- //#endregion
133
- export { deleteOrgNotificationAction, modifyOrganizationNotificationAction, retrieveNotificationActionByOrgId, sentryNotificationOperations, submitNotificationActionApiData, viewOrganizationNotificationActions };