Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
588 B
Raw Blame
import type { Context } from '../../../context'

/**
 * The row's `auth`: the signed-in account's and organization's ids, or
 * undefined when the identity holds neither (an API key, no login).
 *
 * @param identity who the rows are from
 * @returns the ids, or undefined
 */
export function authOf(identity: Context['identity']) {
  const hasEither =
    identity.accountUuid !== undefined ||
    identity.organizationUuid !== undefined

  return hasEither
    ? {
        accountUuid: identity.accountUuid,
        organizationUuid: identity.organizationUuid,
      }
    : undefined
}