Skip to content

Interface: SessionRecord

Interface: SessionRecord

Defined in: auth-shared/src/dto/session.ts:14

Session DTOs — the wire record emitted by /auth/sessions, /admin/users/{userId}/sessions.

Important: timestamps are RFC 3339 / ISO 8601 strings, not Unix seconds. The Go server emits LastActivityAt / CreatedAt as time.Format("2006-01-02T15:04:05Z07:00"). Older SDK builds typed these as number — that was wrong and only worked by accident when the field was absent. Locking the type down here prevents future drift.

Source: auth-server/internal/api/dto/auth.go SessionResponse + ToSessionResponse.

Properties

created_at

created_at: string

Defined in: auth-shared/src/dto/session.ts:25


device_info?

optional device_info?: string

Defined in: auth-shared/src/dto/session.ts:17

Optional human-readable device fingerprint (UA-derived).


expires_at?

optional expires_at?: string

Defined in: auth-shared/src/dto/session.ts:27

Reserved — server doesn’t currently emit this, kept for forward-compat.


id

id: string

Defined in: auth-shared/src/dto/session.ts:15


ip_address?

optional ip_address?: string

Defined in: auth-shared/src/dto/session.ts:19

Optional IP at session-establishment time.


is_current?

optional is_current?: boolean

Defined in: auth-shared/src/dto/session.ts:29

True for the session backing the current call.


last_activity_at

last_activity_at: string

Defined in: auth-shared/src/dto/session.ts:24

RFC 3339 / ISO 8601 timestamps. Parse with new Date(value).


location?

optional location?: string

Defined in: auth-shared/src/dto/session.ts:22

Optional GeoIP location string.


user_agent?

optional user_agent?: string

Defined in: auth-shared/src/dto/session.ts:20