@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.
- package/README.md +40 -187
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +4 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +6 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/{schemas.d.mts → schemas/index.d.mts} +3 -3
- package/dist/schemas/index.mjs +3 -0
- package/dist/{schemas.mjs → sentry-api-DjJ24hwX.mjs} +2 -2
- package/dist/sentry-app.credential-set-Cdj6Qxiz.mjs +23 -0
- package/dist/sentry-app.credential-set-DxK7J7JO.d.mts +50 -0
- package/dist/sentry.credential-set-CyS3KAfW.mjs +62 -0
- package/dist/view-organization-notification-actions.operation-BXT4VBys.mjs +5021 -0
- package/dist/view-organization-notification-actions.operation-DfkZimCZ.d.mts +5255 -0
- package/package.json +13 -121
- package/dist/_official/index.d.mts +0 -41
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -2
- package/dist/_runtime/index.mjs +0 -3
- package/dist/alerts.d.mts +0 -462
- package/dist/alerts.mjs +0 -300
- package/dist/client.d.mts +0 -86
- package/dist/client.mjs +0 -233
- package/dist/connection.d.mts +0 -3
- package/dist/connection.mjs +0 -3
- package/dist/dashboards.d.mts +0 -162
- package/dist/dashboards.mjs +0 -122
- package/dist/debug-files.d.mts +0 -102
- package/dist/debug-files.mjs +0 -73
- package/dist/deploys.d.mts +0 -86
- package/dist/deploys.mjs +0 -67
- package/dist/discover.d.mts +0 -194
- package/dist/discover.mjs +0 -138
- package/dist/endpoint-factory-DcT49a8O.mjs +0 -96
- package/dist/environments.d.mts +0 -96
- package/dist/environments.mjs +0 -71
- package/dist/errors-DfEFwcTe.mjs +0 -142
- package/dist/events-api.d.mts +0 -254
- package/dist/events-api.mjs +0 -184
- package/dist/events.d.mts +0 -754
- package/dist/events.mjs +0 -142
- package/dist/feedback.d.mts +0 -82
- package/dist/feedback.mjs +0 -63
- package/dist/integration-D7KCM1-p.mjs +0 -75
- package/dist/integration-veqa_7yB.d.mts +0 -33
- package/dist/issues.d.mts +0 -458
- package/dist/issues.mjs +0 -324
- package/dist/members.d.mts +0 -308
- package/dist/members.mjs +0 -156
- package/dist/messaging.d.mts +0 -1
- package/dist/messaging.mjs +0 -1
- package/dist/monitors.d.mts +0 -458
- package/dist/monitors.mjs +0 -234
- package/dist/notifications.d.mts +0 -180
- package/dist/notifications.mjs +0 -133
- package/dist/organizations.d.mts +0 -442
- package/dist/organizations.mjs +0 -334
- package/dist/pagination-PlgAqbZt.mjs +0 -116
- package/dist/project-keys.d.mts +0 -246
- package/dist/project-keys.mjs +0 -122
- package/dist/projects.d.mts +0 -534
- package/dist/projects.mjs +0 -378
- package/dist/releases.d.mts +0 -780
- package/dist/releases.mjs +0 -479
- package/dist/replays.d.mts +0 -234
- package/dist/replays.mjs +0 -192
- package/dist/scim.d.mts +0 -324
- package/dist/scim.mjs +0 -249
- package/dist/scopes-RRU0vt-a.mjs +0 -36
- package/dist/teams.d.mts +0 -448
- package/dist/teams.mjs +0 -266
- package/dist/triggers.d.mts +0 -41
- package/dist/triggers.mjs +0 -56
- package/dist/user-emails.d.mts +0 -84
- package/dist/user-emails.mjs +0 -60
- package/dist/verification.d.mts +0 -30
- package/dist/verification.mjs +0 -83
- package/dist/webhooks.d.mts +0 -158
- package/dist/webhooks.mjs +0 -108
package/dist/discover.d.mts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/discover.d.ts
|
|
5
|
-
declare const saveOrganizationDiscoverQuery: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
6
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
7
|
-
name: z.ZodString;
|
|
8
|
-
query: z.ZodOptional<z.ZodString>;
|
|
9
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
11
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
12
|
-
environment: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
-
range: z.ZodOptional<z.ZodString>;
|
|
14
|
-
start: z.ZodOptional<z.ZodString>;
|
|
15
|
-
end: z.ZodOptional<z.ZodString>;
|
|
16
|
-
queryDataset: z.ZodOptional<z.ZodString>;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
id: z.ZodString;
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
query: z.ZodOptional<z.ZodString>;
|
|
21
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
23
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
24
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
25
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", 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>;
|
|
30
|
-
declare const retrieveSavedDiscoverQueries: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
31
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
32
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
query: z.ZodOptional<z.ZodString>;
|
|
34
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
35
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
36
|
-
id: z.ZodString;
|
|
37
|
-
name: z.ZodString;
|
|
38
|
-
query: z.ZodOptional<z.ZodString>;
|
|
39
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
41
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
42
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
43
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
44
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
45
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
46
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
47
|
-
}, z.core.$strip>>], undefined>;
|
|
48
|
-
declare const retrieveSavedDiscoverQueryForOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
49
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
50
|
-
query_id: z.ZodString;
|
|
51
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
-
id: z.ZodString;
|
|
53
|
-
name: z.ZodString;
|
|
54
|
-
query: z.ZodOptional<z.ZodString>;
|
|
55
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
57
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
58
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
59
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
60
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
61
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
62
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
63
|
-
}, z.core.$strip>>], undefined>;
|
|
64
|
-
declare const updateSavedQueryForOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
65
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
66
|
-
query_id: z.ZodString;
|
|
67
|
-
name: z.ZodOptional<z.ZodString>;
|
|
68
|
-
query: z.ZodOptional<z.ZodString>;
|
|
69
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
71
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
72
|
-
environment: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
-
range: z.ZodOptional<z.ZodString>;
|
|
74
|
-
start: z.ZodOptional<z.ZodString>;
|
|
75
|
-
end: z.ZodOptional<z.ZodString>;
|
|
76
|
-
queryDataset: z.ZodOptional<z.ZodString>;
|
|
77
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
-
id: z.ZodString;
|
|
79
|
-
name: z.ZodString;
|
|
80
|
-
query: z.ZodOptional<z.ZodString>;
|
|
81
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
83
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
84
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
85
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
86
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
87
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
88
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
89
|
-
}, z.core.$strip>>], undefined>;
|
|
90
|
-
declare const deleteOrganizationDiscoverQuery: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
91
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
92
|
-
query_id: z.ZodString;
|
|
93
|
-
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
94
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
95
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
96
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
97
|
-
}, z.core.$strip>>], undefined>;
|
|
98
|
-
declare const sentryDiscoverOperations: {
|
|
99
|
-
readonly saveOrganizationDiscoverQuery: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
100
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
101
|
-
name: z.ZodString;
|
|
102
|
-
query: z.ZodOptional<z.ZodString>;
|
|
103
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
105
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
106
|
-
environment: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
107
|
-
range: z.ZodOptional<z.ZodString>;
|
|
108
|
-
start: z.ZodOptional<z.ZodString>;
|
|
109
|
-
end: z.ZodOptional<z.ZodString>;
|
|
110
|
-
queryDataset: z.ZodOptional<z.ZodString>;
|
|
111
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
-
id: z.ZodString;
|
|
113
|
-
name: z.ZodString;
|
|
114
|
-
query: z.ZodOptional<z.ZodString>;
|
|
115
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
116
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
117
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
118
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
119
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
120
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
121
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
122
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
123
|
-
}, z.core.$strip>>], undefined>;
|
|
124
|
-
readonly retrieveSavedDiscoverQueries: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
125
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
126
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
127
|
-
query: z.ZodOptional<z.ZodString>;
|
|
128
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
129
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
130
|
-
id: z.ZodString;
|
|
131
|
-
name: z.ZodString;
|
|
132
|
-
query: z.ZodOptional<z.ZodString>;
|
|
133
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
135
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
136
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
137
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
138
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
139
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
140
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
141
|
-
}, z.core.$strip>>], undefined>;
|
|
142
|
-
readonly retrieveSavedDiscoverQueryForOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
143
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
144
|
-
query_id: z.ZodString;
|
|
145
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
-
id: z.ZodString;
|
|
147
|
-
name: z.ZodString;
|
|
148
|
-
query: z.ZodOptional<z.ZodString>;
|
|
149
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
150
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
151
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
152
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
153
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
154
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
155
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
156
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
157
|
-
}, z.core.$strip>>], undefined>;
|
|
158
|
-
readonly updateSavedQueryForOrganization: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
159
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
160
|
-
query_id: z.ZodString;
|
|
161
|
-
name: z.ZodOptional<z.ZodString>;
|
|
162
|
-
query: z.ZodOptional<z.ZodString>;
|
|
163
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
165
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
166
|
-
environment: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
167
|
-
range: z.ZodOptional<z.ZodString>;
|
|
168
|
-
start: z.ZodOptional<z.ZodString>;
|
|
169
|
-
end: z.ZodOptional<z.ZodString>;
|
|
170
|
-
queryDataset: z.ZodOptional<z.ZodString>;
|
|
171
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
-
id: z.ZodString;
|
|
173
|
-
name: z.ZodString;
|
|
174
|
-
query: z.ZodOptional<z.ZodString>;
|
|
175
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
176
|
-
orderby: z.ZodOptional<z.ZodString>;
|
|
177
|
-
projects: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
178
|
-
dateCreated: z.ZodOptional<z.ZodISODateTime>;
|
|
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 deleteOrganizationDiscoverQuery: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
185
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
186
|
-
query_id: z.ZodString;
|
|
187
|
-
}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
188
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
189
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
190
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
191
|
-
}, z.core.$strip>>], undefined>;
|
|
192
|
-
};
|
|
193
|
-
//#endregion
|
|
194
|
-
export { deleteOrganizationDiscoverQuery, retrieveSavedDiscoverQueries, retrieveSavedDiscoverQueryForOrganization, saveOrganizationDiscoverQuery, sentryDiscoverOperations, updateSavedQueryForOrganization };
|
package/dist/discover.mjs
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { orgScopeInputSchema, sentryDiscoverSavedQuerySchema, sentryIdSchema, 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/discover.ts
|
|
7
|
-
/**
|
|
8
|
-
* Sentry Discover saved-query operations. Maps to PLAN.md §6.15 (5 actions).
|
|
9
|
-
*/
|
|
10
|
-
const ORG = [{
|
|
11
|
-
name: "organization_slug",
|
|
12
|
-
placeholder: "{organization_slug}"
|
|
13
|
-
}];
|
|
14
|
-
const ORG_QUERY = [...ORG, {
|
|
15
|
-
name: "query_id",
|
|
16
|
-
placeholder: "{query_id}"
|
|
17
|
-
}];
|
|
18
|
-
const saveOrganizationDiscoverQuery = defineSentryEndpoint({
|
|
19
|
-
id: "sentry.save-organization-discover-query",
|
|
20
|
-
name: "Save Discover Query",
|
|
21
|
-
description: "Create a new saved Discover query.",
|
|
22
|
-
method: "POST",
|
|
23
|
-
path: "/api/0/organizations/{organization_slug}/discover/saved/",
|
|
24
|
-
pathParams: ORG,
|
|
25
|
-
input: orgScopeInputSchema.extend({
|
|
26
|
-
name: z.string().min(1),
|
|
27
|
-
query: z.string().optional(),
|
|
28
|
-
fields: z.array(z.string()).optional(),
|
|
29
|
-
orderby: z.string().optional(),
|
|
30
|
-
projects: z.array(z.number().int()).optional(),
|
|
31
|
-
environment: z.array(z.string()).optional(),
|
|
32
|
-
range: z.string().optional(),
|
|
33
|
-
start: z.string().optional(),
|
|
34
|
-
end: z.string().optional(),
|
|
35
|
-
queryDataset: z.string().optional()
|
|
36
|
-
}),
|
|
37
|
-
bodyFields: [
|
|
38
|
-
"name",
|
|
39
|
-
"query",
|
|
40
|
-
"fields",
|
|
41
|
-
"orderby",
|
|
42
|
-
"projects",
|
|
43
|
-
"environment",
|
|
44
|
-
"range",
|
|
45
|
-
"start",
|
|
46
|
-
"end",
|
|
47
|
-
"queryDataset"
|
|
48
|
-
],
|
|
49
|
-
output: sentryDiscoverSavedQuerySchema,
|
|
50
|
-
needsApproval: true,
|
|
51
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.orgWrite]
|
|
52
|
-
});
|
|
53
|
-
const retrieveSavedDiscoverQueries = defineSentryEndpoint({
|
|
54
|
-
id: "sentry.retrieve-saved-discover-queries",
|
|
55
|
-
name: "List Saved Discover Queries",
|
|
56
|
-
description: "List saved Discover queries.",
|
|
57
|
-
method: "GET",
|
|
58
|
-
path: "/api/0/organizations/{organization_slug}/discover/saved/",
|
|
59
|
-
pathParams: ORG,
|
|
60
|
-
input: sentryListInputSchema.merge(orgScopeInputSchema),
|
|
61
|
-
queryFields: [
|
|
62
|
-
"cursor",
|
|
63
|
-
"per_page",
|
|
64
|
-
"query"
|
|
65
|
-
],
|
|
66
|
-
output: z.array(sentryDiscoverSavedQuerySchema),
|
|
67
|
-
pagination: "cursor",
|
|
68
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.orgRead]
|
|
69
|
-
});
|
|
70
|
-
const retrieveSavedDiscoverQueryForOrganization = defineSentryEndpoint({
|
|
71
|
-
id: "sentry.retrieve-saved-discover-query-for-organization",
|
|
72
|
-
name: "Retrieve Saved Discover Query",
|
|
73
|
-
description: "Fetch one saved Discover query by id.",
|
|
74
|
-
method: "GET",
|
|
75
|
-
path: "/api/0/organizations/{organization_slug}/discover/saved/{query_id}/",
|
|
76
|
-
pathParams: ORG_QUERY,
|
|
77
|
-
input: orgScopeInputSchema.extend({ query_id: sentryIdSchema }),
|
|
78
|
-
output: sentryDiscoverSavedQuerySchema,
|
|
79
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.orgRead]
|
|
80
|
-
});
|
|
81
|
-
const updateSavedQueryForOrganization = defineSentryEndpoint({
|
|
82
|
-
id: "sentry.update-saved-query-for-organization",
|
|
83
|
-
name: "Update Saved Discover Query",
|
|
84
|
-
description: "Update a saved Discover query.",
|
|
85
|
-
method: "PUT",
|
|
86
|
-
path: "/api/0/organizations/{organization_slug}/discover/saved/{query_id}/",
|
|
87
|
-
pathParams: ORG_QUERY,
|
|
88
|
-
input: orgScopeInputSchema.extend({
|
|
89
|
-
query_id: sentryIdSchema,
|
|
90
|
-
name: z.string().optional(),
|
|
91
|
-
query: z.string().optional(),
|
|
92
|
-
fields: z.array(z.string()).optional(),
|
|
93
|
-
orderby: z.string().optional(),
|
|
94
|
-
projects: z.array(z.number().int()).optional(),
|
|
95
|
-
environment: z.array(z.string()).optional(),
|
|
96
|
-
range: z.string().optional(),
|
|
97
|
-
start: z.string().optional(),
|
|
98
|
-
end: z.string().optional(),
|
|
99
|
-
queryDataset: z.string().optional()
|
|
100
|
-
}),
|
|
101
|
-
bodyFields: [
|
|
102
|
-
"name",
|
|
103
|
-
"query",
|
|
104
|
-
"fields",
|
|
105
|
-
"orderby",
|
|
106
|
-
"projects",
|
|
107
|
-
"environment",
|
|
108
|
-
"range",
|
|
109
|
-
"start",
|
|
110
|
-
"end",
|
|
111
|
-
"queryDataset"
|
|
112
|
-
],
|
|
113
|
-
output: sentryDiscoverSavedQuerySchema,
|
|
114
|
-
needsApproval: true,
|
|
115
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.orgWrite]
|
|
116
|
-
});
|
|
117
|
-
const deleteOrganizationDiscoverQuery = defineSentryEndpoint({
|
|
118
|
-
id: "sentry.delete-organization-discover-query",
|
|
119
|
-
name: "Delete Saved Discover Query",
|
|
120
|
-
description: "Delete a saved Discover query by id.",
|
|
121
|
-
method: "DELETE",
|
|
122
|
-
path: "/api/0/organizations/{organization_slug}/discover/saved/{query_id}/",
|
|
123
|
-
pathParams: ORG_QUERY,
|
|
124
|
-
input: orgScopeInputSchema.extend({ query_id: sentryIdSchema }),
|
|
125
|
-
output: z.unknown(),
|
|
126
|
-
needsApproval: true,
|
|
127
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.orgWrite]
|
|
128
|
-
});
|
|
129
|
-
const sentryDiscoverOperations = {
|
|
130
|
-
saveOrganizationDiscoverQuery,
|
|
131
|
-
retrieveSavedDiscoverQueries,
|
|
132
|
-
retrieveSavedDiscoverQueryForOrganization,
|
|
133
|
-
updateSavedQueryForOrganization,
|
|
134
|
-
deleteOrganizationDiscoverQuery
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
//#endregion
|
|
138
|
-
export { deleteOrganizationDiscoverQuery, retrieveSavedDiscoverQueries, retrieveSavedDiscoverQueryForOrganization, saveOrganizationDiscoverQuery, sentryDiscoverOperations, updateSavedQueryForOrganization };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { t as sentry } from "./integration-D7KCM1-p.mjs";
|
|
2
|
-
import { createSentryClient } from "./client.mjs";
|
|
3
|
-
import { createOfficialOperationFactory } from "@keystrokehq/integration-authoring/official";
|
|
4
|
-
|
|
5
|
-
//#region src/factory.ts
|
|
6
|
-
/**
|
|
7
|
-
* Package-local operation factory. Every Sentry operation is defined
|
|
8
|
-
* via this factory so it is stamped with the official-integration identity.
|
|
9
|
-
*/
|
|
10
|
-
const sentryOperation = createOfficialOperationFactory(sentry);
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/endpoint-factory.ts
|
|
14
|
-
const ORGANIZATION_SLUG_TOKEN = "organization_slug";
|
|
15
|
-
function substitutePath(template, pathParams, input, credentials) {
|
|
16
|
-
let url = template;
|
|
17
|
-
for (const param of pathParams) {
|
|
18
|
-
const raw = input[param.name];
|
|
19
|
-
let value;
|
|
20
|
-
if (typeof raw === "string" && raw.length > 0) value = raw;
|
|
21
|
-
else if (param.name === ORGANIZATION_SLUG_TOKEN && typeof credentials.SENTRY_ORG_SLUG === "string" && credentials.SENTRY_ORG_SLUG.length > 0) value = credentials.SENTRY_ORG_SLUG;
|
|
22
|
-
else throw new Error(`Sentry endpoint requires path param "${param.name}" but it was not supplied on the operation input and could not be inferred from credentials.`);
|
|
23
|
-
url = url.replaceAll(param.placeholder, encodeURIComponent(value));
|
|
24
|
-
}
|
|
25
|
-
if (url.includes("{")) throw new Error(`Sentry endpoint path template "${template}" contains unresolved placeholders; every "{token}" must have a matching pathParams entry.`);
|
|
26
|
-
return url;
|
|
27
|
-
}
|
|
28
|
-
function pickFields(input, fields) {
|
|
29
|
-
if (!fields || fields.length === 0) return void 0;
|
|
30
|
-
const picked = {};
|
|
31
|
-
let any = false;
|
|
32
|
-
for (const key of fields) {
|
|
33
|
-
const value = input[key];
|
|
34
|
-
if (value !== void 0) {
|
|
35
|
-
picked[key] = value;
|
|
36
|
-
any = true;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return any ? picked : void 0;
|
|
40
|
-
}
|
|
41
|
-
function toBody(input, definition) {
|
|
42
|
-
if (definition.method === "GET" || definition.method === "DELETE") return void 0;
|
|
43
|
-
if (definition.bodyFields && definition.bodyFields.length > 0) return pickFields(input, definition.bodyFields) ?? {};
|
|
44
|
-
return {};
|
|
45
|
-
}
|
|
46
|
-
/** Exported so domain-module tests can exercise path substitution directly. */
|
|
47
|
-
function buildSentryEndpointRequest(definition, input, credentials) {
|
|
48
|
-
return {
|
|
49
|
-
url: substitutePath(definition.path, definition.pathParams ?? [], input, credentials),
|
|
50
|
-
query: pickFields(input, definition.queryFields),
|
|
51
|
-
body: toBody(input, definition)
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
async function executeEndpoint(definition, rawInput, credentials) {
|
|
55
|
-
const input = rawInput;
|
|
56
|
-
const client = createSentryClient({
|
|
57
|
-
SENTRY_ACCESS_TOKEN: credentials.SENTRY_ACCESS_TOKEN,
|
|
58
|
-
...credentials.SENTRY_REGION_URL ? { SENTRY_REGION_URL: credentials.SENTRY_REGION_URL } : {},
|
|
59
|
-
...credentials.SENTRY_ORG_SLUG ? { SENTRY_ORG_SLUG: credentials.SENTRY_ORG_SLUG } : {}
|
|
60
|
-
});
|
|
61
|
-
const { url, query, body } = buildSentryEndpointRequest(definition, input, credentials);
|
|
62
|
-
if (definition.pagination === "cursor") {
|
|
63
|
-
const items = [];
|
|
64
|
-
for await (const page of client.paginate(url, query ?? {})) if (Array.isArray(page.data)) items.push(...page.data);
|
|
65
|
-
else items.push(page.data);
|
|
66
|
-
return items;
|
|
67
|
-
}
|
|
68
|
-
switch (definition.method) {
|
|
69
|
-
case "GET": return (await client.get(url, query)).data;
|
|
70
|
-
case "POST": return (await client.post(url, body, query)).data;
|
|
71
|
-
case "PUT": return (await client.put(url, body, query)).data;
|
|
72
|
-
case "PATCH": return (await client.patch(url, body, query)).data;
|
|
73
|
-
case "DELETE": return (await client.delete(url, query)).data;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Materializes a single Sentry endpoint definition into an `Operation`
|
|
78
|
-
* wrapped with the official-integration factory.
|
|
79
|
-
*/
|
|
80
|
-
function defineSentryEndpoint(definition) {
|
|
81
|
-
return sentryOperation({
|
|
82
|
-
id: definition.id,
|
|
83
|
-
name: definition.name,
|
|
84
|
-
description: definition.description,
|
|
85
|
-
input: definition.input,
|
|
86
|
-
output: definition.output,
|
|
87
|
-
...definition.needsApproval ? { needsApproval: true } : {},
|
|
88
|
-
...definition.requiredOAuthScopes ? { requiredOAuthScopes: definition.requiredOAuthScopes } : {},
|
|
89
|
-
run: async (input, credentials) => {
|
|
90
|
-
return await executeEndpoint(definition, input, credentials);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
//#endregion
|
|
96
|
-
export { defineSentryEndpoint as t };
|
package/dist/environments.d.mts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/environments.d.ts
|
|
5
|
-
declare const retrieveProjectEnvironments: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
6
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
7
|
-
project_slug: z.ZodString;
|
|
8
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
visible: "visible";
|
|
10
|
-
hidden: "hidden";
|
|
11
|
-
all: "all";
|
|
12
|
-
}>>;
|
|
13
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
14
|
-
id: z.ZodOptional<z.ZodString>;
|
|
15
|
-
name: z.ZodString;
|
|
16
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
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 fetchProjectEnvironmentDetails: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
23
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
24
|
-
project_slug: z.ZodString;
|
|
25
|
-
environment: z.ZodString;
|
|
26
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
-
id: z.ZodOptional<z.ZodString>;
|
|
28
|
-
name: z.ZodString;
|
|
29
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
31
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
32
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
33
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
34
|
-
}, z.core.$strip>>], undefined>;
|
|
35
|
-
declare const updateEnvironmentVisibility: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
36
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
37
|
-
project_slug: z.ZodString;
|
|
38
|
-
environment: z.ZodString;
|
|
39
|
-
isHidden: z.ZodBoolean;
|
|
40
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
-
id: z.ZodOptional<z.ZodString>;
|
|
42
|
-
name: z.ZodString;
|
|
43
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", 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>;
|
|
49
|
-
declare const sentryEnvironmentOperations: {
|
|
50
|
-
readonly retrieveProjectEnvironments: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
51
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
52
|
-
project_slug: z.ZodString;
|
|
53
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
54
|
-
visible: "visible";
|
|
55
|
-
hidden: "hidden";
|
|
56
|
-
all: "all";
|
|
57
|
-
}>>;
|
|
58
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
59
|
-
id: z.ZodOptional<z.ZodString>;
|
|
60
|
-
name: z.ZodString;
|
|
61
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
63
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
64
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
65
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
66
|
-
}, z.core.$strip>>], undefined>;
|
|
67
|
-
readonly fetchProjectEnvironmentDetails: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
68
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
69
|
-
project_slug: z.ZodString;
|
|
70
|
-
environment: z.ZodString;
|
|
71
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
-
id: z.ZodOptional<z.ZodString>;
|
|
73
|
-
name: z.ZodString;
|
|
74
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
76
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
77
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
78
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
79
|
-
}, z.core.$strip>>], undefined>;
|
|
80
|
-
readonly updateEnvironmentVisibility: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
81
|
-
organization_slug: z.ZodOptional<z.ZodString>;
|
|
82
|
-
project_slug: z.ZodString;
|
|
83
|
-
environment: z.ZodString;
|
|
84
|
-
isHidden: z.ZodBoolean;
|
|
85
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
-
id: z.ZodOptional<z.ZodString>;
|
|
87
|
-
name: z.ZodString;
|
|
88
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sentry", z.ZodObject<{
|
|
90
|
-
SENTRY_ACCESS_TOKEN: z.ZodString;
|
|
91
|
-
SENTRY_REGION_URL: z.ZodOptional<z.ZodString>;
|
|
92
|
-
SENTRY_ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
93
|
-
}, z.core.$strip>>], undefined>;
|
|
94
|
-
};
|
|
95
|
-
//#endregion
|
|
96
|
-
export { fetchProjectEnvironmentDetails, retrieveProjectEnvironments, sentryEnvironmentOperations, updateEnvironmentVisibility };
|
package/dist/environments.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { orgProjectScopeInputSchema, sentryEnvironmentSchema } 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/environments.ts
|
|
7
|
-
/**
|
|
8
|
-
* Sentry environment operations. Maps to PLAN.md §6.10 (3 actions).
|
|
9
|
-
*/
|
|
10
|
-
const ORG_PROJECT = [{
|
|
11
|
-
name: "organization_slug",
|
|
12
|
-
placeholder: "{organization_slug}"
|
|
13
|
-
}, {
|
|
14
|
-
name: "project_slug",
|
|
15
|
-
placeholder: "{project_slug}"
|
|
16
|
-
}];
|
|
17
|
-
const ORG_PROJECT_ENV = [...ORG_PROJECT, {
|
|
18
|
-
name: "environment",
|
|
19
|
-
placeholder: "{environment}"
|
|
20
|
-
}];
|
|
21
|
-
const retrieveProjectEnvironments = defineSentryEndpoint({
|
|
22
|
-
id: "sentry.retrieve-project-environments",
|
|
23
|
-
name: "Retrieve Project Environments",
|
|
24
|
-
description: "List the environments associated with a project.",
|
|
25
|
-
method: "GET",
|
|
26
|
-
path: "/api/0/projects/{organization_slug}/{project_slug}/environments/",
|
|
27
|
-
pathParams: ORG_PROJECT,
|
|
28
|
-
input: orgProjectScopeInputSchema.extend({ visibility: z.enum([
|
|
29
|
-
"visible",
|
|
30
|
-
"hidden",
|
|
31
|
-
"all"
|
|
32
|
-
]).optional() }),
|
|
33
|
-
queryFields: ["visibility"],
|
|
34
|
-
output: z.array(sentryEnvironmentSchema),
|
|
35
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
|
|
36
|
-
});
|
|
37
|
-
const fetchProjectEnvironmentDetails = defineSentryEndpoint({
|
|
38
|
-
id: "sentry.fetch-project-environment-details",
|
|
39
|
-
name: "Fetch Project Environment Details",
|
|
40
|
-
description: "Fetch details for one project environment by name.",
|
|
41
|
-
method: "GET",
|
|
42
|
-
path: "/api/0/projects/{organization_slug}/{project_slug}/environments/{environment}/",
|
|
43
|
-
pathParams: ORG_PROJECT_ENV,
|
|
44
|
-
input: orgProjectScopeInputSchema.extend({ environment: z.string().min(1) }),
|
|
45
|
-
output: sentryEnvironmentSchema,
|
|
46
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.projectRead]
|
|
47
|
-
});
|
|
48
|
-
const updateEnvironmentVisibility = defineSentryEndpoint({
|
|
49
|
-
id: "sentry.update-environment-visibility",
|
|
50
|
-
name: "Update Environment Visibility",
|
|
51
|
-
description: "Toggle the `isHidden` flag for a project environment.",
|
|
52
|
-
method: "PUT",
|
|
53
|
-
path: "/api/0/projects/{organization_slug}/{project_slug}/environments/{environment}/",
|
|
54
|
-
pathParams: ORG_PROJECT_ENV,
|
|
55
|
-
input: orgProjectScopeInputSchema.extend({
|
|
56
|
-
environment: z.string().min(1),
|
|
57
|
-
isHidden: z.boolean()
|
|
58
|
-
}),
|
|
59
|
-
bodyFields: ["isHidden"],
|
|
60
|
-
output: sentryEnvironmentSchema,
|
|
61
|
-
needsApproval: true,
|
|
62
|
-
requiredOAuthScopes: [...SENTRY_SCOPE.projectWrite]
|
|
63
|
-
});
|
|
64
|
-
const sentryEnvironmentOperations = {
|
|
65
|
-
retrieveProjectEnvironments,
|
|
66
|
-
fetchProjectEnvironmentDetails,
|
|
67
|
-
updateEnvironmentVisibility
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
export { fetchProjectEnvironmentDetails, retrieveProjectEnvironments, sentryEnvironmentOperations, updateEnvironmentVisibility };
|