Alokai
You are reading the documentation for SDK v2, which is no longer the latest version. Switch to current

CustomQuery

Generic utility type for creating method-specific customQuery interfaces.

This utility type uses the concept of Distributive Conditional Types to handle SDK methods with multiple custom query keys (e.g. getMe).

export type CustomQuery<KEY extends string> = KEY extends string ? Record<KEY, string> & {
    metadata?: unknown;
} : unknown;