@keystrokehq/sentry 0.0.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.
- package/README.md +218 -0
- package/dist/_official/index.d.mts +3 -0
- package/dist/_official/index.mjs +3 -0
- package/dist/_runtime/index.d.mts +2 -0
- package/dist/_runtime/index.mjs +3 -0
- package/dist/alerts.d.mts +551 -0
- package/dist/alerts.mjs +300 -0
- package/dist/client.d.mts +86 -0
- package/dist/client.mjs +233 -0
- package/dist/connection.d.mts +3 -0
- package/dist/connection.mjs +3 -0
- package/dist/dashboards.d.mts +203 -0
- package/dist/dashboards.mjs +122 -0
- package/dist/debug-files.d.mts +127 -0
- package/dist/debug-files.mjs +73 -0
- package/dist/deploys.d.mts +103 -0
- package/dist/deploys.mjs +67 -0
- package/dist/discover.d.mts +235 -0
- package/dist/discover.mjs +138 -0
- package/dist/endpoint-factory-BwjbcPwW.mjs +96 -0
- package/dist/environments.d.mts +121 -0
- package/dist/environments.mjs +71 -0
- package/dist/errors-DfEFwcTe.mjs +142 -0
- package/dist/events-api.d.mts +311 -0
- package/dist/events-api.mjs +184 -0
- package/dist/events.d.mts +754 -0
- package/dist/events.mjs +142 -0
- package/dist/feedback.d.mts +99 -0
- package/dist/feedback.mjs +63 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/integration-C8KHkeNG.d.mts +58 -0
- package/dist/integration-WwY95cWE.mjs +156 -0
- package/dist/issues.d.mts +563 -0
- package/dist/issues.mjs +324 -0
- package/dist/members.d.mts +365 -0
- package/dist/members.mjs +156 -0
- package/dist/messaging.d.mts +1 -0
- package/dist/messaging.mjs +1 -0
- package/dist/monitors.d.mts +539 -0
- package/dist/monitors.mjs +234 -0
- package/dist/notifications.d.mts +221 -0
- package/dist/notifications.mjs +133 -0
- package/dist/organizations.d.mts +563 -0
- package/dist/organizations.mjs +334 -0
- package/dist/pagination-PlgAqbZt.mjs +116 -0
- package/dist/project-keys.d.mts +287 -0
- package/dist/project-keys.mjs +122 -0
- package/dist/projects.d.mts +687 -0
- package/dist/projects.mjs +378 -0
- package/dist/provider-app-BANn4KOL.d.mts +45 -0
- package/dist/releases.d.mts +949 -0
- package/dist/releases.mjs +479 -0
- package/dist/replays.d.mts +307 -0
- package/dist/replays.mjs +192 -0
- package/dist/schemas.d.mts +381 -0
- package/dist/schemas.mjs +318 -0
- package/dist/scim.d.mts +413 -0
- package/dist/scim.mjs +249 -0
- package/dist/scopes-RRU0vt-a.mjs +36 -0
- package/dist/teams.d.mts +561 -0
- package/dist/teams.mjs +266 -0
- package/dist/triggers.d.mts +83 -0
- package/dist/triggers.mjs +263 -0
- package/dist/user-emails.d.mts +117 -0
- package/dist/user-emails.mjs +60 -0
- package/dist/verification.d.mts +30 -0
- package/dist/verification.mjs +83 -0
- package/dist/webhooks.d.mts +199 -0
- package/dist/webhooks.mjs +108 -0
- package/package.json +178 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { orgProjectScopeInputSchema, orgScopeInputSchema, sentryJsonArraySchema, sentryJsonObjectSchema, sentryListInputSchema, sentryMonitorSchema, sentrySlugSchema } from "./schemas.mjs";
|
|
2
|
+
import { t as defineSentryEndpoint } from "./endpoint-factory-BwjbcPwW.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: "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: "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: "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: "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: "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: "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: "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: "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: "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: "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 };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
+
|
|
5
|
+
//#region src/notifications.d.ts
|
|
6
|
+
declare const viewOrganizationNotificationActions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
8
|
+
per_page: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
query: z.ZodOptional<z.ZodString>;
|
|
10
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
11
|
+
project: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
12
|
+
triggerType: z.ZodOptional<z.ZodString>;
|
|
13
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
18
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
19
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
20
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
22
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
23
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
24
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
26
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
27
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
28
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
30
|
+
declare const retrieveNotificationActionByOrgId: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
31
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
32
|
+
action_id: z.ZodString;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
37
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
38
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
39
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
41
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
42
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
43
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
45
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
46
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
47
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
49
|
+
declare const submitNotificationActionApiData: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
50
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
51
|
+
serviceType: z.ZodString;
|
|
52
|
+
targetType: z.ZodString;
|
|
53
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
54
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
55
|
+
triggerType: z.ZodString;
|
|
56
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
61
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
62
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
63
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
64
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
66
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
67
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
68
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
70
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
71
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
72
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
74
|
+
declare const modifyOrganizationNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
75
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
76
|
+
action_id: z.ZodString;
|
|
77
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
78
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
79
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
80
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
81
|
+
triggerType: z.ZodOptional<z.ZodString>;
|
|
82
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
88
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
89
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
90
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
92
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
93
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
94
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
96
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
97
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
98
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
100
|
+
declare const deleteOrgNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
101
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
102
|
+
action_id: z.ZodString;
|
|
103
|
+
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
104
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
105
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
106
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>], undefined>;
|
|
112
|
+
declare const sentryNotificationOperations: {
|
|
113
|
+
readonly viewOrganizationNotificationActions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
114
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
115
|
+
per_page: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
query: z.ZodOptional<z.ZodString>;
|
|
117
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
118
|
+
project: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
119
|
+
triggerType: z.ZodOptional<z.ZodString>;
|
|
120
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
121
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
124
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
125
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
126
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
127
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
129
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
130
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
131
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
133
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
134
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
135
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
137
|
+
readonly retrieveNotificationActionByOrgId: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
138
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
139
|
+
action_id: z.ZodString;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
143
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
144
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
145
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
146
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
148
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
149
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
150
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
152
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
153
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
154
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
156
|
+
readonly submitNotificationActionApiData: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
157
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
158
|
+
serviceType: z.ZodString;
|
|
159
|
+
targetType: z.ZodString;
|
|
160
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
161
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
162
|
+
triggerType: z.ZodString;
|
|
163
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
168
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
169
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
170
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
171
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
173
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
174
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
175
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
177
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
178
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
179
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
180
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
181
|
+
readonly modifyOrganizationNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
182
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
183
|
+
action_id: z.ZodString;
|
|
184
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
185
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
186
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
187
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
188
|
+
triggerType: z.ZodOptional<z.ZodString>;
|
|
189
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
191
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
194
|
+
serviceType: z.ZodOptional<z.ZodString>;
|
|
195
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
196
|
+
targetDisplay: z.ZodOptional<z.ZodString>;
|
|
197
|
+
targetIdentifier: z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
199
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
200
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
201
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
203
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
204
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
205
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
207
|
+
readonly deleteOrgNotificationAction: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
208
|
+
organization_slug: z.ZodOptional<z.ZodString>;
|
|
209
|
+
action_id: z.ZodString;
|
|
210
|
+
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"sentry", z.ZodObject<{
|
|
211
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
212
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
213
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
215
|
+
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
216
|
+
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
217
|
+
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
219
|
+
};
|
|
220
|
+
//#endregion
|
|
221
|
+
export { deleteOrgNotificationAction, modifyOrganizationNotificationAction, retrieveNotificationActionByOrgId, sentryNotificationOperations, submitNotificationActionApiData, viewOrganizationNotificationActions };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { orgScopeInputSchema, sentryIdSchema, sentryListInputSchema, sentryNotificationActionSchema } from "./schemas.mjs";
|
|
2
|
+
import { t as defineSentryEndpoint } from "./endpoint-factory-BwjbcPwW.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: "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: "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: "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: "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: "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 };
|