@rustrak/client 0.18.1 → 0.19.1

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