@honeyhive/control-plane-sdk 1.0.0-rc.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.
- package/.github/workflows/publish.yaml +173 -0
- package/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/generated/apiTypes.d.ts +410 -0
- package/dist/generated/apiTypes.d.ts.map +1 -0
- package/dist/generated/apiTypes.js +3 -0
- package/dist/generated/apiTypes.js.map +1 -0
- package/dist/generated/client.d.ts +83 -0
- package/dist/generated/client.d.ts.map +1 -0
- package/dist/generated/client.js +134 -0
- package/dist/generated/client.js.map +1 -0
- package/dist/generated/types.d.ts +672 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +2 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/generated/version.d.ts +2 -0
- package/dist/generated/version.d.ts.map +1 -0
- package/dist/generated/version.js +3 -0
- package/dist/generated/version.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/util.d.ts +131 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +270 -0
- package/dist/util.js.map +1 -0
- package/package.json +28 -0
- package/src/generated/apiTypes.ts +471 -0
- package/src/generated/client.ts +187 -0
- package/src/generated/types.ts +683 -0
- package/src/generated/version.ts +3 -0
- package/src/index.ts +26 -0
- package/src/util.ts +386 -0
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
export interface paths {
|
|
2
|
+
'/v1/projects/{project_id}/alerts': {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* List alerts
|
|
11
|
+
* @description List the alerts in a project. The project is identified by the `project_id` path parameter
|
|
12
|
+
* alone; the `x-hh-project-id` header does not participate. Supports offset pagination, an
|
|
13
|
+
* optional status filter, and sorting (defaults to most recently created first).
|
|
14
|
+
*/
|
|
15
|
+
get: operations['listAlerts'];
|
|
16
|
+
put?: never;
|
|
17
|
+
/**
|
|
18
|
+
* Create an alert
|
|
19
|
+
* @description Create an alert in a project. The project is identified by the `project_id` path parameter
|
|
20
|
+
* alone; the `x-hh-project-id` header does not participate. The alert's `filters` and
|
|
21
|
+
* `projections` (metrics) are mapped against the project's logged-event schema; if no schema
|
|
22
|
+
* data matches them — e.g. no events have been logged to the project yet — the request fails
|
|
23
|
+
* with a 400.
|
|
24
|
+
*/
|
|
25
|
+
post: operations['createAlert'];
|
|
26
|
+
delete?: never;
|
|
27
|
+
options?: never;
|
|
28
|
+
head?: never;
|
|
29
|
+
patch?: never;
|
|
30
|
+
trace?: never;
|
|
31
|
+
};
|
|
32
|
+
'/v1/projects/{project_id}/alerts/{alert_id}': {
|
|
33
|
+
parameters: {
|
|
34
|
+
query?: never;
|
|
35
|
+
header?: never;
|
|
36
|
+
path?: never;
|
|
37
|
+
cookie?: never;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Get an alert
|
|
41
|
+
* @description Retrieve a single alert by id, including its thresholds, triggers, and notification
|
|
42
|
+
* configuration. The alert's project is identified by the `project_id` path parameter alone;
|
|
43
|
+
* the `x-hh-project-id` header does not participate.
|
|
44
|
+
*/
|
|
45
|
+
get: operations['getAlert'];
|
|
46
|
+
put?: never;
|
|
47
|
+
post?: never;
|
|
48
|
+
delete?: never;
|
|
49
|
+
options?: never;
|
|
50
|
+
head?: never;
|
|
51
|
+
patch?: never;
|
|
52
|
+
trace?: never;
|
|
53
|
+
};
|
|
54
|
+
'/v1/workspaces/{workspace_id}/projects': {
|
|
55
|
+
parameters: {
|
|
56
|
+
query?: never;
|
|
57
|
+
header?: never;
|
|
58
|
+
path?: never;
|
|
59
|
+
cookie?: never;
|
|
60
|
+
};
|
|
61
|
+
get?: never;
|
|
62
|
+
put?: never;
|
|
63
|
+
/**
|
|
64
|
+
* Create a project
|
|
65
|
+
* @description Create a project in a workspace. The parent workspace is identified by the `workspace_id`
|
|
66
|
+
* path parameter alone; the `x-hh-workspace-id` header does not participate.
|
|
67
|
+
*
|
|
68
|
+
* The optional `project_creator` field names the user (by email) who receives the
|
|
69
|
+
* project-creator membership on the new project. The named user must already be a member of
|
|
70
|
+
* the workspace. When omitted, the project is created without any membership. The field is
|
|
71
|
+
* only accepted on API-key-initiated requests — user-initiated creation always makes the
|
|
72
|
+
* calling user the creator and rejects the field with a 400.
|
|
73
|
+
*/
|
|
74
|
+
post: operations['createProject'];
|
|
75
|
+
delete?: never;
|
|
76
|
+
options?: never;
|
|
77
|
+
head?: never;
|
|
78
|
+
patch?: never;
|
|
79
|
+
trace?: never;
|
|
80
|
+
};
|
|
81
|
+
'/v1/projects/{project_id}': {
|
|
82
|
+
parameters: {
|
|
83
|
+
query?: never;
|
|
84
|
+
header?: never;
|
|
85
|
+
path?: never;
|
|
86
|
+
cookie?: never;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Get a project
|
|
90
|
+
* @description Retrieve a single project by id. The project is identified by the `project_id` path
|
|
91
|
+
* parameter alone; the `x-hh-project-id` header does not participate.
|
|
92
|
+
*/
|
|
93
|
+
get: operations['getProject'];
|
|
94
|
+
/**
|
|
95
|
+
* Update a project
|
|
96
|
+
* @description Update a project's display name and/or description. The project is identified by the
|
|
97
|
+
* `project_id` path parameter alone; the `x-hh-project-id` header does not participate.
|
|
98
|
+
* Only fields included in the request body are modified.
|
|
99
|
+
*/
|
|
100
|
+
put: operations['updateProject'];
|
|
101
|
+
post?: never;
|
|
102
|
+
/**
|
|
103
|
+
* Delete a project
|
|
104
|
+
* @description Delete a project. The project is soft-deleted (archived) and no longer appears in reads;
|
|
105
|
+
* the response returns the archived project. The project is identified by the `project_id`
|
|
106
|
+
* path parameter alone; the `x-hh-project-id` header does not participate.
|
|
107
|
+
*/
|
|
108
|
+
delete: operations['deleteProject'];
|
|
109
|
+
options?: never;
|
|
110
|
+
head?: never;
|
|
111
|
+
patch?: never;
|
|
112
|
+
trace?: never;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export type webhooks = Record<string, never>;
|
|
116
|
+
export interface components {
|
|
117
|
+
schemas: {
|
|
118
|
+
/** @description Alert object */
|
|
119
|
+
AlertItem: {
|
|
120
|
+
id: string;
|
|
121
|
+
name: string;
|
|
122
|
+
description?: string | null;
|
|
123
|
+
/** @enum {string} */
|
|
124
|
+
status: 'ACTIVE' | 'TRIGGERED' | 'PAUSED' | 'RESOLVED';
|
|
125
|
+
/** @enum {string} */
|
|
126
|
+
frequency: 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
127
|
+
minimum_sample_size: number;
|
|
128
|
+
/** @enum {string} */
|
|
129
|
+
alert_type: 'DRIFT' | 'AGGREGATE' | 'PER_EVENT';
|
|
130
|
+
aggregation: string;
|
|
131
|
+
event_filters: components['schemas']['AlertEventFilter'][];
|
|
132
|
+
event_metrics: components['schemas']['AlertEventMetric'][];
|
|
133
|
+
thresholds: components['schemas']['AlertItemThresholds'];
|
|
134
|
+
last_run_at?: string | null;
|
|
135
|
+
last_result?:
|
|
136
|
+
| ({
|
|
137
|
+
current_bucket_score?: number | boolean;
|
|
138
|
+
previous_bucket_score?: number | boolean;
|
|
139
|
+
last_triggered_baseline?: number | boolean;
|
|
140
|
+
drift_percentage?: number;
|
|
141
|
+
thresholds?: components['schemas']['AlertItemLastResultThresholds'];
|
|
142
|
+
event_filters?: unknown[];
|
|
143
|
+
event_metrics?: unknown[];
|
|
144
|
+
aggregation?: string;
|
|
145
|
+
} & {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
})
|
|
148
|
+
| null;
|
|
149
|
+
trigger_error?: string | null;
|
|
150
|
+
is_active: boolean;
|
|
151
|
+
is_muted: boolean;
|
|
152
|
+
created_at: string;
|
|
153
|
+
updated_at?: string | null;
|
|
154
|
+
last_trigger_id?: string | null;
|
|
155
|
+
scope_type: string;
|
|
156
|
+
scope_id: string;
|
|
157
|
+
created_by?: string | null;
|
|
158
|
+
last_trigger?: components['schemas']['AlertTrigger'];
|
|
159
|
+
triggers?: components['schemas']['AlertTrigger'][];
|
|
160
|
+
notifications?: components['schemas']['AlertNotification'][];
|
|
161
|
+
};
|
|
162
|
+
AlertEventFilter: {
|
|
163
|
+
filter: components['schemas']['SingleFilter'];
|
|
164
|
+
/** @enum {string} */
|
|
165
|
+
type: 'float' | 'numeric' | 'boolean' | 'string' | 'null';
|
|
166
|
+
};
|
|
167
|
+
SingleFilter: {
|
|
168
|
+
field: string;
|
|
169
|
+
/** @enum {string} */
|
|
170
|
+
operator:
|
|
171
|
+
| 'exists'
|
|
172
|
+
| 'not exists'
|
|
173
|
+
| 'is'
|
|
174
|
+
| 'is not'
|
|
175
|
+
| 'contains'
|
|
176
|
+
| 'not contains'
|
|
177
|
+
| 'greater than'
|
|
178
|
+
| 'less than'
|
|
179
|
+
| 'after'
|
|
180
|
+
| 'before';
|
|
181
|
+
value: string | number | boolean | null;
|
|
182
|
+
/** @enum {string} */
|
|
183
|
+
type: 'string' | 'number' | 'boolean' | 'datetime';
|
|
184
|
+
};
|
|
185
|
+
AlertEventMetric: {
|
|
186
|
+
/** @description Projected field or metric for this entry */
|
|
187
|
+
projection: string;
|
|
188
|
+
/** @enum {string} */
|
|
189
|
+
type: 'float' | 'numeric' | 'boolean' | 'string' | 'null';
|
|
190
|
+
};
|
|
191
|
+
AlertTrigger: {
|
|
192
|
+
id: string;
|
|
193
|
+
alert_id: string;
|
|
194
|
+
result: components['schemas']['AlertTriggerResult'];
|
|
195
|
+
muted: boolean;
|
|
196
|
+
notification_sent: boolean;
|
|
197
|
+
triggered_time: string;
|
|
198
|
+
resolved_time: string | null;
|
|
199
|
+
resolved_by: string | null;
|
|
200
|
+
created_at: string;
|
|
201
|
+
updated_at: string;
|
|
202
|
+
};
|
|
203
|
+
AlertNotification: {
|
|
204
|
+
id: string;
|
|
205
|
+
alert_id: string;
|
|
206
|
+
/** @enum {string} */
|
|
207
|
+
stage: 'CRITICAL' | 'RESOLUTION';
|
|
208
|
+
/** @enum {string} */
|
|
209
|
+
channel: 'EMAIL' | 'SLACK' | 'WEBHOOK';
|
|
210
|
+
/** @enum {string} */
|
|
211
|
+
scope: 'ALL_PROJECT_MEMBERS' | 'SPECIFIC_MEMBER';
|
|
212
|
+
membership_id?: string | null;
|
|
213
|
+
metadata?: {
|
|
214
|
+
[key: string]: unknown;
|
|
215
|
+
} | null;
|
|
216
|
+
last_sent_at?: string | null;
|
|
217
|
+
created_at: string;
|
|
218
|
+
membership?: {
|
|
219
|
+
user: components['schemas']['AlertNotificationMembershipUser'];
|
|
220
|
+
} | null;
|
|
221
|
+
};
|
|
222
|
+
PostAlertRequest: {
|
|
223
|
+
name: string;
|
|
224
|
+
description?: string;
|
|
225
|
+
/** @enum {string} */
|
|
226
|
+
frequency: 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
227
|
+
/** @default 0 */
|
|
228
|
+
minimum_sample_size?: number;
|
|
229
|
+
/**
|
|
230
|
+
* @default AGGREGATE
|
|
231
|
+
* @enum {string}
|
|
232
|
+
*/
|
|
233
|
+
alert_type?: 'DRIFT' | 'AGGREGATE' | 'PER_EVENT';
|
|
234
|
+
/**
|
|
235
|
+
* @default AVERAGE
|
|
236
|
+
* @enum {string}
|
|
237
|
+
*/
|
|
238
|
+
aggregation?: 'AVERAGE' | 'COUNT' | 'SUM' | 'MIN' | 'MAX' | 'P90' | 'P95' | 'P99' | 'MEDIAN';
|
|
239
|
+
thresholds: components['schemas']['PostAlertRequestThresholds'];
|
|
240
|
+
filters: components['schemas']['SingleFilter'][];
|
|
241
|
+
projections: string[];
|
|
242
|
+
notification_details: components['schemas']['PostAlertRequestNotificationDetails'];
|
|
243
|
+
/** @enum {string} */
|
|
244
|
+
status?: 'ACTIVE' | 'TRIGGERED' | 'PAUSED' | 'RESOLVED';
|
|
245
|
+
};
|
|
246
|
+
/** @description A single alert */
|
|
247
|
+
GetAlertResponse: {
|
|
248
|
+
/** @enum {boolean} */
|
|
249
|
+
success: true;
|
|
250
|
+
data: components['schemas']['AlertItem'];
|
|
251
|
+
};
|
|
252
|
+
/** @description A paginated list of alerts */
|
|
253
|
+
GetAlertsResponse: {
|
|
254
|
+
/** @enum {boolean} */
|
|
255
|
+
success: true;
|
|
256
|
+
data: components['schemas']['AlertItem'][];
|
|
257
|
+
pagination: components['schemas']['Pagination'];
|
|
258
|
+
};
|
|
259
|
+
Pagination: {
|
|
260
|
+
page: number;
|
|
261
|
+
limit: number;
|
|
262
|
+
total: number;
|
|
263
|
+
total_unfiltered: number;
|
|
264
|
+
total_pages: number;
|
|
265
|
+
has_next: boolean;
|
|
266
|
+
has_prev: boolean;
|
|
267
|
+
};
|
|
268
|
+
/** @description The created alert */
|
|
269
|
+
CreateAlertResponse: {
|
|
270
|
+
/** @enum {boolean} */
|
|
271
|
+
success: true;
|
|
272
|
+
data: components['schemas']['AlertItem'];
|
|
273
|
+
};
|
|
274
|
+
/** @description Project object */
|
|
275
|
+
ProjectItem: {
|
|
276
|
+
id: string;
|
|
277
|
+
/** @description Project display name */
|
|
278
|
+
name: string;
|
|
279
|
+
/** @description Project description */
|
|
280
|
+
description: string;
|
|
281
|
+
created_at: string;
|
|
282
|
+
updated_at?: string | null;
|
|
283
|
+
};
|
|
284
|
+
/** @description Request body for creating a project */
|
|
285
|
+
PostProjectRequest: {
|
|
286
|
+
/** @description Project display name */
|
|
287
|
+
name: string;
|
|
288
|
+
/** @description Project description */
|
|
289
|
+
description?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Format: email
|
|
292
|
+
* @description Email of the user to grant the project-creator membership to (API key actors only)
|
|
293
|
+
*/
|
|
294
|
+
project_creator?: string;
|
|
295
|
+
};
|
|
296
|
+
/** @description Request body for updating a project */
|
|
297
|
+
PutProjectRequest: {
|
|
298
|
+
/** @description Project display name */
|
|
299
|
+
name?: string;
|
|
300
|
+
/** @description Project description */
|
|
301
|
+
description?: string;
|
|
302
|
+
};
|
|
303
|
+
/** @description The created project */
|
|
304
|
+
CreateProjectResponse: {
|
|
305
|
+
success: boolean;
|
|
306
|
+
data: components['schemas']['ProjectItem'];
|
|
307
|
+
};
|
|
308
|
+
/** @description The updated project */
|
|
309
|
+
UpdateProjectResponse: {
|
|
310
|
+
success: boolean;
|
|
311
|
+
data: components['schemas']['ProjectItem'];
|
|
312
|
+
};
|
|
313
|
+
/** @description A single project */
|
|
314
|
+
GetProjectResponse: {
|
|
315
|
+
success: boolean;
|
|
316
|
+
data: components['schemas']['ProjectItem'];
|
|
317
|
+
};
|
|
318
|
+
/** @description The deleted (archived) project */
|
|
319
|
+
DeleteProjectResponse: {
|
|
320
|
+
success: boolean;
|
|
321
|
+
data: components['schemas']['ProjectItem'];
|
|
322
|
+
};
|
|
323
|
+
AlertItemThresholdsCritical: {
|
|
324
|
+
/** @enum {string} */
|
|
325
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
326
|
+
value: number;
|
|
327
|
+
};
|
|
328
|
+
AlertItemThresholdsResolved: {
|
|
329
|
+
/** @enum {string} */
|
|
330
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
331
|
+
value: number;
|
|
332
|
+
};
|
|
333
|
+
AlertItemThresholds: {
|
|
334
|
+
critical: components['schemas']['AlertItemThresholdsCritical'];
|
|
335
|
+
resolved: components['schemas']['AlertItemThresholdsResolved'];
|
|
336
|
+
};
|
|
337
|
+
AlertItemLastResultThresholdsCritical: {
|
|
338
|
+
/** @enum {string} */
|
|
339
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
340
|
+
value: number;
|
|
341
|
+
};
|
|
342
|
+
AlertItemLastResultThresholdsResolved: {
|
|
343
|
+
/** @enum {string} */
|
|
344
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
345
|
+
value: number;
|
|
346
|
+
};
|
|
347
|
+
AlertItemLastResultThresholds: {
|
|
348
|
+
critical: components['schemas']['AlertItemLastResultThresholdsCritical'];
|
|
349
|
+
resolved: components['schemas']['AlertItemLastResultThresholdsResolved'];
|
|
350
|
+
};
|
|
351
|
+
AlertTriggerResultThresholdsCritical: {
|
|
352
|
+
/** @enum {string} */
|
|
353
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
354
|
+
value: number;
|
|
355
|
+
};
|
|
356
|
+
AlertTriggerResultThresholdsResolved: {
|
|
357
|
+
/** @enum {string} */
|
|
358
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
359
|
+
value: number;
|
|
360
|
+
};
|
|
361
|
+
AlertTriggerResultThresholds: {
|
|
362
|
+
critical: components['schemas']['AlertTriggerResultThresholdsCritical'];
|
|
363
|
+
resolved: components['schemas']['AlertTriggerResultThresholdsResolved'];
|
|
364
|
+
};
|
|
365
|
+
AlertTriggerResult: {
|
|
366
|
+
current_bucket_score?: number | boolean;
|
|
367
|
+
previous_bucket_score?: number | boolean;
|
|
368
|
+
last_triggered_baseline?: number | boolean;
|
|
369
|
+
drift_percentage?: number;
|
|
370
|
+
thresholds?: components['schemas']['AlertTriggerResultThresholds'];
|
|
371
|
+
event_filters?: unknown[];
|
|
372
|
+
event_metrics?: unknown[];
|
|
373
|
+
aggregation?: string;
|
|
374
|
+
} & {
|
|
375
|
+
[key: string]: unknown;
|
|
376
|
+
};
|
|
377
|
+
AlertNotificationMembershipUser: {
|
|
378
|
+
id: string;
|
|
379
|
+
};
|
|
380
|
+
PostAlertRequestThresholdsCritical: {
|
|
381
|
+
/** @enum {string} */
|
|
382
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
383
|
+
value: number;
|
|
384
|
+
};
|
|
385
|
+
PostAlertRequestThresholdsResolved: {
|
|
386
|
+
/** @enum {string} */
|
|
387
|
+
operator: 'greater_than' | 'less_than' | 'equal_to';
|
|
388
|
+
value: number;
|
|
389
|
+
};
|
|
390
|
+
PostAlertRequestThresholds: {
|
|
391
|
+
critical: components['schemas']['PostAlertRequestThresholdsCritical'];
|
|
392
|
+
resolved: components['schemas']['PostAlertRequestThresholdsResolved'];
|
|
393
|
+
};
|
|
394
|
+
PostAlertRequestNotificationDetailsCritical: {
|
|
395
|
+
/** @enum {string} */
|
|
396
|
+
channel: 'EMAIL' | 'SLACK' | 'WEBHOOK';
|
|
397
|
+
/** @enum {string} */
|
|
398
|
+
scope: 'ALL_PROJECT_MEMBERS' | 'SPECIFIC_MEMBER';
|
|
399
|
+
user_ids?: string[];
|
|
400
|
+
metadata: {
|
|
401
|
+
[key: string]: unknown;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
PostAlertRequestNotificationDetailsResolved: {
|
|
405
|
+
/** @enum {string} */
|
|
406
|
+
channel: 'EMAIL' | 'SLACK' | 'WEBHOOK';
|
|
407
|
+
/** @enum {string} */
|
|
408
|
+
scope: 'ALL_PROJECT_MEMBERS' | 'SPECIFIC_MEMBER';
|
|
409
|
+
user_ids?: string[];
|
|
410
|
+
metadata: {
|
|
411
|
+
[key: string]: unknown;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
PostAlertRequestNotificationDetails: {
|
|
415
|
+
critical: components['schemas']['PostAlertRequestNotificationDetailsCritical'];
|
|
416
|
+
resolved: components['schemas']['PostAlertRequestNotificationDetailsResolved'];
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
responses: never;
|
|
420
|
+
parameters: never;
|
|
421
|
+
requestBodies: never;
|
|
422
|
+
headers: never;
|
|
423
|
+
pathItems: never;
|
|
424
|
+
}
|
|
425
|
+
export type $defs = Record<string, never>;
|
|
426
|
+
export interface operations {
|
|
427
|
+
listAlerts: {
|
|
428
|
+
parameters: {
|
|
429
|
+
query?: {
|
|
430
|
+
/** @description 1-indexed page number */
|
|
431
|
+
page?: number;
|
|
432
|
+
/** @description Number of alerts to return per page */
|
|
433
|
+
limit?: number;
|
|
434
|
+
/** @description Only return alerts in this status */
|
|
435
|
+
status?: 'ACTIVE' | 'TRIGGERED' | 'PAUSED' | 'RESOLVED';
|
|
436
|
+
/** @description Field to sort results by */
|
|
437
|
+
sort_by?: 'created_at' | 'updated_at' | 'name' | 'status' | 'frequency' | 'last_triggered';
|
|
438
|
+
/** @description Sort order */
|
|
439
|
+
sort_order?: 'asc' | 'desc';
|
|
440
|
+
};
|
|
441
|
+
header?: never;
|
|
442
|
+
path: {
|
|
443
|
+
/** @description The unique identifier of the project whose alerts are listed */
|
|
444
|
+
project_id: string;
|
|
445
|
+
};
|
|
446
|
+
cookie?: never;
|
|
447
|
+
};
|
|
448
|
+
requestBody?: never;
|
|
449
|
+
responses: {
|
|
450
|
+
/** @description Alerts retrieved successfully */
|
|
451
|
+
200: {
|
|
452
|
+
headers: {
|
|
453
|
+
[name: string]: unknown;
|
|
454
|
+
};
|
|
455
|
+
content: {
|
|
456
|
+
'application/json': components['schemas']['GetAlertsResponse'];
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
/** @description Invalid pagination or filter parameters */
|
|
460
|
+
400: {
|
|
461
|
+
headers: {
|
|
462
|
+
[name: string]: unknown;
|
|
463
|
+
};
|
|
464
|
+
content?: never;
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
createAlert: {
|
|
469
|
+
parameters: {
|
|
470
|
+
query?: never;
|
|
471
|
+
header?: never;
|
|
472
|
+
path: {
|
|
473
|
+
/** @description The unique identifier of the project the alert is created in */
|
|
474
|
+
project_id: string;
|
|
475
|
+
};
|
|
476
|
+
cookie?: never;
|
|
477
|
+
};
|
|
478
|
+
requestBody: {
|
|
479
|
+
content: {
|
|
480
|
+
'application/json': components['schemas']['PostAlertRequest'];
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
responses: {
|
|
484
|
+
/** @description Alert created successfully */
|
|
485
|
+
200: {
|
|
486
|
+
headers: {
|
|
487
|
+
[name: string]: unknown;
|
|
488
|
+
};
|
|
489
|
+
content: {
|
|
490
|
+
'application/json': components['schemas']['CreateAlertResponse'];
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
/** @description Invalid request body, or no schema data matches the selected filters/metrics */
|
|
494
|
+
400: {
|
|
495
|
+
headers: {
|
|
496
|
+
[name: string]: unknown;
|
|
497
|
+
};
|
|
498
|
+
content?: never;
|
|
499
|
+
};
|
|
500
|
+
/** @description Project not found */
|
|
501
|
+
404: {
|
|
502
|
+
headers: {
|
|
503
|
+
[name: string]: unknown;
|
|
504
|
+
};
|
|
505
|
+
content?: never;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
getAlert: {
|
|
510
|
+
parameters: {
|
|
511
|
+
query?: never;
|
|
512
|
+
header?: never;
|
|
513
|
+
path: {
|
|
514
|
+
/** @description The unique identifier of the project the alert belongs to */
|
|
515
|
+
project_id: string;
|
|
516
|
+
/** @description The unique identifier of the alert to retrieve */
|
|
517
|
+
alert_id: string;
|
|
518
|
+
};
|
|
519
|
+
cookie?: never;
|
|
520
|
+
};
|
|
521
|
+
requestBody?: never;
|
|
522
|
+
responses: {
|
|
523
|
+
/** @description Alert retrieved successfully */
|
|
524
|
+
200: {
|
|
525
|
+
headers: {
|
|
526
|
+
[name: string]: unknown;
|
|
527
|
+
};
|
|
528
|
+
content: {
|
|
529
|
+
'application/json': components['schemas']['GetAlertResponse'];
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
/** @description Alert not found */
|
|
533
|
+
404: {
|
|
534
|
+
headers: {
|
|
535
|
+
[name: string]: unknown;
|
|
536
|
+
};
|
|
537
|
+
content?: never;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
createProject: {
|
|
542
|
+
parameters: {
|
|
543
|
+
query?: never;
|
|
544
|
+
header?: never;
|
|
545
|
+
path: {
|
|
546
|
+
/** @description The unique identifier of the workspace the project is created in */
|
|
547
|
+
workspace_id: string;
|
|
548
|
+
};
|
|
549
|
+
cookie?: never;
|
|
550
|
+
};
|
|
551
|
+
requestBody: {
|
|
552
|
+
content: {
|
|
553
|
+
'application/json': components['schemas']['PostProjectRequest'];
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
responses: {
|
|
557
|
+
/** @description Project created successfully */
|
|
558
|
+
200: {
|
|
559
|
+
headers: {
|
|
560
|
+
[name: string]: unknown;
|
|
561
|
+
};
|
|
562
|
+
content: {
|
|
563
|
+
'application/json': components['schemas']['CreateProjectResponse'];
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
/** @description Invalid request body, or an unknown/ineligible `project_creator` */
|
|
567
|
+
400: {
|
|
568
|
+
headers: {
|
|
569
|
+
[name: string]: unknown;
|
|
570
|
+
};
|
|
571
|
+
content?: never;
|
|
572
|
+
};
|
|
573
|
+
/** @description Workspace not found */
|
|
574
|
+
404: {
|
|
575
|
+
headers: {
|
|
576
|
+
[name: string]: unknown;
|
|
577
|
+
};
|
|
578
|
+
content?: never;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
getProject: {
|
|
583
|
+
parameters: {
|
|
584
|
+
query?: never;
|
|
585
|
+
header?: never;
|
|
586
|
+
path: {
|
|
587
|
+
/** @description The unique identifier of the project to retrieve */
|
|
588
|
+
project_id: string;
|
|
589
|
+
};
|
|
590
|
+
cookie?: never;
|
|
591
|
+
};
|
|
592
|
+
requestBody?: never;
|
|
593
|
+
responses: {
|
|
594
|
+
/** @description Project retrieved successfully */
|
|
595
|
+
200: {
|
|
596
|
+
headers: {
|
|
597
|
+
[name: string]: unknown;
|
|
598
|
+
};
|
|
599
|
+
content: {
|
|
600
|
+
'application/json': components['schemas']['GetProjectResponse'];
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
/** @description Project not found */
|
|
604
|
+
404: {
|
|
605
|
+
headers: {
|
|
606
|
+
[name: string]: unknown;
|
|
607
|
+
};
|
|
608
|
+
content?: never;
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
updateProject: {
|
|
613
|
+
parameters: {
|
|
614
|
+
query?: never;
|
|
615
|
+
header?: never;
|
|
616
|
+
path: {
|
|
617
|
+
/** @description The unique identifier of the project to update */
|
|
618
|
+
project_id: string;
|
|
619
|
+
};
|
|
620
|
+
cookie?: never;
|
|
621
|
+
};
|
|
622
|
+
requestBody: {
|
|
623
|
+
content: {
|
|
624
|
+
'application/json': components['schemas']['PutProjectRequest'];
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
responses: {
|
|
628
|
+
/** @description Project updated successfully */
|
|
629
|
+
200: {
|
|
630
|
+
headers: {
|
|
631
|
+
[name: string]: unknown;
|
|
632
|
+
};
|
|
633
|
+
content: {
|
|
634
|
+
'application/json': components['schemas']['UpdateProjectResponse'];
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
/** @description Invalid request body */
|
|
638
|
+
400: {
|
|
639
|
+
headers: {
|
|
640
|
+
[name: string]: unknown;
|
|
641
|
+
};
|
|
642
|
+
content?: never;
|
|
643
|
+
};
|
|
644
|
+
/** @description Project not found */
|
|
645
|
+
404: {
|
|
646
|
+
headers: {
|
|
647
|
+
[name: string]: unknown;
|
|
648
|
+
};
|
|
649
|
+
content?: never;
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
deleteProject: {
|
|
654
|
+
parameters: {
|
|
655
|
+
query?: never;
|
|
656
|
+
header?: never;
|
|
657
|
+
path: {
|
|
658
|
+
/** @description The unique identifier of the project to delete */
|
|
659
|
+
project_id: string;
|
|
660
|
+
};
|
|
661
|
+
cookie?: never;
|
|
662
|
+
};
|
|
663
|
+
requestBody?: never;
|
|
664
|
+
responses: {
|
|
665
|
+
/** @description Project deleted successfully */
|
|
666
|
+
200: {
|
|
667
|
+
headers: {
|
|
668
|
+
[name: string]: unknown;
|
|
669
|
+
};
|
|
670
|
+
content: {
|
|
671
|
+
'application/json': components['schemas']['DeleteProjectResponse'];
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
/** @description Project not found */
|
|
675
|
+
404: {
|
|
676
|
+
headers: {
|
|
677
|
+
[name: string]: unknown;
|
|
678
|
+
};
|
|
679
|
+
content?: never;
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { Client } from './generated/client.js';
|
|
2
|
+
export {
|
|
3
|
+
HoneyHiveError,
|
|
4
|
+
ApiError,
|
|
5
|
+
NetworkError,
|
|
6
|
+
type ClientConfig,
|
|
7
|
+
type ErrorResponse,
|
|
8
|
+
type FetchOptions,
|
|
9
|
+
} from './util.js';
|
|
10
|
+
// AUTO-GENERATED — do not edit below this line. Run `pnpm turbo run generate` to regenerate.
|
|
11
|
+
export type {
|
|
12
|
+
ListAlertsRequest,
|
|
13
|
+
CreateAlertRequest,
|
|
14
|
+
GetAlertRequest,
|
|
15
|
+
CreateProjectRequest,
|
|
16
|
+
GetProjectRequest,
|
|
17
|
+
UpdateProjectRequest,
|
|
18
|
+
DeleteProjectRequest,
|
|
19
|
+
ListAlertsResponse,
|
|
20
|
+
CreateAlertResponse,
|
|
21
|
+
GetAlertResponse,
|
|
22
|
+
CreateProjectResponse,
|
|
23
|
+
GetProjectResponse,
|
|
24
|
+
UpdateProjectResponse,
|
|
25
|
+
DeleteProjectResponse,
|
|
26
|
+
} from './generated/apiTypes.js';
|