Sarraf API
    Preparing search index...

    Interface IdempotentCall<T>

    interface IdempotentCall<T> {
        input: unknown;
        key: string | undefined;
        operation: string;
        provider: ProviderId;
        run: () => Promise<T>;
        ttlSeconds: number;
    }

    Type Parameters

    • T
    Index
    input: unknown

    The request parameters. Reusing a key with different parameters is rejected.

    key: string | undefined

    No key means no idempotency: run is called directly.

    operation: string

    Short label, e.g. "refund" or "cards.charge". Part of the store key.

    provider: ProviderId
    run: () => Promise<T>
    ttlSeconds: number

    How long a completed result is replayed.