@rustrak/client 0.18.0 → 0.19.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.
- package/README.md +312 -123
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/client.cjs +86 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +18 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +18 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +86 -0
- package/dist/client.mjs.map +1 -0
- package/dist/config.d.cts +10 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +10 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/errors.cjs +52 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +77 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.mts +77 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +48 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/generated/client/client.gen.cjs +174 -0
- package/dist/generated/client/client.gen.cjs.map +1 -0
- package/dist/generated/client/client.gen.mjs +174 -0
- package/dist/generated/client/client.gen.mjs.map +1 -0
- package/dist/generated/client/types.gen.d.cts +71 -0
- package/dist/generated/client/types.gen.d.cts.map +1 -0
- package/dist/generated/client/types.gen.d.mts +71 -0
- package/dist/generated/client/types.gen.d.mts.map +1 -0
- package/dist/generated/client/utils.gen.cjs +184 -0
- package/dist/generated/client/utils.gen.cjs.map +1 -0
- package/dist/generated/client/utils.gen.d.cts +21 -0
- package/dist/generated/client/utils.gen.d.cts.map +1 -0
- package/dist/generated/client/utils.gen.d.mts +21 -0
- package/dist/generated/client/utils.gen.d.mts.map +1 -0
- package/dist/generated/client/utils.gen.mjs +177 -0
- package/dist/generated/client/utils.gen.mjs.map +1 -0
- package/dist/generated/client.gen.cjs +7 -0
- package/dist/generated/client.gen.cjs.map +1 -0
- package/dist/generated/client.gen.mjs +8 -0
- package/dist/generated/client.gen.mjs.map +1 -0
- package/dist/generated/core/auth.gen.cjs +12 -0
- package/dist/generated/core/auth.gen.cjs.map +1 -0
- package/dist/generated/core/auth.gen.d.cts +11 -0
- package/dist/generated/core/auth.gen.d.cts.map +1 -0
- package/dist/generated/core/auth.gen.d.mts +11 -0
- package/dist/generated/core/auth.gen.d.mts.map +1 -0
- package/dist/generated/core/auth.gen.mjs +12 -0
- package/dist/generated/core/auth.gen.mjs.map +1 -0
- package/dist/generated/core/bodySerializer.gen.cjs +21 -0
- package/dist/generated/core/bodySerializer.gen.cjs.map +1 -0
- package/dist/generated/core/bodySerializer.gen.d.cts +15 -0
- package/dist/generated/core/bodySerializer.gen.d.cts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.d.mts +15 -0
- package/dist/generated/core/bodySerializer.gen.d.mts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.mjs +20 -0
- package/dist/generated/core/bodySerializer.gen.mjs.map +1 -0
- package/dist/generated/core/pathSerializer.gen.cjs +87 -0
- package/dist/generated/core/pathSerializer.gen.cjs.map +1 -0
- package/dist/generated/core/pathSerializer.gen.d.cts +9 -0
- package/dist/generated/core/pathSerializer.gen.d.cts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.d.mts +9 -0
- package/dist/generated/core/pathSerializer.gen.d.mts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.mjs +82 -0
- package/dist/generated/core/pathSerializer.gen.mjs.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.cjs +96 -0
- package/dist/generated/core/serverSentEvents.gen.cjs.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.d.cts +25 -0
- package/dist/generated/core/serverSentEvents.gen.d.cts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.d.mts +25 -0
- package/dist/generated/core/serverSentEvents.gen.d.mts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.mjs +96 -0
- package/dist/generated/core/serverSentEvents.gen.mjs.map +1 -0
- package/dist/generated/core/types.gen.d.cts +27 -0
- package/dist/generated/core/types.gen.d.cts.map +1 -0
- package/dist/generated/core/types.gen.d.mts +27 -0
- package/dist/generated/core/types.gen.d.mts.map +1 -0
- package/dist/generated/core/utils.gen.cjs +81 -0
- package/dist/generated/core/utils.gen.cjs.map +1 -0
- package/dist/generated/core/utils.gen.mjs +78 -0
- package/dist/generated/core/utils.gen.mjs.map +1 -0
- package/dist/generated/sdk.gen.cjs +3138 -0
- package/dist/generated/sdk.gen.cjs.map +1 -0
- package/dist/generated/sdk.gen.d.cts +276 -0
- package/dist/generated/sdk.gen.d.cts.map +1 -0
- package/dist/generated/sdk.gen.d.mts +276 -0
- package/dist/generated/sdk.gen.d.mts.map +1 -0
- package/dist/generated/sdk.gen.mjs +3110 -0
- package/dist/generated/sdk.gen.mjs.map +1 -0
- package/dist/generated/types.gen.d.cts +3679 -0
- package/dist/generated/types.gen.d.cts.map +1 -0
- package/dist/generated/types.gen.d.mts +3679 -0
- package/dist/generated/types.gen.d.mts.map +1 -0
- package/dist/generated/zod.gen.cjs +3076 -0
- package/dist/generated/zod.gen.cjs.map +1 -0
- package/dist/generated/zod.gen.mjs +2618 -0
- package/dist/generated/zod.gen.mjs.map +1 -0
- package/dist/index.cjs +15 -3248
- package/dist/index.d.cts +6 -2037
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +4 -0
- package/dist/result.cjs +59 -0
- package/dist/result.cjs.map +1 -0
- package/dist/result.d.cts +15 -0
- package/dist/result.d.cts.map +1 -0
- package/dist/result.d.mts +15 -0
- package/dist/result.d.mts.map +1 -0
- package/dist/result.mjs +55 -0
- package/dist/result.mjs.map +1 -0
- package/dist/utils/http.cjs +339 -0
- package/dist/utils/http.cjs.map +1 -0
- package/dist/utils/http.mjs +336 -0
- package/dist/utils/http.mjs.map +1 -0
- package/package.json +17 -12
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -2037
- package/dist/index.js +0 -3232
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,2618 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
//#region src/generated/zod.gen.ts
|
|
3
|
+
const zAcceptInvitation = z.object({
|
|
4
|
+
password: z.string(),
|
|
5
|
+
token: z.string()
|
|
6
|
+
});
|
|
7
|
+
/**
|
|
8
|
+
* An entry in an issue's activity log. Comments are stored as activity rows of
|
|
9
|
+
* type `note` with `{"text": ...}` in `data` (Sentry models notes as activity).
|
|
10
|
+
*/
|
|
11
|
+
const zActivityEntry = z.object({
|
|
12
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
13
|
+
data: z.string(),
|
|
14
|
+
id: z.uuid(),
|
|
15
|
+
issue_id: z.uuid(),
|
|
16
|
+
type: z.string(),
|
|
17
|
+
user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable()
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* avg/p95 duration for one time bucket.
|
|
21
|
+
*/
|
|
22
|
+
const zAgentDurationPoint = z.object({
|
|
23
|
+
avg_ms: z.number(),
|
|
24
|
+
bucket: z.iso.datetime({ offset: true }),
|
|
25
|
+
p95_ms: z.number()
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* One row of the Models table: per response model, the volume, the failures,
|
|
29
|
+
* the latency and the full token split.
|
|
30
|
+
*
|
|
31
|
+
* Cached input and reasoning output are SUBSETS of input/output, not
|
|
32
|
+
* additions — a reader comparing them must not add all four together.
|
|
33
|
+
*/
|
|
34
|
+
const zAgentModelRow = z.object({
|
|
35
|
+
avg_ms: z.number(),
|
|
36
|
+
cached_input_tokens: z.number(),
|
|
37
|
+
errors: z.int(),
|
|
38
|
+
input_tokens: z.number(),
|
|
39
|
+
model: z.string(),
|
|
40
|
+
output_tokens: z.number(),
|
|
41
|
+
p95_ms: z.number(),
|
|
42
|
+
reasoning_output_tokens: z.number(),
|
|
43
|
+
requests: z.int(),
|
|
44
|
+
total_tokens: z.number()
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Headline numbers for the agents dashboard, over the selected window.
|
|
48
|
+
*
|
|
49
|
+
* Token totals exclude `agent`-type spans throughout, for the same reason
|
|
50
|
+
* the Traces table does: an agent span's usage is a client-side rollup of
|
|
51
|
+
* its `ai_client` children, so counting both double-counts.
|
|
52
|
+
*/
|
|
53
|
+
const zAgentSummary = z.object({
|
|
54
|
+
agent_runs: z.int(),
|
|
55
|
+
avg_duration_ms: z.number(),
|
|
56
|
+
error_count: z.int(),
|
|
57
|
+
llm_calls: z.int(),
|
|
58
|
+
p95_duration_ms: z.number(),
|
|
59
|
+
tool_calls: z.int(),
|
|
60
|
+
total_tokens: z.number()
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* One time-bucketed value (count or sum) — mirrors `SessionTimeseriesPoint`.
|
|
64
|
+
*/
|
|
65
|
+
const zAgentTimeseriesPoint = z.object({
|
|
66
|
+
bucket: z.iso.datetime({ offset: true }),
|
|
67
|
+
value: z.number()
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* One row of the Tools table: per tool, how often it ran and how often it
|
|
71
|
+
* failed. A tool with a high failure rate is the most actionable signal the
|
|
72
|
+
* agents page can carry.
|
|
73
|
+
*/
|
|
74
|
+
const zAgentToolRow = z.object({
|
|
75
|
+
avg_ms: z.number(),
|
|
76
|
+
calls: z.int(),
|
|
77
|
+
errors: z.int(),
|
|
78
|
+
p95_ms: z.number(),
|
|
79
|
+
tool: z.string()
|
|
80
|
+
});
|
|
81
|
+
z.object({
|
|
82
|
+
agent_names: z.array(z.string()),
|
|
83
|
+
duration_ms: z.number().nullable(),
|
|
84
|
+
error_count: z.int(),
|
|
85
|
+
llm_call_count: z.int(),
|
|
86
|
+
started_at: z.iso.datetime({ offset: true }),
|
|
87
|
+
tool_call_count: z.int(),
|
|
88
|
+
total_tokens: z.number(),
|
|
89
|
+
trace_id: z.string()
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* DTO for a channel with routing override in rule create/update
|
|
93
|
+
*/
|
|
94
|
+
const zAlertRuleChannelInput = z.object({
|
|
95
|
+
integration_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
96
|
+
routing_override: z.record(z.string(), z.unknown()).optional()
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* Status of an alert delivery attempt
|
|
100
|
+
*/
|
|
101
|
+
const zAlertStatus = z.enum([
|
|
102
|
+
"pending",
|
|
103
|
+
"sent",
|
|
104
|
+
"failed",
|
|
105
|
+
"skipped"
|
|
106
|
+
]);
|
|
107
|
+
/**
|
|
108
|
+
* Alert delivery history record (audit log and retry queue)
|
|
109
|
+
*/
|
|
110
|
+
const zAlertHistory = z.object({
|
|
111
|
+
alert_rule_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
112
|
+
alert_type: z.string(),
|
|
113
|
+
attempt_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
114
|
+
channel_name: z.string(),
|
|
115
|
+
channel_type: z.string(),
|
|
116
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
117
|
+
error_message: z.string().nullable(),
|
|
118
|
+
http_status_code: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
119
|
+
id: z.int(),
|
|
120
|
+
idempotency_key: z.string(),
|
|
121
|
+
integration_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
122
|
+
issue_id: z.uuid().nullable(),
|
|
123
|
+
next_retry_at: z.iso.datetime({ offset: true }).nullable(),
|
|
124
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
125
|
+
sent_at: z.iso.datetime({ offset: true }).nullable(),
|
|
126
|
+
status: zAlertStatus
|
|
127
|
+
});
|
|
128
|
+
/**
|
|
129
|
+
* Type of alert trigger
|
|
130
|
+
*/
|
|
131
|
+
const zAlertType = z.enum([
|
|
132
|
+
"new_issue",
|
|
133
|
+
"regression",
|
|
134
|
+
"unmute"
|
|
135
|
+
]);
|
|
136
|
+
/**
|
|
137
|
+
* Response for alert rule including linked integration info
|
|
138
|
+
*/
|
|
139
|
+
const zAlertRuleResponse = z.object({
|
|
140
|
+
alert_type: zAlertType,
|
|
141
|
+
channels: z.array(zAlertRuleChannelInput),
|
|
142
|
+
conditions: z.record(z.string(), z.unknown()),
|
|
143
|
+
cooldown_minutes: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
144
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
145
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
146
|
+
integration_ids: z.array(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
147
|
+
is_enabled: z.boolean(),
|
|
148
|
+
last_triggered_at: z.iso.datetime({ offset: true }).nullable(),
|
|
149
|
+
name: z.string(),
|
|
150
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
151
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
152
|
+
});
|
|
153
|
+
const zAssembleBody = z.object({
|
|
154
|
+
checksum: z.string(),
|
|
155
|
+
chunks: z.array(z.string()),
|
|
156
|
+
projects: z.array(z.string())
|
|
157
|
+
});
|
|
158
|
+
const zAssembleResponse = z.object({
|
|
159
|
+
detail: z.string().nullish(),
|
|
160
|
+
missingChunks: z.array(z.string()),
|
|
161
|
+
state: z.string()
|
|
162
|
+
});
|
|
163
|
+
/**
|
|
164
|
+
* Response that includes the full token (only on creation)
|
|
165
|
+
*/
|
|
166
|
+
const zAuthTokenCreatedResponse = z.object({
|
|
167
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
168
|
+
description: z.string().nullable(),
|
|
169
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
170
|
+
token: z.string()
|
|
171
|
+
});
|
|
172
|
+
/**
|
|
173
|
+
* Response for listing (token is masked)
|
|
174
|
+
*/
|
|
175
|
+
const zAuthTokenResponse = z.object({
|
|
176
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
177
|
+
description: z.string().nullable(),
|
|
178
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
179
|
+
last_used_at: z.iso.datetime({ offset: true }).nullable(),
|
|
180
|
+
token_prefix: z.string()
|
|
181
|
+
});
|
|
182
|
+
/**
|
|
183
|
+
* What the consent page shows about the client asking.
|
|
184
|
+
*/
|
|
185
|
+
const zAuthorizationInfo = z.object({
|
|
186
|
+
client_id: z.string(),
|
|
187
|
+
client_name: z.string(),
|
|
188
|
+
redirect_host: z.string()
|
|
189
|
+
});
|
|
190
|
+
/**
|
|
191
|
+
* Where the consent page sends the browser next.
|
|
192
|
+
*/
|
|
193
|
+
const zAuthorizationRedirect = z.object({ redirect_to: z.string() });
|
|
194
|
+
/**
|
|
195
|
+
* An authorization request, as the client put it in the authorize URL.
|
|
196
|
+
*/
|
|
197
|
+
const zAuthorizationRequest = z.object({
|
|
198
|
+
client_id: z.string(),
|
|
199
|
+
code_challenge: z.string(),
|
|
200
|
+
code_challenge_method: z.string(),
|
|
201
|
+
redirect_uri: z.string(),
|
|
202
|
+
resource: z.string().nullish(),
|
|
203
|
+
response_type: z.string(),
|
|
204
|
+
state: z.string().nullish()
|
|
205
|
+
});
|
|
206
|
+
/**
|
|
207
|
+
* The user's answer to a consent screen.
|
|
208
|
+
*/
|
|
209
|
+
const zAuthorizationDecision = zAuthorizationRequest.and(z.object({ approve: z.boolean() }));
|
|
210
|
+
const zBookmarkResponse = z.object({ is_bookmarked: z.boolean() });
|
|
211
|
+
const zBulkDeleteResponse = z.object({ deleted: z.int() });
|
|
212
|
+
const zBulkUpdateResponse = z.object({ updated: z.int() });
|
|
213
|
+
const zChangePasswordRequest = z.object({
|
|
214
|
+
current_password: z.string(),
|
|
215
|
+
new_password: z.string()
|
|
216
|
+
});
|
|
217
|
+
/**
|
|
218
|
+
* Status of one check-in. `Missed` and `Timeout` are only ever set by the
|
|
219
|
+
* server.
|
|
220
|
+
*/
|
|
221
|
+
const zCheckInStatus = z.enum([
|
|
222
|
+
"ok",
|
|
223
|
+
"error",
|
|
224
|
+
"in_progress",
|
|
225
|
+
"missed",
|
|
226
|
+
"timeout",
|
|
227
|
+
"unknown"
|
|
228
|
+
]);
|
|
229
|
+
/**
|
|
230
|
+
* One check-in, as the dashboard reads it.
|
|
231
|
+
*/
|
|
232
|
+
const zCheckInResponse = z.object({
|
|
233
|
+
date_added: z.iso.datetime({ offset: true }),
|
|
234
|
+
date_updated: z.iso.datetime({ offset: true }),
|
|
235
|
+
duration_ms: z.int().nullable(),
|
|
236
|
+
environment: z.string(),
|
|
237
|
+
expected_time: z.iso.datetime({ offset: true }).nullable(),
|
|
238
|
+
id: z.uuid(),
|
|
239
|
+
status: zCheckInStatus
|
|
240
|
+
});
|
|
241
|
+
/**
|
|
242
|
+
* Multipart chunk upload.
|
|
243
|
+
* Each part's **field name** may be the SHA-1 hex digest of that part's binary content
|
|
244
|
+
* (sentry-cli v2 protocol, e.g. `da39a3ee5e6b4b0d3255bfef95601890afd80709`) or an arbitrary
|
|
245
|
+
* name like `file` (sentry-cli v3.x). Up to 64 parts per request; each part body is raw binary.
|
|
246
|
+
*/
|
|
247
|
+
const zChunkUploadBody = z.record(z.string(), z.unknown());
|
|
248
|
+
/**
|
|
249
|
+
* Chunk upload capabilities, in sentry-cli's camelCase.
|
|
250
|
+
*/
|
|
251
|
+
const zChunkUploadOptions = z.object({
|
|
252
|
+
accept: z.array(z.string()),
|
|
253
|
+
chunkSize: z.int().gte(0),
|
|
254
|
+
chunksPerRequest: z.int().gte(0),
|
|
255
|
+
compression: z.array(z.string()),
|
|
256
|
+
concurrency: z.int().gte(0),
|
|
257
|
+
hashAlgorithm: z.string(),
|
|
258
|
+
maxRequestSize: z.int().gte(0),
|
|
259
|
+
url: z.string()
|
|
260
|
+
});
|
|
261
|
+
/**
|
|
262
|
+
* Rows affected by a cleanup, used symmetrically for the dry-run preview ("what
|
|
263
|
+
* would be removed") and the executed result ("what was removed"). `spans` are
|
|
264
|
+
* counted directly even though they cascade from `transactions`, so the UI can
|
|
265
|
+
* show the true row impact. `issues_removed` is the number of issues that would
|
|
266
|
+
* be left with zero events and therefore deleted.
|
|
267
|
+
*/
|
|
268
|
+
const zCleanupCounts = z.object({
|
|
269
|
+
events: z.int(),
|
|
270
|
+
issues_removed: z.int(),
|
|
271
|
+
logs: z.int(),
|
|
272
|
+
source_maps: z.int(),
|
|
273
|
+
spans: z.int(),
|
|
274
|
+
transactions: z.int()
|
|
275
|
+
});
|
|
276
|
+
/**
|
|
277
|
+
* How often the cleanup that enforces retention runs.
|
|
278
|
+
*/
|
|
279
|
+
const zCleanupFrequency = z.enum(["daily", "weekly"]);
|
|
280
|
+
/**
|
|
281
|
+
* Request body for a cleanup (preview or execute): remove data older than
|
|
282
|
+
* `older_than_days`, optionally scoped to a single project (omit for all).
|
|
283
|
+
*
|
|
284
|
+
* `older_than_days` must be at least 1 — the service rejects smaller values,
|
|
285
|
+
* since a window of 0 (or negative) would move the cutoff to now/the future and
|
|
286
|
+
* purge the entire dataset.
|
|
287
|
+
*/
|
|
288
|
+
const zCleanupRequest = z.object({
|
|
289
|
+
include_events: z.boolean().optional(),
|
|
290
|
+
include_logs: z.boolean().optional(),
|
|
291
|
+
include_transactions: z.boolean().optional(),
|
|
292
|
+
older_than_days: z.int().gte(1),
|
|
293
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullish()
|
|
294
|
+
});
|
|
295
|
+
/**
|
|
296
|
+
* Where the instance's cleanup job is. There is at most one at a time.
|
|
297
|
+
*/
|
|
298
|
+
const zCleanupState = z.enum([
|
|
299
|
+
"idle",
|
|
300
|
+
"running",
|
|
301
|
+
"completed",
|
|
302
|
+
"failed"
|
|
303
|
+
]);
|
|
304
|
+
/**
|
|
305
|
+
* The cleanup job as the API reports it. Kept in memory: a restart forgets
|
|
306
|
+
* it, and a run cut short by one is simply run again, since every batch it
|
|
307
|
+
* committed is already gone.
|
|
308
|
+
*/
|
|
309
|
+
const zCleanupStatus = z.object({
|
|
310
|
+
error: z.string().nullable(),
|
|
311
|
+
finished_at: z.iso.datetime({ offset: true }).nullable(),
|
|
312
|
+
removed: zCleanupCounts,
|
|
313
|
+
started_at: z.iso.datetime({ offset: true }).nullable(),
|
|
314
|
+
state: zCleanupState
|
|
315
|
+
});
|
|
316
|
+
/**
|
|
317
|
+
* Maps a path as it appears in a stack trace to the path in the repository.
|
|
318
|
+
*/
|
|
319
|
+
const zCodeMapping = z.object({
|
|
320
|
+
source_root: z.string(),
|
|
321
|
+
stack_root: z.string()
|
|
322
|
+
});
|
|
323
|
+
/**
|
|
324
|
+
* Body for creating an issue comment (note).
|
|
325
|
+
*/
|
|
326
|
+
const zCommentRequest = z.object({ text: z.string() });
|
|
327
|
+
const zConfirmSsoLinkRequest = z.object({ password: z.string() });
|
|
328
|
+
/**
|
|
329
|
+
* DTO for creating an alert rule
|
|
330
|
+
*/
|
|
331
|
+
const zCreateAlertRule = z.object({
|
|
332
|
+
alert_type: zAlertType,
|
|
333
|
+
channels: z.array(zAlertRuleChannelInput).optional(),
|
|
334
|
+
conditions: z.record(z.string(), z.unknown()).optional(),
|
|
335
|
+
cooldown_minutes: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
336
|
+
name: z.string()
|
|
337
|
+
});
|
|
338
|
+
/**
|
|
339
|
+
* DTO for creating a new token
|
|
340
|
+
*/
|
|
341
|
+
const zCreateAuthToken = z.object({ description: z.string().nullish() });
|
|
342
|
+
const zCreateGitHubIssue = z.object({
|
|
343
|
+
body: z.string().nullish(),
|
|
344
|
+
title: z.string().nullish()
|
|
345
|
+
});
|
|
346
|
+
/**
|
|
347
|
+
* DTO for creating a new project
|
|
348
|
+
*/
|
|
349
|
+
const zCreateProject = z.object({
|
|
350
|
+
name: z.string(),
|
|
351
|
+
platform: z.string().nullish(),
|
|
352
|
+
slug: z.string().nullish()
|
|
353
|
+
});
|
|
354
|
+
/**
|
|
355
|
+
* DTO for `POST .../releases/`.
|
|
356
|
+
*/
|
|
357
|
+
const zCreateRelease = z.object({
|
|
358
|
+
ref: z.string().nullish(),
|
|
359
|
+
url: z.string().nullish(),
|
|
360
|
+
version: z.string()
|
|
361
|
+
});
|
|
362
|
+
const zCreateUserRequest = z.object({
|
|
363
|
+
email: z.string(),
|
|
364
|
+
password: z.string()
|
|
365
|
+
});
|
|
366
|
+
/**
|
|
367
|
+
* Response for API (full detail)
|
|
368
|
+
*/
|
|
369
|
+
const zEventDetailResponse = z.object({
|
|
370
|
+
data: z.record(z.string(), z.unknown()),
|
|
371
|
+
environment: z.string(),
|
|
372
|
+
event_id: z.string(),
|
|
373
|
+
event_type: z.string(),
|
|
374
|
+
id: z.uuid(),
|
|
375
|
+
ingested_at: z.iso.datetime({ offset: true }),
|
|
376
|
+
issue_id: z.uuid().nullable(),
|
|
377
|
+
level: z.string(),
|
|
378
|
+
platform: z.string(),
|
|
379
|
+
release: z.string(),
|
|
380
|
+
sdk_name: z.string(),
|
|
381
|
+
sdk_version: z.string(),
|
|
382
|
+
server_name: z.string(),
|
|
383
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
384
|
+
title: z.string()
|
|
385
|
+
});
|
|
386
|
+
z.object({
|
|
387
|
+
environment: z.string(),
|
|
388
|
+
event_id: z.string(),
|
|
389
|
+
event_type: z.string(),
|
|
390
|
+
id: z.uuid(),
|
|
391
|
+
issue_id: z.uuid().nullable(),
|
|
392
|
+
level: z.string(),
|
|
393
|
+
platform: z.string(),
|
|
394
|
+
release: z.string(),
|
|
395
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
396
|
+
title: z.string()
|
|
397
|
+
});
|
|
398
|
+
/**
|
|
399
|
+
* One time-bucketed point in a project's error-event volume, split by severity.
|
|
400
|
+
*
|
|
401
|
+
* `total` always equals `fatal + error + warning + info`: `info` absorbs
|
|
402
|
+
* `debug` and any level the SDK sent that we do not model, so the stacked
|
|
403
|
+
* segments of a chart always sum to the bar height and no events silently
|
|
404
|
+
* vanish from the series.
|
|
405
|
+
*/
|
|
406
|
+
const zEventTimeseriesPoint = z.object({
|
|
407
|
+
bucket: z.iso.datetime({ offset: true }),
|
|
408
|
+
error: z.int(),
|
|
409
|
+
fatal: z.int(),
|
|
410
|
+
info: z.int(),
|
|
411
|
+
total: z.int(),
|
|
412
|
+
warning: z.int()
|
|
413
|
+
});
|
|
414
|
+
/**
|
|
415
|
+
* The closed vocabulary a [`FieldError`] may use.
|
|
416
|
+
*
|
|
417
|
+
* Deliberately small and resource-agnostic: a large or per-endpoint
|
|
418
|
+
* vocabulary becomes a public API that cannot be versioned. Adding a variant
|
|
419
|
+
* is a wire change and requires the matching addition to the TypeScript union
|
|
420
|
+
* in `packages/client/src/errors.ts`, which
|
|
421
|
+
* `packages/client/tests/unit/app-error-contract.test.ts` enforces by parsing
|
|
422
|
+
* this enum out of this file.
|
|
423
|
+
*/
|
|
424
|
+
const zFieldErrorCode = z.enum([
|
|
425
|
+
"required",
|
|
426
|
+
"invalid",
|
|
427
|
+
"already_exists",
|
|
428
|
+
"too_short",
|
|
429
|
+
"too_long",
|
|
430
|
+
"custom"
|
|
431
|
+
]);
|
|
432
|
+
/**
|
|
433
|
+
* One rejected input, named as data rather than buried in the prose of
|
|
434
|
+
* [`ErrorDetail::message`].
|
|
435
|
+
*
|
|
436
|
+
* `field` is a **dot path into the request body** (`slug`,
|
|
437
|
+
* `credentials.webhook_url`), not a JSON Pointer and not a UI label: a
|
|
438
|
+
* consumer feeds it straight to a form library's `setError`.
|
|
439
|
+
*
|
|
440
|
+
* The rejected *value* is deliberately never echoed back. One careless
|
|
441
|
+
* application to a password input would put a credential in the log store.
|
|
442
|
+
*
|
|
443
|
+
* The three fields are private on purpose. [`Self::new`] and [`Self::custom`]
|
|
444
|
+
* are the only ways to build one, which is what makes "`message` is populated
|
|
445
|
+
* only alongside [`FieldErrorCode::Custom`]" an invariant the compiler holds
|
|
446
|
+
* rather than a convention a struct literal could quietly break.
|
|
447
|
+
*/
|
|
448
|
+
const zFieldError = z.object({
|
|
449
|
+
code: zFieldErrorCode,
|
|
450
|
+
field: z.string(),
|
|
451
|
+
message: z.string().optional()
|
|
452
|
+
});
|
|
453
|
+
const zErrorDetail = z.object({
|
|
454
|
+
fields: z.array(zFieldError).optional(),
|
|
455
|
+
incident_id: z.string().optional(),
|
|
456
|
+
message: z.string(),
|
|
457
|
+
type: z.string()
|
|
458
|
+
});
|
|
459
|
+
z.object({ error: zErrorDetail });
|
|
460
|
+
/**
|
|
461
|
+
* One row of a "top N by X" breakdown (model or tool name).
|
|
462
|
+
*/
|
|
463
|
+
const zGenAiBreakdownRow = z.object({
|
|
464
|
+
label: z.string(),
|
|
465
|
+
value: z.number()
|
|
466
|
+
});
|
|
467
|
+
const zGitHubAppInfo = z.object({
|
|
468
|
+
app_id: z.int(),
|
|
469
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
470
|
+
html_url: z.string(),
|
|
471
|
+
install_url: z.string(),
|
|
472
|
+
last_webhook_at: z.iso.datetime({ offset: true }).nullable(),
|
|
473
|
+
owner_login: z.string(),
|
|
474
|
+
slug: z.string()
|
|
475
|
+
});
|
|
476
|
+
const zGitHubInstallation = z.object({
|
|
477
|
+
account_login: z.string(),
|
|
478
|
+
account_type: z.string(),
|
|
479
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
480
|
+
id: z.int(),
|
|
481
|
+
suspended: z.boolean()
|
|
482
|
+
});
|
|
483
|
+
const zGitHubLogin = z.object({ login: z.string().nullable() });
|
|
484
|
+
/**
|
|
485
|
+
* A repository an installation can reach.
|
|
486
|
+
*/
|
|
487
|
+
const zGitHubRepository = z.object({
|
|
488
|
+
default_branch: z.string(),
|
|
489
|
+
full_name: z.string(),
|
|
490
|
+
html_url: z.string(),
|
|
491
|
+
installation_id: z.int(),
|
|
492
|
+
private: z.boolean()
|
|
493
|
+
});
|
|
494
|
+
/**
|
|
495
|
+
* `GET /api/github`: everything the integrations page needs in one answer.
|
|
496
|
+
*/
|
|
497
|
+
const zGitHubStatus = z.object({
|
|
498
|
+
app: zGitHubAppInfo.nullable(),
|
|
499
|
+
installations: z.array(zGitHubInstallation),
|
|
500
|
+
webhook_url: z.string()
|
|
501
|
+
});
|
|
502
|
+
/**
|
|
503
|
+
* Grouping model - maps a grouping key to an issue
|
|
504
|
+
*/
|
|
505
|
+
const zGrouping = z.object({
|
|
506
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
507
|
+
grouping_key: z.string(),
|
|
508
|
+
grouping_key_hash: z.string(),
|
|
509
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
510
|
+
issue_id: z.uuid(),
|
|
511
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
512
|
+
});
|
|
513
|
+
const zIntervalUnit = z.enum([
|
|
514
|
+
"minute",
|
|
515
|
+
"hour",
|
|
516
|
+
"day",
|
|
517
|
+
"week",
|
|
518
|
+
"month",
|
|
519
|
+
"year"
|
|
520
|
+
]);
|
|
521
|
+
/**
|
|
522
|
+
* Filter for issues listing
|
|
523
|
+
*/
|
|
524
|
+
const zIssueFilter = z.enum([
|
|
525
|
+
"open",
|
|
526
|
+
"resolved",
|
|
527
|
+
"muted",
|
|
528
|
+
"all"
|
|
529
|
+
]);
|
|
530
|
+
/**
|
|
531
|
+
* Bulk delete request: the listed `ids`, or every issue matching `filter`.
|
|
532
|
+
* A body with neither or both matches no variant and is rejected, so an empty
|
|
533
|
+
* body can never mean "all".
|
|
534
|
+
*/
|
|
535
|
+
const zBulkDeleteIssues = z.union([z.object({ ids: z.array(z.uuid()) }), z.object({ filter: zIssueFilter })]);
|
|
536
|
+
const zIssueLink = z.object({
|
|
537
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
538
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
539
|
+
issue_id: z.uuid(),
|
|
540
|
+
number: z.int(),
|
|
541
|
+
repo_full_name: z.string(),
|
|
542
|
+
state: z.string(),
|
|
543
|
+
title: z.string(),
|
|
544
|
+
url: z.string()
|
|
545
|
+
});
|
|
546
|
+
/**
|
|
547
|
+
* Triage priority of an issue.
|
|
548
|
+
*/
|
|
549
|
+
const zIssuePriority = z.enum([
|
|
550
|
+
"low",
|
|
551
|
+
"medium",
|
|
552
|
+
"high"
|
|
553
|
+
]);
|
|
554
|
+
/**
|
|
555
|
+
* Sort mode for issues listing
|
|
556
|
+
*/
|
|
557
|
+
const zIssueSort = z.enum([
|
|
558
|
+
"digest_order",
|
|
559
|
+
"last_seen",
|
|
560
|
+
"event_count"
|
|
561
|
+
]);
|
|
562
|
+
const zIssueStatsResponse = z.object({ data: z.array(z.array(z.int())) });
|
|
563
|
+
/**
|
|
564
|
+
* How far back issue stats reach.
|
|
565
|
+
*/
|
|
566
|
+
const zIssueStatsWindow = z.enum(["24h", "30d"]);
|
|
567
|
+
/**
|
|
568
|
+
* Lifecycle status of an issue (Sentry-compatible).
|
|
569
|
+
*/
|
|
570
|
+
const zIssueStatus = z.enum([
|
|
571
|
+
"unresolved",
|
|
572
|
+
"resolved",
|
|
573
|
+
"ignored"
|
|
574
|
+
]);
|
|
575
|
+
/**
|
|
576
|
+
* Response for API
|
|
577
|
+
*/
|
|
578
|
+
const zIssueResponse = z.object({
|
|
579
|
+
assigned_to: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
580
|
+
assignee_type: z.string().nullable(),
|
|
581
|
+
culprit: z.string(),
|
|
582
|
+
event_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
583
|
+
first_release: z.string(),
|
|
584
|
+
first_seen: z.iso.datetime({ offset: true }),
|
|
585
|
+
has_seen: z.boolean().nullish(),
|
|
586
|
+
id: z.uuid(),
|
|
587
|
+
is_bookmarked: z.boolean().nullish(),
|
|
588
|
+
is_muted: z.boolean(),
|
|
589
|
+
is_resolved: z.boolean(),
|
|
590
|
+
is_subscribed: z.boolean().nullish(),
|
|
591
|
+
issue_category: z.string(),
|
|
592
|
+
issue_type: z.string(),
|
|
593
|
+
last_release: z.string(),
|
|
594
|
+
last_seen: z.iso.datetime({ offset: true }),
|
|
595
|
+
level: z.string().nullable(),
|
|
596
|
+
logger: z.string(),
|
|
597
|
+
platform: z.string().nullable(),
|
|
598
|
+
priority: zIssuePriority.nullable(),
|
|
599
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
600
|
+
short_id: z.string(),
|
|
601
|
+
status: zIssueStatus,
|
|
602
|
+
status_details: z.record(z.string(), z.unknown()),
|
|
603
|
+
substatus: z.string().nullable(),
|
|
604
|
+
title: z.string(),
|
|
605
|
+
trend: z.array(z.int()).nullish(),
|
|
606
|
+
user_count: z.int().nullish(),
|
|
607
|
+
user_report_count: z.int().nullish(),
|
|
608
|
+
value: z.string()
|
|
609
|
+
});
|
|
610
|
+
/**
|
|
611
|
+
* The status an update may set: an [`IssueStatus`], or `resolvedInNextRelease`
|
|
612
|
+
* to resolve until the next release ships.
|
|
613
|
+
*/
|
|
614
|
+
const zIssueStatusUpdate = z.enum([
|
|
615
|
+
"unresolved",
|
|
616
|
+
"resolved",
|
|
617
|
+
"ignored",
|
|
618
|
+
"resolvedInNextRelease"
|
|
619
|
+
]);
|
|
620
|
+
/**
|
|
621
|
+
* Bulk mutate request: apply a status (and/or priority) to many issues.
|
|
622
|
+
*/
|
|
623
|
+
const zBulkUpdateIssues = z.object({
|
|
624
|
+
ids: z.array(z.uuid()),
|
|
625
|
+
priority: zIssuePriority.nullish(),
|
|
626
|
+
status: zIssueStatusUpdate.nullish()
|
|
627
|
+
});
|
|
628
|
+
/**
|
|
629
|
+
* A single tag value's usage within an issue — the shape `GET
|
|
630
|
+
* /issues/{id}/tags/{key}` returns per entry, matching Sentry's
|
|
631
|
+
* `TagValueSerializerResponse` (src/sentry/tagstore/types.py:166-173):
|
|
632
|
+
* a bare list of these, not `{key, values}`.
|
|
633
|
+
*/
|
|
634
|
+
const zIssueTagValue = z.object({
|
|
635
|
+
count: z.int(),
|
|
636
|
+
first_seen: z.iso.datetime({ offset: true }),
|
|
637
|
+
key: z.string(),
|
|
638
|
+
last_seen: z.iso.datetime({ offset: true }),
|
|
639
|
+
name: z.string(),
|
|
640
|
+
value: z.string()
|
|
641
|
+
});
|
|
642
|
+
/**
|
|
643
|
+
* How long ago a kind of data arrived: rows per age bucket, and the oldest.
|
|
644
|
+
*/
|
|
645
|
+
const zKindAge = z.object({
|
|
646
|
+
counts: z.array(z.int()),
|
|
647
|
+
oldest: z.iso.datetime({ offset: true }).nullable()
|
|
648
|
+
});
|
|
649
|
+
const zLinkGitHubIssue = z.object({ reference: z.string() });
|
|
650
|
+
const zLivenessResponse = z.object({ status: z.string() });
|
|
651
|
+
z.object({
|
|
652
|
+
attributes: z.record(z.string(), z.unknown()),
|
|
653
|
+
body: z.string(),
|
|
654
|
+
id: z.uuid(),
|
|
655
|
+
ingested_at: z.iso.datetime({ offset: true }),
|
|
656
|
+
level: z.string(),
|
|
657
|
+
severity_number: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
658
|
+
span_id: z.string().nullable(),
|
|
659
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
660
|
+
trace_id: z.string().nullable()
|
|
661
|
+
});
|
|
662
|
+
const zLoginRequest = z.object({
|
|
663
|
+
email: z.string(),
|
|
664
|
+
password: z.string()
|
|
665
|
+
});
|
|
666
|
+
const zManifestRequest = z.object({ organization: z.string().nullish() });
|
|
667
|
+
/**
|
|
668
|
+
* What the dashboard posts to GitHub to create the app.
|
|
669
|
+
*/
|
|
670
|
+
const zManifestResponse = z.object({
|
|
671
|
+
action_url: z.string(),
|
|
672
|
+
manifest: z.string()
|
|
673
|
+
});
|
|
674
|
+
/**
|
|
675
|
+
* Turns `/mcp` on or off: the body of `PUT /api/settings/mcp`.
|
|
676
|
+
*/
|
|
677
|
+
const zMcpSettings = z.object({ enabled: z.boolean() });
|
|
678
|
+
/**
|
|
679
|
+
* Whether `/mcp` answers, and the URL to give an assistant.
|
|
680
|
+
*/
|
|
681
|
+
const zMcpStatus = z.object({
|
|
682
|
+
enabled: z.boolean(),
|
|
683
|
+
url: z.string().nullable()
|
|
684
|
+
});
|
|
685
|
+
/**
|
|
686
|
+
* A counter measured over the requested window alongside the same counter
|
|
687
|
+
* over the window immediately before it.
|
|
688
|
+
*
|
|
689
|
+
* `previous` is `None` when the request asked for all time: there is no
|
|
690
|
+
* earlier window to compare against, and reporting `0` there would render as
|
|
691
|
+
* a misleading "+100%" in the UI.
|
|
692
|
+
*/
|
|
693
|
+
const zMetricDelta = z.object({
|
|
694
|
+
current: z.int(),
|
|
695
|
+
previous: z.int().nullable()
|
|
696
|
+
});
|
|
697
|
+
/**
|
|
698
|
+
* Health of one monitor environment.
|
|
699
|
+
*/
|
|
700
|
+
const zMonitorEnvironmentStatus = z.enum([
|
|
701
|
+
"active",
|
|
702
|
+
"ok",
|
|
703
|
+
"error"
|
|
704
|
+
]);
|
|
705
|
+
/**
|
|
706
|
+
* One environment of a monitor, with its most recent check-ins for the
|
|
707
|
+
* timeline.
|
|
708
|
+
*/
|
|
709
|
+
const zMonitorEnvironmentResponse = z.object({
|
|
710
|
+
environment: z.string(),
|
|
711
|
+
id: z.uuid(),
|
|
712
|
+
last_checkin: z.iso.datetime({ offset: true }).nullable(),
|
|
713
|
+
next_checkin: z.iso.datetime({ offset: true }).nullable(),
|
|
714
|
+
next_checkin_latest: z.iso.datetime({ offset: true }).nullable(),
|
|
715
|
+
recent_checkins: z.array(zCheckInResponse),
|
|
716
|
+
status: zMonitorEnvironmentStatus
|
|
717
|
+
});
|
|
718
|
+
/**
|
|
719
|
+
* A connected client, as its user sees it.
|
|
720
|
+
*/
|
|
721
|
+
const zOAuthGrant = z.object({
|
|
722
|
+
client_id: z.string(),
|
|
723
|
+
client_name: z.string(),
|
|
724
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
725
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
726
|
+
});
|
|
727
|
+
/**
|
|
728
|
+
* Synthetic organization sentry-cli checks before uploading.
|
|
729
|
+
*/
|
|
730
|
+
const zOrgDetails = z.object({
|
|
731
|
+
features: z.array(z.string()),
|
|
732
|
+
id: z.string(),
|
|
733
|
+
name: z.string(),
|
|
734
|
+
slug: z.string()
|
|
735
|
+
});
|
|
736
|
+
/**
|
|
737
|
+
* Body of a template preview request.
|
|
738
|
+
*/
|
|
739
|
+
const zPreviewTemplateBody = z.object({ template: z.string() });
|
|
740
|
+
/**
|
|
741
|
+
* `rendered` when `ok`, `error` otherwise.
|
|
742
|
+
*/
|
|
743
|
+
const zPreviewTemplateResponse = z.object({
|
|
744
|
+
error: z.string().nullish(),
|
|
745
|
+
ok: z.boolean(),
|
|
746
|
+
rendered: z.string().nullish()
|
|
747
|
+
});
|
|
748
|
+
const zProjectAge = z.object({
|
|
749
|
+
events: zKindAge,
|
|
750
|
+
logs: zKindAge,
|
|
751
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
752
|
+
transactions: zKindAge
|
|
753
|
+
});
|
|
754
|
+
/**
|
|
755
|
+
* The at-a-glance aggregates one row of the project-list table needs.
|
|
756
|
+
*
|
|
757
|
+
* Deliberately narrower than [`ProjectStatsSummary`]: that one answers "how
|
|
758
|
+
* is this project doing" for a page dedicated to a single project, this one
|
|
759
|
+
* answers "which of my projects should I look at first" and must stay cheap
|
|
760
|
+
* enough to compute for every project on the page at once.
|
|
761
|
+
*/
|
|
762
|
+
const zProjectListStats = z.object({
|
|
763
|
+
events: zMetricDelta,
|
|
764
|
+
fatal_issues: z.int(),
|
|
765
|
+
new_issues: zMetricDelta,
|
|
766
|
+
open_issues: z.int(),
|
|
767
|
+
trend: z.array(z.int())
|
|
768
|
+
});
|
|
769
|
+
const zProjectRepository = z.object({
|
|
770
|
+
auto_create_conditions: z.record(z.string(), z.unknown()),
|
|
771
|
+
auto_create_issues: z.boolean(),
|
|
772
|
+
code_mappings: z.array(zCodeMapping),
|
|
773
|
+
codeowners_rules: z.int().gte(0).nullable(),
|
|
774
|
+
codeowners_synced_at: z.iso.datetime({ offset: true }).nullable(),
|
|
775
|
+
default_branch: z.string(),
|
|
776
|
+
html_url: z.string(),
|
|
777
|
+
installation_id: z.int(),
|
|
778
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
779
|
+
repo_full_name: z.string()
|
|
780
|
+
});
|
|
781
|
+
/**
|
|
782
|
+
* Response with DSN included
|
|
783
|
+
*/
|
|
784
|
+
const zProjectResponse = z.object({
|
|
785
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
786
|
+
digested_event_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
787
|
+
dsn: z.string(),
|
|
788
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
789
|
+
name: z.string(),
|
|
790
|
+
platform: z.string().nullable(),
|
|
791
|
+
rate_limit_per_hour: z.int().nullable(),
|
|
792
|
+
rate_limit_per_minute: z.int().nullable(),
|
|
793
|
+
rate_limited_event_count: z.int(),
|
|
794
|
+
sentry_key: z.uuid(),
|
|
795
|
+
slug: z.string(),
|
|
796
|
+
stats: zProjectListStats.nullish(),
|
|
797
|
+
stored_event_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
798
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
799
|
+
});
|
|
800
|
+
/**
|
|
801
|
+
* A project that keeps its data for other windows than the defaults. Every
|
|
802
|
+
* kind is set: an override replaces the defaults whole.
|
|
803
|
+
*/
|
|
804
|
+
const zProjectRetention = z.object({
|
|
805
|
+
events_days: z.int().nullable(),
|
|
806
|
+
logs_days: z.int().nullable(),
|
|
807
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
808
|
+
transactions_days: z.int().nullable()
|
|
809
|
+
});
|
|
810
|
+
/**
|
|
811
|
+
* Per-project capability level for a member.
|
|
812
|
+
*
|
|
813
|
+
* Ordered by privilege: `Viewer` < `Editor` < `Admin` (derived `Ord` uses
|
|
814
|
+
* declaration order). An `Action` maps to the minimum role that may perform it.
|
|
815
|
+
*/
|
|
816
|
+
const zProjectRole = z.enum([
|
|
817
|
+
"viewer",
|
|
818
|
+
"editor",
|
|
819
|
+
"admin"
|
|
820
|
+
]);
|
|
821
|
+
const zProjectMember = z.object({
|
|
822
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
823
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
824
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
825
|
+
role: zProjectRole,
|
|
826
|
+
user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
827
|
+
});
|
|
828
|
+
/**
|
|
829
|
+
* Member row joined with the user's email, for listing a project's team.
|
|
830
|
+
*/
|
|
831
|
+
const zProjectMemberResponse = z.object({
|
|
832
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
833
|
+
email: z.string(),
|
|
834
|
+
role: zProjectRole,
|
|
835
|
+
user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
836
|
+
});
|
|
837
|
+
/**
|
|
838
|
+
* Project-wide counters for the overview page, each with its previous-period
|
|
839
|
+
* comparison.
|
|
840
|
+
*/
|
|
841
|
+
const zProjectStatsSummary = z.object({
|
|
842
|
+
events: zMetricDelta,
|
|
843
|
+
new_issues: zMetricDelta,
|
|
844
|
+
open_issues: z.int(),
|
|
845
|
+
period_hours: z.int().nullable()
|
|
846
|
+
});
|
|
847
|
+
z.object({
|
|
848
|
+
estimated_bytes: z.int(),
|
|
849
|
+
events_bytes: z.int(),
|
|
850
|
+
events_count: z.int(),
|
|
851
|
+
logs_bytes: z.int(),
|
|
852
|
+
logs_count: z.int(),
|
|
853
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
854
|
+
project_name: z.string(),
|
|
855
|
+
source_maps_count: z.int(),
|
|
856
|
+
spans_count: z.int(),
|
|
857
|
+
transactions_bytes: z.int(),
|
|
858
|
+
transactions_count: z.int()
|
|
859
|
+
});
|
|
860
|
+
/**
|
|
861
|
+
* Type of notification provider (replaces ChannelType)
|
|
862
|
+
*/
|
|
863
|
+
const zProviderType = z.enum([
|
|
864
|
+
"webhook",
|
|
865
|
+
"email",
|
|
866
|
+
"slack",
|
|
867
|
+
"custom_webhook"
|
|
868
|
+
]);
|
|
869
|
+
/**
|
|
870
|
+
* Global alert integration record — stores credentials only, no routing.
|
|
871
|
+
*/
|
|
872
|
+
const zAlertIntegration = z.object({
|
|
873
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
874
|
+
credentials: z.record(z.string(), z.unknown()),
|
|
875
|
+
failure_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
876
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
877
|
+
is_enabled: z.boolean(),
|
|
878
|
+
last_failure_at: z.iso.datetime({ offset: true }).nullable(),
|
|
879
|
+
last_failure_message: z.string().nullable(),
|
|
880
|
+
last_success_at: z.iso.datetime({ offset: true }).nullable(),
|
|
881
|
+
name: z.string(),
|
|
882
|
+
provider_type: zProviderType,
|
|
883
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
884
|
+
});
|
|
885
|
+
/**
|
|
886
|
+
* DTO for creating an alert integration
|
|
887
|
+
*/
|
|
888
|
+
const zCreateAlertIntegration = z.object({
|
|
889
|
+
credentials: z.record(z.string(), z.unknown()),
|
|
890
|
+
is_enabled: z.boolean().optional(),
|
|
891
|
+
name: z.string(),
|
|
892
|
+
provider_type: zProviderType
|
|
893
|
+
});
|
|
894
|
+
/**
|
|
895
|
+
* Configure project routes
|
|
896
|
+
* The server's per-project event limits (`MAX_EVENTS_PER_PROJECT_*`).
|
|
897
|
+
*/
|
|
898
|
+
const zRateLimitsResponse = z.object({
|
|
899
|
+
project_per_hour: z.int(),
|
|
900
|
+
project_per_minute: z.int()
|
|
901
|
+
});
|
|
902
|
+
const zReadinessChecks = z.object({ database: z.string() });
|
|
903
|
+
const zReadinessResponse = z.object({
|
|
904
|
+
checks: zReadinessChecks,
|
|
905
|
+
status: z.string()
|
|
906
|
+
});
|
|
907
|
+
z.object({
|
|
908
|
+
abnormal: z.int(),
|
|
909
|
+
crash_free_sessions_rate: z.number().nullable(),
|
|
910
|
+
crash_free_users_rate: z.number().nullable(),
|
|
911
|
+
crashed: z.int(),
|
|
912
|
+
environment: z.string(),
|
|
913
|
+
errored: z.int(),
|
|
914
|
+
healthy: z.int(),
|
|
915
|
+
release: z.string(),
|
|
916
|
+
total: z.int()
|
|
917
|
+
});
|
|
918
|
+
/**
|
|
919
|
+
* API response for a release.
|
|
920
|
+
*/
|
|
921
|
+
const zReleaseResponse = z.object({
|
|
922
|
+
dateCreated: z.iso.datetime({ offset: true }),
|
|
923
|
+
dateReleased: z.iso.datetime({ offset: true }).nullable(),
|
|
924
|
+
ref: z.string().nullable(),
|
|
925
|
+
url: z.string().nullable(),
|
|
926
|
+
version: z.string()
|
|
927
|
+
});
|
|
928
|
+
const zRepoCommit = z.object({
|
|
929
|
+
author_login: z.string().nullable(),
|
|
930
|
+
author_name: z.string(),
|
|
931
|
+
committed_at: z.iso.datetime({ offset: true }),
|
|
932
|
+
message: z.string(),
|
|
933
|
+
repo_full_name: z.string(),
|
|
934
|
+
sha: z.string(),
|
|
935
|
+
url: z.string()
|
|
936
|
+
});
|
|
937
|
+
/**
|
|
938
|
+
* `GET .../issues/{id}/github`: the issue's "Code" block in one answer.
|
|
939
|
+
*/
|
|
940
|
+
const zIssueGitHub = z.object({
|
|
941
|
+
links: z.array(zIssueLink),
|
|
942
|
+
owners: z.array(z.string()),
|
|
943
|
+
suspect_commits: z.array(zRepoCommit)
|
|
944
|
+
});
|
|
945
|
+
/**
|
|
946
|
+
* How the last retention cleanup went.
|
|
947
|
+
*/
|
|
948
|
+
const zRetentionRun = z.object({
|
|
949
|
+
error: z.string().nullable(),
|
|
950
|
+
finished_at: z.iso.datetime({ offset: true }).nullable(),
|
|
951
|
+
removed: zCleanupCounts.nullable(),
|
|
952
|
+
started_at: z.iso.datetime({ offset: true }),
|
|
953
|
+
status: z.string()
|
|
954
|
+
});
|
|
955
|
+
/**
|
|
956
|
+
* How long each kind of data is kept, in days. `None` keeps it forever.
|
|
957
|
+
*/
|
|
958
|
+
const zRetentionWindows = z.object({
|
|
959
|
+
events_days: z.int().nullable().default(null),
|
|
960
|
+
logs_days: z.int().nullable().default(null),
|
|
961
|
+
transactions_days: z.int().nullable().default(null)
|
|
962
|
+
});
|
|
963
|
+
/**
|
|
964
|
+
* Retention: how long each kind of data is kept, by default and per
|
|
965
|
+
* project, and when the cleanup that enforces it runs. Stored as the
|
|
966
|
+
* settings of the `storage_cleanup` scheduled job; a field left out takes
|
|
967
|
+
* its default. Keeping everything forever runs nothing.
|
|
968
|
+
*/
|
|
969
|
+
const zRetentionSettings = z.object({
|
|
970
|
+
defaults: zRetentionWindows.default({
|
|
971
|
+
events_days: null,
|
|
972
|
+
logs_days: null,
|
|
973
|
+
transactions_days: null
|
|
974
|
+
}),
|
|
975
|
+
frequency: zCleanupFrequency.default("daily"),
|
|
976
|
+
hour: z.int().gte(0).lte(23).default(3),
|
|
977
|
+
overrides: z.array(zProjectRetention).default([]),
|
|
978
|
+
weekday: z.int().gte(0).lte(6).default(0)
|
|
979
|
+
});
|
|
980
|
+
const zRetentionResponse = z.object({
|
|
981
|
+
last_run: zRetentionRun.nullable(),
|
|
982
|
+
next_run_at: z.iso.datetime({ offset: true }).nullable(),
|
|
983
|
+
settings: zRetentionSettings
|
|
984
|
+
});
|
|
985
|
+
const zSchedule = z.union([z.object({
|
|
986
|
+
type: z.enum(["crontab"]),
|
|
987
|
+
value: z.string()
|
|
988
|
+
}), z.object({
|
|
989
|
+
type: z.enum(["interval"]),
|
|
990
|
+
unit: zIntervalUnit,
|
|
991
|
+
value: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
992
|
+
})]);
|
|
993
|
+
/**
|
|
994
|
+
* A validated monitor configuration, with every default filled in.
|
|
995
|
+
*/
|
|
996
|
+
const zMonitorConfig = z.object({
|
|
997
|
+
checkin_margin: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
998
|
+
failure_issue_threshold: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
999
|
+
max_runtime: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1000
|
+
recovery_threshold: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1001
|
+
schedule: zSchedule,
|
|
1002
|
+
timezone: z.string()
|
|
1003
|
+
});
|
|
1004
|
+
/**
|
|
1005
|
+
* `monitor_config` as an SDK or the dashboard sends it: every field optional.
|
|
1006
|
+
*/
|
|
1007
|
+
const zMonitorConfigInput = z.object({
|
|
1008
|
+
checkin_margin: z.int().gte(0).nullish(),
|
|
1009
|
+
failure_issue_threshold: z.int().gte(0).nullish(),
|
|
1010
|
+
max_runtime: z.int().gte(0).nullish(),
|
|
1011
|
+
recovery_threshold: z.int().gte(0).nullish(),
|
|
1012
|
+
schedule: zSchedule.nullish(),
|
|
1013
|
+
timezone: z.string().nullish()
|
|
1014
|
+
});
|
|
1015
|
+
/**
|
|
1016
|
+
* Body of `POST /api/projects/{project_id}/monitors`.
|
|
1017
|
+
*/
|
|
1018
|
+
const zCreateMonitor = z.object({
|
|
1019
|
+
config: zMonitorConfigInput,
|
|
1020
|
+
name: z.string(),
|
|
1021
|
+
slug: z.string().nullish()
|
|
1022
|
+
});
|
|
1023
|
+
const zMonitorResponse = z.object({
|
|
1024
|
+
config: zMonitorConfig,
|
|
1025
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
1026
|
+
environments: z.array(zMonitorEnvironmentResponse),
|
|
1027
|
+
id: z.uuid(),
|
|
1028
|
+
is_muted: z.boolean(),
|
|
1029
|
+
name: z.string(),
|
|
1030
|
+
slug: z.string()
|
|
1031
|
+
});
|
|
1032
|
+
/**
|
|
1033
|
+
* Body of `POST /api/schedules/preview`.
|
|
1034
|
+
*/
|
|
1035
|
+
const zPreviewSchedule = z.object({
|
|
1036
|
+
schedule: zSchedule,
|
|
1037
|
+
timezone: z.string().nullish()
|
|
1038
|
+
});
|
|
1039
|
+
/**
|
|
1040
|
+
* When a schedule runs next, computed by the code that runs it: monitors
|
|
1041
|
+
* expect their check-ins and scheduled jobs fire at exactly these instants.
|
|
1042
|
+
*/
|
|
1043
|
+
const zSchedulePreview = z.object({ next_runs: z.array(z.iso.datetime({ offset: true })) });
|
|
1044
|
+
const zSeenResponse = z.object({ has_seen: z.boolean() });
|
|
1045
|
+
/**
|
|
1046
|
+
* Project-wide session health summary, aggregated across all releases and environments.
|
|
1047
|
+
*/
|
|
1048
|
+
const zSessionSummary = z.object({
|
|
1049
|
+
abnormal: z.int(),
|
|
1050
|
+
active_releases: z.int(),
|
|
1051
|
+
crash_free_sessions_rate: z.number().nullable(),
|
|
1052
|
+
crash_free_users_rate: z.number().nullable(),
|
|
1053
|
+
crashed: z.int(),
|
|
1054
|
+
errored: z.int(),
|
|
1055
|
+
total: z.int()
|
|
1056
|
+
});
|
|
1057
|
+
/**
|
|
1058
|
+
* One time-bucketed point in a project's session trend, aggregated across all
|
|
1059
|
+
* releases and environments. Powers trend charts (crash-free sessions over time).
|
|
1060
|
+
*/
|
|
1061
|
+
const zSessionTimeseriesPoint = z.object({
|
|
1062
|
+
bucket: z.iso.datetime({ offset: true }),
|
|
1063
|
+
crash_free_sessions_rate: z.number().nullable(),
|
|
1064
|
+
crashed: z.int(),
|
|
1065
|
+
total: z.int()
|
|
1066
|
+
});
|
|
1067
|
+
/**
|
|
1068
|
+
* Sort order direction
|
|
1069
|
+
*/
|
|
1070
|
+
const zSortOrder = z.enum(["asc", "desc"]);
|
|
1071
|
+
const zSourceMapFile = z.object({
|
|
1072
|
+
dateUploaded: z.string(),
|
|
1073
|
+
debugId: z.string(),
|
|
1074
|
+
fileType: z.string(),
|
|
1075
|
+
size: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1076
|
+
timesUsed: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1077
|
+
});
|
|
1078
|
+
/**
|
|
1079
|
+
* Outcome of a source-map garbage collection: orphaned `source_file` rows
|
|
1080
|
+
* (no `source_file_metadata` referencing them) removed from the DB and unlinked
|
|
1081
|
+
* from disk. `bytes_freed` is the exact summed `size` of the removed files.
|
|
1082
|
+
*/
|
|
1083
|
+
const zSourceMapGcResult = z.object({
|
|
1084
|
+
bytes_freed: z.int(),
|
|
1085
|
+
files_removed: z.int()
|
|
1086
|
+
});
|
|
1087
|
+
const zSourceMapList = z.object({ data: z.array(zSourceMapFile) });
|
|
1088
|
+
/**
|
|
1089
|
+
* Exact source-map storage weight, summed from the `size` columns.
|
|
1090
|
+
*
|
|
1091
|
+
* Source maps live in two places: `chunk` holds the raw upload bytes as in-DB
|
|
1092
|
+
* BYTEA, `source_file` holds the assembled artifact on the filesystem CAS. Both
|
|
1093
|
+
* carry a `size` column, so the weight is an exact SUM — no filesystem walk.
|
|
1094
|
+
*/
|
|
1095
|
+
const zSourceMapStorage = z.object({
|
|
1096
|
+
chunk_bytes: z.int(),
|
|
1097
|
+
file_count: z.int(),
|
|
1098
|
+
source_file_bytes: z.int(),
|
|
1099
|
+
total_bytes: z.int()
|
|
1100
|
+
});
|
|
1101
|
+
/**
|
|
1102
|
+
* A single indexed span — extracted from a transaction, OR standalone
|
|
1103
|
+
* (Sentry "span" item type). Both origins write into the same `spans`
|
|
1104
|
+
* table, so `transaction_id` is the only thing that distinguishes them.
|
|
1105
|
+
*/
|
|
1106
|
+
const zSpanResponse = z.object({
|
|
1107
|
+
description: z.string().nullable(),
|
|
1108
|
+
duration_ms: z.number().nullable(),
|
|
1109
|
+
environment: z.string().nullable(),
|
|
1110
|
+
exclusive_time_ms: z.number().nullable(),
|
|
1111
|
+
gen_ai_agent_name: z.string().nullable(),
|
|
1112
|
+
gen_ai_conversation_id: z.string().nullable(),
|
|
1113
|
+
gen_ai_operation_type: z.string().nullable(),
|
|
1114
|
+
gen_ai_request_model: z.string().nullable(),
|
|
1115
|
+
gen_ai_response_model: z.string().nullable(),
|
|
1116
|
+
gen_ai_tool_name: z.string().nullable(),
|
|
1117
|
+
gen_ai_usage_input_tokens: z.number().nullable(),
|
|
1118
|
+
gen_ai_usage_output_tokens: z.number().nullable(),
|
|
1119
|
+
gen_ai_usage_total_tokens: z.number().nullable(),
|
|
1120
|
+
id: z.uuid(),
|
|
1121
|
+
is_segment: z.boolean(),
|
|
1122
|
+
op: z.string().nullable(),
|
|
1123
|
+
parent_span_id: z.string().nullable(),
|
|
1124
|
+
platform: z.string().nullable(),
|
|
1125
|
+
release: z.string().nullable(),
|
|
1126
|
+
segment_id: z.string().nullable(),
|
|
1127
|
+
span_id: z.string().nullable(),
|
|
1128
|
+
start_timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
1129
|
+
status: z.string().nullable(),
|
|
1130
|
+
timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
1131
|
+
trace_id: z.string().nullable(),
|
|
1132
|
+
transaction_id: z.uuid().nullable()
|
|
1133
|
+
});
|
|
1134
|
+
/**
|
|
1135
|
+
* One span with its full attribute bag — the detail counterpart to
|
|
1136
|
+
* [`SpanResponse`].
|
|
1137
|
+
*
|
|
1138
|
+
* The list response deliberately omits attributes: `spans.data` is never
|
|
1139
|
+
* trimmed (unlike event data, which goes through `services::event_trim`), so
|
|
1140
|
+
* a single AI span can carry a whole prompt and a trace's worth of them would
|
|
1141
|
+
* dwarf the waterfall it is drawn from. Attributes are fetched one span at a
|
|
1142
|
+
* time instead, which is also how Sentry's own agent drawer works — the span
|
|
1143
|
+
* list is light and the details panel loads the selected node's attributes.
|
|
1144
|
+
*/
|
|
1145
|
+
const zSpanDetailResponse = zSpanResponse.and(z.object({
|
|
1146
|
+
attributes: z.record(z.string(), z.unknown()),
|
|
1147
|
+
tags: z.record(z.string(), z.unknown()).nullable()
|
|
1148
|
+
}));
|
|
1149
|
+
const zSsoConfigResponse = z.object({
|
|
1150
|
+
enabled: z.boolean(),
|
|
1151
|
+
provider_name: z.string().nullable()
|
|
1152
|
+
});
|
|
1153
|
+
const zSsoLinkResponse = z.object({
|
|
1154
|
+
email: z.string(),
|
|
1155
|
+
provider_name: z.string()
|
|
1156
|
+
});
|
|
1157
|
+
const zSsoStartResponse = z.object({ authorization_url: z.string() });
|
|
1158
|
+
/**
|
|
1159
|
+
* The age of everything the instance holds, by project and kind, keyed on
|
|
1160
|
+
* ingest time like retention.
|
|
1161
|
+
*/
|
|
1162
|
+
const zStorageAge = z.object({
|
|
1163
|
+
bucket_days: z.array(z.int()),
|
|
1164
|
+
projects: z.array(zProjectAge)
|
|
1165
|
+
});
|
|
1166
|
+
/**
|
|
1167
|
+
* Instance-wide storage summary: what Rustrak is holding right now.
|
|
1168
|
+
*
|
|
1169
|
+
* Row counts are exact (indexed `COUNT(*)`). `total_db_size_bytes` is a
|
|
1170
|
+
* best-effort figure from the backend (`pg_database_size` / SQLite page count),
|
|
1171
|
+
* while `source_maps` is exact (summed `size` columns).
|
|
1172
|
+
*/
|
|
1173
|
+
const zStorageSummary = z.object({
|
|
1174
|
+
events_count: z.int(),
|
|
1175
|
+
logs_count: z.int(),
|
|
1176
|
+
source_maps: zSourceMapStorage,
|
|
1177
|
+
spans_count: z.int(),
|
|
1178
|
+
total_db_size_bytes: z.int(),
|
|
1179
|
+
transactions_count: z.int()
|
|
1180
|
+
});
|
|
1181
|
+
const zSubscriptionResponse = z.object({ is_subscribed: z.boolean() });
|
|
1182
|
+
/**
|
|
1183
|
+
* A tag value with its event count within an issue.
|
|
1184
|
+
*/
|
|
1185
|
+
const zTagValueCount = z.object({
|
|
1186
|
+
count: z.int(),
|
|
1187
|
+
value: z.string()
|
|
1188
|
+
});
|
|
1189
|
+
/**
|
|
1190
|
+
* A tag key with its most common values within an issue.
|
|
1191
|
+
*/
|
|
1192
|
+
const zTagSummary = z.object({
|
|
1193
|
+
key: z.string(),
|
|
1194
|
+
top_values: z.array(zTagValueCount),
|
|
1195
|
+
total_values: z.int().gte(0)
|
|
1196
|
+
});
|
|
1197
|
+
/**
|
|
1198
|
+
* Per-issue aggregates computed from recent events (capped scan).
|
|
1199
|
+
*/
|
|
1200
|
+
const zIssueAggregates = z.object({
|
|
1201
|
+
tags: z.array(zTagSummary),
|
|
1202
|
+
user_count: z.int()
|
|
1203
|
+
});
|
|
1204
|
+
const zTelemetryPreview = z.object({
|
|
1205
|
+
enabled: z.boolean(),
|
|
1206
|
+
reason: z.string().nullable(),
|
|
1207
|
+
report: z.record(z.string(), z.unknown()),
|
|
1208
|
+
sink: z.string().nullable()
|
|
1209
|
+
});
|
|
1210
|
+
/**
|
|
1211
|
+
* Outcome of a test notification.
|
|
1212
|
+
*/
|
|
1213
|
+
const zTestChannelResponse = z.object({
|
|
1214
|
+
message: z.string(),
|
|
1215
|
+
response_body: z.string().nullable(),
|
|
1216
|
+
success: z.boolean()
|
|
1217
|
+
});
|
|
1218
|
+
/**
|
|
1219
|
+
* Request body for the test-integration endpoint.
|
|
1220
|
+
*/
|
|
1221
|
+
const zTestIntegrationBody = z.object({ routing_override: z.record(z.string(), z.unknown()).nullish() });
|
|
1222
|
+
/**
|
|
1223
|
+
* Body for toggling a per-user flag (bookmark/subscription).
|
|
1224
|
+
*/
|
|
1225
|
+
const zToggleRequest = z.object({ enabled: z.boolean().nullish() });
|
|
1226
|
+
/**
|
|
1227
|
+
* Response model for a single transaction detail view.
|
|
1228
|
+
*
|
|
1229
|
+
* Carries the same summary fields as [`TransactionResponse`] plus the full
|
|
1230
|
+
* Sentry payload under `data` (spans, contexts.trace, measurements, tags,
|
|
1231
|
+
* request, user). The frontend builds the span waterfall and metrics view
|
|
1232
|
+
* from `data`.
|
|
1233
|
+
*/
|
|
1234
|
+
const zTransactionDetailResponse = z.object({
|
|
1235
|
+
data: z.record(z.string(), z.unknown()),
|
|
1236
|
+
duration_ms: z.number().nullable(),
|
|
1237
|
+
environment: z.string(),
|
|
1238
|
+
event_id: z.string(),
|
|
1239
|
+
id: z.uuid(),
|
|
1240
|
+
ingested_at: z.iso.datetime({ offset: true }),
|
|
1241
|
+
platform: z.string(),
|
|
1242
|
+
release: z.string(),
|
|
1243
|
+
start_timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
1244
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
1245
|
+
transaction_name: z.string()
|
|
1246
|
+
});
|
|
1247
|
+
z.object({
|
|
1248
|
+
duration_ms: z.number().nullable(),
|
|
1249
|
+
environment: z.string(),
|
|
1250
|
+
event_id: z.string(),
|
|
1251
|
+
id: z.uuid(),
|
|
1252
|
+
ingested_at: z.iso.datetime({ offset: true }),
|
|
1253
|
+
platform: z.string(),
|
|
1254
|
+
release: z.string(),
|
|
1255
|
+
start_timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
1256
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
1257
|
+
transaction_name: z.string()
|
|
1258
|
+
});
|
|
1259
|
+
/**
|
|
1260
|
+
* Aggregate performance stats for one (transaction_name, op) group.
|
|
1261
|
+
* Powers the performance overview: throughput + latency percentiles +
|
|
1262
|
+
* failure rate per transaction. Percentiles are continuous (linear
|
|
1263
|
+
* interpolation, matching Postgres `percentile_cont`).
|
|
1264
|
+
*/
|
|
1265
|
+
const zTransactionStatsResponse = z.object({
|
|
1266
|
+
count: z.int(),
|
|
1267
|
+
failure_rate: z.number(),
|
|
1268
|
+
op: z.string().nullable(),
|
|
1269
|
+
p50_ms: z.number(),
|
|
1270
|
+
p95_ms: z.number(),
|
|
1271
|
+
p99_ms: z.number(),
|
|
1272
|
+
transaction_name: z.string()
|
|
1273
|
+
});
|
|
1274
|
+
/**
|
|
1275
|
+
* DTO for updating an alert integration
|
|
1276
|
+
*/
|
|
1277
|
+
const zUpdateAlertIntegration = z.object({
|
|
1278
|
+
credentials: z.record(z.string(), z.unknown()).nullish(),
|
|
1279
|
+
is_enabled: z.boolean().nullish(),
|
|
1280
|
+
name: z.string().nullish()
|
|
1281
|
+
});
|
|
1282
|
+
/**
|
|
1283
|
+
* DTO for updating an alert rule
|
|
1284
|
+
*/
|
|
1285
|
+
const zUpdateAlertRule = z.object({
|
|
1286
|
+
channels: z.array(zAlertRuleChannelInput).nullish(),
|
|
1287
|
+
conditions: z.record(z.string(), z.unknown()).nullish(),
|
|
1288
|
+
cooldown_minutes: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullish(),
|
|
1289
|
+
is_enabled: z.boolean().nullish(),
|
|
1290
|
+
name: z.string().nullish()
|
|
1291
|
+
});
|
|
1292
|
+
/**
|
|
1293
|
+
* Request to update issue state.
|
|
1294
|
+
*
|
|
1295
|
+
* `status`/`substatus`/`priority`/assignment are the canonical fields.
|
|
1296
|
+
* `is_resolved`/`is_muted` are accepted as a deprecated compatibility shim
|
|
1297
|
+
* and mapped onto `status`.
|
|
1298
|
+
*/
|
|
1299
|
+
const zUpdateIssueState = z.object({
|
|
1300
|
+
assigned_to: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullish(),
|
|
1301
|
+
assignee_type: z.string().nullish(),
|
|
1302
|
+
is_muted: z.boolean().nullish(),
|
|
1303
|
+
is_resolved: z.boolean().nullish(),
|
|
1304
|
+
priority: zIssuePriority.nullish(),
|
|
1305
|
+
status: zIssueStatusUpdate.nullish(),
|
|
1306
|
+
substatus: z.string().nullish()
|
|
1307
|
+
});
|
|
1308
|
+
/**
|
|
1309
|
+
* Body of `PUT /api/projects/{project_id}/monitors/{slug}`. Fields left out
|
|
1310
|
+
* keep their value, including each field of `config`.
|
|
1311
|
+
*/
|
|
1312
|
+
const zUpdateMonitor = z.object({
|
|
1313
|
+
config: zMonitorConfigInput.nullish(),
|
|
1314
|
+
is_muted: z.boolean().nullish(),
|
|
1315
|
+
name: z.string().nullish()
|
|
1316
|
+
});
|
|
1317
|
+
/**
|
|
1318
|
+
* What a reader may change about how the dashboard is presented to them.
|
|
1319
|
+
*
|
|
1320
|
+
* Every field is doubly optional, and both levels are used: absent means
|
|
1321
|
+
* "leave it", `null` means "clear it". `#[serde(default)]` with
|
|
1322
|
+
* `deserialize_with` is what keeps those distinguishable, because plain
|
|
1323
|
+
* `Option<Option<T>>` collapses a missing key and an explicit null.
|
|
1324
|
+
*/
|
|
1325
|
+
const zUpdatePreferencesRequest = z.object({
|
|
1326
|
+
language: z.string().nullish(),
|
|
1327
|
+
timezone: z.string().nullish()
|
|
1328
|
+
});
|
|
1329
|
+
/**
|
|
1330
|
+
* DTO for updating a project
|
|
1331
|
+
*/
|
|
1332
|
+
const zUpdateProject = z.object({
|
|
1333
|
+
name: z.string().nullish(),
|
|
1334
|
+
platform: z.string().nullish(),
|
|
1335
|
+
rate_limit_per_hour: z.int().nullish(),
|
|
1336
|
+
rate_limit_per_minute: z.int().nullish(),
|
|
1337
|
+
slug: z.string().nullish()
|
|
1338
|
+
});
|
|
1339
|
+
const zUpdateProjectRepository = z.object({
|
|
1340
|
+
auto_create_conditions: z.record(z.string(), z.unknown()).nullish(),
|
|
1341
|
+
auto_create_issues: z.boolean().nullish(),
|
|
1342
|
+
code_mappings: z.array(zCodeMapping).nullish(),
|
|
1343
|
+
installation_id: z.int(),
|
|
1344
|
+
repo_full_name: z.string()
|
|
1345
|
+
});
|
|
1346
|
+
/**
|
|
1347
|
+
* DTO for `PUT .../releases/{version}/` — generic partial update.
|
|
1348
|
+
* Setting `date_released` IS "finalize": there is no separate status flag.
|
|
1349
|
+
* Absent fields (including an explicit `null`) leave the stored value
|
|
1350
|
+
* unchanged, matching Sentry's own partial-update semantics for this endpoint.
|
|
1351
|
+
*/
|
|
1352
|
+
const zUpdateRelease = z.object({
|
|
1353
|
+
dateReleased: z.iso.datetime({ offset: true }).nullish(),
|
|
1354
|
+
ref: z.string().nullish(),
|
|
1355
|
+
url: z.string().nullish()
|
|
1356
|
+
});
|
|
1357
|
+
const zUpsertProjectMember = z.object({
|
|
1358
|
+
role: zProjectRole,
|
|
1359
|
+
user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1360
|
+
});
|
|
1361
|
+
/**
|
|
1362
|
+
* A user feedback report attached to a project/issue/event.
|
|
1363
|
+
*/
|
|
1364
|
+
const zUserReport = z.object({
|
|
1365
|
+
comments: z.string(),
|
|
1366
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
1367
|
+
email: z.string(),
|
|
1368
|
+
event_id: z.uuid().nullable(),
|
|
1369
|
+
id: z.uuid(),
|
|
1370
|
+
issue_id: z.uuid().nullable(),
|
|
1371
|
+
name: z.string(),
|
|
1372
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1373
|
+
});
|
|
1374
|
+
/**
|
|
1375
|
+
* Body for submitting user feedback on an issue.
|
|
1376
|
+
*/
|
|
1377
|
+
const zUserReportRequest = z.object({
|
|
1378
|
+
comments: z.string().nullish(),
|
|
1379
|
+
email: z.string().nullish(),
|
|
1380
|
+
event_id: z.uuid().nullish(),
|
|
1381
|
+
name: z.string().nullish()
|
|
1382
|
+
});
|
|
1383
|
+
/**
|
|
1384
|
+
* Instance-wide role for a user.
|
|
1385
|
+
*
|
|
1386
|
+
* `Admin` has full access to every project and to team management.
|
|
1387
|
+
* `Member` only sees projects they are a member of (see `ProjectRole`).
|
|
1388
|
+
*/
|
|
1389
|
+
const zUserRole = z.enum(["admin", "member"]);
|
|
1390
|
+
const zCreateInvitation = z.object({
|
|
1391
|
+
email: z.string(),
|
|
1392
|
+
role: zUserRole
|
|
1393
|
+
});
|
|
1394
|
+
/**
|
|
1395
|
+
* Public-facing invitation info for the accept page.
|
|
1396
|
+
*/
|
|
1397
|
+
const zInvitationInfoResponse = z.object({
|
|
1398
|
+
email: z.string(),
|
|
1399
|
+
expires_at: z.iso.datetime({ offset: true }),
|
|
1400
|
+
role: zUserRole,
|
|
1401
|
+
status: z.string()
|
|
1402
|
+
});
|
|
1403
|
+
/**
|
|
1404
|
+
* Public-facing invitation (no internal columns beyond what the UI needs).
|
|
1405
|
+
*/
|
|
1406
|
+
const zInvitationResponse = z.object({
|
|
1407
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
1408
|
+
email: z.string(),
|
|
1409
|
+
expires_at: z.iso.datetime({ offset: true }),
|
|
1410
|
+
role: zUserRole,
|
|
1411
|
+
status: z.string(),
|
|
1412
|
+
token: z.string()
|
|
1413
|
+
});
|
|
1414
|
+
/**
|
|
1415
|
+
* A user as exposed on the team roster.
|
|
1416
|
+
*/
|
|
1417
|
+
const zTeamMemberResponse = z.object({
|
|
1418
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
1419
|
+
email: z.string(),
|
|
1420
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1421
|
+
is_active: z.boolean(),
|
|
1422
|
+
is_primary: z.boolean(),
|
|
1423
|
+
last_login: z.iso.datetime({ offset: true }).nullable(),
|
|
1424
|
+
role: zUserRole
|
|
1425
|
+
});
|
|
1426
|
+
/**
|
|
1427
|
+
* Request body for changing a user's global role.
|
|
1428
|
+
*/
|
|
1429
|
+
const zUpdateUserRole = z.object({ role: zUserRole });
|
|
1430
|
+
const zUserResponse = z.object({
|
|
1431
|
+
email: z.string(),
|
|
1432
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1433
|
+
is_admin: z.boolean(),
|
|
1434
|
+
language: z.string().nullable(),
|
|
1435
|
+
role: zUserRole,
|
|
1436
|
+
timezone: z.string().nullable()
|
|
1437
|
+
});
|
|
1438
|
+
const zAuthResponse = z.object({ user: zUserResponse });
|
|
1439
|
+
const zVersionResponse = z.object({ version: z.string() });
|
|
1440
|
+
const zSourceMapsOrgDetailsPath = z.object({ org_slug: z.string() });
|
|
1441
|
+
/**
|
|
1442
|
+
* Synthetic org metadata accepted by sentry-cli
|
|
1443
|
+
*/
|
|
1444
|
+
const zSourceMapsOrgDetailsResponse = zOrgDetails;
|
|
1445
|
+
const zSourceMapsArtifactBundleAssembleBody = zAssembleBody;
|
|
1446
|
+
const zSourceMapsArtifactBundleAssemblePath = z.object({ org_slug: z.string() });
|
|
1447
|
+
/**
|
|
1448
|
+
* Assembly job state (not_found / created / assembling / ok / error). Missing chunks are listed in missingChunks.
|
|
1449
|
+
*/
|
|
1450
|
+
const zSourceMapsArtifactBundleAssembleResponse = zAssembleResponse;
|
|
1451
|
+
const zSourceMapsChunkUploadCapabilityPath = z.object({ org_slug: z.string() });
|
|
1452
|
+
/**
|
|
1453
|
+
* Chunk upload capabilities and URL
|
|
1454
|
+
*/
|
|
1455
|
+
const zSourceMapsChunkUploadCapabilityResponse = zChunkUploadOptions;
|
|
1456
|
+
/**
|
|
1457
|
+
* One or more binary chunk files. Field names may be SHA-1 hashes (v2 protocol) or arbitrary names like 'file' (v3.x protocol).
|
|
1458
|
+
*/
|
|
1459
|
+
const zSourceMapsChunkUploadBody = zChunkUploadBody;
|
|
1460
|
+
const zSourceMapsChunkUploadPath = z.object({ org_slug: z.string() });
|
|
1461
|
+
const zSourceMapsListPath = z.object({
|
|
1462
|
+
org_slug: z.string(),
|
|
1463
|
+
project_slug: z.string()
|
|
1464
|
+
});
|
|
1465
|
+
/**
|
|
1466
|
+
* List of uploaded source map files
|
|
1467
|
+
*/
|
|
1468
|
+
const zSourceMapsListResponse = zSourceMapList;
|
|
1469
|
+
const zReleasesCreateBody = zCreateRelease;
|
|
1470
|
+
const zReleasesCreatePath = z.object({
|
|
1471
|
+
org_slug: z.string(),
|
|
1472
|
+
project_slug: z.string()
|
|
1473
|
+
});
|
|
1474
|
+
/**
|
|
1475
|
+
* Release created
|
|
1476
|
+
*/
|
|
1477
|
+
const zReleasesCreateResponse = zReleaseResponse;
|
|
1478
|
+
const zReleasesFinalizeBody = zUpdateRelease;
|
|
1479
|
+
const zReleasesFinalizePath = z.object({
|
|
1480
|
+
org_slug: z.string(),
|
|
1481
|
+
project_slug: z.string(),
|
|
1482
|
+
version: z.string()
|
|
1483
|
+
});
|
|
1484
|
+
/**
|
|
1485
|
+
* Release updated
|
|
1486
|
+
*/
|
|
1487
|
+
const zReleasesFinalizeResponse = zReleaseResponse;
|
|
1488
|
+
/**
|
|
1489
|
+
* GitHub App removed
|
|
1490
|
+
*/
|
|
1491
|
+
const zGithubDisconnectResponse = z.void();
|
|
1492
|
+
/**
|
|
1493
|
+
* GitHub App and installations
|
|
1494
|
+
*/
|
|
1495
|
+
const zGithubStatusResponse = zGitHubStatus;
|
|
1496
|
+
const zGithubCallbackQuery = z.object({
|
|
1497
|
+
code: z.string(),
|
|
1498
|
+
state: z.string()
|
|
1499
|
+
});
|
|
1500
|
+
const zGithubInstalledQuery = z.object({ installation_id: z.int() });
|
|
1501
|
+
const zGithubManifestBody = zManifestRequest;
|
|
1502
|
+
/**
|
|
1503
|
+
* Form to post to GitHub
|
|
1504
|
+
*/
|
|
1505
|
+
const zGithubManifestResponse = zManifestResponse;
|
|
1506
|
+
/**
|
|
1507
|
+
* Your GitHub username
|
|
1508
|
+
*/
|
|
1509
|
+
const zGithubGetMyLoginResponse = zGitHubLogin;
|
|
1510
|
+
const zGithubPutMyLoginBody = zGitHubLogin;
|
|
1511
|
+
/**
|
|
1512
|
+
* GitHub username saved
|
|
1513
|
+
*/
|
|
1514
|
+
const zGithubPutMyLoginResponse = zGitHubLogin;
|
|
1515
|
+
const zGithubRepositoriesQuery = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1516
|
+
/**
|
|
1517
|
+
* Repositories the installations reach
|
|
1518
|
+
*/
|
|
1519
|
+
const zGithubRepositoriesResponse = z.array(zGitHubRepository);
|
|
1520
|
+
/**
|
|
1521
|
+
* GitHub event payload, signed in X-Hub-Signature-256
|
|
1522
|
+
*/
|
|
1523
|
+
const zGithubWebhookBody = z.record(z.string(), z.unknown());
|
|
1524
|
+
/**
|
|
1525
|
+
* Event processed
|
|
1526
|
+
*/
|
|
1527
|
+
const zGithubWebhookResponse = z.void();
|
|
1528
|
+
/**
|
|
1529
|
+
* List of notification channels
|
|
1530
|
+
*/
|
|
1531
|
+
const zAlertChannelsListResponse = z.array(zAlertIntegration);
|
|
1532
|
+
const zAlertChannelsCreateBody = zCreateAlertIntegration;
|
|
1533
|
+
/**
|
|
1534
|
+
* Channel created
|
|
1535
|
+
*/
|
|
1536
|
+
const zAlertChannelsCreateResponse = zAlertIntegration;
|
|
1537
|
+
const zAlertChannelsPreviewTemplateBody = zPreviewTemplateBody;
|
|
1538
|
+
/**
|
|
1539
|
+
* Rendered body, or why it would not render
|
|
1540
|
+
*/
|
|
1541
|
+
const zAlertChannelsPreviewTemplateResponse = zPreviewTemplateResponse;
|
|
1542
|
+
const zAlertChannelsDeletePath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1543
|
+
/**
|
|
1544
|
+
* Channel deleted
|
|
1545
|
+
*/
|
|
1546
|
+
const zAlertChannelsDeleteResponse = z.void();
|
|
1547
|
+
const zAlertChannelsGetPath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1548
|
+
/**
|
|
1549
|
+
* Channel details
|
|
1550
|
+
*/
|
|
1551
|
+
const zAlertChannelsGetResponse = zAlertIntegration;
|
|
1552
|
+
const zAlertChannelsUpdateBody = zUpdateAlertIntegration;
|
|
1553
|
+
const zAlertChannelsUpdatePath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1554
|
+
/**
|
|
1555
|
+
* Channel updated
|
|
1556
|
+
*/
|
|
1557
|
+
const zAlertChannelsUpdateResponse = zAlertIntegration;
|
|
1558
|
+
const zAlertChannelsTestBody = zTestIntegrationBody;
|
|
1559
|
+
const zAlertChannelsTestPath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1560
|
+
/**
|
|
1561
|
+
* Test notification sent
|
|
1562
|
+
*/
|
|
1563
|
+
const zAlertChannelsTestResponse = zTestChannelResponse;
|
|
1564
|
+
/**
|
|
1565
|
+
* List of invitations
|
|
1566
|
+
*/
|
|
1567
|
+
const zInvitationsListResponse = z.array(zInvitationResponse);
|
|
1568
|
+
const zInvitationsCreateBody = zCreateInvitation;
|
|
1569
|
+
/**
|
|
1570
|
+
* Invitation created
|
|
1571
|
+
*/
|
|
1572
|
+
const zInvitationsCreateResponse = zInvitationResponse;
|
|
1573
|
+
const zInvitationsRevokePath = z.object({ token: z.string() });
|
|
1574
|
+
/**
|
|
1575
|
+
* Invitation revoked
|
|
1576
|
+
*/
|
|
1577
|
+
const zInvitationsRevokeResponse = z.void();
|
|
1578
|
+
const zOauthGetAuthorizationQuery = z.object({
|
|
1579
|
+
response_type: z.string(),
|
|
1580
|
+
client_id: z.string(),
|
|
1581
|
+
redirect_uri: z.string(),
|
|
1582
|
+
code_challenge: z.string(),
|
|
1583
|
+
code_challenge_method: z.string(),
|
|
1584
|
+
state: z.string().nullish(),
|
|
1585
|
+
resource: z.string().nullish()
|
|
1586
|
+
});
|
|
1587
|
+
/**
|
|
1588
|
+
* The verified client asking for access
|
|
1589
|
+
*/
|
|
1590
|
+
const zOauthGetAuthorizationResponse = zAuthorizationInfo;
|
|
1591
|
+
const zOauthDecideAuthorizationBody = zAuthorizationDecision;
|
|
1592
|
+
/**
|
|
1593
|
+
* Where to send the browser
|
|
1594
|
+
*/
|
|
1595
|
+
const zOauthDecideAuthorizationResponse = zAuthorizationRedirect;
|
|
1596
|
+
/**
|
|
1597
|
+
* Assistants connected to your account
|
|
1598
|
+
*/
|
|
1599
|
+
const zOauthListGrantsResponse = z.array(zOAuthGrant);
|
|
1600
|
+
const zOauthRevokeGrantPath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1601
|
+
/**
|
|
1602
|
+
* Disconnected
|
|
1603
|
+
*/
|
|
1604
|
+
const zOauthRevokeGrantResponse = z.void();
|
|
1605
|
+
const zProjectsListQuery = z.object({
|
|
1606
|
+
page: z.int().gte(1).optional(),
|
|
1607
|
+
per_page: z.int().gte(1).lte(100).optional(),
|
|
1608
|
+
order: zSortOrder.optional(),
|
|
1609
|
+
stats_period: z.string().nullish()
|
|
1610
|
+
});
|
|
1611
|
+
/**
|
|
1612
|
+
* Offset-based paginated response wrapper
|
|
1613
|
+
*/
|
|
1614
|
+
const zProjectsListResponse = z.object({
|
|
1615
|
+
items: z.array(z.object({
|
|
1616
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
1617
|
+
digested_event_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1618
|
+
dsn: z.string(),
|
|
1619
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1620
|
+
name: z.string(),
|
|
1621
|
+
platform: z.string().nullable(),
|
|
1622
|
+
rate_limit_per_hour: z.int().nullable(),
|
|
1623
|
+
rate_limit_per_minute: z.int().nullable(),
|
|
1624
|
+
rate_limited_event_count: z.int(),
|
|
1625
|
+
sentry_key: z.uuid(),
|
|
1626
|
+
slug: z.string(),
|
|
1627
|
+
stats: zProjectListStats.nullish(),
|
|
1628
|
+
stored_event_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1629
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
1630
|
+
})),
|
|
1631
|
+
page: z.int(),
|
|
1632
|
+
per_page: z.int(),
|
|
1633
|
+
total_count: z.int(),
|
|
1634
|
+
total_pages: z.int()
|
|
1635
|
+
});
|
|
1636
|
+
const zProjectsCreateBody = zCreateProject;
|
|
1637
|
+
/**
|
|
1638
|
+
* Project created
|
|
1639
|
+
*/
|
|
1640
|
+
const zProjectsCreateResponse = zProjectResponse;
|
|
1641
|
+
const zProjectsDeletePath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1642
|
+
/**
|
|
1643
|
+
* Project deleted
|
|
1644
|
+
*/
|
|
1645
|
+
const zProjectsDeleteResponse = z.void();
|
|
1646
|
+
const zProjectsGetPath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1647
|
+
/**
|
|
1648
|
+
* Project details
|
|
1649
|
+
*/
|
|
1650
|
+
const zProjectsGetResponse = zProjectResponse;
|
|
1651
|
+
const zProjectsUpdateBody = zUpdateProject;
|
|
1652
|
+
const zProjectsUpdatePath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1653
|
+
/**
|
|
1654
|
+
* Project updated
|
|
1655
|
+
*/
|
|
1656
|
+
const zProjectsUpdateResponse = zProjectResponse;
|
|
1657
|
+
const zAgentsDurationPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1658
|
+
const zAgentsDurationQuery = z.object({
|
|
1659
|
+
period_hours: z.int().nullish(),
|
|
1660
|
+
environment: z.string().nullish(),
|
|
1661
|
+
interval_hours: z.int().gte(1).optional()
|
|
1662
|
+
});
|
|
1663
|
+
/**
|
|
1664
|
+
* Avg/p95 duration over time for agent runs and LLM calls
|
|
1665
|
+
*/
|
|
1666
|
+
const zAgentsDurationResponse = z.array(zAgentDurationPoint);
|
|
1667
|
+
const zAgentsEnvironmentsPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1668
|
+
/**
|
|
1669
|
+
* Environments present in this project's AI spans
|
|
1670
|
+
*/
|
|
1671
|
+
const zAgentsEnvironmentsResponse = z.array(z.string());
|
|
1672
|
+
const zAgentsModelsTablePath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1673
|
+
const zAgentsModelsTableQuery = z.object({
|
|
1674
|
+
period_hours: z.int().nullish(),
|
|
1675
|
+
environment: z.string().nullish()
|
|
1676
|
+
});
|
|
1677
|
+
/**
|
|
1678
|
+
* Per-model volume, failures, latency and token split
|
|
1679
|
+
*/
|
|
1680
|
+
const zAgentsModelsTableResponse = z.array(zAgentModelRow);
|
|
1681
|
+
const zAgentsModelsCallsPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1682
|
+
const zAgentsModelsCallsQuery = z.object({
|
|
1683
|
+
period_hours: z.int().nullish(),
|
|
1684
|
+
environment: z.string().nullish(),
|
|
1685
|
+
limit: z.int().gte(1).lte(100).optional()
|
|
1686
|
+
});
|
|
1687
|
+
/**
|
|
1688
|
+
* Top LLM call counts by response model
|
|
1689
|
+
*/
|
|
1690
|
+
const zAgentsModelsCallsResponse = z.array(zGenAiBreakdownRow);
|
|
1691
|
+
const zAgentsModelsTokensPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1692
|
+
const zAgentsModelsTokensQuery = z.object({
|
|
1693
|
+
period_hours: z.int().nullish(),
|
|
1694
|
+
environment: z.string().nullish(),
|
|
1695
|
+
limit: z.int().gte(1).lte(100).optional()
|
|
1696
|
+
});
|
|
1697
|
+
/**
|
|
1698
|
+
* Top total tokens used by response model
|
|
1699
|
+
*/
|
|
1700
|
+
const zAgentsModelsTokensResponse = z.array(zGenAiBreakdownRow);
|
|
1701
|
+
const zAgentsRunsPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1702
|
+
const zAgentsRunsQuery = z.object({
|
|
1703
|
+
period_hours: z.int().nullish(),
|
|
1704
|
+
environment: z.string().nullish(),
|
|
1705
|
+
interval_hours: z.int().gte(1).optional()
|
|
1706
|
+
});
|
|
1707
|
+
/**
|
|
1708
|
+
* Agent runs over time
|
|
1709
|
+
*/
|
|
1710
|
+
const zAgentsRunsResponse = z.array(zAgentTimeseriesPoint);
|
|
1711
|
+
const zAgentsSummaryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1712
|
+
const zAgentsSummaryQuery = z.object({
|
|
1713
|
+
period_hours: z.int().nullish(),
|
|
1714
|
+
environment: z.string().nullish()
|
|
1715
|
+
});
|
|
1716
|
+
/**
|
|
1717
|
+
* Headline totals for the selected window
|
|
1718
|
+
*/
|
|
1719
|
+
const zAgentsSummaryResponse = zAgentSummary;
|
|
1720
|
+
const zAgentsToolsPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1721
|
+
const zAgentsToolsQuery = z.object({
|
|
1722
|
+
period_hours: z.int().nullish(),
|
|
1723
|
+
environment: z.string().nullish(),
|
|
1724
|
+
limit: z.int().gte(1).lte(100).optional()
|
|
1725
|
+
});
|
|
1726
|
+
/**
|
|
1727
|
+
* Top tool call counts by tool name
|
|
1728
|
+
*/
|
|
1729
|
+
const zAgentsToolsResponse = z.array(zGenAiBreakdownRow);
|
|
1730
|
+
const zAgentsToolsTablePath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1731
|
+
const zAgentsToolsTableQuery = z.object({
|
|
1732
|
+
period_hours: z.int().nullish(),
|
|
1733
|
+
environment: z.string().nullish()
|
|
1734
|
+
});
|
|
1735
|
+
/**
|
|
1736
|
+
* Per-tool call volume, failures and latency
|
|
1737
|
+
*/
|
|
1738
|
+
const zAgentsToolsTableResponse = z.array(zAgentToolRow);
|
|
1739
|
+
const zAgentsTracesPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1740
|
+
const zAgentsTracesQuery = z.object({
|
|
1741
|
+
period_hours: z.int().nullish(),
|
|
1742
|
+
environment: z.string().nullish(),
|
|
1743
|
+
page: z.int().gte(1).optional(),
|
|
1744
|
+
per_page: z.int().gte(1).lte(100).optional()
|
|
1745
|
+
});
|
|
1746
|
+
/**
|
|
1747
|
+
* Offset-based paginated response wrapper
|
|
1748
|
+
*/
|
|
1749
|
+
const zAgentsTracesResponse = z.object({
|
|
1750
|
+
items: z.array(z.object({
|
|
1751
|
+
agent_names: z.array(z.string()),
|
|
1752
|
+
duration_ms: z.number().nullable(),
|
|
1753
|
+
error_count: z.int(),
|
|
1754
|
+
llm_call_count: z.int(),
|
|
1755
|
+
started_at: z.iso.datetime({ offset: true }),
|
|
1756
|
+
tool_call_count: z.int(),
|
|
1757
|
+
total_tokens: z.number(),
|
|
1758
|
+
trace_id: z.string()
|
|
1759
|
+
})),
|
|
1760
|
+
page: z.int(),
|
|
1761
|
+
per_page: z.int(),
|
|
1762
|
+
total_count: z.int(),
|
|
1763
|
+
total_pages: z.int()
|
|
1764
|
+
});
|
|
1765
|
+
const zAlertRulesListHistoryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1766
|
+
const zAlertRulesListHistoryQuery = z.object({ limit: z.int().optional() });
|
|
1767
|
+
/**
|
|
1768
|
+
* Alert history
|
|
1769
|
+
*/
|
|
1770
|
+
const zAlertRulesListHistoryResponse = z.array(zAlertHistory);
|
|
1771
|
+
const zAlertRulesListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1772
|
+
/**
|
|
1773
|
+
* List of alert rules
|
|
1774
|
+
*/
|
|
1775
|
+
const zAlertRulesListResponse = z.array(zAlertRuleResponse);
|
|
1776
|
+
const zAlertRulesCreateBody = zCreateAlertRule;
|
|
1777
|
+
const zAlertRulesCreatePath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1778
|
+
/**
|
|
1779
|
+
* Alert rule created
|
|
1780
|
+
*/
|
|
1781
|
+
const zAlertRulesCreateResponse = zAlertRuleResponse;
|
|
1782
|
+
const zAlertRulesDeletePath = z.object({
|
|
1783
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1784
|
+
rule_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1785
|
+
});
|
|
1786
|
+
/**
|
|
1787
|
+
* Alert rule deleted
|
|
1788
|
+
*/
|
|
1789
|
+
const zAlertRulesDeleteResponse = z.void();
|
|
1790
|
+
const zAlertRulesGetPath = z.object({
|
|
1791
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1792
|
+
rule_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1793
|
+
});
|
|
1794
|
+
/**
|
|
1795
|
+
* Alert rule details
|
|
1796
|
+
*/
|
|
1797
|
+
const zAlertRulesGetResponse = zAlertRuleResponse;
|
|
1798
|
+
const zAlertRulesUpdateBody = zUpdateAlertRule;
|
|
1799
|
+
const zAlertRulesUpdatePath = z.object({
|
|
1800
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1801
|
+
rule_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1802
|
+
});
|
|
1803
|
+
/**
|
|
1804
|
+
* Alert rule updated
|
|
1805
|
+
*/
|
|
1806
|
+
const zAlertRulesUpdateResponse = zAlertRuleResponse;
|
|
1807
|
+
const zEventsGetBySentryIdPath = z.object({
|
|
1808
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1809
|
+
event_id: z.string()
|
|
1810
|
+
});
|
|
1811
|
+
/**
|
|
1812
|
+
* Full event detail, including its issue ID
|
|
1813
|
+
*/
|
|
1814
|
+
const zEventsGetBySentryIdResponse = zEventDetailResponse;
|
|
1815
|
+
const zStatsGetEventTimeseriesPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1816
|
+
const zStatsGetEventTimeseriesQuery = z.object({
|
|
1817
|
+
period: z.string().optional(),
|
|
1818
|
+
interval: z.int().optional()
|
|
1819
|
+
});
|
|
1820
|
+
/**
|
|
1821
|
+
* Time-bucketed error-event volume by severity
|
|
1822
|
+
*/
|
|
1823
|
+
const zStatsGetEventTimeseriesResponse = z.array(zEventTimeseriesPoint);
|
|
1824
|
+
const zGithubDeleteProjectRepositoryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1825
|
+
/**
|
|
1826
|
+
* Repository removed
|
|
1827
|
+
*/
|
|
1828
|
+
const zGithubDeleteProjectRepositoryResponse = z.void();
|
|
1829
|
+
const zGithubGetProjectRepositoryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1830
|
+
/**
|
|
1831
|
+
* The project's repository, if any
|
|
1832
|
+
*/
|
|
1833
|
+
const zGithubGetProjectRepositoryResponse = zProjectRepository.nullable();
|
|
1834
|
+
const zGithubPutProjectRepositoryBody = zUpdateProjectRepository;
|
|
1835
|
+
const zGithubPutProjectRepositoryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1836
|
+
/**
|
|
1837
|
+
* Repository saved
|
|
1838
|
+
*/
|
|
1839
|
+
const zGithubPutProjectRepositoryResponse = zProjectRepository;
|
|
1840
|
+
const zGithubSyncCodeownersPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1841
|
+
/**
|
|
1842
|
+
* CODEOWNERS synced
|
|
1843
|
+
*/
|
|
1844
|
+
const zGithubSyncCodeownersResponse = zProjectRepository;
|
|
1845
|
+
const zIssuesBulkDeleteBody = zBulkDeleteIssues;
|
|
1846
|
+
const zIssuesBulkDeletePath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1847
|
+
/**
|
|
1848
|
+
* Number of issues deleted
|
|
1849
|
+
*/
|
|
1850
|
+
const zIssuesBulkDeleteResponse = zBulkDeleteResponse;
|
|
1851
|
+
const zIssuesListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1852
|
+
const zIssuesListQuery = z.object({
|
|
1853
|
+
page: z.int().gte(1).optional(),
|
|
1854
|
+
per_page: z.int().gte(1).lte(100).optional(),
|
|
1855
|
+
sort: zIssueSort.optional(),
|
|
1856
|
+
order: zSortOrder.optional(),
|
|
1857
|
+
filter: zIssueFilter.optional(),
|
|
1858
|
+
q: z.string().nullish()
|
|
1859
|
+
});
|
|
1860
|
+
/**
|
|
1861
|
+
* Offset-based paginated response wrapper
|
|
1862
|
+
*/
|
|
1863
|
+
const zIssuesListResponse = z.object({
|
|
1864
|
+
items: z.array(z.object({
|
|
1865
|
+
assigned_to: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
1866
|
+
assignee_type: z.string().nullable(),
|
|
1867
|
+
culprit: z.string(),
|
|
1868
|
+
event_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1869
|
+
first_release: z.string(),
|
|
1870
|
+
first_seen: z.iso.datetime({ offset: true }),
|
|
1871
|
+
has_seen: z.boolean().nullish(),
|
|
1872
|
+
id: z.uuid(),
|
|
1873
|
+
is_bookmarked: z.boolean().nullish(),
|
|
1874
|
+
is_muted: z.boolean(),
|
|
1875
|
+
is_resolved: z.boolean(),
|
|
1876
|
+
is_subscribed: z.boolean().nullish(),
|
|
1877
|
+
issue_category: z.string(),
|
|
1878
|
+
issue_type: z.string(),
|
|
1879
|
+
last_release: z.string(),
|
|
1880
|
+
last_seen: z.iso.datetime({ offset: true }),
|
|
1881
|
+
level: z.string().nullable(),
|
|
1882
|
+
logger: z.string(),
|
|
1883
|
+
platform: z.string().nullable(),
|
|
1884
|
+
priority: zIssuePriority.nullable(),
|
|
1885
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1886
|
+
short_id: z.string(),
|
|
1887
|
+
status: zIssueStatus,
|
|
1888
|
+
status_details: z.record(z.string(), z.unknown()),
|
|
1889
|
+
substatus: z.string().nullable(),
|
|
1890
|
+
title: z.string(),
|
|
1891
|
+
trend: z.array(z.int()).nullish(),
|
|
1892
|
+
user_count: z.int().nullish(),
|
|
1893
|
+
user_report_count: z.int().nullish(),
|
|
1894
|
+
value: z.string()
|
|
1895
|
+
})),
|
|
1896
|
+
page: z.int(),
|
|
1897
|
+
per_page: z.int(),
|
|
1898
|
+
total_count: z.int(),
|
|
1899
|
+
total_pages: z.int()
|
|
1900
|
+
});
|
|
1901
|
+
const zIssuesBulkUpdateBody = zBulkUpdateIssues;
|
|
1902
|
+
const zIssuesBulkUpdatePath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
1903
|
+
/**
|
|
1904
|
+
* Number of issues updated
|
|
1905
|
+
*/
|
|
1906
|
+
const zIssuesBulkUpdateResponse = zBulkUpdateResponse;
|
|
1907
|
+
const zIssuesDeletePath = z.object({
|
|
1908
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1909
|
+
issue_id: z.uuid()
|
|
1910
|
+
});
|
|
1911
|
+
/**
|
|
1912
|
+
* Issue deleted
|
|
1913
|
+
*/
|
|
1914
|
+
const zIssuesDeleteResponse = z.void();
|
|
1915
|
+
const zIssuesGetPath = z.object({
|
|
1916
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1917
|
+
issue_id: z.uuid()
|
|
1918
|
+
});
|
|
1919
|
+
/**
|
|
1920
|
+
* Issue details
|
|
1921
|
+
*/
|
|
1922
|
+
const zIssuesGetResponse = zIssueResponse;
|
|
1923
|
+
const zIssuesUpdateBody = zUpdateIssueState;
|
|
1924
|
+
const zIssuesUpdatePath = z.object({
|
|
1925
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1926
|
+
issue_id: z.uuid()
|
|
1927
|
+
});
|
|
1928
|
+
/**
|
|
1929
|
+
* Issue updated
|
|
1930
|
+
*/
|
|
1931
|
+
const zIssuesUpdateResponse = zIssueResponse;
|
|
1932
|
+
const zIssuesGetActivityPath = z.object({
|
|
1933
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1934
|
+
issue_id: z.uuid()
|
|
1935
|
+
});
|
|
1936
|
+
/**
|
|
1937
|
+
* Activity log (status changes, comments, …)
|
|
1938
|
+
*/
|
|
1939
|
+
const zIssuesGetActivityResponse = z.array(zActivityEntry);
|
|
1940
|
+
const zIssuesGetAggregatesPath = z.object({
|
|
1941
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1942
|
+
issue_id: z.uuid()
|
|
1943
|
+
});
|
|
1944
|
+
/**
|
|
1945
|
+
* Unique user count and top tags
|
|
1946
|
+
*/
|
|
1947
|
+
const zIssuesGetAggregatesResponse = zIssueAggregates;
|
|
1948
|
+
const zIssuesSetBookmarkBody = zToggleRequest;
|
|
1949
|
+
const zIssuesSetBookmarkPath = z.object({
|
|
1950
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1951
|
+
issue_id: z.uuid()
|
|
1952
|
+
});
|
|
1953
|
+
/**
|
|
1954
|
+
* Updated bookmark state
|
|
1955
|
+
*/
|
|
1956
|
+
const zIssuesSetBookmarkResponse = zBookmarkResponse;
|
|
1957
|
+
const zIssuesCreateCommentBody = zCommentRequest;
|
|
1958
|
+
const zIssuesCreateCommentPath = z.object({
|
|
1959
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1960
|
+
issue_id: z.uuid()
|
|
1961
|
+
});
|
|
1962
|
+
/**
|
|
1963
|
+
* Comment added
|
|
1964
|
+
*/
|
|
1965
|
+
const zIssuesCreateCommentResponse = zActivityEntry;
|
|
1966
|
+
const zEventsListPath = z.object({
|
|
1967
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1968
|
+
issue_id: z.uuid()
|
|
1969
|
+
});
|
|
1970
|
+
const zEventsListQuery = z.object({
|
|
1971
|
+
order: zSortOrder.optional(),
|
|
1972
|
+
cursor: z.string().nullish()
|
|
1973
|
+
});
|
|
1974
|
+
/**
|
|
1975
|
+
* Paginated response wrapper (cursor-based)
|
|
1976
|
+
*/
|
|
1977
|
+
const zEventsListResponse = z.object({
|
|
1978
|
+
has_more: z.boolean(),
|
|
1979
|
+
items: z.array(z.object({
|
|
1980
|
+
environment: z.string(),
|
|
1981
|
+
event_id: z.string(),
|
|
1982
|
+
event_type: z.string(),
|
|
1983
|
+
id: z.uuid(),
|
|
1984
|
+
issue_id: z.uuid().nullable(),
|
|
1985
|
+
level: z.string(),
|
|
1986
|
+
platform: z.string(),
|
|
1987
|
+
release: z.string(),
|
|
1988
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
1989
|
+
title: z.string()
|
|
1990
|
+
})),
|
|
1991
|
+
next_cursor: z.string().nullish()
|
|
1992
|
+
});
|
|
1993
|
+
const zEventsGetPath = z.object({
|
|
1994
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1995
|
+
issue_id: z.uuid(),
|
|
1996
|
+
event_id: z.uuid()
|
|
1997
|
+
});
|
|
1998
|
+
/**
|
|
1999
|
+
* Full event detail
|
|
2000
|
+
*/
|
|
2001
|
+
const zEventsGetResponse = zEventDetailResponse;
|
|
2002
|
+
const zGithubIssuePath = z.object({
|
|
2003
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2004
|
+
issue_id: z.uuid()
|
|
2005
|
+
});
|
|
2006
|
+
/**
|
|
2007
|
+
* Links, suspect commits and owners
|
|
2008
|
+
*/
|
|
2009
|
+
const zGithubIssueResponse = zIssueGitHub;
|
|
2010
|
+
const zGithubCreateIssueBody = zCreateGitHubIssue;
|
|
2011
|
+
const zGithubCreateIssuePath = z.object({
|
|
2012
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2013
|
+
issue_id: z.uuid()
|
|
2014
|
+
});
|
|
2015
|
+
/**
|
|
2016
|
+
* GitHub issue created and linked
|
|
2017
|
+
*/
|
|
2018
|
+
const zGithubCreateIssueResponse = zIssueLink;
|
|
2019
|
+
const zGithubLinkIssueBody = zLinkGitHubIssue;
|
|
2020
|
+
const zGithubLinkIssuePath = z.object({
|
|
2021
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2022
|
+
issue_id: z.uuid()
|
|
2023
|
+
});
|
|
2024
|
+
/**
|
|
2025
|
+
* GitHub issue linked
|
|
2026
|
+
*/
|
|
2027
|
+
const zGithubLinkIssueResponse = zIssueLink;
|
|
2028
|
+
const zGithubUnlinkIssuePath = z.object({
|
|
2029
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2030
|
+
issue_id: z.uuid(),
|
|
2031
|
+
link_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
2032
|
+
});
|
|
2033
|
+
/**
|
|
2034
|
+
* Link removed
|
|
2035
|
+
*/
|
|
2036
|
+
const zGithubUnlinkIssueResponse = z.void();
|
|
2037
|
+
const zIssuesGetHashesPath = z.object({
|
|
2038
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2039
|
+
issue_id: z.uuid()
|
|
2040
|
+
});
|
|
2041
|
+
/**
|
|
2042
|
+
* Grouping hashes mapped to the issue
|
|
2043
|
+
*/
|
|
2044
|
+
const zIssuesGetHashesResponse = z.array(zGrouping);
|
|
2045
|
+
const zIssuesMarkSeenPath = z.object({
|
|
2046
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2047
|
+
issue_id: z.uuid()
|
|
2048
|
+
});
|
|
2049
|
+
/**
|
|
2050
|
+
* Issue marked as seen
|
|
2051
|
+
*/
|
|
2052
|
+
const zIssuesMarkSeenResponse = zSeenResponse;
|
|
2053
|
+
const zIssuesGetStatsPath = z.object({
|
|
2054
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2055
|
+
issue_id: z.uuid()
|
|
2056
|
+
});
|
|
2057
|
+
const zIssuesGetStatsQuery = z.object({ window: zIssueStatsWindow.optional() });
|
|
2058
|
+
/**
|
|
2059
|
+
* Zero-filled event-count timeseries
|
|
2060
|
+
*/
|
|
2061
|
+
const zIssuesGetStatsResponse = zIssueStatsResponse;
|
|
2062
|
+
const zIssuesSetSubscriptionBody = zToggleRequest;
|
|
2063
|
+
const zIssuesSetSubscriptionPath = z.object({
|
|
2064
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2065
|
+
issue_id: z.uuid()
|
|
2066
|
+
});
|
|
2067
|
+
/**
|
|
2068
|
+
* Updated subscription state
|
|
2069
|
+
*/
|
|
2070
|
+
const zIssuesSetSubscriptionResponse = zSubscriptionResponse;
|
|
2071
|
+
const zIssuesGetTagValuesPath = z.object({
|
|
2072
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2073
|
+
issue_id: z.uuid(),
|
|
2074
|
+
key: z.string()
|
|
2075
|
+
});
|
|
2076
|
+
/**
|
|
2077
|
+
* Distinct values for the tag key, one entry per value (Sentry-compatible: a bare list, not wrapped)
|
|
2078
|
+
*/
|
|
2079
|
+
const zIssuesGetTagValuesResponse = z.array(zIssueTagValue);
|
|
2080
|
+
const zIssuesListUserReportsPath = z.object({
|
|
2081
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2082
|
+
issue_id: z.uuid()
|
|
2083
|
+
});
|
|
2084
|
+
/**
|
|
2085
|
+
* User feedback reports for the issue
|
|
2086
|
+
*/
|
|
2087
|
+
const zIssuesListUserReportsResponse = z.array(zUserReport);
|
|
2088
|
+
const zIssuesCreateUserReportBody = zUserReportRequest;
|
|
2089
|
+
const zIssuesCreateUserReportPath = z.object({
|
|
2090
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2091
|
+
issue_id: z.uuid()
|
|
2092
|
+
});
|
|
2093
|
+
/**
|
|
2094
|
+
* User feedback attached
|
|
2095
|
+
*/
|
|
2096
|
+
const zIssuesCreateUserReportResponse = zUserReport;
|
|
2097
|
+
const zLogsListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2098
|
+
const zLogsListQuery = z.object({
|
|
2099
|
+
page: z.int().gte(1).optional(),
|
|
2100
|
+
per_page: z.int().gte(1).lte(100).optional(),
|
|
2101
|
+
level: z.string().nullish(),
|
|
2102
|
+
trace_id: z.string().nullish()
|
|
2103
|
+
});
|
|
2104
|
+
/**
|
|
2105
|
+
* Offset-based paginated response wrapper
|
|
2106
|
+
*/
|
|
2107
|
+
const zLogsListResponse = z.object({
|
|
2108
|
+
items: z.array(z.object({
|
|
2109
|
+
attributes: z.record(z.string(), z.unknown()),
|
|
2110
|
+
body: z.string(),
|
|
2111
|
+
id: z.uuid(),
|
|
2112
|
+
ingested_at: z.iso.datetime({ offset: true }),
|
|
2113
|
+
level: z.string(),
|
|
2114
|
+
severity_number: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).nullable(),
|
|
2115
|
+
span_id: z.string().nullable(),
|
|
2116
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
2117
|
+
trace_id: z.string().nullable()
|
|
2118
|
+
})),
|
|
2119
|
+
page: z.int(),
|
|
2120
|
+
per_page: z.int(),
|
|
2121
|
+
total_count: z.int(),
|
|
2122
|
+
total_pages: z.int()
|
|
2123
|
+
});
|
|
2124
|
+
const zMembersListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2125
|
+
/**
|
|
2126
|
+
* List of project members
|
|
2127
|
+
*/
|
|
2128
|
+
const zMembersListResponse = z.array(zProjectMemberResponse);
|
|
2129
|
+
const zMembersUpsertBody = zUpsertProjectMember;
|
|
2130
|
+
const zMembersUpsertPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2131
|
+
/**
|
|
2132
|
+
* Member added or updated
|
|
2133
|
+
*/
|
|
2134
|
+
const zMembersUpsertResponse = zProjectMember;
|
|
2135
|
+
const zMembersRemovePath = z.object({
|
|
2136
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2137
|
+
user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
2138
|
+
});
|
|
2139
|
+
/**
|
|
2140
|
+
* Member removed
|
|
2141
|
+
*/
|
|
2142
|
+
const zMembersRemoveResponse = z.void();
|
|
2143
|
+
const zMonitorsListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2144
|
+
/**
|
|
2145
|
+
* Every cron monitor of the project, with its environments and recent check-ins
|
|
2146
|
+
*/
|
|
2147
|
+
const zMonitorsListResponse = z.array(zMonitorResponse);
|
|
2148
|
+
const zMonitorsCreateBody = zCreateMonitor;
|
|
2149
|
+
const zMonitorsCreatePath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2150
|
+
/**
|
|
2151
|
+
* Created
|
|
2152
|
+
*/
|
|
2153
|
+
const zMonitorsCreateResponse = zMonitorResponse;
|
|
2154
|
+
const zMonitorsDeletePath = z.object({
|
|
2155
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2156
|
+
slug: z.string()
|
|
2157
|
+
});
|
|
2158
|
+
/**
|
|
2159
|
+
* Deleted with its check-ins; its issues stay
|
|
2160
|
+
*/
|
|
2161
|
+
const zMonitorsDeleteResponse = z.void();
|
|
2162
|
+
const zMonitorsGetPath = z.object({
|
|
2163
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2164
|
+
slug: z.string()
|
|
2165
|
+
});
|
|
2166
|
+
/**
|
|
2167
|
+
* The monitor
|
|
2168
|
+
*/
|
|
2169
|
+
const zMonitorsGetResponse = zMonitorResponse;
|
|
2170
|
+
const zMonitorsUpdateBody = zUpdateMonitor;
|
|
2171
|
+
const zMonitorsUpdatePath = z.object({
|
|
2172
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2173
|
+
slug: z.string()
|
|
2174
|
+
});
|
|
2175
|
+
/**
|
|
2176
|
+
* Updated
|
|
2177
|
+
*/
|
|
2178
|
+
const zMonitorsUpdateResponse = zMonitorResponse;
|
|
2179
|
+
const zMonitorsListCheckinsPath = z.object({
|
|
2180
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2181
|
+
slug: z.string()
|
|
2182
|
+
});
|
|
2183
|
+
const zMonitorsListCheckinsQuery = z.object({
|
|
2184
|
+
page: z.int().optional(),
|
|
2185
|
+
per_page: z.int().optional(),
|
|
2186
|
+
environment: z.string().nullish()
|
|
2187
|
+
});
|
|
2188
|
+
/**
|
|
2189
|
+
* Offset-based paginated response wrapper
|
|
2190
|
+
*/
|
|
2191
|
+
const zMonitorsListCheckinsResponse = z.object({
|
|
2192
|
+
items: z.array(z.object({
|
|
2193
|
+
date_added: z.iso.datetime({ offset: true }),
|
|
2194
|
+
date_updated: z.iso.datetime({ offset: true }),
|
|
2195
|
+
duration_ms: z.int().nullable(),
|
|
2196
|
+
environment: z.string(),
|
|
2197
|
+
expected_time: z.iso.datetime({ offset: true }).nullable(),
|
|
2198
|
+
id: z.uuid(),
|
|
2199
|
+
status: zCheckInStatus
|
|
2200
|
+
})),
|
|
2201
|
+
page: z.int(),
|
|
2202
|
+
per_page: z.int(),
|
|
2203
|
+
total_count: z.int(),
|
|
2204
|
+
total_pages: z.int()
|
|
2205
|
+
});
|
|
2206
|
+
const zReleasesNewIssuesPath = z.object({
|
|
2207
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2208
|
+
release: z.string()
|
|
2209
|
+
});
|
|
2210
|
+
const zReleasesNewIssuesQuery = z.object({ limit: z.int().optional() });
|
|
2211
|
+
/**
|
|
2212
|
+
* Issues first seen in this release, most recent first
|
|
2213
|
+
*/
|
|
2214
|
+
const zReleasesNewIssuesResponse = z.array(zIssueResponse);
|
|
2215
|
+
const zSessionsGetStatsPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2216
|
+
const zSessionsGetStatsQuery = z.object({
|
|
2217
|
+
period: z.string().nullish(),
|
|
2218
|
+
release: z.string().nullish(),
|
|
2219
|
+
page: z.int().gte(1).optional(),
|
|
2220
|
+
per_page: z.int().gte(1).lte(100).optional()
|
|
2221
|
+
});
|
|
2222
|
+
/**
|
|
2223
|
+
* Offset-based paginated response wrapper
|
|
2224
|
+
*/
|
|
2225
|
+
const zSessionsGetStatsResponse = z.object({
|
|
2226
|
+
items: z.array(z.object({
|
|
2227
|
+
abnormal: z.int(),
|
|
2228
|
+
crash_free_sessions_rate: z.number().nullable(),
|
|
2229
|
+
crash_free_users_rate: z.number().nullable(),
|
|
2230
|
+
crashed: z.int(),
|
|
2231
|
+
environment: z.string(),
|
|
2232
|
+
errored: z.int(),
|
|
2233
|
+
healthy: z.int(),
|
|
2234
|
+
release: z.string(),
|
|
2235
|
+
total: z.int()
|
|
2236
|
+
})),
|
|
2237
|
+
page: z.int(),
|
|
2238
|
+
per_page: z.int(),
|
|
2239
|
+
total_count: z.int(),
|
|
2240
|
+
total_pages: z.int()
|
|
2241
|
+
});
|
|
2242
|
+
const zSessionsGetSummaryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2243
|
+
const zSessionsGetSummaryQuery = z.object({ period: z.string().optional() });
|
|
2244
|
+
/**
|
|
2245
|
+
* Project-wide session health summary
|
|
2246
|
+
*/
|
|
2247
|
+
const zSessionsGetSummaryResponse = zSessionSummary;
|
|
2248
|
+
const zSessionsGetTimeseriesPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2249
|
+
const zSessionsGetTimeseriesQuery = z.object({
|
|
2250
|
+
period: z.string().optional(),
|
|
2251
|
+
interval: z.int().optional()
|
|
2252
|
+
});
|
|
2253
|
+
/**
|
|
2254
|
+
* Time-bucketed session trend, project-wide
|
|
2255
|
+
*/
|
|
2256
|
+
const zSessionsGetTimeseriesResponse = z.array(zSessionTimeseriesPoint);
|
|
2257
|
+
const zSpansListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2258
|
+
const zSpansListQuery = z.object({
|
|
2259
|
+
page: z.int().gte(1).optional(),
|
|
2260
|
+
per_page: z.int().gte(1).lte(100).optional(),
|
|
2261
|
+
op: z.string().nullish(),
|
|
2262
|
+
status: z.string().nullish(),
|
|
2263
|
+
trace_id: z.string().nullish(),
|
|
2264
|
+
operation_type: z.string().nullish()
|
|
2265
|
+
});
|
|
2266
|
+
/**
|
|
2267
|
+
* Offset-based paginated response wrapper
|
|
2268
|
+
*/
|
|
2269
|
+
const zSpansListResponse = z.object({
|
|
2270
|
+
items: z.array(z.object({
|
|
2271
|
+
description: z.string().nullable(),
|
|
2272
|
+
duration_ms: z.number().nullable(),
|
|
2273
|
+
environment: z.string().nullable(),
|
|
2274
|
+
exclusive_time_ms: z.number().nullable(),
|
|
2275
|
+
gen_ai_agent_name: z.string().nullable(),
|
|
2276
|
+
gen_ai_conversation_id: z.string().nullable(),
|
|
2277
|
+
gen_ai_operation_type: z.string().nullable(),
|
|
2278
|
+
gen_ai_request_model: z.string().nullable(),
|
|
2279
|
+
gen_ai_response_model: z.string().nullable(),
|
|
2280
|
+
gen_ai_tool_name: z.string().nullable(),
|
|
2281
|
+
gen_ai_usage_input_tokens: z.number().nullable(),
|
|
2282
|
+
gen_ai_usage_output_tokens: z.number().nullable(),
|
|
2283
|
+
gen_ai_usage_total_tokens: z.number().nullable(),
|
|
2284
|
+
id: z.uuid(),
|
|
2285
|
+
is_segment: z.boolean(),
|
|
2286
|
+
op: z.string().nullable(),
|
|
2287
|
+
parent_span_id: z.string().nullable(),
|
|
2288
|
+
platform: z.string().nullable(),
|
|
2289
|
+
release: z.string().nullable(),
|
|
2290
|
+
segment_id: z.string().nullable(),
|
|
2291
|
+
span_id: z.string().nullable(),
|
|
2292
|
+
start_timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
2293
|
+
status: z.string().nullable(),
|
|
2294
|
+
timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
2295
|
+
trace_id: z.string().nullable(),
|
|
2296
|
+
transaction_id: z.uuid().nullable()
|
|
2297
|
+
})),
|
|
2298
|
+
page: z.int(),
|
|
2299
|
+
per_page: z.int(),
|
|
2300
|
+
total_count: z.int(),
|
|
2301
|
+
total_pages: z.int()
|
|
2302
|
+
});
|
|
2303
|
+
const zSpansGetPath = z.object({
|
|
2304
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2305
|
+
span_id: z.uuid()
|
|
2306
|
+
});
|
|
2307
|
+
/**
|
|
2308
|
+
* Span with its full attribute bag
|
|
2309
|
+
*/
|
|
2310
|
+
const zSpansGetResponse = zSpanDetailResponse;
|
|
2311
|
+
const zStatsGetSummaryPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2312
|
+
const zStatsGetSummaryQuery = z.object({ period: z.string().optional() });
|
|
2313
|
+
/**
|
|
2314
|
+
* Project counters with previous-period comparison
|
|
2315
|
+
*/
|
|
2316
|
+
const zStatsGetSummaryResponse = zProjectStatsSummary;
|
|
2317
|
+
const zTransactionsListPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2318
|
+
const zTransactionsListQuery = z.object({
|
|
2319
|
+
page: z.int().gte(1).optional(),
|
|
2320
|
+
per_page: z.int().gte(1).lte(100).optional(),
|
|
2321
|
+
name: z.string().nullish(),
|
|
2322
|
+
op: z.string().nullish(),
|
|
2323
|
+
status: z.string().nullish(),
|
|
2324
|
+
environment: z.string().nullish(),
|
|
2325
|
+
release: z.string().nullish()
|
|
2326
|
+
});
|
|
2327
|
+
/**
|
|
2328
|
+
* Offset-based paginated response wrapper
|
|
2329
|
+
*/
|
|
2330
|
+
const zTransactionsListResponse = z.object({
|
|
2331
|
+
items: z.array(z.object({
|
|
2332
|
+
duration_ms: z.number().nullable(),
|
|
2333
|
+
environment: z.string(),
|
|
2334
|
+
event_id: z.string(),
|
|
2335
|
+
id: z.uuid(),
|
|
2336
|
+
ingested_at: z.iso.datetime({ offset: true }),
|
|
2337
|
+
platform: z.string(),
|
|
2338
|
+
release: z.string(),
|
|
2339
|
+
start_timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
2340
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
2341
|
+
transaction_name: z.string()
|
|
2342
|
+
})),
|
|
2343
|
+
page: z.int(),
|
|
2344
|
+
per_page: z.int(),
|
|
2345
|
+
total_count: z.int(),
|
|
2346
|
+
total_pages: z.int()
|
|
2347
|
+
});
|
|
2348
|
+
const zTransactionsGetStatsPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2349
|
+
const zTransactionsGetStatsQuery = z.object({
|
|
2350
|
+
page: z.int().gte(1).optional(),
|
|
2351
|
+
per_page: z.int().gte(1).lte(100).optional()
|
|
2352
|
+
});
|
|
2353
|
+
/**
|
|
2354
|
+
* Offset-based paginated response wrapper
|
|
2355
|
+
*/
|
|
2356
|
+
const zTransactionsGetStatsResponse = z.object({
|
|
2357
|
+
items: z.array(z.object({
|
|
2358
|
+
count: z.int(),
|
|
2359
|
+
failure_rate: z.number(),
|
|
2360
|
+
op: z.string().nullable(),
|
|
2361
|
+
p50_ms: z.number(),
|
|
2362
|
+
p95_ms: z.number(),
|
|
2363
|
+
p99_ms: z.number(),
|
|
2364
|
+
transaction_name: z.string()
|
|
2365
|
+
})),
|
|
2366
|
+
page: z.int(),
|
|
2367
|
+
per_page: z.int(),
|
|
2368
|
+
total_count: z.int(),
|
|
2369
|
+
total_pages: z.int()
|
|
2370
|
+
});
|
|
2371
|
+
const zTransactionsGetStatGroupPath = z.object({ project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2372
|
+
const zTransactionsGetStatGroupQuery = z.object({
|
|
2373
|
+
name: z.string(),
|
|
2374
|
+
op: z.string().nullish()
|
|
2375
|
+
});
|
|
2376
|
+
/**
|
|
2377
|
+
* Aggregate stats for one (transaction, op) group
|
|
2378
|
+
*/
|
|
2379
|
+
const zTransactionsGetStatGroupResponse = zTransactionStatsResponse;
|
|
2380
|
+
const zTransactionsGetPath = z.object({
|
|
2381
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2382
|
+
transaction_id: z.uuid()
|
|
2383
|
+
});
|
|
2384
|
+
/**
|
|
2385
|
+
* Full transaction detail
|
|
2386
|
+
*/
|
|
2387
|
+
const zTransactionsGetResponse = zTransactionDetailResponse;
|
|
2388
|
+
const zTransactionsGetSpansPath = z.object({
|
|
2389
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2390
|
+
transaction_id: z.uuid()
|
|
2391
|
+
});
|
|
2392
|
+
/**
|
|
2393
|
+
* Indexed spans for the transaction (waterfall order)
|
|
2394
|
+
*/
|
|
2395
|
+
const zTransactionsGetSpansResponse = z.array(z.object({
|
|
2396
|
+
description: z.string().nullable(),
|
|
2397
|
+
duration_ms: z.number().nullable(),
|
|
2398
|
+
environment: z.string().nullable(),
|
|
2399
|
+
exclusive_time_ms: z.number().nullable(),
|
|
2400
|
+
gen_ai_agent_name: z.string().nullable(),
|
|
2401
|
+
gen_ai_conversation_id: z.string().nullable(),
|
|
2402
|
+
gen_ai_operation_type: z.string().nullable(),
|
|
2403
|
+
gen_ai_request_model: z.string().nullable(),
|
|
2404
|
+
gen_ai_response_model: z.string().nullable(),
|
|
2405
|
+
gen_ai_tool_name: z.string().nullable(),
|
|
2406
|
+
gen_ai_usage_input_tokens: z.number().nullable(),
|
|
2407
|
+
gen_ai_usage_output_tokens: z.number().nullable(),
|
|
2408
|
+
gen_ai_usage_total_tokens: z.number().nullable(),
|
|
2409
|
+
id: z.uuid(),
|
|
2410
|
+
is_segment: z.boolean(),
|
|
2411
|
+
op: z.string().nullable(),
|
|
2412
|
+
parent_span_id: z.string().nullable(),
|
|
2413
|
+
platform: z.string().nullable(),
|
|
2414
|
+
release: z.string().nullable(),
|
|
2415
|
+
segment_id: z.string().nullable(),
|
|
2416
|
+
span_id: z.string().nullable(),
|
|
2417
|
+
start_timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
2418
|
+
status: z.string().nullable(),
|
|
2419
|
+
timestamp: z.iso.datetime({ offset: true }).nullable(),
|
|
2420
|
+
trace_id: z.string().nullable(),
|
|
2421
|
+
transaction_id: z.uuid().nullable()
|
|
2422
|
+
}));
|
|
2423
|
+
/**
|
|
2424
|
+
* The server's per-project limits
|
|
2425
|
+
*/
|
|
2426
|
+
const zProjectsGetRateLimitsResponse = zRateLimitsResponse;
|
|
2427
|
+
const zSchedulesPreviewBody = zPreviewSchedule;
|
|
2428
|
+
/**
|
|
2429
|
+
* The next five runs
|
|
2430
|
+
*/
|
|
2431
|
+
const zSchedulesPreviewResponse = zSchedulePreview;
|
|
2432
|
+
/**
|
|
2433
|
+
* Whether the MCP endpoint is on, and its URL
|
|
2434
|
+
*/
|
|
2435
|
+
const zSettingsGetMcpResponse = zMcpStatus;
|
|
2436
|
+
const zSettingsUpdateMcpBody = zMcpSettings;
|
|
2437
|
+
/**
|
|
2438
|
+
* The MCP endpoint's new state, and its URL
|
|
2439
|
+
*/
|
|
2440
|
+
const zSettingsUpdateMcpResponse = zMcpStatus;
|
|
2441
|
+
/**
|
|
2442
|
+
* How long ago each project's data arrived, per kind
|
|
2443
|
+
*/
|
|
2444
|
+
const zStorageGetAgeResponse = zStorageAge;
|
|
2445
|
+
const zStorageExecuteCleanupBody = zCleanupRequest;
|
|
2446
|
+
/**
|
|
2447
|
+
* Cleanup started in the background; poll its status
|
|
2448
|
+
*/
|
|
2449
|
+
const zStorageExecuteCleanupResponse = zCleanupStatus;
|
|
2450
|
+
const zStoragePreviewCleanupBody = zCleanupRequest;
|
|
2451
|
+
/**
|
|
2452
|
+
* Dry-run: rows a cleanup would remove
|
|
2453
|
+
*/
|
|
2454
|
+
const zStoragePreviewCleanupResponse = zCleanupCounts;
|
|
2455
|
+
/**
|
|
2456
|
+
* The current or last cleanup and the rows it removed
|
|
2457
|
+
*/
|
|
2458
|
+
const zStorageGetCleanupStatusResponse = zCleanupStatus;
|
|
2459
|
+
/**
|
|
2460
|
+
* Per-project storage breakdown
|
|
2461
|
+
*/
|
|
2462
|
+
const zStorageGetProjectsResponse = z.array(z.object({
|
|
2463
|
+
estimated_bytes: z.int(),
|
|
2464
|
+
events_bytes: z.int(),
|
|
2465
|
+
events_count: z.int(),
|
|
2466
|
+
logs_bytes: z.int(),
|
|
2467
|
+
logs_count: z.int(),
|
|
2468
|
+
project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2469
|
+
project_name: z.string(),
|
|
2470
|
+
source_maps_count: z.int(),
|
|
2471
|
+
spans_count: z.int(),
|
|
2472
|
+
transactions_bytes: z.int(),
|
|
2473
|
+
transactions_count: z.int()
|
|
2474
|
+
}));
|
|
2475
|
+
/**
|
|
2476
|
+
* Retention settings, next cleanup and last cleanup
|
|
2477
|
+
*/
|
|
2478
|
+
const zStorageGetRetentionResponse = zRetentionResponse;
|
|
2479
|
+
const zStorageUpdateRetentionBody = zRetentionSettings;
|
|
2480
|
+
/**
|
|
2481
|
+
* Saved; the new schedule applies within a minute
|
|
2482
|
+
*/
|
|
2483
|
+
const zStorageUpdateRetentionResponse = zRetentionResponse;
|
|
2484
|
+
const zStoragePreviewRetentionBody = zRetentionSettings;
|
|
2485
|
+
/**
|
|
2486
|
+
* Dry-run: rows enforcing these settings now would remove
|
|
2487
|
+
*/
|
|
2488
|
+
const zStoragePreviewRetentionResponse = zCleanupCounts;
|
|
2489
|
+
/**
|
|
2490
|
+
* Cleanup started in the background; poll its status
|
|
2491
|
+
*/
|
|
2492
|
+
const zStorageRunRetentionResponse = zCleanupStatus;
|
|
2493
|
+
/**
|
|
2494
|
+
* Orphaned source maps removed
|
|
2495
|
+
*/
|
|
2496
|
+
const zStorageGcSourceMapsResponse = zSourceMapGcResult;
|
|
2497
|
+
/**
|
|
2498
|
+
* Dry-run: orphaned source maps a GC would remove
|
|
2499
|
+
*/
|
|
2500
|
+
const zStoragePreviewSourceMapGcResponse = zSourceMapGcResult;
|
|
2501
|
+
/**
|
|
2502
|
+
* Instance-wide storage summary
|
|
2503
|
+
*/
|
|
2504
|
+
const zStorageGetSummaryResponse = zStorageSummary;
|
|
2505
|
+
/**
|
|
2506
|
+
* List of team members
|
|
2507
|
+
*/
|
|
2508
|
+
const zTeamListResponse = z.array(zTeamMemberResponse);
|
|
2509
|
+
const zTeamDeleteUserPath = z.object({ user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2510
|
+
/**
|
|
2511
|
+
* User deleted
|
|
2512
|
+
*/
|
|
2513
|
+
const zTeamDeleteUserResponse = z.void();
|
|
2514
|
+
const zTeamUpdateRoleBody = zUpdateUserRole;
|
|
2515
|
+
const zTeamUpdateRolePath = z.object({ user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2516
|
+
/**
|
|
2517
|
+
* Role updated
|
|
2518
|
+
*/
|
|
2519
|
+
const zTeamUpdateRoleResponse = z.void();
|
|
2520
|
+
/**
|
|
2521
|
+
* What the next heartbeat would carry
|
|
2522
|
+
*/
|
|
2523
|
+
const zTelemetryPreviewResponse = zTelemetryPreview;
|
|
2524
|
+
/**
|
|
2525
|
+
* List of tokens (masked)
|
|
2526
|
+
*/
|
|
2527
|
+
const zTokensListResponse = z.array(zAuthTokenResponse);
|
|
2528
|
+
const zTokensCreateBody = zCreateAuthToken;
|
|
2529
|
+
/**
|
|
2530
|
+
* Token created (full token shown once)
|
|
2531
|
+
*/
|
|
2532
|
+
const zTokensCreateResponse = zAuthTokenCreatedResponse;
|
|
2533
|
+
const zTokensDeletePath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2534
|
+
/**
|
|
2535
|
+
* Token revoked
|
|
2536
|
+
*/
|
|
2537
|
+
const zTokensDeleteResponse = z.void();
|
|
2538
|
+
const zTokensGetPath = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
2539
|
+
/**
|
|
2540
|
+
* Token details (full token value)
|
|
2541
|
+
*/
|
|
2542
|
+
const zTokensGetResponse = zAuthTokenCreatedResponse;
|
|
2543
|
+
const zAuthAcceptInvitationBody = zAcceptInvitation;
|
|
2544
|
+
/**
|
|
2545
|
+
* Invitation accepted, user created and logged in
|
|
2546
|
+
*/
|
|
2547
|
+
const zAuthAcceptInvitationResponse = zAuthResponse;
|
|
2548
|
+
const zAuthGetInvitationPath = z.object({ token: z.string() });
|
|
2549
|
+
/**
|
|
2550
|
+
* Invitation info
|
|
2551
|
+
*/
|
|
2552
|
+
const zAuthGetInvitationResponse = zInvitationInfoResponse;
|
|
2553
|
+
const zAuthLoginBody = zLoginRequest;
|
|
2554
|
+
/**
|
|
2555
|
+
* Logged in
|
|
2556
|
+
*/
|
|
2557
|
+
const zAuthLoginResponse = zAuthResponse;
|
|
2558
|
+
/**
|
|
2559
|
+
* Logged out
|
|
2560
|
+
*/
|
|
2561
|
+
const zAuthLogoutResponse = z.void();
|
|
2562
|
+
/**
|
|
2563
|
+
* Current user
|
|
2564
|
+
*/
|
|
2565
|
+
const zAuthGetCurrentUserResponse = zUserResponse;
|
|
2566
|
+
const zAuthUpdateCurrentUserBody = zUpdatePreferencesRequest;
|
|
2567
|
+
/**
|
|
2568
|
+
* Updated user
|
|
2569
|
+
*/
|
|
2570
|
+
const zAuthUpdateCurrentUserResponse = zUserResponse;
|
|
2571
|
+
const zAuthChangePasswordBody = zChangePasswordRequest;
|
|
2572
|
+
/**
|
|
2573
|
+
* Password changed
|
|
2574
|
+
*/
|
|
2575
|
+
const zAuthChangePasswordResponse = z.void();
|
|
2576
|
+
const zAuthRegisterBody = zCreateUserRequest;
|
|
2577
|
+
const zAuthSsoCallbackQuery = z.object({
|
|
2578
|
+
code: z.string().nullish(),
|
|
2579
|
+
state: z.string().nullish(),
|
|
2580
|
+
error: z.string().nullish()
|
|
2581
|
+
});
|
|
2582
|
+
/**
|
|
2583
|
+
* SSO login completed
|
|
2584
|
+
*/
|
|
2585
|
+
const zAuthSsoCallbackResponse = zAuthResponse;
|
|
2586
|
+
/**
|
|
2587
|
+
* Public SSO configuration
|
|
2588
|
+
*/
|
|
2589
|
+
const zAuthSsoConfigResponse = zSsoConfigResponse;
|
|
2590
|
+
/**
|
|
2591
|
+
* The account waiting for its password
|
|
2592
|
+
*/
|
|
2593
|
+
const zAuthSsoLinkResponse = zSsoLinkResponse;
|
|
2594
|
+
const zAuthConfirmSsoLinkBody = zConfirmSsoLinkRequest;
|
|
2595
|
+
/**
|
|
2596
|
+
* Identity linked and signed in
|
|
2597
|
+
*/
|
|
2598
|
+
const zAuthConfirmSsoLinkResponse = zAuthResponse;
|
|
2599
|
+
/**
|
|
2600
|
+
* OIDC authorization URL
|
|
2601
|
+
*/
|
|
2602
|
+
const zAuthSsoStartResponse = zSsoStartResponse;
|
|
2603
|
+
/**
|
|
2604
|
+
* Server is alive
|
|
2605
|
+
*/
|
|
2606
|
+
const zHealthLivenessResponse = zLivenessResponse;
|
|
2607
|
+
/**
|
|
2608
|
+
* Service is ready
|
|
2609
|
+
*/
|
|
2610
|
+
const zHealthReadinessResponse = zReadinessResponse;
|
|
2611
|
+
/**
|
|
2612
|
+
* Server version info
|
|
2613
|
+
*/
|
|
2614
|
+
const zHealthVersionResponse = zVersionResponse;
|
|
2615
|
+
//#endregion
|
|
2616
|
+
export { zAcceptInvitation, zActivityEntry, zAgentDurationPoint, zAgentModelRow, zAgentSummary, zAgentTimeseriesPoint, zAgentToolRow, zAgentsDurationPath, zAgentsDurationQuery, zAgentsDurationResponse, zAgentsEnvironmentsPath, zAgentsEnvironmentsResponse, zAgentsModelsCallsPath, zAgentsModelsCallsQuery, zAgentsModelsCallsResponse, zAgentsModelsTablePath, zAgentsModelsTableQuery, zAgentsModelsTableResponse, zAgentsModelsTokensPath, zAgentsModelsTokensQuery, zAgentsModelsTokensResponse, zAgentsRunsPath, zAgentsRunsQuery, zAgentsRunsResponse, zAgentsSummaryPath, zAgentsSummaryQuery, zAgentsSummaryResponse, zAgentsToolsPath, zAgentsToolsQuery, zAgentsToolsResponse, zAgentsToolsTablePath, zAgentsToolsTableQuery, zAgentsToolsTableResponse, zAgentsTracesPath, zAgentsTracesQuery, zAgentsTracesResponse, zAlertChannelsCreateBody, zAlertChannelsCreateResponse, zAlertChannelsDeletePath, zAlertChannelsDeleteResponse, zAlertChannelsGetPath, zAlertChannelsGetResponse, zAlertChannelsListResponse, zAlertChannelsPreviewTemplateBody, zAlertChannelsPreviewTemplateResponse, zAlertChannelsTestBody, zAlertChannelsTestPath, zAlertChannelsTestResponse, zAlertChannelsUpdateBody, zAlertChannelsUpdatePath, zAlertChannelsUpdateResponse, zAlertHistory, zAlertIntegration, zAlertRuleChannelInput, zAlertRuleResponse, zAlertRulesCreateBody, zAlertRulesCreatePath, zAlertRulesCreateResponse, zAlertRulesDeletePath, zAlertRulesDeleteResponse, zAlertRulesGetPath, zAlertRulesGetResponse, zAlertRulesListHistoryPath, zAlertRulesListHistoryQuery, zAlertRulesListHistoryResponse, zAlertRulesListPath, zAlertRulesListResponse, zAlertRulesUpdateBody, zAlertRulesUpdatePath, zAlertRulesUpdateResponse, zAlertStatus, zAlertType, zAssembleBody, zAssembleResponse, zAuthAcceptInvitationBody, zAuthAcceptInvitationResponse, zAuthChangePasswordBody, zAuthChangePasswordResponse, zAuthConfirmSsoLinkBody, zAuthConfirmSsoLinkResponse, zAuthGetCurrentUserResponse, zAuthGetInvitationPath, zAuthGetInvitationResponse, zAuthLoginBody, zAuthLoginResponse, zAuthLogoutResponse, zAuthRegisterBody, zAuthResponse, zAuthSsoCallbackQuery, zAuthSsoCallbackResponse, zAuthSsoConfigResponse, zAuthSsoLinkResponse, zAuthSsoStartResponse, zAuthTokenCreatedResponse, zAuthTokenResponse, zAuthUpdateCurrentUserBody, zAuthUpdateCurrentUserResponse, zAuthorizationDecision, zAuthorizationInfo, zAuthorizationRedirect, zAuthorizationRequest, zBookmarkResponse, zBulkDeleteIssues, zBulkDeleteResponse, zBulkUpdateIssues, zBulkUpdateResponse, zChangePasswordRequest, zCheckInResponse, zCheckInStatus, zChunkUploadBody, zChunkUploadOptions, zCleanupCounts, zCleanupFrequency, zCleanupRequest, zCleanupState, zCleanupStatus, zCodeMapping, zCommentRequest, zConfirmSsoLinkRequest, zCreateAlertIntegration, zCreateAlertRule, zCreateAuthToken, zCreateGitHubIssue, zCreateInvitation, zCreateMonitor, zCreateProject, zCreateRelease, zCreateUserRequest, zErrorDetail, zEventDetailResponse, zEventTimeseriesPoint, zEventsGetBySentryIdPath, zEventsGetBySentryIdResponse, zEventsGetPath, zEventsGetResponse, zEventsListPath, zEventsListQuery, zEventsListResponse, zFieldError, zFieldErrorCode, zGenAiBreakdownRow, zGitHubAppInfo, zGitHubInstallation, zGitHubLogin, zGitHubRepository, zGitHubStatus, zGithubCallbackQuery, zGithubCreateIssueBody, zGithubCreateIssuePath, zGithubCreateIssueResponse, zGithubDeleteProjectRepositoryPath, zGithubDeleteProjectRepositoryResponse, zGithubDisconnectResponse, zGithubGetMyLoginResponse, zGithubGetProjectRepositoryPath, zGithubGetProjectRepositoryResponse, zGithubInstalledQuery, zGithubIssuePath, zGithubIssueResponse, zGithubLinkIssueBody, zGithubLinkIssuePath, zGithubLinkIssueResponse, zGithubManifestBody, zGithubManifestResponse, zGithubPutMyLoginBody, zGithubPutMyLoginResponse, zGithubPutProjectRepositoryBody, zGithubPutProjectRepositoryPath, zGithubPutProjectRepositoryResponse, zGithubRepositoriesQuery, zGithubRepositoriesResponse, zGithubStatusResponse, zGithubSyncCodeownersPath, zGithubSyncCodeownersResponse, zGithubUnlinkIssuePath, zGithubUnlinkIssueResponse, zGithubWebhookBody, zGithubWebhookResponse, zGrouping, zHealthLivenessResponse, zHealthReadinessResponse, zHealthVersionResponse, zIntervalUnit, zInvitationInfoResponse, zInvitationResponse, zInvitationsCreateBody, zInvitationsCreateResponse, zInvitationsListResponse, zInvitationsRevokePath, zInvitationsRevokeResponse, zIssueAggregates, zIssueFilter, zIssueGitHub, zIssueLink, zIssuePriority, zIssueResponse, zIssueSort, zIssueStatsResponse, zIssueStatsWindow, zIssueStatus, zIssueStatusUpdate, zIssueTagValue, zIssuesBulkDeleteBody, zIssuesBulkDeletePath, zIssuesBulkDeleteResponse, zIssuesBulkUpdateBody, zIssuesBulkUpdatePath, zIssuesBulkUpdateResponse, zIssuesCreateCommentBody, zIssuesCreateCommentPath, zIssuesCreateCommentResponse, zIssuesCreateUserReportBody, zIssuesCreateUserReportPath, zIssuesCreateUserReportResponse, zIssuesDeletePath, zIssuesDeleteResponse, zIssuesGetActivityPath, zIssuesGetActivityResponse, zIssuesGetAggregatesPath, zIssuesGetAggregatesResponse, zIssuesGetHashesPath, zIssuesGetHashesResponse, zIssuesGetPath, zIssuesGetResponse, zIssuesGetStatsPath, zIssuesGetStatsQuery, zIssuesGetStatsResponse, zIssuesGetTagValuesPath, zIssuesGetTagValuesResponse, zIssuesListPath, zIssuesListQuery, zIssuesListResponse, zIssuesListUserReportsPath, zIssuesListUserReportsResponse, zIssuesMarkSeenPath, zIssuesMarkSeenResponse, zIssuesSetBookmarkBody, zIssuesSetBookmarkPath, zIssuesSetBookmarkResponse, zIssuesSetSubscriptionBody, zIssuesSetSubscriptionPath, zIssuesSetSubscriptionResponse, zIssuesUpdateBody, zIssuesUpdatePath, zIssuesUpdateResponse, zKindAge, zLinkGitHubIssue, zLivenessResponse, zLoginRequest, zLogsListPath, zLogsListQuery, zLogsListResponse, zManifestRequest, zManifestResponse, zMcpSettings, zMcpStatus, zMembersListPath, zMembersListResponse, zMembersRemovePath, zMembersRemoveResponse, zMembersUpsertBody, zMembersUpsertPath, zMembersUpsertResponse, zMetricDelta, zMonitorConfig, zMonitorConfigInput, zMonitorEnvironmentResponse, zMonitorEnvironmentStatus, zMonitorResponse, zMonitorsCreateBody, zMonitorsCreatePath, zMonitorsCreateResponse, zMonitorsDeletePath, zMonitorsDeleteResponse, zMonitorsGetPath, zMonitorsGetResponse, zMonitorsListCheckinsPath, zMonitorsListCheckinsQuery, zMonitorsListCheckinsResponse, zMonitorsListPath, zMonitorsListResponse, zMonitorsUpdateBody, zMonitorsUpdatePath, zMonitorsUpdateResponse, zOAuthGrant, zOauthDecideAuthorizationBody, zOauthDecideAuthorizationResponse, zOauthGetAuthorizationQuery, zOauthGetAuthorizationResponse, zOauthListGrantsResponse, zOauthRevokeGrantPath, zOauthRevokeGrantResponse, zOrgDetails, zPreviewSchedule, zPreviewTemplateBody, zPreviewTemplateResponse, zProjectAge, zProjectListStats, zProjectMember, zProjectMemberResponse, zProjectRepository, zProjectResponse, zProjectRetention, zProjectRole, zProjectStatsSummary, zProjectsCreateBody, zProjectsCreateResponse, zProjectsDeletePath, zProjectsDeleteResponse, zProjectsGetPath, zProjectsGetRateLimitsResponse, zProjectsGetResponse, zProjectsListQuery, zProjectsListResponse, zProjectsUpdateBody, zProjectsUpdatePath, zProjectsUpdateResponse, zProviderType, zRateLimitsResponse, zReadinessChecks, zReadinessResponse, zReleaseResponse, zReleasesCreateBody, zReleasesCreatePath, zReleasesCreateResponse, zReleasesFinalizeBody, zReleasesFinalizePath, zReleasesFinalizeResponse, zReleasesNewIssuesPath, zReleasesNewIssuesQuery, zReleasesNewIssuesResponse, zRepoCommit, zRetentionResponse, zRetentionRun, zRetentionSettings, zRetentionWindows, zSchedule, zSchedulePreview, zSchedulesPreviewBody, zSchedulesPreviewResponse, zSeenResponse, zSessionSummary, zSessionTimeseriesPoint, zSessionsGetStatsPath, zSessionsGetStatsQuery, zSessionsGetStatsResponse, zSessionsGetSummaryPath, zSessionsGetSummaryQuery, zSessionsGetSummaryResponse, zSessionsGetTimeseriesPath, zSessionsGetTimeseriesQuery, zSessionsGetTimeseriesResponse, zSettingsGetMcpResponse, zSettingsUpdateMcpBody, zSettingsUpdateMcpResponse, zSortOrder, zSourceMapFile, zSourceMapGcResult, zSourceMapList, zSourceMapStorage, zSourceMapsArtifactBundleAssembleBody, zSourceMapsArtifactBundleAssemblePath, zSourceMapsArtifactBundleAssembleResponse, zSourceMapsChunkUploadBody, zSourceMapsChunkUploadCapabilityPath, zSourceMapsChunkUploadCapabilityResponse, zSourceMapsChunkUploadPath, zSourceMapsListPath, zSourceMapsListResponse, zSourceMapsOrgDetailsPath, zSourceMapsOrgDetailsResponse, zSpanDetailResponse, zSpanResponse, zSpansGetPath, zSpansGetResponse, zSpansListPath, zSpansListQuery, zSpansListResponse, zSsoConfigResponse, zSsoLinkResponse, zSsoStartResponse, zStatsGetEventTimeseriesPath, zStatsGetEventTimeseriesQuery, zStatsGetEventTimeseriesResponse, zStatsGetSummaryPath, zStatsGetSummaryQuery, zStatsGetSummaryResponse, zStorageAge, zStorageExecuteCleanupBody, zStorageExecuteCleanupResponse, zStorageGcSourceMapsResponse, zStorageGetAgeResponse, zStorageGetCleanupStatusResponse, zStorageGetProjectsResponse, zStorageGetRetentionResponse, zStorageGetSummaryResponse, zStoragePreviewCleanupBody, zStoragePreviewCleanupResponse, zStoragePreviewRetentionBody, zStoragePreviewRetentionResponse, zStoragePreviewSourceMapGcResponse, zStorageRunRetentionResponse, zStorageSummary, zStorageUpdateRetentionBody, zStorageUpdateRetentionResponse, zSubscriptionResponse, zTagSummary, zTagValueCount, zTeamDeleteUserPath, zTeamDeleteUserResponse, zTeamListResponse, zTeamMemberResponse, zTeamUpdateRoleBody, zTeamUpdateRolePath, zTeamUpdateRoleResponse, zTelemetryPreview, zTelemetryPreviewResponse, zTestChannelResponse, zTestIntegrationBody, zToggleRequest, zTokensCreateBody, zTokensCreateResponse, zTokensDeletePath, zTokensDeleteResponse, zTokensGetPath, zTokensGetResponse, zTokensListResponse, zTransactionDetailResponse, zTransactionStatsResponse, zTransactionsGetPath, zTransactionsGetResponse, zTransactionsGetSpansPath, zTransactionsGetSpansResponse, zTransactionsGetStatGroupPath, zTransactionsGetStatGroupQuery, zTransactionsGetStatGroupResponse, zTransactionsGetStatsPath, zTransactionsGetStatsQuery, zTransactionsGetStatsResponse, zTransactionsListPath, zTransactionsListQuery, zTransactionsListResponse, zUpdateAlertIntegration, zUpdateAlertRule, zUpdateIssueState, zUpdateMonitor, zUpdatePreferencesRequest, zUpdateProject, zUpdateProjectRepository, zUpdateRelease, zUpdateUserRole, zUpsertProjectMember, zUserReport, zUserReportRequest, zUserResponse, zUserRole, zVersionResponse };
|
|
2617
|
+
|
|
2618
|
+
//# sourceMappingURL=zod.gen.mjs.map
|