Repository navigation
Align admin, activity log and office hours docs with API behaviour - #780
Conversation
Document the OAuth scope and the token-lacks-scope 401 on the admin and activity log operations, and the real error responses for set away, identify admin, activity logs and office hours (own error codes, 400 for unknown fields, 422 rules, the default schedule). Activity log lists now use page-number pagination, items carry a type, performed_by and activity_description are nullable, and the activity type list is complete. Correct the identify admin response, the set away request, the admin team_ids and away status descriptions, office hours request rules, and several examples. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Remove the version-not-available 400 from Search activity logs and List activity log event types, since both are available in every current version. Say that an archived away status reason is still accepted when it is already the admin's current reason, and that office hours requests accept `id` (and `office_hours_schedule_id` on exceptions) without error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
created_at_after defaults to 30 days before the request and created_at_before defaults to the time of the request. List all activity logs now documents the page and per_page parameters. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… body Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
markdennis22
left a comment
There was a problem hiding this comment.
Thanks! I checked that both versions parse with no dangling refs, that Fern check is unchanged, that the Preview SDK gets no new unknown types, and the described behaviour against the API. The 387 activity_type values match what the API can return.
A few questions:
- Identify an admin fields: The reference said Identify an admin returns
job_title,away_mode_enabled,away_mode_reassignandteam_ids. The API currently doesn't, though Retrieve an admin does. Should the reference keep these fields until the API changes, or describe the current response? Removing them changes the Preview SDK type. away_mode_reassignrequired: The reference said both fields are required. The API only requiresaway_mode_reassignwhenaway_mode_enabledis true. Should it stay required until the API changes, or describe the current behaviour?created_at_afterrequired: The reference said it was required. The API defaults it to 30 days before the request. Should it stay required until the API changes, or describe the default?- Unused
ValidationErrorresponse: Inlining the office hours 422s leavescomponents/responses/ValidationErrorunused in 2.17 and Preview. Should it be removed? - Enum count: Risks says
activity_typeloses three values. 2.17 loses four (conversation_deletion_schedule_deletionas well).
Approval is waiting on a decision for 1 to 3.
~ Automated via Claude
… response Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks!
~ Automated via Claude |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
markdennis22
left a comment
There was a problem hiding this comment.
Thanks! I re-checked the latest changes merged with main: both versions parse with no dangling refs, Fern check is unchanged, and the Preview SDK gets no new unknown types. Identify an admin and Set an admin to away now keep their documented contract, and the description gives the right enum counts.
One nit, not blocking: Set an admin to away keeps default: false on the required away_mode_reassign but drops default: true from away_mode_enabled. You could drop both or keep both.
Approving.
~ Automated via Claude
Why?
The admin and activity log operations don't name the OAuth scope they need, and several admin, activity log and office hours responses, errors and examples don't match the API.
How?
Corrects these operations in 2.17 and Preview to match the API's current behaviour.
Risks
Preview types reach the generated SDKs.
activity_log_list.pagesmoves to page-number pagination,activity_typedrops the values the API can't return (three in Preview, four in 2.17), and the sharedValidationErrorresponse is replaced by inline 422 responses. The other changes add values or loosen fields.Generated with Claude Code