Q: What is wrong with inference generic types I wrote a function wrapper (callApi), which is adding automatically some fields to params passed to the wrapped function (service). And trying to infer a short version of the type of params passed in the wrapped function, to use this typing when calling wrapper (see the last expression callApi).
Typing should highlight the error when a user passes some different parameter and should allow passing of all params from wrapped function (service in the example)
Here is playground
type RequiredParams = {
    requiredParam?: string;
};

type ApiFunc<Params, Returned> = (
    params?: Omit<Params, 'requiredParam'>,
) => Promise<Returned>;

export type CallApiFunc = <Returned, Params extends RequiredParams>(
    func: ApiFunc<Params, Returned>,
    params?: Omit<Params, 'requiredParam'>,
) => Promise<Returned>;

const callApi: CallApiFunc = (
    func, 
    params, 
) => {
    return func({
      ...params,
      requiredParam: 'somevalue-maybe-auth-token'
    });
};

const service = function ({arg} : {arg: number, requiredParam: string}) {
  return null;
}

callApi(service, {
  arg: 3, // Should not be error
  // test: 'ohoh', // Should be error
});


A: The reason the compiler doesn't accept service as the input of callApi is this line func: ApiFunc<Params, Returned>. You want the service function to be the original one with the full parameters and not something different where specific arguments are omitted. You only want to omit arguments for the params-arg of callApi. I would model your types like this:
type RequiredParams = {
    requiredParam: string;
};

type OmitNonEmpty<Params, Keys extends string | number | symbol> = keyof Omit<Params, Keys> extends never
    ? never
    : Omit<{ requiredParam: string }, Keys>;

function callApi<Returned, Params extends RequiredParams>(
    func: (args: Params) => Returned,
    params?: OmitNonEmpty<Params, 'requiredParam'>,
): Returned {
    const requiredParams = {
        requiredParam: 'somevalue-maybe-auth-token',
        ...params,
    } as Params;

    return func(requiredParams);
}

const service = function (args: { arg: number; requiredParam: string }) {
    return Promise.resolve(null);
};

const service2 = function (args: { requiredParam: string }) {
    return Promise.resolve(null);
};

const businessCase = callApi(service, {
    arg: 3, // Should not be error
    // test: 'ohoh', // Should be error
});

const businessCase2 = callApi(service2, {
    arg: 3,
}); // doesn't work

const businessCase3 = callApi(service2); // works



This part hits a limitation of typescript:
const requiredParams = {
    requiredParam: "somevalue-maybe-auth-token",
    ...params
} as Parameters<typeof func>[number];

Typescript won't fully evaluate the type of Omit<Params, 'requiredParam'> until callApi is actually used, and the generic Param is replaced with a real type. But since the definition of const requiredParams is made before callApi is used typescript won't recognize that RequiredParams & Omit<Params, 'requiredParam'> is equal to Params extends RequiredParams. Thats why we have to typecast here.

A: Problems
callApi serves as a wrapper around some function func.  We call callApi with an incomplete set of params, and those params are augmented with {requiredParam: string} before calling the func.
The error that you are having right now:

Argument of type '{ requiredParam: "somevalue-maybe-auth-token"; }' is not assignable to parameter of type 'Omit<Params, "requiredParam">'.`

Is due to a mistake in the definition of ApiFunc.  This the function that we call after we've added requiredParam, so its params type should be Params instead of Omit<Params, 'requiredParam'>.
After fixing that, we get a different error:

Argument of type '{ requiredParam: string; }' is not assignable to parameter of type 'Params'.
'{ requiredParam: string; }' is assignable to the constraint of type 'Params', but 'Params' could be instantiated with a different subtype of constraint 'RequiredParams'.

This one is because you have made it such that params is optional and could be undefined even if the generic type parameter Params has required properties.  So we cannot ensure that we are passing all of the necessary arguments to func.
But we're also not getting good type inference on your example with callApi(service.  So I would switch up the typings a bit and use func as the generic.
Solution
This is actually all that you need:
const callApi = <F extends (params: any) => any> (
    func: F,
    params: Omit<Parameters<F>[0], 'requiredParam'>, 
): ReturnType<F> => {
    return func({
      ...params,
      requiredParam: 'somevalue-maybe-auth-token'
    });
};


*

*The first argument is a function F  which has one argument: F extends (params: any) => any

*The second argument is the argument of F without the param that we are adding: Omit<Parameters<F>[0], 'requiredParam'>

*The return type is the same as the return type of F: ReturnType<F>.

You get an error if you use callApi on service with no arguments or with extra arguments, but you are able to call it just fine with the correct arg.
Typescript Playground Link

A: As a supplementary answer to Linda's addressing the concern that the {} type is compatible with objects with any number of arbitrary-typed properties:

{} type is very broad* due to the structural nature of TypeScript's type system. Contrary to the normal intuition, it does not mean an "empty object", but an unconstrained object type. Thus, when one passes extra properties, the compiler is fine with it.
Now, this is trivially solved by checking if an unconstrained object type is assignable to our constrained type (Omit<Parameters<F>[0]). This will only happen if they are one and the same, therefore, the true branch of a checker should be never:
{} extends Omit<Parameters<F>[0], 'requiredParam'> ? never : Omit<Parameters<F>[0], 'requiredParam'>

Let's test the updated type:
const callApi = <F extends (params: any) => any> (
    func: F,
    params: {} extends Omit<Parameters<F>[0], 'requiredParam'> ? never : Omit<Parameters<F>[0], 'requiredParam'>, 
): ReturnType<F> => {
    return func({
      ...params,
      requiredParam: 'somevalue-maybe-auth-token'
    });
};

const service2 = function ({ arg } : { arg: number, requiredParam: string }) {
  return Promise.resolve(arg);
}

callApi(service2, {}); //Property 'arg' is missing in type '{}'

callApi(service2, {
  arg: 3, // OK
  test: 'ohoh', // Object literal may only specify known properties, and 'test' does not exist
});

callApi(service2, {
  arg: 3, //OK
});

Playground

* Note that the empty object literal (when you assign an empty object to a variable, for example, const obj = {};) truly means an empty object due to excess property checks in object literals.
