Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

830 B
Raw Blame
export const normalizeFunctionIds = (functionIds: string[]): string[] =>
  Array.from(new Set(functionIds)).sort()

export const edgeFunctionsKeys = {
  list: (projectRef: string | undefined) => ['projects', projectRef, 'edge-functions'] as const,
  lastHourStats: (
    projectRef: string | undefined,
    functionIds: string[] = [],
    useOtel: boolean = false
  ) =>
    [
      'projects',
      projectRef,
      'edge-functions',
      'last-hour-stats',
      normalizeFunctionIds(functionIds),
      { otel: useOtel },
    ] as const,
  detail: (projectRef: string | undefined, slug: string | undefined) =>
    ['projects', projectRef, 'edge-function', slug, 'detail'] as const,
  body: (projectRef: string | undefined, slug: string | undefined) =>
    ['projects', projectRef, 'edge-function', slug, 'body'] as const,
}