Skip to content

Commit 1bbd154

Browse files
committed
docs(client): align three organization docblocks with the decoded metadata wire
Round-2 contract-review fix for #18728 (PR #19122, FAIL — scoped, comment 5736639314). OrganizationWire's docblock at :1206-1213 was rewritten to say metadata arrives DECODED on setActive/get/delete/list, but three linked docblocks on the same published SDK surface still declared the old stored- JSON-text wire: OrganizationFullWire, organizations.setActive and organizations.get. Each is corrected to point at OrganizationWire and state the one now-true fact, without repeating the block itself. Also clarifies organizations.delete's "as it was stored" phrase, which is ambiguous rather than wrong (it is about which row — the pre-delete snapshot — not about metadata encoding) on a route this PR now decodes. Prose only: no type, export or runtime change. Claude-Session: https://claude.ai/code/session_019srGWGCBBCBHqcDoRZpQRh Co-authored-by: Claude <noreply@anthropic.com>
1 parent 485138e commit 1bbd154

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

packages/client/src/index.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,10 +1406,10 @@ export interface OrganizationRemoveMemberResult {
14061406

14071407
/**
14081408
* What `GET /organization/get-full-organization` answers: the row (metadata
1409-
* as stored JSON text, see {@link OrganizationWire}) plus every invitation of
1410-
* any status, every member with its user joined, and — because this platform
1411-
* mounts the organization plugin with `teams: { enabled: true }`
1412-
* unconditionally — the organization's teams.
1409+
* decoded, see {@link OrganizationWire}) plus every invitation of any status,
1410+
* every member with its user joined, and — because this platform mounts the
1411+
* organization plugin with `teams: { enabled: true }` unconditionally — the
1412+
* organization's teams.
14131413
*/
14141414
export interface OrganizationFullWire extends OrganizationWire {
14151415
invitations: OrganizationInvitationWire[];
@@ -3644,8 +3644,8 @@ export class ObjectStackClient {
36443644
*
36453645
* POST /api/v1/auth/organization/set-active
36463646
*
3647-
* Answers the organization row as STORED (`metadata` is the JSON text,
3648-
* see {@link OrganizationWire}). Answers `null` — measured, a 4-byte body
3647+
* Answers the organization row with `metadata` DECODED (see
3648+
* {@link OrganizationWire}). Answers `null` — measured, a 4-byte body
36493649
* — when `organizationId` is the empty string and the session has no
36503650
* active organization to fall back to; a non-member is a thrown 403.
36513651
*/
@@ -3662,7 +3662,7 @@ export class ObjectStackClient {
36623662
* Get full organization detail (members, invitations, teams).
36633663
* GET /api/v1/auth/organization/get-full-organization?organizationId=...
36643664
*
3665-
* `metadata` is the stored JSON text here (see {@link OrganizationWire}).
3665+
* `metadata` is decoded here (see {@link OrganizationWire}).
36663666
* Answers `null` (measured) when `organizationId` is the empty string and
36673667
* the session has no active organization; an unknown id is a thrown 400.
36683668
*/
@@ -3774,7 +3774,8 @@ export class ObjectStackClient {
37743774
*
37753775
* POST /api/v1/auth/organization/delete
37763776
*
3777-
* Answers the deleted organization's row as it was stored (measured) —
3777+
* Answers the deleted organization's row as it stood immediately before
3778+
* deletion (measured; `metadata` decoded, see {@link OrganizationWire}) —
37783779
* NOT the bare id string the vendor's OpenAPI stub declares.
37793780
*
37803781
* better-auth removes the organization row, all members, and all

0 commit comments

Comments
 (0)