Skip to content

refactor: remove the remaining @extrachill/api-client dependency #35

Description

@chubes4

Current state

Studio still declares @extrachill/api-client and imports domain clients/types from it, while other workflows correctly use WordPress apiFetch for REST, multipart uploads, and job polling.

Goal

Remove the obsolete package without forcing every request through one client abstraction.

Required sequence

  1. Inventory every runtime and type-only import.
  2. Re-home domain types in their owning package or locally when Studio-specific.
  3. Use canonical Abilities clients where a real ability exists.
  4. Keep direct apiFetch where WordPress REST, multipart media, or job orchestration is the actual contract.
  5. Remove the dependency only when no runtime or type import remains.

Constraints

  • Do not wrap core REST simply to make all calls look uniform.
  • Do not move Data Machine Socials domain contracts into a generic Extra Chill client.
  • Preserve media upload progress, social job polling, analytics reads, and current error shapes.

Acceptance criteria

  • @extrachill/api-client is absent from package manifests and lockfiles.
  • Studio builds, typechecks, and passes all tests.
  • Each call site documents or naturally expresses its owning API boundary.
  • No duplicate generic client is introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wp-nativeRelated to chubes4/wp-native framework integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions