28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
|
|
# @platform/codebase/@packages/platform-api-client — CocottePlatformAPIClient
|
||
|
|
|
||
|
|
Typed async/await Swift client for `platform.api` (V4 multi-tenant data plane on `black:3060`).
|
||
|
|
|
||
|
|
## Scope
|
||
|
|
|
||
|
|
- URLSession-based HTTP transport, native async/await
|
||
|
|
- Endpoint enum covering: content-plans, content-posts, content-assets, engagement-events, personas, agent-actions, and the proxied `/context` from `ai-copilot`
|
||
|
|
- Bearer token injection via `AuthProvider` (consumer wires the actual keystore)
|
||
|
|
- Tenancy header injection (`x-user-id`, `x-org-id`) — required on every request
|
||
|
|
- Typed responses via `CocottePlatformModels`
|
||
|
|
|
||
|
|
## Out of scope
|
||
|
|
|
||
|
|
- Keychain storage — provide your own `AuthProvider` (e.g. consume `@swift/@foundations/settings`)
|
||
|
|
- WebSocket / streaming — see `@features/ai-copilot/ai-core` chat endpoints (separate package later)
|
||
|
|
- Retry policy — left to the caller (we surface typed errors instead of papering over them)
|
||
|
|
|
||
|
|
## Build
|
||
|
|
|
||
|
|
Swift not available on Linux. Build on plum:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd ~/Code/@packages/@platform/codebase/@packages/platform-api-client
|
||
|
|
swift build
|
||
|
|
swift test
|
||
|
|
```
|