@rustrak/client 0.18.1 → 0.19.1

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