Skip to content

Align admin, activity log and office hours docs with API behaviour - #780

Merged
cathalging merged 8 commits into
mainfrom
cathalging/l2-workspace
Oct 29, 2026
Merged

cathalging merged 8 commits into
mainfrom
cathalging/l2-workspace

Conversation

@cathalging

@cathalging cathalging commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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.pages moves to page-number pagination, activity_type drops the values the API can't return (three in Preview, four in 2.17), and the shared ValidationError response is replaced by inline 422 responses. The other changes add values or loosen fields.

Generated with Claude Code

cathalging and others added 6 commits October 29, 2026 09:48
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 markdennis22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Identify an admin fields: The reference said Identify an admin returns job_title, away_mode_enabled, away_mode_reassign and team_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.
  2. away_mode_reassign required: The reference said both fields are required. The API only requires away_mode_reassign when away_mode_enabled is true. Should it stay required until the API changes, or describe the current behaviour?
  3. created_at_after required: 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?
  4. Unused ValidationError response: Inlining the office hours 422s leaves components/responses/ValidationError unused in 2.17 and Preview. Should it be removed?
  5. Enum count: Risks says activity_type loses three values. 2.17 loses four (conversation_deletion_schedule_deletion as 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>
@cathalging

Copy link
Copy Markdown
Contributor Author

Thanks!

  • 4. ValidationError: Removed from 2.17 and Preview, since nothing references it now.
  • 5. Enum count: Agreed, 2.17 loses four. I'll correct the description along with the answers to 1-3.
  • 1-3: Being decided now. I'll update this PR to match.

~ Automated via Claude

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@markdennis22 markdennis22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cathalging
cathalging merged commit 7c0c92b into main Oct 29, 2026
4 checks passed
@cathalging
cathalging deleted the cathalging/l2-workspace branch October 29, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants