← Public packages
@kentcdodds/devin
Start, monitor, and manage Devin sessions, knowledge, playbooks, and schedules via the Devin v3 API
src/self.ts
18 lines · 496 B · TypeScriptimport { devinApi } from './lib/client.ts'
export type DevinSelf = {
principal_type: 'service_user' | 'user' | string
service_user_id?: string | null
service_user_name?: string | null
user_id?: string | null
email?: string | null
org_id?: string | null
[key: string]: unknown
}
/** Identity behind the saved credential — cheapest auth/permissions check. */
export async function whoami(): Promise<DevinSelf> {
return devinApi<DevinSelf>({ path: '/v3/self' })
}
export default whoami