Setu-TS
    Preparing search index...

    Interface IdempotentRouteOptions

    Options for the HTTP idempotent() middleware and the @Idempotent decorator.

    0.9.0

    interface IdempotentRouteOptions {
        fingerprint?: IdempotencyFingerprintSource;
        key?: IdempotencyKeySource;
        leaseMs?: number;
        maxResponseBytes?: number;
        namespace?: string;
        principal?: "optional" | "required";
        redaction?: RedactionPolicy | IRedactionService;
        replayHeaders?: readonly string[];
        required?: boolean;
        response?: "status" | "full";
        ttlMs?: number;
    }
    Index

    Default 'request'.

    Default { header: 'Idempotency-Key' }.

    leaseMs?: number

    Default: the plugin's leaseMs (60,000).

    maxResponseBytes?: number

    Default: the plugin's maxResponseBytes (262,144). UTF-8 bytes of a string body; byte length of a binary body.

    namespace?: string

    Default `${method} ${path}` of the request. 1–256 characters, none below U+0020.

    principal?: "optional" | "required"

    Default 'required': no principal → 401. 'optional': every anonymous request shares ONE scope, so an anonymous caller who sends another anonymous caller's key is served that caller's stored response. Pair 'optional' with response: 'status' unless the response is safe to show any anonymous caller.

    Redacts a JSON-object body before it is stored. Default: none.

    replayHeaders?: readonly string[]

    Extra replayable header names, beyond the default allow-list. Default [].

    required?: boolean

    Default true: a request without a key answers 400. false: it passes through, unclaimed.

    response?: "status" | "full"

    Default 'full'. 'status' stores no body and no headers.

    ttlMs?: number

    Default: the plugin's ttlMs (86,400,000).