@rustrak/client 0.16.4 → 0.18.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.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.ZodRecord<z.ZodString, z.ZodUnknown>;
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.ZodRecord<z.ZodString, z.ZodUnknown>>;
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.ZodRecord<z.ZodString, z.ZodUnknown>>;
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;
@@ -705,6 +886,232 @@ type ProjectRole = z.infer<typeof projectRoleSchema>;
705
886
  type ProjectMember = z.infer<typeof projectMemberSchema>;
706
887
  type UpsertProjectMember = z.infer<typeof upsertProjectMemberSchema>;
707
888
 
889
+ declare const monitorConfigSchema: z.ZodObject<{
890
+ schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
891
+ type: z.ZodLiteral<"crontab">;
892
+ value: z.ZodString;
893
+ }, z.core.$strip>, z.ZodObject<{
894
+ type: z.ZodLiteral<"interval">;
895
+ value: z.ZodNumber;
896
+ unit: z.ZodEnum<{
897
+ minute: "minute";
898
+ hour: "hour";
899
+ day: "day";
900
+ week: "week";
901
+ month: "month";
902
+ year: "year";
903
+ }>;
904
+ }, z.core.$strip>], "type">;
905
+ checkin_margin: z.ZodNumber;
906
+ max_runtime: z.ZodNumber;
907
+ timezone: z.ZodString;
908
+ failure_issue_threshold: z.ZodNumber;
909
+ recovery_threshold: z.ZodNumber;
910
+ }, z.core.$strip>;
911
+ declare const monitorConfigInputSchema: z.ZodObject<{
912
+ schedule: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
913
+ type: z.ZodLiteral<"crontab">;
914
+ value: z.ZodString;
915
+ }, z.core.$strip>, z.ZodObject<{
916
+ type: z.ZodLiteral<"interval">;
917
+ value: z.ZodNumber;
918
+ unit: z.ZodEnum<{
919
+ minute: "minute";
920
+ hour: "hour";
921
+ day: "day";
922
+ week: "week";
923
+ month: "month";
924
+ year: "year";
925
+ }>;
926
+ }, z.core.$strip>], "type">>;
927
+ checkin_margin: z.ZodOptional<z.ZodNumber>;
928
+ max_runtime: z.ZodOptional<z.ZodNumber>;
929
+ timezone: z.ZodOptional<z.ZodString>;
930
+ failure_issue_threshold: z.ZodOptional<z.ZodNumber>;
931
+ recovery_threshold: z.ZodOptional<z.ZodNumber>;
932
+ }, z.core.$strip>;
933
+ declare const checkInStatusSchema: z.ZodEnum<{
934
+ timeout: "timeout";
935
+ error: "error";
936
+ unknown: "unknown";
937
+ ok: "ok";
938
+ in_progress: "in_progress";
939
+ missed: "missed";
940
+ }>;
941
+ declare const monitorEnvironmentStatusSchema: z.ZodEnum<{
942
+ error: "error";
943
+ ok: "ok";
944
+ active: "active";
945
+ }>;
946
+ declare const checkInSchema: z.ZodObject<{
947
+ id: z.ZodString;
948
+ environment: z.ZodString;
949
+ status: z.ZodEnum<{
950
+ timeout: "timeout";
951
+ error: "error";
952
+ unknown: "unknown";
953
+ ok: "ok";
954
+ in_progress: "in_progress";
955
+ missed: "missed";
956
+ }>;
957
+ duration_ms: z.ZodNullable<z.ZodNumber>;
958
+ date_added: z.ZodString;
959
+ date_updated: z.ZodString;
960
+ expected_time: z.ZodNullable<z.ZodString>;
961
+ }, z.core.$strip>;
962
+ declare const monitorEnvironmentSchema: z.ZodObject<{
963
+ id: z.ZodString;
964
+ environment: z.ZodString;
965
+ status: z.ZodEnum<{
966
+ error: "error";
967
+ ok: "ok";
968
+ active: "active";
969
+ }>;
970
+ next_checkin: z.ZodNullable<z.ZodString>;
971
+ next_checkin_latest: z.ZodNullable<z.ZodString>;
972
+ last_checkin: z.ZodNullable<z.ZodString>;
973
+ recent_checkins: z.ZodArray<z.ZodObject<{
974
+ id: z.ZodString;
975
+ environment: z.ZodString;
976
+ status: z.ZodEnum<{
977
+ timeout: "timeout";
978
+ error: "error";
979
+ unknown: "unknown";
980
+ ok: "ok";
981
+ in_progress: "in_progress";
982
+ missed: "missed";
983
+ }>;
984
+ duration_ms: z.ZodNullable<z.ZodNumber>;
985
+ date_added: z.ZodString;
986
+ date_updated: z.ZodString;
987
+ expected_time: z.ZodNullable<z.ZodString>;
988
+ }, z.core.$strip>>;
989
+ }, z.core.$strip>;
990
+ declare const monitorSchema: z.ZodObject<{
991
+ id: z.ZodString;
992
+ slug: z.ZodString;
993
+ name: z.ZodString;
994
+ config: z.ZodObject<{
995
+ schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
996
+ type: z.ZodLiteral<"crontab">;
997
+ value: z.ZodString;
998
+ }, z.core.$strip>, z.ZodObject<{
999
+ type: z.ZodLiteral<"interval">;
1000
+ value: z.ZodNumber;
1001
+ unit: z.ZodEnum<{
1002
+ minute: "minute";
1003
+ hour: "hour";
1004
+ day: "day";
1005
+ week: "week";
1006
+ month: "month";
1007
+ year: "year";
1008
+ }>;
1009
+ }, z.core.$strip>], "type">;
1010
+ checkin_margin: z.ZodNumber;
1011
+ max_runtime: z.ZodNumber;
1012
+ timezone: z.ZodString;
1013
+ failure_issue_threshold: z.ZodNumber;
1014
+ recovery_threshold: z.ZodNumber;
1015
+ }, z.core.$strip>;
1016
+ is_muted: z.ZodBoolean;
1017
+ created_at: z.ZodString;
1018
+ environments: z.ZodArray<z.ZodObject<{
1019
+ id: z.ZodString;
1020
+ environment: z.ZodString;
1021
+ status: z.ZodEnum<{
1022
+ error: "error";
1023
+ ok: "ok";
1024
+ active: "active";
1025
+ }>;
1026
+ next_checkin: z.ZodNullable<z.ZodString>;
1027
+ next_checkin_latest: z.ZodNullable<z.ZodString>;
1028
+ last_checkin: z.ZodNullable<z.ZodString>;
1029
+ recent_checkins: z.ZodArray<z.ZodObject<{
1030
+ id: z.ZodString;
1031
+ environment: z.ZodString;
1032
+ status: z.ZodEnum<{
1033
+ timeout: "timeout";
1034
+ error: "error";
1035
+ unknown: "unknown";
1036
+ ok: "ok";
1037
+ in_progress: "in_progress";
1038
+ missed: "missed";
1039
+ }>;
1040
+ duration_ms: z.ZodNullable<z.ZodNumber>;
1041
+ date_added: z.ZodString;
1042
+ date_updated: z.ZodString;
1043
+ expected_time: z.ZodNullable<z.ZodString>;
1044
+ }, z.core.$strip>>;
1045
+ }, z.core.$strip>>;
1046
+ }, z.core.$strip>;
1047
+ declare const createMonitorSchema: z.ZodObject<{
1048
+ name: z.ZodString;
1049
+ slug: z.ZodOptional<z.ZodString>;
1050
+ config: z.ZodObject<{
1051
+ schedule: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1052
+ type: z.ZodLiteral<"crontab">;
1053
+ value: z.ZodString;
1054
+ }, z.core.$strip>, z.ZodObject<{
1055
+ type: z.ZodLiteral<"interval">;
1056
+ value: z.ZodNumber;
1057
+ unit: z.ZodEnum<{
1058
+ minute: "minute";
1059
+ hour: "hour";
1060
+ day: "day";
1061
+ week: "week";
1062
+ month: "month";
1063
+ year: "year";
1064
+ }>;
1065
+ }, z.core.$strip>], "type">>;
1066
+ checkin_margin: z.ZodOptional<z.ZodNumber>;
1067
+ max_runtime: z.ZodOptional<z.ZodNumber>;
1068
+ timezone: z.ZodOptional<z.ZodString>;
1069
+ failure_issue_threshold: z.ZodOptional<z.ZodNumber>;
1070
+ recovery_threshold: z.ZodOptional<z.ZodNumber>;
1071
+ }, z.core.$strip>;
1072
+ }, z.core.$strip>;
1073
+ declare const updateMonitorSchema: z.ZodObject<{
1074
+ name: z.ZodOptional<z.ZodString>;
1075
+ config: z.ZodOptional<z.ZodObject<{
1076
+ schedule: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1077
+ type: z.ZodLiteral<"crontab">;
1078
+ value: z.ZodString;
1079
+ }, z.core.$strip>, z.ZodObject<{
1080
+ type: z.ZodLiteral<"interval">;
1081
+ value: z.ZodNumber;
1082
+ unit: z.ZodEnum<{
1083
+ minute: "minute";
1084
+ hour: "hour";
1085
+ day: "day";
1086
+ week: "week";
1087
+ month: "month";
1088
+ year: "year";
1089
+ }>;
1090
+ }, z.core.$strip>], "type">>;
1091
+ checkin_margin: z.ZodOptional<z.ZodNumber>;
1092
+ max_runtime: z.ZodOptional<z.ZodNumber>;
1093
+ timezone: z.ZodOptional<z.ZodString>;
1094
+ failure_issue_threshold: z.ZodOptional<z.ZodNumber>;
1095
+ recovery_threshold: z.ZodOptional<z.ZodNumber>;
1096
+ }, z.core.$strip>>;
1097
+ is_muted: z.ZodOptional<z.ZodBoolean>;
1098
+ }, z.core.$strip>;
1099
+
1100
+ type MonitorConfig = z.infer<typeof monitorConfigSchema>;
1101
+ type MonitorConfigInput = z.infer<typeof monitorConfigInputSchema>;
1102
+ type CheckInStatus = z.infer<typeof checkInStatusSchema>;
1103
+ type MonitorEnvironmentStatus = z.infer<typeof monitorEnvironmentStatusSchema>;
1104
+ type CheckIn = z.infer<typeof checkInSchema>;
1105
+ type MonitorEnvironment = z.infer<typeof monitorEnvironmentSchema>;
1106
+ type Monitor = z.infer<typeof monitorSchema>;
1107
+ type CreateMonitor = z.input<typeof createMonitorSchema>;
1108
+ type UpdateMonitor = z.input<typeof updateMonitorSchema>;
1109
+ interface ListCheckInsOptions {
1110
+ page?: number;
1111
+ per_page?: number;
1112
+ environment?: string;
1113
+ }
1114
+
708
1115
  declare const projectListStatsSchema: z.ZodObject<{
709
1116
  trend: z.ZodArray<z.ZodNumber>;
710
1117
  events: z.ZodObject<{
@@ -769,6 +1176,56 @@ type CreateProject = z.infer<typeof createProjectSchema>;
769
1176
  type UpdateProject = z.infer<typeof updateProjectSchema>;
770
1177
  type RateLimits = z.infer<typeof rateLimitsSchema>;
771
1178
 
1179
+ declare const intervalUnitSchema: z.ZodEnum<{
1180
+ minute: "minute";
1181
+ hour: "hour";
1182
+ day: "day";
1183
+ week: "week";
1184
+ month: "month";
1185
+ year: "year";
1186
+ }>;
1187
+ declare const scheduleSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1188
+ type: z.ZodLiteral<"crontab">;
1189
+ value: z.ZodString;
1190
+ }, z.core.$strip>, z.ZodObject<{
1191
+ type: z.ZodLiteral<"interval">;
1192
+ value: z.ZodNumber;
1193
+ unit: z.ZodEnum<{
1194
+ minute: "minute";
1195
+ hour: "hour";
1196
+ day: "day";
1197
+ week: "week";
1198
+ month: "month";
1199
+ year: "year";
1200
+ }>;
1201
+ }, z.core.$strip>], "type">;
1202
+ declare const previewScheduleSchema: z.ZodObject<{
1203
+ schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
1204
+ type: z.ZodLiteral<"crontab">;
1205
+ value: z.ZodString;
1206
+ }, z.core.$strip>, z.ZodObject<{
1207
+ type: z.ZodLiteral<"interval">;
1208
+ value: z.ZodNumber;
1209
+ unit: z.ZodEnum<{
1210
+ minute: "minute";
1211
+ hour: "hour";
1212
+ day: "day";
1213
+ week: "week";
1214
+ month: "month";
1215
+ year: "year";
1216
+ }>;
1217
+ }, z.core.$strip>], "type">;
1218
+ timezone: z.ZodOptional<z.ZodString>;
1219
+ }, z.core.$strip>;
1220
+ declare const schedulePreviewSchema: z.ZodObject<{
1221
+ next_runs: z.ZodArray<z.ZodString>;
1222
+ }, z.core.$strip>;
1223
+
1224
+ type IntervalUnit = z.infer<typeof intervalUnitSchema>;
1225
+ type Schedule = z.infer<typeof scheduleSchema>;
1226
+ type PreviewSchedule = z.input<typeof previewScheduleSchema>;
1227
+ type SchedulePreview = z.infer<typeof schedulePreviewSchema>;
1228
+
772
1229
  declare const releaseHealthRowSchema: z.ZodObject<{
773
1230
  release: z.ZodString;
774
1231
  environment: z.ZodString;
@@ -915,6 +1372,9 @@ declare const projectStorageSchema: z.ZodObject<{
915
1372
  logs_count: z.ZodNumber;
916
1373
  source_maps_count: z.ZodNumber;
917
1374
  estimated_bytes: z.ZodNumber;
1375
+ events_bytes: z.ZodNumber;
1376
+ transactions_bytes: z.ZodNumber;
1377
+ logs_bytes: z.ZodNumber;
918
1378
  }, z.core.$strip>;
919
1379
  declare const cleanupCountsSchema: z.ZodObject<{
920
1380
  events: z.ZodNumber;
@@ -922,6 +1382,7 @@ declare const cleanupCountsSchema: z.ZodObject<{
922
1382
  spans: z.ZodNumber;
923
1383
  logs: z.ZodNumber;
924
1384
  issues_removed: z.ZodNumber;
1385
+ source_maps: z.ZodDefault<z.ZodNumber>;
925
1386
  }, z.core.$strip>;
926
1387
  declare const cleanupStatusSchema: z.ZodObject<{
927
1388
  state: z.ZodEnum<{
@@ -936,6 +1397,7 @@ declare const cleanupStatusSchema: z.ZodObject<{
936
1397
  spans: z.ZodNumber;
937
1398
  logs: z.ZodNumber;
938
1399
  issues_removed: z.ZodNumber;
1400
+ source_maps: z.ZodDefault<z.ZodNumber>;
939
1401
  }, z.core.$strip>;
940
1402
  started_at: z.ZodNullable<z.ZodString>;
941
1403
  finished_at: z.ZodNullable<z.ZodString>;
@@ -945,6 +1407,112 @@ declare const sourceMapGcResultSchema: z.ZodObject<{
945
1407
  files_removed: z.ZodNumber;
946
1408
  bytes_freed: z.ZodNumber;
947
1409
  }, z.core.$strip>;
1410
+ declare const storageAgeSchema: z.ZodObject<{
1411
+ bucket_days: z.ZodArray<z.ZodNumber>;
1412
+ projects: z.ZodArray<z.ZodObject<{
1413
+ project_id: z.ZodNumber;
1414
+ events: z.ZodObject<{
1415
+ counts: z.ZodArray<z.ZodNumber>;
1416
+ oldest: z.ZodNullable<z.ZodString>;
1417
+ }, z.core.$strip>;
1418
+ transactions: z.ZodObject<{
1419
+ counts: z.ZodArray<z.ZodNumber>;
1420
+ oldest: z.ZodNullable<z.ZodString>;
1421
+ }, z.core.$strip>;
1422
+ logs: z.ZodObject<{
1423
+ counts: z.ZodArray<z.ZodNumber>;
1424
+ oldest: z.ZodNullable<z.ZodString>;
1425
+ }, z.core.$strip>;
1426
+ }, z.core.$strip>>;
1427
+ }, z.core.$strip>;
1428
+ declare const retentionWindowsSchema: z.ZodObject<{
1429
+ events_days: z.ZodNullable<z.ZodNumber>;
1430
+ transactions_days: z.ZodNullable<z.ZodNumber>;
1431
+ logs_days: z.ZodNullable<z.ZodNumber>;
1432
+ }, z.core.$strip>;
1433
+ declare const projectRetentionSchema: z.ZodObject<{
1434
+ events_days: z.ZodNullable<z.ZodNumber>;
1435
+ transactions_days: z.ZodNullable<z.ZodNumber>;
1436
+ logs_days: z.ZodNullable<z.ZodNumber>;
1437
+ project_id: z.ZodNumber;
1438
+ }, z.core.$strip>;
1439
+ declare const retentionSettingsSchema: z.ZodObject<{
1440
+ defaults: z.ZodObject<{
1441
+ events_days: z.ZodNullable<z.ZodNumber>;
1442
+ transactions_days: z.ZodNullable<z.ZodNumber>;
1443
+ logs_days: z.ZodNullable<z.ZodNumber>;
1444
+ }, z.core.$strip>;
1445
+ overrides: z.ZodArray<z.ZodObject<{
1446
+ events_days: z.ZodNullable<z.ZodNumber>;
1447
+ transactions_days: z.ZodNullable<z.ZodNumber>;
1448
+ logs_days: z.ZodNullable<z.ZodNumber>;
1449
+ project_id: z.ZodNumber;
1450
+ }, z.core.$strip>>;
1451
+ frequency: z.ZodEnum<{
1452
+ daily: "daily";
1453
+ weekly: "weekly";
1454
+ }>;
1455
+ hour: z.ZodNumber;
1456
+ weekday: z.ZodNumber;
1457
+ }, z.core.$strip>;
1458
+ declare const retentionRunSchema: z.ZodObject<{
1459
+ started_at: z.ZodString;
1460
+ finished_at: z.ZodNullable<z.ZodString>;
1461
+ status: z.ZodEnum<{
1462
+ error: "error";
1463
+ ok: "ok";
1464
+ running: "running";
1465
+ }>;
1466
+ removed: z.ZodNullable<z.ZodObject<{
1467
+ events: z.ZodNumber;
1468
+ transactions: z.ZodNumber;
1469
+ spans: z.ZodNumber;
1470
+ logs: z.ZodNumber;
1471
+ issues_removed: z.ZodNumber;
1472
+ source_maps: z.ZodDefault<z.ZodNumber>;
1473
+ }, z.core.$strip>>;
1474
+ error: z.ZodNullable<z.ZodString>;
1475
+ }, z.core.$strip>;
1476
+ declare const retentionSchema: z.ZodObject<{
1477
+ settings: z.ZodObject<{
1478
+ defaults: z.ZodObject<{
1479
+ events_days: z.ZodNullable<z.ZodNumber>;
1480
+ transactions_days: z.ZodNullable<z.ZodNumber>;
1481
+ logs_days: z.ZodNullable<z.ZodNumber>;
1482
+ }, z.core.$strip>;
1483
+ overrides: z.ZodArray<z.ZodObject<{
1484
+ events_days: z.ZodNullable<z.ZodNumber>;
1485
+ transactions_days: z.ZodNullable<z.ZodNumber>;
1486
+ logs_days: z.ZodNullable<z.ZodNumber>;
1487
+ project_id: z.ZodNumber;
1488
+ }, z.core.$strip>>;
1489
+ frequency: z.ZodEnum<{
1490
+ daily: "daily";
1491
+ weekly: "weekly";
1492
+ }>;
1493
+ hour: z.ZodNumber;
1494
+ weekday: z.ZodNumber;
1495
+ }, z.core.$strip>;
1496
+ next_run_at: z.ZodNullable<z.ZodString>;
1497
+ last_run: z.ZodNullable<z.ZodObject<{
1498
+ started_at: z.ZodString;
1499
+ finished_at: z.ZodNullable<z.ZodString>;
1500
+ status: z.ZodEnum<{
1501
+ error: "error";
1502
+ ok: "ok";
1503
+ running: "running";
1504
+ }>;
1505
+ removed: z.ZodNullable<z.ZodObject<{
1506
+ events: z.ZodNumber;
1507
+ transactions: z.ZodNumber;
1508
+ spans: z.ZodNumber;
1509
+ logs: z.ZodNumber;
1510
+ issues_removed: z.ZodNumber;
1511
+ source_maps: z.ZodDefault<z.ZodNumber>;
1512
+ }, z.core.$strip>>;
1513
+ error: z.ZodNullable<z.ZodString>;
1514
+ }, z.core.$strip>>;
1515
+ }, z.core.$strip>;
948
1516
  declare const cleanupOptionsSchema: z.ZodObject<{
949
1517
  older_than_days: z.ZodNumber;
950
1518
  project_id: z.ZodOptional<z.ZodNumber>;
@@ -960,6 +1528,12 @@ type CleanupCounts = z.infer<typeof cleanupCountsSchema>;
960
1528
  type CleanupStatus = z.infer<typeof cleanupStatusSchema>;
961
1529
  type SourceMapGcResult = z.infer<typeof sourceMapGcResultSchema>;
962
1530
  type CleanupOptions = z.infer<typeof cleanupOptionsSchema>;
1531
+ type RetentionWindows = z.infer<typeof retentionWindowsSchema>;
1532
+ type ProjectRetention = z.infer<typeof projectRetentionSchema>;
1533
+ type RetentionSettings = z.infer<typeof retentionSettingsSchema>;
1534
+ type RetentionRun = z.infer<typeof retentionRunSchema>;
1535
+ type StorageAge = z.infer<typeof storageAgeSchema>;
1536
+ type Retention = z.infer<typeof retentionSchema>;
963
1537
 
964
1538
  declare const globalRoleSchema: z.ZodEnum<{
965
1539
  admin: "admin";
@@ -1266,6 +1840,30 @@ declare class EventsResource extends BaseResource {
1266
1840
  getBySentryId(projectId: number, eventId: string): Promise<Result<EventDetail, RustrakError>>;
1267
1841
  }
1268
1842
 
1843
+ declare class GitHubResource extends BaseResource {
1844
+ status(): Promise<Result<GitHubStatus, RustrakError>>;
1845
+ manifest(organization?: string): Promise<Result<GitHubManifest, RustrakError>>;
1846
+ disconnect(): Promise<Result<void, RustrakError>>;
1847
+ repositories(projectId: number): Promise<Result<GitHubRepository[], RustrakError>>;
1848
+ projectRepository(projectId: number): Promise<Result<ProjectRepository | null, RustrakError>>;
1849
+ setProjectRepository(projectId: number, input: UpdateProjectRepository): Promise<Result<ProjectRepository, RustrakError>>;
1850
+ removeProjectRepository(projectId: number): Promise<Result<void, RustrakError>>;
1851
+ syncCodeowners(projectId: number): Promise<Result<ProjectRepository, RustrakError>>;
1852
+ issue(projectId: number, issueId: string): Promise<Result<IssueGitHub, RustrakError>>;
1853
+ createIssue(projectId: number, issueId: string, input?: {
1854
+ title?: string;
1855
+ body?: string;
1856
+ }): Promise<Result<IssueLink, RustrakError>>;
1857
+ linkIssue(projectId: number, issueId: string, reference: string): Promise<Result<IssueLink, RustrakError>>;
1858
+ unlinkIssue(projectId: number, issueId: string, linkId: number): Promise<Result<void, RustrakError>>;
1859
+ myLogin(): Promise<Result<{
1860
+ login: string | null;
1861
+ }, RustrakError>>;
1862
+ setMyLogin(login: string | null): Promise<Result<{
1863
+ login: string | null;
1864
+ }, RustrakError>>;
1865
+ }
1866
+
1269
1867
  declare class HealthResource extends BaseResource {
1270
1868
  getVersion(): Promise<Result<ServerVersion, RustrakError>>;
1271
1869
  }
@@ -1317,6 +1915,15 @@ declare class MembersResource extends BaseResource {
1317
1915
  remove(projectId: number, userId: number): Promise<Result<void, RustrakError>>;
1318
1916
  }
1319
1917
 
1918
+ declare class MonitorsResource extends BaseResource {
1919
+ list(projectId: number): Promise<Result<Monitor[], RustrakError>>;
1920
+ get(projectId: number, slug: string): Promise<Result<Monitor, RustrakError>>;
1921
+ create(projectId: number, input: CreateMonitor): Promise<Result<Monitor, RustrakError>>;
1922
+ update(projectId: number, slug: string, input: UpdateMonitor): Promise<Result<Monitor, RustrakError>>;
1923
+ delete(projectId: number, slug: string): Promise<Result<void, RustrakError>>;
1924
+ listCheckIns(projectId: number, slug: string, options?: ListCheckInsOptions): Promise<Result<OffsetPaginatedResponse<CheckIn>, RustrakError>>;
1925
+ }
1926
+
1320
1927
  declare class ProjectsResource extends BaseResource {
1321
1928
  list(options?: ListProjectsOptions): Promise<Result<OffsetPaginatedResponse<Project>, RustrakError>>;
1322
1929
  rateLimits(): Promise<Result<RateLimits, RustrakError>>;
@@ -1330,6 +1937,10 @@ declare class ReleasesResource extends BaseResource {
1330
1937
  newIssues(projectId: number, release: string, limit?: number): Promise<Result<Issue[], RustrakError>>;
1331
1938
  }
1332
1939
 
1940
+ declare class SchedulesResource extends BaseResource {
1941
+ preview(input: PreviewSchedule): Promise<Result<SchedulePreview, RustrakError>>;
1942
+ }
1943
+
1333
1944
  declare class SessionsResource extends BaseResource {
1334
1945
  stats(projectId: number, options?: ReleaseHealthStatsOptions): Promise<Result<OffsetPaginatedResponse<ReleaseHealthRow>, RustrakError>>;
1335
1946
  summary(projectId: number, period?: string): Promise<Result<SessionSummary, RustrakError>>;
@@ -1364,6 +1975,11 @@ declare class StorageResource extends BaseResource {
1364
1975
  getCleanupStatus(): Promise<Result<CleanupStatus, RustrakError>>;
1365
1976
  previewGcSourceMaps(): Promise<Result<SourceMapGcResult, RustrakError>>;
1366
1977
  gcSourceMaps(): Promise<Result<SourceMapGcResult, RustrakError>>;
1978
+ getRetention(): Promise<Result<Retention, RustrakError>>;
1979
+ updateRetention(settings: RetentionSettings): Promise<Result<Retention, RustrakError>>;
1980
+ runRetention(): Promise<Result<CleanupStatus, RustrakError>>;
1981
+ getAge(): Promise<Result<StorageAge, RustrakError>>;
1982
+ previewRetention(settings: RetentionSettings): Promise<Result<CleanupCounts, RustrakError>>;
1367
1983
  }
1368
1984
 
1369
1985
  declare class TeamResource extends BaseResource {
@@ -1407,12 +2023,15 @@ declare class RustrakClient {
1407
2023
  readonly releases: ReleasesResource;
1408
2024
  readonly transactions: TransactionsResource;
1409
2025
  readonly logs: LogsResource;
2026
+ readonly monitors: MonitorsResource;
2027
+ readonly schedules: SchedulesResource;
1410
2028
  readonly spans: SpansResource;
1411
2029
  readonly agents: AgentsResource;
1412
2030
  readonly stats: StatsResource;
1413
2031
  readonly storage: StorageResource;
1414
2032
  readonly health: HealthResource;
2033
+ readonly github: GitHubResource;
1415
2034
  constructor(config: ClientConfig);
1416
2035
  }
1417
2036
 
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 };
2037
+ 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 CheckIn, type CheckInStatus, type ChunkUploadCapability, type CleanupCounts, type CleanupOptions, type CleanupStatus, type ClientConfig, type CodeMapping, type CreateAlertIntegration, type CreateAlertRule, type CreateAuthToken, type CreateComment, type CreateInvitation, type CreateMonitor, 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 IntervalUnit, 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 ListCheckInsOptions, type ListEventsOptions, type ListIssuesOptions, type ListLogsOptions, type ListProjectsOptions, type ListSourceMapsResponse, type ListSpansOptions, type ListTransactionsOptions, type Log, type LoginRequest, type LoginResult, type MetricDelta, type Monitor, type MonitorConfig, type MonitorConfigInput, type MonitorEnvironment, type MonitorEnvironmentStatus, NETWORK_ERROR_MESSAGE, type OffsetPaginatedResponse, Ok, type PaginatedResponse, type PreviewSchedule, type PreviewTemplateResponse, type Project, type ProjectListStats, type ProjectMember, type ProjectRepository, type ProjectRetention, type ProjectRole, type ProjectStatsSummary, type ProjectStorage, type ProviderType, type RateLimits, type RegisterRequest, type ReleaseHealthRow, type ReleaseHealthStatsOptions, type RepoCommit, type Result, type Retention, type RetentionRun, type RetentionSettings, type RetentionWindows, type RoutingOverride, RustrakClient, type RustrakError, type RustrakErrorKind, SERVER_ERROR_MESSAGE, type Schedule, type SchedulePreview, 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 StorageAge, 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 UpdateMonitor, type UpdateProject, type UpdateProjectRepository, type UpdateUserRole, type UpsertProjectMember, type User, type UserReport, isRetryable, mapResult, unwrap, unwrapOr };