cocottetech/@platform/codebase/@packages/platform-api-client/README.md
Natalie 8b0bbec503 feat(@projects/@cocottetech): add platform api client endpoints and models
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-07 22:35:21 -07:00

1.1 KiB

@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:

cd ~/Code/@packages/@platform/codebase/@packages/platform-api-client
swift build
swift test