@rustrak/client 0.15.1 → 0.16.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 +54 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -4
- package/dist/index.d.ts +37 -4
- package/dist/index.js +54 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -634,9 +634,16 @@ declare const bulkUpdateIssuesSchema: z.ZodObject<{
|
|
|
634
634
|
high: "high";
|
|
635
635
|
}>>;
|
|
636
636
|
}, z.core.$strip>;
|
|
637
|
-
declare const bulkDeleteIssuesSchema: z.ZodObject<{
|
|
637
|
+
declare const bulkDeleteIssuesSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
638
638
|
ids: z.ZodArray<z.ZodString>;
|
|
639
|
-
}, z.core.$
|
|
639
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
640
|
+
filter: z.ZodEnum<{
|
|
641
|
+
open: "open";
|
|
642
|
+
resolved: "resolved";
|
|
643
|
+
muted: "muted";
|
|
644
|
+
all: "all";
|
|
645
|
+
}>;
|
|
646
|
+
}, z.core.$strict>]>;
|
|
640
647
|
|
|
641
648
|
type Issue = z.infer<typeof issueSchema>;
|
|
642
649
|
type IssueStatus = z.infer<typeof issueStatusSchema>;
|
|
@@ -916,6 +923,24 @@ declare const cleanupCountsSchema: z.ZodObject<{
|
|
|
916
923
|
logs: z.ZodNumber;
|
|
917
924
|
issues_removed: z.ZodNumber;
|
|
918
925
|
}, z.core.$strip>;
|
|
926
|
+
declare const cleanupStatusSchema: z.ZodObject<{
|
|
927
|
+
state: z.ZodEnum<{
|
|
928
|
+
failed: "failed";
|
|
929
|
+
idle: "idle";
|
|
930
|
+
running: "running";
|
|
931
|
+
completed: "completed";
|
|
932
|
+
}>;
|
|
933
|
+
removed: z.ZodObject<{
|
|
934
|
+
events: z.ZodNumber;
|
|
935
|
+
transactions: z.ZodNumber;
|
|
936
|
+
spans: z.ZodNumber;
|
|
937
|
+
logs: z.ZodNumber;
|
|
938
|
+
issues_removed: z.ZodNumber;
|
|
939
|
+
}, z.core.$strip>;
|
|
940
|
+
started_at: z.ZodNullable<z.ZodString>;
|
|
941
|
+
finished_at: z.ZodNullable<z.ZodString>;
|
|
942
|
+
error: z.ZodNullable<z.ZodString>;
|
|
943
|
+
}, z.core.$strip>;
|
|
919
944
|
declare const sourceMapGcResultSchema: z.ZodObject<{
|
|
920
945
|
files_removed: z.ZodNumber;
|
|
921
946
|
bytes_freed: z.ZodNumber;
|
|
@@ -932,6 +957,7 @@ type SourceMapStorage = z.infer<typeof sourceMapStorageSchema>;
|
|
|
932
957
|
type StorageSummary = z.infer<typeof storageSummarySchema>;
|
|
933
958
|
type ProjectStorage = z.infer<typeof projectStorageSchema>;
|
|
934
959
|
type CleanupCounts = z.infer<typeof cleanupCountsSchema>;
|
|
960
|
+
type CleanupStatus = z.infer<typeof cleanupStatusSchema>;
|
|
935
961
|
type SourceMapGcResult = z.infer<typeof sourceMapGcResultSchema>;
|
|
936
962
|
type CleanupOptions = z.infer<typeof cleanupOptionsSchema>;
|
|
937
963
|
|
|
@@ -1151,9 +1177,14 @@ declare const ssoLinkSchema: z.ZodObject<{
|
|
|
1151
1177
|
email: z.ZodString;
|
|
1152
1178
|
provider_name: z.ZodString;
|
|
1153
1179
|
}, z.core.$strip>;
|
|
1180
|
+
declare const changePasswordRequestSchema: z.ZodObject<{
|
|
1181
|
+
current_password: z.ZodString;
|
|
1182
|
+
new_password: z.ZodString;
|
|
1183
|
+
}, z.core.$strip>;
|
|
1154
1184
|
|
|
1155
1185
|
type User = z.infer<typeof userSchema>;
|
|
1156
1186
|
type UpdatePreferencesRequest = z.infer<typeof updatePreferencesRequestSchema>;
|
|
1187
|
+
type ChangePasswordRequest = z.infer<typeof changePasswordRequestSchema>;
|
|
1157
1188
|
type AuthResponse = z.infer<typeof authResponseSchema>;
|
|
1158
1189
|
type LoginResult = z.infer<typeof loginResultSchema>;
|
|
1159
1190
|
type LoginRequest = z.infer<typeof loginRequestSchema>;
|
|
@@ -1223,6 +1254,7 @@ declare class AuthResource extends BaseResource {
|
|
|
1223
1254
|
logout(): Promise<Result<string[], RustrakError>>;
|
|
1224
1255
|
getCurrentUser(): Promise<Result<User, RustrakError>>;
|
|
1225
1256
|
updatePreferences(preferences: UpdatePreferencesRequest): Promise<Result<User, RustrakError>>;
|
|
1257
|
+
changePassword(request: ChangePasswordRequest): Promise<Result<void, RustrakError>>;
|
|
1226
1258
|
getInvitation(token: string): Promise<Result<InvitationInfo, RustrakError>>;
|
|
1227
1259
|
acceptInvitation(input: AcceptInvitation): Promise<Result<LoginResult, RustrakError>>;
|
|
1228
1260
|
private readLoginResult;
|
|
@@ -1328,7 +1360,8 @@ declare class StorageResource extends BaseResource {
|
|
|
1328
1360
|
getSummary(): Promise<Result<StorageSummary, RustrakError>>;
|
|
1329
1361
|
getProjects(): Promise<Result<ProjectStorage[], RustrakError>>;
|
|
1330
1362
|
previewCleanup(options: CleanupOptions): Promise<Result<CleanupCounts, RustrakError>>;
|
|
1331
|
-
executeCleanup(options: CleanupOptions): Promise<Result<
|
|
1363
|
+
executeCleanup(options: CleanupOptions): Promise<Result<CleanupStatus, RustrakError>>;
|
|
1364
|
+
getCleanupStatus(): Promise<Result<CleanupStatus, RustrakError>>;
|
|
1332
1365
|
previewGcSourceMaps(): Promise<Result<SourceMapGcResult, RustrakError>>;
|
|
1333
1366
|
gcSourceMaps(): Promise<Result<SourceMapGcResult, RustrakError>>;
|
|
1334
1367
|
}
|
|
@@ -1382,4 +1415,4 @@ declare class RustrakClient {
|
|
|
1382
1415
|
constructor(config: ClientConfig);
|
|
1383
1416
|
}
|
|
1384
1417
|
|
|
1385
|
-
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 ChunkUploadCapability, type CleanupCounts, type CleanupOptions, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -634,9 +634,16 @@ declare const bulkUpdateIssuesSchema: z.ZodObject<{
|
|
|
634
634
|
high: "high";
|
|
635
635
|
}>>;
|
|
636
636
|
}, z.core.$strip>;
|
|
637
|
-
declare const bulkDeleteIssuesSchema: z.ZodObject<{
|
|
637
|
+
declare const bulkDeleteIssuesSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
638
638
|
ids: z.ZodArray<z.ZodString>;
|
|
639
|
-
}, z.core.$
|
|
639
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
640
|
+
filter: z.ZodEnum<{
|
|
641
|
+
open: "open";
|
|
642
|
+
resolved: "resolved";
|
|
643
|
+
muted: "muted";
|
|
644
|
+
all: "all";
|
|
645
|
+
}>;
|
|
646
|
+
}, z.core.$strict>]>;
|
|
640
647
|
|
|
641
648
|
type Issue = z.infer<typeof issueSchema>;
|
|
642
649
|
type IssueStatus = z.infer<typeof issueStatusSchema>;
|
|
@@ -916,6 +923,24 @@ declare const cleanupCountsSchema: z.ZodObject<{
|
|
|
916
923
|
logs: z.ZodNumber;
|
|
917
924
|
issues_removed: z.ZodNumber;
|
|
918
925
|
}, z.core.$strip>;
|
|
926
|
+
declare const cleanupStatusSchema: z.ZodObject<{
|
|
927
|
+
state: z.ZodEnum<{
|
|
928
|
+
failed: "failed";
|
|
929
|
+
idle: "idle";
|
|
930
|
+
running: "running";
|
|
931
|
+
completed: "completed";
|
|
932
|
+
}>;
|
|
933
|
+
removed: z.ZodObject<{
|
|
934
|
+
events: z.ZodNumber;
|
|
935
|
+
transactions: z.ZodNumber;
|
|
936
|
+
spans: z.ZodNumber;
|
|
937
|
+
logs: z.ZodNumber;
|
|
938
|
+
issues_removed: z.ZodNumber;
|
|
939
|
+
}, z.core.$strip>;
|
|
940
|
+
started_at: z.ZodNullable<z.ZodString>;
|
|
941
|
+
finished_at: z.ZodNullable<z.ZodString>;
|
|
942
|
+
error: z.ZodNullable<z.ZodString>;
|
|
943
|
+
}, z.core.$strip>;
|
|
919
944
|
declare const sourceMapGcResultSchema: z.ZodObject<{
|
|
920
945
|
files_removed: z.ZodNumber;
|
|
921
946
|
bytes_freed: z.ZodNumber;
|
|
@@ -932,6 +957,7 @@ type SourceMapStorage = z.infer<typeof sourceMapStorageSchema>;
|
|
|
932
957
|
type StorageSummary = z.infer<typeof storageSummarySchema>;
|
|
933
958
|
type ProjectStorage = z.infer<typeof projectStorageSchema>;
|
|
934
959
|
type CleanupCounts = z.infer<typeof cleanupCountsSchema>;
|
|
960
|
+
type CleanupStatus = z.infer<typeof cleanupStatusSchema>;
|
|
935
961
|
type SourceMapGcResult = z.infer<typeof sourceMapGcResultSchema>;
|
|
936
962
|
type CleanupOptions = z.infer<typeof cleanupOptionsSchema>;
|
|
937
963
|
|
|
@@ -1151,9 +1177,14 @@ declare const ssoLinkSchema: z.ZodObject<{
|
|
|
1151
1177
|
email: z.ZodString;
|
|
1152
1178
|
provider_name: z.ZodString;
|
|
1153
1179
|
}, z.core.$strip>;
|
|
1180
|
+
declare const changePasswordRequestSchema: z.ZodObject<{
|
|
1181
|
+
current_password: z.ZodString;
|
|
1182
|
+
new_password: z.ZodString;
|
|
1183
|
+
}, z.core.$strip>;
|
|
1154
1184
|
|
|
1155
1185
|
type User = z.infer<typeof userSchema>;
|
|
1156
1186
|
type UpdatePreferencesRequest = z.infer<typeof updatePreferencesRequestSchema>;
|
|
1187
|
+
type ChangePasswordRequest = z.infer<typeof changePasswordRequestSchema>;
|
|
1157
1188
|
type AuthResponse = z.infer<typeof authResponseSchema>;
|
|
1158
1189
|
type LoginResult = z.infer<typeof loginResultSchema>;
|
|
1159
1190
|
type LoginRequest = z.infer<typeof loginRequestSchema>;
|
|
@@ -1223,6 +1254,7 @@ declare class AuthResource extends BaseResource {
|
|
|
1223
1254
|
logout(): Promise<Result<string[], RustrakError>>;
|
|
1224
1255
|
getCurrentUser(): Promise<Result<User, RustrakError>>;
|
|
1225
1256
|
updatePreferences(preferences: UpdatePreferencesRequest): Promise<Result<User, RustrakError>>;
|
|
1257
|
+
changePassword(request: ChangePasswordRequest): Promise<Result<void, RustrakError>>;
|
|
1226
1258
|
getInvitation(token: string): Promise<Result<InvitationInfo, RustrakError>>;
|
|
1227
1259
|
acceptInvitation(input: AcceptInvitation): Promise<Result<LoginResult, RustrakError>>;
|
|
1228
1260
|
private readLoginResult;
|
|
@@ -1328,7 +1360,8 @@ declare class StorageResource extends BaseResource {
|
|
|
1328
1360
|
getSummary(): Promise<Result<StorageSummary, RustrakError>>;
|
|
1329
1361
|
getProjects(): Promise<Result<ProjectStorage[], RustrakError>>;
|
|
1330
1362
|
previewCleanup(options: CleanupOptions): Promise<Result<CleanupCounts, RustrakError>>;
|
|
1331
|
-
executeCleanup(options: CleanupOptions): Promise<Result<
|
|
1363
|
+
executeCleanup(options: CleanupOptions): Promise<Result<CleanupStatus, RustrakError>>;
|
|
1364
|
+
getCleanupStatus(): Promise<Result<CleanupStatus, RustrakError>>;
|
|
1332
1365
|
previewGcSourceMaps(): Promise<Result<SourceMapGcResult, RustrakError>>;
|
|
1333
1366
|
gcSourceMaps(): Promise<Result<SourceMapGcResult, RustrakError>>;
|
|
1334
1367
|
}
|
|
@@ -1382,4 +1415,4 @@ declare class RustrakClient {
|
|
|
1382
1415
|
constructor(config: ClientConfig);
|
|
1383
1416
|
}
|
|
1384
1417
|
|
|
1385
|
-
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 ChunkUploadCapability, type CleanupCounts, type CleanupOptions, 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ z.enum([
|
|
|
20
20
|
"last_seen",
|
|
21
21
|
"event_count"
|
|
22
22
|
]);
|
|
23
|
-
z.enum(["open", "resolved", "muted", "all"]);
|
|
23
|
+
var issueFilterSchema = z.enum(["open", "resolved", "muted", "all"]);
|
|
24
24
|
var dateTimeSchema = z.string().datetime();
|
|
25
25
|
var uuidSchema = z.string().uuid();
|
|
26
26
|
var eventIdSchema = z.string().regex(
|
|
@@ -381,9 +381,10 @@ var bulkUpdateIssuesSchema = z.object({
|
|
|
381
381
|
status: z.union([issueStatusSchema, z.literal("resolvedInNextRelease")]).optional(),
|
|
382
382
|
priority: issuePrioritySchema.optional()
|
|
383
383
|
});
|
|
384
|
-
var bulkDeleteIssuesSchema = z.
|
|
385
|
-
ids: z.array(uuidSchema)
|
|
386
|
-
})
|
|
384
|
+
var bulkDeleteIssuesSchema = z.union([
|
|
385
|
+
z.strictObject({ ids: z.array(uuidSchema) }),
|
|
386
|
+
z.strictObject({ filter: issueFilterSchema })
|
|
387
|
+
]);
|
|
387
388
|
var logSchema = z.object({
|
|
388
389
|
id: uuidSchema,
|
|
389
390
|
trace_id: z.string().nullable(),
|
|
@@ -588,6 +589,13 @@ var cleanupCountsSchema = z.object({
|
|
|
588
589
|
logs: z.number(),
|
|
589
590
|
issues_removed: z.number()
|
|
590
591
|
});
|
|
592
|
+
var cleanupStatusSchema = z.object({
|
|
593
|
+
state: z.enum(["idle", "running", "completed", "failed"]),
|
|
594
|
+
removed: cleanupCountsSchema,
|
|
595
|
+
started_at: z.string().nullable(),
|
|
596
|
+
finished_at: z.string().nullable(),
|
|
597
|
+
error: z.string().nullable()
|
|
598
|
+
});
|
|
591
599
|
var sourceMapGcResultSchema = z.object({
|
|
592
600
|
files_removed: z.number(),
|
|
593
601
|
bytes_freed: z.number()
|
|
@@ -735,6 +743,10 @@ var ssoLinkSchema = z.object({
|
|
|
735
743
|
var confirmSsoLinkRequestSchema = z.object({
|
|
736
744
|
password: z.string().min(1)
|
|
737
745
|
});
|
|
746
|
+
var changePasswordRequestSchema = z.object({
|
|
747
|
+
current_password: z.string().min(1),
|
|
748
|
+
new_password: z.string().min(1)
|
|
749
|
+
});
|
|
738
750
|
|
|
739
751
|
// src/errors.ts
|
|
740
752
|
var FIELD_ERROR_CODES = [
|
|
@@ -1542,6 +1554,20 @@ var AuthResource = class extends BaseResource {
|
|
|
1542
1554
|
userSchema
|
|
1543
1555
|
);
|
|
1544
1556
|
}
|
|
1557
|
+
/** Replaces the signed-in user's password, given the current one. */
|
|
1558
|
+
async changePassword(request) {
|
|
1559
|
+
const validatedInput = this.validateInput(
|
|
1560
|
+
request,
|
|
1561
|
+
changePasswordRequestSchema
|
|
1562
|
+
);
|
|
1563
|
+
if (!validatedInput.success) return validatedInput;
|
|
1564
|
+
return this.requestVoid(
|
|
1565
|
+
() => this.http.post("auth/me/password", {
|
|
1566
|
+
json: validatedInput.data,
|
|
1567
|
+
retry: 0
|
|
1568
|
+
})
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1545
1571
|
/**
|
|
1546
1572
|
* Get the details of a pending invitation by its token (public endpoint)
|
|
1547
1573
|
* Used by the accept-invitation page before the user has an account
|
|
@@ -2356,8 +2382,13 @@ var StorageResource = class extends BaseResource {
|
|
|
2356
2382
|
);
|
|
2357
2383
|
}
|
|
2358
2384
|
/**
|
|
2359
|
-
*
|
|
2360
|
-
* scoped to one project) and remove
|
|
2385
|
+
* Start a cleanup: delete data older than `older_than_days` (optionally
|
|
2386
|
+
* scoped to one project) and remove the issues it leaves with zero events.
|
|
2387
|
+
*
|
|
2388
|
+
* Returns as soon as the server has started it, with the `running` status.
|
|
2389
|
+
* The deletion runs in the background; follow it with
|
|
2390
|
+
* {@link getCleanupStatus}. A second start while one is running fails with
|
|
2391
|
+
* a `conflict`.
|
|
2361
2392
|
*/
|
|
2362
2393
|
async executeCleanup(options) {
|
|
2363
2394
|
const validatedInput = this.validateInput(options, cleanupOptionsSchema);
|
|
@@ -2365,8 +2396,23 @@ var StorageResource = class extends BaseResource {
|
|
|
2365
2396
|
return validatedInput;
|
|
2366
2397
|
}
|
|
2367
2398
|
return this.request(
|
|
2368
|
-
() => this.http.post("api/storage/cleanup", {
|
|
2369
|
-
|
|
2399
|
+
() => this.http.post("api/storage/cleanup", {
|
|
2400
|
+
json: validatedInput.data,
|
|
2401
|
+
// No retry: if the first attempt started the cleanup and only its
|
|
2402
|
+
// response was lost, a retry would be refused as a second run and
|
|
2403
|
+
// report a failure for a cleanup that is in fact running.
|
|
2404
|
+
retry: 0
|
|
2405
|
+
}),
|
|
2406
|
+
cleanupStatusSchema
|
|
2407
|
+
);
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* The running cleanup's progress, or the outcome of the last one.
|
|
2411
|
+
*/
|
|
2412
|
+
async getCleanupStatus() {
|
|
2413
|
+
return this.request(
|
|
2414
|
+
() => this.http.get("api/storage/cleanup/status"),
|
|
2415
|
+
cleanupStatusSchema
|
|
2370
2416
|
);
|
|
2371
2417
|
}
|
|
2372
2418
|
/**
|