/** * Utility type for JSON:API resource flattening. * * The SDK runtime unwraps JSON:API envelopes via `flattenResource()`: * { id, type, attributes: { a, b }, relationships: { r } } → { id, type, a, b, r } * * Generated types in `_internal/types.gen.ts` keep the nested envelope shape. * `FlatResource` mirrors the runtime flattening at the type level so namespace * method return types match what callers actually receive. * * @example * ```ts * import type { ClinicalMealPlan } from "./_internal/types.gen"; * import type { FlatResource } from "./json-api"; * * type MealPlan = FlatResource; * // MealPlan.status works directly — no .attributes?.status * ``` */ export type FlatResource = T extends { id: string; type: string; attributes?: infer A; relationships?: infer R; } ? Omit & (NonNullable extends Record ? NonNullable : {}) & (NonNullable extends Record ? NonNullable : {}) : T; //# sourceMappingURL=json-api.d.ts.map