mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 15:03:46 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
166 lines
3.4 KiB
TypeScript
166 lines
3.4 KiB
TypeScript
export const analyticsKeys = {
|
|
// logs/reports endpoints
|
|
functionsCombinedStats: (
|
|
projectRef: string | undefined,
|
|
{
|
|
interval,
|
|
functionId,
|
|
}: {
|
|
functionId: string | undefined
|
|
interval: string | undefined
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'functions-combined-stats',
|
|
{
|
|
interval,
|
|
functionId,
|
|
},
|
|
] as const,
|
|
functionsInvStats: (
|
|
projectRef: string | undefined,
|
|
{
|
|
interval,
|
|
functionId,
|
|
}: {
|
|
functionId: string | undefined
|
|
interval: string | undefined
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'functions-inv-stats',
|
|
{
|
|
interval,
|
|
functionId,
|
|
},
|
|
] as const,
|
|
functionsReqStats: (
|
|
projectRef: string | undefined,
|
|
{
|
|
interval,
|
|
functionId,
|
|
}: {
|
|
functionId: string | undefined
|
|
interval: string | undefined
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'functions-req-stats',
|
|
{
|
|
interval,
|
|
functionId,
|
|
},
|
|
] as const,
|
|
functionsResourceUsage: (
|
|
projectRef: string | undefined,
|
|
{
|
|
interval,
|
|
functionId,
|
|
}: {
|
|
functionId: string | undefined
|
|
interval: string | undefined
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'functions-resource-usage',
|
|
{
|
|
interval,
|
|
functionId,
|
|
},
|
|
] as const,
|
|
|
|
orgDailyStats: (
|
|
orgSlug: string | undefined,
|
|
{
|
|
startDate,
|
|
endDate,
|
|
projectRef,
|
|
}: {
|
|
startDate?: string
|
|
endDate?: string
|
|
projectRef?: string
|
|
}
|
|
) =>
|
|
[
|
|
'organizations',
|
|
orgSlug,
|
|
'daily-stats',
|
|
{
|
|
startDate: isoDateStringToDate(startDate),
|
|
endDate: isoDateStringToDate(endDate),
|
|
projectRef,
|
|
},
|
|
] as const,
|
|
infraMonitoring: (
|
|
projectRef: string | undefined,
|
|
{
|
|
attribute,
|
|
startDate,
|
|
endDate,
|
|
interval,
|
|
databaseIdentifier,
|
|
}: {
|
|
attribute?: string
|
|
startDate?: string
|
|
endDate?: string
|
|
interval?: string
|
|
databaseIdentifier?: string
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'infra-monitoring',
|
|
{ attribute, startDate, endDate, interval, databaseIdentifier },
|
|
] as const,
|
|
infraMonitoringGroup: (
|
|
projectRef: string | undefined,
|
|
{
|
|
attributes,
|
|
startDate,
|
|
endDate,
|
|
interval,
|
|
databaseIdentifier,
|
|
}: {
|
|
attributes?: string[]
|
|
startDate?: string
|
|
endDate?: string
|
|
interval?: string
|
|
databaseIdentifier?: string
|
|
}
|
|
) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'infra-monitoring',
|
|
'group',
|
|
{
|
|
attributes: attributes ? [...attributes].sort() : undefined,
|
|
startDate,
|
|
endDate,
|
|
interval,
|
|
databaseIdentifier,
|
|
},
|
|
] as const,
|
|
projectMetrics: (projectRef: string | undefined, { interval }: { interval?: string }) =>
|
|
['projects', projectRef, 'project.metrics', { interval }] as const,
|
|
usageApiCounts: (projectRef: string | undefined, interval: string | undefined) =>
|
|
['projects', projectRef, 'usage.api-counts', interval] as const,
|
|
|
|
usageApiRequestsCount: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'usage.api-requests-count'] as const,
|
|
}
|
|
|
|
function isoDateStringToDate(isoDateString: string | undefined): string | undefined {
|
|
if (!isoDateString) return isoDateString
|
|
|
|
return isoDateString.split('T')[0]
|
|
}
|