export declare const IncrByAndSetTTLIfNotExists = "\nif redis.call(\"EXISTS\", KEYS[1]) == 0 then\n redis.call(\"INCRBY\", KEYS[1], ARGV[1])\n redis.call(\"EXPIRE\", KEYS[1], ARGV[2])\nend\n\nreturn redis.call(\"GET\", KEYS[1])\n"; export declare const IncrByAndEnsureTTLIsSet = "\nlocal inc = tonumber(ARGV[1])\nlocal ttl = tonumber(ARGV[2])\n\nredis.call(\"INCRBY\", KEYS[1], inc)\n\nif redis.call(\"TTL\", KEYS[1]) == -1 then\n redis.call(\"EXPIRE\", KEYS[1], ttl)\nend\n\nreturn tonumber(redis.call(\"GET\", KEYS[1]))\n"; export declare const DecrByAndEnsureTTLIsSet = "\nlocal inc = tonumber(ARGV[1])\nlocal ttl = tonumber(ARGV[2])\n\nredis.call(\"DECRBY\", KEYS[1], inc)\n\nif redis.call(\"TTL\", KEYS[1]) == -1 then\n redis.call(\"EXPIRE\", KEYS[1], ttl)\nend\n\nreturn tonumber(redis.call(\"GET\", KEYS[1]))\n"; export declare const IncrByFloatAndEnsureTTLIsSet = "\nlocal inc = tonumber(ARGV[1])\nlocal ttl = tonumber(ARGV[2])\n\nredis.call(\"INCRBYFLOAT\", KEYS[1], inc)\n\nif redis.call(\"TTL\", KEYS[1]) == -1 then\n redis.call(\"EXPIRE\", KEYS[1], ttl)\nend\n\nreturn tonumber(redis.call(\"GET\", KEYS[1]))\n"; export declare const IncrByIfExists = "\nif redis.call(\"EXISTS\", KEYS[1]) == 1 then\n redis.call(\"INCRBY\", KEYS[1], ARGV[1])\nend\n\nreturn redis.call(\"GET\", KEYS[1])\n"; export declare const DecrbyAndSetTTLIfNotExists = "\nif redis.call(\"EXISTS\", KEYS[1]) == 0 then\n redis.call(\"DECRBY\", KEYS[1], ARGV[1])\n redis.call(\"EXPIRE\", KEYS[1], ARGV[2])\nend\n\nreturn redis.call(\"GET\", KEYS[1])\n"; export declare const DecrbyIfExists = "\nif redis.call(\"EXISTS\", KEYS[1]) == 1 then\n redis.call(\"DECRBY\", KEYS[1], ARGV[1])\nend\n\nreturn redis.call(\"GET\", KEYS[1])\n"; export declare const IncrByFloatAndSetTTLIfNotExists = "\nif redis.call(\"EXISTS\", KEYS[1]) == 0 then\n redis.call(\"INCRBYFLOAT\", KEYS[1], ARGV[1])\n redis.call(\"EXPIRE\", KEYS[1], ARGV[2])\nend\n\nreturn redis.call(\"GET\", KEYS[1])\n"; export declare const IncrByFloatIfExists = "\nif redis.call(\"EXISTS\", KEYS[1]) == 1 then\n redis.call(\"INCRBYFLOAT\", KEYS[1], ARGV[1])\nend\n\nreturn redis.call(\"GET\", KEYS[1])\n"; export declare const RefreshTTLIfBelowThreshold = "\n-- KEYS[1] : key to inspect\n-- ARGV[1] : threshold in seconds (e.g. 10)\n-- ARGV[2] : new TTL in seconds to set (e.g. 60)\n\nlocal ttl = redis.call(\"TTL\", KEYS[1])\n\n-- ttl == -2 \u2192 key doesn\u2019t exist\n-- ttl == -1 \u2192 key has no expiration\nif ttl == -2 then\n return -2 -- key absent\nend\n\nlocal threshold = tonumber(ARGV[1])\nlocal newTTL = tonumber(ARGV[2])\n\n-- If TTL is missing (-1) or below threshold, refresh it\nif ttl == -1 or ttl < threshold then\n redis.call(\"EXPIRE\", KEYS[1], newTTL)\n return newTTL -- return the TTL we just set\nend\n\nreturn ttl -- unchanged TTL\n"; export declare const incrementAndCompareNumber: () => string;