@rustrak/client 0.18.1 → 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.
Files changed (119) hide show
  1. package/README.md +312 -123
  2. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  3. package/dist/client.cjs +86 -0
  4. package/dist/client.cjs.map +1 -0
  5. package/dist/client.d.cts +18 -0
  6. package/dist/client.d.cts.map +1 -0
  7. package/dist/client.d.mts +18 -0
  8. package/dist/client.d.mts.map +1 -0
  9. package/dist/client.mjs +86 -0
  10. package/dist/client.mjs.map +1 -0
  11. package/dist/config.d.cts +10 -0
  12. package/dist/config.d.cts.map +1 -0
  13. package/dist/config.d.mts +10 -0
  14. package/dist/config.d.mts.map +1 -0
  15. package/dist/errors.cjs +52 -0
  16. package/dist/errors.cjs.map +1 -0
  17. package/dist/errors.d.cts +77 -0
  18. package/dist/errors.d.cts.map +1 -0
  19. package/dist/errors.d.mts +77 -0
  20. package/dist/errors.d.mts.map +1 -0
  21. package/dist/errors.mjs +48 -0
  22. package/dist/errors.mjs.map +1 -0
  23. package/dist/generated/client/client.gen.cjs +174 -0
  24. package/dist/generated/client/client.gen.cjs.map +1 -0
  25. package/dist/generated/client/client.gen.mjs +174 -0
  26. package/dist/generated/client/client.gen.mjs.map +1 -0
  27. package/dist/generated/client/types.gen.d.cts +71 -0
  28. package/dist/generated/client/types.gen.d.cts.map +1 -0
  29. package/dist/generated/client/types.gen.d.mts +71 -0
  30. package/dist/generated/client/types.gen.d.mts.map +1 -0
  31. package/dist/generated/client/utils.gen.cjs +184 -0
  32. package/dist/generated/client/utils.gen.cjs.map +1 -0
  33. package/dist/generated/client/utils.gen.d.cts +21 -0
  34. package/dist/generated/client/utils.gen.d.cts.map +1 -0
  35. package/dist/generated/client/utils.gen.d.mts +21 -0
  36. package/dist/generated/client/utils.gen.d.mts.map +1 -0
  37. package/dist/generated/client/utils.gen.mjs +177 -0
  38. package/dist/generated/client/utils.gen.mjs.map +1 -0
  39. package/dist/generated/client.gen.cjs +7 -0
  40. package/dist/generated/client.gen.cjs.map +1 -0
  41. package/dist/generated/client.gen.mjs +8 -0
  42. package/dist/generated/client.gen.mjs.map +1 -0
  43. package/dist/generated/core/auth.gen.cjs +12 -0
  44. package/dist/generated/core/auth.gen.cjs.map +1 -0
  45. package/dist/generated/core/auth.gen.d.cts +11 -0
  46. package/dist/generated/core/auth.gen.d.cts.map +1 -0
  47. package/dist/generated/core/auth.gen.d.mts +11 -0
  48. package/dist/generated/core/auth.gen.d.mts.map +1 -0
  49. package/dist/generated/core/auth.gen.mjs +12 -0
  50. package/dist/generated/core/auth.gen.mjs.map +1 -0
  51. package/dist/generated/core/bodySerializer.gen.cjs +21 -0
  52. package/dist/generated/core/bodySerializer.gen.cjs.map +1 -0
  53. package/dist/generated/core/bodySerializer.gen.d.cts +15 -0
  54. package/dist/generated/core/bodySerializer.gen.d.cts.map +1 -0
  55. package/dist/generated/core/bodySerializer.gen.d.mts +15 -0
  56. package/dist/generated/core/bodySerializer.gen.d.mts.map +1 -0
  57. package/dist/generated/core/bodySerializer.gen.mjs +20 -0
  58. package/dist/generated/core/bodySerializer.gen.mjs.map +1 -0
  59. package/dist/generated/core/pathSerializer.gen.cjs +87 -0
  60. package/dist/generated/core/pathSerializer.gen.cjs.map +1 -0
  61. package/dist/generated/core/pathSerializer.gen.d.cts +9 -0
  62. package/dist/generated/core/pathSerializer.gen.d.cts.map +1 -0
  63. package/dist/generated/core/pathSerializer.gen.d.mts +9 -0
  64. package/dist/generated/core/pathSerializer.gen.d.mts.map +1 -0
  65. package/dist/generated/core/pathSerializer.gen.mjs +82 -0
  66. package/dist/generated/core/pathSerializer.gen.mjs.map +1 -0
  67. package/dist/generated/core/serverSentEvents.gen.cjs +96 -0
  68. package/dist/generated/core/serverSentEvents.gen.cjs.map +1 -0
  69. package/dist/generated/core/serverSentEvents.gen.d.cts +25 -0
  70. package/dist/generated/core/serverSentEvents.gen.d.cts.map +1 -0
  71. package/dist/generated/core/serverSentEvents.gen.d.mts +25 -0
  72. package/dist/generated/core/serverSentEvents.gen.d.mts.map +1 -0
  73. package/dist/generated/core/serverSentEvents.gen.mjs +96 -0
  74. package/dist/generated/core/serverSentEvents.gen.mjs.map +1 -0
  75. package/dist/generated/core/types.gen.d.cts +27 -0
  76. package/dist/generated/core/types.gen.d.cts.map +1 -0
  77. package/dist/generated/core/types.gen.d.mts +27 -0
  78. package/dist/generated/core/types.gen.d.mts.map +1 -0
  79. package/dist/generated/core/utils.gen.cjs +81 -0
  80. package/dist/generated/core/utils.gen.cjs.map +1 -0
  81. package/dist/generated/core/utils.gen.mjs +78 -0
  82. package/dist/generated/core/utils.gen.mjs.map +1 -0
  83. package/dist/generated/sdk.gen.cjs +3138 -0
  84. package/dist/generated/sdk.gen.cjs.map +1 -0
  85. package/dist/generated/sdk.gen.d.cts +276 -0
  86. package/dist/generated/sdk.gen.d.cts.map +1 -0
  87. package/dist/generated/sdk.gen.d.mts +276 -0
  88. package/dist/generated/sdk.gen.d.mts.map +1 -0
  89. package/dist/generated/sdk.gen.mjs +3110 -0
  90. package/dist/generated/sdk.gen.mjs.map +1 -0
  91. package/dist/generated/types.gen.d.cts +3679 -0
  92. package/dist/generated/types.gen.d.cts.map +1 -0
  93. package/dist/generated/types.gen.d.mts +3679 -0
  94. package/dist/generated/types.gen.d.mts.map +1 -0
  95. package/dist/generated/zod.gen.cjs +3076 -0
  96. package/dist/generated/zod.gen.cjs.map +1 -0
  97. package/dist/generated/zod.gen.mjs +2618 -0
  98. package/dist/generated/zod.gen.mjs.map +1 -0
  99. package/dist/index.cjs +15 -3248
  100. package/dist/index.d.cts +6 -2037
  101. package/dist/index.d.mts +6 -0
  102. package/dist/index.mjs +4 -0
  103. package/dist/result.cjs +59 -0
  104. package/dist/result.cjs.map +1 -0
  105. package/dist/result.d.cts +15 -0
  106. package/dist/result.d.cts.map +1 -0
  107. package/dist/result.d.mts +15 -0
  108. package/dist/result.d.mts.map +1 -0
  109. package/dist/result.mjs +55 -0
  110. package/dist/result.mjs.map +1 -0
  111. package/dist/utils/http.cjs +339 -0
  112. package/dist/utils/http.cjs.map +1 -0
  113. package/dist/utils/http.mjs +336 -0
  114. package/dist/utils/http.mjs.map +1 -0
  115. package/package.json +17 -12
  116. package/dist/index.cjs.map +0 -1
  117. package/dist/index.d.ts +0 -2037
  118. package/dist/index.js +0 -3232
  119. package/dist/index.js.map +0 -1
