Plasma
Core concepts

Adapters

Transform the raw API response before it reaches your application

An adapter transforms the raw API response before it reaches your application.

import {  } from '@crm/plasma'
import {  } from './routes'

export const  = ({
  : ..,
  : ,
  // API returns { data: [...] } — adapter extracts the array
  : () => .data,
})

When an adapter is provided, the data field of the result tuple is typed as the adapter's return type, not the raw returns type.