@rustrak/client 0.16.3 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +205 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +210 -4
- package/dist/index.d.ts +210 -4
- package/dist/index.js +205 -3
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -233,6 +233,17 @@ declare const alertRuleChannelInputSchema: z.ZodObject<{
|
|
|
233
233
|
integration_id: z.ZodNumber;
|
|
234
234
|
routing_override: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
235
235
|
}, z.core.$strip>;
|
|
236
|
+
declare const alertRuleConditionsSchema: z.ZodObject<{
|
|
237
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
238
|
+
error: "error";
|
|
239
|
+
debug: "debug";
|
|
240
|
+
info: "info";
|
|
241
|
+
warning: "warning";
|
|
242
|
+
fatal: "fatal";
|
|
243
|
+
}>>>;
|
|
244
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
236
247
|
declare const alertRuleSchema: z.ZodObject<{
|
|
237
248
|
id: z.ZodNumber;
|
|
238
249
|
project_id: z.ZodNumber;
|
|
@@ -243,7 +254,17 @@ declare const alertRuleSchema: z.ZodObject<{
|
|
|
243
254
|
unmute: "unmute";
|
|
244
255
|
}>;
|
|
245
256
|
is_enabled: z.ZodBoolean;
|
|
246
|
-
conditions: z.
|
|
257
|
+
conditions: z.ZodCatch<z.ZodObject<{
|
|
258
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
259
|
+
error: "error";
|
|
260
|
+
debug: "debug";
|
|
261
|
+
info: "info";
|
|
262
|
+
warning: "warning";
|
|
263
|
+
fatal: "fatal";
|
|
264
|
+
}>>>;
|
|
265
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
266
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
267
|
+
}, z.core.$strip>>;
|
|
247
268
|
cooldown_minutes: z.ZodNumber;
|
|
248
269
|
last_triggered_at: z.ZodNullable<z.ZodString>;
|
|
249
270
|
created_at: z.ZodString;
|
|
@@ -266,13 +287,33 @@ declare const createAlertRuleSchema: z.ZodObject<{
|
|
|
266
287
|
routing_override: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
267
288
|
}, z.core.$strip>>>;
|
|
268
289
|
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
269
|
-
conditions: z.ZodOptional<z.
|
|
290
|
+
conditions: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
292
|
+
error: "error";
|
|
293
|
+
debug: "debug";
|
|
294
|
+
info: "info";
|
|
295
|
+
warning: "warning";
|
|
296
|
+
fatal: "fatal";
|
|
297
|
+
}>>>;
|
|
298
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
299
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
300
|
+
}, z.core.$strip>>;
|
|
270
301
|
cooldown_minutes: z.ZodOptional<z.ZodNumber>;
|
|
271
302
|
}, z.core.$strip>;
|
|
272
303
|
declare const updateAlertRuleSchema: z.ZodObject<{
|
|
273
304
|
name: z.ZodOptional<z.ZodString>;
|
|
274
305
|
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
-
conditions: z.ZodOptional<z.
|
|
306
|
+
conditions: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
308
|
+
error: "error";
|
|
309
|
+
debug: "debug";
|
|
310
|
+
info: "info";
|
|
311
|
+
warning: "warning";
|
|
312
|
+
fatal: "fatal";
|
|
313
|
+
}>>>;
|
|
314
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
315
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
276
317
|
cooldown_minutes: z.ZodOptional<z.ZodNumber>;
|
|
277
318
|
channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
278
319
|
integration_id: z.ZodNumber;
|
|
@@ -324,6 +365,7 @@ type CreateAlertIntegration = z.infer<typeof createAlertIntegrationSchema>;
|
|
|
324
365
|
type UpdateAlertIntegration = z.infer<typeof updateAlertIntegrationSchema>;
|
|
325
366
|
type AlertRuleChannelInput = z.infer<typeof alertRuleChannelInputSchema>;
|
|
326
367
|
type RoutingOverride = Record<string, unknown>;
|
|
368
|
+
type AlertRuleConditions = z.infer<typeof alertRuleConditionsSchema>;
|
|
327
369
|
type AlertRule = z.infer<typeof alertRuleSchema>;
|
|
328
370
|
type CreateAlertRule = z.infer<typeof createAlertRuleSchema>;
|
|
329
371
|
type UpdateAlertRule = z.infer<typeof updateAlertRuleSchema>;
|
|
@@ -444,6 +486,145 @@ declare const eventDetailSchema: z.ZodObject<{
|
|
|
444
486
|
type Event = z.infer<typeof eventSchema>;
|
|
445
487
|
type EventDetail = z.infer<typeof eventDetailSchema>;
|
|
446
488
|
|
|
489
|
+
declare const gitHubInstallationSchema: z.ZodObject<{
|
|
490
|
+
id: z.ZodNumber;
|
|
491
|
+
account_login: z.ZodString;
|
|
492
|
+
account_type: z.ZodString;
|
|
493
|
+
suspended: z.ZodBoolean;
|
|
494
|
+
created_at: z.ZodString;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
declare const gitHubStatusSchema: z.ZodObject<{
|
|
497
|
+
app: z.ZodNullable<z.ZodObject<{
|
|
498
|
+
app_id: z.ZodNumber;
|
|
499
|
+
slug: z.ZodString;
|
|
500
|
+
html_url: z.ZodString;
|
|
501
|
+
owner_login: z.ZodString;
|
|
502
|
+
install_url: z.ZodString;
|
|
503
|
+
last_webhook_at: z.ZodNullable<z.ZodString>;
|
|
504
|
+
created_at: z.ZodString;
|
|
505
|
+
}, z.core.$strip>>;
|
|
506
|
+
installations: z.ZodArray<z.ZodObject<{
|
|
507
|
+
id: z.ZodNumber;
|
|
508
|
+
account_login: z.ZodString;
|
|
509
|
+
account_type: z.ZodString;
|
|
510
|
+
suspended: z.ZodBoolean;
|
|
511
|
+
created_at: z.ZodString;
|
|
512
|
+
}, z.core.$strip>>;
|
|
513
|
+
webhook_url: z.ZodString;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
declare const gitHubManifestSchema: z.ZodObject<{
|
|
516
|
+
action_url: z.ZodString;
|
|
517
|
+
manifest: z.ZodString;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
declare const gitHubRepositorySchema: z.ZodObject<{
|
|
520
|
+
installation_id: z.ZodNumber;
|
|
521
|
+
full_name: z.ZodString;
|
|
522
|
+
default_branch: z.ZodString;
|
|
523
|
+
private: z.ZodBoolean;
|
|
524
|
+
html_url: z.ZodString;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
declare const codeMappingSchema: z.ZodObject<{
|
|
527
|
+
stack_root: z.ZodString;
|
|
528
|
+
source_root: z.ZodString;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
declare const projectRepositorySchema: z.ZodObject<{
|
|
531
|
+
project_id: z.ZodNumber;
|
|
532
|
+
installation_id: z.ZodNumber;
|
|
533
|
+
repo_full_name: z.ZodString;
|
|
534
|
+
default_branch: z.ZodString;
|
|
535
|
+
html_url: z.ZodString;
|
|
536
|
+
code_mappings: z.ZodArray<z.ZodObject<{
|
|
537
|
+
stack_root: z.ZodString;
|
|
538
|
+
source_root: z.ZodString;
|
|
539
|
+
}, z.core.$strip>>;
|
|
540
|
+
auto_create_issues: z.ZodBoolean;
|
|
541
|
+
auto_create_conditions: z.ZodObject<{
|
|
542
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
543
|
+
error: "error";
|
|
544
|
+
debug: "debug";
|
|
545
|
+
info: "info";
|
|
546
|
+
warning: "warning";
|
|
547
|
+
fatal: "fatal";
|
|
548
|
+
}>>>;
|
|
549
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
550
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
551
|
+
}, z.core.$strip>;
|
|
552
|
+
codeowners_rules: z.ZodNullable<z.ZodNumber>;
|
|
553
|
+
codeowners_synced_at: z.ZodNullable<z.ZodString>;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
declare const updateProjectRepositorySchema: z.ZodObject<{
|
|
556
|
+
installation_id: z.ZodNumber;
|
|
557
|
+
repo_full_name: z.ZodString;
|
|
558
|
+
code_mappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
559
|
+
stack_root: z.ZodString;
|
|
560
|
+
source_root: z.ZodString;
|
|
561
|
+
}, z.core.$strip>>>;
|
|
562
|
+
auto_create_issues: z.ZodOptional<z.ZodBoolean>;
|
|
563
|
+
auto_create_conditions: z.ZodOptional<z.ZodObject<{
|
|
564
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
565
|
+
error: "error";
|
|
566
|
+
debug: "debug";
|
|
567
|
+
info: "info";
|
|
568
|
+
warning: "warning";
|
|
569
|
+
fatal: "fatal";
|
|
570
|
+
}>>>;
|
|
571
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
572
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
573
|
+
}, z.core.$strip>>;
|
|
574
|
+
}, z.core.$strip>;
|
|
575
|
+
declare const issueLinkSchema: z.ZodObject<{
|
|
576
|
+
id: z.ZodNumber;
|
|
577
|
+
issue_id: z.ZodString;
|
|
578
|
+
repo_full_name: z.ZodString;
|
|
579
|
+
number: z.ZodNumber;
|
|
580
|
+
title: z.ZodString;
|
|
581
|
+
url: z.ZodString;
|
|
582
|
+
state: z.ZodString;
|
|
583
|
+
created_at: z.ZodString;
|
|
584
|
+
}, z.core.$strip>;
|
|
585
|
+
declare const repoCommitSchema: z.ZodObject<{
|
|
586
|
+
repo_full_name: z.ZodString;
|
|
587
|
+
sha: z.ZodString;
|
|
588
|
+
message: z.ZodString;
|
|
589
|
+
author_name: z.ZodString;
|
|
590
|
+
author_login: z.ZodNullable<z.ZodString>;
|
|
591
|
+
url: z.ZodString;
|
|
592
|
+
committed_at: z.ZodString;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
declare const issueGitHubSchema: z.ZodObject<{
|
|
595
|
+
links: z.ZodArray<z.ZodObject<{
|
|
596
|
+
id: z.ZodNumber;
|
|
597
|
+
issue_id: z.ZodString;
|
|
598
|
+
repo_full_name: z.ZodString;
|
|
599
|
+
number: z.ZodNumber;
|
|
600
|
+
title: z.ZodString;
|
|
601
|
+
url: z.ZodString;
|
|
602
|
+
state: z.ZodString;
|
|
603
|
+
created_at: z.ZodString;
|
|
604
|
+
}, z.core.$strip>>;
|
|
605
|
+
suspect_commits: z.ZodArray<z.ZodObject<{
|
|
606
|
+
repo_full_name: z.ZodString;
|
|
607
|
+
sha: z.ZodString;
|
|
608
|
+
message: z.ZodString;
|
|
609
|
+
author_name: z.ZodString;
|
|
610
|
+
author_login: z.ZodNullable<z.ZodString>;
|
|
611
|
+
url: z.ZodString;
|
|
612
|
+
committed_at: z.ZodString;
|
|
613
|
+
}, z.core.$strip>>;
|
|
614
|
+
owners: z.ZodArray<z.ZodString>;
|
|
615
|
+
}, z.core.$strip>;
|
|
616
|
+
|
|
617
|
+
type GitHubStatus = z.infer<typeof gitHubStatusSchema>;
|
|
618
|
+
type GitHubInstallation = z.infer<typeof gitHubInstallationSchema>;
|
|
619
|
+
type GitHubManifest = z.infer<typeof gitHubManifestSchema>;
|
|
620
|
+
type GitHubRepository = z.infer<typeof gitHubRepositorySchema>;
|
|
621
|
+
type CodeMapping = z.infer<typeof codeMappingSchema>;
|
|
622
|
+
type ProjectRepository = z.infer<typeof projectRepositorySchema>;
|
|
623
|
+
type UpdateProjectRepository = z.infer<typeof updateProjectRepositorySchema>;
|
|
624
|
+
type IssueLink = z.infer<typeof issueLinkSchema>;
|
|
625
|
+
type RepoCommit = z.infer<typeof repoCommitSchema>;
|
|
626
|
+
type IssueGitHub = z.infer<typeof issueGitHubSchema>;
|
|
627
|
+
|
|
447
628
|
declare const invitationSchema: z.ZodObject<{
|
|
448
629
|
token: z.ZodString;
|
|
449
630
|
email: z.ZodString;
|
|
@@ -1266,6 +1447,30 @@ declare class EventsResource extends BaseResource {
|
|
|
1266
1447
|
getBySentryId(projectId: number, eventId: string): Promise<Result<EventDetail, RustrakError>>;
|
|
1267
1448
|
}
|
|
1268
1449
|
|
|
1450
|
+
declare class GitHubResource extends BaseResource {
|
|
1451
|
+
status(): Promise<Result<GitHubStatus, RustrakError>>;
|
|
1452
|
+
manifest(organization?: string): Promise<Result<GitHubManifest, RustrakError>>;
|
|
1453
|
+
disconnect(): Promise<Result<void, RustrakError>>;
|
|
1454
|
+
repositories(projectId: number): Promise<Result<GitHubRepository[], RustrakError>>;
|
|
1455
|
+
projectRepository(projectId: number): Promise<Result<ProjectRepository | null, RustrakError>>;
|
|
1456
|
+
setProjectRepository(projectId: number, input: UpdateProjectRepository): Promise<Result<ProjectRepository, RustrakError>>;
|
|
1457
|
+
removeProjectRepository(projectId: number): Promise<Result<void, RustrakError>>;
|
|
1458
|
+
syncCodeowners(projectId: number): Promise<Result<ProjectRepository, RustrakError>>;
|
|
1459
|
+
issue(projectId: number, issueId: string): Promise<Result<IssueGitHub, RustrakError>>;
|
|
1460
|
+
createIssue(projectId: number, issueId: string, input?: {
|
|
1461
|
+
title?: string;
|
|
1462
|
+
body?: string;
|
|
1463
|
+
}): Promise<Result<IssueLink, RustrakError>>;
|
|
1464
|
+
linkIssue(projectId: number, issueId: string, reference: string): Promise<Result<IssueLink, RustrakError>>;
|
|
1465
|
+
unlinkIssue(projectId: number, issueId: string, linkId: number): Promise<Result<void, RustrakError>>;
|
|
1466
|
+
myLogin(): Promise<Result<{
|
|
1467
|
+
login: string | null;
|
|
1468
|
+
}, RustrakError>>;
|
|
1469
|
+
setMyLogin(login: string | null): Promise<Result<{
|
|
1470
|
+
login: string | null;
|
|
1471
|
+
}, RustrakError>>;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1269
1474
|
declare class HealthResource extends BaseResource {
|
|
1270
1475
|
getVersion(): Promise<Result<ServerVersion, RustrakError>>;
|
|
1271
1476
|
}
|
|
@@ -1412,7 +1617,8 @@ declare class RustrakClient {
|
|
|
1412
1617
|
readonly stats: StatsResource;
|
|
1413
1618
|
readonly storage: StorageResource;
|
|
1414
1619
|
readonly health: HealthResource;
|
|
1620
|
+
readonly github: GitHubResource;
|
|
1415
1621
|
constructor(config: ClientConfig);
|
|
1416
1622
|
}
|
|
1417
1623
|
|
|
1418
|
-
export { type AcceptInvitation, type ActivityEntry, type AgentBreakdownOptions, type AgentDurationPoint, type AgentModelRow, type AgentSummary, type AgentTimeseriesOptions, type AgentTimeseriesPoint, type AgentToolRow, type AgentTraceSummary, type AgentTracesOptions, type AlertHistory, type AlertIntegration, type AlertRule, type AlertRuleChannelInput, type AlertStatus, type AlertType, type ApiError, type AssembleInput, type AssembleResponse, type AuthResponse, type AuthToken, type AuthTokenCreated, type BulkDeleteIssues, type BulkUpdateIssues, type ChangePasswordRequest, type ChunkUploadCapability, type CleanupCounts, type CleanupOptions, type CleanupStatus, type ClientConfig, type CreateAlertIntegration, type CreateAlertRule, type CreateAuthToken, type CreateComment, type CreateInvitation, type CreateProject, type CreateUserReport, Err, type Event, type EventDetail, type EventTimeseries, type EventTimeseriesPoint, FIELD_ERROR_CODES, type FieldError, type FieldErrorCode, type GenAiBreakdownRow, type GlobalRole, type Invitation, type InvitationInfo, type Issue, type IssueAggregates, type IssueFilter, type IssueHash, type IssuePriority, type IssueSort, type IssueStats, type IssueStatsWindow, type IssueStatus, type IssueTagValue, type ListAlertHistoryOptions, type ListEventsOptions, type ListIssuesOptions, type ListLogsOptions, type ListProjectsOptions, type ListSourceMapsResponse, type ListSpansOptions, type ListTransactionsOptions, type Log, type LoginRequest, type LoginResult, type MetricDelta, NETWORK_ERROR_MESSAGE, type OffsetPaginatedResponse, Ok, type PaginatedResponse, type PreviewTemplateResponse, type Project, type ProjectListStats, type ProjectMember, type ProjectRole, type ProjectStatsSummary, type ProjectStorage, type ProviderType, type RateLimits, type RegisterRequest, type ReleaseHealthRow, type ReleaseHealthStatsOptions, type Result, type RoutingOverride, RustrakClient, type RustrakError, type RustrakErrorKind, SERVER_ERROR_MESSAGE, type ServerVersion, type SessionSummary, type SessionTimeseries, type SessionTimeseriesPoint, type SortOrder, type SourceMapFile, type SourceMapGcResult, type SourceMapStorage, type Span, type SpanDetail, type SsoConfig, type SsoLink, type SsoStart, type StorageSummary, TIMEOUT_ERROR_MESSAGE, type TagSummary, type TagValueCount, type TeamMember, type TestChannelResponse, type TestIntegrationBody, type Transaction, type TransactionDetail, type TransactionStats, type UpdateAlertIntegration, type UpdateAlertRule, type UpdateIssueState, type UpdateProject, type UpdateUserRole, type UpsertProjectMember, type User, type UserReport, isRetryable, mapResult, unwrap, unwrapOr };
|
|
1624
|
+
export { type AcceptInvitation, type ActivityEntry, type AgentBreakdownOptions, type AgentDurationPoint, type AgentModelRow, type AgentSummary, type AgentTimeseriesOptions, type AgentTimeseriesPoint, type AgentToolRow, type AgentTraceSummary, type AgentTracesOptions, type AlertHistory, type AlertIntegration, type AlertRule, type AlertRuleChannelInput, type AlertRuleConditions, type AlertStatus, type AlertType, type ApiError, type AssembleInput, type AssembleResponse, type AuthResponse, type AuthToken, type AuthTokenCreated, type BulkDeleteIssues, type BulkUpdateIssues, type ChangePasswordRequest, type ChunkUploadCapability, type CleanupCounts, type CleanupOptions, type CleanupStatus, type ClientConfig, type CodeMapping, type CreateAlertIntegration, type CreateAlertRule, type CreateAuthToken, type CreateComment, type CreateInvitation, type CreateProject, type CreateUserReport, Err, type Event, type EventDetail, type EventTimeseries, type EventTimeseriesPoint, FIELD_ERROR_CODES, type FieldError, type FieldErrorCode, type GenAiBreakdownRow, type GitHubInstallation, type GitHubManifest, type GitHubRepository, type GitHubStatus, type GlobalRole, type Invitation, type InvitationInfo, type Issue, type IssueAggregates, type IssueFilter, type IssueGitHub, type IssueHash, type IssueLink, type IssuePriority, type IssueSort, type IssueStats, type IssueStatsWindow, type IssueStatus, type IssueTagValue, type ListAlertHistoryOptions, type ListEventsOptions, type ListIssuesOptions, type ListLogsOptions, type ListProjectsOptions, type ListSourceMapsResponse, type ListSpansOptions, type ListTransactionsOptions, type Log, type LoginRequest, type LoginResult, type MetricDelta, NETWORK_ERROR_MESSAGE, type OffsetPaginatedResponse, Ok, type PaginatedResponse, type PreviewTemplateResponse, type Project, type ProjectListStats, type ProjectMember, type ProjectRepository, type ProjectRole, type ProjectStatsSummary, type ProjectStorage, type ProviderType, type RateLimits, type RegisterRequest, type ReleaseHealthRow, type ReleaseHealthStatsOptions, type RepoCommit, type Result, type RoutingOverride, RustrakClient, type RustrakError, type RustrakErrorKind, SERVER_ERROR_MESSAGE, type ServerVersion, type SessionSummary, type SessionTimeseries, type SessionTimeseriesPoint, type SortOrder, type SourceMapFile, type SourceMapGcResult, type SourceMapStorage, type Span, type SpanDetail, type SsoConfig, type SsoLink, type SsoStart, type StorageSummary, TIMEOUT_ERROR_MESSAGE, type TagSummary, type TagValueCount, type TeamMember, type TestChannelResponse, type TestIntegrationBody, type Transaction, type TransactionDetail, type TransactionStats, type UpdateAlertIntegration, type UpdateAlertRule, type UpdateIssueState, type UpdateProject, type UpdateProjectRepository, type UpdateUserRole, type UpsertProjectMember, type User, type UserReport, isRetryable, mapResult, unwrap, unwrapOr };
|
package/dist/index.d.ts
CHANGED
|
@@ -233,6 +233,17 @@ declare const alertRuleChannelInputSchema: z.ZodObject<{
|
|
|
233
233
|
integration_id: z.ZodNumber;
|
|
234
234
|
routing_override: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
235
235
|
}, z.core.$strip>;
|
|
236
|
+
declare const alertRuleConditionsSchema: z.ZodObject<{
|
|
237
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
238
|
+
error: "error";
|
|
239
|
+
debug: "debug";
|
|
240
|
+
info: "info";
|
|
241
|
+
warning: "warning";
|
|
242
|
+
fatal: "fatal";
|
|
243
|
+
}>>>;
|
|
244
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
236
247
|
declare const alertRuleSchema: z.ZodObject<{
|
|
237
248
|
id: z.ZodNumber;
|
|
238
249
|
project_id: z.ZodNumber;
|
|
@@ -243,7 +254,17 @@ declare const alertRuleSchema: z.ZodObject<{
|
|
|
243
254
|
unmute: "unmute";
|
|
244
255
|
}>;
|
|
245
256
|
is_enabled: z.ZodBoolean;
|
|
246
|
-
conditions: z.
|
|
257
|
+
conditions: z.ZodCatch<z.ZodObject<{
|
|
258
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
259
|
+
error: "error";
|
|
260
|
+
debug: "debug";
|
|
261
|
+
info: "info";
|
|
262
|
+
warning: "warning";
|
|
263
|
+
fatal: "fatal";
|
|
264
|
+
}>>>;
|
|
265
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
266
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
267
|
+
}, z.core.$strip>>;
|
|
247
268
|
cooldown_minutes: z.ZodNumber;
|
|
248
269
|
last_triggered_at: z.ZodNullable<z.ZodString>;
|
|
249
270
|
created_at: z.ZodString;
|
|
@@ -266,13 +287,33 @@ declare const createAlertRuleSchema: z.ZodObject<{
|
|
|
266
287
|
routing_override: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
267
288
|
}, z.core.$strip>>>;
|
|
268
289
|
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
269
|
-
conditions: z.ZodOptional<z.
|
|
290
|
+
conditions: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
292
|
+
error: "error";
|
|
293
|
+
debug: "debug";
|
|
294
|
+
info: "info";
|
|
295
|
+
warning: "warning";
|
|
296
|
+
fatal: "fatal";
|
|
297
|
+
}>>>;
|
|
298
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
299
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
300
|
+
}, z.core.$strip>>;
|
|
270
301
|
cooldown_minutes: z.ZodOptional<z.ZodNumber>;
|
|
271
302
|
}, z.core.$strip>;
|
|
272
303
|
declare const updateAlertRuleSchema: z.ZodObject<{
|
|
273
304
|
name: z.ZodOptional<z.ZodString>;
|
|
274
305
|
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
-
conditions: z.ZodOptional<z.
|
|
306
|
+
conditions: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
308
|
+
error: "error";
|
|
309
|
+
debug: "debug";
|
|
310
|
+
info: "info";
|
|
311
|
+
warning: "warning";
|
|
312
|
+
fatal: "fatal";
|
|
313
|
+
}>>>;
|
|
314
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
315
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
276
317
|
cooldown_minutes: z.ZodOptional<z.ZodNumber>;
|
|
277
318
|
channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
278
319
|
integration_id: z.ZodNumber;
|
|
@@ -324,6 +365,7 @@ type CreateAlertIntegration = z.infer<typeof createAlertIntegrationSchema>;
|
|
|
324
365
|
type UpdateAlertIntegration = z.infer<typeof updateAlertIntegrationSchema>;
|
|
325
366
|
type AlertRuleChannelInput = z.infer<typeof alertRuleChannelInputSchema>;
|
|
326
367
|
type RoutingOverride = Record<string, unknown>;
|
|
368
|
+
type AlertRuleConditions = z.infer<typeof alertRuleConditionsSchema>;
|
|
327
369
|
type AlertRule = z.infer<typeof alertRuleSchema>;
|
|
328
370
|
type CreateAlertRule = z.infer<typeof createAlertRuleSchema>;
|
|
329
371
|
type UpdateAlertRule = z.infer<typeof updateAlertRuleSchema>;
|
|
@@ -444,6 +486,145 @@ declare const eventDetailSchema: z.ZodObject<{
|
|
|
444
486
|
type Event = z.infer<typeof eventSchema>;
|
|
445
487
|
type EventDetail = z.infer<typeof eventDetailSchema>;
|
|
446
488
|
|
|
489
|
+
declare const gitHubInstallationSchema: z.ZodObject<{
|
|
490
|
+
id: z.ZodNumber;
|
|
491
|
+
account_login: z.ZodString;
|
|
492
|
+
account_type: z.ZodString;
|
|
493
|
+
suspended: z.ZodBoolean;
|
|
494
|
+
created_at: z.ZodString;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
declare const gitHubStatusSchema: z.ZodObject<{
|
|
497
|
+
app: z.ZodNullable<z.ZodObject<{
|
|
498
|
+
app_id: z.ZodNumber;
|
|
499
|
+
slug: z.ZodString;
|
|
500
|
+
html_url: z.ZodString;
|
|
501
|
+
owner_login: z.ZodString;
|
|
502
|
+
install_url: z.ZodString;
|
|
503
|
+
last_webhook_at: z.ZodNullable<z.ZodString>;
|
|
504
|
+
created_at: z.ZodString;
|
|
505
|
+
}, z.core.$strip>>;
|
|
506
|
+
installations: z.ZodArray<z.ZodObject<{
|
|
507
|
+
id: z.ZodNumber;
|
|
508
|
+
account_login: z.ZodString;
|
|
509
|
+
account_type: z.ZodString;
|
|
510
|
+
suspended: z.ZodBoolean;
|
|
511
|
+
created_at: z.ZodString;
|
|
512
|
+
}, z.core.$strip>>;
|
|
513
|
+
webhook_url: z.ZodString;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
declare const gitHubManifestSchema: z.ZodObject<{
|
|
516
|
+
action_url: z.ZodString;
|
|
517
|
+
manifest: z.ZodString;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
declare const gitHubRepositorySchema: z.ZodObject<{
|
|
520
|
+
installation_id: z.ZodNumber;
|
|
521
|
+
full_name: z.ZodString;
|
|
522
|
+
default_branch: z.ZodString;
|
|
523
|
+
private: z.ZodBoolean;
|
|
524
|
+
html_url: z.ZodString;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
declare const codeMappingSchema: z.ZodObject<{
|
|
527
|
+
stack_root: z.ZodString;
|
|
528
|
+
source_root: z.ZodString;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
declare const projectRepositorySchema: z.ZodObject<{
|
|
531
|
+
project_id: z.ZodNumber;
|
|
532
|
+
installation_id: z.ZodNumber;
|
|
533
|
+
repo_full_name: z.ZodString;
|
|
534
|
+
default_branch: z.ZodString;
|
|
535
|
+
html_url: z.ZodString;
|
|
536
|
+
code_mappings: z.ZodArray<z.ZodObject<{
|
|
537
|
+
stack_root: z.ZodString;
|
|
538
|
+
source_root: z.ZodString;
|
|
539
|
+
}, z.core.$strip>>;
|
|
540
|
+
auto_create_issues: z.ZodBoolean;
|
|
541
|
+
auto_create_conditions: z.ZodObject<{
|
|
542
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
543
|
+
error: "error";
|
|
544
|
+
debug: "debug";
|
|
545
|
+
info: "info";
|
|
546
|
+
warning: "warning";
|
|
547
|
+
fatal: "fatal";
|
|
548
|
+
}>>>;
|
|
549
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
550
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
551
|
+
}, z.core.$strip>;
|
|
552
|
+
codeowners_rules: z.ZodNullable<z.ZodNumber>;
|
|
553
|
+
codeowners_synced_at: z.ZodNullable<z.ZodString>;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
declare const updateProjectRepositorySchema: z.ZodObject<{
|
|
556
|
+
installation_id: z.ZodNumber;
|
|
557
|
+
repo_full_name: z.ZodString;
|
|
558
|
+
code_mappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
559
|
+
stack_root: z.ZodString;
|
|
560
|
+
source_root: z.ZodString;
|
|
561
|
+
}, z.core.$strip>>>;
|
|
562
|
+
auto_create_issues: z.ZodOptional<z.ZodBoolean>;
|
|
563
|
+
auto_create_conditions: z.ZodOptional<z.ZodObject<{
|
|
564
|
+
min_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
565
|
+
error: "error";
|
|
566
|
+
debug: "debug";
|
|
567
|
+
info: "info";
|
|
568
|
+
warning: "warning";
|
|
569
|
+
fatal: "fatal";
|
|
570
|
+
}>>>;
|
|
571
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
572
|
+
min_events: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
573
|
+
}, z.core.$strip>>;
|
|
574
|
+
}, z.core.$strip>;
|
|
575
|
+
declare const issueLinkSchema: z.ZodObject<{
|
|
576
|
+
id: z.ZodNumber;
|
|
577
|
+
issue_id: z.ZodString;
|
|
578
|
+
repo_full_name: z.ZodString;
|
|
579
|
+
number: z.ZodNumber;
|
|
580
|
+
title: z.ZodString;
|
|
581
|
+
url: z.ZodString;
|
|
582
|
+
state: z.ZodString;
|
|
583
|
+
created_at: z.ZodString;
|
|
584
|
+
}, z.core.$strip>;
|
|
585
|
+
declare const repoCommitSchema: z.ZodObject<{
|
|
586
|
+
repo_full_name: z.ZodString;
|
|
587
|
+
sha: z.ZodString;
|
|
588
|
+
message: z.ZodString;
|
|
589
|
+
author_name: z.ZodString;
|
|
590
|
+
author_login: z.ZodNullable<z.ZodString>;
|
|
591
|
+
url: z.ZodString;
|
|
592
|
+
committed_at: z.ZodString;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
declare const issueGitHubSchema: z.ZodObject<{
|
|
595
|
+
links: z.ZodArray<z.ZodObject<{
|
|
596
|
+
id: z.ZodNumber;
|
|
597
|
+
issue_id: z.ZodString;
|
|
598
|
+
repo_full_name: z.ZodString;
|
|
599
|
+
number: z.ZodNumber;
|
|
600
|
+
title: z.ZodString;
|
|
601
|
+
url: z.ZodString;
|
|
602
|
+
state: z.ZodString;
|
|
603
|
+
created_at: z.ZodString;
|
|
604
|
+
}, z.core.$strip>>;
|
|
605
|
+
suspect_commits: z.ZodArray<z.ZodObject<{
|
|
606
|
+
repo_full_name: z.ZodString;
|
|
607
|
+
sha: z.ZodString;
|
|
608
|
+
message: z.ZodString;
|
|
609
|
+
author_name: z.ZodString;
|
|
610
|
+
author_login: z.ZodNullable<z.ZodString>;
|
|
611
|
+
url: z.ZodString;
|
|
612
|
+
committed_at: z.ZodString;
|
|
613
|
+
}, z.core.$strip>>;
|
|
614
|
+
owners: z.ZodArray<z.ZodString>;
|
|
615
|
+
}, z.core.$strip>;
|
|
616
|
+
|
|
617
|
+
type GitHubStatus = z.infer<typeof gitHubStatusSchema>;
|
|
618
|
+
type GitHubInstallation = z.infer<typeof gitHubInstallationSchema>;
|
|
619
|
+
type GitHubManifest = z.infer<typeof gitHubManifestSchema>;
|
|
620
|
+
type GitHubRepository = z.infer<typeof gitHubRepositorySchema>;
|
|
621
|
+
type CodeMapping = z.infer<typeof codeMappingSchema>;
|
|
622
|
+
type ProjectRepository = z.infer<typeof projectRepositorySchema>;
|
|
623
|
+
type UpdateProjectRepository = z.infer<typeof updateProjectRepositorySchema>;
|
|
624
|
+
type IssueLink = z.infer<typeof issueLinkSchema>;
|
|
625
|
+
type RepoCommit = z.infer<typeof repoCommitSchema>;
|
|
626
|
+
type IssueGitHub = z.infer<typeof issueGitHubSchema>;
|
|
627
|
+
|
|
447
628
|
declare const invitationSchema: z.ZodObject<{
|
|
448
629
|
token: z.ZodString;
|
|
449
630
|
email: z.ZodString;
|
|
@@ -1266,6 +1447,30 @@ declare class EventsResource extends BaseResource {
|
|
|
1266
1447
|
getBySentryId(projectId: number, eventId: string): Promise<Result<EventDetail, RustrakError>>;
|
|
1267
1448
|
}
|
|
1268
1449
|
|
|
1450
|
+
declare class GitHubResource extends BaseResource {
|
|
1451
|
+
status(): Promise<Result<GitHubStatus, RustrakError>>;
|
|
1452
|
+
manifest(organization?: string): Promise<Result<GitHubManifest, RustrakError>>;
|
|
1453
|
+
disconnect(): Promise<Result<void, RustrakError>>;
|
|
1454
|
+
repositories(projectId: number): Promise<Result<GitHubRepository[], RustrakError>>;
|
|
1455
|
+
projectRepository(projectId: number): Promise<Result<ProjectRepository | null, RustrakError>>;
|
|
1456
|
+
setProjectRepository(projectId: number, input: UpdateProjectRepository): Promise<Result<ProjectRepository, RustrakError>>;
|
|
1457
|
+
removeProjectRepository(projectId: number): Promise<Result<void, RustrakError>>;
|
|
1458
|
+
syncCodeowners(projectId: number): Promise<Result<ProjectRepository, RustrakError>>;
|
|
1459
|
+
issue(projectId: number, issueId: string): Promise<Result<IssueGitHub, RustrakError>>;
|
|
1460
|
+
createIssue(projectId: number, issueId: string, input?: {
|
|
1461
|
+
title?: string;
|
|
1462
|
+
body?: string;
|
|
1463
|
+
}): Promise<Result<IssueLink, RustrakError>>;
|
|
1464
|
+
linkIssue(projectId: number, issueId: string, reference: string): Promise<Result<IssueLink, RustrakError>>;
|
|
1465
|
+
unlinkIssue(projectId: number, issueId: string, linkId: number): Promise<Result<void, RustrakError>>;
|
|
1466
|
+
myLogin(): Promise<Result<{
|
|
1467
|
+
login: string | null;
|
|
1468
|
+
}, RustrakError>>;
|
|
1469
|
+
setMyLogin(login: string | null): Promise<Result<{
|
|
1470
|
+
login: string | null;
|
|
1471
|
+
}, RustrakError>>;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1269
1474
|
declare class HealthResource extends BaseResource {
|
|
1270
1475
|
getVersion(): Promise<Result<ServerVersion, RustrakError>>;
|
|
1271
1476
|
}
|
|
@@ -1412,7 +1617,8 @@ declare class RustrakClient {
|
|
|
1412
1617
|
readonly stats: StatsResource;
|
|
1413
1618
|
readonly storage: StorageResource;
|
|
1414
1619
|
readonly health: HealthResource;
|
|
1620
|
+
readonly github: GitHubResource;
|
|
1415
1621
|
constructor(config: ClientConfig);
|
|
1416
1622
|
}
|
|
1417
1623
|
|
|
1418
|
-
export { type AcceptInvitation, type ActivityEntry, type AgentBreakdownOptions, type AgentDurationPoint, type AgentModelRow, type AgentSummary, type AgentTimeseriesOptions, type AgentTimeseriesPoint, type AgentToolRow, type AgentTraceSummary, type AgentTracesOptions, type AlertHistory, type AlertIntegration, type AlertRule, type AlertRuleChannelInput, type AlertStatus, type AlertType, type ApiError, type AssembleInput, type AssembleResponse, type AuthResponse, type AuthToken, type AuthTokenCreated, type BulkDeleteIssues, type BulkUpdateIssues, type ChangePasswordRequest, type ChunkUploadCapability, type CleanupCounts, type CleanupOptions, type CleanupStatus, type ClientConfig, type CreateAlertIntegration, type CreateAlertRule, type CreateAuthToken, type CreateComment, type CreateInvitation, type CreateProject, type CreateUserReport, Err, type Event, type EventDetail, type EventTimeseries, type EventTimeseriesPoint, FIELD_ERROR_CODES, type FieldError, type FieldErrorCode, type GenAiBreakdownRow, type GlobalRole, type Invitation, type InvitationInfo, type Issue, type IssueAggregates, type IssueFilter, type IssueHash, type IssuePriority, type IssueSort, type IssueStats, type IssueStatsWindow, type IssueStatus, type IssueTagValue, type ListAlertHistoryOptions, type ListEventsOptions, type ListIssuesOptions, type ListLogsOptions, type ListProjectsOptions, type ListSourceMapsResponse, type ListSpansOptions, type ListTransactionsOptions, type Log, type LoginRequest, type LoginResult, type MetricDelta, NETWORK_ERROR_MESSAGE, type OffsetPaginatedResponse, Ok, type PaginatedResponse, type PreviewTemplateResponse, type Project, type ProjectListStats, type ProjectMember, type ProjectRole, type ProjectStatsSummary, type ProjectStorage, type ProviderType, type RateLimits, type RegisterRequest, type ReleaseHealthRow, type ReleaseHealthStatsOptions, type Result, type RoutingOverride, RustrakClient, type RustrakError, type RustrakErrorKind, SERVER_ERROR_MESSAGE, type ServerVersion, type SessionSummary, type SessionTimeseries, type SessionTimeseriesPoint, type SortOrder, type SourceMapFile, type SourceMapGcResult, type SourceMapStorage, type Span, type SpanDetail, type SsoConfig, type SsoLink, type SsoStart, type StorageSummary, TIMEOUT_ERROR_MESSAGE, type TagSummary, type TagValueCount, type TeamMember, type TestChannelResponse, type TestIntegrationBody, type Transaction, type TransactionDetail, type TransactionStats, type UpdateAlertIntegration, type UpdateAlertRule, type UpdateIssueState, type UpdateProject, type UpdateUserRole, type UpsertProjectMember, type User, type UserReport, isRetryable, mapResult, unwrap, unwrapOr };
|
|
1624
|
+
export { type AcceptInvitation, type ActivityEntry, type AgentBreakdownOptions, type AgentDurationPoint, type AgentModelRow, type AgentSummary, type AgentTimeseriesOptions, type AgentTimeseriesPoint, type AgentToolRow, type AgentTraceSummary, type AgentTracesOptions, type AlertHistory, type AlertIntegration, type AlertRule, type AlertRuleChannelInput, type AlertRuleConditions, type AlertStatus, type AlertType, type ApiError, type AssembleInput, type AssembleResponse, type AuthResponse, type AuthToken, type AuthTokenCreated, type BulkDeleteIssues, type BulkUpdateIssues, type ChangePasswordRequest, type ChunkUploadCapability, type CleanupCounts, type CleanupOptions, type CleanupStatus, type ClientConfig, type CodeMapping, type CreateAlertIntegration, type CreateAlertRule, type CreateAuthToken, type CreateComment, type CreateInvitation, type CreateProject, type CreateUserReport, Err, type Event, type EventDetail, type EventTimeseries, type EventTimeseriesPoint, FIELD_ERROR_CODES, type FieldError, type FieldErrorCode, type GenAiBreakdownRow, type GitHubInstallation, type GitHubManifest, type GitHubRepository, type GitHubStatus, type GlobalRole, type Invitation, type InvitationInfo, type Issue, type IssueAggregates, type IssueFilter, type IssueGitHub, type IssueHash, type IssueLink, type IssuePriority, type IssueSort, type IssueStats, type IssueStatsWindow, type IssueStatus, type IssueTagValue, type ListAlertHistoryOptions, type ListEventsOptions, type ListIssuesOptions, type ListLogsOptions, type ListProjectsOptions, type ListSourceMapsResponse, type ListSpansOptions, type ListTransactionsOptions, type Log, type LoginRequest, type LoginResult, type MetricDelta, NETWORK_ERROR_MESSAGE, type OffsetPaginatedResponse, Ok, type PaginatedResponse, type PreviewTemplateResponse, type Project, type ProjectListStats, type ProjectMember, type ProjectRepository, type ProjectRole, type ProjectStatsSummary, type ProjectStorage, type ProviderType, type RateLimits, type RegisterRequest, type ReleaseHealthRow, type ReleaseHealthStatsOptions, type RepoCommit, type Result, type RoutingOverride, RustrakClient, type RustrakError, type RustrakErrorKind, SERVER_ERROR_MESSAGE, type ServerVersion, type SessionSummary, type SessionTimeseries, type SessionTimeseriesPoint, type SortOrder, type SourceMapFile, type SourceMapGcResult, type SourceMapStorage, type Span, type SpanDetail, type SsoConfig, type SsoLink, type SsoStart, type StorageSummary, TIMEOUT_ERROR_MESSAGE, type TagSummary, type TagValueCount, type TeamMember, type TestChannelResponse, type TestIntegrationBody, type Transaction, type TransactionDetail, type TransactionStats, type UpdateAlertIntegration, type UpdateAlertRule, type UpdateIssueState, type UpdateProject, type UpdateProjectRepository, type UpdateUserRole, type UpsertProjectMember, type User, type UserReport, isRetryable, mapResult, unwrap, unwrapOr };
|