Remote / foldkit-remote

RefusalOfWrite

type · packages/remote/src/mutation.ts:423

type RefusalOfWrite<W> =
  | ('Insert' extends KindOf<W> ? typeof taken.Type : never)
  | ([Exclude<KindOf<W>, 'Insert'>] extends [never]
      ? never
      : W extends ConditionedWrite<any, any>
        ? typeof conflict.Type | typeof unmet.Type
        : typeof conflict.Type)
  | typeof invalid.Type

What a declared write may be refused with: an insert as taken, an update or a delete as a conflict (unmet too, when it has a when), and every one as invalid, since the server's Entity may hold invariants the client's does not show. A write whose kind its type leaves open may be refused as any.