/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import type { OptimisticConcurrencyException } from "effect-app/client/errors" import type * as Effect from "effect-app/Effect" import type * as Option from "effect-app/Option" import type * as S from "effect-app/Schema" export interface Mapped1 { all: Effect.Effect save: (...xes: readonly A[]) => Effect.Effect find: (id: A[IdKey]) => Effect.Effect, S.SchemaError, R> } // TODO: auto use project, and select fields from the From side of schema only export interface Mapped2 { all: Effect.Effect } export interface Mapped { (schema: S.Codec): Mapped1 // TODO: constrain on Encoded2 having to contain only fields that fit Encoded (schema: S.Codec): Mapped2 } export interface MM { (schema: S.Codec): Effect.Effect, never, Repo> // TODO: constrain on Encoded2 having to contain only fields that fit Encoded (schema: S.Codec): Effect.Effect, never, Repo> }