@@ -73,23 +73,33 @@ type SessionFunction<
7373 Args = any ,
7474> = FunctionReference < T , "public" , { sessionId : SessionId } & Args > ;
7575
76+ type ArgsWithoutSession <
77+ Fn extends SessionFunction < "query" | "mutation" | "action" > ,
78+ > = BetterOmit < FunctionArgs < Fn > , "sessionId" > ;
79+
7680export type SessionQueryArgsArray < Fn extends SessionFunction < "query" > > =
7781 keyof FunctionArgs < Fn > extends "sessionId"
7882 ? [ args ?: EmptyObject | "skip" ]
79- : [ args : BetterOmit < FunctionArgs < Fn > , "sessionId" > | "skip" ] ;
83+ : Partial < ArgsWithoutSession < Fn > > extends ArgsWithoutSession < Fn >
84+ ? [ args ?: ArgsWithoutSession < Fn > | "skip" ]
85+ : [ args : ArgsWithoutSession < Fn > | "skip" ] ;
8086
8187export type SessionArgsArray <
8288 Fn extends SessionFunction < "query" | "mutation" | "action" > ,
8389> = keyof FunctionArgs < Fn > extends "sessionId"
8490 ? [ args ?: EmptyObject ]
85- : [ args : BetterOmit < FunctionArgs < Fn > , "sessionId" > ] ;
91+ : Partial < ArgsWithoutSession < Fn > > extends ArgsWithoutSession < Fn >
92+ ? [ args ?: ArgsWithoutSession < Fn > ]
93+ : [ args : ArgsWithoutSession < Fn > ] ;
8694
8795export type SessionArgsAndOptions <
8896 Fn extends SessionFunction < "mutation" > ,
8997 Options ,
9098> = keyof FunctionArgs < Fn > extends "sessionId"
9199 ? [ args ?: EmptyObject , options ?: Options ]
92- : [ args : BetterOmit < FunctionArgs < Fn > , "sessionId" > , options ?: Options ] ;
100+ : Partial < ArgsWithoutSession < Fn > > extends ArgsWithoutSession < Fn >
101+ ? [ args : ArgsWithoutSession < Fn > , options ?: Options ]
102+ : [ args : ArgsWithoutSession < Fn > , options ?: Options ] ;
93103
94104type SessionPaginatedQueryFunction <
95105 Args extends { paginationOpts : PaginationOptions } = {
0 commit comments