@rustrak/client 0.18.0 → 0.19.0

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