0.11.0
Added
-
setLogHandler(level:_:)/setLogHandler/set_log_handlerandsetLogLevel(_:)/setLogLevel/set_log_level— register a handler to receive a stream of leveled log events (LogEvent, withLogLevelandLogCategory) describing session, recording, calibration, and analysis lifecycle milestones as they happen. Off by default until a handler is registered. -
client.activities.list(...)— the activities matching a filter, as a sequence you iterate. Acceptssubject,calibrationSession/calibration_session,activityType/activity_type,excludeCalibration/exclude_calibration,createdAfter/createdBefore(created_after/created_before),search,tags,createdBy/created_by,onlyCompleted/only_completed,excludeAnalysisError/exclude_analysis_error,orderBy/order_byandlimit.activityList(for:)(Swift) /activityList()(TypeScript) /activity_list()(Python) is unchanged. -
client.subjects.list(...)— the subjects matching a filter, as a sequence you iterate. Acceptssearch,createdAfter/createdBefore(created_after/created_before),groups,tags,createdBy/created_by,activityType/activity_type,activityComplete/activity_complete,session,orderBy/order_byandlimit. -
client.sessions.list(...)— the sessions matching a filter, as a sequence you iterate. Acceptssubject,orderBy/order_byandlimit. Lists your own sessions that are ready to work with.sessionList()(Swift and TypeScript) /session_list()(Python) is unchanged. -
client.groups.list(...)— the subject groups matching a filter, as a sequence you iterate. Acceptssearch,orderBy/order_byandlimit. -
Every sequence a
list(...)returns carriestotal, the number of items matching the filter, andall(), which collects the rest into an array. Swift's conform toAsyncSequenceand are iterated withfor try await; TypeScript's areAsyncIterableand iterated withfor await; Python's follow the iterator protocol. -
list(...)refuses anorderBy/order_byvalue that names a field it cannot sort by, with an error naming the ones it accepts. -
SubjectGroup— a named collection of subjects, withid,name,description,subjectCount/subject_count,totalActivities/total_activities,lastActivity/last_activity,createdBy/created_by,isOwner/is_owner,canEdit/can_edit,createdAt/created_at,updatedAt/updated_at,trashedandtrashedAt/trashed_at. -
ActivityStream(_:),SubjectStream(_:),SessionStream(_:)andGroupStream(_:)(Swift) build a sequence over values you already have, for a mock, a preview or a test double. -
close()on a TypeScript sequence releases what it reads from. Reading to the end does this for you; call it if you open a sequence and stop before finishing it.
Fixed
activityMetrics(TypeScript) /activity_metrics(Python) — now correctly returnnull/None(matching Swift's existing behavior) when an activity has not yet been analyzed, instead of a non-null value that could crash calling code.
Breaking
-
subjectList()(Swift and TypeScript) /subject_list()(Python) is removed. Useclient.subjects.list(...)instead. -
activities(forSubject:startIndex:count:)/activitiesForSubject()/activities_for_subject()is removed. Useclient.activities.list(subject:)instead. -
The
ActivitySortenum is removed. Sort withorderBy/order_byon the newlist(...)methods.