@rustrak/client 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1151,9 +1151,14 @@ declare const ssoLinkSchema: z.ZodObject<{
|
|
|
1151
1151
|
email: z.ZodString;
|
|
1152
1152
|
provider_name: z.ZodString;
|
|
1153
1153
|
}, z.core.$strip>;
|
|
1154
|
+
declare const changePasswordRequestSchema: z.ZodObject<{
|
|
1155
|
+
current_password: z.ZodString;
|
|
1156
|
+
new_password: z.ZodString;
|
|
1157
|
+
}, z.core.$strip>;
|
|
1154
1158
|
|
|
1155
1159
|
type User = z.infer<typeof userSchema>;
|
|
1156
1160
|
type UpdatePreferencesRequest = z.infer<typeof updatePreferencesRequestSchema>;
|
|
1161
|
+
type ChangePasswordRequest = z.infer<typeof changePasswordRequestSchema>;
|
|
1157
1162
|
type AuthResponse = z.infer<typeof authResponseSchema>;
|
|
1158
1163
|
type LoginResult = z.infer<typeof loginResultSchema>;
|
|
1159
1164
|
type LoginRequest = z.infer<typeof loginRequestSchema>;
|
|
@@ -1223,6 +1228,7 @@ declare class AuthResource extends BaseResource {
|
|
|
1223
1228
|
logout(): Promise<Result<string[], RustrakError>>;
|
|
1224
1229
|
getCurrentUser(): Promise<Result<User, RustrakError>>;
|
|
1225
1230
|
updatePreferences(preferences: UpdatePreferencesRequest): Promise<Result<User, RustrakError>>;
|
|
1231
|
+
changePassword(request: ChangePasswordRequest): Promise<Result<void, RustrakError>>;
|
|
1226
1232
|
getInvitation(token: string): Promise<Result<InvitationInfo, RustrakError>>;
|
|
1227
1233
|
acceptInvitation(input: AcceptInvitation): Promise<Result<LoginResult, RustrakError>>;
|
|
1228
1234
|
private readLoginResult;
|
|
@@ -1382,4 +1388,4 @@ declare class RustrakClient {
|
|
|
1382
1388
|
constructor(config: ClientConfig);
|
|
1383
1389
|
}
|
|
1384
1390
|
|
|
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 };
|
|
1391
|
+
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 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
|
@@ -1151,9 +1151,14 @@ declare const ssoLinkSchema: z.ZodObject<{
|
|
|
1151
1151
|
email: z.ZodString;
|
|
1152
1152
|
provider_name: z.ZodString;
|
|
1153
1153
|
}, z.core.$strip>;
|
|
1154
|
+
declare const changePasswordRequestSchema: z.ZodObject<{
|
|
1155
|
+
current_password: z.ZodString;
|
|
1156
|
+
new_password: z.ZodString;
|
|
1157
|
+
}, z.core.$strip>;
|
|
1154
1158
|
|
|
1155
1159
|
type User = z.infer<typeof userSchema>;
|
|
1156
1160
|
type UpdatePreferencesRequest = z.infer<typeof updatePreferencesRequestSchema>;
|
|
1161
|
+
type ChangePasswordRequest = z.infer<typeof changePasswordRequestSchema>;
|
|
1157
1162
|
type AuthResponse = z.infer<typeof authResponseSchema>;
|
|
1158
1163
|
type LoginResult = z.infer<typeof loginResultSchema>;
|
|
1159
1164
|
type LoginRequest = z.infer<typeof loginRequestSchema>;
|
|
@@ -1223,6 +1228,7 @@ declare class AuthResource extends BaseResource {
|
|
|
1223
1228
|
logout(): Promise<Result<string[], RustrakError>>;
|
|
1224
1229
|
getCurrentUser(): Promise<Result<User, RustrakError>>;
|
|
1225
1230
|
updatePreferences(preferences: UpdatePreferencesRequest): Promise<Result<User, RustrakError>>;
|
|
1231
|
+
changePassword(request: ChangePasswordRequest): Promise<Result<void, RustrakError>>;
|
|
1226
1232
|
getInvitation(token: string): Promise<Result<InvitationInfo, RustrakError>>;
|
|
1227
1233
|
acceptInvitation(input: AcceptInvitation): Promise<Result<LoginResult, RustrakError>>;
|
|
1228
1234
|
private readLoginResult;
|
|
@@ -1382,4 +1388,4 @@ declare class RustrakClient {
|
|
|
1382
1388
|
constructor(config: ClientConfig);
|
|
1383
1389
|
}
|
|
1384
1390
|
|
|
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 };
|
|
1391
|
+
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 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
|
@@ -735,6 +735,10 @@ var ssoLinkSchema = z.object({
|
|
|
735
735
|
var confirmSsoLinkRequestSchema = z.object({
|
|
736
736
|
password: z.string().min(1)
|
|
737
737
|
});
|
|
738
|
+
var changePasswordRequestSchema = z.object({
|
|
739
|
+
current_password: z.string().min(1),
|
|
740
|
+
new_password: z.string().min(1)
|
|
741
|
+
});
|
|
738
742
|
|
|
739
743
|
// src/errors.ts
|
|
740
744
|
var FIELD_ERROR_CODES = [
|
|
@@ -1542,6 +1546,20 @@ var AuthResource = class extends BaseResource {
|
|
|
1542
1546
|
userSchema
|
|
1543
1547
|
);
|
|
1544
1548
|
}
|
|
1549
|
+
/** Replaces the signed-in user's password, given the current one. */
|
|
1550
|
+
async changePassword(request) {
|
|
1551
|
+
const validatedInput = this.validateInput(
|
|
1552
|
+
request,
|
|
1553
|
+
changePasswordRequestSchema
|
|
1554
|
+
);
|
|
1555
|
+
if (!validatedInput.success) return validatedInput;
|
|
1556
|
+
return this.requestVoid(
|
|
1557
|
+
() => this.http.post("auth/me/password", {
|
|
1558
|
+
json: validatedInput.data,
|
|
1559
|
+
retry: 0
|
|
1560
|
+
})
|
|
1561
|
+
);
|
|
1562
|
+
}
|
|
1545
1563
|
/**
|
|
1546
1564
|
* Get the details of a pending invitation by its token (public endpoint)
|
|
1547
1565
|
* Used by the accept-invitation page before the user has an account
|