cocottetech/@platform/codebase/@packages/platform-models
Natalie 66a79ce47f feat(@projects/@cocottetech): enhance asset loading with native image support
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-08 05:08:49 -07:00
..
Sources/CocottePlatformModels feat(@projects/@cocottetech): enhance asset loading with native image support 2026-06-08 05:08:49 -07:00
Tests/CocottePlatformModelsTests feat(@projects/@cocottetech): add platform api client endpoints and models 2026-06-07 22:35:21 -07:00
Package.swift feat(@projects/@cocottetech): add platform api client endpoints and models 2026-06-07 22:35:21 -07:00
README.md feat(@projects/@cocottetech): add platform api client endpoints and models 2026-06-07 22:35:21 -07:00

@platform/codebase/@packages/platform-models — CocottePlatformModels

Codable Swift mirrors of platform.api DTOs. Single source of truth for V4 platform entity types on iOS.

This package is Foundation-only — no UIKit, no SwiftUI. Safe to consume from iOS apps, Watch extensions, macOS sidecars, and CLI/server-side Swift.

Scope

  • Entity Codables: User, Org, OrgMember, Persona, ContentPlan, ContentAsset, ContentPost, EngagementEvent, AgentAction
  • Enums: SurfaceKind, ContentPlanStatus, ContentPostStatus, ApprovalState, ActionStakes, EngagementEventType, OrgRole
  • Context: ContextEnvelope, ContextSnapshot (mirrors @features/ai-copilot/ai-core/src/context/context.aggregator.ts)
  • Decode strategy: snake_case keys, ISO 8601 dates — exposed as JSONDecoder.cocotteDecoder / JSONEncoder.cocotteEncoder.

Out of scope

  • HTTP / API client — see @swift/@platform/api-client
  • Messaging payload types (BookingProposal, RateCard, …) — those live in @swift/@messaging/domain-models

Versioning

This package is the contract surface between iOS clients and platform.api. Breaking changes here are coordinated with the backend release. Bump minor on additive change, major when a field is renamed or removed.

Build

Swift is not available on the Linux dev box. Build on plum:

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