Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk): show the sessions list query in the SDK guide

Yudhi Armyndharis4995fd5dcac5
diff --git a/docs/18-sdk-design.md b/docs/18-sdk-design.md
index 0f9533aad..66de41bd6 100644
--- a/docs/18-sdk-design.md
+++ b/docs/18-sdk-design.md
@@ -126,7 +126,7 @@ The top-level client also exposes:
| Method | Signature | Description |
| -------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `list` | `list()` | List all sessions (scoped to the key's `allowedSessions`). |
+| `list` | `list(query?)` | List all sessions (scoped to the key's `allowedSessions`). The optional query takes `limit`, `offset` and `name` (an exact, case-sensitive match; no match returns an empty list). |
| `getConfig` | `getConfig(id)` | Read a session's engine configuration. |
| `updateConfig` | `updateConfig(id, body)` | Update a running session's configuration; takes effect without re-linking the account. **OPERATOR** |
| `getProxy` | `getProxy(id)` | Read a session's masked proxy configuration (credentials never returned). |
@@ -499,7 +499,7 @@ Resources are accessed as properties on the client (e.g. `client.messages`). All
| Method | Signature | Description |
| ---------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `list` | `list() -> list[SessionResponse]` | List all sessions. |
+| `list` | `list(query=None) -> list[SessionResponse]` | List all sessions. The optional query takes `limit`, `offset` and `name` (an exact, case-sensitive match; no match returns an empty list). |
| `get_config` | `get_config(session_id) -> SessionConfig` | Read a session's engine configuration. |
| `update_config` | `update_config(session_id, body) -> SessionConfig` | Update a running session's configuration; takes effect without re-linking the account. **OPERATOR** |
| `get_proxy` | `get_proxy(session_id) -> SessionProxy` | Read a session's masked proxy configuration (credentials never returned). |
@@ -843,7 +843,7 @@ All payloads are associative arrays; all listed methods are synchronous and retu
| Method | Signature | Description |
| -------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `list` | `list(): array` | List all sessions. |
+| `list` | `list(array $query = []): array` | List all sessions. The optional query takes `limit`, `offset` and `name` (an exact, case-sensitive match; no match returns an empty list). |
| `getConfig` | `getConfig(string $id): array` | Read a session's engine configuration. |
| `updateConfig` | `updateConfig(string $id, array $body): array` | Update a running session's configuration; takes effect without re-linking the account. **OPERATOR** |
| `getProxy` | `getProxy(string $id): array` | Read a session's masked proxy configuration (credentials never returned). |