diff --git a/content/guides/04.connect/6.sdk.md b/content/guides/04.connect/6.sdk.md index f7b942ff..969bcb8f 100644 --- a/content/guides/04.connect/6.sdk.md +++ b/content/guides/04.connect/6.sdk.md @@ -22,8 +22,8 @@ The Directus SDK is a "Composable Client" that allows you to customize and build | `realtime()` | Adds `.connect()`, `.subscribe()`, `.sendMessage()`, and `.onWebSocket()` methods. Also adds reconnect logic. | | `staticToken()` | Adds `.setToken()` and `.getToken()` methods for manually managing tokens. | -::tabs - ::div{class="pr-6"} +::::tabs + :::div{class="pr-6"} --- label: JavaScript --- @@ -31,9 +31,9 @@ The Directus SDK is a "Composable Client" that allows you to customize and build import { createDirectus, rest } from '@directus/sdk'; const directus = createDirectus('http://directus.example.com').with(rest()); ``` - :: + ::: - ::div{class="pr-6"} + :::div{class="pr-6"} --- label: TypeScript --- @@ -56,8 +56,10 @@ The Directus SDK is a "Composable Client" that allows you to customize and build ``` ::callout{icon="i-lucide-graduation-cap" color="secondary" to="/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk"} - Learn how to create a Schema for SDK client creation. -:: + Learn how to leverage TypeScript with the SDK for auto-completion and generated output types. + :: + ::: +:::: ## Making Requests @@ -135,6 +137,7 @@ To call custom endpoints using the SDK, you can manually provide a path and meth method: 'GET', })); ``` + :: :: ### GraphQL Usage