@rustrak/client 0.1.2
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/LICENSE +22 -0
- package/README.md +316 -0
- package/dist/index.cjs +781 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +433 -0
- package/dist/index.d.ts +433 -0
- package/dist/index.js +766 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { z, ZodSchema, ZodError } from 'zod';
|
|
2
|
+
import { KyInstance } from 'ky';
|
|
3
|
+
|
|
4
|
+
interface ClientConfig {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
token?: string;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
maxRetries?: number;
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const channelTypeSchema: z.ZodEnum<{
|
|
13
|
+
webhook: "webhook";
|
|
14
|
+
email: "email";
|
|
15
|
+
slack: "slack";
|
|
16
|
+
}>;
|
|
17
|
+
declare const alertTypeSchema: z.ZodEnum<{
|
|
18
|
+
new_issue: "new_issue";
|
|
19
|
+
regression: "regression";
|
|
20
|
+
unmute: "unmute";
|
|
21
|
+
}>;
|
|
22
|
+
declare const alertStatusSchema: z.ZodEnum<{
|
|
23
|
+
pending: "pending";
|
|
24
|
+
sent: "sent";
|
|
25
|
+
failed: "failed";
|
|
26
|
+
skipped: "skipped";
|
|
27
|
+
}>;
|
|
28
|
+
declare const notificationChannelSchema: z.ZodObject<{
|
|
29
|
+
id: z.ZodNumber;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
channel_type: z.ZodEnum<{
|
|
32
|
+
webhook: "webhook";
|
|
33
|
+
email: "email";
|
|
34
|
+
slack: "slack";
|
|
35
|
+
}>;
|
|
36
|
+
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
37
|
+
is_enabled: z.ZodBoolean;
|
|
38
|
+
failure_count: z.ZodNumber;
|
|
39
|
+
last_failure_at: z.ZodNullable<z.ZodString>;
|
|
40
|
+
last_failure_message: z.ZodNullable<z.ZodString>;
|
|
41
|
+
last_success_at: z.ZodNullable<z.ZodString>;
|
|
42
|
+
created_at: z.ZodString;
|
|
43
|
+
updated_at: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
declare const createNotificationChannelSchema: z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
channel_type: z.ZodEnum<{
|
|
48
|
+
webhook: "webhook";
|
|
49
|
+
email: "email";
|
|
50
|
+
slack: "slack";
|
|
51
|
+
}>;
|
|
52
|
+
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
53
|
+
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
declare const updateNotificationChannelSchema: z.ZodObject<{
|
|
56
|
+
name: z.ZodOptional<z.ZodString>;
|
|
57
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
58
|
+
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
declare const alertRuleSchema: z.ZodObject<{
|
|
61
|
+
id: z.ZodNumber;
|
|
62
|
+
project_id: z.ZodNumber;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
alert_type: z.ZodEnum<{
|
|
65
|
+
new_issue: "new_issue";
|
|
66
|
+
regression: "regression";
|
|
67
|
+
unmute: "unmute";
|
|
68
|
+
}>;
|
|
69
|
+
is_enabled: z.ZodBoolean;
|
|
70
|
+
conditions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
71
|
+
cooldown_minutes: z.ZodNumber;
|
|
72
|
+
last_triggered_at: z.ZodNullable<z.ZodString>;
|
|
73
|
+
created_at: z.ZodString;
|
|
74
|
+
updated_at: z.ZodString;
|
|
75
|
+
channel_ids: z.ZodArray<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
declare const createAlertRuleSchema: z.ZodObject<{
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
alert_type: z.ZodEnum<{
|
|
80
|
+
new_issue: "new_issue";
|
|
81
|
+
regression: "regression";
|
|
82
|
+
unmute: "unmute";
|
|
83
|
+
}>;
|
|
84
|
+
channel_ids: z.ZodArray<z.ZodNumber>;
|
|
85
|
+
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
conditions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
cooldown_minutes: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
declare const updateAlertRuleSchema: z.ZodObject<{
|
|
90
|
+
name: z.ZodOptional<z.ZodString>;
|
|
91
|
+
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
conditions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
93
|
+
cooldown_minutes: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
channel_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
declare const alertHistorySchema: z.ZodObject<{
|
|
97
|
+
id: z.ZodNumber;
|
|
98
|
+
alert_rule_id: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
channel_id: z.ZodNullable<z.ZodNumber>;
|
|
100
|
+
issue_id: z.ZodNullable<z.ZodString>;
|
|
101
|
+
project_id: z.ZodNullable<z.ZodNumber>;
|
|
102
|
+
alert_type: z.ZodString;
|
|
103
|
+
channel_type: z.ZodString;
|
|
104
|
+
channel_name: z.ZodString;
|
|
105
|
+
status: z.ZodEnum<{
|
|
106
|
+
pending: "pending";
|
|
107
|
+
sent: "sent";
|
|
108
|
+
failed: "failed";
|
|
109
|
+
skipped: "skipped";
|
|
110
|
+
}>;
|
|
111
|
+
attempt_count: z.ZodNumber;
|
|
112
|
+
next_retry_at: z.ZodNullable<z.ZodString>;
|
|
113
|
+
error_message: z.ZodNullable<z.ZodString>;
|
|
114
|
+
http_status_code: z.ZodNullable<z.ZodNumber>;
|
|
115
|
+
idempotency_key: z.ZodString;
|
|
116
|
+
created_at: z.ZodString;
|
|
117
|
+
sent_at: z.ZodNullable<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
declare const testChannelResponseSchema: z.ZodObject<{
|
|
120
|
+
success: z.ZodBoolean;
|
|
121
|
+
message: z.ZodString;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
|
|
124
|
+
type ChannelType = z.infer<typeof channelTypeSchema>;
|
|
125
|
+
type AlertType = z.infer<typeof alertTypeSchema>;
|
|
126
|
+
type AlertStatus = z.infer<typeof alertStatusSchema>;
|
|
127
|
+
type NotificationChannel = z.infer<typeof notificationChannelSchema>;
|
|
128
|
+
type CreateNotificationChannel = z.infer<typeof createNotificationChannelSchema>;
|
|
129
|
+
type UpdateNotificationChannel = z.infer<typeof updateNotificationChannelSchema>;
|
|
130
|
+
type AlertRule = z.infer<typeof alertRuleSchema>;
|
|
131
|
+
type CreateAlertRule = z.infer<typeof createAlertRuleSchema>;
|
|
132
|
+
type UpdateAlertRule = z.infer<typeof updateAlertRuleSchema>;
|
|
133
|
+
type AlertHistory = z.infer<typeof alertHistorySchema>;
|
|
134
|
+
type TestChannelResponse = z.infer<typeof testChannelResponseSchema>;
|
|
135
|
+
interface ListAlertHistoryOptions {
|
|
136
|
+
limit?: number;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare abstract class BaseResource {
|
|
140
|
+
protected readonly http: KyInstance;
|
|
141
|
+
constructor(http: KyInstance);
|
|
142
|
+
protected validate<T>(data: unknown, schema: ZodSchema<T>): T;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare class AlertChannelsResource extends BaseResource {
|
|
146
|
+
list(): Promise<NotificationChannel[]>;
|
|
147
|
+
get(id: number): Promise<NotificationChannel>;
|
|
148
|
+
create(input: CreateNotificationChannel): Promise<NotificationChannel>;
|
|
149
|
+
update(id: number, input: UpdateNotificationChannel): Promise<NotificationChannel>;
|
|
150
|
+
delete(id: number): Promise<void>;
|
|
151
|
+
test(id: number): Promise<TestChannelResponse>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare class AlertRulesResource extends BaseResource {
|
|
155
|
+
list(projectId: number): Promise<AlertRule[]>;
|
|
156
|
+
get(projectId: number, ruleId: number): Promise<AlertRule>;
|
|
157
|
+
create(projectId: number, input: CreateAlertRule): Promise<AlertRule>;
|
|
158
|
+
update(projectId: number, ruleId: number, input: UpdateAlertRule): Promise<AlertRule>;
|
|
159
|
+
delete(projectId: number, ruleId: number): Promise<void>;
|
|
160
|
+
listHistory(projectId: number, options?: ListAlertHistoryOptions): Promise<AlertHistory[]>;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare const userSchema: z.ZodObject<{
|
|
164
|
+
id: z.ZodNumber;
|
|
165
|
+
email: z.ZodString;
|
|
166
|
+
is_admin: z.ZodBoolean;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
declare const authResponseSchema: z.ZodObject<{
|
|
169
|
+
user: z.ZodObject<{
|
|
170
|
+
id: z.ZodNumber;
|
|
171
|
+
email: z.ZodString;
|
|
172
|
+
is_admin: z.ZodBoolean;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
declare const loginResultSchema: z.ZodObject<{
|
|
176
|
+
user: z.ZodObject<{
|
|
177
|
+
id: z.ZodNumber;
|
|
178
|
+
email: z.ZodString;
|
|
179
|
+
is_admin: z.ZodBoolean;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
cookies: z.ZodArray<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
declare const loginRequestSchema: z.ZodObject<{
|
|
184
|
+
email: z.ZodString;
|
|
185
|
+
password: z.ZodString;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
declare const registerRequestSchema: z.ZodObject<{
|
|
188
|
+
email: z.ZodString;
|
|
189
|
+
password: z.ZodString;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
|
|
192
|
+
type User = z.infer<typeof userSchema>;
|
|
193
|
+
type AuthResponse = z.infer<typeof authResponseSchema>;
|
|
194
|
+
type LoginResult = z.infer<typeof loginResultSchema>;
|
|
195
|
+
type LoginRequest = z.infer<typeof loginRequestSchema>;
|
|
196
|
+
type RegisterRequest = z.infer<typeof registerRequestSchema>;
|
|
197
|
+
|
|
198
|
+
declare class AuthResource extends BaseResource {
|
|
199
|
+
register(credentials: RegisterRequest): Promise<LoginResult>;
|
|
200
|
+
login(credentials: LoginRequest): Promise<LoginResult>;
|
|
201
|
+
logout(): Promise<string[]>;
|
|
202
|
+
getCurrentUser(): Promise<User>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare const sortOrderSchema: z.ZodEnum<{
|
|
206
|
+
asc: "asc";
|
|
207
|
+
desc: "desc";
|
|
208
|
+
}>;
|
|
209
|
+
declare const issueSortSchema: z.ZodEnum<{
|
|
210
|
+
digest_order: "digest_order";
|
|
211
|
+
last_seen: "last_seen";
|
|
212
|
+
}>;
|
|
213
|
+
declare const issueFilterSchema: z.ZodEnum<{
|
|
214
|
+
open: "open";
|
|
215
|
+
resolved: "resolved";
|
|
216
|
+
muted: "muted";
|
|
217
|
+
all: "all";
|
|
218
|
+
}>;
|
|
219
|
+
declare const apiErrorSchema: z.ZodObject<{
|
|
220
|
+
error: z.ZodString;
|
|
221
|
+
message: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
|
|
224
|
+
interface PaginatedResponse<T> {
|
|
225
|
+
items: T[];
|
|
226
|
+
next_cursor?: string;
|
|
227
|
+
has_more: boolean;
|
|
228
|
+
}
|
|
229
|
+
interface OffsetPaginatedResponse<T> {
|
|
230
|
+
items: T[];
|
|
231
|
+
total_count: number;
|
|
232
|
+
page: number;
|
|
233
|
+
per_page: number;
|
|
234
|
+
total_pages: number;
|
|
235
|
+
}
|
|
236
|
+
type SortOrder = z.infer<typeof sortOrderSchema>;
|
|
237
|
+
type IssueSort = z.infer<typeof issueSortSchema>;
|
|
238
|
+
type IssueFilter = z.infer<typeof issueFilterSchema>;
|
|
239
|
+
type ApiError = z.infer<typeof apiErrorSchema>;
|
|
240
|
+
interface ListIssuesOptions {
|
|
241
|
+
page?: number;
|
|
242
|
+
per_page?: number;
|
|
243
|
+
sort?: IssueSort;
|
|
244
|
+
order?: SortOrder;
|
|
245
|
+
filter?: IssueFilter;
|
|
246
|
+
}
|
|
247
|
+
interface ListEventsOptions {
|
|
248
|
+
order?: SortOrder;
|
|
249
|
+
cursor?: string;
|
|
250
|
+
}
|
|
251
|
+
interface ListProjectsOptions {
|
|
252
|
+
page?: number;
|
|
253
|
+
per_page?: number;
|
|
254
|
+
order?: SortOrder;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare const eventSchema: z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
event_id: z.ZodString;
|
|
260
|
+
issue_id: z.ZodString;
|
|
261
|
+
title: z.ZodString;
|
|
262
|
+
timestamp: z.ZodString;
|
|
263
|
+
level: z.ZodString;
|
|
264
|
+
platform: z.ZodString;
|
|
265
|
+
release: z.ZodString;
|
|
266
|
+
environment: z.ZodString;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
declare const eventDetailSchema: z.ZodObject<{
|
|
269
|
+
id: z.ZodString;
|
|
270
|
+
event_id: z.ZodString;
|
|
271
|
+
issue_id: z.ZodString;
|
|
272
|
+
title: z.ZodString;
|
|
273
|
+
timestamp: z.ZodString;
|
|
274
|
+
ingested_at: z.ZodString;
|
|
275
|
+
level: z.ZodString;
|
|
276
|
+
platform: z.ZodString;
|
|
277
|
+
release: z.ZodString;
|
|
278
|
+
environment: z.ZodString;
|
|
279
|
+
server_name: z.ZodString;
|
|
280
|
+
sdk_name: z.ZodString;
|
|
281
|
+
sdk_version: z.ZodString;
|
|
282
|
+
data: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
|
|
285
|
+
type Event = z.infer<typeof eventSchema>;
|
|
286
|
+
type EventDetail = z.infer<typeof eventDetailSchema>;
|
|
287
|
+
|
|
288
|
+
declare const issueSchema: z.ZodObject<{
|
|
289
|
+
id: z.ZodString;
|
|
290
|
+
project_id: z.ZodNumber;
|
|
291
|
+
short_id: z.ZodString;
|
|
292
|
+
title: z.ZodString;
|
|
293
|
+
value: z.ZodString;
|
|
294
|
+
first_seen: z.ZodString;
|
|
295
|
+
last_seen: z.ZodString;
|
|
296
|
+
event_count: z.ZodNumber;
|
|
297
|
+
level: z.ZodNullable<z.ZodString>;
|
|
298
|
+
platform: z.ZodNullable<z.ZodString>;
|
|
299
|
+
is_resolved: z.ZodBoolean;
|
|
300
|
+
is_muted: z.ZodBoolean;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
declare const updateIssueStateSchema: z.ZodObject<{
|
|
303
|
+
is_resolved: z.ZodOptional<z.ZodBoolean>;
|
|
304
|
+
is_muted: z.ZodOptional<z.ZodBoolean>;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
|
|
307
|
+
type Issue = z.infer<typeof issueSchema>;
|
|
308
|
+
type UpdateIssueState = z.infer<typeof updateIssueStateSchema>;
|
|
309
|
+
|
|
310
|
+
declare const projectSchema: z.ZodObject<{
|
|
311
|
+
id: z.ZodNumber;
|
|
312
|
+
name: z.ZodString;
|
|
313
|
+
slug: z.ZodString;
|
|
314
|
+
sentry_key: z.ZodString;
|
|
315
|
+
dsn: z.ZodString;
|
|
316
|
+
stored_event_count: z.ZodNumber;
|
|
317
|
+
digested_event_count: z.ZodNumber;
|
|
318
|
+
created_at: z.ZodString;
|
|
319
|
+
updated_at: z.ZodString;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
declare const createProjectSchema: z.ZodObject<{
|
|
322
|
+
name: z.ZodString;
|
|
323
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
declare const updateProjectSchema: z.ZodObject<{
|
|
326
|
+
name: z.ZodOptional<z.ZodString>;
|
|
327
|
+
}, z.core.$strip>;
|
|
328
|
+
|
|
329
|
+
type Project = z.infer<typeof projectSchema>;
|
|
330
|
+
type CreateProject = z.infer<typeof createProjectSchema>;
|
|
331
|
+
type UpdateProject = z.infer<typeof updateProjectSchema>;
|
|
332
|
+
|
|
333
|
+
declare const authTokenSchema: z.ZodObject<{
|
|
334
|
+
id: z.ZodNumber;
|
|
335
|
+
token_prefix: z.ZodString;
|
|
336
|
+
description: z.ZodNullable<z.ZodString>;
|
|
337
|
+
created_at: z.ZodString;
|
|
338
|
+
last_used_at: z.ZodNullable<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
declare const authTokenCreatedSchema: z.ZodObject<{
|
|
341
|
+
id: z.ZodNumber;
|
|
342
|
+
token: z.ZodString;
|
|
343
|
+
description: z.ZodNullable<z.ZodString>;
|
|
344
|
+
created_at: z.ZodString;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
declare const createAuthTokenSchema: z.ZodObject<{
|
|
347
|
+
description: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
|
|
350
|
+
type AuthToken = z.infer<typeof authTokenSchema>;
|
|
351
|
+
type AuthTokenCreated = z.infer<typeof authTokenCreatedSchema>;
|
|
352
|
+
type CreateAuthToken = z.infer<typeof createAuthTokenSchema>;
|
|
353
|
+
|
|
354
|
+
declare class EventsResource extends BaseResource {
|
|
355
|
+
list(projectId: number, issueId: string, options?: ListEventsOptions): Promise<PaginatedResponse<Event>>;
|
|
356
|
+
get(projectId: number, issueId: string, eventId: string): Promise<EventDetail>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
declare class IssuesResource extends BaseResource {
|
|
360
|
+
list(projectId: number, options?: ListIssuesOptions): Promise<OffsetPaginatedResponse<Issue>>;
|
|
361
|
+
get(projectId: number, issueId: string): Promise<Issue>;
|
|
362
|
+
updateState(projectId: number, issueId: string, input: UpdateIssueState): Promise<Issue>;
|
|
363
|
+
delete(projectId: number, issueId: string): Promise<void>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare class ProjectsResource extends BaseResource {
|
|
367
|
+
list(options?: ListProjectsOptions): Promise<OffsetPaginatedResponse<Project>>;
|
|
368
|
+
get(id: number): Promise<Project>;
|
|
369
|
+
create(input: CreateProject): Promise<Project>;
|
|
370
|
+
update(id: number, input: UpdateProject): Promise<Project>;
|
|
371
|
+
delete(id: number): Promise<void>;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
declare class TokensResource extends BaseResource {
|
|
375
|
+
list(): Promise<AuthToken[]>;
|
|
376
|
+
get(id: number): Promise<AuthToken>;
|
|
377
|
+
create(input: CreateAuthToken): Promise<AuthTokenCreated>;
|
|
378
|
+
delete(id: number): Promise<void>;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
declare class RustrakClient {
|
|
382
|
+
private readonly http;
|
|
383
|
+
readonly auth: AuthResource;
|
|
384
|
+
readonly projects: ProjectsResource;
|
|
385
|
+
readonly issues: IssuesResource;
|
|
386
|
+
readonly events: EventsResource;
|
|
387
|
+
readonly tokens: TokensResource;
|
|
388
|
+
readonly alertChannels: AlertChannelsResource;
|
|
389
|
+
readonly alertRules: AlertRulesResource;
|
|
390
|
+
constructor(config: ClientConfig);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare class RustrakError extends Error {
|
|
394
|
+
readonly retryable: boolean;
|
|
395
|
+
readonly statusCode?: number;
|
|
396
|
+
readonly cause?: Error;
|
|
397
|
+
constructor(message: string, options?: {
|
|
398
|
+
retryable?: boolean;
|
|
399
|
+
statusCode?: number;
|
|
400
|
+
cause?: Error;
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
declare class NetworkError extends RustrakError {
|
|
405
|
+
constructor(message: string, cause?: Error);
|
|
406
|
+
}
|
|
407
|
+
declare class AuthenticationError extends RustrakError {
|
|
408
|
+
constructor(message?: string);
|
|
409
|
+
}
|
|
410
|
+
declare class AuthorizationError extends RustrakError {
|
|
411
|
+
constructor(message?: string);
|
|
412
|
+
}
|
|
413
|
+
declare class NotFoundError extends RustrakError {
|
|
414
|
+
constructor(resource: string);
|
|
415
|
+
}
|
|
416
|
+
declare class RateLimitError extends RustrakError {
|
|
417
|
+
readonly retryAfter?: number;
|
|
418
|
+
constructor(message?: string, retryAfter?: string | number);
|
|
419
|
+
}
|
|
420
|
+
declare class ServerError extends RustrakError {
|
|
421
|
+
constructor(message: string, statusCode?: number);
|
|
422
|
+
}
|
|
423
|
+
declare class BadRequestError extends RustrakError {
|
|
424
|
+
constructor(message: string);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
declare class ValidationError extends RustrakError {
|
|
428
|
+
readonly validationErrors?: ZodError;
|
|
429
|
+
constructor(message: string, validationErrors?: ZodError);
|
|
430
|
+
getValidationDetails(): string;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export { type AlertHistory, type AlertRule, type AlertStatus, type AlertType, type ApiError, type AuthResponse, type AuthToken, type AuthTokenCreated, AuthenticationError, AuthorizationError, BadRequestError, type ChannelType, type ClientConfig, type CreateAlertRule, type CreateAuthToken, type CreateNotificationChannel, type CreateProject, type Event, type EventDetail, type Issue, type IssueFilter, type IssueSort, type ListAlertHistoryOptions, type ListEventsOptions, type ListIssuesOptions, type ListProjectsOptions, type LoginRequest, type LoginResult, NetworkError, NotFoundError, type NotificationChannel, type OffsetPaginatedResponse, type PaginatedResponse, type Project, RateLimitError, type RegisterRequest, RustrakClient, RustrakError, ServerError, type SortOrder, type TestChannelResponse, type UpdateAlertRule, type UpdateIssueState, type UpdateNotificationChannel, type UpdateProject, type User, ValidationError };
|