Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 6 additions & 30 deletions packages/orm/src/client/crud-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,7 @@ export type CreateArgs<
> = SimplifyIf<
{
data: CreateInput<Schema, Model>;
select?: SelectInput<Schema, Model>;
include?: IncludeInput<Schema, Model>;
omit?: OmitInput<Schema, Model>;
},
} & SelectIncludeOmit<Schema, Model, true>,
Comment thread
ymc9 marked this conversation as resolved.
Simplify
>;

Expand All @@ -715,13 +712,7 @@ export type CreateManyAndReturnArgs<
Schema extends SchemaDef,
Model extends GetModels<Schema>,
Simplify extends boolean = false,
> = SimplifyIf<
CreateManyInput<Schema, Model> & {
select?: SelectInput<Schema, Model, false, false>;
omit?: OmitInput<Schema, Model>;
},
Simplify
>;
> = SimplifyIf<CreateManyInput<Schema, Model> & Omit<SelectIncludeOmit<Schema, Model, false>, 'include'>, Simplify>;
Comment thread
ymc9 marked this conversation as resolved.
Outdated

type OptionalWrap<Schema extends SchemaDef, Model extends GetModels<Schema>, T extends object> = Optional<
T,
Expand Down Expand Up @@ -855,10 +846,7 @@ export type UpdateArgs<
{
data: UpdateInput<Schema, Model>;
where: WhereUniqueInput<Schema, Model>;
select?: SelectInput<Schema, Model>;
include?: IncludeInput<Schema, Model>;
omit?: OmitInput<Schema, Model>;
},
} & SelectIncludeOmit<Schema, Model, true>,
Comment thread
ymc9 marked this conversation as resolved.
Simplify
>;

Expand All @@ -872,13 +860,7 @@ export type UpdateManyAndReturnArgs<
Schema extends SchemaDef,
Model extends GetModels<Schema>,
Simplify extends boolean = false,
> = SimplifyIf<
UpdateManyPayload<Schema, Model> & {
select?: SelectInput<Schema, Model, false, false>;
omit?: OmitInput<Schema, Model>;
},
Simplify
>;
> = SimplifyIf<UpdateManyPayload<Schema, Model> & Omit<SelectIncludeOmit<Schema, Model, false>, 'include'>, Simplify>;
Comment thread
ymc9 marked this conversation as resolved.
Outdated

type UpdateManyPayload<Schema extends SchemaDef, Model extends GetModels<Schema>, Without extends string = never> = {
data: OrArray<UpdateScalarInput<Schema, Model, Without>>;
Expand All @@ -895,10 +877,7 @@ export type UpsertArgs<
create: CreateInput<Schema, Model>;
update: UpdateInput<Schema, Model>;
where: WhereUniqueInput<Schema, Model>;
select?: SelectInput<Schema, Model>;
include?: IncludeInput<Schema, Model>;
omit?: OmitInput<Schema, Model>;
},
} & SelectIncludeOmit<Schema, Model, true>,
Comment thread
ymc9 marked this conversation as resolved.
Simplify
>;

Expand Down Expand Up @@ -1019,10 +998,7 @@ export type DeleteArgs<
> = SimplifyIf<
{
where: WhereUniqueInput<Schema, Model>;
select?: SelectInput<Schema, Model>;
include?: IncludeInput<Schema, Model>;
omit?: OmitInput<Schema, Model>;
},
} & SelectIncludeOmit<Schema, Model, true>,
Comment thread
ymc9 marked this conversation as resolved.
Simplify
>;

Expand Down
Loading