@@ -0,0 +1,3138 @@
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_bodySerializer_gen = require("./core/bodySerializer.gen.cjs");
3
+ const require_client_gen = require("./client.gen.cjs");
4
+ const require_zod_gen = require("./zod.gen.cjs");
5
+ let zod = require("zod");
6
+ zod = require_runtime.__toESM(zod, 1);
7
+ //#region src/generated/sdk.gen.ts
8
+ var HeyApiClient = class {
9
+ client;
10
+ constructor(args) {
11
+ this.client = args?.client ?? require_client_gen.client;
12
+ }
13
+ };
14
+ var HeyApiRegistry = class {
15
+ defaultKey = "default";
16
+ instances = /* @__PURE__ */ new Map();
17
+ get(key) {
18
+ const instance = this.instances.get(key ?? this.defaultKey);
19
+ if (!instance) throw new Error(`No SDK client found. Create one with "new Rustrak()" to fix this error.`);
20
+ return instance;
21
+ }
22
+ set(value, key) {
23
+ this.instances.set(key ?? this.defaultKey, value);
24
+ }
25
+ };
26
+ var SourceMaps = class extends HeyApiClient {
27
+ /**
28
+ * GET /api/0/organizations/{org_slug}/
29
+ * Always returns 200 with synthetic org data — sentry-cli validates this before uploading.
30
+ */
31
+ orgDetails(options) {
32
+ return (options.client ?? this.client).get({
33
+ requestValidator: async (data) => await zod.object({
34
+ body: zod.never().optional(),
35
+ path: require_zod_gen.zSourceMapsOrgDetailsPath,
36
+ query: zod.never().optional()
37
+ }).parseAsync(data),
38
+ responseValidator: async (data) => await require_zod_gen.zSourceMapsOrgDetailsResponse.parseAsync(data),
39
+ url: "/api/0/organizations/{org_slug}/",
40
+ ...options
41
+ });
42
+ }
43
+ /**
44
+ * POST /api/0/organizations/{org_slug}/artifactbundle/assemble/
45
+ */
46
+ artifactBundleAssemble(options) {
47
+ return (options.client ?? this.client).post({
48
+ requestValidator: async (data) => await zod.object({
49
+ body: require_zod_gen.zSourceMapsArtifactBundleAssembleBody,
50
+ path: require_zod_gen.zSourceMapsArtifactBundleAssemblePath,
51
+ query: zod.never().optional()
52
+ }).parseAsync(data),
53
+ responseValidator: async (data) => await require_zod_gen.zSourceMapsArtifactBundleAssembleResponse.parseAsync(data),
54
+ security: [{
55
+ scheme: "bearer",
56
+ type: "http"
57
+ }],
58
+ url: "/api/0/organizations/{org_slug}/artifactbundle/assemble/",
59
+ ...options,
60
+ headers: {
61
+ "Content-Type": "application/json",
62
+ ...options.headers
63
+ }
64
+ });
65
+ }
66
+ /**
67
+ * GET /api/0/organizations/{org_slug}/chunk-upload/
68
+ */
69
+ chunkUploadCapability(options) {
70
+ return (options.client ?? this.client).get({
71
+ requestValidator: async (data) => await zod.object({
72
+ body: zod.never().optional(),
73
+ path: require_zod_gen.zSourceMapsChunkUploadCapabilityPath,
74
+ query: zod.never().optional()
75
+ }).parseAsync(data),
76
+ responseValidator: async (data) => await require_zod_gen.zSourceMapsChunkUploadCapabilityResponse.parseAsync(data),
77
+ security: [{
78
+ scheme: "bearer",
79
+ type: "http"
80
+ }],
81
+ url: "/api/0/organizations/{org_slug}/chunk-upload/",
82
+ ...options
83
+ });
84
+ }
85
+ /**
86
+ * POST /api/0/organizations/{org_slug}/chunk-upload/
87
+ */
88
+ chunkUpload(options) {
89
+ return (options.client ?? this.client).post({
90
+ ...require_bodySerializer_gen.formDataBodySerializer,
91
+ requestValidator: async (data) => await zod.object({
92
+ body: require_zod_gen.zSourceMapsChunkUploadBody,
93
+ path: require_zod_gen.zSourceMapsChunkUploadPath,
94
+ query: zod.never().optional()
95
+ }).parseAsync(data),
96
+ security: [{
97
+ scheme: "bearer",
98
+ type: "http"
99
+ }],
100
+ url: "/api/0/organizations/{org_slug}/chunk-upload/",
101
+ ...options,
102
+ headers: {
103
+ "Content-Type": null,
104
+ ...options.headers
105
+ }
106
+ });
107
+ }
108
+ /**
109
+ * GET /api/0/projects/{org_slug}/{project_slug}/files/source-maps/
110
+ */
111
+ list(options) {
112
+ return (options.client ?? this.client).get({
113
+ requestValidator: async (data) => await zod.object({
114
+ body: zod.never().optional(),
115
+ path: require_zod_gen.zSourceMapsListPath,
116
+ query: zod.never().optional()
117
+ }).parseAsync(data),
118
+ responseValidator: async (data) => await require_zod_gen.zSourceMapsListResponse.parseAsync(data),
119
+ security: [{
120
+ scheme: "bearer",
121
+ type: "http"
122
+ }],
123
+ url: "/api/0/projects/{org_slug}/{project_slug}/files/source-maps/",
124
+ ...options
125
+ });
126
+ }
127
+ };
128
+ var Releases = class extends HeyApiClient {
129
+ /**
130
+ * POST /api/0/projects/{org_slug}/{project_slug}/releases/
131
+ *
132
+ * Sentry-compatible release creation. Idempotent: repeating the same
133
+ * `(project, version)` returns 208 rather than erroring — sentry-cli and JS
134
+ * bundler plugins call this on every build. Triggers date-based regression
135
+ * clearing (see [`crate::services::issue::IssueService::finalize_release`])
136
+ * on every call, not just the new-row branch: `finalize_release`'s own
137
+ * `UPDATE ... WHERE` is idempotent (a repeat run affects 0 rows once nothing
138
+ * is left to clear), so this also self-heals a prior call that created the
139
+ * row but failed before clearing ran — a plain `if created` gate would
140
+ * otherwise skip clearing forever once a retry lands on the 208 branch.
141
+ */
142
+ create(options) {
143
+ return (options.client ?? this.client).post({
144
+ requestValidator: async (data) => await zod.object({
145
+ body: require_zod_gen.zReleasesCreateBody,
146
+ path: require_zod_gen.zReleasesCreatePath,
147
+ query: zod.never().optional()
148
+ }).parseAsync(data),
149
+ responseValidator: async (data) => await require_zod_gen.zReleasesCreateResponse.parseAsync(data),
150
+ security: [{
151
+ scheme: "bearer",
152
+ type: "http"
153
+ }],
154
+ url: "/api/0/projects/{org_slug}/{project_slug}/releases/",
155
+ ...options,
156
+ headers: {
157
+ "Content-Type": "application/json",
158
+ ...options.headers
159
+ }
160
+ });
161
+ }
162
+ /**
163
+ * PUT /api/0/projects/{org_slug}/{project_slug}/releases/{version}/
164
+ *
165
+ * Generic partial update (`ref`, `url`, `dateReleased`). Setting
166
+ * `dateReleased` IS "finalize" — there is no separate status flag.
167
+ */
168
+ finalize(options) {
169
+ return (options.client ?? this.client).put({
170
+ requestValidator: async (data) => await zod.object({
171
+ body: require_zod_gen.zReleasesFinalizeBody,
172
+ path: require_zod_gen.zReleasesFinalizePath,
173
+ query: zod.never().optional()
174
+ }).parseAsync(data),
175
+ responseValidator: async (data) => await require_zod_gen.zReleasesFinalizeResponse.parseAsync(data),
176
+ security: [{
177
+ scheme: "bearer",
178
+ type: "http"
179
+ }],
180
+ url: "/api/0/projects/{org_slug}/{project_slug}/releases/{version}/",
181
+ ...options,
182
+ headers: {
183
+ "Content-Type": "application/json",
184
+ ...options.headers
185
+ }
186
+ });
187
+ }
188
+ /**
189
+ * GET /api/projects/{project_id}/releases/{release}/new-issues
190
+ */
191
+ newIssues(options) {
192
+ return (options.client ?? this.client).get({
193
+ requestValidator: async (data) => await zod.object({
194
+ body: zod.never().optional(),
195
+ path: require_zod_gen.zReleasesNewIssuesPath,
196
+ query: require_zod_gen.zReleasesNewIssuesQuery.optional()
197
+ }).parseAsync(data),
198
+ responseValidator: async (data) => await require_zod_gen.zReleasesNewIssuesResponse.parseAsync(data),
199
+ security: [{
200
+ scheme: "bearer",
201
+ type: "http"
202
+ }],
203
+ url: "/api/projects/{project_id}/releases/{release}/new-issues",
204
+ ...options
205
+ });
206
+ }
207
+ };
208
+ var Github = class extends HeyApiClient {
209
+ /**
210
+ * DELETE /api/github
211
+ */
212
+ disconnect(options) {
213
+ return (options?.client ?? this.client).delete({
214
+ requestValidator: async (data) => await zod.object({
215
+ body: zod.never().optional(),
216
+ path: zod.never().optional(),
217
+ query: zod.never().optional()
218
+ }).parseAsync(data),
219
+ responseValidator: async (data) => await require_zod_gen.zGithubDisconnectResponse.parseAsync(data),
220
+ security: [{
221
+ scheme: "bearer",
222
+ type: "http"
223
+ }],
224
+ url: "/api/github",
225
+ ...options
226
+ });
227
+ }
228
+ /**
229
+ * GET /api/github
230
+ */
231
+ status(options) {
232
+ return (options?.client ?? this.client).get({
233
+ requestValidator: async (data) => await zod.object({
234
+ body: zod.never().optional(),
235
+ path: zod.never().optional(),
236
+ query: zod.never().optional()
237
+ }).parseAsync(data),
238
+ responseValidator: async (data) => await require_zod_gen.zGithubStatusResponse.parseAsync(data),
239
+ security: [{
240
+ scheme: "bearer",
241
+ type: "http"
242
+ }],
243
+ url: "/api/github",
244
+ ...options
245
+ });
246
+ }
247
+ /**
248
+ * GET /api/github/callback: GitHub sends the browser here after creating the
249
+ * app; the code trades for its credentials.
250
+ */
251
+ callback(options) {
252
+ return (options.client ?? this.client).get({
253
+ requestValidator: async (data) => await zod.object({
254
+ body: zod.never().optional(),
255
+ path: zod.never().optional(),
256
+ query: require_zod_gen.zGithubCallbackQuery
257
+ }).parseAsync(data),
258
+ security: [{
259
+ scheme: "bearer",
260
+ type: "http"
261
+ }],
262
+ url: "/api/github/callback",
263
+ ...options
264
+ });
265
+ }
266
+ /**
267
+ * GET /api/github/installed: GitHub sends the browser here after the app is
268
+ * installed on an account.
269
+ */
270
+ installed(options) {
271
+ return (options.client ?? this.client).get({
272
+ requestValidator: async (data) => await zod.object({
273
+ body: zod.never().optional(),
274
+ path: zod.never().optional(),
275
+ query: require_zod_gen.zGithubInstalledQuery
276
+ }).parseAsync(data),
277
+ security: [{
278
+ scheme: "bearer",
279
+ type: "http"
280
+ }],
281
+ url: "/api/github/installed",
282
+ ...options
283
+ });
284
+ }
285
+ /**
286
+ * POST /api/github/manifest: what the dashboard posts to GitHub so GitHub
287
+ * creates an app already configured for this server.
288
+ */
289
+ manifest(options) {
290
+ return (options.client ?? this.client).post({
291
+ requestValidator: async (data) => await zod.object({
292
+ body: require_zod_gen.zGithubManifestBody,
293
+ path: zod.never().optional(),
294
+ query: zod.never().optional()
295
+ }).parseAsync(data),
296
+ responseValidator: async (data) => await require_zod_gen.zGithubManifestResponse.parseAsync(data),
297
+ security: [{
298
+ scheme: "bearer",
299
+ type: "http"
300
+ }],
301
+ url: "/api/github/manifest",
302
+ ...options,
303
+ headers: {
304
+ "Content-Type": "application/json",
305
+ ...options.headers
306
+ }
307
+ });
308
+ }
309
+ /**
310
+ * GET /api/github/me: the GitHub username assignees sync through.
311
+ */
312
+ getMyLogin(options) {
313
+ return (options?.client ?? this.client).get({
314
+ requestValidator: async (data) => await zod.object({
315
+ body: zod.never().optional(),
316
+ path: zod.never().optional(),
317
+ query: zod.never().optional()
318
+ }).parseAsync(data),
319
+ responseValidator: async (data) => await require_zod_gen.zGithubGetMyLoginResponse.parseAsync(data),
320
+ security: [{
321
+ scheme: "bearer",
322
+ type: "http"
323
+ }],
324
+ url: "/api/github/me",
325
+ ...options
326
+ });
327
+ }
328
+ /**
329
+ * PUT /api/github/me
330
+ */
331
+ putMyLogin(options) {
332
+ return (options.client ?? this.client).put({
333
+ requestValidator: async (data) => await zod.object({
334
+ body: require_zod_gen.zGithubPutMyLoginBody,
335
+ path: zod.never().optional(),
336
+ query: zod.never().optional()
337
+ }).parseAsync(data),
338
+ responseValidator: async (data) => await require_zod_gen.zGithubPutMyLoginResponse.parseAsync(data),
339
+ security: [{
340
+ scheme: "bearer",
341
+ type: "http"
342
+ }],
343
+ url: "/api/github/me",
344
+ ...options,
345
+ headers: {
346
+ "Content-Type": "application/json",
347
+ ...options.headers
348
+ }
349
+ });
350
+ }
351
+ /**
352
+ * GET /api/github/repositories?project_id=: the repositories a project can
353
+ * point at, for whoever may change that project's settings.
354
+ */
355
+ repositories(options) {
356
+ return (options.client ?? this.client).get({
357
+ requestValidator: async (data) => await zod.object({
358
+ body: zod.never().optional(),
359
+ path: zod.never().optional(),
360
+ query: require_zod_gen.zGithubRepositoriesQuery
361
+ }).parseAsync(data),
362
+ responseValidator: async (data) => await require_zod_gen.zGithubRepositoriesResponse.parseAsync(data),
363
+ security: [{
364
+ scheme: "bearer",
365
+ type: "http"
366
+ }],
367
+ url: "/api/github/repositories",
368
+ ...options
369
+ });
370
+ }
371
+ /**
372
+ * POST /api/github/webhook: public, and trusted only through the signature
373
+ * GitHub computes with the app's webhook secret.
374
+ */
375
+ webhook(options) {
376
+ return (options.client ?? this.client).post({
377
+ requestValidator: async (data) => await zod.object({
378
+ body: require_zod_gen.zGithubWebhookBody,
379
+ path: zod.never().optional(),
380
+ query: zod.never().optional()
381
+ }).parseAsync(data),
382
+ responseValidator: async (data) => await require_zod_gen.zGithubWebhookResponse.parseAsync(data),
383
+ url: "/api/github/webhook",
384
+ ...options,
385
+ headers: {
386
+ "Content-Type": "application/json",
387
+ ...options.headers
388
+ }
389
+ });
390
+ }
391
+ /**
392
+ * DELETE /api/projects/{project_id}/github
393
+ */
394
+ deleteProjectRepository(options) {
395
+ return (options.client ?? this.client).delete({
396
+ requestValidator: async (data) => await zod.object({
397
+ body: zod.never().optional(),
398
+ path: require_zod_gen.zGithubDeleteProjectRepositoryPath,
399
+ query: zod.never().optional()
400
+ }).parseAsync(data),
401
+ responseValidator: async (data) => await require_zod_gen.zGithubDeleteProjectRepositoryResponse.parseAsync(data),
402
+ security: [{
403
+ scheme: "bearer",
404
+ type: "http"
405
+ }],
406
+ url: "/api/projects/{project_id}/github",
407
+ ...options
408
+ });
409
+ }
410
+ /**
411
+ * GET /api/projects/{project_id}/github
412
+ */
413
+ getProjectRepository(options) {
414
+ return (options.client ?? this.client).get({
415
+ requestValidator: async (data) => await zod.object({
416
+ body: zod.never().optional(),
417
+ path: require_zod_gen.zGithubGetProjectRepositoryPath,
418
+ query: zod.never().optional()
419
+ }).parseAsync(data),
420
+ responseValidator: async (data) => await require_zod_gen.zGithubGetProjectRepositoryResponse.parseAsync(data),
421
+ security: [{
422
+ scheme: "bearer",
423
+ type: "http"
424
+ }],
425
+ url: "/api/projects/{project_id}/github",
426
+ ...options
427
+ });
428
+ }
429
+ /**
430
+ * PUT /api/projects/{project_id}/github
431
+ */
432
+ putProjectRepository(options) {
433
+ return (options.client ?? this.client).put({
434
+ requestValidator: async (data) => await zod.object({
435
+ body: require_zod_gen.zGithubPutProjectRepositoryBody,
436
+ path: require_zod_gen.zGithubPutProjectRepositoryPath,
437
+ query: zod.never().optional()
438
+ }).parseAsync(data),
439
+ responseValidator: async (data) => await require_zod_gen.zGithubPutProjectRepositoryResponse.parseAsync(data),
440
+ security: [{
441
+ scheme: "bearer",
442
+ type: "http"
443
+ }],
444
+ url: "/api/projects/{project_id}/github",
445
+ ...options,
446
+ headers: {
447
+ "Content-Type": "application/json",
448
+ ...options.headers
449
+ }
450
+ });
451
+ }
452
+ /**
453
+ * POST /api/projects/{project_id}/github/codeowners: copies the repository's
454
+ * CODEOWNERS so ownership can be answered without asking GitHub each time.
455
+ */
456
+ syncCodeowners(options) {
457
+ return (options.client ?? this.client).post({
458
+ requestValidator: async (data) => await zod.object({
459
+ body: zod.never().optional(),
460
+ path: require_zod_gen.zGithubSyncCodeownersPath,
461
+ query: zod.never().optional()
462
+ }).parseAsync(data),
463
+ responseValidator: async (data) => await require_zod_gen.zGithubSyncCodeownersResponse.parseAsync(data),
464
+ security: [{
465
+ scheme: "bearer",
466
+ type: "http"
467
+ }],
468
+ url: "/api/projects/{project_id}/github/codeowners",
469
+ ...options
470
+ });
471
+ }
472
+ /**
473
+ * GET /api/projects/{project_id}/issues/{issue_id}/github: the issue's links,
474
+ * the commits that may have caused it, and who owns its culprit file.
475
+ */
476
+ issue(options) {
477
+ return (options.client ?? this.client).get({
478
+ requestValidator: async (data) => await zod.object({
479
+ body: zod.never().optional(),
480
+ path: require_zod_gen.zGithubIssuePath,
481
+ query: zod.never().optional()
482
+ }).parseAsync(data),
483
+ responseValidator: async (data) => await require_zod_gen.zGithubIssueResponse.parseAsync(data),
484
+ security: [{
485
+ scheme: "bearer",
486
+ type: "http"
487
+ }],
488
+ url: "/api/projects/{project_id}/issues/{issue_id}/github",
489
+ ...options
490
+ });
491
+ }
492
+ /**
493
+ * POST .../github/issues: opens a GitHub issue and links it.
494
+ */
495
+ createIssue(options) {
496
+ return (options.client ?? this.client).post({
497
+ requestValidator: async (data) => await zod.object({
498
+ body: require_zod_gen.zGithubCreateIssueBody,
499
+ path: require_zod_gen.zGithubCreateIssuePath,
500
+ query: zod.never().optional()
501
+ }).parseAsync(data),
502
+ responseValidator: async (data) => await require_zod_gen.zGithubCreateIssueResponse.parseAsync(data),
503
+ security: [{
504
+ scheme: "bearer",
505
+ type: "http"
506
+ }],
507
+ url: "/api/projects/{project_id}/issues/{issue_id}/github/issues",
508
+ ...options,
509
+ headers: {
510
+ "Content-Type": "application/json",
511
+ ...options.headers
512
+ }
513
+ });
514
+ }
515
+ /**
516
+ * POST .../github/links: links an existing GitHub issue or pull request.
517
+ */
518
+ linkIssue(options) {
519
+ return (options.client ?? this.client).post({
520
+ requestValidator: async (data) => await zod.object({
521
+ body: require_zod_gen.zGithubLinkIssueBody,
522
+ path: require_zod_gen.zGithubLinkIssuePath,
523
+ query: zod.never().optional()
524
+ }).parseAsync(data),
525
+ responseValidator: async (data) => await require_zod_gen.zGithubLinkIssueResponse.parseAsync(data),
526
+ security: [{
527
+ scheme: "bearer",
528
+ type: "http"
529
+ }],
530
+ url: "/api/projects/{project_id}/issues/{issue_id}/github/links",
531
+ ...options,
532
+ headers: {
533
+ "Content-Type": "application/json",
534
+ ...options.headers
535
+ }
536
+ });
537
+ }
538
+ /**
539
+ * DELETE .../github/links/{link_id}
540
+ */
541
+ unlinkIssue(options) {
542
+ return (options.client ?? this.client).delete({
543
+ requestValidator: async (data) => await zod.object({
544
+ body: zod.never().optional(),
545
+ path: require_zod_gen.zGithubUnlinkIssuePath,
546
+ query: zod.never().optional()
547
+ }).parseAsync(data),
548
+ responseValidator: async (data) => await require_zod_gen.zGithubUnlinkIssueResponse.parseAsync(data),
549
+ security: [{
550
+ scheme: "bearer",
551
+ type: "http"
552
+ }],
553
+ url: "/api/projects/{project_id}/issues/{issue_id}/github/links/{link_id}",
554
+ ...options
555
+ });
556
+ }
557
+ };
558
+ var AlertChannels = class extends HeyApiClient {
559
+ /**
560
+ * GET /api/alert-channels
561
+ */
562
+ list(options) {
563
+ return (options?.client ?? this.client).get({
564
+ requestValidator: async (data) => await zod.object({
565
+ body: zod.never().optional(),
566
+ path: zod.never().optional(),
567
+ query: zod.never().optional()
568
+ }).parseAsync(data),
569
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsListResponse.parseAsync(data),
570
+ security: [{
571
+ scheme: "bearer",
572
+ type: "http"
573
+ }],
574
+ url: "/api/integrations",
575
+ ...options
576
+ });
577
+ }
578
+ /**
579
+ * POST /api/alert-channels
580
+ */
581
+ create(options) {
582
+ return (options.client ?? this.client).post({
583
+ requestValidator: async (data) => await zod.object({
584
+ body: require_zod_gen.zAlertChannelsCreateBody,
585
+ path: zod.never().optional(),
586
+ query: zod.never().optional()
587
+ }).parseAsync(data),
588
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsCreateResponse.parseAsync(data),
589
+ security: [{
590
+ scheme: "bearer",
591
+ type: "http"
592
+ }],
593
+ url: "/api/integrations",
594
+ ...options,
595
+ headers: {
596
+ "Content-Type": "application/json",
597
+ ...options.headers
598
+ }
599
+ });
600
+ }
601
+ /**
602
+ * POST /api/integrations/preview-template
603
+ *
604
+ * Renders a Custom Webhook template against a sample payload and hands back
605
+ * the body that would be sent. The dashboard cannot run the template engine,
606
+ * so it asks while the reader types; going through the dispatcher's own
607
+ * renderer is what keeps the preview from disagreeing with a delivery.
608
+ */
609
+ previewTemplate(options) {
610
+ return (options.client ?? this.client).post({
611
+ requestValidator: async (data) => await zod.object({
612
+ body: require_zod_gen.zAlertChannelsPreviewTemplateBody,
613
+ path: zod.never().optional(),
614
+ query: zod.never().optional()
615
+ }).parseAsync(data),
616
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsPreviewTemplateResponse.parseAsync(data),
617
+ security: [{
618
+ scheme: "bearer",
619
+ type: "http"
620
+ }],
621
+ url: "/api/integrations/preview-template",
622
+ ...options,
623
+ headers: {
624
+ "Content-Type": "application/json",
625
+ ...options.headers
626
+ }
627
+ });
628
+ }
629
+ /**
630
+ * DELETE /api/alert-channels/{id}
631
+ */
632
+ delete(options) {
633
+ return (options.client ?? this.client).delete({
634
+ requestValidator: async (data) => await zod.object({
635
+ body: zod.never().optional(),
636
+ path: require_zod_gen.zAlertChannelsDeletePath,
637
+ query: zod.never().optional()
638
+ }).parseAsync(data),
639
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsDeleteResponse.parseAsync(data),
640
+ security: [{
641
+ scheme: "bearer",
642
+ type: "http"
643
+ }],
644
+ url: "/api/integrations/{id}",
645
+ ...options
646
+ });
647
+ }
648
+ /**
649
+ * GET /api/alert-channels/{id}
650
+ */
651
+ get(options) {
652
+ return (options.client ?? this.client).get({
653
+ requestValidator: async (data) => await zod.object({
654
+ body: zod.never().optional(),
655
+ path: require_zod_gen.zAlertChannelsGetPath,
656
+ query: zod.never().optional()
657
+ }).parseAsync(data),
658
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsGetResponse.parseAsync(data),
659
+ security: [{
660
+ scheme: "bearer",
661
+ type: "http"
662
+ }],
663
+ url: "/api/integrations/{id}",
664
+ ...options
665
+ });
666
+ }
667
+ /**
668
+ * PATCH /api/alert-channels/{id}
669
+ */
670
+ update(options) {
671
+ return (options.client ?? this.client).patch({
672
+ requestValidator: async (data) => await zod.object({
673
+ body: require_zod_gen.zAlertChannelsUpdateBody,
674
+ path: require_zod_gen.zAlertChannelsUpdatePath,
675
+ query: zod.never().optional()
676
+ }).parseAsync(data),
677
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsUpdateResponse.parseAsync(data),
678
+ security: [{
679
+ scheme: "bearer",
680
+ type: "http"
681
+ }],
682
+ url: "/api/integrations/{id}",
683
+ ...options,
684
+ headers: {
685
+ "Content-Type": "application/json",
686
+ ...options.headers
687
+ }
688
+ });
689
+ }
690
+ /**
691
+ * POST /api/integrations/{id}/test
692
+ */
693
+ test(options) {
694
+ return (options.client ?? this.client).post({
695
+ requestValidator: async (data) => await zod.object({
696
+ body: require_zod_gen.zAlertChannelsTestBody.optional(),
697
+ path: require_zod_gen.zAlertChannelsTestPath,
698
+ query: zod.never().optional()
699
+ }).parseAsync(data),
700
+ responseValidator: async (data) => await require_zod_gen.zAlertChannelsTestResponse.parseAsync(data),
701
+ security: [{
702
+ scheme: "bearer",
703
+ type: "http"
704
+ }],
705
+ url: "/api/integrations/{id}/test",
706
+ ...options,
707
+ headers: {
708
+ "Content-Type": "application/json",
709
+ ...options.headers
710
+ }
711
+ });
712
+ }
713
+ };
714
+ var Invitations = class extends HeyApiClient {
715
+ /**
716
+ * GET /api/invitations — list invitations (admin only)
717
+ */
718
+ list(options) {
719
+ return (options?.client ?? this.client).get({
720
+ requestValidator: async (data) => await zod.object({
721
+ body: zod.never().optional(),
722
+ path: zod.never().optional(),
723
+ query: zod.never().optional()
724
+ }).parseAsync(data),
725
+ responseValidator: async (data) => await require_zod_gen.zInvitationsListResponse.parseAsync(data),
726
+ security: [{
727
+ scheme: "bearer",
728
+ type: "http"
729
+ }],
730
+ url: "/api/invitations",
731
+ ...options
732
+ });
733
+ }
734
+ /**
735
+ * POST /api/invitations — create an invitation (admin only)
736
+ */
737
+ create(options) {
738
+ return (options.client ?? this.client).post({
739
+ requestValidator: async (data) => await zod.object({
740
+ body: require_zod_gen.zInvitationsCreateBody,
741
+ path: zod.never().optional(),
742
+ query: zod.never().optional()
743
+ }).parseAsync(data),
744
+ responseValidator: async (data) => await require_zod_gen.zInvitationsCreateResponse.parseAsync(data),
745
+ security: [{
746
+ scheme: "bearer",
747
+ type: "http"
748
+ }],
749
+ url: "/api/invitations",
750
+ ...options,
751
+ headers: {
752
+ "Content-Type": "application/json",
753
+ ...options.headers
754
+ }
755
+ });
756
+ }
757
+ /**
758
+ * DELETE /api/invitations/{token} — revoke a pending invitation (admin only)
759
+ */
760
+ revoke(options) {
761
+ return (options.client ?? this.client).delete({
762
+ requestValidator: async (data) => await zod.object({
763
+ body: zod.never().optional(),
764
+ path: require_zod_gen.zInvitationsRevokePath,
765
+ query: zod.never().optional()
766
+ }).parseAsync(data),
767
+ responseValidator: async (data) => await require_zod_gen.zInvitationsRevokeResponse.parseAsync(data),
768
+ security: [{
769
+ scheme: "bearer",
770
+ type: "http"
771
+ }],
772
+ url: "/api/invitations/{token}",
773
+ ...options
774
+ });
775
+ }
776
+ };
777
+ var Oauth = class extends HeyApiClient {
778
+ /**
779
+ * Verifies an authorization request and says who is asking.
780
+ */
781
+ getAuthorization(options) {
782
+ return (options.client ?? this.client).get({
783
+ requestValidator: async (data) => await zod.object({
784
+ body: zod.never().optional(),
785
+ path: zod.never().optional(),
786
+ query: require_zod_gen.zOauthGetAuthorizationQuery
787
+ }).parseAsync(data),
788
+ responseValidator: async (data) => await require_zod_gen.zOauthGetAuthorizationResponse.parseAsync(data),
789
+ url: "/api/oauth/authorize",
790
+ ...options
791
+ });
792
+ }
793
+ /**
794
+ * Approves or denies an authorization request as the signed-in user.
795
+ */
796
+ decideAuthorization(options) {
797
+ return (options.client ?? this.client).post({
798
+ requestValidator: async (data) => await zod.object({
799
+ body: require_zod_gen.zOauthDecideAuthorizationBody,
800
+ path: zod.never().optional(),
801
+ query: zod.never().optional()
802
+ }).parseAsync(data),
803
+ responseValidator: async (data) => await require_zod_gen.zOauthDecideAuthorizationResponse.parseAsync(data),
804
+ url: "/api/oauth/authorize",
805
+ ...options,
806
+ headers: {
807
+ "Content-Type": "application/json",
808
+ ...options.headers
809
+ }
810
+ });
811
+ }
812
+ /**
813
+ * Lists the assistants connected to the signed-in user's account.
814
+ */
815
+ listGrants(options) {
816
+ return (options?.client ?? this.client).get({
817
+ requestValidator: async (data) => await zod.object({
818
+ body: zod.never().optional(),
819
+ path: zod.never().optional(),
820
+ query: zod.never().optional()
821
+ }).parseAsync(data),
822
+ responseValidator: async (data) => await require_zod_gen.zOauthListGrantsResponse.parseAsync(data),
823
+ url: "/api/oauth/grants",
824
+ ...options
825
+ });
826
+ }
827
+ /**
828
+ * Disconnects an assistant: its tokens stop working at once.
829
+ */
830
+ revokeGrant(options) {
831
+ return (options.client ?? this.client).delete({
832
+ requestValidator: async (data) => await zod.object({
833
+ body: zod.never().optional(),
834
+ path: require_zod_gen.zOauthRevokeGrantPath,
835
+ query: zod.never().optional()
836
+ }).parseAsync(data),
837
+ responseValidator: async (data) => await require_zod_gen.zOauthRevokeGrantResponse.parseAsync(data),
838
+ url: "/api/oauth/grants/{id}",
839
+ ...options
840
+ });
841
+ }
842
+ };
843
+ var Projects = class extends HeyApiClient {
844
+ /**
845
+ * GET /api/projects - List projects with pagination
846
+ *
847
+ * Admins see every project. Non-admins see only the projects they belong to.
848
+ */
849
+ list(options) {
850
+ return (options?.client ?? this.client).get({
851
+ requestValidator: async (data) => await zod.object({
852
+ body: zod.never().optional(),
853
+ path: zod.never().optional(),
854
+ query: require_zod_gen.zProjectsListQuery.optional()
855
+ }).parseAsync(data),
856
+ responseValidator: async (data) => await require_zod_gen.zProjectsListResponse.parseAsync(data),
857
+ security: [{
858
+ scheme: "bearer",
859
+ type: "http"
860
+ }],
861
+ url: "/api/projects",
862
+ ...options
863
+ });
864
+ }
865
+ /**
866
+ * POST /api/projects - Create a new project
867
+ *
868
+ * Any authenticated user may create a project. A non-admin creator is
869
+ * automatically granted the project `admin` role so they can access it.
870
+ */
871
+ create(options) {
872
+ return (options.client ?? this.client).post({
873
+ requestValidator: async (data) => await zod.object({
874
+ body: require_zod_gen.zProjectsCreateBody,
875
+ path: zod.never().optional(),
876
+ query: zod.never().optional()
877
+ }).parseAsync(data),
878
+ responseValidator: async (data) => await require_zod_gen.zProjectsCreateResponse.parseAsync(data),
879
+ security: [{
880
+ scheme: "bearer",
881
+ type: "http"
882
+ }],
883
+ url: "/api/projects",
884
+ ...options,
885
+ headers: {
886
+ "Content-Type": "application/json",
887
+ ...options.headers
888
+ }
889
+ });
890
+ }
891
+ /**
892
+ * DELETE /api/projects/{id} - Delete a project
893
+ */
894
+ delete(options) {
895
+ return (options.client ?? this.client).delete({
896
+ requestValidator: async (data) => await zod.object({
897
+ body: zod.never().optional(),
898
+ path: require_zod_gen.zProjectsDeletePath,
899
+ query: zod.never().optional()
900
+ }).parseAsync(data),
901
+ responseValidator: async (data) => await require_zod_gen.zProjectsDeleteResponse.parseAsync(data),
902
+ security: [{
903
+ scheme: "bearer",
904
+ type: "http"
905
+ }],
906
+ url: "/api/projects/{id}",
907
+ ...options
908
+ });
909
+ }
910
+ /**
911
+ * GET /api/projects/{id} - Get a project by ID
912
+ */
913
+ get(options) {
914
+ return (options.client ?? this.client).get({
915
+ requestValidator: async (data) => await zod.object({
916
+ body: zod.never().optional(),
917
+ path: require_zod_gen.zProjectsGetPath,
918
+ query: zod.never().optional()
919
+ }).parseAsync(data),
920
+ responseValidator: async (data) => await require_zod_gen.zProjectsGetResponse.parseAsync(data),
921
+ security: [{
922
+ scheme: "bearer",
923
+ type: "http"
924
+ }],
925
+ url: "/api/projects/{id}",
926
+ ...options
927
+ });
928
+ }
929
+ /**
930
+ * PATCH /api/projects/{id} - Update a project
931
+ */
932
+ update(options) {
933
+ return (options.client ?? this.client).patch({
934
+ requestValidator: async (data) => await zod.object({
935
+ body: require_zod_gen.zProjectsUpdateBody,
936
+ path: require_zod_gen.zProjectsUpdatePath,
937
+ query: zod.never().optional()
938
+ }).parseAsync(data),
939
+ responseValidator: async (data) => await require_zod_gen.zProjectsUpdateResponse.parseAsync(data),
940
+ security: [{
941
+ scheme: "bearer",
942
+ type: "http"
943
+ }],
944
+ url: "/api/projects/{id}",
945
+ ...options,
946
+ headers: {
947
+ "Content-Type": "application/json",
948
+ ...options.headers
949
+ }
950
+ });
951
+ }
952
+ /**
953
+ * GET /api/rate-limits - What a project without limits of its own follows
954
+ */
955
+ getRateLimits(options) {
956
+ return (options?.client ?? this.client).get({
957
+ requestValidator: async (data) => await zod.object({
958
+ body: zod.never().optional(),
959
+ path: zod.never().optional(),
960
+ query: zod.never().optional()
961
+ }).parseAsync(data),
962
+ responseValidator: async (data) => await require_zod_gen.zProjectsGetRateLimitsResponse.parseAsync(data),
963
+ security: [{
964
+ scheme: "bearer",
965
+ type: "http"
966
+ }],
967
+ url: "/api/rate-limits",
968
+ ...options
969
+ });
970
+ }
971
+ };
972
+ var Agents = class extends HeyApiClient {
973
+ /**
974
+ * GET /api/projects/{project_id}/agents/duration
975
+ * Time-bucketed avg/p95 duration for `agent`/`ai_client` spans.
976
+ */
977
+ duration(options) {
978
+ return (options.client ?? this.client).get({
979
+ requestValidator: async (data) => await zod.object({
980
+ body: zod.never().optional(),
981
+ path: require_zod_gen.zAgentsDurationPath,
982
+ query: require_zod_gen.zAgentsDurationQuery.optional()
983
+ }).parseAsync(data),
984
+ responseValidator: async (data) => await require_zod_gen.zAgentsDurationResponse.parseAsync(data),
985
+ security: [{
986
+ scheme: "bearer",
987
+ type: "http"
988
+ }],
989
+ url: "/api/projects/{project_id}/agents/duration",
990
+ ...options
991
+ });
992
+ }
993
+ /**
994
+ * GET /api/projects/{project_id}/agents/environments
995
+ * The options the environment filter offers, read from the data rather than
996
+ * hardcoded — an installation may name its environments anything.
997
+ */
998
+ environments(options) {
999
+ return (options.client ?? this.client).get({
1000
+ requestValidator: async (data) => await zod.object({
1001
+ body: zod.never().optional(),
1002
+ path: require_zod_gen.zAgentsEnvironmentsPath,
1003
+ query: zod.never().optional()
1004
+ }).parseAsync(data),
1005
+ responseValidator: async (data) => await require_zod_gen.zAgentsEnvironmentsResponse.parseAsync(data),
1006
+ security: [{
1007
+ scheme: "bearer",
1008
+ type: "http"
1009
+ }],
1010
+ url: "/api/projects/{project_id}/agents/environments",
1011
+ ...options
1012
+ });
1013
+ }
1014
+ /**
1015
+ * GET /api/projects/{project_id}/agents/models
1016
+ */
1017
+ modelsTable(options) {
1018
+ return (options.client ?? this.client).get({
1019
+ requestValidator: async (data) => await zod.object({
1020
+ body: zod.never().optional(),
1021
+ path: require_zod_gen.zAgentsModelsTablePath,
1022
+ query: require_zod_gen.zAgentsModelsTableQuery.optional()
1023
+ }).parseAsync(data),
1024
+ responseValidator: async (data) => await require_zod_gen.zAgentsModelsTableResponse.parseAsync(data),
1025
+ security: [{
1026
+ scheme: "bearer",
1027
+ type: "http"
1028
+ }],
1029
+ url: "/api/projects/{project_id}/agents/models",
1030
+ ...options
1031
+ });
1032
+ }
1033
+ /**
1034
+ * GET /api/projects/{project_id}/agents/models/calls
1035
+ * Top models by LLM call count (`gen_ai.operation.type:ai_client`).
1036
+ */
1037
+ modelsCalls(options) {
1038
+ return (options.client ?? this.client).get({
1039
+ requestValidator: async (data) => await zod.object({
1040
+ body: zod.never().optional(),
1041
+ path: require_zod_gen.zAgentsModelsCallsPath,
1042
+ query: require_zod_gen.zAgentsModelsCallsQuery.optional()
1043
+ }).parseAsync(data),
1044
+ responseValidator: async (data) => await require_zod_gen.zAgentsModelsCallsResponse.parseAsync(data),
1045
+ security: [{
1046
+ scheme: "bearer",
1047
+ type: "http"
1048
+ }],
1049
+ url: "/api/projects/{project_id}/agents/models/calls",
1050
+ ...options
1051
+ });
1052
+ }
1053
+ /**
1054
+ * GET /api/projects/{project_id}/agents/models/tokens
1055
+ * Top models by total tokens used (`gen_ai.operation.type:ai_client`).
1056
+ */
1057
+ modelsTokens(options) {
1058
+ return (options.client ?? this.client).get({
1059
+ requestValidator: async (data) => await zod.object({
1060
+ body: zod.never().optional(),
1061
+ path: require_zod_gen.zAgentsModelsTokensPath,
1062
+ query: require_zod_gen.zAgentsModelsTokensQuery.optional()
1063
+ }).parseAsync(data),
1064
+ responseValidator: async (data) => await require_zod_gen.zAgentsModelsTokensResponse.parseAsync(data),
1065
+ security: [{
1066
+ scheme: "bearer",
1067
+ type: "http"
1068
+ }],
1069
+ url: "/api/projects/{project_id}/agents/models/tokens",
1070
+ ...options
1071
+ });
1072
+ }
1073
+ /**
1074
+ * GET /api/projects/{project_id}/agents/runs
1075
+ * Time-bucketed count of agent-run spans (`gen_ai.operation.type:agent`).
1076
+ */
1077
+ runs(options) {
1078
+ return (options.client ?? this.client).get({
1079
+ requestValidator: async (data) => await zod.object({
1080
+ body: zod.never().optional(),
1081
+ path: require_zod_gen.zAgentsRunsPath,
1082
+ query: require_zod_gen.zAgentsRunsQuery.optional()
1083
+ }).parseAsync(data),
1084
+ responseValidator: async (data) => await require_zod_gen.zAgentsRunsResponse.parseAsync(data),
1085
+ security: [{
1086
+ scheme: "bearer",
1087
+ type: "http"
1088
+ }],
1089
+ url: "/api/projects/{project_id}/agents/runs",
1090
+ ...options
1091
+ });
1092
+ }
1093
+ /**
1094
+ * GET /api/projects/{project_id}/agents/summary
1095
+ * Agent runs, LLM calls, tool calls, errors, tokens and latency over the
1096
+ * selected window — the numbers the six charts cannot state outright.
1097
+ */
1098
+ summary(options) {
1099
+ return (options.client ?? this.client).get({
1100
+ requestValidator: async (data) => await zod.object({
1101
+ body: zod.never().optional(),
1102
+ path: require_zod_gen.zAgentsSummaryPath,
1103
+ query: require_zod_gen.zAgentsSummaryQuery.optional()
1104
+ }).parseAsync(data),
1105
+ responseValidator: async (data) => await require_zod_gen.zAgentsSummaryResponse.parseAsync(data),
1106
+ security: [{
1107
+ scheme: "bearer",
1108
+ type: "http"
1109
+ }],
1110
+ url: "/api/projects/{project_id}/agents/summary",
1111
+ ...options
1112
+ });
1113
+ }
1114
+ /**
1115
+ * GET /api/projects/{project_id}/agents/tools
1116
+ * Top tools by call count (`gen_ai.operation.type:tool`).
1117
+ */
1118
+ tools(options) {
1119
+ return (options.client ?? this.client).get({
1120
+ requestValidator: async (data) => await zod.object({
1121
+ body: zod.never().optional(),
1122
+ path: require_zod_gen.zAgentsToolsPath,
1123
+ query: require_zod_gen.zAgentsToolsQuery.optional()
1124
+ }).parseAsync(data),
1125
+ responseValidator: async (data) => await require_zod_gen.zAgentsToolsResponse.parseAsync(data),
1126
+ security: [{
1127
+ scheme: "bearer",
1128
+ type: "http"
1129
+ }],
1130
+ url: "/api/projects/{project_id}/agents/tools",
1131
+ ...options
1132
+ });
1133
+ }
1134
+ /**
1135
+ * GET /api/projects/{project_id}/agents/tools/stats
1136
+ */
1137
+ toolsTable(options) {
1138
+ return (options.client ?? this.client).get({
1139
+ requestValidator: async (data) => await zod.object({
1140
+ body: zod.never().optional(),
1141
+ path: require_zod_gen.zAgentsToolsTablePath,
1142
+ query: require_zod_gen.zAgentsToolsTableQuery.optional()
1143
+ }).parseAsync(data),
1144
+ responseValidator: async (data) => await require_zod_gen.zAgentsToolsTableResponse.parseAsync(data),
1145
+ security: [{
1146
+ scheme: "bearer",
1147
+ type: "http"
1148
+ }],
1149
+ url: "/api/projects/{project_id}/agents/tools/stats",
1150
+ ...options
1151
+ });
1152
+ }
1153
+ /**
1154
+ * GET /api/projects/{project_id}/agents/traces
1155
+ * Paginated per-trace_id aggregate (duration, tokens, tool usage) across
1156
+ * all AI spans sharing that trace, regardless of origin.
1157
+ */
1158
+ traces(options) {
1159
+ return (options.client ?? this.client).get({
1160
+ requestValidator: async (data) => await zod.object({
1161
+ body: zod.never().optional(),
1162
+ path: require_zod_gen.zAgentsTracesPath,
1163
+ query: require_zod_gen.zAgentsTracesQuery.optional()
1164
+ }).parseAsync(data),
1165
+ responseValidator: async (data) => await require_zod_gen.zAgentsTracesResponse.parseAsync(data),
1166
+ security: [{
1167
+ scheme: "bearer",
1168
+ type: "http"
1169
+ }],
1170
+ url: "/api/projects/{project_id}/agents/traces",
1171
+ ...options
1172
+ });
1173
+ }
1174
+ };
1175
+ var AlertRules = class extends HeyApiClient {
1176
+ /**
1177
+ * GET /api/projects/{project_id}/alert-history
1178
+ */
1179
+ listHistory(options) {
1180
+ return (options.client ?? this.client).get({
1181
+ requestValidator: async (data) => await zod.object({
1182
+ body: zod.never().optional(),
1183
+ path: require_zod_gen.zAlertRulesListHistoryPath,
1184
+ query: require_zod_gen.zAlertRulesListHistoryQuery.optional()
1185
+ }).parseAsync(data),
1186
+ responseValidator: async (data) => await require_zod_gen.zAlertRulesListHistoryResponse.parseAsync(data),
1187
+ security: [{
1188
+ scheme: "bearer",
1189
+ type: "http"
1190
+ }],
1191
+ url: "/api/projects/{project_id}/alert-history",
1192
+ ...options
1193
+ });
1194
+ }
1195
+ /**
1196
+ * GET /api/projects/{project_id}/alert-rules
1197
+ */
1198
+ list(options) {
1199
+ return (options.client ?? this.client).get({
1200
+ requestValidator: async (data) => await zod.object({
1201
+ body: zod.never().optional(),
1202
+ path: require_zod_gen.zAlertRulesListPath,
1203
+ query: zod.never().optional()
1204
+ }).parseAsync(data),
1205
+ responseValidator: async (data) => await require_zod_gen.zAlertRulesListResponse.parseAsync(data),
1206
+ security: [{
1207
+ scheme: "bearer",
1208
+ type: "http"
1209
+ }],
1210
+ url: "/api/projects/{project_id}/alert-rules",
1211
+ ...options
1212
+ });
1213
+ }
1214
+ /**
1215
+ * POST /api/projects/{project_id}/alert-rules
1216
+ */
1217
+ create(options) {
1218
+ return (options.client ?? this.client).post({
1219
+ requestValidator: async (data) => await zod.object({
1220
+ body: require_zod_gen.zAlertRulesCreateBody,
1221
+ path: require_zod_gen.zAlertRulesCreatePath,
1222
+ query: zod.never().optional()
1223
+ }).parseAsync(data),
1224
+ responseValidator: async (data) => await require_zod_gen.zAlertRulesCreateResponse.parseAsync(data),
1225
+ security: [{
1226
+ scheme: "bearer",
1227
+ type: "http"
1228
+ }],
1229
+ url: "/api/projects/{project_id}/alert-rules",
1230
+ ...options,
1231
+ headers: {
1232
+ "Content-Type": "application/json",
1233
+ ...options.headers
1234
+ }
1235
+ });
1236
+ }
1237
+ /**
1238
+ * DELETE /api/projects/{project_id}/alert-rules/{rule_id}
1239
+ */
1240
+ delete(options) {
1241
+ return (options.client ?? this.client).delete({
1242
+ requestValidator: async (data) => await zod.object({
1243
+ body: zod.never().optional(),
1244
+ path: require_zod_gen.zAlertRulesDeletePath,
1245
+ query: zod.never().optional()
1246
+ }).parseAsync(data),
1247
+ responseValidator: async (data) => await require_zod_gen.zAlertRulesDeleteResponse.parseAsync(data),
1248
+ security: [{
1249
+ scheme: "bearer",
1250
+ type: "http"
1251
+ }],
1252
+ url: "/api/projects/{project_id}/alert-rules/{rule_id}",
1253
+ ...options
1254
+ });
1255
+ }
1256
+ /**
1257
+ * GET /api/projects/{project_id}/alert-rules/{rule_id}
1258
+ */
1259
+ get(options) {
1260
+ return (options.client ?? this.client).get({
1261
+ requestValidator: async (data) => await zod.object({
1262
+ body: zod.never().optional(),
1263
+ path: require_zod_gen.zAlertRulesGetPath,
1264
+ query: zod.never().optional()
1265
+ }).parseAsync(data),
1266
+ responseValidator: async (data) => await require_zod_gen.zAlertRulesGetResponse.parseAsync(data),
1267
+ security: [{
1268
+ scheme: "bearer",
1269
+ type: "http"
1270
+ }],
1271
+ url: "/api/projects/{project_id}/alert-rules/{rule_id}",
1272
+ ...options
1273
+ });
1274
+ }
1275
+ /**
1276
+ * PATCH /api/projects/{project_id}/alert-rules/{rule_id}
1277
+ */
1278
+ update(options) {
1279
+ return (options.client ?? this.client).patch({
1280
+ requestValidator: async (data) => await zod.object({
1281
+ body: require_zod_gen.zAlertRulesUpdateBody,
1282
+ path: require_zod_gen.zAlertRulesUpdatePath,
1283
+ query: zod.never().optional()
1284
+ }).parseAsync(data),
1285
+ responseValidator: async (data) => await require_zod_gen.zAlertRulesUpdateResponse.parseAsync(data),
1286
+ security: [{
1287
+ scheme: "bearer",
1288
+ type: "http"
1289
+ }],
1290
+ url: "/api/projects/{project_id}/alert-rules/{rule_id}",
1291
+ ...options,
1292
+ headers: {
1293
+ "Content-Type": "application/json",
1294
+ ...options.headers
1295
+ }
1296
+ });
1297
+ }
1298
+ };
1299
+ var Events = class extends HeyApiClient {
1300
+ /**
1301
+ * Resolve the ID returned by a Sentry SDK without already knowing the issue.
1302
+ */
1303
+ getBySentryId(options) {
1304
+ return (options.client ?? this.client).get({
1305
+ requestValidator: async (data) => await zod.object({
1306
+ body: zod.never().optional(),
1307
+ path: require_zod_gen.zEventsGetBySentryIdPath,
1308
+ query: zod.never().optional()
1309
+ }).parseAsync(data),
1310
+ responseValidator: async (data) => await require_zod_gen.zEventsGetBySentryIdResponse.parseAsync(data),
1311
+ security: [{
1312
+ scheme: "bearer",
1313
+ type: "http"
1314
+ }],
1315
+ url: "/api/projects/{project_id}/events/sentry/{event_id}",
1316
+ ...options
1317
+ });
1318
+ }
1319
+ /**
1320
+ * GET /api/projects/{project_id}/issues/{issue_id}/events
1321
+ * Lists events for an issue with cursor-based pagination
1322
+ */
1323
+ list(options) {
1324
+ return (options.client ?? this.client).get({
1325
+ requestValidator: async (data) => await zod.object({
1326
+ body: zod.never().optional(),
1327
+ path: require_zod_gen.zEventsListPath,
1328
+ query: require_zod_gen.zEventsListQuery.optional()
1329
+ }).parseAsync(data),
1330
+ responseValidator: async (data) => await require_zod_gen.zEventsListResponse.parseAsync(data),
1331
+ security: [{
1332
+ scheme: "bearer",
1333
+ type: "http"
1334
+ }],
1335
+ url: "/api/projects/{project_id}/issues/{issue_id}/events",
1336
+ ...options
1337
+ });
1338
+ }
1339
+ /**
1340
+ * GET /api/projects/{project_id}/issues/{issue_id}/events/{event_id}
1341
+ * Gets a single event with full data
1342
+ */
1343
+ get(options) {
1344
+ return (options.client ?? this.client).get({
1345
+ requestValidator: async (data) => await zod.object({
1346
+ body: zod.never().optional(),
1347
+ path: require_zod_gen.zEventsGetPath,
1348
+ query: zod.never().optional()
1349
+ }).parseAsync(data),
1350
+ responseValidator: async (data) => await require_zod_gen.zEventsGetResponse.parseAsync(data),
1351
+ security: [{
1352
+ scheme: "bearer",
1353
+ type: "http"
1354
+ }],
1355
+ url: "/api/projects/{project_id}/issues/{issue_id}/events/{event_id}",
1356
+ ...options
1357
+ });
1358
+ }
1359
+ };
1360
+ var Stats = class extends HeyApiClient {
1361
+ /**
1362
+ * GET /api/projects/{project_id}/events/stats
1363
+ */
1364
+ getEventTimeseries(options) {
1365
+ return (options.client ?? this.client).get({
1366
+ requestValidator: async (data) => await zod.object({
1367
+ body: zod.never().optional(),
1368
+ path: require_zod_gen.zStatsGetEventTimeseriesPath,
1369
+ query: require_zod_gen.zStatsGetEventTimeseriesQuery.optional()
1370
+ }).parseAsync(data),
1371
+ responseValidator: async (data) => await require_zod_gen.zStatsGetEventTimeseriesResponse.parseAsync(data),
1372
+ security: [{
1373
+ scheme: "bearer",
1374
+ type: "http"
1375
+ }],
1376
+ url: "/api/projects/{project_id}/events/stats",
1377
+ ...options
1378
+ });
1379
+ }
1380
+ /**
1381
+ * GET /api/projects/{project_id}/stats/summary
1382
+ */
1383
+ getSummary(options) {
1384
+ return (options.client ?? this.client).get({
1385
+ requestValidator: async (data) => await zod.object({
1386
+ body: zod.never().optional(),
1387
+ path: require_zod_gen.zStatsGetSummaryPath,
1388
+ query: require_zod_gen.zStatsGetSummaryQuery.optional()
1389
+ }).parseAsync(data),
1390
+ responseValidator: async (data) => await require_zod_gen.zStatsGetSummaryResponse.parseAsync(data),
1391
+ security: [{
1392
+ scheme: "bearer",
1393
+ type: "http"
1394
+ }],
1395
+ url: "/api/projects/{project_id}/stats/summary",
1396
+ ...options
1397
+ });
1398
+ }
1399
+ };
1400
+ var Issues = class extends HeyApiClient {
1401
+ /**
1402
+ * DELETE /api/projects/{project_id}/issues (bulk delete by ids or filter)
1403
+ */
1404
+ bulkDelete(options) {
1405
+ return (options.client ?? this.client).delete({
1406
+ requestValidator: async (data) => await zod.object({
1407
+ body: require_zod_gen.zIssuesBulkDeleteBody,
1408
+ path: require_zod_gen.zIssuesBulkDeletePath,
1409
+ query: zod.never().optional()
1410
+ }).parseAsync(data),
1411
+ responseValidator: async (data) => await require_zod_gen.zIssuesBulkDeleteResponse.parseAsync(data),
1412
+ security: [{
1413
+ scheme: "bearer",
1414
+ type: "http"
1415
+ }],
1416
+ url: "/api/projects/{project_id}/issues",
1417
+ ...options,
1418
+ headers: {
1419
+ "Content-Type": "application/json",
1420
+ ...options.headers
1421
+ }
1422
+ });
1423
+ }
1424
+ /**
1425
+ * GET /api/projects/{project_id}/issues
1426
+ * Lists issues for a project with offset-based pagination
1427
+ */
1428
+ list(options) {
1429
+ return (options.client ?? this.client).get({
1430
+ requestValidator: async (data) => await zod.object({
1431
+ body: zod.never().optional(),
1432
+ path: require_zod_gen.zIssuesListPath,
1433
+ query: require_zod_gen.zIssuesListQuery.optional()
1434
+ }).parseAsync(data),
1435
+ responseValidator: async (data) => await require_zod_gen.zIssuesListResponse.parseAsync(data),
1436
+ security: [{
1437
+ scheme: "bearer",
1438
+ type: "http"
1439
+ }],
1440
+ url: "/api/projects/{project_id}/issues",
1441
+ ...options
1442
+ });
1443
+ }
1444
+ /**
1445
+ * PUT /api/projects/{project_id}/issues (bulk mutate)
1446
+ */
1447
+ bulkUpdate(options) {
1448
+ return (options.client ?? this.client).put({
1449
+ requestValidator: async (data) => await zod.object({
1450
+ body: require_zod_gen.zIssuesBulkUpdateBody,
1451
+ path: require_zod_gen.zIssuesBulkUpdatePath,
1452
+ query: zod.never().optional()
1453
+ }).parseAsync(data),
1454
+ responseValidator: async (data) => await require_zod_gen.zIssuesBulkUpdateResponse.parseAsync(data),
1455
+ security: [{
1456
+ scheme: "bearer",
1457
+ type: "http"
1458
+ }],
1459
+ url: "/api/projects/{project_id}/issues",
1460
+ ...options,
1461
+ headers: {
1462
+ "Content-Type": "application/json",
1463
+ ...options.headers
1464
+ }
1465
+ });
1466
+ }
1467
+ /**
1468
+ * DELETE /api/projects/{project_id}/issues/{issue_id}
1469
+ * Hard-deletes an issue and all associated events
1470
+ */
1471
+ delete(options) {
1472
+ return (options.client ?? this.client).delete({
1473
+ requestValidator: async (data) => await zod.object({
1474
+ body: zod.never().optional(),
1475
+ path: require_zod_gen.zIssuesDeletePath,
1476
+ query: zod.never().optional()
1477
+ }).parseAsync(data),
1478
+ responseValidator: async (data) => await require_zod_gen.zIssuesDeleteResponse.parseAsync(data),
1479
+ security: [{
1480
+ scheme: "bearer",
1481
+ type: "http"
1482
+ }],
1483
+ url: "/api/projects/{project_id}/issues/{issue_id}",
1484
+ ...options
1485
+ });
1486
+ }
1487
+ /**
1488
+ * GET /api/projects/{project_id}/issues/{issue_id}
1489
+ * Gets a single issue by ID
1490
+ */
1491
+ get(options) {
1492
+ return (options.client ?? this.client).get({
1493
+ requestValidator: async (data) => await zod.object({
1494
+ body: zod.never().optional(),
1495
+ path: require_zod_gen.zIssuesGetPath,
1496
+ query: zod.never().optional()
1497
+ }).parseAsync(data),
1498
+ responseValidator: async (data) => await require_zod_gen.zIssuesGetResponse.parseAsync(data),
1499
+ security: [{
1500
+ scheme: "bearer",
1501
+ type: "http"
1502
+ }],
1503
+ url: "/api/projects/{project_id}/issues/{issue_id}",
1504
+ ...options
1505
+ });
1506
+ }
1507
+ /**
1508
+ * PATCH /api/projects/{project_id}/issues/{issue_id}
1509
+ * Updates issue state (resolve, mute, etc.)
1510
+ */
1511
+ update(options) {
1512
+ return (options.client ?? this.client).patch({
1513
+ requestValidator: async (data) => await zod.object({
1514
+ body: require_zod_gen.zIssuesUpdateBody,
1515
+ path: require_zod_gen.zIssuesUpdatePath,
1516
+ query: zod.never().optional()
1517
+ }).parseAsync(data),
1518
+ responseValidator: async (data) => await require_zod_gen.zIssuesUpdateResponse.parseAsync(data),
1519
+ security: [{
1520
+ scheme: "bearer",
1521
+ type: "http"
1522
+ }],
1523
+ url: "/api/projects/{project_id}/issues/{issue_id}",
1524
+ ...options,
1525
+ headers: {
1526
+ "Content-Type": "application/json",
1527
+ ...options.headers
1528
+ }
1529
+ });
1530
+ }
1531
+ /**
1532
+ * GET /{issue_id}/activity — chronological activity log (incl. comments).
1533
+ */
1534
+ getActivity(options) {
1535
+ return (options.client ?? this.client).get({
1536
+ requestValidator: async (data) => await zod.object({
1537
+ body: zod.never().optional(),
1538
+ path: require_zod_gen.zIssuesGetActivityPath,
1539
+ query: zod.never().optional()
1540
+ }).parseAsync(data),
1541
+ responseValidator: async (data) => await require_zod_gen.zIssuesGetActivityResponse.parseAsync(data),
1542
+ security: [{
1543
+ scheme: "bearer",
1544
+ type: "http"
1545
+ }],
1546
+ url: "/api/projects/{project_id}/issues/{issue_id}/activity",
1547
+ ...options
1548
+ });
1549
+ }
1550
+ /**
1551
+ * GET /api/projects/{project_id}/issues/{issue_id}/aggregates
1552
+ * Returns the unique user count and top tags for the issue.
1553
+ */
1554
+ getAggregates(options) {
1555
+ return (options.client ?? this.client).get({
1556
+ requestValidator: async (data) => await zod.object({
1557
+ body: zod.never().optional(),
1558
+ path: require_zod_gen.zIssuesGetAggregatesPath,
1559
+ query: zod.never().optional()
1560
+ }).parseAsync(data),
1561
+ responseValidator: async (data) => await require_zod_gen.zIssuesGetAggregatesResponse.parseAsync(data),
1562
+ security: [{
1563
+ scheme: "bearer",
1564
+ type: "http"
1565
+ }],
1566
+ url: "/api/projects/{project_id}/issues/{issue_id}/aggregates",
1567
+ ...options
1568
+ });
1569
+ }
1570
+ /**
1571
+ * PUT /{issue_id}/bookmark — set/clear the per-user bookmark.
1572
+ */
1573
+ setBookmark(options) {
1574
+ return (options.client ?? this.client).put({
1575
+ requestValidator: async (data) => await zod.object({
1576
+ body: require_zod_gen.zIssuesSetBookmarkBody,
1577
+ path: require_zod_gen.zIssuesSetBookmarkPath,
1578
+ query: zod.never().optional()
1579
+ }).parseAsync(data),
1580
+ responseValidator: async (data) => await require_zod_gen.zIssuesSetBookmarkResponse.parseAsync(data),
1581
+ security: [{
1582
+ scheme: "bearer",
1583
+ type: "http"
1584
+ }],
1585
+ url: "/api/projects/{project_id}/issues/{issue_id}/bookmark",
1586
+ ...options,
1587
+ headers: {
1588
+ "Content-Type": "application/json",
1589
+ ...options.headers
1590
+ }
1591
+ });
1592
+ }
1593
+ /**
1594
+ * POST /{issue_id}/comments — add a note.
1595
+ */
1596
+ createComment(options) {
1597
+ return (options.client ?? this.client).post({
1598
+ requestValidator: async (data) => await zod.object({
1599
+ body: require_zod_gen.zIssuesCreateCommentBody,
1600
+ path: require_zod_gen.zIssuesCreateCommentPath,
1601
+ query: zod.never().optional()
1602
+ }).parseAsync(data),
1603
+ responseValidator: async (data) => await require_zod_gen.zIssuesCreateCommentResponse.parseAsync(data),
1604
+ security: [{
1605
+ scheme: "bearer",
1606
+ type: "http"
1607
+ }],
1608
+ url: "/api/projects/{project_id}/issues/{issue_id}/comments",
1609
+ ...options,
1610
+ headers: {
1611
+ "Content-Type": "application/json",
1612
+ ...options.headers
1613
+ }
1614
+ });
1615
+ }
1616
+ /**
1617
+ * GET /api/projects/{project_id}/issues/{issue_id}/hashes
1618
+ * Lists the grouping hashes that map to an issue.
1619
+ */
1620
+ getHashes(options) {
1621
+ return (options.client ?? this.client).get({
1622
+ requestValidator: async (data) => await zod.object({
1623
+ body: zod.never().optional(),
1624
+ path: require_zod_gen.zIssuesGetHashesPath,
1625
+ query: zod.never().optional()
1626
+ }).parseAsync(data),
1627
+ responseValidator: async (data) => await require_zod_gen.zIssuesGetHashesResponse.parseAsync(data),
1628
+ security: [{
1629
+ scheme: "bearer",
1630
+ type: "http"
1631
+ }],
1632
+ url: "/api/projects/{project_id}/issues/{issue_id}/hashes",
1633
+ ...options
1634
+ });
1635
+ }
1636
+ /**
1637
+ * POST /{issue_id}/seen — mark the issue as seen by the current user.
1638
+ */
1639
+ markSeen(options) {
1640
+ return (options.client ?? this.client).post({
1641
+ requestValidator: async (data) => await zod.object({
1642
+ body: zod.never().optional(),
1643
+ path: require_zod_gen.zIssuesMarkSeenPath,
1644
+ query: zod.never().optional()
1645
+ }).parseAsync(data),
1646
+ responseValidator: async (data) => await require_zod_gen.zIssuesMarkSeenResponse.parseAsync(data),
1647
+ security: [{
1648
+ scheme: "bearer",
1649
+ type: "http"
1650
+ }],
1651
+ url: "/api/projects/{project_id}/issues/{issue_id}/seen",
1652
+ ...options
1653
+ });
1654
+ }
1655
+ /**
1656
+ * GET /{issue_id}/stats?window=24h|30d — zero-filled event-count timeseries.
1657
+ */
1658
+ getStats(options) {
1659
+ return (options.client ?? this.client).get({
1660
+ requestValidator: async (data) => await zod.object({
1661
+ body: zod.never().optional(),
1662
+ path: require_zod_gen.zIssuesGetStatsPath,
1663
+ query: require_zod_gen.zIssuesGetStatsQuery.optional()
1664
+ }).parseAsync(data),
1665
+ responseValidator: async (data) => await require_zod_gen.zIssuesGetStatsResponse.parseAsync(data),
1666
+ security: [{
1667
+ scheme: "bearer",
1668
+ type: "http"
1669
+ }],
1670
+ url: "/api/projects/{project_id}/issues/{issue_id}/stats",
1671
+ ...options
1672
+ });
1673
+ }
1674
+ /**
1675
+ * PUT /{issue_id}/subscription — set/clear the per-user subscription.
1676
+ */
1677
+ setSubscription(options) {
1678
+ return (options.client ?? this.client).put({
1679
+ requestValidator: async (data) => await zod.object({
1680
+ body: require_zod_gen.zIssuesSetSubscriptionBody,
1681
+ path: require_zod_gen.zIssuesSetSubscriptionPath,
1682
+ query: zod.never().optional()
1683
+ }).parseAsync(data),
1684
+ responseValidator: async (data) => await require_zod_gen.zIssuesSetSubscriptionResponse.parseAsync(data),
1685
+ security: [{
1686
+ scheme: "bearer",
1687
+ type: "http"
1688
+ }],
1689
+ url: "/api/projects/{project_id}/issues/{issue_id}/subscription",
1690
+ ...options,
1691
+ headers: {
1692
+ "Content-Type": "application/json",
1693
+ ...options.headers
1694
+ }
1695
+ });
1696
+ }
1697
+ /**
1698
+ * GET /api/projects/{project_id}/issues/{issue_id}/tags/{key}
1699
+ * Lists the distinct values (with counts) for a tag key across the issue.
1700
+ */
1701
+ getTagValues(options) {
1702
+ return (options.client ?? this.client).get({
1703
+ requestValidator: async (data) => await zod.object({
1704
+ body: zod.never().optional(),
1705
+ path: require_zod_gen.zIssuesGetTagValuesPath,
1706
+ query: zod.never().optional()
1707
+ }).parseAsync(data),
1708
+ responseValidator: async (data) => await require_zod_gen.zIssuesGetTagValuesResponse.parseAsync(data),
1709
+ security: [{
1710
+ scheme: "bearer",
1711
+ type: "http"
1712
+ }],
1713
+ url: "/api/projects/{project_id}/issues/{issue_id}/tags/{key}",
1714
+ ...options
1715
+ });
1716
+ }
1717
+ /**
1718
+ * GET /{issue_id}/user-reports — list user feedback for an issue.
1719
+ */
1720
+ listUserReports(options) {
1721
+ return (options.client ?? this.client).get({
1722
+ requestValidator: async (data) => await zod.object({
1723
+ body: zod.never().optional(),
1724
+ path: require_zod_gen.zIssuesListUserReportsPath,
1725
+ query: zod.never().optional()
1726
+ }).parseAsync(data),
1727
+ responseValidator: async (data) => await require_zod_gen.zIssuesListUserReportsResponse.parseAsync(data),
1728
+ security: [{
1729
+ scheme: "bearer",
1730
+ type: "http"
1731
+ }],
1732
+ url: "/api/projects/{project_id}/issues/{issue_id}/user-reports",
1733
+ ...options
1734
+ });
1735
+ }
1736
+ /**
1737
+ * POST /{issue_id}/user-reports — attach user feedback to an issue.
1738
+ */
1739
+ createUserReport(options) {
1740
+ return (options.client ?? this.client).post({
1741
+ requestValidator: async (data) => await zod.object({
1742
+ body: require_zod_gen.zIssuesCreateUserReportBody,
1743
+ path: require_zod_gen.zIssuesCreateUserReportPath,
1744
+ query: zod.never().optional()
1745
+ }).parseAsync(data),
1746
+ responseValidator: async (data) => await require_zod_gen.zIssuesCreateUserReportResponse.parseAsync(data),
1747
+ security: [{
1748
+ scheme: "bearer",
1749
+ type: "http"
1750
+ }],
1751
+ url: "/api/projects/{project_id}/issues/{issue_id}/user-reports",
1752
+ ...options,
1753
+ headers: {
1754
+ "Content-Type": "application/json",
1755
+ ...options.headers
1756
+ }
1757
+ });
1758
+ }
1759
+ };
1760
+ var Logs = class extends HeyApiClient {
1761
+ /**
1762
+ * GET /api/projects/{project_id}/logs
1763
+ * Lists logs for a project with offset-based pagination (newest first by
1764
+ * log timestamp), optionally filtered by level/trace_id.
1765
+ */
1766
+ list(options) {
1767
+ return (options.client ?? this.client).get({
1768
+ requestValidator: async (data) => await zod.object({
1769
+ body: zod.never().optional(),
1770
+ path: require_zod_gen.zLogsListPath,
1771
+ query: require_zod_gen.zLogsListQuery.optional()
1772
+ }).parseAsync(data),
1773
+ responseValidator: async (data) => await require_zod_gen.zLogsListResponse.parseAsync(data),
1774
+ security: [{
1775
+ scheme: "bearer",
1776
+ type: "http"
1777
+ }],
1778
+ url: "/api/projects/{project_id}/logs",
1779
+ ...options
1780
+ });
1781
+ }
1782
+ };
1783
+ var Members = class extends HeyApiClient {
1784
+ /**
1785
+ * GET /api/projects/{project_id}/members
1786
+ */
1787
+ list(options) {
1788
+ return (options.client ?? this.client).get({
1789
+ requestValidator: async (data) => await zod.object({
1790
+ body: zod.never().optional(),
1791
+ path: require_zod_gen.zMembersListPath,
1792
+ query: zod.never().optional()
1793
+ }).parseAsync(data),
1794
+ responseValidator: async (data) => await require_zod_gen.zMembersListResponse.parseAsync(data),
1795
+ security: [{
1796
+ scheme: "bearer",
1797
+ type: "http"
1798
+ }],
1799
+ url: "/api/projects/{project_id}/members",
1800
+ ...options
1801
+ });
1802
+ }
1803
+ /**
1804
+ * PUT /api/projects/{project_id}/members
1805
+ */
1806
+ upsert(options) {
1807
+ return (options.client ?? this.client).put({
1808
+ requestValidator: async (data) => await zod.object({
1809
+ body: require_zod_gen.zMembersUpsertBody,
1810
+ path: require_zod_gen.zMembersUpsertPath,
1811
+ query: zod.never().optional()
1812
+ }).parseAsync(data),
1813
+ responseValidator: async (data) => await require_zod_gen.zMembersUpsertResponse.parseAsync(data),
1814
+ security: [{
1815
+ scheme: "bearer",
1816
+ type: "http"
1817
+ }],
1818
+ url: "/api/projects/{project_id}/members",
1819
+ ...options,
1820
+ headers: {
1821
+ "Content-Type": "application/json",
1822
+ ...options.headers
1823
+ }
1824
+ });
1825
+ }
1826
+ /**
1827
+ * DELETE /api/projects/{project_id}/members/{user_id}
1828
+ */
1829
+ remove(options) {
1830
+ return (options.client ?? this.client).delete({
1831
+ requestValidator: async (data) => await zod.object({
1832
+ body: zod.never().optional(),
1833
+ path: require_zod_gen.zMembersRemovePath,
1834
+ query: zod.never().optional()
1835
+ }).parseAsync(data),
1836
+ responseValidator: async (data) => await require_zod_gen.zMembersRemoveResponse.parseAsync(data),
1837
+ security: [{
1838
+ scheme: "bearer",
1839
+ type: "http"
1840
+ }],
1841
+ url: "/api/projects/{project_id}/members/{user_id}",
1842
+ ...options
1843
+ });
1844
+ }
1845
+ };
1846
+ var Monitors = class extends HeyApiClient {
1847
+ /**
1848
+ * GET /api/projects/{project_id}/monitors
1849
+ */
1850
+ list(options) {
1851
+ return (options.client ?? this.client).get({
1852
+ requestValidator: async (data) => await zod.object({
1853
+ body: zod.never().optional(),
1854
+ path: require_zod_gen.zMonitorsListPath,
1855
+ query: zod.never().optional()
1856
+ }).parseAsync(data),
1857
+ responseValidator: async (data) => await require_zod_gen.zMonitorsListResponse.parseAsync(data),
1858
+ security: [{
1859
+ scheme: "bearer",
1860
+ type: "http"
1861
+ }],
1862
+ url: "/api/projects/{project_id}/monitors",
1863
+ ...options
1864
+ });
1865
+ }
1866
+ /**
1867
+ * POST /api/projects/{project_id}/monitors
1868
+ */
1869
+ create(options) {
1870
+ return (options.client ?? this.client).post({
1871
+ requestValidator: async (data) => await zod.object({
1872
+ body: require_zod_gen.zMonitorsCreateBody,
1873
+ path: require_zod_gen.zMonitorsCreatePath,
1874
+ query: zod.never().optional()
1875
+ }).parseAsync(data),
1876
+ responseValidator: async (data) => await require_zod_gen.zMonitorsCreateResponse.parseAsync(data),
1877
+ security: [{
1878
+ scheme: "bearer",
1879
+ type: "http"
1880
+ }],
1881
+ url: "/api/projects/{project_id}/monitors",
1882
+ ...options,
1883
+ headers: {
1884
+ "Content-Type": "application/json",
1885
+ ...options.headers
1886
+ }
1887
+ });
1888
+ }
1889
+ /**
1890
+ * DELETE /api/projects/{project_id}/monitors/{slug}
1891
+ */
1892
+ delete(options) {
1893
+ return (options.client ?? this.client).delete({
1894
+ requestValidator: async (data) => await zod.object({
1895
+ body: zod.never().optional(),
1896
+ path: require_zod_gen.zMonitorsDeletePath,
1897
+ query: zod.never().optional()
1898
+ }).parseAsync(data),
1899
+ responseValidator: async (data) => await require_zod_gen.zMonitorsDeleteResponse.parseAsync(data),
1900
+ security: [{
1901
+ scheme: "bearer",
1902
+ type: "http"
1903
+ }],
1904
+ url: "/api/projects/{project_id}/monitors/{slug}",
1905
+ ...options
1906
+ });
1907
+ }
1908
+ /**
1909
+ * GET /api/projects/{project_id}/monitors/{slug}
1910
+ */
1911
+ get(options) {
1912
+ return (options.client ?? this.client).get({
1913
+ requestValidator: async (data) => await zod.object({
1914
+ body: zod.never().optional(),
1915
+ path: require_zod_gen.zMonitorsGetPath,
1916
+ query: zod.never().optional()
1917
+ }).parseAsync(data),
1918
+ responseValidator: async (data) => await require_zod_gen.zMonitorsGetResponse.parseAsync(data),
1919
+ security: [{
1920
+ scheme: "bearer",
1921
+ type: "http"
1922
+ }],
1923
+ url: "/api/projects/{project_id}/monitors/{slug}",
1924
+ ...options
1925
+ });
1926
+ }
1927
+ /**
1928
+ * PUT /api/projects/{project_id}/monitors/{slug}
1929
+ */
1930
+ update(options) {
1931
+ return (options.client ?? this.client).put({
1932
+ requestValidator: async (data) => await zod.object({
1933
+ body: require_zod_gen.zMonitorsUpdateBody,
1934
+ path: require_zod_gen.zMonitorsUpdatePath,
1935
+ query: zod.never().optional()
1936
+ }).parseAsync(data),
1937
+ responseValidator: async (data) => await require_zod_gen.zMonitorsUpdateResponse.parseAsync(data),
1938
+ security: [{
1939
+ scheme: "bearer",
1940
+ type: "http"
1941
+ }],
1942
+ url: "/api/projects/{project_id}/monitors/{slug}",
1943
+ ...options,
1944
+ headers: {
1945
+ "Content-Type": "application/json",
1946
+ ...options.headers
1947
+ }
1948
+ });
1949
+ }
1950
+ /**
1951
+ * GET /api/projects/{project_id}/monitors/{slug}/checkins
1952
+ */
1953
+ listCheckins(options) {
1954
+ return (options.client ?? this.client).get({
1955
+ requestValidator: async (data) => await zod.object({
1956
+ body: zod.never().optional(),
1957
+ path: require_zod_gen.zMonitorsListCheckinsPath,
1958
+ query: require_zod_gen.zMonitorsListCheckinsQuery.optional()
1959
+ }).parseAsync(data),
1960
+ responseValidator: async (data) => await require_zod_gen.zMonitorsListCheckinsResponse.parseAsync(data),
1961
+ security: [{
1962
+ scheme: "bearer",
1963
+ type: "http"
1964
+ }],
1965
+ url: "/api/projects/{project_id}/monitors/{slug}/checkins",
1966
+ ...options
1967
+ });
1968
+ }
1969
+ };
1970
+ var Sessions = class extends HeyApiClient {
1971
+ /**
1972
+ * GET /api/projects/{project_id}/sessions/stats
1973
+ */
1974
+ getStats(options) {
1975
+ return (options.client ?? this.client).get({
1976
+ requestValidator: async (data) => await zod.object({
1977
+ body: zod.never().optional(),
1978
+ path: require_zod_gen.zSessionsGetStatsPath,
1979
+ query: require_zod_gen.zSessionsGetStatsQuery.optional()
1980
+ }).parseAsync(data),
1981
+ responseValidator: async (data) => await require_zod_gen.zSessionsGetStatsResponse.parseAsync(data),
1982
+ security: [{
1983
+ scheme: "bearer",
1984
+ type: "http"
1985
+ }],
1986
+ url: "/api/projects/{project_id}/sessions/stats",
1987
+ ...options
1988
+ });
1989
+ }
1990
+ /**
1991
+ * GET /api/projects/{project_id}/sessions/summary
1992
+ */
1993
+ getSummary(options) {
1994
+ return (options.client ?? this.client).get({
1995
+ requestValidator: async (data) => await zod.object({
1996
+ body: zod.never().optional(),
1997
+ path: require_zod_gen.zSessionsGetSummaryPath,
1998
+ query: require_zod_gen.zSessionsGetSummaryQuery.optional()
1999
+ }).parseAsync(data),
2000
+ responseValidator: async (data) => await require_zod_gen.zSessionsGetSummaryResponse.parseAsync(data),
2001
+ security: [{
2002
+ scheme: "bearer",
2003
+ type: "http"
2004
+ }],
2005
+ url: "/api/projects/{project_id}/sessions/summary",
2006
+ ...options
2007
+ });
2008
+ }
2009
+ /**
2010
+ * GET /api/projects/{project_id}/sessions/timeseries
2011
+ */
2012
+ getTimeseries(options) {
2013
+ return (options.client ?? this.client).get({
2014
+ requestValidator: async (data) => await zod.object({
2015
+ body: zod.never().optional(),
2016
+ path: require_zod_gen.zSessionsGetTimeseriesPath,
2017
+ query: require_zod_gen.zSessionsGetTimeseriesQuery.optional()
2018
+ }).parseAsync(data),
2019
+ responseValidator: async (data) => await require_zod_gen.zSessionsGetTimeseriesResponse.parseAsync(data),
2020
+ security: [{
2021
+ scheme: "bearer",
2022
+ type: "http"
2023
+ }],
2024
+ url: "/api/projects/{project_id}/sessions/timeseries",
2025
+ ...options
2026
+ });
2027
+ }
2028
+ };
2029
+ var Spans = class extends HeyApiClient {
2030
+ /**
2031
+ * GET /api/projects/{project_id}/spans
2032
+ * Lists spans for a project with offset-based pagination (newest by
2033
+ * start_timestamp first), optionally filtered by op/status/trace_id.
2034
+ * Returns spans regardless of origin — standalone or extracted from a
2035
+ * transaction — since both are stored in the same table.
2036
+ */
2037
+ list(options) {
2038
+ return (options.client ?? this.client).get({
2039
+ requestValidator: async (data) => await zod.object({
2040
+ body: zod.never().optional(),
2041
+ path: require_zod_gen.zSpansListPath,
2042
+ query: require_zod_gen.zSpansListQuery.optional()
2043
+ }).parseAsync(data),
2044
+ responseValidator: async (data) => await require_zod_gen.zSpansListResponse.parseAsync(data),
2045
+ security: [{
2046
+ scheme: "bearer",
2047
+ type: "http"
2048
+ }],
2049
+ url: "/api/projects/{project_id}/spans",
2050
+ ...options
2051
+ });
2052
+ }
2053
+ /**
2054
+ * GET /api/projects/{project_id}/spans/{span_id}
2055
+ * Returns one span together with its attributes and tags — the `gen_ai.*`
2056
+ * payload (prompts, responses, tool arguments and results) that the list
2057
+ * response deliberately omits, since `spans.data` is untrimmed and a whole
2058
+ * trace's worth of it would dwarf the waterfall it is drawn from.
2059
+ */
2060
+ get(options) {
2061
+ return (options.client ?? this.client).get({
2062
+ requestValidator: async (data) => await zod.object({
2063
+ body: zod.never().optional(),
2064
+ path: require_zod_gen.zSpansGetPath,
2065
+ query: zod.never().optional()
2066
+ }).parseAsync(data),
2067
+ responseValidator: async (data) => await require_zod_gen.zSpansGetResponse.parseAsync(data),
2068
+ security: [{
2069
+ scheme: "bearer",
2070
+ type: "http"
2071
+ }],
2072
+ url: "/api/projects/{project_id}/spans/{span_id}",
2073
+ ...options
2074
+ });
2075
+ }
2076
+ };
2077
+ var Transactions = class extends HeyApiClient {
2078
+ /**
2079
+ * GET /api/projects/{project_id}/transactions
2080
+ * Lists transactions for a project with offset-based pagination (newest first).
2081
+ */
2082
+ list(options) {
2083
+ return (options.client ?? this.client).get({
2084
+ requestValidator: async (data) => await zod.object({
2085
+ body: zod.never().optional(),
2086
+ path: require_zod_gen.zTransactionsListPath,
2087
+ query: require_zod_gen.zTransactionsListQuery.optional()
2088
+ }).parseAsync(data),
2089
+ responseValidator: async (data) => await require_zod_gen.zTransactionsListResponse.parseAsync(data),
2090
+ security: [{
2091
+ scheme: "bearer",
2092
+ type: "http"
2093
+ }],
2094
+ url: "/api/projects/{project_id}/transactions",
2095
+ ...options
2096
+ });
2097
+ }
2098
+ /**
2099
+ * GET /api/projects/{project_id}/transactions/stats
2100
+ * Returns paginated aggregate performance stats (count, p50/p95/p99 latency,
2101
+ * failure rate) grouped by transaction name + op, most frequent first.
2102
+ */
2103
+ getStats(options) {
2104
+ return (options.client ?? this.client).get({
2105
+ requestValidator: async (data) => await zod.object({
2106
+ body: zod.never().optional(),
2107
+ path: require_zod_gen.zTransactionsGetStatsPath,
2108
+ query: require_zod_gen.zTransactionsGetStatsQuery.optional()
2109
+ }).parseAsync(data),
2110
+ responseValidator: async (data) => await require_zod_gen.zTransactionsGetStatsResponse.parseAsync(data),
2111
+ security: [{
2112
+ scheme: "bearer",
2113
+ type: "http"
2114
+ }],
2115
+ url: "/api/projects/{project_id}/transactions/stats",
2116
+ ...options
2117
+ });
2118
+ }
2119
+ /**
2120
+ * GET /api/projects/{project_id}/transactions/stats/group?name=&op=
2121
+ * Returns the aggregate stats for a single transaction group — a direct lookup
2122
+ * so the summary header works regardless of how many groups the project has.
2123
+ */
2124
+ getStatGroup(options) {
2125
+ return (options.client ?? this.client).get({
2126
+ requestValidator: async (data) => await zod.object({
2127
+ body: zod.never().optional(),
2128
+ path: require_zod_gen.zTransactionsGetStatGroupPath,
2129
+ query: require_zod_gen.zTransactionsGetStatGroupQuery
2130
+ }).parseAsync(data),
2131
+ responseValidator: async (data) => await require_zod_gen.zTransactionsGetStatGroupResponse.parseAsync(data),
2132
+ security: [{
2133
+ scheme: "bearer",
2134
+ type: "http"
2135
+ }],
2136
+ url: "/api/projects/{project_id}/transactions/stats/group",
2137
+ ...options
2138
+ });
2139
+ }
2140
+ /**
2141
+ * GET /api/projects/{project_id}/transactions/{transaction_id}
2142
+ * Returns a single transaction with its full Sentry payload (spans, contexts,
2143
+ * measurements, tags) for the performance detail view.
2144
+ */
2145
+ get(options) {
2146
+ return (options.client ?? this.client).get({
2147
+ requestValidator: async (data) => await zod.object({
2148
+ body: zod.never().optional(),
2149
+ path: require_zod_gen.zTransactionsGetPath,
2150
+ query: zod.never().optional()
2151
+ }).parseAsync(data),
2152
+ responseValidator: async (data) => await require_zod_gen.zTransactionsGetResponse.parseAsync(data),
2153
+ security: [{
2154
+ scheme: "bearer",
2155
+ type: "http"
2156
+ }],
2157
+ url: "/api/projects/{project_id}/transactions/{transaction_id}",
2158
+ ...options
2159
+ });
2160
+ }
2161
+ /**
2162
+ * GET /api/projects/{project_id}/transactions/{transaction_id}/spans
2163
+ * Returns the indexed spans extracted from a transaction, ordered for the
2164
+ * waterfall view (by start_timestamp ascending).
2165
+ */
2166
+ getSpans(options) {
2167
+ return (options.client ?? this.client).get({
2168
+ requestValidator: async (data) => await zod.object({
2169
+ body: zod.never().optional(),
2170
+ path: require_zod_gen.zTransactionsGetSpansPath,
2171
+ query: zod.never().optional()
2172
+ }).parseAsync(data),
2173
+ responseValidator: async (data) => await require_zod_gen.zTransactionsGetSpansResponse.parseAsync(data),
2174
+ security: [{
2175
+ scheme: "bearer",
2176
+ type: "http"
2177
+ }],
2178
+ url: "/api/projects/{project_id}/transactions/{transaction_id}/spans",
2179
+ ...options
2180
+ });
2181
+ }
2182
+ };
2183
+ var Schedules = class extends HeyApiClient {
2184
+ /**
2185
+ * POST /api/schedules/preview
2186
+ *
2187
+ * Validates a schedule and lists its next five runs from now, so no client
2188
+ * ever parses a crontab itself.
2189
+ */
2190
+ preview(options) {
2191
+ return (options.client ?? this.client).post({
2192
+ requestValidator: async (data) => await zod.object({
2193
+ body: require_zod_gen.zSchedulesPreviewBody,
2194
+ path: zod.never().optional(),
2195
+ query: zod.never().optional()
2196
+ }).parseAsync(data),
2197
+ responseValidator: async (data) => await require_zod_gen.zSchedulesPreviewResponse.parseAsync(data),
2198
+ security: [{
2199
+ scheme: "bearer",
2200
+ type: "http"
2201
+ }],
2202
+ url: "/api/schedules/preview",
2203
+ ...options,
2204
+ headers: {
2205
+ "Content-Type": "application/json",
2206
+ ...options.headers
2207
+ }
2208
+ });
2209
+ }
2210
+ };
2211
+ var Settings = class extends HeyApiClient {
2212
+ /**
2213
+ * Whether the MCP endpoint at `/mcp` is on.
2214
+ */
2215
+ getMcp(options) {
2216
+ return (options?.client ?? this.client).get({
2217
+ requestValidator: async (data) => await zod.object({
2218
+ body: zod.never().optional(),
2219
+ path: zod.never().optional(),
2220
+ query: zod.never().optional()
2221
+ }).parseAsync(data),
2222
+ responseValidator: async (data) => await require_zod_gen.zSettingsGetMcpResponse.parseAsync(data),
2223
+ security: [{
2224
+ scheme: "bearer",
2225
+ type: "http"
2226
+ }],
2227
+ url: "/api/settings/mcp",
2228
+ ...options
2229
+ });
2230
+ }
2231
+ /**
2232
+ * Turns the MCP endpoint at `/mcp` on or off. Instance admins only.
2233
+ */
2234
+ updateMcp(options) {
2235
+ return (options.client ?? this.client).put({
2236
+ requestValidator: async (data) => await zod.object({
2237
+ body: require_zod_gen.zSettingsUpdateMcpBody,
2238
+ path: zod.never().optional(),
2239
+ query: zod.never().optional()
2240
+ }).parseAsync(data),
2241
+ responseValidator: async (data) => await require_zod_gen.zSettingsUpdateMcpResponse.parseAsync(data),
2242
+ security: [{
2243
+ scheme: "bearer",
2244
+ type: "http"
2245
+ }],
2246
+ url: "/api/settings/mcp",
2247
+ ...options,
2248
+ headers: {
2249
+ "Content-Type": "application/json",
2250
+ ...options.headers
2251
+ }
2252
+ });
2253
+ }
2254
+ };
2255
+ var Storage = class extends HeyApiClient {
2256
+ /**
2257
+ * GET /api/storage/age — rows per age bucket, per project and kind.
2258
+ */
2259
+ getAge(options) {
2260
+ return (options?.client ?? this.client).get({
2261
+ requestValidator: async (data) => await zod.object({
2262
+ body: zod.never().optional(),
2263
+ path: zod.never().optional(),
2264
+ query: zod.never().optional()
2265
+ }).parseAsync(data),
2266
+ responseValidator: async (data) => await require_zod_gen.zStorageGetAgeResponse.parseAsync(data),
2267
+ security: [{
2268
+ scheme: "bearer",
2269
+ type: "http"
2270
+ }],
2271
+ url: "/api/storage/age",
2272
+ ...options
2273
+ });
2274
+ }
2275
+ /**
2276
+ * POST /api/storage/cleanup — starts deleting old data and the issues it
2277
+ * empties. Returns at once: the purge runs detached, in batches, and
2278
+ * `GET /api/storage/cleanup/status` reports its progress.
2279
+ */
2280
+ executeCleanup(options) {
2281
+ return (options.client ?? this.client).post({
2282
+ requestValidator: async (data) => await zod.object({
2283
+ body: require_zod_gen.zStorageExecuteCleanupBody,
2284
+ path: zod.never().optional(),
2285
+ query: zod.never().optional()
2286
+ }).parseAsync(data),
2287
+ responseValidator: async (data) => await require_zod_gen.zStorageExecuteCleanupResponse.parseAsync(data),
2288
+ security: [{
2289
+ scheme: "bearer",
2290
+ type: "http"
2291
+ }],
2292
+ url: "/api/storage/cleanup",
2293
+ ...options,
2294
+ headers: {
2295
+ "Content-Type": "application/json",
2296
+ ...options.headers
2297
+ }
2298
+ });
2299
+ }
2300
+ /**
2301
+ * POST /api/storage/cleanup/preview — dry-run count, mutates nothing.
2302
+ */
2303
+ previewCleanup(options) {
2304
+ return (options.client ?? this.client).post({
2305
+ requestValidator: async (data) => await zod.object({
2306
+ body: require_zod_gen.zStoragePreviewCleanupBody,
2307
+ path: zod.never().optional(),
2308
+ query: zod.never().optional()
2309
+ }).parseAsync(data),
2310
+ responseValidator: async (data) => await require_zod_gen.zStoragePreviewCleanupResponse.parseAsync(data),
2311
+ security: [{
2312
+ scheme: "bearer",
2313
+ type: "http"
2314
+ }],
2315
+ url: "/api/storage/cleanup/preview",
2316
+ ...options,
2317
+ headers: {
2318
+ "Content-Type": "application/json",
2319
+ ...options.headers
2320
+ }
2321
+ });
2322
+ }
2323
+ /**
2324
+ * GET /api/storage/cleanup/status — progress of the running cleanup, or the
2325
+ * outcome of the last one.
2326
+ */
2327
+ getCleanupStatus(options) {
2328
+ return (options?.client ?? this.client).get({
2329
+ requestValidator: async (data) => await zod.object({
2330
+ body: zod.never().optional(),
2331
+ path: zod.never().optional(),
2332
+ query: zod.never().optional()
2333
+ }).parseAsync(data),
2334
+ responseValidator: async (data) => await require_zod_gen.zStorageGetCleanupStatusResponse.parseAsync(data),
2335
+ security: [{
2336
+ scheme: "bearer",
2337
+ type: "http"
2338
+ }],
2339
+ url: "/api/storage/cleanup/status",
2340
+ ...options
2341
+ });
2342
+ }
2343
+ /**
2344
+ * GET /api/storage/projects — per-project counts and estimated weight.
2345
+ */
2346
+ getProjects(options) {
2347
+ return (options?.client ?? this.client).get({
2348
+ requestValidator: async (data) => await zod.object({
2349
+ body: zod.never().optional(),
2350
+ path: zod.never().optional(),
2351
+ query: zod.never().optional()
2352
+ }).parseAsync(data),
2353
+ responseValidator: async (data) => await require_zod_gen.zStorageGetProjectsResponse.parseAsync(data),
2354
+ security: [{
2355
+ scheme: "bearer",
2356
+ type: "http"
2357
+ }],
2358
+ url: "/api/storage/projects",
2359
+ ...options
2360
+ });
2361
+ }
2362
+ /**
2363
+ * GET /api/storage/retention
2364
+ */
2365
+ getRetention(options) {
2366
+ return (options?.client ?? this.client).get({
2367
+ requestValidator: async (data) => await zod.object({
2368
+ body: zod.never().optional(),
2369
+ path: zod.never().optional(),
2370
+ query: zod.never().optional()
2371
+ }).parseAsync(data),
2372
+ responseValidator: async (data) => await require_zod_gen.zStorageGetRetentionResponse.parseAsync(data),
2373
+ security: [{
2374
+ scheme: "bearer",
2375
+ type: "http"
2376
+ }],
2377
+ url: "/api/storage/retention",
2378
+ ...options
2379
+ });
2380
+ }
2381
+ /**
2382
+ * PUT /api/storage/retention
2383
+ */
2384
+ updateRetention(options) {
2385
+ return (options.client ?? this.client).put({
2386
+ requestValidator: async (data) => await zod.object({
2387
+ body: require_zod_gen.zStorageUpdateRetentionBody,
2388
+ path: zod.never().optional(),
2389
+ query: zod.never().optional()
2390
+ }).parseAsync(data),
2391
+ responseValidator: async (data) => await require_zod_gen.zStorageUpdateRetentionResponse.parseAsync(data),
2392
+ security: [{
2393
+ scheme: "bearer",
2394
+ type: "http"
2395
+ }],
2396
+ url: "/api/storage/retention",
2397
+ ...options,
2398
+ headers: {
2399
+ "Content-Type": "application/json",
2400
+ ...options.headers
2401
+ }
2402
+ });
2403
+ }
2404
+ /**
2405
+ * POST /api/storage/retention/preview — what saving these settings would
2406
+ * delete on the next cleanup, without saving or deleting anything.
2407
+ */
2408
+ previewRetention(options) {
2409
+ return (options.client ?? this.client).post({
2410
+ requestValidator: async (data) => await zod.object({
2411
+ body: require_zod_gen.zStoragePreviewRetentionBody,
2412
+ path: zod.never().optional(),
2413
+ query: zod.never().optional()
2414
+ }).parseAsync(data),
2415
+ responseValidator: async (data) => await require_zod_gen.zStoragePreviewRetentionResponse.parseAsync(data),
2416
+ security: [{
2417
+ scheme: "bearer",
2418
+ type: "http"
2419
+ }],
2420
+ url: "/api/storage/retention/preview",
2421
+ ...options,
2422
+ headers: {
2423
+ "Content-Type": "application/json",
2424
+ ...options.headers
2425
+ }
2426
+ });
2427
+ }
2428
+ /**
2429
+ * POST /api/storage/retention/run — enforces the saved retention now,
2430
+ * without waiting for the schedule. Follow it with the cleanup status.
2431
+ */
2432
+ runRetention(options) {
2433
+ return (options?.client ?? this.client).post({
2434
+ requestValidator: async (data) => await zod.object({
2435
+ body: zod.never().optional(),
2436
+ path: zod.never().optional(),
2437
+ query: zod.never().optional()
2438
+ }).parseAsync(data),
2439
+ responseValidator: async (data) => await require_zod_gen.zStorageRunRetentionResponse.parseAsync(data),
2440
+ security: [{
2441
+ scheme: "bearer",
2442
+ type: "http"
2443
+ }],
2444
+ url: "/api/storage/retention/run",
2445
+ ...options
2446
+ });
2447
+ }
2448
+ /**
2449
+ * POST /api/storage/source-maps/gc — delete orphaned source maps (DB + disk).
2450
+ */
2451
+ gcSourceMaps(options) {
2452
+ return (options?.client ?? this.client).post({
2453
+ requestValidator: async (data) => await zod.object({
2454
+ body: zod.never().optional(),
2455
+ path: zod.never().optional(),
2456
+ query: zod.never().optional()
2457
+ }).parseAsync(data),
2458
+ responseValidator: async (data) => await require_zod_gen.zStorageGcSourceMapsResponse.parseAsync(data),
2459
+ security: [{
2460
+ scheme: "bearer",
2461
+ type: "http"
2462
+ }],
2463
+ url: "/api/storage/source-maps/gc",
2464
+ ...options
2465
+ });
2466
+ }
2467
+ /**
2468
+ * POST /api/storage/source-maps/gc/preview — dry-run orphan count, deletes nothing.
2469
+ */
2470
+ previewSourceMapGc(options) {
2471
+ return (options?.client ?? this.client).post({
2472
+ requestValidator: async (data) => await zod.object({
2473
+ body: zod.never().optional(),
2474
+ path: zod.never().optional(),
2475
+ query: zod.never().optional()
2476
+ }).parseAsync(data),
2477
+ responseValidator: async (data) => await require_zod_gen.zStoragePreviewSourceMapGcResponse.parseAsync(data),
2478
+ security: [{
2479
+ scheme: "bearer",
2480
+ type: "http"
2481
+ }],
2482
+ url: "/api/storage/source-maps/gc/preview",
2483
+ ...options
2484
+ });
2485
+ }
2486
+ /**
2487
+ * GET /api/storage/summary — row counts, DB size, and source-map weight.
2488
+ */
2489
+ getSummary(options) {
2490
+ return (options?.client ?? this.client).get({
2491
+ requestValidator: async (data) => await zod.object({
2492
+ body: zod.never().optional(),
2493
+ path: zod.never().optional(),
2494
+ query: zod.never().optional()
2495
+ }).parseAsync(data),
2496
+ responseValidator: async (data) => await require_zod_gen.zStorageGetSummaryResponse.parseAsync(data),
2497
+ security: [{
2498
+ scheme: "bearer",
2499
+ type: "http"
2500
+ }],
2501
+ url: "/api/storage/summary",
2502
+ ...options
2503
+ });
2504
+ }
2505
+ };
2506
+ var Team = class extends HeyApiClient {
2507
+ /**
2508
+ * GET /api/team — list all users (admin only)
2509
+ */
2510
+ list(options) {
2511
+ return (options?.client ?? this.client).get({
2512
+ requestValidator: async (data) => await zod.object({
2513
+ body: zod.never().optional(),
2514
+ path: zod.never().optional(),
2515
+ query: zod.never().optional()
2516
+ }).parseAsync(data),
2517
+ responseValidator: async (data) => await require_zod_gen.zTeamListResponse.parseAsync(data),
2518
+ security: [{
2519
+ scheme: "bearer",
2520
+ type: "http"
2521
+ }],
2522
+ url: "/api/team",
2523
+ ...options
2524
+ });
2525
+ }
2526
+ /**
2527
+ * DELETE /api/team/{user_id} — remove a user from the instance (admin only)
2528
+ */
2529
+ deleteUser(options) {
2530
+ return (options.client ?? this.client).delete({
2531
+ requestValidator: async (data) => await zod.object({
2532
+ body: zod.never().optional(),
2533
+ path: require_zod_gen.zTeamDeleteUserPath,
2534
+ query: zod.never().optional()
2535
+ }).parseAsync(data),
2536
+ responseValidator: async (data) => await require_zod_gen.zTeamDeleteUserResponse.parseAsync(data),
2537
+ security: [{
2538
+ scheme: "bearer",
2539
+ type: "http"
2540
+ }],
2541
+ url: "/api/team/{user_id}",
2542
+ ...options
2543
+ });
2544
+ }
2545
+ /**
2546
+ * PATCH /api/team/{user_id}/role — change a user's global role (admin only)
2547
+ */
2548
+ updateRole(options) {
2549
+ return (options.client ?? this.client).patch({
2550
+ requestValidator: async (data) => await zod.object({
2551
+ body: require_zod_gen.zTeamUpdateRoleBody,
2552
+ path: require_zod_gen.zTeamUpdateRolePath,
2553
+ query: zod.never().optional()
2554
+ }).parseAsync(data),
2555
+ responseValidator: async (data) => await require_zod_gen.zTeamUpdateRoleResponse.parseAsync(data),
2556
+ security: [{
2557
+ scheme: "bearer",
2558
+ type: "http"
2559
+ }],
2560
+ url: "/api/team/{user_id}/role",
2561
+ ...options,
2562
+ headers: {
2563
+ "Content-Type": "application/json",
2564
+ ...options.headers
2565
+ }
2566
+ });
2567
+ }
2568
+ };
2569
+ var Telemetry = class extends HeyApiClient {
2570
+ /**
2571
+ * GET /api/telemetry/preview
2572
+ */
2573
+ preview(options) {
2574
+ return (options?.client ?? this.client).get({
2575
+ requestValidator: async (data) => await zod.object({
2576
+ body: zod.never().optional(),
2577
+ path: zod.never().optional(),
2578
+ query: zod.never().optional()
2579
+ }).parseAsync(data),
2580
+ responseValidator: async (data) => await require_zod_gen.zTelemetryPreviewResponse.parseAsync(data),
2581
+ security: [{
2582
+ scheme: "bearer",
2583
+ type: "http"
2584
+ }],
2585
+ url: "/api/telemetry/preview",
2586
+ ...options
2587
+ });
2588
+ }
2589
+ };
2590
+ var Tokens = class extends HeyApiClient {
2591
+ /**
2592
+ * GET /api/tokens - List tokens (masked)
2593
+ *
2594
+ * Admins see all tokens; non-admins see only the tokens they own.
2595
+ */
2596
+ list(options) {
2597
+ return (options?.client ?? this.client).get({
2598
+ requestValidator: async (data) => await zod.object({
2599
+ body: zod.never().optional(),
2600
+ path: zod.never().optional(),
2601
+ query: zod.never().optional()
2602
+ }).parseAsync(data),
2603
+ responseValidator: async (data) => await require_zod_gen.zTokensListResponse.parseAsync(data),
2604
+ security: [{
2605
+ scheme: "bearer",
2606
+ type: "http"
2607
+ }],
2608
+ url: "/api/tokens",
2609
+ ...options
2610
+ });
2611
+ }
2612
+ /**
2613
+ * POST /api/tokens - Create a new token (scoped to the acting user)
2614
+ */
2615
+ create(options) {
2616
+ return (options.client ?? this.client).post({
2617
+ requestValidator: async (data) => await zod.object({
2618
+ body: require_zod_gen.zTokensCreateBody,
2619
+ path: zod.never().optional(),
2620
+ query: zod.never().optional()
2621
+ }).parseAsync(data),
2622
+ responseValidator: async (data) => await require_zod_gen.zTokensCreateResponse.parseAsync(data),
2623
+ security: [{
2624
+ scheme: "bearer",
2625
+ type: "http"
2626
+ }],
2627
+ url: "/api/tokens",
2628
+ ...options,
2629
+ headers: {
2630
+ "Content-Type": "application/json",
2631
+ ...options.headers
2632
+ }
2633
+ });
2634
+ }
2635
+ /**
2636
+ * DELETE /api/tokens/{id} - Revoke a token
2637
+ *
2638
+ * Admins may revoke any token; non-admins may only revoke their own.
2639
+ */
2640
+ delete(options) {
2641
+ return (options.client ?? this.client).delete({
2642
+ requestValidator: async (data) => await zod.object({
2643
+ body: zod.never().optional(),
2644
+ path: require_zod_gen.zTokensDeletePath,
2645
+ query: zod.never().optional()
2646
+ }).parseAsync(data),
2647
+ responseValidator: async (data) => await require_zod_gen.zTokensDeleteResponse.parseAsync(data),
2648
+ security: [{
2649
+ scheme: "bearer",
2650
+ type: "http"
2651
+ }],
2652
+ url: "/api/tokens/{id}",
2653
+ ...options
2654
+ });
2655
+ }
2656
+ /**
2657
+ * GET /api/tokens/{id} - Reveal full token value
2658
+ *
2659
+ * Returns the complete token string. Admins may view any token;
2660
+ * non-admins may only view their own.
2661
+ */
2662
+ get(options) {
2663
+ return (options.client ?? this.client).get({
2664
+ requestValidator: async (data) => await zod.object({
2665
+ body: zod.never().optional(),
2666
+ path: require_zod_gen.zTokensGetPath,
2667
+ query: zod.never().optional()
2668
+ }).parseAsync(data),
2669
+ responseValidator: async (data) => await require_zod_gen.zTokensGetResponse.parseAsync(data),
2670
+ security: [{
2671
+ scheme: "bearer",
2672
+ type: "http"
2673
+ }],
2674
+ url: "/api/tokens/{id}",
2675
+ ...options
2676
+ });
2677
+ }
2678
+ };
2679
+ var Auth = class extends HeyApiClient {
2680
+ /**
2681
+ * POST /auth/accept-invitation
2682
+ * Accept a pending invitation: creates the user (with the invite's email + role) and logs in.
2683
+ */
2684
+ acceptInvitation(options) {
2685
+ return (options.client ?? this.client).post({
2686
+ requestValidator: async (data) => await zod.object({
2687
+ body: require_zod_gen.zAuthAcceptInvitationBody,
2688
+ path: zod.never().optional(),
2689
+ query: zod.never().optional()
2690
+ }).parseAsync(data),
2691
+ responseValidator: async (data) => await require_zod_gen.zAuthAcceptInvitationResponse.parseAsync(data),
2692
+ url: "/auth/accept-invitation",
2693
+ ...options,
2694
+ headers: {
2695
+ "Content-Type": "application/json",
2696
+ ...options.headers
2697
+ }
2698
+ });
2699
+ }
2700
+ /**
2701
+ * GET /auth/invitation/{token}
2702
+ * Returns the invitation's details if it is still acceptable (for the accept page).
2703
+ */
2704
+ getInvitation(options) {
2705
+ return (options.client ?? this.client).get({
2706
+ requestValidator: async (data) => await zod.object({
2707
+ body: zod.never().optional(),
2708
+ path: require_zod_gen.zAuthGetInvitationPath,
2709
+ query: zod.never().optional()
2710
+ }).parseAsync(data),
2711
+ responseValidator: async (data) => await require_zod_gen.zAuthGetInvitationResponse.parseAsync(data),
2712
+ url: "/auth/invitation/{token}",
2713
+ ...options
2714
+ });
2715
+ }
2716
+ /**
2717
+ * POST /auth/login
2718
+ * Authenticate user and create session
2719
+ */
2720
+ login(options) {
2721
+ return (options.client ?? this.client).post({
2722
+ requestValidator: async (data) => await zod.object({
2723
+ body: require_zod_gen.zAuthLoginBody,
2724
+ path: zod.never().optional(),
2725
+ query: zod.never().optional()
2726
+ }).parseAsync(data),
2727
+ responseValidator: async (data) => await require_zod_gen.zAuthLoginResponse.parseAsync(data),
2728
+ url: "/auth/login",
2729
+ ...options,
2730
+ headers: {
2731
+ "Content-Type": "application/json",
2732
+ ...options.headers
2733
+ }
2734
+ });
2735
+ }
2736
+ /**
2737
+ * POST /auth/logout
2738
+ * Clear session
2739
+ */
2740
+ logout(options) {
2741
+ return (options?.client ?? this.client).post({
2742
+ requestValidator: async (data) => await zod.object({
2743
+ body: zod.never().optional(),
2744
+ path: zod.never().optional(),
2745
+ query: zod.never().optional()
2746
+ }).parseAsync(data),
2747
+ responseValidator: async (data) => await require_zod_gen.zAuthLogoutResponse.parseAsync(data),
2748
+ security: [{
2749
+ in: "cookie",
2750
+ name: "session",
2751
+ type: "apiKey"
2752
+ }],
2753
+ url: "/auth/logout",
2754
+ ...options
2755
+ });
2756
+ }
2757
+ /**
2758
+ * GET /auth/me
2759
+ * Get current authenticated user
2760
+ */
2761
+ getCurrentUser(options) {
2762
+ return (options?.client ?? this.client).get({
2763
+ requestValidator: async (data) => await zod.object({
2764
+ body: zod.never().optional(),
2765
+ path: zod.never().optional(),
2766
+ query: zod.never().optional()
2767
+ }).parseAsync(data),
2768
+ responseValidator: async (data) => await require_zod_gen.zAuthGetCurrentUserResponse.parseAsync(data),
2769
+ security: [{
2770
+ in: "cookie",
2771
+ name: "session",
2772
+ type: "apiKey"
2773
+ }],
2774
+ url: "/auth/me",
2775
+ ...options
2776
+ });
2777
+ }
2778
+ /**
2779
+ * PATCH /auth/me
2780
+ * Update the current user's presentation preferences
2781
+ */
2782
+ updateCurrentUser(options) {
2783
+ return (options.client ?? this.client).patch({
2784
+ requestValidator: async (data) => await zod.object({
2785
+ body: require_zod_gen.zAuthUpdateCurrentUserBody,
2786
+ path: zod.never().optional(),
2787
+ query: zod.never().optional()
2788
+ }).parseAsync(data),
2789
+ responseValidator: async (data) => await require_zod_gen.zAuthUpdateCurrentUserResponse.parseAsync(data),
2790
+ security: [{
2791
+ in: "cookie",
2792
+ name: "session",
2793
+ type: "apiKey"
2794
+ }],
2795
+ url: "/auth/me",
2796
+ ...options,
2797
+ headers: {
2798
+ "Content-Type": "application/json",
2799
+ ...options.headers
2800
+ }
2801
+ });
2802
+ }
2803
+ /**
2804
+ * POST /auth/me/password
2805
+ * Change the current user's password
2806
+ */
2807
+ changePassword(options) {
2808
+ return (options.client ?? this.client).post({
2809
+ requestValidator: async (data) => await zod.object({
2810
+ body: require_zod_gen.zAuthChangePasswordBody,
2811
+ path: zod.never().optional(),
2812
+ query: zod.never().optional()
2813
+ }).parseAsync(data),
2814
+ responseValidator: async (data) => await require_zod_gen.zAuthChangePasswordResponse.parseAsync(data),
2815
+ security: [{
2816
+ in: "cookie",
2817
+ name: "session",
2818
+ type: "apiKey"
2819
+ }],
2820
+ url: "/auth/me/password",
2821
+ ...options,
2822
+ headers: {
2823
+ "Content-Type": "application/json",
2824
+ ...options.headers
2825
+ }
2826
+ });
2827
+ }
2828
+ /**
2829
+ * POST /auth/register
2830
+ * Registration is invite-only — always rejected. Use `/auth/accept-invitation`.
2831
+ */
2832
+ register(options) {
2833
+ return (options.client ?? this.client).post({
2834
+ requestValidator: async (data) => await zod.object({
2835
+ body: require_zod_gen.zAuthRegisterBody,
2836
+ path: zod.never().optional(),
2837
+ query: zod.never().optional()
2838
+ }).parseAsync(data),
2839
+ url: "/auth/register",
2840
+ ...options,
2841
+ headers: {
2842
+ "Content-Type": "application/json",
2843
+ ...options.headers
2844
+ }
2845
+ });
2846
+ }
2847
+ /**
2848
+ * GET /auth/sso/callback
2849
+ * Validate the provider response, resolve or provision the local account, and
2850
+ * establish the normal Rustrak session.
2851
+ */
2852
+ ssoCallback(options) {
2853
+ return (options?.client ?? this.client).get({
2854
+ requestValidator: async (data) => await zod.object({
2855
+ body: zod.never().optional(),
2856
+ path: zod.never().optional(),
2857
+ query: require_zod_gen.zAuthSsoCallbackQuery.optional()
2858
+ }).parseAsync(data),
2859
+ responseValidator: async (data) => await require_zod_gen.zAuthSsoCallbackResponse.parseAsync(data),
2860
+ url: "/auth/sso/callback",
2861
+ ...options
2862
+ });
2863
+ }
2864
+ /**
2865
+ * GET /auth/sso/config
2866
+ * Public, non-sensitive information used to render the login page.
2867
+ */
2868
+ ssoConfig(options) {
2869
+ return (options?.client ?? this.client).get({
2870
+ requestValidator: async (data) => await zod.object({
2871
+ body: zod.never().optional(),
2872
+ path: zod.never().optional(),
2873
+ query: zod.never().optional()
2874
+ }).parseAsync(data),
2875
+ responseValidator: async (data) => await require_zod_gen.zAuthSsoConfigResponse.parseAsync(data),
2876
+ url: "/auth/sso/config",
2877
+ ...options
2878
+ });
2879
+ }
2880
+ /**
2881
+ * GET /auth/sso/link
2882
+ * The account an SSO login matched, shown while its owner confirms.
2883
+ */
2884
+ ssoLink(options) {
2885
+ return (options?.client ?? this.client).get({
2886
+ requestValidator: async (data) => await zod.object({
2887
+ body: zod.never().optional(),
2888
+ path: zod.never().optional(),
2889
+ query: zod.never().optional()
2890
+ }).parseAsync(data),
2891
+ responseValidator: async (data) => await require_zod_gen.zAuthSsoLinkResponse.parseAsync(data),
2892
+ url: "/auth/sso/link",
2893
+ ...options
2894
+ });
2895
+ }
2896
+ /**
2897
+ * POST /auth/sso/link
2898
+ * Link the pending SSO identity to its account once the account's password
2899
+ * is given, and sign in. A wrong password keeps the link pending for a retry.
2900
+ */
2901
+ confirmSsoLink(options) {
2902
+ return (options.client ?? this.client).post({
2903
+ requestValidator: async (data) => await zod.object({
2904
+ body: require_zod_gen.zAuthConfirmSsoLinkBody,
2905
+ path: zod.never().optional(),
2906
+ query: zod.never().optional()
2907
+ }).parseAsync(data),
2908
+ responseValidator: async (data) => await require_zod_gen.zAuthConfirmSsoLinkResponse.parseAsync(data),
2909
+ url: "/auth/sso/link",
2910
+ ...options,
2911
+ headers: {
2912
+ "Content-Type": "application/json",
2913
+ ...options.headers
2914
+ }
2915
+ });
2916
+ }
2917
+ /**
2918
+ * POST /auth/sso/start
2919
+ * Create a one-time OIDC authorization request and retain its protections in
2920
+ * the encrypted session cookie.
2921
+ */
2922
+ ssoStart(options) {
2923
+ return (options?.client ?? this.client).post({
2924
+ requestValidator: async (data) => await zod.object({
2925
+ body: zod.never().optional(),
2926
+ path: zod.never().optional(),
2927
+ query: zod.never().optional()
2928
+ }).parseAsync(data),
2929
+ responseValidator: async (data) => await require_zod_gen.zAuthSsoStartResponse.parseAsync(data),
2930
+ url: "/auth/sso/start",
2931
+ ...options
2932
+ });
2933
+ }
2934
+ };
2935
+ var Health = class extends HeyApiClient {
2936
+ /**
2937
+ * Liveness check - is the process running?
2938
+ * Returns 200 if the server is alive.
2939
+ */
2940
+ liveness(options) {
2941
+ return (options?.client ?? this.client).get({
2942
+ requestValidator: async (data) => await zod.object({
2943
+ body: zod.never().optional(),
2944
+ path: zod.never().optional(),
2945
+ query: zod.never().optional()
2946
+ }).parseAsync(data),
2947
+ responseValidator: async (data) => await require_zod_gen.zHealthLivenessResponse.parseAsync(data),
2948
+ url: "/health",
2949
+ ...options
2950
+ });
2951
+ }
2952
+ /**
2953
+ * Readiness check - is the service ready to handle requests?
2954
+ * Returns 200 if all dependencies are available, 503 otherwise.
2955
+ */
2956
+ readiness(options) {
2957
+ return (options?.client ?? this.client).get({
2958
+ requestValidator: async (data) => await zod.object({
2959
+ body: zod.never().optional(),
2960
+ path: zod.never().optional(),
2961
+ query: zod.never().optional()
2962
+ }).parseAsync(data),
2963
+ responseValidator: async (data) => await require_zod_gen.zHealthReadinessResponse.parseAsync(data),
2964
+ url: "/health/ready",
2965
+ ...options
2966
+ });
2967
+ }
2968
+ /**
2969
+ * Version check - returns the server version compiled from Cargo.toml.
2970
+ *
2971
+ * Requires a session cookie or a Bearer token, unlike its neighbours in this
2972
+ * scope. `/health` and `/health/ready` answer "is this process up", which a
2973
+ * probe has to be able to ask without credentials; this one answers "which
2974
+ * build is this", which is the first thing worth knowing about a host you
2975
+ * intend to attack.
2976
+ */
2977
+ version(options) {
2978
+ return (options?.client ?? this.client).get({
2979
+ requestValidator: async (data) => await zod.object({
2980
+ body: zod.never().optional(),
2981
+ path: zod.never().optional(),
2982
+ query: zod.never().optional()
2983
+ }).parseAsync(data),
2984
+ responseValidator: async (data) => await require_zod_gen.zHealthVersionResponse.parseAsync(data),
2985
+ security: [{
2986
+ scheme: "bearer",
2987
+ type: "http"
2988
+ }, {
2989
+ in: "cookie",
2990
+ name: "session",
2991
+ type: "apiKey"
2992
+ }],
2993
+ url: "/health/version",
2994
+ ...options
2995
+ });
2996
+ }
2997
+ };
2998
+ var Rustrak = class Rustrak extends HeyApiClient {
2999
+ static __registry = new HeyApiRegistry();
3000
+ constructor(args) {
3001
+ super(args);
3002
+ Rustrak.__registry.set(this, args?.key);
3003
+ }
3004
+ _sourceMaps;
3005
+ get sourceMaps() {
3006
+ return this._sourceMaps ??= new SourceMaps({ client: this.client });
3007
+ }
3008
+ _releases;
3009
+ get releases() {
3010
+ return this._releases ??= new Releases({ client: this.client });
3011
+ }
3012
+ _github;
3013
+ get github() {
3014
+ return this._github ??= new Github({ client: this.client });
3015
+ }
3016
+ _alertChannels;
3017
+ get alertChannels() {
3018
+ return this._alertChannels ??= new AlertChannels({ client: this.client });
3019
+ }
3020
+ _invitations;
3021
+ get invitations() {
3022
+ return this._invitations ??= new Invitations({ client: this.client });
3023
+ }
3024
+ _oauth;
3025
+ get oauth() {
3026
+ return this._oauth ??= new Oauth({ client: this.client });
3027
+ }
3028
+ _projects;
3029
+ get projects() {
3030
+ return this._projects ??= new Projects({ client: this.client });
3031
+ }
3032
+ _agents;
3033
+ get agents() {
3034
+ return this._agents ??= new Agents({ client: this.client });
3035
+ }
3036
+ _alertRules;
3037
+ get alertRules() {
3038
+ return this._alertRules ??= new AlertRules({ client: this.client });
3039
+ }
3040
+ _events;
3041
+ get events() {
3042
+ return this._events ??= new Events({ client: this.client });
3043
+ }
3044
+ _stats;
3045
+ get stats() {
3046
+ return this._stats ??= new Stats({ client: this.client });
3047
+ }
3048
+ _issues;
3049
+ get issues() {
3050
+ return this._issues ??= new Issues({ client: this.client });
3051
+ }
3052
+ _logs;
3053
+ get logs() {
3054
+ return this._logs ??= new Logs({ client: this.client });
3055
+ }
3056
+ _members;
3057
+ get members() {
3058
+ return this._members ??= new Members({ client: this.client });
3059
+ }
3060
+ _monitors;
3061
+ get monitors() {
3062
+ return this._monitors ??= new Monitors({ client: this.client });
3063
+ }
3064
+ _sessions;
3065
+ get sessions() {
3066
+ return this._sessions ??= new Sessions({ client: this.client });
3067
+ }
3068
+ _spans;
3069
+ get spans() {
3070
+ return this._spans ??= new Spans({ client: this.client });
3071
+ }
3072
+ _transactions;
3073
+ get transactions() {
3074
+ return this._transactions ??= new Transactions({ client: this.client });
3075
+ }
3076
+ _schedules;
3077
+ get schedules() {
3078
+ return this._schedules ??= new Schedules({ client: this.client });
3079
+ }
3080
+ _settings;
3081
+ get settings() {
3082
+ return this._settings ??= new Settings({ client: this.client });
3083
+ }
3084
+ _storage;
3085
+ get storage() {
3086
+ return this._storage ??= new Storage({ client: this.client });
3087
+ }
3088
+ _team;
3089
+ get team() {
3090
+ return this._team ??= new Team({ client: this.client });
3091
+ }
3092
+ _telemetry;
3093
+ get telemetry() {
3094
+ return this._telemetry ??= new Telemetry({ client: this.client });
3095
+ }
3096
+ _tokens;
3097
+ get tokens() {
3098
+ return this._tokens ??= new Tokens({ client: this.client });
3099
+ }
3100
+ _auth;
3101
+ get auth() {
3102
+ return this._auth ??= new Auth({ client: this.client });
3103
+ }
3104
+ _health;
3105
+ get health() {
3106
+ return this._health ??= new Health({ client: this.client });
3107
+ }
3108
+ };
3109
+ //#endregion
3110
+ exports.Agents = Agents;
3111
+ exports.AlertChannels = AlertChannels;
3112
+ exports.AlertRules = AlertRules;
3113
+ exports.Auth = Auth;
3114
+ exports.Events = Events;
3115
+ exports.Github = Github;
3116
+ exports.Health = Health;
3117
+ exports.Invitations = Invitations;
3118
+ exports.Issues = Issues;
3119
+ exports.Logs = Logs;
3120
+ exports.Members = Members;
3121
+ exports.Monitors = Monitors;
3122
+ exports.Oauth = Oauth;
3123
+ exports.Projects = Projects;
3124
+ exports.Releases = Releases;
3125
+ exports.Rustrak = Rustrak;
3126
+ exports.Schedules = Schedules;
3127
+ exports.Sessions = Sessions;
3128
+ exports.Settings = Settings;
3129
+ exports.SourceMaps = SourceMaps;
3130
+ exports.Spans = Spans;
3131
+ exports.Stats = Stats;
3132
+ exports.Storage = Storage;
3133
+ exports.Team = Team;
3134
+ exports.Telemetry = Telemetry;
3135
+ exports.Tokens = Tokens;
3136
+ exports.Transactions = Transactions;
3137
+
3138
+ //# sourceMappingURL=sdk.gen.cjs.map