mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
small pr fixes
This commit is contained in:
parent
3d51c70654
commit
5868a35e6e
@ -301,6 +301,7 @@ model SessionRecording {
|
||||
@@id([tenancyId, id])
|
||||
@@index([tenancyId, projectUserId, startedAt])
|
||||
@@index([tenancyId, lastEventAt])
|
||||
// index by updatedAt instead of lastEventAt because event timing can be spoofed
|
||||
@@index([tenancyId, refreshTokenId, updatedAt])
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ export const POST = createSmartRouteHandler({
|
||||
summary: "Upload rrweb session recording batch",
|
||||
description: "Uploads a batch of rrweb events for a cross-tab session recording.",
|
||||
tags: ["Session Recordings"],
|
||||
hidden: true
|
||||
},
|
||||
request: yupObject({
|
||||
auth: yupObject({
|
||||
|
||||
@ -19,7 +19,7 @@ import { AdminEmailTemplate } from "../../email-templates";
|
||||
import { InternalApiKey, InternalApiKeyBase, InternalApiKeyBaseCrudRead, InternalApiKeyCreateOptions, InternalApiKeyFirstView, internalApiKeyCreateOptionsToCrud } from "../../internal-api-keys";
|
||||
import { AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectPermissionDefinitionCreateOptions, AdminProjectPermissionDefinitionUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, adminProjectPermissionDefinitionCreateOptionsToCrud, adminProjectPermissionDefinitionUpdateOptionsToCrud, adminTeamPermissionDefinitionCreateOptionsToCrud, adminTeamPermissionDefinitionUpdateOptionsToCrud } from "../../permissions";
|
||||
import { AdminOwnedProject, AdminProject, AdminProjectUpdateOptions, PushConfigOptions, adminProjectUpdateOptionsToCrud } from "../../projects";
|
||||
import type { AdminSessionRecording, AdminSessionRecordingChunk, ListSessionRecordingChunksOptions, ListSessionRecordingChunksResult, ListSessionRecordingsOptions, ListSessionRecordingsResult, SessionRecordingAllEventsResult } from "../interfaces/admin-app";
|
||||
import type { AdminSessionRecording, AdminSessionRecordingChunk, ListSessionRecordingChunksOptions, ListSessionRecordingChunksResult, ListSessionRecordingsOptions, ListSessionRecordingsResult, SessionRecordingAllEventsResult } from "../../session-recordings";
|
||||
import { StackAdminApp, StackAdminAppConstructorOptions } from "../interfaces/admin-app";
|
||||
import { clientVersion, createCache, getBaseUrl, getDefaultExtraRequestHeaders, getDefaultProjectId, getDefaultPublishableClientKey, getDefaultSecretServerKey, getDefaultSuperSecretAdminKey, resolveConstructorOptions } from "./common";
|
||||
import { _StackServerAppImplIncomplete } from "./server-app-impl";
|
||||
|
||||
@ -31,67 +31,8 @@ export type EmailOutboxUpdateOptions = {
|
||||
cancel?: boolean,
|
||||
};
|
||||
|
||||
export type AdminSessionRecording = {
|
||||
id: string,
|
||||
projectUser: {
|
||||
id: string,
|
||||
displayName: string | null,
|
||||
primaryEmail: string | null,
|
||||
},
|
||||
startedAt: Date,
|
||||
lastEventAt: Date,
|
||||
chunkCount: number,
|
||||
eventCount: number,
|
||||
};
|
||||
|
||||
export type AdminSessionRecordingChunk = {
|
||||
id: string,
|
||||
batchId: string,
|
||||
tabId: string | null,
|
||||
browserSessionId: string | null,
|
||||
eventCount: number,
|
||||
byteLength: number,
|
||||
firstEventAt: Date,
|
||||
lastEventAt: Date,
|
||||
createdAt: Date,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingsOptions = {
|
||||
limit?: number,
|
||||
cursor?: string,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingsResult = {
|
||||
items: AdminSessionRecording[],
|
||||
nextCursor: string | null,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingChunksOptions = {
|
||||
limit?: number,
|
||||
cursor?: string,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingChunksResult = {
|
||||
items: AdminSessionRecordingChunk[],
|
||||
nextCursor: string | null,
|
||||
};
|
||||
|
||||
export type SessionRecordingAllEventsResult = {
|
||||
chunks: Array<{
|
||||
id: string,
|
||||
batchId: string,
|
||||
tabId: string | null,
|
||||
eventCount: number,
|
||||
byteLength: number,
|
||||
firstEventAt: Date,
|
||||
lastEventAt: Date,
|
||||
createdAt: Date,
|
||||
}>,
|
||||
chunkEvents: Array<{
|
||||
chunkId: string,
|
||||
events: unknown[],
|
||||
}>,
|
||||
};
|
||||
import type { ListSessionRecordingChunksOptions, ListSessionRecordingChunksResult, ListSessionRecordingsOptions, ListSessionRecordingsResult, SessionRecordingAllEventsResult } from "../../session-recordings";
|
||||
export type { AdminSessionRecording, AdminSessionRecordingChunk, ListSessionRecordingsOptions, ListSessionRecordingsResult, ListSessionRecordingChunksOptions, ListSessionRecordingChunksResult, SessionRecordingAllEventsResult } from "../../session-recordings";
|
||||
|
||||
|
||||
export type StackAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = (
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
export type AdminSessionRecording = {
|
||||
id: string,
|
||||
projectUser: {
|
||||
id: string,
|
||||
displayName: string | null,
|
||||
primaryEmail: string | null,
|
||||
},
|
||||
startedAt: Date,
|
||||
lastEventAt: Date,
|
||||
chunkCount: number,
|
||||
eventCount: number,
|
||||
};
|
||||
|
||||
export type AdminSessionRecordingChunk = {
|
||||
id: string,
|
||||
batchId: string,
|
||||
tabId: string | null,
|
||||
browserSessionId: string | null,
|
||||
eventCount: number,
|
||||
byteLength: number,
|
||||
firstEventAt: Date,
|
||||
lastEventAt: Date,
|
||||
createdAt: Date,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingsOptions = {
|
||||
limit?: number,
|
||||
cursor?: string,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingsResult = {
|
||||
items: AdminSessionRecording[],
|
||||
nextCursor: string | null,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingChunksOptions = {
|
||||
limit?: number,
|
||||
cursor?: string,
|
||||
};
|
||||
|
||||
export type ListSessionRecordingChunksResult = {
|
||||
items: AdminSessionRecordingChunk[],
|
||||
nextCursor: string | null,
|
||||
};
|
||||
|
||||
export type SessionRecordingAllEventsResult = {
|
||||
chunks: Array<{
|
||||
id: string,
|
||||
batchId: string,
|
||||
tabId: string | null,
|
||||
eventCount: number,
|
||||
byteLength: number,
|
||||
firstEventAt: Date,
|
||||
lastEventAt: Date,
|
||||
createdAt: Date,
|
||||
}>,
|
||||
chunkEvents: Array<{
|
||||
chunkId: string,
|
||||
events: unknown[],
|
||||
}>,
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user