swarpc - v0.19.0
    Preparing search index...

    Type Alias ClientMethodExtraCallables<P>

    type ClientMethodExtraCallables<P extends Procedure<Schema, Schema, Schema>> = {
        cancelable: (
            input: Schema.InferInput<P["input"]>,
            onProgress?: (progress: Schema.InferOutput<P["progress"]>) => void,
            requestId?: string,
        ) => CancelablePromise<Schema.InferOutput<P["success"]>>;
        broadcast: Broadcaster<P> & {
            once: Broadcaster<P>;
            onceBy: (
                key: string,
                ...args: Parameters<Broadcaster<P>>,
            ) => ReturnType<Broadcaster<P>> & {
                orThrow: (
                    key: string,
                    ...args: Parameters<Broadcaster<P>>,
                ) => Promise<Schema.InferOutput<P["success"]>[]>;
            };
        };
        once: (
            input: Schema.InferInput<P["input"]>,
            onProgress?: (progress: Schema.InferOutput<P["progress"]>) => void,
        ) => Promise<Schema.InferOutput<P["success"]>>;
        onceBy: (
            key: string,
            input: Schema.InferInput<P["input"]>,
            onProgress?: (progress: Schema.InferOutput<P["progress"]>) => void,
        ) => Promise<Schema.InferOutput<P["success"]>>;
    }

    Type Parameters

    Index

    Properties

    cancelable: (
        input: Schema.InferInput<P["input"]>,
        onProgress?: (progress: Schema.InferOutput<P["progress"]>) => void,
        requestId?: string,
    ) => CancelablePromise<Schema.InferOutput<P["success"]>>

    A method that returns a CancelablePromise. Cancel it by calling .cancel(reason) on it, and wait for the request to resolve by awaiting the request property on the returned object.

    broadcast: Broadcaster<P> & {
        once: Broadcaster<P>;
        onceBy: (
            key: string,
            ...args: Parameters<Broadcaster<P>>,
        ) => ReturnType<Broadcaster<P>> & {
            orThrow: (
                key: string,
                ...args: Parameters<Broadcaster<P>>,
            ) => Promise<Schema.InferOutput<P["success"]>[]>;
        };
    }

    Send the request to specific nodes, or all nodes. Returns an array of results, one for each node the request was sent to. Each result is a PromiseSettledResult, with also an additional property, the node ID of the request The results array also has extra properties for convenience, see BroadcasterResultExtrasMixed, BroadcasterResultExtrasSuccess and BroadcasterResultExtrasFailure

    Type Declaration

    once: (
        input: Schema.InferInput<P["input"]>,
        onProgress?: (progress: Schema.InferOutput<P["progress"]>) => void,
    ) => Promise<Schema.InferOutput<P["success"]>>

    Call the procedure, cancelling any previous ongoing call of this procedure beforehand.

    onceBy: (
        key: string,
        input: Schema.InferInput<P["input"]>,
        onProgress?: (progress: Schema.InferOutput<P["progress"]>) => void,
    ) => Promise<Schema.InferOutput<P["success"]>>

    Call the procedure with a concurrency key, cancelling any previous ongoing call of this procedure with the same key beforehand.