Skip to content

Commit 07d1feb

Browse files
authored
fix(docs): make TypeScript code blocks parseable by sort-imports plugin (#220)
1 parent c21958e commit 07d1feb

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

docs/plans/agent-invite-endpoint-plan.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,18 @@ POST /api/v2/agents/join
6363
Request validation (zod):
6464

6565
```typescript
66-
{
66+
const requestBody = z.object({
6767
slug: z.string().min(1).max(2048),
6868
instructions: z.string().optional(),
69-
}
69+
});
7070
```
7171

7272
Response shape:
7373

7474
```typescript
75-
// Success
76-
{ success: true, joined: boolean }
77-
78-
// Error
79-
{ success: false, error: string, message: string }
75+
type Response =
76+
| { success: true; joined: boolean }
77+
| { success: false; error: string; message: string };
8078
```
8179

8280
Invite URL construction based on `XMTP_ENV`:

0 commit comments

Comments
 (0)